From 77223e1f58659a00f709e79c7a3a2577e175b484 Mon Sep 17 00:00:00 2001 From: wuggy Date: Sat, 11 Jul 2026 21:52:08 +0100 Subject: [PATCH 01/72] Dactyloidae version 13.3 initial commit --- browser/config/version.txt | 2 +- browser/config/version_display.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/browser/config/version.txt b/browser/config/version.txt index c059982684..b519c5250b 100644 --- a/browser/config/version.txt +++ b/browser/config/version.txt @@ -1 +1 @@ -52.13.2 \ No newline at end of file +52.13.3 \ No newline at end of file diff --git a/browser/config/version_display.txt b/browser/config/version_display.txt index 4092290770..e6ef606944 100644 --- a/browser/config/version_display.txt +++ b/browser/config/version_display.txt @@ -1 +1 @@ -13.2 \ No newline at end of file +13.3 \ No newline at end of file From 4f9bc81c617fafd8b1902c4200bc6353688f6db9 Mon Sep 17 00:00:00 2001 From: wuggy Date: Mon, 13 Jul 2026 17:47:37 +0100 Subject: [PATCH 02/72] Update MSVC 32 bit mozconfig for 64 bit changes --- mozconfigs/windows/uxp-win32-msvc | 152 +++++++++++++++--------------- 1 file changed, 74 insertions(+), 78 deletions(-) diff --git a/mozconfigs/windows/uxp-win32-msvc b/mozconfigs/windows/uxp-win32-msvc index cb0f4dae00..9d4c9b5e45 100644 --- a/mozconfigs/windows/uxp-win32-msvc +++ b/mozconfigs/windows/uxp-win32-msvc @@ -1,78 +1,74 @@ -## UXP mozconfig thing based off roytam1's config and r3dfox config - -##Uncomment PGO for release build - -# 16 jobs for 16 cores -mk_add_options MOZ_MAKE_FLAGS="-j16" - -# x86 build -ac_add_options --host=i686-pc-mingw32 -ac_add_options --target=i686-pc-mingw32 -WIN32_REDIST_DIR=$VCINSTALLDIR/Redist/MSVC/14.16.27012/x86 -WIN_UCRT_REDIST_DIR=$WINDOWSSDKDIR/Redist/10.0.19041.0/ucrt/DLLs/r86 - -# Build only Hydra -ac_add_options --enable-application=basilisk -ac_add_options --disable-artifact-builds - -# Updater stuffs -ac_add_options --disable-updater -# Enable if update server and signatures are figured out -#ac_add_options --enable-nss-mar - -# Optimization settings -ac_add_options --disable-accessibility -ac_add_options --disable-debug -ac_add_options --disable-debug-js-modules -ac_add_options --disable-debug-symbols -ac_add_options --disable-tests -ac_add_options --enable-devtools -#ac_add_options --enable-install-strip -ac_add_options --enable-jemalloc -ac_add_options --enable-js-lto -ac_add_options --enable-optimize="-O2 -Ob2ity -GS- -GFAT -Qpar -Qfast_transcendentals -openmp" -ac_add_options --enable-phoenix-extensions -ac_add_options --enable-release -ac_add_options --enable-shared-js -ac_add_options --enable-strip -MOZ_OPTIMIZE=1 -export MOZ_OPTIMIZE=1 -mk_add_options MOZ_OPTIMIZE=1 -export MOZILLA_OFFICIAL=1 -export STRIP_FLAGS="--strip-debug --strip-unneeded" - -# Media settings -ac_add_options --enable-av1 -ac_add_options --enable-jxl -ac_add_options --enable-raw -ac_add_options --enable-webrtc - -# Client settings -ac_add_options --disable-crashreporter -ac_add_options --disable-eme -ac_add_options --disable-maintenance-service -ac_add_options --disable-parental-controls -mk_add_options MOZ_SERVICES_HEALTHREPORT=0 -export CROSS_COMPILE=0 -export MOZ_CRASHREPORTER=0 -export MOZ_DATA_REPORTING=0 -export MOZ_INCLUDE_SOURCE_INFO=1 -export MOZ_REQUIRE_SIGNING= -export MOZ_SOURCE_CHANGESET=iloveneedingtobodgechangesetfornoreason -export MOZ_TELEMETRY_REPORTING= -export MOZ_PACKAGE_JSSHELL=1 - -# Set -Copt-level=3 -export OPT_LEVEL="3" -ac_add_options OPT_LEVEL="3" - -# Enable LTO -export MOZ_LTO=1 -ac_add_options MOZ_LTO=1 - -# Compiler and Linker flags -export CFLAGS="-O2" -export CPPFLAGS="-O2" -export CXXFLAGS="-O2" -export POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine" -export VERBOSE=1 +## UXP mozconfig thing based off roytam1's config and r3dfox config + +##Uncomment PGO for release build + +# 16 jobs for 16 cores +mk_add_options MOZ_MAKE_FLAGS="-j6" + +# x86 build +ac_add_options --host=i686-pc-mingw32 +ac_add_options --target=i686-pc-mingw32 +WIN32_REDIST_DIR=$VCINSTALLDIR/Redist/MSVC/14.16.27012/x86 + +# Build only Hydra +ac_add_options --enable-application=basilisk +ac_add_options --disable-artifact-builds + +# Updater stuffs +ac_add_options --disable-updater +# Enable if update server and signatures are figured out +#ac_add_options --enable-nss-mar + +# Optimization settings +ac_add_options --disable-accessibility +ac_add_options --disable-debug +ac_add_options --disable-debug-js-modules +ac_add_options --disable-debug-symbols +ac_add_options --disable-tests +ac_add_options --enable-devtools +ac_add_options --disable-jemalloc +ac_add_options --enable-js-lto +ac_add_options --enable-phoenix-extensions +ac_add_options --enable-release +ac_add_options --enable-shared-js +ac_add_options --enable-strip +MOZ_OPTIMIZE=1 +export MOZ_OPTIMIZE=1 +mk_add_options MOZ_OPTIMIZE=1 +export MOZILLA_OFFICIAL=1 + +# Media settings +ac_add_options --disable-av1 +ac_add_options --enable-jxl +ac_add_options --enable-raw +ac_add_options --disable-webrtc + +# Client settings +ac_add_options --disable-crashreporter +ac_add_options --disable-eme +ac_add_options --disable-maintenance-service +ac_add_options --disable-parental-controls +mk_add_options MOZ_SERVICES_HEALTHREPORT=0 +export CROSS_COMPILE=0 +export MOZ_CRASHREPORTER=0 +export MOZ_DATA_REPORTING=0 +export MOZ_INCLUDE_SOURCE_INFO=1 +export MOZ_REQUIRE_SIGNING= +export MOZ_SOURCE_CHANGESET=iloveneedingtobodgechangesetfornoreason +export MOZ_TELEMETRY_REPORTING= +export MOZ_PACKAGE_JSSHELL=1 + +# Set -Copt-level=3 +export OPT_LEVEL="3" +ac_add_options OPT_LEVEL="3" + +# Enable LTO +export MOZ_LTO=1 +ac_add_options MOZ_LTO=1 + +# Linker flags +ac_add_options --enable-optimize="-O2 -Ob2ity- -GS- -Qpar -Qfast_transcendentals -openmp -Oi -Gy -Gw -GF -GT -fp:precise -Zc:inline -Zc:throwingNew -Zc:__cplusplus -arch:SSE2 -std:c++17 -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS" +mk_add_options "LDFLAGS=-OPT:REF,ICF,WIN64,LBR -OPT:ICF=3 -INCREMENTAL:NO -LTCG:NO -DYNAMICBASE -NXCOMPAT -MACHINE:X64 -SUBSYSTEM:WINDOWS,5.1 -Brepro -FUNCTIONPADMIN -ALIGN:4096 -RELEASE" +export POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine" +export STRIP_FLAGS="--strip-all --remove-section=.comment --remove-section=.note --remove-section=.eh_frame" +export VERBOSE=1 From 0a643420fe9f739c69751819ef20461a98cecada Mon Sep 17 00:00:00 2001 From: wuggy Date: Mon, 13 Jul 2026 17:48:27 +0100 Subject: [PATCH 03/72] Update MSVC 64 bit mozconfig for new changes --- mozconfigs/windows/uxp-win64-msvc | 138 +++++++++++++++--------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/mozconfigs/windows/uxp-win64-msvc b/mozconfigs/windows/uxp-win64-msvc index 0ec522f966..5253203ea7 100644 --- a/mozconfigs/windows/uxp-win64-msvc +++ b/mozconfigs/windows/uxp-win64-msvc @@ -1,69 +1,69 @@ -# 16 jobs for 16 cores -mk_add_options MOZ_MAKE_FLAGS="-j16" - -# x64 build -ac_add_options --host=x86_64-pc-mingw32 -ac_add_options --target=x86_64-pc-mingw32 - -# Build only Dactyloidae -ac_add_options --enable-application=browser -ac_add_options --disable-artifact-builds - -# Updater stuffs -ac_add_options --disable-updater -# Enable if update server and signatures are figured out -#ac_add_options --enable-nss-mar - -# Optimization settings -ac_add_options --disable-accessibility -ac_add_options --disable-debug -ac_add_options --disable-debug-js-modules -ac_add_options --disable-debug-symbols -ac_add_options --disable-tests -ac_add_options --enable-devtools -#ac_add_options --enable-install-strip -ac_add_options --enable-jemalloc -ac_add_options --enable-js-lto -ac_add_options --enable-phoenix-extensions -ac_add_options --enable-release -ac_add_options --enable-shared-js -ac_add_options --enable-strip -MOZ_OPTIMIZE=1 -export MOZ_OPTIMIZE=1 -mk_add_options MOZ_OPTIMIZE=1 -export MOZILLA_OFFICIAL=1 - -# Media settings -ac_add_options --enable-av1 -ac_add_options --enable-jxl -ac_add_options --enable-raw -ac_add_options --disable-webrtc - -# Client settings -ac_add_options --disable-crashreporter -ac_add_options --disable-eme -ac_add_options --disable-maintenance-service -ac_add_options --disable-parental-controls -mk_add_options MOZ_SERVICES_HEALTHREPORT=0 -export CROSS_COMPILE=0 -export MOZ_CRASHREPORTER=0 -export MOZ_DATA_REPORTING=0 -export MOZ_INCLUDE_SOURCE_INFO=1 -export MOZ_REQUIRE_SIGNING= -export MOZ_SOURCE_CHANGESET=iloveneedingtobodgechangesetfornoreason -export MOZ_TELEMETRY_REPORTING= -export MOZ_PACKAGE_JSSHELL=1 - -# Set -Copt-level=3 -export OPT_LEVEL="3" -ac_add_options OPT_LEVEL="3" - -# Compiler and Linker flags -export CFLAGS="-O2" -export CPPFLAGS="-O2" -export CXXFLAGS="-O2" -ac_add_options --enable-optimize="-O2 -Ob2ity -GS- -Qpar -Qfast_transcendentals -openmp -Oi -Gy -Gw -GF -GT -fp:precise -Zc:inline -Zc:throwingNew -Zc:__cplusplus -arch:SSE2" -mk_add_options "LDFLAGS=-OPT:REF,ICF,WIN64,LBR -OPT:ICF=3 -INCREMENTAL:NO -LTCG:NO -DYNAMICBASE -NXCOMPAT -MACHINE:X64 -SUBSYSTEM:WINDOWS,5.2 -Brepro -FUNCTIONPADMIN -ALIGN:4096 -RELEASE" -export POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine" -export STRIP_FLAGS="--strip-all --remove-section=.comment --remove-section=.note --remove-section=.eh_frame" -export VERBOSE=1 +# 16 jobs for 16 cores +mk_add_options MOZ_MAKE_FLAGS="-j16" + +# x64 build +ac_add_options --host=x86_64-pc-mingw32 +ac_add_options --target=x86_64-pc-mingw32 + +# Build only Dactyloidae +ac_add_options --enable-application=browser +ac_add_options --disable-artifact-builds + +# Updater stuffs +ac_add_options --disable-updater +# Enable if update server and signatures are figured out +#ac_add_options --enable-nss-mar + +# Optimization settings +ac_add_options --disable-accessibility +ac_add_options --disable-debug +ac_add_options --disable-debug-js-modules +ac_add_options --disable-debug-symbols +ac_add_options --disable-tests +ac_add_options --enable-devtools +#ac_add_options --enable-install-strip +ac_add_options --enable-jemalloc +ac_add_options --enable-js-lto +ac_add_options --enable-phoenix-extensions +ac_add_options --enable-release +ac_add_options --enable-shared-js +ac_add_options --enable-strip +MOZ_OPTIMIZE=1 +export MOZ_OPTIMIZE=1 +mk_add_options MOZ_OPTIMIZE=1 +export MOZILLA_OFFICIAL=1 + +# Media settings +ac_add_options --disable-av1 +ac_add_options --enable-jxl +ac_add_options --enable-raw +ac_add_options --disable-webrtc + +# Client settings +ac_add_options --disable-crashreporter +ac_add_options --disable-eme +ac_add_options --disable-maintenance-service +ac_add_options --disable-parental-controls +mk_add_options MOZ_SERVICES_HEALTHREPORT=0 +export CROSS_COMPILE=0 +export MOZ_CRASHREPORTER=0 +export MOZ_DATA_REPORTING=0 +export MOZ_INCLUDE_SOURCE_INFO=1 +export MOZ_REQUIRE_SIGNING= +export MOZ_SOURCE_CHANGESET=iloveneedingtobodgechangesetfornoreason +export MOZ_TELEMETRY_REPORTING= +export MOZ_PACKAGE_JSSHELL=1 + +# Set -Copt-level=3 +export OPT_LEVEL="3" +ac_add_options OPT_LEVEL="3" + +# Compiler and Linker flags +export CFLAGS="-O2" +export CPPFLAGS="-O2" +export CXXFLAGS="-O2" +ac_add_options --enable-optimize="-O2 -Ob2ity -GS- -Qpar -Qfast_transcendentals -openmp -Oi -Gy -Gw -GF -GT -fp:precise -Zc:inline -Zc:throwingNew -Zc:__cplusplus -arch:SSE2 -std:c++17 -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS"" +mk_add_options "LDFLAGS=-OPT:REF,ICF,WIN64,LBR -OPT:ICF=3 -INCREMENTAL:NO -LTCG:NO -DYNAMICBASE -NXCOMPAT -MACHINE:X64 -SUBSYSTEM:WINDOWS,5.2 -Brepro -FUNCTIONPADMIN -ALIGN:4096 -RELEASE" +export POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine" +export STRIP_FLAGS="--strip-all --remove-section=.comment --remove-section=.note --remove-section=.eh_frame" +export VERBOSE=1 From 19de7113160096eb5b27bb9b8a733dad2b9ba05a Mon Sep 17 00:00:00 2001 From: wuggy Date: Mon, 13 Jul 2026 17:49:36 +0100 Subject: [PATCH 04/72] fix typo --- mozconfigs/windows/uxp-win64-msvc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozconfigs/windows/uxp-win64-msvc b/mozconfigs/windows/uxp-win64-msvc index 5253203ea7..07b583d00b 100644 --- a/mozconfigs/windows/uxp-win64-msvc +++ b/mozconfigs/windows/uxp-win64-msvc @@ -62,7 +62,7 @@ ac_add_options OPT_LEVEL="3" export CFLAGS="-O2" export CPPFLAGS="-O2" export CXXFLAGS="-O2" -ac_add_options --enable-optimize="-O2 -Ob2ity -GS- -Qpar -Qfast_transcendentals -openmp -Oi -Gy -Gw -GF -GT -fp:precise -Zc:inline -Zc:throwingNew -Zc:__cplusplus -arch:SSE2 -std:c++17 -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS"" +ac_add_options --enable-optimize="-O2 -Ob2ity -GS- -Qpar -Qfast_transcendentals -openmp -Oi -Gy -Gw -GF -GT -fp:precise -Zc:inline -Zc:throwingNew -Zc:__cplusplus -arch:SSE2 -std:c++17 -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS" mk_add_options "LDFLAGS=-OPT:REF,ICF,WIN64,LBR -OPT:ICF=3 -INCREMENTAL:NO -LTCG:NO -DYNAMICBASE -NXCOMPAT -MACHINE:X64 -SUBSYSTEM:WINDOWS,5.2 -Brepro -FUNCTIONPADMIN -ALIGN:4096 -RELEASE" export POLLY="-mllvm -polly -mllvm -polly-2nd-level-tiling -mllvm -polly-loopfusion-greedy -mllvm -polly-pattern-matching-based-opts -mllvm -polly-position=before-vectorizer -mllvm -polly-vectorizer=stripmine" export STRIP_FLAGS="--strip-all --remove-section=.comment --remove-section=.note --remove-section=.eh_frame" From 77924521058461f4a2b32ee3d0e00e1e8e7007bc Mon Sep 17 00:00:00 2001 From: wuggy Date: Wed, 22 Jul 2026 15:14:39 -0700 Subject: [PATCH 05/72] More optimisations n shit --- dom/base/nsDOMTokenList.cpp | 66 +++++++++++++++++++++++++++++++++---- js/src/jsarray.cpp | 17 ++++++++-- js/src/jsstr.cpp | 12 +++++++ 3 files changed, 86 insertions(+), 9 deletions(-) diff --git a/dom/base/nsDOMTokenList.cpp b/dom/base/nsDOMTokenList.cpp index 87fb11e8c7..02acabacac 100644 --- a/dom/base/nsDOMTokenList.cpp +++ b/dom/base/nsDOMTokenList.cpp @@ -127,7 +127,29 @@ void nsDOMTokenList::AddInternal(const nsAttrValue* aAttr, const nsTArray& aTokens) { - if (!mElement) { + if (!mElement || aTokens.IsEmpty()) { + return; + } + + // Hot path: single-token classList.add() when the class is already present. + // Skip attribute rebuild and SetAttr entirely (avoids mutation observers / + // style invalidation). Frameworks hit this constantly. + if (aTokens.Length() == 1) { + const nsString& token = aTokens[0]; + if (aAttr && aAttr->Contains(token)) { + return; + } + + nsAutoString resultStr; + if (aAttr) { + aAttr->ToString(resultStr); + if (!resultStr.IsEmpty() && + !nsContentUtils::IsHTMLWhitespace(resultStr.Last())) { + resultStr.Append(' '); + } + } + resultStr.Append(token); + mElement->SetAttr(kNameSpaceID_None, mAttrAtom, resultStr, true); return; } @@ -161,6 +183,11 @@ nsDOMTokenList::AddInternal(const nsAttrValue* aAttr, addedClasses.AppendElement(aToken); } + // No new tokens: leave the attribute untouched (do not create class=""). + if (!oneWasAdded) { + return; + } + mElement->SetAttr(kNameSpaceID_None, mAttrAtom, resultStr, true); } @@ -190,20 +217,37 @@ nsDOMTokenList::RemoveInternal(const nsAttrValue* aAttr, { MOZ_ASSERT(aAttr, "Need an attribute"); + if (aTokens.IsEmpty()) { + return; + } + + // Hot path: single-token classList.remove() when the class is absent. + if (aTokens.Length() == 1 && !aAttr->Contains(aTokens[0])) { + return; + } + nsAutoString input; aAttr->ToString(input); WhitespaceTokenizer tokenizer(input); nsAutoString output; + bool removed = false; while (tokenizer.hasMoreTokens()) { auto& currentToken = tokenizer.nextToken(); - if (!aTokens.Contains(currentToken)) { - if (!output.IsEmpty()) { - output.Append(char16_t(' ')); - } - output.Append(currentToken); + if (aTokens.Contains(currentToken)) { + removed = true; + continue; } + if (!output.IsEmpty()) { + output.Append(char16_t(' ')); + } + output.Append(currentToken); + } + + // Token set unchanged: skip SetAttr to avoid style/mutation work. + if (!removed) { + return; } mElement->SetAttr(kNameSpaceID_None, mAttrAtom, output, true); @@ -302,6 +346,16 @@ nsDOMTokenList::ReplaceInternal(const nsAttrValue* aAttr, const nsAString& aToken, const nsAString& aNewToken) { + // Replacing a token with itself cannot change the token set. + if (aToken.Equals(aNewToken)) { + return; + } + + // Old token absent: no update (and avoid rewriting whitespace). + if (!aAttr->Contains(aToken)) { + return; + } + nsAutoString attribute; aAttr->ToString(attribute); diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp index 7fa01b93a4..6f646b3b2d 100644 --- a/js/src/jsarray.cpp +++ b/js/src/jsarray.cpp @@ -1221,7 +1221,12 @@ js::array_join(JSContext* cx, unsigned argc, Value* vp) sepstr = cx->names().comma; } - // Step 6 is implicit in the loops below. + // Step 6: empty arrays always join to the empty string. + // (Separator ToString above still runs for side effects / OOM.) + if (length == 0) { + args.rval().setString(cx->names().empty); + return true; + } // An optimized version of a special case of steps 7-11: when length==1 and // the 0th element is a string, ToString() of that element is a no-op and @@ -1381,8 +1386,8 @@ template DenseElementResult ArrayReverseDenseKernel(JSContext* cx, HandleObject obj, uint32_t length) { - /* An empty array or an array with no elements is already reversed. */ - if (length == 0 || GetBoxedOrUnboxedInitializedLength(obj) == 0) + /* Empty, singleton, or uninitialized arrays are already reversed. */ + if (length <= 1 || GetBoxedOrUnboxedInitializedLength(obj) == 0) return DenseElementResult::Success; if (Type == JSVAL_TYPE_MAGIC) { @@ -1451,6 +1456,12 @@ js::array_reverse(JSContext* cx, unsigned argc, Value* vp) if (!GetLengthProperty(cx, obj, &len)) return false; + // length 0/1: reverse is a no-op; return this immediately. + if (len <= 1) { + args.rval().setObject(*obj); + return true; + } + if (!ObjectMayHaveExtraIndexedProperties(obj)) { ArrayReverseDenseKernelFunctor functor(cx, obj, len); DenseElementResult result = CallBoxedOrUnboxedSpecialization(functor, obj); diff --git a/js/src/jsstr.cpp b/js/src/jsstr.cpp index aa0a503f72..5209e979de 100644 --- a/js/src/jsstr.cpp +++ b/js/src/jsstr.cpp @@ -2329,6 +2329,12 @@ js::str_startsWith(JSContext* cx, unsigned argc, Value* vp) // Step 13 uint32_t searchLen = searchStr->length(); + // Empty search string always matches (and is extremely common). + if (searchLen == 0) { + args.rval().setBoolean(true); + return true; + } + // Step 14 if (searchLen + start < searchLen || searchLen + start > textLen) { args.rval().setBoolean(false); @@ -2395,6 +2401,12 @@ js::str_endsWith(JSContext* cx, unsigned argc, Value* vp) // Step 13 uint32_t searchLen = searchStr->length(); + // Empty search string always matches. + if (searchLen == 0) { + args.rval().setBoolean(true); + return true; + } + // Step 15 (reordered) if (searchLen > end) { args.rval().setBoolean(false); From bbc9a10f93533285c02ae887649f964c5f42c489 Mon Sep 17 00:00:00 2001 From: wuggy Date: Tue, 28 Jul 2026 22:11:45 +0100 Subject: [PATCH 06/72] 13.2.1 pt 1 --- browser/config/version_display.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/config/version_display.txt b/browser/config/version_display.txt index e6ef606944..16b080e5b3 100644 --- a/browser/config/version_display.txt +++ b/browser/config/version_display.txt @@ -1 +1 @@ -13.3 \ No newline at end of file +13.2.1 \ No newline at end of file From 2e7355c0ef0aeec53260e52adea24f2e541b645b Mon Sep 17 00:00:00 2001 From: wuggy Date: Tue, 28 Jul 2026 22:11:58 +0100 Subject: [PATCH 07/72] 13.2.1 pt 2 --- browser/config/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/browser/config/version.txt b/browser/config/version.txt index b519c5250b..ceedae9682 100644 --- a/browser/config/version.txt +++ b/browser/config/version.txt @@ -1 +1 @@ -52.13.3 \ No newline at end of file +52.13.2.1 \ No newline at end of file From 91b45c0d14ce0a6a1771249fc0bc906a3e9bc98e Mon Sep 17 00:00:00 2001 From: wuggy Date: Tue, 28 Jul 2026 23:21:45 +0100 Subject: [PATCH 08/72] Dactyloidae Milsko Widget initial commit --- widget/milsko/README.md | 4 + widget/milsko/milskosrc/.clang-format | 24 + widget/milsko/milskosrc/.clangd | 3 + widget/milsko/milskosrc/.gitattributes | 17 + widget/milsko/milskosrc/.gitignore | 33 + widget/milsko/milskosrc/CHANGELOG.txt | 17 + widget/milsko/milskosrc/CMakeLists.txt | 508 + widget/milsko/milskosrc/Doxyfile | 26 + widget/milsko/milskosrc/Jenkinsfile | 105 + widget/milsko/milskosrc/LICENSE | 24 + widget/milsko/milskosrc/NTMakefile | 328 + widget/milsko/milskosrc/README.txt | 72 + widget/milsko/milskosrc/WatMakefile | 506 + widget/milsko/milskosrc/configure | 363 + widget/milsko/milskosrc/doc/BACKENDDEV.md | 25 + widget/milsko/milskosrc/doc/NEWWIDGET.md | 7 + widget/milsko/milskosrc/doc/TIERS.md | 20 + widget/milsko/milskosrc/doc/TINYCONFIG.md | 9 + .../milsko/milskosrc/examples/CMakeLists.txt | 7 + .../milskosrc/examples/basic/CMakeLists.txt | 26 + widget/milsko/milskosrc/examples/basic/box.c | 74 + .../milskosrc/examples/basic/calculator.c | 185 + .../milskosrc/examples/basic/checkbox.c | 28 + .../milskosrc/examples/basic/clipboard.c | 78 + .../milskosrc/examples/basic/colorpicker.c | 48 + .../milskosrc/examples/basic/combobox.c | 22 + .../milsko/milskosrc/examples/basic/example.c | 160 + .../milskosrc/examples/basic/filechooser.c | 70 + .../milsko/milskosrc/examples/basic/image.c | 42 + .../milsko/milskosrc/examples/basic/listbox.c | 61 + .../milskosrc/examples/basic/messagebox.c | 57 + .../milskosrc/examples/basic/periodic.c | 326 + .../milskosrc/examples/basic/progressbar.c | 18 + .../milskosrc/examples/basic/radiobox.c | 28 + .../milsko/milskosrc/examples/basic/rotate.c | 95 + .../milskosrc/examples/basic/scrollbar.c | 20 + .../milskosrc/examples/basic/sevensegment.c | 23 + .../milskosrc/examples/basic/subwindow.c | 52 + widget/milsko/milskosrc/examples/basic/tab.c | 43 + .../milskosrc/examples/basic/treeview.c | 50 + .../milskosrc/examples/basic/viewport.c | 42 + .../milskosrc/examples/gldemos/CMakeLists.txt | 27 + .../milsko/milskosrc/examples/gldemos/boing.c | 158 + .../milsko/milskosrc/examples/gldemos/clock.c | 169 + .../milsko/milskosrc/examples/gldemos/cube.c | 93 + .../milsko/milskosrc/examples/gldemos/gears.c | 243 + .../milskosrc/examples/gldemos/glutlayer.c | 73 + .../milskosrc/examples/gldemos/triangle.c | 88 + .../milskosrc/examples/gldemos/tripaint.c | 138 + widget/milsko/milskosrc/examples/harvard.c | 722 ++ widget/milsko/milskosrc/examples/picture.jpg | Bin 0 -> 7471 bytes widget/milsko/milskosrc/examples/picture.png | Bin 0 -> 27213 bytes .../milskosrc/examples/vkdemos/CMakeLists.txt | 30 + .../examples/vkdemos/triangle.frag.spv | Bin 0 -> 536 bytes .../examples/vkdemos/triangle.vert.spv | Bin 0 -> 1468 bytes .../milskosrc/examples/vkdemos/vulkan.c | 629 ++ .../milsko/milskosrc/external/libjpeg/README | 374 + .../external/libjpeg/include/cderror.h | 136 + .../external/libjpeg/include/cdjpeg.h | 189 + .../external/libjpeg/include/jconfig.h | 64 + .../milskosrc/external/libjpeg/include/jdct.h | 409 + .../external/libjpeg/include/jerror.h | 304 + .../external/libjpeg/include/jinclude.h | 157 + .../external/libjpeg/include/jmemsys.h | 198 + .../external/libjpeg/include/jmorecfg.h | 457 + .../external/libjpeg/include/jpegint.h | 445 + .../external/libjpeg/include/jpeglib.h | 1183 +++ .../external/libjpeg/include/jversion.h | 14 + .../external/libjpeg/include/transupp.h | 230 + .../milskosrc/external/libjpeg/src/cdjpeg.c | 181 + .../milskosrc/external/libjpeg/src/jaricom.c | 153 + .../milskosrc/external/libjpeg/src/jcapimin.c | 288 + .../milskosrc/external/libjpeg/src/jcapistd.c | 162 + .../milskosrc/external/libjpeg/src/jcarith.c | 945 ++ .../milskosrc/external/libjpeg/src/jccoefct.c | 456 + .../milskosrc/external/libjpeg/src/jccolor.c | 598 ++ .../milskosrc/external/libjpeg/src/jcdctmgr.c | 466 + .../milskosrc/external/libjpeg/src/jchuff.c | 1656 +++ .../milskosrc/external/libjpeg/src/jcinit.c | 249 + .../milskosrc/external/libjpeg/src/jcmainct.c | 297 + .../milskosrc/external/libjpeg/src/jcmarker.c | 717 ++ .../milskosrc/external/libjpeg/src/jcmaster.c | 675 ++ .../milskosrc/external/libjpeg/src/jcomapi.c | 244 + .../milskosrc/external/libjpeg/src/jcparam.c | 591 ++ .../milskosrc/external/libjpeg/src/jcprepct.c | 358 + .../milskosrc/external/libjpeg/src/jcsample.c | 545 + .../milskosrc/external/libjpeg/src/jctrans.c | 399 + .../milskosrc/external/libjpeg/src/jdapimin.c | 412 + .../milskosrc/external/libjpeg/src/jdapistd.c | 276 + .../milskosrc/external/libjpeg/src/jdarith.c | 796 ++ .../milskosrc/external/libjpeg/src/jdatadst.c | 263 + .../milskosrc/external/libjpeg/src/jdatasrc.c | 271 + .../milskosrc/external/libjpeg/src/jdcoefct.c | 744 ++ .../milskosrc/external/libjpeg/src/jdcolor.c | 769 ++ .../milskosrc/external/libjpeg/src/jddctmgr.c | 384 + .../milskosrc/external/libjpeg/src/jdhuff.c | 1559 +++ .../milskosrc/external/libjpeg/src/jdinput.c | 657 ++ .../milskosrc/external/libjpeg/src/jdmainct.c | 511 + .../milskosrc/external/libjpeg/src/jdmarker.c | 1505 +++ .../milskosrc/external/libjpeg/src/jdmaster.c | 532 + .../milskosrc/external/libjpeg/src/jdmerge.c | 437 + .../milskosrc/external/libjpeg/src/jdpostct.c | 290 + .../milskosrc/external/libjpeg/src/jdsample.c | 341 + .../milskosrc/external/libjpeg/src/jdtrans.c | 140 + .../milskosrc/external/libjpeg/src/jerror.c | 253 + .../milskosrc/external/libjpeg/src/jfdctflt.c | 176 + .../milskosrc/external/libjpeg/src/jfdctfst.c | 232 + .../milskosrc/external/libjpeg/src/jfdctint.c | 4415 ++++++++ .../milskosrc/external/libjpeg/src/jidctflt.c | 238 + .../milskosrc/external/libjpeg/src/jidctfst.c | 351 + .../milskosrc/external/libjpeg/src/jidctint.c | 5240 +++++++++ .../milskosrc/external/libjpeg/src/jmemmgr.c | 1115 ++ .../milskosrc/external/libjpeg/src/jmemnobs.c | 113 + .../milskosrc/external/libjpeg/src/jquant1.c | 851 ++ .../milskosrc/external/libjpeg/src/jquant2.c | 1311 +++ .../milskosrc/external/libjpeg/src/jutils.c | 224 + .../milskosrc/external/libjpeg/src/rdbmp.c | 469 + .../milskosrc/external/libjpeg/src/rdcolmap.c | 253 + .../milskosrc/external/libjpeg/src/rdgif.c | 679 ++ .../milskosrc/external/libjpeg/src/rdppm.c | 501 + .../milskosrc/external/libjpeg/src/rdrle.c | 380 + .../milskosrc/external/libjpeg/src/rdswitch.c | 363 + .../milskosrc/external/libjpeg/src/rdtarga.c | 500 + .../milskosrc/external/libjpeg/src/transupp.c | 2433 +++++ .../milskosrc/external/libjpeg/src/wrbmp.c | 437 + .../milskosrc/external/libjpeg/src/wrgif.c | 566 + .../milskosrc/external/libjpeg/src/wrppm.c | 264 + .../milskosrc/external/libjpeg/src/wrrle.c | 306 + .../milskosrc/external/libjpeg/src/wrtarga.c | 254 + .../milskosrc/external/libpng/.appveyor.yml | 81 + .../external/libpng/.cmake-format.yaml | 94 + .../milskosrc/external/libpng/.editorconfig | 55 + .../libpng/.editorconfig-checker.json | 9 + .../milskosrc/external/libpng/.yamllint.yml | 7 + .../milsko/milskosrc/external/libpng/LICENSE | 134 + .../milsko/milskosrc/external/libpng/README | 184 + .../external/libpng/include/config.h | 138 + .../milskosrc/external/libpng/include/png.h | 3377 ++++++ .../external/libpng/include/pngconf.h | 615 ++ .../external/libpng/include/pngdebug.h | 156 + .../external/libpng/include/pnginfo.h | 263 + .../external/libpng/include/pnglibconf.h | 237 + .../external/libpng/include/pngpriv.h | 2217 ++++ .../external/libpng/include/pngstruct.h | 465 + .../milskosrc/external/libpng/src/png.c | 4039 +++++++ .../milskosrc/external/libpng/src/pngerror.c | 971 ++ .../milskosrc/external/libpng/src/pngget.c | 1370 +++ .../milskosrc/external/libpng/src/pngmem.c | 282 + .../milskosrc/external/libpng/src/pngpread.c | 945 ++ .../milskosrc/external/libpng/src/pngread.c | 4098 +++++++ .../milskosrc/external/libpng/src/pngrio.c | 119 + .../milskosrc/external/libpng/src/pngrtran.c | 5124 +++++++++ .../milskosrc/external/libpng/src/pngrutil.c | 4695 ++++++++ .../milskosrc/external/libpng/src/pngset.c | 1986 ++++ .../milskosrc/external/libpng/src/pngtrans.c | 867 ++ .../milskosrc/external/libpng/src/pngwio.c | 167 + .../milskosrc/external/libpng/src/pngwrite.c | 2449 +++++ .../milskosrc/external/libpng/src/pngwtran.c | 574 + .../milskosrc/external/libpng/src/pngwutil.c | 2825 +++++ widget/milsko/milskosrc/external/libz/LICENSE | 22 + widget/milsko/milskosrc/external/libz/README | 117 + .../milskosrc/external/libz/include/crc32.h | 9446 +++++++++++++++++ .../milskosrc/external/libz/include/deflate.h | 377 + .../milskosrc/external/libz/include/gzguts.h | 214 + .../milskosrc/external/libz/include/inffast.h | 11 + .../external/libz/include/inffixed.h | 94 + .../milskosrc/external/libz/include/inflate.h | 126 + .../external/libz/include/inftrees.h | 62 + .../milskosrc/external/libz/include/trees.h | 128 + .../milskosrc/external/libz/include/zconf.h | 547 + .../milskosrc/external/libz/include/zlib.h | 1938 ++++ .../milskosrc/external/libz/include/zutil.h | 254 + .../milskosrc/external/libz/src/adler32.c | 164 + .../milskosrc/external/libz/src/compress.c | 75 + .../milskosrc/external/libz/src/crc32.c | 1049 ++ .../milskosrc/external/libz/src/deflate.c | 2139 ++++ .../milskosrc/external/libz/src/gzclose.c | 23 + .../milskosrc/external/libz/src/gzlib.c | 582 + .../milskosrc/external/libz/src/gzread.c | 602 ++ .../milskosrc/external/libz/src/gzwrite.c | 631 ++ .../milskosrc/external/libz/src/infback.c | 628 ++ .../milskosrc/external/libz/src/inffast.c | 320 + .../milskosrc/external/libz/src/inflate.c | 1526 +++ .../milskosrc/external/libz/src/inftrees.c | 299 + .../milskosrc/external/libz/src/trees.c | 1117 ++ .../milskosrc/external/libz/src/uncompr.c | 85 + .../milskosrc/external/libz/src/zutil.c | 299 + widget/milsko/milskosrc/external/stb_ds.c | 2 + widget/milsko/milskosrc/external/stb_ds.h | 1895 ++++ widget/milsko/milskosrc/external/stb_image.c | 4 + widget/milsko/milskosrc/external/stb_image.h | 7988 ++++++++++++++ .../milsko/milskosrc/external/stb_truetype.c | 4 + .../milsko/milskosrc/external/stb_truetype.h | 5079 +++++++++ .../milskosrc/include/Mw/Abstract/CharSet.h | 22 + .../milskosrc/include/Mw/Abstract/Directory.h | 59 + .../milskosrc/include/Mw/Abstract/Dynamic.h | 38 + .../milskosrc/include/Mw/Abstract/Time.h | 30 + .../milsko/milskosrc/include/Mw/BaseTypes.h | 113 + .../milsko/milskosrc/include/Mw/Constants.h | 142 + widget/milsko/milskosrc/include/Mw/Core.h | 405 + widget/milsko/milskosrc/include/Mw/Default.h | 96 + .../milskosrc/include/Mw/Dialog/ColorPicker.h | 27 + .../include/Mw/Dialog/DirectoryChooser.h | 27 + .../milskosrc/include/Mw/Dialog/FileChooser.h | 36 + .../milskosrc/include/Mw/Dialog/MessageBox.h | 36 + widget/milsko/milskosrc/include/Mw/Draw.h | 242 + widget/milsko/milskosrc/include/Mw/Font.h | 33 + widget/milsko/milskosrc/include/Mw/LowLevel.h | 363 + .../milskosrc/include/Mw/LowLevel/Cairo.h | 229 + .../include/Mw/LowLevel/ClassicMacOS.h | 43 + .../milskosrc/include/Mw/LowLevel/Cocoa.h | 189 + .../milskosrc/include/Mw/LowLevel/GDI.h | 57 + .../milskosrc/include/Mw/LowLevel/Haiku.h | 173 + .../milskosrc/include/Mw/LowLevel/Wayland.h | 517 + .../include/Mw/LowLevel/Wayland/.gitignore | 1 + .../include/Mw/LowLevel/Wayland/README.md | 1 + .../milskosrc/include/Mw/LowLevel/X11.h | 97 + widget/milsko/milskosrc/include/Mw/MachDep.h | 123 + widget/milsko/milskosrc/include/Mw/Milsko.h | 60 + .../milskosrc/include/Mw/Resource/Cursor.h | 70 + .../milskosrc/include/Mw/Resource/Font.h | 69 + .../milskosrc/include/Mw/Resource/Icon.h | 98 + widget/milsko/milskosrc/include/Mw/String.h | 63 + .../milsko/milskosrc/include/Mw/StringDefs.h | 102 + widget/milsko/milskosrc/include/Mw/TrueType.h | 33 + widget/milsko/milskosrc/include/Mw/TypeDefs.h | 282 + widget/milsko/milskosrc/include/Mw/Unicode.h | 53 + widget/milsko/milskosrc/include/Mw/Version.h | 33 + .../milsko/milskosrc/include/Mw/Widget/Box.h | 24 + .../milskosrc/include/Mw/Widget/Button.h | 24 + .../milskosrc/include/Mw/Widget/Calendar.h | 24 + .../milskosrc/include/Mw/Widget/CheckBox.h | 24 + .../milskosrc/include/Mw/Widget/ComboBox.h | 48 + .../milskosrc/include/Mw/Widget/Entry.h | 24 + .../milskosrc/include/Mw/Widget/Frame.h | 24 + .../milskosrc/include/Mw/Widget/Image.h | 24 + .../milskosrc/include/Mw/Widget/Label.h | 36 + .../milskosrc/include/Mw/Widget/ListBox.h | 100 + .../milsko/milskosrc/include/Mw/Widget/Menu.h | 38 + .../milskosrc/include/Mw/Widget/NumberEntry.h | 24 + .../milskosrc/include/Mw/Widget/OpenGL.h | 73 + .../milskosrc/include/Mw/Widget/ProgressBar.h | 24 + .../milskosrc/include/Mw/Widget/RadioBox.h | 24 + .../milskosrc/include/Mw/Widget/ScrollBar.h | 36 + .../milskosrc/include/Mw/Widget/Separator.h | 24 + .../milskosrc/include/Mw/Widget/SubMenu.h | 46 + .../milskosrc/include/Mw/Widget/SubWindow.h | 36 + .../milsko/milskosrc/include/Mw/Widget/Tab.h | 59 + .../milskosrc/include/Mw/Widget/Table.h | 24 + .../milskosrc/include/Mw/Widget/TreeView.h | 110 + .../milskosrc/include/Mw/Widget/Viewport.h | 46 + .../milskosrc/include/Mw/Widget/Vulkan.h | 112 + .../milskosrc/include/Mw/Widget/Window.h | 45 + widget/milsko/milskosrc/milsko.xml | 1002 ++ .../milskosrc/pl/ostype/ClassicMacOS.pl | 12 + widget/milsko/milskosrc/pl/ostype/Darwin.pl | 10 + widget/milsko/milskosrc/pl/ostype/FreeBSD.pl | 19 + widget/milsko/milskosrc/pl/ostype/Haiku.pl | 3 + widget/milsko/milskosrc/pl/ostype/Linux.pl | 14 + widget/milsko/milskosrc/pl/ostype/NetBSD.pl | 9 + widget/milsko/milskosrc/pl/ostype/OpenBSD.pl | 8 + widget/milsko/milskosrc/pl/ostype/SunOS.pl | 3 + widget/milsko/milskosrc/pl/ostype/UnixWare.pl | 4 + widget/milsko/milskosrc/pl/ostype/Windows.pl | 9 + widget/milsko/milskosrc/pl/rules.pl | 227 + widget/milsko/milskosrc/pl/utils.pl | 176 + .../milskosrc/resource/doxygen-theme/README | 1 + .../doxygen-theme/doxygen-awesome.css | 3020 ++++++ .../milsko/milskosrc/resource/font/7x14.bdf | 4420 ++++++++ .../milsko/milskosrc/resource/font/7x14B.bdf | 4420 ++++++++ .../resource/font/IBMPlexMono-Bold.ttf | Bin 0 -> 36184 bytes .../resource/font/IBMPlexMono-Regular.ttf | Bin 0 -> 36184 bytes .../milskosrc/resource/font/IBMPlexSerif.ttf | Bin 0 -> 60260 bytes .../milskosrc/resource/font/OpenSans-Bold.ttf | Bin 0 -> 36548 bytes .../resource/font/OpenSans-Regular.ttf | Bin 0 -> 35264 bytes .../milsko/milskosrc/resource/font/cursor.bdf | 3289 ++++++ widget/milsko/milskosrc/resource/harvard.txt | 792 ++ .../milsko/milskosrc/resource/icon/back.png | Bin 0 -> 308 bytes .../milsko/milskosrc/resource/icon/clock.png | Bin 0 -> 3099 bytes .../milskosrc/resource/icon/computer.png | Bin 0 -> 316 bytes .../milskosrc/resource/icon/directory.png | Bin 0 -> 177 bytes .../milsko/milskosrc/resource/icon/down.png | Bin 0 -> 143 bytes .../milsko/milskosrc/resource/icon/error.png | Bin 0 -> 2128 bytes .../milsko/milskosrc/resource/icon/file.png | Bin 0 -> 149 bytes .../milskosrc/resource/icon/forward.png | Bin 0 -> 308 bytes .../milsko/milskosrc/resource/icon/info.png | Bin 0 -> 2356 bytes .../milsko/milskosrc/resource/icon/left.png | Bin 0 -> 142 bytes .../milsko/milskosrc/resource/icon/news.png | Bin 0 -> 3839 bytes .../milsko/milskosrc/resource/icon/note.png | Bin 0 -> 2773 bytes .../milsko/milskosrc/resource/icon/right.png | Bin 0 -> 142 bytes .../milsko/milskosrc/resource/icon/search.png | Bin 0 -> 332 bytes widget/milsko/milskosrc/resource/icon/up.png | Bin 0 -> 255 bytes .../milskosrc/resource/icon/warning.png | Bin 0 -> 1808 bytes .../milsko/milskosrc/resource/logo/102x47.png | Bin 0 -> 5770 bytes .../milsko/milskosrc/resource/logo/102x47.pov | 4 + .../milskosrc/resource/logo/banner-nodejs.png | Bin 0 -> 373807 bytes .../milsko/milskosrc/resource/logo/banner.png | Bin 0 -> 384705 bytes .../milsko/milskosrc/resource/logo/banner.pov | 54 + .../milskosrc/resource/logo/banner_10.pov | 2 + .../milsko/milskosrc/resource/logo/logo.png | Bin 0 -> 34923 bytes .../milsko/milskosrc/resource/logo/logo.pov | 97 + .../resource/logo/overlay-102x47.png | Bin 0 -> 454 bytes widget/milsko/milskosrc/resource/milsko.pc.in | 10 + widget/milsko/milskosrc/resource/rgb.txt | 782 ++ .../wayland/wlr-layer-shell-unstable-v1.xml | 451 + .../milsko/milskosrc/src/abstract/charset.c | 95 + .../milsko/milskosrc/src/abstract/directory.c | 223 + .../milsko/milskosrc/src/abstract/dynamic.c | 63 + widget/milsko/milskosrc/src/abstract/time.c | 79 + .../milsko/milskosrc/src/backend/.gitignore | 1 + widget/milsko/milskosrc/src/backend/cairo.c | 265 + widget/milsko/milskosrc/src/backend/call.c | 65 + .../milskosrc/src/backend/classicmacos.c | 391 + widget/milsko/milskosrc/src/backend/cocoa.m | 1199 +++ widget/milsko/milskosrc/src/backend/gdi.c | 1017 ++ widget/milsko/milskosrc/src/backend/haiku.cc | 906 ++ widget/milsko/milskosrc/src/backend/nococoa.m | 9 + .../milskosrc/src/backend/wayland/buffer.c | 114 + .../src/backend/wayland/interfaces.c | 1225 +++ .../milskosrc/src/backend/wayland/region.c | 45 + .../milskosrc/src/backend/wayland/wayland.c | 1928 ++++ widget/milsko/milskosrc/src/backend/x11.c | 1525 +++ widget/milsko/milskosrc/src/color.c | 815 ++ widget/milsko/milskosrc/src/core.c | 1211 +++ widget/milsko/milskosrc/src/cursor/arrow.c | 43 + widget/milsko/milskosrc/src/cursor/cross.c | 8 + widget/milsko/milskosrc/src/cursor/default.c | 43 + widget/milsko/milskosrc/src/cursor/hidden.c | 5 + widget/milsko/milskosrc/src/cursor/text.c | 43 + widget/milsko/milskosrc/src/default.c | 41 + .../milsko/milskosrc/src/dialog/colorpicker.c | 380 + .../milskosrc/src/dialog/directorychooser.c | 5 + .../milsko/milskosrc/src/dialog/filechooser.c | 573 + .../milsko/milskosrc/src/dialog/messagebox.c | 137 + widget/milsko/milskosrc/src/draw.c | 969 ++ widget/milsko/milskosrc/src/icon/back.c | 445 + widget/milsko/milskosrc/src/icon/clock.c | 2309 ++++ widget/milsko/milskosrc/src/icon/computer.c | 261 + widget/milsko/milskosrc/src/icon/directory.c | 261 + widget/milsko/milskosrc/src/icon/down.c | 445 + widget/milsko/milskosrc/src/icon/error.c | 2309 ++++ widget/milsko/milskosrc/src/icon/file.c | 261 + widget/milsko/milskosrc/src/icon/forward.c | 445 + widget/milsko/milskosrc/src/icon/info.c | 2309 ++++ widget/milsko/milskosrc/src/icon/left.c | 445 + widget/milsko/milskosrc/src/icon/news.c | 2309 ++++ widget/milsko/milskosrc/src/icon/note.c | 2309 ++++ widget/milsko/milskosrc/src/icon/right.c | 445 + widget/milsko/milskosrc/src/icon/search.c | 445 + widget/milsko/milskosrc/src/icon/up.c | 445 + widget/milsko/milskosrc/src/icon/warning.c | 2309 ++++ widget/milsko/milskosrc/src/lowlevel.c | 315 + widget/milsko/milskosrc/src/string.c | 116 + .../milsko/milskosrc/src/text/font/boldfont.c | 264 + .../milskosrc/src/text/font/boldmonottf.c | 3022 ++++++ .../milsko/milskosrc/src/text/font/boldttf.c | 3052 ++++++ widget/milsko/milskosrc/src/text/font/font.c | 264 + .../milsko/milskosrc/src/text/font/monottf.c | 3022 ++++++ widget/milsko/milskosrc/src/text/font/ttf.c | 2945 +++++ widget/milsko/milskosrc/src/text/ft2.c | 188 + widget/milsko/milskosrc/src/text/gdi.c | 269 + widget/milsko/milskosrc/src/text/stbtt.c | 159 + widget/milsko/milskosrc/src/text/text.c | 318 + widget/milsko/milskosrc/src/truetype.c | 142 + widget/milsko/milskosrc/src/unicode.c | 120 + widget/milsko/milskosrc/src/widget/box.c | 166 + widget/milsko/milskosrc/src/widget/button.c | 115 + widget/milsko/milskosrc/src/widget/calendar.c | 248 + widget/milsko/milskosrc/src/widget/checkbox.c | 70 + widget/milsko/milskosrc/src/widget/combobox.c | 205 + widget/milsko/milskosrc/src/widget/entry.c | 253 + widget/milsko/milskosrc/src/widget/frame.c | 69 + widget/milsko/milskosrc/src/widget/image.c | 65 + widget/milsko/milskosrc/src/widget/label.c | 425 + widget/milsko/milskosrc/src/widget/listbox.c | 625 ++ widget/milsko/milskosrc/src/widget/menu.c | 265 + .../milsko/milskosrc/src/widget/numberentry.c | 153 + widget/milsko/milskosrc/src/widget/opengl.c | 685 ++ .../milskosrc/src/widget/opengl_cocoa.m | 131 + .../milsko/milskosrc/src/widget/progressbar.c | 69 + widget/milsko/milskosrc/src/widget/radiobox.c | 78 + .../milsko/milskosrc/src/widget/scrollbar.c | 280 + .../milsko/milskosrc/src/widget/separator.c | 58 + widget/milsko/milskosrc/src/widget/submenu.c | 264 + .../milsko/milskosrc/src/widget/subwindow.c | 425 + widget/milsko/milskosrc/src/widget/tab.c | 375 + widget/milsko/milskosrc/src/widget/table.c | 227 + widget/milsko/milskosrc/src/widget/treeview.c | 526 + widget/milsko/milskosrc/src/widget/viewport.c | 199 + widget/milsko/milskosrc/src/widget/vulkan.c | 612 ++ widget/milsko/milskosrc/src/widget/window.c | 75 + widget/milsko/milskosrc/tools/.gitignore | 2 + widget/milsko/milskosrc/tools/Makefile | 24 + widget/milsko/milskosrc/tools/archive.sh | 20 + widget/milsko/milskosrc/tools/color.pl | 51 + widget/milsko/milskosrc/tools/cursor.pl | 136 + widget/milsko/milskosrc/tools/doxygen.sh | 4 + widget/milsko/milskosrc/tools/font.c | 70 + widget/milsko/milskosrc/tools/fuzzer.c | 76 + widget/milsko/milskosrc/tools/gendcl.pl | 105 + widget/milsko/milskosrc/tools/genmk.pl | 235 + widget/milsko/milskosrc/tools/harvard.pl | 12 + .../milsko/milskosrc/tools/icon-converter.c | 36 + widget/milsko/milskosrc/tools/icon.sh | 44 + widget/milsko/milskosrc/tools/logo.sh | 9 + widget/milsko/milskosrc/tools/prepare-gump.sh | 6 + widget/milsko/milskosrc/tools/readme.pl | 121 + widget/milsko/milskosrc/tools/ttf.sh | 11 + widget/milsko/milskosrc/tools/update.sh | 7 + widget/milsko/milskosrc/tools/watcom-pack.sh | 13 + 410 files changed, 204246 insertions(+) create mode 100644 widget/milsko/README.md create mode 100644 widget/milsko/milskosrc/.clang-format create mode 100644 widget/milsko/milskosrc/.clangd create mode 100644 widget/milsko/milskosrc/.gitattributes create mode 100644 widget/milsko/milskosrc/.gitignore create mode 100644 widget/milsko/milskosrc/CHANGELOG.txt create mode 100644 widget/milsko/milskosrc/CMakeLists.txt create mode 100644 widget/milsko/milskosrc/Doxyfile create mode 100644 widget/milsko/milskosrc/Jenkinsfile create mode 100644 widget/milsko/milskosrc/LICENSE create mode 100644 widget/milsko/milskosrc/NTMakefile create mode 100644 widget/milsko/milskosrc/README.txt create mode 100644 widget/milsko/milskosrc/WatMakefile create mode 100644 widget/milsko/milskosrc/configure create mode 100644 widget/milsko/milskosrc/doc/BACKENDDEV.md create mode 100644 widget/milsko/milskosrc/doc/NEWWIDGET.md create mode 100644 widget/milsko/milskosrc/doc/TIERS.md create mode 100644 widget/milsko/milskosrc/doc/TINYCONFIG.md create mode 100644 widget/milsko/milskosrc/examples/CMakeLists.txt create mode 100644 widget/milsko/milskosrc/examples/basic/CMakeLists.txt create mode 100644 widget/milsko/milskosrc/examples/basic/box.c create mode 100644 widget/milsko/milskosrc/examples/basic/calculator.c create mode 100644 widget/milsko/milskosrc/examples/basic/checkbox.c create mode 100644 widget/milsko/milskosrc/examples/basic/clipboard.c create mode 100644 widget/milsko/milskosrc/examples/basic/colorpicker.c create mode 100644 widget/milsko/milskosrc/examples/basic/combobox.c create mode 100644 widget/milsko/milskosrc/examples/basic/example.c create mode 100644 widget/milsko/milskosrc/examples/basic/filechooser.c create mode 100644 widget/milsko/milskosrc/examples/basic/image.c create mode 100644 widget/milsko/milskosrc/examples/basic/listbox.c create mode 100644 widget/milsko/milskosrc/examples/basic/messagebox.c create mode 100644 widget/milsko/milskosrc/examples/basic/periodic.c create mode 100644 widget/milsko/milskosrc/examples/basic/progressbar.c create mode 100644 widget/milsko/milskosrc/examples/basic/radiobox.c create mode 100644 widget/milsko/milskosrc/examples/basic/rotate.c create mode 100644 widget/milsko/milskosrc/examples/basic/scrollbar.c create mode 100644 widget/milsko/milskosrc/examples/basic/sevensegment.c create mode 100644 widget/milsko/milskosrc/examples/basic/subwindow.c create mode 100644 widget/milsko/milskosrc/examples/basic/tab.c create mode 100644 widget/milsko/milskosrc/examples/basic/treeview.c create mode 100644 widget/milsko/milskosrc/examples/basic/viewport.c create mode 100644 widget/milsko/milskosrc/examples/gldemos/CMakeLists.txt create mode 100644 widget/milsko/milskosrc/examples/gldemos/boing.c create mode 100644 widget/milsko/milskosrc/examples/gldemos/clock.c create mode 100644 widget/milsko/milskosrc/examples/gldemos/cube.c create mode 100644 widget/milsko/milskosrc/examples/gldemos/gears.c create mode 100644 widget/milsko/milskosrc/examples/gldemos/glutlayer.c create mode 100644 widget/milsko/milskosrc/examples/gldemos/triangle.c create mode 100644 widget/milsko/milskosrc/examples/gldemos/tripaint.c create mode 100644 widget/milsko/milskosrc/examples/harvard.c create mode 100644 widget/milsko/milskosrc/examples/picture.jpg create mode 100644 widget/milsko/milskosrc/examples/picture.png create mode 100644 widget/milsko/milskosrc/examples/vkdemos/CMakeLists.txt create mode 100644 widget/milsko/milskosrc/examples/vkdemos/triangle.frag.spv create mode 100644 widget/milsko/milskosrc/examples/vkdemos/triangle.vert.spv create mode 100644 widget/milsko/milskosrc/examples/vkdemos/vulkan.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/README create mode 100644 widget/milsko/milskosrc/external/libjpeg/include/cderror.h create mode 100644 widget/milsko/milskosrc/external/libjpeg/include/cdjpeg.h create mode 100644 widget/milsko/milskosrc/external/libjpeg/include/jconfig.h create mode 100644 widget/milsko/milskosrc/external/libjpeg/include/jdct.h create mode 100644 widget/milsko/milskosrc/external/libjpeg/include/jerror.h create mode 100644 widget/milsko/milskosrc/external/libjpeg/include/jinclude.h create mode 100644 widget/milsko/milskosrc/external/libjpeg/include/jmemsys.h create mode 100644 widget/milsko/milskosrc/external/libjpeg/include/jmorecfg.h create mode 100644 widget/milsko/milskosrc/external/libjpeg/include/jpegint.h create mode 100644 widget/milsko/milskosrc/external/libjpeg/include/jpeglib.h create mode 100644 widget/milsko/milskosrc/external/libjpeg/include/jversion.h create mode 100644 widget/milsko/milskosrc/external/libjpeg/include/transupp.h create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/cdjpeg.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jaricom.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jcapimin.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jcapistd.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jcarith.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jccoefct.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jccolor.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jcdctmgr.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jchuff.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jcinit.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jcmainct.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jcmarker.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jcmaster.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jcomapi.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jcparam.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jcprepct.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jcsample.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jctrans.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdapimin.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdapistd.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdarith.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdatadst.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdatasrc.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdcoefct.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdcolor.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jddctmgr.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdhuff.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdinput.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdmainct.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdmarker.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdmaster.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdmerge.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdpostct.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdsample.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jdtrans.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jerror.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jfdctflt.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jfdctfst.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jfdctint.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jidctflt.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jidctfst.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jidctint.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jmemmgr.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jmemnobs.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jquant1.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jquant2.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/jutils.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/rdbmp.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/rdcolmap.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/rdgif.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/rdppm.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/rdrle.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/rdswitch.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/rdtarga.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/transupp.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/wrbmp.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/wrgif.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/wrppm.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/wrrle.c create mode 100644 widget/milsko/milskosrc/external/libjpeg/src/wrtarga.c create mode 100644 widget/milsko/milskosrc/external/libpng/.appveyor.yml create mode 100644 widget/milsko/milskosrc/external/libpng/.cmake-format.yaml create mode 100644 widget/milsko/milskosrc/external/libpng/.editorconfig create mode 100644 widget/milsko/milskosrc/external/libpng/.editorconfig-checker.json create mode 100644 widget/milsko/milskosrc/external/libpng/.yamllint.yml create mode 100644 widget/milsko/milskosrc/external/libpng/LICENSE create mode 100644 widget/milsko/milskosrc/external/libpng/README create mode 100644 widget/milsko/milskosrc/external/libpng/include/config.h create mode 100644 widget/milsko/milskosrc/external/libpng/include/png.h create mode 100644 widget/milsko/milskosrc/external/libpng/include/pngconf.h create mode 100644 widget/milsko/milskosrc/external/libpng/include/pngdebug.h create mode 100644 widget/milsko/milskosrc/external/libpng/include/pnginfo.h create mode 100644 widget/milsko/milskosrc/external/libpng/include/pnglibconf.h create mode 100644 widget/milsko/milskosrc/external/libpng/include/pngpriv.h create mode 100644 widget/milsko/milskosrc/external/libpng/include/pngstruct.h create mode 100644 widget/milsko/milskosrc/external/libpng/src/png.c create mode 100644 widget/milsko/milskosrc/external/libpng/src/pngerror.c create mode 100644 widget/milsko/milskosrc/external/libpng/src/pngget.c create mode 100644 widget/milsko/milskosrc/external/libpng/src/pngmem.c create mode 100644 widget/milsko/milskosrc/external/libpng/src/pngpread.c create mode 100644 widget/milsko/milskosrc/external/libpng/src/pngread.c create mode 100644 widget/milsko/milskosrc/external/libpng/src/pngrio.c create mode 100644 widget/milsko/milskosrc/external/libpng/src/pngrtran.c create mode 100644 widget/milsko/milskosrc/external/libpng/src/pngrutil.c create mode 100644 widget/milsko/milskosrc/external/libpng/src/pngset.c create mode 100644 widget/milsko/milskosrc/external/libpng/src/pngtrans.c create mode 100644 widget/milsko/milskosrc/external/libpng/src/pngwio.c create mode 100644 widget/milsko/milskosrc/external/libpng/src/pngwrite.c create mode 100644 widget/milsko/milskosrc/external/libpng/src/pngwtran.c create mode 100644 widget/milsko/milskosrc/external/libpng/src/pngwutil.c create mode 100644 widget/milsko/milskosrc/external/libz/LICENSE create mode 100644 widget/milsko/milskosrc/external/libz/README create mode 100644 widget/milsko/milskosrc/external/libz/include/crc32.h create mode 100644 widget/milsko/milskosrc/external/libz/include/deflate.h create mode 100644 widget/milsko/milskosrc/external/libz/include/gzguts.h create mode 100644 widget/milsko/milskosrc/external/libz/include/inffast.h create mode 100644 widget/milsko/milskosrc/external/libz/include/inffixed.h create mode 100644 widget/milsko/milskosrc/external/libz/include/inflate.h create mode 100644 widget/milsko/milskosrc/external/libz/include/inftrees.h create mode 100644 widget/milsko/milskosrc/external/libz/include/trees.h create mode 100644 widget/milsko/milskosrc/external/libz/include/zconf.h create mode 100644 widget/milsko/milskosrc/external/libz/include/zlib.h create mode 100644 widget/milsko/milskosrc/external/libz/include/zutil.h create mode 100644 widget/milsko/milskosrc/external/libz/src/adler32.c create mode 100644 widget/milsko/milskosrc/external/libz/src/compress.c create mode 100644 widget/milsko/milskosrc/external/libz/src/crc32.c create mode 100644 widget/milsko/milskosrc/external/libz/src/deflate.c create mode 100644 widget/milsko/milskosrc/external/libz/src/gzclose.c create mode 100644 widget/milsko/milskosrc/external/libz/src/gzlib.c create mode 100644 widget/milsko/milskosrc/external/libz/src/gzread.c create mode 100644 widget/milsko/milskosrc/external/libz/src/gzwrite.c create mode 100644 widget/milsko/milskosrc/external/libz/src/infback.c create mode 100644 widget/milsko/milskosrc/external/libz/src/inffast.c create mode 100644 widget/milsko/milskosrc/external/libz/src/inflate.c create mode 100644 widget/milsko/milskosrc/external/libz/src/inftrees.c create mode 100644 widget/milsko/milskosrc/external/libz/src/trees.c create mode 100644 widget/milsko/milskosrc/external/libz/src/uncompr.c create mode 100644 widget/milsko/milskosrc/external/libz/src/zutil.c create mode 100644 widget/milsko/milskosrc/external/stb_ds.c create mode 100644 widget/milsko/milskosrc/external/stb_ds.h create mode 100644 widget/milsko/milskosrc/external/stb_image.c create mode 100644 widget/milsko/milskosrc/external/stb_image.h create mode 100644 widget/milsko/milskosrc/external/stb_truetype.c create mode 100644 widget/milsko/milskosrc/external/stb_truetype.h create mode 100644 widget/milsko/milskosrc/include/Mw/Abstract/CharSet.h create mode 100644 widget/milsko/milskosrc/include/Mw/Abstract/Directory.h create mode 100644 widget/milsko/milskosrc/include/Mw/Abstract/Dynamic.h create mode 100644 widget/milsko/milskosrc/include/Mw/Abstract/Time.h create mode 100644 widget/milsko/milskosrc/include/Mw/BaseTypes.h create mode 100644 widget/milsko/milskosrc/include/Mw/Constants.h create mode 100644 widget/milsko/milskosrc/include/Mw/Core.h create mode 100644 widget/milsko/milskosrc/include/Mw/Default.h create mode 100644 widget/milsko/milskosrc/include/Mw/Dialog/ColorPicker.h create mode 100644 widget/milsko/milskosrc/include/Mw/Dialog/DirectoryChooser.h create mode 100644 widget/milsko/milskosrc/include/Mw/Dialog/FileChooser.h create mode 100644 widget/milsko/milskosrc/include/Mw/Dialog/MessageBox.h create mode 100644 widget/milsko/milskosrc/include/Mw/Draw.h create mode 100644 widget/milsko/milskosrc/include/Mw/Font.h create mode 100644 widget/milsko/milskosrc/include/Mw/LowLevel.h create mode 100644 widget/milsko/milskosrc/include/Mw/LowLevel/Cairo.h create mode 100644 widget/milsko/milskosrc/include/Mw/LowLevel/ClassicMacOS.h create mode 100644 widget/milsko/milskosrc/include/Mw/LowLevel/Cocoa.h create mode 100644 widget/milsko/milskosrc/include/Mw/LowLevel/GDI.h create mode 100644 widget/milsko/milskosrc/include/Mw/LowLevel/Haiku.h create mode 100644 widget/milsko/milskosrc/include/Mw/LowLevel/Wayland.h create mode 100644 widget/milsko/milskosrc/include/Mw/LowLevel/Wayland/.gitignore create mode 100644 widget/milsko/milskosrc/include/Mw/LowLevel/Wayland/README.md create mode 100644 widget/milsko/milskosrc/include/Mw/LowLevel/X11.h create mode 100644 widget/milsko/milskosrc/include/Mw/MachDep.h create mode 100644 widget/milsko/milskosrc/include/Mw/Milsko.h create mode 100644 widget/milsko/milskosrc/include/Mw/Resource/Cursor.h create mode 100644 widget/milsko/milskosrc/include/Mw/Resource/Font.h create mode 100644 widget/milsko/milskosrc/include/Mw/Resource/Icon.h create mode 100644 widget/milsko/milskosrc/include/Mw/String.h create mode 100644 widget/milsko/milskosrc/include/Mw/StringDefs.h create mode 100644 widget/milsko/milskosrc/include/Mw/TrueType.h create mode 100644 widget/milsko/milskosrc/include/Mw/TypeDefs.h create mode 100644 widget/milsko/milskosrc/include/Mw/Unicode.h create mode 100644 widget/milsko/milskosrc/include/Mw/Version.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/Box.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/Button.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/Calendar.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/CheckBox.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/ComboBox.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/Entry.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/Frame.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/Image.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/Label.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/ListBox.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/Menu.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/NumberEntry.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/OpenGL.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/ProgressBar.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/RadioBox.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/ScrollBar.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/Separator.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/SubMenu.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/SubWindow.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/Tab.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/Table.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/TreeView.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/Viewport.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/Vulkan.h create mode 100644 widget/milsko/milskosrc/include/Mw/Widget/Window.h create mode 100644 widget/milsko/milskosrc/milsko.xml create mode 100644 widget/milsko/milskosrc/pl/ostype/ClassicMacOS.pl create mode 100644 widget/milsko/milskosrc/pl/ostype/Darwin.pl create mode 100644 widget/milsko/milskosrc/pl/ostype/FreeBSD.pl create mode 100644 widget/milsko/milskosrc/pl/ostype/Haiku.pl create mode 100644 widget/milsko/milskosrc/pl/ostype/Linux.pl create mode 100644 widget/milsko/milskosrc/pl/ostype/NetBSD.pl create mode 100644 widget/milsko/milskosrc/pl/ostype/OpenBSD.pl create mode 100644 widget/milsko/milskosrc/pl/ostype/SunOS.pl create mode 100644 widget/milsko/milskosrc/pl/ostype/UnixWare.pl create mode 100644 widget/milsko/milskosrc/pl/ostype/Windows.pl create mode 100644 widget/milsko/milskosrc/pl/rules.pl create mode 100644 widget/milsko/milskosrc/pl/utils.pl create mode 100644 widget/milsko/milskosrc/resource/doxygen-theme/README create mode 100644 widget/milsko/milskosrc/resource/doxygen-theme/doxygen-awesome.css create mode 100644 widget/milsko/milskosrc/resource/font/7x14.bdf create mode 100644 widget/milsko/milskosrc/resource/font/7x14B.bdf create mode 100644 widget/milsko/milskosrc/resource/font/IBMPlexMono-Bold.ttf create mode 100644 widget/milsko/milskosrc/resource/font/IBMPlexMono-Regular.ttf create mode 100644 widget/milsko/milskosrc/resource/font/IBMPlexSerif.ttf create mode 100644 widget/milsko/milskosrc/resource/font/OpenSans-Bold.ttf create mode 100644 widget/milsko/milskosrc/resource/font/OpenSans-Regular.ttf create mode 100644 widget/milsko/milskosrc/resource/font/cursor.bdf create mode 100644 widget/milsko/milskosrc/resource/harvard.txt create mode 100644 widget/milsko/milskosrc/resource/icon/back.png create mode 100644 widget/milsko/milskosrc/resource/icon/clock.png create mode 100644 widget/milsko/milskosrc/resource/icon/computer.png create mode 100644 widget/milsko/milskosrc/resource/icon/directory.png create mode 100644 widget/milsko/milskosrc/resource/icon/down.png create mode 100644 widget/milsko/milskosrc/resource/icon/error.png create mode 100644 widget/milsko/milskosrc/resource/icon/file.png create mode 100644 widget/milsko/milskosrc/resource/icon/forward.png create mode 100644 widget/milsko/milskosrc/resource/icon/info.png create mode 100644 widget/milsko/milskosrc/resource/icon/left.png create mode 100644 widget/milsko/milskosrc/resource/icon/news.png create mode 100644 widget/milsko/milskosrc/resource/icon/note.png create mode 100644 widget/milsko/milskosrc/resource/icon/right.png create mode 100644 widget/milsko/milskosrc/resource/icon/search.png create mode 100644 widget/milsko/milskosrc/resource/icon/up.png create mode 100644 widget/milsko/milskosrc/resource/icon/warning.png create mode 100644 widget/milsko/milskosrc/resource/logo/102x47.png create mode 100644 widget/milsko/milskosrc/resource/logo/102x47.pov create mode 100644 widget/milsko/milskosrc/resource/logo/banner-nodejs.png create mode 100644 widget/milsko/milskosrc/resource/logo/banner.png create mode 100644 widget/milsko/milskosrc/resource/logo/banner.pov create mode 100644 widget/milsko/milskosrc/resource/logo/banner_10.pov create mode 100644 widget/milsko/milskosrc/resource/logo/logo.png create mode 100644 widget/milsko/milskosrc/resource/logo/logo.pov create mode 100644 widget/milsko/milskosrc/resource/logo/overlay-102x47.png create mode 100644 widget/milsko/milskosrc/resource/milsko.pc.in create mode 100644 widget/milsko/milskosrc/resource/rgb.txt create mode 100644 widget/milsko/milskosrc/resource/wayland/wlr-layer-shell-unstable-v1.xml create mode 100644 widget/milsko/milskosrc/src/abstract/charset.c create mode 100644 widget/milsko/milskosrc/src/abstract/directory.c create mode 100644 widget/milsko/milskosrc/src/abstract/dynamic.c create mode 100644 widget/milsko/milskosrc/src/abstract/time.c create mode 100644 widget/milsko/milskosrc/src/backend/.gitignore create mode 100644 widget/milsko/milskosrc/src/backend/cairo.c create mode 100644 widget/milsko/milskosrc/src/backend/call.c create mode 100644 widget/milsko/milskosrc/src/backend/classicmacos.c create mode 100644 widget/milsko/milskosrc/src/backend/cocoa.m create mode 100644 widget/milsko/milskosrc/src/backend/gdi.c create mode 100644 widget/milsko/milskosrc/src/backend/haiku.cc create mode 100644 widget/milsko/milskosrc/src/backend/nococoa.m create mode 100644 widget/milsko/milskosrc/src/backend/wayland/buffer.c create mode 100644 widget/milsko/milskosrc/src/backend/wayland/interfaces.c create mode 100644 widget/milsko/milskosrc/src/backend/wayland/region.c create mode 100644 widget/milsko/milskosrc/src/backend/wayland/wayland.c create mode 100644 widget/milsko/milskosrc/src/backend/x11.c create mode 100644 widget/milsko/milskosrc/src/color.c create mode 100644 widget/milsko/milskosrc/src/core.c create mode 100644 widget/milsko/milskosrc/src/cursor/arrow.c create mode 100644 widget/milsko/milskosrc/src/cursor/cross.c create mode 100644 widget/milsko/milskosrc/src/cursor/default.c create mode 100644 widget/milsko/milskosrc/src/cursor/hidden.c create mode 100644 widget/milsko/milskosrc/src/cursor/text.c create mode 100644 widget/milsko/milskosrc/src/default.c create mode 100644 widget/milsko/milskosrc/src/dialog/colorpicker.c create mode 100644 widget/milsko/milskosrc/src/dialog/directorychooser.c create mode 100644 widget/milsko/milskosrc/src/dialog/filechooser.c create mode 100644 widget/milsko/milskosrc/src/dialog/messagebox.c create mode 100644 widget/milsko/milskosrc/src/draw.c create mode 100644 widget/milsko/milskosrc/src/icon/back.c create mode 100644 widget/milsko/milskosrc/src/icon/clock.c create mode 100644 widget/milsko/milskosrc/src/icon/computer.c create mode 100644 widget/milsko/milskosrc/src/icon/directory.c create mode 100644 widget/milsko/milskosrc/src/icon/down.c create mode 100644 widget/milsko/milskosrc/src/icon/error.c create mode 100644 widget/milsko/milskosrc/src/icon/file.c create mode 100644 widget/milsko/milskosrc/src/icon/forward.c create mode 100644 widget/milsko/milskosrc/src/icon/info.c create mode 100644 widget/milsko/milskosrc/src/icon/left.c create mode 100644 widget/milsko/milskosrc/src/icon/news.c create mode 100644 widget/milsko/milskosrc/src/icon/note.c create mode 100644 widget/milsko/milskosrc/src/icon/right.c create mode 100644 widget/milsko/milskosrc/src/icon/search.c create mode 100644 widget/milsko/milskosrc/src/icon/up.c create mode 100644 widget/milsko/milskosrc/src/icon/warning.c create mode 100644 widget/milsko/milskosrc/src/lowlevel.c create mode 100644 widget/milsko/milskosrc/src/string.c create mode 100644 widget/milsko/milskosrc/src/text/font/boldfont.c create mode 100644 widget/milsko/milskosrc/src/text/font/boldmonottf.c create mode 100644 widget/milsko/milskosrc/src/text/font/boldttf.c create mode 100644 widget/milsko/milskosrc/src/text/font/font.c create mode 100644 widget/milsko/milskosrc/src/text/font/monottf.c create mode 100644 widget/milsko/milskosrc/src/text/font/ttf.c create mode 100644 widget/milsko/milskosrc/src/text/ft2.c create mode 100644 widget/milsko/milskosrc/src/text/gdi.c create mode 100644 widget/milsko/milskosrc/src/text/stbtt.c create mode 100644 widget/milsko/milskosrc/src/text/text.c create mode 100644 widget/milsko/milskosrc/src/truetype.c create mode 100644 widget/milsko/milskosrc/src/unicode.c create mode 100644 widget/milsko/milskosrc/src/widget/box.c create mode 100644 widget/milsko/milskosrc/src/widget/button.c create mode 100644 widget/milsko/milskosrc/src/widget/calendar.c create mode 100644 widget/milsko/milskosrc/src/widget/checkbox.c create mode 100644 widget/milsko/milskosrc/src/widget/combobox.c create mode 100644 widget/milsko/milskosrc/src/widget/entry.c create mode 100644 widget/milsko/milskosrc/src/widget/frame.c create mode 100644 widget/milsko/milskosrc/src/widget/image.c create mode 100644 widget/milsko/milskosrc/src/widget/label.c create mode 100644 widget/milsko/milskosrc/src/widget/listbox.c create mode 100644 widget/milsko/milskosrc/src/widget/menu.c create mode 100644 widget/milsko/milskosrc/src/widget/numberentry.c create mode 100644 widget/milsko/milskosrc/src/widget/opengl.c create mode 100644 widget/milsko/milskosrc/src/widget/opengl_cocoa.m create mode 100644 widget/milsko/milskosrc/src/widget/progressbar.c create mode 100644 widget/milsko/milskosrc/src/widget/radiobox.c create mode 100644 widget/milsko/milskosrc/src/widget/scrollbar.c create mode 100644 widget/milsko/milskosrc/src/widget/separator.c create mode 100644 widget/milsko/milskosrc/src/widget/submenu.c create mode 100644 widget/milsko/milskosrc/src/widget/subwindow.c create mode 100644 widget/milsko/milskosrc/src/widget/tab.c create mode 100644 widget/milsko/milskosrc/src/widget/table.c create mode 100644 widget/milsko/milskosrc/src/widget/treeview.c create mode 100644 widget/milsko/milskosrc/src/widget/viewport.c create mode 100644 widget/milsko/milskosrc/src/widget/vulkan.c create mode 100644 widget/milsko/milskosrc/src/widget/window.c create mode 100644 widget/milsko/milskosrc/tools/.gitignore create mode 100644 widget/milsko/milskosrc/tools/Makefile create mode 100644 widget/milsko/milskosrc/tools/archive.sh create mode 100644 widget/milsko/milskosrc/tools/color.pl create mode 100644 widget/milsko/milskosrc/tools/cursor.pl create mode 100644 widget/milsko/milskosrc/tools/doxygen.sh create mode 100644 widget/milsko/milskosrc/tools/font.c create mode 100644 widget/milsko/milskosrc/tools/fuzzer.c create mode 100644 widget/milsko/milskosrc/tools/gendcl.pl create mode 100644 widget/milsko/milskosrc/tools/genmk.pl create mode 100644 widget/milsko/milskosrc/tools/harvard.pl create mode 100644 widget/milsko/milskosrc/tools/icon-converter.c create mode 100644 widget/milsko/milskosrc/tools/icon.sh create mode 100644 widget/milsko/milskosrc/tools/logo.sh create mode 100644 widget/milsko/milskosrc/tools/prepare-gump.sh create mode 100644 widget/milsko/milskosrc/tools/readme.pl create mode 100644 widget/milsko/milskosrc/tools/ttf.sh create mode 100644 widget/milsko/milskosrc/tools/update.sh create mode 100644 widget/milsko/milskosrc/tools/watcom-pack.sh diff --git a/widget/milsko/README.md b/widget/milsko/README.md new file mode 100644 index 0000000000..0f08d8d270 --- /dev/null +++ b/widget/milsko/README.md @@ -0,0 +1,4 @@ +Dactyloidae Milsko Toolkit (WIP) + +This is a modified version of Milsko 1.4 (latest release as of 28/7/26, DD/MM/YY), +adapted for use on you know, a web browser. diff --git a/widget/milsko/milskosrc/.clang-format b/widget/milsko/milskosrc/.clang-format new file mode 100644 index 0000000000..eb9d30cc5a --- /dev/null +++ b/widget/milsko/milskosrc/.clang-format @@ -0,0 +1,24 @@ +--- +UseTab: Always +TabWidth: 8 +AlignConsecutiveAssignments: + Enabled: true +AlignConsecutiveDeclarations: + Enabled: true +AccessModifierOffset: -4 +NamespaceIndentation: All +IndentWidth: 8 +PointerAlignment: Left +ColumnLimit: 0 +AllowShortIfStatementsOnASingleLine: Always +AllowShortBlocksOnASingleLine: Never +AllowShortFunctionsOnASingleLine: Empty +AllowShortLoopsOnASingleLine: true +BreakBeforeBraces: Custom +BraceWrapping: + AfterCaseLabel: true +SpaceBeforeParens: Never +AlignEscapedNewlines: DontAlign +SortIncludes: false +AllowShortEnumsOnASingleLine: false +#IndentPPDirectives: AfterHash diff --git a/widget/milsko/milskosrc/.clangd b/widget/milsko/milskosrc/.clangd new file mode 100644 index 0000000000..1058f6f19f --- /dev/null +++ b/widget/milsko/milskosrc/.clangd @@ -0,0 +1,3 @@ +Completion: + HeaderInsertion: Never +ClangFormat: Tab diff --git a/widget/milsko/milskosrc/.gitattributes b/widget/milsko/milskosrc/.gitattributes new file mode 100644 index 0000000000..b43059cfd1 --- /dev/null +++ b/widget/milsko/milskosrc/.gitattributes @@ -0,0 +1,17 @@ +/external/*.h linguist-generated +/external/*.c linguist-generated +/external/libjpeg/include/*.h linguist-generated +/external/libjpeg/src/*.c linguist-generated +/external/libjpeg/src/*.h linguist-generated +/external/libz/include/*.h linguist-generated +/external/libz/src/*.c linguist-generated +/external/libz/src/*.h linguist-generated +/external/libpng/include/*.h linguist-generated +/external/libpng/src/*.c linguist-generated +/external/libpng/src/*.h linguist-generated +/resource/doxygen-theme/* linguist-generated +/src/icon/*.c linguist-generated +/src/font/*.c linguist-generated +/BorMakefile linguist-generated +/WatMakefile linguist-generated +/NTMakefile linguist-generated diff --git a/widget/milsko/milskosrc/.gitignore b/widget/milsko/milskosrc/.gitignore new file mode 100644 index 0000000000..58b172adaa --- /dev/null +++ b/widget/milsko/milskosrc/.gitignore @@ -0,0 +1,33 @@ +examples/* +examples/*.exe +examples/*/* +examples/*/*.exe +!examples/*/ +!examples/*.* +!examples/*/*.* +*.exe +*.o +*.obj +*.core +*.so +*.dll +*.lib +*.dylib +*.a +/Makefile +/build +compile_flags.txt +.cache +.DS_Store +/vms +/BorMakefile +*.err +*.zip + +*.pef +*.dsk +*.bin +*.rsrc +*.finf +*.gdb + diff --git a/widget/milsko/milskosrc/CHANGELOG.txt b/widget/milsko/milskosrc/CHANGELOG.txt new file mode 100644 index 0000000000..83daed86b4 --- /dev/null +++ b/widget/milsko/milskosrc/CHANGELOG.txt @@ -0,0 +1,17 @@ +========================= 1.4 ========================= +- CMakeLists.txt downgraded to version 3.13 to allow compiling on Windows XP +- CMake build now generates a pkgconfig file. +- GDI backend now natively uses GDI for text rendering +- Widgets can now be disabled with MwNdisabled +- Added `MwTabFocus` for letting a tab widget steal focus. +- New table widget (`MwTableClass`). +- Added `MwWindowShouldClose` for letting custom loops know when a window should close. +- Remove VMS build files +- Entry widgets now have blinking cursor that appears only when you hover over the widget. +- Wayland backend: + - Can now create layer surfaces (Use `MwLLMakeToolWindow` on a parentless window) + - Now properly handles keys being held down + - has drastically improved CSD (functionality wise) + - Uses KMSDRM directly for the OpenGL widget instead of wl_egl for a smoother experience + - Various overall performance improvements putting it on the same level as the X11 backend finally + - Menu widget works better under compositors that use CSD. diff --git a/widget/milsko/milskosrc/CMakeLists.txt b/widget/milsko/milskosrc/CMakeLists.txt new file mode 100644 index 0000000000..b9e90d0f79 --- /dev/null +++ b/widget/milsko/milskosrc/CMakeLists.txt @@ -0,0 +1,508 @@ +cmake_minimum_required(VERSION 3.13) +project( + milsko +) + +include(CheckIncludeFiles) + +include(GNUInstallDirs) +set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}") +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +if(WIN32) + set(CMAKE_STATIC_LIBRARY_PREFIX "") + set(CMAKE_SHARED_LIBRARY_PREFIX "") +endif() + +option(MW_CLASSIC_THEME "Use classic theme" OFF) +option(MW_BUILD_EXAMPLES "Build examples" OFF) +option(MW_USE_STB_IMAGE "Use stb_image" ON) +option(MW_USE_STB_TRUETYPE "Use stb_truetype" OFF) + +if(${CMAKE_SYSTEM_NAME} MATCHES Retro) + option(MW_BUILD_SHARED "Build a shared library" OFF) + option(MW_BUILD_STATIC "Build a static library" ON) + option(MW_TRY_OPENGL "Try to compile OpenGL widget or not" OFF) + option(MW_TRY_VULKAN "Try to compile Vulkan widget or not" OFF) +else() + option(MW_BUILD_SHARED "Build a shared library" ON) + option(MW_BUILD_STATIC "Build a static library" OFF) + option(MW_TRY_OPENGL "Try to compile OpenGL widget or not" ON) + option(MW_TRY_VULKAN "Try to compile Vulkan widget or not" ON) +endif() + +option(MW_INSTALL_HEADERS "Install headers" ON) + +if( ${CMAKE_SYSTEM_NAME} STREQUAL Darwin + OR ${CMAKE_SYSTEM_NAME} MATCHES Retro + OR ${CMAKE_SYSTEM_NAME} MATCHES Windows) + option(MW_USE_FREETYPE2 "Use FreeType 2" OFF) +else() + option(MW_USE_FREETYPE2 "Use FreeType 2" ON) +endif() + +if(${CMAKE_SYSTEM_NAME} STREQUAL Windows) + option(MW_USE_GDI_TEXT "Use GDI for text rendering" ON) +endif() + +if(${CMAKE_SYSTEM_NAME} STREQUAL Linux OR ${CMAKE_SYSTEM_NAME} STREQUAL FreeBSD) + option(MW_USE_WAYLAND "Enable Wayland backend" ON) +endif() + +file( + GLOB + SOURCES + external/libz/src/*.c src/*.c src/cursor/*.c src/icon/*.c src/widget/*.c src/text/*.c src/text/font/*.c src/dialog/*.c src/abstract/*.c external/*.c +) + +if(NOT MW_USE_STB_IMAGE) + list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/external/stb_image.c") +endif() + +if(NOT MW_USE_STB_TRUETYPE) + list(REMOVE_ITEM SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/external/stb_truetype.c") +endif() + +if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD") + list(APPEND CMAKE_REQUIRED_INCLUDES "/usr/X11R7/include") + list(APPEND CMAKE_REQUIRED_INCLUDES "/usr/pkg/include") +endif() + +if(MW_TRY_OPENGL) + find_package(OpenGL) + if(OpenGL_FOUND AND NOT APPLE) + set(MW_BUILD_OPENGL ON) + message(STATUS "OpenGL widget has been enabled") + else() + message(WARNING "OpenGL widget has been disabled") + endif() +endif() + +if(MW_TRY_VULKAN) + find_package(Vulkan) + if(${Vulkan_FOUND}) + set(MW_BUILD_VULKAN ON) + message(STATUS "Vulkan widget has been enabled") + else() + message(WARNING "Vulkan widget has been disabled") + endif() +endif() + +if(MW_BUILD_STATIC) + message(STATUS "Building Milsko as a static library") + add_library( + Mw + ${SOURCES} +) +elseif(MW_BUILD_SHARED) + message(STATUS "Building Milsko as a shared library") + add_library( + Mw + SHARED + ${SOURCES} +) +else() + message(ERROR "Must either build a shared library or a static library") +endif() + +if(MW_USE_STB_IMAGE) + target_compile_definitions( + Mw + PRIVATE + USE_STB_IMAGE + ) +else() + file( + GLOB + IMAGE_SOURCES + external/libjpeg/src/*.c external/libpng/src/*.c + ) + target_sources( + Mw + PRIVATE + ${MW_IMAGE_SOURCES} + ) + target_include_directories( + Mw + PRIVATE + external/libjpeg/include external/libpng/include + ) +endif() + +if(MW_USE_STB_TRUETYPE) + target_compile_definitions( + Mw + PRIVATE + USE_STB_TRUETYPE + ) +endif() + +if(MW_USE_FREETYPE2) + find_package(Freetype) + if(Freetype_FOUND) + message(STATUS "FreeType2 found") + target_compile_definitions( + Mw + PRIVATE + USE_FREETYPE2 + ) + + list(APPEND INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS}) + list(APPEND LIBRARY_DIRS ${FREETYPE_LIBRARY_DIRS}) + else() + message(WARNING "FreeType2 not found") + endif() +endif() + + +if(MW_USE_GDI_TEXT) + target_compile_definitions( + Mw + PRIVATE + USE_GDI_TEXT + ) +endif() + +if(MW_USE_WAYLAND) + function(scan_wayland_protocol_core) + execute_process( + COMMAND wayland-scanner private-code /usr/share/wayland/wayland.xml ${CMAKE_CURRENT_SOURCE_DIR}/src/backend/wayland/wayland-core-protocol.c + OUTPUT_VARIABLE WAYLAND_SCANNER_OUTPUT + ERROR_VARIABLE WAYLAND_SCANNER_ERROR + ECHO_OUTPUT_VARIABLE + ECHO_ERROR_VARIABLE + COMMAND_ECHO STDOUT + ) + target_sources( + Mw + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/src/backend/wayland/wayland-core-protocol.c + ) + execute_process( + COMMAND wayland-scanner client-header /usr/share/wayland/wayland.xml ${CMAKE_CURRENT_SOURCE_DIR}/include/Mw/LowLevel/Wayland/wayland-core-protocol.h + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE WAYLAND_SCANNER_OUTPUT + ERROR_VARIABLE WAYLAND_SCANNER_ERROR + ECHO_OUTPUT_VARIABLE + ECHO_ERROR_VARIABLE + COMMAND_ECHO STDOUT + ) + endfunction() + + function(scan_wayland_protocol tier proto ver) + SET(proto_c ${CMAKE_CURRENT_SOURCE_DIR}/src/backend/wayland/wayland-${proto}-protocol.c) + execute_process( + COMMAND wayland-scanner private-code /usr/share/wayland-protocols/${tier}/${proto}/${proto}${ver}.xml ${proto_c} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE WAYLAND_SCANNER_OUTPUT + ERROR_VARIABLE WAYLAND_SCANNER_ERROR + ECHO_OUTPUT_VARIABLE + ECHO_ERROR_VARIABLE + COMMAND_ECHO STDOUT + ) + target_sources( + Mw + PRIVATE + ${proto_c} + ) + execute_process( + COMMAND wayland-scanner client-header /usr/share/wayland-protocols/${tier}/${proto}/${proto}${ver}.xml ${CMAKE_CURRENT_SOURCE_DIR}/include/Mw/LowLevel/Wayland/${proto}-client-protocol.h + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE WAYLAND_SCANNER_OUTPUT + ERROR_VARIABLE WAYLAND_SCANNER_ERROR + ECHO_OUTPUT_VARIABLE + ECHO_ERROR_VARIABLE + COMMAND_ECHO STDOUT + ) + endfunction() + + function(scan_wayland_protocol_from_file proto file) + SET(proto_c ${CMAKE_CURRENT_SOURCE_DIR}/src/backend/wayland/wayland-${proto}-protocol.c) + execute_process( + COMMAND wayland-scanner private-code ${CMAKE_CURRENT_SOURCE_DIR}/resource/wayland/${file} ${proto_c} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE WAYLAND_SCANNER_OUTPUT + ERROR_VARIABLE WAYLAND_SCANNER_ERROR + ECHO_OUTPUT_VARIABLE + ECHO_ERROR_VARIABLE + COMMAND_ECHO STDOUT + ) + target_sources( + Mw + PRIVATE + ${proto_c} + ) + execute_process( + COMMAND wayland-scanner client-header ${CMAKE_CURRENT_SOURCE_DIR}/resource/wayland/${file} ${CMAKE_CURRENT_SOURCE_DIR}/include/Mw/LowLevel/Wayland/${proto}-client-protocol.h + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + OUTPUT_VARIABLE WAYLAND_SCANNER_OUTPUT + ERROR_VARIABLE WAYLAND_SCANNER_ERROR + ECHO_OUTPUT_VARIABLE + ECHO_ERROR_VARIABLE + COMMAND_ECHO STDOUT + ) + endfunction() + + check_include_files(wayland-client.h HAVE_WL_H) + check_include_files(xkbcommon/xkbcommon.h HAVE_XKBCOMMON_H) + check_include_files(cairo/cairo.h HAVE_CAIRO_H) + if(HAVE_WL_H) + if(HAVE_XKBCOMMON_H) + if(HAVE_CAIRO_H) + scan_wayland_protocol_core() + scan_wayland_protocol("stable" "xdg-shell" "") + scan_wayland_protocol("stable" "viewporter" "") + scan_wayland_protocol("stable" "tablet" "-v2") + scan_wayland_protocol("staging" "xdg-toplevel-icon" "-v1") + scan_wayland_protocol("staging" "cursor-shape" "-v1") + scan_wayland_protocol("unstable" "xdg-decoration" "-unstable-v1") + scan_wayland_protocol("unstable" "primary-selection" "-unstable-v1") + scan_wayland_protocol("unstable" "pointer-constraints" "-unstable-v1") + scan_wayland_protocol("unstable" "relative-pointer" "-unstable-v1") + scan_wayland_protocol_from_file("wlr-layer-shell" "wlr-layer-shell-unstable-v1.xml") + + target_sources( + Mw + PRIVATE + src/backend/cairo.c + src/backend/wayland/wayland.c + src/backend/wayland/buffer.c + src/backend/wayland/interfaces.c + src/backend/wayland/region.c + ) + target_compile_definitions( + Mw + PRIVATE + USE_WAYLAND + ) + message(STATUS "Wayland backend has been enabled") + else() + message(WARNING "Wayland backend has been disabled") + endif() + else() + message(WARNING "Wayland backend has been disabled") + endif() + else() + message(WARNING "Wayland backend has been disabled") + endif() +endif() + +if(APPLE AND MW_BUILD_OPENGL) + target_compile_definitions( + Mw + PRIVATE + GL_SILENCE_DEPRECATION + ) +endif() + +target_include_directories( + Mw + PRIVATE + external/libz/include +) + +target_include_directories( + Mw + PUBLIC + include +) + +if(MW_CLASSIC_THEME) + target_compile_definitions( + Mw + PRIVATE + USE_CLASSIC_THEME + ) +endif() + +message("Building Milsko for ${CMAKE_SYSTEM_NAME}") +if(CMAKE_SYSTEM_NAME STREQUAL "Windows" OR CMAKE_SYSTEM_NAME STREQUAL "MSYS") + target_sources( + Mw + PRIVATE + src/backend/gdi.c + ) + target_compile_definitions( + Mw + PRIVATE + USE_GDI + ) + list(APPEND LIBRARIES gdi32 winmm) + target_link_options( + Mw + PRIVATE + -static-libgcc + ) +elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + # target_sources( + # Mw + # PRIVATE + # src/backend/cocoa.m + # ) + target_sources( + Mw + PRIVATE + src/backend/nococoa.m +) + # target_compile_definitions( + # Mw + # PRIVATE + # USE_COCOA + # ) + list(APPEND LIBRARIES objc) + target_link_options( + Mw + PRIVATE + -framework Cocoa + ) +elseif(CMAKE_SYSTEM_NAME MATCHES "Retro") + + target_sources( + Mw + PRIVATE + src/backend/classicmacos.c + ) + if(PLATFORM MATCHES retroppc) + set_target_properties(Mw PROPERTIES COMPILE_FLAGS "-ffunction-sections -mcpu=601 -Os -Wall -Wextra -Wno-unused-parameter") + set_target_properties(Mw PROPERTIES LINK_FLAGS "-Wl,-gc-sections") + endif() + + list(APPEND LIBRARIES InterfaceLib WindowsLib ThreadsLib) + + target_compile_definitions( + Mw + PRIVATE + CLASSIC_MAC_OS + ) +else() + + find_package(PkgConfig) + find_package(X11) + pkg_check_modules(DBUS dbus-1) + + target_sources( + Mw + PRIVATE + src/backend/x11.c + ) + + if(${X11_FOUND}) + list(APPEND INCLUDE_DIRS ${X11_INCLUDE_DIRS}) + list(APPEND LIBRARY_DIRS ${X11_LIBRARY_DIRS}) + target_compile_definitions( + Mw + PRIVATE + USE_X11 + ) + endif() + if(${X11_Xrender_FOUND}) + list(APPEND INCLUDE_DIRS ${XRENDER_INCLUDE_DIRS}) + list(APPEND LIBRARY_DIRS ${XRENDER_LIBRARY_DIRS}) + target_compile_definitions( + Mw + PRIVATE + USE_XRENDER + ) + endif() + + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + list(APPEND LIBRARIES dl) + endif() + + find_package(DBus1) + + if(${DBus1_FOUND}) + list(APPEND INCLUDE_DIRS ${DBUS_INCLUDE_DIRS}) + list(APPEND LIBRARY_DIRS ${DBUS_LIBRARY_DIRS}) + target_compile_definitions( + Mw + PRIVATE + USE_DBUS + ) + endif() +endif() + + + +if(UNIX) + list(APPEND LIBRARIES m) +endif() + +target_include_directories( + Mw + PRIVATE + ${INCLUDE_DIRS} +) +target_link_directories( + Mw + PRIVATE + ${LIBRARY_DIRS} +) +target_link_libraries( + Mw + PRIVATE + ${LIBRARIES} +) + +if(MW_BUILD_OPENGL) + target_compile_definitions( + Mw + PRIVATE + MW_OPENGL + ) +endif() + +if(MW_BUILD_VULKAN) + check_include_files(vulkan/vk_enum_string_helper.h HAS_VK_ENUM_STRING_HELPER) + if(HAS_VK_ENUM_STRING_HELPER) + target_compile_definitions( + Mw + PRIVATE + HAS_VK_ENUM_STRING_HELPER + ) + endif() + + target_compile_definitions( + Mw + PRIVATE + MW_VULKAN + ) +endif() + +target_compile_definitions( + Mw + PRIVATE + _MILSKO _MILSKO_BUILD +) + +install( + TARGETS Mw + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} +) + +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/resource/${PROJECT_NAME}.pc.in + ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc + @ONLY + ) + +install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc + DESTINATION $ENV{MINGW_PREFIX}/${CMAKE_INSTALL_DATADIR}/pkgconfig + ) + +if(MW_INSTALL_HEADERS) + install( + DIRECTORY include/ + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + FILES_MATCHING PATTERN "*.h" + ) +endif() + +if(MW_BUILD_EXAMPLES) + add_subdirectory(examples) +endif() diff --git a/widget/milsko/milskosrc/Doxyfile b/widget/milsko/milskosrc/Doxyfile new file mode 100644 index 0000000000..f413308118 --- /dev/null +++ b/widget/milsko/milskosrc/Doxyfile @@ -0,0 +1,26 @@ +PROJECT_LOGO = resource/logo/logo64.png +PROJECT_NAME = Milsko +PROJECT_BRIEF = "Lightweight and fast GUI toolkit" +OUTPUT_DIRECTORY = doxygen +TAB_SIZE = 8 +OPTIMIZE_OUTPUT_FOR_C = YES +MARKDOWN_SUPPORT = YES +FILE_PATTERNS = *.h *.md +INPUT = include/Mw +INPUT += doc +RECURSIVE = YES +SOURCE_BROWSER = YES +HTML_DYNAMIC_MENUS = YES +GENERATE_TREEVIEW = YES +FULL_SIDEBAR = NO +DISABLE_INDEX = NO +HAVE_DOT = YES +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = include/ doc/ +ENABLED_SECTIONS = YES +OUTPUT_LANGUAGE = English +GENERATE_LATEX = NO +EXTRACT_ALL = YES + +HTML_EXTRA_STYLESHEET = resource/doxygen-theme/doxygen-awesome.css +HTML_COLORSTYLE = LIGHT diff --git a/widget/milsko/milskosrc/Jenkinsfile b/widget/milsko/milskosrc/Jenkinsfile new file mode 100644 index 0000000000..6c1637e8cb --- /dev/null +++ b/widget/milsko/milskosrc/Jenkinsfile @@ -0,0 +1,105 @@ +pipeline { + agent { + label "built-in" + } + stages { + stage("Build document") { + when { + branch "master" + } + agent { + label "built-in" + } + steps { + sh("rm -rf include/Mw/LowLevel/Wayland") + sh("doxygen") + sh("rm -rf /var/www/milsko-doxygen") + sh("mv doxygen/html /var/www/milsko-doxygen") + } + post { + always { + notifyDiscord() + } + } + } + stage("Build") { + parallel { + stage("Build for Linux 64-bit") { + agent { + label "built-in" + } + steps { + sh("git clean -dfx") + sh("./configure --enable-opengl --enable-vulkan --without-vulkan-string-helper") + sh("make -j4") + sh("mv src/libMw.so libMw64.so") + archiveArtifacts("libMw64.so") + } + } + stage("Build for Windows 32-bit") { + agent { + label "built-in" + } + steps { + sh("git clean -dfx") + sh("./configure --enable-opengl --enable-stb-truetype --disable-freetype2 --cross --target=Windows --host=i686-w64-mingw32") + sh("make -j4") + sh("mv src/Mw.dll Mw32.dll") + sh("mv src/libMw.dll.a libMw32.dll.a") + archiveArtifacts("Mw32.dll,libMw32.dll.a") + } + } + stage("Build for Windows 64-bit") { + agent { + label "built-in" + } + steps { + sh("git clean -dfx") + sh("./configure --enable-opengl --enable-stb-truetype --disable-freetype2 --cross --target=Windows --host=x86_64-w64-mingw32") + sh("make -j4") + sh("mv src/Mw.dll Mw64.dll") + sh("mv src/libMw.dll.a libMw64.dll.a") + archiveArtifacts("Mw64.dll,libMw64.dll.a") + } + } + stage("Build for Windows 32-bit (MSVC)") { + agent { + label "2012r2" + } + steps { + bat("git clean -dfx") + bat("nmake -f NTMakefile") + bat("move /y src\\Mw.dll MwMSVC32.dll") + bat("move /y src\\Mw.lib MwMSVC32.lib") + archiveArtifacts("MwMSVC32.dll,MwMSVC32.lib") + } + } + stage("Build for Windows 32-bit (Watcom)") { + agent { + label "built-in" + } + environment { + WATCOM = "/usr/watcom" + INCLUDE = "/usr/watcom/h:/usr/watcom/h/nt" + PATH = "/usr/watcom/binl64:${env.PATH}" + } + steps { + sh("git clean -dfx") + sh("wmake -f WatMakefile") + sh("mv src/Mw.dll MwWat32.dll") + sh("mv src/Mw.lib MwWat32.lib") + archiveArtifacts("MwWat32.dll,MwWat32.lib") + sh("./tools/watcom-pack.sh") + sh("mv milsko-examples.zip milsko-examples-win32.zip") + archiveArtifacts("milsko-examples-win32.zip") + } + } + } + post { + always { + notifyDiscord() + } + } + } + } +} diff --git a/widget/milsko/milskosrc/LICENSE b/widget/milsko/milskosrc/LICENSE new file mode 100644 index 0000000000..a7729adbf9 --- /dev/null +++ b/widget/milsko/milskosrc/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2025-2026, Pyrite development team +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +* Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +* Neither the name of the nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/widget/milsko/milskosrc/NTMakefile b/widget/milsko/milskosrc/NTMakefile new file mode 100644 index 0000000000..a3fc76a36a --- /dev/null +++ b/widget/milsko/milskosrc/NTMakefile @@ -0,0 +1,328 @@ +CC = cl /TC /c /nologo +LD = link /nologo + +MW_CFLAGS = /Iinclude /Iexternal\libz\include /D_MILSKO /D_MILSKO_BUILD /DUSE_GDI /DUSE_STB_IMAGE /DSTBI_NO_SIMD /DUSE_GDI_TEXT +MW_LDFLAGS = /DLL +EXE_CFLAGS = /Iinclude +EXE_LDFLAGS = +.SUFFIXES: .obj .c +all: src\Mw.dll examples\basic\box.exe examples\basic\calculator.exe examples\basic\checkbox.exe examples\basic\clipboard.exe examples\basic\colorpicker.exe examples\basic\combobox.exe examples\basic\example.exe examples\basic\filechooser.exe examples\basic\image.exe examples\basic\listbox.exe examples\basic\messagebox.exe examples\basic\periodic.exe examples\basic\progressbar.exe examples\basic\radiobox.exe examples\basic\rotate.exe examples\basic\scrollbar.exe examples\basic\sevensegment.exe examples\basic\subwindow.exe examples\basic\tab.exe examples\basic\treeview.exe examples\basic\viewport.exe examples\gldemos\boing.exe examples\gldemos\clock.exe examples\gldemos\cube.exe examples\gldemos\gears.exe examples\gldemos\triangle.exe examples\gldemos\tripaint.exe +lib: src\Mw.dll +examples: examples\basic\box.exe examples\basic\calculator.exe examples\basic\checkbox.exe examples\basic\clipboard.exe examples\basic\colorpicker.exe examples\basic\combobox.exe examples\basic\example.exe examples\basic\filechooser.exe examples\basic\image.exe examples\basic\listbox.exe examples\basic\messagebox.exe examples\basic\periodic.exe examples\basic\progressbar.exe examples\basic\radiobox.exe examples\basic\rotate.exe examples\basic\scrollbar.exe examples\basic\sevensegment.exe examples\basic\subwindow.exe examples\basic\tab.exe examples\basic\treeview.exe examples\basic\viewport.exe examples\gldemos\boing.exe examples\gldemos\clock.exe examples\gldemos\cube.exe examples\gldemos\gears.exe examples\gldemos\triangle.exe examples\gldemos\tripaint.exe +clean: + del /f /q external\libz\src\adler32.obj + del /f /q external\libz\src\compress.obj + del /f /q external\libz\src\crc32.obj + del /f /q external\libz\src\deflate.obj + del /f /q external\libz\src\gzclose.obj + del /f /q external\libz\src\gzlib.obj + del /f /q external\libz\src\gzread.obj + del /f /q external\libz\src\gzwrite.obj + del /f /q external\libz\src\infback.obj + del /f /q external\libz\src\inffast.obj + del /f /q external\libz\src\inflate.obj + del /f /q external\libz\src\inftrees.obj + del /f /q external\libz\src\trees.obj + del /f /q external\libz\src\uncompr.obj + del /f /q external\libz\src\zutil.obj + del /f /q external\stb_ds.obj + del /f /q external\stb_image.obj + del /f /q external\stb_truetype.obj + del /f /q src\abstract\charset.obj + del /f /q src\abstract\directory.obj + del /f /q src\abstract\dynamic.obj + del /f /q src\abstract\time.obj + del /f /q src\backend\gdi.obj + del /f /q src\color.obj + del /f /q src\core.obj + del /f /q src\cursor\arrow.obj + del /f /q src\cursor\cross.obj + del /f /q src\cursor\default.obj + del /f /q src\cursor\hidden.obj + del /f /q src\cursor\text.obj + del /f /q src\default.obj + del /f /q src\dialog\colorpicker.obj + del /f /q src\dialog\directorychooser.obj + del /f /q src\dialog\filechooser.obj + del /f /q src\dialog\messagebox.obj + del /f /q src\draw.obj + del /f /q src\icon\back.obj + del /f /q src\icon\clock.obj + del /f /q src\icon\computer.obj + del /f /q src\icon\directory.obj + del /f /q src\icon\down.obj + del /f /q src\icon\error.obj + del /f /q src\icon\file.obj + del /f /q src\icon\forward.obj + del /f /q src\icon\info.obj + del /f /q src\icon\left.obj + del /f /q src\icon\news.obj + del /f /q src\icon\note.obj + del /f /q src\icon\right.obj + del /f /q src\icon\search.obj + del /f /q src\icon\up.obj + del /f /q src\icon\warning.obj + del /f /q src\lowlevel.obj + del /f /q src\string.obj + del /f /q src\text\font\boldfont.obj + del /f /q src\text\font\boldmonottf.obj + del /f /q src\text\font\boldttf.obj + del /f /q src\text\font\font.obj + del /f /q src\text\font\monottf.obj + del /f /q src\text\font\ttf.obj + del /f /q src\text\ft2.obj + del /f /q src\text\gdi.obj + del /f /q src\text\stbtt.obj + del /f /q src\text\text.obj + del /f /q src\truetype.obj + del /f /q src\unicode.obj + del /f /q src\widget\box.obj + del /f /q src\widget\button.obj + del /f /q src\widget\calendar.obj + del /f /q src\widget\checkbox.obj + del /f /q src\widget\combobox.obj + del /f /q src\widget\entry.obj + del /f /q src\widget\frame.obj + del /f /q src\widget\image.obj + del /f /q src\widget\label.obj + del /f /q src\widget\listbox.obj + del /f /q src\widget\menu.obj + del /f /q src\widget\numberentry.obj + del /f /q src\widget\opengl.obj + del /f /q src\widget\progressbar.obj + del /f /q src\widget\radiobox.obj + del /f /q src\widget\scrollbar.obj + del /f /q src\widget\separator.obj + del /f /q src\widget\submenu.obj + del /f /q src\widget\subwindow.obj + del /f /q src\widget\tab.obj + del /f /q src\widget\table.obj + del /f /q src\widget\treeview.obj + del /f /q src\widget\viewport.obj + del /f /q src\widget\window.obj + del /f /q src\Mw.dll + del /f /q src\Mw.lib + del /f /q examples\basic\box.obj + del /f /q examples\basic\calculator.obj + del /f /q examples\basic\checkbox.obj + del /f /q examples\basic\clipboard.obj + del /f /q examples\basic\colorpicker.obj + del /f /q examples\basic\combobox.obj + del /f /q examples\basic\example.obj + del /f /q examples\basic\filechooser.obj + del /f /q examples\basic\image.obj + del /f /q examples\basic\listbox.obj + del /f /q examples\basic\messagebox.obj + del /f /q examples\basic\periodic.obj + del /f /q examples\basic\progressbar.obj + del /f /q examples\basic\radiobox.obj + del /f /q examples\basic\rotate.obj + del /f /q examples\basic\scrollbar.obj + del /f /q examples\basic\sevensegment.obj + del /f /q examples\basic\subwindow.obj + del /f /q examples\basic\tab.obj + del /f /q examples\basic\treeview.obj + del /f /q examples\basic\viewport.obj + del /f /q examples\gldemos\boing.obj + del /f /q examples\gldemos\clock.obj + del /f /q examples\gldemos\cube.obj + del /f /q examples\gldemos\gears.obj + del /f /q examples\gldemos\triangle.obj + del /f /q examples\gldemos\tripaint.obj + del /f /q examples\basic\box.exe + del /f /q examples\basic\calculator.exe + del /f /q examples\basic\checkbox.exe + del /f /q examples\basic\clipboard.exe + del /f /q examples\basic\colorpicker.exe + del /f /q examples\basic\combobox.exe + del /f /q examples\basic\example.exe + del /f /q examples\basic\filechooser.exe + del /f /q examples\basic\image.exe + del /f /q examples\basic\listbox.exe + del /f /q examples\basic\messagebox.exe + del /f /q examples\basic\periodic.exe + del /f /q examples\basic\progressbar.exe + del /f /q examples\basic\radiobox.exe + del /f /q examples\basic\rotate.exe + del /f /q examples\basic\scrollbar.exe + del /f /q examples\basic\sevensegment.exe + del /f /q examples\basic\subwindow.exe + del /f /q examples\basic\tab.exe + del /f /q examples\basic\treeview.exe + del /f /q examples\basic\viewport.exe + del /f /q examples\gldemos\boing.exe + del /f /q examples\gldemos\clock.exe + del /f /q examples\gldemos\cube.exe + del /f /q examples\gldemos\gears.exe + del /f /q examples\gldemos\triangle.exe + del /f /q examples\gldemos\tripaint.exe + +examples\basic\box.exe: examples\basic\box.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\box.obj src\Mw.lib + +examples\basic\box.obj: examples/basic/box.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/box.c + +examples\basic\calculator.exe: examples\basic\calculator.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\calculator.obj src\Mw.lib + +examples\basic\calculator.obj: examples/basic/calculator.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/calculator.c + +examples\basic\checkbox.exe: examples\basic\checkbox.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\checkbox.obj src\Mw.lib + +examples\basic\checkbox.obj: examples/basic/checkbox.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/checkbox.c + +examples\basic\clipboard.exe: examples\basic\clipboard.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\clipboard.obj src\Mw.lib + +examples\basic\clipboard.obj: examples/basic/clipboard.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/clipboard.c + +examples\basic\colorpicker.exe: examples\basic\colorpicker.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\colorpicker.obj src\Mw.lib + +examples\basic\colorpicker.obj: examples/basic/colorpicker.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/colorpicker.c + +examples\basic\combobox.exe: examples\basic\combobox.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\combobox.obj src\Mw.lib + +examples\basic\combobox.obj: examples/basic/combobox.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/combobox.c + +examples\basic\example.exe: examples\basic\example.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\example.obj src\Mw.lib + +examples\basic\example.obj: examples/basic/example.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/example.c + +examples\basic\filechooser.exe: examples\basic\filechooser.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\filechooser.obj src\Mw.lib + +examples\basic\filechooser.obj: examples/basic/filechooser.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/filechooser.c + +examples\basic\image.exe: examples\basic\image.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\image.obj src\Mw.lib + +examples\basic\image.obj: examples/basic/image.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/image.c + +examples\basic\listbox.exe: examples\basic\listbox.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\listbox.obj src\Mw.lib + +examples\basic\listbox.obj: examples/basic/listbox.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/listbox.c + +examples\basic\messagebox.exe: examples\basic\messagebox.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\messagebox.obj src\Mw.lib + +examples\basic\messagebox.obj: examples/basic/messagebox.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/messagebox.c + +examples\basic\periodic.exe: examples\basic\periodic.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\periodic.obj src\Mw.lib + +examples\basic\periodic.obj: examples/basic/periodic.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/periodic.c + +examples\basic\progressbar.exe: examples\basic\progressbar.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\progressbar.obj src\Mw.lib + +examples\basic\progressbar.obj: examples/basic/progressbar.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/progressbar.c + +examples\basic\radiobox.exe: examples\basic\radiobox.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\radiobox.obj src\Mw.lib + +examples\basic\radiobox.obj: examples/basic/radiobox.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/radiobox.c + +examples\basic\rotate.exe: examples\basic\rotate.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\rotate.obj src\Mw.lib + +examples\basic\rotate.obj: examples/basic/rotate.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/rotate.c + +examples\basic\scrollbar.exe: examples\basic\scrollbar.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\scrollbar.obj src\Mw.lib + +examples\basic\scrollbar.obj: examples/basic/scrollbar.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/scrollbar.c + +examples\basic\sevensegment.exe: examples\basic\sevensegment.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\sevensegment.obj src\Mw.lib + +examples\basic\sevensegment.obj: examples/basic/sevensegment.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/sevensegment.c + +examples\basic\subwindow.exe: examples\basic\subwindow.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\subwindow.obj src\Mw.lib + +examples\basic\subwindow.obj: examples/basic/subwindow.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/subwindow.c + +examples\basic\tab.exe: examples\basic\tab.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\tab.obj src\Mw.lib + +examples\basic\tab.obj: examples/basic/tab.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/tab.c + +examples\basic\treeview.exe: examples\basic\treeview.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\treeview.obj src\Mw.lib + +examples\basic\treeview.obj: examples/basic/treeview.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/treeview.c + +examples\basic\viewport.exe: examples\basic\viewport.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\basic\viewport.obj src\Mw.lib + +examples\basic\viewport.obj: examples/basic/viewport.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/basic/viewport.c + +examples\gldemos\boing.exe: examples\gldemos\boing.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\gldemos\boing.obj src\Mw.lib opengl32.lib glu32.lib + +examples\gldemos\boing.obj: examples/gldemos/boing.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/gldemos/boing.c + +examples\gldemos\clock.exe: examples\gldemos\clock.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\gldemos\clock.obj src\Mw.lib opengl32.lib glu32.lib + +examples\gldemos\clock.obj: examples/gldemos/clock.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/gldemos/clock.c + +examples\gldemos\cube.exe: examples\gldemos\cube.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\gldemos\cube.obj src\Mw.lib opengl32.lib glu32.lib + +examples\gldemos\cube.obj: examples/gldemos/cube.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/gldemos/cube.c + +examples\gldemos\gears.exe: examples\gldemos\gears.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\gldemos\gears.obj src\Mw.lib opengl32.lib glu32.lib + +examples\gldemos\gears.obj: examples/gldemos/gears.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/gldemos/gears.c + +examples\gldemos\triangle.exe: examples\gldemos\triangle.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\gldemos\triangle.obj src\Mw.lib opengl32.lib glu32.lib + +examples\gldemos\triangle.obj: examples/gldemos/triangle.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/gldemos/triangle.c + +examples\gldemos\tripaint.exe: examples\gldemos\tripaint.obj src\Mw.dll + $(LD) $(EXE_LDFLAGS) /OUT:$@ examples\gldemos\tripaint.obj src\Mw.lib opengl32.lib glu32.lib + +examples\gldemos\tripaint.obj: examples/gldemos/tripaint.c + $(CC) $(EXE_CFLAGS) /Fo$@ examples/gldemos/tripaint.c + + +src\Mw.dll: external\libz\src\adler32.obj external\libz\src\compress.obj external\libz\src\crc32.obj external\libz\src\deflate.obj external\libz\src\gzclose.obj external\libz\src\gzlib.obj external\libz\src\gzread.obj external\libz\src\gzwrite.obj external\libz\src\infback.obj external\libz\src\inffast.obj external\libz\src\inflate.obj external\libz\src\inftrees.obj external\libz\src\trees.obj external\libz\src\uncompr.obj external\libz\src\zutil.obj external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\abstract\charset.obj src\abstract\directory.obj src\abstract\dynamic.obj src\abstract\time.obj src\backend\gdi.obj src\color.obj src\core.obj src\cursor\arrow.obj src\cursor\cross.obj src\cursor\default.obj src\cursor\hidden.obj src\cursor\text.obj src\default.obj src\dialog\colorpicker.obj src\dialog\directorychooser.obj src\dialog\filechooser.obj src\dialog\messagebox.obj src\draw.obj src\icon\back.obj src\icon\clock.obj src\icon\computer.obj src\icon\directory.obj src\icon\down.obj src\icon\error.obj src\icon\file.obj src\icon\forward.obj src\icon\info.obj src\icon\left.obj src\icon\news.obj src\icon\note.obj src\icon\right.obj src\icon\search.obj src\icon\up.obj src\icon\warning.obj src\lowlevel.obj src\string.obj src\text\font\boldfont.obj src\text\font\boldmonottf.obj src\text\font\boldttf.obj src\text\font\font.obj src\text\font\monottf.obj src\text\font\ttf.obj src\text\ft2.obj src\text\gdi.obj src\text\stbtt.obj src\text\text.obj src\truetype.obj src\unicode.obj src\widget\box.obj src\widget\button.obj src\widget\calendar.obj src\widget\checkbox.obj src\widget\combobox.obj src\widget\entry.obj src\widget\frame.obj src\widget\image.obj src\widget\label.obj src\widget\listbox.obj src\widget\menu.obj src\widget\numberentry.obj src\widget\opengl.obj src\widget\progressbar.obj src\widget\radiobox.obj src\widget\scrollbar.obj src\widget\separator.obj src\widget\submenu.obj src\widget\subwindow.obj src\widget\tab.obj src\widget\table.obj src\widget\treeview.obj src\widget\viewport.obj src\widget\window.obj + $(LD) $(MW_LDFLAGS) /OUT:$@ external\libz\src\adler32.obj external\libz\src\compress.obj external\libz\src\crc32.obj external\libz\src\deflate.obj external\libz\src\gzclose.obj external\libz\src\gzlib.obj external\libz\src\gzread.obj external\libz\src\gzwrite.obj external\libz\src\infback.obj external\libz\src\inffast.obj external\libz\src\inflate.obj external\libz\src\inftrees.obj external\libz\src\trees.obj external\libz\src\uncompr.obj external\libz\src\zutil.obj external\stb_ds.obj external\stb_image.obj external\stb_truetype.obj src\abstract\charset.obj src\abstract\directory.obj src\abstract\dynamic.obj src\abstract\time.obj src\backend\gdi.obj src\color.obj src\core.obj src\cursor\arrow.obj src\cursor\cross.obj src\cursor\default.obj src\cursor\hidden.obj src\cursor\text.obj src\default.obj src\dialog\colorpicker.obj src\dialog\directorychooser.obj src\dialog\filechooser.obj src\dialog\messagebox.obj src\draw.obj src\icon\back.obj src\icon\clock.obj src\icon\computer.obj src\icon\directory.obj src\icon\down.obj src\icon\error.obj src\icon\file.obj src\icon\forward.obj src\icon\info.obj src\icon\left.obj src\icon\news.obj src\icon\note.obj src\icon\right.obj src\icon\search.obj src\icon\up.obj src\icon\warning.obj src\lowlevel.obj src\string.obj src\text\font\boldfont.obj src\text\font\boldmonottf.obj src\text\font\boldttf.obj src\text\font\font.obj src\text\font\monottf.obj src\text\font\ttf.obj src\text\ft2.obj src\text\gdi.obj src\text\stbtt.obj src\text\text.obj src\truetype.obj src\unicode.obj src\widget\box.obj src\widget\button.obj src\widget\calendar.obj src\widget\checkbox.obj src\widget\combobox.obj src\widget\entry.obj src\widget\frame.obj src\widget\image.obj src\widget\label.obj src\widget\listbox.obj src\widget\menu.obj src\widget\numberentry.obj src\widget\opengl.obj src\widget\progressbar.obj src\widget\radiobox.obj src\widget\scrollbar.obj src\widget\separator.obj src\widget\submenu.obj src\widget\subwindow.obj src\widget\tab.obj src\widget\table.obj src\widget\treeview.obj src\widget\viewport.obj src\widget\window.obj opengl32.lib gdi32.lib winmm.lib user32.lib advapi32.lib + + +.c.obj: + $(CC) $(MW_CFLAGS) /Fo$@ $< diff --git a/widget/milsko/milskosrc/README.txt b/widget/milsko/milskosrc/README.txt new file mode 100644 index 0000000000..0f57f905df --- /dev/null +++ b/widget/milsko/milskosrc/README.txt @@ -0,0 +1,72 @@ + +Greetings - Welcome to the Milsko GUI Toolkit (Version 1.4) + + This document contains a brief summary of the contents of this source +distributions and building instructions for Milsko GUI Toolkit. + + Requirements + + Milsko requires either + * A Windows environment with GDI (so anything NT or 9x) + * A Unix-like environment with Wayland and/or X11 for runtime. + + To build Milsko for Windows, you must have one of following compilers: + * Visual C++ 6.0 or newer + * Borland C++ 5.5 or newer + * Open Watcom 2.0 or newer + * MinGW-w64 + + and for Unix-like and MacOS: + * GNU C Compiler + * Clang + + + Contents + + At the top level of this hierarchy there are seven directories: + + src - Contains the source for Milsko library + + include - Contains the headers for Milsko + + doc - Contains the documentation for Milsko + + external - Contains the external dependency that Milsko uses + + resource - Contains the resources used by maintainers + + tools - Contains the tools used by maintainers + + + Building Milsko + + Building Milsko depends on the platform you use, and the compiler you use. + +A. Visual C++ +------------- + +1) Run `nmake -f NTMakefile'. + +B. Borland C++ +-------------- + +1) Run `make -f BorMakefile'. + +C. Open Watcom +-------------- + +1) Run `wmake -f WatMakefile'. + +D. MinGW-w64/GCC/Clang +---------------------- + +1) Determine if you need Vulkan and/or OpenGL. + +2) Either: + a.) Run `./configure'. For help, run `./configure --help'. + b.) Use CMake; i.e. `cmake -B build`. (if contributing, name the build +folder build as that's what's included in the .gitignore) + +3) Run `make'. + + -- Nishi (nishi@nishi.boats) diff --git a/widget/milsko/milskosrc/WatMakefile b/widget/milsko/milskosrc/WatMakefile new file mode 100644 index 0000000000..afeb560618 --- /dev/null +++ b/widget/milsko/milskosrc/WatMakefile @@ -0,0 +1,506 @@ +CC = wcc386 -bt=nt -q +LD = wlink option quiet + +MW_CFLAGS = -bd -i=include -i=external/libz/include -d_MILSKO -d_MILSKO_BUILD -dUSE_GDI -dUSE_STB_IMAGE -dSTBI_NO_SIMD -dUSE_GDI_TEXT +MW_LDFLAGS = system nt_dll +EXE_CFLAGS = -i=include +EXE_LDFLAGS = system nt +all: src/Mw.dll examples/basic/box.exe examples/basic/calculator.exe examples/basic/checkbox.exe examples/basic/clipboard.exe examples/basic/colorpicker.exe examples/basic/combobox.exe examples/basic/example.exe examples/basic/filechooser.exe examples/basic/image.exe examples/basic/listbox.exe examples/basic/messagebox.exe examples/basic/periodic.exe examples/basic/progressbar.exe examples/basic/radiobox.exe examples/basic/rotate.exe examples/basic/scrollbar.exe examples/basic/sevensegment.exe examples/basic/subwindow.exe examples/basic/tab.exe examples/basic/treeview.exe examples/basic/viewport.exe examples/gldemos/boing.exe examples/gldemos/clock.exe examples/gldemos/cube.exe examples/gldemos/gears.exe examples/gldemos/triangle.exe examples/gldemos/tripaint.exe +lib: src/Mw.dll +examples: examples/basic/box.exe examples/basic/calculator.exe examples/basic/checkbox.exe examples/basic/clipboard.exe examples/basic/colorpicker.exe examples/basic/combobox.exe examples/basic/example.exe examples/basic/filechooser.exe examples/basic/image.exe examples/basic/listbox.exe examples/basic/messagebox.exe examples/basic/periodic.exe examples/basic/progressbar.exe examples/basic/radiobox.exe examples/basic/rotate.exe examples/basic/scrollbar.exe examples/basic/sevensegment.exe examples/basic/subwindow.exe examples/basic/tab.exe examples/basic/treeview.exe examples/basic/viewport.exe examples/gldemos/boing.exe examples/gldemos/clock.exe examples/gldemos/cube.exe examples/gldemos/gears.exe examples/gldemos/triangle.exe examples/gldemos/tripaint.exe +clean: .SYMBOLIC + %erase external/libz/src/adler32.obj + %erase external/libz/src/compress.obj + %erase external/libz/src/crc32.obj + %erase external/libz/src/deflate.obj + %erase external/libz/src/gzclose.obj + %erase external/libz/src/gzlib.obj + %erase external/libz/src/gzread.obj + %erase external/libz/src/gzwrite.obj + %erase external/libz/src/infback.obj + %erase external/libz/src/inffast.obj + %erase external/libz/src/inflate.obj + %erase external/libz/src/inftrees.obj + %erase external/libz/src/trees.obj + %erase external/libz/src/uncompr.obj + %erase external/libz/src/zutil.obj + %erase external/stb_ds.obj + %erase external/stb_image.obj + %erase external/stb_truetype.obj + %erase src/abstract/charset.obj + %erase src/abstract/directory.obj + %erase src/abstract/dynamic.obj + %erase src/abstract/time.obj + %erase src/backend/gdi.obj + %erase src/color.obj + %erase src/core.obj + %erase src/cursor/arrow.obj + %erase src/cursor/cross.obj + %erase src/cursor/default.obj + %erase src/cursor/hidden.obj + %erase src/cursor/text.obj + %erase src/default.obj + %erase src/dialog/colorpicker.obj + %erase src/dialog/directorychooser.obj + %erase src/dialog/filechooser.obj + %erase src/dialog/messagebox.obj + %erase src/draw.obj + %erase src/icon/back.obj + %erase src/icon/clock.obj + %erase src/icon/computer.obj + %erase src/icon/directory.obj + %erase src/icon/down.obj + %erase src/icon/error.obj + %erase src/icon/file.obj + %erase src/icon/forward.obj + %erase src/icon/info.obj + %erase src/icon/left.obj + %erase src/icon/news.obj + %erase src/icon/note.obj + %erase src/icon/right.obj + %erase src/icon/search.obj + %erase src/icon/up.obj + %erase src/icon/warning.obj + %erase src/lowlevel.obj + %erase src/string.obj + %erase src/text/font/boldfont.obj + %erase src/text/font/boldmonottf.obj + %erase src/text/font/boldttf.obj + %erase src/text/font/font.obj + %erase src/text/font/monottf.obj + %erase src/text/font/ttf.obj + %erase src/text/ft2.obj + %erase src/text/gdi.obj + %erase src/text/stbtt.obj + %erase src/text/text.obj + %erase src/truetype.obj + %erase src/unicode.obj + %erase src/widget/box.obj + %erase src/widget/button.obj + %erase src/widget/calendar.obj + %erase src/widget/checkbox.obj + %erase src/widget/combobox.obj + %erase src/widget/entry.obj + %erase src/widget/frame.obj + %erase src/widget/image.obj + %erase src/widget/label.obj + %erase src/widget/listbox.obj + %erase src/widget/menu.obj + %erase src/widget/numberentry.obj + %erase src/widget/opengl.obj + %erase src/widget/progressbar.obj + %erase src/widget/radiobox.obj + %erase src/widget/scrollbar.obj + %erase src/widget/separator.obj + %erase src/widget/submenu.obj + %erase src/widget/subwindow.obj + %erase src/widget/tab.obj + %erase src/widget/table.obj + %erase src/widget/treeview.obj + %erase src/widget/viewport.obj + %erase src/widget/window.obj + %erase src/Mw.dll + %erase src/Mw.lib + %erase examples/basic/box.obj + %erase examples/basic/calculator.obj + %erase examples/basic/checkbox.obj + %erase examples/basic/clipboard.obj + %erase examples/basic/colorpicker.obj + %erase examples/basic/combobox.obj + %erase examples/basic/example.obj + %erase examples/basic/filechooser.obj + %erase examples/basic/image.obj + %erase examples/basic/listbox.obj + %erase examples/basic/messagebox.obj + %erase examples/basic/periodic.obj + %erase examples/basic/progressbar.obj + %erase examples/basic/radiobox.obj + %erase examples/basic/rotate.obj + %erase examples/basic/scrollbar.obj + %erase examples/basic/sevensegment.obj + %erase examples/basic/subwindow.obj + %erase examples/basic/tab.obj + %erase examples/basic/treeview.obj + %erase examples/basic/viewport.obj + %erase examples/gldemos/boing.obj + %erase examples/gldemos/clock.obj + %erase examples/gldemos/cube.obj + %erase examples/gldemos/gears.obj + %erase examples/gldemos/triangle.obj + %erase examples/gldemos/tripaint.obj + %erase examples/basic/box.exe + %erase examples/basic/calculator.exe + %erase examples/basic/checkbox.exe + %erase examples/basic/clipboard.exe + %erase examples/basic/colorpicker.exe + %erase examples/basic/combobox.exe + %erase examples/basic/example.exe + %erase examples/basic/filechooser.exe + %erase examples/basic/image.exe + %erase examples/basic/listbox.exe + %erase examples/basic/messagebox.exe + %erase examples/basic/periodic.exe + %erase examples/basic/progressbar.exe + %erase examples/basic/radiobox.exe + %erase examples/basic/rotate.exe + %erase examples/basic/scrollbar.exe + %erase examples/basic/sevensegment.exe + %erase examples/basic/subwindow.exe + %erase examples/basic/tab.exe + %erase examples/basic/treeview.exe + %erase examples/basic/viewport.exe + %erase examples/gldemos/boing.exe + %erase examples/gldemos/clock.exe + %erase examples/gldemos/cube.exe + %erase examples/gldemos/gears.exe + %erase examples/gldemos/triangle.exe + %erase examples/gldemos/tripaint.exe + +examples/basic/box.exe: examples/basic/box.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/box.obj library clib3r.lib library src/Mw.lib + +examples/basic/box.obj: examples/basic/box.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/box.c + +examples/basic/calculator.exe: examples/basic/calculator.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/calculator.obj library clib3r.lib library src/Mw.lib + +examples/basic/calculator.obj: examples/basic/calculator.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/calculator.c + +examples/basic/checkbox.exe: examples/basic/checkbox.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/checkbox.obj library clib3r.lib library src/Mw.lib + +examples/basic/checkbox.obj: examples/basic/checkbox.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/checkbox.c + +examples/basic/clipboard.exe: examples/basic/clipboard.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/clipboard.obj library clib3r.lib library src/Mw.lib + +examples/basic/clipboard.obj: examples/basic/clipboard.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/clipboard.c + +examples/basic/colorpicker.exe: examples/basic/colorpicker.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/colorpicker.obj library clib3r.lib library src/Mw.lib + +examples/basic/colorpicker.obj: examples/basic/colorpicker.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/colorpicker.c + +examples/basic/combobox.exe: examples/basic/combobox.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/combobox.obj library clib3r.lib library src/Mw.lib + +examples/basic/combobox.obj: examples/basic/combobox.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/combobox.c + +examples/basic/example.exe: examples/basic/example.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/example.obj library clib3r.lib library src/Mw.lib + +examples/basic/example.obj: examples/basic/example.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/example.c + +examples/basic/filechooser.exe: examples/basic/filechooser.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/filechooser.obj library clib3r.lib library src/Mw.lib + +examples/basic/filechooser.obj: examples/basic/filechooser.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/filechooser.c + +examples/basic/image.exe: examples/basic/image.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/image.obj library clib3r.lib library src/Mw.lib + +examples/basic/image.obj: examples/basic/image.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/image.c + +examples/basic/listbox.exe: examples/basic/listbox.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/listbox.obj library clib3r.lib library src/Mw.lib + +examples/basic/listbox.obj: examples/basic/listbox.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/listbox.c + +examples/basic/messagebox.exe: examples/basic/messagebox.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/messagebox.obj library clib3r.lib library src/Mw.lib + +examples/basic/messagebox.obj: examples/basic/messagebox.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/messagebox.c + +examples/basic/periodic.exe: examples/basic/periodic.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/periodic.obj library clib3r.lib library src/Mw.lib + +examples/basic/periodic.obj: examples/basic/periodic.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/periodic.c + +examples/basic/progressbar.exe: examples/basic/progressbar.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/progressbar.obj library clib3r.lib library src/Mw.lib + +examples/basic/progressbar.obj: examples/basic/progressbar.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/progressbar.c + +examples/basic/radiobox.exe: examples/basic/radiobox.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/radiobox.obj library clib3r.lib library src/Mw.lib + +examples/basic/radiobox.obj: examples/basic/radiobox.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/radiobox.c + +examples/basic/rotate.exe: examples/basic/rotate.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/rotate.obj library clib3r.lib library src/Mw.lib + +examples/basic/rotate.obj: examples/basic/rotate.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/rotate.c + +examples/basic/scrollbar.exe: examples/basic/scrollbar.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/scrollbar.obj library clib3r.lib library src/Mw.lib + +examples/basic/scrollbar.obj: examples/basic/scrollbar.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/scrollbar.c + +examples/basic/sevensegment.exe: examples/basic/sevensegment.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/sevensegment.obj library clib3r.lib library src/Mw.lib + +examples/basic/sevensegment.obj: examples/basic/sevensegment.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/sevensegment.c + +examples/basic/subwindow.exe: examples/basic/subwindow.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/subwindow.obj library clib3r.lib library src/Mw.lib + +examples/basic/subwindow.obj: examples/basic/subwindow.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/subwindow.c + +examples/basic/tab.exe: examples/basic/tab.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/tab.obj library clib3r.lib library src/Mw.lib + +examples/basic/tab.obj: examples/basic/tab.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/tab.c + +examples/basic/treeview.exe: examples/basic/treeview.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/treeview.obj library clib3r.lib library src/Mw.lib + +examples/basic/treeview.obj: examples/basic/treeview.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/treeview.c + +examples/basic/viewport.exe: examples/basic/viewport.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/basic/viewport.obj library clib3r.lib library src/Mw.lib + +examples/basic/viewport.obj: examples/basic/viewport.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/basic/viewport.c + +examples/gldemos/boing.exe: examples/gldemos/boing.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/gldemos/boing.obj library clib3r.lib library src/Mw.lib library opengl32.lib library glu32.lib + +examples/gldemos/boing.obj: examples/gldemos/boing.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/gldemos/boing.c + +examples/gldemos/clock.exe: examples/gldemos/clock.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/gldemos/clock.obj library clib3r.lib library src/Mw.lib library opengl32.lib library glu32.lib + +examples/gldemos/clock.obj: examples/gldemos/clock.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/gldemos/clock.c + +examples/gldemos/cube.exe: examples/gldemos/cube.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/gldemos/cube.obj library clib3r.lib library src/Mw.lib library opengl32.lib library glu32.lib + +examples/gldemos/cube.obj: examples/gldemos/cube.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/gldemos/cube.c + +examples/gldemos/gears.exe: examples/gldemos/gears.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/gldemos/gears.obj library clib3r.lib library src/Mw.lib library opengl32.lib library glu32.lib + +examples/gldemos/gears.obj: examples/gldemos/gears.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/gldemos/gears.c + +examples/gldemos/triangle.exe: examples/gldemos/triangle.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/gldemos/triangle.obj library clib3r.lib library src/Mw.lib library opengl32.lib library glu32.lib + +examples/gldemos/triangle.obj: examples/gldemos/triangle.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/gldemos/triangle.c + +examples/gldemos/tripaint.exe: examples/gldemos/tripaint.obj src/Mw.dll + $(LD) $(EXE_LDFLAGS) name $@ file examples/gldemos/tripaint.obj library clib3r.lib library src/Mw.lib library opengl32.lib library glu32.lib + +examples/gldemos/tripaint.obj: examples/gldemos/tripaint.c + $(CC) $(EXE_CFLAGS) -fo=$@ examples/gldemos/tripaint.c + + +src/Mw.dll: external/libz/src/adler32.obj external/libz/src/compress.obj external/libz/src/crc32.obj external/libz/src/deflate.obj external/libz/src/gzclose.obj external/libz/src/gzlib.obj external/libz/src/gzread.obj external/libz/src/gzwrite.obj external/libz/src/infback.obj external/libz/src/inffast.obj external/libz/src/inflate.obj external/libz/src/inftrees.obj external/libz/src/trees.obj external/libz/src/uncompr.obj external/libz/src/zutil.obj external/stb_ds.obj external/stb_image.obj external/stb_truetype.obj src/abstract/charset.obj src/abstract/directory.obj src/abstract/dynamic.obj src/abstract/time.obj src/backend/gdi.obj src/color.obj src/core.obj src/cursor/arrow.obj src/cursor/cross.obj src/cursor/default.obj src/cursor/hidden.obj src/cursor/text.obj src/default.obj src/dialog/colorpicker.obj src/dialog/directorychooser.obj src/dialog/filechooser.obj src/dialog/messagebox.obj src/draw.obj src/icon/back.obj src/icon/clock.obj src/icon/computer.obj src/icon/directory.obj src/icon/down.obj src/icon/error.obj src/icon/file.obj src/icon/forward.obj src/icon/info.obj src/icon/left.obj src/icon/news.obj src/icon/note.obj src/icon/right.obj src/icon/search.obj src/icon/up.obj src/icon/warning.obj src/lowlevel.obj src/string.obj src/text/font/boldfont.obj src/text/font/boldmonottf.obj src/text/font/boldttf.obj src/text/font/font.obj src/text/font/monottf.obj src/text/font/ttf.obj src/text/ft2.obj src/text/gdi.obj src/text/stbtt.obj src/text/text.obj src/truetype.obj src/unicode.obj src/widget/box.obj src/widget/button.obj src/widget/calendar.obj src/widget/checkbox.obj src/widget/combobox.obj src/widget/entry.obj src/widget/frame.obj src/widget/image.obj src/widget/label.obj src/widget/listbox.obj src/widget/menu.obj src/widget/numberentry.obj src/widget/opengl.obj src/widget/progressbar.obj src/widget/radiobox.obj src/widget/scrollbar.obj src/widget/separator.obj src/widget/submenu.obj src/widget/subwindow.obj src/widget/tab.obj src/widget/table.obj src/widget/treeview.obj src/widget/viewport.obj src/widget/window.obj + $(LD) $(MW_LDFLAGS) option implib=src/Mw.lib name $@ file external/libz/src/adler32.obj file external/libz/src/compress.obj file external/libz/src/crc32.obj file external/libz/src/deflate.obj file external/libz/src/gzclose.obj file external/libz/src/gzlib.obj file external/libz/src/gzread.obj file external/libz/src/gzwrite.obj file external/libz/src/infback.obj file external/libz/src/inffast.obj file external/libz/src/inflate.obj file external/libz/src/inftrees.obj file external/libz/src/trees.obj file external/libz/src/uncompr.obj file external/libz/src/zutil.obj file external/stb_ds.obj file external/stb_image.obj file external/stb_truetype.obj file src/abstract/charset.obj file src/abstract/directory.obj file src/abstract/dynamic.obj file src/abstract/time.obj file src/backend/gdi.obj file src/color.obj file src/core.obj file src/cursor/arrow.obj file src/cursor/cross.obj file src/cursor/default.obj file src/cursor/hidden.obj file src/cursor/text.obj file src/default.obj file src/dialog/colorpicker.obj file src/dialog/directorychooser.obj file src/dialog/filechooser.obj file src/dialog/messagebox.obj file src/draw.obj file src/icon/back.obj file src/icon/clock.obj file src/icon/computer.obj file src/icon/directory.obj file src/icon/down.obj file src/icon/error.obj file src/icon/file.obj file src/icon/forward.obj file src/icon/info.obj file src/icon/left.obj file src/icon/news.obj file src/icon/note.obj file src/icon/right.obj file src/icon/search.obj file src/icon/up.obj file src/icon/warning.obj file src/lowlevel.obj file src/string.obj file src/text/font/boldfont.obj file src/text/font/boldmonottf.obj file src/text/font/boldttf.obj file src/text/font/font.obj file src/text/font/monottf.obj file src/text/font/ttf.obj file src/text/ft2.obj file src/text/gdi.obj file src/text/stbtt.obj file src/text/text.obj file src/truetype.obj file src/unicode.obj file src/widget/box.obj file src/widget/button.obj file src/widget/calendar.obj file src/widget/checkbox.obj file src/widget/combobox.obj file src/widget/entry.obj file src/widget/frame.obj file src/widget/image.obj file src/widget/label.obj file src/widget/listbox.obj file src/widget/menu.obj file src/widget/numberentry.obj file src/widget/opengl.obj file src/widget/progressbar.obj file src/widget/radiobox.obj file src/widget/scrollbar.obj file src/widget/separator.obj file src/widget/submenu.obj file src/widget/subwindow.obj file src/widget/tab.obj file src/widget/table.obj file src/widget/treeview.obj file src/widget/viewport.obj file src/widget/window.obj library clib3r.lib library opengl32.lib library gdi32.lib library winmm.lib library user32.lib library advapi32.lib + + + +external/libz/src/adler32.obj: external/libz/src/adler32.c + $(CC) $(MW_CFLAGS) -fo=$@ external/libz/src/adler32.c +external/libz/src/compress.obj: external/libz/src/compress.c + $(CC) $(MW_CFLAGS) -fo=$@ external/libz/src/compress.c +external/libz/src/crc32.obj: external/libz/src/crc32.c + $(CC) $(MW_CFLAGS) -fo=$@ external/libz/src/crc32.c +external/libz/src/deflate.obj: external/libz/src/deflate.c + $(CC) $(MW_CFLAGS) -fo=$@ external/libz/src/deflate.c +external/libz/src/gzclose.obj: external/libz/src/gzclose.c + $(CC) $(MW_CFLAGS) -fo=$@ external/libz/src/gzclose.c +external/libz/src/gzlib.obj: external/libz/src/gzlib.c + $(CC) $(MW_CFLAGS) -fo=$@ external/libz/src/gzlib.c +external/libz/src/gzread.obj: external/libz/src/gzread.c + $(CC) $(MW_CFLAGS) -fo=$@ external/libz/src/gzread.c +external/libz/src/gzwrite.obj: external/libz/src/gzwrite.c + $(CC) $(MW_CFLAGS) -fo=$@ external/libz/src/gzwrite.c +external/libz/src/infback.obj: external/libz/src/infback.c + $(CC) $(MW_CFLAGS) -fo=$@ external/libz/src/infback.c +external/libz/src/inffast.obj: external/libz/src/inffast.c + $(CC) $(MW_CFLAGS) -fo=$@ external/libz/src/inffast.c +external/libz/src/inflate.obj: external/libz/src/inflate.c + $(CC) $(MW_CFLAGS) -fo=$@ external/libz/src/inflate.c +external/libz/src/inftrees.obj: external/libz/src/inftrees.c + $(CC) $(MW_CFLAGS) -fo=$@ external/libz/src/inftrees.c +external/libz/src/trees.obj: external/libz/src/trees.c + $(CC) $(MW_CFLAGS) -fo=$@ external/libz/src/trees.c +external/libz/src/uncompr.obj: external/libz/src/uncompr.c + $(CC) $(MW_CFLAGS) -fo=$@ external/libz/src/uncompr.c +external/libz/src/zutil.obj: external/libz/src/zutil.c + $(CC) $(MW_CFLAGS) -fo=$@ external/libz/src/zutil.c +external/stb_ds.obj: external/stb_ds.c + $(CC) $(MW_CFLAGS) -fo=$@ external/stb_ds.c +external/stb_image.obj: external/stb_image.c + $(CC) $(MW_CFLAGS) -fo=$@ external/stb_image.c +external/stb_truetype.obj: external/stb_truetype.c + $(CC) $(MW_CFLAGS) -fo=$@ external/stb_truetype.c +src/abstract/charset.obj: src/abstract/charset.c + $(CC) $(MW_CFLAGS) -fo=$@ src/abstract/charset.c +src/abstract/directory.obj: src/abstract/directory.c + $(CC) $(MW_CFLAGS) -fo=$@ src/abstract/directory.c +src/abstract/dynamic.obj: src/abstract/dynamic.c + $(CC) $(MW_CFLAGS) -fo=$@ src/abstract/dynamic.c +src/abstract/time.obj: src/abstract/time.c + $(CC) $(MW_CFLAGS) -fo=$@ src/abstract/time.c +src/backend/gdi.obj: src/backend/gdi.c + $(CC) $(MW_CFLAGS) -fo=$@ src/backend/gdi.c +src/color.obj: src/color.c + $(CC) $(MW_CFLAGS) -fo=$@ src/color.c +src/core.obj: src/core.c + $(CC) $(MW_CFLAGS) -fo=$@ src/core.c +src/cursor/arrow.obj: src/cursor/arrow.c + $(CC) $(MW_CFLAGS) -fo=$@ src/cursor/arrow.c +src/cursor/cross.obj: src/cursor/cross.c + $(CC) $(MW_CFLAGS) -fo=$@ src/cursor/cross.c +src/cursor/default.obj: src/cursor/default.c + $(CC) $(MW_CFLAGS) -fo=$@ src/cursor/default.c +src/cursor/hidden.obj: src/cursor/hidden.c + $(CC) $(MW_CFLAGS) -fo=$@ src/cursor/hidden.c +src/cursor/text.obj: src/cursor/text.c + $(CC) $(MW_CFLAGS) -fo=$@ src/cursor/text.c +src/default.obj: src/default.c + $(CC) $(MW_CFLAGS) -fo=$@ src/default.c +src/dialog/colorpicker.obj: src/dialog/colorpicker.c + $(CC) $(MW_CFLAGS) -fo=$@ src/dialog/colorpicker.c +src/dialog/directorychooser.obj: src/dialog/directorychooser.c + $(CC) $(MW_CFLAGS) -fo=$@ src/dialog/directorychooser.c +src/dialog/filechooser.obj: src/dialog/filechooser.c + $(CC) $(MW_CFLAGS) -fo=$@ src/dialog/filechooser.c +src/dialog/messagebox.obj: src/dialog/messagebox.c + $(CC) $(MW_CFLAGS) -fo=$@ src/dialog/messagebox.c +src/draw.obj: src/draw.c + $(CC) $(MW_CFLAGS) -fo=$@ src/draw.c +src/icon/back.obj: src/icon/back.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/back.c +src/icon/clock.obj: src/icon/clock.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/clock.c +src/icon/computer.obj: src/icon/computer.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/computer.c +src/icon/directory.obj: src/icon/directory.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/directory.c +src/icon/down.obj: src/icon/down.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/down.c +src/icon/error.obj: src/icon/error.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/error.c +src/icon/file.obj: src/icon/file.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/file.c +src/icon/forward.obj: src/icon/forward.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/forward.c +src/icon/info.obj: src/icon/info.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/info.c +src/icon/left.obj: src/icon/left.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/left.c +src/icon/news.obj: src/icon/news.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/news.c +src/icon/note.obj: src/icon/note.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/note.c +src/icon/right.obj: src/icon/right.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/right.c +src/icon/search.obj: src/icon/search.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/search.c +src/icon/up.obj: src/icon/up.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/up.c +src/icon/warning.obj: src/icon/warning.c + $(CC) $(MW_CFLAGS) -fo=$@ src/icon/warning.c +src/lowlevel.obj: src/lowlevel.c + $(CC) $(MW_CFLAGS) -fo=$@ src/lowlevel.c +src/string.obj: src/string.c + $(CC) $(MW_CFLAGS) -fo=$@ src/string.c +src/text/font/boldfont.obj: src/text/font/boldfont.c + $(CC) $(MW_CFLAGS) -fo=$@ src/text/font/boldfont.c +src/text/font/boldmonottf.obj: src/text/font/boldmonottf.c + $(CC) $(MW_CFLAGS) -fo=$@ src/text/font/boldmonottf.c +src/text/font/boldttf.obj: src/text/font/boldttf.c + $(CC) $(MW_CFLAGS) -fo=$@ src/text/font/boldttf.c +src/text/font/font.obj: src/text/font/font.c + $(CC) $(MW_CFLAGS) -fo=$@ src/text/font/font.c +src/text/font/monottf.obj: src/text/font/monottf.c + $(CC) $(MW_CFLAGS) -fo=$@ src/text/font/monottf.c +src/text/font/ttf.obj: src/text/font/ttf.c + $(CC) $(MW_CFLAGS) -fo=$@ src/text/font/ttf.c +src/text/ft2.obj: src/text/ft2.c + $(CC) $(MW_CFLAGS) -fo=$@ src/text/ft2.c +src/text/gdi.obj: src/text/gdi.c + $(CC) $(MW_CFLAGS) -fo=$@ src/text/gdi.c +src/text/stbtt.obj: src/text/stbtt.c + $(CC) $(MW_CFLAGS) -fo=$@ src/text/stbtt.c +src/text/text.obj: src/text/text.c + $(CC) $(MW_CFLAGS) -fo=$@ src/text/text.c +src/truetype.obj: src/truetype.c + $(CC) $(MW_CFLAGS) -fo=$@ src/truetype.c +src/unicode.obj: src/unicode.c + $(CC) $(MW_CFLAGS) -fo=$@ src/unicode.c +src/widget/box.obj: src/widget/box.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/box.c +src/widget/button.obj: src/widget/button.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/button.c +src/widget/calendar.obj: src/widget/calendar.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/calendar.c +src/widget/checkbox.obj: src/widget/checkbox.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/checkbox.c +src/widget/combobox.obj: src/widget/combobox.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/combobox.c +src/widget/entry.obj: src/widget/entry.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/entry.c +src/widget/frame.obj: src/widget/frame.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/frame.c +src/widget/image.obj: src/widget/image.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/image.c +src/widget/label.obj: src/widget/label.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/label.c +src/widget/listbox.obj: src/widget/listbox.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/listbox.c +src/widget/menu.obj: src/widget/menu.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/menu.c +src/widget/numberentry.obj: src/widget/numberentry.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/numberentry.c +src/widget/opengl.obj: src/widget/opengl.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/opengl.c +src/widget/progressbar.obj: src/widget/progressbar.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/progressbar.c +src/widget/radiobox.obj: src/widget/radiobox.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/radiobox.c +src/widget/scrollbar.obj: src/widget/scrollbar.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/scrollbar.c +src/widget/separator.obj: src/widget/separator.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/separator.c +src/widget/submenu.obj: src/widget/submenu.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/submenu.c +src/widget/subwindow.obj: src/widget/subwindow.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/subwindow.c +src/widget/tab.obj: src/widget/tab.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/tab.c +src/widget/table.obj: src/widget/table.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/table.c +src/widget/treeview.obj: src/widget/treeview.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/treeview.c +src/widget/viewport.obj: src/widget/viewport.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/viewport.c +src/widget/window.obj: src/widget/window.c + $(CC) $(MW_CFLAGS) -fo=$@ src/widget/window.c diff --git a/widget/milsko/milskosrc/configure b/widget/milsko/milskosrc/configure new file mode 100644 index 0000000000..44db66d802 --- /dev/null +++ b/widget/milsko/milskosrc/configure @@ -0,0 +1,363 @@ +#!/usr/bin/env perl +our $target = `uname -s`; +$target =~ s/\r?\n$//; + +# MSYS with MinGW gives us some other shit idk +if (index($target, "MINGW") != -1) { + $target = "Windows"; +} + +foreach my $l (@ARGV) { + if ($l =~ /^--.+$/) { + } + elsif ($l =~ /^(.+)=(.+)$/) { + $ENV{$1} = $2; + } +} + +our $prefix = "/usr/local"; +our $cc = defined($ENV{CC}) ? $ENV{CC} : "*host*gcc"; +our $cxx = defined($ENV{CXX}) ? $ENV{CXX} : "*host*g++"; +our $ar = defined($ENV{AR}) ? $ENV{AR} : "*host*ar"; +our $incdir = "-I include"; +our $incdir2 = ""; +our $cflags = "-fPIC -D_MILSKO -D_MILSKO_BUILD -fvisibility=hidden"; +our $libdir = ""; +our $ldflags = ""; +our $math = "-lm"; +our @shared = "-shared"; +our @backends = (); + +our $library_prefix = "lib"; +our $library_suffix = ".so"; +our $object_suffix = ".o"; +our $executable_suffix = ""; + +our @library_targets = (); +our @examples_targets = (); +our %examples_libs = (); + +our $cross = 0; +our $host = ""; + +require("./pl/utils.pl"); + +param_set("classic-theme", 0); +param_set("stb-image", 1); +param_set("opengl", 0); +param_set("vulkan", 0); +param_set("vulkan-string-helper", 1); +param_set("shared", 1); +param_set("static", 1); +param_set("examples", 1); + +# (option that only makes sense on x11) +param_set("allow-sloppy-focus", 0); + +my %features = ( + "classic-theme" => "use classic theme", + "stb-image" => "use stb_image, instead use libjpeg/libpng", + "stb-truetype" => "use stb_truetype", + "freetype2" => "use FreeType2", + "gdi-text" => "(Windows only) use GDI Text", + "xrender" => "(X11 only) use XRender", + "opengl" => "build OpenGL widget", + "vulkan" => "build Vulkan widget", + "vulkan-string-helper" => "use Vulkan string helper", + "shared" => "build shared library", + "static" => "build static library", + "wayland" => "enable wayland backend", + "gnustep" => "use gnustep", + "dbus" => "use DBus on supported platform", + "allow-sloppy-focus" => "prevent the x11 backend from using XSetInputFocus to enforce click-to-focus" +); +my @features_keys = ( + "1classic-theme", "1stb-image", + "1stb-truetype", "1freetype2", "1gdi-text", + "1opengl", "2xrender", + "1vulkan", "2vulkan-string-helper", + "1shared", "1static", + "1wayland", "1gnustep", + "1dbus" +); + +sub def_platform { + if($target eq "Windows") { + param_set("freetype2", 0); + param_set("stb-truetype", 0); + } elsif($target ne "Darwin" and $target ne "ClassicMacOS" and $target ne "Haiku") { + param_set("freetype2", 1); + param_set("stb-truetype", 0); + } else { + param_set("freetype2", 0); + param_set("stb-truetype", 1); + } + if($target eq "Linux" || $target eq "FreeBSD") { + param_set("x11", 1); + param_set("xrender", 1); + if(!param_get("tiny")){ + param_set("wayland", 1); + } + param_set("dbus", 1); + } + if($target eq "NetBSD" || $target eq "OpenBSD") { + param_set("x11", 1); + } + if($target eq "Windows") { + param_set("gdi-text", 1); + } else { + param_set("gdi-text", 0); + } +} + +foreach my $l (@ARGV) { + if ($l =~ /^--target=(.+)$/) { + $target = $1; + } +} + +def_platform(); + + +foreach my $l (@ARGV) { + if ($l =~ /^--with-([^=]+)=(.+)$/) { + param_set($1, $2); + } + elsif ($l =~ /^--(?:with|enable)-(.+)$/) { + param_set($1, 1); + } + elsif ($l =~ /^--(?:without|disable)-(.+)$/) { + param_set($1, 0); + } + elsif ($l =~ /^--host=(.+)$/) { + $host = $1 . "-"; + } + elsif ($l =~ /^--cflags=(.+)$/) { + add_cflags($1); + } + elsif ($l eq "--cross") { + $cross = 1; + } + elsif ($l eq "--tiny") { + param_set("tiny",1); + } + elsif (($l eq "-h") or ($l eq "--help")) { + print("Milsko Toolkit Configuration Utility\n"); + print("\n"); + print("Usage: $0 [options]\n"); + print("\n"); + print("Options:\n"); + print(" -h --help Display this help\n"); + print(" --prefix=PREFIX Installation prefix\n"); + print(" --host=TARGET Host for compiler/archiver\n"); + print(" --target=TARGET Specify target\n"); + print(" --cflags=CFLAGS Add cflags\n"); + print(" --tiny Build smallest possible library\n"); + print(" --cross Indicate cross compilation\n"); + print("\n"); + print("Features:\n"); + print(" --enable-FEATURE Use FEATURE\n"); + print(" --with-FEATURE Use FEATURE\n"); + print(" --disable-FEATURE Do not use FEATURE\n"); + print(" --without-FEATURE Do not use FEATURE\n"); + + foreach my $l (@features_keys) { + my $flag = ( + (substr($l, 0, 1) eq '1') + ? (param_get(substr($l, 1)) ? "--disable-" : "--enable-") + : (param_get(substr($l, 1)) ? "--without-" : "--with-") + ) . substr($l, 1); + my $do = param_get(substr($l, 1)) ? "Do not " : ""; + my $feat = $features{ substr($l, 1) }; + if (not(param_get(substr($l, 1)))) { + $feat = uc(substr($feat, 0, 1)) . substr($feat, 1); + } + print(" $flag" . (" " x (32 - length($flag))) . "${do}${feat}\n"); + } + exit(0); + } +} + +if (-f "./pl/ostype/${target}.pl") { + require("./pl/ostype/${target}.pl"); +} +else { + print( +"Perl file (pl/ostype/${target}.pl) was not found for your target. Please add one.\n" + ); + exit(1); +} + +require("./pl/rules.pl"); + +print("Target : " . $target . "\n"); + +my @l = (); +foreach my $e (param_list()) { + if (not(param_get($e))) { + next; + } + if (($e eq "vulkan-string-helper") and param_get("vulkan")) { + push(@l, $e); + } + elsif (($e eq "xrender") and ($backend eq "x11")) { + push(@l, $e); + } + elsif (not($e eq "vulkan-string-helper") and not($e eq "xrender")) { + push(@l, $e); + } +} +print("Enabled: " . join(" ", @l) . "\n"); + +$cc =~ s/\*host\*/$host/; +$cxx =~ s/\*host\*/$host/; +$ar =~ s/\*host\*/$host/; + +open(OUT, ">", "Makefile"); +print(OUT "PREFIX = ${prefix}\n"); +print(OUT "AR = ${ar}\n"); +print(OUT "CC = ${cc}\n"); +print(OUT "CXX = ${cxx}\n"); +print(OUT "INCDIR = ${incdir} ${incdir2}\n"); +print(OUT "CFLAGS = ${cflags}\n"); +print(OUT "LIBDIR = ${libdir}\n"); +print(OUT "LDFLAGS = ${ldflags}\n"); +print(OUT "LIBS = ${math} ${libs}\n"); +print(OUT "MATH = ${math}\n"); +print(OUT "SHARED = @{shared}\n"); +print(OUT "\n"); +print(OUT ".PHONY: all format clean distclean lib examples install\n"); +print(OUT "\n"); +print(OUT "all: lib examples\n"); +print(OUT "\n"); +print(OUT "install: lib\n"); +print(OUT + " mkdir -p \$(DESTDIR)\$(PREFIX)/lib \$(DESTDIR)\$(PREFIX)/include\n"); +print(OUT +" -cp src/${library_prefix}Mw${library_suffix} \$(DESTDIR)\$(PREFIX)/lib/\n" +); +print(OUT " -cp src/libMw.a \$(DESTDIR)\$(PREFIX)/lib/\n"); +print(OUT " cp -rf include \$(DESTDIR)\$(PREFIX)/\n"); +print(OUT "\n"); +print(OUT "format:\n"); +print(OUT +" clang-format --verbose -i `find tools src include examples \"(\" -name \"*.c\" -or -name \"*.cc\" -or -name \"*.h\" -or -name \"*.m\" \")\" -and -not -name \"*ttf.c\"`\n" +); +print(OUT +" perltidy -b -bext=\"/\" --paren-tightness=2 `find tools pl configure -name \"*.pl\"`\n" +); +print(OUT "\n"); +print(OUT "lib:"); + +if (param_get("shared")) { + print(OUT " src/${library_prefix}Mw${library_suffix}"); +} +if (param_get("static")) { + print(OUT " src/libMw.a"); +} +print(OUT "\n"); +print(OUT "\n"); +if (param_get("shared")) { + my $linker = "CC"; +if (grep(/^haiku$/, @backends)) { + $linker = "CXX"; +} + print( OUT "src/${library_prefix}Mw${library_suffix}: " + . join(" ", @library_targets) + . "\n"); + print(OUT +" \$($linker) \$(SHARED) \$(LDFLAGS\) \$(LIBDIR) -o src/${library_prefix}Mw${library_suffix} " + . join(" ", @library_targets) + . " \$(LIBS)\n"); + print(OUT "\n"); +} +if (param_get("static")) { + print(OUT "src/libMw.a: " . join(" ", @library_targets) . "\n"); + print(OUT " \$(AR) rcs src/libMw.a " . join(" ", @library_targets) . "\n"); +} + +foreach my $l (@library_targets) { + my $warn = "-Wall -Wextra -Wno-sign-compare -Wno-unused-value"; + my $s = $l; + my $compiler = "CC"; + my $o = $object_suffix; + $o =~ s/\./\\\./g; + + if ($l =~ /cocoa/) { + $s =~ s/$o$/.m/; + } + elsif ($l =~ /haiku/) { + $s =~ s/$o$/.cc/; + $compiler = "CXX"; + } + else { + $s =~ s/$o$/.c/; + } + + if ($l =~ /^external\//) { + $warn = ""; + } + + print(OUT "${l}: ${s}\n"); + print(OUT " \$($compiler) $warn \$\(INCDIR) \$(CFLAGS\) -c -o ${l} ${s}\n"); +} +print(OUT "\n"); +print(OUT "\n"); +if (param_get("examples")) { + print(OUT "examples: " . join(" ", @examples_targets) . "\n"); + print(OUT "\n"); + foreach my $l (@examples_targets) { + my $libs = ""; + my $s = $l; + my $o = $executable_suffix; + $o =~ s/\./\\\./g; + $s =~ s/$o$//; + + if (defined($examples_libs{$l})) { + $libs = $examples_libs{$l}; + } + + if (param_get("shared")) { + print(OUT + "${l}: ${s}${object_suffix} src/${library_prefix}Mw${library_suffix}\n" + ); + } else { + print(OUT + "${l}: ${s}${object_suffix} src/${library_prefix}Mw.a\n" + ); + } + if (grep(/^cocoa$/, @backends)) { + print(OUT +" \$(CC) -L./src \$\(LIBDIR) -o ${l} ${s}${object_suffix} -lMw ${math} ${libs}\n" + ); + } + else { + print(OUT +" \$(CC) -L src -Wl,-R./src \$\(LIBDIR) -o ${l} ${s}${object_suffix} -lMw ${math} ${libs}\n" + ); + } + + if($target eq "ClassicMacOS") { + print(OUT +" ".$ENV{RETRO68_TOOLCHAIN_PATH}."/bin/MakePEF ${l} -o ${s}.pef\n"); + print(OUT +" Rez -I ".$ENV{RETRO68_TOOLCHAIN_PATH}."/RIncludes ".$ENV{RETRO68_TOOLCHAIN_PATH}."/RIncludes/Retro68APPL.r -DCFRAG_NAME=\"example\" --data ${l}.pef --cc ${l}.dsk -t APPL\n" + ); + } + + print(OUT "${s}${object_suffix}: ${s}.c\n"); + print(OUT +" \$(CC) -c \$\(INCDIR) -o ${s}${object_suffix} ${s}.c -lMw ${math}\n" + ); + } +} +print(OUT "\n"); +print(OUT "clean:\n"); +print(OUT +" rm -f */*.o */*/*.o */*/*/*.o */*.exe */*/*.exe */*/*/*.exe src/*.so src/*.dll src/*.dylib src/*.a " + . join(" ", @examples_targets) + . "\n"); +print(OUT "\n"); +print(OUT "distclean: clean\n"); +print(OUT " rm -f Makefile\n"); +close(OUT); diff --git a/widget/milsko/milskosrc/doc/BACKENDDEV.md b/widget/milsko/milskosrc/doc/BACKENDDEV.md new file mode 100644 index 0000000000..85f61f4fb9 --- /dev/null +++ b/widget/milsko/milskosrc/doc/BACKENDDEV.md @@ -0,0 +1,25 @@ +# Backend dev + +The basic process of creating a new Milsko backend is + +- Adding a new include header into `include/Mw/LowLevel`. It must include; + - `struct _MwLLBackendName`: Any details about a window or a subwidget + - `struct _MwLLBackendNameColor`: An 8-bit RGB Color. You'll probably never impl this, this is for platforms like X11/GDI where they have a secondary color representation that can be stored. + - `struct _MwLLBackendNamePixmap`: Self-explanatory. This is also used for the soft gradients in the modern theme. + - `MwLLBackendNameCallInitImpl(void)` called by `MwLibraryInit` to address and platform globals. + - Note that all of those structs are actually unions. They should all start with their `MwLLCommon...` equivalants. +- Fill out `Mw/LowLevel.h` appopriately, adding an include to your new file and the structs in the appropriate unions. These need to be guarded by a `USE_BACKENDNAME` macro which you'll define later when you modify the build system. +- Creating a new impl file in `src/backend` + - Backends actually return a table of function pointers that you have to implement with static functions. Your file should end with `#include "call.c"` and then `CALL(BackendName);`, and somewhere you should have the impl for `MwLLBackendNameCallInitImpl(void)`. + - Prefer to keep the backend file to one file if you can, though obviously exceptions like the Wayland backend exist because it's simply too complex to sanely stuff into one file. +- Add `MwLLBackendNameCallInitImpl` to the `MwLibraryInit` impl in `src/core.c`. +- Add a new enum variation to `MwLLBackends` in `Mw/Include/LowLevel.h`; your impl of `MwLLCreateImpl` will set `common.type` to this so the user can check which backend they're on (important for platforms with multiple supported backends). +- Either + - a.) Modify `CMakeLists.txt` for your platform. + - b.) Add a new perl file in `pl/ostype` that `./configure` can reference, and modify `pl/rules.pl`; If you don't know how to use perl it's fine, just copy a file like the `Linux.pl` or `Windows.pl`, the functions you'll have to change for your platform are self explanatory. Ensure it ends with `1;`. + - c.) Both. + - Both are recommended, but some platforms like Classic Mac OS can't be used with the `./configure` script, and that's fine. + +The functions you'll have to impl are too many to list here so you should start by just copying `x11.c` and then replacing all the function impls with your own. + +\*\*Pay attention to some of these functions' comments in LowLevel.h as they might not be as you expect; for example, `MwLLSetDarkThemeImpl` is for setting the accent color to dark theme on platforms like modern Windows (dark theme itself is set with `MwSetInteger(handle, MwNdarktheme, 1)`). diff --git a/widget/milsko/milskosrc/doc/NEWWIDGET.md b/widget/milsko/milskosrc/doc/NEWWIDGET.md new file mode 100644 index 0000000000..ab9cfb789b --- /dev/null +++ b/widget/milsko/milskosrc/doc/NEWWIDGET.md @@ -0,0 +1,7 @@ +# Writing a new widget +@warning This is mainly for developers + +1. Create new file in src/widget with lower case +2. Create new header in include/Mw/Widget with pascal case +3. Add the header include to include/Mw/Milsko.h, if new widget does not require some extension (like OpenGL and Vulkan) +4. See another widget for example diff --git a/widget/milsko/milskosrc/doc/TIERS.md b/widget/milsko/milskosrc/doc/TIERS.md new file mode 100644 index 0000000000..c94cd6a6e9 --- /dev/null +++ b/widget/milsko/milskosrc/doc/TIERS.md @@ -0,0 +1,20 @@ +# Tiers + +Ports of Milsko are grouped into three "tiers" in terms of their support. + +- **Tier 1**: Before every new release of Milsko, these platforms will be tested to make sure they have full support, and the CI will test them. +- **Tier 2**: These might be outdated or not updated in awhile, they might only compile under a specific version/commit of Milsko. Authors of these backends will be made aware of these updates. +- **Tier 3**: These are outright unfinished. Only use these if you're a developer. + +Currently, the Tier 1 backends are: + +- Windows 9x+/NT 4.0+ +- Any Unix/Linux system that supports X11 or Wayland. + +There are currently no Tier 2 backends. + +Tier 3 backends are: + +- Mac OS X 10.4+ with Cocoa +- Mac OS 7-9, PowerPC (68k support not planned). +- Haiku diff --git a/widget/milsko/milskosrc/doc/TINYCONFIG.md b/widget/milsko/milskosrc/doc/TINYCONFIG.md new file mode 100644 index 0000000000..024edf605d --- /dev/null +++ b/widget/milsko/milskosrc/doc/TINYCONFIG.md @@ -0,0 +1,9 @@ +# Tiny Config + +Milsko's configure script supports the `--tiny` option for building the tiniest possible Milsko library (~400kb as of writing). Currently, what it does is: + +- Add `-Oz` to the cflags +- (clang only) add `-flto=thin` to the cflags and linker flags +- Build stb-image with `STB_IMAGE_STATIC` (this is why you get warnings with stb_image when you use it) +- (Linux) Disable the Wayland backend +- (Linux) Disable dbus integration diff --git a/widget/milsko/milskosrc/examples/CMakeLists.txt b/widget/milsko/milskosrc/examples/CMakeLists.txt new file mode 100644 index 0000000000..5baed4a883 --- /dev/null +++ b/widget/milsko/milskosrc/examples/CMakeLists.txt @@ -0,0 +1,7 @@ +add_subdirectory(basic) +if(${MW_TRY_OPENGL}) +add_subdirectory(gldemos) +endif() +if(${MW_TRY_VULKAN}) +add_subdirectory(vkdemos) +endif() diff --git a/widget/milsko/milskosrc/examples/basic/CMakeLists.txt b/widget/milsko/milskosrc/examples/basic/CMakeLists.txt new file mode 100644 index 0000000000..e69c4ae552 --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/CMakeLists.txt @@ -0,0 +1,26 @@ +file( + GLOB + EXAMPLES_BASIC_SOURCES + *.c +) + +foreach(PATH IN LISTS EXAMPLES_BASIC_SOURCES) + get_filename_component(TARGET ${PATH} NAME_WE) + if(CMAKE_SYSTEM_NAME MATCHES Retro) + add_application(${TARGET} ${PATH}) + else() + add_executable(${TARGET} MACOSX_BUNDLE ${PATH}) + endif() + target_link_libraries( + ${TARGET} + PRIVATE + Mw + ) + if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") + target_link_libraries( + ${TARGET} + PRIVATE + m + ) + endif() +endforeach() diff --git a/widget/milsko/milskosrc/examples/basic/box.c b/widget/milsko/milskosrc/examples/basic/box.c new file mode 100644 index 0000000000..e14b9f5746 --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/box.c @@ -0,0 +1,74 @@ +#include + +MwWidget window, box; + +void MWAPI resize(MwWidget handle, void* user, void* client) { + int ww = MwGetInteger(handle, MwNwidth); + int wh = MwGetInteger(handle, MwNheight); + + (void)user; + (void)client; + + MwVaApply(box, + MwNwidth, ww, + MwNheight, wh, + NULL); +} + +int main() { + MwWidget box2, box3, box4; + + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 600, 200, + MwNtitle, "box", + NULL); + + box = MwVaCreateWidget(MwBoxClass, "box", window, 0, 0, 0, 0, + MwNpadding, 10, + MwNmargin, 10, + NULL); + + box2 = MwVaCreateWidget(MwBoxClass, "box2", box, 0, 0, 0, 0, + MwNmargin, 10, + MwNorientation, MwVERTICAL, + NULL); + + box3 = MwVaCreateWidget(MwBoxClass, "box3", box, 0, 0, 0, 0, + MwNmargin, 10, + MwNorientation, MwVERTICAL, + NULL); + + box4 = MwVaCreateWidget(MwBoxClass, "box4", box, 0, 0, 0, 0, + MwNmargin, 10, + MwNorientation, MwVERTICAL, + MwNfixedSize, 40, + NULL); + + MwVaCreateWidget(MwButtonClass, "btn1", box2, 0, 0, 0, 0, + MwNbackground, "#a00", + NULL); + + MwVaCreateWidget(MwButtonClass, "btn2", box2, 0, 0, 0, 0, + MwNbackground, "#0a0", + MwNratio, 2, + NULL); + + MwVaCreateWidget(MwButtonClass, "btn3", box2, 0, 0, 0, 0, + MwNbackground, "#00a", + NULL); + + MwVaCreateWidget(MwButtonClass, "btn4", box3, 0, 0, 0, 0, + MwNbackground, "#a0a", + NULL); + + MwVaCreateWidget(MwButtonClass, "btn5", box4, 0, 0, 0, 0, + MwNbackground, "#0aa", + NULL); + + MwAddUserHandler(window, MwNresizeHandler, resize, NULL); + + resize(window, NULL, NULL); + + MwLoop(window); +} diff --git a/widget/milsko/milskosrc/examples/basic/calculator.c b/widget/milsko/milskosrc/examples/basic/calculator.c new file mode 100644 index 0000000000..8889e97d37 --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/calculator.c @@ -0,0 +1,185 @@ +#include + +MwWidget widgets[18]; +MwWidget inp; + +/* probably enough for most tasks */ +double stack[512]; +int sp = 0; + +static void MWAPI resize(MwWidget handle, void* client, void* user) { + int ww = MwGetInteger(handle, MwNwidth); + int wh = MwGetInteger(handle, MwNheight) - MwGetInteger(inp, MwNheight); + int i; + + MwVaApply(inp, + MwNwidth, ww, + NULL); + + for(i = 0; i < sizeof(widgets) / sizeof(widgets[0]); i++) { + int x = i % 4; + int y = i / 4; + if(widgets[i] != NULL) { + MwVaApply(widgets[i], + MwNwidth, ww / 4, + MwNheight, wh / 5, + MwNx, ww / 4 * x, + MwNy, wh / 5 * y + MwGetInteger(inp, MwNheight), + NULL); + } + } +} + +static void MWAPI activate(MwWidget handle, void* client, void* user) { + const char* n = MwGetText(handle, MwNtext); + + if(('0' <= n[0] && n[0] <= '9') || n[0] == '.') { + const char* s = MwGetText(inp, MwNtext); + char* r; + + if(n[0] == '.' && s != NULL) { + int i; + for(i = 0; s[i] != 0; i++) { + if(s[i] == '.') return; + } + } + + if(s == NULL) s = ""; + + r = MwStringConcat(s, n); + MwVaApply(inp, + MwNtext, r, + NULL); + free(r); + } else if(n[0] == 'E') { + const char* s = MwGetText(inp, MwNtext); + + if(s != NULL) { + stack[sp++] = atof(s); + + MwVaApply(inp, + MwNtext, "", + NULL); + } + } else if(n[0] == 'C') { + MwVaApply(inp, + MwNtext, "", + NULL); + } else if(n[0] == '+' || n[0] == '-' || n[0] == '*' || n[0] == '/') { + if(sp >= 2) { + double sv = stack[--sp]; + double fv = stack[--sp]; + double v; + char buf[256]; + + if(n[0] == '+') { + v = fv + sv; + } else if(n[0] == '-') { + v = fv - sv; + } else if(n[0] == '*') { + v = fv * sv; + } else if(n[0] == '/') { + v = fv / sv; + } + + MwStringPrintIntoBuffer(buf, 256, "%g", v); + + MwVaApply(inp, + MwNtext, buf, + NULL); + } + } +} + +int main() { + MwWidget w; + int i; + + for(i = 0; i < sizeof(widgets) / sizeof(widgets[0]); i++) widgets[i] = NULL; + + MwLibraryInit(); + + w = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 150, 150, + MwNtitle, "Calculator", + NULL); + + inp = MwCreateWidget(MwEntryClass, "entry", w, 0, 0, 0, 24); + + widgets[0] = MwVaCreateWidget(MwButtonClass, "7", w, 0, 0, 0, 0, + MwNtext, "7", + NULL); + + widgets[1] = MwVaCreateWidget(MwButtonClass, "8", w, 0, 0, 0, 0, + MwNtext, "8", + NULL); + + widgets[2] = MwVaCreateWidget(MwButtonClass, "9", w, 0, 0, 0, 0, + MwNtext, "9", + NULL); + + widgets[3] = MwVaCreateWidget(MwButtonClass, "/", w, 0, 0, 0, 0, + MwNtext, "/", + NULL); + + widgets[4] = MwVaCreateWidget(MwButtonClass, "4", w, 0, 0, 0, 0, + MwNtext, "4", + NULL); + + widgets[5] = MwVaCreateWidget(MwButtonClass, "5", w, 0, 0, 0, 0, + MwNtext, "5", + NULL); + + widgets[6] = MwVaCreateWidget(MwButtonClass, "6", w, 0, 0, 0, 0, + MwNtext, "6", + NULL); + + widgets[7] = MwVaCreateWidget(MwButtonClass, "*", w, 0, 0, 0, 0, + MwNtext, "*", + NULL); + + widgets[8] = MwVaCreateWidget(MwButtonClass, "1", w, 0, 0, 0, 0, + MwNtext, "1", + NULL); + + widgets[9] = MwVaCreateWidget(MwButtonClass, "2", w, 0, 0, 0, 0, + MwNtext, "2", + NULL); + + widgets[10] = MwVaCreateWidget(MwButtonClass, "3", w, 0, 0, 0, 0, + MwNtext, "3", + NULL); + + widgets[11] = MwVaCreateWidget(MwButtonClass, "-", w, 0, 0, 0, 0, + MwNtext, "-", + NULL); + + widgets[12] = MwVaCreateWidget(MwButtonClass, "0", w, 0, 0, 0, 0, + MwNtext, "0", + NULL); + + widgets[13] = MwVaCreateWidget(MwButtonClass, ".", w, 0, 0, 0, 0, + MwNtext, ".", + NULL); + + widgets[16] = MwVaCreateWidget(MwButtonClass, "E", w, 0, 0, 0, 0, + MwNtext, "E", + NULL); + + widgets[15] = MwVaCreateWidget(MwButtonClass, "+", w, 0, 0, 0, 0, + MwNtext, "+", + NULL); + + widgets[17] = MwVaCreateWidget(MwButtonClass, "C", w, 0, 0, 0, 0, + MwNtext, "C", + NULL); + + for(i = 0; i < sizeof(widgets) / sizeof(widgets[0]); i++) { + if(widgets[i] != NULL) MwAddUserHandler(widgets[i], MwNactivateHandler, activate, NULL); + } + + MwAddUserHandler(w, MwNresizeHandler, resize, NULL); + + resize(w, NULL, NULL); + + MwLoop(w); +} diff --git a/widget/milsko/milskosrc/examples/basic/checkbox.c b/widget/milsko/milskosrc/examples/basic/checkbox.c new file mode 100644 index 0000000000..c66f06687d --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/checkbox.c @@ -0,0 +1,28 @@ +#include + +int main() { + MwWidget window; + + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "test", NULL, MwDEFAULT, MwDEFAULT, 8 + 16 + 8 + 16 * 10 + 8, 8 + 16 + 8 + 16 + 8, + MwNtitle, "checkbox", + NULL); + + MwVaCreateWidget(MwCheckBoxClass, "cb1", window, 8, 8, 16, 16, + NULL); + MwVaCreateWidget(MwCheckBoxClass, "cb2", window, 8, 8 + 16 + 8, 16, 16, + MwNchecked, 1, + NULL); + + MwVaCreateWidget(MwLabelClass, "lab1", window, 8 + 16 + 8, 8, 16 * 10, 16, + MwNtext, "lorem ipsum 1", + MwNalignment, MwALIGNMENT_BEGINNING, + NULL); + MwVaCreateWidget(MwLabelClass, "lab2", window, 8 + 16 + 8, 8 + 16 + 8, 16 * 10, 16, + MwNtext, "lorem ipsum 2", + MwNalignment, MwALIGNMENT_BEGINNING, + NULL); + + MwLoop(window); +} diff --git a/widget/milsko/milskosrc/examples/basic/clipboard.c b/widget/milsko/milskosrc/examples/basic/clipboard.c new file mode 100644 index 0000000000..9d060c31a9 --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/clipboard.c @@ -0,0 +1,78 @@ +#include + +MwWidget window, instructions, text1, text2, cur_text; + +static void MWAPI resize(MwWidget handle, void* user_data, void* call_data) { + unsigned int w, h; + + (void)user_data; + (void)call_data; + + w = MwGetInteger(handle, MwNwidth); + h = MwGetInteger(handle, MwNheight); + + MwVaApply(instructions, + MwNy, 50, + MwNwidth, w - 50 * 2, + MwNheight, h - 125 - 50 * 3, + NULL); + + MwVaApply(text1, + MwNy, 150, + MwNwidth, w - 25 * 2, + MwNheight, h - 125 - 50 * 3, + NULL); + MwVaApply(text2, + MwNy, 250, + MwNwidth, w - 25 * 2, + MwNheight, h - 125 - 50 * 3, + NULL); +} +static void MWAPI clipboard(MwWidget handle, void* user_data, void* call_data) { + char* clipboard = call_data; + + (void)handle; + (void)user_data; + + if(clipboard != NULL) { + MwVaApply(cur_text, MwNtext, clipboard, NULL); + MwForceRender(cur_text); + } +} + +static void MWAPI tick(MwWidget handle, void* user_data, void* call_data) { + cur_text = text1; + MwGetClipboard(handle, MwCLIPBOARD_MAIN); + cur_text = text2; + MwGetClipboard(handle, MwCLIPBOARD_PRIMARY); + MwForceRender(window); +} + +int main() { + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 400, 400, + MwNtitle, "clipboard", + NULL); + instructions = MwVaCreateWidget(MwLabelClass, "button", window, 50, 50, 300, 125, + MwNtext, "clipboard contents will show up below.", + NULL); + text1 = MwVaCreateWidget(MwLabelClass, "label", window, 25, 150, 300, 75, + MwNtext, "", + NULL); + text2 = MwVaCreateWidget(MwLabelClass, "label2", window, 25, 250, 300, 75, + MwNtext, "", + NULL); + + cur_text = text1; + + MwAddUserHandler(window, MwNresizeHandler, resize, NULL); + MwAddUserHandler(window, MwNclipboardHandler, clipboard, NULL); + MwAddUserHandler(instructions, MwNclipboardHandler, clipboard, NULL); + MwAddUserHandler(cur_text, MwNclipboardHandler, clipboard, NULL); + MwAddUserHandler(window, MwNtickHandler, tick, NULL); + + resize(window, NULL, NULL); + + MwLoop(window); +} diff --git a/widget/milsko/milskosrc/examples/basic/colorpicker.c b/widget/milsko/milskosrc/examples/basic/colorpicker.c new file mode 100644 index 0000000000..dbce7fe2b7 --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/colorpicker.c @@ -0,0 +1,48 @@ +#include + +MwWidget fpicker; +MwWidget window; +MwWidget button; + +void MWAPI file_callback(MwWidget handle, void* user_data, void* call_data) { + char hexColor[8]; + MwRGB* rgb = call_data; + + (void)handle; + (void)user_data; + + rgb->red &= 0xff; + rgb->green &= 0xff; + rgb->blue &= 0xff; + MwStringPrintIntoBuffer(hexColor, 8, "#%02X%02X%02X", rgb->red, rgb->green, rgb->blue); + MwSetText(window, MwNbackground, hexColor); +} + +void MWAPI file_picker(MwWidget handle, void* user_data, void* call_data) { + MwWidget cpicker = MwColorPicker(window, "cpicker"); + + (void)handle; + (void)user_data; + (void)call_data; + + MwAddUserHandler(cpicker, MwNcolorChosenHandler, file_callback, NULL); + + MwSetText(cpicker, MwNbackground, MwGetInteger(cpicker, MwNdarkTheme) ? MwDefaultDarkBackground : MwDefaultBackground); +} + +int main() { + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, + MwDEFAULT, 640, 480, MwNtitle, "color picker", NULL); + MwSetText(window, MwNbackground, MwGetInteger(window, MwNdarkTheme) ? MwDefaultBackground : MwDefaultDarkBackground); + + button = MwVaCreateWidget(MwButtonClass, "button", window, 160, 180, 320, 120, + MwNtext, "change window background", + NULL); + MwSetText(button, MwNbackground, MwGetInteger(window, MwNdarkTheme) ? MwDefaultBackground : MwDefaultDarkBackground); + + MwAddUserHandler(button, MwNactivateHandler, file_picker, NULL); + + MwLoop(window); +} diff --git a/widget/milsko/milskosrc/examples/basic/combobox.c b/widget/milsko/milskosrc/examples/basic/combobox.c new file mode 100644 index 0000000000..0816466a29 --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/combobox.c @@ -0,0 +1,22 @@ +#include + +int main() { + MwWidget w, cb; + + MwLibraryInit(); + + w = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 5 + 320 + 5, 5 + 24 + 5, + MwNtitle, "combobox", + NULL); + + cb = MwCreateWidget(MwComboBoxClass, "combobox", w, 5, 5, 320, 24); + + MwComboBoxAdd(cb, -1, "wow!"); + MwComboBoxAdd(cb, -1, "insert"); + MwComboBoxAdd(cb, -1, "cool"); + MwComboBoxAdd(cb, -1, "text"); + MwComboBoxAdd(cb, -1, "here"); + MwComboBoxAdd(cb, -1, "!!!"); + + MwLoop(w); +} diff --git a/widget/milsko/milskosrc/examples/basic/example.c b/widget/milsko/milskosrc/examples/basic/example.c new file mode 100644 index 0000000000..8fe38da78e --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/example.c @@ -0,0 +1,160 @@ +#include + +MwWidget window, menu, button, button2, button3, button4, button5, button6, button7; + +void MWAPI handler(MwWidget handle, void* user_data, void* call_data) { + (void)handle; + (void)user_data; + (void)call_data; + + printf("hello world!\n"); +} + +void MWAPI handler_theme(MwWidget handle, void* user_data, void* call_data) { + (void)handle; + (void)user_data; + (void)call_data; + + MwVaApply(window, + MwNdarkTheme, MwGetInteger(window, MwNdarkTheme) == 0 ? 1 : 0, + NULL); +} + +void MWAPI handler_look(MwWidget handle, void* user_data, void* call_data) { + (void)handle; + (void)user_data; + (void)call_data; + + MwVaApply(window, + MwNmodernLook, MwGetInteger(window, MwNmodernLook) == 0 ? 1 : 0, + NULL); +} + +void MWAPI handler_font(MwWidget handle, void* user_data, void* call_data) { + (void)handle; + (void)user_data; + (void)call_data; + + MwVaApply(window, + MwNbitmapFont, MwGetInteger(window, MwNbitmapFont) == 0 ? 1 : 0, + NULL); +} + +void MWAPI resize(MwWidget handle, void* user_data, void* call_data) { + unsigned int w, h, mh; + + (void)user_data; + (void)call_data; + + w = MwGetInteger(handle, MwNwidth); + h = MwGetInteger(handle, MwNheight) - (mh = MwGetInteger(menu, MwNheight)); + + MwVaApply(button, + MwNy, 50 + mh, + MwNwidth, (w - 50 * 2) / 4, + MwNheight, h - 125 - 50 * 3, + NULL); + + MwVaApply(button2, + MwNx, 50 + (w - 50 * 2) / 4, + MwNy, 50 + mh, + MwNwidth, (w - 50 * 2) / 4, + MwNheight, h - 125 - 50 * 3, + NULL); + + MwVaApply(button3, + MwNx, 50 + (w - 50 * 2) / 4 * 2, + MwNy, 50 + mh, + MwNwidth, (w - 50 * 2) / 4, + MwNheight, h - 125 - 50 * 3, + NULL); + MwVaApply(button7, + MwNx, 50 + (w - 50 * 2) / 4 * 3, + MwNy, 50 + mh, + MwNwidth, (w - 50 * 2) / 4, + MwNheight, h - 125 - 50 * 3, + NULL); + MwVaApply(button4, + MwNx, 50 + (w - 50 * 2) / 3 * 0, + MwNy, h - 50 - 125 + mh, + MwNwidth, (w - 50 * 2) / 3, + NULL); + + MwVaApply(button5, + MwNx, 50 + (w - 50 * 2) / 3 * 1, + MwNy, h - 50 - 125 + mh, + MwNwidth, (w - 50 * 2) / 3, + NULL); + + MwVaApply(button6, + MwNx, 50 + (w - 50 * 2) / 3 * 2, + MwNy, h - 50 - 125 + mh, + MwNwidth, (w - 50 * 2) / 3, + NULL); +} + +int main() { + MwMenu m, m2; + + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 400, 400, + MwNtitle, "hello world", + NULL); + menu = MwCreateWidget(MwMenuClass, "menu", window, 0, 0, 0, 0); + button = MwVaCreateWidget(MwButtonClass, "button", window, 50, 50, 100, 125, + MwNtext, "theme", + NULL); + button2 = MwVaCreateWidget(MwButtonClass, "button", window, 150, 50, 100, 125, + MwNtext, "look", + NULL); + button3 = MwVaCreateWidget(MwButtonClass, "button", window, 250, 50, 100, 125, + MwNtext, "font", + NULL); + button4 = MwVaCreateWidget(MwButtonClass, "button", window, 50, 225, 100, 125, + MwNtext, "lorem ipsum", + MwNbackground, "#f66", + MwNforeground, "#000", + NULL); + button5 = MwVaCreateWidget(MwButtonClass, "button", window, 150, 225, 100, 125, + MwNtext, "lorem ipsum", + MwNbackground, "#6f6", + MwNforeground, "#000", + NULL); + button6 = MwVaCreateWidget(MwButtonClass, "button", window, 250, 225, 100, 125, + MwNtext, "lorem ipsum", + MwNbackground, "#66f", + MwNforeground, "#000", + NULL); + button7 = MwVaCreateWidget(MwButtonClass, "button", window, 250, 50, 100, 125, + MwNtext, "disabled", + MwNdisabled, 1, + NULL); + + MwAddUserHandler(window, MwNresizeHandler, resize, NULL); + MwAddUserHandler(button, MwNactivateHandler, handler_theme, NULL); + MwAddUserHandler(button2, MwNactivateHandler, handler_look, NULL); + MwAddUserHandler(button3, MwNactivateHandler, handler_font, NULL); + MwAddUserHandler(button4, MwNactivateHandler, handler, NULL); + MwAddUserHandler(button5, MwNactivateHandler, handler, NULL); + MwAddUserHandler(button6, MwNactivateHandler, handler, NULL); + + resize(window, NULL, NULL); + + m = MwMenuAdd(menu, NULL, "test 1"); + m2 = MwMenuAdd(menu, m, "test 2"); + MwMenuAdd(menu, m2, "test 3"); + MwMenuAdd(menu, m2, "test 4"); + MwMenuAdd(menu, m2, "test 5"); + m2 = MwMenuAdd(menu, m, "test 6"); + MwMenuAdd(menu, m2, "test 7"); + MwMenuAdd(menu, m2, "test 8"); + m2 = MwMenuAdd(menu, m, "test 9"); + MwMenuAdd(menu, m2, "test 10"); + m2 = MwMenuAdd(menu, m2, "test 11"); + MwMenuAdd(menu, m2, "test 12"); + MwMenuAdd(menu, m2, "test 13"); + MwMenuAdd(menu, NULL, "?test 14"); + + MwLoop(window); +} diff --git a/widget/milsko/milskosrc/examples/basic/filechooser.c b/widget/milsko/milskosrc/examples/basic/filechooser.c new file mode 100644 index 0000000000..2637f86f8b --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/filechooser.c @@ -0,0 +1,70 @@ +#include + +MwWidget fpicker; +MwWidget window; +MwWidget button; +MwWidget mb; + +MwBool fpicker_wait = MwFALSE; +MwBool msgbox_wait = MwFALSE; + +void MWAPI ok(MwWidget handle, void* user, void* call) { + (void)handle; + (void)call; + msgbox_wait = MwFALSE; +} + +void MWAPI file_callback(MwWidget handle, void* user_data, void* call_data) { + mb = MwMessageBox(handle, call_data, "File chosen", MwMB_ICONERROR | MwMB_BUTTONOK); + + (void)user_data; + + MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb); + MwAddUserHandler(mb, MwNcloseHandler, ok, mb); + + msgbox_wait = MwTRUE; + + while(msgbox_wait) { + MwStep(mb); + } + + fpicker_wait = MwFALSE; +} + +void MWAPI file_picker(MwWidget handle, void* user_data, void* call_data) { + fpicker = MwFileChooserEx(handle, "file chooser", 0); + + (void)handle; + (void)user_data; + (void)call_data; + + MwAddUserHandler(fpicker, MwNfileChosenHandler, file_callback, NULL); + + MwSetText(fpicker, MwNbackground, MwGetInteger(fpicker, MwNdarkTheme) ? MwDefaultDarkBackground : MwDefaultBackground); + + fpicker_wait = MwTRUE; + + while(fpicker_wait) { + MwStep(fpicker); + } + + MwDestroyWidget(fpicker); + MwDestroyWidget(mb); +} + +int main() { + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, + MwDEFAULT, 640, 480, MwNtitle, "color picker", NULL); + MwSetText(window, MwNbackground, MwGetInteger(window, MwNdarkTheme) ? MwDefaultBackground : MwDefaultDarkBackground); + + button = MwVaCreateWidget(MwButtonClass, "button", window, 160, 180, 320, 120, + MwNtext, "select file", + NULL); + MwSetText(button, MwNbackground, MwGetInteger(window, MwNdarkTheme) ? MwDefaultBackground : MwDefaultDarkBackground); + + MwAddUserHandler(button, MwNactivateHandler, file_picker, NULL); + + MwLoop(window); +} diff --git a/widget/milsko/milskosrc/examples/basic/image.c b/widget/milsko/milskosrc/examples/basic/image.c new file mode 100644 index 0000000000..7d7f55a2de --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/image.c @@ -0,0 +1,42 @@ +#include + +int main() { + MwWidget window, image, image2, image3; + MwLLPixmap px, px2, px3; + + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "window", NULL, MwDEFAULT, MwDEFAULT, 500, 500, + MwNtitle, "image image", + NULL); + image = MwCreateWidget(MwImageClass, "image", window, 50, 50, 200, 400); + image2 = MwCreateWidget(MwImageClass, "image", window, 250, 50, 200, 200); + image3 = MwCreateWidget(MwImageClass, "image", window, 250, 250, 200, 200); + px = MwLoadImage(window, "examples/picture.png"); + px2 = MwLoadImage(window, "examples/picture.jpg"); + px3 = MwLoadImage(window, "resource/logo/logo.png"); + + if(px == NULL) px = MwLoadImage(window, "../examples/picture.png"); + if(px2 == NULL) px2 = MwLoadImage(window, "../examples/picture.jpg"); + if(px3 == NULL) px3 = MwLoadImage(window, "../resource/logo/logo.png"); + + if(px == NULL) px = MwLoadImage(window, "picture.png"); + if(px2 == NULL) px2 = MwLoadImage(window, "picture.jpg"); + if(px3 == NULL) px3 = MwLoadImage(window, "logo.png"); + + MwVaApply(window, + MwNiconPixmap, px, + NULL); + + MwVaApply(image, + MwNpixmap, px, + NULL); + MwVaApply(image2, + MwNpixmap, px2, + NULL); + MwVaApply(image3, + MwNpixmap, px3, + NULL); + + MwLoop(window); +} diff --git a/widget/milsko/milskosrc/examples/basic/listbox.c b/widget/milsko/milskosrc/examples/basic/listbox.c new file mode 100644 index 0000000000..0ec9fe7cd4 --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/listbox.c @@ -0,0 +1,61 @@ +#include + +#include "../harvard.c" + +MwWidget w_main; + +void MWAPI destroy(MwWidget handle, void* user, void* call) { + (void)handle; + (void)call; + MwDestroyWidget(user); +} + +void MWAPI activate(MwWidget handle, void* user, void* call) { + char msg[256]; + MwWidget msgbox; + + (void)user; + + MwStringPrintIntoBuffer(msg, 256, "You pressed: %s", MwListBoxGet(handle, *(int*)call)); + + msgbox = MwMessageBox(w_main, msg, "wow", MwMB_ICONINFO | MwMB_BUTTONOK); + MwAddUserHandler(MwMessageBoxGetChild(msgbox, MwMB_BUTTONOK), MwNactivateHandler, destroy, msgbox); +} + +int main() { + MwWidget lb; + int len = sizeof(harvard) / sizeof(harvard[0]) - 1; + int i; + int index; + MwLLPixmap px; + + MwLibraryInit(); + + w_main = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 640, 480, + MwNtitle, "listbox", + NULL); + lb = MwCreateWidget(MwListBoxClass, "listbox", w_main, 5, 5, 630, 470); + + px = MwLoadIcon(lb, MwIconInfo); + + MwSetInteger(lb, MwNleftPadding, 20); + + index = MwListBoxSet(lb, -1, 0, "Harvard sentence"); + MwListBoxSet(lb, index, -1, "Length"); + + for(i = 0; i < len; i++) { + char sz[16]; + MwStringPrintIntoBuffer(sz, 16, "%d", (int)strlen(harvard[i])); + index = MwListBoxSet(lb, -1, 0, harvard[i]); + MwListBoxSet(lb, index, -1, sz); + MwListBoxSetIcon(lb, index, px); + } + + MwAddUserHandler(lb, MwNlistBoxActivateHandler, activate, NULL); + MwVaApply(lb, + MwNhasHeading, 1, + NULL); + MwListBoxSetWidth(lb, 0, -128); + + MwLoop(w_main); +} diff --git a/widget/milsko/milskosrc/examples/basic/messagebox.c b/widget/milsko/milskosrc/examples/basic/messagebox.c new file mode 100644 index 0000000000..8c617d7b0a --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/messagebox.c @@ -0,0 +1,57 @@ +#include + +void MWAPI ok(MwWidget handle, void* user, void* call) { + (void)handle; + (void)call; + MwDestroyWidget(user); +} + +void MWAPI spawn(MwWidget handle, void* user, void* call) { + MwWidget mb = MwMessageBox(user, "news has arrived!", "title", MwMB_ICONNEWS | MwMB_BUTTONOK); + + (void)handle; + (void)call; + + MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb); + MwAddUserHandler(mb, MwNcloseHandler, ok, mb); +} + +void MWAPI spawn2(MwWidget handle, void* user, void* call) { + MwWidget mb = MwMessageBox(user, "something went wrong!", "title", MwMB_ICONERROR | MwMB_BUTTONOK); + + (void)handle; + (void)call; + + MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb); + MwAddUserHandler(mb, MwNcloseHandler, ok, mb); +} + +void MWAPI spawn3(MwWidget handle, void* user, void* call) { + int i; + + (void)handle; + (void)call; + + for(i = 0; i <= MwMB_ICONCLOCK; i++) { + MwWidget mb = MwMessageBox(user, "messagebox test", "title", i | MwMB_BUTTONOK); + MwAddUserHandler(MwMessageBoxGetChild(mb, MwMB_BUTTONOK), MwNactivateHandler, ok, mb); + MwAddUserHandler(mb, MwNcloseHandler, ok, mb); + } +} + +int main() { + MwWidget msg, btn, btn2, btn3; + + MwLibraryInit(); + + msg = MwVaCreateWidget(MwWindowClass, "test", NULL, MwDEFAULT, MwDEFAULT, 300, 100, MwNtitle, "test", NULL); + btn = MwVaCreateWidget(MwButtonClass, "button", msg, 8, 8, 300 - 16, (100 - 16) / 2, MwNtext, "press me!", NULL); + btn2 = MwVaCreateWidget(MwButtonClass, "button", msg, 8, 8 + (100 - 16) / 2, (300 - 16) / 2, (100 - 16) / 2, MwNtext, "press me!", NULL); + btn3 = MwVaCreateWidget(MwButtonClass, "button", msg, 8 + (300 - 16) / 2, 8 + (100 - 16) / 2, (300 - 16) / 2, (100 - 16) / 2, MwNtext, "press me!", NULL); + + MwAddUserHandler(btn, MwNactivateHandler, spawn, msg); + MwAddUserHandler(btn2, MwNactivateHandler, spawn2, msg); + MwAddUserHandler(btn3, MwNactivateHandler, spawn3, msg); + + MwLoop(msg); +} diff --git a/widget/milsko/milskosrc/examples/basic/periodic.c b/widget/milsko/milskosrc/examples/basic/periodic.c new file mode 100644 index 0000000000..92dab70a35 --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/periodic.c @@ -0,0 +1,326 @@ +#include + +#include + +#define Columns 5 +#define Padding 20 +#define PaddingContent 2 + +MwWidget window, menu, table; +MwMenu e; + +static void MWAPI resize(MwWidget handle, void* user, void* call) { + int w = MwGetInteger(window, MwNwidth); + int h = MwGetInteger(window, MwNheight); + + MwVaApply(table, + MwNx, Padding, + MwNy, MwGetInteger(menu, MwNheight) + Padding, + MwNwidth, w - Padding * 2, + MwNheight, h - MwGetInteger(menu, MwNheight) - Padding * 2, + NULL); +} + +static void MWAPI resize_content(MwWidget handle, void* user, void* call) { + MwWidget* ws = MwGetChildren(handle); + if(ws != NULL) { + int pw = MwGetInteger(ws[0], "IpWidth"); + int ph = MwGetInteger(ws[0], "IpHeight"); + + if(pw < 0) { + pw += MwGetInteger(handle, MwNwidth); + } else if(pw == 0) { + pw = MwGetInteger(handle, MwNwidth); + } + + if(ph < 0) { + ph += MwGetInteger(handle, MwNheight); + } else if(ph == 0) { + ph = MwGetInteger(handle, MwNheight); + } + + MwVaApply(ws[0], + MwNx, (MwGetInteger(handle, MwNwidth) - pw) / 2, + MwNy, (MwGetInteger(handle, MwNheight) - ph) / 2, + MwNwidth, pw, + MwNheight, ph, + NULL); + + free(ws); + } +} + +static void MWAPI resize_frame(MwWidget handle, void* user, void* call) { + MwWidget* ws = MwGetChildren(handle); + if(ws != NULL) { + int w = MwGetInteger(handle, MwNwidth); + int h = MwGetInteger(handle, MwNheight); + + if(ws[0] != NULL) { + MwVaApply(ws[0], + MwNx, MwDefaultBorderWidth(handle) + PaddingContent, + MwNy, MwDefaultBorderWidth(handle) + PaddingContent, + MwNwidth, w - (MwDefaultBorderWidth(handle) + PaddingContent) * 2, + MwNheight, h - (MwDefaultBorderWidth(handle) + PaddingContent) * 2, + NULL); + } + free(ws); + } +} + +static MwWidget frame(const char* name, int width, int height, MwClass cl, ...) { + MwWidget f = MwVaCreateWidget(MwFrameClass, "frame", table, 0, 0, 0, 0, + MwNhasBorder, 1, + MwNinverted, 1, + NULL); + MwWidget table = MwVaCreateWidget(MwBoxClass, "table", f, 0, 0, 0, 0, + MwNorientation, MwVERTICAL, + NULL); + MwWidget label = MwVaCreateWidget(MwLabelClass, "label", table, 0, 0, 0, 0, + MwNtext, name, + MwNalignment, MwALIGNMENT_BEGINNING, + MwNfixedSize, 20, + NULL); + va_list va; + + if(cl != NULL) { + MwWidget frame = MwCreateWidget(MwFrameClass, "frame", table, 0, 0, 0, 0); + MwWidget w; + + va_start(va, cl); + w = MwVaListCreateWidget(cl, "widget", frame, 0, 0, 0, 0, va); + va_end(va); + + MwVaApply(w, + "IpWidth", width, + "IpHeight", height, + NULL); + + MwAddUserHandler(frame, MwNresizeHandler, resize_content, NULL); + + MwVaApply(f, + "VhandledWidget", w, + MwNcolumnSpan, MwGetInteger(w, MwNcolumnSpan), + MwNrowSpan, MwGetInteger(w, MwNrowSpan), + NULL); + } + + MwAddUserHandler(f, MwNresizeHandler, resize_frame, NULL); + + resize_frame(f, NULL, NULL); + + return f; +} + +static MwWidget child(MwWidget w) { + return MwGetVoid(w, "VhandledWidget"); +} + +static void MWAPI menu_handler(MwWidget handle, void* user, void* call) { + if(call == e) MwDestroyWidget(window); +} + +int main() { + int i, j; + MwWidget f, w, b; + MwLLPixmap px; + int index; + MwMenu m, m2; + void* v; + MwRect rc; + + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "window", NULL, MwDEFAULT, MwDEFAULT, 800, 800, + MwNtitle, "Milsko Periodic Table", + NULL); + + MwGetScreenSize(window, &rc); + if(rc.height < 800) { + MwVaApply(window, + MwNx, (rc.width - (rc.height - 64)) / 2, + MwNy, (rc.height - (rc.height - 64)) / 2, + MwNwidth, rc.height - 64, + MwNheight, rc.height - 64, + NULL); + } + + px = MwLoadIcon(window, MwIconError); + + menu = MwCreateWidget(MwMenuClass, "menu", window, 0, 0, 0, 0); + + m = MwMenuAdd(menu, NULL, "File"); + MwMenuAdd(menu, m, "New"); + MwMenuAdd(menu, m, "Open"); + MwMenuAdd(menu, m, "Save"); + MwMenuAdd(menu, m, "Save As"); + MwMenuAdd(menu, m, "Print"); + e = MwMenuAdd(menu, m, "Exit"); + + m = MwMenuAdd(menu, NULL, "Edit"); + MwMenuAdd(menu, m, "Undo"); + MwMenuAdd(menu, m, "----"); + MwMenuAdd(menu, m, "Cut"); + MwMenuAdd(menu, m, "Copy"); + MwMenuAdd(menu, m, "Paste"); + MwMenuAdd(menu, m, "----"); + MwMenuAdd(menu, m, "Clear"); + MwMenuAdd(menu, m, "Delete"); + + m = MwMenuAdd(menu, NULL, "View"); + MwMenuAdd(menu, m, "Stack"); + MwMenuAdd(menu, m, "Tile"); + MwMenuAdd(menu, m, "----"); + MwMenuAdd(menu, m, "Day"); + MwMenuAdd(menu, m, "Week"); + MwMenuAdd(menu, m, "Month"); + MwMenuAdd(menu, m, "Year"); + + m = MwMenuAdd(menu, NULL, "Options"); + m2 = MwMenuAdd(menu, m, "Font"); + MwMenuAdd(menu, m2, "Small"); + MwMenuAdd(menu, m2, "Medium"); + MwMenuAdd(menu, m2, "Large"); + m2 = MwMenuAdd(menu, m, "Direction"); + MwMenuAdd(menu, m2, "Up"); + MwMenuAdd(menu, m2, "Down"); + MwMenuAdd(menu, m2, "Left"); + MwMenuAdd(menu, m2, "Right"); + MwMenuAdd(menu, m, "Case Sensitive"); + MwMenuAdd(menu, m, "Word Wrap"); + + m = MwMenuAdd(menu, NULL, "?Help"); + MwMenuAdd(menu, m, "On Context"); + MwMenuAdd(menu, m, "On Window"); + MwMenuAdd(menu, m, "Tutorial"); + MwMenuAdd(menu, m, "On Version"); + + MwAddUserHandler(menu, MwNmenuHandler, menu_handler, NULL); + + table = MwVaCreateWidget(MwTableClass, "table", window, 0, 0, 0, 0, + MwNwaitLayout, 1, + MwNcolumns, 5, + NULL); + + f = frame("Button", -PaddingContent, -PaddingContent, MwBoxClass, + MwNorientation, MwVERTICAL, + NULL); + b = MwVaCreateWidget(MwButtonClass, "btn", child(f), 0, 0, 0, 0, + MwNtext, "Press me", + NULL); + b = MwVaCreateWidget(MwButtonClass, "btn_disabled", child(f), 0, 0, 0, 0, + MwNtext, "Cannot press me", + MwNdisabled, 1, + NULL); + + MwVaCreateWidget(MwLabelClass, "label", table, 0, 0, 0, 0, + MwNbold, 1, + MwNtext, "The Periodic Table of Milsko Widgets", + MwNcolumnSpan, Columns - 2, + NULL); + + for(i = 0; i < 2; i++) { + f = frame(i == 0 ? "CheckBox" : "RadioBox", -PaddingContent, -PaddingContent, MwBoxClass, + MwNmargin, PaddingContent, + NULL); + w = child(f); + b = MwVaCreateWidget(MwBoxClass, "table1", w, 0, 0, 0, 0, + MwNorientation, MwVERTICAL, + MwNfixedSize, 16, + NULL); + for(j = 0; j < 6; j++) MwVaCreateWidget(i == 0 ? MwCheckBoxClass : MwRadioBoxClass, i == 0 ? "cb" : "rb", b, 0, 0, 0, 0, MwNdisabled, (j == 5) ? 1 : 0, NULL); + b = MwVaCreateWidget(MwBoxClass, "table1", w, 0, 0, 0, 0, + MwNorientation, MwVERTICAL, + NULL); + for(j = 0; j < 6; j++) { + char buf[32]; + sprintf(buf, "%sBox %d", i == 0 ? "Check" : "Radio", j + 1); + MwVaCreateWidget(MwLabelClass, "label", b, 0, 0, 0, 0, + MwNtext, buf, + MwNalignment, MwALIGNMENT_BEGINNING, + NULL); + } + } + + f = frame("Calendar", -PaddingContent, -PaddingContent, MwCalendarClass, + MwNscale, 1, + NULL); + + f = frame("ComboBox", -PaddingContent, 24, MwComboBoxClass, NULL); + w = child(f); + MwComboBoxAdd(w, -1, "Hello!"); + + f = frame("Entry", -PaddingContent, 24, MwEntryClass, NULL); + + f = frame("Image", -PaddingContent, -PaddingContent, MwImageClass, + MwNpixmap, px, + NULL); + + f = frame("Label", -PaddingContent, -PaddingContent, MwLabelClass, + MwNtext, "Epic text\nNewline can be used too!", + NULL); + + f = frame("ListBox", -PaddingContent, -PaddingContent, MwListBoxClass, + MwNhasHeading, 1, + NULL); + w = child(f); + index = MwListBoxSet(w, -1, 0, "Epic title..."); + index = MwListBoxSet(w, -1, 0, "Hello"); + + f = frame("NumberEntry", -PaddingContent, 24, MwNumberEntryClass, NULL); + + f = frame("ProgressBar", -PaddingContent, 24, MwProgressBarClass, + MwNvalue, 25, + NULL); + + f = frame("ScrollBar", -PaddingContent, 16, MwScrollBarClass, + MwNorientation, MwHORIZONTAL, + NULL); + + f = frame("Separator", -PaddingContent, -PaddingContent, MwSeparatorClass, NULL); + + f = frame("SubWindow", -PaddingContent, -PaddingContent, MwViewportClass, + MwNcolumnSpan, 2, + NULL); + w = child(f); + MwViewportSetSize(w, 512, 512); + MwVaCreateWidget(MwSubWindowClass, "swnd", MwViewportGetViewport(w), 32, 32, 256, 128, + MwNtitle, "Sub window", + NULL); + MwVaCreateWidget(MwSubWindowClass, "swnd", MwViewportGetViewport(w), 64, 64, 256, 128, + MwNtitle, "Sub window 2", + NULL); + + f = frame("Tab", -PaddingContent, -PaddingContent, MwTabClass, + MwNcolumnSpan, 2, + NULL); + w = child(f); + MwSetText(MwTabAdd(w, "ABC"), MwNbackground, "#f00"); + MwSetText(MwTabAdd(w, "DEF"), MwNbackground, "#0f0"); + MwSetText(MwTabAdd(w, "GHI"), MwNbackground, "#00f"); + + f = frame("TreeView", -PaddingContent, -PaddingContent, MwTreeViewClass, NULL); + w = child(f); + v = MwTreeViewAdd(w, NULL, NULL, "abc"); + v = MwTreeViewAdd(w, v, NULL, "def"); + v = MwTreeViewAdd(w, v, NULL, "ghi"); + + f = frame("Viewport", -PaddingContent, -PaddingContent, MwViewportClass, NULL); + w = child(f); + MwViewportSetSize(w, 256, 256); + MwVaCreateWidget(MwButtonClass, "btn", MwViewportGetViewport(w), 64, 64, 128, 128, + MwNtext, "Thing", + NULL); + + MwAddUserHandler(window, MwNresizeHandler, resize, NULL); + + resize(window, NULL, NULL); + + MwVaApply(table, + MwNwaitLayout, 0, + NULL); + + MwLoop(window); + + MwLLDestroyPixmap(px); +} diff --git a/widget/milsko/milskosrc/examples/basic/progressbar.c b/widget/milsko/milskosrc/examples/basic/progressbar.c new file mode 100644 index 0000000000..4048a6e781 --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/progressbar.c @@ -0,0 +1,18 @@ +#include + +int main() { + MwWidget w, p; + + MwLibraryInit(); + + w = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 5 + 640 + 5, 5 + 32 + 5, + MwNtitle, "progress bar", + NULL); + p = MwVaCreateWidget(MwProgressBarClass, "progress", w, 5, 5, 640, 32, + MwNvalue, 25, + NULL); + + (void)p; + + MwLoop(w); +} diff --git a/widget/milsko/milskosrc/examples/basic/radiobox.c b/widget/milsko/milskosrc/examples/basic/radiobox.c new file mode 100644 index 0000000000..168f10138c --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/radiobox.c @@ -0,0 +1,28 @@ +#include + +int main() { + MwWidget window; + + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "test", NULL, MwDEFAULT, MwDEFAULT, 8 + 16 + 8 + 16 * 10 + 8, 8 + 16 + 8 + 16 + 8, + MwNtitle, "radiobox", + NULL); + + MwVaCreateWidget(MwRadioBoxClass, "cb1", window, 8, 8, 16, 16, + NULL); + MwVaCreateWidget(MwRadioBoxClass, "cb2", window, 8, 8 + 16 + 8, 16, 16, + MwNchecked, 1, + NULL); + + MwVaCreateWidget(MwLabelClass, "lab1", window, 8 + 16 + 8, 8, 16 * 10, 16, + MwNtext, "lorem ipsum 1", + MwNalignment, MwALIGNMENT_BEGINNING, + NULL); + MwVaCreateWidget(MwLabelClass, "lab2", window, 8 + 16 + 8, 8 + 16 + 8, 16 * 10, 16, + MwNtext, "lorem ipsum 2", + MwNalignment, MwALIGNMENT_BEGINNING, + NULL); + + MwLoop(window); +} diff --git a/widget/milsko/milskosrc/examples/basic/rotate.c b/widget/milsko/milskosrc/examples/basic/rotate.c new file mode 100644 index 0000000000..dbf9c5e154 --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/rotate.c @@ -0,0 +1,95 @@ +/* this demo does not work well on windows */ +#include + +#include + +#ifndef M_PI +#define M_PI 3.14159265 +#endif + +#define SIZE 100 + +MwWidget buttons[6]; +double deg = 0; + +int ww, wh; + +void MWAPI handler(MwWidget w, void* user, void* client) { + int i; + double cdeg = deg; + + (void)w; + (void)user; + (void)client; + + for(i = 0; i < (int)(sizeof(buttons) / sizeof(buttons[0])); i++) { + double rad = cdeg / 180 * M_PI; + int x = ww / 2; + int y = wh / 2; + + x += cos(rad) * (ww / 2 - SIZE / 2); + y += sin(rad) * (wh / 2 - SIZE / 2); + + x -= SIZE / 2; + y -= SIZE / 2; + + MwVaApply(buttons[i], + MwNx, x, + MwNy, y, + NULL); + + cdeg += 360 / (sizeof(buttons) / sizeof(buttons[0])); + } + + deg += 120.0 / (1000.0 / MwWaitMS); +} + +void MWAPI resize(MwWidget w, void* user, void* client) { + (void)w; + (void)user; + (void)client; + + ww = MwGetInteger(w, MwNwidth); + wh = MwGetInteger(w, MwNheight); +} + +int main() { + MwWidget window; + int i; + + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "window", NULL, MwDEFAULT, MwDEFAULT, (ww = 500), (wh = 500), + MwNtitle, "rotate", + NULL); + + for(i = 0; i < (int)(sizeof(buttons) / sizeof(buttons[0])); i++) { + const char* color = ""; + char fgcolor[5]; + int j; + + if(i == 0) color = "#f66"; + if(i == 1) color = "#6f6"; + if(i == 2) color = "#ff6"; + if(i == 3) color = "#66f"; + if(i == 4) color = "#f6f"; + if(i == 5) color = "#6ff"; + + fgcolor[0] = '#'; + fgcolor[4] = 0; + for(j = 0; j < 3; j++) { + fgcolor[j + 1] = color[j + 1] == 'f' ? '6' : 'f'; + } + + buttons[i] = MwVaCreateWidget(MwButtonClass, "button", window, 0, 0, SIZE, SIZE, + MwNbackground, color, + MwNforeground, fgcolor, + MwNtext, "fancy", + NULL); + } + + MwAddUserHandler(window, MwNtickHandler, handler, NULL); + MwAddUserHandler(window, MwNresizeHandler, resize, NULL); + + MwLoop(window); +} diff --git a/widget/milsko/milskosrc/examples/basic/scrollbar.c b/widget/milsko/milskosrc/examples/basic/scrollbar.c new file mode 100644 index 0000000000..dbaae9a01f --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/scrollbar.c @@ -0,0 +1,20 @@ +#include + +int main() { + MwWidget window; + int i; + + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 500, 500, + MwNtitle, "main", + NULL); + + for(i = 0; i < 500 / 16; i++) { + MwVaCreateWidget(MwScrollBarClass, "scroll", window, 16 * i, 0, 16, 500, + MwNorientation, MwVERTICAL, + NULL); + } + + MwLoop(window); +} diff --git a/widget/milsko/milskosrc/examples/basic/sevensegment.c b/widget/milsko/milskosrc/examples/basic/sevensegment.c new file mode 100644 index 0000000000..08149a9fd2 --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/sevensegment.c @@ -0,0 +1,23 @@ +#include + +int main() { + MwWidget wnd, label; + int W = 480, H = 40; + + MwLibraryInit(); + + wnd = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, W, H, + MwNtitle, "seven segment", + NULL); + + label = MwVaCreateWidget(MwLabelClass, "label", wnd, 0, 0, W, H, + MwNtext, " 123456:78.90 abcdef", + MwNsevenSegment, 1, + MwNalignment, MwALIGNMENT_BEGINNING, + MwNlength, 8, + NULL); + + MwLabelSetSevenSegment(label, 0, (1 << 0) | (1 << 3) | (1 << 6)); + + MwLoop(wnd); +} diff --git a/widget/milsko/milskosrc/examples/basic/subwindow.c b/widget/milsko/milskosrc/examples/basic/subwindow.c new file mode 100644 index 0000000000..93145923d6 --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/subwindow.c @@ -0,0 +1,52 @@ +#include + +#define Shift 16 + +static void MWAPI resize(MwWidget handle, void* user, void* client) { + MwWidget f = MwSubWindowGetFrame(handle); + MwVaApply(user, + MwNwidth, MwGetInteger(f, MwNwidth), + MwNheight, MwGetInteger(f, MwNheight), + NULL); +} + +int main() { + MwWidget w; + int i; + MwLLPixmap px[6]; + + MwLibraryInit(); + + w = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 800, 600, + MwNtitle, "subwindow", + NULL); + + px[0] = MwLoadIcon(w, MwIconClock); + px[1] = MwLoadIcon(w, MwIconError); + px[2] = MwLoadIcon(w, MwIconInfo); + px[3] = MwLoadIcon(w, MwIconNews); + px[4] = MwLoadIcon(w, MwIconNote); + px[5] = MwLoadIcon(w, MwIconWarning); + + for(i = 0; i < 16; i++) { + char buf[32]; + MwWidget sw, f, img; + + sprintf(buf, "Sub window %d", i); + + sw = MwVaCreateWidget(MwSubWindowClass, "swnd", w, i * Shift, i * Shift, 128, 128, + MwNtitle, buf, + MwNiconPixmap, px[rand() % 6], + NULL); + + f = MwSubWindowGetFrame(sw); + + img = MwVaCreateWidget(MwImageClass, "img", f, 0, 0, MwGetInteger(f, MwNwidth), MwGetInteger(f, MwNheight), + MwNpixmap, px[rand() % 6], + NULL); + + MwAddUserHandler(sw, MwNresizeHandler, resize, img); + } + + MwLoop(w); +} diff --git a/widget/milsko/milskosrc/examples/basic/tab.c b/widget/milsko/milskosrc/examples/basic/tab.c new file mode 100644 index 0000000000..8ae16c04de --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/tab.c @@ -0,0 +1,43 @@ +#include + +MwWidget tab; + +static void MWAPI resize(MwWidget handle, void* user, void* client) { + MwVaApply(tab, + MwNwidth, MwGetInteger(handle, MwNwidth), + MwNheight, MwGetInteger(handle, MwNheight), + NULL); +} + +int main() { + MwWidget w; + int i; + MwLLPixmap px[6]; + + MwLibraryInit(); + + w = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 800, 600, + MwNtitle, "subwindow", + NULL); + + tab = MwCreateWidget(MwTabClass, "tab", w, 0, 0, 800, 600); + + for(i = 0; i < 16; i++) { + char buf[32]; + MwWidget sw, f, img; + + sprintf(buf, "Tab %d", i); + + MwTabAdd(tab, buf); + } + + MwVaApply(MwTabGetFrame(tab, "Tab 1"), + MwNiconPixmap, MwLoadIcon(tab, MwIconWarning), + NULL); + + MwAddUserHandler(w, MwNresizeHandler, resize, NULL); + + resize(w, NULL, NULL); + + MwLoop(w); +} diff --git a/widget/milsko/milskosrc/examples/basic/treeview.c b/widget/milsko/milskosrc/examples/basic/treeview.c new file mode 100644 index 0000000000..273dd3e2a3 --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/treeview.c @@ -0,0 +1,50 @@ +#include + +MwWidget wmain; + +void MWAPI destroy(MwWidget handle, void* user, void* call) { + (void)handle; + (void)call; + MwDestroyWidget(user); +} + +void MWAPI activate(MwWidget handle, void* user, void* call) { + char msg[256]; + MwWidget msgbox; + + (void)user; + + MwStringPrintIntoBuffer(msg, 256, "You pressed: %s", MwTreeViewGet(handle, call)); + + msgbox = MwMessageBox(wmain, msg, "wow", MwMB_ICONINFO | MwMB_BUTTONOK); + MwAddUserHandler(MwMessageBoxGetChild(msgbox, MwMB_BUTTONOK), MwNactivateHandler, destroy, msgbox); +} + +int main() { + MwWidget tv; + MwLLPixmap px; + int i; + void * p = NULL, *r; + + MwLibraryInit(); + + wmain = MwCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 5 + 640 + 5, 5 + 480 + 5); + tv = MwCreateWidget(MwTreeViewClass, "tree", wmain, 5, 5, 640, 480); + + px = MwLoadIcon(tv, MwIconInfo); + + MwSetInteger(tv, MwNleftPadding, 16); + + MwAddUserHandler(tv, MwNactivateHandler, activate, NULL); + + for(i = 0; i < 10; i++) { + void* old = p; + + MwTreeViewAdd(tv, old, px, "World"); + p = MwTreeViewAdd(tv, old, px, "Hello"); + if(i == 5) r = p; + MwTreeViewAdd(tv, old, px, "Goodbye"); + } + + MwLoop(wmain); +} diff --git a/widget/milsko/milskosrc/examples/basic/viewport.c b/widget/milsko/milskosrc/examples/basic/viewport.c new file mode 100644 index 0000000000..930488d9ee --- /dev/null +++ b/widget/milsko/milskosrc/examples/basic/viewport.c @@ -0,0 +1,42 @@ +#include + +MwWidget vp; + +static void MWAPI resize(MwWidget handle, void* user, void* call) { + int w = MwGetInteger(handle, MwNwidth); + int h = MwGetInteger(handle, MwNheight); + + (void)user; + (void)call; + + MwVaApply(vp, + MwNwidth, w - 10 - 100, + MwNheight, h - 10 - 100, + NULL); +} + +int main() { + MwWidget w; + MwLLPixmap px; + + MwLibraryInit(); + + w = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 640, 480, MwNtitle, "test", NULL); + + vp = MwCreateWidget(MwViewportClass, "vp", w, 5 + 50, 5 + 50, 640 - 10 - 100, 480 - 10 - 100); + + px = MwLoadImage(vp, "examples/picture.png"); + + if(px == NULL) px = MwLoadImage(vp, "../examples/picture.png"); + + if(px == NULL) px = MwLoadImage(vp, "picture.png"); + + MwVaCreateWidget(MwImageClass, "image", MwViewportGetViewport(vp), 0, 0, 1024, 1024, + MwNpixmap, px, + NULL); + MwViewportSetSize(vp, 1024, 1024); + + MwAddUserHandler(w, MwNresizeHandler, resize, NULL); + + MwLoop(w); +} diff --git a/widget/milsko/milskosrc/examples/gldemos/CMakeLists.txt b/widget/milsko/milskosrc/examples/gldemos/CMakeLists.txt new file mode 100644 index 0000000000..0a8fa78e69 --- /dev/null +++ b/widget/milsko/milskosrc/examples/gldemos/CMakeLists.txt @@ -0,0 +1,27 @@ +file( + GLOB + EXAMPLES_GL_SOURCES + *.c +) +find_package(OpenGL) + +foreach(PATH IN LISTS EXAMPLES_GL_SOURCES) + get_filename_component(TARGET ${PATH} NAME_WE) + if(${TARGET} STREQUAL "glutlayer") + continue() + endif() + add_executable(${TARGET} MACOSX_BUNDLE ${PATH}) + target_link_libraries( + ${TARGET} + PRIVATE + Mw + OpenGL::GL OpenGL::GLU + ) + if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") + target_link_libraries( + ${TARGET} + PRIVATE + m + ) + endif() +endforeach() diff --git a/widget/milsko/milskosrc/examples/gldemos/boing.c b/widget/milsko/milskosrc/examples/gldemos/boing.c new file mode 100644 index 0000000000..8682996d3c --- /dev/null +++ b/widget/milsko/milskosrc/examples/gldemos/boing.c @@ -0,0 +1,158 @@ +#define TITLE "boing" +#include "glutlayer.c" + +/* + * Bouncing ball demo. + * + * This program is in the public domain + * + * Brian Paul + */ + +#include +#include + +#define COS(X) cos((X) * 3.14159 / 180.0) +#define SIN(X) sin((X) * 3.14159 / 180.0) + +#define RED 1.0, 0.0, 0.0 +#define WHITE 1.0, 1.0, 1.0 +#define CYAN 0.0, 1.0, 1.0 + +GLuint Ball; +GLenum Mode; +GLfloat Zrot = 0.0, Zstep = 6.0; +GLfloat Xpos = 0.0, Ypos = 1.0; +GLfloat Xvel = 0.2, Yvel = 0.0; +GLfloat Xmin = -4.0, Xmax = 4.0; +GLfloat Ymin = -3.8, Ymax = 4.0; +GLfloat G = -0.1; + +static GLuint make_ball(void) { + GLuint list; + GLfloat a, b; + GLfloat da = 18.0, db = 18.0; + GLfloat radius = 1.0; + GLuint color; + GLfloat x, y, z; + + list = glGenLists(1); + + glNewList(list, GL_COMPILE); + + color = 0; + for(a = -90.0; a + da <= 90.0; a += da) { + + glBegin(GL_QUAD_STRIP); + for(b = 0.0; b <= 360.0; b += db) { + + if(color) { + glColor3f(RED); + } else { + glColor3f(WHITE); + } + + x = COS(b) * COS(a); + y = SIN(b) * COS(a); + z = SIN(a); + glVertex3f(x, y, z); + + x = radius * COS(b) * COS(a + da); + y = radius * SIN(b) * COS(a + da); + z = radius * SIN(a + da); + glVertex3f(x, y, z); + + color = 1 - color; + } + glEnd(); + } + + glEndList(); + + return list; +} + +static void reshape(int width, int height) { + glViewport(0, 0, (GLint)width, (GLint)height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(-6.0, 6.0, -6.0, 6.0, -6.0, 6.0); + glMatrixMode(GL_MODELVIEW); +} + +static void draw(void) { + GLint i; + + glClear(GL_COLOR_BUFFER_BIT); + + glColor3f(CYAN); + glBegin(GL_LINES); + for(i = -5; i <= 5; i++) { + glVertex2i(i, -5); + glVertex2i(i, 5); + } + for(i = -5; i <= 5; i++) { + glVertex2i(-5, i); + glVertex2i(5, i); + } + for(i = -5; i <= 5; i++) { + glVertex2i(i, -5); + glVertex2f(i * 1.15, -5.9); + } + glVertex2f(-5.3, -5.35); + glVertex2f(5.3, -5.35); + glVertex2f(-5.75, -5.9); + glVertex2f(5.75, -5.9); + glEnd(); + + glPushMatrix(); + glTranslatef(Xpos, Ypos, 0.0); + glScalef(2.0, 2.0, 2.0); + glRotatef(8.0, 0.0, 0.0, 1.0); + glRotatef(90.0, 1.0, 0.0, 0.0); + glRotatef(Zrot, 0.0, 0.0, 1.0); + + glCallList(Ball); + + glPopMatrix(); + + glFlush(); +} + +static void idle(void) { + static float vel0 = -100.0; + + Zrot += Zstep; + + Xpos += Xvel; + if(Xpos >= Xmax) { + Xpos = Xmax; + Xvel = -Xvel; + Zstep = -Zstep; + } + if(Xpos <= Xmin) { + Xpos = Xmin; + Xvel = -Xvel; + Zstep = -Zstep; + } + Ypos += Yvel; + Yvel += G; + if(Ypos < Ymin) { + Ypos = Ymin; + if(vel0 == -100.0) + vel0 = fabs(Yvel); + Yvel = vel0; + } +} + +static void init(void) { + Ball = make_ball(); + glCullFace(GL_BACK); + glEnable(GL_CULL_FACE); + glDisable(GL_DITHER); + glShadeModel(GL_FLAT); +} + +static void key(int k) { + (void)k; +} diff --git a/widget/milsko/milskosrc/examples/gldemos/clock.c b/widget/milsko/milskosrc/examples/gldemos/clock.c new file mode 100644 index 0000000000..9f683b507b --- /dev/null +++ b/widget/milsko/milskosrc/examples/gldemos/clock.c @@ -0,0 +1,169 @@ +#include +#include + +#include + +MwWidget window, opengl, ldate, ltime; +time_t last = 0; +struct tm* tm; +int br, bg, bb; +int fr, fg, fb; + +double deg2rad(double deg) { + return (360.0 - deg) / 180.0 * M_PI; +} + +void MWAPI tick(MwWidget handle, void* user, void* call) { + time_t t = time(NULL); + int i; + double rad; + int render = 0; + int w = MwGetInteger(opengl, MwNwidth); + int h = MwGetInteger(opengl, MwNheight); + + (void)handle; + (void)user; + (void)call; + + if(last != t) { + char* wday[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; + char* mon[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; + + char buf[512]; + tm = localtime(&t); + + MwStringPrintIntoBuffer(buf, 512, "%s %02d %s", mon[tm->tm_mon], tm->tm_mday, wday[tm->tm_wday]); + MwSetText(ldate, MwNtext, buf); + + MwStringPrintIntoBuffer(buf, 512, "%02d:%02d %s", tm->tm_hour % 12, tm->tm_min, tm->tm_hour >= 12 ? "PM" : "AM"); + MwSetText(ltime, MwNtext, buf); + + render = 1; + + last = t; + } + + MwOpenGLMakeCurrent(opengl); + + glClearColor(br / 255.0, bg / 255.0, bb / 255.0, 1); + glClear(GL_COLOR_BUFFER_BIT); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(-1, 1, -1, 1, 0, 100); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + glLineWidth(2); + for(i = 0; i < 12; i++) { + rad = deg2rad(30.0 * i); + glPointSize((i % 3) ? 2 : 5); + glBegin(GL_POINTS); + glColor3f(fr / 255.0, fg / 255.0, fb / 255.0); + glVertex2f(cos(rad) * 0.85, sin(rad) * 0.85); + glEnd(); + } + + rad = deg2rad((tm->tm_hour % 12) * 30 + (tm->tm_min / 2) - 90); + glBegin(GL_LINES); + glVertex2f(0, 0); + glVertex2f(cos(rad) * 0.3, sin(rad) * 0.3); + glEnd(); + + rad = deg2rad(tm->tm_min * 6 - 90); + glBegin(GL_LINES); + glVertex2f(0, 0); + glVertex2f(cos(rad) * 0.5, sin(rad) * 0.5); + glEnd(); + + if(render && w > 0 && h > 0) { + unsigned char* buffer = malloc(w * h * 4); + MwLLPixmap px; + int j; + + glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, buffer); + for(i = 0; i < h / 2; i++) { + for(j = 0; j < w * 4; j++) { + unsigned char b = buffer[i * w * 4 + j]; + + buffer[i * w * 4 + j] = buffer[(h - i - 1) * w * 4 + j]; + buffer[(h - i - 1) * w * 4 + j] = b; + } + } + + px = MwLoadRaw(window, buffer, w, h); + MwVaApply(window, + MwNiconPixmap, px, + NULL); + MwLLDestroyPixmap(px); + + free(buffer); + } + + MwOpenGLSwapBuffer(opengl); +} + +void MWAPI resize(MwWidget handle, void* user, void* call) { + int w = MwGetInteger(handle, MwNwidth); + int h = MwGetInteger(handle, MwNheight); + + (void)user; + (void)call; + + MwVaApply(opengl, + MwNwidth, w / 5 * 2, + MwNheight, h, + NULL); + + MwVaApply(ldate, + MwNx, w / 5 * 2, + MwNwidth, w - w / 5 * 2, + MwNheight, h / 2, + NULL); + + MwVaApply(ltime, + MwNx, w / 5 * 2, + MwNy, h / 2, + MwNwidth, w - w / 5 * 2, + MwNheight, h / 2, + NULL); + + glViewport(0, 0, w / 5 * 2, h); +} + +int main() { + MwLLColor bgcolor, fgcolor; + + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 250, 100, + MwNtitle, "clock", + NULL); + + bgcolor = MwParseColor(window, MwGetText(window, MwNbackground)); + MwColorGet(bgcolor, &br, &bg, &bb); + + fgcolor = MwParseColor(window, MwGetText(window, MwNforeground)); + MwColorGet(fgcolor, &fr, &fg, &fb); + + opengl = MwCreateWidget(MwOpenGLClass, "clock", window, 0, 0, 100, 100); + + ldate = MwVaCreateWidget(MwLabelClass, "date", window, 100, 0, 150, 50, + MwNbold, 1, + NULL); + ltime = MwVaCreateWidget(MwLabelClass, "time", window, 100, 50, 150, 50, + MwNbold, 1, + NULL); + + MwAddUserHandler(window, MwNtickHandler, tick, NULL); + MwAddUserHandler(window, MwNresizeHandler, resize, NULL); + + resize(window, NULL, NULL); + tick(window, NULL, NULL); + + MwLoop(window); + + MwLLFreeColor(fgcolor); + MwLLFreeColor(bgcolor); +} diff --git a/widget/milsko/milskosrc/examples/gldemos/cube.c b/widget/milsko/milskosrc/examples/gldemos/cube.c new file mode 100644 index 0000000000..de0b840786 --- /dev/null +++ b/widget/milsko/milskosrc/examples/gldemos/cube.c @@ -0,0 +1,93 @@ +#define TITLE "cube" +#include "glutlayer.c" + +#if defined(__APPLE__) +#include +#include +#else +#include +#include +#endif + +static double deg = 0; + +static void draw(void) { + int i; + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); + glRotatef(deg, 1, 0, 0); + glRotatef(deg, 0, 1, 0); + glRotatef(deg, 0, 0, 1); + + for(i = 0; i < 6; i++) { + if(i == 0) + glColor3f(1, 0, 0); + if(i == 1) + glColor3f(0, 1, 0); + if(i == 2) + glColor3f(1, 1, 0); + if(i == 3) + glColor3f(0, 0, 1); + if(i == 4) + glColor3f(1, 0, 1); + if(i == 5) + glColor3f(0, 1, 1); + + glBegin(GL_QUADS); + glNormal3f(0, 1, 0); + glVertex3f(-1, 1, -1); + glVertex3f(-1, 1, 1); + glVertex3f(1, 1, 1); + glVertex3f(1, 1, -1); + glEnd(); + + if(i < 3) + glRotatef(90, 0, 0, 1); + if(i == 3) + glRotatef(90, 1, 0, 0); + if(i == 4) + glRotatef(180, 0, 0, 1); + } + glPopMatrix(); +} + +static void idle(void) { + deg += 1.0; +} + +static void reshape(int width, int height) { + GLfloat lpos[4]; + + lpos[0] = 1; + lpos[1] = 1; + lpos[2] = 1; + lpos[3] = 0; + + glViewport(0, 0, width, height); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(60, (double)width / height, 1, 100); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + gluLookAt(2, 2, 2, 0, 0, 0, 0, 1, 0); + + glLightfv(GL_LIGHT0, GL_POSITION, lpos); +} + +static void init(void) { + glEnable(GL_DEPTH_TEST); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glEnable(GL_COLOR_MATERIAL); + glEnable(GL_CULL_FACE); + glEnable(GL_NORMALIZE); + + glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE); +} + +static void key(int k) { + (void)k; +} diff --git a/widget/milsko/milskosrc/examples/gldemos/gears.c b/widget/milsko/milskosrc/examples/gldemos/gears.c new file mode 100644 index 0000000000..5d06b067bf --- /dev/null +++ b/widget/milsko/milskosrc/examples/gldemos/gears.c @@ -0,0 +1,243 @@ +#define TITLE "gears" +#include "glutlayer.c" + +/* + * 3-D gear wheels. This program is in the public domain. + * + * Brian Paul + */ + +/* Conversion to GLUT by Mark J. Kilgard */ + +#include +#include + +#ifndef M_PI +#define M_PI 3.14159265 +#endif + +/** + + Draw a gear wheel. You'll probably want to call this function when + building a display list since we do a lot of trig here. + + Input: inner_radius - radius of hole at center + outer_radius - radius at center of teeth + width - width of gear + teeth - number of teeth + tooth_depth - depth of tooth + + **/ + +static void gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GLint teeth, GLfloat tooth_depth) { + GLint i; + GLfloat r0, r1, r2; + GLfloat angle, da; + GLfloat u, v, len; + + r0 = inner_radius; + r1 = outer_radius - tooth_depth / 2.0; + r2 = outer_radius + tooth_depth / 2.0; + + da = 2.0 * M_PI / teeth / 4.0; + + glShadeModel(GL_FLAT); + + glNormal3f(0.0, 0.0, 1.0); + + /* draw front face */ + glBegin(GL_QUAD_STRIP); + for(i = 0; i <= teeth; i++) { + angle = i * 2.0 * M_PI / teeth; + glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); + glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); + glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); + } + glEnd(); + + /* draw front sides of teeth */ + glBegin(GL_QUADS); + da = 2.0 * M_PI / teeth / 4.0; + for(i = 0; i < teeth; i++) { + angle = i * 2.0 * M_PI / teeth; + + glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); + glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); + glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5); + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); + } + glEnd(); + + glNormal3f(0.0, 0.0, -1.0); + + /* draw back face */ + glBegin(GL_QUAD_STRIP); + for(i = 0; i <= teeth; i++) { + angle = i * 2.0 * M_PI / teeth; + glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); + glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); + glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); + } + glEnd(); + + /* draw back sides of teeth */ + glBegin(GL_QUADS); + da = 2.0 * M_PI / teeth / 4.0; + for(i = 0; i < teeth; i++) { + angle = i * 2.0 * M_PI / teeth; + + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); + glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5); + glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); + glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); + } + glEnd(); + + /* draw outward faces of teeth */ + glBegin(GL_QUAD_STRIP); + for(i = 0; i < teeth; i++) { + angle = i * 2.0 * M_PI / teeth; + + glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5); + glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5); + u = r2 * cos(angle + da) - r1 * cos(angle); + v = r2 * sin(angle + da) - r1 * sin(angle); + len = sqrt(u * u + v * v); + u /= len; + v /= len; + glNormal3f(v, -u, 0.0); + glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5); + glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5); + glNormal3f(cos(angle), sin(angle), 0.0); + glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5); + glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5); + u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); + v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); + glNormal3f(v, -u, 0.0); + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5); + glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5); + glNormal3f(cos(angle), sin(angle), 0.0); + } + + glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5); + glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5); + + glEnd(); + + glShadeModel(GL_SMOOTH); + + /* draw inside radius cylinder */ + glBegin(GL_QUAD_STRIP); + for(i = 0; i <= teeth; i++) { + angle = i * 2.0 * M_PI / teeth; + + glNormal3f(-cos(angle), -sin(angle), 0.0); + glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5); + glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5); + } + glEnd(); +} + +static GLfloat view_rotx = 20.0, view_roty = 30.0, view_rotz = 0.0; +static GLint gear1, gear2, gear3; +static GLfloat angle = 0.0; + +static void draw(void) { + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); + glRotatef(view_rotx, 1.0, 0.0, 0.0); + glRotatef(view_roty, 0.0, 1.0, 0.0); + glRotatef(view_rotz, 0.0, 0.0, 1.0); + + glPushMatrix(); + glTranslatef(-3.0, -2.0, 0.0); + glRotatef(angle, 0.0, 0.0, 1.0); + glCallList(gear1); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(3.1, -2.0, 0.0); + glRotatef(-2.0 * angle - 9.0, 0.0, 0.0, 1.0); + glCallList(gear2); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(-3.1, 4.2, 0.0); + glRotatef(-2.0 * angle - 25.0, 0.0, 0.0, 1.0); + glCallList(gear3); + glPopMatrix(); + + glPopMatrix(); +} + +static void idle(void) { + angle += 2.0; +} + +/* new window size or exposure */ +static void reshape(int width, int height) { + GLfloat h = (GLfloat)height / (GLfloat)width; + + glViewport(0, 0, (GLint)width, (GLint)height); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0.0, 0.0, -40.0); +} + +static void init(void) { + static GLfloat pos[4] = + {5.0, 5.0, 10.0, 0.0}; + static GLfloat red[4] = + {0.8, 0.1, 0.0, 1.0}; + static GLfloat green[4] = + {0.0, 0.8, 0.2, 1.0}; + static GLfloat blue[4] = + {0.2, 0.2, 1.0, 1.0}; + + glLightfv(GL_LIGHT0, GL_POSITION, pos); + glEnable(GL_CULL_FACE); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glEnable(GL_DEPTH_TEST); + + /* make the gears */ + gear1 = glGenLists(1); + glNewList(gear1, GL_COMPILE); + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); + gear(1.0, 4.0, 1.0, 20, 0.7); + glEndList(); + + gear2 = glGenLists(1); + glNewList(gear2, GL_COMPILE); + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); + gear(0.5, 2.0, 2.0, 10, 0.7); + glEndList(); + + gear3 = glGenLists(1); + glNewList(gear3, GL_COMPILE); + glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); + gear(1.3, 2.0, 0.5, 10, 0.7); + glEndList(); + + glEnable(GL_NORMALIZE); +} + +static void key(int k) { + (void)k; + + if(k == MwKEY_LEFT) { + view_roty += 5.0; + } else if(k == MwKEY_RIGHT) { + view_roty -= 5.0; + } else if(k == MwKEY_UP) { + view_rotx += 5.0; + } else if(k == MwKEY_DOWN) { + view_rotx -= 5.0; + } +} diff --git a/widget/milsko/milskosrc/examples/gldemos/glutlayer.c b/widget/milsko/milskosrc/examples/gldemos/glutlayer.c new file mode 100644 index 0000000000..8746b94008 --- /dev/null +++ b/widget/milsko/milskosrc/examples/gldemos/glutlayer.c @@ -0,0 +1,73 @@ +#include +#include + +MwWidget opengl; + +static void draw(void); +static void idle(void); +static void reshape(int width, int height); +static void init(void); +static void key(int k); + +static void MWAPI tick(MwWidget handle, void* user, void* client) { + (void)handle; + (void)user; + (void)client; + + draw(); + idle(); + + MwOpenGLSwapBuffer(opengl); +} + +static void MWAPI resize(MwWidget handle, void* user, void* client) { + int ww, wh; + + (void)user; + (void)client; + + ww = MwGetInteger(handle, MwNwidth) - 100; + wh = MwGetInteger(handle, MwNheight) - 100; + + MwVaApply(opengl, + MwNwidth, ww, + MwNheight, wh, + NULL); + + reshape(ww, wh); +} + +static void MWAPI key_pressed(MwWidget handle, void* user, void* client) { + (void)handle; + (void)user; + + key(*(int*)client); +} + +int main() { + MwWidget window; + + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 500, 500, + MwNtitle, TITLE, + NULL); + opengl = MwCreateWidget(MwOpenGLClass, "opengl", window, 50, 50, 400, 400); + if(!opengl) { + MwMessageBox(NULL, "Unable to create OpenGL window.", "Error", MwMB_ICONERROR); + } else { + MwOpenGLMakeCurrent(opengl); + + init(); + reshape(400, 400); + + MwAddUserHandler(window, MwNresizeHandler, resize, NULL); + MwAddUserHandler(opengl, MwNtickHandler, tick, NULL); + + MwAddTickList(opengl); + + MwAddUserHandler(opengl, MwNkeyHandler, key_pressed, NULL); + } + + MwLoop(window); +} diff --git a/widget/milsko/milskosrc/examples/gldemos/triangle.c b/widget/milsko/milskosrc/examples/gldemos/triangle.c new file mode 100644 index 0000000000..702fca057d --- /dev/null +++ b/widget/milsko/milskosrc/examples/gldemos/triangle.c @@ -0,0 +1,88 @@ +#include +#include + +MwWidget window, opengl, button; +int ow, oh; +double deg = 0; +double dir = 1; + +void MWAPI resize(MwWidget handle, void* user_data, void* call_data) { + unsigned int w, h; + + (void)user_data; + (void)call_data; + + w = MwGetInteger(handle, MwNwidth); + h = MwGetInteger(handle, MwNheight); + + MwVaApply(opengl, + MwNwidth, (ow = w - 100), + MwNheight, (oh = h - 150), + NULL); + + MwVaApply(button, + MwNy, h - 50 - 50, + MwNwidth, ow, + MwNheight, 50, + NULL); +} + +void MWAPI tick(MwWidget handle, void* user_data, void* call_data) { + (void)handle; + (void)user_data; + (void)call_data; + + MwOpenGLMakeCurrent(opengl); + + glViewport(0, 0, ow, oh); + glClear(GL_COLOR_BUFFER_BIT); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(-1, 1, -1, 1, -1, 1); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + glPushMatrix(); + glRotatef(deg, 0, 0, 1); + glBegin(GL_TRIANGLES); + glColor3f(1, 0, 0); + glVertex2f(0, 0.8); + glColor3f(0, 1, 0); + glVertex2f(-0.8, -0.8); + glColor3f(0, 0, 1); + glVertex2f(0.8, -0.8); + glEnd(); + glPopMatrix(); + + MwOpenGLSwapBuffer(opengl); + + deg += 120.0 / (1000.0 / MwWaitMS) * dir; +} + +void MWAPI activate(MwWidget handle, void* user_data, void* call_data) { + (void)handle; + (void)user_data; + (void)call_data; + + dir = dir == 1 ? -1 : 1; +} + +int main() { + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 400, 450, + MwNtitle, "hello world", + NULL); + opengl = MwCreateWidget(MwOpenGLClass, "opengl", window, 50, 50, (ow = 300), (oh = 300)); + button = MwVaCreateWidget(MwButtonClass, "button", window, 50, 350, 300, 50, + MwNtext, "Reverse", + NULL); + + MwAddUserHandler(window, MwNresizeHandler, resize, NULL); + MwAddUserHandler(window, MwNtickHandler, tick, NULL); + MwAddUserHandler(button, MwNactivateHandler, activate, NULL); + + MwLoop(window); +} diff --git a/widget/milsko/milskosrc/examples/gldemos/tripaint.c b/widget/milsko/milskosrc/examples/gldemos/tripaint.c new file mode 100644 index 0000000000..11eaffd50b --- /dev/null +++ b/widget/milsko/milskosrc/examples/gldemos/tripaint.c @@ -0,0 +1,138 @@ +#include +#include + +#include + +MwWidget opengl; + +typedef struct triangle { + int points[3 * 2]; + double r; + double g; + double b; +} triangle_t; + +triangle_t* t = NULL; +int ct = 0; +int click = 0; +int mx, my; + +static void MWAPI tick(MwWidget handle, void* user, void* call) { + int i; + int w = MwGetInteger(opengl, MwNwidth); + int h = MwGetInteger(opengl, MwNheight); + + (void)handle; + (void)user; + (void)call; + + MwOpenGLMakeCurrent(opengl); + + glClear(GL_COLOR_BUFFER_BIT); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0, w, h, 0, -1, 1); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + for(i = 0; i < ct + (click == 2 ? 1 : 0); i++) { + int j; + glBegin(GL_TRIANGLES); + glColor3d(t[i].r, t[i].g, t[i].b); + for(j = 0; j < 3; j++) { + glVertex2d(t[i].points[j * 2 + 0], t[i].points[j * 2 + 1]); + } + glEnd(); + } + + MwOpenGLSwapBuffer(opengl); +} + +static void MWAPI mouse(MwWidget handle, void* user, void* call) { + MwMouse* mouse = call; + + (void)handle; + (void)user; + + if(mouse->button == MwMOUSE_LEFT) { + t[ct].points[click * 2 + 0] = mouse->point.x; + t[ct].points[click * 2 + 1] = mouse->point.y; + click++; + if(click == 1) { + t[ct].r = rand() % 65536; + t[ct].g = rand() % 65536; + t[ct].b = rand() % 65536; + + t[ct].r /= 65535; + t[ct].g /= 65535; + t[ct].b /= 65535; + } else if(click == 2) { + t[ct].points[2 * 2 + 0] = mx; + t[ct].points[2 * 2 + 1] = my; + } else if(click == 3) { + triangle_t* old = t; + int i; + + click = 0; + ct++; + + t = malloc(sizeof(*t) * (ct + 1)); + for(i = 0; i < ct; i++) t[i] = old[i]; + free(old); + } + } else if(mouse->button == MwMOUSE_RIGHT) { + if(click > 0) { + click = 0; + } else if(ct > 0) { + ct--; + } + } +} + +static void MWAPI mouse_move(MwWidget handle, void* user, void* call) { + MwPoint* point = call; + + (void)handle; + (void)user; + + mx = point->x; + my = point->y; + + if(click == 2) { + t[ct].points[2 * 2 + 0] = point->x; + t[ct].points[2 * 2 + 1] = point->y; + } +} + +int main() { + MwSizeHints hints; + MwWidget window, viewport; + + MwLibraryInit(); + + window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 640, 480, + MwNtitle, "tripaint", + NULL); + viewport = MwCreateWidget(MwViewportClass, "viewport", window, 5, 5, 630, 470 - 16 - 5); + + hints.min_width = hints.max_width = 640; + hints.min_height = hints.max_height = 480; + MwVaApply(window, MwNsizeHints, &hints, NULL); + + MwVaCreateWidget(MwLabelClass, "label", window, 5, 470 - 16 + 5, 630, 16, + MwNtext, "Press left click to draw triangle, right click to undo", + NULL); + + t = malloc(sizeof(*t)); + + opengl = MwCreateWidget(MwOpenGLClass, "opengl", viewport, 0, 0, 1024, 768); + + MwAddUserHandler(window, MwNtickHandler, tick, NULL); + MwAddUserHandler(opengl, MwNtickHandler, tick, NULL); + MwAddUserHandler(opengl, MwNmouseDownHandler, mouse, NULL); + MwAddUserHandler(opengl, MwNmouseMoveHandler, mouse_move, NULL); + + MwLoop(window); +} diff --git a/widget/milsko/milskosrc/examples/harvard.c b/widget/milsko/milskosrc/examples/harvard.c new file mode 100644 index 0000000000..af5da28dae --- /dev/null +++ b/widget/milsko/milskosrc/examples/harvard.c @@ -0,0 +1,722 @@ +const char* harvard[] = { + "The birch canoe slid on the smooth planks. ", + "Glue the sheet to the dark blue background.", + "It's easy to tell the depth of a well. ", + "These days a chicken leg is a rare dish. ", + "Rice is often served in round bowls.", + "The juice of lemons makes fine punch. ", + "The box was thrown beside the parked truck. ", + "The hogs were fed chopped corn and garbage. ", + "Four hours of steady work faced us. ", + "A large size in stockings is hard to sell. ", + "The boy was there when the sun rose.", + "A rod is used to catch pink salmon. ", + "The source of the huge river is the clear spring. ", + "Kick the ball straight and follow through.", + "Help the woman get back to her feet. ", + "A pot of tea helps to pass the evening. ", + "Smoky fires lack flame and heat. ", + "The soft cushion broke the man's fall. ", + "The salt breeze came across from the sea. ", + "The girl at the booth sold fifty bonds. ", + "The small pup gnawed a hole in the sock. ", + "The fish twisted and turned on the bent hook. ", + "Press the pants and sew a button on the vest. ", + "The swan dive was far short of perfect. ", + "The beauty of the view stunned the young boy. ", + "Two blue fish swam in the tank. ", + "Her purse was full of useless trash. ", + "The colt reared and threw the tall rider. ", + "It snowed, rained, and hailed the same morning. ", + "Read verse out loud for pleasure.", + "Hoist the load to your left shoulder. ", + "Take the winding path to reach the lake. ", + "Note closely the size of the gas tank. ", + "Wipe the grease off his dirty face. ", + "Mend the coat before you go out. ", + "The wrist was badly strained and hung limp. ", + "The stray cat gave birth to kittens. ", + "The young girl gave no clear response. ", + "The meal was cooked before the bell rang.", + "What joy there is in living. ", + "A king ruled the state in the early days. ", + "The ship was torn apart on the sharp reef. ", + "Sickness kept him home the third week. ", + "The wide road shimmered in the hot sun. ", + "The lazy cow lay in the cool grass. ", + "Lift the square stone over the fence. ", + "The rope will bind the seven books at once. ", + "Hop over the fence and plunge in. ", + "The friendly gang left the drug store. ", + "Mesh wire keeps chicks inside. ", + "The frosty air passed through the coat. ", + "The crooked maze failed to fool the mouse. ", + "Adding fast leads to wrong sums. ", + "The show was a flop from the very start. ", + "A saw is a tool used for making boards.", + "The wagon moved on well oiled wheels.", + "March the soldiers past the next hill. ", + "A cup of sugar makes sweet fudge. ", + "Place a rosebush near the porch steps. ", + "Both lost their lives in the raging storm. ", + "We talked of the side show in the circus.", + "Use a pencil to write the first draft.", + "He ran half way to the hardware store. ", + "The clock struck to mark the third period.", + "A small creek cut across the field.", + "Cars and busses stalled in snow drifts.", + "The set of china hit the floor with a crash. ", + "This is a grand season for hikes on the road.", + "The dune rose from the edge of the water. ", + "Those words were the cue for the actor to leave.", + "A yacht slid around the point into the bay.", + "The two met while playing on the sand.", + "The ink stain dried on the finished page.", + "The walled town was seized without a fight. ", + "The lease ran out in sixteen weeks. ", + "A tame squirrel makes a nice pet. ", + "The horn of the car woke the sleeping cop. ", + "The heart beat strongly and with firm strokes. ", + "The pearl was worn in a thin silver ring. ", + "The fruit peel was cut in thick slices.", + "The Navy attacked the big task force.", + "See the cat glaring at the scared mouse. ", + "There are more than two factors here.", + "The hat brim was wide and too droopy.", + "The lawyer tried to lose his case.", + "The grass curled around the fence post.", + "Cut the pie into large parts.", + "Men strive but seldom get rich. ", + "Always close the barn door tight.", + "He lay prone and hardly moved a limb.", + "The slush lay deep along the street. ", + "A wisp of cloud hung in the blue air. ", + "A pound of sugar costs more than eggs.", + "The fin was sharp and cut the clear water.", + "The play seems dull and quite stupid.", + "Bail the boat to stop it from sinking.", + "The term ended in late june that year.", + "A Tusk is used to make costly gifts.", + "Ten pins were set in order.", + "The bill was paid every third week.", + "Oak is strong and also gives shade.", + "Cats and Dogs each hate the other.", + "The pipe began to rust while new.", + "Open the crate but don't break the glass.", + "Add the sum to the product of these three.", + "Thieves who rob friends deserve jail.", + "The ripe taste of cheese improves with age.", + "Act on these orders with great speed.", + "The hog crawled under the high fence.", + "Move the vat over the hot fire.", + "The bark of the pine tree was shiny and dark.", + "Leaves turn brown and yellow in the fall. ", + "The pennant waved when the wind blew.", + "Split the log with a quick, sharp blow.", + "Burn peat after the logs give out.", + "He ordered peach pie with ice cream.", + "Weave the carpet on the right hand side.", + "Hemp is a weed found in parts of the tropics.", + "A lame back kept his score low.", + "We find joy in the simplest things.", + "Type out three lists of orders.", + "The harder he tried the less he got done.", + "The boss ran the show with a watchful eye.", + "The cup cracked and spilled its contents.", + "Paste can cleanse the most dirty brass.", + "The slang word for raw whiskey is booze.", + "It caught its hind paw in a rusty trap.", + "The wharf could be seen at the farther shore.", + "Feel the heat of the weak dying flame.", + "The tiny girl took off her hat.", + "A cramp is no small danger on a swim.", + "He said the same phrase thirty times.", + "Pluck the bright rose without leaves.", + "Two plus seven is less than ten.", + "The glow deepened in the eyes of the sweet girl.", + "Bring your problems to the wise chief.", + "Write a fond note to the friend you cherish.", + "Clothes and lodging are free to new men.", + "We frown when events take a bad turn.", + "Port is a strong wine with a smoky taste.", + "The young kid jumped the rusty gate.", + "Guess the result from the first scores. ", + "A salt pickle tastes fine with ham.", + "The just claim got the right verdict.", + "Those thistles bend in a high wind.", + "Pure bred poodles have curls.", + "The tree top waved in a graceful way. ", + "The spot on the blotter was made by green ink. ", + "Mud was spattered on the front of his white shirt.", + "The cigar burned a hole in the desk top. ", + "The empty flask stood on the tin tray.", + "A speedy man can beat this track mark. ", + "He broke a new shoelace that day.", + "The coffee stand is too high for the couch. ", + "The urge to write short stories is rare. ", + "The pencils have all been used.", + "The pirates seized the crew of the lost ship.", + "We tried to replace the coin but failed. ", + "She sewed the torn coat quite neatly. ", + "The sofa cushion is red and of light weight.", + "The jacket hung on the back of the wide chair.", + "At that high level the air is pure.", + "Drop the two when you add the figures.", + "A filing case is now hard to buy.", + "An abrupt start does not win the prize. ", + "Wood is best for making toys and blocks.", + "The office paint was a dull, sad tan.", + "He knew the skill of the great young actress.", + "A rag will soak up spilled water.", + "A shower of dirt fell from the hot pipes.", + "Steam hissed from the broken valve. ", + "The child almost hurt the small dog.", + "There was a sound of dry leaves outside.", + "The sky that morning was clear and bright blue.", + "Torn scraps littered the stone floor.", + "Sunday is the best part of the week. ", + "The doctor cured him with these pills.", + "The new girl was fired today at noon.", + "They felt gay when the ship arrived in port.", + "Add the store's account to the last cent.", + "Acid burns holes in wool cloth.", + "Fairy tales should be fun to write.", + "Eight miles of woodland burned to waste.", + "The third act was dull and tired the players.", + "A young child should not suffer fright.", + "Add the column and put the sum here.", + "We admire and love a good cook.", + "There the flood mark is ten inches.", + "He carved a head from the round block of marble.", + "She has a smart way of wearing clothes.", + "The fruit of a fig tree is apple shaped.", + "Corn cobs can be used to kindle a fire. ", + "Where were they when the noise started.", + "The paper box is full of thumb tacks.", + "Sell your gift to a buyer at a good gain.", + "The tongs lay beside the ice pail.", + "The petals fall with the next puff of wind.", + "Bring your best compass to the third class.", + "They could laugh although they were sad.", + "Farmers came in to thresh the oat crop.", + "The brown house was on fire to the attic.", + "The lure is used to catch trout and flounder.", + "Float the soap on top of the bath water.", + "A blue crane is a tall wading bird.", + "A fresh start will work such wonders.", + "The club rented the rink for the fifth night.", + "After the dance, they went straight home.", + "The hostess taught the new maid to serve.", + "He wrote his last novel there at the inn.", + "Even the worst will beat his low score.", + "The cement had dried when he moved it.", + "The loss of the second ship was hard to take.", + "The fly made its way along the wall.", + "Do that with a wooden stick.", + "Live wires should be kept covered.", + "The large house had hot water taps.", + "It is hard to erase blue or red ink.", + "Write at once or you may forget it.", + "The doorknob was made of bright clean brass.", + "The wreck occurred by the bank on Main Street.", + "A pencil with black lead writes best.", + "Coax a young calf to drink from a bucket.", + "Schools for ladies teach charm and grace.", + "The lamp shone with a steady green flame.", + "They took the axe and the saw to the forest.", + "The ancient coin was quite dull and worn.", + "The shaky barn fell with a loud crash. ", + "Jazz and swing fans like fast music.", + "Rake the rubbish up and then burn it.", + "Slash the gold cloth into fine ribbons.", + "Try to have the court decide the case.", + "They are pushed back each time they attack.", + "He broke his ties with groups of former friends.", + "They floated on the raft to sun their white backs.", + "The map had an X that meant nothing.", + "Whitings are small fish caught in nets.", + "Some ads serve to cheat buyers.", + "Jerk the rope and the bell rings weakly.", + "A waxed floor makes us lose balance.", + "Madam, this is the best brand of corn.", + "On the islands the sea breeze is soft and mild.", + "The play began as soon as we sat down.", + "This will lead the world to more sound and fury.", + "Add salt before you fry the egg.", + "The rush for funds reached its peak Tuesday.", + "The birch looked stark white and lonesome.", + "The box is held by a bright red snapper.", + "To make pure ice, you freeze water.", + "The first worm gets snapped early.", + "Jump the fence and hurry up the bank.", + "Yell and clap as the curtain slides back.", + "They are men who walk the middle of the road.", + "Both brothers wear the same size.", + "In some form or other we need fun.", + "The prince ordered his head chopped off.", + "The houses are built of red clay bricks.", + "Ducks fly north but lack a compass.", + "Fruit flavors are used in fizz drinks.", + "These pills do less good than others.", + "Canned pears lack full flavor.", + "The dark pot hung in the front closet.", + "Carry the pail to the wall and spill it there.", + "The train brought our hero to the big town.", + "We are sure that one war is enough.", + "Gray paint stretched for miles around.", + "The rude laugh filled the empty room.", + "High seats are best for football fans.", + "Tea served from the brown jug is tasty.", + "A dash of pepper spoils beef stew.", + "A zestful food is the hot-cross bun.", + "The horse trotted around the field at a brisk pace.", + "Find the twin who stole the pearl necklace.", + "Cut the cord that binds the box tightly.", + "The red tape bound the smuggled food.", + "Look in the corner to find the tan shirt.", + "The cold drizzle will halt the bond drive.", + "Nine men were hired to dig the ruins.", + "The junk yard had a mouldy smell.", + "The flint sputtered and lit a pine torch.", + "Soak the cloth and drown the sharp odor.", + "The shelves were bare of both jam or crackers.", + "A joy to every child is the swan boat.", + "All sat frozen and watched the screen.", + "A cloud of dust stung his tender eyes.", + "To reach the end he needs much courage.", + "Shape the clay gently into block form.", + "A ridge on a smooth surface is a bump or flaw.", + "Hedge apples may stain your hands green.", + "Quench your thirst, then eat the crackers.", + "Tight curls get limp on rainy days.", + "The mute muffled the high tones of the horn.", + "The gold ring fits only a pierced ear.", + "The old pan was covered with hard fudge.", + "Watch the log float in the wide river.", + "The node on the stalk of wheat grew daily.", + "The heap of fallen leaves was set on fire.", + "Write fast if you want to finish early.", + "His shirt was clean but one button was gone.", + "The barrel of beer was a brew of malt and hops.", + "Tin cans are absent from store shelves.", + "Slide the box into that empty space.", + "The plant grew large and green in the window.", + "The beam dropped down on the workman's head.", + "Pink clouds floated with the breeze.", + "She danced like a swan, tall and graceful.", + "The tube was blown and the tire flat and useless.", + "It is late morning on the old wall clock.", + "Let's all join as we sing the last chorus.", + "The last switch cannot be turned off.", + "The fight will end in just six minutes.", + "The store walls were lined with colored frocks.", + "The peace league met to discuss their plans. ", + "The rise to fame of a person takes luck.", + "Paper is scarce, so write with much care.", + "The quick fox jumped on the sleeping cat.", + "The nozzle of the fire hose was bright brass.", + "Screw the round cap on as tight as needed.", + "Time brings us many changes.", + "The purple tie was ten years old.", + "Men think and plan and sometimes act.", + "Fill the ink jar with sticky glue.", + "He smoke a big pipe with strong contents.", + "We need grain to keep our mules healthy.", + "Pack the records in a neat thin case.", + "The crunch of feet in the snow was the only sound.", + "The copper bowl shone in the sun's rays.", + "Boards will warp unless kept dry. ", + "The plush chair leaned against the wall. ", + "Glass will clink when struck by metal.", + "Bathe and relax in the cool green grass.", + "Nine rows of soldiers stood in a line.", + "The beach is dry and shallow at low tide.", + "The idea is to sew both edges straight.", + "The kitten chased the dog down the street.", + "Pages bound in cloth make a book.", + "Try to trace the fine lines of the painting.", + "Women form less than half of the group. ", + "The zones merge in the central part of town.", + "A gem in the rough needs work to polish.", + "Code is used when secrets are sent.", + "Most of the news is easy for us to hear.", + "He used the lathe to make brass objects.", + "The vane on top of the pole revolved in the wind.", + "Mince pie is a dish served to children.", + "The clan gathered on each dull night.", + "Let it burn, it gives us warmth and comfort.", + "A castle built from sand fails to endure.", + "A child's wit saved the day for us.", + "Tack the strip of carpet to the worn floor.", + "Next Tuesday we must vote.", + "Pour the stew from the pot into the plate.", + "Each penny shone like new.", + "The man went to the woods to gather sticks.", + "The dirt piles were lines along the road.", + "The logs fell and tumbled into the clear stream.", + "Just hoist it up and take it away.", + "A ripe plum is fit for a king's palate.", + "Our plans right now are hazy. ", + "Brass rings are sold by these natives.", + "It takes a good trap to capture a bear.", + "Feed the white mouse some flower seeds.", + "The thaw came early and freed the stream.", + "He took the lead and kept it the whole distance.", + "The key you designed will fit the lock.", + "Plead to the council to free the poor thief.", + "Better hash is made of rare beef.", + "This plank was made for walking on .", + "The lake sparkled in the red hot sun.", + "He crawled with care along the ledge.", + "Tend the sheep while the dog wanders.", + "It takes a lot of help to finish these.", + "Mark the spot with a sign painted red.", + "Take two shares as a fair profit. ", + "The fur of cats goes by many names.", + "North winds bring colds and fevers.", + "He asks no person to vouch for him.", + "Go now and come here later.", + "A sash of gold silk will trim her dress.", + "Soap can wash most dirt away.", + "That move means the game is over.", + "He wrote down a long list of items.", + "A siege will crack the strong defense.", + "Grape juice and water mix well.", + "Roads are paved with sticky tar.", + "Fake stones shine but cost little.", + "The drip of the rain made a pleasant sound. ", + "Smoke poured out of every crack. ", + "Serve the hot rum to the tired heroes.", + "Much of the story makes good sense. ", + "The sun came up to light the eastern sky.", + "Heave the line over the port side.", + "A lathe cuts and trims any wood.", + "It's a dense crowd in two distinct ways.", + "His hip struck the knee of the next player.", + "The stale smell of old beer lingers.", + "The desk was firm on the shaky floor.", + "It takes heat to bring out the odor.", + "Beef is scarcer than some lamb.", + "Raise the sail and steer the ship northward.", + "A cone costs five cents on Mondays.", + "A pod is what peas always grow in.", + "Jerk that dart from the cork target.", + "No cement will hold hard wood.", + "We now have a new base for shipping.", + "A list of names is carved around the base.", + "The sheep were led home by a dog.", + "Three for a dime, the young peddler cried.", + "The sense of smell is better than that of touch.", + "No hardship seemed to make him sad.", + "Grace makes up for lack of beauty.", + "Nudge gently but wake her now.", + "The news struck doubt into restless minds.", + "Once we stood beside the shore.", + "A chink in the wall allowed a draft to blow.", + "Fasten two pins on each side.", + "A cold dip restores health and zest.", + "He takes the oath of office each March.", + "The sand drifts over the sills of the old house.", + "The point of the steel pen was bent and twisted.", + "There is a lag between thought and act.", + "Seed is needed to plant the spring corn.", + "Draw the chart with heavy black lines.", + "The boy owed his pal thirty cents.", + "The chap slipped into the crowd and was lost.", + "Hats are worn to tea and not to dinner.", + "The ramp led up to the wide highway.", + "Beat the dust from the rug onto the lawn.", + "Say it slowly but make it ring clear.", + "The straw nest housed five robins.", + "Screen the porch with woven straw mats.", + "This horse will nose his way to the finish.", + "The dry wax protects the deep scratch.", + "He picked up the dice for a second roll.", + "These coins will be needed to pay his debt.", + "The nag pulled the frail cart along.", + "Twist the valve and release hot steam.", + "The vamp of the shoe had a gold buckle.", + "The smell of burned rags itches my nose.", + "New pants lack cuffs and pockets.", + "The marsh will freeze when cold enough.", + "They slice the sausage thin with a knife.", + "The bloom of the rose lasts a few days.", + "A gray mare walked before the colt.", + "Breakfast buns are fine with a hot drink.", + "Bottles hold four kinds of rum.", + "The man wore a feather in his felt hat.", + "He wheeled the bike past the winding road.", + "Drop the ashes on the worn old rug.", + "The desk and both chairs were painted tan.", + "Throw out the used paper cup and plate.", + "A clean neck means a neat collar.", + "The couch cover and hall drapes were blue.", + "The stems of the tall glasses cracked and broke.", + "The wall phone rang loud and often.", + "The clothes dried on a thin wooden rack.", + "Turn out the lantern which gives us light.", + "The cleat sank deeply into the soft turf.", + "The bills were mailed promptly on the tenth of the month.", + "To have is better than to wait and hope.", + "The price is fair for a good antique clock.", + "The music played on while they talked.", + "Dispense with a vest on a day like this.", + "The bunch of grapes was pressed into wine.", + "He sent the figs, but kept the ripe cherries.", + "The hinge on the door creaked with old age.", + "The screen before the fire kept in the sparks.", + "Fly by night and you waste little time.", + "Thick glasses helped him read the print.", + "Birth and death marks the limits of life.", + "The chair looked strong but had no bottom.", + "The kite flew wildly in the high wind.", + "A fur muff is stylish once more.", + "The tin box held priceless stones.", + "We need an end of all such matter.", + "The case was puzzling to the old and wise.", + "The bright lanterns were gay on the dark lawn.", + "We don't get much money but we have fun.", + "The youth drove with zest, but little skill.", + "Five years he lived with a shaggy dog.", + "A fence cuts through the corner lot.", + "The way to save money is not to spend much.", + "Shut the hatch before the waves push it in.", + "The odor of spring makes young hearts jump.", + "Crack the walnut with your sharp side teeth.", + "He offered proof in the form of a large chart.", + "Send the stuff in a thick paper bag.", + "A quart of milk is water for the most part.", + "They told wild tales to frighten him.", + "The three story house was built of stone.", + "In the rear of the ground floor was a large passage.", + "A man in a blue sweater sat at the desk.", + "Oats are a food eaten by horse and man.", + "Their eyelids droop for want of sleep.", + "A sip of tea revives his tired friend.", + "There are many ways to do these things.", + "Tuck the sheet under the edge of the mat.", + "A force equal to that would move the earth.", + "We like to see clear weather.", + "The work of the tailor is seen on each side.", + "Take a chance and win a china doll.", + "Shake the dust from your shoes, stranger.", + "She was kind to sick old people.", + "The square wooden crate was packed to be shipped.", + "The dusty bench stood by the stone wall.", + "We dress to suit the weather of most days.", + "Smile when you say nasty words.", + "A bowl of rice is free with chicken stew.", + "The water in this well is a source of good health.", + "Take shelter in this tent, but keep still.", + "That guy is the writer of a few banned books.", + "The little tales they tell are false.", + "The door was barred, locked, and bolted as well.", + "Ripe pears are fit for a queen's table.", + "A big wet stain was on the round carpet.", + "The kite dipped and swayed, but stayed aloft.", + "The pleasant hours fly by much too soon.", + "The room was crowded with a wild mob.", + "This strong arm shall shield your honor.", + "She blushed when he gave her a white orchid.", + "The beetle droned in the hot June sun.", + "Press the pedal with your left foot.", + "Neat plans fail without luck.", + "The black trunk fell from the landing.", + "The bank pressed for payment of the debt.", + "The theft of the pearl pin was kept secret.", + "Shake hands with this friendly child.", + "The vast space stretched into the far distance.", + "A rich farm is rare in this sandy waste.", + "His wide grin earned many friends.", + "Flax makes a fine brand of paper.", + "Hurdle the pit with the aid of a long pole.", + "A strong bid may scare your partner stiff.", + "Even a just cause needs power to win.", + "Peep under the tent and see the clowns.", + "The leaf drifts along with a slow spin.", + "Cheap clothes are flashy but don't last.", + "A thing of small note can cause despair.", + "Flood the mails with requests for this book.", + "A thick coat of black paint covered all.", + "The pencil was cut to be sharp at both ends.", + "Those last words were a strong statement.", + "He wrote his name boldly at the top of the sheet.", + "Dill pickles are sour but taste fine.", + "Down that road is the way to the grain farmer.", + "Either mud or dust are found at all times.", + "The best method is to fix it in place with clips.", + "If you mumble your speech will be lost.", + "At night the alarm roused him from a deep sleep.", + "Read just what the meter says.", + "Fill your pack with bright trinkets for the poor.", + "The small red neon lamp went out.", + "Clams are small, round, soft, and tasty.", + "The fan whirled its round blades softly.", + "The line where the edges join was clean.", + "Breathe deep and smell the piny air.", + "It matters not if he reads these words or those.", + "A brown leather bag hung from its strap.", + "A toad and a frog are hard to tell apart.", + "A white silk jacket goes with any shoes.", + "A break in the dam almost caused a flood.", + "Paint the sockets in the wall dull green.", + "The child crawled into the dense grass.", + "Bribes fail where honest men work.", + "Trample the spark, else the flames will spread.", + "The hilt of the sword was carved with fine designs.", + "A round hole was drilled through the thin board.", + "Footprints showed the path he took up the beach.", + "She was waiting at my front lawn.", + "A vent near the edge brought in fresh air.", + "Prod the old mule with a crooked stick.", + "It is a band of steel three inches wide.", + "The pipe ran almost the length of the ditch.", + "It was hidden from sight by a mass of leaves and shrubs.", + "The weight of the package was seen on the high scale.", + "Wake and rise, and step into the green outdoors.", + "The green light in the brown box flickered.", + "The brass tube circled the high wall.", + "The lobes of her ears were pierced to hold rings.", + "Hold the hammer near the end to drive the nail.", + "Next Sunday is the twelfth of the month.", + "Every word and phrase he speaks is true.", + "He put his last cartridge into the gun and fired.", + "They took their kids from the public school.", + "Drive the screw straight into the wood.", + "Keep the hatch tight and the watch constant.", + "Sever the twine with a quick snip of the knife.", + "Paper will dry out when wet.", + "Slide the catch back and open the desk.", + "Help the weak to preserve their strength.", + "A sullen smile gets few friends.", + "Stop whistling and watch the boys march.", + "Jerk the cord, and out tumbles the gold.", + "Slide the tray across the glass top.", + "The cloud moved in a stately way and was gone.", + "Light maple makes for a swell room.", + "Set the piece here and say nothing.", + "Dull stories make her laugh.", + "A stiff cord will do to fasten your shoe.", + "Get the trust fund to the bank early.", + "Choose between the high road and the low.", + "A plea for funds seems to come again.", + "He lent his coat to the tall gaunt stranger.", + "There is a strong chance it will happen once more.", + "The duke left the park in a silver coach.", + "Greet the new guests and leave quickly.", + "When the frost has come it is time for turkey.", + "Sweet words work better than fierce.", + "A thin stripe runs down the middle.", + "A six comes up more often than a ten.", + "Lush ferns grow on the lofty rocks.", + "The ram scared the school children off.", + "The team with the best timing looks good.", + "The farmer swapped his horse for a brown ox.", + "Sit on the perch and tell the others what to do.", + "A steep trail is painful for our feet.", + "The early phase of life moves fast.", + "Green moss grows on the northern side.", + "Tea in thin china has a sweet taste.", + "Pitch the straw through the door of the stable.", + "The latch on the back gate needed a nail.", + "The goose was brought straight from the old market.", + "The sink is the thing in which we pile dishes.", + "A whiff of it will cure the most stubborn cold.", + "The facts don't always show who is right.", + "She flaps her cape as she parades the street.", + "The loss of the cruiser was a blow to the fleet.", + "Loop the braid to the left and then over.", + "Plead with the lawyer to drop the lost cause.", + "Calves thrive on tender spring grass.", + "Post no bills on this office wall.", + "Tear a thin sheet from the yellow pad.", + "A cruise in warm waters in a sleek yacht is fun.", + "A streak of color ran down the left edge.", + "It was done before the boy could see it.", + "Crouch before you jump or miss the mark.", + "Pack the kits and don't forget the salt.", + "The square peg will settle in the round hole.", + "Fine soap saves tender skin.", + "Poached eggs and tea must suffice.", + "Bad nerves are jangled by a door slam.", + "Ship maps are different from those for planes.", + "Dimes showered down from all sides.", + "They sang the same tunes at each party.", + "The sky in the west is tinged with orange red.", + "The pods of peas ferment in bare fields.", + "The horse balked and threw the tall rider.", + "The hitch between the horse and cart broke.", + "Pile the coal high in the shed corner.", + "A gold vase is both rare and costly.", + "The knife was hung inside its bright sheath.", + "The rarest spice comes from the far East.", + "The roof should be tilted at a sharp slant.", + "A smatter of French is worse than none.", + "The mule trod the treadmill day and night.", + "The aim of the contest is to raise a great fund.", + "To send it now in large amounts is bad.", + "There is a fine hard tang in salty air.", + "Cod is the main business of the north shore.", + "The slab was hewn from heavy blocks of slate.", + "Dunk the stale biscuits into strong drink.", + "Hang tinsel from both branches.", + "Cap the jar with a tight brass cover.", + "The poor boy missed the boat again.", + "Be sure to set that lamp firmly in the hole.", + "Pick a card and slip it under the pack.", + "A round mat will cover the dull spot.", + "The first part of the plan needs changing.", + "A good book informs of what we ought to know.", + "The mail comes in three batches per day.", + "You cannot brew tea in a cold pot.", + "Dots of light betrayed the black cat.", + "Put the chart on the mantel and tack it down.", + "The night shift men rate extra pay.", + "The red paper brightened the dim stage.", + "See the player scoot to third base.", + "Slide the bill between the two leaves.", + "Many hands help get the job done.", + "We don't like to admit our small faults.", + "No doubt about the way the wind blows.", + "Dig deep in the earth for pirate's gold.", + "The steady drip is worse than a drenching rain.", + "A flat pack takes less luggage space.", + "Green ice frosted the punch bowl.", + "A stuffed chair slipped from the moving van.", + "The stitch will serve but needs to be shortened.", + "A thin book fits in the side pocket.", + "The gloss on top made it unfit to read.", + "The hail pattered on the burnt brown grass.", + "Seven seals were stamped on great sheets.", + "Our troops are set to strike heavy blows.", + "The store was jammed before the sale could start.", + "It was a bad error on the part of the new judge.", + "One step more and the board will collapse.", + "Take the match and strike it against your shoe.", + "The pot boiled but the contents failed to jell.", + "The baby puts his right foot in his mouth.", + "The bombs left most of the town in ruins.", + "Stop and stare at the hard working man.", + "The streets are narrow and full of sharp turns.", + "The pup jerked the leash as he saw a feline shape.", + "Open your book to the first page.", + "Fish evade the net and swim off.", + "Dip the pail once and let it settle.", + "Will you please answer that phone.", + "The big red apple fell to the ground.", + "The curtain rose and the show was on.", + "The young prince became heir to the throne.", + "He sent the boy on a short errand.", + "Leave now and you will arrive on time.", + "The corner store was robbed last night.", + "A gold ring will please most any girl.", + "The long journey home took a year.", + "She saw a cat in the neighbor's house.", + "A pink shell was found on the sandy beach.", + "Small children came to see him.", + "The grass and bushes were wet with dew.", + "The blind man counted his old coins.", + "A severe storm tore down the barn.", + "She called his name many times.", + "When you hear the bell, come quickly.", + NULL}; diff --git a/widget/milsko/milskosrc/examples/picture.jpg b/widget/milsko/milskosrc/examples/picture.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7c664079cb4efd8fec4cb008a12ed97dcec08b87 GIT binary patch literal 7471 zcmb7IXEYp4xL#K8J$e^q)#$xjC9LSZM2Ox=2%`7iHW4kX-g_q@EK9URTP-XSoeiS9 zzH{!6`}aO`&YU^(zRxr7%>0<=%){ctF94aghL#2Z0|NlScx-@&Wq>LGi1{D>>w%BJ z!om6vcsMxNIQV!31o(LP_yk0xL046yGkR0RT8-NJ_zytz-|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Q4s&zkEGt%siTN>6zF#tRLMS zH6~p`5r)%IZ4ZTx_JY0^w?>_C8XTL#eq3dQI?MWw z@VCKXkgF9ma`nk6do9x~7v&;p#jf@URc;3IFe!K})YnO*6g59L^wmzfgOkTuM)KPI z@mt9}#okXV`e zrZMnS`~k3S+BbY8(j}zxv!G&;qNTC9)=Ly&=;^Y&rpP6nsj6bfA_$)^g_OVk>$>VM zq>$>pSaERDzkT6!?5umSz+JWzH>?tI5ODayUKUbYBT)lrUGI)ZODm=MV%=u!G<7xL zyjYkTz~uOoYlG28SF PN?R+#TCa>^9+v(Ge#J3U literal 0 HcmV?d00001 diff --git a/widget/milsko/milskosrc/examples/picture.png b/widget/milsko/milskosrc/examples/picture.png new file mode 100644 index 0000000000000000000000000000000000000000..01b9e4547928f95d63fecf5f24ffaeb314f4531d GIT binary patch literal 27213 zcmWh!by!pH7vIK6K{i4LD2$OJEhQi@7%3nKqf5HGBu9^uZcthrB`pmSUpk~4M7mT; z$sfOSpL^fux$i&kdG3kNJ?C?x)YTNoNa#oa005biBI?ckiuwOd1iF8!7@p_cFK~0k zH>v=DFWde5FaY54|NA=tfF~aSuxAPYh-Cl(G%h*K8WQZJ-kP=LGtUwLhxk^ul) zX(bd=%V#0yW;@M7A&HHML}U6@Y|{&J1^|dl53Oy5_B?YqK0TP%$)L&7S=?Pdo|;$CG_l-rkwtN1yo~4G;=MGjl)? zKj@f~v|%3?&&zuMWzS`8*ABh#`Le`FHjt%Al!xs^70?NRFxaAOkhK1dhqE+bshkP{ z%8SO>O$ttyl})?N3&!EB^t}B2JuYqsY;+%<8)|&zvNoqxp^C*4aR5m2hyWS4O4-M( zpe~Maq2+(~GLL>~pftHq8oBX%w`}`s%$|-bmU$Kb}=N4Ca-A9`4w+$ldvLqy!yi#1k?Z+^8KgTp|^0+W0 zMHn2N^8i~hbEPtghFn+nS&iSx<)7Y@*^%jb`^E0J#}flxeuSHa{EVcAiQWu#Wv(gi zYECt!E0TVb+RM5Bkw+FHg~9t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NP*FmBczl{kl z*R47Ohg)>jBDHwn~fqDw!=RdP^TX!CKa@7U@*k5&{^VIARePUk9M(R@Bd zwJbdHUD4#wMC-Gm921}7Yid@C1TX_5$;!&AW(*97ZGpN5yH)dw-enVg&_%_l`e#UY zj#Std6{h)67)}M!b^4T(wRiG^Qhfd^ivtYBYVx4)8Pe>a)Vr-=`y;5}wx)h2uY4wx z$ZJrPvxLQi4CNsAckDim4H}UVa#>?#zZTp^xCAUg0-9uAHbpZvs$3poBM#lie}*4;ldn}x1NQ3WL#%1y zQx>tij*53agAp&&W4~RAWzE!NqRv04FApEV5Bzb1tjVlL@3r%pfQv>k9WmV*W8=|Y#`lG-+RahK$gXKw7c6i zKBe{!e$D%ks3FbY&eebQ(TXy{dt!HBme4blSN{ex>S3W|Mh6)WZIGQ)R#mkN&v6)( z@ZIwv-xStnTg{bbLxW@hqG;4g*CvP$m)M{E(3lJ-=g?C-C{R+!>_<3wfBb1Ocpg^U z;(*m+oIKLK3_`X>h|HwC>OFTEk$3!QK3PzdV#!sP=&HXu?_FajI3*S(Y-%J_-Cq5c z8^q@QSeMwB(*ZPTc)e7=Y9By;i^1&xUF(47&jMUjoL{<-KPY6RWaP!A6vSl|EM;U> zw*}F4$gT`LlY{feIM)tRc)(|o4TFd7szKbVCIh!0F9iZr0;Du=V*0!cHv2ZVM z9IPtV6$9zu8lYXEu4Z4l)RZEMlgry_Ql#%LcV(Is&u*6HNp}C5K9q%7DAjV$P=vnO zM|qXavs_z|(9e0y-BS%C-`#8nffhAh>Uty>_}KN1%JIcHm zep=OdfuUbhMo*2ttE^{wj-DD1uzl5NdkVA9i(|b3Kg?p$<69(DJ`<()hJyPyqTKCQ lOzEEuD#najH>?=_ujL;9n+oou=NupBn#y}P`;p5N#V_`vBxwKu literal 0 HcmV?d00001 diff --git a/widget/milsko/milskosrc/examples/vkdemos/triangle.vert.spv b/widget/milsko/milskosrc/examples/vkdemos/triangle.vert.spv new file mode 100644 index 0000000000000000000000000000000000000000..0855f6564483fb77360384fe38dc344e7f978fdb GIT binary patch literal 1468 zcmYk5T~AX%5Qeuvi->}VfFFnlQ2YQ96^MyZgP2qkE>IG0n_7-|Ol?VfOpI6lGZTN6 zHzq#M>Dh*DCNu9l@9fU(o{o;Jj)zbQ=lJc0!I}vpFd!yaR!{6_G95RZk4P(NtweR$pIr>D(cGfx}+FU{k$*XVxw znzr(O2vt;P_o~8Np#HSm&+@F>K~iWI@U3pU+be2nApxJX8;5D{W7^BpA3(Yv@W$rK zEnvqBz5N$_*2#~upQ*Z-vuASq?d4LSRh(?^|s$=O5XjODzyI++Bot`1`#<{p&T^OrE! zEGl)&)VPQ7JW&mwU<=gqaTM6x9N5=RFxPsCCy1?I1fR!SBbR_Z+x_I9m)Q4|vtEA@ zb45HgfWJ4m8~2*V)W}E8C1TdAsF?xCX_323Y|VhH6+O&?-A}!FXS{;9k2u2|v0R*C zzRb%zgV^uy>a!W)BKGvAie4AywGbfmHiB~W=-+C3FU=_@B#J4e*^>^^* +#include + +#include +#include +#ifdef HAS_VK_ENUM_STRING_HELPER +#include +#else +char buffer[512]; + +char* string_VkResult(VkResult res) { + MwStringPrintIntoBuffer(buffer, 512, "%d", res); + + return &buffer[0]; +} +#endif + +MwWidget window, vulkan; +int ow = 300; +int oh = 250; + +double timer = 0; + +PFN_vkGetInstanceProcAddr _vkGetInstanceProcAddr; +VkInstance instance; +VkDevice device; +VkPhysicalDevice physicalDevice; +VkSurfaceKHR surface; +VkQueue graphicsQueue; +VkQueue presentQueue; +uint32_t* graphicsQueueIndex; +uint32_t* presentQueueIndex; + +VkSwapchainKHR swapchain; +VkImage* swapchainImages; +VkImageView* swapchainImageView; +uint32_t swapchainImageViewCount; +uint32_t currentImageIndex; +uint32_t frameNumber; + +VkFence* fences; +VkSemaphore* renderFinishedSemaphores; +VkSemaphore* imageAvaliableSemaphores; + +VkFramebuffer* framebuffers; + +VkPipeline pipeline; +VkCommandBuffer* cmdBuffers; +VkRenderPass renderPass; + +VkResult res; + +VkSwapchainCreateInfoKHR swapchainCreateInfo = {}; + +#define MAX_FRAMES_IN_FLIGHT swapchainImageViewCount + +// convienence macro for loading a vulkan function pointer into memory +#define LOAD_VK_FUNCTION(name) \ + PFN_##name _##name = (PFN_##name)_vkGetInstanceProcAddr(instance, #name); \ + assert(_##name); + +void MWAPI tick(MwWidget handle, void* user_data, void* call_data) { + (void)handle; + (void)user_data; + (void)call_data; + + VkCommandBufferBeginInfo beginInfo = {}; + VkRenderPassBeginInfo renderPassInfo = {}; + VkSubmitInfo submitInfo = {}; + VkPresentInfoKHR presentInfo = {}; + + VkClearValue clearColor = {{{sin(timer) / 10., cos(timer) / 10., atan(timer) / 10., 1.0f}}}; + uint32_t vertexCount = 3; + uint32_t instanceCount = 1; + timer += (float)(rand() % 1000) / 1000.; + + VkPipelineStageFlags waitStages[] = {VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT}; + + LOAD_VK_FUNCTION(vkCreateFence); + LOAD_VK_FUNCTION(vkWaitForFences); + LOAD_VK_FUNCTION(vkResetFences); + LOAD_VK_FUNCTION(vkResetCommandBuffer); + LOAD_VK_FUNCTION(vkBeginCommandBuffer); + LOAD_VK_FUNCTION(vkEndCommandBuffer); + LOAD_VK_FUNCTION(vkQueueSubmit); + LOAD_VK_FUNCTION(vkAcquireNextImageKHR); + LOAD_VK_FUNCTION(vkQueuePresentKHR); + LOAD_VK_FUNCTION(vkCreateSwapchainKHR); + + LOAD_VK_FUNCTION(vkCmdBeginRenderPass); + LOAD_VK_FUNCTION(vkCmdEndRenderPass); + LOAD_VK_FUNCTION(vkCmdDraw); + LOAD_VK_FUNCTION(vkCmdBindPipeline); + + if((res = _vkWaitForFences(device, 1, &fences[frameNumber], VK_TRUE, UINT64_MAX)) != VK_SUCCESS) { + printf("error waiting on fence: %s\n", string_VkResult(res)); + exit(0); + } + + if((res = _vkResetFences(device, 1, &fences[frameNumber])) != VK_SUCCESS) { + printf("error resetting fence: %s\n", string_VkResult(res)); + exit(0); + } + +swapchainRetry: + if((res = _vkAcquireNextImageKHR(device, swapchain, UINT64_MAX, imageAvaliableSemaphores[frameNumber], NULL, ¤tImageIndex)) != VK_SUCCESS) { + if(res == VK_ERROR_OUT_OF_DATE_KHR) { + if(_vkCreateSwapchainKHR(device, &swapchainCreateInfo, NULL, &swapchain) != VK_SUCCESS) { + printf("failed to create swapchain: %s\n", string_VkResult(res)); + exit(0); + }; + goto swapchainRetry; + } + }; + + beginInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; + beginInfo.pNext = NULL; + beginInfo.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; + beginInfo.pInheritanceInfo = NULL; + + if((res = _vkResetCommandBuffer(cmdBuffers[frameNumber], 0)) != VK_SUCCESS) { + printf("error beginning command buffer record: %s\n", string_VkResult(res)); + exit(0); + } + + if((res = _vkBeginCommandBuffer(cmdBuffers[frameNumber], &beginInfo)) != VK_SUCCESS) { + printf("error beginning command buffer record: %s\n", string_VkResult(res)); + exit(0); + } + + renderPassInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; + renderPassInfo.pNext = NULL; + renderPassInfo.renderPass = renderPass; + renderPassInfo.framebuffer = framebuffers[frameNumber]; + renderPassInfo.renderArea.offset = (VkOffset2D){0, 0}; + renderPassInfo.renderArea.extent = (VkExtent2D){(uint32_t)ow, (uint32_t)oh}; + renderPassInfo.clearValueCount = 1; + renderPassInfo.pClearValues = &clearColor; + + _vkCmdBeginRenderPass(cmdBuffers[frameNumber], &renderPassInfo, VK_SUBPASS_CONTENTS_INLINE); + + _vkCmdBindPipeline(cmdBuffers[frameNumber], VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline); + + _vkCmdDraw(cmdBuffers[frameNumber], vertexCount, instanceCount, 0, 0); + + _vkCmdEndRenderPass(cmdBuffers[frameNumber]); + + if((res = _vkEndCommandBuffer(cmdBuffers[frameNumber])) != VK_SUCCESS) { + printf("error recording command buffer: %s\n", string_VkResult(res)); + exit(0); + } + + submitInfo.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; + submitInfo.pNext = NULL; + submitInfo.waitSemaphoreCount = 1; + submitInfo.pWaitSemaphores = &imageAvaliableSemaphores[frameNumber]; + submitInfo.pWaitDstStageMask = waitStages; + submitInfo.commandBufferCount = 1; + submitInfo.pCommandBuffers = &cmdBuffers[frameNumber]; + submitInfo.signalSemaphoreCount = 1; + submitInfo.pSignalSemaphores = &renderFinishedSemaphores[frameNumber]; + + if((res = _vkQueueSubmit(graphicsQueue, 1, &submitInfo, fences[frameNumber])) != VK_SUCCESS) { + printf("error submitting command buffer: %s\n", string_VkResult(res)); + exit(0); + } + + presentInfo.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; + + presentInfo.waitSemaphoreCount = 1; + presentInfo.pWaitSemaphores = &renderFinishedSemaphores[frameNumber]; + presentInfo.swapchainCount = 1; + presentInfo.pSwapchains = &swapchain; + presentInfo.pImageIndices = ¤tImageIndex; + + presentInfo.pResults = NULL; // Optional + + _vkQueuePresentKHR(presentQueue, &presentInfo); + + // frameNumber = currentImageIndex; + frameNumber = (frameNumber + 1) % (MAX_FRAMES_IN_FLIGHT); +} + +void vulkan_setup(MwWidget handle) { + FILE* vertFile; + FILE* fragFile; + void* vertBuf; + void* fragBuf; + size_t vertFileSize; + size_t fragFileSize; + size_t amountRead; + + uint32_t i; + VkViewport viewport = {}; + VkRect2D scissor = {}; + VkCommandPool cmdPool = VK_NULL_HANDLE; + VkResult res = 0; + VkShaderModule fragShaderModule; + VkShaderModule vertShaderModule; + VkPipelineLayout pipelineLayout = VK_NULL_HANDLE; + VkAttachmentDescription colorAttachment = {}; + VkAttachmentReference colorAttachmentRef = {}; + VkSubpassDescription subpass = {}; + + VkRenderPassCreateInfo renderPassInfo = {}; + VkShaderModuleCreateInfo vertInfo = {}; + VkShaderModuleCreateInfo fragInfo = {}; + VkPipelineLayoutCreateInfo pipelineLayoutInfo = {}; + VkPipelineShaderStageCreateInfo vertShaderStageInfo = {}; + VkPipelineShaderStageCreateInfo fragShaderStageInfo = {}; + VkPipelineShaderStageCreateInfo shaderStages[2] = {}; + VkPipelineVertexInputStateCreateInfo vertexInputInfo = {}; + VkPipelineInputAssemblyStateCreateInfo inputAssembly = {}; + VkPipelineViewportStateCreateInfo viewportState = {}; + VkPipelineRasterizationStateCreateInfo rasterizer = {}; + VkPipelineMultisampleStateCreateInfo multisampling = {}; + VkPipelineColorBlendAttachmentState colorBlendAttachment = {}; + VkPipelineColorBlendStateCreateInfo colorBlending = {}; + VkGraphicsPipelineCreateInfo pipelineInfo = {}; + VkFramebufferCreateInfo framebufferInfo = {}; + VkCommandBufferAllocateInfo allocInfo = {}; + VkCommandPoolCreateInfo poolInfo = {}; + VkImageViewCreateInfo imageViewCreateInfo = {}; + VkSemaphoreCreateInfo semaphoreInfo = {}; + VkFenceCreateInfo fenceInfo = {}; + + int err = 0; + _vkGetInstanceProcAddr = MwVulkanGetField(handle, MwVULKANFIELD_GETINSTANCEPROCADDR, &err); + instance = MwVulkanGetField(handle, MwVULKANFIELD_INSTANCE, &err); + device = MwVulkanGetField(handle, MwVULKANFIELD_LOGICALDEVICE, &err); + physicalDevice = MwVulkanGetField(handle, MwVULKANFIELD_PHYSICALDEVICE, &err); + graphicsQueue = MwVulkanGetField(handle, MwVULKANFIELD_GRAPHICSQUEUE, &err); + presentQueue = MwVulkanGetField(handle, MwVULKANFIELD_PRESENTQUEUE, &err); + surface = MwVulkanGetField(handle, MwVULKANFIELD_SURFACE, &err); + presentQueueIndex = MwVulkanGetField(handle, MwVULKANFIELD_PRESENTQUEUEINDEX, &err); + graphicsQueueIndex = MwVulkanGetField(handle, MwVULKANFIELD_GRAPHICSQUEUEINDEX, &err); + + LOAD_VK_FUNCTION(vkCreateShaderModule); + LOAD_VK_FUNCTION(vkCreatePipelineLayout); + LOAD_VK_FUNCTION(vkCreateGraphicsPipelines); + LOAD_VK_FUNCTION(vkCreateCommandPool); + LOAD_VK_FUNCTION(vkCreateFramebuffer); + LOAD_VK_FUNCTION(vkAllocateCommandBuffers); + LOAD_VK_FUNCTION(vkCreateFence); + LOAD_VK_FUNCTION(vkCreateSemaphore); + LOAD_VK_FUNCTION(vkCreateSwapchainKHR); + LOAD_VK_FUNCTION(vkGetSwapchainImagesKHR); + LOAD_VK_FUNCTION(vkCreateImageView); + LOAD_VK_FUNCTION(vkCreateRenderPass); + + // create a swapchain + swapchainCreateInfo.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR; + swapchainCreateInfo.surface = surface; + swapchainCreateInfo.minImageCount = 3; + swapchainCreateInfo.imageFormat = VK_FORMAT_B8G8R8A8_SRGB; + swapchainCreateInfo.imageColorSpace = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR; + swapchainCreateInfo.imageExtent = (VkExtent2D){.width = ow, .height = oh}, + swapchainCreateInfo.imageArrayLayers = 1, + swapchainCreateInfo.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | + VK_IMAGE_USAGE_TRANSFER_DST_BIT | + VK_IMAGE_USAGE_SAMPLED_BIT; + // th is how we specify no transformation. + swapchainCreateInfo.preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR; + swapchainCreateInfo.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; + swapchainCreateInfo.presentMode = VK_PRESENT_MODE_IMMEDIATE_KHR; + // we don't care about the color of pixels that are obscured. + swapchainCreateInfo.clipped = VK_TRUE; + swapchainCreateInfo.oldSwapchain = NULL; + + if(*graphicsQueueIndex != *presentQueueIndex) { + swapchainCreateInfo.imageSharingMode = VK_SHARING_MODE_CONCURRENT; + swapchainCreateInfo.queueFamilyIndexCount = 2; + + uint32_t indices[] = { + *graphicsQueueIndex, + *presentQueueIndex, + }; + swapchainCreateInfo.pQueueFamilyIndices = indices; + } else { + swapchainCreateInfo.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE; + swapchainCreateInfo.queueFamilyIndexCount = 0; + swapchainCreateInfo.pQueueFamilyIndices = NULL; + } + + if(_vkCreateSwapchainKHR(device, &swapchainCreateInfo, NULL, &swapchain) != VK_SUCCESS) { + printf("failed to create swapchain: %s\n", string_VkResult(res)); + exit(0); + }; + + imageViewCreateInfo.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO; + imageViewCreateInfo.viewType = VK_IMAGE_VIEW_TYPE_2D; + imageViewCreateInfo.format = swapchainCreateInfo.imageFormat; + imageViewCreateInfo.components.r = VK_COMPONENT_SWIZZLE_R; + imageViewCreateInfo.components.g = VK_COMPONENT_SWIZZLE_G; + imageViewCreateInfo.components.b = VK_COMPONENT_SWIZZLE_B; + imageViewCreateInfo.components.a = VK_COMPONENT_SWIZZLE_A; + imageViewCreateInfo.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + imageViewCreateInfo.subresourceRange.baseMipLevel = 0; + imageViewCreateInfo.subresourceRange.levelCount = VK_REMAINING_MIP_LEVELS; + imageViewCreateInfo.subresourceRange.baseArrayLayer = 0; + imageViewCreateInfo.subresourceRange.layerCount = VK_REMAINING_ARRAY_LAYERS; + + if(_vkGetSwapchainImagesKHR(device, swapchain, &swapchainImageViewCount, NULL) != VK_SUCCESS) { + printf("failed to get swapchain images: %s\n", string_VkResult(res)); + exit(0); + } + swapchainImages = malloc(sizeof(VkImage) * MAX_FRAMES_IN_FLIGHT); + swapchainImageView = malloc(sizeof(VkImageView) * MAX_FRAMES_IN_FLIGHT); + _vkGetSwapchainImagesKHR(device, swapchain, &swapchainImageViewCount, swapchainImages); + for(i = 0; i < MAX_FRAMES_IN_FLIGHT; i++) { + imageViewCreateInfo.image = swapchainImages[i]; + if(_vkCreateImageView(device, &imageViewCreateInfo, NULL, &swapchainImageView[i]) != VK_SUCCESS) { + printf("failed to get swapchain images: %s\n", string_VkResult(res)); + exit(0); + } + } + + // Create a Render Pass. + colorAttachment.flags = 0; + colorAttachment.format = swapchainCreateInfo.imageFormat; + colorAttachment.samples = VK_SAMPLE_COUNT_1_BIT; + colorAttachment.loadOp = VK_ATTACHMENT_LOAD_OP_CLEAR; + colorAttachment.storeOp = VK_ATTACHMENT_STORE_OP_STORE; + colorAttachment.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; + colorAttachment.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; + colorAttachment.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + colorAttachment.finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR; + colorAttachmentRef.attachment = 0; + colorAttachmentRef.layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; + + subpass.flags = 0; + subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS; + subpass.inputAttachmentCount = 0; + subpass.pInputAttachments = NULL; + subpass.colorAttachmentCount = 1; + subpass.pColorAttachments = &colorAttachmentRef; + subpass.pResolveAttachments = NULL; + subpass.pDepthStencilAttachment = NULL; + subpass.preserveAttachmentCount = 0; + subpass.pPreserveAttachments = NULL; + + renderPassInfo.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO; + renderPassInfo.pNext = NULL; + renderPassInfo.flags = 0; + renderPassInfo.attachmentCount = 1; + renderPassInfo.pAttachments = &colorAttachment; + renderPassInfo.subpassCount = 1; + renderPassInfo.pSubpasses = &subpass; + renderPassInfo.dependencyCount = 0; + renderPassInfo.pDependencies = NULL; + + if((res = _vkCreateRenderPass(device, &renderPassInfo, NULL, &renderPass)) != VK_SUCCESS) { + printf("error creating the render pass: %s\n", string_VkResult(res)); + exit(0); + } + + // Create the Vertex Shader Module. + vertFile = fopen("triangle.vert.spv", "rb"); + if(vertFile == NULL) vertFile = fopen("examples/vkdemos/triangle.vert.spv", "rb"); + fragFile = fopen("triangle.frag.spv", "rb"); + if(fragFile == NULL) fragFile = fopen("examples/vkdemos/triangle.frag.spv", "rb"); + + fseek(vertFile, 0L, SEEK_END); + vertFileSize = ftell(vertFile); + rewind(vertFile); + vertBuf = malloc(vertFileSize); + memset(vertBuf, 0, vertFileSize); + amountRead = fread(vertBuf, 1, vertFileSize, vertFile); + printf("triangle.vert.spv: read %zu bytes\n", amountRead); + + vertInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; + vertInfo.pNext = NULL; + vertInfo.flags = 0; + vertInfo.codeSize = amountRead; + vertInfo.pCode = vertBuf; + + if(_vkCreateShaderModule(device, &vertInfo, NULL, &vertShaderModule) != VK_SUCCESS) { + printf("failed to create the shader module: %s\n", string_VkResult(res)); + exit(0); + } + + // Create the Fragment Shader Module. + fseek(fragFile, 0L, SEEK_END); + fragFileSize = ftell(fragFile); + rewind(fragFile); + fragBuf = malloc(fragFileSize); + memset(fragBuf, 0, fragFileSize); + amountRead = fread(fragBuf, 1, fragFileSize, fragFile); + printf("triangle.frag.spv: read %zu bytes\n", amountRead); + + fragInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; + fragInfo.pNext = NULL; + fragInfo.flags = 0; + fragInfo.codeSize = amountRead; + fragInfo.pCode = fragBuf; + + if(_vkCreateShaderModule(device, &fragInfo, NULL, &fragShaderModule) != VK_SUCCESS) { + printf("error creating the shader module: %s\n", string_VkResult(res)); + exit(0); + } + + // Create Pipeline Layout. + pipelineLayoutInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; + pipelineLayoutInfo.pNext = NULL; + pipelineLayoutInfo.flags = 0; + pipelineLayoutInfo.setLayoutCount = 0; + pipelineLayoutInfo.pSetLayouts = NULL; + pipelineLayoutInfo.pushConstantRangeCount = 0; + + if((res = _vkCreatePipelineLayout(device, &pipelineLayoutInfo, NULL, &pipelineLayout)) != VK_SUCCESS) { + printf("error creating the pipeline layout: %s\n", string_VkResult(res)); + exit(0); + } + + vertShaderStageInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; + vertShaderStageInfo.pNext = NULL; + vertShaderStageInfo.flags = 0; + vertShaderStageInfo.stage = VK_SHADER_STAGE_VERTEX_BIT; + vertShaderStageInfo.module = vertShaderModule; + vertShaderStageInfo.pName = "main"; + vertShaderStageInfo.pSpecializationInfo = NULL; + + fragShaderStageInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO; + fragShaderStageInfo.pNext = NULL; + fragShaderStageInfo.flags = 0; + fragShaderStageInfo.stage = VK_SHADER_STAGE_FRAGMENT_BIT; + fragShaderStageInfo.module = fragShaderModule; + fragShaderStageInfo.pName = "main"; + fragShaderStageInfo.pSpecializationInfo = NULL; + + shaderStages[0] = vertShaderStageInfo; + shaderStages[1] = fragShaderStageInfo; + + vertexInputInfo.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO; + vertexInputInfo.pNext = NULL; + vertexInputInfo.flags = 0; + vertexInputInfo.vertexBindingDescriptionCount = 0; + vertexInputInfo.pVertexBindingDescriptions = NULL; + vertexInputInfo.vertexAttributeDescriptionCount = 0; + vertexInputInfo.pVertexAttributeDescriptions = NULL; + + inputAssembly.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; + inputAssembly.pNext = NULL; + inputAssembly.flags = 0; + inputAssembly.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; + inputAssembly.primitiveRestartEnable = VK_FALSE; + + viewport.x = 0.0f; + viewport.y = 0.0f; + viewport.width = (float)ow; + viewport.height = (float)oh; + viewport.minDepth = 0.0f; + viewport.maxDepth = 1.0f; + + scissor.offset = (VkOffset2D){0, 0}; + scissor.extent = (VkExtent2D){(uint32_t)viewport.width, (uint32_t)viewport.height}; + + viewportState = (VkPipelineViewportStateCreateInfo){}; + viewportState.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO; + viewportState.viewportCount = 1; + viewportState.pViewports = &viewport; + viewportState.scissorCount = 1; + viewportState.pScissors = &scissor; + + rasterizer.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO; + rasterizer.pNext = NULL; + rasterizer.flags = 0; + rasterizer.depthClampEnable = VK_FALSE; + rasterizer.rasterizerDiscardEnable = VK_FALSE; + rasterizer.polygonMode = VK_POLYGON_MODE_FILL; + rasterizer.cullMode = VK_CULL_MODE_BACK_BIT; + rasterizer.frontFace = VK_FRONT_FACE_CLOCKWISE; + rasterizer.depthBiasEnable = VK_FALSE; + rasterizer.depthBiasConstantFactor = 0.0; + rasterizer.depthBiasClamp = 0.0; + rasterizer.depthBiasSlopeFactor = 0.0; + rasterizer.lineWidth = 1.0f; + + multisampling.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO; + multisampling.pNext = NULL; + multisampling.flags = 0; + multisampling.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT; + multisampling.sampleShadingEnable = VK_FALSE; + multisampling.minSampleShading = 0.0; + multisampling.pSampleMask = NULL; + multisampling.alphaToCoverageEnable = VK_FALSE; + multisampling.alphaToOneEnable = VK_FALSE; + + colorBlendAttachment.blendEnable = VK_FALSE; + colorBlendAttachment.srcColorBlendFactor = VK_BLEND_FACTOR_ONE; + colorBlendAttachment.dstColorBlendFactor = VK_BLEND_FACTOR_ONE; + colorBlendAttachment.colorBlendOp = VK_BLEND_OP_ADD; + colorBlendAttachment.srcAlphaBlendFactor = VK_BLEND_FACTOR_ZERO; + colorBlendAttachment.dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO; + colorBlendAttachment.alphaBlendOp = VK_BLEND_OP_ADD; + colorBlendAttachment.colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT; + + colorBlending.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; + colorBlending.pNext = NULL; + colorBlending.flags = 0; + colorBlending.logicOpEnable = VK_FALSE; + colorBlending.logicOp = VK_LOGIC_OP_COPY; + colorBlending.attachmentCount = 1; + colorBlending.pAttachments = &colorBlendAttachment; + colorBlending.blendConstants[0] = 0.0f; + colorBlending.blendConstants[1] = 0.0f; + colorBlending.blendConstants[2] = 0.0f; + colorBlending.blendConstants[3] = 0.0f; + + pipelineInfo.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO; + pipelineInfo.pNext = NULL; + pipelineInfo.flags = 0; + pipelineInfo.stageCount = 2; + pipelineInfo.pStages = shaderStages; + pipelineInfo.pVertexInputState = &vertexInputInfo; + pipelineInfo.pInputAssemblyState = &inputAssembly; + pipelineInfo.pTessellationState = NULL; + pipelineInfo.pViewportState = &viewportState; + pipelineInfo.pRasterizationState = &rasterizer; + pipelineInfo.pMultisampleState = &multisampling; + pipelineInfo.pDepthStencilState = NULL; + pipelineInfo.pColorBlendState = &colorBlending; + pipelineInfo.pDynamicState = NULL; + pipelineInfo.layout = pipelineLayout; + pipelineInfo.renderPass = renderPass; + pipelineInfo.subpass = 0; + pipelineInfo.basePipelineHandle = VK_NULL_HANDLE; + pipelineInfo.basePipelineIndex = 0; + + if((res = _vkCreateGraphicsPipelines(device, VK_NULL_HANDLE, 1, &pipelineInfo, NULL, &pipeline)) != VK_SUCCESS) { + printf("failed to create graphics pipeline: %s\n", string_VkResult(res)); + exit(0); + } + + framebuffers = malloc(sizeof(VkFramebuffer) * MAX_FRAMES_IN_FLIGHT); + + framebufferInfo.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO; + framebufferInfo.pNext = NULL; + framebufferInfo.flags = 0; + framebufferInfo.renderPass = renderPass; + framebufferInfo.attachmentCount = 1; + framebufferInfo.width = ow; + framebufferInfo.height = oh; + framebufferInfo.layers = 1; + for(i = 0; i < MAX_FRAMES_IN_FLIGHT; i++) { + framebufferInfo.pAttachments = &swapchainImageView[i]; + if((res = _vkCreateFramebuffer(device, &framebufferInfo, NULL, &framebuffers[i])) != VK_SUCCESS) { + printf("error creating the frame buffer: %s\n", string_VkResult(res)); + exit(0); + } + } + + // Create Command Pool. + poolInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; + poolInfo.pNext = NULL; + poolInfo.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT; + poolInfo.queueFamilyIndex = *graphicsQueueIndex; + + if((res = _vkCreateCommandPool(device, &poolInfo, NULL, &cmdPool)) != VK_SUCCESS) { + printf("error creating the command pool: %s\n", string_VkResult(res)); + exit(0); + } + + // Create Command Buffer to record draw commands. + allocInfo.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; + allocInfo.pNext = NULL; + allocInfo.commandPool = cmdPool; + allocInfo.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; + allocInfo.commandBufferCount = 1; + + cmdBuffers = malloc(sizeof(VkCommandBuffer) * MAX_FRAMES_IN_FLIGHT); + + for(i = 0; i < MAX_FRAMES_IN_FLIGHT; i++) { + if((res = _vkAllocateCommandBuffers(device, &allocInfo, &cmdBuffers[i])) != VK_SUCCESS) { + printf("error allocating the command buffers: %s\n", string_VkResult(res)); + exit(0); + } + } + + fenceInfo.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO; + fenceInfo.pNext = 0; + fenceInfo.flags = VK_FENCE_CREATE_SIGNALED_BIT; + + semaphoreInfo.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO; + semaphoreInfo.pNext = 0; + semaphoreInfo.flags = VK_SEMAPHORE_TYPE_BINARY; + + imageAvaliableSemaphores = malloc(sizeof(VkSemaphore) * MAX_FRAMES_IN_FLIGHT); + renderFinishedSemaphores = malloc(sizeof(VkSemaphore) * MAX_FRAMES_IN_FLIGHT); + fences = malloc(sizeof(VkFence) * MAX_FRAMES_IN_FLIGHT); + + for(i = 0; i < MAX_FRAMES_IN_FLIGHT; i++) { + if(_vkCreateSemaphore(device, &semaphoreInfo, NULL, &imageAvaliableSemaphores[i]) != VK_SUCCESS) { + printf("error creating fence: %s\n", string_VkResult(res)); + exit(0); + } + if(_vkCreateSemaphore(device, &semaphoreInfo, NULL, &renderFinishedSemaphores[i]) != VK_SUCCESS) { + printf("error creating fence: %s\n", string_VkResult(res)); + exit(0); + } + if(_vkCreateFence(device, &fenceInfo, NULL, &fences[i]) != VK_SUCCESS) { + printf("error creating fence: %s\n", string_VkResult(res)); + exit(0); + } + } +} + +int main() { + MwLibraryInit(); + + if(!MwVulkanSupported()) { + printf("Vulkan not found or unsupported on target platform.\n"); + return 1; + } + + window = MwVaCreateWidget(MwWindowClass, "main", NULL, MwDEFAULT, MwDEFAULT, 400, 450, + MwNtitle, "hello world", + NULL); + + vulkan = MwVaCreateWidget(MwVulkanClass, "vulkan", window, 50, 50, ow, oh, + MwNvulkanExtension, VK_KHR_SWAPCHAIN_EXTENSION_NAME, + NULL); + + MwAddUserHandler(window, MwNtickHandler, tick, NULL); + + vulkan_setup(vulkan); + + MwLoop(window); +} diff --git a/widget/milsko/milskosrc/external/libjpeg/README b/widget/milsko/milskosrc/external/libjpeg/README new file mode 100644 index 0000000000..0f4ee15228 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/README @@ -0,0 +1,374 @@ +The Independent JPEG Group's JPEG software +========================================== + +README for release 9f of 14-Jan-2024 +==================================== + +This distribution contains the ninth public release of the Independent JPEG +Group's free JPEG software. You are welcome to redistribute this software and +to use it for any purpose, subject to the conditions under LEGAL ISSUES, below. + +This software is the work of Tom Lane, Guido Vollbeding, Philip Gladstone, +Bill Allombert, Jim Boucher, Lee Crocker, Bob Friesenhahn, Ben Jackson, +John Korejwa, Julian Minguillon, Luis Ortiz, George Phillips, Davide Rossi, +Ge' Weijers, and other members of the Independent JPEG Group. + +IJG is not affiliated with the ISO/IEC JTC1/SC29/WG1 standards committee +(previously known as JPEG, together with ITU-T SG16). + + +DOCUMENTATION ROADMAP +===================== + +This file contains the following sections: + +OVERVIEW General description of JPEG and the IJG software. +LEGAL ISSUES Copyright, lack of warranty, terms of distribution. +REFERENCES Where to learn more about JPEG. +ARCHIVE LOCATIONS Where to find newer versions of this software. +ACKNOWLEDGMENTS Special thanks. +FILE FORMAT WARS Software *not* to get. +TO DO Plans for future IJG releases. + +Other documentation files in the distribution are: + +User documentation: + install.txt How to configure and install the IJG software. + usage.txt Usage instructions for cjpeg, djpeg, jpegtran, + rdjpgcom, and wrjpgcom. + *.1 Unix-style man pages for programs (same info as usage.txt). + wizard.txt Advanced usage instructions for JPEG wizards only. + cdaltui.txt Description of alternate user interface for cjpeg/djpeg. + change.log Version-to-version change highlights. +Programmer and internal documentation: + libjpeg.txt How to use the JPEG library in your own programs. + example.c Sample code for calling the JPEG library. + structure.txt Overview of the JPEG library's internal structure. + filelist.txt Road map of IJG files. + coderules.txt Coding style rules --- please read if you contribute code. + +Please read at least the files install.txt and usage.txt. Some information +can also be found in the JPEG FAQ (Frequently Asked Questions) article. See +ARCHIVE LOCATIONS below to find out where to obtain the FAQ article. + +If you want to understand how the JPEG code works, we suggest reading one or +more of the REFERENCES, then looking at the documentation files (in roughly +the order listed) before diving into the code. + + +OVERVIEW +======== + +This package contains C software to implement JPEG image encoding, decoding, +and transcoding. JPEG (pronounced "jay-peg") is a standardized compression +method for full-color and grayscale images. + +This software implements JPEG baseline, extended-sequential, and progressive +compression processes. Provision is made for supporting all variants of these +processes, although some uncommon parameter settings aren't implemented yet. +We have made no provision for supporting the hierarchical or lossless +processes defined in the standard. + +We provide a set of library routines for reading and writing JPEG image files, +plus two sample applications "cjpeg" and "djpeg", which use the library to +perform conversion between JPEG and some other popular image file formats. +The library is intended to be reused in other applications. + +In order to support file conversion and viewing software, we have included +considerable functionality beyond the bare JPEG coding/decoding capability; +for example, the color quantization modules are not strictly part of JPEG +decoding, but they are essential for output to colormapped file formats or +colormapped displays. These extra functions can be compiled out of the +library if not required for a particular application. + +We have also included "jpegtran", a utility for lossless transcoding between +different JPEG processes, and "rdjpgcom" and "wrjpgcom", two simple +applications for inserting and extracting textual comments in JFIF files. + +The emphasis in designing this software has been on achieving portability and +flexibility, while also making it fast enough to be useful. In particular, +the software is not intended to be read as a tutorial on JPEG. (See the +REFERENCES section for introductory material.) Rather, it is intended to +be reliable, portable, industrial-strength code. We do not claim to have +achieved that goal in every aspect of the software, but we strive for it. + +We welcome the use of this software as a component of commercial products. +No royalty is required, but we do ask for an acknowledgement in product +documentation, as described under LEGAL ISSUES. + + +LEGAL ISSUES +============ + +In plain English: + +1. We don't promise that this software works. (But if you find any bugs, + please let us know!) +2. You can use this software for whatever you want. You don't have to pay us. +3. You may not pretend that you wrote this software. If you use it in a + program, you must acknowledge somewhere in your documentation that + you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", and you, +its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-2024, Thomas G. Lane, Guido Vollbeding. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions: +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived from +it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of +commercial products, provided that all warranty or liability claims are +assumed by the product vendor. + + +The Unix configuration script "configure" was produced with GNU Autoconf. +It is copyright by the Free Software Foundation but is freely distributable. +The same holds for its supporting scripts (config.guess, config.sub, +ltmain.sh). Another support script, install-sh, is copyright by X Consortium +but is also freely distributable. + + +REFERENCES +========== + +We recommend reading one or more of these references before trying to +understand the innards of the JPEG software. + +The best short technical introduction to the JPEG compression algorithm is + Wallace, Gregory K. "The JPEG Still Picture Compression Standard", + Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44. +(Adjacent articles in that issue discuss MPEG motion picture compression, +applications of JPEG, and related topics.) If you don't have the CACM issue +handy, a PDF file containing a revised version of Wallace's article is +available at https://www.ijg.org/files/Wallace.JPEG.pdf. The file (actually +a preprint for an article that appeared in IEEE Trans. Consumer Electronics) +omits the sample images that appeared in CACM, but it includes corrections +and some added material. Note: the Wallace article is copyright ACM and IEEE, +and it may not be used for commercial purposes. + +A somewhat less technical, more leisurely introduction to JPEG can be found in +"The Data Compression Book" by Mark Nelson and Jean-loup Gailly, published by +M&T Books (New York), 2nd ed. 1996, ISBN 1-55851-434-1. This book provides +good explanations and example C code for a multitude of compression methods +including JPEG. It is an excellent source if you are comfortable reading C +code but don't know much about data compression in general. The book's JPEG +sample code is far from industrial-strength, but when you are ready to look +at a full implementation, you've got one here... + +The best currently available description of JPEG is the textbook "JPEG Still +Image Data Compression Standard" by William B. Pennebaker and Joan L. +Mitchell, published by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. +Price US$59.95, 638 pp. The book includes the complete text of the ISO JPEG +standards (DIS 10918-1 and draft DIS 10918-2). +Although this is by far the most detailed and comprehensive exposition of +JPEG publicly available, we point out that it is still missing an explanation +of the most essential properties and algorithms of the underlying DCT +technology. +If you think that you know about DCT-based JPEG after reading this book, +then you are in delusion. The real fundamentals and corresponding potential +of DCT-based JPEG are not publicly known so far, and that is the reason for +all the mistaken developments taking place in the image coding domain. + +The original JPEG standard is divided into two parts, Part 1 being the actual +specification, while Part 2 covers compliance testing methods. Part 1 is +titled "Digital Compression and Coding of Continuous-tone Still Images, +Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS +10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of +Continuous-tone Still Images, Part 2: Compliance testing" and has document +numbers ISO/IEC IS 10918-2, ITU-T T.83. +IJG JPEG 8 introduced an implementation of the JPEG SmartScale extension +which is specified in two documents: A contributed document at ITU and ISO +with title "ITU-T JPEG-Plus Proposal for Extending ITU-T T.81 for Advanced +Image Coding", April 2006, Geneva, Switzerland. The latest version of this +document is Revision 3. And a contributed document ISO/IEC JTC1/SC29/WG1 N +5799 with title "Evolution of JPEG", June/July 2011, Berlin, Germany. +IJG JPEG 9 introduces a reversible color transform for improved lossless +compression which is described in a contributed document ISO/IEC JTC1/SC29/ +WG1 N 6080 with title "JPEG 9 Lossless Coding", June/July 2012, Paris, France. + +The JPEG standard does not specify all details of an interchangeable file +format. For the omitted details we follow the "JFIF" conventions, version 2. +JFIF version 1 has been adopted as Recommendation ITU-T T.871 (05/2011) : +Information technology - Digital compression and coding of continuous-tone +still images: JPEG File Interchange Format (JFIF). It is available as a +free download in PDF file format from https://www.itu.int/rec/T-REC-T.871. +A PDF file of the older JFIF document is available at +https://www.w3.org/Graphics/JPEG/jfif3.pdf. + +The TIFF 6.0 file format specification can be obtained by FTP from +ftp://ftp.sgi.com/graphics/tiff/TIFF6.ps.gz. The JPEG incorporation scheme +found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems. +IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6). +Instead, we recommend the JPEG design proposed by TIFF Technical Note #2 +(Compression tag 7). Copies of this Note can be obtained from +https://www.ijg.org/files/. It is expected that the next revision +of the TIFF spec will replace the 6.0 JPEG design with the Note's design. +Although IJG's own code does not support TIFF/JPEG, the free libtiff library +uses our library to implement TIFF/JPEG per the Note. + + +ARCHIVE LOCATIONS +================= + +The "official" archive site for this software is www.ijg.org. +The most recent released version can always be found there in +directory "files". This particular version will be archived +in Windows-compatible "zip" archive format as +https://www.ijg.org/files/jpegsr9f.zip, and +in Unix-compatible "tar.gz" archive format as +https://www.ijg.org/files/jpegsrc.v9f.tar.gz. + +The JPEG FAQ (Frequently Asked Questions) article is a source of some +general information about JPEG. +It is available on the World Wide Web at http://www.faqs.org/faqs/jpeg-faq/ +and other news.answers archive sites, including the official news.answers +archive at rtfm.mit.edu: ftp://rtfm.mit.edu/pub/usenet/news.answers/jpeg-faq/. +If you don't have Web or FTP access, send e-mail to mail-server@rtfm.mit.edu +with body + send usenet/news.answers/jpeg-faq/part1 + send usenet/news.answers/jpeg-faq/part2 + + +ACKNOWLEDGMENTS +=============== + +Thank to Juergen Bruder for providing me with a copy of the common DCT +algorithm article, only to find out that I had come to the same result +in a more direct and comprehensible way with a more generative approach. + +Thank to Istvan Sebestyen and Joan L. Mitchell for inviting me to the +ITU JPEG (Study Group 16) meeting in Geneva, Switzerland. + +Thank to Thomas Wiegand and Gary Sullivan for inviting me to the +Joint Video Team (MPEG & ITU) meeting in Geneva, Switzerland. + +Thank to Thomas Richter and Daniel Lee for inviting me to the +ISO/IEC JTC1/SC29/WG1 (previously known as JPEG, together with ITU-T SG16) +meeting in Berlin, Germany. + +Thank to John Korejwa and Massimo Ballerini for inviting me to +fruitful consultations in Boston, MA and Milan, Italy. + +Thank to Hendrik Elstner, Roland Fassauer, Simone Zuck, Guenther +Maier-Gerber, Walter Stoeber, Fred Schmitz, and Norbert Braunagel +for corresponding business development. + +Thank to Nico Zschach and Dirk Stelling of the technical support team +at the Digital Images company in Halle for providing me with extra +equipment for configuration tests. + +Thank to Richard F. Lyon (then of Foveon Inc.) for fruitful +communication about JPEG configuration in Sigma Photo Pro software. + +Thank to Andrew Finkenstadt for hosting the ijg.org site. + +Thank to Thomas G. Lane for the original design and development +of this singular software package. + +Thank to Lars Goehler, Andreas Heinecke, Sebastian Fuss, +Yvonne Roebert, Andrej Werner, Ulf-Dietrich Braumann, +and Nina Ssymank for support and public relations. + + +FILE FORMAT WARS +================ + +The ISO/IEC JTC1/SC29/WG1 standards committee (previously known as JPEG, +together with ITU-T SG16) currently promotes different formats containing +the name "JPEG" which is misleading because these formats are incompatible +with original DCT-based JPEG and are based on faulty technologies. +IJG therefore does not and will not support such momentary mistakes +(see REFERENCES). +There exist also distributions under the name "OpenJPEG" promoting such +kind of formats which is misleading because they don't support original +JPEG images. +We have no sympathy for the promotion of inferior formats. Indeed, one of +the original reasons for developing this free software was to help force +convergence on common, interoperable format standards for JPEG files. +Don't use an incompatible file format! +(In any case, our decoder will remain capable of reading existing JPEG +image files indefinitely.) + +The ISO committee pretends to be "responsible for the popular JPEG" in their +public reports which is not true because they don't respond to actual +requirements for the maintenance of the original JPEG specification. +Furthermore, the ISO committee pretends to "ensure interoperability" with +their standards which is not true because their "standards" support only +application-specific and proprietary use cases and contain mathematically +incorrect code. + +There are currently different distributions in circulation containing the +name "libjpeg" which is misleading because they don't have the features and +are incompatible with formats supported by actual IJG libjpeg distributions. +One of those fakes is released by members of the ISO committee and just uses +the name of libjpeg for misdirection of people, similar to the abuse of the +name JPEG as described above, while having nothing in common with actual IJG +libjpeg distributions and containing mathematically incorrect code. +The other one claims to be a "derivative" or "fork" of the original libjpeg, +but violates the license conditions as described under LEGAL ISSUES above +and violates basic C programming properties. +We have no sympathy for the release of misleading, incorrect and illegal +distributions derived from obsolete code bases. +Don't use an obsolete code base! + +According to the UCC (Uniform Commercial Code) law, IJG has the lawful and +legal right to foreclose on certain standardization bodies and other +institutions or corporations that knowingly perform substantial and +systematic deceptive acts and practices, fraud, theft, and damaging of the +value of the people of this planet without their knowing, willing and +intentional consent. +The titles, ownership, and rights of these institutions and all their assets +are now duly secured and held in trust for the free people of this planet. +People of the planet, on every country, may have a financial interest in +the assets of these former principals, agents, and beneficiaries of the +foreclosed institutions and corporations. +IJG asserts what is: that each man, woman, and child has unalienable value +and rights granted and deposited in them by the Creator and not any one of +the people is subordinate to any artificial principality, corporate fiction +or the special interest of another without their appropriate knowing, +willing and intentional consent made by contract or accommodation agreement. +IJG expresses that which already was. +The people have already determined and demanded that public administration +entities, national governments, and their supporting judicial systems must +be fully transparent, accountable, and liable. +IJG has secured the value for all concerned free people of the planet. + +A partial list of foreclosed institutions and corporations ("Hall of Shame") +is currently prepared and will be published later. + + +TO DO +===== + +Version 9 is the second release of a new generation JPEG standard +to overcome the limitations of the original JPEG specification, +and is the first true source reference JPEG codec. +More features are being prepared for coming releases... + +Please send bug reports, offers of help, etc. to jpeg-info@ijg.org. diff --git a/widget/milsko/milskosrc/external/libjpeg/include/cderror.h b/widget/milsko/milskosrc/external/libjpeg/include/cderror.h new file mode 100644 index 0000000000..bb45b06647 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/include/cderror.h @@ -0,0 +1,136 @@ +/* + * cderror.h + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * Modified 2009-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the error and message codes for the cjpeg/djpeg + * applications. These strings are not needed as part of the JPEG library + * proper. + * Edit this file to add new codes, or to translate the message strings to + * some other language. + */ + +/* + * To define the enum list of message codes, include this file without + * defining macro JMESSAGE. To create a message string table, include it + * again with a suitable JMESSAGE definition (see jerror.c for an example). + */ +#ifndef JMESSAGE +#ifndef CDERROR_H +#define CDERROR_H +/* First time through, define the enum list */ +#define JMAKE_ENUM_LIST +#else +/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ +#define JMESSAGE(code,string) +#endif /* CDERROR_H */ +#endif /* JMESSAGE */ + +#ifdef JMAKE_ENUM_LIST + +typedef enum { + +#define JMESSAGE(code,string) code , + +#endif /* JMAKE_ENUM_LIST */ + +JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */ + +#ifdef BMP_SUPPORTED +JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format") +JMESSAGE(JERR_BMP_BADDEPTH, "Only 8-, 24-, and 32-bit BMP files are supported") +JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length") +JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1") +JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB") +JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported") +JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM") +JMESSAGE(JERR_BMP_OUTOFRANGE, "Numeric value out of range in BMP file") +JMESSAGE(JTRC_BMP, "%ux%u %d-bit BMP image") +JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image") +JMESSAGE(JTRC_BMP_OS2, "%ux%u %d-bit OS2 BMP image") +JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image") +#endif /* BMP_SUPPORTED */ + +#ifdef GIF_SUPPORTED +JMESSAGE(JERR_GIF_BUG, "GIF output got confused") +JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d") +JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB") +JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file") +JMESSAGE(JERR_GIF_NOT, "Not a GIF file") +JMESSAGE(JERR_GIF_OUTOFRANGE, "Numeric value out of range in GIF file") +JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image") +JMESSAGE(JTRC_GIF_BADVERSION, + "Warning: unexpected GIF version number '%c%c%c'") +JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x") +JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input") +JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file") +JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring") +JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image") +JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits") +#endif /* GIF_SUPPORTED */ + +#ifdef PPM_SUPPORTED +JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB") +JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file") +JMESSAGE(JERR_PPM_NOT, "Not a PPM/PGM file") +JMESSAGE(JERR_PPM_OUTOFRANGE, "Numeric value out of range in PPM file") +JMESSAGE(JTRC_PGM, "%ux%u PGM image") +JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image") +JMESSAGE(JTRC_PPM, "%ux%u PPM image") +JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image") +#endif /* PPM_SUPPORTED */ + +#ifdef RLE_SUPPORTED +JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library") +JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB") +JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE") +JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file") +JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header") +JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header") +JMESSAGE(JERR_RLE_NOT, "Not an RLE file") +JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE") +JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup") +JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file") +JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d") +JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file") +JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d") +JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d") +#endif /* RLE_SUPPORTED */ + +#ifdef TARGA_SUPPORTED +JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format") +JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file") +JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB") +JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image") +JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image") +JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image") +#else +JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled") +#endif /* TARGA_SUPPORTED */ + +JMESSAGE(JERR_BAD_CMAP_FILE, + "Color map file is invalid or of unsupported format") +JMESSAGE(JERR_TOO_MANY_COLORS, + "Output file format cannot handle %d colormap entries") +JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed") +#ifdef TARGA_SUPPORTED +JMESSAGE(JERR_UNKNOWN_FORMAT, + "Unrecognized input file format --- perhaps you need -targa") +#else +JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format") +#endif +JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format") + +#ifdef JMAKE_ENUM_LIST + + JMSG_LASTADDONCODE +} ADDON_MESSAGE_CODE; + +#undef JMAKE_ENUM_LIST +#endif /* JMAKE_ENUM_LIST */ + +/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ +#undef JMESSAGE diff --git a/widget/milsko/milskosrc/external/libjpeg/include/cdjpeg.h b/widget/milsko/milskosrc/external/libjpeg/include/cdjpeg.h new file mode 100644 index 0000000000..524ab3a27e --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/include/cdjpeg.h @@ -0,0 +1,189 @@ +/* + * cdjpeg.h + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * Modified 2019 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains common declarations for the sample applications + * cjpeg and djpeg. It is NOT used by the core JPEG library. + */ + +#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */ +#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jerror.h" /* get library error codes too */ +#include "cderror.h" /* get application-specific error codes */ + + +/* + * Object interface for cjpeg's source file decoding modules + */ + +typedef struct cjpeg_source_struct * cjpeg_source_ptr; + +struct cjpeg_source_struct { + JMETHOD(void, start_input, (j_compress_ptr cinfo, + cjpeg_source_ptr sinfo)); + JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, + cjpeg_source_ptr sinfo)); + JMETHOD(void, finish_input, (j_compress_ptr cinfo, + cjpeg_source_ptr sinfo)); + + FILE *input_file; + + JSAMPARRAY buffer; + JDIMENSION buffer_height; +}; + + +/* + * Object interface for djpeg's output file encoding modules + */ + +typedef struct djpeg_dest_struct * djpeg_dest_ptr; + +struct djpeg_dest_struct { + /* start_output is called after jpeg_start_decompress finishes. + * The color map will be ready at this time, if one is needed. + */ + JMETHOD(void, start_output, (j_decompress_ptr cinfo, + djpeg_dest_ptr dinfo)); + /* Emit the specified number of pixel rows from the buffer. */ + JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo, + djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied)); + /* Finish up at the end of the image. */ + JMETHOD(void, finish_output, (j_decompress_ptr cinfo, + djpeg_dest_ptr dinfo)); + + /* Target file spec; filled in by djpeg.c after object is created. */ + FILE * output_file; + + /* Output pixel-row buffer. Created by module init or start_output. + * Width is cinfo->output_width * cinfo->output_components; + * height is buffer_height. + */ + JSAMPARRAY buffer; + JDIMENSION buffer_height; +}; + + +/* + * cjpeg/djpeg may need to perform extra passes to convert to or from + * the source/destination file format. The JPEG library does not know + * about these passes, but we'd like them to be counted by the progress + * monitor. We use an expanded progress monitor object to hold the + * additional pass count. + */ + +struct cdjpeg_progress_mgr { + struct jpeg_progress_mgr pub; /* fields known to JPEG library */ + int completed_extra_passes; /* extra passes completed */ + int total_extra_passes; /* total extra */ + /* last printed percentage stored here to avoid multiple printouts */ + int percent_done; +}; + +typedef struct cdjpeg_progress_mgr * cd_progress_ptr; + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jinit_read_bmp jIRdBMP +#define jinit_write_bmp jIWrBMP +#define jinit_read_gif jIRdGIF +#define jinit_write_gif jIWrGIF +#define jinit_read_ppm jIRdPPM +#define jinit_write_ppm jIWrPPM +#define jinit_read_rle jIRdRLE +#define jinit_write_rle jIWrRLE +#define jinit_read_targa jIRdTarga +#define jinit_write_targa jIWrTarga +#define read_quant_tables RdQTables +#define read_scan_script RdScnScript +#define set_quality_ratings SetQRates +#define set_quant_slots SetQSlots +#define set_sample_factors SetSFacts +#define read_color_map RdCMap +#define enable_signal_catcher EnSigCatcher +#define start_progress_monitor StProgMon +#define end_progress_monitor EnProgMon +#define read_stdin RdStdin +#define write_stdout WrStdout +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +/* Module selection routines for I/O modules. */ + +EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo, + boolean is_os2)); +EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo, + boolean is_lzw)); +EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo)); +EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo)); +EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo)); + +/* cjpeg support routines (in rdswitch.c) */ + +EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename, + boolean force_baseline)); +EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename)); +EXTERN(boolean) set_quality_ratings JPP((j_compress_ptr cinfo, char *arg, + boolean force_baseline)); +EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg)); +EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg)); + +/* djpeg support routines (in rdcolmap.c) */ + +EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile)); + +/* common support routines (in cdjpeg.c) */ + +EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo)); +EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo, + cd_progress_ptr progress)); +EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo)); +EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars)); +EXTERN(FILE *) read_stdin JPP((void)); +EXTERN(FILE *) write_stdout JPP((void)); + +/* miscellaneous useful macros */ + +#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ +#define READ_BINARY "r" +#define WRITE_BINARY "w" +#else +#ifdef VMS /* VMS is very nonstandard */ +#define READ_BINARY "rb", "ctx=stm" +#define WRITE_BINARY "wb", "ctx=stm" +#else /* standard ANSI-compliant case */ +#define READ_BINARY "rb" +#define WRITE_BINARY "wb" +#endif +#endif + +#ifndef EXIT_FAILURE /* define exit() codes if not provided */ +#define EXIT_FAILURE 1 +#endif +#ifndef EXIT_SUCCESS +#ifdef VMS +#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ +#else +#define EXIT_SUCCESS 0 +#endif +#endif +#ifndef EXIT_WARNING +#ifdef VMS +#define EXIT_WARNING 1 /* VMS is very nonstandard */ +#else +#define EXIT_WARNING 2 +#endif +#endif diff --git a/widget/milsko/milskosrc/external/libjpeg/include/jconfig.h b/widget/milsko/milskosrc/external/libjpeg/include/jconfig.h new file mode 100644 index 0000000000..eb36ad04b2 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/include/jconfig.h @@ -0,0 +1,64 @@ +/* jconfig.h. Generated from jconfig.cfg by configure. */ +/* jconfig.cfg --- source file edited by configure script */ +/* see jconfig.txt for explanations */ + +#define HAVE_PROTOTYPES 1 +#define HAVE_UNSIGNED_CHAR 1 +#define HAVE_UNSIGNED_SHORT 1 +/* #undef void */ +/* #undef const */ +/* #undef CHAR_IS_UNSIGNED */ +#define HAVE_STDDEF_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_LOCALE_H 1 +/* #undef NEED_BSD_STRINGS */ +/* #undef NEED_SYS_TYPES_H */ +/* #undef NEED_FAR_POINTERS */ +/* #undef NEED_SHORT_EXTERNAL_NAMES */ +/* Define this if you get warnings about undefined structures. */ +/* #undef INCOMPLETE_TYPES_BROKEN */ + +/* Define "boolean" as unsigned char, not enum, on Windows systems. */ +#ifdef _WIN32 +#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ +typedef unsigned char boolean; +#endif +#ifndef FALSE /* in case these macros already exist */ +#define FALSE 0 /* values of boolean */ +#endif +#ifndef TRUE +#define TRUE 1 +#endif +#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ +#endif + +#ifdef JPEG_INTERNALS + +/* #undef RIGHT_SHIFT_IS_UNSIGNED */ +#ifdef __WATCOMC__ +#define INLINE +#else +#define INLINE __inline__ +#endif +/* These are for configuring the JPEG memory manager. */ +/* #undef DEFAULT_MAX_MEM */ +/* #undef NO_MKTEMP */ + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +/* #undef RLE_SUPPORTED */ +#define TARGA_SUPPORTED /* Targa image file format */ + +/* #undef TWO_FILE_COMMANDLINE */ +/* #undef NEED_SIGNAL_CATCHER */ +/* #undef DONT_USE_B_MODE */ + +/* Define this if you want percent-done progress reports from cjpeg/djpeg. */ +/* #undef PROGRESS_REPORT */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/widget/milsko/milskosrc/external/libjpeg/include/jdct.h b/widget/milsko/milskosrc/external/libjpeg/include/jdct.h new file mode 100644 index 0000000000..0f251590c4 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/include/jdct.h @@ -0,0 +1,409 @@ +/* + * jdct.h + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2002-2023 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This include file contains common declarations for the forward and + * inverse DCT modules. These declarations are private to the DCT managers + * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms. + * The individual DCT algorithms are kept in separate files to ease + * machine-dependent tuning (e.g., assembly coding). + */ + + +/* + * A forward DCT routine is given a pointer to an input sample array and + * a pointer to a work area of type DCTELEM[]; the DCT is to be performed + * in-place in that buffer. Type DCTELEM is int for 8-bit samples, INT32 + * for 12-bit samples. (NOTE: Floating-point DCT implementations use an + * array of type FAST_FLOAT, instead.) + * The input data is to be fetched from the sample array starting at a + * specified column. (Any row offset needed will be applied to the array + * pointer before it is passed to the FDCT code.) + * Note that the number of samples fetched by the FDCT routine is + * DCT_h_scaled_size * DCT_v_scaled_size. + * The DCT outputs are returned scaled up by a factor of 8; they therefore + * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This + * convention improves accuracy in integer implementations and saves some + * work in floating-point ones. + * Quantization of the output coefficients is done by jcdctmgr.c. + */ + +#if BITS_IN_JSAMPLE == 8 +typedef int DCTELEM; /* 16 or 32 bits is fine */ +#else +typedef INT32 DCTELEM; /* must have 32 bits */ +#endif + +typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data, + JSAMPARRAY sample_data, + JDIMENSION start_col)); +typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data, + JSAMPARRAY sample_data, + JDIMENSION start_col)); + + +/* + * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer + * to an output sample array. The routine must dequantize the input data as + * well as perform the IDCT; for dequantization, it uses the multiplier table + * pointed to by compptr->dct_table. The output data is to be placed into the + * sample array starting at a specified column. (Any row offset needed will + * be applied to the array pointer before it is passed to the IDCT code.) + * Note that the number of samples emitted by the IDCT routine is + * DCT_h_scaled_size * DCT_v_scaled_size. + */ + +/* typedef inverse_DCT_method_ptr is declared in jpegint.h */ + +/* + * Each IDCT routine has its own ideas about the best dct_table element type. + */ + +typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */ +#if BITS_IN_JSAMPLE == 8 +typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */ +#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */ +#else +typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */ +#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */ +#endif +typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */ + + +/* + * Each IDCT routine is responsible for range-limiting its results and + * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could + * be quite far out of range if the input data is corrupt, so a bulletproof + * range-limiting step is required. We use a mask-and-table-lookup method + * to do the combined operations quickly, assuming that RANGE_CENTER + * (defined in jpegint.h) is a power of 2. See the comments with + * prepare_range_limit_table (in jdmaster.c) for more info. + */ + +#define RANGE_MASK (RANGE_CENTER * 2 - 1) +#define RANGE_SUBSET (RANGE_CENTER - CENTERJSAMPLE) + +#define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit - RANGE_SUBSET) + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_fdct_islow jFDislow +#define jpeg_fdct_ifast jFDifast +#define jpeg_fdct_float jFDfloat +#define jpeg_fdct_7x7 jFD7x7 +#define jpeg_fdct_6x6 jFD6x6 +#define jpeg_fdct_5x5 jFD5x5 +#define jpeg_fdct_4x4 jFD4x4 +#define jpeg_fdct_3x3 jFD3x3 +#define jpeg_fdct_2x2 jFD2x2 +#define jpeg_fdct_1x1 jFD1x1 +#define jpeg_fdct_9x9 jFD9x9 +#define jpeg_fdct_10x10 jFD10x10 +#define jpeg_fdct_11x11 jFD11x11 +#define jpeg_fdct_12x12 jFD12x12 +#define jpeg_fdct_13x13 jFD13x13 +#define jpeg_fdct_14x14 jFD14x14 +#define jpeg_fdct_15x15 jFD15x15 +#define jpeg_fdct_16x16 jFD16x16 +#define jpeg_fdct_16x8 jFD16x8 +#define jpeg_fdct_14x7 jFD14x7 +#define jpeg_fdct_12x6 jFD12x6 +#define jpeg_fdct_10x5 jFD10x5 +#define jpeg_fdct_8x4 jFD8x4 +#define jpeg_fdct_6x3 jFD6x3 +#define jpeg_fdct_4x2 jFD4x2 +#define jpeg_fdct_2x1 jFD2x1 +#define jpeg_fdct_8x16 jFD8x16 +#define jpeg_fdct_7x14 jFD7x14 +#define jpeg_fdct_6x12 jFD6x12 +#define jpeg_fdct_5x10 jFD5x10 +#define jpeg_fdct_4x8 jFD4x8 +#define jpeg_fdct_3x6 jFD3x6 +#define jpeg_fdct_2x4 jFD2x4 +#define jpeg_fdct_1x2 jFD1x2 +#define jpeg_idct_islow jRDislow +#define jpeg_idct_ifast jRDifast +#define jpeg_idct_float jRDfloat +#define jpeg_idct_7x7 jRD7x7 +#define jpeg_idct_6x6 jRD6x6 +#define jpeg_idct_5x5 jRD5x5 +#define jpeg_idct_4x4 jRD4x4 +#define jpeg_idct_3x3 jRD3x3 +#define jpeg_idct_2x2 jRD2x2 +#define jpeg_idct_1x1 jRD1x1 +#define jpeg_idct_9x9 jRD9x9 +#define jpeg_idct_10x10 jRD10x10 +#define jpeg_idct_11x11 jRD11x11 +#define jpeg_idct_12x12 jRD12x12 +#define jpeg_idct_13x13 jRD13x13 +#define jpeg_idct_14x14 jRD14x14 +#define jpeg_idct_15x15 jRD15x15 +#define jpeg_idct_16x16 jRD16x16 +#define jpeg_idct_16x8 jRD16x8 +#define jpeg_idct_14x7 jRD14x7 +#define jpeg_idct_12x6 jRD12x6 +#define jpeg_idct_10x5 jRD10x5 +#define jpeg_idct_8x4 jRD8x4 +#define jpeg_idct_6x3 jRD6x3 +#define jpeg_idct_4x2 jRD4x2 +#define jpeg_idct_2x1 jRD2x1 +#define jpeg_idct_8x16 jRD8x16 +#define jpeg_idct_7x14 jRD7x14 +#define jpeg_idct_6x12 jRD6x12 +#define jpeg_idct_5x10 jRD5x10 +#define jpeg_idct_4x8 jRD4x8 +#define jpeg_idct_3x6 jRD3x6 +#define jpeg_idct_2x4 jRD2x4 +#define jpeg_idct_1x2 jRD1x2 +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +/* Extern declarations for the forward and inverse DCT routines. */ + +EXTERN(void) jpeg_fdct_islow + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_ifast + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_float + JPP((FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_7x7 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_6x6 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_5x5 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_4x4 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_3x3 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_2x2 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_1x1 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_9x9 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_10x10 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_11x11 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_12x12 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_13x13 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_14x14 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_15x15 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_16x16 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_16x8 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_14x7 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_12x6 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_10x5 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_8x4 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_6x3 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_4x2 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_2x1 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_8x16 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_7x14 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_6x12 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_5x10 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_4x8 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_3x6 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_2x4 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); +EXTERN(void) jpeg_fdct_1x2 + JPP((DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)); + +EXTERN(void) jpeg_idct_islow + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_ifast + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_float + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_7x7 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_6x6 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_5x5 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_4x4 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_3x3 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_2x2 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_1x1 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_9x9 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_10x10 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_11x11 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_12x12 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_13x13 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_14x14 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_15x15 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_16x16 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_16x8 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_14x7 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_12x6 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_10x5 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_8x4 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_6x3 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_4x2 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_2x1 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_8x16 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_7x14 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_6x12 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_5x10 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_4x8 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_3x6 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_2x4 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_1x2 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); + + +/* + * Macros for handling fixed-point arithmetic; these are used by many + * but not all of the DCT/IDCT modules. + * + * All values are expected to be of type INT32. + * Fractional constants are scaled left by CONST_BITS bits. + * CONST_BITS is defined within each module using these macros, + * and may differ from one module to the next. + */ + +#define ONE ((INT32) 1) +#define CONST_SCALE (ONE << CONST_BITS) + +/* Convert a positive real constant to an integer scaled by CONST_SCALE. + * Caution: some C compilers fail to reduce "FIX(constant)" at compile time, + * thus causing a lot of useless floating-point operations at run time. + */ + +#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * This macro is used only when the two inputs will actually be no more than + * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a + * full 32x32 multiply. This provides a useful speedup on many machines. + * Unfortunately there is no way to specify a 16x16->32 multiply portably + * in C, but some C compilers will do the right thing if you provide the + * correct combination of casts. + */ + +#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ +#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const))) +#endif +#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ +#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const))) +#endif + +#ifndef MULTIPLY16C16 /* default definition */ +#define MULTIPLY16C16(var,const) ((var) * (const)) +#endif + +/* Same except both inputs are variables. */ + +#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ +#define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) +#endif + +#ifndef MULTIPLY16V16 /* default definition */ +#define MULTIPLY16V16(var1,var2) ((var1) * (var2)) +#endif + +/* Like RIGHT_SHIFT, but applies to a DCTELEM. + * We assume that int right shift is unsigned if INT32 right shift is. + */ + +#ifdef RIGHT_SHIFT_IS_UNSIGNED +#define ISHIFT_TEMPS DCTELEM ishift_temp; +#if BITS_IN_JSAMPLE == 8 +#define DCTELEMBITS 16 /* DCTELEM may be 16 or 32 bits */ +#else +#define DCTELEMBITS 32 /* DCTELEM must be 32 bits */ +#endif +#define IRIGHT_SHIFT(x,shft) \ + ((ishift_temp = (x)) < 0 ? \ + (ishift_temp >> (shft)) | ((~((DCTELEM) 0)) << (DCTELEMBITS-(shft))) : \ + (ishift_temp >> (shft))) +#else +#define ISHIFT_TEMPS +#define IRIGHT_SHIFT(x,shft) ((x) >> (shft)) +#endif diff --git a/widget/milsko/milskosrc/external/libjpeg/include/jerror.h b/widget/milsko/milskosrc/external/libjpeg/include/jerror.h new file mode 100644 index 0000000000..db608b9c09 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/include/jerror.h @@ -0,0 +1,304 @@ +/* + * jerror.h + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * Modified 1997-2018 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the error and message codes for the JPEG library. + * Edit this file to add new codes, or to translate the message strings to + * some other language. + * A set of error-reporting macros are defined too. Some applications using + * the JPEG library may wish to include this file to get the error codes + * and/or the macros. + */ + +/* + * To define the enum list of message codes, include this file without + * defining macro JMESSAGE. To create a message string table, include it + * again with a suitable JMESSAGE definition (see jerror.c for an example). + */ +#ifndef JMESSAGE +#ifndef JERROR_H +/* First time through, define the enum list */ +#define JMAKE_ENUM_LIST +#else +/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ +#define JMESSAGE(code,string) +#endif /* JERROR_H */ +#endif /* JMESSAGE */ + +#ifdef JMAKE_ENUM_LIST + +typedef enum { + +#define JMESSAGE(code,string) code , + +#endif /* JMAKE_ENUM_LIST */ + +JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ + +/* For maintenance convenience, list is alphabetical by message code name */ +JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") +JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") +JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") +JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") +JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") +JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") +JMESSAGE(JERR_BAD_DCTSIZE, "DCT scaled block size %dx%d not supported") +JMESSAGE(JERR_BAD_DROP_SAMPLING, + "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") +JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") +JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") +JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") +JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") +JMESSAGE(JERR_BAD_LIB_VERSION, + "Wrong JPEG library version: library is %d, caller expects %d") +JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") +JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") +JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") +JMESSAGE(JERR_BAD_PROGRESSION, + "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d") +JMESSAGE(JERR_BAD_PROG_SCRIPT, + "Invalid progressive parameters at scan script entry %d") +JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") +JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") +JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") +JMESSAGE(JERR_BAD_STRUCT_SIZE, + "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") +JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") +JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") +JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") +JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") +JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") +JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") +JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") +JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") +JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") +JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") +JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") +JMESSAGE(JERR_EMS_READ, "Read from EMS failed") +JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") +JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") +JMESSAGE(JERR_FILE_READ, "Input file read error") +JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") +JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") +JMESSAGE(JERR_HUFF_CLEN_OUTOFBOUNDS, "Huffman code size table out of bounds") +JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") +JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") +JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") +JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") +JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, + "Cannot transcode due to multiple use of quantization table %d") +JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") +JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") +JMESSAGE(JERR_NOTIMPL, "Not implemented yet") +JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") +JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") +JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") +JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") +JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") +JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") +JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") +JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") +JMESSAGE(JERR_QUANT_COMPONENTS, + "Cannot quantize more than %d color components") +JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") +JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") +JMESSAGE(JERR_SOF_BEFORE, "Invalid JPEG file structure: %s before SOF") +JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") +JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") +JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") +JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") +JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") +JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") +JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") +JMESSAGE(JERR_TFILE_WRITE, + "Write failed on temporary file --- out of disk space?") +JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") +JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") +JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") +JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") +JMESSAGE(JERR_XMS_READ, "Read from XMS failed") +JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") +JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT) +JMESSAGE(JMSG_VERSION, JVERSION) +JMESSAGE(JTRC_16BIT_TABLES, + "Caution: quantization tables are too coarse for baseline JPEG") +JMESSAGE(JTRC_ADOBE, + "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") +JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") +JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") +JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") +JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") +JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") +JMESSAGE(JTRC_DRI, "Define Restart Interval %u") +JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") +JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") +JMESSAGE(JTRC_EOI, "End Of Image") +JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") +JMESSAGE(JTRC_JFIF, "JFIF APP0 marker: version %d.%02d, density %dx%d %d") +JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, + "Warning: thumbnail image size does not match data length %u") +JMESSAGE(JTRC_JFIF_EXTENSION, + "JFIF extension marker: type 0x%02x, length %u") +JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") +JMESSAGE(JTRC_MISC_MARKER, "Miscellaneous marker 0x%02x, length %u") +JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") +JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") +JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") +JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") +JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") +JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") +JMESSAGE(JTRC_RST, "RST%d") +JMESSAGE(JTRC_SMOOTH_NOTIMPL, + "Smoothing not supported with nonstandard sampling ratios") +JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") +JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") +JMESSAGE(JTRC_SOI, "Start of Image") +JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") +JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") +JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") +JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") +JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") +JMESSAGE(JTRC_THUMB_JPEG, + "JFIF extension marker: JPEG-compressed thumbnail image, length %u") +JMESSAGE(JTRC_THUMB_PALETTE, + "JFIF extension marker: palette thumbnail image, length %u") +JMESSAGE(JTRC_THUMB_RGB, + "JFIF extension marker: RGB thumbnail image, length %u") +JMESSAGE(JTRC_UNKNOWN_IDS, + "Unrecognized component IDs %d %d %d, assuming YCbCr") +JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") +JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") +JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") +JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") +JMESSAGE(JWRN_BOGUS_PROGRESSION, + "Inconsistent progression sequence for component %d coefficient %d") +JMESSAGE(JWRN_EXTRANEOUS_DATA, + "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") +JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") +JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") +JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") +JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") +JMESSAGE(JWRN_MUST_RESYNC, + "Corrupt JPEG data: found marker 0x%02x instead of RST%d") +JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") +JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") + +#ifdef JMAKE_ENUM_LIST + + JMSG_LASTMSGCODE +} J_MESSAGE_CODE; + +#undef JMAKE_ENUM_LIST +#endif /* JMAKE_ENUM_LIST */ + +/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ +#undef JMESSAGE + + +#ifndef JERROR_H +#define JERROR_H + +/* Macros to simplify using the error and trace message stuff */ +/* The first parameter is either type of cinfo pointer */ + +/* Fatal errors (print message and exit) */ +#define ERREXIT(cinfo,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT1(cinfo,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT2(cinfo,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT3(cinfo,code,p1,p2,p3) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT4(cinfo,code,p1,p2,p3,p4) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (cinfo)->err->msg_parm.i[3] = (p4), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT6(cinfo,code,p1,p2,p3,p4,p5,p6) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (cinfo)->err->msg_parm.i[3] = (p4), \ + (cinfo)->err->msg_parm.i[4] = (p5), \ + (cinfo)->err->msg_parm.i[5] = (p6), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXITS(cinfo,code,str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) + +#define MAKESTMT(stuff) do { stuff } while (0) + +/* Nonfatal errors (we can keep going, but the data is probably corrupt) */ +#define WARNMS(cinfo,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) +#define WARNMS1(cinfo,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) +#define WARNMS2(cinfo,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) + +/* Informational/debugging messages */ +#define TRACEMS(cinfo,lvl,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS1(cinfo,lvl,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS2(cinfo,lvl,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS5(cinfo,lvl,code,p1,p2,p3,p4,p5) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMSS(cinfo,lvl,code,str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) + +#endif /* JERROR_H */ diff --git a/widget/milsko/milskosrc/external/libjpeg/include/jinclude.h b/widget/milsko/milskosrc/external/libjpeg/include/jinclude.h new file mode 100644 index 0000000000..12ea8cd2fd --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/include/jinclude.h @@ -0,0 +1,157 @@ +/* + * jinclude.h + * + * Copyright (C) 1991-1994, Thomas G. Lane. + * Modified 2017-2022 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file exists to provide a single place to fix any problems with + * including the wrong system include files. (Common problems are taken + * care of by the standard jconfig symbols, but on really weird systems + * you may have to edit this file.) + * + * NOTE: this file is NOT intended to be included by applications using + * the JPEG library. Most applications need only include jpeglib.h. + */ + + +/* Include auto-config file to find out which system include files we need. */ + +#include "jconfig.h" /* auto configuration options */ +#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ + +/* + * We need the NULL macro and size_t typedef. + * On an ANSI-conforming system it is sufficient to include . + * Otherwise, we get them from or ; we may have to + * pull in as well. + * Note that the core JPEG library does not require ; + * only the default error handler and data source/destination modules do. + * But we must pull it in because of the references to FILE in jpeglib.h. + * You can remove those references if you want to compile without . + */ + +#ifdef HAVE_STDDEF_H +#include +#endif + +#ifdef HAVE_STDLIB_H +#include +#endif + +#ifdef NEED_SYS_TYPES_H +#include +#endif + +#include + +/* + * We need memory copying and zeroing functions, plus strncpy(). + * ANSI and System V implementations declare these in . + * BSD doesn't have the mem() functions, but it does have bcopy()/bzero(). + * Some systems may declare memset and memcpy in . + * + * NOTE: we assume the size parameters to these functions are of type size_t. + * Change the casts in these macros if not! + */ + +#ifdef NEED_BSD_STRINGS + +#include +#define MEMZERO(target,size) bzero((void *)(target), (size_t)(size)) +#define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size)) + +#else /* not BSD, assume ANSI/SysV string lib */ + +#include +#define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size)) +#define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size)) + +#endif + +/* + * In ANSI C, and indeed any rational implementation, size_t is also the + * type returned by sizeof(). However, it seems there are some irrational + * implementations out there, in which sizeof() returns an int even though + * size_t is defined as long or unsigned long. To ensure consistent results + * we always use this SIZEOF() macro in place of using sizeof() directly. + */ + +#define SIZEOF(object) ((size_t) sizeof(object)) + +/* + * The modules that use fread() and fwrite() always invoke them through + * these macros. On some systems you may need to twiddle the argument casts. + * CAUTION: argument order is different from underlying functions! + * + * Furthermore, macros are provided for fflush() and ferror() in order + * to facilitate adaption by applications using an own FILE class. + * + * You can define your own custom file I/O functions in jconfig.h and + * #define JPEG_HAVE_FILE_IO_CUSTOM there to prevent redefinition here. + * + * You can #define JPEG_USE_FILE_IO_CUSTOM in jconfig.h to use custom file + * I/O functions implemented in Delphi VCL (Visual Component Library) + * in Vcl.Imaging.jpeg.pas for the TJPEGImage component utilizing + * the Delphi RTL (Run-Time Library) TMemoryStream component: + * + * procedure jpeg_stdio_src(var cinfo: jpeg_decompress_struct; + * input_file: TStream); external; + * + * procedure jpeg_stdio_dest(var cinfo: jpeg_compress_struct; + * output_file: TStream); external; + * + * function jfread(var buf; recsize, reccount: Integer; S: TStream): Integer; + * begin + * Result := S.Read(buf, recsize * reccount); + * end; + * + * function jfwrite(const buf; recsize, reccount: Integer; S: TStream): Integer; + * begin + * Result := S.Write(buf, recsize * reccount); + * end; + * + * function jfflush(S: TStream): Integer; + * begin + * Result := 0; + * end; + * + * function jferror(S: TStream): Integer; + * begin + * Result := 0; + * end; + * + * TMemoryStream of Delphi RTL has the distinctive feature to provide dynamic + * memory buffer management with a file/stream-based interface, particularly for + * the write (output) operation, which is easier to apply compared with direct + * implementations as given in jdatadst.c for memory destination. Those direct + * implementations of dynamic memory write tend to be more difficult to use, + * so providing an option like TMemoryStream may be a useful alternative. + * + * The CFile/CMemFile classes of the Microsoft Foundation Class (MFC) Library + * may be used in a similar fashion. + */ + +#ifndef JPEG_HAVE_FILE_IO_CUSTOM +#ifdef JPEG_USE_FILE_IO_CUSTOM +extern size_t jfread(void * __ptr, size_t __size, size_t __n, FILE * __stream); +extern size_t jfwrite(const void * __ptr, size_t __size, size_t __n, FILE * __stream); +extern int jfflush(FILE * __stream); +extern int jferror(FILE * __fp); + +#define JFREAD(file,buf,sizeofbuf) \ + ((size_t) jfread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) +#define JFWRITE(file,buf,sizeofbuf) \ + ((size_t) jfwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) +#define JFFLUSH(file) jfflush(file) +#define JFERROR(file) jferror(file) +#else +#define JFREAD(file,buf,sizeofbuf) \ + ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) +#define JFWRITE(file,buf,sizeofbuf) \ + ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) +#define JFFLUSH(file) fflush(file) +#define JFERROR(file) ferror(file) +#endif +#endif diff --git a/widget/milsko/milskosrc/external/libjpeg/include/jmemsys.h b/widget/milsko/milskosrc/external/libjpeg/include/jmemsys.h new file mode 100644 index 0000000000..6c3c6d348f --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/include/jmemsys.h @@ -0,0 +1,198 @@ +/* + * jmemsys.h + * + * Copyright (C) 1992-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This include file defines the interface between the system-independent + * and system-dependent portions of the JPEG memory manager. No other + * modules need include it. (The system-independent portion is jmemmgr.c; + * there are several different versions of the system-dependent portion.) + * + * This file works as-is for the system-dependent memory managers supplied + * in the IJG distribution. You may need to modify it if you write a + * custom memory manager. If system-dependent changes are needed in + * this file, the best method is to #ifdef them based on a configuration + * symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR + * and USE_MAC_MEMMGR. + */ + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_get_small jGetSmall +#define jpeg_free_small jFreeSmall +#define jpeg_get_large jGetLarge +#define jpeg_free_large jFreeLarge +#define jpeg_mem_available jMemAvail +#define jpeg_open_backing_store jOpenBackStore +#define jpeg_mem_init jMemInit +#define jpeg_mem_term jMemTerm +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* + * These two functions are used to allocate and release small chunks of + * memory. (Typically the total amount requested through jpeg_get_small is + * no more than 20K or so; this will be requested in chunks of a few K each.) + * Behavior should be the same as for the standard library functions malloc + * and free; in particular, jpeg_get_small must return NULL on failure. + * On most systems, these ARE malloc and free. jpeg_free_small is passed the + * size of the object being freed, just in case it's needed. + * On an 80x86 machine using small-data memory model, these manage near heap. + */ + +EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject)); +EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object, + size_t sizeofobject)); + +/* + * These two functions are used to allocate and release large chunks of + * memory (up to the total free space designated by jpeg_mem_available). + * The interface is the same as above, except that on an 80x86 machine, + * far pointers are used. On most other machines these are identical to + * the jpeg_get/free_small routines; but we keep them separate anyway, + * in case a different allocation strategy is desirable for large chunks. + */ + +EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo, + size_t sizeofobject)); +EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object, + size_t sizeofobject)); + +/* + * The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may + * be requested in a single call to jpeg_get_large (and jpeg_get_small for that + * matter, but that case should never come into play). This macro is needed + * to model the 64Kb-segment-size limit of far addressing on 80x86 machines. + * On those machines, we expect that jconfig.h will provide a proper value. + * On machines with 32-bit flat address spaces, any large constant may be used. + * + * NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type + * size_t and will be a multiple of sizeof(align_type). + */ + +#ifndef MAX_ALLOC_CHUNK /* may be overridden in jconfig.h */ +#define MAX_ALLOC_CHUNK 1000000000L +#endif + +/* + * This routine computes the total space still available for allocation by + * jpeg_get_large. If more space than this is needed, backing store will be + * used. NOTE: any memory already allocated must not be counted. + * + * There is a minimum space requirement, corresponding to the minimum + * feasible buffer sizes; jmemmgr.c will request that much space even if + * jpeg_mem_available returns zero. The maximum space needed, enough to hold + * all working storage in memory, is also passed in case it is useful. + * Finally, the total space already allocated is passed. If no better + * method is available, cinfo->mem->max_memory_to_use - already_allocated + * is often a suitable calculation. + * + * It is OK for jpeg_mem_available to underestimate the space available + * (that'll just lead to more backing-store access than is really necessary). + * However, an overestimate will lead to failure. Hence it's wise to subtract + * a slop factor from the true available space. 5% should be enough. + * + * On machines with lots of virtual memory, any large constant may be returned. + * Conversely, zero may be returned to always use the minimum amount of memory. + */ + +EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo, + long min_bytes_needed, + long max_bytes_needed, + long already_allocated)); + + +/* + * This structure holds whatever state is needed to access a single + * backing-store object. The read/write/close method pointers are called + * by jmemmgr.c to manipulate the backing-store object; all other fields + * are private to the system-dependent backing store routines. + */ + +#define TEMP_NAME_LENGTH 64 /* max length of a temporary file's name */ + + +#ifdef USE_MSDOS_MEMMGR /* DOS-specific junk */ + +typedef unsigned short XMSH; /* type of extended-memory handles */ +typedef unsigned short EMSH; /* type of expanded-memory handles */ + +typedef union { + short file_handle; /* DOS file handle if it's a temp file */ + XMSH xms_handle; /* handle if it's a chunk of XMS */ + EMSH ems_handle; /* handle if it's a chunk of EMS */ +} handle_union; + +#endif /* USE_MSDOS_MEMMGR */ + +#ifdef USE_MAC_MEMMGR /* Mac-specific junk */ +#include +#endif /* USE_MAC_MEMMGR */ + + +typedef struct backing_store_struct * backing_store_ptr; + +typedef struct backing_store_struct { + /* Methods for reading/writing/closing this backing-store object */ + JMETHOD(void, read_backing_store, (j_common_ptr cinfo, + backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count)); + JMETHOD(void, write_backing_store, (j_common_ptr cinfo, + backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count)); + JMETHOD(void, close_backing_store, (j_common_ptr cinfo, + backing_store_ptr info)); + + /* Private fields for system-dependent backing-store management */ +#ifdef USE_MSDOS_MEMMGR + /* For the MS-DOS manager (jmemdos.c), we need: */ + handle_union handle; /* reference to backing-store storage object */ + char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ +#else +#ifdef USE_MAC_MEMMGR + /* For the Mac manager (jmemmac.c), we need: */ + short temp_file; /* file reference number to temp file */ + FSSpec tempSpec; /* the FSSpec for the temp file */ + char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ +#else + /* For a typical implementation with temp files, we need: */ + FILE * temp_file; /* stdio reference to temp file */ + char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */ +#endif +#endif +} backing_store_info; + + +/* + * Initial opening of a backing-store object. This must fill in the + * read/write/close pointers in the object. The read/write routines + * may take an error exit if the specified maximum file size is exceeded. + * (If jpeg_mem_available always returns a large value, this routine can + * just take an error exit.) + */ + +EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo, + backing_store_ptr info, + long total_bytes_needed)); + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. jpeg_mem_init will be called before anything is + * allocated (and, therefore, nothing in cinfo is of use except the error + * manager pointer). It should return a suitable default value for + * max_memory_to_use; this may subsequently be overridden by the surrounding + * application. (Note that max_memory_to_use is only important if + * jpeg_mem_available chooses to consult it ... no one else will.) + * jpeg_mem_term may assume that all requested memory has been freed and that + * all opened backing-store objects have been closed. + */ + +EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo)); +EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo)); diff --git a/widget/milsko/milskosrc/external/libjpeg/include/jmorecfg.h b/widget/milsko/milskosrc/external/libjpeg/include/jmorecfg.h new file mode 100644 index 0000000000..4638d6af2d --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/include/jmorecfg.h @@ -0,0 +1,457 @@ +/* + * jmorecfg.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 1997-2022 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains additional configuration options that customize the + * JPEG software for special applications or support machine-dependent + * optimizations. Most users will not need to touch this file. + */ + + +/* + * Define BITS_IN_JSAMPLE as either + * 8 for 8-bit sample values (the usual setting) + * 9 for 9-bit sample values + * 10 for 10-bit sample values + * 11 for 11-bit sample values + * 12 for 12-bit sample values + * Only 8, 9, 10, 11, and 12 bits sample data precision are supported for + * full-feature DCT processing. Further depths up to 16-bit may be added + * later for the lossless modes of operation. + * Run-time selection and conversion of data precision will be added later + * and are currently not supported, sorry. + * Exception: The transcoding part (jpegtran) supports all settings in a + * single instance, since it operates on the level of DCT coefficients and + * not sample values. The DCT coefficients are of the same type (16 bits) + * in all cases (see below). + */ + +#define BITS_IN_JSAMPLE 8 /* use 8, 9, 10, 11, or 12 */ + + +/* + * Maximum number of components (color channels) allowed in JPEG image. + * To meet the letter of the JPEG spec, set this to 255. However, darn + * few applications need more than 4 channels (maybe 5 for CMYK + alpha + * mask). We recommend 10 as a reasonable compromise; use 4 if you are + * really short on memory. (Each allowed component costs a hundred or so + * bytes of storage, whether actually used in an image or not.) + */ + +#define MAX_COMPONENTS 10 /* maximum number of image components */ + + +/* + * Basic data types. + * You may need to change these if you have a machine with unusual data + * type sizes; for example, "char" not 8 bits, "short" not 16 bits, + * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, + * but it had better be at least 16. + */ + +/* Representation of a single sample (pixel element value). + * We frequently allocate large arrays of these, so it's important to keep + * them small. But if you have memory to burn and access to char or short + * arrays is very slow on your hardware, you might want to change these. + */ + +#if BITS_IN_JSAMPLE == 8 +/* JSAMPLE should be the smallest type that will hold the values 0..255. + * You can use a signed char by having GETJSAMPLE mask it with 0xFF. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JSAMPLE; +#ifdef CHAR_IS_UNSIGNED +#define GETJSAMPLE(value) ((int) (value)) +#else +#define GETJSAMPLE(value) ((int) (value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + +#define MAXJSAMPLE 255 +#define CENTERJSAMPLE 128 + +#endif /* BITS_IN_JSAMPLE == 8 */ + + +#if BITS_IN_JSAMPLE == 9 +/* JSAMPLE should be the smallest type that will hold the values 0..511. + * On nearly all machines "short" will do nicely. + */ + +typedef short JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#define MAXJSAMPLE 511 +#define CENTERJSAMPLE 256 + +#endif /* BITS_IN_JSAMPLE == 9 */ + + +#if BITS_IN_JSAMPLE == 10 +/* JSAMPLE should be the smallest type that will hold the values 0..1023. + * On nearly all machines "short" will do nicely. + */ + +typedef short JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#define MAXJSAMPLE 1023 +#define CENTERJSAMPLE 512 + +#endif /* BITS_IN_JSAMPLE == 10 */ + + +#if BITS_IN_JSAMPLE == 11 +/* JSAMPLE should be the smallest type that will hold the values 0..2047. + * On nearly all machines "short" will do nicely. + */ + +typedef short JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#define MAXJSAMPLE 2047 +#define CENTERJSAMPLE 1024 + +#endif /* BITS_IN_JSAMPLE == 11 */ + + +#if BITS_IN_JSAMPLE == 12 +/* JSAMPLE should be the smallest type that will hold the values 0..4095. + * On nearly all machines "short" will do nicely. + */ + +typedef short JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#define MAXJSAMPLE 4095 +#define CENTERJSAMPLE 2048 + +#endif /* BITS_IN_JSAMPLE == 12 */ + + +/* Representation of a DCT frequency coefficient. + * This should be a signed value of at least 16 bits; "short" is usually OK. + * Again, we allocate large arrays of these, but you can change to int + * if you have memory to burn and "short" is really slow. + */ + +typedef short JCOEF; + + +/* Compressed datastreams are represented as arrays of JOCTET. + * These must be EXACTLY 8 bits wide, at least once they are written to + * external storage. Note that when using the stdio data source/destination + * managers, this is also the data type passed to fread/fwrite. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JOCTET; +#define GETJOCTET(value) (value) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JOCTET; +#ifdef CHAR_IS_UNSIGNED +#define GETJOCTET(value) (value) +#else +#define GETJOCTET(value) ((value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + + +/* These typedefs are used for various table entries and so forth. + * They must be at least as wide as specified; but making them too big + * won't cost a huge amount of memory, so we don't provide special + * extraction code like we did for JSAMPLE. (In other words, these + * typedefs live at a different point on the speed/space tradeoff curve.) + */ + +/* UINT8 must hold at least the values 0..255. */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char UINT8; +#else /* not HAVE_UNSIGNED_CHAR */ +#ifdef CHAR_IS_UNSIGNED +typedef char UINT8; +#else /* not CHAR_IS_UNSIGNED */ +typedef short UINT8; +#endif /* CHAR_IS_UNSIGNED */ +#endif /* HAVE_UNSIGNED_CHAR */ + +/* UINT16 must hold at least the values 0..65535. */ + +#ifdef HAVE_UNSIGNED_SHORT +typedef unsigned short UINT16; +#else /* not HAVE_UNSIGNED_SHORT */ +typedef unsigned int UINT16; +#endif /* HAVE_UNSIGNED_SHORT */ + +/* INT16 must hold at least the values -32768..32767. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ +typedef short INT16; +#endif + +/* INT32 must hold at least signed 32-bit values. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ +#ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ +#ifndef _BASETSD_H /* MinGW is slightly different */ +#ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ +typedef long INT32; +#endif +#endif +#endif +#endif + +/* Datatype used for image dimensions. The JPEG standard only supports + * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore + * "unsigned int" is sufficient on all machines. However, if you need to + * handle larger images and you don't mind deviating from the spec, you + * can change this datatype. + */ + +typedef unsigned int JDIMENSION; + +#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ + + +/* These macros are used in all function definitions and extern declarations. + * You could modify them if you need to change function linkage conventions; + * in particular, you'll need to do that to make the library a Windows DLL. + * Another application is to make all functions global for use with debuggers + * or code profilers that require it. + */ + +/* a function called through method pointers: */ +#define METHODDEF(type) static type +/* a function used only in its module: */ +#define LOCAL(type) static type +/* a function referenced thru EXTERNs: */ +#define GLOBAL(type) type +/* a reference to a GLOBAL function: */ +#define EXTERN(type) extern type + + +/* This macro is used to declare a "method", that is, a function pointer. + * We want to supply prototype parameters if the compiler can cope. + * Note that the arglist parameter must be parenthesized! + * Again, you can customize this if you need special linkage keywords. + */ + +#ifdef HAVE_PROTOTYPES +#define JMETHOD(type,methodname,arglist) type (*methodname) arglist +#else +#define JMETHOD(type,methodname,arglist) type (*methodname) () +#endif + + +/* The noreturn type identifier is used to declare functions + * which cannot return. + * Compilers can thus create more optimized code and perform + * better checks for warnings and errors. + * Static analyzer tools can make improved inferences about + * execution paths and are prevented from giving false alerts. + * + * Unfortunately, the proposed specifications of corresponding + * extensions in the Dec 2011 ISO C standard revision (C11), + * GCC, MSVC, etc. are not viable. + * Thus we introduce a user defined type to declare noreturn + * functions at least for clarity. A proper compiler would + * have a suitable noreturn type to match in place of void. + */ + +#ifndef HAVE_NORETURN_T +typedef void noreturn_t; +#endif + + +/* Here is the pseudo-keyword for declaring pointers that must be "far" + * on 80x86 machines. Most of the specialized coding for 80x86 is handled + * by just saying "FAR *" where such a pointer is needed. In a few places + * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol. + */ + +#ifndef FAR +#ifdef NEED_FAR_POINTERS +#define FAR far +#else +#define FAR +#endif +#endif + + +/* + * On a few systems, type boolean and/or its values FALSE, TRUE may appear + * in standard header files. Or you may have conflicts with application- + * specific header files that you want to include together with these files. + * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. + */ + +#ifndef HAVE_BOOLEAN +#if defined FALSE || defined TRUE || defined QGLOBAL_H +/* Qt3 defines FALSE and TRUE as "const" variables in qglobal.h */ +typedef int boolean; +#ifndef FALSE /* in case these macros already exist */ +#define FALSE 0 /* values of boolean */ +#endif +#ifndef TRUE +#define TRUE 1 +#endif +#else +typedef enum { FALSE = 0, TRUE = 1 } boolean; +#endif +#endif + + +/* + * The remaining options affect code selection within the JPEG library, + * but they don't need to be visible to most applications using the library. + * To minimize application namespace pollution, the symbols won't be + * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. + */ + +#ifdef JPEG_INTERNALS +#define JPEG_INTERNAL_OPTIONS +#endif + +#ifdef JPEG_INTERNAL_OPTIONS + + +/* + * These defines indicate whether to include various optional functions. + * Undefining some of these symbols will produce a smaller but less capable + * library. Note that you can leave certain source files out of the + * compilation/linking process if you've #undef'd the corresponding symbols. + * (You may HAVE to do that if your compiler doesn't like null source files.) + */ + +/* Capability options common to encoder and decoder: */ + +#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ +#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ +#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */ + +/* Encoder capability options: */ + +#define C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN) */ +#define DCT_SCALING_SUPPORTED /* Input rescaling via DCT? (Requires DCT_ISLOW) */ +#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ +/* Note: if you selected more than 8-bit data precision, it is dangerous to + * turn off ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only + * good for 8-bit precision, so arithmetic coding is recommended for higher + * precision. The Huffman encoder normally uses entropy optimization to + * compute usable tables for higher precision. Otherwise, you'll have to + * supply different default Huffman tables. + * The exact same statements apply for progressive JPEG: the default tables + * don't work for progressive mode. (This may get fixed, however.) + */ +#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ + +/* Decoder capability options: */ + +#define D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN) */ +#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? (Requires DCT_ISLOW) */ +#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */ +#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ +#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ +#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ +#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ +#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ + +/* more capability options later, no doubt */ + + +/* + * Ordering of RGB data in scanlines passed to or from the application. + * If your application wants to deal with data in the order B,G,R, just + * #define JPEG_USE_RGB_CUSTOM in jconfig.h, or define your own custom + * order in jconfig.h and #define JPEG_HAVE_RGB_CUSTOM. + * You can also deal with formats such as R,G,B,X (one extra byte per pixel) + * by changing RGB_PIXELSIZE. + * Note that changing the offsets will also change + * the order in which colormap data is organized. + * RESTRICTIONS: + * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats. + * 2. The color quantizer modules will not behave desirably if RGB_PIXELSIZE + * is not 3 (they don't understand about dummy color components!). + * So you can't use color quantization if you change that value. + */ + +#ifndef JPEG_HAVE_RGB_CUSTOM +#ifdef JPEG_USE_RGB_CUSTOM +#define RGB_RED 2 /* Offset of Red in an RGB scanline element */ +#define RGB_GREEN 1 /* Offset of Green */ +#define RGB_BLUE 0 /* Offset of Blue */ +#else +#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ +#define RGB_GREEN 1 /* Offset of Green */ +#define RGB_BLUE 2 /* Offset of Blue */ +#endif +#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ +#endif + + +/* Definitions for speed-related optimizations. */ + + +/* If your compiler supports inline functions, define INLINE + * as the inline keyword; otherwise define it as empty. + */ + +#ifndef INLINE +#ifdef __GNUC__ /* for instance, GNU C knows about inline */ +#define INLINE __inline__ +#endif +#ifndef INLINE +#define INLINE /* default is to define it as empty */ +#endif +#endif + + +/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying + * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER + * as short on such a machine. MULTIPLIER must be at least 16 bits wide. + */ + +#ifndef MULTIPLIER +#define MULTIPLIER int /* type for fastest integer multiply */ +#endif + + +/* FAST_FLOAT should be either float or double, whichever is done faster + * by your compiler. (Note that this type is only used in the floating point + * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) + * Typically, float is faster in ANSI C compilers, while double is faster in + * pre-ANSI compilers (because they insist on converting to double anyway). + * The code below therefore chooses float if we have ANSI-style prototypes. + */ + +#ifndef FAST_FLOAT +#ifdef HAVE_PROTOTYPES +#define FAST_FLOAT float +#else +#define FAST_FLOAT double +#endif +#endif + +#endif /* JPEG_INTERNAL_OPTIONS */ diff --git a/widget/milsko/milskosrc/external/libjpeg/include/jpegint.h b/widget/milsko/milskosrc/external/libjpeg/include/jpegint.h new file mode 100644 index 0000000000..3528bff5b7 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/include/jpegint.h @@ -0,0 +1,445 @@ +/* + * jpegint.h + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 1997-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides common declarations for the various JPEG modules. + * These declarations are considered internal to the JPEG library; most + * applications using the library shouldn't need to include this file. + */ + + +/* Declarations for both compression & decompression */ + +typedef enum { /* Operating modes for buffer controllers */ + JBUF_PASS_THRU, /* Plain stripwise operation */ + /* Remaining modes require a full-image buffer to have been created */ + JBUF_SAVE_SOURCE, /* Run source subobject only, save output */ + JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */ + JBUF_SAVE_AND_PASS /* Run both subobjects, save output */ +} J_BUF_MODE; + +/* Values of global_state field (jdapi.c has some dependencies on ordering!) */ +#define CSTATE_START 100 /* after create_compress */ +#define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */ +#define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */ +#define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */ +#define DSTATE_START 200 /* after create_decompress */ +#define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */ +#define DSTATE_READY 202 /* found SOS, ready for start_decompress */ +#define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/ +#define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */ +#define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */ +#define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */ +#define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */ +#define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */ +#define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */ +#define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */ + + +/* Declarations for compression modules */ + +/* Master control module */ +struct jpeg_comp_master { + JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo)); + JMETHOD(void, pass_startup, (j_compress_ptr cinfo)); + JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); + + /* State variables made visible to other modules */ + boolean call_pass_startup; /* True if pass_startup must be called */ + boolean is_last_pass; /* True during last pass */ +}; + +/* Main buffer control (downsampled-data buffer) */ +struct jpeg_c_main_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, process_data, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail)); +}; + +/* Compression preprocessing (downsampling input buffer control) */ +struct jpeg_c_prep_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, pre_process_data, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, + JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail, + JSAMPIMAGE output_buf, + JDIMENSION *out_row_group_ctr, + JDIMENSION out_row_groups_avail)); +}; + +/* Coefficient buffer control */ +struct jpeg_c_coef_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(boolean, compress_data, (j_compress_ptr cinfo, + JSAMPIMAGE input_buf)); +}; + +/* Colorspace conversion */ +struct jpeg_color_converter { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + JMETHOD(void, color_convert, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows)); +}; + +/* Downsampling */ +struct jpeg_downsampler { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + JMETHOD(void, downsample, (j_compress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_index, + JSAMPIMAGE output_buf, + JDIMENSION out_row_group_index)); + + boolean need_context_rows; /* TRUE if need rows above & below */ +}; + +/* Forward DCT (also controls coefficient quantization) */ +typedef JMETHOD(void, forward_DCT_ptr, + (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY sample_data, JBLOCKROW coef_blocks, + JDIMENSION start_col, JDIMENSION num_blocks)); + +struct jpeg_forward_dct { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + /* It is useful to allow each component to have a separate FDCT method. */ + forward_DCT_ptr forward_DCT[MAX_COMPONENTS]; +}; + +/* Entropy encoding */ +struct jpeg_entropy_encoder { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics)); + JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKARRAY MCU_data)); + JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); +}; + +/* Marker writing */ +struct jpeg_marker_writer { + JMETHOD(void, write_file_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_frame_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_scan_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo)); + JMETHOD(void, write_tables_only, (j_compress_ptr cinfo)); + /* These routines are exported to allow insertion of extra markers */ + /* Probably only COM and APPn markers should be written this way */ + JMETHOD(void, write_marker_header, (j_compress_ptr cinfo, int marker, + unsigned int datalen)); + JMETHOD(void, write_marker_byte, (j_compress_ptr cinfo, int val)); +}; + + +/* Declarations for decompression modules */ + +/* Master control module */ +struct jpeg_decomp_master { + JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo)); + + /* State variables made visible to other modules */ + boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */ +}; + +/* Input control module */ +struct jpeg_input_controller { + JMETHOD(int, consume_input, (j_decompress_ptr cinfo)); + JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo)); + JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo)); + + /* State variables made visible to other modules */ + boolean has_multiple_scans; /* True if file has multiple scans */ + boolean eoi_reached; /* True when EOI has been consumed */ +}; + +/* Main buffer control (downsampled-data buffer) */ +struct jpeg_d_main_controller { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, process_data, (j_decompress_ptr cinfo, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +}; + +/* Coefficient buffer control */ +struct jpeg_d_coef_controller { + JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); + JMETHOD(int, consume_data, (j_decompress_ptr cinfo)); + JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo)); + JMETHOD(int, decompress_data, (j_decompress_ptr cinfo, + JSAMPIMAGE output_buf)); + /* Pointer to array of coefficient virtual arrays, or NULL if none */ + jvirt_barray_ptr *coef_arrays; +}; + +/* Decompression postprocessing (color quantization buffer control) */ +struct jpeg_d_post_controller { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, post_process_data, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, + JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +}; + +/* Marker reading & parsing */ +struct jpeg_marker_reader { + JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo)); + /* Read markers until SOS or EOI. + * Returns same codes as are defined for jpeg_consume_input: + * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. + */ + JMETHOD(int, read_markers, (j_decompress_ptr cinfo)); + /* Read a restart marker --- exported for use by entropy decoder only */ + jpeg_marker_parser_method read_restart_marker; + + /* State of marker reader --- nominally internal, but applications + * supplying COM or APPn handlers might like to know the state. + */ + boolean saw_SOI; /* found SOI? */ + boolean saw_SOF; /* found SOF? */ + int next_restart_num; /* next restart number expected (0-7) */ + unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */ +}; + +/* Entropy decoding */ +struct jpeg_entropy_decoder { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data)); + JMETHOD(void, finish_pass, (j_decompress_ptr cinfo)); +}; + +/* Inverse DCT (also performs dequantization) */ +typedef JMETHOD(void, inverse_DCT_method_ptr, + (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col)); + +struct jpeg_inverse_dct { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + /* It is useful to allow each component to have a separate IDCT method. */ + inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS]; +}; + +/* Upsampling (note that upsampler must also call color converter) */ +struct jpeg_upsampler { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, upsample, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, + JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); + + boolean need_context_rows; /* TRUE if need rows above & below */ +}; + +/* Colorspace conversion */ +struct jpeg_color_deconverter { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, color_convert, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows)); +}; + +/* Color quantization or color precision reduction */ +struct jpeg_color_quantizer { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan)); + JMETHOD(void, color_quantize, (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, + int num_rows)); + JMETHOD(void, finish_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, new_color_map, (j_decompress_ptr cinfo)); +}; + + +/* Definition of range extension bits for decompression processes. + * See the comments with prepare_range_limit_table (in jdmaster.c) + * for more info. + * The recommended default value for normal applications is 2. + * Applications with special requirements may use a different value. + * For example, Ghostscript wants to use 3 for proper handling of + * wacky images with oversize coefficient values. + */ + +#define RANGE_BITS 2 +#define RANGE_CENTER (CENTERJSAMPLE << RANGE_BITS) + + +/* Miscellaneous useful macros */ + +#undef MAX +#define MAX(a,b) ((a) > (b) ? (a) : (b)) +#undef MIN +#define MIN(a,b) ((a) < (b) ? (a) : (b)) + + +/* We assume that right shift corresponds to signed division by 2 with + * rounding towards minus infinity. This is correct for typical "arithmetic + * shift" instructions that shift in copies of the sign bit. But some + * C compilers implement >> with an unsigned shift. For these machines you + * must define RIGHT_SHIFT_IS_UNSIGNED. + * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity. + * It is only applied with constant shift counts. SHIFT_TEMPS must be + * included in the variables of any routine using RIGHT_SHIFT. + */ + +#ifdef RIGHT_SHIFT_IS_UNSIGNED +#define SHIFT_TEMPS INT32 shift_temp; +#define RIGHT_SHIFT(x,shft) \ + ((shift_temp = (x)) < 0 ? \ + (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \ + (shift_temp >> (shft))) +#else +#define SHIFT_TEMPS +#define RIGHT_SHIFT(x,shft) ((x) >> (shft)) +#endif + +/* Descale and correctly round an INT32 value that's scaled by N bits. + * We assume RIGHT_SHIFT rounds towards minus infinity, so adding + * the fudge factor is correct for either sign of X. + */ + +#define DESCALE(x,n) RIGHT_SHIFT((x) + ((INT32) 1 << ((n)-1)), n) + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jinit_compress_master jICompress +#define jinit_c_master_control jICMaster +#define jinit_c_main_controller jICMainC +#define jinit_c_prep_controller jICPrepC +#define jinit_c_coef_controller jICCoefC +#define jinit_color_converter jICColor +#define jinit_downsampler jIDownsampler +#define jinit_forward_dct jIFDCT +#define jinit_huff_encoder jIHEncoder +#define jinit_arith_encoder jIAEncoder +#define jinit_marker_writer jIMWriter +#define jinit_master_decompress jIDMaster +#define jinit_d_main_controller jIDMainC +#define jinit_d_coef_controller jIDCoefC +#define jinit_d_post_controller jIDPostC +#define jinit_input_controller jIInCtlr +#define jinit_marker_reader jIMReader +#define jinit_huff_decoder jIHDecoder +#define jinit_arith_decoder jIADecoder +#define jinit_inverse_dct jIIDCT +#define jinit_upsampler jIUpsampler +#define jinit_color_deconverter jIDColor +#define jinit_1pass_quantizer jI1Quant +#define jinit_2pass_quantizer jI2Quant +#define jinit_merged_upsampler jIMUpsampler +#define jinit_memory_mgr jIMemMgr +#define jdiv_round_up jDivRound +#define jround_up jRound +#define jzero_far jZeroFar +#define jcopy_sample_rows jCopySamples +#define jcopy_block_row jCopyBlocks +#define jpeg_zigzag_order jZIGTable +#define jpeg_natural_order jZAGTable +#define jpeg_natural_order7 jZAG7Table +#define jpeg_natural_order6 jZAG6Table +#define jpeg_natural_order5 jZAG5Table +#define jpeg_natural_order4 jZAG4Table +#define jpeg_natural_order3 jZAG3Table +#define jpeg_natural_order2 jZAG2Table +#define jpeg_aritab jAriTab +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays + * and coefficient-block arrays. This won't work on 80x86 because the arrays + * are FAR and we're assuming a small-pointer memory model. However, some + * DOS compilers provide far-pointer versions of memcpy() and memset() even + * in the small-model libraries. These will be used if USE_FMEM is defined. + * Otherwise, the routines in jutils.c do it the hard way. + */ + +#ifndef NEED_FAR_POINTERS /* normal case, same as regular macro */ +#define FMEMZERO(target,size) MEMZERO(target,size) +#else /* 80x86 case */ +#ifdef USE_FMEM +#define FMEMZERO(target,size) _fmemset((void FAR *)(target), 0, (size_t)(size)) +#else +EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero)); +#define FMEMZERO(target,size) jzero_far(target, size) +#endif +#endif + + +/* Compression module initialization routines */ +EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo, + boolean transcode_only)); +EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_arith_encoder JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo)); +/* Decompression module initialization routines */ +EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_arith_decoder JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo)); +/* Memory manager initialization */ +EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo)); + +/* Utility routines in jutils.c */ +EXTERN(long) jdiv_round_up JPP((long a, long b)); +EXTERN(long) jround_up JPP((long a, long b)); +EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, + JSAMPARRAY output_array, + int num_rows, JDIMENSION num_cols)); +EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row, + JDIMENSION num_blocks)); +/* Constant tables in jutils.c */ +#if 0 /* This table is not actually needed in v6a */ +extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */ +#endif +extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */ +extern const int jpeg_natural_order7[]; /* zz to natural order for 7x7 block */ +extern const int jpeg_natural_order6[]; /* zz to natural order for 6x6 block */ +extern const int jpeg_natural_order5[]; /* zz to natural order for 5x5 block */ +extern const int jpeg_natural_order4[]; /* zz to natural order for 4x4 block */ +extern const int jpeg_natural_order3[]; /* zz to natural order for 3x3 block */ +extern const int jpeg_natural_order2[]; /* zz to natural order for 2x2 block */ + +/* Arithmetic coding probability estimation tables in jaricom.c */ +extern const INT32 jpeg_aritab[]; + +/* Suppress undefined-structure complaints if necessary. */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */ +struct jvirt_sarray_control { long dummy; }; +struct jvirt_barray_control { long dummy; }; +#endif +#endif /* INCOMPLETE_TYPES_BROKEN */ diff --git a/widget/milsko/milskosrc/external/libjpeg/include/jpeglib.h b/widget/milsko/milskosrc/external/libjpeg/include/jpeglib.h new file mode 100644 index 0000000000..e7e15ab2cd --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/include/jpeglib.h @@ -0,0 +1,1183 @@ +/* + * jpeglib.h + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * Modified 2002-2022 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the application interface for the JPEG library. + * Most applications using the library need only include this file, + * and perhaps jerror.h if they want to know the exact error codes. + */ + +#ifndef JPEGLIB_H +#define JPEGLIB_H + +/* + * First we include the configuration files that record how this + * installation of the JPEG library is set up. jconfig.h can be + * generated automatically for many systems. jmorecfg.h contains + * manual configuration options that most people need not worry about. + */ + +#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ +#include "jconfig.h" /* widely used configuration options */ +#endif +#include "jmorecfg.h" /* seldom changed options */ + + +#ifdef __cplusplus +#ifndef DONT_USE_EXTERN_C +extern "C" { +#endif +#endif + +/* Version IDs for the JPEG library. + * Might be useful for tests like "#if JPEG_LIB_VERSION >= 90". + */ + +#define JPEG_LIB_VERSION 90 /* Compatibility version 9.0 */ +#define JPEG_LIB_VERSION_MAJOR 9 +#define JPEG_LIB_VERSION_MINOR 6 + + +/* Various constants determining the sizes of things. + * All of these are specified by the JPEG standard, + * so don't change them if you want to be compatible. + */ + +#define DCTSIZE 8 /* The basic DCT block is 8x8 coefficients */ +#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ +#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ +#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ +#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ +#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ +#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ +/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; + * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. + * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU + * to handle it. We even let you do this from the jconfig.h file. However, + * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe + * sometimes emits noncompliant files doesn't mean you should too. + */ +#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */ +#ifndef D_MAX_BLOCKS_IN_MCU +#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */ +#endif + + +/* Data structures for images (arrays of samples and of DCT coefficients). + * On 80x86 machines, the image arrays are too big for near pointers, + * but the pointer arrays can fit in near memory. + */ + +typedef JSAMPLE FAR *JSAMPROW; /* ptr to one image row of pixel samples. */ +typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ +typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */ + +typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ +typedef JBLOCK FAR *JBLOCKROW; /* pointer to one row of coefficient blocks */ +typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ +typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ + +typedef JCOEF FAR *JCOEFPTR; /* useful in a couple of places */ + + +/* Types for JPEG compression parameters and working tables. */ + + +/* DCT coefficient quantization tables. */ + +typedef struct { + /* This array gives the coefficient quantizers in natural array order + * (not the zigzag order in which they are stored in a JPEG DQT marker). + * CAUTION: IJG versions prior to v6a kept this array in zigzag order. + */ + UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JQUANT_TBL; + + +/* Huffman coding tables. */ + +typedef struct { + /* These two fields directly represent the contents of a JPEG DHT marker */ + UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ + /* length k bits; bits[0] is unused */ + UINT8 huffval[256]; /* The symbols, in order of incr code length */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JHUFF_TBL; + + +/* Basic info about one component (color channel). */ + +typedef struct { + /* These values are fixed over the whole image. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOF marker. */ + int component_id; /* identifier for this component (0..255) */ + int component_index; /* its index in SOF or cinfo->comp_info[] */ + int h_samp_factor; /* horizontal sampling factor (1..4) */ + int v_samp_factor; /* vertical sampling factor (1..4) */ + int quant_tbl_no; /* quantization table selector (0..3) */ + /* These values may vary between scans. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOS marker. */ + /* The decompressor output side may not use these variables. */ + int dc_tbl_no; /* DC entropy table selector (0..3) */ + int ac_tbl_no; /* AC entropy table selector (0..3) */ + + /* Remaining fields should be treated as private by applications. */ + + /* These values are computed during compression or decompression startup: */ + /* Component's size in DCT blocks. + * Any dummy blocks added to complete an MCU are not counted; therefore + * these values do not depend on whether a scan is interleaved or not. + */ + JDIMENSION width_in_blocks; + JDIMENSION height_in_blocks; + /* Size of a DCT block in samples, + * reflecting any scaling we choose to apply during the DCT step. + * Values from 1 to 16 are supported. + * Note that different components may receive different DCT scalings. + */ + int DCT_h_scaled_size; + int DCT_v_scaled_size; + /* The downsampled dimensions are the component's actual, unpadded number + * of samples at the main buffer (preprocessing/compression interface); + * DCT scaling is included, so + * downsampled_width = + * ceil(image_width * Hi/Hmax * DCT_h_scaled_size/block_size) + * and similarly for height. + */ + JDIMENSION downsampled_width; /* actual width in samples */ + JDIMENSION downsampled_height; /* actual height in samples */ + /* For decompression, in cases where some of the components will be + * ignored (eg grayscale output from YCbCr image), we can skip most + * computations for the unused components. + * For compression, some of the components will need further quantization + * scale by factor of 2 after DCT (eg BG_YCC output from normal RGB input). + * The field is first set TRUE for decompression, FALSE for compression + * in initial_setup, and then adapted in color conversion setup. + */ + boolean component_needed; + + /* These values are computed before starting a scan of the component. */ + /* The decompressor output side may not use these variables. */ + int MCU_width; /* number of blocks per MCU, horizontally */ + int MCU_height; /* number of blocks per MCU, vertically */ + int MCU_blocks; /* MCU_width * MCU_height */ + int MCU_sample_width; /* MCU width in samples: MCU_width * DCT_h_scaled_size */ + int last_col_width; /* # of non-dummy blocks across in last MCU */ + int last_row_height; /* # of non-dummy blocks down in last MCU */ + + /* Saved quantization table for component; NULL if none yet saved. + * See jdinput.c comments about the need for this information. + * This field is currently used only for decompression. + */ + JQUANT_TBL * quant_table; + + /* Private per-component storage for DCT or IDCT subsystem. */ + void * dct_table; +} jpeg_component_info; + + +/* The script for encoding a multiple-scan file is an array of these: */ + +typedef struct { + int comps_in_scan; /* number of components encoded in this scan */ + int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ + int Ss, Se; /* progressive JPEG spectral selection parms */ + int Ah, Al; /* progressive JPEG successive approx. parms */ +} jpeg_scan_info; + +/* The decompressor can save APPn and COM markers in a list of these: */ + +typedef struct jpeg_marker_struct FAR * jpeg_saved_marker_ptr; + +struct jpeg_marker_struct { + jpeg_saved_marker_ptr next; /* next in list, or NULL */ + UINT8 marker; /* marker code: JPEG_COM, or JPEG_APP0+n */ + unsigned int original_length; /* # bytes of data in the file */ + unsigned int data_length; /* # bytes of data saved at data[] */ + JOCTET FAR * data; /* the data contained in the marker */ + /* the marker length word is not counted in data_length or original_length */ +}; + +/* Known color spaces. */ + +typedef enum { + JCS_UNKNOWN, /* error/unspecified */ + JCS_GRAYSCALE, /* monochrome */ + JCS_RGB, /* red/green/blue, standard RGB (sRGB) */ + JCS_YCbCr, /* Y/Cb/Cr (also known as YUV), standard YCC */ + JCS_CMYK, /* C/M/Y/K */ + JCS_YCCK, /* Y/Cb/Cr/K */ + JCS_BG_RGB, /* big gamut red/green/blue, bg-sRGB */ + JCS_BG_YCC /* big gamut Y/Cb/Cr, bg-sYCC */ +} J_COLOR_SPACE; + +/* Supported color transforms. */ + +typedef enum { + JCT_NONE = 0, + JCT_SUBTRACT_GREEN = 1 +} J_COLOR_TRANSFORM; + +/* DCT/IDCT algorithm options. */ + +typedef enum { + JDCT_ISLOW, /* slow but accurate integer algorithm */ + JDCT_IFAST, /* faster, less accurate integer method */ + JDCT_FLOAT /* floating-point: accurate, fast on fast HW */ +} J_DCT_METHOD; + +#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ +#define JDCT_DEFAULT JDCT_ISLOW +#endif +#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ +#define JDCT_FASTEST JDCT_IFAST +#endif + +/* Dithering options for decompression. */ + +typedef enum { + JDITHER_NONE, /* no dithering */ + JDITHER_ORDERED, /* simple ordered dither */ + JDITHER_FS /* Floyd-Steinberg error diffusion dither */ +} J_DITHER_MODE; + + +/* Common fields between JPEG compression and decompression master structs. */ + +#define jpeg_common_fields \ + struct jpeg_error_mgr * err; /* Error handler module */\ + struct jpeg_memory_mgr * mem; /* Memory manager module */\ + struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\ + void * client_data; /* Available for use by application */\ + boolean is_decompressor; /* So common code can tell which is which */\ + int global_state /* For checking call sequence validity */ + +/* Routines that are to be used by both halves of the library are declared + * to receive a pointer to this structure. There are no actual instances of + * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. + */ +struct jpeg_common_struct { + jpeg_common_fields; /* Fields common to both master struct types */ + /* Additional fields follow in an actual jpeg_compress_struct or + * jpeg_decompress_struct. All three structs must agree on these + * initial fields! (This would be a lot cleaner in C++.) + */ +}; + +typedef struct jpeg_common_struct * j_common_ptr; +typedef struct jpeg_compress_struct * j_compress_ptr; +typedef struct jpeg_decompress_struct * j_decompress_ptr; + + +/* Master record for a compression instance */ + +struct jpeg_compress_struct { + jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ + + /* Destination for compressed data */ + struct jpeg_destination_mgr * dest; + + /* Description of source image --- these fields must be filled in by + * outer application before starting compression. in_color_space must + * be correct before you can even call jpeg_set_defaults(). + */ + + JDIMENSION image_width; /* input image width */ + JDIMENSION image_height; /* input image height */ + int input_components; /* # of color components in input image */ + J_COLOR_SPACE in_color_space; /* colorspace of input image */ + + double input_gamma; /* image gamma of input image */ + + /* Compression parameters --- these fields must be set before calling + * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to + * initialize everything to reasonable defaults, then changing anything + * the application specifically wants to change. That way you won't get + * burnt when new parameters are added. Also note that there are several + * helper routines to simplify changing parameters. + */ + + unsigned int scale_num, scale_denom; /* fraction by which to scale image */ + + JDIMENSION jpeg_width; /* scaled JPEG image width */ + JDIMENSION jpeg_height; /* scaled JPEG image height */ + /* Dimensions of actual JPEG image that will be written to file, + * derived from input dimensions by scaling factors above. + * These fields are computed by jpeg_start_compress(). + * You can also use jpeg_calc_jpeg_dimensions() to determine these values + * in advance of calling jpeg_start_compress(). + */ + + int data_precision; /* bits of precision in image data */ + + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + jpeg_component_info * comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; + int q_scale_factor[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined, + * and corresponding scale factors (percentage, initialized 100). + */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + int num_scans; /* # of entries in scan_info array */ + const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */ + /* The default value of scan_info is NULL, which causes a single-scan + * sequential JPEG file to be emitted. To create a multi-scan file, + * set num_scans and scan_info to point to an array of scan definitions. + */ + + boolean raw_data_in; /* TRUE=caller supplies downsampled data */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + boolean do_fancy_downsampling; /* TRUE=apply fancy downsampling */ + int smoothing_factor; /* 1..100, or 0 for no input smoothing */ + J_DCT_METHOD dct_method; /* DCT algorithm selector */ + + /* The restart interval can be specified in absolute MCUs by setting + * restart_interval, or in MCU rows by setting restart_in_rows + * (in which case the correct restart_interval will be figured + * for each scan). + */ + unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ + int restart_in_rows; /* if > 0, MCU rows per restart interval */ + + /* Parameters controlling emission of special markers. */ + + boolean write_JFIF_header; /* should a JFIF marker be written? */ + UINT8 JFIF_major_version; /* What to write for the JFIF version number */ + UINT8 JFIF_minor_version; + /* These three values are not used by the JPEG code, merely copied */ + /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ + /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ + /* ratio is defined by X_density/Y_density even when density_unit=0. */ + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean write_Adobe_marker; /* should an Adobe marker be written? */ + + J_COLOR_TRANSFORM color_transform; + /* Color transform identifier, writes LSE marker if nonzero */ + + /* State variable: index of next scanline to be written to + * jpeg_write_scanlines(). Application may use this to control its + * processing loop, e.g., "while (next_scanline < image_height)". + */ + + JDIMENSION next_scanline; /* 0 .. image_height-1 */ + + /* Remaining fields are known throughout compressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during compression startup + */ + boolean progressive_mode; /* TRUE if scan script uses progressive mode */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ + int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */ + /* The coefficient controller receives data in units of MCU rows as defined + * for fully interleaved scans (whether the JPEG file is interleaved or not). + * There are v_samp_factor * DCT_v_scaled_size sample rows of each component + * in an "iMCU" (interleaved MCU) row. + */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[C_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + int block_size; /* the basic DCT block size: 1..16 */ + const int * natural_order; /* natural-order position array */ + int lim_Se; /* min( Se, DCTSIZE2-1 ) */ + + /* + * Links to compression subobjects (methods and private variables of modules) + */ + struct jpeg_comp_master * master; + struct jpeg_c_main_controller * main; + struct jpeg_c_prep_controller * prep; + struct jpeg_c_coef_controller * coef; + struct jpeg_marker_writer * marker; + struct jpeg_color_converter * cconvert; + struct jpeg_downsampler * downsample; + struct jpeg_forward_dct * fdct; + struct jpeg_entropy_encoder * entropy; + jpeg_scan_info * script_space; /* workspace for jpeg_simple_progression */ + int script_space_size; +}; + + +/* Master record for a decompression instance */ + +struct jpeg_decompress_struct { + jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ + + /* Source of compressed data */ + struct jpeg_source_mgr * src; + + /* Basic description of image --- filled in by jpeg_read_header(). */ + /* Application may inspect these values to decide how to process image. */ + + JDIMENSION image_width; /* nominal image width (from SOF marker) */ + JDIMENSION image_height; /* nominal image height */ + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + /* Decompression processing parameters --- these fields must be set before + * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes + * them to default values. + */ + + J_COLOR_SPACE out_color_space; /* colorspace for output */ + + unsigned int scale_num, scale_denom; /* fraction by which to scale image */ + + double output_gamma; /* image gamma wanted in output */ + + boolean buffered_image; /* TRUE=multiple output passes */ + boolean raw_data_out; /* TRUE=downsampled data wanted */ + + J_DCT_METHOD dct_method; /* IDCT algorithm selector */ + boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ + boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ + + boolean quantize_colors; /* TRUE=colormapped output wanted */ + /* the following are ignored if not quantize_colors: */ + J_DITHER_MODE dither_mode; /* type of color dithering to use */ + boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ + int desired_number_of_colors; /* max # colors to use in created colormap */ + /* these are significant only in buffered-image mode: */ + boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ + boolean enable_external_quant;/* enable future use of external colormap */ + boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ + + /* Description of actual output image that will be returned to application. + * These fields are computed by jpeg_start_decompress(). + * You can also use jpeg_calc_output_dimensions() to determine these values + * in advance of calling jpeg_start_decompress(). + */ + + JDIMENSION output_width; /* scaled image width */ + JDIMENSION output_height; /* scaled image height */ + int out_color_components; /* # of color components in out_color_space */ + int output_components; /* # of color components returned */ + /* output_components is 1 (a colormap index) when quantizing colors; + * otherwise it equals out_color_components. + */ + int rec_outbuf_height; /* min recommended height of scanline buffer */ + /* If the buffer passed to jpeg_read_scanlines() is less than this many rows + * high, space and time will be wasted due to unnecessary data copying. + * Usually rec_outbuf_height will be 1 or 2, at most 4. + */ + + /* When quantizing colors, the output colormap is described by these fields. + * The application can supply a colormap by setting colormap non-NULL before + * calling jpeg_start_decompress; otherwise a colormap is created during + * jpeg_start_decompress or jpeg_start_output. + * The map has out_color_components rows and actual_number_of_colors columns. + */ + int actual_number_of_colors; /* number of entries in use */ + JSAMPARRAY colormap; /* The color map as a 2-D pixel array */ + + /* State variables: these variables indicate the progress of decompression. + * The application may examine these but must not modify them. + */ + + /* Row index of next scanline to be read from jpeg_read_scanlines(). + * Application may use this to control its processing loop, e.g., + * "while (output_scanline < output_height)". + */ + JDIMENSION output_scanline; /* 0 .. output_height-1 */ + + /* Current input scan number and number of iMCU rows completed in scan. + * These indicate the progress of the decompressor input side. + */ + int input_scan_number; /* Number of SOS markers seen so far */ + JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ + + /* The "output scan number" is the notional scan being displayed by the + * output side. The decompressor will not allow output scan/row number + * to get ahead of input scan/row, but it can fall arbitrarily far behind. + */ + int output_scan_number; /* Nominal scan number being displayed */ + JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ + + /* Current progression status. coef_bits[c][i] indicates the precision + * with which component c's DCT coefficient i (in zigzag order) is known. + * It is -1 when no data has yet been received, otherwise it is the point + * transform (shift) value for the most recent scan of the coefficient + * (thus, 0 at completion of the progression). + * This pointer is NULL when reading a non-progressive file. + */ + int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ + + /* Internal JPEG parameters --- the application usually need not look at + * these fields. Note that the decompressor output side may not use + * any parameters that can change between scans. + */ + + /* Quantization and Huffman tables are carried forward across input + * datastreams when processing abbreviated JPEG datastreams. + */ + + JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + /* These parameters are never carried across datastreams, since they + * are given in SOF/SOS markers or defined to be reset by SOI. + */ + + int data_precision; /* bits of precision in image data */ + + jpeg_component_info * comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + boolean is_baseline; /* TRUE if Baseline SOF0 encountered */ + boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ + + /* These fields record data obtained from optional markers recognized by + * the JPEG library. + */ + boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ + /* Data copied from JFIF marker; only valid if saw_JFIF_marker is TRUE: */ + UINT8 JFIF_major_version; /* JFIF version number */ + UINT8 JFIF_minor_version; + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ + UINT8 Adobe_transform; /* Color transform code from Adobe marker */ + + J_COLOR_TRANSFORM color_transform; + /* Color transform identifier derived from LSE marker, otherwise zero */ + + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + + /* Aside from the specific data retained from APPn markers known to the + * library, the uninterpreted contents of any or all APPn and COM markers + * can be saved in a list for examination by the application. + */ + jpeg_saved_marker_ptr marker_list; /* Head of list of saved markers */ + + /* Remaining fields are known throughout decompressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during decompression startup + */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + int min_DCT_h_scaled_size; /* smallest DCT_h_scaled_size of any component */ + int min_DCT_v_scaled_size; /* smallest DCT_v_scaled_size of any component */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ + /* The coefficient controller's input and output progress is measured in + * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows + * in fully interleaved JPEG scans, but are used whether the scan is + * interleaved or not. We define an iMCU row as v_samp_factor DCT block + * rows of each component. Therefore, the IDCT output contains + * v_samp_factor * DCT_v_scaled_size sample rows of a component per iMCU row. + */ + + JSAMPLE * sample_range_limit; /* table for fast range-limiting */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + * Note that the decompressor output side must not use these fields. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[D_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + /* These fields are derived from Se of first SOS marker. + */ + int block_size; /* the basic DCT block size: 1..16 */ + const int * natural_order; /* natural-order position array for entropy decode */ + int lim_Se; /* min( Se, DCTSIZE2-1 ) for entropy decode */ + + /* This field is shared between entropy decoder and marker parser. + * It is either zero or the code of a JPEG marker that has been + * read from the data source, but has not yet been processed. + */ + int unread_marker; + + /* + * Links to decompression subobjects (methods, private variables of modules) + */ + struct jpeg_decomp_master * master; + struct jpeg_d_main_controller * main; + struct jpeg_d_coef_controller * coef; + struct jpeg_d_post_controller * post; + struct jpeg_input_controller * inputctl; + struct jpeg_marker_reader * marker; + struct jpeg_entropy_decoder * entropy; + struct jpeg_inverse_dct * idct; + struct jpeg_upsampler * upsample; + struct jpeg_color_deconverter * cconvert; + struct jpeg_color_quantizer * cquantize; +}; + + +/* "Object" declarations for JPEG modules that may be supplied or called + * directly by the surrounding application. + * As with all objects in the JPEG library, these structs only define the + * publicly visible methods and state variables of a module. Additional + * private fields may exist after the public ones. + */ + + +/* Error handler object */ + +struct jpeg_error_mgr { + /* Error exit handler: does not return to caller */ + JMETHOD(noreturn_t, error_exit, (j_common_ptr cinfo)); + /* Conditionally emit a trace or warning message */ + JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level)); + /* Routine that actually outputs a trace or error message */ + JMETHOD(void, output_message, (j_common_ptr cinfo)); + /* Format a message string for the most recent JPEG error or message */ + JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer)); +#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ + /* Reset error state variables at start of a new image */ + JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo)); + + /* The message ID code and any parameters are saved here. + * A message can have one string parameter or up to 8 int parameters. + */ + int msg_code; +#define JMSG_STR_PARM_MAX 80 + union { + int i[8]; + char s[JMSG_STR_PARM_MAX]; + } msg_parm; + + /* Standard state variables for error facility */ + + int trace_level; /* max msg_level that will be displayed */ + + /* For recoverable corrupt-data errors, we emit a warning message, + * but keep going unless emit_message chooses to abort. emit_message + * should count warnings in num_warnings. The surrounding application + * can check for bad data by seeing if num_warnings is nonzero at the + * end of processing. + */ + long num_warnings; /* number of corrupt-data warnings */ + + /* These fields point to the table(s) of error message strings. + * An application can change the table pointer to switch to a different + * message list (typically, to change the language in which errors are + * reported). Some applications may wish to add additional error codes + * that will be handled by the JPEG library error mechanism; the second + * table pointer is used for this purpose. + * + * First table includes all errors generated by JPEG library itself. + * Error code 0 is reserved for a "no such error string" message. + */ + const char * const * jpeg_message_table; /* Library errors */ + int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ + /* Second table can be added by application (see cjpeg/djpeg for example). + * It contains strings numbered first_addon_message..last_addon_message. + */ + const char * const * addon_message_table; /* Non-library errors */ + int first_addon_message; /* code for first string in addon table */ + int last_addon_message; /* code for last string in addon table */ +}; + + +/* Progress monitor object */ + +struct jpeg_progress_mgr { + JMETHOD(void, progress_monitor, (j_common_ptr cinfo)); + + long pass_counter; /* work units completed in this pass */ + long pass_limit; /* total number of work units in this pass */ + int completed_passes; /* passes completed so far */ + int total_passes; /* total number of passes expected */ +}; + + +/* Data destination object for compression */ + +struct jpeg_destination_mgr { + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + + JMETHOD(void, init_destination, (j_compress_ptr cinfo)); + JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo)); + JMETHOD(void, term_destination, (j_compress_ptr cinfo)); +}; + + +/* Data source object for decompression */ + +struct jpeg_source_mgr { + const JOCTET * next_input_byte; /* => next byte to read from buffer */ + size_t bytes_in_buffer; /* # of bytes remaining in buffer */ + + JMETHOD(void, init_source, (j_decompress_ptr cinfo)); + JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo)); + JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes)); + JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired)); + JMETHOD(void, term_source, (j_decompress_ptr cinfo)); +}; + + +/* Memory manager object. + * Allocates "small" objects (a few K total), "large" objects (tens of K), + * and "really big" objects (virtual arrays with backing store if needed). + * The memory manager does not allow individual objects to be freed; rather, + * each created object is assigned to a pool, and whole pools can be freed + * at once. This is faster and more convenient than remembering exactly what + * to free, especially where malloc()/free() are not too speedy. + * NB: alloc routines never return NULL. They exit to error_exit if not + * successful. + */ + +#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ +#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ +#define JPOOL_NUMPOOLS 2 + +typedef struct jvirt_sarray_control * jvirt_sarray_ptr; +typedef struct jvirt_barray_control * jvirt_barray_ptr; + + +struct jpeg_memory_mgr { + /* Method pointers */ + JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id, + size_t sizeofobject)); + JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id, + size_t sizeofobject)); + JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id, + JDIMENSION samplesperrow, + JDIMENSION numrows)); + JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id, + JDIMENSION blocksperrow, + JDIMENSION numrows)); + JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo, + int pool_id, + boolean pre_zero, + JDIMENSION samplesperrow, + JDIMENSION numrows, + JDIMENSION maxaccess)); + JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo, + int pool_id, + boolean pre_zero, + JDIMENSION blocksperrow, + JDIMENSION numrows, + JDIMENSION maxaccess)); + JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo)); + JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo, + jvirt_sarray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, + boolean writable)); + JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo, + jvirt_barray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, + boolean writable)); + JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id)); + JMETHOD(void, self_destruct, (j_common_ptr cinfo)); + + /* Limit on memory allocation for this JPEG object. (Note that this is + * merely advisory, not a guaranteed maximum; it only affects the space + * used for virtual-array buffers.) May be changed by outer application + * after creating the JPEG object. + */ + long max_memory_to_use; + + /* Maximum allocation request accepted by alloc_large. */ + long max_alloc_chunk; +}; + + +/* Routine signature for application-supplied marker processing methods. + * Need not pass marker code since it is stored in cinfo->unread_marker. + */ +typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo)); + + +/* Declarations for routines called by application. + * The JPP macro hides prototype parameters from compilers that can't cope. + * Note JPP requires double parentheses. + */ + +#ifdef HAVE_PROTOTYPES +#define JPP(arglist) arglist +#else +#define JPP(arglist) () +#endif + + +/* Short forms of external names for systems with brain-damaged linkers. + * We shorten external names to be unique in the first six letters, which + * is good enough for all known systems. + * (If your compiler itself needs names to be unique in less than 15 + * characters, you are out of luck. Get a better compiler.) + */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_std_error jStdError +#define jpeg_CreateCompress jCreaCompress +#define jpeg_CreateDecompress jCreaDecompress +#define jpeg_destroy_compress jDestCompress +#define jpeg_destroy_decompress jDestDecompress +#define jpeg_stdio_dest jStdDest +#define jpeg_stdio_src jStdSrc +#define jpeg_mem_dest jMemDest +#define jpeg_mem_src jMemSrc +#define jpeg_set_defaults jSetDefaults +#define jpeg_set_colorspace jSetColorspace +#define jpeg_default_colorspace jDefColorspace +#define jpeg_set_quality jSetQuality +#define jpeg_set_linear_quality jSetLQuality +#define jpeg_default_qtables jDefQTables +#define jpeg_add_quant_table jAddQuantTable +#define jpeg_quality_scaling jQualityScaling +#define jpeg_simple_progression jSimProgress +#define jpeg_suppress_tables jSuppressTables +#define jpeg_alloc_quant_table jAlcQTable +#define jpeg_alloc_huff_table jAlcHTable +#define jpeg_std_huff_table jStdHTable +#define jpeg_start_compress jStrtCompress +#define jpeg_write_scanlines jWrtScanlines +#define jpeg_finish_compress jFinCompress +#define jpeg_calc_jpeg_dimensions jCjpegDimensions +#define jpeg_write_raw_data jWrtRawData +#define jpeg_write_marker jWrtMarker +#define jpeg_write_m_header jWrtMHeader +#define jpeg_write_m_byte jWrtMByte +#define jpeg_write_tables jWrtTables +#define jpeg_read_header jReadHeader +#define jpeg_start_decompress jStrtDecompress +#define jpeg_read_scanlines jReadScanlines +#define jpeg_finish_decompress jFinDecompress +#define jpeg_read_raw_data jReadRawData +#define jpeg_has_multiple_scans jHasMultScn +#define jpeg_start_output jStrtOutput +#define jpeg_finish_output jFinOutput +#define jpeg_input_complete jInComplete +#define jpeg_new_colormap jNewCMap +#define jpeg_consume_input jConsumeInput +#define jpeg_core_output_dimensions jCoreDimensions +#define jpeg_calc_output_dimensions jCalcDimensions +#define jpeg_save_markers jSaveMarkers +#define jpeg_set_marker_processor jSetMarker +#define jpeg_read_coefficients jReadCoefs +#define jpeg_write_coefficients jWrtCoefs +#define jpeg_copy_critical_parameters jCopyCrit +#define jpeg_abort_compress jAbrtCompress +#define jpeg_abort_decompress jAbrtDecompress +#define jpeg_abort jAbort +#define jpeg_destroy jDestroy +#define jpeg_resync_to_restart jResyncRestart +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* Default error-management setup */ +EXTERN(struct jpeg_error_mgr *) jpeg_std_error + JPP((struct jpeg_error_mgr * err)); + +/* Initialization of JPEG compression objects. + * jpeg_create_compress() and jpeg_create_decompress() are the exported + * names that applications should call. These expand to calls on + * jpeg_CreateCompress and jpeg_CreateDecompress with additional information + * passed for version mismatch checking. + * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. + */ +#define jpeg_create_compress(cinfo) \ + jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_compress_struct)) +#define jpeg_create_decompress(cinfo) \ + jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_decompress_struct)) +EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo, + int version, size_t structsize)); +EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo, + int version, size_t structsize)); +/* Destruction of JPEG compression objects */ +EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo)); + +/* Standard data source and destination managers: stdio streams. */ +/* Caller is responsible for opening the file before and closing after. */ +EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile)); +EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); + +/* Data source and destination managers: memory buffers. */ +EXTERN(void) jpeg_mem_dest JPP((j_compress_ptr cinfo, + unsigned char ** outbuffer, + size_t * outsize)); +EXTERN(void) jpeg_mem_src JPP((j_decompress_ptr cinfo, + const unsigned char * inbuffer, + size_t insize)); + +/* Default parameter setup for compression */ +EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo)); +/* Compression parameter setup aids */ +EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo, + J_COLOR_SPACE colorspace)); +EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality, + boolean force_baseline)); +EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo, + int scale_factor, + boolean force_baseline)); +EXTERN(void) jpeg_default_qtables JPP((j_compress_ptr cinfo, + boolean force_baseline)); +EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, + boolean force_baseline)); +EXTERN(int) jpeg_quality_scaling JPP((int quality)); +EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo, + boolean suppress)); +EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo)); +EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo)); +EXTERN(JHUFF_TBL *) jpeg_std_huff_table JPP((j_common_ptr cinfo, + boolean isDC, int tblno)); + +/* Main entry points for compression */ +EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo, + boolean write_all_tables)); +EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION num_lines)); +EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo)); + +/* Precalculate JPEG dimensions for current compression parameters. */ +EXTERN(void) jpeg_calc_jpeg_dimensions JPP((j_compress_ptr cinfo)); + +/* Replaces jpeg_write_scanlines when writing raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo, + JSAMPIMAGE data, + JDIMENSION num_lines)); + +/* Write a special marker. See libjpeg.txt concerning safe usage. */ +EXTERN(void) jpeg_write_marker + JPP((j_compress_ptr cinfo, int marker, + const JOCTET * dataptr, unsigned int datalen)); +/* Same, but piecemeal. */ +EXTERN(void) jpeg_write_m_header + JPP((j_compress_ptr cinfo, int marker, unsigned int datalen)); +EXTERN(void) jpeg_write_m_byte + JPP((j_compress_ptr cinfo, int val)); + +/* Alternate compression function: just write an abbreviated table file */ +EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo)); + +/* Decompression startup: read start of JPEG datastream to see what's there */ +EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo, + boolean require_image)); +/* Return value is one of: */ +#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ +#define JPEG_HEADER_OK 1 /* Found valid image datastream */ +#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ +/* If you pass require_image = TRUE (normal case), you need not check for + * a TABLES_ONLY return code; an abbreviated file will cause an error exit. + * JPEG_SUSPENDED is only possible if you use a data source module that can + * give a suspension return (the stdio source module doesn't). + */ + +/* Main entry points for decompression */ +EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo)); +EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION max_lines)); +EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo)); + +/* Replaces jpeg_read_scanlines when reading raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo, + JSAMPIMAGE data, + JDIMENSION max_lines)); + +/* Additional entry points for buffered-image mode. */ +EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo, + int scan_number)); +EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo)); +EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo)); +/* Return value is one of: */ +/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ +#define JPEG_REACHED_SOS 1 /* Reached start of new scan */ +#define JPEG_REACHED_EOI 2 /* Reached end of image */ +#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ +#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ + +/* Precalculate output dimensions for current decompression parameters. */ +EXTERN(void) jpeg_core_output_dimensions JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo)); + +/* Control saving of COM and APPn markers into marker_list. */ +EXTERN(void) jpeg_save_markers + JPP((j_decompress_ptr cinfo, int marker_code, + unsigned int length_limit)); + +/* Install a special processing method for COM or APPn markers. */ +EXTERN(void) jpeg_set_marker_processor + JPP((j_decompress_ptr cinfo, int marker_code, + jpeg_marker_parser_method routine)); + +/* Read or write raw DCT coefficients --- useful for lossless transcoding. */ +EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo, + jvirt_barray_ptr * coef_arrays)); +EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo, + j_compress_ptr dstinfo)); + +/* If you choose to abort compression or decompression before completing + * jpeg_finish_(de)compress, then you need to clean up to release memory, + * temporary files, etc. You can just call jpeg_destroy_(de)compress + * if you're done with the JPEG object, but if you want to clean it up and + * reuse it, call this: + */ +EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo)); + +/* Generic versions of jpeg_abort and jpeg_destroy that work on either + * flavor of JPEG object. These may be more convenient in some places. + */ +EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo)); +EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo)); + +/* Default restart-marker-resync procedure for use by data source modules */ +EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo, + int desired)); + + +/* These marker codes are exported since applications and data source modules + * are likely to want to use them. + */ + +#define JPEG_RST0 0xD0 /* RST0 marker code */ +#define JPEG_EOI 0xD9 /* EOI marker code */ +#define JPEG_APP0 0xE0 /* APP0 marker code */ +#define JPEG_COM 0xFE /* COM marker code */ + + +/* If we have a brain-damaged compiler that emits warnings (or worse, errors) + * for structure definitions that are never filled in, keep it quiet by + * supplying dummy definitions for the various substructures. + */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ +struct jvirt_sarray_control { long dummy; }; +struct jvirt_barray_control { long dummy; }; +struct jpeg_comp_master { long dummy; }; +struct jpeg_c_main_controller { long dummy; }; +struct jpeg_c_prep_controller { long dummy; }; +struct jpeg_c_coef_controller { long dummy; }; +struct jpeg_marker_writer { long dummy; }; +struct jpeg_color_converter { long dummy; }; +struct jpeg_downsampler { long dummy; }; +struct jpeg_forward_dct { long dummy; }; +struct jpeg_entropy_encoder { long dummy; }; +struct jpeg_decomp_master { long dummy; }; +struct jpeg_d_main_controller { long dummy; }; +struct jpeg_d_coef_controller { long dummy; }; +struct jpeg_d_post_controller { long dummy; }; +struct jpeg_input_controller { long dummy; }; +struct jpeg_marker_reader { long dummy; }; +struct jpeg_entropy_decoder { long dummy; }; +struct jpeg_inverse_dct { long dummy; }; +struct jpeg_upsampler { long dummy; }; +struct jpeg_color_deconverter { long dummy; }; +struct jpeg_color_quantizer { long dummy; }; +#endif /* JPEG_INTERNALS */ +#endif /* INCOMPLETE_TYPES_BROKEN */ + + +/* + * The JPEG library modules define JPEG_INTERNALS before including this file. + * The internal structure declarations are read only when that is true. + * Applications using the library should not include jpegint.h, but may wish + * to include jerror.h. + */ + +#ifdef JPEG_INTERNALS +#include "jpegint.h" /* fetch private declarations */ +#include "jerror.h" /* fetch error codes too */ +#endif + +#ifdef __cplusplus +#ifndef DONT_USE_EXTERN_C +} +#endif +#endif + +#endif /* JPEGLIB_H */ diff --git a/widget/milsko/milskosrc/external/libjpeg/include/jversion.h b/widget/milsko/milskosrc/external/libjpeg/include/jversion.h new file mode 100644 index 0000000000..df53ef5e55 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/include/jversion.h @@ -0,0 +1,14 @@ +/* + * jversion.h + * + * Copyright (C) 1991-2024, Thomas G. Lane, Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains software version identification. + */ + + +#define JVERSION "9f 14-Jan-2024" + +#define JCOPYRIGHT "Copyright (C) 2024, Thomas G. Lane, Guido Vollbeding" diff --git a/widget/milsko/milskosrc/external/libjpeg/include/transupp.h b/widget/milsko/milskosrc/external/libjpeg/include/transupp.h new file mode 100644 index 0000000000..a8ba16ad7f --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/include/transupp.h @@ -0,0 +1,230 @@ +/* + * transupp.h + * + * Copyright (C) 1997-2019, Thomas G. Lane, Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains declarations for image transformation routines and + * other utility code used by the jpegtran sample application. These are + * NOT part of the core JPEG library. But we keep these routines separate + * from jpegtran.c to ease the task of maintaining jpegtran-like programs + * that have other user interfaces. + * + * NOTE: all the routines declared here have very specific requirements + * about when they are to be executed during the reading and writing of the + * source and destination files. See the comments in transupp.c, or see + * jpegtran.c for an example of correct usage. + */ + +/* If you happen not to want the image transform support, disable it here */ +#ifndef TRANSFORMS_SUPPORTED +#define TRANSFORMS_SUPPORTED 1 /* 0 disables transform code */ +#endif + +/* + * Although rotating and flipping data expressed as DCT coefficients is not + * hard, there is an asymmetry in the JPEG format specification for images + * whose dimensions aren't multiples of the iMCU size. The right and bottom + * image edges are padded out to the next iMCU boundary with junk data; but + * no padding is possible at the top and left edges. If we were to flip + * the whole image including the pad data, then pad garbage would become + * visible at the top and/or left, and real pixels would disappear into the + * pad margins --- perhaps permanently, since encoders & decoders may not + * bother to preserve DCT blocks that appear to be completely outside the + * nominal image area. So, we have to exclude any partial iMCUs from the + * basic transformation. + * + * Transpose is the only transformation that can handle partial iMCUs at the + * right and bottom edges completely cleanly. flip_h can flip partial iMCUs + * at the bottom, but leaves any partial iMCUs at the right edge untouched. + * Similarly flip_v leaves any partial iMCUs at the bottom edge untouched. + * The other transforms are defined as combinations of these basic transforms + * and process edge blocks in a way that preserves the equivalence. + * + * The "trim" option causes untransformable partial iMCUs to be dropped; + * this is not strictly lossless, but it usually gives the best-looking + * result for odd-size images. Note that when this option is active, + * the expected mathematical equivalences between the transforms may not hold. + * (For example, -rot 270 -trim trims only the bottom edge, but -rot 90 -trim + * followed by -rot 180 -trim trims both edges.) + * + * We also offer a lossless-crop option, which discards data outside a given + * image region but losslessly preserves what is inside. Like the rotate and + * flip transforms, lossless crop is restricted by the current JPEG format: the + * upper left corner of the selected region must fall on an iMCU boundary. If + * this does not hold for the given crop parameters, we silently move the upper + * left corner up and/or left to make it so, simultaneously increasing the + * region dimensions to keep the lower right crop corner unchanged. (Thus, the + * output image covers at least the requested region, but may cover more.) + * The adjustment of the region dimensions may be optionally disabled. + * + * A complementary lossless-wipe option is provided to discard (gray out) data + * inside a given image region while losslessly preserving what is outside. + * Another option is lossless-drop, which replaces data at a given image + * position by another image. Both source images must have the same + * subsampling values. It is best if they also have the same quantization, + * otherwise quantization adaption occurs. The trim option can be used with + * the drop option to requantize the drop file to the source file. + * + * We also provide a lossless-resize option, which is kind of a lossless-crop + * operation in the DCT coefficient block domain - it discards higher-order + * coefficients and losslessly preserves lower-order coefficients of a + * sub-block. + * + * Rotate/flip transform, resize, and crop can be requested together in a + * single invocation. The crop is applied last --- that is, the crop region + * is specified in terms of the destination image after transform/resize. + * + * We also offer a "force to grayscale" option, which simply discards the + * chrominance channels of a YCbCr image. This is lossless in the sense that + * the luminance channel is preserved exactly. It's not the same kind of + * thing as the rotate/flip transformations, but it's convenient to handle it + * as part of this package, mainly because the transformation routines have to + * be aware of the option to know how many components to work on. + */ + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jtransform_parse_crop_spec jTrParCrop +#define jtransform_request_workspace jTrRequest +#define jtransform_adjust_parameters jTrAdjust +#define jtransform_execute_transform jTrExec +#define jtransform_perfect_transform jTrPerfect +#define jcopy_markers_setup jCMrkSetup +#define jcopy_markers_execute jCMrkExec +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* + * Codes for supported types of image transformations. + */ + +typedef enum { + JXFORM_NONE, /* no transformation */ + JXFORM_FLIP_H, /* horizontal flip */ + JXFORM_FLIP_V, /* vertical flip */ + JXFORM_TRANSPOSE, /* transpose across UL-to-LR axis */ + JXFORM_TRANSVERSE, /* transpose across UR-to-LL axis */ + JXFORM_ROT_90, /* 90-degree clockwise rotation */ + JXFORM_ROT_180, /* 180-degree rotation */ + JXFORM_ROT_270, /* 270-degree clockwise (or 90 ccw) */ + JXFORM_WIPE, /* wipe */ + JXFORM_DROP /* drop */ +} JXFORM_CODE; + +/* + * Codes for crop parameters, which can individually be unspecified, + * positive or negative for xoffset or yoffset, + * positive or force or reflect for width or height. + */ + +typedef enum { + JCROP_UNSET, + JCROP_POS, + JCROP_NEG, + JCROP_FORCE, + JCROP_REFLECT +} JCROP_CODE; + +/* + * Transform parameters struct. + * NB: application must not change any elements of this struct after + * calling jtransform_request_workspace. + */ + +typedef struct { + /* Options: set by caller */ + JXFORM_CODE transform; /* image transform operator */ + boolean perfect; /* if TRUE, fail if partial MCUs are requested */ + boolean trim; /* if TRUE, trim partial MCUs as needed */ + boolean force_grayscale; /* if TRUE, convert color image to grayscale */ + boolean crop; /* if TRUE, crop or wipe source image, or drop */ + + /* Crop parameters: application need not set these unless crop is TRUE. + * These can be filled in by jtransform_parse_crop_spec(). + */ + JDIMENSION crop_width; /* Width of selected region */ + JCROP_CODE crop_width_set; /* (force disables adjustment) */ + JDIMENSION crop_height; /* Height of selected region */ + JCROP_CODE crop_height_set; /* (force disables adjustment) */ + JDIMENSION crop_xoffset; /* X offset of selected region */ + JCROP_CODE crop_xoffset_set; /* (negative measures from right edge) */ + JDIMENSION crop_yoffset; /* Y offset of selected region */ + JCROP_CODE crop_yoffset_set; /* (negative measures from bottom edge) */ + + /* Drop parameters: set by caller for drop request */ + j_decompress_ptr drop_ptr; + jvirt_barray_ptr * drop_coef_arrays; + + /* Internal workspace: caller should not touch these */ + int num_components; /* # of components in workspace */ + jvirt_barray_ptr * workspace_coef_arrays; /* workspace for transformations */ + JDIMENSION output_width; /* cropped destination dimensions */ + JDIMENSION output_height; + JDIMENSION x_crop_offset; /* destination crop offsets measured in iMCUs */ + JDIMENSION y_crop_offset; + JDIMENSION drop_width; /* drop/wipe dimensions measured in iMCUs */ + JDIMENSION drop_height; + int iMCU_sample_width; /* destination iMCU size */ + int iMCU_sample_height; +} jpeg_transform_info; + + +#if TRANSFORMS_SUPPORTED + +/* Parse a crop specification (written in X11 geometry style) */ +EXTERN(boolean) jtransform_parse_crop_spec + JPP((jpeg_transform_info *info, const char *spec)); +/* Request any required workspace */ +EXTERN(boolean) jtransform_request_workspace + JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info)); +/* Adjust output image parameters */ +EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters + JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jpeg_transform_info *info)); +/* Execute the actual transformation, if any */ +EXTERN(void) jtransform_execute_transform + JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jpeg_transform_info *info)); +/* Determine whether lossless transformation is perfectly + * possible for a specified image and transformation. + */ +EXTERN(boolean) jtransform_perfect_transform + JPP((JDIMENSION image_width, JDIMENSION image_height, + int MCU_width, int MCU_height, + JXFORM_CODE transform)); + +/* jtransform_execute_transform used to be called + * jtransform_execute_transformation, but some compilers complain about + * routine names that long. This macro is here to avoid breaking any + * old source code that uses the original name... + */ +#define jtransform_execute_transformation jtransform_execute_transform + +#endif /* TRANSFORMS_SUPPORTED */ + + +/* + * Support for copying optional markers from source to destination file. + */ + +typedef enum { + JCOPYOPT_NONE, /* copy no optional markers */ + JCOPYOPT_COMMENTS, /* copy only comment (COM) markers */ + JCOPYOPT_ALL /* copy all optional markers */ +} JCOPY_OPTION; + +#define JCOPYOPT_DEFAULT JCOPYOPT_COMMENTS /* recommended default */ + +/* Setup decompression object to save desired markers in memory */ +EXTERN(void) jcopy_markers_setup + JPP((j_decompress_ptr srcinfo, JCOPY_OPTION option)); +/* Copy markers saved in the given source object to the destination object */ +EXTERN(void) jcopy_markers_execute + JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JCOPY_OPTION option)); diff --git a/widget/milsko/milskosrc/external/libjpeg/src/cdjpeg.c b/widget/milsko/milskosrc/external/libjpeg/src/cdjpeg.c new file mode 100644 index 0000000000..b6250ff97c --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/cdjpeg.c @@ -0,0 +1,181 @@ +/* + * cdjpeg.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains common support routines used by the IJG application + * programs (cjpeg, djpeg, jpegtran). + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ +#include /* to declare isupper(), tolower() */ +#ifdef NEED_SIGNAL_CATCHER +#include /* to declare signal() */ +#endif +#ifdef USE_SETMODE +#include /* to declare setmode()'s parameter macros */ +/* If you have setmode() but not , just delete this line: */ +#include /* to declare setmode() */ +#endif + + +/* + * Signal catcher to ensure that temporary files are removed before aborting. + * NB: for Amiga Manx C this is actually a global routine named _abort(); + * we put "#define signal_catcher _abort" in jconfig.h. Talk about bogus... + */ + +#ifdef NEED_SIGNAL_CATCHER + +static j_common_ptr sig_cinfo; + +void /* must be global for Manx C */ +signal_catcher (int signum) +{ + if (sig_cinfo != NULL) { + if (sig_cinfo->err != NULL) /* turn off trace output */ + sig_cinfo->err->trace_level = 0; + jpeg_destroy(sig_cinfo); /* clean up memory allocation & temp files */ + } + exit(EXIT_FAILURE); +} + + +GLOBAL(void) +enable_signal_catcher (j_common_ptr cinfo) +{ + sig_cinfo = cinfo; +#ifdef SIGINT /* not all systems have SIGINT */ + signal(SIGINT, signal_catcher); +#endif +#ifdef SIGTERM /* not all systems have SIGTERM */ + signal(SIGTERM, signal_catcher); +#endif +} + +#endif + + +/* + * Optional progress monitor: display a percent-done figure on stderr. + */ + +#ifdef PROGRESS_REPORT + +METHODDEF(void) +progress_monitor (j_common_ptr cinfo) +{ + cd_progress_ptr prog = (cd_progress_ptr) cinfo->progress; + int total_passes = prog->pub.total_passes + prog->total_extra_passes; + int percent_done = (int) (prog->pub.pass_counter*100L/prog->pub.pass_limit); + + if (percent_done != prog->percent_done) { + prog->percent_done = percent_done; + if (total_passes > 1) { + fprintf(stderr, "\rPass %d/%d: %3d%% ", + prog->pub.completed_passes + prog->completed_extra_passes + 1, + total_passes, percent_done); + } else { + fprintf(stderr, "\r %3d%% ", percent_done); + } + fflush(stderr); + } +} + + +GLOBAL(void) +start_progress_monitor (j_common_ptr cinfo, cd_progress_ptr progress) +{ + /* Enable progress display, unless trace output is on */ + if (cinfo->err->trace_level == 0) { + progress->pub.progress_monitor = progress_monitor; + progress->completed_extra_passes = 0; + progress->total_extra_passes = 0; + progress->percent_done = -1; + cinfo->progress = &progress->pub; + } +} + + +GLOBAL(void) +end_progress_monitor (j_common_ptr cinfo) +{ + /* Clear away progress display */ + if (cinfo->err->trace_level == 0) { + fprintf(stderr, "\r \r"); + fflush(stderr); + } +} + +#endif + + +/* + * Case-insensitive matching of possibly-abbreviated keyword switches. + * keyword is the constant keyword (must be lower case already), + * minchars is length of minimum legal abbreviation. + */ + +GLOBAL(boolean) +keymatch (char * arg, const char * keyword, int minchars) +{ + register int ca, ck; + register int nmatched = 0; + + while ((ca = *arg++) != '\0') { + if ((ck = *keyword++) == '\0') + return FALSE; /* arg longer than keyword, no good */ + if (isupper(ca)) /* force arg to lcase (assume ck is already) */ + ca = tolower(ca); + if (ca != ck) + return FALSE; /* no good */ + nmatched++; /* count matched characters */ + } + /* reached end of argument; fail if it's too short for unique abbrev */ + if (nmatched < minchars) + return FALSE; + return TRUE; /* A-OK */ +} + + +/* + * Routines to establish binary I/O mode for stdin and stdout. + * Non-Unix systems often require some hacking to get out of text mode. + */ + +GLOBAL(FILE *) +read_stdin (void) +{ + FILE * input_file = stdin; + +#ifdef USE_SETMODE /* need to hack file mode? */ + setmode(fileno(stdin), O_BINARY); +#endif +#ifdef USE_FDOPEN /* need to re-open in binary mode? */ + if ((input_file = fdopen(fileno(stdin), READ_BINARY)) == NULL) { + fprintf(stderr, "Cannot reopen stdin\n"); + exit(EXIT_FAILURE); + } +#endif + return input_file; +} + + +GLOBAL(FILE *) +write_stdout (void) +{ + FILE * output_file = stdout; + +#ifdef USE_SETMODE /* need to hack file mode? */ + setmode(fileno(stdout), O_BINARY); +#endif +#ifdef USE_FDOPEN /* need to re-open in binary mode? */ + if ((output_file = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) { + fprintf(stderr, "Cannot reopen stdout\n"); + exit(EXIT_FAILURE); + } +#endif + return output_file; +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jaricom.c b/widget/milsko/milskosrc/external/libjpeg/src/jaricom.c new file mode 100644 index 0000000000..690068861f --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jaricom.c @@ -0,0 +1,153 @@ +/* + * jaricom.c + * + * Developed 1997-2011 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains probability estimation tables for common use in + * arithmetic entropy encoding and decoding routines. + * + * This data represents Table D.3 in the JPEG spec (D.2 in the draft), + * ISO/IEC IS 10918-1 and CCITT Recommendation ITU-T T.81, and Table 24 + * in the JBIG spec, ISO/IEC IS 11544 and CCITT Recommendation ITU-T T.82. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +/* The following #define specifies the packing of the four components + * into the compact INT32 representation. + * Note that this formula must match the actual arithmetic encoder + * and decoder implementation. The implementation has to be changed + * if this formula is changed. + * The current organization is leaned on Markus Kuhn's JBIG + * implementation (jbig_tab.c). + */ + +#define V(i,a,b,c,d) (((INT32)a << 16) | ((INT32)c << 8) | ((INT32)d << 7) | b) + +const INT32 jpeg_aritab[113+1] = { +/* + * Index, Qe_Value, Next_Index_LPS, Next_Index_MPS, Switch_MPS + */ + V( 0, 0x5a1d, 1, 1, 1 ), + V( 1, 0x2586, 14, 2, 0 ), + V( 2, 0x1114, 16, 3, 0 ), + V( 3, 0x080b, 18, 4, 0 ), + V( 4, 0x03d8, 20, 5, 0 ), + V( 5, 0x01da, 23, 6, 0 ), + V( 6, 0x00e5, 25, 7, 0 ), + V( 7, 0x006f, 28, 8, 0 ), + V( 8, 0x0036, 30, 9, 0 ), + V( 9, 0x001a, 33, 10, 0 ), + V( 10, 0x000d, 35, 11, 0 ), + V( 11, 0x0006, 9, 12, 0 ), + V( 12, 0x0003, 10, 13, 0 ), + V( 13, 0x0001, 12, 13, 0 ), + V( 14, 0x5a7f, 15, 15, 1 ), + V( 15, 0x3f25, 36, 16, 0 ), + V( 16, 0x2cf2, 38, 17, 0 ), + V( 17, 0x207c, 39, 18, 0 ), + V( 18, 0x17b9, 40, 19, 0 ), + V( 19, 0x1182, 42, 20, 0 ), + V( 20, 0x0cef, 43, 21, 0 ), + V( 21, 0x09a1, 45, 22, 0 ), + V( 22, 0x072f, 46, 23, 0 ), + V( 23, 0x055c, 48, 24, 0 ), + V( 24, 0x0406, 49, 25, 0 ), + V( 25, 0x0303, 51, 26, 0 ), + V( 26, 0x0240, 52, 27, 0 ), + V( 27, 0x01b1, 54, 28, 0 ), + V( 28, 0x0144, 56, 29, 0 ), + V( 29, 0x00f5, 57, 30, 0 ), + V( 30, 0x00b7, 59, 31, 0 ), + V( 31, 0x008a, 60, 32, 0 ), + V( 32, 0x0068, 62, 33, 0 ), + V( 33, 0x004e, 63, 34, 0 ), + V( 34, 0x003b, 32, 35, 0 ), + V( 35, 0x002c, 33, 9, 0 ), + V( 36, 0x5ae1, 37, 37, 1 ), + V( 37, 0x484c, 64, 38, 0 ), + V( 38, 0x3a0d, 65, 39, 0 ), + V( 39, 0x2ef1, 67, 40, 0 ), + V( 40, 0x261f, 68, 41, 0 ), + V( 41, 0x1f33, 69, 42, 0 ), + V( 42, 0x19a8, 70, 43, 0 ), + V( 43, 0x1518, 72, 44, 0 ), + V( 44, 0x1177, 73, 45, 0 ), + V( 45, 0x0e74, 74, 46, 0 ), + V( 46, 0x0bfb, 75, 47, 0 ), + V( 47, 0x09f8, 77, 48, 0 ), + V( 48, 0x0861, 78, 49, 0 ), + V( 49, 0x0706, 79, 50, 0 ), + V( 50, 0x05cd, 48, 51, 0 ), + V( 51, 0x04de, 50, 52, 0 ), + V( 52, 0x040f, 50, 53, 0 ), + V( 53, 0x0363, 51, 54, 0 ), + V( 54, 0x02d4, 52, 55, 0 ), + V( 55, 0x025c, 53, 56, 0 ), + V( 56, 0x01f8, 54, 57, 0 ), + V( 57, 0x01a4, 55, 58, 0 ), + V( 58, 0x0160, 56, 59, 0 ), + V( 59, 0x0125, 57, 60, 0 ), + V( 60, 0x00f6, 58, 61, 0 ), + V( 61, 0x00cb, 59, 62, 0 ), + V( 62, 0x00ab, 61, 63, 0 ), + V( 63, 0x008f, 61, 32, 0 ), + V( 64, 0x5b12, 65, 65, 1 ), + V( 65, 0x4d04, 80, 66, 0 ), + V( 66, 0x412c, 81, 67, 0 ), + V( 67, 0x37d8, 82, 68, 0 ), + V( 68, 0x2fe8, 83, 69, 0 ), + V( 69, 0x293c, 84, 70, 0 ), + V( 70, 0x2379, 86, 71, 0 ), + V( 71, 0x1edf, 87, 72, 0 ), + V( 72, 0x1aa9, 87, 73, 0 ), + V( 73, 0x174e, 72, 74, 0 ), + V( 74, 0x1424, 72, 75, 0 ), + V( 75, 0x119c, 74, 76, 0 ), + V( 76, 0x0f6b, 74, 77, 0 ), + V( 77, 0x0d51, 75, 78, 0 ), + V( 78, 0x0bb6, 77, 79, 0 ), + V( 79, 0x0a40, 77, 48, 0 ), + V( 80, 0x5832, 80, 81, 1 ), + V( 81, 0x4d1c, 88, 82, 0 ), + V( 82, 0x438e, 89, 83, 0 ), + V( 83, 0x3bdd, 90, 84, 0 ), + V( 84, 0x34ee, 91, 85, 0 ), + V( 85, 0x2eae, 92, 86, 0 ), + V( 86, 0x299a, 93, 87, 0 ), + V( 87, 0x2516, 86, 71, 0 ), + V( 88, 0x5570, 88, 89, 1 ), + V( 89, 0x4ca9, 95, 90, 0 ), + V( 90, 0x44d9, 96, 91, 0 ), + V( 91, 0x3e22, 97, 92, 0 ), + V( 92, 0x3824, 99, 93, 0 ), + V( 93, 0x32b4, 99, 94, 0 ), + V( 94, 0x2e17, 93, 86, 0 ), + V( 95, 0x56a8, 95, 96, 1 ), + V( 96, 0x4f46, 101, 97, 0 ), + V( 97, 0x47e5, 102, 98, 0 ), + V( 98, 0x41cf, 103, 99, 0 ), + V( 99, 0x3c3d, 104, 100, 0 ), + V( 100, 0x375e, 99, 93, 0 ), + V( 101, 0x5231, 105, 102, 0 ), + V( 102, 0x4c0f, 106, 103, 0 ), + V( 103, 0x4639, 107, 104, 0 ), + V( 104, 0x415e, 103, 99, 0 ), + V( 105, 0x5627, 105, 106, 1 ), + V( 106, 0x50e7, 108, 107, 0 ), + V( 107, 0x4b85, 109, 103, 0 ), + V( 108, 0x5597, 110, 109, 0 ), + V( 109, 0x504f, 111, 107, 0 ), + V( 110, 0x5a10, 110, 111, 1 ), + V( 111, 0x5522, 112, 109, 0 ), + V( 112, 0x59eb, 112, 111, 1 ), +/* + * This last entry is used for fixed probability estimate of 0.5 + * as suggested in Section 10.3 Table 5 of ITU-T Rec. T.851. + */ + V( 113, 0x5a1d, 113, 113, 0 ) +}; diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jcapimin.c b/widget/milsko/milskosrc/external/libjpeg/src/jcapimin.c new file mode 100644 index 0000000000..639ce86f44 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jcapimin.c @@ -0,0 +1,288 @@ +/* + * jcapimin.c + * + * Copyright (C) 1994-1998, Thomas G. Lane. + * Modified 2003-2010 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the compression half + * of the JPEG library. These are the "minimum" API routines that may be + * needed in either the normal full-compression case or the transcoding-only + * case. + * + * Most of the routines intended to be called directly by an application + * are in this file or in jcapistd.c. But also see jcparam.c for + * parameter-setup helper routines, jcomapi.c for routines shared by + * compression and decompression, and jctrans.c for the transcoding case. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Initialization of a JPEG compression object. + * The error manager must already be set up (in case memory manager fails). + */ + +GLOBAL(void) +jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize) +{ + int i; + + /* Guard against version mismatches between library and caller. */ + cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ + if (version != JPEG_LIB_VERSION) + ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); + if (structsize != SIZEOF(struct jpeg_compress_struct)) + ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, + (int) SIZEOF(struct jpeg_compress_struct), (int) structsize); + + /* For debugging purposes, we zero the whole master structure. + * But the application has already set the err pointer, and may have set + * client_data, so we have to save and restore those fields. + * Note: if application hasn't set client_data, tools like Purify may + * complain here. + */ + { + struct jpeg_error_mgr * err = cinfo->err; + void * client_data = cinfo->client_data; /* ignore Purify complaint here */ + MEMZERO(cinfo, SIZEOF(struct jpeg_compress_struct)); + cinfo->err = err; + cinfo->client_data = client_data; + } + cinfo->is_decompressor = FALSE; + + /* Initialize a memory manager instance for this object */ + jinit_memory_mgr((j_common_ptr) cinfo); + + /* Zero out pointers to permanent structures. */ + cinfo->progress = NULL; + cinfo->dest = NULL; + + cinfo->comp_info = NULL; + + for (i = 0; i < NUM_QUANT_TBLS; i++) { + cinfo->quant_tbl_ptrs[i] = NULL; + cinfo->q_scale_factor[i] = 100; + } + + for (i = 0; i < NUM_HUFF_TBLS; i++) { + cinfo->dc_huff_tbl_ptrs[i] = NULL; + cinfo->ac_huff_tbl_ptrs[i] = NULL; + } + + /* Must do it here for emit_dqt in case jpeg_write_tables is used */ + cinfo->block_size = DCTSIZE; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + + cinfo->script_space = NULL; + + cinfo->input_gamma = 1.0; /* in case application forgets */ + + /* OK, I'm ready */ + cinfo->global_state = CSTATE_START; +} + + +/* + * Destruction of a JPEG compression object + */ + +GLOBAL(void) +jpeg_destroy_compress (j_compress_ptr cinfo) +{ + jpeg_destroy((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Abort processing of a JPEG compression operation, + * but don't destroy the object itself. + */ + +GLOBAL(void) +jpeg_abort_compress (j_compress_ptr cinfo) +{ + jpeg_abort((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Forcibly suppress or un-suppress all quantization and Huffman tables. + * Marks all currently defined tables as already written (if suppress) + * or not written (if !suppress). This will control whether they get emitted + * by a subsequent jpeg_start_compress call. + * + * This routine is exported for use by applications that want to produce + * abbreviated JPEG datastreams. It logically belongs in jcparam.c, but + * since it is called by jpeg_start_compress, we put it here --- otherwise + * jcparam.o would be linked whether the application used it or not. + */ + +GLOBAL(void) +jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress) +{ + int i; + JQUANT_TBL * qtbl; + JHUFF_TBL * htbl; + + for (i = 0; i < NUM_QUANT_TBLS; i++) { + if ((qtbl = cinfo->quant_tbl_ptrs[i]) != NULL) + qtbl->sent_table = suppress; + } + + for (i = 0; i < NUM_HUFF_TBLS; i++) { + if ((htbl = cinfo->dc_huff_tbl_ptrs[i]) != NULL) + htbl->sent_table = suppress; + if ((htbl = cinfo->ac_huff_tbl_ptrs[i]) != NULL) + htbl->sent_table = suppress; + } +} + + +/* + * Finish JPEG compression. + * + * If a multipass operating mode was selected, this may do a great deal of + * work including most of the actual output. + */ + +GLOBAL(void) +jpeg_finish_compress (j_compress_ptr cinfo) +{ + JDIMENSION iMCU_row; + + if (cinfo->global_state == CSTATE_SCANNING || + cinfo->global_state == CSTATE_RAW_OK) { + /* Terminate first pass */ + if (cinfo->next_scanline < cinfo->image_height) + ERREXIT(cinfo, JERR_TOO_LITTLE_DATA); + (*cinfo->master->finish_pass) (cinfo); + } else if (cinfo->global_state != CSTATE_WRCOEFS) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Perform any remaining passes */ + while (! cinfo->master->is_last_pass) { + (*cinfo->master->prepare_for_pass) (cinfo); + for (iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++) { + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) iMCU_row; + cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + /* We bypass the main controller and invoke coef controller directly; + * all work is being done from the coefficient buffer. + */ + if (! (*cinfo->coef->compress_data) (cinfo, (JSAMPIMAGE) NULL)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + } + (*cinfo->master->finish_pass) (cinfo); + } + /* Write EOI, do final cleanup */ + (*cinfo->marker->write_file_trailer) (cinfo); + (*cinfo->dest->term_destination) (cinfo); + /* We can use jpeg_abort to release memory and reset global_state */ + jpeg_abort((j_common_ptr) cinfo); +} + + +/* + * Write a special marker. + * This is only recommended for writing COM or APPn markers. + * Must be called after jpeg_start_compress() and before + * first call to jpeg_write_scanlines() or jpeg_write_raw_data(). + */ + +GLOBAL(void) +jpeg_write_marker (j_compress_ptr cinfo, int marker, + const JOCTET *dataptr, unsigned int datalen) +{ + JMETHOD(void, write_marker_byte, (j_compress_ptr info, int val)); + + if (cinfo->next_scanline != 0 || + (cinfo->global_state != CSTATE_SCANNING && + cinfo->global_state != CSTATE_RAW_OK && + cinfo->global_state != CSTATE_WRCOEFS)) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + (*cinfo->marker->write_marker_header) (cinfo, marker, datalen); + write_marker_byte = cinfo->marker->write_marker_byte; /* copy for speed */ + while (datalen--) { + (*write_marker_byte) (cinfo, *dataptr); + dataptr++; + } +} + +/* Same, but piecemeal. */ + +GLOBAL(void) +jpeg_write_m_header (j_compress_ptr cinfo, int marker, unsigned int datalen) +{ + if (cinfo->next_scanline != 0 || + (cinfo->global_state != CSTATE_SCANNING && + cinfo->global_state != CSTATE_RAW_OK && + cinfo->global_state != CSTATE_WRCOEFS)) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + (*cinfo->marker->write_marker_header) (cinfo, marker, datalen); +} + +GLOBAL(void) +jpeg_write_m_byte (j_compress_ptr cinfo, int val) +{ + (*cinfo->marker->write_marker_byte) (cinfo, val); +} + + +/* + * Alternate compression function: just write an abbreviated table file. + * Before calling this, all parameters and a data destination must be set up. + * + * To produce a pair of files containing abbreviated tables and abbreviated + * image data, one would proceed as follows: + * + * initialize JPEG object + * set JPEG parameters + * set destination to table file + * jpeg_write_tables(cinfo); + * set destination to image file + * jpeg_start_compress(cinfo, FALSE); + * write data... + * jpeg_finish_compress(cinfo); + * + * jpeg_write_tables has the side effect of marking all tables written + * (same as jpeg_suppress_tables(..., TRUE)). Thus a subsequent start_compress + * will not re-emit the tables unless it is passed write_all_tables=TRUE. + */ + +GLOBAL(void) +jpeg_write_tables (j_compress_ptr cinfo) +{ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* (Re)initialize error mgr and destination modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->dest->init_destination) (cinfo); + /* Initialize the marker writer ... bit of a crock to do it here. */ + jinit_marker_writer(cinfo); + /* Write them tables! */ + (*cinfo->marker->write_tables_only) (cinfo); + /* And clean up. */ + (*cinfo->dest->term_destination) (cinfo); + /* + * In library releases up through v6a, we called jpeg_abort() here to free + * any working memory allocated by the destination manager and marker + * writer. Some applications had a problem with that: they allocated space + * of their own from the library memory manager, and didn't want it to go + * away during write_tables. So now we do nothing. This will cause a + * memory leak if an app calls write_tables repeatedly without doing a full + * compression cycle or otherwise resetting the JPEG object. However, that + * seems less bad than unexpectedly freeing memory in the normal case. + * An app that prefers the old behavior can call jpeg_abort for itself after + * each call to jpeg_write_tables(). + */ +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jcapistd.c b/widget/milsko/milskosrc/external/libjpeg/src/jcapistd.c new file mode 100644 index 0000000000..0917afa97d --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jcapistd.c @@ -0,0 +1,162 @@ +/* + * jcapistd.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2013 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the compression half + * of the JPEG library. These are the "standard" API routines that are + * used in the normal full-compression case. They are not used by a + * transcoding-only application. Note that if an application links in + * jpeg_start_compress, it will end up linking in the entire compressor. + * We thus must separate this file from jcapimin.c to avoid linking the + * whole compression library into a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Compression initialization. + * Before calling this, all parameters and a data destination must be set up. + * + * We require a write_all_tables parameter as a failsafe check when writing + * multiple datastreams from the same compression object. Since prior runs + * will have left all the tables marked sent_table=TRUE, a subsequent run + * would emit an abbreviated stream (no tables) by default. This may be what + * is wanted, but for safety's sake it should not be the default behavior: + * programmers should have to make a deliberate choice to emit abbreviated + * images. Therefore the documentation and examples should encourage people + * to pass write_all_tables=TRUE; then it will take active thought to do the + * wrong thing. + */ + +GLOBAL(void) +jpeg_start_compress (j_compress_ptr cinfo, boolean write_all_tables) +{ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + if (write_all_tables) + jpeg_suppress_tables(cinfo, FALSE); /* mark all tables to be written */ + + /* (Re)initialize error mgr and destination modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->dest->init_destination) (cinfo); + /* Perform master selection of active modules */ + jinit_compress_master(cinfo); + /* Set up for the first pass */ + (*cinfo->master->prepare_for_pass) (cinfo); + /* Ready for application to drive first pass through jpeg_write_scanlines + * or jpeg_write_raw_data. + */ + cinfo->next_scanline = 0; + cinfo->global_state = (cinfo->raw_data_in ? CSTATE_RAW_OK : CSTATE_SCANNING); +} + + +/* + * Write some scanlines of data to the JPEG compressor. + * + * The return value will be the number of lines actually written. + * This should be less than the supplied num_lines only in case that + * the data destination module has requested suspension of the compressor, + * or if more than image_height scanlines are passed in. + * + * Note: we warn about excess calls to jpeg_write_scanlines() since + * this likely signals an application programmer error. However, + * excess scanlines passed in the last valid call are *silently* ignored, + * so that the application need not adjust num_lines for end-of-image + * when using a multiple-scanline buffer. + */ + +GLOBAL(JDIMENSION) +jpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines, + JDIMENSION num_lines) +{ + JDIMENSION row_ctr, rows_left; + + if (cinfo->global_state != CSTATE_SCANNING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->next_scanline >= cinfo->image_height) + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->next_scanline; + cinfo->progress->pass_limit = (long) cinfo->image_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Give master control module another chance if this is first call to + * jpeg_write_scanlines. This lets output of the frame/scan headers be + * delayed so that application can write COM, etc, markers between + * jpeg_start_compress and jpeg_write_scanlines. + */ + if (cinfo->master->call_pass_startup) + (*cinfo->master->pass_startup) (cinfo); + + /* Ignore any extra scanlines at bottom of image. */ + rows_left = cinfo->image_height - cinfo->next_scanline; + if (num_lines > rows_left) + num_lines = rows_left; + + row_ctr = 0; + (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, num_lines); + cinfo->next_scanline += row_ctr; + return row_ctr; +} + + +/* + * Alternate entry point to write raw data. + * Processes exactly one iMCU row per call, unless suspended. + */ + +GLOBAL(JDIMENSION) +jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data, + JDIMENSION num_lines) +{ + JDIMENSION lines_per_iMCU_row; + + if (cinfo->global_state != CSTATE_RAW_OK) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->next_scanline >= cinfo->image_height) { + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + return 0; + } + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->next_scanline; + cinfo->progress->pass_limit = (long) cinfo->image_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Give master control module another chance if this is first call to + * jpeg_write_raw_data. This lets output of the frame/scan headers be + * delayed so that application can write COM, etc, markers between + * jpeg_start_compress and jpeg_write_raw_data. + */ + if (cinfo->master->call_pass_startup) + (*cinfo->master->pass_startup) (cinfo); + + /* Verify that at least one iMCU row has been passed. */ + lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_v_scaled_size; + if (num_lines < lines_per_iMCU_row) + ERREXIT(cinfo, JERR_BUFFER_SIZE); + + /* Directly compress the row. */ + if (! (*cinfo->coef->compress_data) (cinfo, data)) { + /* If compressor did not consume the whole row, suspend processing. */ + return 0; + } + + /* OK, we processed one iMCU row. */ + cinfo->next_scanline += lines_per_iMCU_row; + return lines_per_iMCU_row; +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jcarith.c b/widget/milsko/milskosrc/external/libjpeg/src/jcarith.c new file mode 100644 index 0000000000..1b45089a3a --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jcarith.c @@ -0,0 +1,945 @@ +/* + * jcarith.c + * + * Developed 1997-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains portable arithmetic entropy encoding routines for JPEG + * (implementing the ISO/IEC IS 10918-1 and CCITT Recommendation ITU-T T.81). + * + * Both sequential and progressive modes are supported in this single module. + * + * Suspension is not currently supported in this module. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Expanded entropy encoder object for arithmetic encoding. */ + +typedef struct { + struct jpeg_entropy_encoder pub; /* public fields */ + + INT32 c; /* C register, base of coding interval, layout as in sec. D.1.3 */ + INT32 a; /* A register, normalized size of coding interval */ + INT32 sc; /* counter for stacked 0xFF values which might overflow */ + INT32 zc; /* counter for pending 0x00 output values which might * + * be discarded at the end ("Pacman" termination) */ + int ct; /* bit shift counter, determines when next byte will be written */ + int buffer; /* buffer for most recent output byte != 0xFF */ + + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ + int dc_context[MAX_COMPS_IN_SCAN]; /* context index for DC conditioning */ + + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + int next_restart_num; /* next restart number to write (0-7) */ + + /* Pointers to statistics areas (these workspaces have image lifespan) */ + unsigned char * dc_stats[NUM_ARITH_TBLS]; + unsigned char * ac_stats[NUM_ARITH_TBLS]; + + /* Statistics bin for coding with fixed probability 0.5 */ + unsigned char fixed_bin[4]; +} arith_entropy_encoder; + +typedef arith_entropy_encoder * arith_entropy_ptr; + +/* The following two definitions specify the allocation chunk size + * for the statistics area. + * According to sections F.1.4.4.1.3 and F.1.4.4.2, we need at least + * 49 statistics bins for DC, and 245 statistics bins for AC coding. + * + * We use a compact representation with 1 byte per statistics bin, + * thus the numbers directly represent byte sizes. + * This 1 byte per statistics bin contains the meaning of the MPS + * (more probable symbol) in the highest bit (mask 0x80), and the + * index into the probability estimation state machine table + * in the lower bits (mask 0x7F). + */ + +#define DC_STAT_BINS 64 +#define AC_STAT_BINS 256 + +/* NOTE: Uncomment the following #define if you want to use the + * given formula for calculating the AC conditioning parameter Kx + * for spectral selection progressive coding in section G.1.3.2 + * of the spec (Kx = Kmin + SRL (8 + Se - Kmin) 4). + * Although the spec and P&M authors claim that this "has proven + * to give good results for 8 bit precision samples", I'm not + * convinced yet that this is really beneficial. + * Early tests gave only very marginal compression enhancements + * (a few - around 5 or so - bytes even for very large files), + * which would turn out rather negative if we'd suppress the + * DAC (Define Arithmetic Conditioning) marker segments for + * the default parameters in the future. + * Note that currently the marker writing module emits 12-byte + * DAC segments for a full-component scan in a color image. + * This is not worth worrying about IMHO. However, since the + * spec defines the default values to be used if the tables + * are omitted (unlike Huffman tables, which are required + * anyway), one might optimize this behaviour in the future, + * and then it would be disadvantageous to use custom tables if + * they don't provide sufficient gain to exceed the DAC size. + * + * On the other hand, I'd consider it as a reasonable result + * that the conditioning has no significant influence on the + * compression performance. This means that the basic + * statistical model is already rather stable. + * + * Thus, at the moment, we use the default conditioning values + * anyway, and do not use the custom formula. + * +#define CALCULATE_SPECTRAL_CONDITIONING + */ + +/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than INT32. + * We assume that int right shift is unsigned if INT32 right shift is, + * which should be safe. + */ + +#ifdef RIGHT_SHIFT_IS_UNSIGNED +#define ISHIFT_TEMPS int ishift_temp; +#define IRIGHT_SHIFT(x,shft) \ + ((ishift_temp = (x)) < 0 ? \ + (ishift_temp >> (shft)) | ((~0) << (16-(shft))) : \ + (ishift_temp >> (shft))) +#else +#define ISHIFT_TEMPS +#define IRIGHT_SHIFT(x,shft) ((x) >> (shft)) +#endif + + +LOCAL(void) +emit_byte (int val, j_compress_ptr cinfo) +/* Write next output byte; we do not support suspension in this module. */ +{ + struct jpeg_destination_mgr * dest = cinfo->dest; + + *dest->next_output_byte++ = (JOCTET) val; + if (--dest->free_in_buffer == 0) + if (! (*dest->empty_output_buffer) (cinfo)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); +} + + +/* + * Finish up at the end of an arithmetic-compressed scan. + */ + +METHODDEF(void) +finish_pass (j_compress_ptr cinfo) +{ + arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy; + INT32 temp; + + /* Section D.1.8: Termination of encoding */ + + /* Find the e->c in the coding interval with the largest + * number of trailing zero bits */ + if ((temp = (e->a - 1 + e->c) & 0xFFFF0000L) < e->c) + e->c = temp + 0x8000L; + else + e->c = temp; + /* Send remaining bytes to output */ + e->c <<= e->ct; + if (e->c & 0xF8000000L) { + /* One final overflow has to be handled */ + if (e->buffer >= 0) { + if (e->zc) + do emit_byte(0x00, cinfo); + while (--e->zc); + emit_byte(e->buffer + 1, cinfo); + if (e->buffer + 1 == 0xFF) + emit_byte(0x00, cinfo); + } + e->zc += e->sc; /* carry-over converts stacked 0xFF bytes to 0x00 */ + e->sc = 0; + } else { + if (e->buffer == 0) + ++e->zc; + else if (e->buffer >= 0) { + if (e->zc) + do emit_byte(0x00, cinfo); + while (--e->zc); + emit_byte(e->buffer, cinfo); + } + if (e->sc) { + if (e->zc) + do emit_byte(0x00, cinfo); + while (--e->zc); + do { + emit_byte(0xFF, cinfo); + emit_byte(0x00, cinfo); + } while (--e->sc); + } + } + /* Output final bytes only if they are not 0x00 */ + if (e->c & 0x7FFF800L) { + if (e->zc) /* output final pending zero bytes */ + do emit_byte(0x00, cinfo); + while (--e->zc); + emit_byte((int) ((e->c >> 19) & 0xFF), cinfo); + if (((e->c >> 19) & 0xFF) == 0xFF) + emit_byte(0x00, cinfo); + if (e->c & 0x7F800L) { + emit_byte((int) ((e->c >> 11) & 0xFF), cinfo); + if (((e->c >> 11) & 0xFF) == 0xFF) + emit_byte(0x00, cinfo); + } + } +} + + +/* + * The core arithmetic encoding routine (common in JPEG and JBIG). + * This needs to go as fast as possible. + * Machine-dependent optimization facilities + * are not utilized in this portable implementation. + * However, this code should be fairly efficient and + * may be a good base for further optimizations anyway. + * + * Parameter 'val' to be encoded may be 0 or 1 (binary decision). + * + * Note: I've added full "Pacman" termination support to the + * byte output routines, which is equivalent to the optional + * Discard_final_zeros procedure (Figure D.15) in the spec. + * Thus, we always produce the shortest possible output + * stream compliant to the spec (no trailing zero bytes, + * except for FF stuffing). + * + * I've also introduced a new scheme for accessing + * the probability estimation state machine table, + * derived from Markus Kuhn's JBIG implementation. + */ + +LOCAL(void) +arith_encode (j_compress_ptr cinfo, unsigned char *st, int val) +{ + register arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy; + register unsigned char nl, nm; + register INT32 qe, temp; + register int sv; + + /* Fetch values from our compact representation of Table D.3(D.2): + * Qe values and probability estimation state machine + */ + sv = *st; + qe = jpeg_aritab[sv & 0x7F]; /* => Qe_Value */ + nl = qe & 0xFF; qe >>= 8; /* Next_Index_LPS + Switch_MPS */ + nm = qe & 0xFF; qe >>= 8; /* Next_Index_MPS */ + + /* Encode & estimation procedures per sections D.1.4 & D.1.5 */ + e->a -= qe; + if (val != (sv >> 7)) { + /* Encode the less probable symbol */ + if (e->a >= qe) { + /* If the interval size (qe) for the less probable symbol (LPS) + * is larger than the interval size for the MPS, then exchange + * the two symbols for coding efficiency, otherwise code the LPS + * as usual: */ + e->c += e->a; + e->a = qe; + } + *st = (sv & 0x80) ^ nl; /* Estimate_after_LPS */ + } else { + /* Encode the more probable symbol */ + if (e->a >= 0x8000L) + return; /* A >= 0x8000 -> ready, no renormalization required */ + if (e->a < qe) { + /* If the interval size (qe) for the less probable symbol (LPS) + * is larger than the interval size for the MPS, then exchange + * the two symbols for coding efficiency: */ + e->c += e->a; + e->a = qe; + } + *st = (sv & 0x80) ^ nm; /* Estimate_after_MPS */ + } + + /* Renormalization & data output per section D.1.6 */ + do { + e->a <<= 1; + e->c <<= 1; + if (--e->ct == 0) { + /* Another byte is ready for output */ + temp = e->c >> 19; + if (temp > 0xFF) { + /* Handle overflow over all stacked 0xFF bytes */ + if (e->buffer >= 0) { + if (e->zc) + do emit_byte(0x00, cinfo); + while (--e->zc); + emit_byte(e->buffer + 1, cinfo); + if (e->buffer + 1 == 0xFF) + emit_byte(0x00, cinfo); + } + e->zc += e->sc; /* carry-over converts stacked 0xFF bytes to 0x00 */ + e->sc = 0; + /* Note: The 3 spacer bits in the C register guarantee + * that the new buffer byte can't be 0xFF here + * (see page 160 in the P&M JPEG book). */ + /* New output byte, might overflow later */ + e->buffer = (int) (temp & 0xFF); + } else if (temp == 0xFF) { + ++e->sc; /* stack 0xFF byte (which might overflow later) */ + } else { + /* Output all stacked 0xFF bytes, they will not overflow any more */ + if (e->buffer == 0) + ++e->zc; + else if (e->buffer >= 0) { + if (e->zc) + do emit_byte(0x00, cinfo); + while (--e->zc); + emit_byte(e->buffer, cinfo); + } + if (e->sc) { + if (e->zc) + do emit_byte(0x00, cinfo); + while (--e->zc); + do { + emit_byte(0xFF, cinfo); + emit_byte(0x00, cinfo); + } while (--e->sc); + } + /* New output byte (can still overflow) */ + e->buffer = (int) (temp & 0xFF); + } + e->c &= 0x7FFFFL; + e->ct += 8; + } + } while (e->a < 0x8000L); +} + + +/* + * Emit a restart marker & resynchronize predictions. + */ + +LOCAL(void) +emit_restart (j_compress_ptr cinfo, int restart_num) +{ + arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; + int ci; + jpeg_component_info * compptr; + + finish_pass(cinfo); + + emit_byte(0xFF, cinfo); + emit_byte(JPEG_RST0 + restart_num, cinfo); + + /* Re-initialize statistics areas */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* DC needs no table for refinement scan */ + if (cinfo->Ss == 0 && cinfo->Ah == 0) { + MEMZERO(entropy->dc_stats[compptr->dc_tbl_no], DC_STAT_BINS); + /* Reset DC predictions to 0 */ + entropy->last_dc_val[ci] = 0; + entropy->dc_context[ci] = 0; + } + /* AC needs no table when not present */ + if (cinfo->Se) { + MEMZERO(entropy->ac_stats[compptr->ac_tbl_no], AC_STAT_BINS); + } + } + + /* Reset arithmetic encoding variables */ + entropy->c = 0; + entropy->a = 0x10000L; + entropy->sc = 0; + entropy->zc = 0; + entropy->ct = 11; + entropy->buffer = -1; /* empty */ +} + + +/* + * MCU encoding for DC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; + unsigned char *st; + int blkn, ci, tbl; + int v, v2, m; + ISHIFT_TEMPS + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + emit_restart(cinfo, entropy->next_restart_num); + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + /* Encode the MCU data blocks */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + ci = cinfo->MCU_membership[blkn]; + tbl = cinfo->cur_comp_info[ci]->dc_tbl_no; + + /* Compute the DC value after the required point transform by Al. + * This is simply an arithmetic right shift. + */ + m = IRIGHT_SHIFT((int) (MCU_data[blkn][0][0]), cinfo->Al); + + /* Sections F.1.4.1 & F.1.4.4.1: Encoding of DC coefficients */ + + /* Table F.4: Point to statistics bin S0 for DC coefficient coding */ + st = entropy->dc_stats[tbl] + entropy->dc_context[ci]; + + /* Figure F.4: Encode_DC_DIFF */ + if ((v = m - entropy->last_dc_val[ci]) == 0) { + arith_encode(cinfo, st, 0); + entropy->dc_context[ci] = 0; /* zero diff category */ + } else { + entropy->last_dc_val[ci] = m; + arith_encode(cinfo, st, 1); + /* Figure F.6: Encoding nonzero value v */ + /* Figure F.7: Encoding the sign of v */ + if (v > 0) { + arith_encode(cinfo, st + 1, 0); /* Table F.4: SS = S0 + 1 */ + st += 2; /* Table F.4: SP = S0 + 2 */ + entropy->dc_context[ci] = 4; /* small positive diff category */ + } else { + v = -v; + arith_encode(cinfo, st + 1, 1); /* Table F.4: SS = S0 + 1 */ + st += 3; /* Table F.4: SN = S0 + 3 */ + entropy->dc_context[ci] = 8; /* small negative diff category */ + } + /* Figure F.8: Encoding the magnitude category of v */ + m = 0; + if (v -= 1) { + arith_encode(cinfo, st, 1); + m = 1; + v2 = v; + st = entropy->dc_stats[tbl] + 20; /* Table F.4: X1 = 20 */ + while (v2 >>= 1) { + arith_encode(cinfo, st, 1); + m <<= 1; + st += 1; + } + } + arith_encode(cinfo, st, 0); + /* Section F.1.4.4.1.2: Establish dc_context conditioning category */ + if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1)) + entropy->dc_context[ci] = 0; /* zero diff category */ + else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1)) + entropy->dc_context[ci] += 8; /* large diff category */ + /* Figure F.9: Encoding the magnitude bit pattern of v */ + st += 14; + while (m >>= 1) + arith_encode(cinfo, st, (m & v) ? 1 : 0); + } + } + + return TRUE; +} + + +/* + * MCU encoding for AC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; + const int * natural_order; + JBLOCKROW block; + unsigned char *st; + int tbl, k, ke; + int v, v2, m; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + emit_restart(cinfo, entropy->next_restart_num); + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + natural_order = cinfo->natural_order; + + /* Encode the MCU data block */ + block = MCU_data[0]; + tbl = cinfo->cur_comp_info[0]->ac_tbl_no; + + /* Sections F.1.4.2 & F.1.4.4.2: Encoding of AC coefficients */ + + /* Establish EOB (end-of-block) index */ + ke = cinfo->Se; + do { + /* We must apply the point transform by Al. For AC coefficients this + * is an integer division with rounding towards 0. To do this portably + * in C, we shift after obtaining the absolute value. + */ + if ((v = (*block)[natural_order[ke]]) >= 0) { + if (v >>= cinfo->Al) break; + } else { + v = -v; + if (v >>= cinfo->Al) break; + } + } while (--ke); + + /* Figure F.5: Encode_AC_Coefficients */ + for (k = cinfo->Ss - 1; k < ke;) { + st = entropy->ac_stats[tbl] + 3 * k; + arith_encode(cinfo, st, 0); /* EOB decision */ + for (;;) { + if ((v = (*block)[natural_order[++k]]) >= 0) { + if (v >>= cinfo->Al) { + arith_encode(cinfo, st + 1, 1); + arith_encode(cinfo, entropy->fixed_bin, 0); + break; + } + } else { + v = -v; + if (v >>= cinfo->Al) { + arith_encode(cinfo, st + 1, 1); + arith_encode(cinfo, entropy->fixed_bin, 1); + break; + } + } + arith_encode(cinfo, st + 1, 0); + st += 3; + } + st += 2; + /* Figure F.8: Encoding the magnitude category of v */ + m = 0; + if (v -= 1) { + arith_encode(cinfo, st, 1); + m = 1; + v2 = v; + if (v2 >>= 1) { + arith_encode(cinfo, st, 1); + m <<= 1; + st = entropy->ac_stats[tbl] + + (k <= cinfo->arith_ac_K[tbl] ? 189 : 217); + while (v2 >>= 1) { + arith_encode(cinfo, st, 1); + m <<= 1; + st += 1; + } + } + } + arith_encode(cinfo, st, 0); + /* Figure F.9: Encoding the magnitude bit pattern of v */ + st += 14; + while (m >>= 1) + arith_encode(cinfo, st, (m & v) ? 1 : 0); + } + /* Encode EOB decision only if k < cinfo->Se */ + if (k < cinfo->Se) { + st = entropy->ac_stats[tbl] + 3 * k; + arith_encode(cinfo, st, 1); + } + + return TRUE; +} + + +/* + * MCU encoding for DC successive approximation refinement scan. + * Note: we assume such scans can be multi-component, + * although the spec is not very clear on the point. + */ + +METHODDEF(boolean) +encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; + unsigned char *st; + int Al, blkn; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + emit_restart(cinfo, entropy->next_restart_num); + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + st = entropy->fixed_bin; /* use fixed probability estimation */ + Al = cinfo->Al; + + /* Encode the MCU data blocks */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + /* We simply emit the Al'th bit of the DC coefficient value. */ + arith_encode(cinfo, st, (MCU_data[blkn][0][0] >> Al) & 1); + } + + return TRUE; +} + + +/* + * MCU encoding for AC successive approximation refinement scan. + */ + +METHODDEF(boolean) +encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; + const int * natural_order; + JBLOCKROW block; + unsigned char *st; + int tbl, k, ke, kex; + int v; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + emit_restart(cinfo, entropy->next_restart_num); + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + natural_order = cinfo->natural_order; + + /* Encode the MCU data block */ + block = MCU_data[0]; + tbl = cinfo->cur_comp_info[0]->ac_tbl_no; + + /* Section G.1.3.3: Encoding of AC coefficients */ + + /* Establish EOB (end-of-block) index */ + ke = cinfo->Se; + do { + /* We must apply the point transform by Al. For AC coefficients this + * is an integer division with rounding towards 0. To do this portably + * in C, we shift after obtaining the absolute value. + */ + if ((v = (*block)[natural_order[ke]]) >= 0) { + if (v >>= cinfo->Al) break; + } else { + v = -v; + if (v >>= cinfo->Al) break; + } + } while (--ke); + + /* Establish EOBx (previous stage end-of-block) index */ + for (kex = ke; kex > 0; kex--) + if ((v = (*block)[natural_order[kex]]) >= 0) { + if (v >>= cinfo->Ah) break; + } else { + v = -v; + if (v >>= cinfo->Ah) break; + } + + /* Figure G.10: Encode_AC_Coefficients_SA */ + for (k = cinfo->Ss - 1; k < ke;) { + st = entropy->ac_stats[tbl] + 3 * k; + if (k >= kex) + arith_encode(cinfo, st, 0); /* EOB decision */ + for (;;) { + if ((v = (*block)[natural_order[++k]]) >= 0) { + if (v >>= cinfo->Al) { + if (v >> 1) /* previously nonzero coef */ + arith_encode(cinfo, st + 2, (v & 1)); + else { /* newly nonzero coef */ + arith_encode(cinfo, st + 1, 1); + arith_encode(cinfo, entropy->fixed_bin, 0); + } + break; + } + } else { + v = -v; + if (v >>= cinfo->Al) { + if (v >> 1) /* previously nonzero coef */ + arith_encode(cinfo, st + 2, (v & 1)); + else { /* newly nonzero coef */ + arith_encode(cinfo, st + 1, 1); + arith_encode(cinfo, entropy->fixed_bin, 1); + } + break; + } + } + arith_encode(cinfo, st + 1, 0); + st += 3; + } + } + /* Encode EOB decision only if k < cinfo->Se */ + if (k < cinfo->Se) { + st = entropy->ac_stats[tbl] + 3 * k; + arith_encode(cinfo, st, 1); + } + + return TRUE; +} + + +/* + * Encode and output one MCU's worth of arithmetic-compressed coefficients. + */ + +METHODDEF(boolean) +encode_mcu (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; + const int * natural_order; + JBLOCKROW block; + unsigned char *st; + int tbl, k, ke; + int v, v2, m; + int blkn, ci; + jpeg_component_info * compptr; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + emit_restart(cinfo, entropy->next_restart_num); + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + natural_order = cinfo->natural_order; + + /* Encode the MCU data blocks */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + + /* Sections F.1.4.1 & F.1.4.4.1: Encoding of DC coefficients */ + + tbl = compptr->dc_tbl_no; + + /* Table F.4: Point to statistics bin S0 for DC coefficient coding */ + st = entropy->dc_stats[tbl] + entropy->dc_context[ci]; + + /* Figure F.4: Encode_DC_DIFF */ + if ((v = (*block)[0] - entropy->last_dc_val[ci]) == 0) { + arith_encode(cinfo, st, 0); + entropy->dc_context[ci] = 0; /* zero diff category */ + } else { + entropy->last_dc_val[ci] = (*block)[0]; + arith_encode(cinfo, st, 1); + /* Figure F.6: Encoding nonzero value v */ + /* Figure F.7: Encoding the sign of v */ + if (v > 0) { + arith_encode(cinfo, st + 1, 0); /* Table F.4: SS = S0 + 1 */ + st += 2; /* Table F.4: SP = S0 + 2 */ + entropy->dc_context[ci] = 4; /* small positive diff category */ + } else { + v = -v; + arith_encode(cinfo, st + 1, 1); /* Table F.4: SS = S0 + 1 */ + st += 3; /* Table F.4: SN = S0 + 3 */ + entropy->dc_context[ci] = 8; /* small negative diff category */ + } + /* Figure F.8: Encoding the magnitude category of v */ + m = 0; + if (v -= 1) { + arith_encode(cinfo, st, 1); + m = 1; + v2 = v; + st = entropy->dc_stats[tbl] + 20; /* Table F.4: X1 = 20 */ + while (v2 >>= 1) { + arith_encode(cinfo, st, 1); + m <<= 1; + st += 1; + } + } + arith_encode(cinfo, st, 0); + /* Section F.1.4.4.1.2: Establish dc_context conditioning category */ + if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1)) + entropy->dc_context[ci] = 0; /* zero diff category */ + else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1)) + entropy->dc_context[ci] += 8; /* large diff category */ + /* Figure F.9: Encoding the magnitude bit pattern of v */ + st += 14; + while (m >>= 1) + arith_encode(cinfo, st, (m & v) ? 1 : 0); + } + + /* Sections F.1.4.2 & F.1.4.4.2: Encoding of AC coefficients */ + + if ((ke = cinfo->lim_Se) == 0) continue; + tbl = compptr->ac_tbl_no; + + /* Establish EOB (end-of-block) index */ + do { + if ((*block)[natural_order[ke]]) break; + } while (--ke); + + /* Figure F.5: Encode_AC_Coefficients */ + for (k = 0; k < ke;) { + st = entropy->ac_stats[tbl] + 3 * k; + arith_encode(cinfo, st, 0); /* EOB decision */ + while ((v = (*block)[natural_order[++k]]) == 0) { + arith_encode(cinfo, st + 1, 0); + st += 3; + } + arith_encode(cinfo, st + 1, 1); + /* Figure F.6: Encoding nonzero value v */ + /* Figure F.7: Encoding the sign of v */ + if (v > 0) { + arith_encode(cinfo, entropy->fixed_bin, 0); + } else { + v = -v; + arith_encode(cinfo, entropy->fixed_bin, 1); + } + st += 2; + /* Figure F.8: Encoding the magnitude category of v */ + m = 0; + if (v -= 1) { + arith_encode(cinfo, st, 1); + m = 1; + v2 = v; + if (v2 >>= 1) { + arith_encode(cinfo, st, 1); + m <<= 1; + st = entropy->ac_stats[tbl] + + (k <= cinfo->arith_ac_K[tbl] ? 189 : 217); + while (v2 >>= 1) { + arith_encode(cinfo, st, 1); + m <<= 1; + st += 1; + } + } + } + arith_encode(cinfo, st, 0); + /* Figure F.9: Encoding the magnitude bit pattern of v */ + st += 14; + while (m >>= 1) + arith_encode(cinfo, st, (m & v) ? 1 : 0); + } + /* Encode EOB decision only if k < cinfo->lim_Se */ + if (k < cinfo->lim_Se) { + st = entropy->ac_stats[tbl] + 3 * k; + arith_encode(cinfo, st, 1); + } + } + + return TRUE; +} + + +/* + * Initialize for an arithmetic-compressed scan. + */ + +METHODDEF(void) +start_pass (j_compress_ptr cinfo, boolean gather_statistics) +{ + arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; + int ci, tbl; + jpeg_component_info * compptr; + + if (gather_statistics) + /* Make sure to avoid that in the master control logic! + * We are fully adaptive here and need no extra + * statistics gathering pass! + */ + ERREXIT(cinfo, JERR_NOT_COMPILED); + + /* We assume jcmaster.c already validated the progressive scan parameters. */ + + /* Select execution routines */ + if (cinfo->progressive_mode) { + if (cinfo->Ah == 0) { + if (cinfo->Ss == 0) + entropy->pub.encode_mcu = encode_mcu_DC_first; + else + entropy->pub.encode_mcu = encode_mcu_AC_first; + } else { + if (cinfo->Ss == 0) + entropy->pub.encode_mcu = encode_mcu_DC_refine; + else + entropy->pub.encode_mcu = encode_mcu_AC_refine; + } + } else + entropy->pub.encode_mcu = encode_mcu; + + /* Allocate & initialize requested statistics areas */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* DC needs no table for refinement scan */ + if (cinfo->Ss == 0 && cinfo->Ah == 0) { + tbl = compptr->dc_tbl_no; + if (tbl < 0 || tbl >= NUM_ARITH_TBLS) + ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl); + if (entropy->dc_stats[tbl] == NULL) + entropy->dc_stats[tbl] = (unsigned char *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, DC_STAT_BINS); + MEMZERO(entropy->dc_stats[tbl], DC_STAT_BINS); + /* Initialize DC predictions to 0 */ + entropy->last_dc_val[ci] = 0; + entropy->dc_context[ci] = 0; + } + /* AC needs no table when not present */ + if (cinfo->Se) { + tbl = compptr->ac_tbl_no; + if (tbl < 0 || tbl >= NUM_ARITH_TBLS) + ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl); + if (entropy->ac_stats[tbl] == NULL) + entropy->ac_stats[tbl] = (unsigned char *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, AC_STAT_BINS); + MEMZERO(entropy->ac_stats[tbl], AC_STAT_BINS); +#ifdef CALCULATE_SPECTRAL_CONDITIONING + if (cinfo->progressive_mode) + /* Section G.1.3.2: Set appropriate arithmetic conditioning value Kx */ + cinfo->arith_ac_K[tbl] = cinfo->Ss + ((8 + cinfo->Se - cinfo->Ss) >> 4); +#endif + } + } + + /* Initialize arithmetic encoding variables */ + entropy->c = 0; + entropy->a = 0x10000L; + entropy->sc = 0; + entropy->zc = 0; + entropy->ct = 11; + entropy->buffer = -1; /* empty */ + + /* Initialize restart stuff */ + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num = 0; +} + + +/* + * Module initialization routine for arithmetic entropy encoding. + */ + +GLOBAL(void) +jinit_arith_encoder (j_compress_ptr cinfo) +{ + arith_entropy_ptr entropy; + int i; + + entropy = (arith_entropy_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(arith_entropy_encoder)); + cinfo->entropy = &entropy->pub; + entropy->pub.start_pass = start_pass; + entropy->pub.finish_pass = finish_pass; + + /* Mark tables unallocated */ + for (i = 0; i < NUM_ARITH_TBLS; i++) { + entropy->dc_stats[i] = NULL; + entropy->ac_stats[i] = NULL; + } + + /* Initialize index for fixed probability estimation */ + entropy->fixed_bin[0] = 113; +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jccoefct.c b/widget/milsko/milskosrc/external/libjpeg/src/jccoefct.c new file mode 100644 index 0000000000..494aa22988 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jccoefct.c @@ -0,0 +1,456 @@ +/* + * jccoefct.c + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * Modified 2003-2022 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the coefficient buffer controller for compression. + * This controller is the top level of the JPEG compressor proper. + * The coefficient buffer lies between forward-DCT and entropy encoding steps. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* We use a full-image coefficient buffer when doing Huffman optimization, + * and also for writing multiple-scan JPEG files. In all cases, the DCT + * step is run during the first pass, and subsequent passes need only read + * the buffered coefficients. + */ +#ifdef ENTROPY_OPT_SUPPORTED +#define FULL_COEF_BUFFER_SUPPORTED +#else +#ifdef C_MULTISCAN_FILES_SUPPORTED +#define FULL_COEF_BUFFER_SUPPORTED +#endif +#endif + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_coef_controller pub; /* public fields */ + + JDIMENSION iMCU_row_num; /* iMCU row # within image */ + JDIMENSION MCU_ctr; /* counts MCUs processed in current row */ + int MCU_vert_offset; /* counts MCU rows within iMCU row */ + int MCU_rows_per_iMCU_row; /* number of such rows needed */ + + /* For single-pass compression, it's sufficient to buffer just one MCU + * (although this may prove a bit slow in practice). + * We append a workspace of C_MAX_BLOCKS_IN_MCU coefficient blocks, + * and reuse it for each MCU constructed and sent. + * In multi-pass modes, this array points to the current MCU's blocks + * within the virtual arrays. + */ + JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU]; + + /* In multi-pass modes, we need a virtual block array for each component. */ + jvirt_barray_ptr whole_image[MAX_COMPONENTS]; + + /* Workspace for single-pass compression (omitted otherwise). */ + JBLOCK blk_buffer[C_MAX_BLOCKS_IN_MCU]; +} my_coef_controller; + +typedef my_coef_controller * my_coef_ptr; + + +/* Forward declarations */ +METHODDEF(boolean) compress_data + JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); +#ifdef FULL_COEF_BUFFER_SUPPORTED +METHODDEF(boolean) compress_first_pass + JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); +METHODDEF(boolean) compress_output + JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); +#endif + + +LOCAL(void) +start_iMCU_row (j_compress_ptr cinfo) +/* Reset within-iMCU-row counters for a new row */ +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* In an interleaved scan, an MCU row is the same as an iMCU row. + * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. + * But at the bottom of the image, process only what's left. + */ + if (cinfo->comps_in_scan > 1) { + coef->MCU_rows_per_iMCU_row = 1; + } else { + if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1)) + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; + else + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; + } + + coef->MCU_ctr = 0; + coef->MCU_vert_offset = 0; +} + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + coef->iMCU_row_num = 0; + start_iMCU_row(cinfo); + + switch (pass_mode) { + case JBUF_PASS_THRU: + if (coef->whole_image[0] != NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + coef->pub.compress_data = compress_data; + break; +#ifdef FULL_COEF_BUFFER_SUPPORTED + case JBUF_SAVE_AND_PASS: + if (coef->whole_image[0] == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + coef->pub.compress_data = compress_first_pass; + break; + case JBUF_CRANK_DEST: + if (coef->whole_image[0] == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + coef->pub.compress_data = compress_output; + break; +#endif + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + } +} + + +/* + * Process some data in the single-pass case. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the image. + * Returns TRUE if the iMCU row is completed, FALSE if suspended. + * + * NB: input_buf contains a plane for each component in image, + * which we index according to the component's SOF position. + */ + +METHODDEF(boolean) +compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + int ci, xindex, yindex, yoffset, blockcnt; + JBLOCKROW blkp; + JSAMPARRAY input_ptr; + JDIMENSION xpos; + jpeg_component_info *compptr; + forward_DCT_ptr forward_DCT; + + /* Loop to write as much as one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col; + MCU_col_num++) { + /* Determine where data comes from in input_buf and do the DCT thing. + * Each call on forward_DCT processes a horizontal row of DCT blocks as + * wide as an MCU. Dummy blocks at the right or bottom edge are filled in + * specially. The data in them does not matter for image reconstruction, + * so we fill them with values that will encode to the smallest amount of + * data, viz: all zeroes in the AC entries, DC entries equal to previous + * block's DC value. (Thanks to Thomas Kinsman for this idea.) + */ + blkp = coef->blk_buffer; /* pointer to current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + forward_DCT = cinfo->fdct->forward_DCT[compptr->component_index]; + input_ptr = input_buf[compptr->component_index] + + yoffset * compptr->DCT_v_scaled_size; + /* ypos == (yoffset + yindex) * compptr->DCT_v_scaled_size */ + blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width + : compptr->last_col_width; + xpos = MCU_col_num * compptr->MCU_sample_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + if (coef->iMCU_row_num < last_iMCU_row || + yoffset + yindex < compptr->last_row_height) { + (*forward_DCT) (cinfo, compptr, input_ptr, blkp, + xpos, (JDIMENSION) blockcnt); + input_ptr += compptr->DCT_v_scaled_size; + blkp += blockcnt; + /* Dummy blocks at right edge */ + if ((xindex = compptr->MCU_width - blockcnt) == 0) + continue; + } else { + /* At bottom of image, need a whole row of dummy blocks */ + xindex = compptr->MCU_width; + } + /* Fill in any dummy blocks needed in this row */ + MEMZERO(blkp, xindex * SIZEOF(JBLOCK)); + do { + blkp[0][0] = blkp[-1][0]; + blkp++; + } while (--xindex); + } + } + /* Try to write the MCU. In event of a suspension failure, we will + * re-DCT the MCU on restart (a bit inefficient, could be fixed...) + */ + if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->MCU_ctr = MCU_col_num; + return FALSE; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->MCU_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + coef->iMCU_row_num++; + start_iMCU_row(cinfo); + return TRUE; +} + + +#ifdef FULL_COEF_BUFFER_SUPPORTED + +/* + * Process some data in the first pass of a multi-pass case. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the image. + * This amount of data is read from the source buffer, DCT'd and quantized, + * and saved into the virtual arrays. We also generate suitable dummy blocks + * as needed at the right and lower edges. (The dummy blocks are constructed + * in the virtual arrays, which have been padded appropriately.) This makes + * it possible for subsequent passes not to worry about real vs. dummy blocks. + * + * We must also emit the data to the entropy encoder. This is conveniently + * done by calling compress_output() after we've loaded the current strip + * of the virtual arrays. + * + * NB: input_buf contains a plane for each component in image. All + * components are DCT'd and loaded into the virtual arrays in this pass. + * However, it may be that only a subset of the components are emitted to + * the entropy encoder during this first pass; be careful about looking + * at the scan-dependent variables (MCU dimensions, etc). + */ + +METHODDEF(boolean) +compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + JDIMENSION blocks_across, MCUs_across, MCUindex; + int bi, ci, h_samp_factor, block_row, block_rows, ndummy; + JCOEF lastDC; + jpeg_component_info *compptr; + JBLOCKARRAY buffer; + JBLOCKROW thisblockrow, lastblockrow; + JSAMPARRAY input_ptr; + forward_DCT_ptr forward_DCT; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Align the virtual buffer for this component. */ + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + coef->iMCU_row_num * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, TRUE); + /* Count non-dummy DCT block rows in this iMCU row. */ + if (coef->iMCU_row_num < last_iMCU_row) + block_rows = compptr->v_samp_factor; + else { + /* NB: can't use last_row_height here, since may not be set! */ + block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (block_rows == 0) block_rows = compptr->v_samp_factor; + } + blocks_across = compptr->width_in_blocks; + h_samp_factor = compptr->h_samp_factor; + /* Count number of dummy blocks to be added at the right margin. */ + ndummy = (int) (blocks_across % h_samp_factor); + if (ndummy > 0) + ndummy = h_samp_factor - ndummy; + forward_DCT = cinfo->fdct->forward_DCT[ci]; + input_ptr = input_buf[ci]; + /* Perform DCT for all non-dummy blocks in this iMCU row. Each call + * on forward_DCT processes a complete horizontal row of DCT blocks. + */ + for (block_row = 0; block_row < block_rows; block_row++) { + thisblockrow = buffer[block_row]; + (*forward_DCT) (cinfo, compptr, input_ptr, thisblockrow, + (JDIMENSION) 0, blocks_across); + input_ptr += compptr->DCT_v_scaled_size; + if (ndummy > 0) { + /* Create dummy blocks at the right edge of the image. */ + thisblockrow += blocks_across; /* => first dummy block */ + FMEMZERO((void FAR *) thisblockrow, ndummy * SIZEOF(JBLOCK)); + lastDC = thisblockrow[-1][0]; + for (bi = 0; bi < ndummy; bi++) { + thisblockrow[bi][0] = lastDC; + } + } + } + /* If at end of image, create dummy block rows as needed. + * The tricky part here is that within each MCU, we want the DC values + * of the dummy blocks to match the last real block's DC value. + * This squeezes a few more bytes out of the resulting file... + */ + if (block_row < compptr->v_samp_factor) { + blocks_across += ndummy; /* include lower right corner */ + MCUs_across = blocks_across / h_samp_factor; + do { + thisblockrow = buffer[block_row]; + lastblockrow = buffer[block_row-1]; + FMEMZERO((void FAR *) thisblockrow, + (size_t) blocks_across * SIZEOF(JBLOCK)); + for (MCUindex = 0; MCUindex < MCUs_across; MCUindex++) { + lastDC = lastblockrow[h_samp_factor-1][0]; + for (bi = 0; bi < h_samp_factor; bi++) { + thisblockrow[bi][0] = lastDC; + } + thisblockrow += h_samp_factor; /* advance to next MCU in row */ + lastblockrow += h_samp_factor; + } + } while (++block_row < compptr->v_samp_factor); + } + } + /* NB: compress_output will increment iMCU_row_num if successful. + * A suspension return will result in redoing all the work above next time. + */ + + /* Emit data to the entropy encoder, sharing code with subsequent passes */ + return compress_output(cinfo, input_buf); +} + + +/* + * Process some data in subsequent passes of a multi-pass case. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the scan. + * The data is obtained from the virtual arrays and fed to the entropy coder. + * Returns TRUE if the iMCU row is completed, FALSE if suspended. + * + * NB: input_buf is ignored; it is likely to be a NULL pointer. + */ + +METHODDEF(boolean) +compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + int ci, xindex, yindex, yoffset; + JDIMENSION start_col; + JBLOCKARRAY blkp; + JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; + JBLOCKROW buffer_ptr; + jpeg_component_info *compptr; + + /* Align the virtual buffers for the components used in this scan. + * NB: during first pass, this is safe only because the buffers will + * already be aligned properly, so jmemmgr.c won't need to do any I/O. + */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + buffer[ci] = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], + coef->iMCU_row_num * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + + /* Loop to process one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->MCU_ctr; MCU_col_num < cinfo->MCUs_per_row; + MCU_col_num++) { + /* Construct list of pointers to DCT blocks belonging to this MCU */ + blkp = coef->MCU_buffer; /* pointer to current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + start_col = MCU_col_num * compptr->MCU_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + buffer_ptr = buffer[ci][yoffset + yindex] + start_col; + xindex = compptr->MCU_width; + do { + *blkp++ = buffer_ptr++; + } while (--xindex); + } + } + /* Try to write the MCU. */ + if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->MCU_ctr = MCU_col_num; + return FALSE; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->MCU_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + coef->iMCU_row_num++; + start_iMCU_row(cinfo); + return TRUE; +} + +#endif /* FULL_COEF_BUFFER_SUPPORTED */ + + +/* + * Initialize coefficient buffer controller. + */ + +GLOBAL(void) +jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer) +{ + my_coef_ptr coef; + + if (need_full_buffer) { +#ifdef FULL_COEF_BUFFER_SUPPORTED + /* Allocate a full-image virtual array for each component, */ + /* padded to a multiple of samp_factor DCT blocks in each direction. */ + int ci; + jpeg_component_info *compptr; + + coef = (my_coef_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_coef_controller) - SIZEOF(coef->blk_buffer)); + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + coef->whole_image[ci] = (*cinfo->mem->request_virt_barray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + (JDIMENSION) jround_up((long) compptr->width_in_blocks, + (long) compptr->h_samp_factor), + (JDIMENSION) jround_up((long) compptr->height_in_blocks, + (long) compptr->v_samp_factor), + (JDIMENSION) compptr->v_samp_factor); + } +#else + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif + } else { + /* We only need a single-MCU buffer. */ + JBLOCKARRAY blkp; + JBLOCKROW buffer_ptr; + int bi; + + coef = (my_coef_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_coef_controller)); + blkp = coef->MCU_buffer; + buffer_ptr = coef->blk_buffer; + bi = C_MAX_BLOCKS_IN_MCU; + do { + *blkp++ = buffer_ptr++; + } while (--bi); + coef->whole_image[0] = NULL; /* flag for no virtual arrays */ + } + + coef->pub.start_pass = start_pass_coef; + cinfo->coef = &coef->pub; +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jccolor.c b/widget/milsko/milskosrc/external/libjpeg/src/jccolor.c new file mode 100644 index 0000000000..c028dd9db3 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jccolor.c @@ -0,0 +1,598 @@ +/* + * jccolor.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * Modified 2011-2023 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains input colorspace conversion routines. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private subobject */ + +typedef struct { + struct jpeg_color_converter pub; /* public fields */ + + /* Private state for RGB->YCC conversion */ + INT32 * rgb_ycc_tab; /* => table for RGB to YCbCr conversion */ +} my_color_converter; + +typedef my_color_converter * my_cconvert_ptr; + + +/**************** RGB -> YCbCr conversion: most common case **************/ + +/* + * YCbCr is defined per Recommendation ITU-R BT.601-7 (03/2011), + * previously known as Recommendation CCIR 601-1, except that Cb and Cr + * are normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5. + * sRGB (standard RGB color space) is defined per IEC 61966-2-1:1999. + * sYCC (standard luma-chroma-chroma color space with extended gamut) + * is defined per IEC 61966-2-1:1999 Amendment A1:2003 Annex F. + * bg-sRGB and bg-sYCC (big gamut standard color spaces) + * are defined per IEC 61966-2-1:1999 Amendment A1:2003 Annex G. + * Note that the derived conversion coefficients given in some of these + * documents are imprecise. The general conversion equations are + * Y = Kr * R + (1 - Kr - Kb) * G + Kb * B + * Cb = (B - Y) / (1 - Kb) / K + * Cr = (R - Y) / (1 - Kr) / K + * With Kr = 0.299 and Kb = 0.114 (derived according to SMPTE RP 177-1993 + * from the 1953 FCC NTSC primaries and CIE Illuminant C), K = 2 for sYCC, + * the conversion equations to be implemented are therefore + * Y = 0.299 * R + 0.587 * G + 0.114 * B + * Cb = -0.168735892 * R - 0.331264108 * G + 0.5 * B + CENTERJSAMPLE + * Cr = 0.5 * R - 0.418687589 * G - 0.081312411 * B + CENTERJSAMPLE + * Note: older versions of the IJG code used a zero offset of MAXJSAMPLE/2, + * rather than CENTERJSAMPLE, for Cb and Cr. This gave equal positive and + * negative swings for Cb/Cr, but meant that grayscale values (Cb=Cr=0) + * were not represented exactly. Now we sacrifice exact representation of + * maximum red and maximum blue in order to get exact grayscales. + * + * To avoid floating-point arithmetic, we represent the fractional constants + * as integers scaled up by 2^16 (about 4 digits precision); we have to divide + * the products by 2^16, with appropriate rounding, to get the correct answer. + * + * For even more speed, we avoid doing any multiplications in the inner loop + * by precalculating the constants times R,G,B for all possible values. + * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table); + * for 9-bit to 12-bit samples it is still acceptable. It's not very + * reasonable for 16-bit samples, but if you want lossless storage + * you shouldn't be changing colorspace anyway. + * The CENTERJSAMPLE offsets and the rounding fudge-factor of 0.5 are included + * in the tables to save adding them separately in the inner loop. + */ + +#define SCALEBITS 16 /* speediest right-shift on some machines */ +#define CBCR_OFFSET ((INT32) CENTERJSAMPLE << SCALEBITS) +#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) +#define FIX(x) ((INT32) ((x) * (1L< Y section */ +#define G_Y_OFF (1*(MAXJSAMPLE+1)) /* offset to G => Y section */ +#define B_Y_OFF (2*(MAXJSAMPLE+1)) /* etc. */ +#define R_CB_OFF (3*(MAXJSAMPLE+1)) +#define G_CB_OFF (4*(MAXJSAMPLE+1)) +#define B_CB_OFF (5*(MAXJSAMPLE+1)) +#define R_CR_OFF B_CB_OFF /* B=>Cb, R=>Cr are the same */ +#define G_CR_OFF (6*(MAXJSAMPLE+1)) +#define B_CR_OFF (7*(MAXJSAMPLE+1)) +#define TABLE_SIZE (8*(MAXJSAMPLE+1)) + + +/* + * Initialize for RGB->YCC colorspace conversion. + */ + +METHODDEF(void) +rgb_ycc_start (j_compress_ptr cinfo) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + INT32 * rgb_ycc_tab; + INT32 i; + + /* Allocate and fill in the conversion tables. */ + cconvert->rgb_ycc_tab = rgb_ycc_tab = (INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + TABLE_SIZE * SIZEOF(INT32)); + + for (i = 0; i <= MAXJSAMPLE; i++) { + rgb_ycc_tab[i+R_Y_OFF] = FIX(0.299) * i; + rgb_ycc_tab[i+G_Y_OFF] = FIX(0.587) * i; + rgb_ycc_tab[i+B_Y_OFF] = FIX(0.114) * i + ONE_HALF; + rgb_ycc_tab[i+R_CB_OFF] = (- FIX(0.168735892)) * i; + rgb_ycc_tab[i+G_CB_OFF] = (- FIX(0.331264108)) * i; + /* We use a rounding fudge-factor of 0.5-epsilon for Cb and Cr. + * This ensures that the maximum output will round to MAXJSAMPLE + * not MAXJSAMPLE+1, and thus that we don't have to range-limit. + */ + rgb_ycc_tab[i+B_CB_OFF] = (i << (SCALEBITS-1)) + CBCR_OFFSET + ONE_HALF-1; +/* B=>Cb and R=>Cr tables are the same + rgb_ycc_tab[i+R_CR_OFF] = (i << (SCALEBITS-1)) + CBCR_OFFSET + ONE_HALF-1; +*/ + rgb_ycc_tab[i+G_CR_OFF] = (- FIX(0.418687589)) * i; + rgb_ycc_tab[i+B_CR_OFF] = (- FIX(0.081312411)) * i; + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * + * Note that we change from the application's interleaved-pixel format + * to our internal noninterleaved, one-plane-per-component format. The + * input buffer is therefore three times as wide as the output buffer. + * + * A starting row offset is provided only for the output buffer. The + * caller can easily adjust the passed input_buf value to accommodate + * any row offset required on that side. + */ + +METHODDEF(void) +rgb_ycc_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int r, g, b; + register INT32 * ctab = cconvert->rgb_ycc_tab; + register JSAMPROW inptr; + register JSAMPROW outptr0, outptr1, outptr2; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr0 = output_buf[0][output_row]; + outptr1 = output_buf[1][output_row]; + outptr2 = output_buf[2][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + r = GETJSAMPLE(inptr[RGB_RED]); + g = GETJSAMPLE(inptr[RGB_GREEN]); + b = GETJSAMPLE(inptr[RGB_BLUE]); + inptr += RGB_PIXELSIZE; + /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations + * must be too; we do not need an explicit range-limiting operation. + * Hence the value being shifted is never negative, and we don't + * need the general RIGHT_SHIFT macro. + */ + /* Y */ + outptr0[col] = (JSAMPLE) + ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) + >> SCALEBITS); + /* Cb */ + outptr1[col] = (JSAMPLE) + ((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF]) + >> SCALEBITS); + /* Cr */ + outptr2[col] = (JSAMPLE) + ((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF]) + >> SCALEBITS); + } + } +} + + +/**************** Cases other than RGB -> YCbCr **************/ + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles RGB->grayscale conversion, + * which is the same as the RGB->Y portion of RGB->YCbCr. + * We assume rgb_ycc_start has been called (we only use the Y tables). + */ + +METHODDEF(void) +rgb_gray_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register INT32 y; + register INT32 * ctab = cconvert->rgb_ycc_tab; + register JSAMPROW inptr; + register JSAMPROW outptr; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr = output_buf[0][output_row++]; + for (col = 0; col < num_cols; col++) { + y = ctab[R_Y_OFF + GETJSAMPLE(inptr[RGB_RED])]; + y += ctab[G_Y_OFF + GETJSAMPLE(inptr[RGB_GREEN])]; + y += ctab[B_Y_OFF + GETJSAMPLE(inptr[RGB_BLUE])]; + inptr += RGB_PIXELSIZE; + outptr[col] = (JSAMPLE) (y >> SCALEBITS); + } + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles Adobe-style CMYK->YCCK conversion, + * where we convert R=1-C, G=1-M, and B=1-Y to YCbCr using the + * same conversion as above, while passing K (black) unchanged. + * We assume rgb_ycc_start has been called. + */ + +METHODDEF(void) +cmyk_ycck_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int r, g, b; + register INT32 * ctab = cconvert->rgb_ycc_tab; + register JSAMPROW inptr; + register JSAMPROW outptr0, outptr1, outptr2, outptr3; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr0 = output_buf[0][output_row]; + outptr1 = output_buf[1][output_row]; + outptr2 = output_buf[2][output_row]; + outptr3 = output_buf[3][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + r = MAXJSAMPLE - GETJSAMPLE(inptr[0]); + g = MAXJSAMPLE - GETJSAMPLE(inptr[1]); + b = MAXJSAMPLE - GETJSAMPLE(inptr[2]); + /* K passes through as-is */ + outptr3[col] = inptr[3]; /* don't need GETJSAMPLE here */ + inptr += 4; + /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations + * must be too; we do not need an explicit range-limiting operation. + * Hence the value being shifted is never negative, and we don't + * need the general RIGHT_SHIFT macro. + */ + /* Y */ + outptr0[col] = (JSAMPLE) + ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) + >> SCALEBITS); + /* Cb */ + outptr1[col] = (JSAMPLE) + ((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF]) + >> SCALEBITS); + /* Cr */ + outptr2[col] = (JSAMPLE) + ((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF]) + >> SCALEBITS); + } + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * [R,G,B] to [R-G,G,B-G] conversion with modulo calculation + * (forward reversible color transform). + * This can be seen as an adaption of the general RGB->YCbCr + * conversion equation with Kr = Kb = 0, while replacing the + * normalization by modulo calculation. + */ + +METHODDEF(void) +rgb_rgb1_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + register int r, g, b; + register JSAMPROW inptr; + register JSAMPROW outptr0, outptr1, outptr2; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr0 = output_buf[0][output_row]; + outptr1 = output_buf[1][output_row]; + outptr2 = output_buf[2][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + r = GETJSAMPLE(inptr[RGB_RED]); + g = GETJSAMPLE(inptr[RGB_GREEN]); + b = GETJSAMPLE(inptr[RGB_BLUE]); + inptr += RGB_PIXELSIZE; + /* Assume that MAXJSAMPLE+1 is a power of 2, so that the MOD + * (modulo) operator is equivalent to the bitmask operator AND. + */ + outptr0[col] = (JSAMPLE) ((r - g + CENTERJSAMPLE) & MAXJSAMPLE); + outptr1[col] = (JSAMPLE) g; + outptr2[col] = (JSAMPLE) ((b - g + CENTERJSAMPLE) & MAXJSAMPLE); + } + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles grayscale output with no conversion. + * The source can be either plain grayscale or YCC (since Y == gray). + */ + +METHODDEF(void) +grayscale_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + register JSAMPROW inptr; + register JSAMPROW outptr; + register JDIMENSION count; + register int instride = cinfo->input_components; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr = output_buf[0][output_row++]; + for (count = num_cols; count > 0; count--) { + *outptr++ = *inptr; /* don't need GETJSAMPLE() here */ + inptr += instride; + } + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * No colorspace conversion, but change from interleaved + * to separate-planes representation. + */ + +METHODDEF(void) +rgb_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + register JSAMPROW inptr; + register JSAMPROW outptr0, outptr1, outptr2; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr0 = output_buf[0][output_row]; + outptr1 = output_buf[1][output_row]; + outptr2 = output_buf[2][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + /* We can dispense with GETJSAMPLE() here */ + outptr0[col] = inptr[RGB_RED]; + outptr1[col] = inptr[RGB_GREEN]; + outptr2[col] = inptr[RGB_BLUE]; + inptr += RGB_PIXELSIZE; + } + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles multi-component colorspaces without conversion. + * We assume input_components == num_components. + */ + +METHODDEF(void) +null_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + register JSAMPROW inptr; + register JSAMPROW outptr; + register JDIMENSION count; + register int num_comps = cinfo->num_components; + JDIMENSION num_cols = cinfo->image_width; + int ci; + + while (--num_rows >= 0) { + /* It seems fastest to make a separate pass for each component. */ + for (ci = 0; ci < num_comps; ci++) { + inptr = input_buf[0] + ci; + outptr = output_buf[ci][output_row]; + for (count = num_cols; count > 0; count--) { + *outptr++ = *inptr; /* don't need GETJSAMPLE() here */ + inptr += num_comps; + } + } + input_buf++; + output_row++; + } +} + + +/* + * Empty method for start_pass. + */ + +METHODDEF(void) +null_method (j_compress_ptr cinfo) +{ + /* no work needed */ +} + + +/* + * Module initialization routine for input colorspace conversion. + */ + +GLOBAL(void) +jinit_color_converter (j_compress_ptr cinfo) +{ + my_cconvert_ptr cconvert; + + cconvert = (my_cconvert_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_color_converter)); + cinfo->cconvert = &cconvert->pub; + /* set start_pass to null method until we find out differently */ + cconvert->pub.start_pass = null_method; + + /* Make sure input_components agrees with in_color_space */ + switch (cinfo->in_color_space) { + case JCS_GRAYSCALE: + if (cinfo->input_components != 1) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; + + case JCS_RGB: + case JCS_BG_RGB: +#if RGB_PIXELSIZE != 3 + if (cinfo->input_components != RGB_PIXELSIZE) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; +#endif /* else share code with YCbCr */ + + case JCS_YCbCr: + case JCS_BG_YCC: + if (cinfo->input_components != 3) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; + + case JCS_CMYK: + case JCS_YCCK: + if (cinfo->input_components != 4) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; + + default: /* JCS_UNKNOWN can be anything */ + if (cinfo->input_components < 1) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + } + + /* Support color transform only for RGB colorspaces */ + if (cinfo->color_transform && + cinfo->jpeg_color_space != JCS_RGB && + cinfo->jpeg_color_space != JCS_BG_RGB) + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + + /* Check num_components, set conversion method based on requested space */ + switch (cinfo->jpeg_color_space) { + case JCS_GRAYSCALE: + if (cinfo->num_components != 1) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + switch (cinfo->in_color_space) { + case JCS_GRAYSCALE: + case JCS_YCbCr: + case JCS_BG_YCC: + cconvert->pub.color_convert = grayscale_convert; + break; + case JCS_RGB: + cconvert->pub.start_pass = rgb_ycc_start; + cconvert->pub.color_convert = rgb_gray_convert; + break; + default: + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + } + break; + + case JCS_RGB: + case JCS_BG_RGB: + if (cinfo->num_components != 3) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space != cinfo->jpeg_color_space) + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + switch (cinfo->color_transform) { + case JCT_NONE: + cconvert->pub.color_convert = rgb_convert; + break; + case JCT_SUBTRACT_GREEN: + cconvert->pub.color_convert = rgb_rgb1_convert; + break; + default: + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + } + break; + + case JCS_YCbCr: + if (cinfo->num_components != 3) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + switch (cinfo->in_color_space) { + case JCS_RGB: + cconvert->pub.start_pass = rgb_ycc_start; + cconvert->pub.color_convert = rgb_ycc_convert; + break; + case JCS_YCbCr: + cconvert->pub.color_convert = null_convert; + break; + default: + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + } + break; + + case JCS_BG_YCC: + if (cinfo->num_components != 3) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + switch (cinfo->in_color_space) { + case JCS_RGB: + /* For conversion from normal RGB input to BG_YCC representation, + * the Cb/Cr values are first computed as usual, and then + * quantized further after DCT processing by a factor of + * 2 in reference to the nominal quantization factor. + */ + /* need quantization scale by factor of 2 after DCT */ + cinfo->comp_info[1].component_needed = TRUE; + cinfo->comp_info[2].component_needed = TRUE; + /* compute normal YCC first */ + cconvert->pub.start_pass = rgb_ycc_start; + cconvert->pub.color_convert = rgb_ycc_convert; + break; + case JCS_YCbCr: + /* need quantization scale by factor of 2 after DCT */ + cinfo->comp_info[1].component_needed = TRUE; + cinfo->comp_info[2].component_needed = TRUE; + /*FALLTHROUGH*/ + case JCS_BG_YCC: + /* Pass through for BG_YCC input */ + cconvert->pub.color_convert = null_convert; + break; + default: + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + } + break; + + case JCS_CMYK: + if (cinfo->num_components != 4) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space != JCS_CMYK) + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + cconvert->pub.color_convert = null_convert; + break; + + case JCS_YCCK: + if (cinfo->num_components != 4) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + switch (cinfo->in_color_space) { + case JCS_CMYK: + cconvert->pub.start_pass = rgb_ycc_start; + cconvert->pub.color_convert = cmyk_ycck_convert; + break; + case JCS_YCCK: + cconvert->pub.color_convert = null_convert; + break; + default: + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + } + break; + + default: /* allow null conversion of JCS_UNKNOWN */ + if (cinfo->jpeg_color_space != cinfo->in_color_space || + cinfo->num_components != cinfo->input_components) + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + cconvert->pub.color_convert = null_convert; + } +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jcdctmgr.c b/widget/milsko/milskosrc/external/libjpeg/src/jcdctmgr.c new file mode 100644 index 0000000000..a48ccd8147 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jcdctmgr.c @@ -0,0 +1,466 @@ +/* + * jcdctmgr.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2003-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the forward-DCT management logic. + * This code selects a particular DCT implementation to be used, + * and it performs related housekeeping chores including coefficient + * quantization. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + + +/* Private subobject for this module */ + +typedef struct { + struct jpeg_forward_dct pub; /* public fields */ + + /* Pointer to the DCT routine actually in use */ + forward_DCT_method_ptr do_dct[MAX_COMPONENTS]; + +#ifdef DCT_FLOAT_SUPPORTED + /* Same as above for the floating-point case. */ + float_DCT_method_ptr do_float_dct[MAX_COMPONENTS]; +#endif +} my_fdct_controller; + +typedef my_fdct_controller * my_fdct_ptr; + + +/* The allocated post-DCT divisor tables -- big enough for any + * supported variant and not identical to the quant table entries, + * because of scaling (especially for an unnormalized DCT) -- + * are pointed to by dct_table in the per-component comp_info + * structures. Each table is given in normal array order. + */ + +typedef union { + DCTELEM int_array[DCTSIZE2]; +#ifdef DCT_FLOAT_SUPPORTED + FAST_FLOAT float_array[DCTSIZE2]; +#endif +} divisor_table; + + +/* The current scaled-DCT routines require ISLOW-style divisor tables, + * so be sure to compile that code if either ISLOW or SCALING is requested. + */ +#ifdef DCT_ISLOW_SUPPORTED +#define PROVIDE_ISLOW_TABLES +#else +#ifdef DCT_SCALING_SUPPORTED +#define PROVIDE_ISLOW_TABLES +#endif +#endif + + +/* + * Perform forward DCT on one or more blocks of a component. + * + * The input samples are taken from the sample_data[] array starting at + * position start_col, and moving to the right for any additional blocks. + * The quantized coefficients are returned in coef_blocks[]. + */ + +METHODDEF(void) +forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY sample_data, JBLOCKROW coef_blocks, + JDIMENSION start_col, JDIMENSION num_blocks) +/* This version is used for integer DCT implementations. */ +{ + /* This routine is heavily used, so it's worth coding it tightly. */ + my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; + forward_DCT_method_ptr do_dct = fdct->do_dct[compptr->component_index]; + DCTELEM * divisors = (DCTELEM *) compptr->dct_table; + DCTELEM workspace[DCTSIZE2]; /* work area for FDCT subroutine */ + JDIMENSION bi; + + for (bi = 0; bi < num_blocks; bi++, start_col += compptr->DCT_h_scaled_size) { + /* Perform the DCT */ + (*do_dct) (workspace, sample_data, start_col); + + /* Quantize/descale the coefficients, and store into coef_blocks[] */ + { register DCTELEM temp, qval; + register int i; + register JCOEFPTR output_ptr = coef_blocks[bi]; + + for (i = 0; i < DCTSIZE2; i++) { + qval = divisors[i]; + temp = workspace[i]; + /* Divide the coefficient value by qval, ensuring proper rounding. + * Since C does not specify the direction of rounding for negative + * quotients, we have to force the dividend positive for portability. + * + * In most files, at least half of the output values will be zero + * (at default quantization settings, more like three-quarters...) + * so we should ensure that this case is fast. On many machines, + * a comparison is enough cheaper than a divide to make a special test + * a win. Since both inputs will be nonnegative, we need only test + * for a < b to discover whether a/b is 0. + * If your machine's division is fast enough, define FAST_DIVIDE. + */ +#ifdef FAST_DIVIDE +#define DIVIDE_BY(a,b) a /= b +#else +#define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0 +#endif + if (temp < 0) { + temp = -temp; + temp += qval>>1; /* for rounding */ + DIVIDE_BY(temp, qval); + temp = -temp; + } else { + temp += qval>>1; /* for rounding */ + DIVIDE_BY(temp, qval); + } + output_ptr[i] = (JCOEF) temp; + } + } + } +} + + +#ifdef DCT_FLOAT_SUPPORTED + +METHODDEF(void) +forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY sample_data, JBLOCKROW coef_blocks, + JDIMENSION start_col, JDIMENSION num_blocks) +/* This version is used for floating-point DCT implementations. */ +{ + /* This routine is heavily used, so it's worth coding it tightly. */ + my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; + float_DCT_method_ptr do_dct = fdct->do_float_dct[compptr->component_index]; + FAST_FLOAT * divisors = (FAST_FLOAT *) compptr->dct_table; + FAST_FLOAT workspace[DCTSIZE2]; /* work area for FDCT subroutine */ + JDIMENSION bi; + + for (bi = 0; bi < num_blocks; bi++, start_col += compptr->DCT_h_scaled_size) { + /* Perform the DCT */ + (*do_dct) (workspace, sample_data, start_col); + + /* Quantize/descale the coefficients, and store into coef_blocks[] */ + { register FAST_FLOAT temp; + register int i; + register JCOEFPTR output_ptr = coef_blocks[bi]; + + for (i = 0; i < DCTSIZE2; i++) { + /* Apply the quantization and scaling factor */ + temp = workspace[i] * divisors[i]; + /* Round to nearest integer. + * Since C does not specify the direction of rounding for negative + * quotients, we have to force the dividend positive for portability. + * The maximum coefficient size is +-16K (for 12-bit data), so this + * code should work for either 16-bit or 32-bit ints. + */ + output_ptr[i] = (JCOEF) ((int) (temp + (FAST_FLOAT) 16384.5) - 16384); + } + } + } +} + +#endif /* DCT_FLOAT_SUPPORTED */ + + +/* + * Initialize for a processing pass. + * Verify that all referenced Q-tables are present, and set up + * the divisor table for each one. + * In the current implementation, DCT of all components is done during + * the first pass, even if only some components will be output in the + * first scan. Hence all components should be examined here. + */ + +METHODDEF(void) +start_pass_fdctmgr (j_compress_ptr cinfo) +{ + my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; + int ci, qtblno, i; + jpeg_component_info *compptr; + int method = 0; + JQUANT_TBL * qtbl; + DCTELEM * dtbl; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Select the proper DCT routine for this component's scaling */ + switch ((compptr->DCT_h_scaled_size << 8) + compptr->DCT_v_scaled_size) { +#ifdef DCT_SCALING_SUPPORTED + case ((1 << 8) + 1): + fdct->do_dct[ci] = jpeg_fdct_1x1; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((2 << 8) + 2): + fdct->do_dct[ci] = jpeg_fdct_2x2; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((3 << 8) + 3): + fdct->do_dct[ci] = jpeg_fdct_3x3; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((4 << 8) + 4): + fdct->do_dct[ci] = jpeg_fdct_4x4; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((5 << 8) + 5): + fdct->do_dct[ci] = jpeg_fdct_5x5; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((6 << 8) + 6): + fdct->do_dct[ci] = jpeg_fdct_6x6; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((7 << 8) + 7): + fdct->do_dct[ci] = jpeg_fdct_7x7; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((9 << 8) + 9): + fdct->do_dct[ci] = jpeg_fdct_9x9; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((10 << 8) + 10): + fdct->do_dct[ci] = jpeg_fdct_10x10; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((11 << 8) + 11): + fdct->do_dct[ci] = jpeg_fdct_11x11; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((12 << 8) + 12): + fdct->do_dct[ci] = jpeg_fdct_12x12; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((13 << 8) + 13): + fdct->do_dct[ci] = jpeg_fdct_13x13; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((14 << 8) + 14): + fdct->do_dct[ci] = jpeg_fdct_14x14; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((15 << 8) + 15): + fdct->do_dct[ci] = jpeg_fdct_15x15; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((16 << 8) + 16): + fdct->do_dct[ci] = jpeg_fdct_16x16; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((16 << 8) + 8): + fdct->do_dct[ci] = jpeg_fdct_16x8; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((14 << 8) + 7): + fdct->do_dct[ci] = jpeg_fdct_14x7; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((12 << 8) + 6): + fdct->do_dct[ci] = jpeg_fdct_12x6; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((10 << 8) + 5): + fdct->do_dct[ci] = jpeg_fdct_10x5; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((8 << 8) + 4): + fdct->do_dct[ci] = jpeg_fdct_8x4; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((6 << 8) + 3): + fdct->do_dct[ci] = jpeg_fdct_6x3; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((4 << 8) + 2): + fdct->do_dct[ci] = jpeg_fdct_4x2; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((2 << 8) + 1): + fdct->do_dct[ci] = jpeg_fdct_2x1; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((8 << 8) + 16): + fdct->do_dct[ci] = jpeg_fdct_8x16; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((7 << 8) + 14): + fdct->do_dct[ci] = jpeg_fdct_7x14; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((6 << 8) + 12): + fdct->do_dct[ci] = jpeg_fdct_6x12; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((5 << 8) + 10): + fdct->do_dct[ci] = jpeg_fdct_5x10; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((4 << 8) + 8): + fdct->do_dct[ci] = jpeg_fdct_4x8; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((3 << 8) + 6): + fdct->do_dct[ci] = jpeg_fdct_3x6; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((2 << 8) + 4): + fdct->do_dct[ci] = jpeg_fdct_2x4; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; + case ((1 << 8) + 2): + fdct->do_dct[ci] = jpeg_fdct_1x2; + method = JDCT_ISLOW; /* jfdctint uses islow-style table */ + break; +#endif + case ((DCTSIZE << 8) + DCTSIZE): + switch (cinfo->dct_method) { +#ifdef DCT_ISLOW_SUPPORTED + case JDCT_ISLOW: + fdct->do_dct[ci] = jpeg_fdct_islow; + method = JDCT_ISLOW; + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + fdct->do_dct[ci] = jpeg_fdct_ifast; + method = JDCT_IFAST; + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + fdct->do_float_dct[ci] = jpeg_fdct_float; + method = JDCT_FLOAT; + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + } + break; + default: + ERREXIT2(cinfo, JERR_BAD_DCTSIZE, + compptr->DCT_h_scaled_size, compptr->DCT_v_scaled_size); + } + qtblno = compptr->quant_tbl_no; + /* Make sure specified quantization table is present */ + if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS || + cinfo->quant_tbl_ptrs[qtblno] == NULL) + ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno); + qtbl = cinfo->quant_tbl_ptrs[qtblno]; + /* Create divisor table from quant table */ + switch (method) { +#ifdef PROVIDE_ISLOW_TABLES + case JDCT_ISLOW: + /* For LL&M IDCT method, divisors are equal to raw quantization + * coefficients multiplied by 8 (to counteract scaling). + */ + dtbl = (DCTELEM *) compptr->dct_table; + for (i = 0; i < DCTSIZE2; i++) { + dtbl[i] = + ((DCTELEM) qtbl->quantval[i]) << (compptr->component_needed ? 4 : 3); + } + fdct->pub.forward_DCT[ci] = forward_DCT; + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + { + /* For AA&N IDCT method, divisors are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + * We apply a further scale factor of 8. + */ +#define CONST_BITS 14 + static const INT16 aanscales[DCTSIZE2] = { + /* precomputed values scaled up by 14 bits */ + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270, + 21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906, + 19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315, + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552, + 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446, + 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247 + }; + SHIFT_TEMPS + + dtbl = (DCTELEM *) compptr->dct_table; + for (i = 0; i < DCTSIZE2; i++) { + dtbl[i] = (DCTELEM) + DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i], + (INT32) aanscales[i]), + compptr->component_needed ? CONST_BITS-4 : CONST_BITS-3); + } + } + fdct->pub.forward_DCT[ci] = forward_DCT; + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + { + /* For float AA&N IDCT method, divisors are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + * We apply a further scale factor of 8. + * What's actually stored is 1/divisor so that the inner loop can + * use a multiplication rather than a division. + */ + FAST_FLOAT * fdtbl = (FAST_FLOAT *) compptr->dct_table; + int row, col; + static const double aanscalefactor[DCTSIZE] = { + 1.0, 1.387039845, 1.306562965, 1.175875602, + 1.0, 0.785694958, 0.541196100, 0.275899379 + }; + + i = 0; + for (row = 0; row < DCTSIZE; row++) { + for (col = 0; col < DCTSIZE; col++) { + fdtbl[i] = (FAST_FLOAT) + (1.0 / ((double) qtbl->quantval[i] * + aanscalefactor[row] * aanscalefactor[col] * + (compptr->component_needed ? 16.0 : 8.0))); + i++; + } + } + } + fdct->pub.forward_DCT[ci] = forward_DCT_float; + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + } + } +} + + +/* + * Initialize FDCT manager. + */ + +GLOBAL(void) +jinit_forward_dct (j_compress_ptr cinfo) +{ + my_fdct_ptr fdct; + int ci; + jpeg_component_info *compptr; + + fdct = (my_fdct_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_fdct_controller)); + cinfo->fdct = &fdct->pub; + fdct->pub.start_pass = start_pass_fdctmgr; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Allocate a divisor table for each component */ + compptr->dct_table = (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(divisor_table)); + } +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jchuff.c b/widget/milsko/milskosrc/external/libjpeg/src/jchuff.c new file mode 100644 index 0000000000..1f527b2182 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jchuff.c @@ -0,0 +1,1656 @@ +/* + * jchuff.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 2006-2023 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains Huffman entropy encoding routines. + * Both sequential and progressive modes are supported in this single module. + * + * Much of the complexity here has to do with supporting output suspension. + * If the data destination module demands suspension, we want to be able to + * back up to the start of the current MCU. To do this, we copy state + * variables into local working storage, and update them back to the + * permanent JPEG objects only upon successful completion of an MCU. + * + * We do not support output suspension for the progressive JPEG mode, since + * the library currently does not allow multiple-scan files to be written + * with output suspension. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* The legal range of a DCT coefficient is + * -1024 .. +1023 for 8-bit sample data precision; + * -16384 .. +16383 for 12-bit sample data precision. + * Hence the magnitude should always fit in sample data precision + 2 bits. + */ + +/* Derived data constructed for each Huffman table */ + +typedef struct { + unsigned int ehufco[256]; /* code for each symbol */ + char ehufsi[256]; /* length of code for each symbol */ + /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */ +} c_derived_tbl; + + +/* Expanded entropy encoder object for Huffman encoding. + * + * The savable_state subrecord contains fields that change within an MCU, + * but must not be updated permanently until we complete the MCU. + */ + +typedef struct { + INT32 put_buffer; /* current bit-accumulation buffer */ + int put_bits; /* # of bits now in it */ + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ +} savable_state; + +/* This macro is to work around compilers with missing or broken + * structure assignment. You'll need to fix this code if you have + * such a compiler and you change MAX_COMPS_IN_SCAN. + */ + +#ifndef NO_STRUCT_ASSIGN +#define ASSIGN_STATE(dest,src) ((dest) = (src)) +#else +#if MAX_COMPS_IN_SCAN == 4 +#define ASSIGN_STATE(dest,src) \ + ((dest).put_buffer = (src).put_buffer, \ + (dest).put_bits = (src).put_bits, \ + (dest).last_dc_val[0] = (src).last_dc_val[0], \ + (dest).last_dc_val[1] = (src).last_dc_val[1], \ + (dest).last_dc_val[2] = (src).last_dc_val[2], \ + (dest).last_dc_val[3] = (src).last_dc_val[3]) +#endif +#endif + + +typedef struct { + struct jpeg_entropy_encoder pub; /* public fields */ + + savable_state saved; /* Bit buffer & DC state at start of MCU */ + + /* These fields are NOT loaded into local working state. */ + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + int next_restart_num; /* next restart number to write (0-7) */ + + /* Pointers to derived tables (these workspaces have image lifespan) */ + c_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS]; + c_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS]; + + /* Statistics tables for optimization */ + long * dc_count_ptrs[NUM_HUFF_TBLS]; + long * ac_count_ptrs[NUM_HUFF_TBLS]; + + /* Following fields used only in progressive mode */ + + /* Mode flag: TRUE for optimization, FALSE for actual data output */ + boolean gather_statistics; + + /* next_output_byte/free_in_buffer are local copies of cinfo->dest fields. + */ + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + j_compress_ptr cinfo; /* link to cinfo (needed for dump_buffer) */ + + /* Coding status for AC components */ + int ac_tbl_no; /* the table number of the single component */ + unsigned int EOBRUN; /* run length of EOBs */ + unsigned int BE; /* # of buffered correction bits before MCU */ + char * bit_buffer; /* buffer for correction bits (1 per char) */ + /* packing correction bits tightly would save some space but cost time... */ +} huff_entropy_encoder; + +typedef huff_entropy_encoder * huff_entropy_ptr; + +/* Working state while writing an MCU (sequential mode). + * This struct contains all the fields that are needed by subroutines. + */ + +typedef struct { + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + savable_state cur; /* Current bit buffer & DC state */ + j_compress_ptr cinfo; /* dump_buffer needs access to this */ +} working_state; + +/* MAX_CORR_BITS is the number of bits the AC refinement correction-bit + * buffer can hold. Larger sizes may slightly improve compression, but + * 1000 is already well into the realm of overkill. + * The minimum safe size is 64 bits. + */ + +#define MAX_CORR_BITS 1000 /* Max # of correction bits I can buffer */ + +/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than INT32. + * We assume that int right shift is unsigned if INT32 right shift is, + * which should be safe. + */ + +#ifdef RIGHT_SHIFT_IS_UNSIGNED +#define ISHIFT_TEMPS int ishift_temp; +#define IRIGHT_SHIFT(x,shft) \ + ((ishift_temp = (x)) < 0 ? \ + (ishift_temp >> (shft)) | ((~0) << (16-(shft))) : \ + (ishift_temp >> (shft))) +#else +#define ISHIFT_TEMPS +#define IRIGHT_SHIFT(x,shft) ((x) >> (shft)) +#endif + + +/* + * Compute the derived values for a Huffman table. + * This routine also performs some validation checks on the table. + */ + +LOCAL(void) +jpeg_make_c_derived_tbl (j_compress_ptr cinfo, boolean isDC, int tblno, + c_derived_tbl ** pdtbl) +{ + JHUFF_TBL *htbl; + c_derived_tbl *dtbl; + int p, i, l, lastp, si, maxsymbol; + char huffsize[257]; + unsigned int huffcode[257]; + unsigned int code; + + /* Note that huffsize[] and huffcode[] are filled in code-length order, + * paralleling the order of the symbols themselves in htbl->huffval[]. + */ + + /* Find the input Huffman table */ + if (tblno < 0 || tblno >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); + htbl = + isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno]; + if (htbl == NULL) + htbl = jpeg_std_huff_table((j_common_ptr) cinfo, isDC, tblno); + + /* Allocate a workspace if we haven't already done so. */ + if (*pdtbl == NULL) + *pdtbl = (c_derived_tbl *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(c_derived_tbl)); + dtbl = *pdtbl; + + /* Figure C.1: make table of Huffman code length for each symbol */ + + p = 0; + for (l = 1; l <= 16; l++) { + i = (int) htbl->bits[l]; + if (i < 0 || p + i > 256) /* protect against table overrun */ + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + while (i--) + huffsize[p++] = (char) l; + } + huffsize[p] = 0; + lastp = p; + + /* Figure C.2: generate the codes themselves */ + /* We also validate that the counts represent a legal Huffman code tree. */ + + code = 0; + si = huffsize[0]; + p = 0; + while (huffsize[p]) { + while (((int) huffsize[p]) == si) { + huffcode[p++] = code; + code++; + } + /* code is now 1 more than the last code used for codelength si; but + * it must still fit in si bits, since no code is allowed to be all ones. + */ + if (((INT32) code) >= (((INT32) 1) << si)) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + code <<= 1; + si++; + } + + /* Figure C.3: generate encoding tables */ + /* These are code and size indexed by symbol value */ + + /* Set all codeless symbols to have code length 0; + * this lets us detect duplicate VAL entries here, and later + * allows emit_bits to detect any attempt to emit such symbols. + */ + MEMZERO(dtbl->ehufsi, SIZEOF(dtbl->ehufsi)); + + /* This is also a convenient place to check for out-of-range + * and duplicated VAL entries. We allow 0..255 for AC symbols + * but only 0..15 for DC. (We could constrain them further + * based on data depth and mode, but this seems enough.) + */ + maxsymbol = isDC ? 15 : 255; + + for (p = 0; p < lastp; p++) { + i = htbl->huffval[p]; + if (i < 0 || i > maxsymbol || dtbl->ehufsi[i]) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + dtbl->ehufco[i] = huffcode[p]; + dtbl->ehufsi[i] = huffsize[p]; + } +} + + +/* Outputting bytes to the file. + * NB: these must be called only when actually outputting, + * that is, entropy->gather_statistics == FALSE. + */ + +/* Emit a byte, taking 'action' if must suspend. */ +#define emit_byte_s(state,val,action) \ + { *(state)->next_output_byte++ = (JOCTET) (val); \ + if (--(state)->free_in_buffer == 0) \ + if (! dump_buffer_s(state)) \ + { action; } } + +/* Emit a byte */ +#define emit_byte_e(entropy,val) \ + { *(entropy)->next_output_byte++ = (JOCTET) (val); \ + if (--(entropy)->free_in_buffer == 0) \ + dump_buffer_e(entropy); } + + +LOCAL(boolean) +dump_buffer_s (working_state * state) +/* Empty the output buffer; return TRUE if successful, FALSE if must suspend */ +{ + struct jpeg_destination_mgr * dest = state->cinfo->dest; + + if (! (*dest->empty_output_buffer) (state->cinfo)) + return FALSE; + /* After a successful buffer dump, must reset buffer pointers */ + state->next_output_byte = dest->next_output_byte; + state->free_in_buffer = dest->free_in_buffer; + return TRUE; +} + + +LOCAL(void) +dump_buffer_e (huff_entropy_ptr entropy) +/* Empty the output buffer; we do not support suspension in this case. */ +{ + struct jpeg_destination_mgr * dest = entropy->cinfo->dest; + + if (! (*dest->empty_output_buffer) (entropy->cinfo)) + ERREXIT(entropy->cinfo, JERR_CANT_SUSPEND); + /* After a successful buffer dump, must reset buffer pointers */ + entropy->next_output_byte = dest->next_output_byte; + entropy->free_in_buffer = dest->free_in_buffer; +} + + +/* Outputting bits to the file */ + +/* Only the right 24 bits of put_buffer are used; the valid bits are + * left-justified in this part. At most 16 bits can be passed to emit_bits + * in one call, and we never retain more than 7 bits in put_buffer + * between calls, so 24 bits are sufficient. + */ + +INLINE +LOCAL(boolean) +emit_bits_s (working_state * state, unsigned int code, int size) +/* Emit some bits; return TRUE if successful, FALSE if must suspend */ +{ + /* This routine is heavily used, so it's worth coding tightly. */ + register INT32 put_buffer; + register int put_bits; + + /* if size is 0, caller used an invalid Huffman table entry */ + if (size == 0) + ERREXIT(state->cinfo, JERR_HUFF_MISSING_CODE); + + /* mask off any extra bits in code */ + put_buffer = ((INT32) code) & ((((INT32) 1) << size) - 1); + + /* new number of bits in buffer */ + put_bits = size + state->cur.put_bits; + + put_buffer <<= 24 - put_bits; /* align incoming bits */ + + /* and merge with old buffer contents */ + put_buffer |= state->cur.put_buffer; + + while (put_bits >= 8) { + int c = (int) ((put_buffer >> 16) & 0xFF); + + emit_byte_s(state, c, return FALSE); + if (c == 0xFF) { /* need to stuff a zero byte? */ + emit_byte_s(state, 0, return FALSE); + } + put_buffer <<= 8; + put_bits -= 8; + } + + state->cur.put_buffer = put_buffer; /* update state variables */ + state->cur.put_bits = put_bits; + + return TRUE; +} + + +INLINE +LOCAL(void) +emit_bits_e (huff_entropy_ptr entropy, unsigned int code, int size) +/* Emit some bits, unless we are in gather mode */ +{ + /* This routine is heavily used, so it's worth coding tightly. */ + register INT32 put_buffer; + register int put_bits; + + /* if size is 0, caller used an invalid Huffman table entry */ + if (size == 0) + ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE); + + if (entropy->gather_statistics) + return; /* do nothing if we're only getting stats */ + + /* mask off any extra bits in code */ + put_buffer = ((INT32) code) & ((((INT32) 1) << size) - 1); + + /* new number of bits in buffer */ + put_bits = size + entropy->saved.put_bits; + + put_buffer <<= 24 - put_bits; /* align incoming bits */ + + /* and merge with old buffer contents */ + put_buffer |= entropy->saved.put_buffer; + + while (put_bits >= 8) { + int c = (int) ((put_buffer >> 16) & 0xFF); + + emit_byte_e(entropy, c); + if (c == 0xFF) { /* need to stuff a zero byte? */ + emit_byte_e(entropy, 0); + } + put_buffer <<= 8; + put_bits -= 8; + } + + entropy->saved.put_buffer = put_buffer; /* update variables */ + entropy->saved.put_bits = put_bits; +} + + +LOCAL(boolean) +flush_bits_s (working_state * state) +{ + if (! emit_bits_s(state, 0x7F, 7)) /* fill any partial byte with ones */ + return FALSE; + state->cur.put_buffer = 0; /* and reset bit-buffer to empty */ + state->cur.put_bits = 0; + return TRUE; +} + + +LOCAL(void) +flush_bits_e (huff_entropy_ptr entropy) +{ + emit_bits_e(entropy, 0x7F, 7); /* fill any partial byte with ones */ + entropy->saved.put_buffer = 0; /* and reset bit-buffer to empty */ + entropy->saved.put_bits = 0; +} + + +/* + * Emit (or just count) a Huffman symbol. + */ + +INLINE +LOCAL(void) +emit_dc_symbol (huff_entropy_ptr entropy, int tbl_no, int symbol) +{ + if (entropy->gather_statistics) + entropy->dc_count_ptrs[tbl_no][symbol]++; + else { + c_derived_tbl * tbl = entropy->dc_derived_tbls[tbl_no]; + emit_bits_e(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]); + } +} + + +INLINE +LOCAL(void) +emit_ac_symbol (huff_entropy_ptr entropy, int tbl_no, int symbol) +{ + if (entropy->gather_statistics) + entropy->ac_count_ptrs[tbl_no][symbol]++; + else { + c_derived_tbl * tbl = entropy->ac_derived_tbls[tbl_no]; + emit_bits_e(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]); + } +} + + +/* + * Emit bits from a correction bit buffer. + */ + +LOCAL(void) +emit_buffered_bits (huff_entropy_ptr entropy, char * bufstart, + unsigned int nbits) +{ + if (entropy->gather_statistics) + return; /* no real work */ + + while (nbits > 0) { + emit_bits_e(entropy, (unsigned int) (*bufstart), 1); + bufstart++; + nbits--; + } +} + + +/* + * Emit any pending EOBRUN symbol. + */ + +LOCAL(void) +emit_eobrun (huff_entropy_ptr entropy) +{ + register int temp, nbits; + + if (entropy->EOBRUN > 0) { /* if there is any pending EOBRUN */ + temp = entropy->EOBRUN; + nbits = 0; + while ((temp >>= 1)) + nbits++; + /* safety check: shouldn't happen given limited correction-bit buffer */ + if (nbits > 14) + ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE); + + emit_ac_symbol(entropy, entropy->ac_tbl_no, nbits << 4); + if (nbits) + emit_bits_e(entropy, entropy->EOBRUN, nbits); + + entropy->EOBRUN = 0; + + /* Emit any buffered correction bits */ + emit_buffered_bits(entropy, entropy->bit_buffer, entropy->BE); + entropy->BE = 0; + } +} + + +/* + * Emit a restart marker & resynchronize predictions. + */ + +LOCAL(boolean) +emit_restart_s (working_state * state, int restart_num) +{ + int ci; + + if (! flush_bits_s(state)) + return FALSE; + + emit_byte_s(state, 0xFF, return FALSE); + emit_byte_s(state, JPEG_RST0 + restart_num, return FALSE); + + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < state->cinfo->comps_in_scan; ci++) + state->cur.last_dc_val[ci] = 0; + + /* The restart counter is not updated until we successfully write the MCU. */ + + return TRUE; +} + + +LOCAL(void) +emit_restart_e (huff_entropy_ptr entropy, int restart_num) +{ + int ci; + + emit_eobrun(entropy); + + if (! entropy->gather_statistics) { + flush_bits_e(entropy); + emit_byte_e(entropy, 0xFF); + emit_byte_e(entropy, JPEG_RST0 + restart_num); + } + + if (entropy->cinfo->Ss == 0) { + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < entropy->cinfo->comps_in_scan; ci++) + entropy->saved.last_dc_val[ci] = 0; + } else { + /* Re-initialize all AC-related fields to 0 */ + entropy->EOBRUN = 0; + entropy->BE = 0; + } +} + + +/* + * MCU encoding for DC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + register int temp, temp2; + register int nbits; + int max_coef_bits; + int blkn, ci, tbl; + ISHIFT_TEMPS + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart_e(entropy, entropy->next_restart_num); + + /* Since we're encoding a difference, the range limit is twice as much. */ + max_coef_bits = cinfo->data_precision + 3; + + /* Encode the MCU data blocks */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + ci = cinfo->MCU_membership[blkn]; + tbl = cinfo->cur_comp_info[ci]->dc_tbl_no; + + /* Compute the DC value after the required point transform by Al. + * This is simply an arithmetic right shift. + */ + temp = IRIGHT_SHIFT((int) (MCU_data[blkn][0][0]), cinfo->Al); + + /* DC differences are figured on the point-transformed values. */ + if ((temp2 = temp - entropy->saved.last_dc_val[ci]) == 0) { + /* Count/emit the Huffman-coded symbol for the number of bits */ + emit_dc_symbol(entropy, tbl, 0); + + continue; + } + + entropy->saved.last_dc_val[ci] = temp; + + /* Encode the DC coefficient difference per section G.1.2.1 */ + if ((temp = temp2) < 0) { + temp = -temp; /* temp is abs value of input */ + /* For a negative input, want temp2 = bitwise complement of abs(input) */ + /* This code assumes we are on a two's complement machine */ + temp2--; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 0; + do nbits++; /* there must be at least one 1 bit */ + while ((temp >>= 1)); + /* Check for out-of-range coefficient values */ + if (nbits > max_coef_bits) + ERREXIT(cinfo, JERR_BAD_DCT_COEF); + + /* Count/emit the Huffman-coded symbol for the number of bits */ + emit_dc_symbol(entropy, tbl, nbits); + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + emit_bits_e(entropy, (unsigned int) temp2, nbits); + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * MCU encoding for AC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + const int * natural_order; + JBLOCKROW block; + register int temp, temp2; + register int nbits; + register int r, k; + int Se, Al, max_coef_bits; + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart_e(entropy, entropy->next_restart_num); + + Se = cinfo->Se; + Al = cinfo->Al; + natural_order = cinfo->natural_order; + max_coef_bits = cinfo->data_precision + 2; + + /* Encode the MCU data block */ + block = MCU_data[0]; + + /* Encode the AC coefficients per section G.1.2.2, fig. G.3 */ + + r = 0; /* r = run length of zeros */ + + for (k = cinfo->Ss; k <= Se; k++) { + if ((temp = (*block)[natural_order[k]]) == 0) { + r++; + continue; + } + /* We must apply the point transform by Al. For AC coefficients this + * is an integer division with rounding towards 0. To do this portably + * in C, we shift after obtaining the absolute value; so the code is + * interwoven with finding the abs value (temp) and output bits (temp2). + */ + if (temp < 0) { + temp = -temp; /* temp is abs value of input */ + /* Apply the point transform, and watch out for case */ + /* that nonzero coef is zero after point transform. */ + if ((temp >>= Al) == 0) { + r++; + continue; + } + /* For a negative coef, want temp2 = bitwise complement of abs(coef) */ + temp2 = ~temp; + } else { + /* Apply the point transform, and watch out for case */ + /* that nonzero coef is zero after point transform. */ + if ((temp >>= Al) == 0) { + r++; + continue; + } + temp2 = temp; + } + + /* Emit any pending EOBRUN */ + if (entropy->EOBRUN > 0) + emit_eobrun(entropy); + /* if run length > 15, must emit special run-length-16 codes (0xF0) */ + while (r > 15) { + emit_ac_symbol(entropy, entropy->ac_tbl_no, 0xF0); + r -= 16; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 0; + do nbits++; /* there must be at least one 1 bit */ + while ((temp >>= 1)); + /* Check for out-of-range coefficient values */ + if (nbits > max_coef_bits) + ERREXIT(cinfo, JERR_BAD_DCT_COEF); + + /* Count/emit Huffman symbol for run length / number of bits */ + emit_ac_symbol(entropy, entropy->ac_tbl_no, (r << 4) + nbits); + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + emit_bits_e(entropy, (unsigned int) temp2, nbits); + + r = 0; /* reset zero run length */ + } + + if (r > 0) { /* If there are trailing zeroes, */ + entropy->EOBRUN++; /* count an EOB */ + if (entropy->EOBRUN == 0x7FFF) + emit_eobrun(entropy); /* force it out to avoid overflow */ + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * MCU encoding for DC successive approximation refinement scan. + * Note: we assume such scans can be multi-component, + * although the spec is not very clear on the point. + */ + +METHODDEF(boolean) +encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int Al, blkn; + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart_e(entropy, entropy->next_restart_num); + + Al = cinfo->Al; + + /* Encode the MCU data blocks */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + /* We simply emit the Al'th bit of the DC coefficient value. */ + emit_bits_e(entropy, (unsigned int) (MCU_data[blkn][0][0] >> Al), 1); + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * MCU encoding for AC successive approximation refinement scan. + */ + +METHODDEF(boolean) +encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + const int * natural_order; + JBLOCKROW block; + register int temp; + register int r, k; + int Se, Al; + int EOB; + char *BR_buffer; + unsigned int BR; + int absvalues[DCTSIZE2]; + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart_e(entropy, entropy->next_restart_num); + + Se = cinfo->Se; + Al = cinfo->Al; + natural_order = cinfo->natural_order; + + /* Encode the MCU data block */ + block = MCU_data[0]; + + /* It is convenient to make a pre-pass to determine the transformed + * coefficients' absolute values and the EOB position. + */ + EOB = 0; + for (k = cinfo->Ss; k <= Se; k++) { + temp = (*block)[natural_order[k]]; + /* We must apply the point transform by Al. For AC coefficients this + * is an integer division with rounding towards 0. To do this portably + * in C, we shift after obtaining the absolute value. + */ + if (temp < 0) + temp = -temp; /* temp is abs value of input */ + temp >>= Al; /* apply the point transform */ + absvalues[k] = temp; /* save abs value for main pass */ + if (temp == 1) + EOB = k; /* EOB = index of last newly-nonzero coef */ + } + + /* Encode the AC coefficients per section G.1.2.3, fig. G.7 */ + + r = 0; /* r = run length of zeros */ + BR = 0; /* BR = count of buffered bits added now */ + BR_buffer = entropy->bit_buffer + entropy->BE; /* Append bits to buffer */ + + for (k = cinfo->Ss; k <= Se; k++) { + if ((temp = absvalues[k]) == 0) { + r++; + continue; + } + + /* Emit any required ZRLs, but not if they can be folded into EOB */ + while (r > 15 && k <= EOB) { + /* emit any pending EOBRUN and the BE correction bits */ + emit_eobrun(entropy); + /* Emit ZRL */ + emit_ac_symbol(entropy, entropy->ac_tbl_no, 0xF0); + r -= 16; + /* Emit buffered correction bits that must be associated with ZRL */ + emit_buffered_bits(entropy, BR_buffer, BR); + BR_buffer = entropy->bit_buffer; /* BE bits are gone now */ + BR = 0; + } + + /* If the coef was previously nonzero, it only needs a correction bit. + * NOTE: a straight translation of the spec's figure G.7 would suggest + * that we also need to test r > 15. But if r > 15, we can only get here + * if k > EOB, which implies that this coefficient is not 1. + */ + if (temp > 1) { + /* The correction bit is the next bit of the absolute value. */ + BR_buffer[BR++] = (char) (temp & 1); + continue; + } + + /* Emit any pending EOBRUN and the BE correction bits */ + emit_eobrun(entropy); + + /* Count/emit Huffman symbol for run length / number of bits */ + emit_ac_symbol(entropy, entropy->ac_tbl_no, (r << 4) + 1); + + /* Emit output bit for newly-nonzero coef */ + temp = ((*block)[natural_order[k]] < 0) ? 0 : 1; + emit_bits_e(entropy, (unsigned int) temp, 1); + + /* Emit buffered correction bits that must be associated with this code */ + emit_buffered_bits(entropy, BR_buffer, BR); + BR_buffer = entropy->bit_buffer; /* BE bits are gone now */ + BR = 0; + r = 0; /* reset zero run length */ + } + + if (r > 0 || BR > 0) { /* If there are trailing zeroes, */ + entropy->EOBRUN++; /* count an EOB */ + entropy->BE += BR; /* concat my correction bits to older ones */ + /* We force out the EOB if we risk either: + * 1. overflow of the EOB counter; + * 2. overflow of the correction bit buffer during the next MCU. + */ + if (entropy->EOBRUN == 0x7FFF || entropy->BE > (MAX_CORR_BITS-DCTSIZE2+1)) + emit_eobrun(entropy); + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* Encode a single block's worth of coefficients */ + +LOCAL(boolean) +encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val, + c_derived_tbl *dctbl, c_derived_tbl *actbl) +{ + register int temp, temp2; + register int nbits; + register int r, k; + int Se = state->cinfo->lim_Se; + int max_coef_bits = state->cinfo->data_precision + 3; + const int * natural_order = state->cinfo->natural_order; + + /* Encode the DC coefficient difference per section F.1.2.1 */ + + if ((temp = block[0] - last_dc_val) == 0) { + /* Emit the Huffman-coded symbol for the number of bits */ + if (! emit_bits_s(state, dctbl->ehufco[0], dctbl->ehufsi[0])) + return FALSE; + } else { + if ((temp2 = temp) < 0) { + temp = -temp; /* temp is abs value of input */ + /* For a negative input, want temp2 = bitwise complement of abs(input) */ + /* This code assumes we are on a two's complement machine */ + temp2--; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 0; + do nbits++; /* there must be at least one 1 bit */ + while ((temp >>= 1)); + /* Check for out-of-range coefficient values. + * Since we're encoding a difference, the range limit is twice as much. + */ + if (nbits > max_coef_bits) + ERREXIT(state->cinfo, JERR_BAD_DCT_COEF); + + /* Emit the Huffman-coded symbol for the number of bits */ + if (! emit_bits_s(state, dctbl->ehufco[nbits], dctbl->ehufsi[nbits])) + return FALSE; + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + if (! emit_bits_s(state, (unsigned int) temp2, nbits)) + return FALSE; + } + + /* Encode the AC coefficients per section F.1.2.2 */ + + r = 0; /* r = run length of zeros */ + + for (k = 1; k <= Se; k++) { + if ((temp = block[natural_order[k]]) == 0) { + r++; + continue; + } + + /* if run length > 15, must emit special run-length-16 codes (0xF0) */ + while (r > 15) { + if (! emit_bits_s(state, actbl->ehufco[0xF0], actbl->ehufsi[0xF0])) + return FALSE; + r -= 16; + } + + if ((temp2 = temp) < 0) { + temp = -temp; /* temp is abs value of input */ + /* For a negative coef, want temp2 = bitwise complement of abs(coef) */ + /* This code assumes we are on a two's complement machine */ + temp2--; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 0; + do nbits++; /* there must be at least one 1 bit */ + while ((temp >>= 1)); + /* Check for out-of-range coefficient values. + * Use ">=" instead of ">" so can use the + * same one larger limit from DC check here. + */ + if (nbits >= max_coef_bits) + ERREXIT(state->cinfo, JERR_BAD_DCT_COEF); + + /* Emit Huffman symbol for run length / number of bits */ + temp = (r << 4) + nbits; + if (! emit_bits_s(state, actbl->ehufco[temp], actbl->ehufsi[temp])) + return FALSE; + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + if (! emit_bits_s(state, (unsigned int) temp2, nbits)) + return FALSE; + + r = 0; /* reset zero run length */ + } + + /* If the last coef(s) were zero, emit an end-of-block code */ + if (r > 0) + if (! emit_bits_s(state, actbl->ehufco[0], actbl->ehufsi[0])) + return FALSE; + + return TRUE; +} + + +/* + * Encode and output one MCU's worth of Huffman-compressed coefficients. + */ + +METHODDEF(boolean) +encode_mcu_huff (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + working_state state; + int blkn, ci; + jpeg_component_info * compptr; + + /* Load up working state */ + state.next_output_byte = cinfo->dest->next_output_byte; + state.free_in_buffer = cinfo->dest->free_in_buffer; + ASSIGN_STATE(state.cur, entropy->saved); + state.cinfo = cinfo; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! emit_restart_s(&state, entropy->next_restart_num)) + return FALSE; + } + + /* Encode the MCU data blocks */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + if (! encode_one_block(&state, + MCU_data[blkn][0], state.cur.last_dc_val[ci], + entropy->dc_derived_tbls[compptr->dc_tbl_no], + entropy->ac_derived_tbls[compptr->ac_tbl_no])) + return FALSE; + /* Update last_dc_val */ + state.cur.last_dc_val[ci] = MCU_data[blkn][0][0]; + } + + /* Completed MCU, so update state */ + cinfo->dest->next_output_byte = state.next_output_byte; + cinfo->dest->free_in_buffer = state.free_in_buffer; + ASSIGN_STATE(entropy->saved, state.cur); + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * Finish up at the end of a Huffman-compressed scan. + */ + +METHODDEF(void) +finish_pass_huff (j_compress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + working_state state; + + if (cinfo->progressive_mode) { + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Flush out any buffered data */ + emit_eobrun(entropy); + flush_bits_e(entropy); + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + } else { + /* Load up working state ... flush_bits needs it */ + state.next_output_byte = cinfo->dest->next_output_byte; + state.free_in_buffer = cinfo->dest->free_in_buffer; + ASSIGN_STATE(state.cur, entropy->saved); + state.cinfo = cinfo; + + /* Flush out the last data */ + if (! flush_bits_s(&state)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + + /* Update state */ + cinfo->dest->next_output_byte = state.next_output_byte; + cinfo->dest->free_in_buffer = state.free_in_buffer; + ASSIGN_STATE(entropy->saved, state.cur); + } +} + + +/* + * Huffman coding optimization. + * + * We first scan the supplied data and count the number of uses of each symbol + * that is to be Huffman-coded. (This process MUST agree with the code above.) + * Then we build a Huffman coding tree for the observed counts. + * Symbols which are not needed at all for the particular image are not + * assigned any code, which saves space in the DHT marker as well as in + * the compressed data. + */ + + +/* Process a single block's worth of coefficients */ + +LOCAL(void) +htest_one_block (j_compress_ptr cinfo, JCOEFPTR block, int last_dc_val, + long dc_counts[], long ac_counts[]) +{ + register int temp; + register int nbits; + register int r, k; + int Se = cinfo->lim_Se; + int max_coef_bits = cinfo->data_precision + 3; + const int * natural_order = cinfo->natural_order; + + /* Encode the DC coefficient difference per section F.1.2.1 */ + + if ((temp = block[0] - last_dc_val) == 0) { + /* Count the Huffman symbol for the number of bits */ + dc_counts[0]++; + } else { + if (temp < 0) + temp = -temp; /* temp is abs value of input */ + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 0; + do nbits++; /* there must be at least one 1 bit */ + while ((temp >>= 1)); + /* Check for out-of-range coefficient values. + * Since we're encoding a difference, the range limit is twice as much. + */ + if (nbits > max_coef_bits) + ERREXIT(cinfo, JERR_BAD_DCT_COEF); + + /* Count the Huffman symbol for the number of bits */ + dc_counts[nbits]++; + } + + /* Encode the AC coefficients per section F.1.2.2 */ + + r = 0; /* r = run length of zeros */ + + for (k = 1; k <= Se; k++) { + if ((temp = block[natural_order[k]]) == 0) { + r++; + continue; + } + + /* if run length > 15, must emit special run-length-16 codes (0xF0) */ + while (r > 15) { + ac_counts[0xF0]++; + r -= 16; + } + + if (temp < 0) + temp = -temp; /* temp is abs value of input */ + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 0; + do nbits++; /* there must be at least one 1 bit */ + while ((temp >>= 1)); + /* Check for out-of-range coefficient values. + * Use ">=" instead of ">" so can use the + * same one larger limit from DC check here. + */ + if (nbits >= max_coef_bits) + ERREXIT(cinfo, JERR_BAD_DCT_COEF); + + /* Count Huffman symbol for run length / number of bits */ + ac_counts[(r << 4) + nbits]++; + + r = 0; /* reset zero run length */ + } + + /* If the last coef(s) were zero, emit an end-of-block code */ + if (r > 0) + ac_counts[0]++; +} + + +/* + * Trial-encode one MCU's worth of Huffman-compressed coefficients. + * No data is actually output, so no suspension return is possible. + */ + +METHODDEF(boolean) +encode_mcu_gather (j_compress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int blkn, ci; + jpeg_component_info * compptr; + + /* Take care of restart intervals if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) + entropy->saved.last_dc_val[ci] = 0; + /* Update restart state */ + entropy->restarts_to_go = cinfo->restart_interval; + } + entropy->restarts_to_go--; + } + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + htest_one_block(cinfo, MCU_data[blkn][0], entropy->saved.last_dc_val[ci], + entropy->dc_count_ptrs[compptr->dc_tbl_no], + entropy->ac_count_ptrs[compptr->ac_tbl_no]); + entropy->saved.last_dc_val[ci] = MCU_data[blkn][0][0]; + } + + return TRUE; +} + + +/* + * Generate the best Huffman code table for the given counts, fill htbl. + * + * The JPEG standard requires that no symbol be assigned a codeword of all + * one bits (so that padding bits added at the end of a compressed segment + * can't look like a valid code). Because of the canonical ordering of + * codewords, this just means that there must be an unused slot in the + * longest codeword length category. Section K.2 of the JPEG spec suggests + * reserving such a slot by pretending that symbol 256 is a valid symbol + * with count 1. In theory that's not optimal; giving it count zero but + * including it in the symbol set anyway should give a better Huffman code. + * But the theoretically better code actually seems to come out worse in + * practice, because it produces more all-ones bytes (which incur stuffed + * zero bytes in the final file). In any case the difference is tiny. + * + * The JPEG standard requires Huffman codes to be no more than 16 bits long. + * If some symbols have a very small but nonzero probability, the Huffman tree + * must be adjusted to meet the code length restriction. We currently use + * the adjustment method suggested in JPEG section K.2. This method is *not* + * optimal; it may not choose the best possible limited-length code. But + * typically only very-low-frequency symbols will be given less-than-optimal + * lengths, so the code is almost optimal. Experimental comparisons against + * an optimal limited-length-code algorithm indicate that the difference is + * microscopic --- usually less than a hundredth of a percent of total size. + * So the extra complexity of an optimal algorithm doesn't seem worthwhile. + */ + +LOCAL(void) +jpeg_gen_optimal_table (j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[]) +{ +#define MAX_CLEN 32 /* assumed maximum initial code length */ + UINT8 bits[MAX_CLEN+1]; /* bits[k] = # of symbols with code length k */ + int codesize[257]; /* codesize[k] = code length of symbol k */ + int others[257]; /* next symbol in current branch of tree */ + int c1, c2, i, j; + UINT8 *p; + long v; + + freq[256] = 1; /* make sure 256 has a nonzero count */ + /* Including the pseudo-symbol 256 in the Huffman procedure guarantees + * that no real symbol is given code-value of all ones, because 256 + * will be placed last in the largest codeword category. + * In the symbol list build procedure this element serves as sentinel + * for the zero run loop. + */ + +#ifndef DONT_USE_FANCY_HUFF_OPT + + /* Build list of symbols sorted in order of descending frequency */ + /* This approach has several benefits (thank to John Korejwa for the idea): + * 1. + * If a codelength category is split during the length limiting procedure + * below, the feature that more frequent symbols are assigned shorter + * codewords remains valid for the adjusted code. + * 2. + * To reduce consecutive ones in a Huffman data stream (thus reducing the + * number of stuff bytes in JPEG) it is preferable to follow 0 branches + * (and avoid 1 branches) as much as possible. This is easily done by + * assigning symbols to leaves of the Huffman tree in order of decreasing + * frequency, with no secondary sort based on codelengths. + * 3. + * The symbol list can be built independently from the assignment of code + * lengths by the Huffman procedure below. + * Note: The symbol list build procedure must be performed first, because + * the Huffman procedure assigning the codelengths clobbers the frequency + * counts! + */ + + /* Here we use the others array as a linked list of nonzero frequencies + * to be sorted. Already sorted elements are removed from the list. + */ + + /* Building list */ + + /* This item does not correspond to a valid symbol frequency and is used + * as starting index. + */ + j = 256; + + for (i = 0;; i++) { + if (freq[i] == 0) /* skip zero frequencies */ + continue; + if (i > 255) + break; + others[j] = i; /* this symbol value */ + j = i; /* previous symbol value */ + } + others[j] = -1; /* mark end of list */ + + /* Sorting list */ + + p = htbl->huffval; + while ((c1 = others[256]) >= 0) { + v = freq[c1]; + i = c1; /* first symbol value */ + j = 256; /* pseudo symbol value for starting index */ + while ((c2 = others[c1]) >= 0) { + if (freq[c2] > v) { + v = freq[c2]; + i = c2; /* this symbol value */ + j = c1; /* previous symbol value */ + } + c1 = c2; + } + others[j] = others[i]; /* remove this symbol i from list */ + *p++ = (UINT8) i; + } + +#endif /* DONT_USE_FANCY_HUFF_OPT */ + + /* This algorithm is explained in section K.2 of the JPEG standard */ + + MEMZERO(bits, SIZEOF(bits)); + MEMZERO(codesize, SIZEOF(codesize)); + for (i = 0; i < 257; i++) + others[i] = -1; /* init links to empty */ + + /* Huffman's basic algorithm to assign optimal code lengths to symbols */ + + for (;;) { + /* Find the smallest nonzero frequency, set c1 = its symbol */ + /* In case of ties, take the larger symbol number */ + c1 = -1; + v = 1000000000L; + for (i = 0; i <= 256; i++) { + if (freq[i] && freq[i] <= v) { + v = freq[i]; + c1 = i; + } + } + + /* Find the next smallest nonzero frequency, set c2 = its symbol */ + /* In case of ties, take the larger symbol number */ + c2 = -1; + v = 1000000000L; + for (i = 0; i <= 256; i++) { + if (freq[i] && freq[i] <= v && i != c1) { + v = freq[i]; + c2 = i; + } + } + + /* Done if we've merged everything into one frequency */ + if (c2 < 0) + break; + + /* Else merge the two counts/trees */ + freq[c1] += freq[c2]; + freq[c2] = 0; + + /* Increment the codesize of everything in c1's tree branch */ + codesize[c1]++; + while (others[c1] >= 0) { + c1 = others[c1]; + codesize[c1]++; + } + + others[c1] = c2; /* chain c2 onto c1's tree branch */ + + /* Increment the codesize of everything in c2's tree branch */ + codesize[c2]++; + while (others[c2] >= 0) { + c2 = others[c2]; + codesize[c2]++; + } + } + + /* Now count the number of symbols of each code length */ + for (i = 0; i <= 256; i++) { + if (codesize[i]) { + /* The JPEG standard seems to think that this can't happen, */ + /* but I'm paranoid... */ + if (codesize[i] > MAX_CLEN) + ERREXIT(cinfo, JERR_HUFF_CLEN_OUTOFBOUNDS); + + bits[codesize[i]]++; + } + } + + /* JPEG doesn't allow symbols with code lengths over 16 bits, so if the pure + * Huffman procedure assigned any such lengths, we must adjust the coding. + * Here is what the JPEG spec says about how this next bit works: + * Since symbols are paired for the longest Huffman code, the symbols are + * removed from this length category two at a time. The prefix for the pair + * (which is one bit shorter) is allocated to one of the pair; then, + * skipping the BITS entry for that prefix length, a code word from the next + * shortest nonzero BITS entry is converted into a prefix for two code words + * one bit longer. + */ + + for (i = MAX_CLEN; i > 16; i--) { + while (bits[i] > 0) { + j = i - 2; /* find length of new prefix to be used */ + while (bits[j] == 0) { + if (j == 0) + ERREXIT(cinfo, JERR_HUFF_CLEN_OUTOFBOUNDS); + j--; + } + + bits[i] -= 2; /* remove two symbols */ + bits[i-1]++; /* one goes in this length */ + bits[j+1] += 2; /* two new symbols in this length */ + bits[j]--; /* symbol of this length is now a prefix */ + } + } + + /* Remove the count for the pseudo-symbol 256 from the largest codelength */ + while (bits[i] == 0) /* find largest codelength still in use */ + i--; + bits[i]--; + + /* Return final symbol counts (only for lengths 0..16) */ + MEMCOPY(htbl->bits, bits, SIZEOF(htbl->bits)); + +#ifdef DONT_USE_FANCY_HUFF_OPT + + /* Return a list of the symbols sorted by code length */ + /* Note: Due to the codelength changes made above, it can happen + * that more frequent symbols are assigned longer codewords. + */ + p = htbl->huffval; + for (i = 1; i <= MAX_CLEN; i++) { + for (j = 0; j <= 255; j++) { + if (codesize[j] == i) { + *p++ = (UINT8) j; + } + } + } + +#endif /* DONT_USE_FANCY_HUFF_OPT */ + + /* Set sent_table FALSE so updated table will be written to JPEG file. */ + htbl->sent_table = FALSE; +} + + +/* + * Finish up a statistics-gathering pass and create the new Huffman tables. + */ + +METHODDEF(void) +finish_pass_gather (j_compress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci, tbl; + jpeg_component_info * compptr; + JHUFF_TBL **htblptr; + boolean did_dc[NUM_HUFF_TBLS]; + boolean did_ac[NUM_HUFF_TBLS]; + + if (cinfo->progressive_mode) + /* Flush out buffered data (all we care about is counting the EOB symbol) */ + emit_eobrun(entropy); + + /* It's important not to apply jpeg_gen_optimal_table more than once + * per table, because it clobbers the input frequency counts! + */ + MEMZERO(did_dc, SIZEOF(did_dc)); + MEMZERO(did_ac, SIZEOF(did_ac)); + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* DC needs no table for refinement scan */ + if (cinfo->Ss == 0 && cinfo->Ah == 0) { + tbl = compptr->dc_tbl_no; + if (! did_dc[tbl]) { + htblptr = & cinfo->dc_huff_tbl_ptrs[tbl]; + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + jpeg_gen_optimal_table(cinfo, *htblptr, entropy->dc_count_ptrs[tbl]); + did_dc[tbl] = TRUE; + } + } + /* AC needs no table when not present */ + if (cinfo->Se) { + tbl = compptr->ac_tbl_no; + if (! did_ac[tbl]) { + htblptr = & cinfo->ac_huff_tbl_ptrs[tbl]; + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + jpeg_gen_optimal_table(cinfo, *htblptr, entropy->ac_count_ptrs[tbl]); + did_ac[tbl] = TRUE; + } + } + } +} + + +/* + * Initialize for a Huffman-compressed scan. + * If gather_statistics is TRUE, we do not output anything during the scan, + * just count the Huffman symbols used and generate Huffman code tables. + */ + +METHODDEF(void) +start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci, tbl; + jpeg_component_info * compptr; + + if (gather_statistics) + entropy->pub.finish_pass = finish_pass_gather; + else + entropy->pub.finish_pass = finish_pass_huff; + + if (cinfo->progressive_mode) { + entropy->cinfo = cinfo; + entropy->gather_statistics = gather_statistics; + + /* We assume jcmaster.c already validated the scan parameters. */ + + /* Select execution routine */ + if (cinfo->Ah == 0) { + if (cinfo->Ss == 0) + entropy->pub.encode_mcu = encode_mcu_DC_first; + else + entropy->pub.encode_mcu = encode_mcu_AC_first; + } else { + if (cinfo->Ss == 0) + entropy->pub.encode_mcu = encode_mcu_DC_refine; + else { + entropy->pub.encode_mcu = encode_mcu_AC_refine; + /* AC refinement needs a correction bit buffer */ + if (entropy->bit_buffer == NULL) + entropy->bit_buffer = (char *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, MAX_CORR_BITS * SIZEOF(char)); + } + } + + /* Initialize AC stuff */ + entropy->ac_tbl_no = cinfo->cur_comp_info[0]->ac_tbl_no; + entropy->EOBRUN = 0; + entropy->BE = 0; + } else { + if (gather_statistics) + entropy->pub.encode_mcu = encode_mcu_gather; + else + entropy->pub.encode_mcu = encode_mcu_huff; + } + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* DC needs no table for refinement scan */ + if (cinfo->Ss == 0 && cinfo->Ah == 0) { + tbl = compptr->dc_tbl_no; + if (gather_statistics) { + /* Check for invalid table index */ + /* (make_c_derived_tbl does this in the other path) */ + if (tbl < 0 || tbl >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl); + /* Allocate and zero the statistics tables */ + /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */ + if (entropy->dc_count_ptrs[tbl] == NULL) + entropy->dc_count_ptrs[tbl] = (long *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, 257 * SIZEOF(long)); + MEMZERO(entropy->dc_count_ptrs[tbl], 257 * SIZEOF(long)); + } else { + /* Compute derived values for Huffman tables */ + /* We may do this more than once for a table, but it's not expensive */ + jpeg_make_c_derived_tbl(cinfo, TRUE, tbl, + & entropy->dc_derived_tbls[tbl]); + } + /* Initialize DC predictions to 0 */ + entropy->saved.last_dc_val[ci] = 0; + } + /* AC needs no table when not present */ + if (cinfo->Se) { + tbl = compptr->ac_tbl_no; + if (gather_statistics) { + if (tbl < 0 || tbl >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl); + if (entropy->ac_count_ptrs[tbl] == NULL) + entropy->ac_count_ptrs[tbl] = (long *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, 257 * SIZEOF(long)); + MEMZERO(entropy->ac_count_ptrs[tbl], 257 * SIZEOF(long)); + } else { + jpeg_make_c_derived_tbl(cinfo, FALSE, tbl, + & entropy->ac_derived_tbls[tbl]); + } + } + } + + /* Initialize bit buffer to empty */ + entropy->saved.put_buffer = 0; + entropy->saved.put_bits = 0; + + /* Initialize restart stuff */ + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num = 0; +} + + +/* + * Module initialization routine for Huffman entropy encoding. + */ + +GLOBAL(void) +jinit_huff_encoder (j_compress_ptr cinfo) +{ + huff_entropy_ptr entropy; + int i; + + entropy = (huff_entropy_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(huff_entropy_encoder)); + cinfo->entropy = &entropy->pub; + entropy->pub.start_pass = start_pass_huff; + + /* Mark tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; + entropy->dc_count_ptrs[i] = entropy->ac_count_ptrs[i] = NULL; + } + + if (cinfo->progressive_mode) + entropy->bit_buffer = NULL; /* needed only in AC refinement scan */ +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jcinit.c b/widget/milsko/milskosrc/external/libjpeg/src/jcinit.c new file mode 100644 index 0000000000..2aea7ca2a1 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jcinit.c @@ -0,0 +1,249 @@ +/* + * jcinit.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 2003-2017 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains initialization logic for the JPEG compressor. + * This routine is in charge of selecting the modules to be executed and + * making an initialization call to each one. + * + * Logically, this code belongs in jcmaster.c. It's split out because + * linking this routine implies linking the entire compression library. + * For a transcoding-only application, we want to be able to use jcmaster.c + * without linking in the whole library. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Compute JPEG image dimensions and related values. + * NOTE: this is exported for possible use by application. + * Hence it mustn't do anything that can't be done twice. + */ + +GLOBAL(void) +jpeg_calc_jpeg_dimensions (j_compress_ptr cinfo) +/* Do computations that are needed before master selection phase */ +{ + /* Sanity check on input image dimensions to prevent overflow in + * following calculations. + * We do check jpeg_width and jpeg_height in initial_setup in jcmaster.c, + * but image_width and image_height can come from arbitrary data, + * and we need some space for multiplication by block_size. + */ + if (((long) cinfo->image_width >> 24) || ((long) cinfo->image_height >> 24)) + ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION); + +#ifdef DCT_SCALING_SUPPORTED + + /* Compute actual JPEG image dimensions and DCT scaling choices. */ + if (cinfo->scale_num >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/1 scaling */ + cinfo->jpeg_width = cinfo->image_width * cinfo->block_size; + cinfo->jpeg_height = cinfo->image_height * cinfo->block_size; + cinfo->min_DCT_h_scaled_size = 1; + cinfo->min_DCT_v_scaled_size = 1; + } else if (cinfo->scale_num * 2 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/2 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 2L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 2L); + cinfo->min_DCT_h_scaled_size = 2; + cinfo->min_DCT_v_scaled_size = 2; + } else if (cinfo->scale_num * 3 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/3 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 3L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 3L); + cinfo->min_DCT_h_scaled_size = 3; + cinfo->min_DCT_v_scaled_size = 3; + } else if (cinfo->scale_num * 4 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/4 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 4L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 4L); + cinfo->min_DCT_h_scaled_size = 4; + cinfo->min_DCT_v_scaled_size = 4; + } else if (cinfo->scale_num * 5 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/5 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 5L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 5L); + cinfo->min_DCT_h_scaled_size = 5; + cinfo->min_DCT_v_scaled_size = 5; + } else if (cinfo->scale_num * 6 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/6 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 6L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 6L); + cinfo->min_DCT_h_scaled_size = 6; + cinfo->min_DCT_v_scaled_size = 6; + } else if (cinfo->scale_num * 7 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/7 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 7L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 7L); + cinfo->min_DCT_h_scaled_size = 7; + cinfo->min_DCT_v_scaled_size = 7; + } else if (cinfo->scale_num * 8 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/8 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 8L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 8L); + cinfo->min_DCT_h_scaled_size = 8; + cinfo->min_DCT_v_scaled_size = 8; + } else if (cinfo->scale_num * 9 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/9 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 9L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 9L); + cinfo->min_DCT_h_scaled_size = 9; + cinfo->min_DCT_v_scaled_size = 9; + } else if (cinfo->scale_num * 10 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/10 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 10L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 10L); + cinfo->min_DCT_h_scaled_size = 10; + cinfo->min_DCT_v_scaled_size = 10; + } else if (cinfo->scale_num * 11 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/11 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 11L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 11L); + cinfo->min_DCT_h_scaled_size = 11; + cinfo->min_DCT_v_scaled_size = 11; + } else if (cinfo->scale_num * 12 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/12 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 12L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 12L); + cinfo->min_DCT_h_scaled_size = 12; + cinfo->min_DCT_v_scaled_size = 12; + } else if (cinfo->scale_num * 13 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/13 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 13L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 13L); + cinfo->min_DCT_h_scaled_size = 13; + cinfo->min_DCT_v_scaled_size = 13; + } else if (cinfo->scale_num * 14 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/14 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 14L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 14L); + cinfo->min_DCT_h_scaled_size = 14; + cinfo->min_DCT_v_scaled_size = 14; + } else if (cinfo->scale_num * 15 >= cinfo->scale_denom * cinfo->block_size) { + /* Provide block_size/15 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 15L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 15L); + cinfo->min_DCT_h_scaled_size = 15; + cinfo->min_DCT_v_scaled_size = 15; + } else { + /* Provide block_size/16 scaling */ + cinfo->jpeg_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 16L); + cinfo->jpeg_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 16L); + cinfo->min_DCT_h_scaled_size = 16; + cinfo->min_DCT_v_scaled_size = 16; + } + +#else /* !DCT_SCALING_SUPPORTED */ + + /* Hardwire it to "no scaling" */ + cinfo->jpeg_width = cinfo->image_width; + cinfo->jpeg_height = cinfo->image_height; + cinfo->min_DCT_h_scaled_size = DCTSIZE; + cinfo->min_DCT_v_scaled_size = DCTSIZE; + +#endif /* DCT_SCALING_SUPPORTED */ +} + + +/* + * Master selection of compression modules. + * This is done once at the start of processing an image. We determine + * which modules will be used and give them appropriate initialization calls. + */ + +GLOBAL(void) +jinit_compress_master (j_compress_ptr cinfo) +{ + long samplesperrow; + JDIMENSION jd_samplesperrow; + + /* For now, precision must match compiled-in value... */ + if (cinfo->data_precision != BITS_IN_JSAMPLE) + ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); + + /* Sanity check on input image dimensions */ + if (cinfo->image_height <= 0 || cinfo->image_width <= 0 || + cinfo->input_components <= 0) + ERREXIT(cinfo, JERR_EMPTY_IMAGE); + + /* Width of an input scanline must be representable as JDIMENSION. */ + samplesperrow = (long) cinfo->image_width * (long) cinfo->input_components; + jd_samplesperrow = (JDIMENSION) samplesperrow; + if ((long) jd_samplesperrow != samplesperrow) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + + /* Compute JPEG image dimensions and related values. */ + jpeg_calc_jpeg_dimensions(cinfo); + + /* Initialize master control (includes parameter checking/processing) */ + jinit_c_master_control(cinfo, FALSE /* full compression */); + + /* Preprocessing */ + if (! cinfo->raw_data_in) { + jinit_color_converter(cinfo); + jinit_downsampler(cinfo); + jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */); + } + /* Forward DCT */ + jinit_forward_dct(cinfo); + /* Entropy encoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) + jinit_arith_encoder(cinfo); + else { + jinit_huff_encoder(cinfo); + } + + /* Need a full-image coefficient buffer in any multi-pass mode. */ + jinit_c_coef_controller(cinfo, + (boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding)); + jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */); + + jinit_marker_writer(cinfo); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Write the datastream header (SOI) immediately. + * Frame and scan headers are postponed till later. + * This lets application insert special markers after the SOI. + */ + (*cinfo->marker->write_file_header) (cinfo); +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jcmainct.c b/widget/milsko/milskosrc/external/libjpeg/src/jcmainct.c new file mode 100644 index 0000000000..39b97902e8 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jcmainct.c @@ -0,0 +1,297 @@ +/* + * jcmainct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2003-2012 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the main buffer controller for compression. + * The main buffer lies between the pre-processor and the JPEG + * compressor proper; it holds downsampled data in the JPEG colorspace. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Note: currently, there is no operating mode in which a full-image buffer + * is needed at this step. If there were, that mode could not be used with + * "raw data" input, since this module is bypassed in that case. However, + * we've left the code here for possible use in special applications. + */ +#undef FULL_MAIN_BUFFER_SUPPORTED + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_main_controller pub; /* public fields */ + + JDIMENSION cur_iMCU_row; /* number of current iMCU row */ + JDIMENSION rowgroup_ctr; /* counts row groups received in iMCU row */ + boolean suspended; /* remember if we suspended output */ + J_BUF_MODE pass_mode; /* current operating mode */ + + /* If using just a strip buffer, this points to the entire set of buffers + * (we allocate one for each component). In the full-image case, this + * points to the currently accessible strips of the virtual arrays. + */ + JSAMPARRAY buffer[MAX_COMPONENTS]; + +#ifdef FULL_MAIN_BUFFER_SUPPORTED + /* If using full-image storage, this array holds pointers to virtual-array + * control blocks for each component. Unused if not full-image storage. + */ + jvirt_sarray_ptr whole_image[MAX_COMPONENTS]; +#endif +} my_main_controller; + +typedef my_main_controller * my_main_ptr; + + +/* Forward declarations */ +METHODDEF(void) process_data_simple_main + JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf, + JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail)); +#ifdef FULL_MAIN_BUFFER_SUPPORTED +METHODDEF(void) process_data_buffer_main + JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf, + JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail)); +#endif + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_main_ptr mainp = (my_main_ptr) cinfo->main; + + /* Do nothing in raw-data mode. */ + if (cinfo->raw_data_in) + return; + + mainp->cur_iMCU_row = 0; /* initialize counters */ + mainp->rowgroup_ctr = 0; + mainp->suspended = FALSE; + mainp->pass_mode = pass_mode; /* save mode for use by process_data */ + + switch (pass_mode) { + case JBUF_PASS_THRU: +#ifdef FULL_MAIN_BUFFER_SUPPORTED + if (mainp->whole_image[0] != NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif + mainp->pub.process_data = process_data_simple_main; + break; +#ifdef FULL_MAIN_BUFFER_SUPPORTED + case JBUF_SAVE_SOURCE: + case JBUF_CRANK_DEST: + case JBUF_SAVE_AND_PASS: + if (mainp->whole_image[0] == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + mainp->pub.process_data = process_data_buffer_main; + break; +#endif + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + break; + } +} + + +/* + * Process some data. + * This routine handles the simple pass-through mode, + * where we have only a strip buffer. + */ + +METHODDEF(void) +process_data_simple_main (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail) +{ + my_main_ptr mainp = (my_main_ptr) cinfo->main; + + while (mainp->cur_iMCU_row < cinfo->total_iMCU_rows) { + /* Read input data if we haven't filled the main buffer yet */ + if (mainp->rowgroup_ctr < (JDIMENSION) cinfo->min_DCT_v_scaled_size) + (*cinfo->prep->pre_process_data) (cinfo, + input_buf, in_row_ctr, in_rows_avail, + mainp->buffer, &mainp->rowgroup_ctr, + (JDIMENSION) cinfo->min_DCT_v_scaled_size); + + /* If we don't have a full iMCU row buffered, return to application for + * more data. Note that preprocessor will always pad to fill the iMCU row + * at the bottom of the image. + */ + if (mainp->rowgroup_ctr != (JDIMENSION) cinfo->min_DCT_v_scaled_size) + return; + + /* Send the completed row to the compressor */ + if (! (*cinfo->coef->compress_data) (cinfo, mainp->buffer)) { + /* If compressor did not consume the whole row, then we must need to + * suspend processing and return to the application. In this situation + * we pretend we didn't yet consume the last input row; otherwise, if + * it happened to be the last row of the image, the application would + * think we were done. + */ + if (! mainp->suspended) { + (*in_row_ctr)--; + mainp->suspended = TRUE; + } + return; + } + /* We did finish the row. Undo our little suspension hack if a previous + * call suspended; then mark the main buffer empty. + */ + if (mainp->suspended) { + (*in_row_ctr)++; + mainp->suspended = FALSE; + } + mainp->rowgroup_ctr = 0; + mainp->cur_iMCU_row++; + } +} + + +#ifdef FULL_MAIN_BUFFER_SUPPORTED + +/* + * Process some data. + * This routine handles all of the modes that use a full-size buffer. + */ + +METHODDEF(void) +process_data_buffer_main (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail) +{ + my_main_ptr mainp = (my_main_ptr) cinfo->main; + int ci; + jpeg_component_info *compptr; + boolean writing = (mainp->pass_mode != JBUF_CRANK_DEST); + + while (mainp->cur_iMCU_row < cinfo->total_iMCU_rows) { + /* Realign the virtual buffers if at the start of an iMCU row. */ + if (mainp->rowgroup_ctr == 0) { + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + mainp->buffer[ci] = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, mainp->whole_image[ci], mainp->cur_iMCU_row * + ((JDIMENSION) (compptr->v_samp_factor * cinfo->min_DCT_v_scaled_size)), + (JDIMENSION) (compptr->v_samp_factor * cinfo->min_DCT_v_scaled_size), + writing); + } + /* In a read pass, pretend we just read some source data. */ + if (! writing) { + *in_row_ctr += (JDIMENSION) + (cinfo->max_v_samp_factor * cinfo->min_DCT_v_scaled_size); + mainp->rowgroup_ctr = (JDIMENSION) cinfo->min_DCT_v_scaled_size; + } + } + + /* If a write pass, read input data until the current iMCU row is full. */ + /* Note: preprocessor will pad if necessary to fill the last iMCU row. */ + if (writing) { + (*cinfo->prep->pre_process_data) (cinfo, + input_buf, in_row_ctr, in_rows_avail, + mainp->buffer, &mainp->rowgroup_ctr, + (JDIMENSION) cinfo->min_DCT_v_scaled_size); + /* Return to application if we need more data to fill the iMCU row. */ + if (mainp->rowgroup_ctr < (JDIMENSION) cinfo->min_DCT_v_scaled_size) + return; + } + + /* Emit data, unless this is a sink-only pass. */ + if (mainp->pass_mode != JBUF_SAVE_SOURCE) { + if (! (*cinfo->coef->compress_data) (cinfo, mainp->buffer)) { + /* If compressor did not consume the whole row, then we must need to + * suspend processing and return to the application. In this situation + * we pretend we didn't yet consume the last input row; otherwise, if + * it happened to be the last row of the image, the application would + * think we were done. + */ + if (! mainp->suspended) { + (*in_row_ctr)--; + mainp->suspended = TRUE; + } + return; + } + /* We did finish the row. Undo our little suspension hack if a previous + * call suspended; then mark the main buffer empty. + */ + if (mainp->suspended) { + (*in_row_ctr)++; + mainp->suspended = FALSE; + } + } + + /* If get here, we are done with this iMCU row. Mark buffer empty. */ + mainp->rowgroup_ctr = 0; + mainp->cur_iMCU_row++; + } +} + +#endif /* FULL_MAIN_BUFFER_SUPPORTED */ + + +/* + * Initialize main buffer controller. + */ + +GLOBAL(void) +jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer) +{ + my_main_ptr mainp; + int ci; + jpeg_component_info *compptr; + + mainp = (my_main_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_main_controller)); + cinfo->main = &mainp->pub; + mainp->pub.start_pass = start_pass_main; + + /* We don't need to create a buffer in raw-data mode. */ + if (cinfo->raw_data_in) + return; + + /* Create the buffer. It holds downsampled data, so each component + * may be of a different size. + */ + if (need_full_buffer) { +#ifdef FULL_MAIN_BUFFER_SUPPORTED + /* Allocate a full-image virtual array for each component */ + /* Note we pad the bottom to a multiple of the iMCU height */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + mainp->whole_image[ci] = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + compptr->width_in_blocks * ((JDIMENSION) compptr->DCT_h_scaled_size), + ((JDIMENSION) jround_up((long) compptr->height_in_blocks, + (long) compptr->v_samp_factor)) * + ((JDIMENSION) cinfo->min_DCT_v_scaled_size), + (JDIMENSION) (compptr->v_samp_factor * compptr->DCT_v_scaled_size)); + } +#else + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif + } else { +#ifdef FULL_MAIN_BUFFER_SUPPORTED + mainp->whole_image[0] = NULL; /* flag for no virtual arrays */ +#endif + /* Allocate a strip buffer for each component */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + mainp->buffer[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + compptr->width_in_blocks * ((JDIMENSION) compptr->DCT_h_scaled_size), + (JDIMENSION) (compptr->v_samp_factor * compptr->DCT_v_scaled_size)); + } + } +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jcmarker.c b/widget/milsko/milskosrc/external/libjpeg/src/jcmarker.c new file mode 100644 index 0000000000..8874cd8670 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jcmarker.c @@ -0,0 +1,717 @@ +/* + * jcmarker.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * Modified 2003-2019 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write JPEG datastream markers. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +typedef enum { /* JPEG marker codes */ + M_SOF0 = 0xc0, + M_SOF1 = 0xc1, + M_SOF2 = 0xc2, + M_SOF3 = 0xc3, + + M_SOF5 = 0xc5, + M_SOF6 = 0xc6, + M_SOF7 = 0xc7, + + M_JPG = 0xc8, + M_SOF9 = 0xc9, + M_SOF10 = 0xca, + M_SOF11 = 0xcb, + + M_SOF13 = 0xcd, + M_SOF14 = 0xce, + M_SOF15 = 0xcf, + + M_DHT = 0xc4, + + M_DAC = 0xcc, + + M_RST0 = 0xd0, + M_RST1 = 0xd1, + M_RST2 = 0xd2, + M_RST3 = 0xd3, + M_RST4 = 0xd4, + M_RST5 = 0xd5, + M_RST6 = 0xd6, + M_RST7 = 0xd7, + + M_SOI = 0xd8, + M_EOI = 0xd9, + M_SOS = 0xda, + M_DQT = 0xdb, + M_DNL = 0xdc, + M_DRI = 0xdd, + M_DHP = 0xde, + M_EXP = 0xdf, + + M_APP0 = 0xe0, + M_APP1 = 0xe1, + M_APP2 = 0xe2, + M_APP3 = 0xe3, + M_APP4 = 0xe4, + M_APP5 = 0xe5, + M_APP6 = 0xe6, + M_APP7 = 0xe7, + M_APP8 = 0xe8, + M_APP9 = 0xe9, + M_APP10 = 0xea, + M_APP11 = 0xeb, + M_APP12 = 0xec, + M_APP13 = 0xed, + M_APP14 = 0xee, + M_APP15 = 0xef, + + M_JPG0 = 0xf0, + M_JPG8 = 0xf8, + M_JPG13 = 0xfd, + M_COM = 0xfe, + + M_TEM = 0x01, + + M_ERROR = 0x100 +} JPEG_MARKER; + + +/* Private state */ + +typedef struct { + struct jpeg_marker_writer pub; /* public fields */ + + unsigned int last_restart_interval; /* last DRI value emitted; 0 after SOI */ +} my_marker_writer; + +typedef my_marker_writer * my_marker_ptr; + + +/* + * Basic output routines. + * + * Note that we do not support suspension while writing a marker. + * Therefore, an application using suspension must ensure that there is + * enough buffer space for the initial markers (typ. 600-700 bytes) before + * calling jpeg_start_compress, and enough space to write the trailing EOI + * (a few bytes) before calling jpeg_finish_compress. Multipass compression + * modes are not supported at all with suspension, so those two are the only + * points where markers will be written. + */ + +LOCAL(void) +emit_byte (j_compress_ptr cinfo, int val) +/* Emit a byte */ +{ + struct jpeg_destination_mgr * dest = cinfo->dest; + + *(dest->next_output_byte)++ = (JOCTET) val; + if (--dest->free_in_buffer == 0) { + if (! (*dest->empty_output_buffer) (cinfo)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + } +} + + +LOCAL(void) +emit_marker (j_compress_ptr cinfo, JPEG_MARKER mark) +/* Emit a marker code */ +{ + emit_byte(cinfo, 0xFF); + emit_byte(cinfo, (int) mark); +} + + +LOCAL(void) +emit_2bytes (j_compress_ptr cinfo, int value) +/* Emit a 2-byte integer; these are always MSB first in JPEG files */ +{ + emit_byte(cinfo, (value >> 8) & 0xFF); + emit_byte(cinfo, value & 0xFF); +} + + +/* + * Routines to write specific marker types. + */ + +LOCAL(int) +emit_dqt (j_compress_ptr cinfo, int index) +/* Emit a DQT marker */ +/* Returns the precision used (0 = 8bits, 1 = 16bits) for baseline checking */ +{ + JQUANT_TBL * qtbl = cinfo->quant_tbl_ptrs[index]; + int prec; + int i; + + if (qtbl == NULL) + ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index); + + prec = 0; + for (i = 0; i <= cinfo->lim_Se; i++) { + if (qtbl->quantval[cinfo->natural_order[i]] > 255) + prec = 1; + } + + if (! qtbl->sent_table) { + emit_marker(cinfo, M_DQT); + + emit_2bytes(cinfo, + prec ? cinfo->lim_Se * 2 + 2 + 1 + 2 : cinfo->lim_Se + 1 + 1 + 2); + + emit_byte(cinfo, index + (prec<<4)); + + for (i = 0; i <= cinfo->lim_Se; i++) { + /* The table entries must be emitted in zigzag order. */ + unsigned int qval = qtbl->quantval[cinfo->natural_order[i]]; + if (prec) + emit_byte(cinfo, (int) (qval >> 8)); + emit_byte(cinfo, (int) (qval & 0xFF)); + } + + qtbl->sent_table = TRUE; + } + + return prec; +} + + +LOCAL(void) +emit_dht (j_compress_ptr cinfo, int index, boolean is_ac) +/* Emit a DHT marker */ +{ + JHUFF_TBL * htbl; + int length, i; + + if (is_ac) { + htbl = cinfo->ac_huff_tbl_ptrs[index]; + index += 0x10; /* output index has AC bit set */ + } else { + htbl = cinfo->dc_huff_tbl_ptrs[index]; + } + + if (htbl == NULL) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, index); + + if (! htbl->sent_table) { + emit_marker(cinfo, M_DHT); + + length = 0; + for (i = 1; i <= 16; i++) + length += htbl->bits[i]; + + emit_2bytes(cinfo, length + 2 + 1 + 16); + emit_byte(cinfo, index); + + for (i = 1; i <= 16; i++) + emit_byte(cinfo, htbl->bits[i]); + + for (i = 0; i < length; i++) + emit_byte(cinfo, htbl->huffval[i]); + + htbl->sent_table = TRUE; + } +} + + +LOCAL(void) +emit_dac (j_compress_ptr cinfo) +/* Emit a DAC marker */ +/* Since the useful info is so small, we want to emit all the tables in */ +/* one DAC marker. Therefore this routine does its own scan of the table. */ +{ +#ifdef C_ARITH_CODING_SUPPORTED + char dc_in_use[NUM_ARITH_TBLS]; + char ac_in_use[NUM_ARITH_TBLS]; + int length, i; + jpeg_component_info *compptr; + + for (i = 0; i < NUM_ARITH_TBLS; i++) + dc_in_use[i] = ac_in_use[i] = 0; + + for (i = 0; i < cinfo->comps_in_scan; i++) { + compptr = cinfo->cur_comp_info[i]; + /* DC needs no table for refinement scan */ + if (cinfo->Ss == 0 && cinfo->Ah == 0) + dc_in_use[compptr->dc_tbl_no] = 1; + /* AC needs no table when not present */ + if (cinfo->Se) + ac_in_use[compptr->ac_tbl_no] = 1; + } + + length = 0; + for (i = 0; i < NUM_ARITH_TBLS; i++) + length += dc_in_use[i] + ac_in_use[i]; + + if (length) { + emit_marker(cinfo, M_DAC); + + emit_2bytes(cinfo, length*2 + 2); + + for (i = 0; i < NUM_ARITH_TBLS; i++) { + if (dc_in_use[i]) { + emit_byte(cinfo, i); + emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i]<<4)); + } + if (ac_in_use[i]) { + emit_byte(cinfo, i + 0x10); + emit_byte(cinfo, cinfo->arith_ac_K[i]); + } + } + } +#endif /* C_ARITH_CODING_SUPPORTED */ +} + + +LOCAL(void) +emit_dri (j_compress_ptr cinfo) +/* Emit a DRI marker */ +{ + emit_marker(cinfo, M_DRI); + + emit_2bytes(cinfo, 4); /* fixed length */ + + emit_2bytes(cinfo, (int) cinfo->restart_interval); +} + + +LOCAL(void) +emit_lse_ict (j_compress_ptr cinfo) +/* Emit an LSE inverse color transform specification marker */ +{ + /* Support only 1 transform */ + if (cinfo->color_transform != JCT_SUBTRACT_GREEN || + cinfo->num_components < 3) + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + + emit_marker(cinfo, M_JPG8); + + emit_2bytes(cinfo, 24); /* fixed length */ + + emit_byte(cinfo, 0x0D); /* ID inverse transform specification */ + emit_2bytes(cinfo, MAXJSAMPLE); /* MAXTRANS */ + emit_byte(cinfo, 3); /* Nt=3 */ + emit_byte(cinfo, cinfo->comp_info[1].component_id); + emit_byte(cinfo, cinfo->comp_info[0].component_id); + emit_byte(cinfo, cinfo->comp_info[2].component_id); + emit_byte(cinfo, 0x80); /* F1: CENTER1=1, NORM1=0 */ + emit_2bytes(cinfo, 0); /* A(1,1)=0 */ + emit_2bytes(cinfo, 0); /* A(1,2)=0 */ + emit_byte(cinfo, 0); /* F2: CENTER2=0, NORM2=0 */ + emit_2bytes(cinfo, 1); /* A(2,1)=1 */ + emit_2bytes(cinfo, 0); /* A(2,2)=0 */ + emit_byte(cinfo, 0); /* F3: CENTER3=0, NORM3=0 */ + emit_2bytes(cinfo, 1); /* A(3,1)=1 */ + emit_2bytes(cinfo, 0); /* A(3,2)=0 */ +} + + +LOCAL(void) +emit_sof (j_compress_ptr cinfo, JPEG_MARKER code) +/* Emit a SOF marker */ +{ + int ci; + jpeg_component_info *compptr; + + emit_marker(cinfo, code); + + emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1); /* length */ + + /* Make sure image isn't bigger than SOF field can handle */ + if ((long) cinfo->jpeg_height > 65535L || + (long) cinfo->jpeg_width > 65535L) + ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) 65535); + + emit_byte(cinfo, cinfo->data_precision); + emit_2bytes(cinfo, (int) cinfo->jpeg_height); + emit_2bytes(cinfo, (int) cinfo->jpeg_width); + + emit_byte(cinfo, cinfo->num_components); + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + emit_byte(cinfo, compptr->component_id); + emit_byte(cinfo, (compptr->h_samp_factor << 4) + compptr->v_samp_factor); + emit_byte(cinfo, compptr->quant_tbl_no); + } +} + + +LOCAL(void) +emit_sos (j_compress_ptr cinfo) +/* Emit a SOS marker */ +{ + int i, td, ta; + jpeg_component_info *compptr; + + emit_marker(cinfo, M_SOS); + + emit_2bytes(cinfo, 2 * cinfo->comps_in_scan + 2 + 1 + 3); /* length */ + + emit_byte(cinfo, cinfo->comps_in_scan); + + for (i = 0; i < cinfo->comps_in_scan; i++) { + compptr = cinfo->cur_comp_info[i]; + emit_byte(cinfo, compptr->component_id); + + /* We emit 0 for unused field(s); this is recommended by the P&M text + * but does not seem to be specified in the standard. + */ + + /* DC needs no table for refinement scan */ + td = cinfo->Ss == 0 && cinfo->Ah == 0 ? compptr->dc_tbl_no : 0; + /* AC needs no table when not present */ + ta = cinfo->Se ? compptr->ac_tbl_no : 0; + + emit_byte(cinfo, (td << 4) + ta); + } + + emit_byte(cinfo, cinfo->Ss); + emit_byte(cinfo, cinfo->Se); + emit_byte(cinfo, (cinfo->Ah << 4) + cinfo->Al); +} + + +LOCAL(void) +emit_pseudo_sos (j_compress_ptr cinfo) +/* Emit a pseudo SOS marker */ +{ + emit_marker(cinfo, M_SOS); + + emit_2bytes(cinfo, 2 + 1 + 3); /* length */ + + emit_byte(cinfo, 0); /* Ns */ + + emit_byte(cinfo, 0); /* Ss */ + emit_byte(cinfo, cinfo->block_size * cinfo->block_size - 1); /* Se */ + emit_byte(cinfo, 0); /* Ah/Al */ +} + + +LOCAL(void) +emit_jfif_app0 (j_compress_ptr cinfo) +/* Emit a JFIF-compliant APP0 marker */ +{ + /* + * Length of APP0 block (2 bytes) + * Block ID (4 bytes - ASCII "JFIF") + * Zero byte (1 byte to terminate the ID string) + * Version Major, Minor (2 bytes - major first) + * Units (1 byte - 0x00 = none, 0x01 = inch, 0x02 = cm) + * Xdpu (2 bytes - dots per unit horizontal) + * Ydpu (2 bytes - dots per unit vertical) + * Thumbnail X size (1 byte) + * Thumbnail Y size (1 byte) + */ + + emit_marker(cinfo, M_APP0); + + emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1); /* length */ + + emit_byte(cinfo, 0x4A); /* Identifier: ASCII "JFIF" */ + emit_byte(cinfo, 0x46); + emit_byte(cinfo, 0x49); + emit_byte(cinfo, 0x46); + emit_byte(cinfo, 0); + emit_byte(cinfo, cinfo->JFIF_major_version); /* Version fields */ + emit_byte(cinfo, cinfo->JFIF_minor_version); + emit_byte(cinfo, cinfo->density_unit); /* Pixel size information */ + emit_2bytes(cinfo, (int) cinfo->X_density); + emit_2bytes(cinfo, (int) cinfo->Y_density); + emit_byte(cinfo, 0); /* No thumbnail image */ + emit_byte(cinfo, 0); +} + + +LOCAL(void) +emit_adobe_app14 (j_compress_ptr cinfo) +/* Emit an Adobe APP14 marker */ +{ + /* + * Length of APP14 block (2 bytes) + * Block ID (5 bytes - ASCII "Adobe") + * Version Number (2 bytes - currently 100) + * Flags0 (2 bytes - currently 0) + * Flags1 (2 bytes - currently 0) + * Color transform (1 byte) + * + * Although Adobe TN 5116 mentions Version = 101, all the Adobe files + * now in circulation seem to use Version = 100, so that's what we write. + * + * We write the color transform byte as 1 if the JPEG color space is + * YCbCr, 2 if it's YCCK, 0 otherwise. Adobe's definition has to do with + * whether the encoder performed a transformation, which is pretty useless. + */ + + emit_marker(cinfo, M_APP14); + + emit_2bytes(cinfo, 2 + 5 + 2 + 2 + 2 + 1); /* length */ + + emit_byte(cinfo, 0x41); /* Identifier: ASCII "Adobe" */ + emit_byte(cinfo, 0x64); + emit_byte(cinfo, 0x6F); + emit_byte(cinfo, 0x62); + emit_byte(cinfo, 0x65); + emit_2bytes(cinfo, 100); /* Version */ + emit_2bytes(cinfo, 0); /* Flags0 */ + emit_2bytes(cinfo, 0); /* Flags1 */ + switch (cinfo->jpeg_color_space) { + case JCS_YCbCr: + emit_byte(cinfo, 1); /* Color transform = 1 */ + break; + case JCS_YCCK: + emit_byte(cinfo, 2); /* Color transform = 2 */ + break; + default: + emit_byte(cinfo, 0); /* Color transform = 0 */ + } +} + + +/* + * These routines allow writing an arbitrary marker with parameters. + * The only intended use is to emit COM or APPn markers after calling + * write_file_header and before calling write_frame_header. + * Other uses are not guaranteed to produce desirable results. + * Counting the parameter bytes properly is the caller's responsibility. + */ + +METHODDEF(void) +write_marker_header (j_compress_ptr cinfo, int marker, unsigned int datalen) +/* Emit an arbitrary marker header */ +{ + if (datalen > (unsigned int) 65533) /* safety check */ + ERREXIT(cinfo, JERR_BAD_LENGTH); + + emit_marker(cinfo, (JPEG_MARKER) marker); + + emit_2bytes(cinfo, (int) (datalen + 2)); /* total length */ +} + +METHODDEF(void) +write_marker_byte (j_compress_ptr cinfo, int val) +/* Emit one byte of marker parameters following write_marker_header */ +{ + emit_byte(cinfo, val); +} + + +/* + * Write datastream header. + * This consists of an SOI and optional APPn markers. + * We recommend use of the JFIF marker, but not the Adobe marker, + * when using YCbCr or grayscale data. The JFIF marker is also used + * for other standard JPEG colorspaces. The Adobe marker is helpful + * to distinguish RGB, CMYK, and YCCK colorspaces. + * Note that an application can write additional header markers after + * jpeg_start_compress returns. + */ + +METHODDEF(void) +write_file_header (j_compress_ptr cinfo) +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + + emit_marker(cinfo, M_SOI); /* first the SOI */ + + /* SOI is defined to reset restart interval to 0 */ + marker->last_restart_interval = 0; + + if (cinfo->write_JFIF_header) /* next an optional JFIF APP0 */ + emit_jfif_app0(cinfo); + if (cinfo->write_Adobe_marker) /* next an optional Adobe APP14 */ + emit_adobe_app14(cinfo); +} + + +/* + * Write frame header. + * This consists of DQT and SOFn markers, + * a conditional LSE marker and a conditional pseudo SOS marker. + * Note that we do not emit the SOF until we have emitted the DQT(s). + * This avoids compatibility problems with incorrect implementations that + * try to error-check the quant table numbers as soon as they see the SOF. + */ + +METHODDEF(void) +write_frame_header (j_compress_ptr cinfo) +{ + int ci, prec; + boolean is_baseline; + jpeg_component_info *compptr; + + /* Emit DQT for each quantization table. + * Note that emit_dqt() suppresses any duplicate tables. + */ + prec = 0; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + prec += emit_dqt(cinfo, compptr->quant_tbl_no); + } + /* now prec is nonzero iff there are any 16-bit quant tables. */ + + /* Check for a non-baseline specification. + * Note we assume that Huffman table numbers won't be changed later. + */ + if (cinfo->arith_code || cinfo->progressive_mode || + cinfo->data_precision != 8 || cinfo->block_size != DCTSIZE) { + is_baseline = FALSE; + } else { + is_baseline = TRUE; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (compptr->dc_tbl_no > 1 || compptr->ac_tbl_no > 1) + is_baseline = FALSE; + } + if (prec && is_baseline) { + is_baseline = FALSE; + /* If it's baseline except for quantizer size, warn the user */ + TRACEMS(cinfo, 0, JTRC_16BIT_TABLES); + } + } + + /* Emit the proper SOF marker */ + if (cinfo->arith_code) { + if (cinfo->progressive_mode) + emit_sof(cinfo, M_SOF10); /* SOF code for progressive arithmetic */ + else + emit_sof(cinfo, M_SOF9); /* SOF code for sequential arithmetic */ + } else { + if (cinfo->progressive_mode) + emit_sof(cinfo, M_SOF2); /* SOF code for progressive Huffman */ + else if (is_baseline) + emit_sof(cinfo, M_SOF0); /* SOF code for baseline implementation */ + else + emit_sof(cinfo, M_SOF1); /* SOF code for non-baseline Huffman file */ + } + + /* Check to emit LSE inverse color transform specification marker */ + if (cinfo->color_transform) + emit_lse_ict(cinfo); + + /* Check to emit pseudo SOS marker */ + if (cinfo->progressive_mode && cinfo->block_size != DCTSIZE) + emit_pseudo_sos(cinfo); +} + + +/* + * Write scan header. + * This consists of DHT or DAC markers, optional DRI, and SOS. + * Compressed data will be written following the SOS. + */ + +METHODDEF(void) +write_scan_header (j_compress_ptr cinfo) +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + int i; + jpeg_component_info *compptr; + + if (cinfo->arith_code) { + /* Emit arith conditioning info. We may have some duplication + * if the file has multiple scans, but it's so small it's hardly + * worth worrying about. + */ + emit_dac(cinfo); + } else { + /* Emit Huffman tables. + * Note that emit_dht() suppresses any duplicate tables. + */ + for (i = 0; i < cinfo->comps_in_scan; i++) { + compptr = cinfo->cur_comp_info[i]; + /* DC needs no table for refinement scan */ + if (cinfo->Ss == 0 && cinfo->Ah == 0) + emit_dht(cinfo, compptr->dc_tbl_no, FALSE); + /* AC needs no table when not present */ + if (cinfo->Se) + emit_dht(cinfo, compptr->ac_tbl_no, TRUE); + } + } + + /* Emit DRI if required --- note that DRI value could change for each scan. + * We avoid wasting space with unnecessary DRIs, however. + */ + if (cinfo->restart_interval != marker->last_restart_interval) { + emit_dri(cinfo); + marker->last_restart_interval = cinfo->restart_interval; + } + + emit_sos(cinfo); +} + + +/* + * Write datastream trailer. + */ + +METHODDEF(void) +write_file_trailer (j_compress_ptr cinfo) +{ + emit_marker(cinfo, M_EOI); +} + + +/* + * Write an abbreviated table-specification datastream. + * This consists of SOI, DQT and DHT tables, and EOI. + * Any table that is defined and not marked sent_table = TRUE will be + * emitted. Note that all tables will be marked sent_table = TRUE at exit. + */ + +METHODDEF(void) +write_tables_only (j_compress_ptr cinfo) +{ + int i; + + emit_marker(cinfo, M_SOI); + + for (i = 0; i < NUM_QUANT_TBLS; i++) { + if (cinfo->quant_tbl_ptrs[i] != NULL) + (void) emit_dqt(cinfo, i); + } + + if (! cinfo->arith_code) { + for (i = 0; i < NUM_HUFF_TBLS; i++) { + if (cinfo->dc_huff_tbl_ptrs[i] != NULL) + emit_dht(cinfo, i, FALSE); + if (cinfo->ac_huff_tbl_ptrs[i] != NULL) + emit_dht(cinfo, i, TRUE); + } + } + + emit_marker(cinfo, M_EOI); +} + + +/* + * Initialize the marker writer module. + */ + +GLOBAL(void) +jinit_marker_writer (j_compress_ptr cinfo) +{ + my_marker_ptr marker; + + /* Create the subobject */ + marker = (my_marker_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_marker_writer)); + cinfo->marker = &marker->pub; + /* Initialize method pointers */ + marker->pub.write_file_header = write_file_header; + marker->pub.write_frame_header = write_frame_header; + marker->pub.write_scan_header = write_scan_header; + marker->pub.write_file_trailer = write_file_trailer; + marker->pub.write_tables_only = write_tables_only; + marker->pub.write_marker_header = write_marker_header; + marker->pub.write_marker_byte = write_marker_byte; + /* Initialize private state */ + marker->last_restart_interval = 0; +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jcmaster.c b/widget/milsko/milskosrc/external/libjpeg/src/jcmaster.c new file mode 100644 index 0000000000..a70af0c020 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jcmaster.c @@ -0,0 +1,675 @@ +/* + * jcmaster.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 2003-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains master control logic for the JPEG compressor. + * These routines are concerned with parameter validation, initial setup, + * and inter-pass control (determining the number of passes and the work + * to be done in each pass). + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private state */ + +typedef enum { + main_pass, /* input data, also do first output step */ + huff_opt_pass, /* Huffman code optimization pass */ + output_pass /* data output pass */ +} c_pass_type; + +typedef struct { + struct jpeg_comp_master pub; /* public fields */ + + c_pass_type pass_type; /* the type of the current pass */ + + int pass_number; /* # of passes completed */ + int total_passes; /* total # of passes needed */ + + int scan_number; /* current index in scan_info[] */ +} my_comp_master; + +typedef my_comp_master * my_master_ptr; + + +/* + * Support routines that do various essential calculations. + */ + +LOCAL(void) +initial_setup (j_compress_ptr cinfo) +/* Do computations that are needed before master selection phase */ +{ + int ci, ssize; + jpeg_component_info *compptr; + + /* Sanity check on block_size */ + if (cinfo->block_size < 1 || cinfo->block_size > 16) + ERREXIT2(cinfo, JERR_BAD_DCTSIZE, cinfo->block_size, cinfo->block_size); + + /* Derive natural_order from block_size */ + switch (cinfo->block_size) { + case 2: cinfo->natural_order = jpeg_natural_order2; break; + case 3: cinfo->natural_order = jpeg_natural_order3; break; + case 4: cinfo->natural_order = jpeg_natural_order4; break; + case 5: cinfo->natural_order = jpeg_natural_order5; break; + case 6: cinfo->natural_order = jpeg_natural_order6; break; + case 7: cinfo->natural_order = jpeg_natural_order7; break; + default: cinfo->natural_order = jpeg_natural_order; + } + + /* Derive lim_Se from block_size */ + cinfo->lim_Se = cinfo->block_size < DCTSIZE ? + cinfo->block_size * cinfo->block_size - 1 : DCTSIZE2-1; + + /* Sanity check on image dimensions */ + if (cinfo->jpeg_height <= 0 || cinfo->jpeg_width <= 0 || + cinfo->num_components <= 0) + ERREXIT(cinfo, JERR_EMPTY_IMAGE); + + /* Make sure image isn't bigger than I can handle */ + if ((long) cinfo->jpeg_height > (long) JPEG_MAX_DIMENSION || + (long) cinfo->jpeg_width > (long) JPEG_MAX_DIMENSION) + ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION); + + /* Only 8 to 12 bits data precision are supported for DCT based JPEG */ + if (cinfo->data_precision < 8 || cinfo->data_precision > 12) + ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); + + /* Check that number of components won't exceed internal array sizes */ + if (cinfo->num_components > MAX_COMPONENTS) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPONENTS); + + /* Compute maximum sampling factors; check factor validity */ + cinfo->max_h_samp_factor = 1; + cinfo->max_v_samp_factor = 1; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR || + compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR) + ERREXIT(cinfo, JERR_BAD_SAMPLING); + cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor, + compptr->h_samp_factor); + cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor, + compptr->v_samp_factor); + } + + /* Compute dimensions of components */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Fill in the correct component_index value; don't rely on application */ + compptr->component_index = ci; + /* In selecting the actual DCT scaling for each component, we try to + * scale down the chroma components via DCT scaling rather than downsampling. + * This saves time if the downsampler gets to use 1:1 scaling. + * Note this code adapts subsampling ratios which are powers of 2. + */ + ssize = 1; +#ifdef DCT_SCALING_SUPPORTED + if (! cinfo->raw_data_in) + while (cinfo->min_DCT_h_scaled_size * ssize <= + (cinfo->do_fancy_downsampling ? DCTSIZE : DCTSIZE / 2) && + (cinfo->max_h_samp_factor % (compptr->h_samp_factor * ssize * 2)) == + 0) { + ssize = ssize * 2; + } +#endif + compptr->DCT_h_scaled_size = cinfo->min_DCT_h_scaled_size * ssize; + ssize = 1; +#ifdef DCT_SCALING_SUPPORTED + if (! cinfo->raw_data_in) + while (cinfo->min_DCT_v_scaled_size * ssize <= + (cinfo->do_fancy_downsampling ? DCTSIZE : DCTSIZE / 2) && + (cinfo->max_v_samp_factor % (compptr->v_samp_factor * ssize * 2)) == + 0) { + ssize = ssize * 2; + } +#endif + compptr->DCT_v_scaled_size = cinfo->min_DCT_v_scaled_size * ssize; + + /* We don't support DCT ratios larger than 2. */ + if (compptr->DCT_h_scaled_size > compptr->DCT_v_scaled_size * 2) + compptr->DCT_h_scaled_size = compptr->DCT_v_scaled_size * 2; + else if (compptr->DCT_v_scaled_size > compptr->DCT_h_scaled_size * 2) + compptr->DCT_v_scaled_size = compptr->DCT_h_scaled_size * 2; + + /* Size in DCT blocks */ + compptr->width_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->jpeg_width * (long) compptr->h_samp_factor, + (long) (cinfo->max_h_samp_factor * cinfo->block_size)); + compptr->height_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->jpeg_height * (long) compptr->v_samp_factor, + (long) (cinfo->max_v_samp_factor * cinfo->block_size)); + /* Size in samples */ + compptr->downsampled_width = (JDIMENSION) + jdiv_round_up((long) cinfo->jpeg_width * + (long) (compptr->h_samp_factor * compptr->DCT_h_scaled_size), + (long) (cinfo->max_h_samp_factor * cinfo->block_size)); + compptr->downsampled_height = (JDIMENSION) + jdiv_round_up((long) cinfo->jpeg_height * + (long) (compptr->v_samp_factor * compptr->DCT_v_scaled_size), + (long) (cinfo->max_v_samp_factor * cinfo->block_size)); + /* Don't need quantization scale after DCT, + * until color conversion says otherwise. + */ + compptr->component_needed = FALSE; + } + + /* Compute number of fully interleaved MCU rows (number of times that + * main controller will call coefficient controller). + */ + cinfo->total_iMCU_rows = (JDIMENSION) + jdiv_round_up((long) cinfo->jpeg_height, + (long) (cinfo->max_v_samp_factor * cinfo->block_size)); +} + + +#ifdef C_MULTISCAN_FILES_SUPPORTED + +LOCAL(void) +validate_script (j_compress_ptr cinfo) +/* Verify that the scan script in cinfo->scan_info[] is valid; also + * determine whether it uses progressive JPEG, and set cinfo->progressive_mode. + */ +{ + const jpeg_scan_info * scanptr; + int scanno, ncomps, ci, coefi, thisi; + int Ss, Se, Ah, Al; + boolean component_sent[MAX_COMPONENTS]; +#ifdef C_PROGRESSIVE_SUPPORTED + int * last_bitpos_ptr; + int last_bitpos[MAX_COMPONENTS][DCTSIZE2]; + /* -1 until that coefficient has been seen; then last Al for it */ +#endif + + if (cinfo->num_scans <= 0) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, 0); + + /* For sequential JPEG, all scans must have Ss=0, Se=DCTSIZE2-1; + * for progressive JPEG, no scan can have this. + */ + scanptr = cinfo->scan_info; + if (scanptr->Ss != 0 || scanptr->Se != DCTSIZE2-1) { +#ifdef C_PROGRESSIVE_SUPPORTED + cinfo->progressive_mode = TRUE; + last_bitpos_ptr = & last_bitpos[0][0]; + for (ci = 0; ci < cinfo->num_components; ci++) + for (coefi = 0; coefi < DCTSIZE2; coefi++) + *last_bitpos_ptr++ = -1; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + cinfo->progressive_mode = FALSE; + for (ci = 0; ci < cinfo->num_components; ci++) + component_sent[ci] = FALSE; + } + + for (scanno = 1; scanno <= cinfo->num_scans; scanptr++, scanno++) { + /* Validate component indexes */ + ncomps = scanptr->comps_in_scan; + if (ncomps <= 0 || ncomps > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, ncomps, MAX_COMPS_IN_SCAN); + for (ci = 0; ci < ncomps; ci++) { + thisi = scanptr->component_index[ci]; + if (thisi < 0 || thisi >= cinfo->num_components) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); + /* Components must appear in SOF order within each scan */ + if (ci > 0 && thisi <= scanptr->component_index[ci-1]) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); + } + /* Validate progression parameters */ + Ss = scanptr->Ss; + Se = scanptr->Se; + Ah = scanptr->Ah; + Al = scanptr->Al; + if (cinfo->progressive_mode) { +#ifdef C_PROGRESSIVE_SUPPORTED + /* The JPEG spec simply gives the ranges 0..13 for Ah and Al, but that + * seems wrong: the upper bound ought to depend on data precision. + * Perhaps they really meant 0..N+1 for N-bit precision. + * Here we allow 0..10 for 8-bit data; Al larger than 10 results in + * out-of-range reconstructed DC values during the first DC scan, + * which might cause problems for some decoders. + */ + if (Ss < 0 || Ss >= DCTSIZE2 || Se < Ss || Se >= DCTSIZE2 || + Ah < 0 || Ah > (cinfo->data_precision > 8 ? 13 : 10) || + Al < 0 || Al > (cinfo->data_precision > 8 ? 13 : 10)) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + if (Ss == 0) { + if (Se != 0) /* DC and AC together not OK */ + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } else { + if (ncomps != 1) /* AC scans must be for only one component */ + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } + for (ci = 0; ci < ncomps; ci++) { + last_bitpos_ptr = & last_bitpos[scanptr->component_index[ci]][0]; + if (Ss != 0 && last_bitpos_ptr[0] < 0) /* AC without prior DC scan */ + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + for (coefi = Ss; coefi <= Se; coefi++) { + if (last_bitpos_ptr[coefi] < 0) { + /* first scan of this coefficient */ + if (Ah != 0) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } else { + /* not first scan */ + if (Ah != last_bitpos_ptr[coefi] || Al != Ah-1) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } + last_bitpos_ptr[coefi] = Al; + } + } +#endif + } else { + /* For sequential JPEG, all progression parameters must be these: */ + if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + /* Make sure components are not sent twice */ + for (ci = 0; ci < ncomps; ci++) { + thisi = scanptr->component_index[ci]; + if (component_sent[thisi]) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); + component_sent[thisi] = TRUE; + } + } + } + + /* Now verify that everything got sent. */ + if (cinfo->progressive_mode) { +#ifdef C_PROGRESSIVE_SUPPORTED + /* For progressive mode, we only check that at least some DC data + * got sent for each component; the spec does not require that all bits + * of all coefficients be transmitted. Would it be wiser to enforce + * transmission of all coefficient bits?? + */ + for (ci = 0; ci < cinfo->num_components; ci++) { + if (last_bitpos[ci][0] < 0) + ERREXIT(cinfo, JERR_MISSING_DATA); + } +#endif + } else { + for (ci = 0; ci < cinfo->num_components; ci++) { + if (! component_sent[ci]) + ERREXIT(cinfo, JERR_MISSING_DATA); + } + } +} + + +LOCAL(void) +reduce_script (j_compress_ptr cinfo) +/* Adapt scan script for use with reduced block size; + * assume that script has been validated before. + */ +{ + jpeg_scan_info * scanptr; + int idxout, idxin; + + /* Circumvent const declaration for this function */ + scanptr = (jpeg_scan_info *) cinfo->scan_info; + idxout = 0; + + for (idxin = 0; idxin < cinfo->num_scans; idxin++) { + /* After skipping, idxout becomes smaller than idxin */ + if (idxin != idxout) + /* Copy rest of data; + * note we stay in given chunk of allocated memory. + */ + scanptr[idxout] = scanptr[idxin]; + if (scanptr[idxout].Ss > cinfo->lim_Se) + /* Entire scan out of range - skip this entry */ + continue; + if (scanptr[idxout].Se > cinfo->lim_Se) + /* Limit scan to end of block */ + scanptr[idxout].Se = cinfo->lim_Se; + idxout++; + } + + cinfo->num_scans = idxout; +} + +#endif /* C_MULTISCAN_FILES_SUPPORTED */ + + +LOCAL(void) +select_scan_parameters (j_compress_ptr cinfo) +/* Set up the scan parameters for the current scan */ +{ + int ci; + +#ifdef C_MULTISCAN_FILES_SUPPORTED + if (cinfo->scan_info != NULL) { + /* Prepare for current scan --- the script is already validated */ + my_master_ptr master = (my_master_ptr) cinfo->master; + const jpeg_scan_info * scanptr = cinfo->scan_info + master->scan_number; + + cinfo->comps_in_scan = scanptr->comps_in_scan; + for (ci = 0; ci < scanptr->comps_in_scan; ci++) { + cinfo->cur_comp_info[ci] = + &cinfo->comp_info[scanptr->component_index[ci]]; + } + if (cinfo->progressive_mode) { + cinfo->Ss = scanptr->Ss; + cinfo->Se = scanptr->Se; + cinfo->Ah = scanptr->Ah; + cinfo->Al = scanptr->Al; + return; + } + } + else +#endif + { + /* Prepare for single sequential-JPEG scan containing all components */ + if (cinfo->num_components > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPS_IN_SCAN); + cinfo->comps_in_scan = cinfo->num_components; + for (ci = 0; ci < cinfo->num_components; ci++) { + cinfo->cur_comp_info[ci] = &cinfo->comp_info[ci]; + } + } + cinfo->Ss = 0; + cinfo->Se = cinfo->block_size * cinfo->block_size - 1; + cinfo->Ah = 0; + cinfo->Al = 0; +} + + +LOCAL(void) +per_scan_setup (j_compress_ptr cinfo) +/* Do computations that are needed before processing a JPEG scan */ +/* cinfo->comps_in_scan and cinfo->cur_comp_info[] are already set */ +{ + int ci, mcublks, tmp; + jpeg_component_info *compptr; + + if (cinfo->comps_in_scan == 1) { + + /* Noninterleaved (single-component) scan */ + compptr = cinfo->cur_comp_info[0]; + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = compptr->width_in_blocks; + cinfo->MCU_rows_in_scan = compptr->height_in_blocks; + + /* For noninterleaved scan, always one block per MCU */ + compptr->MCU_width = 1; + compptr->MCU_height = 1; + compptr->MCU_blocks = 1; + compptr->MCU_sample_width = compptr->DCT_h_scaled_size; + compptr->last_col_width = 1; + /* For noninterleaved scans, it is convenient to define last_row_height + * as the number of block rows present in the last iMCU row. + */ + tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (tmp == 0) tmp = compptr->v_samp_factor; + compptr->last_row_height = tmp; + + /* Prepare array describing MCU composition */ + cinfo->blocks_in_MCU = 1; + cinfo->MCU_membership[0] = 0; + + } else { + + /* Interleaved (multi-component) scan */ + if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan, + MAX_COMPS_IN_SCAN); + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = (JDIMENSION) + jdiv_round_up((long) cinfo->jpeg_width, + (long) (cinfo->max_h_samp_factor * cinfo->block_size)); + cinfo->MCU_rows_in_scan = cinfo->total_iMCU_rows; + + cinfo->blocks_in_MCU = 0; + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Sampling factors give # of blocks of component in each MCU */ + compptr->MCU_width = compptr->h_samp_factor; + compptr->MCU_height = compptr->v_samp_factor; + compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height; + compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_h_scaled_size; + /* Figure number of non-dummy blocks in last MCU column & row */ + tmp = (int) (compptr->width_in_blocks % compptr->MCU_width); + if (tmp == 0) tmp = compptr->MCU_width; + compptr->last_col_width = tmp; + tmp = (int) (compptr->height_in_blocks % compptr->MCU_height); + if (tmp == 0) tmp = compptr->MCU_height; + compptr->last_row_height = tmp; + /* Prepare array describing MCU composition */ + mcublks = compptr->MCU_blocks; + if (cinfo->blocks_in_MCU + mcublks > C_MAX_BLOCKS_IN_MCU) + ERREXIT(cinfo, JERR_BAD_MCU_SIZE); + while (mcublks-- > 0) { + cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci; + } + } + + } + + /* Convert restart specified in rows to actual MCU count. */ + /* Note that count must fit in 16 bits, so we provide limiting. */ + if (cinfo->restart_in_rows > 0) { + long nominal = (long) cinfo->restart_in_rows * (long) cinfo->MCUs_per_row; + cinfo->restart_interval = (unsigned int) MIN(nominal, 65535L); + } +} + + +/* + * Per-pass setup. + * This is called at the beginning of each pass. We determine which modules + * will be active during this pass and give them appropriate start_pass calls. + * We also set is_last_pass to indicate whether any more passes will be + * required. + */ + +METHODDEF(void) +prepare_for_pass (j_compress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + switch (master->pass_type) { + case main_pass: + /* Initial pass: will collect input data, and do either Huffman + * optimization or data output for the first scan. + */ + select_scan_parameters(cinfo); + per_scan_setup(cinfo); + if (! cinfo->raw_data_in) { + (*cinfo->cconvert->start_pass) (cinfo); + (*cinfo->downsample->start_pass) (cinfo); + (*cinfo->prep->start_pass) (cinfo, JBUF_PASS_THRU); + } + (*cinfo->fdct->start_pass) (cinfo); + (*cinfo->entropy->start_pass) (cinfo, cinfo->optimize_coding); + (*cinfo->coef->start_pass) (cinfo, + (master->total_passes > 1 ? + JBUF_SAVE_AND_PASS : JBUF_PASS_THRU)); + (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU); + if (cinfo->optimize_coding) { + /* No immediate data output; postpone writing frame/scan headers */ + master->pub.call_pass_startup = FALSE; + } else { + /* Will write frame/scan headers at first jpeg_write_scanlines call */ + master->pub.call_pass_startup = TRUE; + } + break; +#ifdef ENTROPY_OPT_SUPPORTED + case huff_opt_pass: + /* Do Huffman optimization for a scan after the first one. */ + select_scan_parameters(cinfo); + per_scan_setup(cinfo); + if (cinfo->Ss != 0 || cinfo->Ah == 0) { + (*cinfo->entropy->start_pass) (cinfo, TRUE); + (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST); + master->pub.call_pass_startup = FALSE; + break; + } + /* Special case: Huffman DC refinement scans need no Huffman table + * and therefore we can skip the optimization pass for them. + */ + master->pass_type = output_pass; + master->pass_number++; + /*FALLTHROUGH*/ +#endif + case output_pass: + /* Do a data-output pass. */ + /* We need not repeat per-scan setup if prior optimization pass did it. */ + if (! cinfo->optimize_coding) { + select_scan_parameters(cinfo); + per_scan_setup(cinfo); + } + (*cinfo->entropy->start_pass) (cinfo, FALSE); + (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST); + /* We emit frame/scan headers now */ + if (master->scan_number == 0) + (*cinfo->marker->write_frame_header) (cinfo); + (*cinfo->marker->write_scan_header) (cinfo); + master->pub.call_pass_startup = FALSE; + break; + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + } + + master->pub.is_last_pass = (master->pass_number == master->total_passes-1); + + /* Set up progress monitor's pass info if present */ + if (cinfo->progress != NULL) { + cinfo->progress->completed_passes = master->pass_number; + cinfo->progress->total_passes = master->total_passes; + } +} + + +/* + * Special start-of-pass hook. + * This is called by jpeg_write_scanlines if call_pass_startup is TRUE. + * In single-pass processing, we need this hook because we don't want to + * write frame/scan headers during jpeg_start_compress; we want to let the + * application write COM markers etc. between jpeg_start_compress and the + * jpeg_write_scanlines loop. + * In multi-pass processing, this routine is not used. + */ + +METHODDEF(void) +pass_startup (j_compress_ptr cinfo) +{ + cinfo->master->call_pass_startup = FALSE; /* reset flag so call only once */ + + (*cinfo->marker->write_frame_header) (cinfo); + (*cinfo->marker->write_scan_header) (cinfo); +} + + +/* + * Finish up at end of pass. + */ + +METHODDEF(void) +finish_pass_master (j_compress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + /* The entropy coder always needs an end-of-pass call, + * either to analyze statistics or to flush its output buffer. + */ + (*cinfo->entropy->finish_pass) (cinfo); + + /* Update state for next pass */ + switch (master->pass_type) { + case main_pass: + /* next pass is either output of scan 0 (after optimization) + * or output of scan 1 (if no optimization). + */ + master->pass_type = output_pass; + if (! cinfo->optimize_coding) + master->scan_number++; + break; + case huff_opt_pass: + /* next pass is always output of current scan */ + master->pass_type = output_pass; + break; + case output_pass: + /* next pass is either optimization or output of next scan */ + if (cinfo->optimize_coding) + master->pass_type = huff_opt_pass; + master->scan_number++; + break; + } + + master->pass_number++; +} + + +/* + * Initialize master compression control. + */ + +GLOBAL(void) +jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only) +{ + my_master_ptr master; + + master = (my_master_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_comp_master)); + cinfo->master = &master->pub; + master->pub.prepare_for_pass = prepare_for_pass; + master->pub.pass_startup = pass_startup; + master->pub.finish_pass = finish_pass_master; + master->pub.is_last_pass = FALSE; + + /* Validate parameters, determine derived values */ + initial_setup(cinfo); + + if (cinfo->scan_info != NULL) { +#ifdef C_MULTISCAN_FILES_SUPPORTED + validate_script(cinfo); + if (cinfo->block_size < DCTSIZE) + reduce_script(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + cinfo->progressive_mode = FALSE; + cinfo->num_scans = 1; + } + + if (cinfo->optimize_coding) + cinfo->arith_code = FALSE; /* disable arithmetic coding */ + else if (! cinfo->arith_code && + (cinfo->progressive_mode || + (cinfo->block_size > 1 && cinfo->block_size < DCTSIZE))) + /* TEMPORARY HACK ??? */ + /* assume default tables no good for progressive or reduced AC mode */ + cinfo->optimize_coding = TRUE; /* force Huffman optimization */ + + /* Initialize my private state */ + if (transcode_only) { + /* no main pass in transcoding */ + if (cinfo->optimize_coding) + master->pass_type = huff_opt_pass; + else + master->pass_type = output_pass; + } else { + /* for normal compression, first pass is always this type: */ + master->pass_type = main_pass; + } + master->scan_number = 0; + master->pass_number = 0; + if (cinfo->optimize_coding) + master->total_passes = cinfo->num_scans * 2; + else + master->total_passes = cinfo->num_scans; +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jcomapi.c b/widget/milsko/milskosrc/external/libjpeg/src/jcomapi.c new file mode 100644 index 0000000000..678c5d12d0 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jcomapi.c @@ -0,0 +1,244 @@ +/* + * jcomapi.c + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * Modified 2019 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface routines that are used for both + * compression and decompression. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Abort processing of a JPEG compression or decompression operation, + * but don't destroy the object itself. + * + * For this, we merely clean up all the nonpermanent memory pools. + * Note that temp files (virtual arrays) are not allowed to belong to + * the permanent pool, so we will be able to close all temp files here. + * Closing a data source or destination, if necessary, is the application's + * responsibility. + */ + +GLOBAL(void) +jpeg_abort (j_common_ptr cinfo) +{ + int pool; + + /* Do nothing if called on a not-initialized or destroyed JPEG object. */ + if (cinfo->mem == NULL) + return; + + /* Releasing pools in reverse order might help avoid fragmentation + * with some (brain-damaged) malloc libraries. + */ + for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) { + (*cinfo->mem->free_pool) (cinfo, pool); + } + + /* Reset overall state for possible reuse of object */ + if (cinfo->is_decompressor) { + cinfo->global_state = DSTATE_START; + /* Try to keep application from accessing now-deleted marker list. + * A bit kludgy to do it here, but this is the most central place. + */ + ((j_decompress_ptr) cinfo)->marker_list = NULL; + } else { + cinfo->global_state = CSTATE_START; + } +} + + +/* + * Destruction of a JPEG object. + * + * Everything gets deallocated except the master jpeg_compress_struct itself + * and the error manager struct. Both of these are supplied by the application + * and must be freed, if necessary, by the application. (Often they are on + * the stack and so don't need to be freed anyway.) + * Closing a data source or destination, if necessary, is the application's + * responsibility. + */ + +GLOBAL(void) +jpeg_destroy (j_common_ptr cinfo) +{ + /* We need only tell the memory manager to release everything. */ + /* NB: mem pointer is NULL if memory mgr failed to initialize. */ + if (cinfo->mem != NULL) + (*cinfo->mem->self_destruct) (cinfo); + cinfo->mem = NULL; /* be safe if jpeg_destroy is called twice */ + cinfo->global_state = 0; /* mark it destroyed */ +} + + +/* + * Convenience routines for allocating quantization and Huffman tables. + * (Would jutils.c be a more reasonable place to put these?) + */ + +GLOBAL(JQUANT_TBL *) +jpeg_alloc_quant_table (j_common_ptr cinfo) +{ + JQUANT_TBL *tbl; + + tbl = (JQUANT_TBL *) + (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JQUANT_TBL)); + tbl->sent_table = FALSE; /* make sure this is false in any new table */ + return tbl; +} + + +GLOBAL(JHUFF_TBL *) +jpeg_alloc_huff_table (j_common_ptr cinfo) +{ + JHUFF_TBL *tbl; + + tbl = (JHUFF_TBL *) + (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JHUFF_TBL)); + tbl->sent_table = FALSE; /* make sure this is false in any new table */ + return tbl; +} + + +/* + * Set up the standard Huffman tables (cf. JPEG standard section K.3). + * IMPORTANT: these are only valid for 8-bit data precision! + * (Would jutils.c be a more reasonable place to put this?) + */ + +GLOBAL(JHUFF_TBL *) +jpeg_std_huff_table (j_common_ptr cinfo, boolean isDC, int tblno) +{ + JHUFF_TBL **htblptr, *htbl; + const UINT8 *bits, *val; + int nsymbols, len; + + static const UINT8 bits_dc_luminance[17] = + { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }; + static const UINT8 val_dc_luminance[] = + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + + static const UINT8 bits_dc_chrominance[17] = + { /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; + static const UINT8 val_dc_chrominance[] = + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + + static const UINT8 bits_ac_luminance[17] = + { /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d }; + static const UINT8 val_ac_luminance[] = + { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, + 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, + 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, + 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, + 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, + 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, + 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, + 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, + 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, + 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, + 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, + 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, + 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, + 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2, + 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, + 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, + 0xf9, 0xfa }; + + static const UINT8 bits_ac_chrominance[17] = + { /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 }; + static const UINT8 val_ac_chrominance[] = + { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, + 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, + 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, + 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, + 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, + 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26, + 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, + 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, + 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, + 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, + 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, + 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, + 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, + 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, + 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, + 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, + 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, + 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, + 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, + 0xf9, 0xfa }; + + if (cinfo->is_decompressor) { + if (isDC) + htblptr = ((j_decompress_ptr) cinfo)->dc_huff_tbl_ptrs; + else + htblptr = ((j_decompress_ptr) cinfo)->ac_huff_tbl_ptrs; + } else { + if (isDC) + htblptr = ((j_compress_ptr) cinfo)->dc_huff_tbl_ptrs; + else + htblptr = ((j_compress_ptr) cinfo)->ac_huff_tbl_ptrs; + } + + switch (tblno) { + case 0: + if (isDC) { + bits = bits_dc_luminance; + val = val_dc_luminance; + } else { + bits = bits_ac_luminance; + val = val_ac_luminance; + } + break; + case 1: + if (isDC) { + bits = bits_dc_chrominance; + val = val_dc_chrominance; + } else { + bits = bits_ac_chrominance; + val = val_ac_chrominance; + } + break; + default: + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); + return NULL; /* avoid compiler warnings for uninitialized variables */ + } + + if (htblptr[tblno] == NULL) + htblptr[tblno] = jpeg_alloc_huff_table(cinfo); + + htbl = htblptr[tblno]; + + /* Copy the number-of-symbols-of-each-code-length counts */ + MEMCOPY(htbl->bits, bits, SIZEOF(htbl->bits)); + + /* Validate the counts. We do this here mainly so we can copy the right + * number of symbols from the val[] array, without risking marching off + * the end of memory. jxhuff.c will do a more thorough test later. + */ + nsymbols = 0; + for (len = 1; len <= 16; len++) + nsymbols += bits[len]; + if (nsymbols > 256) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + + if (nsymbols > 0) + MEMCOPY(htbl->huffval, val, nsymbols * SIZEOF(UINT8)); + + /* Initialize sent_table FALSE so table will be written to JPEG file. */ + htbl->sent_table = FALSE; + + return htbl; +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jcparam.c b/widget/milsko/milskosrc/external/libjpeg/src/jcparam.c new file mode 100644 index 0000000000..261ae86ca0 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jcparam.c @@ -0,0 +1,591 @@ +/* + * jcparam.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * Modified 2003-2022 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains optional default-setting code for the JPEG compressor. + * Applications do not have to use this file, but those that don't use it + * must know a lot more about the innards of the JPEG code. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Quantization table setup routines + */ + +GLOBAL(void) +jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, boolean force_baseline) +/* Define a quantization table equal to the basic_table times + * a scale factor (given as a percentage). + * If force_baseline is TRUE, the computed quantization table entries + * are limited to 1..255 for JPEG baseline compatibility. + */ +{ + JQUANT_TBL ** qtblptr; + int i; + long temp; + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + if (which_tbl < 0 || which_tbl >= NUM_QUANT_TBLS) + ERREXIT1(cinfo, JERR_DQT_INDEX, which_tbl); + + qtblptr = & cinfo->quant_tbl_ptrs[which_tbl]; + + if (*qtblptr == NULL) + *qtblptr = jpeg_alloc_quant_table((j_common_ptr) cinfo); + + for (i = 0; i < DCTSIZE2; i++) { + temp = ((long) basic_table[i] * scale_factor + 50L) / 100L; + /* limit the values to the valid range */ + if (temp <= 0L) temp = 1L; + if (temp > 32767L) temp = 32767L; /* max quantizer needed for 12 bits */ + if (force_baseline && temp > 255L) + temp = 255L; /* limit to baseline range if requested */ + (*qtblptr)->quantval[i] = (UINT16) temp; + } + + /* Initialize sent_table FALSE so table will be written to JPEG file. */ + (*qtblptr)->sent_table = FALSE; +} + + +/* These are the sample quantization tables given in JPEG spec section K.1. + * NOTE: chrominance DC value is changed from 17 to 16 for lossless support. + * The spec says that the values given produce "good" quality, + * and when divided by 2, "very good" quality. + */ +static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = { + 16, 11, 10, 16, 24, 40, 51, 61, + 12, 12, 14, 19, 26, 58, 60, 55, + 14, 13, 16, 24, 40, 57, 69, 56, + 14, 17, 22, 29, 51, 87, 80, 62, + 18, 22, 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 unsigned int std_chrominance_quant_tbl[DCTSIZE2] = { + 16, 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 +}; + + +GLOBAL(void) +jpeg_default_qtables (j_compress_ptr cinfo, boolean force_baseline) +/* Set or change the 'quality' (quantization) setting, using default tables + * and straight percentage-scaling quality scales. + * This entry point allows different scalings for luminance and chrominance. + */ +{ + /* Set up two quantization tables using the specified scaling */ + jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl, + cinfo->q_scale_factor[0], force_baseline); + jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl, + cinfo->q_scale_factor[1], force_baseline); +} + + +GLOBAL(void) +jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor, + boolean force_baseline) +/* Set or change the 'quality' (quantization) setting, using default tables + * and a straight percentage-scaling quality scale. In most cases it's better + * to use jpeg_set_quality (below); this entry point is provided for + * applications that insist on a linear percentage scaling. + */ +{ + /* Set up two quantization tables using the specified scaling */ + jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl, + scale_factor, force_baseline); + jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl, + scale_factor, force_baseline); +} + + +GLOBAL(int) +jpeg_quality_scaling (int quality) +/* Convert a user-specified quality rating to a percentage scaling factor + * for an underlying quantization table, using our recommended scaling curve. + * The input 'quality' factor should be 0 (terrible) to 100 (very good). + */ +{ + /* Safety limit on quality factor. Convert 0 to 1 to avoid zero divide. */ + if (quality <= 0) quality = 1; + if (quality > 100) quality = 100; + + /* The basic table is used as-is (scaling 100) for a quality of 50. + * Qualities 50..100 are converted to scaling percentage 200 - 2*Q; + * note that at Q=100 the scaling is 0, which will cause jpeg_add_quant_table + * to make all the table entries 1 (hence, minimum quantization loss). + * Qualities 1..50 are converted to scaling percentage 5000/Q. + */ + if (quality < 50) + quality = 5000 / quality; + else + quality = 200 - quality*2; + + return quality; +} + + +GLOBAL(void) +jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline) +/* Set or change the 'quality' (quantization) setting, using default tables. + * This is the standard quality-adjusting entry point for typical user + * interfaces; only those who want detailed control over quantization tables + * would use the preceding routines directly. + */ +{ + /* Convert user 0-100 rating to percentage scaling */ + quality = jpeg_quality_scaling(quality); + + /* Set up standard quality tables */ + jpeg_set_linear_quality(cinfo, quality, force_baseline); +} + + +/* + * Reset standard Huffman tables + */ + +LOCAL(void) +std_huff_tables (j_compress_ptr cinfo) +{ + if (cinfo->dc_huff_tbl_ptrs[0] != NULL) + (void) jpeg_std_huff_table((j_common_ptr) cinfo, TRUE, 0); + + if (cinfo->ac_huff_tbl_ptrs[0] != NULL) + (void) jpeg_std_huff_table((j_common_ptr) cinfo, FALSE, 0); + + if (cinfo->dc_huff_tbl_ptrs[1] != NULL) + (void) jpeg_std_huff_table((j_common_ptr) cinfo, TRUE, 1); + + if (cinfo->ac_huff_tbl_ptrs[1] != NULL) + (void) jpeg_std_huff_table((j_common_ptr) cinfo, FALSE, 1); +} + + +/* + * Default parameter setup for compression. + * + * Applications that don't choose to use this routine must do their + * own setup of all these parameters. Alternately, you can call this + * to establish defaults and then alter parameters selectively. This + * is the recommended approach since, if we add any new parameters, + * your code will still work (they'll be set to reasonable defaults). + */ + +GLOBAL(void) +jpeg_set_defaults (j_compress_ptr cinfo) +{ + int i; + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* Allocate comp_info array large enough for maximum component count. + * Array is made permanent in case application wants to compress + * multiple images at same param settings. + */ + if (cinfo->comp_info == NULL) + cinfo->comp_info = (jpeg_component_info *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + MAX_COMPONENTS * SIZEOF(jpeg_component_info)); + + /* Initialize everything not dependent on the color space */ + + cinfo->scale_num = 1; /* 1:1 scaling */ + cinfo->scale_denom = 1; + cinfo->data_precision = BITS_IN_JSAMPLE; + /* Set up two quantization tables using default quality of 75 */ + jpeg_set_quality(cinfo, 75, TRUE); + /* Reset standard Huffman tables */ + std_huff_tables(cinfo); + + /* Initialize default arithmetic coding conditioning */ + for (i = 0; i < NUM_ARITH_TBLS; i++) { + cinfo->arith_dc_L[i] = 0; + cinfo->arith_dc_U[i] = 1; + cinfo->arith_ac_K[i] = 5; + } + + /* Default is no multiple-scan output */ + cinfo->scan_info = NULL; + cinfo->num_scans = 0; + + /* Expect normal source image, not raw downsampled data */ + cinfo->raw_data_in = FALSE; + + /* The standard Huffman tables are only valid for 8-bit data precision. + * If the precision is higher, use arithmetic coding. + * (Alternatively, using Huffman coding would be possible with forcing + * optimization on so that usable tables will be computed, or by + * supplying default tables that are valid for the desired precision.) + * Otherwise, use Huffman coding by default. + */ + cinfo->arith_code = cinfo->data_precision > 8 ? TRUE : FALSE; + + /* By default, don't do extra passes to optimize entropy coding */ + cinfo->optimize_coding = FALSE; + + /* By default, use the simpler non-cosited sampling alignment */ + cinfo->CCIR601_sampling = FALSE; + + /* By default, apply fancy downsampling */ + cinfo->do_fancy_downsampling = TRUE; + + /* No input smoothing */ + cinfo->smoothing_factor = 0; + + /* DCT algorithm preference */ + cinfo->dct_method = JDCT_DEFAULT; + + /* No restart markers */ + cinfo->restart_interval = 0; + cinfo->restart_in_rows = 0; + + /* Fill in default JFIF marker parameters. Note that whether the marker + * will actually be written is determined by jpeg_set_colorspace. + * + * By default, the library emits JFIF version code 1.01. + * An application that wants to emit JFIF 1.02 extension markers should set + * JFIF_minor_version to 2. We could probably get away with just defaulting + * to 1.02, but there may still be some decoders in use that will complain + * about that; saying 1.01 should minimize compatibility problems. + * + * For wide gamut colorspaces (BG_RGB and BG_YCC), the major version will be + * overridden by jpeg_set_colorspace and set to 2. + */ + cinfo->JFIF_major_version = 1; /* Default JFIF version = 1.01 */ + cinfo->JFIF_minor_version = 1; + cinfo->density_unit = 0; /* Pixel size is unknown by default */ + cinfo->X_density = 1; /* Pixel aspect ratio is square by default */ + cinfo->Y_density = 1; + + /* No color transform */ + cinfo->color_transform = JCT_NONE; + + /* Choose JPEG colorspace based on input space, set defaults accordingly */ + + jpeg_default_colorspace(cinfo); +} + + +/* + * Select an appropriate JPEG colorspace for in_color_space. + */ + +GLOBAL(void) +jpeg_default_colorspace (j_compress_ptr cinfo) +{ + switch (cinfo->in_color_space) { + case JCS_UNKNOWN: + jpeg_set_colorspace(cinfo, JCS_UNKNOWN); + break; + case JCS_GRAYSCALE: + jpeg_set_colorspace(cinfo, JCS_GRAYSCALE); + break; + case JCS_RGB: + jpeg_set_colorspace(cinfo, JCS_YCbCr); + break; + case JCS_YCbCr: + jpeg_set_colorspace(cinfo, JCS_YCbCr); + break; + case JCS_CMYK: + jpeg_set_colorspace(cinfo, JCS_CMYK); /* By default, no translation */ + break; + case JCS_YCCK: + jpeg_set_colorspace(cinfo, JCS_YCCK); + break; + case JCS_BG_RGB: + /* No translation for now -- conversion to BG_YCC not yet supportet */ + jpeg_set_colorspace(cinfo, JCS_BG_RGB); + break; + case JCS_BG_YCC: + jpeg_set_colorspace(cinfo, JCS_BG_YCC); + break; + default: + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + } +} + + +/* + * Set the JPEG colorspace, and choose colorspace-dependent default values. + */ + +GLOBAL(void) +jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace) +{ + jpeg_component_info * compptr; + int ci; + +#define SET_COMP(index,id,hsamp,vsamp,quant,dctbl,actbl) \ + (compptr = &cinfo->comp_info[index], \ + compptr->component_id = (id), \ + compptr->h_samp_factor = (hsamp), \ + compptr->v_samp_factor = (vsamp), \ + compptr->quant_tbl_no = (quant), \ + compptr->dc_tbl_no = (dctbl), \ + compptr->ac_tbl_no = (actbl) ) + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* For all colorspaces, we use Q and Huff tables 0 for luminance components, + * tables 1 for chrominance components. + */ + + cinfo->jpeg_color_space = colorspace; + + cinfo->write_JFIF_header = FALSE; /* No marker for non-JFIF colorspaces */ + cinfo->write_Adobe_marker = FALSE; /* write no Adobe marker by default */ + + switch (colorspace) { + case JCS_UNKNOWN: + cinfo->num_components = cinfo->input_components; + if (cinfo->num_components < 1 || cinfo->num_components > MAX_COMPONENTS) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPONENTS); + for (ci = 0; ci < cinfo->num_components; ci++) { + SET_COMP(ci, ci, 1,1, 0, 0,0); + } + break; + case JCS_GRAYSCALE: + cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ + cinfo->num_components = 1; + /* JFIF specifies component ID 1 */ + SET_COMP(0, 0x01, 1,1, 0, 0,0); + break; + case JCS_RGB: + cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag RGB */ + cinfo->num_components = 3; + SET_COMP(0, 0x52 /* 'R' */, 1,1, + cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, + cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, + cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0); + SET_COMP(1, 0x47 /* 'G' */, 1,1, 0, 0,0); + SET_COMP(2, 0x42 /* 'B' */, 1,1, + cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, + cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, + cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0); + break; + case JCS_YCbCr: + cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ + cinfo->num_components = 3; + /* JFIF specifies component IDs 1,2,3 */ + /* We default to 2x2 subsamples of chrominance */ + SET_COMP(0, 0x01, 2,2, 0, 0,0); + SET_COMP(1, 0x02, 1,1, 1, 1,1); + SET_COMP(2, 0x03, 1,1, 1, 1,1); + break; + case JCS_CMYK: + cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag CMYK */ + cinfo->num_components = 4; + SET_COMP(0, 0x43 /* 'C' */, 1,1, 0, 0,0); + SET_COMP(1, 0x4D /* 'M' */, 1,1, 0, 0,0); + SET_COMP(2, 0x59 /* 'Y' */, 1,1, 0, 0,0); + SET_COMP(3, 0x4B /* 'K' */, 1,1, 0, 0,0); + break; + case JCS_YCCK: + cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag YCCK */ + cinfo->num_components = 4; + SET_COMP(0, 0x01, 2,2, 0, 0,0); + SET_COMP(1, 0x02, 1,1, 1, 1,1); + SET_COMP(2, 0x03, 1,1, 1, 1,1); + SET_COMP(3, 0x04, 2,2, 0, 0,0); + break; + case JCS_BG_RGB: + cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ + cinfo->JFIF_major_version = 2; /* Set JFIF major version = 2 */ + cinfo->num_components = 3; + /* Add offset 0x20 to the normal R/G/B component IDs */ + SET_COMP(0, 0x72 /* 'r' */, 1,1, + cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, + cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, + cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0); + SET_COMP(1, 0x67 /* 'g' */, 1,1, 0, 0,0); + SET_COMP(2, 0x62 /* 'b' */, 1,1, + cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, + cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0, + cinfo->color_transform == JCT_SUBTRACT_GREEN ? 1 : 0); + break; + case JCS_BG_YCC: + cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ + cinfo->JFIF_major_version = 2; /* Set JFIF major version = 2 */ + cinfo->num_components = 3; + /* Add offset 0x20 to the normal Cb/Cr component IDs */ + /* We default to 2x2 subsamples of chrominance */ + SET_COMP(0, 0x01, 2,2, 0, 0,0); + SET_COMP(1, 0x22, 1,1, 1, 1,1); + SET_COMP(2, 0x23, 1,1, 1, 1,1); + break; + default: + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + } +} + + +#ifdef C_PROGRESSIVE_SUPPORTED + +LOCAL(jpeg_scan_info *) +fill_a_scan (jpeg_scan_info * scanptr, int ci, + int Ss, int Se, int Ah, int Al) +/* Support routine: generate one scan for specified component */ +{ + scanptr->comps_in_scan = 1; + scanptr->component_index[0] = ci; + scanptr->Ss = Ss; + scanptr->Se = Se; + scanptr->Ah = Ah; + scanptr->Al = Al; + scanptr++; + return scanptr; +} + +LOCAL(jpeg_scan_info *) +fill_scans (jpeg_scan_info * scanptr, int ncomps, + int Ss, int Se, int Ah, int Al) +/* Support routine: generate one scan for each component */ +{ + int ci; + + for (ci = 0; ci < ncomps; ci++) { + scanptr->comps_in_scan = 1; + scanptr->component_index[0] = ci; + scanptr->Ss = Ss; + scanptr->Se = Se; + scanptr->Ah = Ah; + scanptr->Al = Al; + scanptr++; + } + return scanptr; +} + +LOCAL(jpeg_scan_info *) +fill_dc_scans (jpeg_scan_info * scanptr, int ncomps, int Ah, int Al) +/* Support routine: generate interleaved DC scan if possible, else N scans */ +{ + int ci; + + if (ncomps <= MAX_COMPS_IN_SCAN) { + /* Single interleaved DC scan */ + scanptr->comps_in_scan = ncomps; + for (ci = 0; ci < ncomps; ci++) + scanptr->component_index[ci] = ci; + scanptr->Ss = scanptr->Se = 0; + scanptr->Ah = Ah; + scanptr->Al = Al; + scanptr++; + } else { + /* Noninterleaved DC scan for each component */ + scanptr = fill_scans(scanptr, ncomps, 0, 0, Ah, Al); + } + return scanptr; +} + + +/* + * Create a recommended progressive-JPEG script. + * cinfo->num_components and cinfo->jpeg_color_space must be correct. + */ + +GLOBAL(void) +jpeg_simple_progression (j_compress_ptr cinfo) +{ + int ncomps = cinfo->num_components; + int nscans; + jpeg_scan_info * scanptr; + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* Figure space needed for script. Calculation must match code below! */ + if (ncomps == 3 && + (cinfo->jpeg_color_space == JCS_YCbCr || + cinfo->jpeg_color_space == JCS_BG_YCC)) { + /* Custom script for YCC color images. */ + nscans = 10; + } else { + /* All-purpose script for other color spaces. */ + if (ncomps > MAX_COMPS_IN_SCAN) + nscans = 6 * ncomps; /* 2 DC + 4 AC scans per component */ + else + nscans = 2 + 4 * ncomps; /* 2 DC scans; 4 AC scans per component */ + } + + /* Allocate space for script. + * We need to put it in the permanent pool in case the application performs + * multiple compressions without changing the settings. To avoid a memory + * leak if jpeg_simple_progression is called repeatedly for the same JPEG + * object, we try to re-use previously allocated space, and we allocate + * enough space to handle YCC even if initially asked for grayscale. + */ + if (cinfo->script_space == NULL || cinfo->script_space_size < nscans) { + cinfo->script_space_size = MAX(nscans, 10); + cinfo->script_space = (jpeg_scan_info *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + cinfo->script_space_size * SIZEOF(jpeg_scan_info)); + } + scanptr = cinfo->script_space; + cinfo->scan_info = scanptr; + cinfo->num_scans = nscans; + + if (ncomps == 3 && + (cinfo->jpeg_color_space == JCS_YCbCr || + cinfo->jpeg_color_space == JCS_BG_YCC)) { + /* Custom script for YCC color images. */ + /* Initial DC scan */ + scanptr = fill_dc_scans(scanptr, ncomps, 0, 1); + /* Initial AC scan: get some luma data out in a hurry */ + scanptr = fill_a_scan(scanptr, 0, 1, 5, 0, 2); + /* Chroma data is too small to be worth expending many scans on */ + scanptr = fill_a_scan(scanptr, 2, 1, 63, 0, 1); + scanptr = fill_a_scan(scanptr, 1, 1, 63, 0, 1); + /* Complete spectral selection for luma AC */ + scanptr = fill_a_scan(scanptr, 0, 6, 63, 0, 2); + /* Refine next bit of luma AC */ + scanptr = fill_a_scan(scanptr, 0, 1, 63, 2, 1); + /* Finish DC successive approximation */ + scanptr = fill_dc_scans(scanptr, ncomps, 1, 0); + /* Finish AC successive approximation */ + scanptr = fill_a_scan(scanptr, 2, 1, 63, 1, 0); + scanptr = fill_a_scan(scanptr, 1, 1, 63, 1, 0); + /* Luma bottom bit comes last since it's usually largest scan */ + scanptr = fill_a_scan(scanptr, 0, 1, 63, 1, 0); + } else { + /* All-purpose script for other color spaces. */ + /* Successive approximation first pass */ + scanptr = fill_dc_scans(scanptr, ncomps, 0, 1); + scanptr = fill_scans(scanptr, ncomps, 1, 5, 0, 2); + scanptr = fill_scans(scanptr, ncomps, 6, 63, 0, 2); + /* Successive approximation second pass */ + scanptr = fill_scans(scanptr, ncomps, 1, 63, 2, 1); + /* Successive approximation final pass */ + scanptr = fill_dc_scans(scanptr, ncomps, 1, 0); + scanptr = fill_scans(scanptr, ncomps, 1, 63, 1, 0); + } +} + +#endif /* C_PROGRESSIVE_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jcprepct.c b/widget/milsko/milskosrc/external/libjpeg/src/jcprepct.c new file mode 100644 index 0000000000..586964bd44 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jcprepct.c @@ -0,0 +1,358 @@ +/* + * jcprepct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2003-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the compression preprocessing controller. + * This controller manages the color conversion, downsampling, + * and edge expansion steps. + * + * Most of the complexity here is associated with buffering input rows + * as required by the downsampler. See the comments at the head of + * jcsample.c for the downsampler's needs. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* At present, jcsample.c can request context rows only for smoothing. + * In the future, we might also need context rows for CCIR601 sampling + * or other more-complex downsampling procedures. The code to support + * context rows should be compiled only if needed. + */ +#ifdef INPUT_SMOOTHING_SUPPORTED +#define CONTEXT_ROWS_SUPPORTED +#endif + + +/* + * For the simple (no-context-row) case, we just need to buffer one + * row group's worth of pixels for the downsampling step. At the bottom of + * the image, we pad to a full row group by replicating the last pixel row. + * The downsampler's last output row is then replicated if needed to pad + * out to a full iMCU row. + * + * When providing context rows, we must buffer three row groups' worth of + * pixels. Three row groups are physically allocated, but the row pointer + * arrays are made five row groups high, with the extra pointers above and + * below "wrapping around" to point to the last and first real row groups. + * This allows the downsampler to access the proper context rows. + * At the top and bottom of the image, we create dummy context rows by + * copying the first or last real pixel row. This copying could be avoided + * by pointer hacking as is done in jdmainct.c, but it doesn't seem worth the + * trouble on the compression side. + */ + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_prep_controller pub; /* public fields */ + + /* Downsampling input buffer. This buffer holds color-converted data + * until we have enough to do a downsample step. + */ + JSAMPARRAY color_buf[MAX_COMPONENTS]; + + JDIMENSION rows_to_go; /* counts rows remaining in source image */ + int next_buf_row; /* index of next row to store in color_buf */ + +#ifdef CONTEXT_ROWS_SUPPORTED /* only needed for context case */ + int this_row_group; /* starting row index of group to process */ + int next_buf_stop; /* downsample when we reach this index */ +#endif +} my_prep_controller; + +typedef my_prep_controller * my_prep_ptr; + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_prep (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + + if (pass_mode != JBUF_PASS_THRU) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + /* Initialize total-height counter for detecting bottom of image */ + prep->rows_to_go = cinfo->image_height; + /* Mark the conversion buffer empty */ + prep->next_buf_row = 0; +#ifdef CONTEXT_ROWS_SUPPORTED + /* Preset additional state variables for context mode. + * These aren't used in non-context mode, so we needn't test which mode. + */ + prep->this_row_group = 0; + /* Set next_buf_stop to stop after two row groups have been read in. */ + prep->next_buf_stop = 2 * cinfo->max_v_samp_factor; +#endif +} + + +/* + * Expand an image vertically from height input_rows to height output_rows, + * by duplicating the bottom row. + */ + +LOCAL(void) +expand_bottom_edge (JSAMPARRAY image_data, JDIMENSION num_cols, + int input_rows, int output_rows) +{ + register int row; + + for (row = input_rows; row < output_rows; row++) { + jcopy_sample_rows(image_data + input_rows - 1, + image_data + row, + 1, num_cols); + } +} + + +/* + * Process some data in the simple no-context case. + * + * Preprocessor output data is counted in "row groups". A row group + * is defined to be v_samp_factor sample rows of each component. + * Downsampling will produce this much data from each max_v_samp_factor + * input rows. + */ + +METHODDEF(void) +pre_process_data (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail, + JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, + JDIMENSION out_row_groups_avail) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + int numrows, ci; + JDIMENSION inrows; + jpeg_component_info * compptr; + + while (*in_row_ctr < in_rows_avail && + *out_row_group_ctr < out_row_groups_avail) { + /* Do color conversion to fill the conversion buffer. */ + inrows = in_rows_avail - *in_row_ctr; + numrows = cinfo->max_v_samp_factor - prep->next_buf_row; + numrows = (int) MIN((JDIMENSION) numrows, inrows); + (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr, + prep->color_buf, + (JDIMENSION) prep->next_buf_row, + numrows); + *in_row_ctr += numrows; + prep->next_buf_row += numrows; + prep->rows_to_go -= numrows; + /* If at bottom of image, pad to fill the conversion buffer. */ + if (prep->rows_to_go == 0 && + prep->next_buf_row < cinfo->max_v_samp_factor) { + for (ci = 0; ci < cinfo->num_components; ci++) { + expand_bottom_edge(prep->color_buf[ci], cinfo->image_width, + prep->next_buf_row, cinfo->max_v_samp_factor); + } + prep->next_buf_row = cinfo->max_v_samp_factor; + } + /* If we've filled the conversion buffer, empty it. */ + if (prep->next_buf_row == cinfo->max_v_samp_factor) { + (*cinfo->downsample->downsample) (cinfo, + prep->color_buf, (JDIMENSION) 0, + output_buf, *out_row_group_ctr); + prep->next_buf_row = 0; + (*out_row_group_ctr)++; + } + /* If at bottom of image, pad the output to a full iMCU height. + * Note we assume the caller is providing a one-iMCU-height output buffer! + */ + if (prep->rows_to_go == 0 && + *out_row_group_ctr < out_row_groups_avail) { + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + numrows = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) / + cinfo->min_DCT_v_scaled_size; + expand_bottom_edge(output_buf[ci], + compptr->width_in_blocks * compptr->DCT_h_scaled_size, + (int) (*out_row_group_ctr * numrows), + (int) (out_row_groups_avail * numrows)); + } + *out_row_group_ctr = out_row_groups_avail; + break; /* can exit outer loop without test */ + } + } +} + + +#ifdef CONTEXT_ROWS_SUPPORTED + +/* + * Process some data in the context case. + */ + +METHODDEF(void) +pre_process_context (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail, + JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, + JDIMENSION out_row_groups_avail) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + int numrows, ci; + int buf_height = cinfo->max_v_samp_factor * 3; + JDIMENSION inrows; + + while (*out_row_group_ctr < out_row_groups_avail) { + if (*in_row_ctr < in_rows_avail) { + /* Do color conversion to fill the conversion buffer. */ + inrows = in_rows_avail - *in_row_ctr; + numrows = prep->next_buf_stop - prep->next_buf_row; + numrows = (int) MIN((JDIMENSION) numrows, inrows); + (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr, + prep->color_buf, + (JDIMENSION) prep->next_buf_row, + numrows); + /* Pad at top of image, if first time through */ + if (prep->rows_to_go == cinfo->image_height) { + for (ci = 0; ci < cinfo->num_components; ci++) { + int row; + for (row = 1; row <= cinfo->max_v_samp_factor; row++) { + jcopy_sample_rows(prep->color_buf[ci], + prep->color_buf[ci] - row, + 1, cinfo->image_width); + } + } + } + *in_row_ctr += numrows; + prep->next_buf_row += numrows; + prep->rows_to_go -= numrows; + } else { + /* Return for more data, unless we are at the bottom of the image. */ + if (prep->rows_to_go != 0) + break; + /* When at bottom of image, pad to fill the conversion buffer. */ + if (prep->next_buf_row < prep->next_buf_stop) { + for (ci = 0; ci < cinfo->num_components; ci++) { + expand_bottom_edge(prep->color_buf[ci], cinfo->image_width, + prep->next_buf_row, prep->next_buf_stop); + } + prep->next_buf_row = prep->next_buf_stop; + } + } + /* If we've gotten enough data, downsample a row group. */ + if (prep->next_buf_row == prep->next_buf_stop) { + (*cinfo->downsample->downsample) (cinfo, + prep->color_buf, + (JDIMENSION) prep->this_row_group, + output_buf, *out_row_group_ctr); + (*out_row_group_ctr)++; + /* Advance pointers with wraparound as necessary. */ + prep->this_row_group += cinfo->max_v_samp_factor; + if (prep->this_row_group >= buf_height) + prep->this_row_group = 0; + if (prep->next_buf_row >= buf_height) + prep->next_buf_row = 0; + prep->next_buf_stop = prep->next_buf_row + cinfo->max_v_samp_factor; + } + } +} + + +/* + * Create the wrapped-around downsampling input buffer needed for context mode. + */ + +LOCAL(void) +create_context_buffer (j_compress_ptr cinfo) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + int rgroup_height = cinfo->max_v_samp_factor; + int ci, i; + jpeg_component_info * compptr; + JSAMPARRAY true_buffer, fake_buffer; + + /* Grab enough space for fake row pointers for all the components; + * we need five row groups' worth of pointers for each component. + */ + fake_buffer = (JSAMPARRAY) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (cinfo->num_components * 5 * rgroup_height) * SIZEOF(JSAMPROW)); + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Allocate the actual buffer space (3 row groups) for this component. + * We make the buffer wide enough to allow the downsampler to edge-expand + * horizontally within the buffer, if it so chooses. + */ + true_buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (((long) compptr->width_in_blocks * + cinfo->min_DCT_h_scaled_size * + cinfo->max_h_samp_factor) / compptr->h_samp_factor), + (JDIMENSION) (3 * rgroup_height)); + /* Copy true buffer row pointers into the middle of the fake row array */ + MEMCOPY(fake_buffer + rgroup_height, true_buffer, + 3 * rgroup_height * SIZEOF(JSAMPROW)); + /* Fill in the above and below wraparound pointers */ + for (i = 0; i < rgroup_height; i++) { + fake_buffer[i] = true_buffer[2 * rgroup_height + i]; + fake_buffer[4 * rgroup_height + i] = true_buffer[i]; + } + prep->color_buf[ci] = fake_buffer + rgroup_height; + fake_buffer += 5 * rgroup_height; /* point to space for next component */ + } +} + +#endif /* CONTEXT_ROWS_SUPPORTED */ + + +/* + * Initialize preprocessing controller. + */ + +GLOBAL(void) +jinit_c_prep_controller (j_compress_ptr cinfo, boolean need_full_buffer) +{ + my_prep_ptr prep; + int ci; + jpeg_component_info * compptr; + + if (need_full_buffer) /* safety check */ + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + prep = (my_prep_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_prep_controller)); + cinfo->prep = &prep->pub; + prep->pub.start_pass = start_pass_prep; + + /* Allocate the color conversion buffer. + * We make the buffer wide enough to allow the downsampler to edge-expand + * horizontally within the buffer, if it so chooses. + */ + if (cinfo->downsample->need_context_rows) { + /* Set up to provide context rows */ +#ifdef CONTEXT_ROWS_SUPPORTED + prep->pub.pre_process_data = pre_process_context; + create_context_buffer(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + /* No context, just make it tall enough for one row group */ + prep->pub.pre_process_data = pre_process_data; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + prep->color_buf[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (((long) compptr->width_in_blocks * + cinfo->min_DCT_h_scaled_size * + cinfo->max_h_samp_factor) / compptr->h_samp_factor), + (JDIMENSION) cinfo->max_v_samp_factor); + } + } +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jcsample.c b/widget/milsko/milskosrc/external/libjpeg/src/jcsample.c new file mode 100644 index 0000000000..2372c4173f --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jcsample.c @@ -0,0 +1,545 @@ +/* + * jcsample.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * Modified 2003-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains downsampling routines. + * + * Downsampling input data is counted in "row groups". A row group + * is defined to be max_v_samp_factor pixel rows of each component, + * from which the downsampler produces v_samp_factor sample rows. + * A single row group is processed in each call to the downsampler module. + * + * The downsampler is responsible for edge-expansion of its output data + * to fill an integral number of DCT blocks horizontally. The source buffer + * may be modified if it is helpful for this purpose (the source buffer is + * allocated wide enough to correspond to the desired output width). + * The caller (the prep controller) is responsible for vertical padding. + * + * The downsampler may request "context rows" by setting need_context_rows + * during startup. In this case, the input arrays will contain at least + * one row group's worth of pixels above and below the passed-in data; + * the caller will create dummy rows at image top and bottom by replicating + * the first or last real pixel row. + * + * An excellent reference for image resampling is + * Digital Image Warping, George Wolberg, 1990. + * Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7. + * + * The downsampling algorithm used here is a simple average of the source + * pixels covered by the output pixel. The hi-falutin sampling literature + * refers to this as a "box filter". In general the characteristics of a box + * filter are not very good, but for the specific cases we normally use (1:1 + * and 2:1 ratios) the box is equivalent to a "triangle filter" which is not + * nearly so bad. If you intend to use other sampling ratios, you'd be well + * advised to improve this code. + * + * A simple input-smoothing capability is provided. This is mainly intended + * for cleaning up color-dithered GIF input files (if you find it inadequate, + * we suggest using an external filtering program such as pnmconvol). When + * enabled, each input pixel P is replaced by a weighted sum of itself and its + * eight neighbors. P's weight is 1-8*SF and each neighbor's weight is SF, + * where SF = (smoothing_factor / 1024). + * Currently, smoothing is only supported for 2h2v sampling factors. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Pointer to routine to downsample a single component */ +typedef JMETHOD(void, downsample1_ptr, + (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data)); + +/* Private subobject */ + +typedef struct { + struct jpeg_downsampler pub; /* public fields */ + + /* Downsampling method pointers, one per component */ + downsample1_ptr methods[MAX_COMPONENTS]; + + /* Height of an output row group for each component. */ + int rowgroup_height[MAX_COMPONENTS]; + + /* These arrays save pixel expansion factors so that int_downsample need not + * recompute them each time. They are unused for other downsampling methods. + */ + UINT8 h_expand[MAX_COMPONENTS]; + UINT8 v_expand[MAX_COMPONENTS]; +} my_downsampler; + +typedef my_downsampler * my_downsample_ptr; + + +/* + * Initialize for a downsampling pass. + */ + +METHODDEF(void) +start_pass_downsample (j_compress_ptr cinfo) +{ + /* no work for now */ +} + + +/* + * Expand a component horizontally from width input_cols to width output_cols, + * by duplicating the rightmost samples. + */ + +LOCAL(void) +expand_right_edge (JSAMPARRAY image_data, int num_rows, + JDIMENSION input_cols, JDIMENSION output_cols) +{ + register JSAMPROW ptr; + register JSAMPLE pixval; + register int count; + int row; + int numcols = (int) (output_cols - input_cols); + + if (numcols > 0) { + for (row = 0; row < num_rows; row++) { + ptr = image_data[row] + input_cols; + pixval = ptr[-1]; /* don't need GETJSAMPLE() here */ + for (count = numcols; count > 0; count--) + *ptr++ = pixval; + } + } +} + + +/* + * Do downsampling for a whole row group (all components). + * + * In this version we simply downsample each component independently. + */ + +METHODDEF(void) +sep_downsample (j_compress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_index, + JSAMPIMAGE output_buf, JDIMENSION out_row_group_index) +{ + my_downsample_ptr downsample = (my_downsample_ptr) cinfo->downsample; + int ci; + jpeg_component_info * compptr; + JSAMPARRAY in_ptr, out_ptr; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + in_ptr = input_buf[ci] + in_row_index; + out_ptr = output_buf[ci] + + (out_row_group_index * downsample->rowgroup_height[ci]); + (*downsample->methods[ci]) (cinfo, compptr, in_ptr, out_ptr); + } +} + + +/* + * Downsample pixel values of a single component. + * One row group is processed per call. + * This version handles arbitrary integral sampling ratios, without smoothing. + * Note that this version is not actually used for customary sampling ratios. + */ + +METHODDEF(void) +int_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + my_downsample_ptr downsample = (my_downsample_ptr) cinfo->downsample; + int inrow, outrow, h_expand, v_expand, numpix, numpix2, h, v; + JDIMENSION outcol, outcol_h; /* outcol_h == outcol*h_expand */ + JDIMENSION output_cols = compptr->width_in_blocks * compptr->DCT_h_scaled_size; + JSAMPROW inptr, outptr; + INT32 outvalue; + + h_expand = downsample->h_expand[compptr->component_index]; + v_expand = downsample->v_expand[compptr->component_index]; + numpix = h_expand * v_expand; + numpix2 = numpix/2; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data, cinfo->max_v_samp_factor, + cinfo->image_width, output_cols * h_expand); + + inrow = outrow = 0; + while (inrow < cinfo->max_v_samp_factor) { + outptr = output_data[outrow]; + for (outcol = 0, outcol_h = 0; outcol < output_cols; + outcol++, outcol_h += h_expand) { + outvalue = 0; + for (v = 0; v < v_expand; v++) { + inptr = input_data[inrow+v] + outcol_h; + for (h = 0; h < h_expand; h++) { + outvalue += (INT32) GETJSAMPLE(*inptr++); + } + } + *outptr++ = (JSAMPLE) ((outvalue + numpix2) / numpix); + } + inrow += v_expand; + outrow++; + } +} + + +/* + * Downsample pixel values of a single component. + * This version handles the special case of a full-size component, + * without smoothing. + */ + +METHODDEF(void) +fullsize_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + /* Copy the data */ + jcopy_sample_rows(input_data, output_data, + cinfo->max_v_samp_factor, cinfo->image_width); + /* Edge-expand */ + expand_right_edge(output_data, cinfo->max_v_samp_factor, cinfo->image_width, + compptr->width_in_blocks * compptr->DCT_h_scaled_size); +} + + +/* + * Downsample pixel values of a single component. + * This version handles the common case of 2:1 horizontal and 1:1 vertical, + * without smoothing. + * + * A note about the "bias" calculations: when rounding fractional values to + * integer, we do not want to always round 0.5 up to the next integer. + * If we did that, we'd introduce a noticeable bias towards larger values. + * Instead, this code is arranged so that 0.5 will be rounded up or down at + * alternate pixel locations (a simple ordered dither pattern). + */ + +METHODDEF(void) +h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int inrow; + JDIMENSION outcol; + JDIMENSION output_cols = compptr->width_in_blocks * compptr->DCT_h_scaled_size; + register JSAMPROW inptr, outptr; + register int bias; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data, cinfo->max_v_samp_factor, + cinfo->image_width, output_cols * 2); + + for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) { + outptr = output_data[inrow]; + inptr = input_data[inrow]; + bias = 0; /* bias = 0,1,0,1,... for successive samples */ + for (outcol = 0; outcol < output_cols; outcol++) { + *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr) + GETJSAMPLE(inptr[1]) + + bias) >> 1); + bias ^= 1; /* 0=>1, 1=>0 */ + inptr += 2; + } + } +} + + +/* + * Downsample pixel values of a single component. + * This version handles the standard case of 2:1 horizontal and 2:1 vertical, + * without smoothing. + */ + +METHODDEF(void) +h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int inrow, outrow; + JDIMENSION outcol; + JDIMENSION output_cols = compptr->width_in_blocks * compptr->DCT_h_scaled_size; + register JSAMPROW inptr0, inptr1, outptr; + register int bias; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data, cinfo->max_v_samp_factor, + cinfo->image_width, output_cols * 2); + + inrow = outrow = 0; + while (inrow < cinfo->max_v_samp_factor) { + outptr = output_data[outrow]; + inptr0 = input_data[inrow]; + inptr1 = input_data[inrow+1]; + bias = 1; /* bias = 1,2,1,2,... for successive samples */ + for (outcol = 0; outcol < output_cols; outcol++) { + *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]) + + bias) >> 2); + bias ^= 3; /* 1=>2, 2=>1 */ + inptr0 += 2; inptr1 += 2; + } + inrow += 2; + outrow++; + } +} + + +#ifdef INPUT_SMOOTHING_SUPPORTED + +/* + * Downsample pixel values of a single component. + * This version handles the standard case of 2:1 horizontal and 2:1 vertical, + * with smoothing. One row of context is required. + */ + +METHODDEF(void) +h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int inrow, outrow; + JDIMENSION colctr; + JDIMENSION output_cols = compptr->width_in_blocks * compptr->DCT_h_scaled_size; + register JSAMPROW inptr0, inptr1, above_ptr, below_ptr, outptr; + INT32 membersum, neighsum, memberscale, neighscale; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2, + cinfo->image_width, output_cols * 2); + + /* We don't bother to form the individual "smoothed" input pixel values; + * we can directly compute the output which is the average of the four + * smoothed values. Each of the four member pixels contributes a fraction + * (1-8*SF) to its own smoothed image and a fraction SF to each of the three + * other smoothed pixels, therefore a total fraction (1-5*SF)/4 to the final + * output. The four corner-adjacent neighbor pixels contribute a fraction + * SF to just one smoothed pixel, or SF/4 to the final output; while the + * eight edge-adjacent neighbors contribute SF to each of two smoothed + * pixels, or SF/2 overall. In order to use integer arithmetic, these + * factors are scaled by 2^16 = 65536. + * Also recall that SF = smoothing_factor / 1024. + */ + + memberscale = 16384 - cinfo->smoothing_factor * 80; /* scaled (1-5*SF)/4 */ + neighscale = cinfo->smoothing_factor * 16; /* scaled SF/4 */ + + inrow = outrow = 0; + while (inrow < cinfo->max_v_samp_factor) { + outptr = output_data[outrow]; + inptr0 = input_data[inrow]; + inptr1 = input_data[inrow+1]; + above_ptr = input_data[inrow-1]; + below_ptr = input_data[inrow+2]; + + /* Special case for first column: pretend column -1 is same as column 0 */ + membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); + neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + + GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[2]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[2]); + neighsum += neighsum; + neighsum += GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[2]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[2]); + membersum = membersum * memberscale + neighsum * neighscale; + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2; + + for (colctr = output_cols - 2; colctr > 0; colctr--) { + /* sum of pixels directly mapped to this output element */ + membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); + /* sum of edge-neighbor pixels */ + neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + + GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[2]) + + GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[2]); + /* The edge-neighbors count twice as much as corner-neighbors */ + neighsum += neighsum; + /* Add in the corner-neighbors */ + neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[2]) + + GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[2]); + /* form final output scaled up by 2^16 */ + membersum = membersum * memberscale + neighsum * neighscale; + /* round, descale and output it */ + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2; + } + + /* Special case for last column */ + membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); + neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + + GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[1]); + neighsum += neighsum; + neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[1]); + membersum = membersum * memberscale + neighsum * neighscale; + *outptr = (JSAMPLE) ((membersum + 32768) >> 16); + + inrow += 2; + outrow++; + } +} + + +/* + * Downsample pixel values of a single component. + * This version handles the special case of a full-size component, + * with smoothing. One row of context is required. + */ + +METHODDEF(void) +fullsize_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int inrow; + JDIMENSION colctr; + JDIMENSION output_cols = compptr->width_in_blocks * compptr->DCT_h_scaled_size; + register JSAMPROW inptr, above_ptr, below_ptr, outptr; + INT32 membersum, neighsum, memberscale, neighscale; + int colsum, lastcolsum, nextcolsum; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2, + cinfo->image_width, output_cols); + + /* Each of the eight neighbor pixels contributes a fraction SF to the + * smoothed pixel, while the main pixel contributes (1-8*SF). In order + * to use integer arithmetic, these factors are multiplied by 2^16 = 65536. + * Also recall that SF = smoothing_factor / 1024. + */ + + memberscale = 65536L - cinfo->smoothing_factor * 512L; /* scaled 1-8*SF */ + neighscale = cinfo->smoothing_factor * 64; /* scaled SF */ + + for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) { + outptr = output_data[inrow]; + inptr = input_data[inrow]; + above_ptr = input_data[inrow-1]; + below_ptr = input_data[inrow+1]; + + /* Special case for first column */ + colsum = GETJSAMPLE(*above_ptr++) + GETJSAMPLE(*below_ptr++) + + GETJSAMPLE(*inptr); + membersum = GETJSAMPLE(*inptr++); + nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) + + GETJSAMPLE(*inptr); + neighsum = colsum + (colsum - membersum) + nextcolsum; + membersum = membersum * memberscale + neighsum * neighscale; + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + lastcolsum = colsum; colsum = nextcolsum; + + for (colctr = output_cols - 2; colctr > 0; colctr--) { + membersum = GETJSAMPLE(*inptr++); + above_ptr++; below_ptr++; + nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) + + GETJSAMPLE(*inptr); + neighsum = lastcolsum + (colsum - membersum) + nextcolsum; + membersum = membersum * memberscale + neighsum * neighscale; + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + lastcolsum = colsum; colsum = nextcolsum; + } + + /* Special case for last column */ + membersum = GETJSAMPLE(*inptr); + neighsum = lastcolsum + (colsum - membersum) + colsum; + membersum = membersum * memberscale + neighsum * neighscale; + *outptr = (JSAMPLE) ((membersum + 32768) >> 16); + + } +} + +#endif /* INPUT_SMOOTHING_SUPPORTED */ + + +/* + * Module initialization routine for downsampling. + * Note that we must select a routine for each component. + */ + +GLOBAL(void) +jinit_downsampler (j_compress_ptr cinfo) +{ + my_downsample_ptr downsample; + int ci; + jpeg_component_info * compptr; + boolean smoothok = TRUE; + int h_in_group, v_in_group, h_out_group, v_out_group; + + downsample = (my_downsample_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_downsampler)); + cinfo->downsample = &downsample->pub; + downsample->pub.start_pass = start_pass_downsample; + downsample->pub.downsample = sep_downsample; + downsample->pub.need_context_rows = FALSE; + + if (cinfo->CCIR601_sampling) + ERREXIT(cinfo, JERR_CCIR601_NOTIMPL); + + /* Verify we can handle the sampling factors, and set up method pointers */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Compute size of an "output group" for DCT scaling. This many samples + * are to be converted from max_h_samp_factor * max_v_samp_factor pixels. + */ + h_out_group = (compptr->h_samp_factor * compptr->DCT_h_scaled_size) / + cinfo->min_DCT_h_scaled_size; + v_out_group = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) / + cinfo->min_DCT_v_scaled_size; + h_in_group = cinfo->max_h_samp_factor; + v_in_group = cinfo->max_v_samp_factor; + downsample->rowgroup_height[ci] = v_out_group; /* save for use later */ + if (h_in_group == h_out_group && v_in_group == v_out_group) { +#ifdef INPUT_SMOOTHING_SUPPORTED + if (cinfo->smoothing_factor) { + downsample->methods[ci] = fullsize_smooth_downsample; + downsample->pub.need_context_rows = TRUE; + } else +#endif + downsample->methods[ci] = fullsize_downsample; + } else if (h_in_group == h_out_group * 2 && + v_in_group == v_out_group) { + smoothok = FALSE; + downsample->methods[ci] = h2v1_downsample; + } else if (h_in_group == h_out_group * 2 && + v_in_group == v_out_group * 2) { +#ifdef INPUT_SMOOTHING_SUPPORTED + if (cinfo->smoothing_factor) { + downsample->methods[ci] = h2v2_smooth_downsample; + downsample->pub.need_context_rows = TRUE; + } else +#endif + downsample->methods[ci] = h2v2_downsample; + } else if ((h_in_group % h_out_group) == 0 && + (v_in_group % v_out_group) == 0) { + smoothok = FALSE; + downsample->methods[ci] = int_downsample; + downsample->h_expand[ci] = (UINT8) (h_in_group / h_out_group); + downsample->v_expand[ci] = (UINT8) (v_in_group / v_out_group); + } else + ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL); + } + +#ifdef INPUT_SMOOTHING_SUPPORTED + if (cinfo->smoothing_factor && !smoothok) + TRACEMS(cinfo, 0, JTRC_SMOOTH_NOTIMPL); +#endif +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jctrans.c b/widget/milsko/milskosrc/external/libjpeg/src/jctrans.c new file mode 100644 index 0000000000..261dd2996e --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jctrans.c @@ -0,0 +1,399 @@ +/* + * jctrans.c + * + * Copyright (C) 1995-1998, Thomas G. Lane. + * Modified 2000-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains library routines for transcoding compression, + * that is, writing raw DCT coefficient arrays to an output JPEG file. + * The routines in jcapimin.c will also be needed by a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Forward declarations */ +LOCAL(void) transencode_master_selection + JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)); +LOCAL(void) transencode_coef_controller + JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)); + + +/* + * Compression initialization for writing raw-coefficient data. + * Before calling this, all parameters and a data destination must be set up. + * Call jpeg_finish_compress() to actually write the data. + * + * The number of passed virtual arrays must match cinfo->num_components. + * Note that the virtual arrays need not be filled or even realized at + * the time write_coefficients is called; indeed, if the virtual arrays + * were requested from this compression object's memory manager, they + * typically will be realized during this routine and filled afterwards. + */ + +GLOBAL(void) +jpeg_write_coefficients (j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays) +{ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Mark all tables to be written */ + jpeg_suppress_tables(cinfo, FALSE); + /* (Re)initialize error mgr and destination modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->dest->init_destination) (cinfo); + /* Perform master selection of active modules */ + transencode_master_selection(cinfo, coef_arrays); + /* Wait for jpeg_finish_compress() call */ + cinfo->next_scanline = 0; /* so jpeg_write_marker works */ + cinfo->global_state = CSTATE_WRCOEFS; +} + + +/* + * Initialize the compression object with default parameters, + * then copy from the source object all parameters needed for lossless + * transcoding. Parameters that can be varied without loss (such as + * scan script and Huffman optimization) are left in their default states. + */ + +GLOBAL(void) +jpeg_copy_critical_parameters (j_decompress_ptr srcinfo, + j_compress_ptr dstinfo) +{ + JQUANT_TBL ** qtblptr; + jpeg_component_info *incomp, *outcomp; + JQUANT_TBL *c_quant, *slot_quant; + int tblno, ci, coefi; + + /* Safety check to ensure start_compress not called yet. */ + if (dstinfo->global_state != CSTATE_START) + ERREXIT1(dstinfo, JERR_BAD_STATE, dstinfo->global_state); + /* Copy fundamental image dimensions */ + dstinfo->image_width = srcinfo->image_width; + dstinfo->image_height = srcinfo->image_height; + dstinfo->input_components = srcinfo->num_components; + dstinfo->in_color_space = srcinfo->jpeg_color_space; + dstinfo->jpeg_width = srcinfo->output_width; + dstinfo->jpeg_height = srcinfo->output_height; + dstinfo->min_DCT_h_scaled_size = srcinfo->min_DCT_h_scaled_size; + dstinfo->min_DCT_v_scaled_size = srcinfo->min_DCT_v_scaled_size; + /* Initialize all parameters to default values */ + jpeg_set_defaults(dstinfo); + /* jpeg_set_defaults may choose wrong colorspace, eg YCbCr if input is RGB. + * Fix it to get the right header markers for the image colorspace. + * Note: Entropy table assignment in jpeg_set_colorspace + * depends on color_transform. + * Adaption is also required for setting the appropriate + * entropy coding mode dependent on image data precision. + */ + dstinfo->color_transform = srcinfo->color_transform; + jpeg_set_colorspace(dstinfo, srcinfo->jpeg_color_space); + dstinfo->data_precision = srcinfo->data_precision; + dstinfo->arith_code = srcinfo->data_precision > 8 ? TRUE : FALSE; + dstinfo->CCIR601_sampling = srcinfo->CCIR601_sampling; + /* Copy the source's quantization tables. */ + for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) { + if (srcinfo->quant_tbl_ptrs[tblno] != NULL) { + qtblptr = & dstinfo->quant_tbl_ptrs[tblno]; + if (*qtblptr == NULL) + *qtblptr = jpeg_alloc_quant_table((j_common_ptr) dstinfo); + MEMCOPY((*qtblptr)->quantval, + srcinfo->quant_tbl_ptrs[tblno]->quantval, + SIZEOF((*qtblptr)->quantval)); + (*qtblptr)->sent_table = FALSE; + } + } + /* Copy the source's per-component info. + * Note we assume jpeg_set_defaults has allocated the dest comp_info array. + */ + dstinfo->num_components = srcinfo->num_components; + if (dstinfo->num_components < 1 || dstinfo->num_components > MAX_COMPONENTS) + ERREXIT2(dstinfo, JERR_COMPONENT_COUNT, dstinfo->num_components, + MAX_COMPONENTS); + for (ci = 0, incomp = srcinfo->comp_info, outcomp = dstinfo->comp_info; + ci < dstinfo->num_components; ci++, incomp++, outcomp++) { + outcomp->component_id = incomp->component_id; + outcomp->h_samp_factor = incomp->h_samp_factor; + outcomp->v_samp_factor = incomp->v_samp_factor; + outcomp->quant_tbl_no = incomp->quant_tbl_no; + /* Make sure saved quantization table for component matches the qtable + * slot. If not, the input file re-used this qtable slot. + * IJG encoder currently cannot duplicate this. + */ + tblno = outcomp->quant_tbl_no; + if (tblno < 0 || tblno >= NUM_QUANT_TBLS || + srcinfo->quant_tbl_ptrs[tblno] == NULL) + ERREXIT1(dstinfo, JERR_NO_QUANT_TABLE, tblno); + slot_quant = srcinfo->quant_tbl_ptrs[tblno]; + c_quant = incomp->quant_table; + if (c_quant != NULL) { + for (coefi = 0; coefi < DCTSIZE2; coefi++) { + if (c_quant->quantval[coefi] != slot_quant->quantval[coefi]) + ERREXIT1(dstinfo, JERR_MISMATCHED_QUANT_TABLE, tblno); + } + } + /* Note: we do not copy the source's entropy table assignments; + * instead we rely on jpeg_set_colorspace to have made a suitable choice. + */ + } + /* Also copy JFIF version and resolution information, if available. + * Strictly speaking this isn't "critical" info, but it's nearly + * always appropriate to copy it if available. In particular, + * if the application chooses to copy JFIF 1.02 extension markers from + * the source file, we need to copy the version to make sure we don't + * emit a file that has 1.02 extensions but a claimed version of 1.01. + */ + if (srcinfo->saw_JFIF_marker) { + if (srcinfo->JFIF_major_version == 1 || + srcinfo->JFIF_major_version == 2) { + dstinfo->JFIF_major_version = srcinfo->JFIF_major_version; + dstinfo->JFIF_minor_version = srcinfo->JFIF_minor_version; + } + dstinfo->density_unit = srcinfo->density_unit; + dstinfo->X_density = srcinfo->X_density; + dstinfo->Y_density = srcinfo->Y_density; + } +} + + +LOCAL(void) +jpeg_calc_trans_dimensions (j_compress_ptr cinfo) +/* Do computations that are needed before master selection phase */ +{ + if (cinfo->min_DCT_h_scaled_size != cinfo->min_DCT_v_scaled_size) + ERREXIT2(cinfo, JERR_BAD_DCTSIZE, + cinfo->min_DCT_h_scaled_size, cinfo->min_DCT_v_scaled_size); + + cinfo->block_size = cinfo->min_DCT_h_scaled_size; +} + + +/* + * Master selection of compression modules for transcoding. + * This substitutes for jcinit.c's initialization of the full compressor. + */ + +LOCAL(void) +transencode_master_selection (j_compress_ptr cinfo, + jvirt_barray_ptr * coef_arrays) +{ + /* Do computations that are needed before master selection phase */ + jpeg_calc_trans_dimensions(cinfo); + + /* Initialize master control (includes parameter checking/processing) */ + jinit_c_master_control(cinfo, TRUE /* transcode only */); + + /* Entropy encoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) + jinit_arith_encoder(cinfo); + else { + jinit_huff_encoder(cinfo); + } + + /* We need a special coefficient buffer controller. */ + transencode_coef_controller(cinfo, coef_arrays); + + jinit_marker_writer(cinfo); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Write the datastream header (SOI, JFIF) immediately. + * Frame and scan headers are postponed till later. + * This lets application insert special markers after the SOI. + */ + (*cinfo->marker->write_file_header) (cinfo); +} + + +/* + * The rest of this file is a special implementation of the coefficient + * buffer controller. This is similar to jccoefct.c, but it handles only + * output from presupplied virtual arrays. Furthermore, we generate any + * dummy padding blocks on-the-fly rather than expecting them to be present + * in the arrays. + */ + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_coef_controller pub; /* public fields */ + + JDIMENSION iMCU_row_num; /* iMCU row # within image */ + JDIMENSION MCU_ctr; /* counts MCUs processed in current row */ + int MCU_vert_offset; /* counts MCU rows within iMCU row */ + int MCU_rows_per_iMCU_row; /* number of such rows needed */ + + /* Virtual block array for each component. */ + jvirt_barray_ptr * whole_image; + + /* Workspace for constructing dummy blocks at right/bottom edges. */ + JBLOCK dummy_buffer[C_MAX_BLOCKS_IN_MCU]; +} my_coef_controller; + +typedef my_coef_controller * my_coef_ptr; + + +LOCAL(void) +start_iMCU_row (j_compress_ptr cinfo) +/* Reset within-iMCU-row counters for a new row */ +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* In an interleaved scan, an MCU row is the same as an iMCU row. + * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. + * But at the bottom of the image, process only what's left. + */ + if (cinfo->comps_in_scan > 1) { + coef->MCU_rows_per_iMCU_row = 1; + } else { + if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1)) + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; + else + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; + } + + coef->MCU_ctr = 0; + coef->MCU_vert_offset = 0; +} + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + if (pass_mode != JBUF_CRANK_DEST) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + coef->iMCU_row_num = 0; + start_iMCU_row(cinfo); +} + + +/* + * Process some data. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the scan. + * The data is obtained from the virtual arrays and fed to the entropy coder. + * Returns TRUE if the iMCU row is completed, FALSE if suspended. + * + * NB: input_buf is ignored; it is likely to be a NULL pointer. + */ + +METHODDEF(boolean) +compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + int blkn, ci, xindex, yindex, yoffset, blockcnt; + JDIMENSION start_col; + JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; + JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU]; + JBLOCKROW buffer_ptr; + jpeg_component_info *compptr; + + /* Align the virtual buffers for the components used in this scan. */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + buffer[ci] = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], + coef->iMCU_row_num * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + + /* Loop to process one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col; + MCU_col_num++) { + /* Construct list of pointers to DCT blocks belonging to this MCU */ + blkn = 0; /* index of current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width + : compptr->last_col_width; + start_col = MCU_col_num * compptr->MCU_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + if (coef->iMCU_row_num < last_iMCU_row || + yoffset + yindex < compptr->last_row_height) { + /* Fill in pointers to real blocks in this row */ + buffer_ptr = buffer[ci][yoffset + yindex] + start_col; + xindex = blockcnt; + do { + MCU_buffer[blkn++] = buffer_ptr++; + } while (--xindex); + /* Dummy blocks at right edge */ + if ((xindex = compptr->MCU_width - blockcnt) == 0) + continue; + } else { + /* At bottom of image, need a whole row of dummy blocks */ + xindex = compptr->MCU_width; + } + /* Fill in any dummy blocks needed in this row. + * Dummy blocks are filled in the same way as in jccoefct.c: + * all zeroes in the AC entries, DC entries equal to previous + * block's DC value. The init routine has already zeroed the + * AC entries, so we need only set the DC entries correctly. + */ + buffer_ptr = coef->dummy_buffer + blkn; + do { + buffer_ptr[0][0] = MCU_buffer[blkn-1][0][0]; + MCU_buffer[blkn++] = buffer_ptr++; + } while (--xindex); + } + } + /* Try to write the MCU. */ + if (! (*cinfo->entropy->encode_mcu) (cinfo, MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->MCU_ctr = MCU_col_num; + return FALSE; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->MCU_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + coef->iMCU_row_num++; + start_iMCU_row(cinfo); + return TRUE; +} + + +/* + * Initialize coefficient buffer controller. + * + * Each passed coefficient array must be the right size for that + * coefficient: width_in_blocks wide and height_in_blocks high, + * with unitheight at least v_samp_factor. + */ + +LOCAL(void) +transencode_coef_controller (j_compress_ptr cinfo, + jvirt_barray_ptr * coef_arrays) +{ + my_coef_ptr coef; + + coef = (my_coef_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_coef_controller)); + cinfo->coef = &coef->pub; + coef->pub.start_pass = start_pass_coef; + coef->pub.compress_data = compress_output; + + /* Save pointer to virtual arrays */ + coef->whole_image = coef_arrays; + + /* Pre-zero space for dummy DCT blocks */ + MEMZERO(coef->dummy_buffer, SIZEOF(coef->dummy_buffer)); +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdapimin.c b/widget/milsko/milskosrc/external/libjpeg/src/jdapimin.c new file mode 100644 index 0000000000..785e527226 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdapimin.c @@ -0,0 +1,412 @@ +/* + * jdapimin.c + * + * Copyright (C) 1994-1998, Thomas G. Lane. + * Modified 2009-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the decompression half + * of the JPEG library. These are the "minimum" API routines that may be + * needed in either the normal full-decompression case or the + * transcoding-only case. + * + * Most of the routines intended to be called directly by an application + * are in this file or in jdapistd.c. But also see jcomapi.c for routines + * shared by compression and decompression, and jdtrans.c for the transcoding + * case. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Initialization of a JPEG decompression object. + * The error manager must already be set up (in case memory manager fails). + */ + +GLOBAL(void) +jpeg_CreateDecompress (j_decompress_ptr cinfo, int version, size_t structsize) +{ + int i; + + /* Guard against version mismatches between library and caller. */ + cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ + if (version != JPEG_LIB_VERSION) + ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); + if (structsize != SIZEOF(struct jpeg_decompress_struct)) + ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, + (int) SIZEOF(struct jpeg_decompress_struct), (int) structsize); + + /* For debugging purposes, we zero the whole master structure. + * But the application has already set the err pointer, and may have set + * client_data, so we have to save and restore those fields. + * Note: if application hasn't set client_data, tools like Purify may + * complain here. + */ + { + struct jpeg_error_mgr * err = cinfo->err; + void * client_data = cinfo->client_data; /* ignore Purify complaint here */ + MEMZERO(cinfo, SIZEOF(struct jpeg_decompress_struct)); + cinfo->err = err; + cinfo->client_data = client_data; + } + cinfo->is_decompressor = TRUE; + + /* Initialize a memory manager instance for this object */ + jinit_memory_mgr((j_common_ptr) cinfo); + + /* Zero out pointers to permanent structures. */ + cinfo->progress = NULL; + cinfo->src = NULL; + + for (i = 0; i < NUM_QUANT_TBLS; i++) + cinfo->quant_tbl_ptrs[i] = NULL; + + for (i = 0; i < NUM_HUFF_TBLS; i++) { + cinfo->dc_huff_tbl_ptrs[i] = NULL; + cinfo->ac_huff_tbl_ptrs[i] = NULL; + } + + /* Initialize marker processor so application can override methods + * for COM, APPn markers before calling jpeg_read_header. + */ + cinfo->marker_list = NULL; + jinit_marker_reader(cinfo); + + /* And initialize the overall input controller. */ + jinit_input_controller(cinfo); + + /* OK, I'm ready */ + cinfo->global_state = DSTATE_START; +} + + +/* + * Destruction of a JPEG decompression object + */ + +GLOBAL(void) +jpeg_destroy_decompress (j_decompress_ptr cinfo) +{ + jpeg_destroy((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Abort processing of a JPEG decompression operation, + * but don't destroy the object itself. + */ + +GLOBAL(void) +jpeg_abort_decompress (j_decompress_ptr cinfo) +{ + jpeg_abort((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Set default decompression parameters. + */ + +LOCAL(void) +default_decompress_parms (j_decompress_ptr cinfo) +{ + int cid0, cid1, cid2, cid3; + + /* Guess the input colorspace, and set output colorspace accordingly. */ + /* Note application may override our guesses. */ + switch (cinfo->num_components) { + case 1: + cinfo->jpeg_color_space = JCS_GRAYSCALE; + cinfo->out_color_space = JCS_GRAYSCALE; + break; + + case 3: + cid0 = cinfo->comp_info[0].component_id; + cid1 = cinfo->comp_info[1].component_id; + cid2 = cinfo->comp_info[2].component_id; + + /* For robust detection of standard colorspaces + * regardless of the presence of special markers, + * check component IDs from SOF marker first. + */ + if (cid0 == 0x01 && cid1 == 0x02 && cid2 == 0x03) + cinfo->jpeg_color_space = JCS_YCbCr; + else if (cid0 == 0x01 && cid1 == 0x22 && cid2 == 0x23) + cinfo->jpeg_color_space = JCS_BG_YCC; + else if (cid0 == 0x52 && cid1 == 0x47 && cid2 == 0x42) + cinfo->jpeg_color_space = JCS_RGB; /* ASCII 'R', 'G', 'B' */ + else if (cid0 == 0x72 && cid1 == 0x67 && cid2 == 0x62) + cinfo->jpeg_color_space = JCS_BG_RGB; /* ASCII 'r', 'g', 'b' */ + else if (cinfo->saw_JFIF_marker) + cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */ + else if (cinfo->saw_Adobe_marker) { + switch (cinfo->Adobe_transform) { + case 0: + cinfo->jpeg_color_space = JCS_RGB; + break; + case 1: + cinfo->jpeg_color_space = JCS_YCbCr; + break; + default: + WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform); + cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */ + } + } else { + TRACEMS3(cinfo, 1, JTRC_UNKNOWN_IDS, cid0, cid1, cid2); + cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */ + } + /* Always guess RGB is proper output colorspace. */ + cinfo->out_color_space = JCS_RGB; + break; + + case 4: + cid0 = cinfo->comp_info[0].component_id; + cid1 = cinfo->comp_info[1].component_id; + cid2 = cinfo->comp_info[2].component_id; + cid3 = cinfo->comp_info[3].component_id; + + /* For robust detection of standard colorspaces + * regardless of the presence of special markers, + * check component IDs from SOF marker first. + */ + if (cid0 == 0x01 && cid1 == 0x02 && cid2 == 0x03 && cid3 == 0x04) + cinfo->jpeg_color_space = JCS_YCCK; + else if (cid0 == 0x43 && cid1 == 0x4D && cid2 == 0x59 && cid3 == 0x4B) + cinfo->jpeg_color_space = JCS_CMYK; /* ASCII 'C', 'M', 'Y', 'K' */ + else if (cinfo->saw_Adobe_marker) { + switch (cinfo->Adobe_transform) { + case 0: + cinfo->jpeg_color_space = JCS_CMYK; + break; + case 2: + cinfo->jpeg_color_space = JCS_YCCK; + break; + default: + WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform); + cinfo->jpeg_color_space = JCS_YCCK; /* assume it's YCCK */ + } + } else { + /* Unknown IDs and no special markers, assume straight CMYK. */ + cinfo->jpeg_color_space = JCS_CMYK; + } + cinfo->out_color_space = JCS_CMYK; + break; + + default: + cinfo->jpeg_color_space = JCS_UNKNOWN; + cinfo->out_color_space = JCS_UNKNOWN; + } + + /* Set defaults for other decompression parameters. */ + cinfo->scale_num = cinfo->block_size; /* 1:1 scaling */ + cinfo->scale_denom = cinfo->block_size; + cinfo->output_gamma = 1.0; + cinfo->buffered_image = FALSE; + cinfo->raw_data_out = FALSE; + cinfo->dct_method = JDCT_DEFAULT; + cinfo->do_fancy_upsampling = TRUE; + cinfo->do_block_smoothing = TRUE; + cinfo->quantize_colors = FALSE; + /* We set these in case application only sets quantize_colors. */ + cinfo->dither_mode = JDITHER_FS; +#ifdef QUANT_2PASS_SUPPORTED + cinfo->two_pass_quantize = TRUE; +#else + cinfo->two_pass_quantize = FALSE; +#endif + cinfo->desired_number_of_colors = 256; + cinfo->colormap = NULL; + /* Initialize for no mode change in buffered-image mode. */ + cinfo->enable_1pass_quant = FALSE; + cinfo->enable_external_quant = FALSE; + cinfo->enable_2pass_quant = FALSE; +} + + +/* + * Decompression startup: read start of JPEG datastream to see what's there. + * Need only initialize JPEG object and supply a data source before calling. + * + * This routine will read as far as the first SOS marker (ie, actual start of + * compressed data), and will save all tables and parameters in the JPEG + * object. It will also initialize the decompression parameters to default + * values, and finally return JPEG_HEADER_OK. On return, the application may + * adjust the decompression parameters and then call jpeg_start_decompress. + * (Or, if the application only wanted to determine the image parameters, + * the data need not be decompressed. In that case, call jpeg_abort or + * jpeg_destroy to release any temporary space.) + * If an abbreviated (tables only) datastream is presented, the routine will + * return JPEG_HEADER_TABLES_ONLY upon reaching EOI. The application may then + * re-use the JPEG object to read the abbreviated image datastream(s). + * It is unnecessary (but OK) to call jpeg_abort in this case. + * The JPEG_SUSPENDED return code only occurs if the data source module + * requests suspension of the decompressor. In this case the application + * should load more source data and then re-call jpeg_read_header to resume + * processing. + * If a non-suspending data source is used and require_image is TRUE, then the + * return code need not be inspected since only JPEG_HEADER_OK is possible. + * + * This routine is now just a front end to jpeg_consume_input, with some + * extra error checking. + */ + +GLOBAL(int) +jpeg_read_header (j_decompress_ptr cinfo, boolean require_image) +{ + int retcode; + + if (cinfo->global_state != DSTATE_START && + cinfo->global_state != DSTATE_INHEADER) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + retcode = jpeg_consume_input(cinfo); + + switch (retcode) { + case JPEG_REACHED_SOS: + retcode = JPEG_HEADER_OK; + break; + case JPEG_REACHED_EOI: + if (require_image) /* Complain if application wanted an image */ + ERREXIT(cinfo, JERR_NO_IMAGE); + /* Reset to start state; it would be safer to require the application to + * call jpeg_abort, but we can't change it now for compatibility reasons. + * A side effect is to free any temporary memory (there shouldn't be any). + */ + jpeg_abort((j_common_ptr) cinfo); /* sets state = DSTATE_START */ + retcode = JPEG_HEADER_TABLES_ONLY; + break; + case JPEG_SUSPENDED: + /* no work */ + break; + } + + return retcode; +} + + +/* + * Consume data in advance of what the decompressor requires. + * This can be called at any time once the decompressor object has + * been created and a data source has been set up. + * + * This routine is essentially a state machine that handles a couple + * of critical state-transition actions, namely initial setup and + * transition from header scanning to ready-for-start_decompress. + * All the actual input is done via the input controller's consume_input + * method. + */ + +GLOBAL(int) +jpeg_consume_input (j_decompress_ptr cinfo) +{ + int retcode = JPEG_SUSPENDED; + + /* NB: every possible DSTATE value should be listed in this switch */ + switch (cinfo->global_state) { + case DSTATE_START: + /* Start-of-datastream actions: reset appropriate modules */ + (*cinfo->inputctl->reset_input_controller) (cinfo); + /* Initialize application's data source module */ + (*cinfo->src->init_source) (cinfo); + cinfo->global_state = DSTATE_INHEADER; + /*FALLTHROUGH*/ + case DSTATE_INHEADER: + retcode = (*cinfo->inputctl->consume_input) (cinfo); + if (retcode == JPEG_REACHED_SOS) { /* Found SOS, prepare to decompress */ + /* Set up default parameters based on header data */ + default_decompress_parms(cinfo); + /* Set global state: ready for start_decompress */ + cinfo->global_state = DSTATE_READY; + } + break; + case DSTATE_READY: + /* Can't advance past first SOS until start_decompress is called */ + retcode = JPEG_REACHED_SOS; + break; + case DSTATE_PRELOAD: + case DSTATE_PRESCAN: + case DSTATE_SCANNING: + case DSTATE_RAW_OK: + case DSTATE_BUFIMAGE: + case DSTATE_BUFPOST: + case DSTATE_STOPPING: + retcode = (*cinfo->inputctl->consume_input) (cinfo); + break; + default: + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + } + return retcode; +} + + +/* + * Have we finished reading the input file? + */ + +GLOBAL(boolean) +jpeg_input_complete (j_decompress_ptr cinfo) +{ + /* Check for valid jpeg object */ + if (cinfo->global_state < DSTATE_START || + cinfo->global_state > DSTATE_STOPPING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + return cinfo->inputctl->eoi_reached; +} + + +/* + * Is there more than one scan? + */ + +GLOBAL(boolean) +jpeg_has_multiple_scans (j_decompress_ptr cinfo) +{ + /* Only valid after jpeg_read_header completes */ + if (cinfo->global_state < DSTATE_READY || + cinfo->global_state > DSTATE_STOPPING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + return cinfo->inputctl->has_multiple_scans; +} + + +/* + * Finish JPEG decompression. + * + * This will normally just verify the file trailer and release temp storage. + * + * Returns FALSE if suspended. The return value need be inspected only if + * a suspending data source is used. + */ + +GLOBAL(boolean) +jpeg_finish_decompress (j_decompress_ptr cinfo) +{ + if ((cinfo->global_state == DSTATE_SCANNING || + cinfo->global_state == DSTATE_RAW_OK) && ! cinfo->buffered_image) { + /* Terminate final pass of non-buffered mode */ + if (cinfo->output_scanline < cinfo->output_height) + ERREXIT(cinfo, JERR_TOO_LITTLE_DATA); + (*cinfo->master->finish_output_pass) (cinfo); + cinfo->global_state = DSTATE_STOPPING; + } else if (cinfo->global_state == DSTATE_BUFIMAGE) { + /* Finishing after a buffered-image operation */ + cinfo->global_state = DSTATE_STOPPING; + } else if (cinfo->global_state != DSTATE_STOPPING) { + /* STOPPING = repeat call after a suspension, anything else is error */ + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + } + /* Read until EOI */ + while (! cinfo->inputctl->eoi_reached) { + if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED) + return FALSE; /* Suspend, come back later */ + } + /* Do final cleanup */ + (*cinfo->src->term_source) (cinfo); + /* We can use jpeg_abort to release memory and reset global_state */ + jpeg_abort((j_common_ptr) cinfo); + return TRUE; +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdapistd.c b/widget/milsko/milskosrc/external/libjpeg/src/jdapistd.c new file mode 100644 index 0000000000..7f3a78b25a --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdapistd.c @@ -0,0 +1,276 @@ +/* + * jdapistd.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2002-2013 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the decompression half + * of the JPEG library. These are the "standard" API routines that are + * used in the normal full-decompression case. They are not used by a + * transcoding-only application. Note that if an application links in + * jpeg_start_decompress, it will end up linking in the entire decompressor. + * We thus must separate this file from jdapimin.c to avoid linking the + * whole decompression library into a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Forward declarations */ +LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo)); + + +/* + * Decompression initialization. + * jpeg_read_header must be completed before calling this. + * + * If a multipass operating mode was selected, this will do all but the + * last pass, and thus may take a great deal of time. + * + * Returns FALSE if suspended. The return value need be inspected only if + * a suspending data source is used. + */ + +GLOBAL(boolean) +jpeg_start_decompress (j_decompress_ptr cinfo) +{ + if (cinfo->global_state == DSTATE_READY) { + /* First call: initialize master control, select active modules */ + jinit_master_decompress(cinfo); + if (cinfo->buffered_image) { + /* No more work here; expecting jpeg_start_output next */ + cinfo->global_state = DSTATE_BUFIMAGE; + return TRUE; + } + cinfo->global_state = DSTATE_PRELOAD; + } + if (cinfo->global_state == DSTATE_PRELOAD) { + /* If file has multiple scans, absorb them all into the coef buffer */ + if (cinfo->inputctl->has_multiple_scans) { +#ifdef D_MULTISCAN_FILES_SUPPORTED + for (;;) { + int retcode; + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + /* Absorb some more input */ + retcode = (*cinfo->inputctl->consume_input) (cinfo); + if (retcode == JPEG_SUSPENDED) + return FALSE; + if (retcode == JPEG_REACHED_EOI) + break; + /* Advance progress counter if appropriate */ + if (cinfo->progress != NULL && + (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) { + if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { + /* jdmaster underestimated number of scans; ratchet up one scan */ + cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; + } + } + } +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif /* D_MULTISCAN_FILES_SUPPORTED */ + } + cinfo->output_scan_number = cinfo->input_scan_number; + } else if (cinfo->global_state != DSTATE_PRESCAN) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Perform any dummy output passes, and set up for the final pass */ + return output_pass_setup(cinfo); +} + + +/* + * Set up for an output pass, and perform any dummy pass(es) needed. + * Common subroutine for jpeg_start_decompress and jpeg_start_output. + * Entry: global_state = DSTATE_PRESCAN only if previously suspended. + * Exit: If done, returns TRUE and sets global_state for proper output mode. + * If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN. + */ + +LOCAL(boolean) +output_pass_setup (j_decompress_ptr cinfo) +{ + if (cinfo->global_state != DSTATE_PRESCAN) { + /* First call: do pass setup */ + (*cinfo->master->prepare_for_output_pass) (cinfo); + cinfo->output_scanline = 0; + cinfo->global_state = DSTATE_PRESCAN; + } + /* Loop over any required dummy passes */ + while (cinfo->master->is_dummy_pass) { +#ifdef QUANT_2PASS_SUPPORTED + /* Crank through the dummy pass */ + while (cinfo->output_scanline < cinfo->output_height) { + JDIMENSION last_scanline; + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->output_scanline; + cinfo->progress->pass_limit = (long) cinfo->output_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + /* Process some data */ + last_scanline = cinfo->output_scanline; + (*cinfo->main->process_data) (cinfo, (JSAMPARRAY) NULL, + &cinfo->output_scanline, (JDIMENSION) 0); + if (cinfo->output_scanline == last_scanline) + return FALSE; /* No progress made, must suspend */ + } + /* Finish up dummy pass, and set up for another one */ + (*cinfo->master->finish_output_pass) (cinfo); + (*cinfo->master->prepare_for_output_pass) (cinfo); + cinfo->output_scanline = 0; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif /* QUANT_2PASS_SUPPORTED */ + } + /* Ready for application to drive output pass through + * jpeg_read_scanlines or jpeg_read_raw_data. + */ + cinfo->global_state = cinfo->raw_data_out ? DSTATE_RAW_OK : DSTATE_SCANNING; + return TRUE; +} + + +/* + * Read some scanlines of data from the JPEG decompressor. + * + * The return value will be the number of lines actually read. + * This may be less than the number requested in several cases, + * including bottom of image, data source suspension, and operating + * modes that emit multiple scanlines at a time. + * + * Note: we warn about excess calls to jpeg_read_scanlines() since + * this likely signals an application programmer error. However, + * an oversize buffer (max_lines > scanlines remaining) is not an error. + */ + +GLOBAL(JDIMENSION) +jpeg_read_scanlines (j_decompress_ptr cinfo, JSAMPARRAY scanlines, + JDIMENSION max_lines) +{ + JDIMENSION row_ctr; + + if (cinfo->global_state != DSTATE_SCANNING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->output_scanline >= cinfo->output_height) { + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + return 0; + } + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->output_scanline; + cinfo->progress->pass_limit = (long) cinfo->output_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Process some data */ + row_ctr = 0; + (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, max_lines); + cinfo->output_scanline += row_ctr; + return row_ctr; +} + + +/* + * Alternate entry point to read raw data. + * Processes exactly one iMCU row per call, unless suspended. + */ + +GLOBAL(JDIMENSION) +jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data, + JDIMENSION max_lines) +{ + JDIMENSION lines_per_iMCU_row; + + if (cinfo->global_state != DSTATE_RAW_OK) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->output_scanline >= cinfo->output_height) { + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + return 0; + } + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->output_scanline; + cinfo->progress->pass_limit = (long) cinfo->output_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Verify that at least one iMCU row can be returned. */ + lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_v_scaled_size; + if (max_lines < lines_per_iMCU_row) + ERREXIT(cinfo, JERR_BUFFER_SIZE); + + /* Decompress directly into user's buffer. */ + if (! (*cinfo->coef->decompress_data) (cinfo, data)) + return 0; /* suspension forced, can do nothing more */ + + /* OK, we processed one iMCU row. */ + cinfo->output_scanline += lines_per_iMCU_row; + return lines_per_iMCU_row; +} + + +/* Additional entry points for buffered-image mode. */ + +#ifdef D_MULTISCAN_FILES_SUPPORTED + +/* + * Initialize for an output pass in buffered-image mode. + */ + +GLOBAL(boolean) +jpeg_start_output (j_decompress_ptr cinfo, int scan_number) +{ + if (cinfo->global_state != DSTATE_BUFIMAGE && + cinfo->global_state != DSTATE_PRESCAN) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Limit scan number to valid range */ + if (scan_number <= 0) + scan_number = 1; + if (cinfo->inputctl->eoi_reached && + scan_number > cinfo->input_scan_number) + scan_number = cinfo->input_scan_number; + cinfo->output_scan_number = scan_number; + /* Perform any dummy output passes, and set up for the real pass */ + return output_pass_setup(cinfo); +} + + +/* + * Finish up after an output pass in buffered-image mode. + * + * Returns FALSE if suspended. The return value need be inspected only if + * a suspending data source is used. + */ + +GLOBAL(boolean) +jpeg_finish_output (j_decompress_ptr cinfo) +{ + if ((cinfo->global_state == DSTATE_SCANNING || + cinfo->global_state == DSTATE_RAW_OK) && cinfo->buffered_image) { + /* Terminate this pass. */ + /* We do not require the whole pass to have been completed. */ + (*cinfo->master->finish_output_pass) (cinfo); + cinfo->global_state = DSTATE_BUFPOST; + } else if (cinfo->global_state != DSTATE_BUFPOST) { + /* BUFPOST = repeat call after a suspension, anything else is error */ + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + } + /* Read markers looking for SOS or EOI */ + while (cinfo->input_scan_number <= cinfo->output_scan_number && + ! cinfo->inputctl->eoi_reached) { + if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED) + return FALSE; /* Suspend, come back later */ + } + cinfo->global_state = DSTATE_BUFIMAGE; + return TRUE; +} + +#endif /* D_MULTISCAN_FILES_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdarith.c b/widget/milsko/milskosrc/external/libjpeg/src/jdarith.c new file mode 100644 index 0000000000..2c9abe23f2 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdarith.c @@ -0,0 +1,796 @@ +/* + * jdarith.c + * + * Developed 1997-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains portable arithmetic entropy decoding routines for JPEG + * (implementing the ISO/IEC IS 10918-1 and CCITT Recommendation ITU-T T.81). + * + * Both sequential and progressive modes are supported in this single module. + * + * Suspension is not currently supported in this module. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Expanded entropy decoder object for arithmetic decoding. */ + +typedef struct { + struct jpeg_entropy_decoder pub; /* public fields */ + + INT32 c; /* C register, base of coding interval + input bit buffer */ + INT32 a; /* A register, normalized size of coding interval */ + int ct; /* bit shift counter, # of bits left in bit buffer part of C */ + /* init: ct = -16 */ + /* run: ct = 0..7 */ + /* error: ct = -1 */ + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ + int dc_context[MAX_COMPS_IN_SCAN]; /* context index for DC conditioning */ + + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + + /* Pointers to statistics areas (these workspaces have image lifespan) */ + unsigned char * dc_stats[NUM_ARITH_TBLS]; + unsigned char * ac_stats[NUM_ARITH_TBLS]; + + /* Statistics bin for coding with fixed probability 0.5 */ + unsigned char fixed_bin[4]; +} arith_entropy_decoder; + +typedef arith_entropy_decoder * arith_entropy_ptr; + +/* The following two definitions specify the allocation chunk size + * for the statistics area. + * According to sections F.1.4.4.1.3 and F.1.4.4.2, we need at least + * 49 statistics bins for DC, and 245 statistics bins for AC coding. + * + * We use a compact representation with 1 byte per statistics bin, + * thus the numbers directly represent byte sizes. + * This 1 byte per statistics bin contains the meaning of the MPS + * (more probable symbol) in the highest bit (mask 0x80), and the + * index into the probability estimation state machine table + * in the lower bits (mask 0x7F). + */ + +#define DC_STAT_BINS 64 +#define AC_STAT_BINS 256 + + +LOCAL(int) +get_byte (j_decompress_ptr cinfo) +/* Read next input byte; we do not support suspension in this module. */ +{ + struct jpeg_source_mgr * src = cinfo->src; + + if (src->bytes_in_buffer == 0) + if (! (*src->fill_input_buffer) (cinfo)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + src->bytes_in_buffer--; + return GETJOCTET(*src->next_input_byte++); +} + + +/* + * The core arithmetic decoding routine (common in JPEG and JBIG). + * This needs to go as fast as possible. + * Machine-dependent optimization facilities + * are not utilized in this portable implementation. + * However, this code should be fairly efficient and + * may be a good base for further optimizations anyway. + * + * Return value is 0 or 1 (binary decision). + * + * Note: I've changed the handling of the code base & bit + * buffer register C compared to other implementations + * based on the standards layout & procedures. + * While it also contains both the actual base of the + * coding interval (16 bits) and the next-bits buffer, + * the cut-point between these two parts is floating + * (instead of fixed) with the bit shift counter CT. + * Thus, we also need only one (variable instead of + * fixed size) shift for the LPS/MPS decision, and + * we can do away with any renormalization update + * of C (except for new data insertion, of course). + * + * I've also introduced a new scheme for accessing + * the probability estimation state machine table, + * derived from Markus Kuhn's JBIG implementation. + */ + +LOCAL(int) +arith_decode (j_decompress_ptr cinfo, unsigned char *st) +{ + register arith_entropy_ptr e = (arith_entropy_ptr) cinfo->entropy; + register unsigned char nl, nm; + register INT32 qe, temp; + register int sv, data; + + /* Renormalization & data input per section D.2.6 */ + while (e->a < 0x8000L) { + if (--e->ct < 0) { + /* Need to fetch next data byte */ + if (cinfo->unread_marker) + data = 0; /* stuff zero data */ + else { + data = get_byte(cinfo); /* read next input byte */ + if (data == 0xFF) { /* zero stuff or marker code */ + do data = get_byte(cinfo); + while (data == 0xFF); /* swallow extra 0xFF bytes */ + if (data == 0) + data = 0xFF; /* discard stuffed zero byte */ + else { + /* Note: Different from the Huffman decoder, hitting + * a marker while processing the compressed data + * segment is legal in arithmetic coding. + * The convention is to supply zero data + * then until decoding is complete. + */ + cinfo->unread_marker = data; + data = 0; + } + } + } + e->c = (e->c << 8) | data; /* insert data into C register */ + if ((e->ct += 8) < 0) /* update bit shift counter */ + /* Need more initial bytes */ + if (++e->ct == 0) + /* Got 2 initial bytes -> re-init A and exit loop */ + e->a = 0x8000L; /* => e->a = 0x10000L after loop exit */ + } + e->a <<= 1; + } + + /* Fetch values from our compact representation of Table D.3(D.2): + * Qe values and probability estimation state machine + */ + sv = *st; + qe = jpeg_aritab[sv & 0x7F]; /* => Qe_Value */ + nl = qe & 0xFF; qe >>= 8; /* Next_Index_LPS + Switch_MPS */ + nm = qe & 0xFF; qe >>= 8; /* Next_Index_MPS */ + + /* Decode & estimation procedures per sections D.2.4 & D.2.5 */ + temp = e->a - qe; + e->a = temp; + temp <<= e->ct; + if (e->c >= temp) { + e->c -= temp; + /* Conditional LPS (less probable symbol) exchange */ + if (e->a < qe) { + e->a = qe; + *st = (sv & 0x80) ^ nm; /* Estimate_after_MPS */ + } else { + e->a = qe; + *st = (sv & 0x80) ^ nl; /* Estimate_after_LPS */ + sv ^= 0x80; /* Exchange LPS/MPS */ + } + } else if (e->a < 0x8000L) { + /* Conditional MPS (more probable symbol) exchange */ + if (e->a < qe) { + *st = (sv & 0x80) ^ nl; /* Estimate_after_LPS */ + sv ^= 0x80; /* Exchange LPS/MPS */ + } else { + *st = (sv & 0x80) ^ nm; /* Estimate_after_MPS */ + } + } + + return sv >> 7; +} + + +/* + * Check for a restart marker & resynchronize decoder. + */ + +LOCAL(void) +process_restart (j_decompress_ptr cinfo) +{ + arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; + int ci; + jpeg_component_info * compptr; + + /* Advance past the RSTn marker */ + if (! (*cinfo->marker->read_restart_marker) (cinfo)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + + /* Re-initialize statistics areas */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + if (! cinfo->progressive_mode || (cinfo->Ss == 0 && cinfo->Ah == 0)) { + MEMZERO(entropy->dc_stats[compptr->dc_tbl_no], DC_STAT_BINS); + /* Reset DC predictions to 0 */ + entropy->last_dc_val[ci] = 0; + entropy->dc_context[ci] = 0; + } + if ((! cinfo->progressive_mode && cinfo->lim_Se) || + (cinfo->progressive_mode && cinfo->Ss)) { + MEMZERO(entropy->ac_stats[compptr->ac_tbl_no], AC_STAT_BINS); + } + } + + /* Reset arithmetic decoding variables */ + entropy->c = 0; + entropy->a = 0; + entropy->ct = -16; /* force reading 2 initial bytes to fill C */ + + /* Reset restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; +} + + +/* + * Arithmetic MCU decoding. + * Each of these routines decodes and returns one MCU's worth of + * arithmetic-compressed coefficients. + * The coefficients are reordered from zigzag order into natural array order, + * but are not dequantized. + * + * The i'th block of the MCU is stored into the block pointed to by + * MCU_data[i]. WE ASSUME THIS AREA IS INITIALLY ZEROED BY THE CALLER. + */ + +/* + * MCU decoding for DC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; + JBLOCKROW block; + unsigned char *st; + int blkn, ci, tbl, sign; + int v, m; + + /* Process restart marker if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + process_restart(cinfo); + entropy->restarts_to_go--; + } + + if (entropy->ct == -1) return TRUE; /* if error do nothing */ + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + ci = cinfo->MCU_membership[blkn]; + tbl = cinfo->cur_comp_info[ci]->dc_tbl_no; + + /* Sections F.2.4.1 & F.1.4.4.1: Decoding of DC coefficients */ + + /* Table F.4: Point to statistics bin S0 for DC coefficient coding */ + st = entropy->dc_stats[tbl] + entropy->dc_context[ci]; + + /* Figure F.19: Decode_DC_DIFF */ + if (arith_decode(cinfo, st) == 0) + entropy->dc_context[ci] = 0; + else { + /* Figure F.21: Decoding nonzero value v */ + /* Figure F.22: Decoding the sign of v */ + sign = arith_decode(cinfo, st + 1); + st += 2; st += sign; + /* Figure F.23: Decoding the magnitude category of v */ + if ((m = arith_decode(cinfo, st)) != 0) { + st = entropy->dc_stats[tbl] + 20; /* Table F.4: X1 = 20 */ + while (arith_decode(cinfo, st)) { + if ((m <<= 1) == (int) 0x8000U) { + WARNMS(cinfo, JWRN_ARITH_BAD_CODE); + entropy->ct = -1; /* magnitude overflow */ + return TRUE; + } + st += 1; + } + } + /* Section F.1.4.4.1.2: Establish dc_context conditioning category */ + if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1)) + entropy->dc_context[ci] = 0; /* zero diff category */ + else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1)) + entropy->dc_context[ci] = 12 + (sign * 4); /* large diff category */ + else + entropy->dc_context[ci] = 4 + (sign * 4); /* small diff category */ + v = m; + /* Figure F.24: Decoding the magnitude bit pattern of v */ + st += 14; + while (m >>= 1) + if (arith_decode(cinfo, st)) v |= m; + v += 1; if (sign) v = -v; + entropy->last_dc_val[ci] += v; + } + + /* Scale and output the DC coefficient (assumes jpeg_natural_order[0]=0) */ + (*block)[0] = (JCOEF) (entropy->last_dc_val[ci] << cinfo->Al); + } + + return TRUE; +} + + +/* + * MCU decoding for AC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; + JBLOCKROW block; + unsigned char *st; + int tbl, sign, k; + int v, m; + const int * natural_order; + + /* Process restart marker if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + process_restart(cinfo); + entropy->restarts_to_go--; + } + + if (entropy->ct == -1) return TRUE; /* if error do nothing */ + + natural_order = cinfo->natural_order; + + /* There is always only one block per MCU */ + block = MCU_data[0]; + tbl = cinfo->cur_comp_info[0]->ac_tbl_no; + + /* Sections F.2.4.2 & F.1.4.4.2: Decoding of AC coefficients */ + + /* Figure F.20: Decode_AC_coefficients */ + k = cinfo->Ss - 1; + do { + st = entropy->ac_stats[tbl] + 3 * k; + if (arith_decode(cinfo, st)) break; /* EOB flag */ + for (;;) { + k++; + if (arith_decode(cinfo, st + 1)) break; + st += 3; + if (k >= cinfo->Se) { + WARNMS(cinfo, JWRN_ARITH_BAD_CODE); + entropy->ct = -1; /* spectral overflow */ + return TRUE; + } + } + /* Figure F.21: Decoding nonzero value v */ + /* Figure F.22: Decoding the sign of v */ + sign = arith_decode(cinfo, entropy->fixed_bin); + st += 2; + /* Figure F.23: Decoding the magnitude category of v */ + if ((m = arith_decode(cinfo, st)) != 0) { + if (arith_decode(cinfo, st)) { + m <<= 1; + st = entropy->ac_stats[tbl] + + (k <= cinfo->arith_ac_K[tbl] ? 189 : 217); + while (arith_decode(cinfo, st)) { + if ((m <<= 1) == (int) 0x8000U) { + WARNMS(cinfo, JWRN_ARITH_BAD_CODE); + entropy->ct = -1; /* magnitude overflow */ + return TRUE; + } + st += 1; + } + } + } + v = m; + /* Figure F.24: Decoding the magnitude bit pattern of v */ + st += 14; + while (m >>= 1) + if (arith_decode(cinfo, st)) v |= m; + v += 1; if (sign) v = -v; + /* Scale and output coefficient in natural (dezigzagged) order */ + (*block)[natural_order[k]] = (JCOEF) (v << cinfo->Al); + } while (k < cinfo->Se); + + return TRUE; +} + + +/* + * MCU decoding for DC successive approximation refinement scan. + * Note: we assume such scans can be multi-component, + * although the spec is not very clear on the point. + */ + +METHODDEF(boolean) +decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; + unsigned char *st; + JCOEF p1; + int blkn; + + /* Process restart marker if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + process_restart(cinfo); + entropy->restarts_to_go--; + } + + st = entropy->fixed_bin; /* use fixed probability estimation */ + p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + /* Encoded data is simply the next bit of the two's-complement DC value */ + if (arith_decode(cinfo, st)) + MCU_data[blkn][0][0] |= p1; + } + + return TRUE; +} + + +/* + * MCU decoding for AC successive approximation refinement scan. + */ + +METHODDEF(boolean) +decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; + JBLOCKROW block; + JCOEFPTR thiscoef; + unsigned char *st; + int tbl, k, kex; + JCOEF p1, m1; + const int * natural_order; + + /* Process restart marker if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + process_restart(cinfo); + entropy->restarts_to_go--; + } + + if (entropy->ct == -1) return TRUE; /* if error do nothing */ + + natural_order = cinfo->natural_order; + + /* There is always only one block per MCU */ + block = MCU_data[0]; + tbl = cinfo->cur_comp_info[0]->ac_tbl_no; + + p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ + m1 = -p1; /* -1 in the bit position being coded */ + + /* Establish EOBx (previous stage end-of-block) index */ + kex = cinfo->Se; + do { + if ((*block)[natural_order[kex]]) break; + } while (--kex); + + k = cinfo->Ss - 1; + do { + st = entropy->ac_stats[tbl] + 3 * k; + if (k >= kex) + if (arith_decode(cinfo, st)) break; /* EOB flag */ + for (;;) { + thiscoef = *block + natural_order[++k]; + if (*thiscoef) { /* previously nonzero coef */ + if (arith_decode(cinfo, st + 2)) { + if (*thiscoef < 0) + *thiscoef += m1; + else + *thiscoef += p1; + } + break; + } + if (arith_decode(cinfo, st + 1)) { /* newly nonzero coef */ + if (arith_decode(cinfo, entropy->fixed_bin)) + *thiscoef = m1; + else + *thiscoef = p1; + break; + } + st += 3; + if (k >= cinfo->Se) { + WARNMS(cinfo, JWRN_ARITH_BAD_CODE); + entropy->ct = -1; /* spectral overflow */ + return TRUE; + } + } + } while (k < cinfo->Se); + + return TRUE; +} + + +/* + * Decode one MCU's worth of arithmetic-compressed coefficients. + */ + +METHODDEF(boolean) +decode_mcu (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; + jpeg_component_info * compptr; + JBLOCKROW block; + unsigned char *st; + int blkn, ci, tbl, sign, k; + int v, m; + const int * natural_order; + + /* Process restart marker if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + process_restart(cinfo); + entropy->restarts_to_go--; + } + + if (entropy->ct == -1) return TRUE; /* if error do nothing */ + + natural_order = cinfo->natural_order; + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + + /* Sections F.2.4.1 & F.1.4.4.1: Decoding of DC coefficients */ + + tbl = compptr->dc_tbl_no; + + /* Table F.4: Point to statistics bin S0 for DC coefficient coding */ + st = entropy->dc_stats[tbl] + entropy->dc_context[ci]; + + /* Figure F.19: Decode_DC_DIFF */ + if (arith_decode(cinfo, st) == 0) + entropy->dc_context[ci] = 0; + else { + /* Figure F.21: Decoding nonzero value v */ + /* Figure F.22: Decoding the sign of v */ + sign = arith_decode(cinfo, st + 1); + st += 2; st += sign; + /* Figure F.23: Decoding the magnitude category of v */ + if ((m = arith_decode(cinfo, st)) != 0) { + st = entropy->dc_stats[tbl] + 20; /* Table F.4: X1 = 20 */ + while (arith_decode(cinfo, st)) { + if ((m <<= 1) == (int) 0x8000U) { + WARNMS(cinfo, JWRN_ARITH_BAD_CODE); + entropy->ct = -1; /* magnitude overflow */ + return TRUE; + } + st += 1; + } + } + /* Section F.1.4.4.1.2: Establish dc_context conditioning category */ + if (m < (int) ((1L << cinfo->arith_dc_L[tbl]) >> 1)) + entropy->dc_context[ci] = 0; /* zero diff category */ + else if (m > (int) ((1L << cinfo->arith_dc_U[tbl]) >> 1)) + entropy->dc_context[ci] = 12 + (sign * 4); /* large diff category */ + else + entropy->dc_context[ci] = 4 + (sign * 4); /* small diff category */ + v = m; + /* Figure F.24: Decoding the magnitude bit pattern of v */ + st += 14; + while (m >>= 1) + if (arith_decode(cinfo, st)) v |= m; + v += 1; if (sign) v = -v; + entropy->last_dc_val[ci] += v; + } + + (*block)[0] = (JCOEF) entropy->last_dc_val[ci]; + + /* Sections F.2.4.2 & F.1.4.4.2: Decoding of AC coefficients */ + + if (cinfo->lim_Se == 0) continue; + tbl = compptr->ac_tbl_no; + k = 0; + + /* Figure F.20: Decode_AC_coefficients */ + do { + st = entropy->ac_stats[tbl] + 3 * k; + if (arith_decode(cinfo, st)) break; /* EOB flag */ + for (;;) { + k++; + if (arith_decode(cinfo, st + 1)) break; + st += 3; + if (k >= cinfo->lim_Se) { + WARNMS(cinfo, JWRN_ARITH_BAD_CODE); + entropy->ct = -1; /* spectral overflow */ + return TRUE; + } + } + /* Figure F.21: Decoding nonzero value v */ + /* Figure F.22: Decoding the sign of v */ + sign = arith_decode(cinfo, entropy->fixed_bin); + st += 2; + /* Figure F.23: Decoding the magnitude category of v */ + if ((m = arith_decode(cinfo, st)) != 0) { + if (arith_decode(cinfo, st)) { + m <<= 1; + st = entropy->ac_stats[tbl] + + (k <= cinfo->arith_ac_K[tbl] ? 189 : 217); + while (arith_decode(cinfo, st)) { + if ((m <<= 1) == (int) 0x8000U) { + WARNMS(cinfo, JWRN_ARITH_BAD_CODE); + entropy->ct = -1; /* magnitude overflow */ + return TRUE; + } + st += 1; + } + } + } + v = m; + /* Figure F.24: Decoding the magnitude bit pattern of v */ + st += 14; + while (m >>= 1) + if (arith_decode(cinfo, st)) v |= m; + v += 1; if (sign) v = -v; + (*block)[natural_order[k]] = (JCOEF) v; + } while (k < cinfo->lim_Se); + } + + return TRUE; +} + + +/* + * Initialize for an arithmetic-compressed scan. + */ + +METHODDEF(void) +start_pass (j_decompress_ptr cinfo) +{ + arith_entropy_ptr entropy = (arith_entropy_ptr) cinfo->entropy; + int ci, tbl; + jpeg_component_info * compptr; + + if (cinfo->progressive_mode) { + /* Validate progressive scan parameters */ + if (cinfo->Ss == 0) { + if (cinfo->Se != 0) + goto bad; + } else { + /* need not check Ss/Se < 0 since they came from unsigned bytes */ + if (cinfo->Se < cinfo->Ss || cinfo->Se > cinfo->lim_Se) + goto bad; + /* AC scans may have only one component */ + if (cinfo->comps_in_scan != 1) + goto bad; + } + if (cinfo->Ah != 0) { + /* Successive approximation refinement scan: must have Al = Ah-1. */ + if (cinfo->Ah-1 != cinfo->Al) + goto bad; + } + if (cinfo->Al > 13) { /* need not check for < 0 */ + bad: + ERREXIT4(cinfo, JERR_BAD_PROGRESSION, + cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al); + } + /* Update progression status, and verify that scan order is legal. + * Note that inter-scan inconsistencies are treated as warnings + * not fatal errors ... not clear if this is right way to behave. + */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + int coefi, cindex = cinfo->cur_comp_info[ci]->component_index; + int *coef_bit_ptr = & cinfo->coef_bits[cindex][0]; + if (cinfo->Ss && coef_bit_ptr[0] < 0) /* AC without prior DC scan */ + WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0); + for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) { + int expected = (coef_bit_ptr[coefi] < 0) ? 0 : coef_bit_ptr[coefi]; + if (cinfo->Ah != expected) + WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi); + coef_bit_ptr[coefi] = cinfo->Al; + } + } + /* Select MCU decoding routine */ + if (cinfo->Ah == 0) { + if (cinfo->Ss == 0) + entropy->pub.decode_mcu = decode_mcu_DC_first; + else + entropy->pub.decode_mcu = decode_mcu_AC_first; + } else { + if (cinfo->Ss == 0) + entropy->pub.decode_mcu = decode_mcu_DC_refine; + else + entropy->pub.decode_mcu = decode_mcu_AC_refine; + } + } else { + /* Check that the scan parameters Ss, Se, Ah/Al are OK for sequential JPEG. + * This ought to be an error condition, but we make it a warning. + */ + if (cinfo->Ss != 0 || cinfo->Ah != 0 || cinfo->Al != 0 || + (cinfo->Se < DCTSIZE2 && cinfo->Se != cinfo->lim_Se)) + WARNMS(cinfo, JWRN_NOT_SEQUENTIAL); + /* Select MCU decoding routine */ + entropy->pub.decode_mcu = decode_mcu; + } + + /* Allocate & initialize requested statistics areas */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + if (! cinfo->progressive_mode || (cinfo->Ss == 0 && cinfo->Ah == 0)) { + tbl = compptr->dc_tbl_no; + if (tbl < 0 || tbl >= NUM_ARITH_TBLS) + ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl); + if (entropy->dc_stats[tbl] == NULL) + entropy->dc_stats[tbl] = (unsigned char *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, DC_STAT_BINS); + MEMZERO(entropy->dc_stats[tbl], DC_STAT_BINS); + /* Initialize DC predictions to 0 */ + entropy->last_dc_val[ci] = 0; + entropy->dc_context[ci] = 0; + } + if ((! cinfo->progressive_mode && cinfo->lim_Se) || + (cinfo->progressive_mode && cinfo->Ss)) { + tbl = compptr->ac_tbl_no; + if (tbl < 0 || tbl >= NUM_ARITH_TBLS) + ERREXIT1(cinfo, JERR_NO_ARITH_TABLE, tbl); + if (entropy->ac_stats[tbl] == NULL) + entropy->ac_stats[tbl] = (unsigned char *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, AC_STAT_BINS); + MEMZERO(entropy->ac_stats[tbl], AC_STAT_BINS); + } + } + + /* Initialize arithmetic decoding variables */ + entropy->c = 0; + entropy->a = 0; + entropy->ct = -16; /* force reading 2 initial bytes to fill C */ + + /* Initialize restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; +} + + +/* + * Finish up at the end of an arithmetic-compressed scan. + */ + +METHODDEF(void) +finish_pass (j_decompress_ptr cinfo) +{ + /* no work necessary here */ +} + + +/* + * Module initialization routine for arithmetic entropy decoding. + */ + +GLOBAL(void) +jinit_arith_decoder (j_decompress_ptr cinfo) +{ + arith_entropy_ptr entropy; + int i; + + entropy = (arith_entropy_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(arith_entropy_decoder)); + cinfo->entropy = &entropy->pub; + entropy->pub.start_pass = start_pass; + entropy->pub.finish_pass = finish_pass; + + /* Mark tables unallocated */ + for (i = 0; i < NUM_ARITH_TBLS; i++) { + entropy->dc_stats[i] = NULL; + entropy->ac_stats[i] = NULL; + } + + /* Initialize index for fixed probability estimation */ + entropy->fixed_bin[0] = 113; + + if (cinfo->progressive_mode) { + /* Create progression status table */ + int *coef_bit_ptr, ci; + cinfo->coef_bits = (int (*)[DCTSIZE2]) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components * DCTSIZE2 * SIZEOF(int)); + coef_bit_ptr = & cinfo->coef_bits[0][0]; + for (ci = 0; ci < cinfo->num_components; ci++) + for (i = 0; i < DCTSIZE2; i++) + *coef_bit_ptr++ = -1; + } +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdatadst.c b/widget/milsko/milskosrc/external/libjpeg/src/jdatadst.c new file mode 100644 index 0000000000..b3b4798ea4 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdatadst.c @@ -0,0 +1,263 @@ +/* + * jdatadst.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2009-2022 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains compression data destination routines for the case of + * emitting JPEG data to memory or to a file (or any stdio stream). + * While these routines are sufficient for most applications, + * some will want to use a different destination manager. + * IMPORTANT: we assume that fwrite() will correctly transcribe an array of + * JOCTETs into 8-bit-wide elements on external storage. If char is wider + * than 8 bits on your machine, you may need to do some tweaking. + */ + +/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jerror.h" + +#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ +extern void * malloc JPP((size_t size)); +extern void free JPP((void *ptr)); +#endif + + +/* Expanded data destination object for stdio output */ + +#define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */ + +typedef struct { + struct jpeg_destination_mgr pub; /* public fields */ + + FILE * outfile; /* target stream */ + JOCTET buffer[OUTPUT_BUF_SIZE]; /* output buffer */ +} my_destination_mgr; + +typedef my_destination_mgr * my_dest_ptr; + + +/* Expanded data destination object for memory output */ + +typedef struct { + struct jpeg_destination_mgr pub; /* public fields */ + + unsigned char ** outbuffer; /* target buffer */ + size_t * outsize; + unsigned char * newbuffer; /* newly allocated buffer */ + JOCTET * buffer; /* start of buffer */ + size_t bufsize; +} my_mem_destination_mgr; + +typedef my_mem_destination_mgr * my_mem_dest_ptr; + + +/* + * Initialize destination --- called by jpeg_start_compress + * before any data is actually written. + */ + +METHODDEF(void) +init_destination (j_compress_ptr cinfo) +{ + my_dest_ptr dest = (my_dest_ptr) cinfo->dest; + + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; +} + +METHODDEF(void) +init_mem_destination (j_compress_ptr cinfo) +{ + /* no work necessary here */ +} + + +/* + * Empty the output buffer --- called whenever buffer fills up. + * + * In typical applications, this should write the entire output buffer + * (ignoring the current state of next_output_byte & free_in_buffer), + * reset the pointer & count to the start of the buffer, and return TRUE + * indicating that the buffer has been dumped. + * + * In applications that need to be able to suspend compression due to output + * overrun, a FALSE return indicates that the buffer cannot be emptied now. + * In this situation, the compressor will return to its caller (possibly with + * an indication that it has not accepted all the supplied scanlines). The + * application should resume compression after it has made more room in the + * output buffer. Note that there are substantial restrictions on the use of + * suspension --- see the documentation. + * + * When suspending, the compressor will back up to a convenient restart point + * (typically the start of the current MCU). next_output_byte & free_in_buffer + * indicate where the restart point will be if the current call returns FALSE. + * Data beyond this point will be regenerated after resumption, so do not + * write it out when emptying the buffer externally. + */ + +METHODDEF(boolean) +empty_output_buffer (j_compress_ptr cinfo) +{ + my_dest_ptr dest = (my_dest_ptr) cinfo->dest; + + if (JFWRITE(dest->outfile, dest->buffer, OUTPUT_BUF_SIZE) != + (size_t) OUTPUT_BUF_SIZE) + ERREXIT(cinfo, JERR_FILE_WRITE); + + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; + + return TRUE; +} + +METHODDEF(boolean) +empty_mem_output_buffer (j_compress_ptr cinfo) +{ + size_t nextsize; + JOCTET * nextbuffer; + my_mem_dest_ptr dest = (my_mem_dest_ptr) cinfo->dest; + + /* Try to allocate new buffer with double size */ + nextsize = dest->bufsize * 2; + nextbuffer = (JOCTET *) malloc(nextsize); + + if (nextbuffer == NULL) + ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 11); + + MEMCOPY(nextbuffer, dest->buffer, dest->bufsize); + + if (dest->newbuffer != NULL) + free(dest->newbuffer); + + dest->newbuffer = nextbuffer; + + dest->pub.next_output_byte = nextbuffer + dest->bufsize; + dest->pub.free_in_buffer = dest->bufsize; + + dest->buffer = nextbuffer; + dest->bufsize = nextsize; + + return TRUE; +} + + +/* + * Terminate destination --- called by jpeg_finish_compress + * after all data has been written. Usually needs to flush buffer. + * + * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding + * application must deal with any cleanup that should happen even + * for error exit. + */ + +METHODDEF(void) +term_destination (j_compress_ptr cinfo) +{ + my_dest_ptr dest = (my_dest_ptr) cinfo->dest; + size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer; + + /* Write any data remaining in the buffer */ + if (datacount > 0) { + if (JFWRITE(dest->outfile, dest->buffer, datacount) != datacount) + ERREXIT(cinfo, JERR_FILE_WRITE); + } + JFFLUSH(dest->outfile); + /* Make sure we wrote the output file OK */ + if (JFERROR(dest->outfile)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + +METHODDEF(void) +term_mem_destination (j_compress_ptr cinfo) +{ + my_mem_dest_ptr dest = (my_mem_dest_ptr) cinfo->dest; + + *dest->outbuffer = dest->buffer; + *dest->outsize = dest->bufsize - dest->pub.free_in_buffer; +} + + +/* + * Prepare for output to a stdio stream. + * The caller must have already opened the stream, + * and is responsible for closing it after finishing compression. + */ + +GLOBAL(void) +jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile) +{ + my_dest_ptr dest; + + /* The destination object is made permanent so that multiple JPEG images + * can be written to the same file without re-executing jpeg_stdio_dest. + * This makes it dangerous to use this manager and a different destination + * manager serially with the same JPEG object, because their private object + * sizes may be different. Caveat programmer. + */ + if (cinfo->dest == NULL) { /* first time for this JPEG object? */ + cinfo->dest = (struct jpeg_destination_mgr *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_PERMANENT, SIZEOF(my_destination_mgr)); + } + + dest = (my_dest_ptr) cinfo->dest; + dest->pub.init_destination = init_destination; + dest->pub.empty_output_buffer = empty_output_buffer; + dest->pub.term_destination = term_destination; + dest->outfile = outfile; +} + + +/* + * Prepare for output to a memory buffer. + * The caller may supply an own initial buffer with appropriate size. + * Otherwise, or when the actual data output exceeds the given size, + * the library adapts the buffer size as necessary. + * The standard library functions malloc/free are used for allocating + * larger memory, so the buffer is available to the application after + * finishing compression, and then the application is responsible for + * freeing the requested memory. + * Note: An initial buffer supplied by the caller is expected to be + * managed by the application. The library does not free such buffer + * when allocating a larger buffer. + */ + +GLOBAL(void) +jpeg_mem_dest (j_compress_ptr cinfo, + unsigned char ** outbuffer, size_t * outsize) +{ + my_mem_dest_ptr dest; + + if (outbuffer == NULL || outsize == NULL) /* sanity check */ + ERREXIT(cinfo, JERR_BUFFER_SIZE); + + /* The destination object is made permanent so that multiple JPEG images + * can be written to the same buffer without re-executing jpeg_mem_dest. + */ + if (cinfo->dest == NULL) { /* first time for this JPEG object? */ + cinfo->dest = (struct jpeg_destination_mgr *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_PERMANENT, SIZEOF(my_mem_destination_mgr)); + } + + dest = (my_mem_dest_ptr) cinfo->dest; + dest->pub.init_destination = init_mem_destination; + dest->pub.empty_output_buffer = empty_mem_output_buffer; + dest->pub.term_destination = term_mem_destination; + dest->outbuffer = outbuffer; + dest->outsize = outsize; + dest->newbuffer = NULL; + + if (*outbuffer == NULL || *outsize == 0) { + /* Allocate initial buffer */ + dest->newbuffer = *outbuffer = (unsigned char *) malloc(OUTPUT_BUF_SIZE); + if (dest->newbuffer == NULL) + ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10); + *outsize = OUTPUT_BUF_SIZE; + } + + dest->pub.next_output_byte = dest->buffer = *outbuffer; + dest->pub.free_in_buffer = dest->bufsize = *outsize; +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdatasrc.c b/widget/milsko/milskosrc/external/libjpeg/src/jdatasrc.c new file mode 100644 index 0000000000..fd7a1a594b --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdatasrc.c @@ -0,0 +1,271 @@ +/* + * jdatasrc.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2009-2022 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains decompression data source routines for the case of + * reading JPEG data from memory or from a file (or any stdio stream). + * While these routines are sufficient for most applications, + * some will want to use a different source manager. + * IMPORTANT: we assume that fread() will correctly transcribe an array of + * JOCTETs from 8-bit-wide elements on external storage. If char is wider + * than 8 bits on your machine, you may need to do some tweaking. + */ + +/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jerror.h" + + +/* Expanded data source object for stdio input */ + +#define INPUT_BUF_SIZE 4096 /* choose an efficiently fread'able size */ + +typedef struct { + struct jpeg_source_mgr pub; /* public fields */ + + FILE * infile; /* source stream */ + JOCTET buffer[INPUT_BUF_SIZE]; /* input buffer */ + boolean start_of_file; /* have we gotten any data yet? */ +} my_source_mgr; + +typedef my_source_mgr * my_src_ptr; + + +/* + * Initialize source --- called by jpeg_read_header + * before any data is actually read. + */ + +METHODDEF(void) +init_source (j_decompress_ptr cinfo) +{ + my_src_ptr src = (my_src_ptr) cinfo->src; + + /* We reset the empty-input-file flag for each image, + * but we don't clear the input buffer. + * This is correct behavior for reading a series of images from one source. + */ + src->start_of_file = TRUE; +} + +METHODDEF(void) +init_mem_source (j_decompress_ptr cinfo) +{ + /* no work necessary here */ +} + + +/* + * Fill the input buffer --- called whenever buffer is emptied. + * + * In typical applications, this should read fresh data into the buffer + * (ignoring the current state of next_input_byte & bytes_in_buffer), + * reset the pointer & count to the start of the buffer, and return TRUE + * indicating that the buffer has been reloaded. It is not necessary to + * fill the buffer entirely, only to obtain at least one more byte. + * + * There is no such thing as an EOF return. If the end of the file has been + * reached, the routine has a choice of ERREXIT() or inserting fake data into + * the buffer. In most cases, generating a warning message and inserting a + * fake EOI marker is the best course of action --- this will allow the + * decompressor to output however much of the image is there. However, + * the resulting error message is misleading if the real problem is an empty + * input file, so we handle that case specially. + * + * In applications that need to be able to suspend compression due to input + * not being available yet, a FALSE return indicates that no more data can be + * obtained right now, but more may be forthcoming later. In this situation, + * the decompressor will return to its caller (with an indication of the + * number of scanlines it has read, if any). The application should resume + * decompression after it has loaded more data into the input buffer. Note + * that there are substantial restrictions on the use of suspension --- see + * the documentation. + * + * When suspending, the decompressor will back up to a convenient restart point + * (typically the start of the current MCU). next_input_byte & bytes_in_buffer + * indicate where the restart point will be if the current call returns FALSE. + * Data beyond this point must be rescanned after resumption, so move it to + * the front of the buffer rather than discarding it. + */ + +METHODDEF(boolean) +fill_input_buffer (j_decompress_ptr cinfo) +{ + my_src_ptr src = (my_src_ptr) cinfo->src; + size_t nbytes; + + nbytes = JFREAD(src->infile, src->buffer, INPUT_BUF_SIZE); + + if (nbytes <= 0) { + if (src->start_of_file) /* Treat empty input file as fatal error */ + ERREXIT(cinfo, JERR_INPUT_EMPTY); + WARNMS(cinfo, JWRN_JPEG_EOF); + /* Insert a fake EOI marker */ + src->buffer[0] = (JOCTET) 0xFF; + src->buffer[1] = (JOCTET) JPEG_EOI; + nbytes = 2; + } + + src->pub.next_input_byte = src->buffer; + src->pub.bytes_in_buffer = nbytes; + src->start_of_file = FALSE; + + return TRUE; +} + +METHODDEF(boolean) +fill_mem_input_buffer (j_decompress_ptr cinfo) +{ + static const JOCTET mybuffer[4] = { + (JOCTET) 0xFF, (JOCTET) JPEG_EOI, 0, 0 + }; + + /* The whole JPEG data is expected to reside in the supplied memory + * buffer, so any request for more data beyond the given buffer size + * is treated as an error. + */ + WARNMS(cinfo, JWRN_JPEG_EOF); + + /* Insert a fake EOI marker */ + + cinfo->src->next_input_byte = mybuffer; + cinfo->src->bytes_in_buffer = 2; + + return TRUE; +} + + +/* + * Skip data --- used to skip over a potentially large amount of + * uninteresting data (such as an APPn marker). + * + * Writers of suspendable-input applications must note that skip_input_data + * is not granted the right to give a suspension return. If the skip extends + * beyond the data currently in the buffer, the buffer can be marked empty so + * that the next read will cause a fill_input_buffer call that can suspend. + * Arranging for additional bytes to be discarded before reloading the input + * buffer is the application writer's problem. + */ + +METHODDEF(void) +skip_input_data (j_decompress_ptr cinfo, long num_bytes) +{ + struct jpeg_source_mgr * src = cinfo->src; + size_t nbytes; + + /* Just a dumb implementation for now. Could use fseek() except + * it doesn't work on pipes. Not clear that being smart is worth + * any trouble anyway --- large skips are infrequent. + */ + if (num_bytes > 0) { + nbytes = (size_t) num_bytes; + while (nbytes > src->bytes_in_buffer) { + nbytes -= src->bytes_in_buffer; + (void) (*src->fill_input_buffer) (cinfo); + /* note we assume that fill_input_buffer will never return FALSE, + * so suspension need not be handled. + */ + } + src->next_input_byte += nbytes; + src->bytes_in_buffer -= nbytes; + } +} + + +/* + * An additional method that can be provided by data source modules is the + * resync_to_restart method for error recovery in the presence of RST markers. + * For the moment, this source module just uses the default resync method + * provided by the JPEG library. That method assumes that no backtracking + * is possible. + */ + + +/* + * Terminate source --- called by jpeg_finish_decompress + * after all data has been read. Often a no-op. + * + * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding + * application must deal with any cleanup that should happen even + * for error exit. + */ + +METHODDEF(void) +term_source (j_decompress_ptr cinfo) +{ + /* no work necessary here */ +} + + +/* + * Prepare for input from a stdio stream. + * The caller must have already opened the stream, + * and is responsible for closing it after finishing decompression. + */ + +GLOBAL(void) +jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile) +{ + my_src_ptr src; + + /* The source object including the input buffer is made permanent so that + * a series of JPEG images can be read from the same file by calling + * jpeg_stdio_src only before the first one. (If we discarded the buffer + * at the end of one image, we'd likely lose the start of the next one.) + * This makes it unsafe to use this manager and a different source + * manager serially with the same JPEG object. Caveat programmer. + */ + if (cinfo->src == NULL) { /* first time for this JPEG object? */ + cinfo->src = (struct jpeg_source_mgr *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_PERMANENT, SIZEOF(my_source_mgr)); + } + + src = (my_src_ptr) cinfo->src; + src->pub.init_source = init_source; + src->pub.fill_input_buffer = fill_input_buffer; + src->pub.skip_input_data = skip_input_data; + src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */ + src->pub.term_source = term_source; + src->infile = infile; + src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ + src->pub.next_input_byte = NULL; /* until buffer loaded */ +} + + +/* + * Prepare for input from a supplied memory buffer. + * The buffer must contain the whole JPEG data. + */ + +GLOBAL(void) +jpeg_mem_src (j_decompress_ptr cinfo, + const unsigned char * inbuffer, size_t insize) +{ + struct jpeg_source_mgr * src; + + if (inbuffer == NULL || insize == 0) /* Treat empty input as fatal error */ + ERREXIT(cinfo, JERR_INPUT_EMPTY); + + /* The source object is made permanent so that a series of JPEG images + * can be read from the same buffer by calling jpeg_mem_src only before + * the first one. + */ + if (cinfo->src == NULL) { /* first time for this JPEG object? */ + cinfo->src = (struct jpeg_source_mgr *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_PERMANENT, SIZEOF(struct jpeg_source_mgr)); + } + + src = cinfo->src; + src->init_source = init_mem_source; + src->fill_input_buffer = fill_mem_input_buffer; + src->skip_input_data = skip_input_data; + src->resync_to_restart = jpeg_resync_to_restart; /* use default method */ + src->term_source = term_source; + src->bytes_in_buffer = insize; + src->next_input_byte = (const JOCTET *) inbuffer; +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdcoefct.c b/widget/milsko/milskosrc/external/libjpeg/src/jdcoefct.c new file mode 100644 index 0000000000..79ba420140 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdcoefct.c @@ -0,0 +1,744 @@ +/* + * jdcoefct.c + * + * Copyright (C) 1994-1997, Thomas G. Lane. + * Modified 2002-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the coefficient buffer controller for decompression. + * This controller is the top level of the JPEG decompressor proper. + * The coefficient buffer lies between entropy decoding and inverse-DCT steps. + * + * In buffered-image mode, this controller is the interface between + * input-oriented processing and output-oriented processing. + * Also, the input side (only) is used when reading a file for transcoding. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Block smoothing is only applicable for progressive JPEG, so: */ +#ifndef D_PROGRESSIVE_SUPPORTED +#undef BLOCK_SMOOTHING_SUPPORTED +#endif + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_d_coef_controller pub; /* public fields */ + + /* These variables keep track of the current location of the input side. */ + /* cinfo->input_iMCU_row is also used for this. */ + JDIMENSION MCU_ctr; /* counts MCUs processed in current row */ + int MCU_vert_offset; /* counts MCU rows within iMCU row */ + int MCU_rows_per_iMCU_row; /* number of such rows needed */ + + /* The output side's location is represented by cinfo->output_iMCU_row. */ + + /* In single-pass modes, it's sufficient to buffer just one MCU. + * We append a workspace of D_MAX_BLOCKS_IN_MCU coefficient blocks, + * and let the entropy decoder write into that workspace each time. + * In multi-pass modes, this array points to the current MCU's blocks + * within the virtual arrays; it is used only by the input side. + */ + JBLOCKROW MCU_buffer[D_MAX_BLOCKS_IN_MCU]; + +#ifdef D_MULTISCAN_FILES_SUPPORTED + /* In multi-pass modes, we need a virtual block array for each component. */ + jvirt_barray_ptr whole_image[MAX_COMPONENTS]; +#endif + +#ifdef BLOCK_SMOOTHING_SUPPORTED + /* When doing block smoothing, we latch coefficient Al values here */ + int * coef_bits_latch; +#define SAVED_COEFS 6 /* we save coef_bits[0..5] */ +#endif + + /* Workspace for single-pass modes (omitted otherwise). */ + JBLOCK blk_buffer[D_MAX_BLOCKS_IN_MCU]; +} my_coef_controller; + +typedef my_coef_controller * my_coef_ptr; + + +/* Forward declarations */ +METHODDEF(int) decompress_onepass + JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); +#ifdef D_MULTISCAN_FILES_SUPPORTED +METHODDEF(int) decompress_data + JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); +#endif +#ifdef BLOCK_SMOOTHING_SUPPORTED +LOCAL(boolean) smoothing_ok JPP((j_decompress_ptr cinfo)); +METHODDEF(int) decompress_smooth_data + JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); +#endif + + +LOCAL(void) +start_iMCU_row (j_decompress_ptr cinfo) +/* Reset within-iMCU-row counters for a new row (input side) */ +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* In an interleaved scan, an MCU row is the same as an iMCU row. + * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. + * But at the bottom of the image, process only what's left. + */ + if (cinfo->comps_in_scan > 1) { + coef->MCU_rows_per_iMCU_row = 1; + } else { + if (cinfo->input_iMCU_row < (cinfo->total_iMCU_rows-1)) + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; + else + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; + } + + coef->MCU_ctr = 0; + coef->MCU_vert_offset = 0; +} + + +/* + * Initialize for an input processing pass. + */ + +METHODDEF(void) +start_input_pass (j_decompress_ptr cinfo) +{ + cinfo->input_iMCU_row = 0; + start_iMCU_row(cinfo); +} + + +/* + * Initialize for an output processing pass. + */ + +METHODDEF(void) +start_output_pass (j_decompress_ptr cinfo) +{ +#ifdef BLOCK_SMOOTHING_SUPPORTED + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* If multipass, check to see whether to use block smoothing on this pass */ + if (coef->pub.coef_arrays != NULL) { + if (cinfo->do_block_smoothing && smoothing_ok(cinfo)) + coef->pub.decompress_data = decompress_smooth_data; + else + coef->pub.decompress_data = decompress_data; + } +#endif + cinfo->output_iMCU_row = 0; +} + + +/* + * Decompress and return some data in the single-pass case. + * Always attempts to emit one fully interleaved MCU row ("iMCU" row). + * Input and output must run in lockstep since we have only a one-MCU buffer. + * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. + * + * NB: output_buf contains a plane for each component in image, + * which we index according to the component's SOF position. + */ + +METHODDEF(int) +decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + int ci, xindex, yindex, yoffset, useful_width; + JBLOCKROW blkp; + JSAMPARRAY output_ptr; + JDIMENSION start_col, output_col; + jpeg_component_info *compptr; + inverse_DCT_method_ptr inverse_DCT; + + /* Loop to process as much as one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col; + MCU_col_num++) { + blkp = coef->blk_buffer; /* pointer to current DCT block within MCU */ + /* Try to fetch an MCU. Entropy decoder expects buffer to be zeroed. */ + if (cinfo->lim_Se) /* can bypass in DC only case */ + MEMZERO(blkp, cinfo->blocks_in_MCU * SIZEOF(JBLOCK)); + if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->MCU_ctr = MCU_col_num; + return JPEG_SUSPENDED; + } + /* Determine where data should go in output_buf and do the IDCT thing. + * We skip dummy blocks at the right and bottom edges (but blkp gets + * incremented past them!). + */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Don't bother to IDCT an uninteresting component. */ + if (! compptr->component_needed) { + blkp += compptr->MCU_blocks; + continue; + } + inverse_DCT = cinfo->idct->inverse_DCT[compptr->component_index]; + output_ptr = output_buf[compptr->component_index] + + yoffset * compptr->DCT_v_scaled_size; + useful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width + : compptr->last_col_width; + start_col = MCU_col_num * compptr->MCU_sample_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + if (cinfo->input_iMCU_row < last_iMCU_row || + yoffset + yindex < compptr->last_row_height) { + output_col = start_col; + for (xindex = 0; xindex < useful_width; xindex++) { + (*inverse_DCT) (cinfo, compptr, (JCOEFPTR) (blkp + xindex), + output_ptr, output_col); + output_col += compptr->DCT_h_scaled_size; + } + output_ptr += compptr->DCT_v_scaled_size; + } + blkp += compptr->MCU_width; + } + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->MCU_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + cinfo->output_iMCU_row++; + if (++(cinfo->input_iMCU_row) <= last_iMCU_row) { + start_iMCU_row(cinfo); + return JPEG_ROW_COMPLETED; + } + /* Completed the scan */ + (*cinfo->inputctl->finish_input_pass) (cinfo); + return JPEG_SCAN_COMPLETED; +} + + +/* + * Dummy consume-input routine for single-pass operation. + */ + +METHODDEF(int) +dummy_consume_data (j_decompress_ptr cinfo) +{ + return JPEG_SUSPENDED; /* Always indicate nothing was done */ +} + + +#ifdef D_MULTISCAN_FILES_SUPPORTED + +/* + * Consume input data and store it in the full-image coefficient buffer. + * We read as much as one fully interleaved MCU row ("iMCU" row) per call, + * ie, v_samp_factor block rows for each component in the scan. + * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. + */ + +METHODDEF(int) +consume_data (j_decompress_ptr cinfo) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + int ci, xindex, yindex, yoffset; + JDIMENSION start_col; + JBLOCKARRAY blkp; + JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; + JBLOCKROW buffer_ptr; + jpeg_component_info *compptr; + + /* Align the virtual buffers for the components used in this scan. */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + buffer[ci] = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], + cinfo->input_iMCU_row * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, TRUE); + /* Note: entropy decoder expects buffer to be zeroed, + * but this is handled automatically by the memory manager + * because we requested a pre-zeroed array. + */ + } + + /* Loop to process one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->MCU_ctr; MCU_col_num < cinfo->MCUs_per_row; + MCU_col_num++) { + /* Construct list of pointers to DCT blocks belonging to this MCU */ + blkp = coef->MCU_buffer; /* pointer to current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + start_col = MCU_col_num * compptr->MCU_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + buffer_ptr = buffer[ci][yoffset + yindex] + start_col; + xindex = compptr->MCU_width; + do { + *blkp++ = buffer_ptr++; + } while (--xindex); + } + } + /* Try to fetch the MCU. */ + if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->MCU_ctr = MCU_col_num; + return JPEG_SUSPENDED; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->MCU_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) { + start_iMCU_row(cinfo); + return JPEG_ROW_COMPLETED; + } + /* Completed the scan */ + (*cinfo->inputctl->finish_input_pass) (cinfo); + return JPEG_SCAN_COMPLETED; +} + + +/* + * Decompress and return some data in the multi-pass case. + * Always attempts to emit one fully interleaved MCU row ("iMCU" row). + * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. + * + * NB: output_buf contains a plane for each component in image. + */ + +METHODDEF(int) +decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + JDIMENSION block_num; + int ci, block_row, block_rows; + JBLOCKARRAY buffer; + JBLOCKROW buffer_ptr; + JSAMPARRAY output_ptr; + JDIMENSION output_col; + jpeg_component_info *compptr; + inverse_DCT_method_ptr inverse_DCT; + + /* Force some input to be done if we are getting ahead of the input. */ + while (cinfo->input_scan_number < cinfo->output_scan_number || + (cinfo->input_scan_number == cinfo->output_scan_number && + cinfo->input_iMCU_row <= cinfo->output_iMCU_row)) { + if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED) + return JPEG_SUSPENDED; + } + + /* OK, output from the virtual arrays. */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Don't bother to IDCT an uninteresting component. */ + if (! compptr->component_needed) + continue; + /* Align the virtual buffer for this component. */ + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + cinfo->output_iMCU_row * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + /* Count non-dummy DCT block rows in this iMCU row. */ + if (cinfo->output_iMCU_row < last_iMCU_row) + block_rows = compptr->v_samp_factor; + else { + /* NB: can't use last_row_height here; it is input-side-dependent! */ + block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (block_rows == 0) block_rows = compptr->v_samp_factor; + } + inverse_DCT = cinfo->idct->inverse_DCT[ci]; + output_ptr = output_buf[ci]; + /* Loop over all DCT blocks to be processed. */ + for (block_row = 0; block_row < block_rows; block_row++) { + buffer_ptr = buffer[block_row]; + output_col = 0; + for (block_num = 0; block_num < compptr->width_in_blocks; block_num++) { + (*inverse_DCT) (cinfo, compptr, (JCOEFPTR) buffer_ptr, + output_ptr, output_col); + buffer_ptr++; + output_col += compptr->DCT_h_scaled_size; + } + output_ptr += compptr->DCT_v_scaled_size; + } + } + + if (++(cinfo->output_iMCU_row) <= last_iMCU_row) + return JPEG_ROW_COMPLETED; + return JPEG_SCAN_COMPLETED; +} + +#endif /* D_MULTISCAN_FILES_SUPPORTED */ + + +#ifdef BLOCK_SMOOTHING_SUPPORTED + +/* + * This code applies interblock smoothing as described by section K.8 + * of the JPEG standard: the first 5 AC coefficients are estimated from + * the DC values of a DCT block and its 8 neighboring blocks. + * We apply smoothing only for progressive JPEG decoding, and only if + * the coefficients it can estimate are not yet known to full precision. + */ + +/* Natural-order array positions of the first 5 zigzag-order coefficients */ +#define Q01_POS 1 +#define Q10_POS 8 +#define Q20_POS 16 +#define Q11_POS 9 +#define Q02_POS 2 + +/* + * Determine whether block smoothing is applicable and safe. + * We also latch the current states of the coef_bits[] entries for the + * AC coefficients; otherwise, if the input side of the decompressor + * advances into a new scan, we might think the coefficients are known + * more accurately than they really are. + */ + +LOCAL(boolean) +smoothing_ok (j_decompress_ptr cinfo) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + boolean smoothing_useful = FALSE; + int ci, coefi; + jpeg_component_info *compptr; + JQUANT_TBL * qtable; + int * coef_bits; + int * coef_bits_latch; + + if (! cinfo->progressive_mode || cinfo->coef_bits == NULL) + return FALSE; + + /* Allocate latch area if not already done */ + if (coef->coef_bits_latch == NULL) + coef->coef_bits_latch = (int *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components * (SAVED_COEFS * SIZEOF(int))); + coef_bits_latch = coef->coef_bits_latch; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* All components' quantization values must already be latched. */ + if ((qtable = compptr->quant_table) == NULL) + return FALSE; + /* Verify DC & first 5 AC quantizers are nonzero to avoid zero-divide. */ + if (qtable->quantval[0] == 0 || + qtable->quantval[Q01_POS] == 0 || + qtable->quantval[Q10_POS] == 0 || + qtable->quantval[Q20_POS] == 0 || + qtable->quantval[Q11_POS] == 0 || + qtable->quantval[Q02_POS] == 0) + return FALSE; + /* DC values must be at least partly known for all components. */ + coef_bits = cinfo->coef_bits[ci]; + if (coef_bits[0] < 0) + return FALSE; + /* Block smoothing is helpful if some AC coefficients remain inaccurate. */ + for (coefi = 1; coefi <= 5; coefi++) { + coef_bits_latch[coefi] = coef_bits[coefi]; + if (coef_bits[coefi] != 0) + smoothing_useful = TRUE; + } + coef_bits_latch += SAVED_COEFS; + } + + return smoothing_useful; +} + + +/* + * Variant of decompress_data for use when doing block smoothing. + */ + +METHODDEF(int) +decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + JDIMENSION block_num, last_block_column; + int ci, block_row, block_rows, access_rows; + JBLOCKARRAY buffer; + JBLOCKROW buffer_ptr, prev_block_row, next_block_row; + JSAMPARRAY output_ptr; + JDIMENSION output_col; + jpeg_component_info *compptr; + inverse_DCT_method_ptr inverse_DCT; + boolean first_row, last_row; + JBLOCK workspace; + int *coef_bits; + JQUANT_TBL *quanttbl; + INT32 Q00,Q01,Q02,Q10,Q11,Q20, num; + int DC1,DC2,DC3,DC4,DC5,DC6,DC7,DC8,DC9; + int Al, pred; + + /* Force some input to be done if we are getting ahead of the input. */ + while (cinfo->input_scan_number <= cinfo->output_scan_number && + ! cinfo->inputctl->eoi_reached) { + if (cinfo->input_scan_number == cinfo->output_scan_number) { + /* If input is working on current scan, we ordinarily want it to + * have completed the current row. But if input scan is DC, + * we want it to keep one row ahead so that next block row's DC + * values are up to date. + */ + JDIMENSION delta = (cinfo->Ss == 0) ? 1 : 0; + if (cinfo->input_iMCU_row > cinfo->output_iMCU_row+delta) + break; + } + if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED) + return JPEG_SUSPENDED; + } + + /* OK, output from the virtual arrays. */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Don't bother to IDCT an uninteresting component. */ + if (! compptr->component_needed) + continue; + /* Count non-dummy DCT block rows in this iMCU row. */ + if (cinfo->output_iMCU_row < last_iMCU_row) { + block_rows = compptr->v_samp_factor; + access_rows = block_rows * 2; /* this and next iMCU row */ + last_row = FALSE; + } else { + /* NB: can't use last_row_height here; it is input-side-dependent! */ + block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (block_rows == 0) block_rows = compptr->v_samp_factor; + access_rows = block_rows; /* this iMCU row only */ + last_row = TRUE; + } + /* Align the virtual buffer for this component. */ + if (cinfo->output_iMCU_row > 0) { + access_rows += compptr->v_samp_factor; /* prior iMCU row too */ + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + (cinfo->output_iMCU_row - 1) * compptr->v_samp_factor, + (JDIMENSION) access_rows, FALSE); + buffer += compptr->v_samp_factor; /* point to current iMCU row */ + first_row = FALSE; + } else { + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + (JDIMENSION) 0, (JDIMENSION) access_rows, FALSE); + first_row = TRUE; + } + /* Fetch component-dependent info */ + coef_bits = coef->coef_bits_latch + (ci * SAVED_COEFS); + quanttbl = compptr->quant_table; + Q00 = quanttbl->quantval[0]; + Q01 = quanttbl->quantval[Q01_POS]; + Q10 = quanttbl->quantval[Q10_POS]; + Q20 = quanttbl->quantval[Q20_POS]; + Q11 = quanttbl->quantval[Q11_POS]; + Q02 = quanttbl->quantval[Q02_POS]; + inverse_DCT = cinfo->idct->inverse_DCT[ci]; + output_ptr = output_buf[ci]; + /* Loop over all DCT blocks to be processed. */ + for (block_row = 0; block_row < block_rows; block_row++) { + buffer_ptr = buffer[block_row]; + if (first_row && block_row == 0) + prev_block_row = buffer_ptr; + else + prev_block_row = buffer[block_row-1]; + if (last_row && block_row == block_rows-1) + next_block_row = buffer_ptr; + else + next_block_row = buffer[block_row+1]; + /* We fetch the surrounding DC values using a sliding-register approach. + * Initialize all nine here so as to do the right thing on narrow pics. + */ + DC1 = DC2 = DC3 = (int) prev_block_row[0][0]; + DC4 = DC5 = DC6 = (int) buffer_ptr[0][0]; + DC7 = DC8 = DC9 = (int) next_block_row[0][0]; + output_col = 0; + last_block_column = compptr->width_in_blocks - 1; + for (block_num = 0; block_num <= last_block_column; block_num++) { + /* Fetch current DCT block into workspace so we can modify it. */ + jcopy_block_row(buffer_ptr, (JBLOCKROW) workspace, (JDIMENSION) 1); + /* Update DC values */ + if (block_num < last_block_column) { + DC3 = (int) prev_block_row[1][0]; + DC6 = (int) buffer_ptr[1][0]; + DC9 = (int) next_block_row[1][0]; + } + /* Compute coefficient estimates per K.8. + * An estimate is applied only if coefficient is still zero, + * and is not known to be fully accurate. + */ + /* AC01 */ + if ((Al=coef_bits[1]) != 0 && workspace[1] == 0) { + num = 36 * Q00 * (DC4 - DC6); + if (num >= 0) { + pred = (int) (((Q01<<7) + num) / (Q01<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q10<<7) + num) / (Q10<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q20<<7) + num) / (Q20<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q11<<7) + num) / (Q11<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q02<<7) + num) / (Q02<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<DCT_h_scaled_size; + } + output_ptr += compptr->DCT_v_scaled_size; + } + } + + if (++(cinfo->output_iMCU_row) <= last_iMCU_row) + return JPEG_ROW_COMPLETED; + return JPEG_SCAN_COMPLETED; +} + +#endif /* BLOCK_SMOOTHING_SUPPORTED */ + + +/* + * Initialize coefficient buffer controller. + */ + +GLOBAL(void) +jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer) +{ + my_coef_ptr coef; + + if (need_full_buffer) { +#ifdef D_MULTISCAN_FILES_SUPPORTED + /* Allocate a full-image virtual array for each component, */ + /* padded to a multiple of samp_factor DCT blocks in each direction. */ + /* Note we ask for a pre-zeroed array. */ + int ci, access_rows; + jpeg_component_info *compptr; + + coef = (my_coef_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_coef_controller) - SIZEOF(coef->blk_buffer)); + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + access_rows = compptr->v_samp_factor; +#ifdef BLOCK_SMOOTHING_SUPPORTED + /* If block smoothing could be used, need a bigger window */ + if (cinfo->progressive_mode) + access_rows *= 3; +#endif + coef->whole_image[ci] = (*cinfo->mem->request_virt_barray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, TRUE, + (JDIMENSION) jround_up((long) compptr->width_in_blocks, + (long) compptr->h_samp_factor), + (JDIMENSION) jround_up((long) compptr->height_in_blocks, + (long) compptr->v_samp_factor), + (JDIMENSION) access_rows); + } + coef->pub.consume_data = consume_data; + coef->pub.decompress_data = decompress_data; + coef->pub.coef_arrays = coef->whole_image; /* link to virtual arrays */ +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + /* We only need a single-MCU buffer. */ + JBLOCKARRAY blkp; + JBLOCKROW buffer_ptr; + int bi; + + coef = (my_coef_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_coef_controller)); + buffer_ptr = coef->blk_buffer; + if (cinfo->lim_Se == 0) /* DC only case: want to bypass later */ + MEMZERO(buffer_ptr, SIZEOF(coef->blk_buffer)); + blkp = coef->MCU_buffer; + bi = D_MAX_BLOCKS_IN_MCU; + do { + *blkp++ = buffer_ptr++; + } while (--bi); + coef->pub.consume_data = dummy_consume_data; + coef->pub.decompress_data = decompress_onepass; + coef->pub.coef_arrays = NULL; /* flag for no virtual arrays */ + } + + coef->pub.start_input_pass = start_input_pass; + coef->pub.start_output_pass = start_output_pass; +#ifdef BLOCK_SMOOTHING_SUPPORTED + coef->coef_bits_latch = NULL; +#endif + cinfo->coef = &coef->pub; +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdcolor.c b/widget/milsko/milskosrc/external/libjpeg/src/jdcolor.c new file mode 100644 index 0000000000..6b40fb5340 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdcolor.c @@ -0,0 +1,769 @@ +/* + * jdcolor.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 2011-2023 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains output colorspace conversion routines. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +#if RANGE_BITS < 2 + /* Deliberate syntax err */ + Sorry, this code requires 2 or more range extension bits. +#endif + + +/* Private subobject */ + +typedef struct { + struct jpeg_color_deconverter pub; /* public fields */ + + /* Private state for YCbCr->RGB and BG_YCC->RGB conversion */ + int * Cr_r_tab; /* => table for Cr to R conversion */ + int * Cb_b_tab; /* => table for Cb to B conversion */ + INT32 * Cr_g_tab; /* => table for Cr to G conversion */ + INT32 * Cb_g_tab; /* => table for Cb to G conversion */ + + /* Private state for RGB->Y conversion */ + INT32 * R_y_tab; /* => table for R to Y conversion */ + INT32 * G_y_tab; /* => table for G to Y conversion */ + INT32 * B_y_tab; /* => table for B to Y conversion */ +} my_color_deconverter; + +typedef my_color_deconverter * my_cconvert_ptr; + + +/*************** YCbCr -> RGB conversion: most common case **************/ +/*************** BG_YCC -> RGB conversion: less common case **************/ +/*************** RGB -> Y conversion: less common case **************/ + +/* + * YCbCr is defined per Recommendation ITU-R BT.601-7 (03/2011), + * previously known as Recommendation CCIR 601-1, except that Cb and Cr + * are normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5. + * sRGB (standard RGB color space) is defined per IEC 61966-2-1:1999. + * sYCC (standard luma-chroma-chroma color space with extended gamut) + * is defined per IEC 61966-2-1:1999 Amendment A1:2003 Annex F. + * bg-sRGB and bg-sYCC (big gamut standard color spaces) + * are defined per IEC 61966-2-1:1999 Amendment A1:2003 Annex G. + * Note that the derived conversion coefficients given in some of these + * documents are imprecise. The general conversion equations are + * + * R = Y + K * (1 - Kr) * Cr + * G = Y - K * (Kb * (1 - Kb) * Cb + Kr * (1 - Kr) * Cr) / (1 - Kr - Kb) + * B = Y + K * (1 - Kb) * Cb + * + * Y = Kr * R + (1 - Kr - Kb) * G + Kb * B + * + * With Kr = 0.299 and Kb = 0.114 (derived according to SMPTE RP 177-1993 + * from the 1953 FCC NTSC primaries and CIE Illuminant C), K = 2 for sYCC, + * the conversion equations to be implemented are therefore + * + * R = Y + 1.402 * Cr + * G = Y - 0.344136286 * Cb - 0.714136286 * Cr + * B = Y + 1.772 * Cb + * + * Y = 0.299 * R + 0.587 * G + 0.114 * B + * + * where Cb and Cr represent the incoming values less CENTERJSAMPLE. + * For bg-sYCC, with K = 4, the equations are + * + * R = Y + 2.804 * Cr + * G = Y - 0.688272572 * Cb - 1.428272572 * Cr + * B = Y + 3.544 * Cb + * + * To avoid floating-point arithmetic, we represent the fractional constants + * as integers scaled up by 2^16 (about 4 digits precision); we have to divide + * the products by 2^16, with appropriate rounding, to get the correct answer. + * Notice that Y, being an integral input, does not contribute any fraction + * so it need not participate in the rounding. + * + * For even more speed, we avoid doing any multiplications in the inner loop + * by precalculating the constants times Cb and Cr for all possible values. + * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table); + * for 9-bit to 12-bit samples it is still acceptable. It's not very + * reasonable for 16-bit samples, but if you want lossless storage + * you shouldn't be changing colorspace anyway. + * The Cr=>R and Cb=>B values can be rounded to integers in advance; + * the values for the G calculation are left scaled up, + * since we must add them together before rounding. + */ + +#define SCALEBITS 16 /* speediest right-shift on some machines */ +#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) +#define FIX(x) ((INT32) ((x) * (1L<RGB and BG_YCC->RGB colorspace conversion. + */ + +LOCAL(void) +build_ycc_rgb_table (j_decompress_ptr cinfo) +/* Normal case, sYCC */ +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + int i; + INT32 x; + SHIFT_TEMPS + + cconvert->Cr_r_tab = (int *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); + cconvert->Cb_b_tab = (int *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); + cconvert->Cr_g_tab = (INT32 *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); + cconvert->Cb_g_tab = (INT32 *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); + + for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { + /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ + /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ + /* Cr=>R value is nearest int to 1.402 * x */ + cconvert->Cr_r_tab[i] = (int) DESCALE(FIX(1.402) * x, SCALEBITS); + /* Cb=>B value is nearest int to 1.772 * x */ + cconvert->Cb_b_tab[i] = (int) DESCALE(FIX(1.772) * x, SCALEBITS); + /* Cr=>G value is scaled-up -0.714136286 * x */ + cconvert->Cr_g_tab[i] = (- FIX(0.714136286)) * x; + /* Cb=>G value is scaled-up -0.344136286 * x */ + /* We also add in ONE_HALF so that need not do it in inner loop */ + cconvert->Cb_g_tab[i] = (- FIX(0.344136286)) * x + ONE_HALF; + } +} + + +LOCAL(void) +build_bg_ycc_rgb_table (j_decompress_ptr cinfo) +/* Wide gamut case, bg-sYCC */ +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + int i; + INT32 x; + SHIFT_TEMPS + + cconvert->Cr_r_tab = (int *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); + cconvert->Cb_b_tab = (int *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); + cconvert->Cr_g_tab = (INT32 *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); + cconvert->Cb_g_tab = (INT32 *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); + + for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { + /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ + /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ + /* Cr=>R value is nearest int to 2.804 * x */ + cconvert->Cr_r_tab[i] = (int) DESCALE(FIX(2.804) * x, SCALEBITS); + /* Cb=>B value is nearest int to 3.544 * x */ + cconvert->Cb_b_tab[i] = (int) DESCALE(FIX(3.544) * x, SCALEBITS); + /* Cr=>G value is scaled-up -1.428272572 * x */ + cconvert->Cr_g_tab[i] = (- FIX(1.428272572)) * x; + /* Cb=>G value is scaled-up -0.688272572 * x */ + /* We also add in ONE_HALF so that need not do it in inner loop */ + cconvert->Cb_g_tab[i] = (- FIX(0.688272572)) * x + ONE_HALF; + } +} + + +/* + * Convert some rows of samples to the output colorspace. + * + * Note that we change from noninterleaved, one-plane-per-component format + * to interleaved-pixel format. The output buffer is therefore three times + * as wide as the input buffer. + * + * A starting row offset is provided only for the input buffer. The caller + * can easily adjust the passed output_buf value to accommodate any row + * offset required on that side. + */ + +METHODDEF(void) +ycc_rgb_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int y, cb, cr; + register JSAMPROW outptr; + register JSAMPROW inptr0, inptr1, inptr2; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + register int * Crrtab = cconvert->Cr_r_tab; + register int * Cbbtab = cconvert->Cb_b_tab; + register INT32 * Crgtab = cconvert->Cr_g_tab; + register INT32 * Cbgtab = cconvert->Cb_g_tab; + SHIFT_TEMPS + + while (--num_rows >= 0) { + inptr0 = input_buf[0][input_row]; + inptr1 = input_buf[1][input_row]; + inptr2 = input_buf[2][input_row]; + input_row++; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + y = GETJSAMPLE(inptr0[col]); + cb = GETJSAMPLE(inptr1[col]); + cr = GETJSAMPLE(inptr2[col]); + /* Range-limiting is essential due to noise introduced by DCT losses, + * for extended gamut (sYCC) and wide gamut (bg-sYCC) encodings. + */ + outptr[RGB_RED] = range_limit[y + Crrtab[cr]]; + outptr[RGB_GREEN] = range_limit[y + + ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], + SCALEBITS))]; + outptr[RGB_BLUE] = range_limit[y + Cbbtab[cb]]; + outptr += RGB_PIXELSIZE; + } + } +} + + +/**************** Cases other than YCC -> RGB ****************/ + + +/* + * Initialize for RGB->grayscale colorspace conversion. + */ + +LOCAL(void) +build_rgb_y_table (j_decompress_ptr cinfo) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + INT32 i; + + cconvert->R_y_tab = (INT32 *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); + cconvert->G_y_tab = (INT32 *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); + cconvert->B_y_tab = (INT32 *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); + + for (i = 0; i <= MAXJSAMPLE; i++) { + cconvert->R_y_tab[i] = FIX(0.299) * i; + cconvert->G_y_tab[i] = FIX(0.587) * i; + cconvert->B_y_tab[i] = FIX(0.114) * i + ONE_HALF; + } +} + + +/* + * Convert RGB to grayscale. + */ + +METHODDEF(void) +rgb_gray_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register INT32 y; + register INT32 * Rytab = cconvert->R_y_tab; + register INT32 * Gytab = cconvert->G_y_tab; + register INT32 * Bytab = cconvert->B_y_tab; + register JSAMPROW outptr; + register JSAMPROW inptr0, inptr1, inptr2; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + + while (--num_rows >= 0) { + inptr0 = input_buf[0][input_row]; + inptr1 = input_buf[1][input_row]; + inptr2 = input_buf[2][input_row]; + input_row++; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + y = Rytab[GETJSAMPLE(inptr0[col])]; + y += Gytab[GETJSAMPLE(inptr1[col])]; + y += Bytab[GETJSAMPLE(inptr2[col])]; + outptr[col] = (JSAMPLE) (y >> SCALEBITS); + } + } +} + + +/* + * Convert some rows of samples to the output colorspace. + * [R-G,G,B-G] to [R,G,B] conversion with modulo calculation + * (inverse color transform). + * This can be seen as an adaption of the general YCbCr->RGB + * conversion equation with Kr = Kb = 0, while replacing the + * normalization by modulo calculation. + */ + +METHODDEF(void) +rgb1_rgb_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + register int r, g, b; + register JSAMPROW outptr; + register JSAMPROW inptr0, inptr1, inptr2; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + + while (--num_rows >= 0) { + inptr0 = input_buf[0][input_row]; + inptr1 = input_buf[1][input_row]; + inptr2 = input_buf[2][input_row]; + input_row++; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + r = GETJSAMPLE(inptr0[col]); + g = GETJSAMPLE(inptr1[col]); + b = GETJSAMPLE(inptr2[col]); + /* Assume that MAXJSAMPLE+1 is a power of 2, so that the MOD + * (modulo) operator is equivalent to the bitmask operator AND. + */ + outptr[RGB_RED] = (JSAMPLE) ((r + g - CENTERJSAMPLE) & MAXJSAMPLE); + outptr[RGB_GREEN] = (JSAMPLE) g; + outptr[RGB_BLUE] = (JSAMPLE) ((b + g - CENTERJSAMPLE) & MAXJSAMPLE); + outptr += RGB_PIXELSIZE; + } + } +} + + +/* + * [R-G,G,B-G] to grayscale conversion with modulo calculation + * (inverse color transform). + */ + +METHODDEF(void) +rgb1_gray_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int r, g, b; + register INT32 y; + register INT32 * Rytab = cconvert->R_y_tab; + register INT32 * Gytab = cconvert->G_y_tab; + register INT32 * Bytab = cconvert->B_y_tab; + register JSAMPROW outptr; + register JSAMPROW inptr0, inptr1, inptr2; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + + while (--num_rows >= 0) { + inptr0 = input_buf[0][input_row]; + inptr1 = input_buf[1][input_row]; + inptr2 = input_buf[2][input_row]; + input_row++; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + r = GETJSAMPLE(inptr0[col]); + g = GETJSAMPLE(inptr1[col]); + b = GETJSAMPLE(inptr2[col]); + /* Assume that MAXJSAMPLE+1 is a power of 2, so that the MOD + * (modulo) operator is equivalent to the bitmask operator AND. + */ + y = Rytab[(r + g - CENTERJSAMPLE) & MAXJSAMPLE]; + y += Gytab[g]; + y += Bytab[(b + g - CENTERJSAMPLE) & MAXJSAMPLE]; + outptr[col] = (JSAMPLE) (y >> SCALEBITS); + } + } +} + + +/* + * Convert some rows of samples to the output colorspace. + * No colorspace change, but conversion from separate-planes + * to interleaved representation. + */ + +METHODDEF(void) +rgb_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + register JSAMPROW outptr; + register JSAMPROW inptr0, inptr1, inptr2; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + + while (--num_rows >= 0) { + inptr0 = input_buf[0][input_row]; + inptr1 = input_buf[1][input_row]; + inptr2 = input_buf[2][input_row]; + input_row++; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + /* We can dispense with GETJSAMPLE() here */ + outptr[RGB_RED] = inptr0[col]; + outptr[RGB_GREEN] = inptr1[col]; + outptr[RGB_BLUE] = inptr2[col]; + outptr += RGB_PIXELSIZE; + } + } +} + + +/* + * Color conversion for no colorspace change: just copy the data, + * converting from separate-planes to interleaved representation. + * Note: Omit uninteresting components in output buffer. + */ + +METHODDEF(void) +null_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + register JSAMPROW outptr; + register JSAMPROW inptr; + register JDIMENSION count; + register int out_comps = cinfo->out_color_components; + JDIMENSION num_cols = cinfo->output_width; + JSAMPROW startptr; + int ci; + jpeg_component_info *compptr; + + while (--num_rows >= 0) { + /* It seems fastest to make a separate pass for each component. */ + startptr = *output_buf++; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (! compptr->component_needed) + continue; /* skip uninteresting component */ + inptr = input_buf[ci][input_row]; + outptr = startptr++; + for (count = num_cols; count > 0; count--) { + *outptr = *inptr++; /* don't need GETJSAMPLE() here */ + outptr += out_comps; + } + } + input_row++; + } +} + + +/* + * Color conversion for grayscale: just copy the data. + * This also works for YCC -> grayscale conversion, in which + * we just copy the Y (luminance) component and ignore chrominance. + */ + +METHODDEF(void) +grayscale_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + jcopy_sample_rows(input_buf[0] + input_row, output_buf, + num_rows, cinfo->output_width); +} + + +/* + * Convert grayscale to RGB: just duplicate the graylevel three times. + * This is provided to support applications that don't want to cope + * with grayscale as a separate case. + */ + +METHODDEF(void) +gray_rgb_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + register JSAMPROW outptr; + register JSAMPROW inptr; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + + while (--num_rows >= 0) { + inptr = input_buf[0][input_row++]; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + /* We can dispense with GETJSAMPLE() here */ + outptr[RGB_RED] = outptr[RGB_GREEN] = outptr[RGB_BLUE] = inptr[col]; + outptr += RGB_PIXELSIZE; + } + } +} + + +/* + * Convert some rows of samples to the output colorspace. + * This version handles Adobe-style YCCK->CMYK conversion, + * where we convert YCbCr to R=1-C, G=1-M, and B=1-Y using the + * same conversion as above, while passing K (black) unchanged. + * We assume build_ycc_rgb_table has been called. + */ + +METHODDEF(void) +ycck_cmyk_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int y, cb, cr; + register JSAMPROW outptr; + register JSAMPROW inptr0, inptr1, inptr2, inptr3; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + register int * Crrtab = cconvert->Cr_r_tab; + register int * Cbbtab = cconvert->Cb_b_tab; + register INT32 * Crgtab = cconvert->Cr_g_tab; + register INT32 * Cbgtab = cconvert->Cb_g_tab; + SHIFT_TEMPS + + while (--num_rows >= 0) { + inptr0 = input_buf[0][input_row]; + inptr1 = input_buf[1][input_row]; + inptr2 = input_buf[2][input_row]; + inptr3 = input_buf[3][input_row]; + input_row++; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + y = GETJSAMPLE(inptr0[col]); + cb = GETJSAMPLE(inptr1[col]); + cr = GETJSAMPLE(inptr2[col]); + /* Range-limiting is essential due to noise introduced by DCT losses, + * and for extended gamut encodings (sYCC). + */ + outptr[0] = range_limit[MAXJSAMPLE - (y + Crrtab[cr])]; /* red */ + outptr[1] = range_limit[MAXJSAMPLE - (y + /* green */ + ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], + SCALEBITS)))]; + outptr[2] = range_limit[MAXJSAMPLE - (y + Cbbtab[cb])]; /* blue */ + /* K passes through unchanged */ + outptr[3] = inptr3[col]; /* don't need GETJSAMPLE here */ + outptr += 4; + } + } +} + + +/* + * Convert CMYK to YK part of YCCK for colorless output. + * We assume build_rgb_y_table has been called. + */ + +METHODDEF(void) +cmyk_yk_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register INT32 y; + register INT32 * Rytab = cconvert->R_y_tab; + register INT32 * Gytab = cconvert->G_y_tab; + register INT32 * Bytab = cconvert->B_y_tab; + register JSAMPROW outptr; + register JSAMPROW inptr0, inptr1, inptr2, inptr3; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + + while (--num_rows >= 0) { + inptr0 = input_buf[0][input_row]; + inptr1 = input_buf[1][input_row]; + inptr2 = input_buf[2][input_row]; + inptr3 = input_buf[3][input_row]; + input_row++; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + y = Rytab[MAXJSAMPLE - GETJSAMPLE(inptr0[col])]; + y += Gytab[MAXJSAMPLE - GETJSAMPLE(inptr1[col])]; + y += Bytab[MAXJSAMPLE - GETJSAMPLE(inptr2[col])]; + outptr[0] = (JSAMPLE) (y >> SCALEBITS); + /* K passes through unchanged */ + outptr[1] = inptr3[col]; /* don't need GETJSAMPLE here */ + outptr += 2; + } + } +} + + +/* + * Empty method for start_pass. + */ + +METHODDEF(void) +start_pass_dcolor (j_decompress_ptr cinfo) +{ + /* no work needed */ +} + + +/* + * Module initialization routine for output colorspace conversion. + */ + +GLOBAL(void) +jinit_color_deconverter (j_decompress_ptr cinfo) +{ + my_cconvert_ptr cconvert; + int ci, i; + + cconvert = (my_cconvert_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_color_deconverter)); + cinfo->cconvert = &cconvert->pub; + cconvert->pub.start_pass = start_pass_dcolor; + + /* Make sure num_components agrees with jpeg_color_space */ + switch (cinfo->jpeg_color_space) { + case JCS_GRAYSCALE: + if (cinfo->num_components != 1) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + break; + + case JCS_RGB: + case JCS_YCbCr: + case JCS_BG_RGB: + case JCS_BG_YCC: + if (cinfo->num_components != 3) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + break; + + case JCS_CMYK: + case JCS_YCCK: + if (cinfo->num_components != 4) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + break; + + default: /* JCS_UNKNOWN can be anything */ + if (cinfo->num_components < 1) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + } + + /* Support color transform only for RGB colorspaces */ + if (cinfo->color_transform && + cinfo->jpeg_color_space != JCS_RGB && + cinfo->jpeg_color_space != JCS_BG_RGB) + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + + /* Set out_color_components and conversion method based on requested space. + * Also adjust the component_needed flags for any unused components, + * so that earlier pipeline stages can avoid useless computation. + */ + + switch (cinfo->out_color_space) { + case JCS_GRAYSCALE: + cinfo->out_color_components = 1; + switch (cinfo->jpeg_color_space) { + case JCS_GRAYSCALE: + case JCS_YCbCr: + case JCS_BG_YCC: + cconvert->pub.color_convert = grayscale_convert; + /* For color->grayscale conversion, only the Y (0) component is needed */ + for (ci = 1; ci < cinfo->num_components; ci++) + cinfo->comp_info[ci].component_needed = FALSE; + break; + case JCS_RGB: + switch (cinfo->color_transform) { + case JCT_NONE: + cconvert->pub.color_convert = rgb_gray_convert; + break; + case JCT_SUBTRACT_GREEN: + cconvert->pub.color_convert = rgb1_gray_convert; + break; + default: + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + } + build_rgb_y_table(cinfo); + break; + default: + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + } + break; + + case JCS_RGB: + cinfo->out_color_components = RGB_PIXELSIZE; + switch (cinfo->jpeg_color_space) { + case JCS_GRAYSCALE: + cconvert->pub.color_convert = gray_rgb_convert; + break; + case JCS_YCbCr: + cconvert->pub.color_convert = ycc_rgb_convert; + build_ycc_rgb_table(cinfo); + break; + case JCS_BG_YCC: + cconvert->pub.color_convert = ycc_rgb_convert; + build_bg_ycc_rgb_table(cinfo); + break; + case JCS_RGB: + switch (cinfo->color_transform) { + case JCT_NONE: + cconvert->pub.color_convert = rgb_convert; + break; + case JCT_SUBTRACT_GREEN: + cconvert->pub.color_convert = rgb1_rgb_convert; + break; + default: + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + } + break; + default: + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + } + break; + + case JCS_BG_RGB: + if (cinfo->jpeg_color_space != JCS_BG_RGB) + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + cinfo->out_color_components = RGB_PIXELSIZE; + switch (cinfo->color_transform) { + case JCT_NONE: + cconvert->pub.color_convert = rgb_convert; + break; + case JCT_SUBTRACT_GREEN: + cconvert->pub.color_convert = rgb1_rgb_convert; + break; + default: + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + } + break; + + case JCS_CMYK: + if (cinfo->jpeg_color_space != JCS_YCCK) + goto def_label; + cinfo->out_color_components = 4; + cconvert->pub.color_convert = ycck_cmyk_convert; + build_ycc_rgb_table(cinfo); + break; + + case JCS_YCCK: + if (cinfo->jpeg_color_space != JCS_CMYK || + /* Support only YK part of YCCK for colorless output */ + ! cinfo->comp_info[0].component_needed || + cinfo->comp_info[1].component_needed || + cinfo->comp_info[2].component_needed || + ! cinfo->comp_info[3].component_needed) + goto def_label; + cinfo->out_color_components = 2; + /* Need all components on input side */ + cinfo->comp_info[1].component_needed = TRUE; + cinfo->comp_info[2].component_needed = TRUE; + cconvert->pub.color_convert = cmyk_yk_convert; + build_rgb_y_table(cinfo); + break; + + default: def_label: /* permit null conversion to same output space */ + if (cinfo->out_color_space != cinfo->jpeg_color_space) + /* unsupported non-null conversion */ + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + i = 0; + for (ci = 0; ci < cinfo->num_components; ci++) + if (cinfo->comp_info[ci].component_needed) + i++; /* count output color components */ + cinfo->out_color_components = i; + cconvert->pub.color_convert = null_convert; + } + + if (cinfo->quantize_colors) + cinfo->output_components = 1; /* single colormapped output component */ + else + cinfo->output_components = cinfo->out_color_components; +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jddctmgr.c b/widget/milsko/milskosrc/external/libjpeg/src/jddctmgr.c new file mode 100644 index 0000000000..9ecfbb5107 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jddctmgr.c @@ -0,0 +1,384 @@ +/* + * jddctmgr.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2002-2013 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the inverse-DCT management logic. + * This code selects a particular IDCT implementation to be used, + * and it performs related housekeeping chores. No code in this file + * is executed per IDCT step, only during output pass setup. + * + * Note that the IDCT routines are responsible for performing coefficient + * dequantization as well as the IDCT proper. This module sets up the + * dequantization multiplier table needed by the IDCT routine. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + + +/* + * The decompressor input side (jdinput.c) saves away the appropriate + * quantization table for each component at the start of the first scan + * involving that component. (This is necessary in order to correctly + * decode files that reuse Q-table slots.) + * When we are ready to make an output pass, the saved Q-table is converted + * to a multiplier table that will actually be used by the IDCT routine. + * The multiplier table contents are IDCT-method-dependent. To support + * application changes in IDCT method between scans, we can remake the + * multiplier tables if necessary. + * In buffered-image mode, the first output pass may occur before any data + * has been seen for some components, and thus before their Q-tables have + * been saved away. To handle this case, multiplier tables are preset + * to zeroes; the result of the IDCT will be a neutral gray level. + */ + + +/* Private subobject for this module */ + +typedef struct { + struct jpeg_inverse_dct pub; /* public fields */ + + /* This array contains the IDCT method code that each multiplier table + * is currently set up for, or -1 if it's not yet set up. + * The actual multiplier tables are pointed to by dct_table in the + * per-component comp_info structures. + */ + int cur_method[MAX_COMPONENTS]; +} my_idct_controller; + +typedef my_idct_controller * my_idct_ptr; + + +/* Allocated multiplier tables: big enough for any supported variant */ + +typedef union { + ISLOW_MULT_TYPE islow_array[DCTSIZE2]; +#ifdef DCT_IFAST_SUPPORTED + IFAST_MULT_TYPE ifast_array[DCTSIZE2]; +#endif +#ifdef DCT_FLOAT_SUPPORTED + FLOAT_MULT_TYPE float_array[DCTSIZE2]; +#endif +} multiplier_table; + + +/* The current scaled-IDCT routines require ISLOW-style multiplier tables, + * so be sure to compile that code if either ISLOW or SCALING is requested. + */ +#ifdef DCT_ISLOW_SUPPORTED +#define PROVIDE_ISLOW_TABLES +#else +#ifdef IDCT_SCALING_SUPPORTED +#define PROVIDE_ISLOW_TABLES +#endif +#endif + + +/* + * Prepare for an output pass. + * Here we select the proper IDCT routine for each component and build + * a matching multiplier table. + */ + +METHODDEF(void) +start_pass (j_decompress_ptr cinfo) +{ + my_idct_ptr idct = (my_idct_ptr) cinfo->idct; + int ci, i; + jpeg_component_info *compptr; + int method = 0; + inverse_DCT_method_ptr method_ptr = NULL; + JQUANT_TBL * qtbl; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Select the proper IDCT routine for this component's scaling */ + switch ((compptr->DCT_h_scaled_size << 8) + compptr->DCT_v_scaled_size) { +#ifdef IDCT_SCALING_SUPPORTED + case ((1 << 8) + 1): + method_ptr = jpeg_idct_1x1; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((2 << 8) + 2): + method_ptr = jpeg_idct_2x2; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((3 << 8) + 3): + method_ptr = jpeg_idct_3x3; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((4 << 8) + 4): + method_ptr = jpeg_idct_4x4; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((5 << 8) + 5): + method_ptr = jpeg_idct_5x5; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((6 << 8) + 6): + method_ptr = jpeg_idct_6x6; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((7 << 8) + 7): + method_ptr = jpeg_idct_7x7; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((9 << 8) + 9): + method_ptr = jpeg_idct_9x9; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((10 << 8) + 10): + method_ptr = jpeg_idct_10x10; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((11 << 8) + 11): + method_ptr = jpeg_idct_11x11; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((12 << 8) + 12): + method_ptr = jpeg_idct_12x12; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((13 << 8) + 13): + method_ptr = jpeg_idct_13x13; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((14 << 8) + 14): + method_ptr = jpeg_idct_14x14; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((15 << 8) + 15): + method_ptr = jpeg_idct_15x15; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((16 << 8) + 16): + method_ptr = jpeg_idct_16x16; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((16 << 8) + 8): + method_ptr = jpeg_idct_16x8; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((14 << 8) + 7): + method_ptr = jpeg_idct_14x7; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((12 << 8) + 6): + method_ptr = jpeg_idct_12x6; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((10 << 8) + 5): + method_ptr = jpeg_idct_10x5; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((8 << 8) + 4): + method_ptr = jpeg_idct_8x4; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((6 << 8) + 3): + method_ptr = jpeg_idct_6x3; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((4 << 8) + 2): + method_ptr = jpeg_idct_4x2; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((2 << 8) + 1): + method_ptr = jpeg_idct_2x1; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((8 << 8) + 16): + method_ptr = jpeg_idct_8x16; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((7 << 8) + 14): + method_ptr = jpeg_idct_7x14; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((6 << 8) + 12): + method_ptr = jpeg_idct_6x12; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((5 << 8) + 10): + method_ptr = jpeg_idct_5x10; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((4 << 8) + 8): + method_ptr = jpeg_idct_4x8; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((3 << 8) + 6): + method_ptr = jpeg_idct_3x6; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((2 << 8) + 4): + method_ptr = jpeg_idct_2x4; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; + case ((1 << 8) + 2): + method_ptr = jpeg_idct_1x2; + method = JDCT_ISLOW; /* jidctint uses islow-style table */ + break; +#endif + case ((DCTSIZE << 8) + DCTSIZE): + switch (cinfo->dct_method) { +#ifdef DCT_ISLOW_SUPPORTED + case JDCT_ISLOW: + method_ptr = jpeg_idct_islow; + method = JDCT_ISLOW; + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + method_ptr = jpeg_idct_ifast; + method = JDCT_IFAST; + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + method_ptr = jpeg_idct_float; + method = JDCT_FLOAT; + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } + break; + default: + ERREXIT2(cinfo, JERR_BAD_DCTSIZE, + compptr->DCT_h_scaled_size, compptr->DCT_v_scaled_size); + break; + } + idct->pub.inverse_DCT[ci] = method_ptr; + /* Create multiplier table from quant table. + * However, we can skip this if the component is uninteresting + * or if we already built the table. Also, if no quant table + * has yet been saved for the component, we leave the + * multiplier table all-zero; we'll be reading zeroes from the + * coefficient controller's buffer anyway. + */ + if (! compptr->component_needed || idct->cur_method[ci] == method) + continue; + qtbl = compptr->quant_table; + if (qtbl == NULL) /* happens if no data yet for component */ + continue; + idct->cur_method[ci] = method; + switch (method) { +#ifdef PROVIDE_ISLOW_TABLES + case JDCT_ISLOW: + { + /* For LL&M IDCT method, multipliers are equal to raw quantization + * coefficients, but are stored as ints to ensure access efficiency. + */ + ISLOW_MULT_TYPE * ismtbl = (ISLOW_MULT_TYPE *) compptr->dct_table; + for (i = 0; i < DCTSIZE2; i++) { + ismtbl[i] = (ISLOW_MULT_TYPE) qtbl->quantval[i]; + } + } + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + { + /* For AA&N IDCT method, multipliers are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + * For integer operation, the multiplier table is to be scaled by + * IFAST_SCALE_BITS. + */ + IFAST_MULT_TYPE * ifmtbl = (IFAST_MULT_TYPE *) compptr->dct_table; +#define CONST_BITS 14 + static const INT16 aanscales[DCTSIZE2] = { + /* precomputed values scaled up by 14 bits */ + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270, + 21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906, + 19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315, + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552, + 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446, + 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247 + }; + SHIFT_TEMPS + + for (i = 0; i < DCTSIZE2; i++) { + ifmtbl[i] = (IFAST_MULT_TYPE) + DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i], + (INT32) aanscales[i]), + CONST_BITS-IFAST_SCALE_BITS); + } + } + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + { + /* For float AA&N IDCT method, multipliers are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + * We apply a further scale factor of 1/8. + */ + FLOAT_MULT_TYPE * fmtbl = (FLOAT_MULT_TYPE *) compptr->dct_table; + int row, col; + static const double aanscalefactor[DCTSIZE] = { + 1.0, 1.387039845, 1.306562965, 1.175875602, + 1.0, 0.785694958, 0.541196100, 0.275899379 + }; + + i = 0; + for (row = 0; row < DCTSIZE; row++) { + for (col = 0; col < DCTSIZE; col++) { + fmtbl[i] = (FLOAT_MULT_TYPE) + ((double) qtbl->quantval[i] * + aanscalefactor[row] * aanscalefactor[col] * 0.125); + i++; + } + } + } + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } + } +} + + +/* + * Initialize IDCT manager. + */ + +GLOBAL(void) +jinit_inverse_dct (j_decompress_ptr cinfo) +{ + my_idct_ptr idct; + int ci; + jpeg_component_info *compptr; + + idct = (my_idct_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_idct_controller)); + cinfo->idct = &idct->pub; + idct->pub.start_pass = start_pass; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Allocate and pre-zero a multiplier table for each component */ + compptr->dct_table = + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(multiplier_table)); + MEMZERO(compptr->dct_table, SIZEOF(multiplier_table)); + /* Mark multiplier table not yet set up for any method */ + idct->cur_method[ci] = -1; + } +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdhuff.c b/widget/milsko/milskosrc/external/libjpeg/src/jdhuff.c new file mode 100644 index 0000000000..f175f0c323 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdhuff.c @@ -0,0 +1,1559 @@ +/* + * jdhuff.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 2006-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains Huffman entropy decoding routines. + * Both sequential and progressive modes are supported in this single module. + * + * Much of the complexity here has to do with supporting input suspension. + * If the data source module demands suspension, we want to be able to back + * up to the start of the current MCU. To do this, we copy state variables + * into local working storage, and update them back to the permanent + * storage only upon successful completion of an MCU. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Derived data constructed for each Huffman table */ + +#define HUFF_LOOKAHEAD 8 /* # of bits of lookahead */ + +typedef struct { + /* Basic tables: (element [0] of each array is unused) */ + INT32 maxcode[18]; /* largest code of length k (-1 if none) */ + /* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */ + INT32 valoffset[17]; /* huffval[] offset for codes of length k */ + /* valoffset[k] = huffval[] index of 1st symbol of code length k, less + * the smallest code of length k; so given a code of length k, the + * corresponding symbol is huffval[code + valoffset[k]] + */ + + /* Link to public Huffman table (needed only in jpeg_huff_decode) */ + JHUFF_TBL *pub; + + /* Lookahead tables: indexed by the next HUFF_LOOKAHEAD bits of + * the input data stream. If the next Huffman code is no more + * than HUFF_LOOKAHEAD bits long, we can obtain its length and + * the corresponding symbol directly from these tables. + */ + int look_nbits[1< 32 bits on your machine, and shifting/masking longs is + * reasonably fast, making bit_buf_type be long and setting BIT_BUF_SIZE + * appropriately should be a win. Unfortunately we can't define the size + * with something like #define BIT_BUF_SIZE (sizeof(bit_buf_type)*8) + * because not all machines measure sizeof in 8-bit bytes. + */ + +typedef struct { /* Bitreading state saved across MCUs */ + bit_buf_type get_buffer; /* current bit-extraction buffer */ + int bits_left; /* # of unused bits in it */ +} bitread_perm_state; + +typedef struct { /* Bitreading working state within an MCU */ + /* Current data source location */ + /* We need a copy, rather than munging the original, in case of suspension */ + const JOCTET * next_input_byte; /* => next byte to read from source */ + size_t bytes_in_buffer; /* # of bytes remaining in source buffer */ + /* Bit input buffer --- note these values are kept in register variables, + * not in this struct, inside the inner loops. + */ + bit_buf_type get_buffer; /* current bit-extraction buffer */ + int bits_left; /* # of unused bits in it */ + /* Pointer needed by jpeg_fill_bit_buffer. */ + j_decompress_ptr cinfo; /* back link to decompress master record */ +} bitread_working_state; + +/* Macros to declare and load/save bitread local variables. */ +#define BITREAD_STATE_VARS \ + register bit_buf_type get_buffer; \ + register int bits_left; \ + bitread_working_state br_state + +#define BITREAD_LOAD_STATE(cinfop,permstate) \ + br_state.cinfo = cinfop; \ + br_state.next_input_byte = cinfop->src->next_input_byte; \ + br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \ + get_buffer = permstate.get_buffer; \ + bits_left = permstate.bits_left; + +#define BITREAD_SAVE_STATE(cinfop,permstate) \ + cinfop->src->next_input_byte = br_state.next_input_byte; \ + cinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \ + permstate.get_buffer = get_buffer; \ + permstate.bits_left = bits_left + +/* + * These macros provide the in-line portion of bit fetching. + * Use CHECK_BIT_BUFFER to ensure there are N bits in get_buffer + * before using GET_BITS, PEEK_BITS, or DROP_BITS. + * The variables get_buffer and bits_left are assumed to be locals, + * but the state struct might not be (jpeg_huff_decode needs this). + * CHECK_BIT_BUFFER(state,n,action); + * Ensure there are N bits in get_buffer; if suspend, take action. + * val = GET_BITS(n); + * Fetch next N bits. + * val = PEEK_BITS(n); + * Fetch next N bits without removing them from the buffer. + * DROP_BITS(n); + * Discard next N bits. + * The value N should be a simple variable, not an expression, because it + * is evaluated multiple times. + */ + +#define CHECK_BIT_BUFFER(state,nbits,action) \ + { if (bits_left < (nbits)) { \ + if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits)) \ + { action; } \ + get_buffer = (state).get_buffer; bits_left = (state).bits_left; } } + +#define GET_BITS(nbits) \ + (((int) (get_buffer >> (bits_left -= (nbits)))) & BIT_MASK(nbits)) + +#define PEEK_BITS(nbits) \ + (((int) (get_buffer >> (bits_left - (nbits)))) & BIT_MASK(nbits)) + +#define DROP_BITS(nbits) \ + (bits_left -= (nbits)) + + +/* + * Code for extracting next Huffman-coded symbol from input bit stream. + * Again, this is time-critical and we make the main paths be macros. + * + * We use a lookahead table to process codes of up to HUFF_LOOKAHEAD bits + * without looping. Usually, more than 95% of the Huffman codes will be 8 + * or fewer bits long. The few overlength codes are handled with a loop, + * which need not be inline code. + * + * Notes about the HUFF_DECODE macro: + * 1. Near the end of the data segment, we may fail to get enough bits + * for a lookahead. In that case, we do it the hard way. + * 2. If the lookahead table contains no entry, the next code must be + * more than HUFF_LOOKAHEAD bits long. + * 3. jpeg_huff_decode returns -1 if forced to suspend. + */ + +#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \ +{ register int nb, look; \ + if (bits_left < HUFF_LOOKAHEAD) { \ + if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \ + get_buffer = state.get_buffer; bits_left = state.bits_left; \ + if (bits_left < HUFF_LOOKAHEAD) { \ + nb = 1; goto slowlabel; \ + } \ + } \ + look = PEEK_BITS(HUFF_LOOKAHEAD); \ + if ((nb = htbl->look_nbits[look]) != 0) { \ + DROP_BITS(nb); \ + result = htbl->look_sym[look]; \ + } else { \ + nb = HUFF_LOOKAHEAD+1; \ +slowlabel: \ + if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \ + { failaction; } \ + get_buffer = state.get_buffer; bits_left = state.bits_left; \ + } \ +} + + +/* + * Expanded entropy decoder object for Huffman decoding. + * + * The savable_state subrecord contains fields that change within an MCU, + * but must not be updated permanently until we complete the MCU. + */ + +typedef struct { + unsigned int EOBRUN; /* remaining EOBs in EOBRUN */ + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ +} savable_state; + +/* This macro is to work around compilers with missing or broken + * structure assignment. You'll need to fix this code if you have + * such a compiler and you change MAX_COMPS_IN_SCAN. + */ + +#ifndef NO_STRUCT_ASSIGN +#define ASSIGN_STATE(dest,src) ((dest) = (src)) +#else +#if MAX_COMPS_IN_SCAN == 4 +#define ASSIGN_STATE(dest,src) \ + ((dest).EOBRUN = (src).EOBRUN, \ + (dest).last_dc_val[0] = (src).last_dc_val[0], \ + (dest).last_dc_val[1] = (src).last_dc_val[1], \ + (dest).last_dc_val[2] = (src).last_dc_val[2], \ + (dest).last_dc_val[3] = (src).last_dc_val[3]) +#endif +#endif + + +typedef struct { + struct jpeg_entropy_decoder pub; /* public fields */ + + /* These fields are loaded into local variables at start of each MCU. + * In case of suspension, we exit WITHOUT updating them. + */ + bitread_perm_state bitstate; /* Bit buffer at start of MCU */ + savable_state saved; /* Other state at start of MCU */ + + /* These fields are NOT loaded into local working state. */ + boolean insufficient_data; /* set TRUE after emitting warning */ + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + + /* Following two fields used only in progressive mode */ + + /* Pointers to derived tables (these workspaces have image lifespan) */ + d_derived_tbl * derived_tbls[NUM_HUFF_TBLS]; + + d_derived_tbl * ac_derived_tbl; /* active table during an AC scan */ + + /* Following fields used only in sequential mode */ + + /* Pointers to derived tables (these workspaces have image lifespan) */ + d_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS]; + d_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS]; + + /* Precalculated info set up by start_pass for use in decode_mcu: */ + + /* Pointers to derived tables to be used for each block within an MCU */ + d_derived_tbl * dc_cur_tbls[D_MAX_BLOCKS_IN_MCU]; + d_derived_tbl * ac_cur_tbls[D_MAX_BLOCKS_IN_MCU]; + /* Whether we care about the DC and AC coefficient values for each block */ + int coef_limit[D_MAX_BLOCKS_IN_MCU]; +} huff_entropy_decoder; + +typedef huff_entropy_decoder * huff_entropy_ptr; + + +static const int jpeg_zigzag_order[8][8] = { + { 0, 1, 5, 6, 14, 15, 27, 28 }, + { 2, 4, 7, 13, 16, 26, 29, 42 }, + { 3, 8, 12, 17, 25, 30, 41, 43 }, + { 9, 11, 18, 24, 31, 40, 44, 53 }, + { 10, 19, 23, 32, 39, 45, 52, 54 }, + { 20, 22, 33, 38, 46, 51, 55, 60 }, + { 21, 34, 37, 47, 50, 56, 59, 61 }, + { 35, 36, 48, 49, 57, 58, 62, 63 } +}; + +static const int jpeg_zigzag_order7[7][7] = { + { 0, 1, 5, 6, 14, 15, 27 }, + { 2, 4, 7, 13, 16, 26, 28 }, + { 3, 8, 12, 17, 25, 29, 38 }, + { 9, 11, 18, 24, 30, 37, 39 }, + { 10, 19, 23, 31, 36, 40, 45 }, + { 20, 22, 32, 35, 41, 44, 46 }, + { 21, 33, 34, 42, 43, 47, 48 } +}; + +static const int jpeg_zigzag_order6[6][6] = { + { 0, 1, 5, 6, 14, 15 }, + { 2, 4, 7, 13, 16, 25 }, + { 3, 8, 12, 17, 24, 26 }, + { 9, 11, 18, 23, 27, 32 }, + { 10, 19, 22, 28, 31, 33 }, + { 20, 21, 29, 30, 34, 35 } +}; + +static const int jpeg_zigzag_order5[5][5] = { + { 0, 1, 5, 6, 14 }, + { 2, 4, 7, 13, 15 }, + { 3, 8, 12, 16, 21 }, + { 9, 11, 17, 20, 22 }, + { 10, 18, 19, 23, 24 } +}; + +static const int jpeg_zigzag_order4[4][4] = { + { 0, 1, 5, 6 }, + { 2, 4, 7, 12 }, + { 3, 8, 11, 13 }, + { 9, 10, 14, 15 } +}; + +static const int jpeg_zigzag_order3[3][3] = { + { 0, 1, 5 }, + { 2, 4, 6 }, + { 3, 7, 8 } +}; + +static const int jpeg_zigzag_order2[2][2] = { + { 0, 1 }, + { 2, 3 } +}; + + +/* + * Compute the derived values for a Huffman table. + * This routine also performs some validation checks on the table. + */ + +LOCAL(void) +jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno, + d_derived_tbl ** pdtbl) +{ + JHUFF_TBL *htbl; + d_derived_tbl *dtbl; + int p, i, l, si, numsymbols; + int lookbits, ctr; + char huffsize[257]; + unsigned int huffcode[257]; + unsigned int code; + + /* Note that huffsize[] and huffcode[] are filled in code-length order, + * paralleling the order of the symbols themselves in htbl->huffval[]. + */ + + /* Find the input Huffman table */ + if (tblno < 0 || tblno >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tblno); + htbl = + isDC ? cinfo->dc_huff_tbl_ptrs[tblno] : cinfo->ac_huff_tbl_ptrs[tblno]; + if (htbl == NULL) + htbl = jpeg_std_huff_table((j_common_ptr) cinfo, isDC, tblno); + + /* Allocate a workspace if we haven't already done so. */ + if (*pdtbl == NULL) + *pdtbl = (d_derived_tbl *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(d_derived_tbl)); + dtbl = *pdtbl; + dtbl->pub = htbl; /* fill in back link */ + + /* Figure C.1: make table of Huffman code length for each symbol */ + + p = 0; + for (l = 1; l <= 16; l++) { + i = (int) htbl->bits[l]; + if (i < 0 || p + i > 256) /* protect against table overrun */ + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + while (i--) + huffsize[p++] = (char) l; + } + huffsize[p] = 0; + numsymbols = p; + + /* Figure C.2: generate the codes themselves */ + /* We also validate that the counts represent a legal Huffman code tree. */ + + code = 0; + si = huffsize[0]; + p = 0; + while (huffsize[p]) { + while (((int) huffsize[p]) == si) { + huffcode[p++] = code; + code++; + } + /* code is now 1 more than the last code used for codelength si; but + * it must still fit in si bits, since no code is allowed to be all ones. + */ + if (((INT32) code) >= (((INT32) 1) << si)) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + code <<= 1; + si++; + } + + /* Figure F.15: generate decoding tables for bit-sequential decoding */ + + p = 0; + for (l = 1; l <= 16; l++) { + if (htbl->bits[l]) { + /* valoffset[l] = huffval[] index of 1st symbol of code length l, + * minus the minimum code of length l + */ + dtbl->valoffset[l] = (INT32) p - (INT32) huffcode[p]; + p += htbl->bits[l]; + dtbl->maxcode[l] = huffcode[p-1]; /* maximum code of length l */ + } else { + dtbl->maxcode[l] = -1; /* -1 if no codes of this length */ + } + } + dtbl->maxcode[17] = 0xFFFFFL; /* ensures jpeg_huff_decode terminates */ + + /* Compute lookahead tables to speed up decoding. + * First we set all the table entries to 0, indicating "too long"; + * then we iterate through the Huffman codes that are short enough and + * fill in all the entries that correspond to bit sequences starting + * with that code. + */ + + MEMZERO(dtbl->look_nbits, SIZEOF(dtbl->look_nbits)); + + p = 0; + for (l = 1; l <= HUFF_LOOKAHEAD; l++) { + for (i = 1; i <= (int) htbl->bits[l]; i++, p++) { + /* l = current code's length, p = its index in huffcode[] & huffval[]. */ + /* Generate left-justified code followed by all possible bit sequences */ + lookbits = huffcode[p] << (HUFF_LOOKAHEAD-l); + for (ctr = 1 << (HUFF_LOOKAHEAD-l); ctr > 0; ctr--) { + dtbl->look_nbits[lookbits] = l; + dtbl->look_sym[lookbits] = htbl->huffval[p]; + lookbits++; + } + } + } + + /* Validate symbols as being reasonable. + * For AC tables, we make no check, but accept all byte values 0..255. + * For DC tables, we require the symbols to be in range 0..15. + * (Tighter bounds could be applied depending on the data depth and mode, + * but this is sufficient to ensure safe decoding.) + */ + if (isDC) { + for (i = 0; i < numsymbols; i++) { + int sym = htbl->huffval[i]; + if (sym < 0 || sym > 15) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + } + } +} + + +/* + * Out-of-line code for bit fetching. + * Note: current values of get_buffer and bits_left are passed as parameters, + * but are returned in the corresponding fields of the state struct. + * + * On most machines MIN_GET_BITS should be 25 to allow the full 32-bit width + * of get_buffer to be used. (On machines with wider words, an even larger + * buffer could be used.) However, on some machines 32-bit shifts are + * quite slow and take time proportional to the number of places shifted. + * (This is true with most PC compilers, for instance.) In this case it may + * be a win to set MIN_GET_BITS to the minimum value of 15. This reduces the + * average shift distance at the cost of more calls to jpeg_fill_bit_buffer. + */ + +#ifdef SLOW_SHIFT_32 +#define MIN_GET_BITS 15 /* minimum allowable value */ +#else +#define MIN_GET_BITS (BIT_BUF_SIZE-7) +#endif + + +LOCAL(boolean) +jpeg_fill_bit_buffer (bitread_working_state * state, + register bit_buf_type get_buffer, register int bits_left, + int nbits) +/* Load up the bit buffer to a depth of at least nbits */ +{ + /* Copy heavily used state fields into locals (hopefully registers) */ + register const JOCTET * next_input_byte = state->next_input_byte; + register size_t bytes_in_buffer = state->bytes_in_buffer; + j_decompress_ptr cinfo = state->cinfo; + + /* Attempt to load at least MIN_GET_BITS bits into get_buffer. */ + /* (It is assumed that no request will be for more than that many bits.) */ + /* We fail to do so only if we hit a marker or are forced to suspend. */ + + if (cinfo->unread_marker == 0) { /* cannot advance past a marker */ + while (bits_left < MIN_GET_BITS) { + register int c; + + /* Attempt to read a byte */ + if (bytes_in_buffer == 0) { + if (! (*cinfo->src->fill_input_buffer) (cinfo)) + return FALSE; + next_input_byte = cinfo->src->next_input_byte; + bytes_in_buffer = cinfo->src->bytes_in_buffer; + } + bytes_in_buffer--; + c = GETJOCTET(*next_input_byte++); + + /* If it's 0xFF, check and discard stuffed zero byte */ + if (c == 0xFF) { + /* Loop here to discard any padding FF's on terminating marker, + * so that we can save a valid unread_marker value. NOTE: we will + * accept multiple FF's followed by a 0 as meaning a single FF data + * byte. This data pattern is not valid according to the standard. + */ + do { + if (bytes_in_buffer == 0) { + if (! (*cinfo->src->fill_input_buffer) (cinfo)) + return FALSE; + next_input_byte = cinfo->src->next_input_byte; + bytes_in_buffer = cinfo->src->bytes_in_buffer; + } + bytes_in_buffer--; + c = GETJOCTET(*next_input_byte++); + } while (c == 0xFF); + + if (c == 0) { + /* Found FF/00, which represents an FF data byte */ + c = 0xFF; + } else { + /* Oops, it's actually a marker indicating end of compressed data. + * Save the marker code for later use. + * Fine point: it might appear that we should save the marker into + * bitread working state, not straight into permanent state. But + * once we have hit a marker, we cannot need to suspend within the + * current MCU, because we will read no more bytes from the data + * source. So it is OK to update permanent state right away. + */ + cinfo->unread_marker = c; + /* See if we need to insert some fake zero bits. */ + goto no_more_bytes; + } + } + + /* OK, load c into get_buffer */ + get_buffer = (get_buffer << 8) | c; + bits_left += 8; + } /* end while */ + } else { + no_more_bytes: + /* We get here if we've read the marker that terminates the compressed + * data segment. There should be enough bits in the buffer register + * to satisfy the request; if so, no problem. + */ + if (nbits > bits_left) { + /* Uh-oh. Report corrupted data to user and stuff zeroes into + * the data stream, so that we can produce some kind of image. + * We use a nonvolatile flag to ensure that only one warning message + * appears per data segment. + */ + if (! ((huff_entropy_ptr) cinfo->entropy)->insufficient_data) { + WARNMS(cinfo, JWRN_HIT_MARKER); + ((huff_entropy_ptr) cinfo->entropy)->insufficient_data = TRUE; + } + /* Fill the buffer with zero bits */ + get_buffer <<= MIN_GET_BITS - bits_left; + bits_left = MIN_GET_BITS; + } + } + + /* Unload the local registers */ + state->next_input_byte = next_input_byte; + state->bytes_in_buffer = bytes_in_buffer; + state->get_buffer = get_buffer; + state->bits_left = bits_left; + + return TRUE; +} + + +/* + * Figure F.12: extend sign bit. + * On some machines, a shift and sub will be faster than a table lookup. + */ + +#ifdef AVOID_TABLES + +#define BIT_MASK(nbits) ((1<<(nbits))-1) +#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) - ((1<<(s))-1) : (x)) + +#else + +#define BIT_MASK(nbits) bmask[nbits] +#define HUFF_EXTEND(x,s) ((x) <= bmask[(s) - 1] ? (x) - bmask[s] : (x)) + +static const int bmask[16] = /* bmask[n] is mask for n rightmost bits */ + { 0, 0x0001, 0x0003, 0x0007, 0x000F, 0x001F, 0x003F, 0x007F, 0x00FF, + 0x01FF, 0x03FF, 0x07FF, 0x0FFF, 0x1FFF, 0x3FFF, 0x7FFF }; + +#endif /* AVOID_TABLES */ + + +/* + * Out-of-line code for Huffman code decoding. + */ + +LOCAL(int) +jpeg_huff_decode (bitread_working_state * state, + register bit_buf_type get_buffer, register int bits_left, + d_derived_tbl * htbl, int min_bits) +{ + register int l = min_bits; + register INT32 code; + + /* HUFF_DECODE has determined that the code is at least min_bits */ + /* bits long, so fetch that many bits in one swoop. */ + + CHECK_BIT_BUFFER(*state, l, return -1); + code = GET_BITS(l); + + /* Collect the rest of the Huffman code one bit at a time. */ + /* This is per Figure F.16 in the JPEG spec. */ + + while (code > htbl->maxcode[l]) { + code <<= 1; + CHECK_BIT_BUFFER(*state, 1, return -1); + code |= GET_BITS(1); + l++; + } + + /* Unload the local registers */ + state->get_buffer = get_buffer; + state->bits_left = bits_left; + + /* With garbage input we may reach the sentinel value l = 17. */ + + if (l > 16) { + WARNMS(state->cinfo, JWRN_HUFF_BAD_CODE); + return 0; /* fake a zero as the safest result */ + } + + return htbl->pub->huffval[ (int) (code + htbl->valoffset[l]) ]; +} + + +/* + * Finish up at the end of a Huffman-compressed scan. + */ + +METHODDEF(void) +finish_pass_huff (j_decompress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + + /* Throw away any unused bits remaining in bit buffer; */ + /* include any full bytes in next_marker's count of discarded bytes */ + cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8; + entropy->bitstate.bits_left = 0; +} + + +/* + * Check for a restart marker & resynchronize decoder. + * Returns FALSE if must suspend. + */ + +LOCAL(boolean) +process_restart (j_decompress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci; + + finish_pass_huff(cinfo); + + /* Advance past the RSTn marker */ + if (! (*cinfo->marker->read_restart_marker) (cinfo)) + return FALSE; + + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) + entropy->saved.last_dc_val[ci] = 0; + /* Re-init EOB run count, too */ + entropy->saved.EOBRUN = 0; + + /* Reset restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; + + /* Reset out-of-data flag, unless read_restart_marker left us smack up + * against a marker. In that case we will end up treating the next data + * segment as empty, and we can avoid producing bogus output pixels by + * leaving the flag set. + */ + if (cinfo->unread_marker == 0) + entropy->insufficient_data = FALSE; + + return TRUE; +} + + +/* + * Huffman MCU decoding. + * Each of these routines decodes and returns one MCU's worth of + * Huffman-compressed coefficients. + * The coefficients are reordered from zigzag order into natural array order, + * but are not dequantized. + * + * The i'th block of the MCU is stored into the block pointed to by + * MCU_data[i]. WE ASSUME THIS AREA IS INITIALLY ZEROED BY THE CALLER. + * (Wholesale zeroing is usually a little faster than retail...) + * + * We return FALSE if data source requested suspension. In that case no + * changes have been made to permanent state. (Exception: some output + * coefficients may already have been assigned. This is harmless for + * spectral selection, since we'll just re-assign them on the next call. + * Successive approximation AC refinement has to be more careful, however.) + */ + +/* + * MCU decoding for DC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int Al = cinfo->Al; + register int s, r; + int blkn, ci; + JBLOCKROW block; + BITREAD_STATE_VARS; + savable_state state; + d_derived_tbl * tbl; + jpeg_component_info * compptr; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* If we've run out of data, just leave the MCU set to zeroes. + * This way, we return uniform gray for the remainder of the segment. + */ + if (! entropy->insufficient_data) { + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo, entropy->bitstate); + ASSIGN_STATE(state, entropy->saved); + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + tbl = entropy->derived_tbls[compptr->dc_tbl_no]; + + /* Decode a single block's worth of coefficients */ + + /* Section F.2.2.1: decode the DC coefficient difference */ + HUFF_DECODE(s, br_state, tbl, return FALSE, label1); + if (s) { + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + } + + /* Convert DC difference to actual value, update last_dc_val */ + s += state.last_dc_val[ci]; + state.last_dc_val[ci] = s; + /* Scale and output the coefficient (assumes jpeg_natural_order[0]=0) */ + (*block)[0] = (JCOEF) (s << Al); + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo, entropy->bitstate); + ASSIGN_STATE(entropy->saved, state); + } + + /* Account for restart interval if using restarts */ + if (cinfo->restart_interval) + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * MCU decoding for AC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + register int s, k, r; + unsigned int EOBRUN; + int Se, Al; + const int * natural_order; + JBLOCKROW block; + BITREAD_STATE_VARS; + d_derived_tbl * tbl; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* If we've run out of data, just leave the MCU set to zeroes. + * This way, we return uniform gray for the remainder of the segment. + */ + if (! entropy->insufficient_data) { + + /* Load up working state. + * We can avoid loading/saving bitread state if in an EOB run. + */ + EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */ + + /* There is always only one block per MCU */ + + if (EOBRUN) /* if it's a band of zeroes... */ + EOBRUN--; /* ...process it now (we do nothing) */ + else { + BITREAD_LOAD_STATE(cinfo, entropy->bitstate); + Se = cinfo->Se; + Al = cinfo->Al; + natural_order = cinfo->natural_order; + block = MCU_data[0]; + tbl = entropy->ac_derived_tbl; + + for (k = cinfo->Ss; k <= Se; k++) { + HUFF_DECODE(s, br_state, tbl, return FALSE, label2); + r = s >> 4; + s &= 15; + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + /* Scale and output coefficient in natural (dezigzagged) order */ + (*block)[natural_order[k]] = (JCOEF) (s << Al); + } else { + if (r != 15) { /* EOBr, run length is 2^r + appended bits */ + if (r) { /* EOBr, r > 0 */ + EOBRUN = 1 << r; + CHECK_BIT_BUFFER(br_state, r, return FALSE); + r = GET_BITS(r); + EOBRUN += r; + EOBRUN--; /* this band is processed at this moment */ + } + break; /* force end-of-band */ + } + k += 15; /* ZRL: skip 15 zeroes in band */ + } + } + + BITREAD_SAVE_STATE(cinfo, entropy->bitstate); + } + + /* Completed MCU, so update state */ + entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */ + } + + /* Account for restart interval if using restarts */ + if (cinfo->restart_interval) + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * MCU decoding for DC successive approximation refinement scan. + * Note: we assume such scans can be multi-component, + * although the spec is not very clear on the point. + */ + +METHODDEF(boolean) +decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + JCOEF p1; + int blkn; + BITREAD_STATE_VARS; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* Not worth the cycles to check insufficient_data here, + * since we will not change the data anyway if we read zeroes. + */ + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo, entropy->bitstate); + + p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + /* Encoded data is simply the next bit of the two's-complement DC value */ + CHECK_BIT_BUFFER(br_state, 1, return FALSE); + if (GET_BITS(1)) + MCU_data[blkn][0][0] |= p1; + /* Note: since we use |=, repeating the assignment later is safe */ + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo, entropy->bitstate); + + /* Account for restart interval if using restarts */ + if (cinfo->restart_interval) + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * MCU decoding for AC successive approximation refinement scan. + */ + +METHODDEF(boolean) +decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + register int s, k, r; + unsigned int EOBRUN; + int Se; + JCOEF p1, m1; + const int * natural_order; + JBLOCKROW block; + JCOEFPTR thiscoef; + BITREAD_STATE_VARS; + d_derived_tbl * tbl; + int num_newnz; + int newnz_pos[DCTSIZE2]; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* If we've run out of data, don't modify the MCU. + */ + if (! entropy->insufficient_data) { + + Se = cinfo->Se; + p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ + m1 = -p1; /* -1 in the bit position being coded */ + natural_order = cinfo->natural_order; + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo, entropy->bitstate); + EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we need */ + + /* There is always only one block per MCU */ + block = MCU_data[0]; + tbl = entropy->ac_derived_tbl; + + /* If we are forced to suspend, we must undo the assignments to any newly + * nonzero coefficients in the block, because otherwise we'd get confused + * next time about which coefficients were already nonzero. + * But we need not undo addition of bits to already-nonzero coefficients; + * instead, we can test the current bit to see if we already did it. + */ + num_newnz = 0; + + /* initialize coefficient loop counter to start of band */ + k = cinfo->Ss; + + if (EOBRUN == 0) { + do { + HUFF_DECODE(s, br_state, tbl, goto undoit, label3); + r = s >> 4; + s &= 15; + if (s) { + if (s != 1) /* size of new coef should always be 1 */ + WARNMS(cinfo, JWRN_HUFF_BAD_CODE); + CHECK_BIT_BUFFER(br_state, 1, goto undoit); + if (GET_BITS(1)) + s = p1; /* newly nonzero coef is positive */ + else + s = m1; /* newly nonzero coef is negative */ + } else { + if (r != 15) { + EOBRUN = 1 << r; /* EOBr, run length is 2^r + appended bits */ + if (r) { + CHECK_BIT_BUFFER(br_state, r, goto undoit); + r = GET_BITS(r); + EOBRUN += r; + } + break; /* rest of block is handled by EOB logic */ + } + /* note s = 0 for processing ZRL */ + } + /* Advance over already-nonzero coefs and r still-zero coefs, + * appending correction bits to the nonzeroes. A correction bit is 1 + * if the absolute value of the coefficient must be increased. + */ + do { + thiscoef = *block + natural_order[k]; + if (*thiscoef) { + CHECK_BIT_BUFFER(br_state, 1, goto undoit); + if (GET_BITS(1)) { + if ((*thiscoef & p1) == 0) { /* do nothing if already set it */ + if (*thiscoef >= 0) + *thiscoef += p1; + else + *thiscoef += m1; + } + } + } else { + if (--r < 0) + break; /* reached target zero coefficient */ + } + k++; + } while (k <= Se); + if (s) { + int pos = natural_order[k]; + /* Output newly nonzero coefficient */ + (*block)[pos] = (JCOEF) s; + /* Remember its position in case we have to suspend */ + newnz_pos[num_newnz++] = pos; + } + k++; + } while (k <= Se); + } + + if (EOBRUN) { + /* Scan any remaining coefficient positions after the end-of-band + * (the last newly nonzero coefficient, if any). Append a correction + * bit to each already-nonzero coefficient. A correction bit is 1 + * if the absolute value of the coefficient must be increased. + */ + do { + thiscoef = *block + natural_order[k]; + if (*thiscoef) { + CHECK_BIT_BUFFER(br_state, 1, goto undoit); + if (GET_BITS(1)) { + if ((*thiscoef & p1) == 0) { /* do nothing if already changed it */ + if (*thiscoef >= 0) + *thiscoef += p1; + else + *thiscoef += m1; + } + } + } + k++; + } while (k <= Se); + /* Count one block completed in EOB run */ + EOBRUN--; + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo, entropy->bitstate); + entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we need */ + } + + /* Account for restart interval if using restarts */ + if (cinfo->restart_interval) + entropy->restarts_to_go--; + + return TRUE; + +undoit: + /* Re-zero any output coefficients that we made newly nonzero */ + while (num_newnz) + (*block)[newnz_pos[--num_newnz]] = 0; + + return FALSE; +} + + +/* + * Decode one MCU's worth of Huffman-compressed coefficients, + * partial blocks. + */ + +METHODDEF(boolean) +decode_mcu_sub (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + const int * natural_order; + int Se, blkn; + BITREAD_STATE_VARS; + savable_state state; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* If we've run out of data, just leave the MCU set to zeroes. + * This way, we return uniform gray for the remainder of the segment. + */ + if (! entropy->insufficient_data) { + + natural_order = cinfo->natural_order; + Se = cinfo->lim_Se; + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo, entropy->bitstate); + ASSIGN_STATE(state, entropy->saved); + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + JBLOCKROW block = MCU_data[blkn]; + d_derived_tbl * htbl; + register int s, k, r; + int coef_limit, ci; + + /* Decode a single block's worth of coefficients */ + + /* Section F.2.2.1: decode the DC coefficient difference */ + htbl = entropy->dc_cur_tbls[blkn]; + HUFF_DECODE(s, br_state, htbl, return FALSE, label1); + + htbl = entropy->ac_cur_tbls[blkn]; + k = 1; + coef_limit = entropy->coef_limit[blkn]; + if (coef_limit) { + /* Convert DC difference to actual value, update last_dc_val */ + if (s) { + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + } + ci = cinfo->MCU_membership[blkn]; + s += state.last_dc_val[ci]; + state.last_dc_val[ci] = s; + /* Output the DC coefficient */ + (*block)[0] = (JCOEF) s; + + /* Section F.2.2.2: decode the AC coefficients */ + /* Since zeroes are skipped, output area must be cleared beforehand */ + for (; k < coef_limit; k++) { + HUFF_DECODE(s, br_state, htbl, return FALSE, label2); + + r = s >> 4; + s &= 15; + + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + /* Output coefficient in natural (dezigzagged) order. + * Note: the extra entries in natural_order[] will save us + * if k > Se, which could happen if the data is corrupted. + */ + (*block)[natural_order[k]] = (JCOEF) s; + } else { + if (r != 15) + goto EndOfBlock; + k += 15; + } + } + } else { + if (s) { + CHECK_BIT_BUFFER(br_state, s, return FALSE); + DROP_BITS(s); + } + } + + /* Section F.2.2.2: decode the AC coefficients */ + /* In this path we just discard the values */ + for (; k <= Se; k++) { + HUFF_DECODE(s, br_state, htbl, return FALSE, label3); + + r = s >> 4; + s &= 15; + + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + DROP_BITS(s); + } else { + if (r != 15) + break; + k += 15; + } + } + + EndOfBlock: ; + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo, entropy->bitstate); + ASSIGN_STATE(entropy->saved, state); + } + + /* Account for restart interval if using restarts */ + if (cinfo->restart_interval) + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * Decode one MCU's worth of Huffman-compressed coefficients, + * full-size blocks. + */ + +METHODDEF(boolean) +decode_mcu (j_decompress_ptr cinfo, JBLOCKARRAY MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int blkn; + BITREAD_STATE_VARS; + savable_state state; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* If we've run out of data, just leave the MCU set to zeroes. + * This way, we return uniform gray for the remainder of the segment. + */ + if (! entropy->insufficient_data) { + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo, entropy->bitstate); + ASSIGN_STATE(state, entropy->saved); + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + JBLOCKROW block = MCU_data[blkn]; + d_derived_tbl * htbl; + register int s, k, r; + int coef_limit, ci; + + /* Decode a single block's worth of coefficients */ + + /* Section F.2.2.1: decode the DC coefficient difference */ + htbl = entropy->dc_cur_tbls[blkn]; + HUFF_DECODE(s, br_state, htbl, return FALSE, label1); + + htbl = entropy->ac_cur_tbls[blkn]; + k = 1; + coef_limit = entropy->coef_limit[blkn]; + if (coef_limit) { + /* Convert DC difference to actual value, update last_dc_val */ + if (s) { + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + } + ci = cinfo->MCU_membership[blkn]; + s += state.last_dc_val[ci]; + state.last_dc_val[ci] = s; + /* Output the DC coefficient */ + (*block)[0] = (JCOEF) s; + + /* Section F.2.2.2: decode the AC coefficients */ + /* Since zeroes are skipped, output area must be cleared beforehand */ + for (; k < coef_limit; k++) { + HUFF_DECODE(s, br_state, htbl, return FALSE, label2); + + r = s >> 4; + s &= 15; + + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + /* Output coefficient in natural (dezigzagged) order. + * Note: the extra entries in jpeg_natural_order[] will save us + * if k >= DCTSIZE2, which could happen if the data is corrupted. + */ + (*block)[jpeg_natural_order[k]] = (JCOEF) s; + } else { + if (r != 15) + goto EndOfBlock; + k += 15; + } + } + } else { + if (s) { + CHECK_BIT_BUFFER(br_state, s, return FALSE); + DROP_BITS(s); + } + } + + /* Section F.2.2.2: decode the AC coefficients */ + /* In this path we just discard the values */ + for (; k < DCTSIZE2; k++) { + HUFF_DECODE(s, br_state, htbl, return FALSE, label3); + + r = s >> 4; + s &= 15; + + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + DROP_BITS(s); + } else { + if (r != 15) + break; + k += 15; + } + } + + EndOfBlock: ; + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo, entropy->bitstate); + ASSIGN_STATE(entropy->saved, state); + } + + /* Account for restart interval if using restarts */ + if (cinfo->restart_interval) + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * Initialize for a Huffman-compressed scan. + */ + +METHODDEF(void) +start_pass_huff_decoder (j_decompress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci, blkn, tbl, i; + jpeg_component_info * compptr; + + if (cinfo->progressive_mode) { + /* Validate progressive scan parameters */ + if (cinfo->Ss == 0) { + if (cinfo->Se != 0) + goto bad; + } else { + /* need not check Ss/Se < 0 since they came from unsigned bytes */ + if (cinfo->Se < cinfo->Ss || cinfo->Se > cinfo->lim_Se) + goto bad; + /* AC scans may have only one component */ + if (cinfo->comps_in_scan != 1) + goto bad; + } + if (cinfo->Ah != 0) { + /* Successive approximation refinement scan: must have Al = Ah-1. */ + if (cinfo->Ah-1 != cinfo->Al) + goto bad; + } + if (cinfo->Al > 13) { /* need not check for < 0 */ + /* Arguably the maximum Al value should be less than 13 for 8-bit + * precision, but the spec doesn't say so, and we try to be liberal + * about what we accept. Note: large Al values could result in + * out-of-range DC coefficients during early scans, leading to bizarre + * displays due to overflows in the IDCT math. But we won't crash. + */ + bad: + ERREXIT4(cinfo, JERR_BAD_PROGRESSION, + cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al); + } + /* Update progression status, and verify that scan order is legal. + * Note that inter-scan inconsistencies are treated as warnings + * not fatal errors ... not clear if this is right way to behave. + */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + int coefi, cindex = cinfo->cur_comp_info[ci]->component_index; + int *coef_bit_ptr = & cinfo->coef_bits[cindex][0]; + if (cinfo->Ss && coef_bit_ptr[0] < 0) /* AC without prior DC scan */ + WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0); + for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) { + int expected = (coef_bit_ptr[coefi] < 0) ? 0 : coef_bit_ptr[coefi]; + if (cinfo->Ah != expected) + WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi); + coef_bit_ptr[coefi] = cinfo->Al; + } + } + + /* Select MCU decoding routine */ + if (cinfo->Ah == 0) { + if (cinfo->Ss == 0) + entropy->pub.decode_mcu = decode_mcu_DC_first; + else + entropy->pub.decode_mcu = decode_mcu_AC_first; + } else { + if (cinfo->Ss == 0) + entropy->pub.decode_mcu = decode_mcu_DC_refine; + else + entropy->pub.decode_mcu = decode_mcu_AC_refine; + } + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Make sure requested tables are present, and compute derived tables. + * We may build same derived table more than once, but it's not expensive. + */ + if (cinfo->Ss == 0) { + if (cinfo->Ah == 0) { /* DC refinement needs no table */ + tbl = compptr->dc_tbl_no; + jpeg_make_d_derived_tbl(cinfo, TRUE, tbl, + & entropy->derived_tbls[tbl]); + } + } else { + tbl = compptr->ac_tbl_no; + jpeg_make_d_derived_tbl(cinfo, FALSE, tbl, + & entropy->derived_tbls[tbl]); + /* remember the single active table */ + entropy->ac_derived_tbl = entropy->derived_tbls[tbl]; + } + /* Initialize DC predictions to 0 */ + entropy->saved.last_dc_val[ci] = 0; + } + + /* Initialize private state variables */ + entropy->saved.EOBRUN = 0; + } else { + /* Check that the scan parameters Ss, Se, Ah/Al are OK for sequential JPEG. + * This ought to be an error condition, but we make it a warning because + * there are some baseline files out there with all zeroes in these bytes. + */ + if (cinfo->Ss != 0 || cinfo->Ah != 0 || cinfo->Al != 0 || + ((cinfo->is_baseline || cinfo->Se < DCTSIZE2) && + cinfo->Se != cinfo->lim_Se)) + WARNMS(cinfo, JWRN_NOT_SEQUENTIAL); + + /* Select MCU decoding routine */ + /* We retain the hard-coded case for full-size blocks. + * This is not necessary, but it appears that this version is slightly + * more performant in the given implementation. + * With an improved implementation we would prefer a single optimized + * function. + */ + if (cinfo->lim_Se != DCTSIZE2-1) + entropy->pub.decode_mcu = decode_mcu_sub; + else + entropy->pub.decode_mcu = decode_mcu; + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Compute derived values for Huffman tables */ + /* We may do this more than once for a table, but it's not expensive */ + tbl = compptr->dc_tbl_no; + jpeg_make_d_derived_tbl(cinfo, TRUE, tbl, + & entropy->dc_derived_tbls[tbl]); + if (cinfo->lim_Se) { /* AC needs no table when not present */ + tbl = compptr->ac_tbl_no; + jpeg_make_d_derived_tbl(cinfo, FALSE, tbl, + & entropy->ac_derived_tbls[tbl]); + } + /* Initialize DC predictions to 0 */ + entropy->saved.last_dc_val[ci] = 0; + } + + /* Precalculate decoding info for each block in an MCU of this scan */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + /* Precalculate which table to use for each block */ + entropy->dc_cur_tbls[blkn] = entropy->dc_derived_tbls[compptr->dc_tbl_no]; + entropy->ac_cur_tbls[blkn] = /* AC needs no table when not present */ + cinfo->lim_Se ? entropy->ac_derived_tbls[compptr->ac_tbl_no] : NULL; + /* Decide whether we really care about the coefficient values */ + if (compptr->component_needed) { + ci = compptr->DCT_v_scaled_size; + i = compptr->DCT_h_scaled_size; + switch (cinfo->lim_Se) { + case (1*1-1): + entropy->coef_limit[blkn] = 1; + break; + case (2*2-1): + if (ci <= 0 || ci > 2) ci = 2; + if (i <= 0 || i > 2) i = 2; + entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order2[ci - 1][i - 1]; + break; + case (3*3-1): + if (ci <= 0 || ci > 3) ci = 3; + if (i <= 0 || i > 3) i = 3; + entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order3[ci - 1][i - 1]; + break; + case (4*4-1): + if (ci <= 0 || ci > 4) ci = 4; + if (i <= 0 || i > 4) i = 4; + entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order4[ci - 1][i - 1]; + break; + case (5*5-1): + if (ci <= 0 || ci > 5) ci = 5; + if (i <= 0 || i > 5) i = 5; + entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order5[ci - 1][i - 1]; + break; + case (6*6-1): + if (ci <= 0 || ci > 6) ci = 6; + if (i <= 0 || i > 6) i = 6; + entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order6[ci - 1][i - 1]; + break; + case (7*7-1): + if (ci <= 0 || ci > 7) ci = 7; + if (i <= 0 || i > 7) i = 7; + entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order7[ci - 1][i - 1]; + break; + default: + if (ci <= 0 || ci > 8) ci = 8; + if (i <= 0 || i > 8) i = 8; + entropy->coef_limit[blkn] = 1 + jpeg_zigzag_order[ci - 1][i - 1]; + } + } else { + entropy->coef_limit[blkn] = 0; + } + } + } + + /* Initialize bitread state variables */ + entropy->bitstate.bits_left = 0; + entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */ + entropy->insufficient_data = FALSE; + + /* Initialize restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; +} + + +/* + * Module initialization routine for Huffman entropy decoding. + */ + +GLOBAL(void) +jinit_huff_decoder (j_decompress_ptr cinfo) +{ + huff_entropy_ptr entropy; + int i; + + entropy = (huff_entropy_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(huff_entropy_decoder)); + cinfo->entropy = &entropy->pub; + entropy->pub.start_pass = start_pass_huff_decoder; + entropy->pub.finish_pass = finish_pass_huff; + + if (cinfo->progressive_mode) { + /* Create progression status table */ + int *coef_bit_ptr, ci; + cinfo->coef_bits = (int (*)[DCTSIZE2]) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components * DCTSIZE2 * SIZEOF(int)); + coef_bit_ptr = & cinfo->coef_bits[0][0]; + for (ci = 0; ci < cinfo->num_components; ci++) + for (i = 0; i < DCTSIZE2; i++) + *coef_bit_ptr++ = -1; + + /* Mark derived tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->derived_tbls[i] = NULL; + } + } else { + /* Mark derived tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; + } + } +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdinput.c b/widget/milsko/milskosrc/external/libjpeg/src/jdinput.c new file mode 100644 index 0000000000..29fbef90bf --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdinput.c @@ -0,0 +1,657 @@ +/* + * jdinput.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 2002-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains input control logic for the JPEG decompressor. + * These routines are concerned with controlling the decompressor's input + * processing (marker reading and coefficient decoding). The actual input + * reading is done in jdmarker.c, jdhuff.c, and jdarith.c. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private state */ + +typedef struct { + struct jpeg_input_controller pub; /* public fields */ + + int inheaders; /* Nonzero until first SOS is reached */ +} my_input_controller; + +typedef my_input_controller * my_inputctl_ptr; + + +/* Forward declarations */ +METHODDEF(int) consume_markers JPP((j_decompress_ptr cinfo)); + + +/* + * Routines to calculate various quantities related to the size of the image. + */ + + +/* + * Compute output image dimensions and related values. + * NOTE: this is exported for possible use by application. + * Hence it mustn't do anything that can't be done twice. + */ + +GLOBAL(void) +jpeg_core_output_dimensions (j_decompress_ptr cinfo) +/* Do computations that are needed before master selection phase. + * This function is used for transcoding and full decompression. + */ +{ +#ifdef IDCT_SCALING_SUPPORTED + int ci; + jpeg_component_info *compptr; + + /* Compute actual output image dimensions and DCT scaling choices. */ + if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom) { + /* Provide 1/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 1; + cinfo->min_DCT_v_scaled_size = 1; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 2) { + /* Provide 2/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 2L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 2L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 2; + cinfo->min_DCT_v_scaled_size = 2; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 3) { + /* Provide 3/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 3L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 3L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 3; + cinfo->min_DCT_v_scaled_size = 3; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 4) { + /* Provide 4/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 4L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 4L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 4; + cinfo->min_DCT_v_scaled_size = 4; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 5) { + /* Provide 5/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 5L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 5L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 5; + cinfo->min_DCT_v_scaled_size = 5; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 6) { + /* Provide 6/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 6L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 6L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 6; + cinfo->min_DCT_v_scaled_size = 6; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 7) { + /* Provide 7/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 7L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 7L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 7; + cinfo->min_DCT_v_scaled_size = 7; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 8) { + /* Provide 8/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 8L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 8L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 8; + cinfo->min_DCT_v_scaled_size = 8; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 9) { + /* Provide 9/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 9L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 9L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 9; + cinfo->min_DCT_v_scaled_size = 9; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 10) { + /* Provide 10/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 10L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 10L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 10; + cinfo->min_DCT_v_scaled_size = 10; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 11) { + /* Provide 11/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 11L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 11L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 11; + cinfo->min_DCT_v_scaled_size = 11; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 12) { + /* Provide 12/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 12L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 12L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 12; + cinfo->min_DCT_v_scaled_size = 12; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 13) { + /* Provide 13/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 13L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 13L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 13; + cinfo->min_DCT_v_scaled_size = 13; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 14) { + /* Provide 14/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 14L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 14L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 14; + cinfo->min_DCT_v_scaled_size = 14; + } else if (cinfo->scale_num * cinfo->block_size <= cinfo->scale_denom * 15) { + /* Provide 15/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 15L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 15L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 15; + cinfo->min_DCT_v_scaled_size = 15; + } else { + /* Provide 16/block_size scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * 16L, (long) cinfo->block_size); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * 16L, (long) cinfo->block_size); + cinfo->min_DCT_h_scaled_size = 16; + cinfo->min_DCT_v_scaled_size = 16; + } + + /* Recompute dimensions of components */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + compptr->DCT_h_scaled_size = cinfo->min_DCT_h_scaled_size; + compptr->DCT_v_scaled_size = cinfo->min_DCT_v_scaled_size; + } + +#else /* !IDCT_SCALING_SUPPORTED */ + + /* Hardwire it to "no scaling" */ + cinfo->output_width = cinfo->image_width; + cinfo->output_height = cinfo->image_height; + /* initial_setup has already initialized DCT_scaled_size, + * and has computed unscaled downsampled_width and downsampled_height. + */ + +#endif /* IDCT_SCALING_SUPPORTED */ +} + + +LOCAL(void) +initial_setup (j_decompress_ptr cinfo) +/* Called once, when first SOS marker is reached */ +{ + int ci; + jpeg_component_info *compptr; + + /* Make sure image isn't bigger than I can handle */ + if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION || + (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION) + ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION); + + /* Only 8 to 12 bits data precision are supported for DCT based JPEG */ + if (cinfo->data_precision < 8 || cinfo->data_precision > 12) + ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); + + /* Check that number of components won't exceed internal array sizes */ + if (cinfo->num_components > MAX_COMPONENTS) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPONENTS); + + /* Compute maximum sampling factors; check factor validity */ + cinfo->max_h_samp_factor = 1; + cinfo->max_v_samp_factor = 1; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR || + compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR) + ERREXIT(cinfo, JERR_BAD_SAMPLING); + cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor, + compptr->h_samp_factor); + cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor, + compptr->v_samp_factor); + } + + /* Derive block_size, natural_order, and lim_Se */ + if (cinfo->is_baseline || (cinfo->progressive_mode && + cinfo->comps_in_scan)) { /* no pseudo SOS marker */ + cinfo->block_size = DCTSIZE; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + } else + switch (cinfo->Se) { + case (1*1-1): + cinfo->block_size = 1; + cinfo->natural_order = jpeg_natural_order; /* not needed */ + cinfo->lim_Se = cinfo->Se; + break; + case (2*2-1): + cinfo->block_size = 2; + cinfo->natural_order = jpeg_natural_order2; + cinfo->lim_Se = cinfo->Se; + break; + case (3*3-1): + cinfo->block_size = 3; + cinfo->natural_order = jpeg_natural_order3; + cinfo->lim_Se = cinfo->Se; + break; + case (4*4-1): + cinfo->block_size = 4; + cinfo->natural_order = jpeg_natural_order4; + cinfo->lim_Se = cinfo->Se; + break; + case (5*5-1): + cinfo->block_size = 5; + cinfo->natural_order = jpeg_natural_order5; + cinfo->lim_Se = cinfo->Se; + break; + case (6*6-1): + cinfo->block_size = 6; + cinfo->natural_order = jpeg_natural_order6; + cinfo->lim_Se = cinfo->Se; + break; + case (7*7-1): + cinfo->block_size = 7; + cinfo->natural_order = jpeg_natural_order7; + cinfo->lim_Se = cinfo->Se; + break; + case (8*8-1): + cinfo->block_size = 8; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (9*9-1): + cinfo->block_size = 9; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (10*10-1): + cinfo->block_size = 10; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (11*11-1): + cinfo->block_size = 11; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (12*12-1): + cinfo->block_size = 12; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (13*13-1): + cinfo->block_size = 13; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (14*14-1): + cinfo->block_size = 14; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (15*15-1): + cinfo->block_size = 15; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + case (16*16-1): + cinfo->block_size = 16; + cinfo->natural_order = jpeg_natural_order; + cinfo->lim_Se = DCTSIZE2-1; + break; + default: + ERREXIT4(cinfo, JERR_BAD_PROGRESSION, + cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al); + } + + /* We initialize DCT_scaled_size and min_DCT_scaled_size to block_size. + * In the full decompressor, + * this will be overridden by jpeg_calc_output_dimensions in jdmaster.c; + * but in the transcoder, + * jpeg_calc_output_dimensions is not used, so we must do it here. + */ + cinfo->min_DCT_h_scaled_size = cinfo->block_size; + cinfo->min_DCT_v_scaled_size = cinfo->block_size; + + /* Compute dimensions of components */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + compptr->DCT_h_scaled_size = cinfo->block_size; + compptr->DCT_v_scaled_size = cinfo->block_size; + /* Size in DCT blocks */ + compptr->width_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, + (long) (cinfo->max_h_samp_factor * cinfo->block_size)); + compptr->height_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, + (long) (cinfo->max_v_samp_factor * cinfo->block_size)); + /* downsampled_width and downsampled_height will also be overridden by + * jdmaster.c if we are doing full decompression. The transcoder library + * doesn't use these values, but the calling application might. + */ + /* Size in samples */ + compptr->downsampled_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, + (long) cinfo->max_h_samp_factor); + compptr->downsampled_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, + (long) cinfo->max_v_samp_factor); + /* Mark component needed, until color conversion says otherwise */ + compptr->component_needed = TRUE; + /* Mark no quantization table yet saved for component */ + compptr->quant_table = NULL; + } + + /* Compute number of fully interleaved MCU rows. */ + cinfo->total_iMCU_rows = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, + (long) (cinfo->max_v_samp_factor * cinfo->block_size)); + + /* Decide whether file contains multiple scans */ + if (cinfo->comps_in_scan < cinfo->num_components || cinfo->progressive_mode) + cinfo->inputctl->has_multiple_scans = TRUE; + else + cinfo->inputctl->has_multiple_scans = FALSE; +} + + +LOCAL(void) +per_scan_setup (j_decompress_ptr cinfo) +/* Do computations that are needed before processing a JPEG scan */ +/* cinfo->comps_in_scan and cinfo->cur_comp_info[] were set from SOS marker */ +{ + int ci, mcublks, tmp; + jpeg_component_info *compptr; + + if (cinfo->comps_in_scan == 1) { + + /* Noninterleaved (single-component) scan */ + compptr = cinfo->cur_comp_info[0]; + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = compptr->width_in_blocks; + cinfo->MCU_rows_in_scan = compptr->height_in_blocks; + + /* For noninterleaved scan, always one block per MCU */ + compptr->MCU_width = 1; + compptr->MCU_height = 1; + compptr->MCU_blocks = 1; + compptr->MCU_sample_width = compptr->DCT_h_scaled_size; + compptr->last_col_width = 1; + /* For noninterleaved scans, it is convenient to define last_row_height + * as the number of block rows present in the last iMCU row. + */ + tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (tmp == 0) tmp = compptr->v_samp_factor; + compptr->last_row_height = tmp; + + /* Prepare array describing MCU composition */ + cinfo->blocks_in_MCU = 1; + cinfo->MCU_membership[0] = 0; + + } else { + + /* Interleaved (multi-component) scan */ + if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan, + MAX_COMPS_IN_SCAN); + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, + (long) (cinfo->max_h_samp_factor * cinfo->block_size)); + cinfo->MCU_rows_in_scan = cinfo->total_iMCU_rows; + + cinfo->blocks_in_MCU = 0; + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Sampling factors give # of blocks of component in each MCU */ + compptr->MCU_width = compptr->h_samp_factor; + compptr->MCU_height = compptr->v_samp_factor; + compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height; + compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_h_scaled_size; + /* Figure number of non-dummy blocks in last MCU column & row */ + tmp = (int) (compptr->width_in_blocks % compptr->MCU_width); + if (tmp == 0) tmp = compptr->MCU_width; + compptr->last_col_width = tmp; + tmp = (int) (compptr->height_in_blocks % compptr->MCU_height); + if (tmp == 0) tmp = compptr->MCU_height; + compptr->last_row_height = tmp; + /* Prepare array describing MCU composition */ + mcublks = compptr->MCU_blocks; + if (cinfo->blocks_in_MCU + mcublks > D_MAX_BLOCKS_IN_MCU) + ERREXIT(cinfo, JERR_BAD_MCU_SIZE); + while (mcublks-- > 0) { + cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci; + } + } + + } +} + + +/* + * Save away a copy of the Q-table referenced by each component present + * in the current scan, unless already saved during a prior scan. + * + * In a multiple-scan JPEG file, the encoder could assign different components + * the same Q-table slot number, but change table definitions between scans + * so that each component uses a different Q-table. (The IJG encoder is not + * currently capable of doing this, but other encoders might.) Since we want + * to be able to dequantize all the components at the end of the file, this + * means that we have to save away the table actually used for each component. + * We do this by copying the table at the start of the first scan containing + * the component. + * The JPEG spec prohibits the encoder from changing the contents of a Q-table + * slot between scans of a component using that slot. If the encoder does so + * anyway, this decoder will simply use the Q-table values that were current + * at the start of the first scan for the component. + * + * The decompressor output side looks only at the saved quant tables, + * not at the current Q-table slots. + */ + +LOCAL(void) +latch_quant_tables (j_decompress_ptr cinfo) +{ + int ci, qtblno; + jpeg_component_info *compptr; + JQUANT_TBL * qtbl; + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* No work if we already saved Q-table for this component */ + if (compptr->quant_table != NULL) + continue; + /* Make sure specified quantization table is present */ + qtblno = compptr->quant_tbl_no; + if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS || + cinfo->quant_tbl_ptrs[qtblno] == NULL) + ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno); + /* OK, save away the quantization table */ + qtbl = (JQUANT_TBL *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(JQUANT_TBL)); + MEMCOPY(qtbl, cinfo->quant_tbl_ptrs[qtblno], SIZEOF(JQUANT_TBL)); + compptr->quant_table = qtbl; + } +} + + +/* + * Initialize the input modules to read a scan of compressed data. + * The first call to this is done by jdmaster.c after initializing + * the entire decompressor (during jpeg_start_decompress). + * Subsequent calls come from consume_markers, below. + */ + +METHODDEF(void) +start_input_pass (j_decompress_ptr cinfo) +{ + per_scan_setup(cinfo); + latch_quant_tables(cinfo); + (*cinfo->entropy->start_pass) (cinfo); + (*cinfo->coef->start_input_pass) (cinfo); + cinfo->inputctl->consume_input = cinfo->coef->consume_data; +} + + +/* + * Finish up after inputting a compressed-data scan. + * This is called by the coefficient controller after it's read all + * the expected data of the scan. + */ + +METHODDEF(void) +finish_input_pass (j_decompress_ptr cinfo) +{ + (*cinfo->entropy->finish_pass) (cinfo); + cinfo->inputctl->consume_input = consume_markers; +} + + +/* + * Read JPEG markers before, between, or after compressed-data scans. + * Change state as necessary when a new scan is reached. + * Return value is JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. + * + * The consume_input method pointer points either here or to the + * coefficient controller's consume_data routine, depending on whether + * we are reading a compressed data segment or inter-segment markers. + * + * Note: This function should NOT return a pseudo SOS marker (with zero + * component number) to the caller. A pseudo marker received by + * read_markers is processed and then skipped for other markers. + */ + +METHODDEF(int) +consume_markers (j_decompress_ptr cinfo) +{ + my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl; + int val; + + if (inputctl->pub.eoi_reached) /* After hitting EOI, read no further */ + return JPEG_REACHED_EOI; + + for (;;) { /* Loop to pass pseudo SOS marker */ + val = (*cinfo->marker->read_markers) (cinfo); + + switch (val) { + case JPEG_REACHED_SOS: /* Found SOS */ + if (inputctl->inheaders) { /* 1st SOS */ + if (inputctl->inheaders == 1) + initial_setup(cinfo); + if (cinfo->comps_in_scan == 0) { /* pseudo SOS marker */ + inputctl->inheaders = 2; + break; + } + inputctl->inheaders = 0; + /* Note: start_input_pass must be called by jdmaster.c + * before any more input can be consumed. jdapimin.c is + * responsible for enforcing this sequencing. + */ + } else { /* 2nd or later SOS marker */ + if (! inputctl->pub.has_multiple_scans) + ERREXIT(cinfo, JERR_EOI_EXPECTED); /* Oops, I wasn't expecting this! */ + if (cinfo->comps_in_scan == 0) /* unexpected pseudo SOS marker */ + break; + start_input_pass(cinfo); + } + return val; + case JPEG_REACHED_EOI: /* Found EOI */ + inputctl->pub.eoi_reached = TRUE; + if (inputctl->inheaders) { /* Tables-only datastream, apparently */ + if (cinfo->marker->saw_SOF) + ERREXIT(cinfo, JERR_SOF_NO_SOS); + } else { + /* Prevent infinite loop in coef ctlr's decompress_data routine + * if user set output_scan_number larger than number of scans. + */ + if (cinfo->output_scan_number > cinfo->input_scan_number) + cinfo->output_scan_number = cinfo->input_scan_number; + } + return val; + case JPEG_SUSPENDED: + return val; + default: + return val; + } + } +} + + +/* + * Reset state to begin a fresh datastream. + */ + +METHODDEF(void) +reset_input_controller (j_decompress_ptr cinfo) +{ + my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl; + + inputctl->pub.consume_input = consume_markers; + inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */ + inputctl->pub.eoi_reached = FALSE; + inputctl->inheaders = 1; + /* Reset other modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->marker->reset_marker_reader) (cinfo); + /* Reset progression state -- would be cleaner if entropy decoder did this */ + cinfo->coef_bits = NULL; +} + + +/* + * Initialize the input controller module. + * This is called only once, when the decompression object is created. + */ + +GLOBAL(void) +jinit_input_controller (j_decompress_ptr cinfo) +{ + my_inputctl_ptr inputctl; + + /* Create subobject in permanent pool */ + inputctl = (my_inputctl_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_PERMANENT, SIZEOF(my_input_controller)); + cinfo->inputctl = &inputctl->pub; + /* Initialize method pointers */ + inputctl->pub.consume_input = consume_markers; + inputctl->pub.reset_input_controller = reset_input_controller; + inputctl->pub.start_input_pass = start_input_pass; + inputctl->pub.finish_input_pass = finish_input_pass; + /* Initialize state: can't use reset_input_controller since we don't + * want to try to reset other modules yet. + */ + inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */ + inputctl->pub.eoi_reached = FALSE; + inputctl->inheaders = 1; +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdmainct.c b/widget/milsko/milskosrc/external/libjpeg/src/jdmainct.c new file mode 100644 index 0000000000..1cd66d853b --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdmainct.c @@ -0,0 +1,511 @@ +/* + * jdmainct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2002-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the main buffer controller for decompression. + * The main buffer lies between the JPEG decompressor proper and the + * post-processor; it holds downsampled data in the JPEG colorspace. + * + * Note that this code is bypassed in raw-data mode, since the application + * supplies the equivalent of the main buffer in that case. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * In the current system design, the main buffer need never be a full-image + * buffer; any full-height buffers will be found inside the coefficient or + * postprocessing controllers. Nonetheless, the main controller is not + * trivial. Its responsibility is to provide context rows for upsampling/ + * rescaling, and doing this in an efficient fashion is a bit tricky. + * + * Postprocessor input data is counted in "row groups". A row group is + * defined to be (v_samp_factor * DCT_v_scaled_size / min_DCT_v_scaled_size) + * sample rows of each component. (We require DCT_scaled_size values to be + * chosen such that these numbers are integers. In practice DCT_scaled_size + * values will likely be powers of two, so we actually have the stronger + * condition that DCT_scaled_size / min_DCT_scaled_size is an integer.) + * Upsampling will typically produce max_v_samp_factor pixel rows from each + * row group (times any additional scale factor that the upsampler is + * applying). + * + * The coefficient controller will deliver data to us one iMCU row at a time; + * each iMCU row contains v_samp_factor * DCT_v_scaled_size sample rows, or + * exactly min_DCT_v_scaled_size row groups. (This amount of data corresponds + * to one row of MCUs when the image is fully interleaved.) Note that the + * number of sample rows varies across components, but the number of row + * groups does not. Some garbage sample rows may be included in the last iMCU + * row at the bottom of the image. + * + * Depending on the vertical scaling algorithm used, the upsampler may need + * access to the sample row(s) above and below its current input row group. + * The upsampler is required to set need_context_rows TRUE at global selection + * time if so. When need_context_rows is FALSE, this controller can simply + * obtain one iMCU row at a time from the coefficient controller and dole it + * out as row groups to the postprocessor. + * + * When need_context_rows is TRUE, this controller guarantees that the buffer + * passed to postprocessing contains at least one row group's worth of samples + * above and below the row group(s) being processed. Note that the context + * rows "above" the first passed row group appear at negative row offsets in + * the passed buffer. At the top and bottom of the image, the required + * context rows are manufactured by duplicating the first or last real sample + * row; this avoids having special cases in the upsampling inner loops. + * + * The amount of context is fixed at one row group just because that's a + * convenient number for this controller to work with. The existing + * upsamplers really only need one sample row of context. An upsampler + * supporting arbitrary output rescaling might wish for more than one row + * group of context when shrinking the image; tough, we don't handle that. + * (This is justified by the assumption that downsizing will be handled mostly + * by adjusting the DCT_scaled_size values, so that the actual scale factor at + * the upsample step needn't be much less than one.) + * + * To provide the desired context, we have to retain the last two row groups + * of one iMCU row while reading in the next iMCU row. (The last row group + * can't be processed until we have another row group for its below-context, + * and so we have to save the next-to-last group too for its above-context.) + * We could do this most simply by copying data around in our buffer, but + * that'd be very slow. We can avoid copying any data by creating a rather + * strange pointer structure. Here's how it works. We allocate a workspace + * consisting of M+2 row groups (where M = min_DCT_v_scaled_size is the number + * of row groups per iMCU row). We create two sets of redundant pointers to + * the workspace. Labeling the physical row groups 0 to M+1, the synthesized + * pointer lists look like this: + * M+1 M-1 + * master pointer --> 0 master pointer --> 0 + * 1 1 + * ... ... + * M-3 M-3 + * M-2 M + * M-1 M+1 + * M M-2 + * M+1 M-1 + * 0 0 + * We read alternate iMCU rows using each master pointer; thus the last two + * row groups of the previous iMCU row remain un-overwritten in the workspace. + * The pointer lists are set up so that the required context rows appear to + * be adjacent to the proper places when we pass the pointer lists to the + * upsampler. + * + * The above pictures describe the normal state of the pointer lists. + * At top and bottom of the image, we diddle the pointer lists to duplicate + * the first or last sample row as necessary (this is cheaper than copying + * sample rows around). + * + * This scheme breaks down if M < 2, ie, min_DCT_v_scaled_size is 1. In that + * situation each iMCU row provides only one row group so the buffering logic + * must be different (eg, we must read two iMCU rows before we can emit the + * first row group). For now, we simply do not support providing context + * rows when min_DCT_v_scaled_size is 1. That combination seems unlikely to + * be worth providing --- if someone wants a 1/8th-size preview, they probably + * want it quick and dirty, so a context-free upsampler is sufficient. + */ + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_d_main_controller pub; /* public fields */ + + /* Pointer to allocated workspace (M or M+2 row groups). */ + JSAMPARRAY buffer[MAX_COMPONENTS]; + + JDIMENSION rowgroup_ctr; /* counts row groups output to postprocessor */ + JDIMENSION rowgroups_avail; /* row groups available to postprocessor */ + + /* Remaining fields are only used in the context case. */ + + boolean buffer_full; /* Have we gotten an iMCU row from decoder? */ + + /* These are the master pointers to the funny-order pointer lists. */ + JSAMPIMAGE xbuffer[2]; /* pointers to weird pointer lists */ + + int whichptr; /* indicates which pointer set is now in use */ + int context_state; /* process_data state machine status */ + JDIMENSION iMCU_row_ctr; /* counts iMCU rows to detect image top/bot */ +} my_main_controller; + +typedef my_main_controller * my_main_ptr; + +/* context_state values: */ +#define CTX_PREPARE_FOR_IMCU 0 /* need to prepare for MCU row */ +#define CTX_PROCESS_IMCU 1 /* feeding iMCU to postprocessor */ +#define CTX_POSTPONED_ROW 2 /* feeding postponed row group */ + + +/* Forward declarations */ +METHODDEF(void) process_data_simple_main + JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); +METHODDEF(void) process_data_context_main + JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); +#ifdef QUANT_2PASS_SUPPORTED +METHODDEF(void) process_data_crank_post + JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); +#endif + + +LOCAL(void) +alloc_funny_pointers (j_decompress_ptr cinfo) +/* Allocate space for the funny pointer lists. + * This is done only once, not once per pass. + */ +{ + my_main_ptr mainp = (my_main_ptr) cinfo->main; + int ci, rgroup; + int M = cinfo->min_DCT_v_scaled_size; + jpeg_component_info *compptr; + JSAMPARRAY xbuf; + + /* Get top-level space for component array pointers. + * We alloc both arrays with one call to save a few cycles. + */ + mainp->xbuffer[0] = (JSAMPIMAGE) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components * 2 * SIZEOF(JSAMPARRAY)); + mainp->xbuffer[1] = mainp->xbuffer[0] + cinfo->num_components; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (! compptr->component_needed) + continue; /* skip uninteresting component */ + rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) / + cinfo->min_DCT_v_scaled_size; /* height of a row group of component */ + /* Get space for pointer lists --- M+4 row groups in each list. + * We alloc both pointer lists with one call to save a few cycles. + */ + xbuf = (JSAMPARRAY) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, + JPOOL_IMAGE, 2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW)); + xbuf += rgroup; /* want one row group at negative offsets */ + mainp->xbuffer[0][ci] = xbuf; + xbuf += rgroup * (M + 4); + mainp->xbuffer[1][ci] = xbuf; + } +} + + +LOCAL(void) +make_funny_pointers (j_decompress_ptr cinfo) +/* Create the funny pointer lists discussed in the comments above. + * The actual workspace is already allocated (in mainp->buffer), + * and the space for the pointer lists is allocated too. + * This routine just fills in the curiously ordered lists. + * This will be repeated at the beginning of each pass. + */ +{ + my_main_ptr mainp = (my_main_ptr) cinfo->main; + int ci, i, rgroup; + int M = cinfo->min_DCT_v_scaled_size; + jpeg_component_info *compptr; + JSAMPARRAY buf, xbuf0, xbuf1; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (! compptr->component_needed) + continue; /* skip uninteresting component */ + rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) / + cinfo->min_DCT_v_scaled_size; /* height of a row group of component */ + xbuf0 = mainp->xbuffer[0][ci]; + xbuf1 = mainp->xbuffer[1][ci]; + /* First copy the workspace pointers as-is */ + buf = mainp->buffer[ci]; + for (i = 0; i < rgroup * (M + 2); i++) { + xbuf0[i] = xbuf1[i] = buf[i]; + } + /* In the second list, put the last four row groups in swapped order */ + for (i = 0; i < rgroup * 2; i++) { + xbuf1[rgroup*(M-2) + i] = buf[rgroup*M + i]; + xbuf1[rgroup*M + i] = buf[rgroup*(M-2) + i]; + } + /* The wraparound pointers at top and bottom will be filled later + * (see set_wraparound_pointers, below). Initially we want the "above" + * pointers to duplicate the first actual data line. This only needs + * to happen in xbuffer[0]. + */ + for (i = 0; i < rgroup; i++) { + xbuf0[i - rgroup] = xbuf0[0]; + } + } +} + + +LOCAL(void) +set_wraparound_pointers (j_decompress_ptr cinfo) +/* Set up the "wraparound" pointers at top and bottom of the pointer lists. + * This changes the pointer list state from top-of-image to the normal state. + */ +{ + my_main_ptr mainp = (my_main_ptr) cinfo->main; + int ci, i, rgroup; + int M = cinfo->min_DCT_v_scaled_size; + jpeg_component_info *compptr; + JSAMPARRAY xbuf0, xbuf1; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (! compptr->component_needed) + continue; /* skip uninteresting component */ + rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) / + cinfo->min_DCT_v_scaled_size; /* height of a row group of component */ + xbuf0 = mainp->xbuffer[0][ci]; + xbuf1 = mainp->xbuffer[1][ci]; + for (i = 0; i < rgroup; i++) { + xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i]; + xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i]; + xbuf0[rgroup*(M+2) + i] = xbuf0[i]; + xbuf1[rgroup*(M+2) + i] = xbuf1[i]; + } + } +} + + +LOCAL(void) +set_bottom_pointers (j_decompress_ptr cinfo) +/* Change the pointer lists to duplicate the last sample row at the bottom + * of the image. whichptr indicates which xbuffer holds the final iMCU row. + * Also sets rowgroups_avail to indicate number of nondummy row groups in row. + */ +{ + my_main_ptr mainp = (my_main_ptr) cinfo->main; + int ci, i, rgroup, iMCUheight, rows_left; + jpeg_component_info *compptr; + JSAMPARRAY xbuf; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (! compptr->component_needed) + continue; /* skip uninteresting component */ + /* Count sample rows in one iMCU row and in one row group */ + iMCUheight = compptr->v_samp_factor * compptr->DCT_v_scaled_size; + rgroup = iMCUheight / cinfo->min_DCT_v_scaled_size; + /* Count nondummy sample rows remaining for this component */ + rows_left = (int) (compptr->downsampled_height % (JDIMENSION) iMCUheight); + if (rows_left == 0) rows_left = iMCUheight; + /* Count nondummy row groups. Should get same answer for each component, + * so we need only do it once. + */ + if (ci == 0) { + mainp->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1); + } + /* Duplicate the last real sample row rgroup*2 times; this pads out the + * last partial rowgroup and ensures at least one full rowgroup of context. + */ + xbuf = mainp->xbuffer[mainp->whichptr][ci]; + for (i = 0; i < rgroup * 2; i++) { + xbuf[rows_left + i] = xbuf[rows_left-1]; + } + } +} + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_main_ptr mainp = (my_main_ptr) cinfo->main; + + switch (pass_mode) { + case JBUF_PASS_THRU: + if (cinfo->upsample->need_context_rows) { + mainp->pub.process_data = process_data_context_main; + make_funny_pointers(cinfo); /* Create the xbuffer[] lists */ + mainp->whichptr = 0; /* Read first iMCU row into xbuffer[0] */ + mainp->context_state = CTX_PREPARE_FOR_IMCU; + mainp->iMCU_row_ctr = 0; + mainp->buffer_full = FALSE; /* Mark buffer empty */ + } else { + /* Simple case with no context needed */ + mainp->pub.process_data = process_data_simple_main; + mainp->rowgroup_ctr = mainp->rowgroups_avail; /* Mark buffer empty */ + } + break; +#ifdef QUANT_2PASS_SUPPORTED + case JBUF_CRANK_DEST: + /* For last pass of 2-pass quantization, just crank the postprocessor */ + mainp->pub.process_data = process_data_crank_post; + break; +#endif + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + } +} + + +/* + * Process some data. + * This handles the simple case where no context is required. + */ + +METHODDEF(void) +process_data_simple_main (j_decompress_ptr cinfo, JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) +{ + my_main_ptr mainp = (my_main_ptr) cinfo->main; + + /* Read input data if we haven't filled the main buffer yet */ + if (mainp->rowgroup_ctr >= mainp->rowgroups_avail) { + if (! (*cinfo->coef->decompress_data) (cinfo, mainp->buffer)) + return; /* suspension forced, can do nothing more */ + mainp->rowgroup_ctr = 0; /* OK, we have an iMCU row to work with */ + } + + /* Note: at the bottom of the image, we may pass extra garbage row groups + * to the postprocessor. The postprocessor has to check for bottom + * of image anyway (at row resolution), so no point in us doing it too. + */ + + /* Feed the postprocessor */ + (*cinfo->post->post_process_data) (cinfo, mainp->buffer, + &mainp->rowgroup_ctr, mainp->rowgroups_avail, + output_buf, out_row_ctr, out_rows_avail); +} + + +/* + * Process some data. + * This handles the case where context rows must be provided. + */ + +METHODDEF(void) +process_data_context_main (j_decompress_ptr cinfo, JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) +{ + my_main_ptr mainp = (my_main_ptr) cinfo->main; + + /* Read input data if we haven't filled the main buffer yet */ + if (! mainp->buffer_full) { + if (! (*cinfo->coef->decompress_data) (cinfo, + mainp->xbuffer[mainp->whichptr])) + return; /* suspension forced, can do nothing more */ + mainp->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ + mainp->iMCU_row_ctr++; /* count rows received */ + } + + /* Postprocessor typically will not swallow all the input data it is handed + * in one call (due to filling the output buffer first). Must be prepared + * to exit and restart. This switch lets us keep track of how far we got. + * Note that each case falls through to the next on successful completion. + */ + switch (mainp->context_state) { + case CTX_POSTPONED_ROW: + /* Call postprocessor using previously set pointers for postponed row */ + (*cinfo->post->post_process_data) (cinfo, mainp->xbuffer[mainp->whichptr], + &mainp->rowgroup_ctr, mainp->rowgroups_avail, + output_buf, out_row_ctr, out_rows_avail); + if (mainp->rowgroup_ctr < mainp->rowgroups_avail) + return; /* Need to suspend */ + mainp->context_state = CTX_PREPARE_FOR_IMCU; + if (*out_row_ctr >= out_rows_avail) + return; /* Postprocessor exactly filled output buf */ + /*FALLTHROUGH*/ + case CTX_PREPARE_FOR_IMCU: + /* Prepare to process first M-1 row groups of this iMCU row */ + mainp->rowgroup_ctr = 0; + mainp->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_v_scaled_size - 1); + /* Check for bottom of image: if so, tweak pointers to "duplicate" + * the last sample row, and adjust rowgroups_avail to ignore padding rows. + */ + if (mainp->iMCU_row_ctr == cinfo->total_iMCU_rows) + set_bottom_pointers(cinfo); + mainp->context_state = CTX_PROCESS_IMCU; + /*FALLTHROUGH*/ + case CTX_PROCESS_IMCU: + /* Call postprocessor using previously set pointers */ + (*cinfo->post->post_process_data) (cinfo, mainp->xbuffer[mainp->whichptr], + &mainp->rowgroup_ctr, mainp->rowgroups_avail, + output_buf, out_row_ctr, out_rows_avail); + if (mainp->rowgroup_ctr < mainp->rowgroups_avail) + return; /* Need to suspend */ + /* After the first iMCU, change wraparound pointers to normal state */ + if (mainp->iMCU_row_ctr == 1) + set_wraparound_pointers(cinfo); + /* Prepare to load new iMCU row using other xbuffer list */ + mainp->whichptr ^= 1; /* 0=>1 or 1=>0 */ + mainp->buffer_full = FALSE; + /* Still need to process last row group of this iMCU row, */ + /* which is saved at index M+1 of the other xbuffer */ + mainp->rowgroup_ctr = (JDIMENSION) (cinfo->min_DCT_v_scaled_size + 1); + mainp->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_v_scaled_size + 2); + mainp->context_state = CTX_POSTPONED_ROW; + } +} + + +/* + * Process some data. + * Final pass of two-pass quantization: just call the postprocessor. + * Source data will be the postprocessor controller's internal buffer. + */ + +#ifdef QUANT_2PASS_SUPPORTED + +METHODDEF(void) +process_data_crank_post (j_decompress_ptr cinfo, JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) +{ + (*cinfo->post->post_process_data) (cinfo, (JSAMPIMAGE) NULL, + (JDIMENSION *) NULL, (JDIMENSION) 0, + output_buf, out_row_ctr, out_rows_avail); +} + +#endif /* QUANT_2PASS_SUPPORTED */ + + +/* + * Initialize main buffer controller. + */ + +GLOBAL(void) +jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer) +{ + my_main_ptr mainp; + int ci, rgroup, ngroups; + jpeg_component_info *compptr; + + mainp = (my_main_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_main_controller)); + cinfo->main = &mainp->pub; + mainp->pub.start_pass = start_pass_main; + + if (need_full_buffer) /* shouldn't happen */ + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + /* Allocate the workspace. + * ngroups is the number of row groups we need. + */ + if (cinfo->upsample->need_context_rows) { + if (cinfo->min_DCT_v_scaled_size < 2) /* unsupported, see comments above */ + ERREXIT(cinfo, JERR_NOTIMPL); + alloc_funny_pointers(cinfo); /* Alloc space for xbuffer[] lists */ + ngroups = cinfo->min_DCT_v_scaled_size + 2; + } else { + /* There are always min_DCT_v_scaled_size row groups in an iMCU row. */ + ngroups = cinfo->min_DCT_v_scaled_size; + mainp->rowgroups_avail = (JDIMENSION) ngroups; + } + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (! compptr->component_needed) + continue; /* skip uninteresting component */ + rgroup = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) / + cinfo->min_DCT_v_scaled_size; /* height of a row group of component */ + mainp->buffer[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + compptr->width_in_blocks * ((JDIMENSION) compptr->DCT_h_scaled_size), + (JDIMENSION) (rgroup * ngroups)); + } +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdmarker.c b/widget/milsko/milskosrc/external/libjpeg/src/jdmarker.c new file mode 100644 index 0000000000..c10fde6053 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdmarker.c @@ -0,0 +1,1505 @@ +/* + * jdmarker.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * Modified 2009-2019 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to decode JPEG datastream markers. + * Most of the complexity arises from our desire to support input + * suspension: if not all of the data for a marker is available, + * we must exit back to the application. On resumption, we reprocess + * the marker. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +typedef enum { /* JPEG marker codes */ + M_SOF0 = 0xc0, + M_SOF1 = 0xc1, + M_SOF2 = 0xc2, + M_SOF3 = 0xc3, + + M_SOF5 = 0xc5, + M_SOF6 = 0xc6, + M_SOF7 = 0xc7, + + M_JPG = 0xc8, + M_SOF9 = 0xc9, + M_SOF10 = 0xca, + M_SOF11 = 0xcb, + + M_SOF13 = 0xcd, + M_SOF14 = 0xce, + M_SOF15 = 0xcf, + + M_DHT = 0xc4, + + M_DAC = 0xcc, + + M_RST0 = 0xd0, + M_RST1 = 0xd1, + M_RST2 = 0xd2, + M_RST3 = 0xd3, + M_RST4 = 0xd4, + M_RST5 = 0xd5, + M_RST6 = 0xd6, + M_RST7 = 0xd7, + + M_SOI = 0xd8, + M_EOI = 0xd9, + M_SOS = 0xda, + M_DQT = 0xdb, + M_DNL = 0xdc, + M_DRI = 0xdd, + M_DHP = 0xde, + M_EXP = 0xdf, + + M_APP0 = 0xe0, + M_APP1 = 0xe1, + M_APP2 = 0xe2, + M_APP3 = 0xe3, + M_APP4 = 0xe4, + M_APP5 = 0xe5, + M_APP6 = 0xe6, + M_APP7 = 0xe7, + M_APP8 = 0xe8, + M_APP9 = 0xe9, + M_APP10 = 0xea, + M_APP11 = 0xeb, + M_APP12 = 0xec, + M_APP13 = 0xed, + M_APP14 = 0xee, + M_APP15 = 0xef, + + M_JPG0 = 0xf0, + M_JPG8 = 0xf8, + M_JPG13 = 0xfd, + M_COM = 0xfe, + + M_TEM = 0x01, + + M_ERROR = 0x100 +} JPEG_MARKER; + + +/* Private state */ + +typedef struct { + struct jpeg_marker_reader pub; /* public fields */ + + /* Application-overridable marker processing methods */ + jpeg_marker_parser_method process_COM; + jpeg_marker_parser_method process_APPn[16]; + + /* Limit on marker data length to save for each marker type */ + unsigned int length_limit_COM; + unsigned int length_limit_APPn[16]; + + /* Status of COM/APPn marker saving */ + jpeg_saved_marker_ptr cur_marker; /* NULL if not processing a marker */ + unsigned int bytes_read; /* data bytes read so far in marker */ + /* Note: cur_marker is not linked into marker_list until it's all read. */ +} my_marker_reader; + +typedef my_marker_reader * my_marker_ptr; + + +/* + * Macros for fetching data from the data source module. + * + * At all times, cinfo->src->next_input_byte and ->bytes_in_buffer reflect + * the current restart point; we update them only when we have reached a + * suitable place to restart if a suspension occurs. + */ + +/* Declare and initialize local copies of input pointer/count */ +#define INPUT_VARS(cinfo) \ + struct jpeg_source_mgr * datasrc = (cinfo)->src; \ + const JOCTET * next_input_byte = datasrc->next_input_byte; \ + size_t bytes_in_buffer = datasrc->bytes_in_buffer + +/* Unload the local copies --- do this only at a restart boundary */ +#define INPUT_SYNC(cinfo) \ + ( datasrc->next_input_byte = next_input_byte, \ + datasrc->bytes_in_buffer = bytes_in_buffer ) + +/* Reload the local copies --- used only in MAKE_BYTE_AVAIL */ +#define INPUT_RELOAD(cinfo) \ + ( next_input_byte = datasrc->next_input_byte, \ + bytes_in_buffer = datasrc->bytes_in_buffer ) + +/* Internal macro for INPUT_BYTE and INPUT_2BYTES: make a byte available. + * Note we do *not* do INPUT_SYNC before calling fill_input_buffer, + * but we must reload the local copies after a successful fill. + */ +#define MAKE_BYTE_AVAIL(cinfo,action) \ + if (bytes_in_buffer == 0) { \ + if (! (*datasrc->fill_input_buffer) (cinfo)) \ + { action; } \ + INPUT_RELOAD(cinfo); \ + } + +/* Read a byte into variable V. + * If must suspend, take the specified action (typically "return FALSE"). + */ +#define INPUT_BYTE(cinfo,V,action) \ + MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \ + bytes_in_buffer--; \ + V = GETJOCTET(*next_input_byte++); ) + +/* As above, but read two bytes interpreted as an unsigned 16-bit integer. + * V should be declared unsigned int or perhaps INT32. + */ +#define INPUT_2BYTES(cinfo,V,action) \ + MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \ + bytes_in_buffer--; \ + V = ((unsigned int) GETJOCTET(*next_input_byte++)) << 8; \ + MAKE_BYTE_AVAIL(cinfo,action); \ + bytes_in_buffer--; \ + V += GETJOCTET(*next_input_byte++); ) + + +/* + * Routines to process JPEG markers. + * + * Entry condition: JPEG marker itself has been read and its code saved + * in cinfo->unread_marker; input restart point is just after the marker. + * + * Exit: if return TRUE, have read and processed any parameters, and have + * updated the restart point to point after the parameters. + * If return FALSE, was forced to suspend before reaching end of + * marker parameters; restart point has not been moved. Same routine + * will be called again after application supplies more input data. + * + * This approach to suspension assumes that all of a marker's parameters + * can fit into a single input bufferload. This should hold for "normal" + * markers. Some COM/APPn markers might have large parameter segments + * that might not fit. If we are simply dropping such a marker, we use + * skip_input_data to get past it, and thereby put the problem on the + * source manager's shoulders. If we are saving the marker's contents + * into memory, we use a slightly different convention: when forced to + * suspend, the marker processor updates the restart point to the end of + * what it's consumed (ie, the end of the buffer) before returning FALSE. + * On resumption, cinfo->unread_marker still contains the marker code, + * but the data source will point to the next chunk of marker data. + * The marker processor must retain internal state to deal with this. + * + * Note that we don't bother to avoid duplicate trace messages if a + * suspension occurs within marker parameters. Other side effects + * require more care. + */ + + +LOCAL(boolean) +get_soi (j_decompress_ptr cinfo) +/* Process an SOI marker */ +{ + int i; + + TRACEMS(cinfo, 1, JTRC_SOI); + + if (cinfo->marker->saw_SOI) + ERREXIT(cinfo, JERR_SOI_DUPLICATE); + + /* Reset all parameters that are defined to be reset by SOI */ + + for (i = 0; i < NUM_ARITH_TBLS; i++) { + cinfo->arith_dc_L[i] = 0; + cinfo->arith_dc_U[i] = 1; + cinfo->arith_ac_K[i] = 5; + } + cinfo->restart_interval = 0; + + /* Set initial assumptions for colorspace etc */ + + cinfo->jpeg_color_space = JCS_UNKNOWN; + cinfo->color_transform = JCT_NONE; + cinfo->CCIR601_sampling = FALSE; /* Assume non-CCIR sampling??? */ + + cinfo->saw_JFIF_marker = FALSE; + cinfo->JFIF_major_version = 1; /* set default JFIF APP0 values */ + cinfo->JFIF_minor_version = 1; + cinfo->density_unit = 0; + cinfo->X_density = 1; + cinfo->Y_density = 1; + cinfo->saw_Adobe_marker = FALSE; + cinfo->Adobe_transform = 0; + + cinfo->marker->saw_SOI = TRUE; + + return TRUE; +} + + +LOCAL(boolean) +get_sof (j_decompress_ptr cinfo, boolean is_baseline, boolean is_prog, + boolean is_arith) +/* Process a SOFn marker */ +{ + INT32 length; + int c, ci, i; + jpeg_component_info * compptr; + INPUT_VARS(cinfo); + + cinfo->is_baseline = is_baseline; + cinfo->progressive_mode = is_prog; + cinfo->arith_code = is_arith; + + INPUT_2BYTES(cinfo, length, return FALSE); + + INPUT_BYTE(cinfo, cinfo->data_precision, return FALSE); + INPUT_2BYTES(cinfo, cinfo->image_height, return FALSE); + INPUT_2BYTES(cinfo, cinfo->image_width, return FALSE); + INPUT_BYTE(cinfo, cinfo->num_components, return FALSE); + + length -= 8; + + TRACEMS4(cinfo, 1, JTRC_SOF, cinfo->unread_marker, + (int) cinfo->image_width, (int) cinfo->image_height, + cinfo->num_components); + + if (cinfo->marker->saw_SOF) + ERREXIT(cinfo, JERR_SOF_DUPLICATE); + + /* We don't support files in which the image height is initially specified */ + /* as 0 and is later redefined by DNL. As long as we have to check that, */ + /* might as well have a general sanity check. */ + if (cinfo->image_height <= 0 || cinfo->image_width <= 0 || + cinfo->num_components <= 0) + ERREXIT(cinfo, JERR_EMPTY_IMAGE); + + if (length != (cinfo->num_components * 3)) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + if (cinfo->comp_info == NULL) /* do only once, even if suspend */ + cinfo->comp_info = (jpeg_component_info *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components * SIZEOF(jpeg_component_info)); + + for (ci = 0; ci < cinfo->num_components; ci++) { + INPUT_BYTE(cinfo, c, return FALSE); + /* Check to see whether component id has already been seen */ + /* (in violation of the spec, but unfortunately seen in some */ + /* files). If so, create "fake" component id equal to the */ + /* max id seen so far + 1. */ + for (i = 0, compptr = cinfo->comp_info; i < ci; i++, compptr++) { + if (c == compptr->component_id) { + compptr = cinfo->comp_info; + c = compptr->component_id; + compptr++; + for (i = 1; i < ci; i++, compptr++) { + if (compptr->component_id > c) c = compptr->component_id; + } + c++; + break; + } + } + compptr->component_id = c; + compptr->component_index = ci; + INPUT_BYTE(cinfo, c, return FALSE); + compptr->h_samp_factor = (c >> 4) & 15; + compptr->v_samp_factor = (c ) & 15; + INPUT_BYTE(cinfo, compptr->quant_tbl_no, return FALSE); + + TRACEMS4(cinfo, 1, JTRC_SOF_COMPONENT, + compptr->component_id, compptr->h_samp_factor, + compptr->v_samp_factor, compptr->quant_tbl_no); + } + + cinfo->marker->saw_SOF = TRUE; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(boolean) +get_sos (j_decompress_ptr cinfo) +/* Process a SOS marker */ +{ + INT32 length; + int c, ci, i, n; + jpeg_component_info * compptr; + INPUT_VARS(cinfo); + + if (! cinfo->marker->saw_SOF) + ERREXITS(cinfo, JERR_SOF_BEFORE, "SOS"); + + INPUT_2BYTES(cinfo, length, return FALSE); + + INPUT_BYTE(cinfo, n, return FALSE); /* Number of components */ + + TRACEMS1(cinfo, 1, JTRC_SOS, n); + + if (length != (n * 2 + 6) || n > MAX_COMPS_IN_SCAN || + (n == 0 && !cinfo->progressive_mode)) + /* pseudo SOS marker only allowed in progressive mode */ + ERREXIT(cinfo, JERR_BAD_LENGTH); + + cinfo->comps_in_scan = n; + + /* Collect the component-spec parameters */ + + for (i = 0; i < n; i++) { + INPUT_BYTE(cinfo, c, return FALSE); + + /* Detect the case where component id's are not unique, and, if so, */ + /* create a fake component id using the same logic as in get_sof. */ + /* Note: This also ensures that all of the SOF components are */ + /* referenced in the single scan case, which prevents access to */ + /* uninitialized memory in later decoding stages. */ + for (ci = 0; ci < i; ci++) { + if (c == cinfo->cur_comp_info[ci]->component_id) { + c = cinfo->cur_comp_info[0]->component_id; + for (ci = 1; ci < i; ci++) { + compptr = cinfo->cur_comp_info[ci]; + if (compptr->component_id > c) c = compptr->component_id; + } + c++; + break; + } + } + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (c == compptr->component_id) + goto id_found; + } + + ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, c); + + id_found: + + cinfo->cur_comp_info[i] = compptr; + INPUT_BYTE(cinfo, c, return FALSE); + compptr->dc_tbl_no = (c >> 4) & 15; + compptr->ac_tbl_no = (c ) & 15; + + TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, compptr->component_id, + compptr->dc_tbl_no, compptr->ac_tbl_no); + } + + /* Collect the additional scan parameters Ss, Se, Ah/Al. */ + INPUT_BYTE(cinfo, c, return FALSE); + cinfo->Ss = c; + INPUT_BYTE(cinfo, c, return FALSE); + cinfo->Se = c; + INPUT_BYTE(cinfo, c, return FALSE); + cinfo->Ah = (c >> 4) & 15; + cinfo->Al = (c ) & 15; + + TRACEMS4(cinfo, 1, JTRC_SOS_PARAMS, cinfo->Ss, cinfo->Se, + cinfo->Ah, cinfo->Al); + + /* Prepare to scan data & restart markers */ + cinfo->marker->next_restart_num = 0; + + /* Count another (non-pseudo) SOS marker */ + if (n) cinfo->input_scan_number++; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +#ifdef D_ARITH_CODING_SUPPORTED + +LOCAL(boolean) +get_dac (j_decompress_ptr cinfo) +/* Process a DAC marker */ +{ + INT32 length; + int index, val; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + while (length > 0) { + INPUT_BYTE(cinfo, index, return FALSE); + INPUT_BYTE(cinfo, val, return FALSE); + + length -= 2; + + TRACEMS2(cinfo, 1, JTRC_DAC, index, val); + + if (index < 0 || index >= (2*NUM_ARITH_TBLS)) + ERREXIT1(cinfo, JERR_DAC_INDEX, index); + + if (index >= NUM_ARITH_TBLS) { /* define AC table */ + cinfo->arith_ac_K[index-NUM_ARITH_TBLS] = (UINT8) val; + } else { /* define DC table */ + cinfo->arith_dc_L[index] = (UINT8) (val & 0x0F); + cinfo->arith_dc_U[index] = (UINT8) (val >> 4); + if (cinfo->arith_dc_L[index] > cinfo->arith_dc_U[index]) + ERREXIT1(cinfo, JERR_DAC_VALUE, val); + } + } + + if (length != 0) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + INPUT_SYNC(cinfo); + return TRUE; +} + +#else /* ! D_ARITH_CODING_SUPPORTED */ + +#define get_dac(cinfo) skip_variable(cinfo) + +#endif /* D_ARITH_CODING_SUPPORTED */ + + +LOCAL(boolean) +get_dht (j_decompress_ptr cinfo) +/* Process a DHT marker */ +{ + INT32 length; + UINT8 bits[17]; + UINT8 huffval[256]; + int i, index, count; + JHUFF_TBL **htblptr; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + while (length > 16) { + INPUT_BYTE(cinfo, index, return FALSE); + + TRACEMS1(cinfo, 1, JTRC_DHT, index); + + bits[0] = 0; + count = 0; + for (i = 1; i <= 16; i++) { + INPUT_BYTE(cinfo, bits[i], return FALSE); + count += bits[i]; + } + + length -= 1 + 16; + + TRACEMS8(cinfo, 2, JTRC_HUFFBITS, + bits[1], bits[2], bits[3], bits[4], + bits[5], bits[6], bits[7], bits[8]); + TRACEMS8(cinfo, 2, JTRC_HUFFBITS, + bits[9], bits[10], bits[11], bits[12], + bits[13], bits[14], bits[15], bits[16]); + + /* Here we just do minimal validation of the counts to avoid walking + * off the end of our table space. jdhuff.c will check more carefully. + */ + if (count > 256 || ((INT32) count) > length) + ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); + + for (i = 0; i < count; i++) + INPUT_BYTE(cinfo, huffval[i], return FALSE); + + length -= count; + + if (index & 0x10) { /* AC table definition */ + index -= 0x10; + htblptr = &cinfo->ac_huff_tbl_ptrs[index]; + } else { /* DC table definition */ + htblptr = &cinfo->dc_huff_tbl_ptrs[index]; + } + + if (index < 0 || index >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_DHT_INDEX, index); + + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + + MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits)); + if (count > 0) + MEMCOPY((*htblptr)->huffval, huffval, count * SIZEOF(UINT8)); + } + + if (length != 0) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(boolean) +get_dqt (j_decompress_ptr cinfo) +/* Process a DQT marker */ +{ + INT32 length, count, i; + int n, prec; + unsigned int tmp; + JQUANT_TBL *quant_ptr; + const int *natural_order; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + while (length > 0) { + length--; + INPUT_BYTE(cinfo, n, return FALSE); + prec = n >> 4; + n &= 0x0F; + + TRACEMS2(cinfo, 1, JTRC_DQT, n, prec); + + if (n >= NUM_QUANT_TBLS) + ERREXIT1(cinfo, JERR_DQT_INDEX, n); + + if (cinfo->quant_tbl_ptrs[n] == NULL) + cinfo->quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) cinfo); + quant_ptr = cinfo->quant_tbl_ptrs[n]; + + if (prec) { + if (length < DCTSIZE2 * 2) { + /* Initialize full table for safety. */ + for (i = 0; i < DCTSIZE2; i++) { + quant_ptr->quantval[i] = 1; + } + count = length >> 1; + } else + count = DCTSIZE2; + } else { + if (length < DCTSIZE2) { + /* Initialize full table for safety. */ + for (i = 0; i < DCTSIZE2; i++) { + quant_ptr->quantval[i] = 1; + } + count = length; + } else + count = DCTSIZE2; + } + + switch ((int) count) { + case (2*2): natural_order = jpeg_natural_order2; break; + case (3*3): natural_order = jpeg_natural_order3; break; + case (4*4): natural_order = jpeg_natural_order4; break; + case (5*5): natural_order = jpeg_natural_order5; break; + case (6*6): natural_order = jpeg_natural_order6; break; + case (7*7): natural_order = jpeg_natural_order7; break; + default: natural_order = jpeg_natural_order; + } + + for (i = 0; i < count; i++) { + if (prec) + INPUT_2BYTES(cinfo, tmp, return FALSE); + else + INPUT_BYTE(cinfo, tmp, return FALSE); + /* We convert the zigzag-order table to natural array order. */ + quant_ptr->quantval[natural_order[i]] = (UINT16) tmp; + } + + if (cinfo->err->trace_level >= 2) { + for (i = 0; i < DCTSIZE2; i += 8) { + TRACEMS8(cinfo, 2, JTRC_QUANTVALS, + quant_ptr->quantval[i], quant_ptr->quantval[i+1], + quant_ptr->quantval[i+2], quant_ptr->quantval[i+3], + quant_ptr->quantval[i+4], quant_ptr->quantval[i+5], + quant_ptr->quantval[i+6], quant_ptr->quantval[i+7]); + } + } + + length -= count; + if (prec) length -= count; + } + + if (length != 0) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(boolean) +get_dri (j_decompress_ptr cinfo) +/* Process a DRI marker */ +{ + INT32 length; + unsigned int tmp; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + + if (length != 4) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + INPUT_2BYTES(cinfo, tmp, return FALSE); + + TRACEMS1(cinfo, 1, JTRC_DRI, tmp); + + cinfo->restart_interval = tmp; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(boolean) +get_lse (j_decompress_ptr cinfo) +/* Process an LSE marker */ +{ + INT32 length; + unsigned int tmp; + int cid; + INPUT_VARS(cinfo); + + if (! cinfo->marker->saw_SOF) + ERREXITS(cinfo, JERR_SOF_BEFORE, "LSE"); + + if (cinfo->num_components < 3) goto bad; + + INPUT_2BYTES(cinfo, length, return FALSE); + + if (length != 24) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + INPUT_BYTE(cinfo, tmp, return FALSE); + if (tmp != 0x0D) /* ID inverse transform specification */ + ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker); + INPUT_2BYTES(cinfo, tmp, return FALSE); + if (tmp != MAXJSAMPLE) goto bad; /* MAXTRANS */ + INPUT_BYTE(cinfo, tmp, return FALSE); + if (tmp != 3) goto bad; /* Nt=3 */ + INPUT_BYTE(cinfo, cid, return FALSE); + if (cid != cinfo->comp_info[1].component_id) goto bad; + INPUT_BYTE(cinfo, cid, return FALSE); + if (cid != cinfo->comp_info[0].component_id) goto bad; + INPUT_BYTE(cinfo, cid, return FALSE); + if (cid != cinfo->comp_info[2].component_id) goto bad; + INPUT_BYTE(cinfo, tmp, return FALSE); + if (tmp != 0x80) goto bad; /* F1: CENTER1=1, NORM1=0 */ + INPUT_2BYTES(cinfo, tmp, return FALSE); + if (tmp != 0) goto bad; /* A(1,1)=0 */ + INPUT_2BYTES(cinfo, tmp, return FALSE); + if (tmp != 0) goto bad; /* A(1,2)=0 */ + INPUT_BYTE(cinfo, tmp, return FALSE); + if (tmp != 0) goto bad; /* F2: CENTER2=0, NORM2=0 */ + INPUT_2BYTES(cinfo, tmp, return FALSE); + if (tmp != 1) goto bad; /* A(2,1)=1 */ + INPUT_2BYTES(cinfo, tmp, return FALSE); + if (tmp != 0) goto bad; /* A(2,2)=0 */ + INPUT_BYTE(cinfo, tmp, return FALSE); + if (tmp != 0) goto bad; /* F3: CENTER3=0, NORM3=0 */ + INPUT_2BYTES(cinfo, tmp, return FALSE); + if (tmp != 1) goto bad; /* A(3,1)=1 */ + INPUT_2BYTES(cinfo, tmp, return FALSE); + if (tmp != 0) { /* A(3,2)=0 */ + bad: + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + } + + /* OK, valid transform that we can handle. */ + cinfo->color_transform = JCT_SUBTRACT_GREEN; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +/* + * Routines for processing APPn and COM markers. + * These are either saved in memory or discarded, per application request. + * APP0 and APP14 are specially checked to see if they are + * JFIF and Adobe markers, respectively. + */ + +#define APP0_DATA_LEN 14 /* Length of interesting data in APP0 */ +#define APP14_DATA_LEN 12 /* Length of interesting data in APP14 */ +#define APPN_DATA_LEN 14 /* Must be the largest of the above!! */ + + +LOCAL(void) +examine_app0 (j_decompress_ptr cinfo, JOCTET FAR * data, + unsigned int datalen, INT32 remaining) +/* Examine first few bytes from an APP0. + * Take appropriate action if it is a JFIF marker. + * datalen is # of bytes at data[], remaining is length of rest of marker data. + */ +{ + INT32 totallen = (INT32) datalen + remaining; + + if (datalen >= APP0_DATA_LEN && + GETJOCTET(data[0]) == 0x4A && + GETJOCTET(data[1]) == 0x46 && + GETJOCTET(data[2]) == 0x49 && + GETJOCTET(data[3]) == 0x46 && + GETJOCTET(data[4]) == 0) { + /* Found JFIF APP0 marker: save info */ + cinfo->saw_JFIF_marker = TRUE; + cinfo->JFIF_major_version = GETJOCTET(data[5]); + cinfo->JFIF_minor_version = GETJOCTET(data[6]); + cinfo->density_unit = GETJOCTET(data[7]); + cinfo->X_density = (GETJOCTET(data[8]) << 8) + GETJOCTET(data[9]); + cinfo->Y_density = (GETJOCTET(data[10]) << 8) + GETJOCTET(data[11]); + /* Check version. + * Major version must be 1 or 2, anything else signals an incompatible + * change. + * (We used to treat this as an error, but now it's a nonfatal warning, + * because some bozo at Hijaak couldn't read the spec.) + * Minor version should be 0..2, but process anyway if newer. + */ + if (cinfo->JFIF_major_version != 1 && cinfo->JFIF_major_version != 2) + WARNMS2(cinfo, JWRN_JFIF_MAJOR, + cinfo->JFIF_major_version, cinfo->JFIF_minor_version); + /* Generate trace messages */ + TRACEMS5(cinfo, 1, JTRC_JFIF, + cinfo->JFIF_major_version, cinfo->JFIF_minor_version, + cinfo->X_density, cinfo->Y_density, cinfo->density_unit); + /* Validate thumbnail dimensions and issue appropriate messages */ + if (GETJOCTET(data[12]) | GETJOCTET(data[13])) + TRACEMS2(cinfo, 1, JTRC_JFIF_THUMBNAIL, + GETJOCTET(data[12]), GETJOCTET(data[13])); + totallen -= APP0_DATA_LEN; + if (totallen != + ((INT32)GETJOCTET(data[12]) * (INT32)GETJOCTET(data[13]) * (INT32) 3)) + TRACEMS1(cinfo, 1, JTRC_JFIF_BADTHUMBNAILSIZE, (int) totallen); + } else if (datalen >= 6 && + GETJOCTET(data[0]) == 0x4A && + GETJOCTET(data[1]) == 0x46 && + GETJOCTET(data[2]) == 0x58 && + GETJOCTET(data[3]) == 0x58 && + GETJOCTET(data[4]) == 0) { + /* Found JFIF "JFXX" extension APP0 marker */ + /* The library doesn't actually do anything with these, + * but we try to produce a helpful trace message. + */ + switch (GETJOCTET(data[5])) { + case 0x10: + TRACEMS1(cinfo, 1, JTRC_THUMB_JPEG, (int) totallen); + break; + case 0x11: + TRACEMS1(cinfo, 1, JTRC_THUMB_PALETTE, (int) totallen); + break; + case 0x13: + TRACEMS1(cinfo, 1, JTRC_THUMB_RGB, (int) totallen); + break; + default: + TRACEMS2(cinfo, 1, JTRC_JFIF_EXTENSION, + GETJOCTET(data[5]), (int) totallen); + } + } else { + /* Start of APP0 does not match "JFIF" or "JFXX", or too short */ + TRACEMS1(cinfo, 1, JTRC_APP0, (int) totallen); + } +} + + +LOCAL(void) +examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data, + unsigned int datalen, INT32 remaining) +/* Examine first few bytes from an APP14. + * Take appropriate action if it is an Adobe marker. + * datalen is # of bytes at data[], remaining is length of rest of marker data. + */ +{ + unsigned int version, flags0, flags1, transform; + + if (datalen >= APP14_DATA_LEN && + GETJOCTET(data[0]) == 0x41 && + GETJOCTET(data[1]) == 0x64 && + GETJOCTET(data[2]) == 0x6F && + GETJOCTET(data[3]) == 0x62 && + GETJOCTET(data[4]) == 0x65) { + /* Found Adobe APP14 marker */ + version = (GETJOCTET(data[5]) << 8) + GETJOCTET(data[6]); + flags0 = (GETJOCTET(data[7]) << 8) + GETJOCTET(data[8]); + flags1 = (GETJOCTET(data[9]) << 8) + GETJOCTET(data[10]); + transform = GETJOCTET(data[11]); + TRACEMS4(cinfo, 1, JTRC_ADOBE, version, flags0, flags1, transform); + cinfo->saw_Adobe_marker = TRUE; + cinfo->Adobe_transform = (UINT8) transform; + } else { + /* Start of APP14 does not match "Adobe", or too short */ + TRACEMS1(cinfo, 1, JTRC_APP14, (int) (datalen + remaining)); + } +} + + +METHODDEF(boolean) +get_interesting_appn (j_decompress_ptr cinfo) +/* Process an APP0 or APP14 marker without saving it */ +{ + INT32 length; + JOCTET b[APPN_DATA_LEN]; + unsigned int i, numtoread; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + /* get the interesting part of the marker data */ + if (length >= APPN_DATA_LEN) + numtoread = APPN_DATA_LEN; + else if (length > 0) + numtoread = (unsigned int) length; + else + numtoread = 0; + for (i = 0; i < numtoread; i++) + INPUT_BYTE(cinfo, b[i], return FALSE); + length -= numtoread; + + /* process it */ + switch (cinfo->unread_marker) { + case M_APP0: + examine_app0(cinfo, (JOCTET FAR *) b, numtoread, length); + break; + case M_APP14: + examine_app14(cinfo, (JOCTET FAR *) b, numtoread, length); + break; + default: + /* can't get here unless jpeg_save_markers chooses wrong processor */ + ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker); + } + + /* skip any remaining data -- could be lots */ + INPUT_SYNC(cinfo); + if (length > 0) + (*cinfo->src->skip_input_data) (cinfo, (long) length); + + return TRUE; +} + + +#ifdef SAVE_MARKERS_SUPPORTED + +METHODDEF(boolean) +save_marker (j_decompress_ptr cinfo) +/* Save an APPn or COM marker into the marker list */ +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + jpeg_saved_marker_ptr cur_marker = marker->cur_marker; + unsigned int bytes_read, data_length; + JOCTET FAR * data; + INT32 length = 0; + INPUT_VARS(cinfo); + + if (cur_marker == NULL) { + /* begin reading a marker */ + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + if (length >= 0) { /* watch out for bogus length word */ + /* figure out how much we want to save */ + unsigned int limit; + if (cinfo->unread_marker == (int) M_COM) + limit = marker->length_limit_COM; + else + limit = marker->length_limit_APPn[cinfo->unread_marker - (int) M_APP0]; + if ((unsigned int) length < limit) + limit = (unsigned int) length; + /* allocate and initialize the marker item */ + cur_marker = (jpeg_saved_marker_ptr) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(struct jpeg_marker_struct) + limit); + cur_marker->next = NULL; + cur_marker->marker = (UINT8) cinfo->unread_marker; + cur_marker->original_length = (unsigned int) length; + cur_marker->data_length = limit; + /* data area is just beyond the jpeg_marker_struct */ + data = cur_marker->data = (JOCTET FAR *) (cur_marker + 1); + marker->cur_marker = cur_marker; + marker->bytes_read = 0; + bytes_read = 0; + data_length = limit; + } else { + /* deal with bogus length word */ + bytes_read = data_length = 0; + data = NULL; + } + } else { + /* resume reading a marker */ + bytes_read = marker->bytes_read; + data_length = cur_marker->data_length; + data = cur_marker->data + bytes_read; + } + + while (bytes_read < data_length) { + INPUT_SYNC(cinfo); /* move the restart point to here */ + marker->bytes_read = bytes_read; + /* If there's not at least one byte in buffer, suspend */ + MAKE_BYTE_AVAIL(cinfo, return FALSE); + /* Copy bytes with reasonable rapidity */ + while (bytes_read < data_length && bytes_in_buffer > 0) { + *data++ = *next_input_byte++; + bytes_in_buffer--; + bytes_read++; + } + } + + /* Done reading what we want to read */ + if (cur_marker != NULL) { /* will be NULL if bogus length word */ + /* Add new marker to end of list */ + if (cinfo->marker_list == NULL) { + cinfo->marker_list = cur_marker; + } else { + jpeg_saved_marker_ptr prev = cinfo->marker_list; + while (prev->next != NULL) + prev = prev->next; + prev->next = cur_marker; + } + /* Reset pointer & calc remaining data length */ + data = cur_marker->data; + length = cur_marker->original_length - data_length; + } + /* Reset to initial state for next marker */ + marker->cur_marker = NULL; + + /* Process the marker if interesting; else just make a generic trace msg */ + switch (cinfo->unread_marker) { + case M_APP0: + examine_app0(cinfo, data, data_length, length); + break; + case M_APP14: + examine_app14(cinfo, data, data_length, length); + break; + default: + TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker, + (int) (data_length + length)); + } + + /* skip any remaining data -- could be lots */ + INPUT_SYNC(cinfo); /* do before skip_input_data */ + if (length > 0) + (*cinfo->src->skip_input_data) (cinfo, (long) length); + + return TRUE; +} + +#endif /* SAVE_MARKERS_SUPPORTED */ + + +METHODDEF(boolean) +skip_variable (j_decompress_ptr cinfo) +/* Skip over an unknown or uninteresting variable-length marker */ +{ + INT32 length; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker, (int) length); + + INPUT_SYNC(cinfo); /* do before skip_input_data */ + if (length > 0) + (*cinfo->src->skip_input_data) (cinfo, (long) length); + + return TRUE; +} + + +/* + * Find the next JPEG marker, save it in cinfo->unread_marker. + * Returns FALSE if had to suspend before reaching a marker; + * in that case cinfo->unread_marker is unchanged. + * + * Note that the result might not be a valid marker code, + * but it will never be 0 or FF. + */ + +LOCAL(boolean) +next_marker (j_decompress_ptr cinfo) +{ + int c; + INPUT_VARS(cinfo); + + for (;;) { + INPUT_BYTE(cinfo, c, return FALSE); + /* Skip any non-FF bytes. + * This may look a bit inefficient, but it will not occur in a valid file. + * We sync after each discarded byte so that a suspending data source + * can discard the byte from its buffer. + */ + while (c != 0xFF) { + cinfo->marker->discarded_bytes++; + INPUT_SYNC(cinfo); + INPUT_BYTE(cinfo, c, return FALSE); + } + /* This loop swallows any duplicate FF bytes. Extra FFs are legal as + * pad bytes, so don't count them in discarded_bytes. We assume there + * will not be so many consecutive FF bytes as to overflow a suspending + * data source's input buffer. + */ + do { + INPUT_BYTE(cinfo, c, return FALSE); + } while (c == 0xFF); + if (c != 0) + break; /* found a valid marker, exit loop */ + /* Reach here if we found a stuffed-zero data sequence (FF/00). + * Discard it and loop back to try again. + */ + cinfo->marker->discarded_bytes += 2; + INPUT_SYNC(cinfo); + } + + if (cinfo->marker->discarded_bytes != 0) { + WARNMS2(cinfo, JWRN_EXTRANEOUS_DATA, cinfo->marker->discarded_bytes, c); + cinfo->marker->discarded_bytes = 0; + } + + cinfo->unread_marker = c; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(boolean) +first_marker (j_decompress_ptr cinfo) +/* Like next_marker, but used to obtain the initial SOI marker. */ +/* For this marker, we do not allow preceding garbage or fill; otherwise, + * we might well scan an entire input file before realizing it ain't JPEG. + * If an application wants to process non-JFIF files, it must seek to the + * SOI before calling the JPEG library. + */ +{ + int c, c2; + INPUT_VARS(cinfo); + + INPUT_BYTE(cinfo, c, return FALSE); + INPUT_BYTE(cinfo, c2, return FALSE); + if (c != 0xFF || c2 != (int) M_SOI) + ERREXIT2(cinfo, JERR_NO_SOI, c, c2); + + cinfo->unread_marker = c2; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +/* + * Read markers until SOS or EOI. + * + * Returns same codes as are defined for jpeg_consume_input: + * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. + * + * Note: This function may return a pseudo SOS marker (with zero + * component number) for treat by input controller's consume_input. + * consume_input itself should filter out (skip) the pseudo marker + * after processing for the caller. + */ + +METHODDEF(int) +read_markers (j_decompress_ptr cinfo) +{ + /* Outer loop repeats once for each marker. */ + for (;;) { + /* Collect the marker proper, unless we already did. */ + /* NB: first_marker() enforces the requirement that SOI appear first. */ + if (cinfo->unread_marker == 0) { + if (! cinfo->marker->saw_SOI) { + if (! first_marker(cinfo)) + return JPEG_SUSPENDED; + } else { + if (! next_marker(cinfo)) + return JPEG_SUSPENDED; + } + } + /* At this point cinfo->unread_marker contains the marker code and the + * input point is just past the marker proper, but before any parameters. + * A suspension will cause us to return with this state still true. + */ + switch (cinfo->unread_marker) { + case M_SOI: + if (! get_soi(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_SOF0: /* Baseline */ + if (! get_sof(cinfo, TRUE, FALSE, FALSE)) + return JPEG_SUSPENDED; + break; + + case M_SOF1: /* Extended sequential, Huffman */ + if (! get_sof(cinfo, FALSE, FALSE, FALSE)) + return JPEG_SUSPENDED; + break; + + case M_SOF2: /* Progressive, Huffman */ + if (! get_sof(cinfo, FALSE, TRUE, FALSE)) + return JPEG_SUSPENDED; + break; + + case M_SOF9: /* Extended sequential, arithmetic */ + if (! get_sof(cinfo, FALSE, FALSE, TRUE)) + return JPEG_SUSPENDED; + break; + + case M_SOF10: /* Progressive, arithmetic */ + if (! get_sof(cinfo, FALSE, TRUE, TRUE)) + return JPEG_SUSPENDED; + break; + + /* Currently unsupported SOFn types */ + case M_SOF3: /* Lossless, Huffman */ + case M_SOF5: /* Differential sequential, Huffman */ + case M_SOF6: /* Differential progressive, Huffman */ + case M_SOF7: /* Differential lossless, Huffman */ + case M_JPG: /* Reserved for JPEG extensions */ + case M_SOF11: /* Lossless, arithmetic */ + case M_SOF13: /* Differential sequential, arithmetic */ + case M_SOF14: /* Differential progressive, arithmetic */ + case M_SOF15: /* Differential lossless, arithmetic */ + ERREXIT1(cinfo, JERR_SOF_UNSUPPORTED, cinfo->unread_marker); + break; + + case M_SOS: + if (! get_sos(cinfo)) + return JPEG_SUSPENDED; + cinfo->unread_marker = 0; /* processed the marker */ + return JPEG_REACHED_SOS; + + case M_EOI: + TRACEMS(cinfo, 1, JTRC_EOI); + cinfo->unread_marker = 0; /* processed the marker */ + return JPEG_REACHED_EOI; + + case M_DAC: + if (! get_dac(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_DHT: + if (! get_dht(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_DQT: + if (! get_dqt(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_DRI: + if (! get_dri(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_JPG8: + if (! get_lse(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_APP0: + case M_APP1: + case M_APP2: + case M_APP3: + case M_APP4: + case M_APP5: + case M_APP6: + case M_APP7: + case M_APP8: + case M_APP9: + case M_APP10: + case M_APP11: + case M_APP12: + case M_APP13: + case M_APP14: + case M_APP15: + if (! (*((my_marker_ptr) cinfo->marker)->process_APPn[ + cinfo->unread_marker - (int) M_APP0]) (cinfo)) + return JPEG_SUSPENDED; + break; + + case M_COM: + if (! (*((my_marker_ptr) cinfo->marker)->process_COM) (cinfo)) + return JPEG_SUSPENDED; + break; + + case M_RST0: /* these are all parameterless */ + case M_RST1: + case M_RST2: + case M_RST3: + case M_RST4: + case M_RST5: + case M_RST6: + case M_RST7: + case M_TEM: + TRACEMS1(cinfo, 1, JTRC_PARMLESS_MARKER, cinfo->unread_marker); + break; + + case M_DNL: /* Ignore DNL ... perhaps the wrong thing */ + if (! skip_variable(cinfo)) + return JPEG_SUSPENDED; + break; + + default: /* must be DHP, EXP, JPGn, or RESn */ + /* For now, we treat the reserved markers as fatal errors since they are + * likely to be used to signal incompatible JPEG Part 3 extensions. + * Once the JPEG 3 version-number marker is well defined, this code + * ought to change! + */ + ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker); + } + /* Successfully processed marker, so reset state variable */ + cinfo->unread_marker = 0; + } /* end loop */ +} + + +/* + * Read a restart marker, which is expected to appear next in the datastream; + * if the marker is not there, take appropriate recovery action. + * Returns FALSE if suspension is required. + * + * This is called by the entropy decoder after it has read an appropriate + * number of MCUs. cinfo->unread_marker may be nonzero if the entropy decoder + * has already read a marker from the data source. Under normal conditions + * cinfo->unread_marker will be reset to 0 before returning; if not reset, + * it holds a marker which the decoder will be unable to read past. + */ + +METHODDEF(boolean) +read_restart_marker (j_decompress_ptr cinfo) +{ + /* Obtain a marker unless we already did. */ + /* Note that next_marker will complain if it skips any data. */ + if (cinfo->unread_marker == 0) { + if (! next_marker(cinfo)) + return FALSE; + } + + if (cinfo->unread_marker == + ((int) M_RST0 + cinfo->marker->next_restart_num)) { + /* Normal case --- swallow the marker and let entropy decoder continue */ + TRACEMS1(cinfo, 3, JTRC_RST, cinfo->marker->next_restart_num); + cinfo->unread_marker = 0; + } else { + /* Uh-oh, the restart markers have been messed up. */ + /* Let the data source manager determine how to resync. */ + if (! (*cinfo->src->resync_to_restart) (cinfo, + cinfo->marker->next_restart_num)) + return FALSE; + } + + /* Update next-restart state */ + cinfo->marker->next_restart_num = (cinfo->marker->next_restart_num + 1) & 7; + + return TRUE; +} + + +/* + * This is the default resync_to_restart method for data source managers + * to use if they don't have any better approach. Some data source managers + * may be able to back up, or may have additional knowledge about the data + * which permits a more intelligent recovery strategy; such managers would + * presumably supply their own resync method. + * + * read_restart_marker calls resync_to_restart if it finds a marker other than + * the restart marker it was expecting. (This code is *not* used unless + * a nonzero restart interval has been declared.) cinfo->unread_marker is + * the marker code actually found (might be anything, except 0 or FF). + * The desired restart marker number (0..7) is passed as a parameter. + * This routine is supposed to apply whatever error recovery strategy seems + * appropriate in order to position the input stream to the next data segment. + * Note that cinfo->unread_marker is treated as a marker appearing before + * the current data-source input point; usually it should be reset to zero + * before returning. + * Returns FALSE if suspension is required. + * + * This implementation is substantially constrained by wanting to treat the + * input as a data stream; this means we can't back up. Therefore, we have + * only the following actions to work with: + * 1. Simply discard the marker and let the entropy decoder resume at next + * byte of file. + * 2. Read forward until we find another marker, discarding intervening + * data. (In theory we could look ahead within the current bufferload, + * without having to discard data if we don't find the desired marker. + * This idea is not implemented here, in part because it makes behavior + * dependent on buffer size and chance buffer-boundary positions.) + * 3. Leave the marker unread (by failing to zero cinfo->unread_marker). + * This will cause the entropy decoder to process an empty data segment, + * inserting dummy zeroes, and then we will reprocess the marker. + * + * #2 is appropriate if we think the desired marker lies ahead, while #3 is + * appropriate if the found marker is a future restart marker (indicating + * that we have missed the desired restart marker, probably because it got + * corrupted). + * We apply #2 or #3 if the found marker is a restart marker no more than + * two counts behind or ahead of the expected one. We also apply #2 if the + * found marker is not a legal JPEG marker code (it's certainly bogus data). + * If the found marker is a restart marker more than 2 counts away, we do #1 + * (too much risk that the marker is erroneous; with luck we will be able to + * resync at some future point). + * For any valid non-restart JPEG marker, we apply #3. This keeps us from + * overrunning the end of a scan. An implementation limited to single-scan + * files might find it better to apply #2 for markers other than EOI, since + * any other marker would have to be bogus data in that case. + */ + +GLOBAL(boolean) +jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired) +{ + int marker = cinfo->unread_marker; + int action = 1; + + /* Always put up a warning. */ + WARNMS2(cinfo, JWRN_MUST_RESYNC, marker, desired); + + /* Outer loop handles repeated decision after scanning forward. */ + for (;;) { + if (marker < (int) M_SOF0) + action = 2; /* invalid marker */ + else if (marker < (int) M_RST0 || marker > (int) M_RST7) + action = 3; /* valid non-restart marker */ + else { + if (marker == ((int) M_RST0 + ((desired+1) & 7)) || + marker == ((int) M_RST0 + ((desired+2) & 7))) + action = 3; /* one of the next two expected restarts */ + else if (marker == ((int) M_RST0 + ((desired-1) & 7)) || + marker == ((int) M_RST0 + ((desired-2) & 7))) + action = 2; /* a prior restart, so advance */ + else + action = 1; /* desired restart or too far away */ + } + TRACEMS2(cinfo, 4, JTRC_RECOVERY_ACTION, marker, action); + switch (action) { + case 1: + /* Discard marker and let entropy decoder resume processing. */ + cinfo->unread_marker = 0; + return TRUE; + case 2: + /* Scan to the next marker, and repeat the decision loop. */ + if (! next_marker(cinfo)) + return FALSE; + marker = cinfo->unread_marker; + break; + case 3: + /* Return without advancing past this marker. */ + /* Entropy decoder will be forced to process an empty segment. */ + return TRUE; + } + } /* end loop */ +} + + +/* + * Reset marker processing state to begin a fresh datastream. + */ + +METHODDEF(void) +reset_marker_reader (j_decompress_ptr cinfo) +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + + cinfo->comp_info = NULL; /* until allocated by get_sof */ + cinfo->input_scan_number = 0; /* no SOS seen yet */ + cinfo->unread_marker = 0; /* no pending marker */ + marker->pub.saw_SOI = FALSE; /* set internal state too */ + marker->pub.saw_SOF = FALSE; + marker->pub.discarded_bytes = 0; + marker->cur_marker = NULL; +} + + +/* + * Initialize the marker reader module. + * This is called only once, when the decompression object is created. + */ + +GLOBAL(void) +jinit_marker_reader (j_decompress_ptr cinfo) +{ + my_marker_ptr marker; + int i; + + /* Create subobject in permanent pool */ + marker = (my_marker_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_PERMANENT, SIZEOF(my_marker_reader)); + cinfo->marker = &marker->pub; + /* Initialize public method pointers */ + marker->pub.reset_marker_reader = reset_marker_reader; + marker->pub.read_markers = read_markers; + marker->pub.read_restart_marker = read_restart_marker; + /* Initialize COM/APPn processing. + * By default, we examine and then discard APP0 and APP14, + * but simply discard COM and all other APPn. + */ + marker->process_COM = skip_variable; + marker->length_limit_COM = 0; + for (i = 0; i < 16; i++) { + marker->process_APPn[i] = skip_variable; + marker->length_limit_APPn[i] = 0; + } + marker->process_APPn[0] = get_interesting_appn; + marker->process_APPn[14] = get_interesting_appn; + /* Reset marker processing state */ + reset_marker_reader(cinfo); +} + + +/* + * Control saving of COM and APPn markers into marker_list. + */ + +#ifdef SAVE_MARKERS_SUPPORTED + +GLOBAL(void) +jpeg_save_markers (j_decompress_ptr cinfo, int marker_code, + unsigned int length_limit) +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + long maxlength; + jpeg_marker_parser_method processor; + + /* Length limit mustn't be larger than what we can allocate + * (should only be a concern in a 16-bit environment). + */ + maxlength = cinfo->mem->max_alloc_chunk - SIZEOF(struct jpeg_marker_struct); + if (((long) length_limit) > maxlength) + length_limit = (unsigned int) maxlength; + + /* Choose processor routine to use. + * APP0/APP14 have special requirements. + */ + if (length_limit) { + processor = save_marker; + /* If saving APP0/APP14, save at least enough for our internal use. */ + if (marker_code == (int) M_APP0 && length_limit < APP0_DATA_LEN) + length_limit = APP0_DATA_LEN; + else if (marker_code == (int) M_APP14 && length_limit < APP14_DATA_LEN) + length_limit = APP14_DATA_LEN; + } else { + processor = skip_variable; + /* If discarding APP0/APP14, use our regular on-the-fly processor. */ + if (marker_code == (int) M_APP0 || marker_code == (int) M_APP14) + processor = get_interesting_appn; + } + + if (marker_code == (int) M_COM) { + marker->process_COM = processor; + marker->length_limit_COM = length_limit; + } else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15) { + marker->process_APPn[marker_code - (int) M_APP0] = processor; + marker->length_limit_APPn[marker_code - (int) M_APP0] = length_limit; + } else + ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code); +} + +#endif /* SAVE_MARKERS_SUPPORTED */ + + +/* + * Install a special processing method for COM or APPn markers. + */ + +GLOBAL(void) +jpeg_set_marker_processor (j_decompress_ptr cinfo, int marker_code, + jpeg_marker_parser_method routine) +{ + my_marker_ptr marker = (my_marker_ptr) cinfo->marker; + + if (marker_code == (int) M_COM) + marker->process_COM = routine; + else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15) + marker->process_APPn[marker_code - (int) M_APP0] = routine; + else + ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code); +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdmaster.c b/widget/milsko/milskosrc/external/libjpeg/src/jdmaster.c new file mode 100644 index 0000000000..3070b7bb41 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdmaster.c @@ -0,0 +1,532 @@ +/* + * jdmaster.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 2002-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains master control logic for the JPEG decompressor. + * These routines are concerned with selecting the modules to be executed + * and with determining the number of passes and the work to be done in each + * pass. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private state */ + +typedef struct { + struct jpeg_decomp_master pub; /* public fields */ + + int pass_number; /* # of passes completed */ + + boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */ + + /* Saved references to initialized quantizer modules, + * in case we need to switch modes. + */ + struct jpeg_color_quantizer * quantizer_1pass; + struct jpeg_color_quantizer * quantizer_2pass; +} my_decomp_master; + +typedef my_decomp_master * my_master_ptr; + + +/* + * Determine whether merged upsample/color conversion should be used. + * CRUCIAL: this must match the actual capabilities of jdmerge.c! + */ + +LOCAL(boolean) +use_merged_upsample (j_decompress_ptr cinfo) +{ +#ifdef UPSAMPLE_MERGING_SUPPORTED + /* Merging is the equivalent of plain box-filter upsampling. */ + /* The following condition is only needed if fancy shall select + * a different upsampling method. In our current implementation + * fancy only affects the DCT scaling, thus we can use fancy + * upsampling and merged upsample simultaneously, in particular + * with scaled DCT sizes larger than the default DCTSIZE. + */ +#if 0 + if (cinfo->do_fancy_upsampling) + return FALSE; +#endif + if (cinfo->CCIR601_sampling) + return FALSE; + /* jdmerge.c only supports YCC=>RGB color conversion */ + if ((cinfo->jpeg_color_space != JCS_YCbCr && + cinfo->jpeg_color_space != JCS_BG_YCC) || + cinfo->num_components != 3 || + cinfo->out_color_space != JCS_RGB || + cinfo->out_color_components != RGB_PIXELSIZE || + cinfo->color_transform) + return FALSE; + /* and it only handles 2h1v or 2h2v sampling ratios */ + if (cinfo->comp_info[0].h_samp_factor != 2 || + cinfo->comp_info[1].h_samp_factor != 1 || + cinfo->comp_info[2].h_samp_factor != 1 || + cinfo->comp_info[0].v_samp_factor > 2 || + cinfo->comp_info[1].v_samp_factor != 1 || + cinfo->comp_info[2].v_samp_factor != 1) + return FALSE; + /* furthermore, it doesn't work if we've scaled the IDCTs differently */ + if (cinfo->comp_info[0].DCT_h_scaled_size != cinfo->min_DCT_h_scaled_size || + cinfo->comp_info[1].DCT_h_scaled_size != cinfo->min_DCT_h_scaled_size || + cinfo->comp_info[2].DCT_h_scaled_size != cinfo->min_DCT_h_scaled_size || + cinfo->comp_info[0].DCT_v_scaled_size != cinfo->min_DCT_v_scaled_size || + cinfo->comp_info[1].DCT_v_scaled_size != cinfo->min_DCT_v_scaled_size || + cinfo->comp_info[2].DCT_v_scaled_size != cinfo->min_DCT_v_scaled_size) + return FALSE; + /* ??? also need to test for upsample-time rescaling, when & if supported */ + return TRUE; /* by golly, it'll work... */ +#else + return FALSE; +#endif +} + + +/* + * Compute output image dimensions and related values. + * NOTE: this is exported for possible use by application. + * Hence it mustn't do anything that can't be done twice. + * Also note that it may be called before the master module is initialized! + */ + +GLOBAL(void) +jpeg_calc_output_dimensions (j_decompress_ptr cinfo) +/* Do computations that are needed before master selection phase. + * This function is used for full decompression. + */ +{ + int ci, i; + jpeg_component_info *compptr; + + /* Prevent application from calling me at wrong times */ + if (cinfo->global_state != DSTATE_READY) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* Compute core output image dimensions and DCT scaling choices. */ + jpeg_core_output_dimensions(cinfo); + +#ifdef IDCT_SCALING_SUPPORTED + + /* In selecting the actual DCT scaling for each component, we try to + * scale up the chroma components via IDCT scaling rather than upsampling. + * This saves time if the upsampler gets to use 1:1 scaling. + * Note this code adapts subsampling ratios which are powers of 2. + */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + int ssize = 1; + if (! cinfo->raw_data_out) + while (cinfo->min_DCT_h_scaled_size * ssize <= + (cinfo->do_fancy_upsampling ? DCTSIZE : DCTSIZE / 2) && + (cinfo->max_h_samp_factor % (compptr->h_samp_factor * ssize * 2)) == + 0) { + ssize = ssize * 2; + } + compptr->DCT_h_scaled_size = cinfo->min_DCT_h_scaled_size * ssize; + ssize = 1; + if (! cinfo->raw_data_out) + while (cinfo->min_DCT_v_scaled_size * ssize <= + (cinfo->do_fancy_upsampling ? DCTSIZE : DCTSIZE / 2) && + (cinfo->max_v_samp_factor % (compptr->v_samp_factor * ssize * 2)) == + 0) { + ssize = ssize * 2; + } + compptr->DCT_v_scaled_size = cinfo->min_DCT_v_scaled_size * ssize; + + /* We don't support IDCT ratios larger than 2. */ + if (compptr->DCT_h_scaled_size > compptr->DCT_v_scaled_size * 2) + compptr->DCT_h_scaled_size = compptr->DCT_v_scaled_size * 2; + else if (compptr->DCT_v_scaled_size > compptr->DCT_h_scaled_size * 2) + compptr->DCT_v_scaled_size = compptr->DCT_h_scaled_size * 2; + + /* Recompute downsampled dimensions of components; + * application needs to know these if using raw downsampled data. + */ + /* Size in samples, after IDCT scaling */ + compptr->downsampled_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * + (long) (compptr->h_samp_factor * compptr->DCT_h_scaled_size), + (long) (cinfo->max_h_samp_factor * cinfo->block_size)); + compptr->downsampled_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * + (long) (compptr->v_samp_factor * compptr->DCT_v_scaled_size), + (long) (cinfo->max_v_samp_factor * cinfo->block_size)); + } + +#endif /* IDCT_SCALING_SUPPORTED */ + + /* Report number of components in selected colorspace. */ + /* This should correspond to the actual code in the color conversion module. */ + switch (cinfo->out_color_space) { + case JCS_GRAYSCALE: + cinfo->out_color_components = 1; + break; + case JCS_RGB: + case JCS_BG_RGB: + cinfo->out_color_components = RGB_PIXELSIZE; + break; + default: /* YCCK <=> CMYK conversion or same colorspace as in file */ + i = 0; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) + if (compptr->component_needed) + i++; /* count output color components */ + cinfo->out_color_components = i; + } + cinfo->output_components = (cinfo->quantize_colors ? 1 : + cinfo->out_color_components); + + /* See if upsampler will want to emit more than one row at a time */ + if (use_merged_upsample(cinfo)) + cinfo->rec_outbuf_height = cinfo->max_v_samp_factor; + else + cinfo->rec_outbuf_height = 1; +} + + +/* + * Several decompression processes need to range-limit values to the range + * 0..MAXJSAMPLE; the input value may fall somewhat outside this range + * due to noise introduced by quantization, roundoff error, etc. These + * processes are inner loops and need to be as fast as possible. On most + * machines, particularly CPUs with pipelines or instruction prefetch, + * a (subscript-check-less) C table lookup + * x = sample_range_limit[x]; + * is faster than explicit tests + * if (x < 0) x = 0; + * else if (x > MAXJSAMPLE) x = MAXJSAMPLE; + * These processes all use a common table prepared by the routine below. + * + * For most steps we can mathematically guarantee that the initial value + * of x is within 2*(MAXJSAMPLE+1) of the legal range, so a table running + * from -2*(MAXJSAMPLE+1) to 3*MAXJSAMPLE+2 is sufficient. But for the + * initial limiting step (just after the IDCT), a wildly out-of-range value + * is possible if the input data is corrupt. To avoid any chance of indexing + * off the end of memory and getting a bad-pointer trap, we perform the + * post-IDCT limiting thus: + * x = (sample_range_limit - SUBSET)[(x + CENTER) & MASK]; + * where MASK is 2 bits wider than legal sample data, ie 10 bits for 8-bit + * samples. Under normal circumstances this is more than enough range and + * a correct output will be generated; with bogus input data the mask will + * cause wraparound, and we will safely generate a bogus-but-in-range output. + * For the post-IDCT step, we want to convert the data from signed to unsigned + * representation by adding CENTERJSAMPLE at the same time that we limit it. + * This is accomplished with SUBSET = CENTER - CENTERJSAMPLE. + * + * Note that the table is allocated in near data space on PCs; it's small + * enough and used often enough to justify this. + */ + +LOCAL(void) +prepare_range_limit_table (j_decompress_ptr cinfo) +/* Allocate and fill in the sample_range_limit table */ +{ + JSAMPLE * table; + int i; + + table = (JSAMPLE *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, + JPOOL_IMAGE, (RANGE_CENTER * 2 + MAXJSAMPLE + 1) * SIZEOF(JSAMPLE)); + /* First segment of range limit table: limit[x] = 0 for x < 0 */ + MEMZERO(table, RANGE_CENTER * SIZEOF(JSAMPLE)); + table += RANGE_CENTER; /* allow negative subscripts of table */ + cinfo->sample_range_limit = table; + /* Main part of range limit table: limit[x] = x */ + for (i = 0; i <= MAXJSAMPLE; i++) + table[i] = (JSAMPLE) i; + /* End of range limit table: limit[x] = MAXJSAMPLE for x > MAXJSAMPLE */ + for (; i <= MAXJSAMPLE + RANGE_CENTER; i++) + table[i] = MAXJSAMPLE; +} + + +/* + * Master selection of decompression modules. + * This is done once at jpeg_start_decompress time. We determine + * which modules will be used and give them appropriate initialization calls. + * We also initialize the decompressor input side to begin consuming data. + * + * Since jpeg_read_header has finished, we know what is in the SOF + * and (first) SOS markers. We also have all the application parameter + * settings. + */ + +LOCAL(void) +master_selection (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + boolean use_c_buffer; + long samplesperrow; + JDIMENSION jd_samplesperrow; + + /* For now, precision must match compiled-in value... */ + if (cinfo->data_precision != BITS_IN_JSAMPLE) + ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); + + /* Initialize dimensions and other stuff */ + jpeg_calc_output_dimensions(cinfo); + prepare_range_limit_table(cinfo); + + /* Sanity check on image dimensions */ + if (cinfo->output_height <= 0 || cinfo->output_width <= 0 || + cinfo->out_color_components <= 0) + ERREXIT(cinfo, JERR_EMPTY_IMAGE); + + /* Width of an output scanline must be representable as JDIMENSION. */ + samplesperrow = (long) cinfo->output_width * (long) cinfo->out_color_components; + jd_samplesperrow = (JDIMENSION) samplesperrow; + if ((long) jd_samplesperrow != samplesperrow) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + + /* Initialize my private state */ + master->pass_number = 0; + master->using_merged_upsample = use_merged_upsample(cinfo); + + /* Color quantizer selection */ + master->quantizer_1pass = NULL; + master->quantizer_2pass = NULL; + /* No mode changes if not using buffered-image mode. */ + if (! cinfo->quantize_colors || ! cinfo->buffered_image) { + cinfo->enable_1pass_quant = FALSE; + cinfo->enable_external_quant = FALSE; + cinfo->enable_2pass_quant = FALSE; + } + if (cinfo->quantize_colors) { + if (cinfo->raw_data_out) + ERREXIT(cinfo, JERR_NOTIMPL); + /* 2-pass quantizer only works in 3-component color space. */ + if (cinfo->out_color_components != 3) { + cinfo->enable_1pass_quant = TRUE; + cinfo->enable_external_quant = FALSE; + cinfo->enable_2pass_quant = FALSE; + cinfo->colormap = NULL; + } else if (cinfo->colormap != NULL) { + cinfo->enable_external_quant = TRUE; + } else if (cinfo->two_pass_quantize) { + cinfo->enable_2pass_quant = TRUE; + } else { + cinfo->enable_1pass_quant = TRUE; + } + + if (cinfo->enable_1pass_quant) { +#ifdef QUANT_1PASS_SUPPORTED + jinit_1pass_quantizer(cinfo); + master->quantizer_1pass = cinfo->cquantize; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } + + /* We use the 2-pass code to map to external colormaps. */ + if (cinfo->enable_2pass_quant || cinfo->enable_external_quant) { +#ifdef QUANT_2PASS_SUPPORTED + jinit_2pass_quantizer(cinfo); + master->quantizer_2pass = cinfo->cquantize; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } + /* If both quantizers are initialized, the 2-pass one is left active; + * this is necessary for starting with quantization to an external map. + */ + } + + /* Post-processing: in particular, color conversion first */ + if (! cinfo->raw_data_out) { + if (master->using_merged_upsample) { +#ifdef UPSAMPLE_MERGING_SUPPORTED + jinit_merged_upsampler(cinfo); /* does color conversion too */ +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + jinit_color_deconverter(cinfo); + jinit_upsampler(cinfo); + } + jinit_d_post_controller(cinfo, cinfo->enable_2pass_quant); + } + /* Inverse DCT */ + jinit_inverse_dct(cinfo); + /* Entropy decoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) + jinit_arith_decoder(cinfo); + else { + jinit_huff_decoder(cinfo); + } + + /* Initialize principal buffer controllers. */ + use_c_buffer = cinfo->inputctl->has_multiple_scans || cinfo->buffered_image; + jinit_d_coef_controller(cinfo, use_c_buffer); + + if (! cinfo->raw_data_out) + jinit_d_main_controller(cinfo, FALSE /* never need full buffer here */); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Initialize input side of decompressor to consume first scan. */ + (*cinfo->inputctl->start_input_pass) (cinfo); + +#ifdef D_MULTISCAN_FILES_SUPPORTED + /* If jpeg_start_decompress will read the whole file, initialize + * progress monitoring appropriately. The input step is counted + * as one pass. + */ + if (cinfo->progress != NULL && ! cinfo->buffered_image && + cinfo->inputctl->has_multiple_scans) { + int nscans; + /* Estimate number of scans to set pass_limit. */ + if (cinfo->progressive_mode) { + /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */ + nscans = 2 + 3 * cinfo->num_components; + } else { + /* For a nonprogressive multiscan file, estimate 1 scan per component. */ + nscans = cinfo->num_components; + } + cinfo->progress->pass_counter = 0L; + cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; + cinfo->progress->completed_passes = 0; + cinfo->progress->total_passes = (cinfo->enable_2pass_quant ? 3 : 2); + /* Count the input pass as done */ + master->pass_number++; + } +#endif /* D_MULTISCAN_FILES_SUPPORTED */ +} + + +/* + * Per-pass setup. + * This is called at the beginning of each output pass. We determine which + * modules will be active during this pass and give them appropriate + * start_pass calls. We also set is_dummy_pass to indicate whether this + * is a "real" output pass or a dummy pass for color quantization. + * (In the latter case, jdapistd.c will crank the pass to completion.) + */ + +METHODDEF(void) +prepare_for_output_pass (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + if (master->pub.is_dummy_pass) { +#ifdef QUANT_2PASS_SUPPORTED + /* Final pass of 2-pass quantization */ + master->pub.is_dummy_pass = FALSE; + (*cinfo->cquantize->start_pass) (cinfo, FALSE); + (*cinfo->post->start_pass) (cinfo, JBUF_CRANK_DEST); + (*cinfo->main->start_pass) (cinfo, JBUF_CRANK_DEST); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif /* QUANT_2PASS_SUPPORTED */ + } else { + if (cinfo->quantize_colors && cinfo->colormap == NULL) { + /* Select new quantization method */ + if (cinfo->two_pass_quantize && cinfo->enable_2pass_quant) { + cinfo->cquantize = master->quantizer_2pass; + master->pub.is_dummy_pass = TRUE; + } else if (cinfo->enable_1pass_quant) { + cinfo->cquantize = master->quantizer_1pass; + } else { + ERREXIT(cinfo, JERR_MODE_CHANGE); + } + } + (*cinfo->idct->start_pass) (cinfo); + (*cinfo->coef->start_output_pass) (cinfo); + if (! cinfo->raw_data_out) { + if (! master->using_merged_upsample) + (*cinfo->cconvert->start_pass) (cinfo); + (*cinfo->upsample->start_pass) (cinfo); + if (cinfo->quantize_colors) + (*cinfo->cquantize->start_pass) (cinfo, master->pub.is_dummy_pass); + (*cinfo->post->start_pass) (cinfo, + (master->pub.is_dummy_pass ? JBUF_SAVE_AND_PASS : JBUF_PASS_THRU)); + (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU); + } + } + + /* Set up progress monitor's pass info if present */ + if (cinfo->progress != NULL) { + cinfo->progress->completed_passes = master->pass_number; + cinfo->progress->total_passes = master->pass_number + + (master->pub.is_dummy_pass ? 2 : 1); + /* In buffered-image mode, we assume one more output pass if EOI not + * yet reached, but no more passes if EOI has been reached. + */ + if (cinfo->buffered_image && ! cinfo->inputctl->eoi_reached) { + cinfo->progress->total_passes += (cinfo->enable_2pass_quant ? 2 : 1); + } + } +} + + +/* + * Finish up at end of an output pass. + */ + +METHODDEF(void) +finish_output_pass (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + if (cinfo->quantize_colors) + (*cinfo->cquantize->finish_pass) (cinfo); + master->pass_number++; +} + + +#ifdef D_MULTISCAN_FILES_SUPPORTED + +/* + * Switch to a new external colormap between output passes. + */ + +GLOBAL(void) +jpeg_new_colormap (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + /* Prevent application from calling me at wrong times */ + if (cinfo->global_state != DSTATE_BUFIMAGE) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + if (cinfo->quantize_colors && cinfo->enable_external_quant && + cinfo->colormap != NULL) { + /* Select 2-pass quantizer for external colormap use */ + cinfo->cquantize = master->quantizer_2pass; + /* Notify quantizer of colormap change */ + (*cinfo->cquantize->new_color_map) (cinfo); + master->pub.is_dummy_pass = FALSE; /* just in case */ + } else + ERREXIT(cinfo, JERR_MODE_CHANGE); +} + +#endif /* D_MULTISCAN_FILES_SUPPORTED */ + + +/* + * Initialize master decompression control and select active modules. + * This is performed at the start of jpeg_start_decompress. + */ + +GLOBAL(void) +jinit_master_decompress (j_decompress_ptr cinfo) +{ + my_master_ptr master; + + master = (my_master_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_decomp_master)); + cinfo->master = &master->pub; + master->pub.prepare_for_output_pass = prepare_for_output_pass; + master->pub.finish_output_pass = finish_output_pass; + + master->pub.is_dummy_pass = FALSE; + + master_selection(cinfo); +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdmerge.c b/widget/milsko/milskosrc/external/libjpeg/src/jdmerge.c new file mode 100644 index 0000000000..0d16821bed --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdmerge.c @@ -0,0 +1,437 @@ +/* + * jdmerge.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2013-2022 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains code for merged upsampling/color conversion. + * + * This file combines functions from jdsample.c and jdcolor.c; + * read those files first to understand what's going on. + * + * When the chroma components are to be upsampled by simple replication + * (ie, box filtering), we can save some work in color conversion by + * calculating all the output pixels corresponding to a pair of chroma + * samples at one time. In the conversion equations + * R = Y + K1 * Cr + * G = Y + K2 * Cb + K3 * Cr + * B = Y + K4 * Cb + * only the Y term varies among the group of pixels corresponding to a pair + * of chroma samples, so the rest of the terms can be calculated just once. + * At typical sampling ratios, this eliminates half or three-quarters + * of the multiplications needed for color conversion. + * + * This file currently provides implementations for the following cases: + * YCC => RGB color conversion only (YCbCr or BG_YCC). + * Sampling ratios of 2h1v or 2h2v. + * No scaling needed at upsample time. + * Corner-aligned (non-CCIR601) sampling alignment. + * Other special cases could be added, but in most applications these + * are the only common cases. (For uncommon cases we fall back on + * the more general code in jdsample.c and jdcolor.c.) + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +#ifdef UPSAMPLE_MERGING_SUPPORTED + + +#if RANGE_BITS < 2 + /* Deliberate syntax err */ + Sorry, this code requires 2 or more range extension bits. +#endif + + +/* Private subobject */ + +typedef struct { + struct jpeg_upsampler pub; /* public fields */ + + /* Pointer to routine to do actual upsampling/conversion of one row group */ + JMETHOD(void, upmethod, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, + JSAMPARRAY output_buf)); + + /* Private state for YCC->RGB conversion */ + int * Cr_r_tab; /* => table for Cr to R conversion */ + int * Cb_b_tab; /* => table for Cb to B conversion */ + INT32 * Cr_g_tab; /* => table for Cr to G conversion */ + INT32 * Cb_g_tab; /* => table for Cb to G conversion */ + + /* For 2:1 vertical sampling, we produce two output rows at a time. + * We need a "spare" row buffer to hold the second output row if the + * application provides just a one-row buffer; we also use the spare + * to discard the dummy last row if the image height is odd. + */ + JSAMPROW spare_row; + boolean spare_full; /* T if spare buffer is occupied */ + + JDIMENSION out_row_width; /* samples per output row */ + JDIMENSION rows_to_go; /* counts rows remaining in image */ +} my_upsampler; + +typedef my_upsampler * my_upsample_ptr; + +#define SCALEBITS 16 /* speediest right-shift on some machines */ +#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) +#define FIX(x) ((INT32) ((x) * (1L<RGB and BG_YCC->RGB colorspace conversion. + * This is taken directly from jdcolor.c; see that file for more info. + */ + +LOCAL(void) +build_ycc_rgb_table (j_decompress_ptr cinfo) +/* Normal case, sYCC */ +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + int i; + INT32 x; + SHIFT_TEMPS + + upsample->Cr_r_tab = (int *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); + upsample->Cb_b_tab = (int *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); + upsample->Cr_g_tab = (INT32 *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); + upsample->Cb_g_tab = (INT32 *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); + + for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { + /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ + /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ + /* Cr=>R value is nearest int to 1.402 * x */ + upsample->Cr_r_tab[i] = (int) DESCALE(FIX(1.402) * x, SCALEBITS); + /* Cb=>B value is nearest int to 1.772 * x */ + upsample->Cb_b_tab[i] = (int) DESCALE(FIX(1.772) * x, SCALEBITS); + /* Cr=>G value is scaled-up -0.714136286 * x */ + upsample->Cr_g_tab[i] = (- FIX(0.714136286)) * x; + /* Cb=>G value is scaled-up -0.344136286 * x */ + /* We also add in ONE_HALF so that need not do it in inner loop */ + upsample->Cb_g_tab[i] = (- FIX(0.344136286)) * x + ONE_HALF; + } +} + + +LOCAL(void) +build_bg_ycc_rgb_table (j_decompress_ptr cinfo) +/* Wide gamut case, bg-sYCC */ +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + int i; + INT32 x; + SHIFT_TEMPS + + upsample->Cr_r_tab = (int *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); + upsample->Cb_b_tab = (int *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(int)); + upsample->Cr_g_tab = (INT32 *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); + upsample->Cb_g_tab = (INT32 *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE+1) * SIZEOF(INT32)); + + for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { + /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ + /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ + /* Cr=>R value is nearest int to 2.804 * x */ + upsample->Cr_r_tab[i] = (int) DESCALE(FIX(2.804) * x, SCALEBITS); + /* Cb=>B value is nearest int to 3.544 * x */ + upsample->Cb_b_tab[i] = (int) DESCALE(FIX(3.544) * x, SCALEBITS); + /* Cr=>G value is scaled-up -1.428272572 * x */ + upsample->Cr_g_tab[i] = (- FIX(1.428272572)) * x; + /* Cb=>G value is scaled-up -0.688272572 * x */ + /* We also add in ONE_HALF so that need not do it in inner loop */ + upsample->Cb_g_tab[i] = (- FIX(0.688272572)) * x + ONE_HALF; + } +} + + +/* + * Initialize for an upsampling pass. + */ + +METHODDEF(void) +start_pass_merged_upsample (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + + /* Mark the spare buffer empty */ + upsample->spare_full = FALSE; + /* Initialize total-height counter for detecting bottom of image */ + upsample->rows_to_go = cinfo->output_height; +} + + +/* + * Control routine to do upsampling (and color conversion). + * + * The control routine just handles the row buffering considerations. + */ + +METHODDEF(void) +merged_2v_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +/* 2:1 vertical sampling case: may need a spare row. */ +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + JSAMPROW work_ptrs[2]; + JDIMENSION num_rows; /* number of rows returned to caller */ + + if (upsample->spare_full) { + /* If we have a spare row saved from a previous cycle, just return it. */ + jcopy_sample_rows(& upsample->spare_row, output_buf + *out_row_ctr, + 1, upsample->out_row_width); + num_rows = 1; + upsample->spare_full = FALSE; + } else { + /* Figure number of rows to return to caller. */ + num_rows = 2; + /* Not more than the distance to the end of the image. */ + if (num_rows > upsample->rows_to_go) + num_rows = upsample->rows_to_go; + /* And not more than what the client can accept: */ + out_rows_avail -= *out_row_ctr; + if (num_rows > out_rows_avail) + num_rows = out_rows_avail; + /* Create output pointer array for upsampler. */ + work_ptrs[0] = output_buf[*out_row_ctr]; + if (num_rows > 1) { + work_ptrs[1] = output_buf[*out_row_ctr + 1]; + } else { + work_ptrs[1] = upsample->spare_row; + upsample->spare_full = TRUE; + } + /* Now do the upsampling. */ + (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, work_ptrs); + } + + /* Adjust counts */ + *out_row_ctr += num_rows; + upsample->rows_to_go -= num_rows; + /* When the buffer is emptied, declare this input row group consumed */ + if (! upsample->spare_full) + (*in_row_group_ctr)++; +} + + +METHODDEF(void) +merged_1v_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +/* 1:1 vertical sampling case: much easier, never need a spare row. */ +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + + /* Just do the upsampling. */ + (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, + output_buf + *out_row_ctr); + /* Adjust counts */ + (*out_row_ctr)++; + (*in_row_group_ctr)++; +} + + +/* + * These are the routines invoked by the control routines to do + * the actual upsampling/conversion. One row group is processed per call. + * + * Note: since we may be writing directly into application-supplied buffers, + * we have to be honest about the output width; we can't assume the buffer + * has been rounded up to an even width. + */ + + +/* + * Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical. + */ + +METHODDEF(void) +h2v1_merged_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, + JSAMPARRAY output_buf) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + register int y, cred, cgreen, cblue; + int cb, cr; + register JSAMPROW outptr; + JSAMPROW inptr0, inptr1, inptr2; + JDIMENSION col; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + int * Crrtab = upsample->Cr_r_tab; + int * Cbbtab = upsample->Cb_b_tab; + INT32 * Crgtab = upsample->Cr_g_tab; + INT32 * Cbgtab = upsample->Cb_g_tab; + SHIFT_TEMPS + + inptr0 = input_buf[0][in_row_group_ctr]; + inptr1 = input_buf[1][in_row_group_ctr]; + inptr2 = input_buf[2][in_row_group_ctr]; + outptr = output_buf[0]; + /* Loop for each pair of output pixels */ + for (col = cinfo->output_width >> 1; col > 0; col--) { + /* Do the chroma part of the calculation */ + cb = GETJSAMPLE(*inptr1++); + cr = GETJSAMPLE(*inptr2++); + cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); + cblue = Cbbtab[cb]; + cred = Crrtab[cr]; + /* Fetch 2 Y values and emit 2 pixels */ + y = GETJSAMPLE(*inptr0++); + outptr[RGB_RED] = range_limit[y + cred]; + outptr[RGB_GREEN] = range_limit[y + cgreen]; + outptr[RGB_BLUE] = range_limit[y + cblue]; + outptr += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr0++); + outptr[RGB_RED] = range_limit[y + cred]; + outptr[RGB_GREEN] = range_limit[y + cgreen]; + outptr[RGB_BLUE] = range_limit[y + cblue]; + outptr += RGB_PIXELSIZE; + } + /* If image width is odd, do the last output column separately */ + if (cinfo->output_width & 1) { + y = GETJSAMPLE(*inptr0); + cb = GETJSAMPLE(*inptr1); + cr = GETJSAMPLE(*inptr2); + outptr[RGB_RED] = range_limit[y + Crrtab[cr]]; + outptr[RGB_GREEN] = range_limit[y + + ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], + SCALEBITS))]; + outptr[RGB_BLUE] = range_limit[y + Cbbtab[cb]]; + } +} + + +/* + * Upsample and color convert for the case of 2:1 horizontal and 2:1 vertical. + */ + +METHODDEF(void) +h2v2_merged_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, + JSAMPARRAY output_buf) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + register int y, cred, cgreen, cblue; + int cb, cr; + register JSAMPROW outptr0, outptr1; + JSAMPROW inptr00, inptr01, inptr1, inptr2; + JDIMENSION col; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + int * Crrtab = upsample->Cr_r_tab; + int * Cbbtab = upsample->Cb_b_tab; + INT32 * Crgtab = upsample->Cr_g_tab; + INT32 * Cbgtab = upsample->Cb_g_tab; + SHIFT_TEMPS + + inptr00 = input_buf[0][in_row_group_ctr*2]; + inptr01 = input_buf[0][in_row_group_ctr*2 + 1]; + inptr1 = input_buf[1][in_row_group_ctr]; + inptr2 = input_buf[2][in_row_group_ctr]; + outptr0 = output_buf[0]; + outptr1 = output_buf[1]; + /* Loop for each group of output pixels */ + for (col = cinfo->output_width >> 1; col > 0; col--) { + /* Do the chroma part of the calculation */ + cb = GETJSAMPLE(*inptr1++); + cr = GETJSAMPLE(*inptr2++); + cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); + cblue = Cbbtab[cb]; + cred = Crrtab[cr]; + /* Fetch 4 Y values and emit 4 pixels */ + y = GETJSAMPLE(*inptr00++); + outptr0[RGB_RED] = range_limit[y + cred]; + outptr0[RGB_GREEN] = range_limit[y + cgreen]; + outptr0[RGB_BLUE] = range_limit[y + cblue]; + outptr0 += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr00++); + outptr0[RGB_RED] = range_limit[y + cred]; + outptr0[RGB_GREEN] = range_limit[y + cgreen]; + outptr0[RGB_BLUE] = range_limit[y + cblue]; + outptr0 += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr01++); + outptr1[RGB_RED] = range_limit[y + cred]; + outptr1[RGB_GREEN] = range_limit[y + cgreen]; + outptr1[RGB_BLUE] = range_limit[y + cblue]; + outptr1 += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr01++); + outptr1[RGB_RED] = range_limit[y + cred]; + outptr1[RGB_GREEN] = range_limit[y + cgreen]; + outptr1[RGB_BLUE] = range_limit[y + cblue]; + outptr1 += RGB_PIXELSIZE; + } + /* If image width is odd, do the last output column separately */ + if (cinfo->output_width & 1) { + cb = GETJSAMPLE(*inptr1); + cr = GETJSAMPLE(*inptr2); + cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); + cblue = Cbbtab[cb]; + cred = Crrtab[cr]; + y = GETJSAMPLE(*inptr00); + outptr0[RGB_RED] = range_limit[y + cred]; + outptr0[RGB_GREEN] = range_limit[y + cgreen]; + outptr0[RGB_BLUE] = range_limit[y + cblue]; + y = GETJSAMPLE(*inptr01); + outptr1[RGB_RED] = range_limit[y + cred]; + outptr1[RGB_GREEN] = range_limit[y + cgreen]; + outptr1[RGB_BLUE] = range_limit[y + cblue]; + } +} + + +/* + * Module initialization routine for merged upsampling/color conversion. + * + * NB: this is called under the conditions determined by use_merged_upsample() + * in jdmaster.c. That routine MUST correspond to the actual capabilities + * of this module; no safety checks are made here. + */ + +GLOBAL(void) +jinit_merged_upsampler (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample; + + upsample = (my_upsample_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_upsampler)); + cinfo->upsample = &upsample->pub; + upsample->pub.start_pass = start_pass_merged_upsample; + upsample->pub.need_context_rows = FALSE; + + upsample->out_row_width = cinfo->output_width * cinfo->out_color_components; + + if (cinfo->max_v_samp_factor == 2) { + upsample->pub.upsample = merged_2v_upsample; + upsample->upmethod = h2v2_merged_upsample; + /* Allocate a spare row buffer */ + upsample->spare_row = (JSAMPROW) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (size_t) upsample->out_row_width * SIZEOF(JSAMPLE)); + } else { + upsample->pub.upsample = merged_1v_upsample; + upsample->upmethod = h2v1_merged_upsample; + /* No spare row needed */ + upsample->spare_row = NULL; + } + + if (cinfo->jpeg_color_space == JCS_BG_YCC) + build_bg_ycc_rgb_table(cinfo); + else + build_ycc_rgb_table(cinfo); +} + +#endif /* UPSAMPLE_MERGING_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdpostct.c b/widget/milsko/milskosrc/external/libjpeg/src/jdpostct.c new file mode 100644 index 0000000000..571563d728 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdpostct.c @@ -0,0 +1,290 @@ +/* + * jdpostct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the decompression postprocessing controller. + * This controller manages the upsampling, color conversion, and color + * quantization/reduction steps; specifically, it controls the buffering + * between upsample/color conversion and color quantization/reduction. + * + * If no color quantization/reduction is required, then this module has no + * work to do, and it just hands off to the upsample/color conversion code. + * An integrated upsample/convert/quantize process would replace this module + * entirely. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_d_post_controller pub; /* public fields */ + + /* Color quantization source buffer: this holds output data from + * the upsample/color conversion step to be passed to the quantizer. + * For two-pass color quantization, we need a full-image buffer; + * for one-pass operation, a strip buffer is sufficient. + */ + jvirt_sarray_ptr whole_image; /* virtual array, or NULL if one-pass */ + JSAMPARRAY buffer; /* strip buffer, or current strip of virtual */ + JDIMENSION strip_height; /* buffer size in rows */ + /* for two-pass mode only: */ + JDIMENSION starting_row; /* row # of first row in current strip */ + JDIMENSION next_row; /* index of next row to fill/empty in strip */ +} my_post_controller; + +typedef my_post_controller * my_post_ptr; + + +/* Forward declarations */ +METHODDEF(void) post_process_1pass + JPP((j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +#ifdef QUANT_2PASS_SUPPORTED +METHODDEF(void) post_process_prepass + JPP((j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +METHODDEF(void) post_process_2pass + JPP((j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +#endif + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_dpost (j_decompress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + + switch (pass_mode) { + case JBUF_PASS_THRU: + if (cinfo->quantize_colors) { + /* Single-pass processing with color quantization. */ + post->pub.post_process_data = post_process_1pass; + /* We could be doing buffered-image output before starting a 2-pass + * color quantization; in that case, jinit_d_post_controller did not + * allocate a strip buffer. Use the virtual-array buffer as workspace. + */ + if (post->buffer == NULL) { + post->buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, post->whole_image, + (JDIMENSION) 0, post->strip_height, TRUE); + } + } else { + /* For single-pass processing without color quantization, + * I have no work to do; just call the upsampler directly. + */ + post->pub.post_process_data = cinfo->upsample->upsample; + } + break; +#ifdef QUANT_2PASS_SUPPORTED + case JBUF_SAVE_AND_PASS: + /* First pass of 2-pass quantization */ + if (post->whole_image == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + post->pub.post_process_data = post_process_prepass; + break; + case JBUF_CRANK_DEST: + /* Second pass of 2-pass quantization */ + if (post->whole_image == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + post->pub.post_process_data = post_process_2pass; + break; +#endif /* QUANT_2PASS_SUPPORTED */ + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + break; + } + post->starting_row = post->next_row = 0; +} + + +/* + * Process some data in the one-pass (strip buffer) case. + * This is used for color precision reduction as well as one-pass quantization. + */ + +METHODDEF(void) +post_process_1pass (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION num_rows, max_rows; + + /* Fill the buffer, but not more than what we can dump out in one go. */ + /* Note we rely on the upsampler to detect bottom of image. */ + max_rows = out_rows_avail - *out_row_ctr; + if (max_rows > post->strip_height) + max_rows = post->strip_height; + num_rows = 0; + (*cinfo->upsample->upsample) (cinfo, + input_buf, in_row_group_ctr, in_row_groups_avail, + post->buffer, &num_rows, max_rows); + /* Quantize and emit data. */ + (*cinfo->cquantize->color_quantize) (cinfo, + post->buffer, output_buf + *out_row_ctr, (int) num_rows); + *out_row_ctr += num_rows; +} + + +#ifdef QUANT_2PASS_SUPPORTED + +/* + * Process some data in the first pass of 2-pass quantization. + */ + +METHODDEF(void) +post_process_prepass (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION old_next_row, num_rows; + + /* Reposition virtual buffer if at start of strip. */ + if (post->next_row == 0) { + post->buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, post->whole_image, + post->starting_row, post->strip_height, TRUE); + } + + /* Upsample some data (up to a strip height's worth). */ + old_next_row = post->next_row; + (*cinfo->upsample->upsample) (cinfo, + input_buf, in_row_group_ctr, in_row_groups_avail, + post->buffer, &post->next_row, post->strip_height); + + /* Allow quantizer to scan new data. No data is emitted, */ + /* but we advance out_row_ctr so outer loop can tell when we're done. */ + if (post->next_row > old_next_row) { + num_rows = post->next_row - old_next_row; + (*cinfo->cquantize->color_quantize) (cinfo, post->buffer + old_next_row, + (JSAMPARRAY) NULL, (int) num_rows); + *out_row_ctr += num_rows; + } + + /* Advance if we filled the strip. */ + if (post->next_row >= post->strip_height) { + post->starting_row += post->strip_height; + post->next_row = 0; + } +} + + +/* + * Process some data in the second pass of 2-pass quantization. + */ + +METHODDEF(void) +post_process_2pass (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION num_rows, max_rows; + + /* Reposition virtual buffer if at start of strip. */ + if (post->next_row == 0) { + post->buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, post->whole_image, + post->starting_row, post->strip_height, FALSE); + } + + /* Determine number of rows to emit. */ + num_rows = post->strip_height - post->next_row; /* available in strip */ + max_rows = out_rows_avail - *out_row_ctr; /* available in output area */ + if (num_rows > max_rows) + num_rows = max_rows; + /* We have to check bottom of image here, can't depend on upsampler. */ + max_rows = cinfo->output_height - post->starting_row; + if (num_rows > max_rows) + num_rows = max_rows; + + /* Quantize and emit data. */ + (*cinfo->cquantize->color_quantize) (cinfo, + post->buffer + post->next_row, output_buf + *out_row_ctr, + (int) num_rows); + *out_row_ctr += num_rows; + + /* Advance if we filled the strip. */ + post->next_row += num_rows; + if (post->next_row >= post->strip_height) { + post->starting_row += post->strip_height; + post->next_row = 0; + } +} + +#endif /* QUANT_2PASS_SUPPORTED */ + + +/* + * Initialize postprocessing controller. + */ + +GLOBAL(void) +jinit_d_post_controller (j_decompress_ptr cinfo, boolean need_full_buffer) +{ + my_post_ptr post; + + post = (my_post_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_post_controller)); + cinfo->post = (struct jpeg_d_post_controller *) post; + post->pub.start_pass = start_pass_dpost; + post->whole_image = NULL; /* flag for no virtual arrays */ + post->buffer = NULL; /* flag for no strip buffer */ + + /* Create the quantization buffer, if needed */ + if (cinfo->quantize_colors) { + /* The buffer strip height is max_v_samp_factor, which is typically + * an efficient number of rows for upsampling to return. + * (In the presence of output rescaling, we might want to be smarter?) + */ + post->strip_height = (JDIMENSION) cinfo->max_v_samp_factor; + if (need_full_buffer) { + /* Two-pass color quantization: need full-image storage. */ + /* We round up the number of rows to a multiple of the strip height. */ +#ifdef QUANT_2PASS_SUPPORTED + post->whole_image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + cinfo->output_width * cinfo->out_color_components, + (JDIMENSION) jround_up((long) cinfo->output_height, + (long) post->strip_height), + post->strip_height); +#else + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif /* QUANT_2PASS_SUPPORTED */ + } else { + /* One-pass color quantization: just make a strip buffer. */ + post->buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->output_width * cinfo->out_color_components, + post->strip_height); + } + } +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdsample.c b/widget/milsko/milskosrc/external/libjpeg/src/jdsample.c new file mode 100644 index 0000000000..15afeafe3d --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdsample.c @@ -0,0 +1,341 @@ +/* + * jdsample.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * Modified 2002-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains upsampling routines. + * + * Upsampling input data is counted in "row groups". A row group + * is defined to be (v_samp_factor * DCT_v_scaled_size / min_DCT_v_scaled_size) + * sample rows of each component. Upsampling will normally produce + * max_v_samp_factor pixel rows from each row group (but this could vary + * if the upsampler is applying a scale factor of its own). + * + * An excellent reference for image resampling is + * Digital Image Warping, George Wolberg, 1990. + * Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Pointer to routine to upsample a single component */ +typedef JMETHOD(void, upsample1_ptr, + (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPIMAGE output_data_ptr)); + +/* Private subobject */ + +typedef struct { + struct jpeg_upsampler pub; /* public fields */ + + /* Color conversion buffer. When using separate upsampling and color + * conversion steps, this buffer holds one upsampled row group until it + * has been color converted and output. + * Note: we do not allocate any storage for component(s) which are full-size, + * ie do not need rescaling. The corresponding entry of color_buf[] is + * simply set to point to the input data array, thereby avoiding copying. + */ + JSAMPARRAY color_buf[MAX_COMPONENTS]; + + /* Per-component upsampling method pointers */ + upsample1_ptr methods[MAX_COMPONENTS]; + + int next_row_out; /* counts rows emitted from color_buf */ + JDIMENSION rows_to_go; /* counts rows remaining in image */ + + /* Height of an input row group for each component. */ + int rowgroup_height[MAX_COMPONENTS]; + + /* These arrays save pixel expansion factors so that int_expand need not + * recompute them each time. They are unused for other upsampling methods. + */ + UINT8 h_expand[MAX_COMPONENTS]; + UINT8 v_expand[MAX_COMPONENTS]; +} my_upsampler; + +typedef my_upsampler * my_upsample_ptr; + + +/* + * Initialize for an upsampling pass. + */ + +METHODDEF(void) +start_pass_upsample (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + + /* Mark the conversion buffer empty */ + upsample->next_row_out = cinfo->max_v_samp_factor; + /* Initialize total-height counter for detecting bottom of image */ + upsample->rows_to_go = cinfo->output_height; +} + + +/* + * Control routine to do upsampling (and color conversion). + * + * In this version we upsample each component independently. + * We upsample one row group into the conversion buffer, then apply + * color conversion a row at a time. + */ + +METHODDEF(void) +sep_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + int ci; + jpeg_component_info * compptr; + JDIMENSION num_rows; + + /* Fill the conversion buffer, if it's empty */ + if (upsample->next_row_out >= cinfo->max_v_samp_factor) { + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Don't bother to upsample an uninteresting component. */ + if (! compptr->component_needed) + continue; + /* Invoke per-component upsample method. Notice we pass a POINTER + * to color_buf[ci], so that fullsize_upsample can change it. + */ + (*upsample->methods[ci]) (cinfo, compptr, + input_buf[ci] + (*in_row_group_ctr * upsample->rowgroup_height[ci]), + upsample->color_buf + ci); + } + upsample->next_row_out = 0; + } + + /* Color-convert and emit rows */ + + /* How many we have in the buffer: */ + num_rows = (JDIMENSION) (cinfo->max_v_samp_factor - upsample->next_row_out); + /* Not more than the distance to the end of the image. Need this test + * in case the image height is not a multiple of max_v_samp_factor: + */ + if (num_rows > upsample->rows_to_go) + num_rows = upsample->rows_to_go; + /* And not more than what the client can accept: */ + out_rows_avail -= *out_row_ctr; + if (num_rows > out_rows_avail) + num_rows = out_rows_avail; + + (*cinfo->cconvert->color_convert) (cinfo, upsample->color_buf, + (JDIMENSION) upsample->next_row_out, + output_buf + *out_row_ctr, + (int) num_rows); + + /* Adjust counts */ + *out_row_ctr += num_rows; + upsample->rows_to_go -= num_rows; + upsample->next_row_out += num_rows; + /* When the buffer is emptied, declare this input row group consumed */ + if (upsample->next_row_out >= cinfo->max_v_samp_factor) + (*in_row_group_ctr)++; +} + + +/* + * These are the routines invoked by sep_upsample to upsample pixel values + * of a single component. One row group is processed per call. + */ + + +/* + * For full-size components, we just make color_buf[ci] point at the + * input buffer, and thus avoid copying any data. Note that this is + * safe only because sep_upsample doesn't declare the input row group + * "consumed" until we are done color converting and emitting it. + */ + +METHODDEF(void) +fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPIMAGE output_data_ptr) +{ + *output_data_ptr = input_data; +} + + +/* + * This version handles any integral sampling ratios. + * This is not used for typical JPEG files, so it need not be fast. + * Nor, for that matter, is it particularly accurate: the algorithm is + * simple replication of the input pixel onto the corresponding output + * pixels. The hi-falutin sampling literature refers to this as a + * "box filter". A box filter tends to introduce visible artifacts, + * so if you are actually going to use 3:1 or 4:1 sampling ratios + * you would be well advised to improve this code. + */ + +METHODDEF(void) +int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPIMAGE output_data_ptr) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + JSAMPARRAY output_data, output_end; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; + register int h; + JSAMPROW outend; + int h_expand, v_expand; + + h_expand = upsample->h_expand[compptr->component_index]; + v_expand = upsample->v_expand[compptr->component_index]; + + output_data = *output_data_ptr; + output_end = output_data + cinfo->max_v_samp_factor; + for (; output_data < output_end; output_data += v_expand) { + /* Generate one output row with proper horizontal expansion */ + inptr = *input_data++; + outptr = *output_data; + outend = outptr + cinfo->output_width; + while (outptr < outend) { + invalue = *inptr++; /* don't need GETJSAMPLE() here */ + for (h = h_expand; h > 0; h--) { + *outptr++ = invalue; + } + } + /* Generate any additional output rows by duplicating the first one */ + if (v_expand > 1) { + jcopy_sample_rows(output_data, output_data + 1, + v_expand - 1, cinfo->output_width); + } + } +} + + +/* + * Fast processing for the common case of 2:1 horizontal and 1:1 vertical. + * It's still a box filter. + */ + +METHODDEF(void) +h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPIMAGE output_data_ptr) +{ + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; + JSAMPROW outend; + int outrow; + + for (outrow = 0; outrow < cinfo->max_v_samp_factor; outrow++) { + inptr = input_data[outrow]; + outptr = output_data[outrow]; + outend = outptr + cinfo->output_width; + while (outptr < outend) { + invalue = *inptr++; /* don't need GETJSAMPLE() here */ + *outptr++ = invalue; + *outptr++ = invalue; + } + } +} + + +/* + * Fast processing for the common case of 2:1 horizontal and 2:1 vertical. + * It's still a box filter. + */ + +METHODDEF(void) +h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPIMAGE output_data_ptr) +{ + JSAMPARRAY output_data, output_end; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; + JSAMPROW outend; + + output_data = *output_data_ptr; + output_end = output_data + cinfo->max_v_samp_factor; + for (; output_data < output_end; output_data += 2) { + inptr = *input_data++; + outptr = *output_data; + outend = outptr + cinfo->output_width; + while (outptr < outend) { + invalue = *inptr++; /* don't need GETJSAMPLE() here */ + *outptr++ = invalue; + *outptr++ = invalue; + } + jcopy_sample_rows(output_data, output_data + 1, + 1, cinfo->output_width); + } +} + + +/* + * Module initialization routine for upsampling. + */ + +GLOBAL(void) +jinit_upsampler (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample; + int ci; + jpeg_component_info * compptr; + int h_in_group, v_in_group, h_out_group, v_out_group; + + upsample = (my_upsample_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_upsampler)); + cinfo->upsample = &upsample->pub; + upsample->pub.start_pass = start_pass_upsample; + upsample->pub.upsample = sep_upsample; + upsample->pub.need_context_rows = FALSE; /* until we find out differently */ + + if (cinfo->CCIR601_sampling) /* this isn't supported */ + ERREXIT(cinfo, JERR_CCIR601_NOTIMPL); + + /* Verify we can handle the sampling factors, select per-component methods, + * and create storage as needed. + */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Don't bother to upsample an uninteresting component. */ + if (! compptr->component_needed) + continue; + /* Compute size of an "input group" after IDCT scaling. This many samples + * are to be converted to max_h_samp_factor * max_v_samp_factor pixels. + */ + h_in_group = (compptr->h_samp_factor * compptr->DCT_h_scaled_size) / + cinfo->min_DCT_h_scaled_size; + v_in_group = (compptr->v_samp_factor * compptr->DCT_v_scaled_size) / + cinfo->min_DCT_v_scaled_size; + h_out_group = cinfo->max_h_samp_factor; + v_out_group = cinfo->max_v_samp_factor; + upsample->rowgroup_height[ci] = v_in_group; /* save for use later */ + if (h_in_group == h_out_group && v_in_group == v_out_group) { + /* Fullsize components can be processed without any work. */ + upsample->methods[ci] = fullsize_upsample; + continue; /* don't need to allocate buffer */ + } + if (h_in_group * 2 == h_out_group && v_in_group == v_out_group) { + /* Special case for 2h1v upsampling */ + upsample->methods[ci] = h2v1_upsample; + } else if (h_in_group * 2 == h_out_group && + v_in_group * 2 == v_out_group) { + /* Special case for 2h2v upsampling */ + upsample->methods[ci] = h2v2_upsample; + } else if ((h_out_group % h_in_group) == 0 && + (v_out_group % v_in_group) == 0) { + /* Generic integral-factors upsampling method */ + upsample->methods[ci] = int_upsample; + upsample->h_expand[ci] = (UINT8) (h_out_group / h_in_group); + upsample->v_expand[ci] = (UINT8) (v_out_group / v_in_group); + } else + ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL); + upsample->color_buf[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) jround_up((long) cinfo->output_width, + (long) cinfo->max_h_samp_factor), + (JDIMENSION) cinfo->max_v_samp_factor); + } +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jdtrans.c b/widget/milsko/milskosrc/external/libjpeg/src/jdtrans.c new file mode 100644 index 0000000000..22dd47fb5c --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jdtrans.c @@ -0,0 +1,140 @@ +/* + * jdtrans.c + * + * Copyright (C) 1995-1997, Thomas G. Lane. + * Modified 2000-2009 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains library routines for transcoding decompression, + * that is, reading raw DCT coefficient arrays from an input JPEG file. + * The routines in jdapimin.c will also be needed by a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Forward declarations */ +LOCAL(void) transdecode_master_selection JPP((j_decompress_ptr cinfo)); + + +/* + * Read the coefficient arrays from a JPEG file. + * jpeg_read_header must be completed before calling this. + * + * The entire image is read into a set of virtual coefficient-block arrays, + * one per component. The return value is a pointer to the array of + * virtual-array descriptors. These can be manipulated directly via the + * JPEG memory manager, or handed off to jpeg_write_coefficients(). + * To release the memory occupied by the virtual arrays, call + * jpeg_finish_decompress() when done with the data. + * + * An alternative usage is to simply obtain access to the coefficient arrays + * during a buffered-image-mode decompression operation. This is allowed + * after any jpeg_finish_output() call. The arrays can be accessed until + * jpeg_finish_decompress() is called. (Note that any call to the library + * may reposition the arrays, so don't rely on access_virt_barray() results + * to stay valid across library calls.) + * + * Returns NULL if suspended. This case need be checked only if + * a suspending data source is used. + */ + +GLOBAL(jvirt_barray_ptr *) +jpeg_read_coefficients (j_decompress_ptr cinfo) +{ + if (cinfo->global_state == DSTATE_READY) { + /* First call: initialize active modules */ + transdecode_master_selection(cinfo); + cinfo->global_state = DSTATE_RDCOEFS; + } + if (cinfo->global_state == DSTATE_RDCOEFS) { + /* Absorb whole file into the coef buffer */ + for (;;) { + int retcode; + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + /* Absorb some more input */ + retcode = (*cinfo->inputctl->consume_input) (cinfo); + if (retcode == JPEG_SUSPENDED) + return NULL; + if (retcode == JPEG_REACHED_EOI) + break; + /* Advance progress counter if appropriate */ + if (cinfo->progress != NULL && + (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) { + if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { + /* startup underestimated number of scans; ratchet up one scan */ + cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; + } + } + } + /* Set state so that jpeg_finish_decompress does the right thing */ + cinfo->global_state = DSTATE_STOPPING; + } + /* At this point we should be in state DSTATE_STOPPING if being used + * standalone, or in state DSTATE_BUFIMAGE if being invoked to get access + * to the coefficients during a full buffered-image-mode decompression. + */ + if ((cinfo->global_state == DSTATE_STOPPING || + cinfo->global_state == DSTATE_BUFIMAGE) && cinfo->buffered_image) { + return cinfo->coef->coef_arrays; + } + /* Oops, improper usage */ + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + return NULL; /* keep compiler happy */ +} + + +/* + * Master selection of decompression modules for transcoding. + * This substitutes for jdmaster.c's initialization of the full decompressor. + */ + +LOCAL(void) +transdecode_master_selection (j_decompress_ptr cinfo) +{ + /* This is effectively a buffered-image operation. */ + cinfo->buffered_image = TRUE; + + /* Compute output image dimensions and related values. */ + jpeg_core_output_dimensions(cinfo); + + /* Entropy decoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) + jinit_arith_decoder(cinfo); + else { + jinit_huff_decoder(cinfo); + } + + /* Always get a full-image coefficient buffer. */ + jinit_d_coef_controller(cinfo, TRUE); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Initialize input side of decompressor to consume first scan. */ + (*cinfo->inputctl->start_input_pass) (cinfo); + + /* Initialize progress monitoring. */ + if (cinfo->progress != NULL) { + int nscans; + /* Estimate number of scans to set pass_limit. */ + if (cinfo->progressive_mode) { + /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */ + nscans = 2 + 3 * cinfo->num_components; + } else if (cinfo->inputctl->has_multiple_scans) { + /* For a nonprogressive multiscan file, estimate 1 scan per component. */ + nscans = cinfo->num_components; + } else { + nscans = 1; + } + cinfo->progress->pass_counter = 0L; + cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; + cinfo->progress->completed_passes = 0; + cinfo->progress->total_passes = 1; + } +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jerror.c b/widget/milsko/milskosrc/external/libjpeg/src/jerror.c new file mode 100644 index 0000000000..7163af699c --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jerror.c @@ -0,0 +1,253 @@ +/* + * jerror.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * Modified 2012-2015 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains simple error-reporting and trace-message routines. + * These are suitable for Unix-like systems and others where writing to + * stderr is the right thing to do. Many applications will want to replace + * some or all of these routines. + * + * If you define USE_WINDOWS_MESSAGEBOX in jconfig.h or in the makefile, + * you get a Windows-specific hack to display error messages in a dialog box. + * It ain't much, but it beats dropping error messages into the bit bucket, + * which is what happens to output to stderr under most Windows C compilers. + * + * These routines are used by both the compression and decompression code. + */ + +#ifdef USE_WINDOWS_MESSAGEBOX +#include +#endif + +/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jversion.h" +#include "jerror.h" + +#ifndef EXIT_FAILURE /* define exit() codes if not provided */ +#define EXIT_FAILURE 1 +#endif + + +/* + * Create the message string table. + * We do this from the master message list in jerror.h by re-reading + * jerror.h with a suitable definition for macro JMESSAGE. + * The message table is made an external symbol just in case any applications + * want to refer to it directly. + */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_std_message_table jMsgTable +#endif + +#define JMESSAGE(code,string) string , + +const char * const jpeg_std_message_table[] = { +#include "jerror.h" + NULL +}; + + +/* + * Error exit handler: must not return to caller. + * + * Applications may override this if they want to get control back after + * an error. Typically one would longjmp somewhere instead of exiting. + * The setjmp buffer can be made a private field within an expanded error + * handler object. Note that the info needed to generate an error message + * is stored in the error object, so you can generate the message now or + * later, at your convenience. + * You should make sure that the JPEG object is cleaned up (with jpeg_abort + * or jpeg_destroy) at some point. + */ + +METHODDEF(noreturn_t) +error_exit (j_common_ptr cinfo) +{ + /* Always display the message */ + (*cinfo->err->output_message) (cinfo); + + /* Let the memory manager delete any temp files before we die */ + jpeg_destroy(cinfo); + + exit(EXIT_FAILURE); +} + + +/* + * Actual output of an error or trace message. + * Applications may override this method to send JPEG messages somewhere + * other than stderr. + * + * On Windows, printing to stderr is generally completely useless, + * so we provide optional code to produce an error-dialog popup. + * Most Windows applications will still prefer to override this routine, + * but if they don't, it'll do something at least marginally useful. + * + * NOTE: to use the library in an environment that doesn't support the + * C stdio library, you may have to delete the call to fprintf() entirely, + * not just not use this routine. + */ + +METHODDEF(void) +output_message (j_common_ptr cinfo) +{ + char buffer[JMSG_LENGTH_MAX]; + + /* Create the message */ + (*cinfo->err->format_message) (cinfo, buffer); + +#ifdef USE_WINDOWS_MESSAGEBOX + /* Display it in a message dialog box */ + MessageBox(GetActiveWindow(), buffer, "JPEG Library Error", + MB_OK | MB_ICONERROR); +#else + /* Send it to stderr, adding a newline */ + fprintf(stderr, "%s\n", buffer); +#endif +} + + +/* + * Decide whether to emit a trace or warning message. + * msg_level is one of: + * -1: recoverable corrupt-data warning, may want to abort. + * 0: important advisory messages (always display to user). + * 1: first level of tracing detail. + * 2,3,...: successively more detailed tracing messages. + * An application might override this method if it wanted to abort on warnings + * or change the policy about which messages to display. + */ + +METHODDEF(void) +emit_message (j_common_ptr cinfo, int msg_level) +{ + struct jpeg_error_mgr * err = cinfo->err; + + if (msg_level < 0) { + /* It's a warning message. Since corrupt files may generate many warnings, + * the policy implemented here is to show only the first warning, + * unless trace_level >= 3. + */ + if (err->num_warnings == 0 || err->trace_level >= 3) + (*err->output_message) (cinfo); + /* Always count warnings in num_warnings. */ + err->num_warnings++; + } else { + /* It's a trace message. Show it if trace_level >= msg_level. */ + if (err->trace_level >= msg_level) + (*err->output_message) (cinfo); + } +} + + +/* + * Format a message string for the most recent JPEG error or message. + * The message is stored into buffer, which should be at least JMSG_LENGTH_MAX + * characters. Note that no '\n' character is added to the string. + * Few applications should need to override this method. + */ + +METHODDEF(void) +format_message (j_common_ptr cinfo, char * buffer) +{ + struct jpeg_error_mgr * err = cinfo->err; + int msg_code = err->msg_code; + const char * msgtext = NULL; + const char * msgptr; + char ch; + boolean isstring; + + /* Look up message string in proper table */ + if (msg_code > 0 && msg_code <= err->last_jpeg_message) { + msgtext = err->jpeg_message_table[msg_code]; + } else if (err->addon_message_table != NULL && + msg_code >= err->first_addon_message && + msg_code <= err->last_addon_message) { + msgtext = err->addon_message_table[msg_code - err->first_addon_message]; + } + + /* Defend against bogus message number */ + if (msgtext == NULL) { + err->msg_parm.i[0] = msg_code; + msgtext = err->jpeg_message_table[0]; + } + + /* Check for string parameter, as indicated by %s in the message text */ + isstring = FALSE; + msgptr = msgtext; + while ((ch = *msgptr++) != '\0') { + if (ch == '%') { + if (*msgptr == 's') isstring = TRUE; + break; + } + } + + /* Format the message into the passed buffer */ + if (isstring) + sprintf(buffer, msgtext, err->msg_parm.s); + else + sprintf(buffer, msgtext, + err->msg_parm.i[0], err->msg_parm.i[1], + err->msg_parm.i[2], err->msg_parm.i[3], + err->msg_parm.i[4], err->msg_parm.i[5], + err->msg_parm.i[6], err->msg_parm.i[7]); +} + + +/* + * Reset error state variables at start of a new image. + * This is called during compression startup to reset trace/error + * processing to default state, without losing any application-specific + * method pointers. An application might possibly want to override + * this method if it has additional error processing state. + */ + +METHODDEF(void) +reset_error_mgr (j_common_ptr cinfo) +{ + cinfo->err->num_warnings = 0; + /* trace_level is not reset since it is an application-supplied parameter */ + cinfo->err->msg_code = 0; /* may be useful as a flag for "no error" */ +} + + +/* + * Fill in the standard error-handling methods in a jpeg_error_mgr object. + * Typical call is: + * struct jpeg_compress_struct cinfo; + * struct jpeg_error_mgr err; + * + * cinfo.err = jpeg_std_error(&err); + * after which the application may override some of the methods. + */ + +GLOBAL(struct jpeg_error_mgr *) +jpeg_std_error (struct jpeg_error_mgr * err) +{ + err->error_exit = error_exit; + err->emit_message = emit_message; + err->output_message = output_message; + err->format_message = format_message; + err->reset_error_mgr = reset_error_mgr; + + err->trace_level = 0; /* default = no tracing */ + err->num_warnings = 0; /* no warnings emitted yet */ + err->msg_code = 0; /* may be useful as a flag for "no error" */ + + /* Initialize message table pointers */ + err->jpeg_message_table = jpeg_std_message_table; + err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1; + + err->addon_message_table = NULL; + err->first_addon_message = 0; /* for safety */ + err->last_addon_message = 0; + + return err; +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jfdctflt.c b/widget/milsko/milskosrc/external/libjpeg/src/jfdctflt.c new file mode 100644 index 0000000000..013f29e0ca --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jfdctflt.c @@ -0,0 +1,176 @@ +/* + * jfdctflt.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2003-2017 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a floating-point implementation of the + * forward DCT (Discrete Cosine Transform). + * + * This implementation should be more accurate than either of the integer + * DCT implementations. However, it may not give the same results on all + * machines because of differences in roundoff behavior. Speed will depend + * on the hardware's floating point capacity. + * + * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT + * on each column. Direct algorithms are also available, but they are + * much more complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with a fixed-point + * implementation, accuracy is lost due to imprecise representation of the + * scaled quantization values. However, that problem does not arise if + * we use floating point arithmetic. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_FLOAT_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCT blocks. /* deliberate syntax err */ +#endif + + +/* + * Perform the forward DCT on one block of samples. + * + * cK represents cos(K*pi/16). + */ + +GLOBAL(void) +jpeg_fdct_float (FAST_FLOAT * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + FAST_FLOAT tmp10, tmp11, tmp12, tmp13; + FAST_FLOAT z1, z2, z3, z4, z5, z11, z13; + FAST_FLOAT *dataptr; + JSAMPROW elemptr; + int ctr; + + /* Pass 1: process rows. */ + + dataptr = data; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Load data into workspace */ + tmp0 = (FAST_FLOAT) (GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[7])); + tmp7 = (FAST_FLOAT) (GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[7])); + tmp1 = (FAST_FLOAT) (GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[6])); + tmp6 = (FAST_FLOAT) (GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[6])); + tmp2 = (FAST_FLOAT) (GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[5])); + tmp5 = (FAST_FLOAT) (GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[5])); + tmp3 = (FAST_FLOAT) (GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[4])); + tmp4 = (FAST_FLOAT) (GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[4])); + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + /* Apply unsigned->signed conversion. */ + dataptr[0] = tmp10 + tmp11 - 8 * CENTERJSAMPLE; /* phase 3 */ + dataptr[4] = tmp10 - tmp11; + + z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */ + dataptr[2] = tmp13 + z1; /* phase 5 */ + dataptr[6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */ + z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */ + z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */ + z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[5] = z13 + z2; /* phase 6 */ + dataptr[3] = z13 - z2; + dataptr[1] = z11 + z4; + dataptr[7] = z11 - z4; + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; + tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; + tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; + tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */ + dataptr[DCTSIZE*4] = tmp10 - tmp11; + + z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */ + dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */ + dataptr[DCTSIZE*6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */ + z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */ + z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */ + z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */ + dataptr[DCTSIZE*3] = z13 - z2; + dataptr[DCTSIZE*1] = z11 + z4; + dataptr[DCTSIZE*7] = z11 - z4; + + dataptr++; /* advance pointer to next column */ + } +} + +#endif /* DCT_FLOAT_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jfdctfst.c b/widget/milsko/milskosrc/external/libjpeg/src/jfdctfst.c new file mode 100644 index 0000000000..5e4e017225 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jfdctfst.c @@ -0,0 +1,232 @@ +/* + * jfdctfst.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2003-2017 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a fast, not so accurate integer implementation of the + * forward DCT (Discrete Cosine Transform). + * + * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT + * on each column. Direct algorithms are also available, but they are + * much more complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with fixed-point math, + * accuracy is lost due to imprecise representation of the scaled + * quantization values. The smaller the quantization table entry, the less + * precise the scaled value, so this implementation does worse with high- + * quality-setting files than with low-quality ones. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_IFAST_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCT blocks. /* deliberate syntax err */ +#endif + + +/* Scaling decisions are generally the same as in the LL&M algorithm; + * see jfdctint.c for more details. However, we choose to descale + * (right shift) multiplication products as soon as they are formed, + * rather than carrying additional fractional bits into subsequent additions. + * This compromises accuracy slightly, but it lets us save a few shifts. + * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples) + * everywhere except in the multiplications proper; this saves a good deal + * of work on 16-bit-int machines. + * + * Again to save a few shifts, the intermediate results between pass 1 and + * pass 2 are not upscaled, but are represented only to integral precision. + * + * A final compromise is to represent the multiplicative constants to only + * 8 fractional bits, rather than 13. This saves some shifting work on some + * machines, and may also reduce the cost of multiplication (since there + * are fewer one-bits in the constants). + */ + +#define CONST_BITS 8 + + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 8 +#define FIX_0_382683433 ((INT32) 98) /* FIX(0.382683433) */ +#define FIX_0_541196100 ((INT32) 139) /* FIX(0.541196100) */ +#define FIX_0_707106781 ((INT32) 181) /* FIX(0.707106781) */ +#define FIX_1_306562965 ((INT32) 334) /* FIX(1.306562965) */ +#else +#define FIX_0_382683433 FIX(0.382683433) +#define FIX_0_541196100 FIX(0.541196100) +#define FIX_0_707106781 FIX(0.707106781) +#define FIX_1_306562965 FIX(1.306562965) +#endif + + +/* We can gain a little more speed, with a further compromise in accuracy, + * by omitting the addition in a descaling shift. This yields an incorrectly + * rounded result half the time... + */ + +#ifndef USE_ACCURATE_ROUNDING +#undef DESCALE +#define DESCALE(x,n) RIGHT_SHIFT(x, n) +#endif + + +/* Multiply a DCTELEM variable by an INT32 constant, and immediately + * descale to yield a DCTELEM result. + */ + +#define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS)) + + +/* + * Perform the forward DCT on one block of samples. + * + * cK represents cos(K*pi/16). + */ + +GLOBAL(void) +jpeg_fdct_ifast (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + DCTELEM tmp10, tmp11, tmp12, tmp13; + DCTELEM z1, z2, z3, z4, z5, z11, z13; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. */ + + dataptr = data; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Load data into workspace */ + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[7]); + tmp7 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[7]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[6]); + tmp6 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[6]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[5]); + tmp5 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[5]); + tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[4]); + tmp4 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[4]); + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + /* Apply unsigned->signed conversion. */ + dataptr[0] = tmp10 + tmp11 - 8 * CENTERJSAMPLE; /* phase 3 */ + dataptr[4] = tmp10 - tmp11; + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */ + dataptr[2] = tmp13 + z1; /* phase 5 */ + dataptr[6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */ + z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */ + z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */ + z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[5] = z13 + z2; /* phase 6 */ + dataptr[3] = z13 - z2; + dataptr[1] = z11 + z4; + dataptr[7] = z11 - z4; + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; + tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; + tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; + tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */ + dataptr[DCTSIZE*4] = tmp10 - tmp11; + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */ + dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */ + dataptr[DCTSIZE*6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */ + z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */ + z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */ + z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */ + dataptr[DCTSIZE*3] = z13 - z2; + dataptr[DCTSIZE*1] = z11 + z4; + dataptr[DCTSIZE*7] = z11 - z4; + + dataptr++; /* advance pointer to next column */ + } +} + +#endif /* DCT_IFAST_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jfdctint.c b/widget/milsko/milskosrc/external/libjpeg/src/jfdctint.c new file mode 100644 index 0000000000..05df4750bb --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jfdctint.c @@ -0,0 +1,4415 @@ +/* + * jfdctint.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * Modification developed 2003-2018 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a slow-but-accurate integer implementation of the + * forward DCT (Discrete Cosine Transform). + * + * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT + * on each column. Direct algorithms are also available, but they are + * much more complex and seem not to be any faster when reduced to code. + * + * This implementation is based on an algorithm described in + * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT + * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics, + * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991. + * The primary algorithm described there uses 11 multiplies and 29 adds. + * We use their alternate method with 12 multiplies and 32 adds. + * The advantage of this method is that no data path contains more than one + * multiplication; this allows a very simple and accurate implementation in + * scaled fixed-point arithmetic, with a minimal number of shifts. + * + * We also provide FDCT routines with various input sample block sizes for + * direct resolution reduction or enlargement and for direct resolving the + * common 2x1 and 1x2 subsampling cases without additional resampling: NxN + * (N=1...16), 2NxN, and Nx2N (N=1...8) pixels for one 8x8 output DCT block. + * + * For N<8 we fill the remaining block coefficients with zero. + * For N>8 we apply a partial N-point FDCT on the input samples, computing + * just the lower 8 frequency coefficients and discarding the rest. + * + * We must scale the output coefficients of the N-point FDCT appropriately + * to the standard 8-point FDCT level by 8/N per 1-D pass. This scaling + * is folded into the constant multipliers (pass 2) and/or final/initial + * shifting. + * + * CAUTION: We rely on the FIX() macro except for the N=1,2,4,8 cases + * since there would be too many additional constants to pre-calculate. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_ISLOW_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCT blocks. /* deliberate syntax err */ +#endif + + +/* + * The poop on this scaling stuff is as follows: + * + * Each 1-D DCT step produces outputs which are a factor of sqrt(N) + * larger than the true DCT outputs. The final outputs are therefore + * a factor of N larger than desired; since N=8 this can be cured by + * a simple right shift at the end of the algorithm. The advantage of + * this arrangement is that we save two multiplications per 1-D DCT, + * because the y0 and y4 outputs need not be divided by sqrt(N). + * In the IJG code, this factor of 8 is removed by the quantization step + * (in jcdctmgr.c), NOT in this module. + * + * We have to do addition and subtraction of the integer inputs, which + * is no problem, and multiplication by fractional constants, which is + * a problem to do in integer arithmetic. We multiply all the constants + * by CONST_SCALE and convert them to integer constants (thus retaining + * CONST_BITS bits of precision in the constants). After doing a + * multiplication we have to divide the product by CONST_SCALE, with proper + * rounding, to produce the correct output. This division can be done + * cheaply as a right shift of CONST_BITS bits. We postpone shifting + * as long as possible so that partial sums can be added together with + * full fractional precision. + * + * The outputs of the first pass are scaled up by PASS1_BITS bits so that + * they are represented to better-than-integral precision. These outputs + * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word + * with the recommended scaling. (For 12-bit sample data, the intermediate + * array is INT32 anyway.) + * + * To avoid overflow of the 32-bit intermediate results in pass 2, we must + * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis + * shows that the values given below are the most effective. + */ + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 13 +#define PASS1_BITS 2 +#else +#define CONST_BITS 13 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 13 +#define FIX_0_298631336 ((INT32) 2446) /* FIX(0.298631336) */ +#define FIX_0_390180644 ((INT32) 3196) /* FIX(0.390180644) */ +#define FIX_0_541196100 ((INT32) 4433) /* FIX(0.541196100) */ +#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */ +#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */ +#define FIX_1_175875602 ((INT32) 9633) /* FIX(1.175875602) */ +#define FIX_1_501321110 ((INT32) 12299) /* FIX(1.501321110) */ +#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */ +#define FIX_1_961570560 ((INT32) 16069) /* FIX(1.961570560) */ +#define FIX_2_053119869 ((INT32) 16819) /* FIX(2.053119869) */ +#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */ +#define FIX_3_072711026 ((INT32) 25172) /* FIX(3.072711026) */ +#else +#define FIX_0_298631336 FIX(0.298631336) +#define FIX_0_390180644 FIX(0.390180644) +#define FIX_0_541196100 FIX(0.541196100) +#define FIX_0_765366865 FIX(0.765366865) +#define FIX_0_899976223 FIX(0.899976223) +#define FIX_1_175875602 FIX(1.175875602) +#define FIX_1_501321110 FIX(1.501321110) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_1_961570560 FIX(1.961570560) +#define FIX_2_053119869 FIX(2.053119869) +#define FIX_2_562915447 FIX(2.562915447) +#define FIX_3_072711026 FIX(3.072711026) +#endif + + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * For 8-bit samples with the recommended scaling, all the variable + * and constant values involved are no more than 16 bits wide, so a + * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. + * For 12-bit samples, a full 32-bit multiplication will be needed. + */ + +#if BITS_IN_JSAMPLE == 8 +#define MULTIPLY(var,const) MULTIPLY16C16(var,const) +#else +#define MULTIPLY(var,const) ((var) * (const)) +#endif + + +/* + * Perform the forward DCT on one block of samples. + */ + +GLOBAL(void) +jpeg_fdct_islow (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3; + INT32 tmp10, tmp11, tmp12, tmp13; + INT32 z1; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * cK represents sqrt(2) * cos(K*pi/16). + */ + + dataptr = data; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Even part per LL&M figure 1 --- note that published figure is faulty; + * rotator "c1" should be "c6". + */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[7]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[6]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[5]); + tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[4]); + + tmp10 = tmp0 + tmp3; + tmp12 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp13 = tmp1 - tmp2; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[7]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[6]); + tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[5]); + tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[4]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) ((tmp10 + tmp11 - 8 * CENTERJSAMPLE) << PASS1_BITS); + dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << PASS1_BITS); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); /* c6 */ + /* Add fudge factor here for final descale. */ + z1 += ONE << (CONST_BITS-PASS1_BITS-1); + + dataptr[2] = (DCTELEM) + RIGHT_SHIFT(z1 + MULTIPLY(tmp12, FIX_0_765366865), /* c2-c6 */ + CONST_BITS-PASS1_BITS); + dataptr[6] = (DCTELEM) + RIGHT_SHIFT(z1 - MULTIPLY(tmp13, FIX_1_847759065), /* c2+c6 */ + CONST_BITS-PASS1_BITS); + + /* Odd part per figure 8 --- note paper omits factor of sqrt(2). + * i0..i3 in the paper are tmp0..tmp3 here. + */ + + tmp12 = tmp0 + tmp2; + tmp13 = tmp1 + tmp3; + + z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */ + /* Add fudge factor here for final descale. */ + z1 += ONE << (CONST_BITS-PASS1_BITS-1); + + tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* -c3+c5 */ + tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */ + tmp12 += z1; + tmp13 += z1; + + z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ + tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */ + tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */ + tmp0 += z1 + tmp12; + tmp3 += z1 + tmp13; + + z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ + tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */ + tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */ + tmp1 += z1 + tmp13; + tmp2 += z1 + tmp12; + + dataptr[1] = (DCTELEM) RIGHT_SHIFT(tmp0, CONST_BITS-PASS1_BITS); + dataptr[3] = (DCTELEM) RIGHT_SHIFT(tmp1, CONST_BITS-PASS1_BITS); + dataptr[5] = (DCTELEM) RIGHT_SHIFT(tmp2, CONST_BITS-PASS1_BITS); + dataptr[7] = (DCTELEM) RIGHT_SHIFT(tmp3, CONST_BITS-PASS1_BITS); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * cK represents sqrt(2) * cos(K*pi/16). + */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + /* Even part per LL&M figure 1 --- note that published figure is faulty; + * rotator "c1" should be "c6". + */ + + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; + + /* Add fudge factor here for final descale. */ + tmp10 = tmp0 + tmp3 + (ONE << (PASS1_BITS-1)); + tmp12 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp13 = tmp1 - tmp2; + + tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; + + dataptr[DCTSIZE*0] = (DCTELEM) RIGHT_SHIFT(tmp10 + tmp11, PASS1_BITS); + dataptr[DCTSIZE*4] = (DCTELEM) RIGHT_SHIFT(tmp10 - tmp11, PASS1_BITS); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); /* c6 */ + /* Add fudge factor here for final descale. */ + z1 += ONE << (CONST_BITS+PASS1_BITS-1); + + dataptr[DCTSIZE*2] = (DCTELEM) + RIGHT_SHIFT(z1 + MULTIPLY(tmp12, FIX_0_765366865), /* c2-c6 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*6] = (DCTELEM) + RIGHT_SHIFT(z1 - MULTIPLY(tmp13, FIX_1_847759065), /* c2+c6 */ + CONST_BITS+PASS1_BITS); + + /* Odd part per figure 8 --- note paper omits factor of sqrt(2). + * i0..i3 in the paper are tmp0..tmp3 here. + */ + + tmp12 = tmp0 + tmp2; + tmp13 = tmp1 + tmp3; + + z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */ + /* Add fudge factor here for final descale. */ + z1 += ONE << (CONST_BITS+PASS1_BITS-1); + + tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* -c3+c5 */ + tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */ + tmp12 += z1; + tmp13 += z1; + + z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ + tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */ + tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */ + tmp0 += z1 + tmp12; + tmp3 += z1 + tmp13; + + z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ + tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */ + tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */ + tmp1 += z1 + tmp13; + tmp2 += z1 + tmp12; + + dataptr[DCTSIZE*1] = (DCTELEM) RIGHT_SHIFT(tmp0, CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*3] = (DCTELEM) RIGHT_SHIFT(tmp1, CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*5] = (DCTELEM) RIGHT_SHIFT(tmp2, CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*7] = (DCTELEM) RIGHT_SHIFT(tmp3, CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + } +} + +#ifdef DCT_SCALING_SUPPORTED + + +/* + * Perform the forward DCT on a 7x7 sample block. + */ + +GLOBAL(void) +jpeg_fdct_7x7 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3; + INT32 tmp10, tmp11, tmp12; + INT32 z1, z2, z3; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * cK represents sqrt(2) * cos(K*pi/14). + */ + + dataptr = data; + for (ctr = 0; ctr < 7; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[6]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[5]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[4]); + tmp3 = GETJSAMPLE(elemptr[3]); + + tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[6]); + tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[5]); + tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[4]); + + z1 = tmp0 + tmp2; + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((z1 + tmp1 + tmp3 - 7 * CENTERJSAMPLE) << PASS1_BITS); + tmp3 += tmp3; + z1 -= tmp3; + z1 -= tmp3; + z1 = MULTIPLY(z1, FIX(0.353553391)); /* (c2+c6-c4)/2 */ + z2 = MULTIPLY(tmp0 - tmp2, FIX(0.920609002)); /* (c2+c4-c6)/2 */ + z3 = MULTIPLY(tmp1 - tmp2, FIX(0.314692123)); /* c6 */ + dataptr[2] = (DCTELEM) DESCALE(z1 + z2 + z3, CONST_BITS-PASS1_BITS); + z1 -= z2; + z2 = MULTIPLY(tmp0 - tmp1, FIX(0.881747734)); /* c4 */ + dataptr[4] = (DCTELEM) + DESCALE(z2 + z3 - MULTIPLY(tmp1 - tmp3, FIX(0.707106781)), /* c2+c6-c4 */ + CONST_BITS-PASS1_BITS); + dataptr[6] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS-PASS1_BITS); + + /* Odd part */ + + tmp1 = MULTIPLY(tmp10 + tmp11, FIX(0.935414347)); /* (c3+c1-c5)/2 */ + tmp2 = MULTIPLY(tmp10 - tmp11, FIX(0.170262339)); /* (c3+c5-c1)/2 */ + tmp0 = tmp1 - tmp2; + tmp1 += tmp2; + tmp2 = MULTIPLY(tmp11 + tmp12, - FIX(1.378756276)); /* -c1 */ + tmp1 += tmp2; + tmp3 = MULTIPLY(tmp10 + tmp12, FIX(0.613604268)); /* c5 */ + tmp0 += tmp3; + tmp2 += tmp3 + MULTIPLY(tmp12, FIX(1.870828693)); /* c3+c1-c5 */ + + dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS-PASS1_BITS); + dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS-PASS1_BITS); + dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS-PASS1_BITS); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * We must also scale the output by (8/7)**2 = 64/49, which we fold + * into the constant multipliers: + * cK now represents sqrt(2) * cos(K*pi/14) * 64/49. + */ + + dataptr = data; + for (ctr = 0; ctr < 7; ctr++) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*6]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*5]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*4]; + tmp3 = dataptr[DCTSIZE*3]; + + tmp10 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*6]; + tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*5]; + tmp12 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*4]; + + z1 = tmp0 + tmp2; + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(z1 + tmp1 + tmp3, FIX(1.306122449)), /* 64/49 */ + CONST_BITS+PASS1_BITS); + tmp3 += tmp3; + z1 -= tmp3; + z1 -= tmp3; + z1 = MULTIPLY(z1, FIX(0.461784020)); /* (c2+c6-c4)/2 */ + z2 = MULTIPLY(tmp0 - tmp2, FIX(1.202428084)); /* (c2+c4-c6)/2 */ + z3 = MULTIPLY(tmp1 - tmp2, FIX(0.411026446)); /* c6 */ + dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + z2 + z3, CONST_BITS+PASS1_BITS); + z1 -= z2; + z2 = MULTIPLY(tmp0 - tmp1, FIX(1.151670509)); /* c4 */ + dataptr[DCTSIZE*4] = (DCTELEM) + DESCALE(z2 + z3 - MULTIPLY(tmp1 - tmp3, FIX(0.923568041)), /* c2+c6-c4 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS+PASS1_BITS); + + /* Odd part */ + + tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.221765677)); /* (c3+c1-c5)/2 */ + tmp2 = MULTIPLY(tmp10 - tmp11, FIX(0.222383464)); /* (c3+c5-c1)/2 */ + tmp0 = tmp1 - tmp2; + tmp1 += tmp2; + tmp2 = MULTIPLY(tmp11 + tmp12, - FIX(1.800824523)); /* -c1 */ + tmp1 += tmp2; + tmp3 = MULTIPLY(tmp10 + tmp12, FIX(0.801442310)); /* c5 */ + tmp0 += tmp3; + tmp2 += tmp3 + MULTIPLY(tmp12, FIX(2.443531355)); /* c3+c1-c5 */ + + dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 6x6 sample block. + */ + +GLOBAL(void) +jpeg_fdct_6x6 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2; + INT32 tmp10, tmp11, tmp12; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * cK represents sqrt(2) * cos(K*pi/12). + */ + + dataptr = data; + for (ctr = 0; ctr < 6; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[5]); + tmp11 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[4]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[3]); + + tmp10 = tmp0 + tmp2; + tmp12 = tmp0 - tmp2; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[5]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[4]); + tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[3]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp10 + tmp11 - 6 * CENTERJSAMPLE) << PASS1_BITS); + dataptr[2] = (DCTELEM) + DESCALE(MULTIPLY(tmp12, FIX(1.224744871)), /* c2 */ + CONST_BITS-PASS1_BITS); + dataptr[4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(0.707106781)), /* c4 */ + CONST_BITS-PASS1_BITS); + + /* Odd part */ + + tmp10 = DESCALE(MULTIPLY(tmp0 + tmp2, FIX(0.366025404)), /* c5 */ + CONST_BITS-PASS1_BITS); + + dataptr[1] = (DCTELEM) (tmp10 + ((tmp0 + tmp1) << PASS1_BITS)); + dataptr[3] = (DCTELEM) ((tmp0 - tmp1 - tmp2) << PASS1_BITS); + dataptr[5] = (DCTELEM) (tmp10 + ((tmp2 - tmp1) << PASS1_BITS)); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * We must also scale the output by (8/6)**2 = 16/9, which we fold + * into the constant multipliers: + * cK now represents sqrt(2) * cos(K*pi/12) * 16/9. + */ + + dataptr = data; + for (ctr = 0; ctr < 6; ctr++) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*5]; + tmp11 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*4]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*3]; + + tmp10 = tmp0 + tmp2; + tmp12 = tmp0 - tmp2; + + tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*5]; + tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*4]; + tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*3]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 + tmp11, FIX(1.777777778)), /* 16/9 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(MULTIPLY(tmp12, FIX(2.177324216)), /* c2 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(1.257078722)), /* c4 */ + CONST_BITS+PASS1_BITS); + + /* Odd part */ + + tmp10 = MULTIPLY(tmp0 + tmp2, FIX(0.650711829)); /* c5 */ + + dataptr[DCTSIZE*1] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp0 + tmp1, FIX(1.777777778)), /* 16/9 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*3] = (DCTELEM) + DESCALE(MULTIPLY(tmp0 - tmp1 - tmp2, FIX(1.777777778)), /* 16/9 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*5] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp2 - tmp1, FIX(1.777777778)), /* 16/9 */ + CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 5x5 sample block. + */ + +GLOBAL(void) +jpeg_fdct_5x5 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2; + INT32 tmp10, tmp11; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * We scale the results further by 2 as part of output adaption + * scaling for different DCT size. + * cK represents sqrt(2) * cos(K*pi/10). + */ + + dataptr = data; + for (ctr = 0; ctr < 5; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[4]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[3]); + tmp2 = GETJSAMPLE(elemptr[2]); + + tmp10 = tmp0 + tmp1; + tmp11 = tmp0 - tmp1; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[4]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[3]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp10 + tmp2 - 5 * CENTERJSAMPLE) << (PASS1_BITS+1)); + tmp11 = MULTIPLY(tmp11, FIX(0.790569415)); /* (c2+c4)/2 */ + tmp10 -= tmp2 << 2; + tmp10 = MULTIPLY(tmp10, FIX(0.353553391)); /* (c2-c4)/2 */ + dataptr[2] = (DCTELEM) DESCALE(tmp11 + tmp10, CONST_BITS-PASS1_BITS-1); + dataptr[4] = (DCTELEM) DESCALE(tmp11 - tmp10, CONST_BITS-PASS1_BITS-1); + + /* Odd part */ + + tmp10 = MULTIPLY(tmp0 + tmp1, FIX(0.831253876)); /* c3 */ + + dataptr[1] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp0, FIX(0.513743148)), /* c1-c3 */ + CONST_BITS-PASS1_BITS-1); + dataptr[3] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp1, FIX(2.176250899)), /* c1+c3 */ + CONST_BITS-PASS1_BITS-1); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * We must also scale the output by (8/5)**2 = 64/25, which we partially + * fold into the constant multipliers (other part was done in pass 1): + * cK now represents sqrt(2) * cos(K*pi/10) * 32/25. + */ + + dataptr = data; + for (ctr = 0; ctr < 5; ctr++) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*4]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*3]; + tmp2 = dataptr[DCTSIZE*2]; + + tmp10 = tmp0 + tmp1; + tmp11 = tmp0 - tmp1; + + tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*4]; + tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*3]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 + tmp2, FIX(1.28)), /* 32/25 */ + CONST_BITS+PASS1_BITS); + tmp11 = MULTIPLY(tmp11, FIX(1.011928851)); /* (c2+c4)/2 */ + tmp10 -= tmp2 << 2; + tmp10 = MULTIPLY(tmp10, FIX(0.452548340)); /* (c2-c4)/2 */ + dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(tmp11 + tmp10, CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp11 - tmp10, CONST_BITS+PASS1_BITS); + + /* Odd part */ + + tmp10 = MULTIPLY(tmp0 + tmp1, FIX(1.064004961)); /* c3 */ + + dataptr[DCTSIZE*1] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp0, FIX(0.657591230)), /* c1-c3 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*3] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp1, FIX(2.785601151)), /* c1+c3 */ + CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 4x4 sample block. + */ + +GLOBAL(void) +jpeg_fdct_4x4 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1; + INT32 tmp10, tmp11; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * We must also scale the output by (8/4)**2 = 2**2, which we add here. + * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point FDCT]. + */ + + dataptr = data; + for (ctr = 0; ctr < 4; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[3]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[2]); + + tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[3]); + tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[2]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp0 + tmp1 - 4 * CENTERJSAMPLE) << (PASS1_BITS+2)); + dataptr[2] = (DCTELEM) ((tmp0 - tmp1) << (PASS1_BITS+2)); + + /* Odd part */ + + tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */ + /* Add fudge factor here for final descale. */ + tmp0 += ONE << (CONST_BITS-PASS1_BITS-3); + + dataptr[1] = (DCTELEM) + RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */ + CONST_BITS-PASS1_BITS-2); + dataptr[3] = (DCTELEM) + RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */ + CONST_BITS-PASS1_BITS-2); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point FDCT]. + */ + + dataptr = data; + for (ctr = 0; ctr < 4; ctr++) { + /* Even part */ + + /* Add fudge factor here for final descale. */ + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*3] + (ONE << (PASS1_BITS-1)); + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*2]; + + tmp10 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*3]; + tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*2]; + + dataptr[DCTSIZE*0] = (DCTELEM) RIGHT_SHIFT(tmp0 + tmp1, PASS1_BITS); + dataptr[DCTSIZE*2] = (DCTELEM) RIGHT_SHIFT(tmp0 - tmp1, PASS1_BITS); + + /* Odd part */ + + tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */ + /* Add fudge factor here for final descale. */ + tmp0 += ONE << (CONST_BITS+PASS1_BITS-1); + + dataptr[DCTSIZE*1] = (DCTELEM) + RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*3] = (DCTELEM) + RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */ + CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 3x3 sample block. + */ + +GLOBAL(void) +jpeg_fdct_3x3 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * We scale the results further by 2**2 as part of output adaption + * scaling for different DCT size. + * cK represents sqrt(2) * cos(K*pi/6). + */ + + dataptr = data; + for (ctr = 0; ctr < 3; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[2]); + tmp1 = GETJSAMPLE(elemptr[1]); + + tmp2 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[2]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp0 + tmp1 - 3 * CENTERJSAMPLE) << (PASS1_BITS+2)); + dataptr[2] = (DCTELEM) + DESCALE(MULTIPLY(tmp0 - tmp1 - tmp1, FIX(0.707106781)), /* c2 */ + CONST_BITS-PASS1_BITS-2); + + /* Odd part */ + + dataptr[1] = (DCTELEM) + DESCALE(MULTIPLY(tmp2, FIX(1.224744871)), /* c1 */ + CONST_BITS-PASS1_BITS-2); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * We must also scale the output by (8/3)**2 = 64/9, which we partially + * fold into the constant multipliers (other part was done in pass 1): + * cK now represents sqrt(2) * cos(K*pi/6) * 16/9. + */ + + dataptr = data; + for (ctr = 0; ctr < 3; ctr++) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*2]; + tmp1 = dataptr[DCTSIZE*1]; + + tmp2 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*2]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(tmp0 + tmp1, FIX(1.777777778)), /* 16/9 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(MULTIPLY(tmp0 - tmp1 - tmp1, FIX(1.257078722)), /* c2 */ + CONST_BITS+PASS1_BITS); + + /* Odd part */ + + dataptr[DCTSIZE*1] = (DCTELEM) + DESCALE(MULTIPLY(tmp2, FIX(2.177324216)), /* c1 */ + CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 2x2 sample block. + */ + +GLOBAL(void) +jpeg_fdct_2x2 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + DCTELEM tmp0, tmp1, tmp2, tmp3; + JSAMPROW elemptr; + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT. + */ + + /* Row 0 */ + elemptr = sample_data[0] + start_col; + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[1]); + tmp1 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[1]); + + /* Row 1 */ + elemptr = sample_data[1] + start_col; + + tmp2 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[1]); + tmp3 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[1]); + + /* Pass 2: process columns. + * We leave the results scaled up by an overall factor of 8. + * We must also scale the output by (8/2)**2 = 2**4. + */ + + /* Column 0 */ + /* Apply unsigned->signed conversion. */ + data[DCTSIZE*0] = (tmp0 + tmp2 - 4 * CENTERJSAMPLE) << 4; + data[DCTSIZE*1] = (tmp0 - tmp2) << 4; + + /* Column 1 */ + data[DCTSIZE*0+1] = (tmp1 + tmp3) << 4; + data[DCTSIZE*1+1] = (tmp1 - tmp3) << 4; +} + + +/* + * Perform the forward DCT on a 1x1 sample block. + */ + +GLOBAL(void) +jpeg_fdct_1x1 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + DCTELEM dcval; + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + dcval = GETJSAMPLE(sample_data[0][start_col]); + + /* We leave the result scaled up by an overall factor of 8. */ + /* We must also scale the output by (8/1)**2 = 2**6. */ + /* Apply unsigned->signed conversion. */ + data[0] = (dcval - CENTERJSAMPLE) << 6; +} + + +/* + * Perform the forward DCT on a 9x9 sample block. + */ + +GLOBAL(void) +jpeg_fdct_9x9 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4; + INT32 tmp10, tmp11, tmp12, tmp13; + INT32 z1, z2; + DCTELEM workspace[8]; + DCTELEM *dataptr; + DCTELEM *wsptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * we scale the results further by 2 as part of output adaption + * scaling for different DCT size. + * cK represents sqrt(2) * cos(K*pi/18). + */ + + dataptr = data; + ctr = 0; + for (;;) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[8]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[7]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[6]); + tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[5]); + tmp4 = GETJSAMPLE(elemptr[4]); + + tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[8]); + tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[7]); + tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[6]); + tmp13 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[5]); + + z1 = tmp0 + tmp2 + tmp3; + z2 = tmp1 + tmp4; + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) ((z1 + z2 - 9 * CENTERJSAMPLE) << 1); + dataptr[6] = (DCTELEM) + DESCALE(MULTIPLY(z1 - z2 - z2, FIX(0.707106781)), /* c6 */ + CONST_BITS-1); + z1 = MULTIPLY(tmp0 - tmp2, FIX(1.328926049)); /* c2 */ + z2 = MULTIPLY(tmp1 - tmp4 - tmp4, FIX(0.707106781)); /* c6 */ + dataptr[2] = (DCTELEM) + DESCALE(MULTIPLY(tmp2 - tmp3, FIX(1.083350441)) /* c4 */ + + z1 + z2, CONST_BITS-1); + dataptr[4] = (DCTELEM) + DESCALE(MULTIPLY(tmp3 - tmp0, FIX(0.245575608)) /* c8 */ + + z1 - z2, CONST_BITS-1); + + /* Odd part */ + + dataptr[3] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp12 - tmp13, FIX(1.224744871)), /* c3 */ + CONST_BITS-1); + + tmp11 = MULTIPLY(tmp11, FIX(1.224744871)); /* c3 */ + tmp0 = MULTIPLY(tmp10 + tmp12, FIX(0.909038955)); /* c5 */ + tmp1 = MULTIPLY(tmp10 + tmp13, FIX(0.483689525)); /* c7 */ + + dataptr[1] = (DCTELEM) DESCALE(tmp11 + tmp0 + tmp1, CONST_BITS-1); + + tmp2 = MULTIPLY(tmp12 - tmp13, FIX(1.392728481)); /* c1 */ + + dataptr[5] = (DCTELEM) DESCALE(tmp0 - tmp11 - tmp2, CONST_BITS-1); + dataptr[7] = (DCTELEM) DESCALE(tmp1 - tmp11 + tmp2, CONST_BITS-1); + + ctr++; + + if (ctr != DCTSIZE) { + if (ctr == 9) + break; /* Done. */ + dataptr += DCTSIZE; /* advance pointer to next row */ + } else + dataptr = workspace; /* switch pointer to extended workspace */ + } + + /* Pass 2: process columns. + * We leave the results scaled up by an overall factor of 8. + * We must also scale the output by (8/9)**2 = 64/81, which we partially + * fold into the constant multipliers and final/initial shifting: + * cK now represents sqrt(2) * cos(K*pi/18) * 128/81. + */ + + dataptr = data; + wsptr = workspace; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*0]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*7]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*6]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*5]; + tmp4 = dataptr[DCTSIZE*4]; + + tmp10 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*0]; + tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*7]; + tmp12 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*6]; + tmp13 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*5]; + + z1 = tmp0 + tmp2 + tmp3; + z2 = tmp1 + tmp4; + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(z1 + z2, FIX(1.580246914)), /* 128/81 */ + CONST_BITS+2); + dataptr[DCTSIZE*6] = (DCTELEM) + DESCALE(MULTIPLY(z1 - z2 - z2, FIX(1.117403309)), /* c6 */ + CONST_BITS+2); + z1 = MULTIPLY(tmp0 - tmp2, FIX(2.100031287)); /* c2 */ + z2 = MULTIPLY(tmp1 - tmp4 - tmp4, FIX(1.117403309)); /* c6 */ + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(MULTIPLY(tmp2 - tmp3, FIX(1.711961190)) /* c4 */ + + z1 + z2, CONST_BITS+2); + dataptr[DCTSIZE*4] = (DCTELEM) + DESCALE(MULTIPLY(tmp3 - tmp0, FIX(0.388070096)) /* c8 */ + + z1 - z2, CONST_BITS+2); + + /* Odd part */ + + dataptr[DCTSIZE*3] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp12 - tmp13, FIX(1.935399303)), /* c3 */ + CONST_BITS+2); + + tmp11 = MULTIPLY(tmp11, FIX(1.935399303)); /* c3 */ + tmp0 = MULTIPLY(tmp10 + tmp12, FIX(1.436506004)); /* c5 */ + tmp1 = MULTIPLY(tmp10 + tmp13, FIX(0.764348879)); /* c7 */ + + dataptr[DCTSIZE*1] = (DCTELEM) + DESCALE(tmp11 + tmp0 + tmp1, CONST_BITS+2); + + tmp2 = MULTIPLY(tmp12 - tmp13, FIX(2.200854883)); /* c1 */ + + dataptr[DCTSIZE*5] = (DCTELEM) + DESCALE(tmp0 - tmp11 - tmp2, CONST_BITS+2); + dataptr[DCTSIZE*7] = (DCTELEM) + DESCALE(tmp1 - tmp11 + tmp2, CONST_BITS+2); + + dataptr++; /* advance pointer to next column */ + wsptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 10x10 sample block. + */ + +GLOBAL(void) +jpeg_fdct_10x10 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4; + INT32 tmp10, tmp11, tmp12, tmp13, tmp14; + DCTELEM workspace[8*2]; + DCTELEM *dataptr; + DCTELEM *wsptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * we scale the results further by 2 as part of output adaption + * scaling for different DCT size. + * cK represents sqrt(2) * cos(K*pi/20). + */ + + dataptr = data; + ctr = 0; + for (;;) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[9]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[8]); + tmp12 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[7]); + tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[6]); + tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[5]); + + tmp10 = tmp0 + tmp4; + tmp13 = tmp0 - tmp4; + tmp11 = tmp1 + tmp3; + tmp14 = tmp1 - tmp3; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[9]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[8]); + tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[7]); + tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[6]); + tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[5]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp10 + tmp11 + tmp12 - 10 * CENTERJSAMPLE) << 1); + tmp12 += tmp12; + dataptr[4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.144122806)) - /* c4 */ + MULTIPLY(tmp11 - tmp12, FIX(0.437016024)), /* c8 */ + CONST_BITS-1); + tmp10 = MULTIPLY(tmp13 + tmp14, FIX(0.831253876)); /* c6 */ + dataptr[2] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp13, FIX(0.513743148)), /* c2-c6 */ + CONST_BITS-1); + dataptr[6] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp14, FIX(2.176250899)), /* c2+c6 */ + CONST_BITS-1); + + /* Odd part */ + + tmp10 = tmp0 + tmp4; + tmp11 = tmp1 - tmp3; + dataptr[5] = (DCTELEM) ((tmp10 - tmp11 - tmp2) << 1); + tmp2 <<= CONST_BITS; + dataptr[1] = (DCTELEM) + DESCALE(MULTIPLY(tmp0, FIX(1.396802247)) + /* c1 */ + MULTIPLY(tmp1, FIX(1.260073511)) + tmp2 + /* c3 */ + MULTIPLY(tmp3, FIX(0.642039522)) + /* c7 */ + MULTIPLY(tmp4, FIX(0.221231742)), /* c9 */ + CONST_BITS-1); + tmp12 = MULTIPLY(tmp0 - tmp4, FIX(0.951056516)) - /* (c3+c7)/2 */ + MULTIPLY(tmp1 + tmp3, FIX(0.587785252)); /* (c1-c9)/2 */ + tmp13 = MULTIPLY(tmp10 + tmp11, FIX(0.309016994)) + /* (c3-c7)/2 */ + (tmp11 << (CONST_BITS - 1)) - tmp2; + dataptr[3] = (DCTELEM) DESCALE(tmp12 + tmp13, CONST_BITS-1); + dataptr[7] = (DCTELEM) DESCALE(tmp12 - tmp13, CONST_BITS-1); + + ctr++; + + if (ctr != DCTSIZE) { + if (ctr == 10) + break; /* Done. */ + dataptr += DCTSIZE; /* advance pointer to next row */ + } else + dataptr = workspace; /* switch pointer to extended workspace */ + } + + /* Pass 2: process columns. + * We leave the results scaled up by an overall factor of 8. + * We must also scale the output by (8/10)**2 = 16/25, which we partially + * fold into the constant multipliers and final/initial shifting: + * cK now represents sqrt(2) * cos(K*pi/20) * 32/25. + */ + + dataptr = data; + wsptr = workspace; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*1]; + tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*0]; + tmp12 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*7]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*6]; + tmp4 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*5]; + + tmp10 = tmp0 + tmp4; + tmp13 = tmp0 - tmp4; + tmp11 = tmp1 + tmp3; + tmp14 = tmp1 - tmp3; + + tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*1]; + tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*0]; + tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*7]; + tmp3 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*6]; + tmp4 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*5]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12, FIX(1.28)), /* 32/25 */ + CONST_BITS+2); + tmp12 += tmp12; + dataptr[DCTSIZE*4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.464477191)) - /* c4 */ + MULTIPLY(tmp11 - tmp12, FIX(0.559380511)), /* c8 */ + CONST_BITS+2); + tmp10 = MULTIPLY(tmp13 + tmp14, FIX(1.064004961)); /* c6 */ + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp13, FIX(0.657591230)), /* c2-c6 */ + CONST_BITS+2); + dataptr[DCTSIZE*6] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp14, FIX(2.785601151)), /* c2+c6 */ + CONST_BITS+2); + + /* Odd part */ + + tmp10 = tmp0 + tmp4; + tmp11 = tmp1 - tmp3; + dataptr[DCTSIZE*5] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp11 - tmp2, FIX(1.28)), /* 32/25 */ + CONST_BITS+2); + tmp2 = MULTIPLY(tmp2, FIX(1.28)); /* 32/25 */ + dataptr[DCTSIZE*1] = (DCTELEM) + DESCALE(MULTIPLY(tmp0, FIX(1.787906876)) + /* c1 */ + MULTIPLY(tmp1, FIX(1.612894094)) + tmp2 + /* c3 */ + MULTIPLY(tmp3, FIX(0.821810588)) + /* c7 */ + MULTIPLY(tmp4, FIX(0.283176630)), /* c9 */ + CONST_BITS+2); + tmp12 = MULTIPLY(tmp0 - tmp4, FIX(1.217352341)) - /* (c3+c7)/2 */ + MULTIPLY(tmp1 + tmp3, FIX(0.752365123)); /* (c1-c9)/2 */ + tmp13 = MULTIPLY(tmp10 + tmp11, FIX(0.395541753)) + /* (c3-c7)/2 */ + MULTIPLY(tmp11, FIX(0.64)) - tmp2; /* 16/25 */ + dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp12 + tmp13, CONST_BITS+2); + dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp12 - tmp13, CONST_BITS+2); + + dataptr++; /* advance pointer to next column */ + wsptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on an 11x11 sample block. + */ + +GLOBAL(void) +jpeg_fdct_11x11 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; + INT32 tmp10, tmp11, tmp12, tmp13, tmp14; + INT32 z1, z2, z3; + DCTELEM workspace[8*3]; + DCTELEM *dataptr; + DCTELEM *wsptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * we scale the results further by 2 as part of output adaption + * scaling for different DCT size. + * cK represents sqrt(2) * cos(K*pi/22). + */ + + dataptr = data; + ctr = 0; + for (;;) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[10]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[9]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[8]); + tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[7]); + tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[6]); + tmp5 = GETJSAMPLE(elemptr[5]); + + tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[10]); + tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[9]); + tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[8]); + tmp13 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[7]); + tmp14 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[6]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp0 + tmp1 + tmp2 + tmp3 + tmp4 + tmp5 - 11 * CENTERJSAMPLE) << 1); + tmp5 += tmp5; + tmp0 -= tmp5; + tmp1 -= tmp5; + tmp2 -= tmp5; + tmp3 -= tmp5; + tmp4 -= tmp5; + z1 = MULTIPLY(tmp0 + tmp3, FIX(1.356927976)) + /* c2 */ + MULTIPLY(tmp2 + tmp4, FIX(0.201263574)); /* c10 */ + z2 = MULTIPLY(tmp1 - tmp3, FIX(0.926112931)); /* c6 */ + z3 = MULTIPLY(tmp0 - tmp1, FIX(1.189712156)); /* c4 */ + dataptr[2] = (DCTELEM) + DESCALE(z1 + z2 - MULTIPLY(tmp3, FIX(1.018300590)) /* c2+c8-c6 */ + - MULTIPLY(tmp4, FIX(1.390975730)), /* c4+c10 */ + CONST_BITS-1); + dataptr[4] = (DCTELEM) + DESCALE(z2 + z3 + MULTIPLY(tmp1, FIX(0.062335650)) /* c4-c6-c10 */ + - MULTIPLY(tmp2, FIX(1.356927976)) /* c2 */ + + MULTIPLY(tmp4, FIX(0.587485545)), /* c8 */ + CONST_BITS-1); + dataptr[6] = (DCTELEM) + DESCALE(z1 + z3 - MULTIPLY(tmp0, FIX(1.620527200)) /* c2+c4-c6 */ + - MULTIPLY(tmp2, FIX(0.788749120)), /* c8+c10 */ + CONST_BITS-1); + + /* Odd part */ + + tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.286413905)); /* c3 */ + tmp2 = MULTIPLY(tmp10 + tmp12, FIX(1.068791298)); /* c5 */ + tmp3 = MULTIPLY(tmp10 + tmp13, FIX(0.764581576)); /* c7 */ + tmp0 = tmp1 + tmp2 + tmp3 - MULTIPLY(tmp10, FIX(1.719967871)) /* c7+c5+c3-c1 */ + + MULTIPLY(tmp14, FIX(0.398430003)); /* c9 */ + tmp4 = MULTIPLY(tmp11 + tmp12, - FIX(0.764581576)); /* -c7 */ + tmp5 = MULTIPLY(tmp11 + tmp13, - FIX(1.399818907)); /* -c1 */ + tmp1 += tmp4 + tmp5 + MULTIPLY(tmp11, FIX(1.276416582)) /* c9+c7+c1-c3 */ + - MULTIPLY(tmp14, FIX(1.068791298)); /* c5 */ + tmp10 = MULTIPLY(tmp12 + tmp13, FIX(0.398430003)); /* c9 */ + tmp2 += tmp4 + tmp10 - MULTIPLY(tmp12, FIX(1.989053629)) /* c9+c5+c3-c7 */ + + MULTIPLY(tmp14, FIX(1.399818907)); /* c1 */ + tmp3 += tmp5 + tmp10 + MULTIPLY(tmp13, FIX(1.305598626)) /* c1+c5-c9-c7 */ + - MULTIPLY(tmp14, FIX(1.286413905)); /* c3 */ + + dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS-1); + dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS-1); + dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS-1); + dataptr[7] = (DCTELEM) DESCALE(tmp3, CONST_BITS-1); + + ctr++; + + if (ctr != DCTSIZE) { + if (ctr == 11) + break; /* Done. */ + dataptr += DCTSIZE; /* advance pointer to next row */ + } else + dataptr = workspace; /* switch pointer to extended workspace */ + } + + /* Pass 2: process columns. + * We leave the results scaled up by an overall factor of 8. + * We must also scale the output by (8/11)**2 = 64/121, which we partially + * fold into the constant multipliers and final/initial shifting: + * cK now represents sqrt(2) * cos(K*pi/22) * 128/121. + */ + + dataptr = data; + wsptr = workspace; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*2]; + tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*1]; + tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*0]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*7]; + tmp4 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*6]; + tmp5 = dataptr[DCTSIZE*5]; + + tmp10 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*2]; + tmp11 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*1]; + tmp12 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*0]; + tmp13 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*7]; + tmp14 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*6]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(tmp0 + tmp1 + tmp2 + tmp3 + tmp4 + tmp5, + FIX(1.057851240)), /* 128/121 */ + CONST_BITS+2); + tmp5 += tmp5; + tmp0 -= tmp5; + tmp1 -= tmp5; + tmp2 -= tmp5; + tmp3 -= tmp5; + tmp4 -= tmp5; + z1 = MULTIPLY(tmp0 + tmp3, FIX(1.435427942)) + /* c2 */ + MULTIPLY(tmp2 + tmp4, FIX(0.212906922)); /* c10 */ + z2 = MULTIPLY(tmp1 - tmp3, FIX(0.979689713)); /* c6 */ + z3 = MULTIPLY(tmp0 - tmp1, FIX(1.258538479)); /* c4 */ + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(z1 + z2 - MULTIPLY(tmp3, FIX(1.077210542)) /* c2+c8-c6 */ + - MULTIPLY(tmp4, FIX(1.471445400)), /* c4+c10 */ + CONST_BITS+2); + dataptr[DCTSIZE*4] = (DCTELEM) + DESCALE(z2 + z3 + MULTIPLY(tmp1, FIX(0.065941844)) /* c4-c6-c10 */ + - MULTIPLY(tmp2, FIX(1.435427942)) /* c2 */ + + MULTIPLY(tmp4, FIX(0.621472312)), /* c8 */ + CONST_BITS+2); + dataptr[DCTSIZE*6] = (DCTELEM) + DESCALE(z1 + z3 - MULTIPLY(tmp0, FIX(1.714276708)) /* c2+c4-c6 */ + - MULTIPLY(tmp2, FIX(0.834379234)), /* c8+c10 */ + CONST_BITS+2); + + /* Odd part */ + + tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.360834544)); /* c3 */ + tmp2 = MULTIPLY(tmp10 + tmp12, FIX(1.130622199)); /* c5 */ + tmp3 = MULTIPLY(tmp10 + tmp13, FIX(0.808813568)); /* c7 */ + tmp0 = tmp1 + tmp2 + tmp3 - MULTIPLY(tmp10, FIX(1.819470145)) /* c7+c5+c3-c1 */ + + MULTIPLY(tmp14, FIX(0.421479672)); /* c9 */ + tmp4 = MULTIPLY(tmp11 + tmp12, - FIX(0.808813568)); /* -c7 */ + tmp5 = MULTIPLY(tmp11 + tmp13, - FIX(1.480800167)); /* -c1 */ + tmp1 += tmp4 + tmp5 + MULTIPLY(tmp11, FIX(1.350258864)) /* c9+c7+c1-c3 */ + - MULTIPLY(tmp14, FIX(1.130622199)); /* c5 */ + tmp10 = MULTIPLY(tmp12 + tmp13, FIX(0.421479672)); /* c9 */ + tmp2 += tmp4 + tmp10 - MULTIPLY(tmp12, FIX(2.104122847)) /* c9+c5+c3-c7 */ + + MULTIPLY(tmp14, FIX(1.480800167)); /* c1 */ + tmp3 += tmp5 + tmp10 + MULTIPLY(tmp13, FIX(1.381129125)) /* c1+c5-c9-c7 */ + - MULTIPLY(tmp14, FIX(1.360834544)); /* c3 */ + + dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+2); + dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+2); + dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+2); + dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp3, CONST_BITS+2); + + dataptr++; /* advance pointer to next column */ + wsptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 12x12 sample block. + */ + +GLOBAL(void) +jpeg_fdct_12x12 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; + DCTELEM workspace[8*4]; + DCTELEM *dataptr; + DCTELEM *wsptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT. + * cK represents sqrt(2) * cos(K*pi/24). + */ + + dataptr = data; + ctr = 0; + for (;;) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[11]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[10]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[9]); + tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[8]); + tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[7]); + tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[6]); + + tmp10 = tmp0 + tmp5; + tmp13 = tmp0 - tmp5; + tmp11 = tmp1 + tmp4; + tmp14 = tmp1 - tmp4; + tmp12 = tmp2 + tmp3; + tmp15 = tmp2 - tmp3; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[11]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[10]); + tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[9]); + tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[8]); + tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[7]); + tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[6]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) (tmp10 + tmp11 + tmp12 - 12 * CENTERJSAMPLE); + dataptr[6] = (DCTELEM) (tmp13 - tmp14 - tmp15); + dataptr[4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.224744871)), /* c4 */ + CONST_BITS); + dataptr[2] = (DCTELEM) + DESCALE(tmp14 - tmp15 + MULTIPLY(tmp13 + tmp15, FIX(1.366025404)), /* c2 */ + CONST_BITS); + + /* Odd part */ + + tmp10 = MULTIPLY(tmp1 + tmp4, FIX_0_541196100); /* c9 */ + tmp14 = tmp10 + MULTIPLY(tmp1, FIX_0_765366865); /* c3-c9 */ + tmp15 = tmp10 - MULTIPLY(tmp4, FIX_1_847759065); /* c3+c9 */ + tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.121971054)); /* c5 */ + tmp13 = MULTIPLY(tmp0 + tmp3, FIX(0.860918669)); /* c7 */ + tmp10 = tmp12 + tmp13 + tmp14 - MULTIPLY(tmp0, FIX(0.580774953)) /* c5+c7-c1 */ + + MULTIPLY(tmp5, FIX(0.184591911)); /* c11 */ + tmp11 = MULTIPLY(tmp2 + tmp3, - FIX(0.184591911)); /* -c11 */ + tmp12 += tmp11 - tmp15 - MULTIPLY(tmp2, FIX(2.339493912)) /* c1+c5-c11 */ + + MULTIPLY(tmp5, FIX(0.860918669)); /* c7 */ + tmp13 += tmp11 - tmp14 + MULTIPLY(tmp3, FIX(0.725788011)) /* c1+c11-c7 */ + - MULTIPLY(tmp5, FIX(1.121971054)); /* c5 */ + tmp11 = tmp15 + MULTIPLY(tmp0 - tmp3, FIX(1.306562965)) /* c3 */ + - MULTIPLY(tmp2 + tmp5, FIX_0_541196100); /* c9 */ + + dataptr[1] = (DCTELEM) DESCALE(tmp10, CONST_BITS); + dataptr[3] = (DCTELEM) DESCALE(tmp11, CONST_BITS); + dataptr[5] = (DCTELEM) DESCALE(tmp12, CONST_BITS); + dataptr[7] = (DCTELEM) DESCALE(tmp13, CONST_BITS); + + ctr++; + + if (ctr != DCTSIZE) { + if (ctr == 12) + break; /* Done. */ + dataptr += DCTSIZE; /* advance pointer to next row */ + } else + dataptr = workspace; /* switch pointer to extended workspace */ + } + + /* Pass 2: process columns. + * We leave the results scaled up by an overall factor of 8. + * We must also scale the output by (8/12)**2 = 4/9, which we partially + * fold into the constant multipliers and final shifting: + * cK now represents sqrt(2) * cos(K*pi/24) * 8/9. + */ + + dataptr = data; + wsptr = workspace; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*3]; + tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*2]; + tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*1]; + tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*0]; + tmp4 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*7]; + tmp5 = dataptr[DCTSIZE*5] + dataptr[DCTSIZE*6]; + + tmp10 = tmp0 + tmp5; + tmp13 = tmp0 - tmp5; + tmp11 = tmp1 + tmp4; + tmp14 = tmp1 - tmp4; + tmp12 = tmp2 + tmp3; + tmp15 = tmp2 - tmp3; + + tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*3]; + tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*2]; + tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*1]; + tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*0]; + tmp4 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*7]; + tmp5 = dataptr[DCTSIZE*5] - dataptr[DCTSIZE*6]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12, FIX(0.888888889)), /* 8/9 */ + CONST_BITS+1); + dataptr[DCTSIZE*6] = (DCTELEM) + DESCALE(MULTIPLY(tmp13 - tmp14 - tmp15, FIX(0.888888889)), /* 8/9 */ + CONST_BITS+1); + dataptr[DCTSIZE*4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.088662108)), /* c4 */ + CONST_BITS+1); + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(MULTIPLY(tmp14 - tmp15, FIX(0.888888889)) + /* 8/9 */ + MULTIPLY(tmp13 + tmp15, FIX(1.214244803)), /* c2 */ + CONST_BITS+1); + + /* Odd part */ + + tmp10 = MULTIPLY(tmp1 + tmp4, FIX(0.481063200)); /* c9 */ + tmp14 = tmp10 + MULTIPLY(tmp1, FIX(0.680326102)); /* c3-c9 */ + tmp15 = tmp10 - MULTIPLY(tmp4, FIX(1.642452502)); /* c3+c9 */ + tmp12 = MULTIPLY(tmp0 + tmp2, FIX(0.997307603)); /* c5 */ + tmp13 = MULTIPLY(tmp0 + tmp3, FIX(0.765261039)); /* c7 */ + tmp10 = tmp12 + tmp13 + tmp14 - MULTIPLY(tmp0, FIX(0.516244403)) /* c5+c7-c1 */ + + MULTIPLY(tmp5, FIX(0.164081699)); /* c11 */ + tmp11 = MULTIPLY(tmp2 + tmp3, - FIX(0.164081699)); /* -c11 */ + tmp12 += tmp11 - tmp15 - MULTIPLY(tmp2, FIX(2.079550144)) /* c1+c5-c11 */ + + MULTIPLY(tmp5, FIX(0.765261039)); /* c7 */ + tmp13 += tmp11 - tmp14 + MULTIPLY(tmp3, FIX(0.645144899)) /* c1+c11-c7 */ + - MULTIPLY(tmp5, FIX(0.997307603)); /* c5 */ + tmp11 = tmp15 + MULTIPLY(tmp0 - tmp3, FIX(1.161389302)) /* c3 */ + - MULTIPLY(tmp2 + tmp5, FIX(0.481063200)); /* c9 */ + + dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp10, CONST_BITS+1); + dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp11, CONST_BITS+1); + dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12, CONST_BITS+1); + dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp13, CONST_BITS+1); + + dataptr++; /* advance pointer to next column */ + wsptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 13x13 sample block. + */ + +GLOBAL(void) +jpeg_fdct_13x13 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6; + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; + INT32 z1, z2; + DCTELEM workspace[8*5]; + DCTELEM *dataptr; + DCTELEM *wsptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT. + * cK represents sqrt(2) * cos(K*pi/26). + */ + + dataptr = data; + ctr = 0; + for (;;) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[12]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[11]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[10]); + tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[9]); + tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[8]); + tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[7]); + tmp6 = GETJSAMPLE(elemptr[6]); + + tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[12]); + tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[11]); + tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[10]); + tmp13 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[9]); + tmp14 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[8]); + tmp15 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[7]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + (tmp0 + tmp1 + tmp2 + tmp3 + tmp4 + tmp5 + tmp6 - 13 * CENTERJSAMPLE); + tmp6 += tmp6; + tmp0 -= tmp6; + tmp1 -= tmp6; + tmp2 -= tmp6; + tmp3 -= tmp6; + tmp4 -= tmp6; + tmp5 -= tmp6; + dataptr[2] = (DCTELEM) + DESCALE(MULTIPLY(tmp0, FIX(1.373119086)) + /* c2 */ + MULTIPLY(tmp1, FIX(1.058554052)) + /* c6 */ + MULTIPLY(tmp2, FIX(0.501487041)) - /* c10 */ + MULTIPLY(tmp3, FIX(0.170464608)) - /* c12 */ + MULTIPLY(tmp4, FIX(0.803364869)) - /* c8 */ + MULTIPLY(tmp5, FIX(1.252223920)), /* c4 */ + CONST_BITS); + z1 = MULTIPLY(tmp0 - tmp2, FIX(1.155388986)) - /* (c4+c6)/2 */ + MULTIPLY(tmp3 - tmp4, FIX(0.435816023)) - /* (c2-c10)/2 */ + MULTIPLY(tmp1 - tmp5, FIX(0.316450131)); /* (c8-c12)/2 */ + z2 = MULTIPLY(tmp0 + tmp2, FIX(0.096834934)) - /* (c4-c6)/2 */ + MULTIPLY(tmp3 + tmp4, FIX(0.937303064)) + /* (c2+c10)/2 */ + MULTIPLY(tmp1 + tmp5, FIX(0.486914739)); /* (c8+c12)/2 */ + + dataptr[4] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS); + dataptr[6] = (DCTELEM) DESCALE(z1 - z2, CONST_BITS); + + /* Odd part */ + + tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.322312651)); /* c3 */ + tmp2 = MULTIPLY(tmp10 + tmp12, FIX(1.163874945)); /* c5 */ + tmp3 = MULTIPLY(tmp10 + tmp13, FIX(0.937797057)) + /* c7 */ + MULTIPLY(tmp14 + tmp15, FIX(0.338443458)); /* c11 */ + tmp0 = tmp1 + tmp2 + tmp3 - + MULTIPLY(tmp10, FIX(2.020082300)) + /* c3+c5+c7-c1 */ + MULTIPLY(tmp14, FIX(0.318774355)); /* c9-c11 */ + tmp4 = MULTIPLY(tmp14 - tmp15, FIX(0.937797057)) - /* c7 */ + MULTIPLY(tmp11 + tmp12, FIX(0.338443458)); /* c11 */ + tmp5 = MULTIPLY(tmp11 + tmp13, - FIX(1.163874945)); /* -c5 */ + tmp1 += tmp4 + tmp5 + + MULTIPLY(tmp11, FIX(0.837223564)) - /* c5+c9+c11-c3 */ + MULTIPLY(tmp14, FIX(2.341699410)); /* c1+c7 */ + tmp6 = MULTIPLY(tmp12 + tmp13, - FIX(0.657217813)); /* -c9 */ + tmp2 += tmp4 + tmp6 - + MULTIPLY(tmp12, FIX(1.572116027)) + /* c1+c5-c9-c11 */ + MULTIPLY(tmp15, FIX(2.260109708)); /* c3+c7 */ + tmp3 += tmp5 + tmp6 + + MULTIPLY(tmp13, FIX(2.205608352)) - /* c3+c5+c9-c7 */ + MULTIPLY(tmp15, FIX(1.742345811)); /* c1+c11 */ + + dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS); + dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS); + dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS); + dataptr[7] = (DCTELEM) DESCALE(tmp3, CONST_BITS); + + ctr++; + + if (ctr != DCTSIZE) { + if (ctr == 13) + break; /* Done. */ + dataptr += DCTSIZE; /* advance pointer to next row */ + } else + dataptr = workspace; /* switch pointer to extended workspace */ + } + + /* Pass 2: process columns. + * We leave the results scaled up by an overall factor of 8. + * We must also scale the output by (8/13)**2 = 64/169, which we partially + * fold into the constant multipliers and final shifting: + * cK now represents sqrt(2) * cos(K*pi/26) * 128/169. + */ + + dataptr = data; + wsptr = workspace; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*4]; + tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*3]; + tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*2]; + tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*1]; + tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*0]; + tmp5 = dataptr[DCTSIZE*5] + dataptr[DCTSIZE*7]; + tmp6 = dataptr[DCTSIZE*6]; + + tmp10 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*4]; + tmp11 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*3]; + tmp12 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*2]; + tmp13 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*1]; + tmp14 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*0]; + tmp15 = dataptr[DCTSIZE*5] - dataptr[DCTSIZE*7]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(tmp0 + tmp1 + tmp2 + tmp3 + tmp4 + tmp5 + tmp6, + FIX(0.757396450)), /* 128/169 */ + CONST_BITS+1); + tmp6 += tmp6; + tmp0 -= tmp6; + tmp1 -= tmp6; + tmp2 -= tmp6; + tmp3 -= tmp6; + tmp4 -= tmp6; + tmp5 -= tmp6; + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(MULTIPLY(tmp0, FIX(1.039995521)) + /* c2 */ + MULTIPLY(tmp1, FIX(0.801745081)) + /* c6 */ + MULTIPLY(tmp2, FIX(0.379824504)) - /* c10 */ + MULTIPLY(tmp3, FIX(0.129109289)) - /* c12 */ + MULTIPLY(tmp4, FIX(0.608465700)) - /* c8 */ + MULTIPLY(tmp5, FIX(0.948429952)), /* c4 */ + CONST_BITS+1); + z1 = MULTIPLY(tmp0 - tmp2, FIX(0.875087516)) - /* (c4+c6)/2 */ + MULTIPLY(tmp3 - tmp4, FIX(0.330085509)) - /* (c2-c10)/2 */ + MULTIPLY(tmp1 - tmp5, FIX(0.239678205)); /* (c8-c12)/2 */ + z2 = MULTIPLY(tmp0 + tmp2, FIX(0.073342435)) - /* (c4-c6)/2 */ + MULTIPLY(tmp3 + tmp4, FIX(0.709910013)) + /* (c2+c10)/2 */ + MULTIPLY(tmp1 + tmp5, FIX(0.368787494)); /* (c8+c12)/2 */ + + dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS+1); + dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 - z2, CONST_BITS+1); + + /* Odd part */ + + tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.001514908)); /* c3 */ + tmp2 = MULTIPLY(tmp10 + tmp12, FIX(0.881514751)); /* c5 */ + tmp3 = MULTIPLY(tmp10 + tmp13, FIX(0.710284161)) + /* c7 */ + MULTIPLY(tmp14 + tmp15, FIX(0.256335874)); /* c11 */ + tmp0 = tmp1 + tmp2 + tmp3 - + MULTIPLY(tmp10, FIX(1.530003162)) + /* c3+c5+c7-c1 */ + MULTIPLY(tmp14, FIX(0.241438564)); /* c9-c11 */ + tmp4 = MULTIPLY(tmp14 - tmp15, FIX(0.710284161)) - /* c7 */ + MULTIPLY(tmp11 + tmp12, FIX(0.256335874)); /* c11 */ + tmp5 = MULTIPLY(tmp11 + tmp13, - FIX(0.881514751)); /* -c5 */ + tmp1 += tmp4 + tmp5 + + MULTIPLY(tmp11, FIX(0.634110155)) - /* c5+c9+c11-c3 */ + MULTIPLY(tmp14, FIX(1.773594819)); /* c1+c7 */ + tmp6 = MULTIPLY(tmp12 + tmp13, - FIX(0.497774438)); /* -c9 */ + tmp2 += tmp4 + tmp6 - + MULTIPLY(tmp12, FIX(1.190715098)) + /* c1+c5-c9-c11 */ + MULTIPLY(tmp15, FIX(1.711799069)); /* c3+c7 */ + tmp3 += tmp5 + tmp6 + + MULTIPLY(tmp13, FIX(1.670519935)) - /* c3+c5+c9-c7 */ + MULTIPLY(tmp15, FIX(1.319646532)); /* c1+c11 */ + + dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+1); + dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+1); + dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+1); + dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp3, CONST_BITS+1); + + dataptr++; /* advance pointer to next column */ + wsptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 14x14 sample block. + */ + +GLOBAL(void) +jpeg_fdct_14x14 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6; + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; + DCTELEM workspace[8*6]; + DCTELEM *dataptr; + DCTELEM *wsptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT. + * cK represents sqrt(2) * cos(K*pi/28). + */ + + dataptr = data; + ctr = 0; + for (;;) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[13]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[12]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[11]); + tmp13 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[10]); + tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[9]); + tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[8]); + tmp6 = GETJSAMPLE(elemptr[6]) + GETJSAMPLE(elemptr[7]); + + tmp10 = tmp0 + tmp6; + tmp14 = tmp0 - tmp6; + tmp11 = tmp1 + tmp5; + tmp15 = tmp1 - tmp5; + tmp12 = tmp2 + tmp4; + tmp16 = tmp2 - tmp4; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[13]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[12]); + tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[11]); + tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[10]); + tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[9]); + tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[8]); + tmp6 = GETJSAMPLE(elemptr[6]) - GETJSAMPLE(elemptr[7]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + (tmp10 + tmp11 + tmp12 + tmp13 - 14 * CENTERJSAMPLE); + tmp13 += tmp13; + dataptr[4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.274162392)) + /* c4 */ + MULTIPLY(tmp11 - tmp13, FIX(0.314692123)) - /* c12 */ + MULTIPLY(tmp12 - tmp13, FIX(0.881747734)), /* c8 */ + CONST_BITS); + + tmp10 = MULTIPLY(tmp14 + tmp15, FIX(1.105676686)); /* c6 */ + + dataptr[2] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp14, FIX(0.273079590)) /* c2-c6 */ + + MULTIPLY(tmp16, FIX(0.613604268)), /* c10 */ + CONST_BITS); + dataptr[6] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp15, FIX(1.719280954)) /* c6+c10 */ + - MULTIPLY(tmp16, FIX(1.378756276)), /* c2 */ + CONST_BITS); + + /* Odd part */ + + tmp10 = tmp1 + tmp2; + tmp11 = tmp5 - tmp4; + dataptr[7] = (DCTELEM) (tmp0 - tmp10 + tmp3 - tmp11 - tmp6); + tmp3 <<= CONST_BITS; + tmp10 = MULTIPLY(tmp10, - FIX(0.158341681)); /* -c13 */ + tmp11 = MULTIPLY(tmp11, FIX(1.405321284)); /* c1 */ + tmp10 += tmp11 - tmp3; + tmp11 = MULTIPLY(tmp0 + tmp2, FIX(1.197448846)) + /* c5 */ + MULTIPLY(tmp4 + tmp6, FIX(0.752406978)); /* c9 */ + dataptr[5] = (DCTELEM) + DESCALE(tmp10 + tmp11 - MULTIPLY(tmp2, FIX(2.373959773)) /* c3+c5-c13 */ + + MULTIPLY(tmp4, FIX(1.119999435)), /* c1+c11-c9 */ + CONST_BITS); + tmp12 = MULTIPLY(tmp0 + tmp1, FIX(1.334852607)) + /* c3 */ + MULTIPLY(tmp5 - tmp6, FIX(0.467085129)); /* c11 */ + dataptr[3] = (DCTELEM) + DESCALE(tmp10 + tmp12 - MULTIPLY(tmp1, FIX(0.424103948)) /* c3-c9-c13 */ + - MULTIPLY(tmp5, FIX(3.069855259)), /* c1+c5+c11 */ + CONST_BITS); + dataptr[1] = (DCTELEM) + DESCALE(tmp11 + tmp12 + tmp3 + tmp6 - + MULTIPLY(tmp0 + tmp6, FIX(1.126980169)), /* c3+c5-c1 */ + CONST_BITS); + + ctr++; + + if (ctr != DCTSIZE) { + if (ctr == 14) + break; /* Done. */ + dataptr += DCTSIZE; /* advance pointer to next row */ + } else + dataptr = workspace; /* switch pointer to extended workspace */ + } + + /* Pass 2: process columns. + * We leave the results scaled up by an overall factor of 8. + * We must also scale the output by (8/14)**2 = 16/49, which we partially + * fold into the constant multipliers and final shifting: + * cK now represents sqrt(2) * cos(K*pi/28) * 32/49. + */ + + dataptr = data; + wsptr = workspace; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*5]; + tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*4]; + tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*3]; + tmp13 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*2]; + tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*1]; + tmp5 = dataptr[DCTSIZE*5] + wsptr[DCTSIZE*0]; + tmp6 = dataptr[DCTSIZE*6] + dataptr[DCTSIZE*7]; + + tmp10 = tmp0 + tmp6; + tmp14 = tmp0 - tmp6; + tmp11 = tmp1 + tmp5; + tmp15 = tmp1 - tmp5; + tmp12 = tmp2 + tmp4; + tmp16 = tmp2 - tmp4; + + tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*5]; + tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*4]; + tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*3]; + tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*2]; + tmp4 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*1]; + tmp5 = dataptr[DCTSIZE*5] - wsptr[DCTSIZE*0]; + tmp6 = dataptr[DCTSIZE*6] - dataptr[DCTSIZE*7]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12 + tmp13, + FIX(0.653061224)), /* 32/49 */ + CONST_BITS+1); + tmp13 += tmp13; + dataptr[DCTSIZE*4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp13, FIX(0.832106052)) + /* c4 */ + MULTIPLY(tmp11 - tmp13, FIX(0.205513223)) - /* c12 */ + MULTIPLY(tmp12 - tmp13, FIX(0.575835255)), /* c8 */ + CONST_BITS+1); + + tmp10 = MULTIPLY(tmp14 + tmp15, FIX(0.722074570)); /* c6 */ + + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp14, FIX(0.178337691)) /* c2-c6 */ + + MULTIPLY(tmp16, FIX(0.400721155)), /* c10 */ + CONST_BITS+1); + dataptr[DCTSIZE*6] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp15, FIX(1.122795725)) /* c6+c10 */ + - MULTIPLY(tmp16, FIX(0.900412262)), /* c2 */ + CONST_BITS+1); + + /* Odd part */ + + tmp10 = tmp1 + tmp2; + tmp11 = tmp5 - tmp4; + dataptr[DCTSIZE*7] = (DCTELEM) + DESCALE(MULTIPLY(tmp0 - tmp10 + tmp3 - tmp11 - tmp6, + FIX(0.653061224)), /* 32/49 */ + CONST_BITS+1); + tmp3 = MULTIPLY(tmp3 , FIX(0.653061224)); /* 32/49 */ + tmp10 = MULTIPLY(tmp10, - FIX(0.103406812)); /* -c13 */ + tmp11 = MULTIPLY(tmp11, FIX(0.917760839)); /* c1 */ + tmp10 += tmp11 - tmp3; + tmp11 = MULTIPLY(tmp0 + tmp2, FIX(0.782007410)) + /* c5 */ + MULTIPLY(tmp4 + tmp6, FIX(0.491367823)); /* c9 */ + dataptr[DCTSIZE*5] = (DCTELEM) + DESCALE(tmp10 + tmp11 - MULTIPLY(tmp2, FIX(1.550341076)) /* c3+c5-c13 */ + + MULTIPLY(tmp4, FIX(0.731428202)), /* c1+c11-c9 */ + CONST_BITS+1); + tmp12 = MULTIPLY(tmp0 + tmp1, FIX(0.871740478)) + /* c3 */ + MULTIPLY(tmp5 - tmp6, FIX(0.305035186)); /* c11 */ + dataptr[DCTSIZE*3] = (DCTELEM) + DESCALE(tmp10 + tmp12 - MULTIPLY(tmp1, FIX(0.276965844)) /* c3-c9-c13 */ + - MULTIPLY(tmp5, FIX(2.004803435)), /* c1+c5+c11 */ + CONST_BITS+1); + dataptr[DCTSIZE*1] = (DCTELEM) + DESCALE(tmp11 + tmp12 + tmp3 + - MULTIPLY(tmp0, FIX(0.735987049)) /* c3+c5-c1 */ + - MULTIPLY(tmp6, FIX(0.082925825)), /* c9-c11-c13 */ + CONST_BITS+1); + + dataptr++; /* advance pointer to next column */ + wsptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 15x15 sample block. + */ + +GLOBAL(void) +jpeg_fdct_15x15 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; + INT32 z1, z2, z3; + DCTELEM workspace[8*7]; + DCTELEM *dataptr; + DCTELEM *wsptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT. + * cK represents sqrt(2) * cos(K*pi/30). + */ + + dataptr = data; + ctr = 0; + for (;;) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[14]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[13]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[12]); + tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[11]); + tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[10]); + tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[9]); + tmp6 = GETJSAMPLE(elemptr[6]) + GETJSAMPLE(elemptr[8]); + tmp7 = GETJSAMPLE(elemptr[7]); + + tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[14]); + tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[13]); + tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[12]); + tmp13 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[11]); + tmp14 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[10]); + tmp15 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[9]); + tmp16 = GETJSAMPLE(elemptr[6]) - GETJSAMPLE(elemptr[8]); + + z1 = tmp0 + tmp4 + tmp5; + z2 = tmp1 + tmp3 + tmp6; + z3 = tmp2 + tmp7; + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) (z1 + z2 + z3 - 15 * CENTERJSAMPLE); + z3 += z3; + dataptr[6] = (DCTELEM) + DESCALE(MULTIPLY(z1 - z3, FIX(1.144122806)) - /* c6 */ + MULTIPLY(z2 - z3, FIX(0.437016024)), /* c12 */ + CONST_BITS); + tmp2 += ((tmp1 + tmp4) >> 1) - tmp7 - tmp7; + z1 = MULTIPLY(tmp3 - tmp2, FIX(1.531135173)) - /* c2+c14 */ + MULTIPLY(tmp6 - tmp2, FIX(2.238241955)); /* c4+c8 */ + z2 = MULTIPLY(tmp5 - tmp2, FIX(0.798468008)) - /* c8-c14 */ + MULTIPLY(tmp0 - tmp2, FIX(0.091361227)); /* c2-c4 */ + z3 = MULTIPLY(tmp0 - tmp3, FIX(1.383309603)) + /* c2 */ + MULTIPLY(tmp6 - tmp5, FIX(0.946293579)) + /* c8 */ + MULTIPLY(tmp1 - tmp4, FIX(0.790569415)); /* (c6+c12)/2 */ + + dataptr[2] = (DCTELEM) DESCALE(z1 + z3, CONST_BITS); + dataptr[4] = (DCTELEM) DESCALE(z2 + z3, CONST_BITS); + + /* Odd part */ + + tmp2 = MULTIPLY(tmp10 - tmp12 - tmp13 + tmp15 + tmp16, + FIX(1.224744871)); /* c5 */ + tmp1 = MULTIPLY(tmp10 - tmp14 - tmp15, FIX(1.344997024)) + /* c3 */ + MULTIPLY(tmp11 - tmp13 - tmp16, FIX(0.831253876)); /* c9 */ + tmp12 = MULTIPLY(tmp12, FIX(1.224744871)); /* c5 */ + tmp4 = MULTIPLY(tmp10 - tmp16, FIX(1.406466353)) + /* c1 */ + MULTIPLY(tmp11 + tmp14, FIX(1.344997024)) + /* c3 */ + MULTIPLY(tmp13 + tmp15, FIX(0.575212477)); /* c11 */ + tmp0 = MULTIPLY(tmp13, FIX(0.475753014)) - /* c7-c11 */ + MULTIPLY(tmp14, FIX(0.513743148)) + /* c3-c9 */ + MULTIPLY(tmp16, FIX(1.700497885)) + tmp4 + tmp12; /* c1+c13 */ + tmp3 = MULTIPLY(tmp10, - FIX(0.355500862)) - /* -(c1-c7) */ + MULTIPLY(tmp11, FIX(2.176250899)) - /* c3+c9 */ + MULTIPLY(tmp15, FIX(0.869244010)) + tmp4 - tmp12; /* c11+c13 */ + + dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS); + dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS); + dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS); + dataptr[7] = (DCTELEM) DESCALE(tmp3, CONST_BITS); + + ctr++; + + if (ctr != DCTSIZE) { + if (ctr == 15) + break; /* Done. */ + dataptr += DCTSIZE; /* advance pointer to next row */ + } else + dataptr = workspace; /* switch pointer to extended workspace */ + } + + /* Pass 2: process columns. + * We leave the results scaled up by an overall factor of 8. + * We must also scale the output by (8/15)**2 = 64/225, which we partially + * fold into the constant multipliers and final shifting: + * cK now represents sqrt(2) * cos(K*pi/30) * 256/225. + */ + + dataptr = data; + wsptr = workspace; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*6]; + tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*5]; + tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*4]; + tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*3]; + tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*2]; + tmp5 = dataptr[DCTSIZE*5] + wsptr[DCTSIZE*1]; + tmp6 = dataptr[DCTSIZE*6] + wsptr[DCTSIZE*0]; + tmp7 = dataptr[DCTSIZE*7]; + + tmp10 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*6]; + tmp11 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*5]; + tmp12 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*4]; + tmp13 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*3]; + tmp14 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*2]; + tmp15 = dataptr[DCTSIZE*5] - wsptr[DCTSIZE*1]; + tmp16 = dataptr[DCTSIZE*6] - wsptr[DCTSIZE*0]; + + z1 = tmp0 + tmp4 + tmp5; + z2 = tmp1 + tmp3 + tmp6; + z3 = tmp2 + tmp7; + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(z1 + z2 + z3, FIX(1.137777778)), /* 256/225 */ + CONST_BITS+2); + z3 += z3; + dataptr[DCTSIZE*6] = (DCTELEM) + DESCALE(MULTIPLY(z1 - z3, FIX(1.301757503)) - /* c6 */ + MULTIPLY(z2 - z3, FIX(0.497227121)), /* c12 */ + CONST_BITS+2); + tmp2 += ((tmp1 + tmp4) >> 1) - tmp7 - tmp7; + z1 = MULTIPLY(tmp3 - tmp2, FIX(1.742091575)) - /* c2+c14 */ + MULTIPLY(tmp6 - tmp2, FIX(2.546621957)); /* c4+c8 */ + z2 = MULTIPLY(tmp5 - tmp2, FIX(0.908479156)) - /* c8-c14 */ + MULTIPLY(tmp0 - tmp2, FIX(0.103948774)); /* c2-c4 */ + z3 = MULTIPLY(tmp0 - tmp3, FIX(1.573898926)) + /* c2 */ + MULTIPLY(tmp6 - tmp5, FIX(1.076671805)) + /* c8 */ + MULTIPLY(tmp1 - tmp4, FIX(0.899492312)); /* (c6+c12)/2 */ + + dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + z3, CONST_BITS+2); + dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(z2 + z3, CONST_BITS+2); + + /* Odd part */ + + tmp2 = MULTIPLY(tmp10 - tmp12 - tmp13 + tmp15 + tmp16, + FIX(1.393487498)); /* c5 */ + tmp1 = MULTIPLY(tmp10 - tmp14 - tmp15, FIX(1.530307725)) + /* c3 */ + MULTIPLY(tmp11 - tmp13 - tmp16, FIX(0.945782187)); /* c9 */ + tmp12 = MULTIPLY(tmp12, FIX(1.393487498)); /* c5 */ + tmp4 = MULTIPLY(tmp10 - tmp16, FIX(1.600246161)) + /* c1 */ + MULTIPLY(tmp11 + tmp14, FIX(1.530307725)) + /* c3 */ + MULTIPLY(tmp13 + tmp15, FIX(0.654463974)); /* c11 */ + tmp0 = MULTIPLY(tmp13, FIX(0.541301207)) - /* c7-c11 */ + MULTIPLY(tmp14, FIX(0.584525538)) + /* c3-c9 */ + MULTIPLY(tmp16, FIX(1.934788705)) + tmp4 + tmp12; /* c1+c13 */ + tmp3 = MULTIPLY(tmp10, - FIX(0.404480980)) - /* -(c1-c7) */ + MULTIPLY(tmp11, FIX(2.476089912)) - /* c3+c9 */ + MULTIPLY(tmp15, FIX(0.989006518)) + tmp4 - tmp12; /* c11+c13 */ + + dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+2); + dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+2); + dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+2); + dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp3, CONST_BITS+2); + + dataptr++; /* advance pointer to next column */ + wsptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 16x16 sample block. + */ + +GLOBAL(void) +jpeg_fdct_16x16 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16, tmp17; + DCTELEM workspace[DCTSIZE2]; + DCTELEM *dataptr; + DCTELEM *wsptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * cK represents sqrt(2) * cos(K*pi/32). + */ + + dataptr = data; + ctr = 0; + for (;;) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[15]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[14]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[13]); + tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[12]); + tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[11]); + tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[10]); + tmp6 = GETJSAMPLE(elemptr[6]) + GETJSAMPLE(elemptr[9]); + tmp7 = GETJSAMPLE(elemptr[7]) + GETJSAMPLE(elemptr[8]); + + tmp10 = tmp0 + tmp7; + tmp14 = tmp0 - tmp7; + tmp11 = tmp1 + tmp6; + tmp15 = tmp1 - tmp6; + tmp12 = tmp2 + tmp5; + tmp16 = tmp2 - tmp5; + tmp13 = tmp3 + tmp4; + tmp17 = tmp3 - tmp4; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[15]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[14]); + tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[13]); + tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[12]); + tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[11]); + tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[10]); + tmp6 = GETJSAMPLE(elemptr[6]) - GETJSAMPLE(elemptr[9]); + tmp7 = GETJSAMPLE(elemptr[7]) - GETJSAMPLE(elemptr[8]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp10 + tmp11 + tmp12 + tmp13 - 16 * CENTERJSAMPLE) << PASS1_BITS); + dataptr[4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.306562965)) + /* c4[16] = c2[8] */ + MULTIPLY(tmp11 - tmp12, FIX_0_541196100), /* c12[16] = c6[8] */ + CONST_BITS-PASS1_BITS); + + tmp10 = MULTIPLY(tmp17 - tmp15, FIX(0.275899379)) + /* c14[16] = c7[8] */ + MULTIPLY(tmp14 - tmp16, FIX(1.387039845)); /* c2[16] = c1[8] */ + + dataptr[2] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp15, FIX(1.451774982)) /* c6+c14 */ + + MULTIPLY(tmp16, FIX(2.172734804)), /* c2+c10 */ + CONST_BITS-PASS1_BITS); + dataptr[6] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp14, FIX(0.211164243)) /* c2-c6 */ + - MULTIPLY(tmp17, FIX(1.061594338)), /* c10+c14 */ + CONST_BITS-PASS1_BITS); + + /* Odd part */ + + tmp11 = MULTIPLY(tmp0 + tmp1, FIX(1.353318001)) + /* c3 */ + MULTIPLY(tmp6 - tmp7, FIX(0.410524528)); /* c13 */ + tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.247225013)) + /* c5 */ + MULTIPLY(tmp5 + tmp7, FIX(0.666655658)); /* c11 */ + tmp13 = MULTIPLY(tmp0 + tmp3, FIX(1.093201867)) + /* c7 */ + MULTIPLY(tmp4 - tmp7, FIX(0.897167586)); /* c9 */ + tmp14 = MULTIPLY(tmp1 + tmp2, FIX(0.138617169)) + /* c15 */ + MULTIPLY(tmp6 - tmp5, FIX(1.407403738)); /* c1 */ + tmp15 = MULTIPLY(tmp1 + tmp3, - FIX(0.666655658)) + /* -c11 */ + MULTIPLY(tmp4 + tmp6, - FIX(1.247225013)); /* -c5 */ + tmp16 = MULTIPLY(tmp2 + tmp3, - FIX(1.353318001)) + /* -c3 */ + MULTIPLY(tmp5 - tmp4, FIX(0.410524528)); /* c13 */ + tmp10 = tmp11 + tmp12 + tmp13 - + MULTIPLY(tmp0, FIX(2.286341144)) + /* c7+c5+c3-c1 */ + MULTIPLY(tmp7, FIX(0.779653625)); /* c15+c13-c11+c9 */ + tmp11 += tmp14 + tmp15 + MULTIPLY(tmp1, FIX(0.071888074)) /* c9-c3-c15+c11 */ + - MULTIPLY(tmp6, FIX(1.663905119)); /* c7+c13+c1-c5 */ + tmp12 += tmp14 + tmp16 - MULTIPLY(tmp2, FIX(1.125726048)) /* c7+c5+c15-c3 */ + + MULTIPLY(tmp5, FIX(1.227391138)); /* c9-c11+c1-c13 */ + tmp13 += tmp15 + tmp16 + MULTIPLY(tmp3, FIX(1.065388962)) /* c15+c3+c11-c7 */ + + MULTIPLY(tmp4, FIX(2.167985692)); /* c1+c13+c5-c9 */ + + dataptr[1] = (DCTELEM) DESCALE(tmp10, CONST_BITS-PASS1_BITS); + dataptr[3] = (DCTELEM) DESCALE(tmp11, CONST_BITS-PASS1_BITS); + dataptr[5] = (DCTELEM) DESCALE(tmp12, CONST_BITS-PASS1_BITS); + dataptr[7] = (DCTELEM) DESCALE(tmp13, CONST_BITS-PASS1_BITS); + + ctr++; + + if (ctr != DCTSIZE) { + if (ctr == DCTSIZE * 2) + break; /* Done. */ + dataptr += DCTSIZE; /* advance pointer to next row */ + } else + dataptr = workspace; /* switch pointer to extended workspace */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * We must also scale the output by (8/16)**2 = 1/2**2. + * cK represents sqrt(2) * cos(K*pi/32). + */ + + dataptr = data; + wsptr = workspace; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*3]; + tmp5 = dataptr[DCTSIZE*5] + wsptr[DCTSIZE*2]; + tmp6 = dataptr[DCTSIZE*6] + wsptr[DCTSIZE*1]; + tmp7 = dataptr[DCTSIZE*7] + wsptr[DCTSIZE*0]; + + tmp10 = tmp0 + tmp7; + tmp14 = tmp0 - tmp7; + tmp11 = tmp1 + tmp6; + tmp15 = tmp1 - tmp6; + tmp12 = tmp2 + tmp5; + tmp16 = tmp2 - tmp5; + tmp13 = tmp3 + tmp4; + tmp17 = tmp3 - tmp4; + + tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*3]; + tmp5 = dataptr[DCTSIZE*5] - wsptr[DCTSIZE*2]; + tmp6 = dataptr[DCTSIZE*6] - wsptr[DCTSIZE*1]; + tmp7 = dataptr[DCTSIZE*7] - wsptr[DCTSIZE*0]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(tmp10 + tmp11 + tmp12 + tmp13, PASS1_BITS+2); + dataptr[DCTSIZE*4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.306562965)) + /* c4[16] = c2[8] */ + MULTIPLY(tmp11 - tmp12, FIX_0_541196100), /* c12[16] = c6[8] */ + CONST_BITS+PASS1_BITS+2); + + tmp10 = MULTIPLY(tmp17 - tmp15, FIX(0.275899379)) + /* c14[16] = c7[8] */ + MULTIPLY(tmp14 - tmp16, FIX(1.387039845)); /* c2[16] = c1[8] */ + + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp15, FIX(1.451774982)) /* c6+c14 */ + + MULTIPLY(tmp16, FIX(2.172734804)), /* c2+10 */ + CONST_BITS+PASS1_BITS+2); + dataptr[DCTSIZE*6] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp14, FIX(0.211164243)) /* c2-c6 */ + - MULTIPLY(tmp17, FIX(1.061594338)), /* c10+c14 */ + CONST_BITS+PASS1_BITS+2); + + /* Odd part */ + + tmp11 = MULTIPLY(tmp0 + tmp1, FIX(1.353318001)) + /* c3 */ + MULTIPLY(tmp6 - tmp7, FIX(0.410524528)); /* c13 */ + tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.247225013)) + /* c5 */ + MULTIPLY(tmp5 + tmp7, FIX(0.666655658)); /* c11 */ + tmp13 = MULTIPLY(tmp0 + tmp3, FIX(1.093201867)) + /* c7 */ + MULTIPLY(tmp4 - tmp7, FIX(0.897167586)); /* c9 */ + tmp14 = MULTIPLY(tmp1 + tmp2, FIX(0.138617169)) + /* c15 */ + MULTIPLY(tmp6 - tmp5, FIX(1.407403738)); /* c1 */ + tmp15 = MULTIPLY(tmp1 + tmp3, - FIX(0.666655658)) + /* -c11 */ + MULTIPLY(tmp4 + tmp6, - FIX(1.247225013)); /* -c5 */ + tmp16 = MULTIPLY(tmp2 + tmp3, - FIX(1.353318001)) + /* -c3 */ + MULTIPLY(tmp5 - tmp4, FIX(0.410524528)); /* c13 */ + tmp10 = tmp11 + tmp12 + tmp13 - + MULTIPLY(tmp0, FIX(2.286341144)) + /* c7+c5+c3-c1 */ + MULTIPLY(tmp7, FIX(0.779653625)); /* c15+c13-c11+c9 */ + tmp11 += tmp14 + tmp15 + MULTIPLY(tmp1, FIX(0.071888074)) /* c9-c3-c15+c11 */ + - MULTIPLY(tmp6, FIX(1.663905119)); /* c7+c13+c1-c5 */ + tmp12 += tmp14 + tmp16 - MULTIPLY(tmp2, FIX(1.125726048)) /* c7+c5+c15-c3 */ + + MULTIPLY(tmp5, FIX(1.227391138)); /* c9-c11+c1-c13 */ + tmp13 += tmp15 + tmp16 + MULTIPLY(tmp3, FIX(1.065388962)) /* c15+c3+c11-c7 */ + + MULTIPLY(tmp4, FIX(2.167985692)); /* c1+c13+c5-c9 */ + + dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp10, CONST_BITS+PASS1_BITS+2); + dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp11, CONST_BITS+PASS1_BITS+2); + dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12, CONST_BITS+PASS1_BITS+2); + dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp13, CONST_BITS+PASS1_BITS+2); + + dataptr++; /* advance pointer to next column */ + wsptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 16x8 sample block. + * + * 16-point FDCT in pass 1 (rows), 8-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_16x8 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16, tmp17; + INT32 z1; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * 16-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/32). + */ + + dataptr = data; + ctr = 0; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[15]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[14]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[13]); + tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[12]); + tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[11]); + tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[10]); + tmp6 = GETJSAMPLE(elemptr[6]) + GETJSAMPLE(elemptr[9]); + tmp7 = GETJSAMPLE(elemptr[7]) + GETJSAMPLE(elemptr[8]); + + tmp10 = tmp0 + tmp7; + tmp14 = tmp0 - tmp7; + tmp11 = tmp1 + tmp6; + tmp15 = tmp1 - tmp6; + tmp12 = tmp2 + tmp5; + tmp16 = tmp2 - tmp5; + tmp13 = tmp3 + tmp4; + tmp17 = tmp3 - tmp4; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[15]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[14]); + tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[13]); + tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[12]); + tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[11]); + tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[10]); + tmp6 = GETJSAMPLE(elemptr[6]) - GETJSAMPLE(elemptr[9]); + tmp7 = GETJSAMPLE(elemptr[7]) - GETJSAMPLE(elemptr[8]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp10 + tmp11 + tmp12 + tmp13 - 16 * CENTERJSAMPLE) << PASS1_BITS); + dataptr[4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.306562965)) + /* c4[16] = c2[8] */ + MULTIPLY(tmp11 - tmp12, FIX_0_541196100), /* c12[16] = c6[8] */ + CONST_BITS-PASS1_BITS); + + tmp10 = MULTIPLY(tmp17 - tmp15, FIX(0.275899379)) + /* c14[16] = c7[8] */ + MULTIPLY(tmp14 - tmp16, FIX(1.387039845)); /* c2[16] = c1[8] */ + + dataptr[2] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp15, FIX(1.451774982)) /* c6+c14 */ + + MULTIPLY(tmp16, FIX(2.172734804)), /* c2+c10 */ + CONST_BITS-PASS1_BITS); + dataptr[6] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp14, FIX(0.211164243)) /* c2-c6 */ + - MULTIPLY(tmp17, FIX(1.061594338)), /* c10+c14 */ + CONST_BITS-PASS1_BITS); + + /* Odd part */ + + tmp11 = MULTIPLY(tmp0 + tmp1, FIX(1.353318001)) + /* c3 */ + MULTIPLY(tmp6 - tmp7, FIX(0.410524528)); /* c13 */ + tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.247225013)) + /* c5 */ + MULTIPLY(tmp5 + tmp7, FIX(0.666655658)); /* c11 */ + tmp13 = MULTIPLY(tmp0 + tmp3, FIX(1.093201867)) + /* c7 */ + MULTIPLY(tmp4 - tmp7, FIX(0.897167586)); /* c9 */ + tmp14 = MULTIPLY(tmp1 + tmp2, FIX(0.138617169)) + /* c15 */ + MULTIPLY(tmp6 - tmp5, FIX(1.407403738)); /* c1 */ + tmp15 = MULTIPLY(tmp1 + tmp3, - FIX(0.666655658)) + /* -c11 */ + MULTIPLY(tmp4 + tmp6, - FIX(1.247225013)); /* -c5 */ + tmp16 = MULTIPLY(tmp2 + tmp3, - FIX(1.353318001)) + /* -c3 */ + MULTIPLY(tmp5 - tmp4, FIX(0.410524528)); /* c13 */ + tmp10 = tmp11 + tmp12 + tmp13 - + MULTIPLY(tmp0, FIX(2.286341144)) + /* c7+c5+c3-c1 */ + MULTIPLY(tmp7, FIX(0.779653625)); /* c15+c13-c11+c9 */ + tmp11 += tmp14 + tmp15 + MULTIPLY(tmp1, FIX(0.071888074)) /* c9-c3-c15+c11 */ + - MULTIPLY(tmp6, FIX(1.663905119)); /* c7+c13+c1-c5 */ + tmp12 += tmp14 + tmp16 - MULTIPLY(tmp2, FIX(1.125726048)) /* c7+c5+c15-c3 */ + + MULTIPLY(tmp5, FIX(1.227391138)); /* c9-c11+c1-c13 */ + tmp13 += tmp15 + tmp16 + MULTIPLY(tmp3, FIX(1.065388962)) /* c15+c3+c11-c7 */ + + MULTIPLY(tmp4, FIX(2.167985692)); /* c1+c13+c5-c9 */ + + dataptr[1] = (DCTELEM) DESCALE(tmp10, CONST_BITS-PASS1_BITS); + dataptr[3] = (DCTELEM) DESCALE(tmp11, CONST_BITS-PASS1_BITS); + dataptr[5] = (DCTELEM) DESCALE(tmp12, CONST_BITS-PASS1_BITS); + dataptr[7] = (DCTELEM) DESCALE(tmp13, CONST_BITS-PASS1_BITS); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * We must also scale the output by 8/16 = 1/2. + * 8-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/16). + */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + /* Even part per LL&M figure 1 --- note that published figure is faulty; + * rotator "c1" should be "c6". + */ + + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; + + tmp10 = tmp0 + tmp3; + tmp12 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp13 = tmp1 - tmp2; + + tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; + + dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp11, PASS1_BITS+1); + dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp10 - tmp11, PASS1_BITS+1); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); /* c6 */ + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(z1 + MULTIPLY(tmp12, FIX_0_765366865), /* c2-c6 */ + CONST_BITS+PASS1_BITS+1); + dataptr[DCTSIZE*6] = (DCTELEM) + DESCALE(z1 - MULTIPLY(tmp13, FIX_1_847759065), /* c2+c6 */ + CONST_BITS+PASS1_BITS+1); + + /* Odd part per figure 8 --- note paper omits factor of sqrt(2). + * i0..i3 in the paper are tmp0..tmp3 here. + */ + + tmp12 = tmp0 + tmp2; + tmp13 = tmp1 + tmp3; + + z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */ + tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* -c3+c5 */ + tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */ + tmp12 += z1; + tmp13 += z1; + + z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ + tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */ + tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */ + tmp0 += z1 + tmp12; + tmp3 += z1 + tmp13; + + z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ + tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */ + tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */ + tmp1 += z1 + tmp13; + tmp2 += z1 + tmp12; + + dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+PASS1_BITS+1); + dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+PASS1_BITS+1); + dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+PASS1_BITS+1); + dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp3, CONST_BITS+PASS1_BITS+1); + + dataptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 14x7 sample block. + * + * 14-point FDCT in pass 1 (rows), 7-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_14x7 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6; + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; + INT32 z1, z2, z3; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Zero bottom row of output coefficient block. */ + MEMZERO(&data[DCTSIZE*7], SIZEOF(DCTELEM) * DCTSIZE); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * 14-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/28). + */ + + dataptr = data; + for (ctr = 0; ctr < 7; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[13]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[12]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[11]); + tmp13 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[10]); + tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[9]); + tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[8]); + tmp6 = GETJSAMPLE(elemptr[6]) + GETJSAMPLE(elemptr[7]); + + tmp10 = tmp0 + tmp6; + tmp14 = tmp0 - tmp6; + tmp11 = tmp1 + tmp5; + tmp15 = tmp1 - tmp5; + tmp12 = tmp2 + tmp4; + tmp16 = tmp2 - tmp4; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[13]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[12]); + tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[11]); + tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[10]); + tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[9]); + tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[8]); + tmp6 = GETJSAMPLE(elemptr[6]) - GETJSAMPLE(elemptr[7]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp10 + tmp11 + tmp12 + tmp13 - 14 * CENTERJSAMPLE) << PASS1_BITS); + tmp13 += tmp13; + dataptr[4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.274162392)) + /* c4 */ + MULTIPLY(tmp11 - tmp13, FIX(0.314692123)) - /* c12 */ + MULTIPLY(tmp12 - tmp13, FIX(0.881747734)), /* c8 */ + CONST_BITS-PASS1_BITS); + + tmp10 = MULTIPLY(tmp14 + tmp15, FIX(1.105676686)); /* c6 */ + + dataptr[2] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp14, FIX(0.273079590)) /* c2-c6 */ + + MULTIPLY(tmp16, FIX(0.613604268)), /* c10 */ + CONST_BITS-PASS1_BITS); + dataptr[6] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp15, FIX(1.719280954)) /* c6+c10 */ + - MULTIPLY(tmp16, FIX(1.378756276)), /* c2 */ + CONST_BITS-PASS1_BITS); + + /* Odd part */ + + tmp10 = tmp1 + tmp2; + tmp11 = tmp5 - tmp4; + dataptr[7] = (DCTELEM) ((tmp0 - tmp10 + tmp3 - tmp11 - tmp6) << PASS1_BITS); + tmp3 <<= CONST_BITS; + tmp10 = MULTIPLY(tmp10, - FIX(0.158341681)); /* -c13 */ + tmp11 = MULTIPLY(tmp11, FIX(1.405321284)); /* c1 */ + tmp10 += tmp11 - tmp3; + tmp11 = MULTIPLY(tmp0 + tmp2, FIX(1.197448846)) + /* c5 */ + MULTIPLY(tmp4 + tmp6, FIX(0.752406978)); /* c9 */ + dataptr[5] = (DCTELEM) + DESCALE(tmp10 + tmp11 - MULTIPLY(tmp2, FIX(2.373959773)) /* c3+c5-c13 */ + + MULTIPLY(tmp4, FIX(1.119999435)), /* c1+c11-c9 */ + CONST_BITS-PASS1_BITS); + tmp12 = MULTIPLY(tmp0 + tmp1, FIX(1.334852607)) + /* c3 */ + MULTIPLY(tmp5 - tmp6, FIX(0.467085129)); /* c11 */ + dataptr[3] = (DCTELEM) + DESCALE(tmp10 + tmp12 - MULTIPLY(tmp1, FIX(0.424103948)) /* c3-c9-c13 */ + - MULTIPLY(tmp5, FIX(3.069855259)), /* c1+c5+c11 */ + CONST_BITS-PASS1_BITS); + dataptr[1] = (DCTELEM) + DESCALE(tmp11 + tmp12 + tmp3 + tmp6 - + MULTIPLY(tmp0 + tmp6, FIX(1.126980169)), /* c3+c5-c1 */ + CONST_BITS-PASS1_BITS); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * We must also scale the output by (8/14)*(8/7) = 32/49, which we + * partially fold into the constant multipliers and final shifting: + * 7-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/14) * 64/49. + */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*6]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*5]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*4]; + tmp3 = dataptr[DCTSIZE*3]; + + tmp10 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*6]; + tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*5]; + tmp12 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*4]; + + z1 = tmp0 + tmp2; + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(z1 + tmp1 + tmp3, FIX(1.306122449)), /* 64/49 */ + CONST_BITS+PASS1_BITS+1); + tmp3 += tmp3; + z1 -= tmp3; + z1 -= tmp3; + z1 = MULTIPLY(z1, FIX(0.461784020)); /* (c2+c6-c4)/2 */ + z2 = MULTIPLY(tmp0 - tmp2, FIX(1.202428084)); /* (c2+c4-c6)/2 */ + z3 = MULTIPLY(tmp1 - tmp2, FIX(0.411026446)); /* c6 */ + dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + z2 + z3, CONST_BITS+PASS1_BITS+1); + z1 -= z2; + z2 = MULTIPLY(tmp0 - tmp1, FIX(1.151670509)); /* c4 */ + dataptr[DCTSIZE*4] = (DCTELEM) + DESCALE(z2 + z3 - MULTIPLY(tmp1 - tmp3, FIX(0.923568041)), /* c2+c6-c4 */ + CONST_BITS+PASS1_BITS+1); + dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS+PASS1_BITS+1); + + /* Odd part */ + + tmp1 = MULTIPLY(tmp10 + tmp11, FIX(1.221765677)); /* (c3+c1-c5)/2 */ + tmp2 = MULTIPLY(tmp10 - tmp11, FIX(0.222383464)); /* (c3+c5-c1)/2 */ + tmp0 = tmp1 - tmp2; + tmp1 += tmp2; + tmp2 = MULTIPLY(tmp11 + tmp12, - FIX(1.800824523)); /* -c1 */ + tmp1 += tmp2; + tmp3 = MULTIPLY(tmp10 + tmp12, FIX(0.801442310)); /* c5 */ + tmp0 += tmp3; + tmp2 += tmp3 + MULTIPLY(tmp12, FIX(2.443531355)); /* c3+c1-c5 */ + + dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp0, CONST_BITS+PASS1_BITS+1); + dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp1, CONST_BITS+PASS1_BITS+1); + dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp2, CONST_BITS+PASS1_BITS+1); + + dataptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 12x6 sample block. + * + * 12-point FDCT in pass 1 (rows), 6-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_12x6 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Zero 2 bottom rows of output coefficient block. */ + MEMZERO(&data[DCTSIZE*6], SIZEOF(DCTELEM) * DCTSIZE * 2); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * 12-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/24). + */ + + dataptr = data; + for (ctr = 0; ctr < 6; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[11]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[10]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[9]); + tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[8]); + tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[7]); + tmp5 = GETJSAMPLE(elemptr[5]) + GETJSAMPLE(elemptr[6]); + + tmp10 = tmp0 + tmp5; + tmp13 = tmp0 - tmp5; + tmp11 = tmp1 + tmp4; + tmp14 = tmp1 - tmp4; + tmp12 = tmp2 + tmp3; + tmp15 = tmp2 - tmp3; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[11]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[10]); + tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[9]); + tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[8]); + tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[7]); + tmp5 = GETJSAMPLE(elemptr[5]) - GETJSAMPLE(elemptr[6]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp10 + tmp11 + tmp12 - 12 * CENTERJSAMPLE) << PASS1_BITS); + dataptr[6] = (DCTELEM) ((tmp13 - tmp14 - tmp15) << PASS1_BITS); + dataptr[4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.224744871)), /* c4 */ + CONST_BITS-PASS1_BITS); + dataptr[2] = (DCTELEM) + DESCALE(tmp14 - tmp15 + MULTIPLY(tmp13 + tmp15, FIX(1.366025404)), /* c2 */ + CONST_BITS-PASS1_BITS); + + /* Odd part */ + + tmp10 = MULTIPLY(tmp1 + tmp4, FIX_0_541196100); /* c9 */ + tmp14 = tmp10 + MULTIPLY(tmp1, FIX_0_765366865); /* c3-c9 */ + tmp15 = tmp10 - MULTIPLY(tmp4, FIX_1_847759065); /* c3+c9 */ + tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.121971054)); /* c5 */ + tmp13 = MULTIPLY(tmp0 + tmp3, FIX(0.860918669)); /* c7 */ + tmp10 = tmp12 + tmp13 + tmp14 - MULTIPLY(tmp0, FIX(0.580774953)) /* c5+c7-c1 */ + + MULTIPLY(tmp5, FIX(0.184591911)); /* c11 */ + tmp11 = MULTIPLY(tmp2 + tmp3, - FIX(0.184591911)); /* -c11 */ + tmp12 += tmp11 - tmp15 - MULTIPLY(tmp2, FIX(2.339493912)) /* c1+c5-c11 */ + + MULTIPLY(tmp5, FIX(0.860918669)); /* c7 */ + tmp13 += tmp11 - tmp14 + MULTIPLY(tmp3, FIX(0.725788011)) /* c1+c11-c7 */ + - MULTIPLY(tmp5, FIX(1.121971054)); /* c5 */ + tmp11 = tmp15 + MULTIPLY(tmp0 - tmp3, FIX(1.306562965)) /* c3 */ + - MULTIPLY(tmp2 + tmp5, FIX_0_541196100); /* c9 */ + + dataptr[1] = (DCTELEM) DESCALE(tmp10, CONST_BITS-PASS1_BITS); + dataptr[3] = (DCTELEM) DESCALE(tmp11, CONST_BITS-PASS1_BITS); + dataptr[5] = (DCTELEM) DESCALE(tmp12, CONST_BITS-PASS1_BITS); + dataptr[7] = (DCTELEM) DESCALE(tmp13, CONST_BITS-PASS1_BITS); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * We must also scale the output by (8/12)*(8/6) = 8/9, which we + * partially fold into the constant multipliers and final shifting: + * 6-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/12) * 16/9. + */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*5]; + tmp11 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*4]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*3]; + + tmp10 = tmp0 + tmp2; + tmp12 = tmp0 - tmp2; + + tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*5]; + tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*4]; + tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*3]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 + tmp11, FIX(1.777777778)), /* 16/9 */ + CONST_BITS+PASS1_BITS+1); + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(MULTIPLY(tmp12, FIX(2.177324216)), /* c2 */ + CONST_BITS+PASS1_BITS+1); + dataptr[DCTSIZE*4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(1.257078722)), /* c4 */ + CONST_BITS+PASS1_BITS+1); + + /* Odd part */ + + tmp10 = MULTIPLY(tmp0 + tmp2, FIX(0.650711829)); /* c5 */ + + dataptr[DCTSIZE*1] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp0 + tmp1, FIX(1.777777778)), /* 16/9 */ + CONST_BITS+PASS1_BITS+1); + dataptr[DCTSIZE*3] = (DCTELEM) + DESCALE(MULTIPLY(tmp0 - tmp1 - tmp2, FIX(1.777777778)), /* 16/9 */ + CONST_BITS+PASS1_BITS+1); + dataptr[DCTSIZE*5] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp2 - tmp1, FIX(1.777777778)), /* 16/9 */ + CONST_BITS+PASS1_BITS+1); + + dataptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 10x5 sample block. + * + * 10-point FDCT in pass 1 (rows), 5-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_10x5 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4; + INT32 tmp10, tmp11, tmp12, tmp13, tmp14; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Zero 3 bottom rows of output coefficient block. */ + MEMZERO(&data[DCTSIZE*5], SIZEOF(DCTELEM) * DCTSIZE * 3); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * 10-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/20). + */ + + dataptr = data; + for (ctr = 0; ctr < 5; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[9]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[8]); + tmp12 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[7]); + tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[6]); + tmp4 = GETJSAMPLE(elemptr[4]) + GETJSAMPLE(elemptr[5]); + + tmp10 = tmp0 + tmp4; + tmp13 = tmp0 - tmp4; + tmp11 = tmp1 + tmp3; + tmp14 = tmp1 - tmp3; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[9]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[8]); + tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[7]); + tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[6]); + tmp4 = GETJSAMPLE(elemptr[4]) - GETJSAMPLE(elemptr[5]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp10 + tmp11 + tmp12 - 10 * CENTERJSAMPLE) << PASS1_BITS); + tmp12 += tmp12; + dataptr[4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.144122806)) - /* c4 */ + MULTIPLY(tmp11 - tmp12, FIX(0.437016024)), /* c8 */ + CONST_BITS-PASS1_BITS); + tmp10 = MULTIPLY(tmp13 + tmp14, FIX(0.831253876)); /* c6 */ + dataptr[2] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp13, FIX(0.513743148)), /* c2-c6 */ + CONST_BITS-PASS1_BITS); + dataptr[6] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp14, FIX(2.176250899)), /* c2+c6 */ + CONST_BITS-PASS1_BITS); + + /* Odd part */ + + tmp10 = tmp0 + tmp4; + tmp11 = tmp1 - tmp3; + dataptr[5] = (DCTELEM) ((tmp10 - tmp11 - tmp2) << PASS1_BITS); + tmp2 <<= CONST_BITS; + dataptr[1] = (DCTELEM) + DESCALE(MULTIPLY(tmp0, FIX(1.396802247)) + /* c1 */ + MULTIPLY(tmp1, FIX(1.260073511)) + tmp2 + /* c3 */ + MULTIPLY(tmp3, FIX(0.642039522)) + /* c7 */ + MULTIPLY(tmp4, FIX(0.221231742)), /* c9 */ + CONST_BITS-PASS1_BITS); + tmp12 = MULTIPLY(tmp0 - tmp4, FIX(0.951056516)) - /* (c3+c7)/2 */ + MULTIPLY(tmp1 + tmp3, FIX(0.587785252)); /* (c1-c9)/2 */ + tmp13 = MULTIPLY(tmp10 + tmp11, FIX(0.309016994)) + /* (c3-c7)/2 */ + (tmp11 << (CONST_BITS - 1)) - tmp2; + dataptr[3] = (DCTELEM) DESCALE(tmp12 + tmp13, CONST_BITS-PASS1_BITS); + dataptr[7] = (DCTELEM) DESCALE(tmp12 - tmp13, CONST_BITS-PASS1_BITS); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * We must also scale the output by (8/10)*(8/5) = 32/25, which we + * fold into the constant multipliers: + * 5-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/10) * 32/25. + */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*4]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*3]; + tmp2 = dataptr[DCTSIZE*2]; + + tmp10 = tmp0 + tmp1; + tmp11 = tmp0 - tmp1; + + tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*4]; + tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*3]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 + tmp2, FIX(1.28)), /* 32/25 */ + CONST_BITS+PASS1_BITS); + tmp11 = MULTIPLY(tmp11, FIX(1.011928851)); /* (c2+c4)/2 */ + tmp10 -= tmp2 << 2; + tmp10 = MULTIPLY(tmp10, FIX(0.452548340)); /* (c2-c4)/2 */ + dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(tmp11 + tmp10, CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp11 - tmp10, CONST_BITS+PASS1_BITS); + + /* Odd part */ + + tmp10 = MULTIPLY(tmp0 + tmp1, FIX(1.064004961)); /* c3 */ + + dataptr[DCTSIZE*1] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp0, FIX(0.657591230)), /* c1-c3 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*3] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp1, FIX(2.785601151)), /* c1+c3 */ + CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on an 8x4 sample block. + * + * 8-point FDCT in pass 1 (rows), 4-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_8x4 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3; + INT32 tmp10, tmp11, tmp12, tmp13; + INT32 z1; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Zero 4 bottom rows of output coefficient block. */ + MEMZERO(&data[DCTSIZE*4], SIZEOF(DCTELEM) * DCTSIZE * 4); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * We must also scale the output by 8/4 = 2, which we add here. + * 8-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/16). + */ + + dataptr = data; + for (ctr = 0; ctr < 4; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Even part per LL&M figure 1 --- note that published figure is faulty; + * rotator "c1" should be "c6". + */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[7]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[6]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[5]); + tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[4]); + + tmp10 = tmp0 + tmp3; + tmp12 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp13 = tmp1 - tmp2; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[7]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[6]); + tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[5]); + tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[4]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp10 + tmp11 - 8 * CENTERJSAMPLE) << (PASS1_BITS+1)); + dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << (PASS1_BITS+1)); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); /* c6 */ + /* Add fudge factor here for final descale. */ + z1 += ONE << (CONST_BITS-PASS1_BITS-2); + + dataptr[2] = (DCTELEM) + RIGHT_SHIFT(z1 + MULTIPLY(tmp12, FIX_0_765366865), /* c2-c6 */ + CONST_BITS-PASS1_BITS-1); + dataptr[6] = (DCTELEM) + RIGHT_SHIFT(z1 - MULTIPLY(tmp13, FIX_1_847759065), /* c2+c6 */ + CONST_BITS-PASS1_BITS-1); + + /* Odd part per figure 8 --- note paper omits factor of sqrt(2). + * i0..i3 in the paper are tmp0..tmp3 here. + */ + + tmp12 = tmp0 + tmp2; + tmp13 = tmp1 + tmp3; + + z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */ + /* Add fudge factor here for final descale. */ + z1 += ONE << (CONST_BITS-PASS1_BITS-2); + + tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* -c3+c5 */ + tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */ + tmp12 += z1; + tmp13 += z1; + + z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ + tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */ + tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */ + tmp0 += z1 + tmp12; + tmp3 += z1 + tmp13; + + z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ + tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */ + tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */ + tmp1 += z1 + tmp13; + tmp2 += z1 + tmp12; + + dataptr[1] = (DCTELEM) RIGHT_SHIFT(tmp0, CONST_BITS-PASS1_BITS-1); + dataptr[3] = (DCTELEM) RIGHT_SHIFT(tmp1, CONST_BITS-PASS1_BITS-1); + dataptr[5] = (DCTELEM) RIGHT_SHIFT(tmp2, CONST_BITS-PASS1_BITS-1); + dataptr[7] = (DCTELEM) RIGHT_SHIFT(tmp3, CONST_BITS-PASS1_BITS-1); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * 4-point FDCT kernel, + * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point FDCT]. + */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + /* Even part */ + + /* Add fudge factor here for final descale. */ + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*3] + (ONE << (PASS1_BITS-1)); + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*2]; + + tmp10 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*3]; + tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*2]; + + dataptr[DCTSIZE*0] = (DCTELEM) RIGHT_SHIFT(tmp0 + tmp1, PASS1_BITS); + dataptr[DCTSIZE*2] = (DCTELEM) RIGHT_SHIFT(tmp0 - tmp1, PASS1_BITS); + + /* Odd part */ + + tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */ + /* Add fudge factor here for final descale. */ + tmp0 += ONE << (CONST_BITS+PASS1_BITS-1); + + dataptr[DCTSIZE*1] = (DCTELEM) + RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*3] = (DCTELEM) + RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */ + CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 6x3 sample block. + * + * 6-point FDCT in pass 1 (rows), 3-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_6x3 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2; + INT32 tmp10, tmp11, tmp12; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * We scale the results further by 2 as part of output adaption + * scaling for different DCT size. + * 6-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/12). + */ + + dataptr = data; + for (ctr = 0; ctr < 3; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[5]); + tmp11 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[4]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[3]); + + tmp10 = tmp0 + tmp2; + tmp12 = tmp0 - tmp2; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[5]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[4]); + tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[3]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp10 + tmp11 - 6 * CENTERJSAMPLE) << (PASS1_BITS+1)); + dataptr[2] = (DCTELEM) + DESCALE(MULTIPLY(tmp12, FIX(1.224744871)), /* c2 */ + CONST_BITS-PASS1_BITS-1); + dataptr[4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(0.707106781)), /* c4 */ + CONST_BITS-PASS1_BITS-1); + + /* Odd part */ + + tmp10 = DESCALE(MULTIPLY(tmp0 + tmp2, FIX(0.366025404)), /* c5 */ + CONST_BITS-PASS1_BITS-1); + + dataptr[1] = (DCTELEM) (tmp10 + ((tmp0 + tmp1) << (PASS1_BITS+1))); + dataptr[3] = (DCTELEM) ((tmp0 - tmp1 - tmp2) << (PASS1_BITS+1)); + dataptr[5] = (DCTELEM) (tmp10 + ((tmp2 - tmp1) << (PASS1_BITS+1))); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * We must also scale the output by (8/6)*(8/3) = 32/9, which we partially + * fold into the constant multipliers (other part was done in pass 1): + * 3-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/6) * 16/9. + */ + + dataptr = data; + for (ctr = 0; ctr < 6; ctr++) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*2]; + tmp1 = dataptr[DCTSIZE*1]; + + tmp2 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*2]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(tmp0 + tmp1, FIX(1.777777778)), /* 16/9 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(MULTIPLY(tmp0 - tmp1 - tmp1, FIX(1.257078722)), /* c2 */ + CONST_BITS+PASS1_BITS); + + /* Odd part */ + + dataptr[DCTSIZE*1] = (DCTELEM) + DESCALE(MULTIPLY(tmp2, FIX(2.177324216)), /* c1 */ + CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 4x2 sample block. + * + * 4-point FDCT in pass 1 (rows), 2-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_4x2 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + DCTELEM tmp0, tmp2, tmp10, tmp12, tmp4, tmp5; + INT32 tmp1, tmp3, tmp11, tmp13; + INT32 z1, z2, z3; + JSAMPROW elemptr; + SHIFT_TEMPS + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT. + * 4-point FDCT kernel, + * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point FDCT]. + */ + + /* Row 0 */ + elemptr = sample_data[0] + start_col; + + /* Even part */ + + tmp4 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[3]); + tmp5 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[2]); + + tmp0 = tmp4 + tmp5; + tmp2 = tmp4 - tmp5; + + /* Odd part */ + + z2 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[3]); + z3 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[2]); + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ + /* Add fudge factor here for final descale. */ + z1 += ONE << (CONST_BITS-3-1); + tmp1 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ + tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ + + /* Row 1 */ + elemptr = sample_data[1] + start_col; + + /* Even part */ + + tmp4 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[3]); + tmp5 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[2]); + + tmp10 = tmp4 + tmp5; + tmp12 = tmp4 - tmp5; + + /* Odd part */ + + z2 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[3]); + z3 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[2]); + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ + tmp11 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ + tmp13 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ + + /* Pass 2: process columns. + * We leave the results scaled up by an overall factor of 8. + * We must also scale the output by (8/4)*(8/2) = 2**3. + */ + + /* Column 0 */ + /* Apply unsigned->signed conversion. */ + data[DCTSIZE*0] = (tmp0 + tmp10 - 8 * CENTERJSAMPLE) << 3; + data[DCTSIZE*1] = (tmp0 - tmp10) << 3; + + /* Column 1 */ + data[DCTSIZE*0+1] = (DCTELEM) RIGHT_SHIFT(tmp1 + tmp11, CONST_BITS-3); + data[DCTSIZE*1+1] = (DCTELEM) RIGHT_SHIFT(tmp1 - tmp11, CONST_BITS-3); + + /* Column 2 */ + data[DCTSIZE*0+2] = (tmp2 + tmp12) << 3; + data[DCTSIZE*1+2] = (tmp2 - tmp12) << 3; + + /* Column 3 */ + data[DCTSIZE*0+3] = (DCTELEM) RIGHT_SHIFT(tmp3 + tmp13, CONST_BITS-3); + data[DCTSIZE*1+3] = (DCTELEM) RIGHT_SHIFT(tmp3 - tmp13, CONST_BITS-3); +} + + +/* + * Perform the forward DCT on a 2x1 sample block. + * + * 2-point FDCT in pass 1 (rows), 1-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_2x1 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + DCTELEM tmp0, tmp1; + JSAMPROW elemptr; + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + elemptr = sample_data[0] + start_col; + + tmp0 = GETJSAMPLE(elemptr[0]); + tmp1 = GETJSAMPLE(elemptr[1]); + + /* We leave the results scaled up by an overall factor of 8. + * We must also scale the output by (8/2)*(8/1) = 2**5. + */ + + /* Even part */ + + /* Apply unsigned->signed conversion. */ + data[0] = (tmp0 + tmp1 - 2 * CENTERJSAMPLE) << 5; + + /* Odd part */ + + data[1] = (tmp0 - tmp1) << 5; +} + + +/* + * Perform the forward DCT on an 8x16 sample block. + * + * 8-point FDCT in pass 1 (rows), 16-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_8x16 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16, tmp17; + INT32 z1; + DCTELEM workspace[DCTSIZE2]; + DCTELEM *dataptr; + DCTELEM *wsptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * 8-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/16). + */ + + dataptr = data; + ctr = 0; + for (;;) { + elemptr = sample_data[ctr] + start_col; + + /* Even part per LL&M figure 1 --- note that published figure is faulty; + * rotator "c1" should be "c6". + */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[7]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[6]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[5]); + tmp3 = GETJSAMPLE(elemptr[3]) + GETJSAMPLE(elemptr[4]); + + tmp10 = tmp0 + tmp3; + tmp12 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp13 = tmp1 - tmp2; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[7]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[6]); + tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[5]); + tmp3 = GETJSAMPLE(elemptr[3]) - GETJSAMPLE(elemptr[4]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) ((tmp10 + tmp11 - 8 * CENTERJSAMPLE) << PASS1_BITS); + dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << PASS1_BITS); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); /* c6 */ + dataptr[2] = (DCTELEM) + DESCALE(z1 + MULTIPLY(tmp12, FIX_0_765366865), /* c2-c6 */ + CONST_BITS-PASS1_BITS); + dataptr[6] = (DCTELEM) + DESCALE(z1 - MULTIPLY(tmp13, FIX_1_847759065), /* c2+c6 */ + CONST_BITS-PASS1_BITS); + + /* Odd part per figure 8 --- note paper omits factor of sqrt(2). + * i0..i3 in the paper are tmp0..tmp3 here. + */ + + tmp12 = tmp0 + tmp2; + tmp13 = tmp1 + tmp3; + + z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */ + tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* -c3+c5 */ + tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */ + tmp12 += z1; + tmp13 += z1; + + z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ + tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */ + tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */ + tmp0 += z1 + tmp12; + tmp3 += z1 + tmp13; + + z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ + tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */ + tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */ + tmp1 += z1 + tmp13; + tmp2 += z1 + tmp12; + + dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS-PASS1_BITS); + dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS-PASS1_BITS); + dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS-PASS1_BITS); + dataptr[7] = (DCTELEM) DESCALE(tmp3, CONST_BITS-PASS1_BITS); + + ctr++; + + if (ctr != DCTSIZE) { + if (ctr == DCTSIZE * 2) + break; /* Done. */ + dataptr += DCTSIZE; /* advance pointer to next row */ + } else + dataptr = workspace; /* switch pointer to extended workspace */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * We must also scale the output by 8/16 = 1/2. + * 16-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/32). + */ + + dataptr = data; + wsptr = workspace; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*3]; + tmp5 = dataptr[DCTSIZE*5] + wsptr[DCTSIZE*2]; + tmp6 = dataptr[DCTSIZE*6] + wsptr[DCTSIZE*1]; + tmp7 = dataptr[DCTSIZE*7] + wsptr[DCTSIZE*0]; + + tmp10 = tmp0 + tmp7; + tmp14 = tmp0 - tmp7; + tmp11 = tmp1 + tmp6; + tmp15 = tmp1 - tmp6; + tmp12 = tmp2 + tmp5; + tmp16 = tmp2 - tmp5; + tmp13 = tmp3 + tmp4; + tmp17 = tmp3 - tmp4; + + tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*3]; + tmp5 = dataptr[DCTSIZE*5] - wsptr[DCTSIZE*2]; + tmp6 = dataptr[DCTSIZE*6] - wsptr[DCTSIZE*1]; + tmp7 = dataptr[DCTSIZE*7] - wsptr[DCTSIZE*0]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(tmp10 + tmp11 + tmp12 + tmp13, PASS1_BITS+1); + dataptr[DCTSIZE*4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp13, FIX(1.306562965)) + /* c4[16] = c2[8] */ + MULTIPLY(tmp11 - tmp12, FIX_0_541196100), /* c12[16] = c6[8] */ + CONST_BITS+PASS1_BITS+1); + + tmp10 = MULTIPLY(tmp17 - tmp15, FIX(0.275899379)) + /* c14[16] = c7[8] */ + MULTIPLY(tmp14 - tmp16, FIX(1.387039845)); /* c2[16] = c1[8] */ + + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp15, FIX(1.451774982)) /* c6+c14 */ + + MULTIPLY(tmp16, FIX(2.172734804)), /* c2+c10 */ + CONST_BITS+PASS1_BITS+1); + dataptr[DCTSIZE*6] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp14, FIX(0.211164243)) /* c2-c6 */ + - MULTIPLY(tmp17, FIX(1.061594338)), /* c10+c14 */ + CONST_BITS+PASS1_BITS+1); + + /* Odd part */ + + tmp11 = MULTIPLY(tmp0 + tmp1, FIX(1.353318001)) + /* c3 */ + MULTIPLY(tmp6 - tmp7, FIX(0.410524528)); /* c13 */ + tmp12 = MULTIPLY(tmp0 + tmp2, FIX(1.247225013)) + /* c5 */ + MULTIPLY(tmp5 + tmp7, FIX(0.666655658)); /* c11 */ + tmp13 = MULTIPLY(tmp0 + tmp3, FIX(1.093201867)) + /* c7 */ + MULTIPLY(tmp4 - tmp7, FIX(0.897167586)); /* c9 */ + tmp14 = MULTIPLY(tmp1 + tmp2, FIX(0.138617169)) + /* c15 */ + MULTIPLY(tmp6 - tmp5, FIX(1.407403738)); /* c1 */ + tmp15 = MULTIPLY(tmp1 + tmp3, - FIX(0.666655658)) + /* -c11 */ + MULTIPLY(tmp4 + tmp6, - FIX(1.247225013)); /* -c5 */ + tmp16 = MULTIPLY(tmp2 + tmp3, - FIX(1.353318001)) + /* -c3 */ + MULTIPLY(tmp5 - tmp4, FIX(0.410524528)); /* c13 */ + tmp10 = tmp11 + tmp12 + tmp13 - + MULTIPLY(tmp0, FIX(2.286341144)) + /* c7+c5+c3-c1 */ + MULTIPLY(tmp7, FIX(0.779653625)); /* c15+c13-c11+c9 */ + tmp11 += tmp14 + tmp15 + MULTIPLY(tmp1, FIX(0.071888074)) /* c9-c3-c15+c11 */ + - MULTIPLY(tmp6, FIX(1.663905119)); /* c7+c13+c1-c5 */ + tmp12 += tmp14 + tmp16 - MULTIPLY(tmp2, FIX(1.125726048)) /* c7+c5+c15-c3 */ + + MULTIPLY(tmp5, FIX(1.227391138)); /* c9-c11+c1-c13 */ + tmp13 += tmp15 + tmp16 + MULTIPLY(tmp3, FIX(1.065388962)) /* c15+c3+c11-c7 */ + + MULTIPLY(tmp4, FIX(2.167985692)); /* c1+c13+c5-c9 */ + + dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp10, CONST_BITS+PASS1_BITS+1); + dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp11, CONST_BITS+PASS1_BITS+1); + dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12, CONST_BITS+PASS1_BITS+1); + dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp13, CONST_BITS+PASS1_BITS+1); + + dataptr++; /* advance pointer to next column */ + wsptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 7x14 sample block. + * + * 7-point FDCT in pass 1 (rows), 14-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_7x14 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6; + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; + INT32 z1, z2, z3; + DCTELEM workspace[8*6]; + DCTELEM *dataptr; + DCTELEM *wsptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * 7-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/14). + */ + + dataptr = data; + ctr = 0; + for (;;) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[6]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[5]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[4]); + tmp3 = GETJSAMPLE(elemptr[3]); + + tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[6]); + tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[5]); + tmp12 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[4]); + + z1 = tmp0 + tmp2; + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((z1 + tmp1 + tmp3 - 7 * CENTERJSAMPLE) << PASS1_BITS); + tmp3 += tmp3; + z1 -= tmp3; + z1 -= tmp3; + z1 = MULTIPLY(z1, FIX(0.353553391)); /* (c2+c6-c4)/2 */ + z2 = MULTIPLY(tmp0 - tmp2, FIX(0.920609002)); /* (c2+c4-c6)/2 */ + z3 = MULTIPLY(tmp1 - tmp2, FIX(0.314692123)); /* c6 */ + dataptr[2] = (DCTELEM) DESCALE(z1 + z2 + z3, CONST_BITS-PASS1_BITS); + z1 -= z2; + z2 = MULTIPLY(tmp0 - tmp1, FIX(0.881747734)); /* c4 */ + dataptr[4] = (DCTELEM) + DESCALE(z2 + z3 - MULTIPLY(tmp1 - tmp3, FIX(0.707106781)), /* c2+c6-c4 */ + CONST_BITS-PASS1_BITS); + dataptr[6] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS-PASS1_BITS); + + /* Odd part */ + + tmp1 = MULTIPLY(tmp10 + tmp11, FIX(0.935414347)); /* (c3+c1-c5)/2 */ + tmp2 = MULTIPLY(tmp10 - tmp11, FIX(0.170262339)); /* (c3+c5-c1)/2 */ + tmp0 = tmp1 - tmp2; + tmp1 += tmp2; + tmp2 = MULTIPLY(tmp11 + tmp12, - FIX(1.378756276)); /* -c1 */ + tmp1 += tmp2; + tmp3 = MULTIPLY(tmp10 + tmp12, FIX(0.613604268)); /* c5 */ + tmp0 += tmp3; + tmp2 += tmp3 + MULTIPLY(tmp12, FIX(1.870828693)); /* c3+c1-c5 */ + + dataptr[1] = (DCTELEM) DESCALE(tmp0, CONST_BITS-PASS1_BITS); + dataptr[3] = (DCTELEM) DESCALE(tmp1, CONST_BITS-PASS1_BITS); + dataptr[5] = (DCTELEM) DESCALE(tmp2, CONST_BITS-PASS1_BITS); + + ctr++; + + if (ctr != DCTSIZE) { + if (ctr == 14) + break; /* Done. */ + dataptr += DCTSIZE; /* advance pointer to next row */ + } else + dataptr = workspace; /* switch pointer to extended workspace */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * We must also scale the output by (8/7)*(8/14) = 32/49, which we + * fold into the constant multipliers: + * 14-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/28) * 32/49. + */ + + dataptr = data; + wsptr = workspace; + for (ctr = 0; ctr < 7; ctr++) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*5]; + tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*4]; + tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*3]; + tmp13 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*2]; + tmp4 = dataptr[DCTSIZE*4] + wsptr[DCTSIZE*1]; + tmp5 = dataptr[DCTSIZE*5] + wsptr[DCTSIZE*0]; + tmp6 = dataptr[DCTSIZE*6] + dataptr[DCTSIZE*7]; + + tmp10 = tmp0 + tmp6; + tmp14 = tmp0 - tmp6; + tmp11 = tmp1 + tmp5; + tmp15 = tmp1 - tmp5; + tmp12 = tmp2 + tmp4; + tmp16 = tmp2 - tmp4; + + tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*5]; + tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*4]; + tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*3]; + tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*2]; + tmp4 = dataptr[DCTSIZE*4] - wsptr[DCTSIZE*1]; + tmp5 = dataptr[DCTSIZE*5] - wsptr[DCTSIZE*0]; + tmp6 = dataptr[DCTSIZE*6] - dataptr[DCTSIZE*7]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12 + tmp13, + FIX(0.653061224)), /* 32/49 */ + CONST_BITS+PASS1_BITS); + tmp13 += tmp13; + dataptr[DCTSIZE*4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp13, FIX(0.832106052)) + /* c4 */ + MULTIPLY(tmp11 - tmp13, FIX(0.205513223)) - /* c12 */ + MULTIPLY(tmp12 - tmp13, FIX(0.575835255)), /* c8 */ + CONST_BITS+PASS1_BITS); + + tmp10 = MULTIPLY(tmp14 + tmp15, FIX(0.722074570)); /* c6 */ + + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp14, FIX(0.178337691)) /* c2-c6 */ + + MULTIPLY(tmp16, FIX(0.400721155)), /* c10 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*6] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp15, FIX(1.122795725)) /* c6+c10 */ + - MULTIPLY(tmp16, FIX(0.900412262)), /* c2 */ + CONST_BITS+PASS1_BITS); + + /* Odd part */ + + tmp10 = tmp1 + tmp2; + tmp11 = tmp5 - tmp4; + dataptr[DCTSIZE*7] = (DCTELEM) + DESCALE(MULTIPLY(tmp0 - tmp10 + tmp3 - tmp11 - tmp6, + FIX(0.653061224)), /* 32/49 */ + CONST_BITS+PASS1_BITS); + tmp3 = MULTIPLY(tmp3 , FIX(0.653061224)); /* 32/49 */ + tmp10 = MULTIPLY(tmp10, - FIX(0.103406812)); /* -c13 */ + tmp11 = MULTIPLY(tmp11, FIX(0.917760839)); /* c1 */ + tmp10 += tmp11 - tmp3; + tmp11 = MULTIPLY(tmp0 + tmp2, FIX(0.782007410)) + /* c5 */ + MULTIPLY(tmp4 + tmp6, FIX(0.491367823)); /* c9 */ + dataptr[DCTSIZE*5] = (DCTELEM) + DESCALE(tmp10 + tmp11 - MULTIPLY(tmp2, FIX(1.550341076)) /* c3+c5-c13 */ + + MULTIPLY(tmp4, FIX(0.731428202)), /* c1+c11-c9 */ + CONST_BITS+PASS1_BITS); + tmp12 = MULTIPLY(tmp0 + tmp1, FIX(0.871740478)) + /* c3 */ + MULTIPLY(tmp5 - tmp6, FIX(0.305035186)); /* c11 */ + dataptr[DCTSIZE*3] = (DCTELEM) + DESCALE(tmp10 + tmp12 - MULTIPLY(tmp1, FIX(0.276965844)) /* c3-c9-c13 */ + - MULTIPLY(tmp5, FIX(2.004803435)), /* c1+c5+c11 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*1] = (DCTELEM) + DESCALE(tmp11 + tmp12 + tmp3 + - MULTIPLY(tmp0, FIX(0.735987049)) /* c3+c5-c1 */ + - MULTIPLY(tmp6, FIX(0.082925825)), /* c9-c11-c13 */ + CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + wsptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 6x12 sample block. + * + * 6-point FDCT in pass 1 (rows), 12-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_6x12 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; + DCTELEM workspace[8*4]; + DCTELEM *dataptr; + DCTELEM *wsptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * 6-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/12). + */ + + dataptr = data; + ctr = 0; + for (;;) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[5]); + tmp11 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[4]); + tmp2 = GETJSAMPLE(elemptr[2]) + GETJSAMPLE(elemptr[3]); + + tmp10 = tmp0 + tmp2; + tmp12 = tmp0 - tmp2; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[5]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[4]); + tmp2 = GETJSAMPLE(elemptr[2]) - GETJSAMPLE(elemptr[3]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp10 + tmp11 - 6 * CENTERJSAMPLE) << PASS1_BITS); + dataptr[2] = (DCTELEM) + DESCALE(MULTIPLY(tmp12, FIX(1.224744871)), /* c2 */ + CONST_BITS-PASS1_BITS); + dataptr[4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(0.707106781)), /* c4 */ + CONST_BITS-PASS1_BITS); + + /* Odd part */ + + tmp10 = DESCALE(MULTIPLY(tmp0 + tmp2, FIX(0.366025404)), /* c5 */ + CONST_BITS-PASS1_BITS); + + dataptr[1] = (DCTELEM) (tmp10 + ((tmp0 + tmp1) << PASS1_BITS)); + dataptr[3] = (DCTELEM) ((tmp0 - tmp1 - tmp2) << PASS1_BITS); + dataptr[5] = (DCTELEM) (tmp10 + ((tmp2 - tmp1) << PASS1_BITS)); + + ctr++; + + if (ctr != DCTSIZE) { + if (ctr == 12) + break; /* Done. */ + dataptr += DCTSIZE; /* advance pointer to next row */ + } else + dataptr = workspace; /* switch pointer to extended workspace */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * We must also scale the output by (8/6)*(8/12) = 8/9, which we + * fold into the constant multipliers: + * 12-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/24) * 8/9. + */ + + dataptr = data; + wsptr = workspace; + for (ctr = 0; ctr < 6; ctr++) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*3]; + tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*2]; + tmp2 = dataptr[DCTSIZE*2] + wsptr[DCTSIZE*1]; + tmp3 = dataptr[DCTSIZE*3] + wsptr[DCTSIZE*0]; + tmp4 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*7]; + tmp5 = dataptr[DCTSIZE*5] + dataptr[DCTSIZE*6]; + + tmp10 = tmp0 + tmp5; + tmp13 = tmp0 - tmp5; + tmp11 = tmp1 + tmp4; + tmp14 = tmp1 - tmp4; + tmp12 = tmp2 + tmp3; + tmp15 = tmp2 - tmp3; + + tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*3]; + tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*2]; + tmp2 = dataptr[DCTSIZE*2] - wsptr[DCTSIZE*1]; + tmp3 = dataptr[DCTSIZE*3] - wsptr[DCTSIZE*0]; + tmp4 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*7]; + tmp5 = dataptr[DCTSIZE*5] - dataptr[DCTSIZE*6]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12, FIX(0.888888889)), /* 8/9 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*6] = (DCTELEM) + DESCALE(MULTIPLY(tmp13 - tmp14 - tmp15, FIX(0.888888889)), /* 8/9 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.088662108)), /* c4 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(MULTIPLY(tmp14 - tmp15, FIX(0.888888889)) + /* 8/9 */ + MULTIPLY(tmp13 + tmp15, FIX(1.214244803)), /* c2 */ + CONST_BITS+PASS1_BITS); + + /* Odd part */ + + tmp10 = MULTIPLY(tmp1 + tmp4, FIX(0.481063200)); /* c9 */ + tmp14 = tmp10 + MULTIPLY(tmp1, FIX(0.680326102)); /* c3-c9 */ + tmp15 = tmp10 - MULTIPLY(tmp4, FIX(1.642452502)); /* c3+c9 */ + tmp12 = MULTIPLY(tmp0 + tmp2, FIX(0.997307603)); /* c5 */ + tmp13 = MULTIPLY(tmp0 + tmp3, FIX(0.765261039)); /* c7 */ + tmp10 = tmp12 + tmp13 + tmp14 - MULTIPLY(tmp0, FIX(0.516244403)) /* c5+c7-c1 */ + + MULTIPLY(tmp5, FIX(0.164081699)); /* c11 */ + tmp11 = MULTIPLY(tmp2 + tmp3, - FIX(0.164081699)); /* -c11 */ + tmp12 += tmp11 - tmp15 - MULTIPLY(tmp2, FIX(2.079550144)) /* c1+c5-c11 */ + + MULTIPLY(tmp5, FIX(0.765261039)); /* c7 */ + tmp13 += tmp11 - tmp14 + MULTIPLY(tmp3, FIX(0.645144899)) /* c1+c11-c7 */ + - MULTIPLY(tmp5, FIX(0.997307603)); /* c5 */ + tmp11 = tmp15 + MULTIPLY(tmp0 - tmp3, FIX(1.161389302)) /* c3 */ + - MULTIPLY(tmp2 + tmp5, FIX(0.481063200)); /* c9 */ + + dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp10, CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp11, CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp12, CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp13, CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + wsptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 5x10 sample block. + * + * 5-point FDCT in pass 1 (rows), 10-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_5x10 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4; + INT32 tmp10, tmp11, tmp12, tmp13, tmp14; + DCTELEM workspace[8*2]; + DCTELEM *dataptr; + DCTELEM *wsptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * 5-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/10). + */ + + dataptr = data; + ctr = 0; + for (;;) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[4]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[3]); + tmp2 = GETJSAMPLE(elemptr[2]); + + tmp10 = tmp0 + tmp1; + tmp11 = tmp0 - tmp1; + + tmp0 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[4]); + tmp1 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[3]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp10 + tmp2 - 5 * CENTERJSAMPLE) << PASS1_BITS); + tmp11 = MULTIPLY(tmp11, FIX(0.790569415)); /* (c2+c4)/2 */ + tmp10 -= tmp2 << 2; + tmp10 = MULTIPLY(tmp10, FIX(0.353553391)); /* (c2-c4)/2 */ + dataptr[2] = (DCTELEM) DESCALE(tmp11 + tmp10, CONST_BITS-PASS1_BITS); + dataptr[4] = (DCTELEM) DESCALE(tmp11 - tmp10, CONST_BITS-PASS1_BITS); + + /* Odd part */ + + tmp10 = MULTIPLY(tmp0 + tmp1, FIX(0.831253876)); /* c3 */ + + dataptr[1] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp0, FIX(0.513743148)), /* c1-c3 */ + CONST_BITS-PASS1_BITS); + dataptr[3] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp1, FIX(2.176250899)), /* c1+c3 */ + CONST_BITS-PASS1_BITS); + + ctr++; + + if (ctr != DCTSIZE) { + if (ctr == 10) + break; /* Done. */ + dataptr += DCTSIZE; /* advance pointer to next row */ + } else + dataptr = workspace; /* switch pointer to extended workspace */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * We must also scale the output by (8/5)*(8/10) = 32/25, which we + * fold into the constant multipliers: + * 10-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/20) * 32/25. + */ + + dataptr = data; + wsptr = workspace; + for (ctr = 0; ctr < 5; ctr++) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + wsptr[DCTSIZE*1]; + tmp1 = dataptr[DCTSIZE*1] + wsptr[DCTSIZE*0]; + tmp12 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*7]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*6]; + tmp4 = dataptr[DCTSIZE*4] + dataptr[DCTSIZE*5]; + + tmp10 = tmp0 + tmp4; + tmp13 = tmp0 - tmp4; + tmp11 = tmp1 + tmp3; + tmp14 = tmp1 - tmp3; + + tmp0 = dataptr[DCTSIZE*0] - wsptr[DCTSIZE*1]; + tmp1 = dataptr[DCTSIZE*1] - wsptr[DCTSIZE*0]; + tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*7]; + tmp3 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*6]; + tmp4 = dataptr[DCTSIZE*4] - dataptr[DCTSIZE*5]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 + tmp11 + tmp12, FIX(1.28)), /* 32/25 */ + CONST_BITS+PASS1_BITS); + tmp12 += tmp12; + dataptr[DCTSIZE*4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp12, FIX(1.464477191)) - /* c4 */ + MULTIPLY(tmp11 - tmp12, FIX(0.559380511)), /* c8 */ + CONST_BITS+PASS1_BITS); + tmp10 = MULTIPLY(tmp13 + tmp14, FIX(1.064004961)); /* c6 */ + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp13, FIX(0.657591230)), /* c2-c6 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*6] = (DCTELEM) + DESCALE(tmp10 - MULTIPLY(tmp14, FIX(2.785601151)), /* c2+c6 */ + CONST_BITS+PASS1_BITS); + + /* Odd part */ + + tmp10 = tmp0 + tmp4; + tmp11 = tmp1 - tmp3; + dataptr[DCTSIZE*5] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp11 - tmp2, FIX(1.28)), /* 32/25 */ + CONST_BITS+PASS1_BITS); + tmp2 = MULTIPLY(tmp2, FIX(1.28)); /* 32/25 */ + dataptr[DCTSIZE*1] = (DCTELEM) + DESCALE(MULTIPLY(tmp0, FIX(1.787906876)) + /* c1 */ + MULTIPLY(tmp1, FIX(1.612894094)) + tmp2 + /* c3 */ + MULTIPLY(tmp3, FIX(0.821810588)) + /* c7 */ + MULTIPLY(tmp4, FIX(0.283176630)), /* c9 */ + CONST_BITS+PASS1_BITS); + tmp12 = MULTIPLY(tmp0 - tmp4, FIX(1.217352341)) - /* (c3+c7)/2 */ + MULTIPLY(tmp1 + tmp3, FIX(0.752365123)); /* (c1-c9)/2 */ + tmp13 = MULTIPLY(tmp10 + tmp11, FIX(0.395541753)) + /* (c3-c7)/2 */ + MULTIPLY(tmp11, FIX(0.64)) - tmp2; /* 16/25 */ + dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp12 + tmp13, CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp12 - tmp13, CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + wsptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 4x8 sample block. + * + * 4-point FDCT in pass 1 (rows), 8-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_4x8 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3; + INT32 tmp10, tmp11, tmp12, tmp13; + INT32 z1; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * We must also scale the output by 8/4 = 2, which we add here. + * 4-point FDCT kernel, + * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point FDCT]. + */ + + dataptr = data; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[3]); + tmp1 = GETJSAMPLE(elemptr[1]) + GETJSAMPLE(elemptr[2]); + + tmp10 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[3]); + tmp11 = GETJSAMPLE(elemptr[1]) - GETJSAMPLE(elemptr[2]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp0 + tmp1 - 4 * CENTERJSAMPLE) << (PASS1_BITS+1)); + dataptr[2] = (DCTELEM) ((tmp0 - tmp1) << (PASS1_BITS+1)); + + /* Odd part */ + + tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */ + /* Add fudge factor here for final descale. */ + tmp0 += ONE << (CONST_BITS-PASS1_BITS-2); + + dataptr[1] = (DCTELEM) + RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */ + CONST_BITS-PASS1_BITS-1); + dataptr[3] = (DCTELEM) + RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */ + CONST_BITS-PASS1_BITS-1); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * 8-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/16). + */ + + dataptr = data; + for (ctr = 0; ctr < 4; ctr++) { + /* Even part per LL&M figure 1 --- note that published figure is faulty; + * rotator "c1" should be "c6". + */ + + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; + + /* Add fudge factor here for final descale. */ + tmp10 = tmp0 + tmp3 + (ONE << (PASS1_BITS-1)); + tmp12 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp13 = tmp1 - tmp2; + + tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; + + dataptr[DCTSIZE*0] = (DCTELEM) RIGHT_SHIFT(tmp10 + tmp11, PASS1_BITS); + dataptr[DCTSIZE*4] = (DCTELEM) RIGHT_SHIFT(tmp10 - tmp11, PASS1_BITS); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); /* c6 */ + /* Add fudge factor here for final descale. */ + z1 += ONE << (CONST_BITS+PASS1_BITS-1); + + dataptr[DCTSIZE*2] = (DCTELEM) + RIGHT_SHIFT(z1 + MULTIPLY(tmp12, FIX_0_765366865), /* c2-c6 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*6] = (DCTELEM) + RIGHT_SHIFT(z1 - MULTIPLY(tmp13, FIX_1_847759065), /* c2+c6 */ + CONST_BITS+PASS1_BITS); + + /* Odd part per figure 8 --- note paper omits factor of sqrt(2). + * i0..i3 in the paper are tmp0..tmp3 here. + */ + + tmp12 = tmp0 + tmp2; + tmp13 = tmp1 + tmp3; + + z1 = MULTIPLY(tmp12 + tmp13, FIX_1_175875602); /* c3 */ + /* Add fudge factor here for final descale. */ + z1 += ONE << (CONST_BITS+PASS1_BITS-1); + + tmp12 = MULTIPLY(tmp12, - FIX_0_390180644); /* -c3+c5 */ + tmp13 = MULTIPLY(tmp13, - FIX_1_961570560); /* -c3-c5 */ + tmp12 += z1; + tmp13 += z1; + + z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ + tmp0 = MULTIPLY(tmp0, FIX_1_501321110); /* c1+c3-c5-c7 */ + tmp3 = MULTIPLY(tmp3, FIX_0_298631336); /* -c1+c3+c5-c7 */ + tmp0 += z1 + tmp12; + tmp3 += z1 + tmp13; + + z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ + tmp1 = MULTIPLY(tmp1, FIX_3_072711026); /* c1+c3+c5-c7 */ + tmp2 = MULTIPLY(tmp2, FIX_2_053119869); /* c1+c3-c5+c7 */ + tmp1 += z1 + tmp13; + tmp2 += z1 + tmp12; + + dataptr[DCTSIZE*1] = (DCTELEM) RIGHT_SHIFT(tmp0, CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*3] = (DCTELEM) RIGHT_SHIFT(tmp1, CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*5] = (DCTELEM) RIGHT_SHIFT(tmp2, CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*7] = (DCTELEM) RIGHT_SHIFT(tmp3, CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 3x6 sample block. + * + * 3-point FDCT in pass 1 (rows), 6-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_3x6 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1, tmp2; + INT32 tmp10, tmp11, tmp12; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * We scale the results further by 2 as part of output adaption + * scaling for different DCT size. + * 3-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/6). + */ + + dataptr = data; + for (ctr = 0; ctr < 6; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]) + GETJSAMPLE(elemptr[2]); + tmp1 = GETJSAMPLE(elemptr[1]); + + tmp2 = GETJSAMPLE(elemptr[0]) - GETJSAMPLE(elemptr[2]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) + ((tmp0 + tmp1 - 3 * CENTERJSAMPLE) << (PASS1_BITS+1)); + dataptr[2] = (DCTELEM) + DESCALE(MULTIPLY(tmp0 - tmp1 - tmp1, FIX(0.707106781)), /* c2 */ + CONST_BITS-PASS1_BITS-1); + + /* Odd part */ + + dataptr[1] = (DCTELEM) + DESCALE(MULTIPLY(tmp2, FIX(1.224744871)), /* c1 */ + CONST_BITS-PASS1_BITS-1); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + * We must also scale the output by (8/6)*(8/3) = 32/9, which we partially + * fold into the constant multipliers (other part was done in pass 1): + * 6-point FDCT kernel, cK represents sqrt(2) * cos(K*pi/12) * 16/9. + */ + + dataptr = data; + for (ctr = 0; ctr < 3; ctr++) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*5]; + tmp11 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*4]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*3]; + + tmp10 = tmp0 + tmp2; + tmp12 = tmp0 - tmp2; + + tmp0 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*5]; + tmp1 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*4]; + tmp2 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*3]; + + dataptr[DCTSIZE*0] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 + tmp11, FIX(1.777777778)), /* 16/9 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*2] = (DCTELEM) + DESCALE(MULTIPLY(tmp12, FIX(2.177324216)), /* c2 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*4] = (DCTELEM) + DESCALE(MULTIPLY(tmp10 - tmp11 - tmp11, FIX(1.257078722)), /* c4 */ + CONST_BITS+PASS1_BITS); + + /* Odd part */ + + tmp10 = MULTIPLY(tmp0 + tmp2, FIX(0.650711829)); /* c5 */ + + dataptr[DCTSIZE*1] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp0 + tmp1, FIX(1.777777778)), /* 16/9 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*3] = (DCTELEM) + DESCALE(MULTIPLY(tmp0 - tmp1 - tmp2, FIX(1.777777778)), /* 16/9 */ + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*5] = (DCTELEM) + DESCALE(tmp10 + MULTIPLY(tmp2 - tmp1, FIX(1.777777778)), /* 16/9 */ + CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 2x4 sample block. + * + * 2-point FDCT in pass 1 (rows), 4-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_2x4 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + INT32 tmp0, tmp1; + INT32 tmp10, tmp11; + DCTELEM *dataptr; + JSAMPROW elemptr; + int ctr; + SHIFT_TEMPS + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + /* Pass 1: process rows. + * Note results are scaled up by sqrt(8) compared to a true DCT. + */ + + dataptr = data; + for (ctr = 0; ctr < 4; ctr++) { + elemptr = sample_data[ctr] + start_col; + + /* Even part */ + + tmp0 = GETJSAMPLE(elemptr[0]); + tmp1 = GETJSAMPLE(elemptr[1]); + + /* Apply unsigned->signed conversion. */ + dataptr[0] = (DCTELEM) (tmp0 + tmp1 - 2 * CENTERJSAMPLE); + + /* Odd part */ + + dataptr[1] = (DCTELEM) (tmp0 - tmp1); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We leave the results scaled up by an overall factor of 8. + * We must also scale the output by (8/2)*(8/4) = 2**3. + * 4-point FDCT kernel, + * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point FDCT]. + */ + + dataptr = data; + for (ctr = 0; ctr < 2; ctr++) { + /* Even part */ + + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*3]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*2]; + + tmp10 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*3]; + tmp11 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*2]; + + dataptr[DCTSIZE*0] = (DCTELEM) ((tmp0 + tmp1) << 3); + dataptr[DCTSIZE*2] = (DCTELEM) ((tmp0 - tmp1) << 3); + + /* Odd part */ + + tmp0 = MULTIPLY(tmp10 + tmp11, FIX_0_541196100); /* c6 */ + /* Add fudge factor here for final descale. */ + tmp0 += ONE << (CONST_BITS-3-1); + + dataptr[DCTSIZE*1] = (DCTELEM) + RIGHT_SHIFT(tmp0 + MULTIPLY(tmp10, FIX_0_765366865), /* c2-c6 */ + CONST_BITS-3); + dataptr[DCTSIZE*3] = (DCTELEM) + RIGHT_SHIFT(tmp0 - MULTIPLY(tmp11, FIX_1_847759065), /* c2+c6 */ + CONST_BITS-3); + + dataptr++; /* advance pointer to next column */ + } +} + + +/* + * Perform the forward DCT on a 1x2 sample block. + * + * 1-point FDCT in pass 1 (rows), 2-point in pass 2 (columns). + */ + +GLOBAL(void) +jpeg_fdct_1x2 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col) +{ + DCTELEM tmp0, tmp1; + + /* Pre-zero output coefficient block. */ + MEMZERO(data, SIZEOF(DCTELEM) * DCTSIZE2); + + /* Pass 1: empty. */ + + /* Pass 2: process columns. + * We leave the results scaled up by an overall factor of 8. + * We must also scale the output by (8/1)*(8/2) = 2**5. + */ + + /* Even part */ + + tmp0 = GETJSAMPLE(sample_data[0][start_col]); + tmp1 = GETJSAMPLE(sample_data[1][start_col]); + + /* Apply unsigned->signed conversion. */ + data[DCTSIZE*0] = (tmp0 + tmp1 - 2 * CENTERJSAMPLE) << 5; + + /* Odd part */ + + data[DCTSIZE*1] = (tmp0 - tmp1) << 5; +} + +#endif /* DCT_SCALING_SUPPORTED */ +#endif /* DCT_ISLOW_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jidctflt.c b/widget/milsko/milskosrc/external/libjpeg/src/jidctflt.c new file mode 100644 index 0000000000..e33a2b5e42 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jidctflt.c @@ -0,0 +1,238 @@ +/* + * jidctflt.c + * + * Copyright (C) 1994-1998, Thomas G. Lane. + * Modified 2010-2017 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a floating-point implementation of the + * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine + * must also perform dequantization of the input coefficients. + * + * This implementation should be more accurate than either of the integer + * IDCT implementations. However, it may not give the same results on all + * machines because of differences in roundoff behavior. Speed will depend + * on the hardware's floating point capacity. + * + * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT + * on each row (or vice versa, but it's more convenient to emit a row at + * a time). Direct algorithms are also available, but they are much more + * complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with a fixed-point + * implementation, accuracy is lost due to imprecise representation of the + * scaled quantization values. However, that problem does not arise if + * we use floating point arithmetic. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_FLOAT_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCT blocks. /* deliberate syntax err */ +#endif + + +/* Dequantize a coefficient by multiplying it by the multiplier-table + * entry; produce a float result. + */ + +#define DEQUANTIZE(coef,quantval) (((FAST_FLOAT) (coef)) * (quantval)) + + +/* + * Perform dequantization and inverse DCT on one block of coefficients. + * + * cK represents cos(K*pi/16). + */ + +GLOBAL(void) +jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + FAST_FLOAT tmp10, tmp11, tmp12, tmp13; + FAST_FLOAT z5, z10, z11, z12, z13; + JCOEFPTR inptr; + FLOAT_MULT_TYPE * quantptr; + FAST_FLOAT * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + FAST_FLOAT workspace[DCTSIZE2]; /* buffers data between passes */ + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (FLOAT_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; ctr--) { + /* Due to quantization, we will usually find that many of the input + * coefficients are zero, especially the AC terms. We can exploit this + * by short-circuiting the IDCT calculation for any column in which all + * the AC terms are zero. In that case each output is equal to the + * DC coefficient (with scale factor as needed). + * With typical images and quantization tables, half or more of the + * column DCT calculations can be simplified this way. + */ + + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && + inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && + inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && + inptr[DCTSIZE*7] == 0) { + /* AC terms all zero */ + FAST_FLOAT dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + wsptr[DCTSIZE*4] = dcval; + wsptr[DCTSIZE*5] = dcval; + wsptr[DCTSIZE*6] = dcval; + wsptr[DCTSIZE*7] = dcval; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + continue; + } + + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp10 = tmp0 + tmp2; /* phase 3 */ + tmp11 = tmp0 - tmp2; + + tmp13 = tmp1 + tmp3; /* phases 5-3 */ + tmp12 = (tmp1 - tmp3) * ((FAST_FLOAT) 1.414213562) - tmp13; /* 2*c4 */ + + tmp0 = tmp10 + tmp13; /* phase 2 */ + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + z13 = tmp6 + tmp5; /* phase 6 */ + z10 = tmp6 - tmp5; + z11 = tmp4 + tmp7; + z12 = tmp4 - tmp7; + + tmp7 = z11 + z13; /* phase 5 */ + tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); /* 2*c4 */ + + z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */ + tmp10 = z5 - z12 * ((FAST_FLOAT) 1.082392200); /* 2*(c2-c6) */ + tmp12 = z5 - z10 * ((FAST_FLOAT) 2.613125930); /* 2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; /* phase 2 */ + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 - tmp5; + + wsptr[DCTSIZE*0] = tmp0 + tmp7; + wsptr[DCTSIZE*7] = tmp0 - tmp7; + wsptr[DCTSIZE*1] = tmp1 + tmp6; + wsptr[DCTSIZE*6] = tmp1 - tmp6; + wsptr[DCTSIZE*2] = tmp2 + tmp5; + wsptr[DCTSIZE*5] = tmp2 - tmp5; + wsptr[DCTSIZE*3] = tmp3 + tmp4; + wsptr[DCTSIZE*4] = tmp3 - tmp4; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + } + + /* Pass 2: process rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + outptr = output_buf[ctr] + output_col; + /* Rows of zeroes can be exploited in the same way as we did with columns. + * However, the column calculation has created many nonzero AC terms, so + * the simplification applies less often (typically 5% to 10% of the time). + * And testing floats for zero is relatively expensive, so we don't bother. + */ + + /* Even part */ + + /* Prepare range-limit and float->int conversion */ + z5 = wsptr[0] + (((FAST_FLOAT) RANGE_CENTER) + ((FAST_FLOAT) 0.5)); + tmp10 = z5 + wsptr[4]; + tmp11 = z5 - wsptr[4]; + + tmp13 = wsptr[2] + wsptr[6]; + tmp12 = (wsptr[2] - wsptr[6]) * + ((FAST_FLOAT) 1.414213562) - tmp13; /* 2*c4 */ + + tmp0 = tmp10 + tmp13; + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + z13 = wsptr[5] + wsptr[3]; + z10 = wsptr[5] - wsptr[3]; + z11 = wsptr[1] + wsptr[7]; + z12 = wsptr[1] - wsptr[7]; + + tmp7 = z11 + z13; /* phase 5 */ + tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); /* 2*c4 */ + + z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */ + tmp10 = z5 - z12 * ((FAST_FLOAT) 1.082392200); /* 2*(c2-c6) */ + tmp12 = z5 - z10 * ((FAST_FLOAT) 2.613125930); /* 2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; /* phase 2 */ + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 - tmp5; + + /* Final output stage: float->int conversion and range-limit */ + + outptr[0] = range_limit[(int) (tmp0 + tmp7) & RANGE_MASK]; + outptr[7] = range_limit[(int) (tmp0 - tmp7) & RANGE_MASK]; + outptr[1] = range_limit[(int) (tmp1 + tmp6) & RANGE_MASK]; + outptr[6] = range_limit[(int) (tmp1 - tmp6) & RANGE_MASK]; + outptr[2] = range_limit[(int) (tmp2 + tmp5) & RANGE_MASK]; + outptr[5] = range_limit[(int) (tmp2 - tmp5) & RANGE_MASK]; + outptr[3] = range_limit[(int) (tmp3 + tmp4) & RANGE_MASK]; + outptr[4] = range_limit[(int) (tmp3 - tmp4) & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + +#endif /* DCT_FLOAT_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jidctfst.c b/widget/milsko/milskosrc/external/libjpeg/src/jidctfst.c new file mode 100644 index 0000000000..1ac3e39cb7 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jidctfst.c @@ -0,0 +1,351 @@ +/* + * jidctfst.c + * + * Copyright (C) 1994-1998, Thomas G. Lane. + * Modified 2015-2017 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a fast, not so accurate integer implementation of the + * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine + * must also perform dequantization of the input coefficients. + * + * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT + * on each row (or vice versa, but it's more convenient to emit a row at + * a time). Direct algorithms are also available, but they are much more + * complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with fixed-point math, + * accuracy is lost due to imprecise representation of the scaled + * quantization values. The smaller the quantization table entry, the less + * precise the scaled value, so this implementation does worse with high- + * quality-setting files than with low-quality ones. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_IFAST_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCT blocks. /* deliberate syntax err */ +#endif + + +/* Scaling decisions are generally the same as in the LL&M algorithm; + * see jidctint.c for more details. However, we choose to descale + * (right shift) multiplication products as soon as they are formed, + * rather than carrying additional fractional bits into subsequent additions. + * This compromises accuracy slightly, but it lets us save a few shifts. + * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples) + * everywhere except in the multiplications proper; this saves a good deal + * of work on 16-bit-int machines. + * + * The dequantized coefficients are not integers because the AA&N scaling + * factors have been incorporated. We represent them scaled up by PASS1_BITS, + * so that the first and second IDCT rounds have the same input scaling. + * For 8-bit JSAMPLEs, we choose IFAST_SCALE_BITS = PASS1_BITS so as to + * avoid a descaling shift; this compromises accuracy rather drastically + * for small quantization table entries, but it saves a lot of shifts. + * For 12-bit JSAMPLEs, there's no hope of using 16x16 multiplies anyway, + * so we use a much larger scaling factor to preserve accuracy. + * + * A final compromise is to represent the multiplicative constants to only + * 8 fractional bits, rather than 13. This saves some shifting work on some + * machines, and may also reduce the cost of multiplication (since there + * are fewer one-bits in the constants). + */ + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 8 +#define PASS1_BITS 2 +#else +#define CONST_BITS 8 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 8 +#define FIX_1_082392200 ((INT32) 277) /* FIX(1.082392200) */ +#define FIX_1_414213562 ((INT32) 362) /* FIX(1.414213562) */ +#define FIX_1_847759065 ((INT32) 473) /* FIX(1.847759065) */ +#define FIX_2_613125930 ((INT32) 669) /* FIX(2.613125930) */ +#else +#define FIX_1_082392200 FIX(1.082392200) +#define FIX_1_414213562 FIX(1.414213562) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_2_613125930 FIX(2.613125930) +#endif + + +/* We can gain a little more speed, with a further compromise in accuracy, + * by omitting the addition in a descaling shift. This yields an incorrectly + * rounded result half the time... + */ + +#ifndef USE_ACCURATE_ROUNDING +#undef DESCALE +#define DESCALE(x,n) RIGHT_SHIFT(x, n) +#endif + + +/* Multiply a DCTELEM variable by an INT32 constant, and immediately + * descale to yield a DCTELEM result. + */ + +#define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS)) + + +/* Dequantize a coefficient by multiplying it by the multiplier-table + * entry; produce a DCTELEM result. For 8-bit data a 16x16->16 + * multiplication will do. For 12-bit data, the multiplier table is + * declared INT32, so a 32-bit multiply will be used. + */ + +#if BITS_IN_JSAMPLE == 8 +#define DEQUANTIZE(coef,quantval) (((IFAST_MULT_TYPE) (coef)) * (quantval)) +#else +#define DEQUANTIZE(coef,quantval) \ + DESCALE((coef)*(quantval), IFAST_SCALE_BITS-PASS1_BITS) +#endif + + +/* + * Perform dequantization and inverse DCT on one block of coefficients. + * + * cK represents cos(K*pi/16). + */ + +GLOBAL(void) +jpeg_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + DCTELEM tmp10, tmp11, tmp12, tmp13; + DCTELEM z5, z10, z11, z12, z13; + JCOEFPTR inptr; + IFAST_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[DCTSIZE2]; /* buffers data between passes */ + SHIFT_TEMPS /* for DESCALE */ + ISHIFT_TEMPS /* for IRIGHT_SHIFT */ + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (IFAST_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; ctr--) { + /* Due to quantization, we will usually find that many of the input + * coefficients are zero, especially the AC terms. We can exploit this + * by short-circuiting the IDCT calculation for any column in which all + * the AC terms are zero. In that case each output is equal to the + * DC coefficient (with scale factor as needed). + * With typical images and quantization tables, half or more of the + * column DCT calculations can be simplified this way. + */ + + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && + inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && + inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && + inptr[DCTSIZE*7] == 0) { + /* AC terms all zero */ + int dcval = (int) DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + wsptr[DCTSIZE*4] = dcval; + wsptr[DCTSIZE*5] = dcval; + wsptr[DCTSIZE*6] = dcval; + wsptr[DCTSIZE*7] = dcval; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + continue; + } + + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp10 = tmp0 + tmp2; /* phase 3 */ + tmp11 = tmp0 - tmp2; + + tmp13 = tmp1 + tmp3; /* phases 5-3 */ + tmp12 = MULTIPLY(tmp1 - tmp3, FIX_1_414213562) - tmp13; /* 2*c4 */ + + tmp0 = tmp10 + tmp13; /* phase 2 */ + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + z13 = tmp6 + tmp5; /* phase 6 */ + z10 = tmp6 - tmp5; + z11 = tmp4 + tmp7; + z12 = tmp4 - tmp7; + + tmp7 = z11 + z13; /* phase 5 */ + tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */ + + z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */ + tmp10 = z5 - MULTIPLY(z12, FIX_1_082392200); /* 2*(c2-c6) */ + tmp12 = z5 - MULTIPLY(z10, FIX_2_613125930); /* 2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; /* phase 2 */ + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 - tmp5; + + wsptr[DCTSIZE*0] = (int) (tmp0 + tmp7); + wsptr[DCTSIZE*7] = (int) (tmp0 - tmp7); + wsptr[DCTSIZE*1] = (int) (tmp1 + tmp6); + wsptr[DCTSIZE*6] = (int) (tmp1 - tmp6); + wsptr[DCTSIZE*2] = (int) (tmp2 + tmp5); + wsptr[DCTSIZE*5] = (int) (tmp2 - tmp5); + wsptr[DCTSIZE*3] = (int) (tmp3 + tmp4); + wsptr[DCTSIZE*4] = (int) (tmp3 - tmp4); + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + } + + /* Pass 2: process rows from work array, store into output array. + * Note that we must descale the results by a factor of 8 == 2**3, + * and also undo the PASS1_BITS scaling. + */ + + wsptr = workspace; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Add range center and fudge factor for final descale and range-limit. */ + z5 = (DCTELEM) wsptr[0] + + ((((DCTELEM) RANGE_CENTER) << (PASS1_BITS+3)) + + (1 << (PASS1_BITS+2))); + + /* Rows of zeroes can be exploited in the same way as we did with columns. + * However, the column calculation has created many nonzero AC terms, so + * the simplification applies less often (typically 5% to 10% of the time). + * On machines with very fast multiplication, it's possible that the + * test takes more time than it's worth. In that case this section + * may be commented out. + */ + +#ifndef NO_ZERO_ROW_TEST + if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 && + wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) { + /* AC terms all zero */ + JSAMPLE dcval = range_limit[(int) IRIGHT_SHIFT(z5, PASS1_BITS+3) + & RANGE_MASK]; + + outptr[0] = dcval; + outptr[1] = dcval; + outptr[2] = dcval; + outptr[3] = dcval; + outptr[4] = dcval; + outptr[5] = dcval; + outptr[6] = dcval; + outptr[7] = dcval; + + wsptr += DCTSIZE; /* advance pointer to next row */ + continue; + } +#endif + + /* Even part */ + + tmp10 = z5 + (DCTELEM) wsptr[4]; + tmp11 = z5 - (DCTELEM) wsptr[4]; + + tmp13 = (DCTELEM) wsptr[2] + (DCTELEM) wsptr[6]; + tmp12 = MULTIPLY((DCTELEM) wsptr[2] - (DCTELEM) wsptr[6], + FIX_1_414213562) - tmp13; /* 2*c4 */ + + tmp0 = tmp10 + tmp13; + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + z13 = (DCTELEM) wsptr[5] + (DCTELEM) wsptr[3]; + z10 = (DCTELEM) wsptr[5] - (DCTELEM) wsptr[3]; + z11 = (DCTELEM) wsptr[1] + (DCTELEM) wsptr[7]; + z12 = (DCTELEM) wsptr[1] - (DCTELEM) wsptr[7]; + + tmp7 = z11 + z13; /* phase 5 */ + tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */ + + z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */ + tmp10 = z5 - MULTIPLY(z12, FIX_1_082392200); /* 2*(c2-c6) */ + tmp12 = z5 - MULTIPLY(z10, FIX_2_613125930); /* 2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; /* phase 2 */ + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 - tmp5; + + /* Final output stage: scale down by a factor of 8 and range-limit */ + + outptr[0] = range_limit[(int) IRIGHT_SHIFT(tmp0 + tmp7, PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) IRIGHT_SHIFT(tmp0 - tmp7, PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) IRIGHT_SHIFT(tmp1 + tmp6, PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) IRIGHT_SHIFT(tmp1 - tmp6, PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) IRIGHT_SHIFT(tmp2 + tmp5, PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) IRIGHT_SHIFT(tmp2 - tmp5, PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) IRIGHT_SHIFT(tmp3 + tmp4, PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) IRIGHT_SHIFT(tmp3 - tmp4, PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + +#endif /* DCT_IFAST_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jidctint.c b/widget/milsko/milskosrc/external/libjpeg/src/jidctint.c new file mode 100644 index 0000000000..e30ec8c8a4 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jidctint.c @@ -0,0 +1,5240 @@ +/* + * jidctint.c + * + * Copyright (C) 1991-1998, Thomas G. Lane. + * Modification developed 2002-2018 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a slow-but-accurate integer implementation of the + * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine + * must also perform dequantization of the input coefficients. + * + * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT + * on each row (or vice versa, but it's more convenient to emit a row at + * a time). Direct algorithms are also available, but they are much more + * complex and seem not to be any faster when reduced to code. + * + * This implementation is based on an algorithm described in + * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT + * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics, + * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991. + * The primary algorithm described there uses 11 multiplies and 29 adds. + * We use their alternate method with 12 multiplies and 32 adds. + * The advantage of this method is that no data path contains more than one + * multiplication; this allows a very simple and accurate implementation in + * scaled fixed-point arithmetic, with a minimal number of shifts. + * + * We also provide IDCT routines with various output sample block sizes for + * direct resolution reduction or enlargement and for direct resolving the + * common 2x1 and 1x2 subsampling cases without additional resampling: NxN + * (N=1...16), 2NxN, and Nx2N (N=1...8) pixels for one 8x8 input DCT block. + * + * For N<8 we simply take the corresponding low-frequency coefficients of + * the 8x8 input DCT block and apply an NxN point IDCT on the sub-block + * to yield the downscaled outputs. + * This can be seen as direct low-pass downsampling from the DCT domain + * point of view rather than the usual spatial domain point of view, + * yielding significant computational savings and results at least + * as good as common bilinear (averaging) spatial downsampling. + * + * For N>8 we apply a partial NxN IDCT on the 8 input coefficients as + * lower frequencies and higher frequencies assumed to be zero. + * It turns out that the computational effort is similar to the 8x8 IDCT + * regarding the output size. + * Furthermore, the scaling and descaling is the same for all IDCT sizes. + * + * CAUTION: We rely on the FIX() macro except for the N=1,2,4,8 cases + * since there would be too many additional constants to pre-calculate. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_ISLOW_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCT blocks. /* deliberate syntax err */ +#endif + + +/* + * The poop on this scaling stuff is as follows: + * + * Each 1-D IDCT step produces outputs which are a factor of sqrt(N) + * larger than the true IDCT outputs. The final outputs are therefore + * a factor of N larger than desired; since N=8 this can be cured by + * a simple right shift at the end of the algorithm. The advantage of + * this arrangement is that we save two multiplications per 1-D IDCT, + * because the y0 and y4 inputs need not be divided by sqrt(N). + * + * We have to do addition and subtraction of the integer inputs, which + * is no problem, and multiplication by fractional constants, which is + * a problem to do in integer arithmetic. We multiply all the constants + * by CONST_SCALE and convert them to integer constants (thus retaining + * CONST_BITS bits of precision in the constants). After doing a + * multiplication we have to divide the product by CONST_SCALE, with proper + * rounding, to produce the correct output. This division can be done + * cheaply as a right shift of CONST_BITS bits. We postpone shifting + * as long as possible so that partial sums can be added together with + * full fractional precision. + * + * The outputs of the first pass are scaled up by PASS1_BITS bits so that + * they are represented to better-than-integral precision. These outputs + * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word + * with the recommended scaling. (To scale up 12-bit sample data further, an + * intermediate INT32 array would be needed.) + * + * To avoid overflow of the 32-bit intermediate results in pass 2, we must + * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis + * shows that the values given below are the most effective. + */ + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 13 +#define PASS1_BITS 2 +#else +#define CONST_BITS 13 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 13 +#define FIX_0_298631336 ((INT32) 2446) /* FIX(0.298631336) */ +#define FIX_0_390180644 ((INT32) 3196) /* FIX(0.390180644) */ +#define FIX_0_541196100 ((INT32) 4433) /* FIX(0.541196100) */ +#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */ +#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */ +#define FIX_1_175875602 ((INT32) 9633) /* FIX(1.175875602) */ +#define FIX_1_501321110 ((INT32) 12299) /* FIX(1.501321110) */ +#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */ +#define FIX_1_961570560 ((INT32) 16069) /* FIX(1.961570560) */ +#define FIX_2_053119869 ((INT32) 16819) /* FIX(2.053119869) */ +#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */ +#define FIX_3_072711026 ((INT32) 25172) /* FIX(3.072711026) */ +#else +#define FIX_0_298631336 FIX(0.298631336) +#define FIX_0_390180644 FIX(0.390180644) +#define FIX_0_541196100 FIX(0.541196100) +#define FIX_0_765366865 FIX(0.765366865) +#define FIX_0_899976223 FIX(0.899976223) +#define FIX_1_175875602 FIX(1.175875602) +#define FIX_1_501321110 FIX(1.501321110) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_1_961570560 FIX(1.961570560) +#define FIX_2_053119869 FIX(2.053119869) +#define FIX_2_562915447 FIX(2.562915447) +#define FIX_3_072711026 FIX(3.072711026) +#endif + + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * For 8-bit samples with the recommended scaling, all the variable + * and constant values involved are no more than 16 bits wide, so a + * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. + * For 12-bit samples, a full 32-bit multiplication will be needed. + */ + +#if BITS_IN_JSAMPLE == 8 +#define MULTIPLY(var,const) MULTIPLY16C16(var,const) +#else +#define MULTIPLY(var,const) ((var) * (const)) +#endif + + +/* Dequantize a coefficient by multiplying it by the multiplier-table + * entry; produce an int result. In this module, both inputs and result + * are 16 bits or less, so either int or short multiply will work. + */ + +#define DEQUANTIZE(coef,quantval) (((ISLOW_MULT_TYPE) (coef)) * (quantval)) + + +/* + * Perform dequantization and inverse DCT on one block of coefficients. + * + * Optimized algorithm with 12 multiplications in the 1-D kernel. + * cK represents sqrt(2) * cos(K*pi/16). + */ + +GLOBAL(void) +jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3; + INT32 tmp10, tmp11, tmp12, tmp13; + INT32 z1, z2, z3; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[DCTSIZE2]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. + * Note results are scaled up by sqrt(8) compared to a true IDCT; + * furthermore, we scale the results by 2**PASS1_BITS. + */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; ctr--) { + /* Due to quantization, we will usually find that many of the input + * coefficients are zero, especially the AC terms. We can exploit this + * by short-circuiting the IDCT calculation for any column in which all + * the AC terms are zero. In that case each output is equal to the + * DC coefficient (with scale factor as needed). + * With typical images and quantization tables, half or more of the + * column DCT calculations can be simplified this way. + */ + + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && + inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && + inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && + inptr[DCTSIZE*7] == 0) { + /* AC terms all zero */ + int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + wsptr[DCTSIZE*4] = dcval; + wsptr[DCTSIZE*5] = dcval; + wsptr[DCTSIZE*6] = dcval; + wsptr[DCTSIZE*7] = dcval; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + continue; + } + + /* Even part: reverse the even part of the forward DCT. + * The rotator is c(-6). + */ + + z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z2 <<= CONST_BITS; + z3 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + z2 += ONE << (CONST_BITS-PASS1_BITS-1); + + tmp0 = z2 + z3; + tmp1 = z2 - z3; + + z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ + tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ + tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ + + tmp10 = tmp0 + tmp2; + tmp13 = tmp0 - tmp2; + tmp11 = tmp1 + tmp3; + tmp12 = tmp1 - tmp3; + + /* Odd part per figure 8; the matrix is unitary and hence its + * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. + */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + + z2 = tmp0 + tmp2; + z3 = tmp1 + tmp3; + + z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* c3 */ + z2 = MULTIPLY(z2, - FIX_1_961570560); /* -c3-c5 */ + z3 = MULTIPLY(z3, - FIX_0_390180644); /* -c3+c5 */ + z2 += z1; + z3 += z1; + + z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ + tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* -c1+c3+c5-c7 */ + tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* c1+c3-c5-c7 */ + tmp0 += z1 + z2; + tmp3 += z1 + z3; + + z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ + tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* c1+c3-c5+c7 */ + tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* c1+c3+c5-c7 */ + tmp1 += z1 + z3; + tmp2 += z1 + z2; + + /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ + + wsptr[DCTSIZE*0] = (int) RIGHT_SHIFT(tmp10 + tmp3, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*7] = (int) RIGHT_SHIFT(tmp10 - tmp3, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*1] = (int) RIGHT_SHIFT(tmp11 + tmp2, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*6] = (int) RIGHT_SHIFT(tmp11 - tmp2, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*2] = (int) RIGHT_SHIFT(tmp12 + tmp1, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*5] = (int) RIGHT_SHIFT(tmp12 - tmp1, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*3] = (int) RIGHT_SHIFT(tmp13 + tmp0, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*4] = (int) RIGHT_SHIFT(tmp13 - tmp0, CONST_BITS-PASS1_BITS); + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + } + + /* Pass 2: process rows from work array, store into output array. + * Note that we must descale the results by a factor of 8 == 2**3, + * and also undo the PASS1_BITS scaling. + */ + + wsptr = workspace; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Add range center and fudge factor for final descale and range-limit. */ + z2 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + + /* Rows of zeroes can be exploited in the same way as we did with columns. + * However, the column calculation has created many nonzero AC terms, so + * the simplification applies less often (typically 5% to 10% of the time). + * On machines with very fast multiplication, it's possible that the + * test takes more time than it's worth. In that case this section + * may be commented out. + */ + +#ifndef NO_ZERO_ROW_TEST + if (wsptr[1] == 0 && wsptr[2] == 0 && wsptr[3] == 0 && wsptr[4] == 0 && + wsptr[5] == 0 && wsptr[6] == 0 && wsptr[7] == 0) { + /* AC terms all zero */ + JSAMPLE dcval = range_limit[(int) RIGHT_SHIFT(z2, PASS1_BITS+3) + & RANGE_MASK]; + + outptr[0] = dcval; + outptr[1] = dcval; + outptr[2] = dcval; + outptr[3] = dcval; + outptr[4] = dcval; + outptr[5] = dcval; + outptr[6] = dcval; + outptr[7] = dcval; + + wsptr += DCTSIZE; /* advance pointer to next row */ + continue; + } +#endif + + /* Even part: reverse the even part of the forward DCT. + * The rotator is c(-6). + */ + + z3 = (INT32) wsptr[4]; + + tmp0 = (z2 + z3) << CONST_BITS; + tmp1 = (z2 - z3) << CONST_BITS; + + z2 = (INT32) wsptr[2]; + z3 = (INT32) wsptr[6]; + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ + tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ + tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ + + tmp10 = tmp0 + tmp2; + tmp13 = tmp0 - tmp2; + tmp11 = tmp1 + tmp3; + tmp12 = tmp1 - tmp3; + + /* Odd part per figure 8; the matrix is unitary and hence its + * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. + */ + + tmp0 = (INT32) wsptr[7]; + tmp1 = (INT32) wsptr[5]; + tmp2 = (INT32) wsptr[3]; + tmp3 = (INT32) wsptr[1]; + + z2 = tmp0 + tmp2; + z3 = tmp1 + tmp3; + + z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* c3 */ + z2 = MULTIPLY(z2, - FIX_1_961570560); /* -c3-c5 */ + z3 = MULTIPLY(z3, - FIX_0_390180644); /* -c3+c5 */ + z2 += z1; + z3 += z1; + + z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ + tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* -c1+c3+c5-c7 */ + tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* c1+c3-c5-c7 */ + tmp0 += z1 + z2; + tmp3 += z1 + z3; + + z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ + tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* c1+c3-c5+c7 */ + tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* c1+c3+c5-c7 */ + tmp1 += z1 + z3; + tmp2 += z1 + z2; + + /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp13 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp13 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + +#ifdef IDCT_SCALING_SUPPORTED + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 7x7 output block. + * + * Optimized algorithm with 12 multiplications in the 1-D kernel. + * cK represents sqrt(2) * cos(K*pi/14). + */ + +GLOBAL(void) +jpeg_idct_7x7 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp1, tmp2, tmp10, tmp11, tmp12, tmp13; + INT32 z1, z2, z3; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[7*7]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 7; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp13 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp13 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + tmp13 += ONE << (CONST_BITS-PASS1_BITS-1); + + z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp10 = MULTIPLY(z2 - z3, FIX(0.881747734)); /* c4 */ + tmp12 = MULTIPLY(z1 - z2, FIX(0.314692123)); /* c6 */ + tmp11 = tmp10 + tmp12 + tmp13 - MULTIPLY(z2, FIX(1.841218003)); /* c2+c4-c6 */ + tmp0 = z1 + z3; + z2 -= tmp0; + tmp0 = MULTIPLY(tmp0, FIX(1.274162392)) + tmp13; /* c2 */ + tmp10 += tmp0 - MULTIPLY(z3, FIX(0.077722536)); /* c2-c4-c6 */ + tmp12 += tmp0 - MULTIPLY(z1, FIX(2.470602249)); /* c2+c4+c6 */ + tmp13 += MULTIPLY(z2, FIX(1.414213562)); /* c0 */ + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + + tmp1 = MULTIPLY(z1 + z2, FIX(0.935414347)); /* (c3+c1-c5)/2 */ + tmp2 = MULTIPLY(z1 - z2, FIX(0.170262339)); /* (c3+c5-c1)/2 */ + tmp0 = tmp1 - tmp2; + tmp1 += tmp2; + tmp2 = MULTIPLY(z2 + z3, - FIX(1.378756276)); /* -c1 */ + tmp1 += tmp2; + z2 = MULTIPLY(z1 + z3, FIX(0.613604268)); /* c5 */ + tmp0 += z2; + tmp2 += z2 + MULTIPLY(z3, FIX(1.870828693)); /* c3+c1-c5 */ + + /* Final output stage */ + + wsptr[7*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS); + wsptr[7*6] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS); + wsptr[7*1] = (int) RIGHT_SHIFT(tmp11 + tmp1, CONST_BITS-PASS1_BITS); + wsptr[7*5] = (int) RIGHT_SHIFT(tmp11 - tmp1, CONST_BITS-PASS1_BITS); + wsptr[7*2] = (int) RIGHT_SHIFT(tmp12 + tmp2, CONST_BITS-PASS1_BITS); + wsptr[7*4] = (int) RIGHT_SHIFT(tmp12 - tmp2, CONST_BITS-PASS1_BITS); + wsptr[7*3] = (int) RIGHT_SHIFT(tmp13, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 7 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 7; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp13 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + tmp13 <<= CONST_BITS; + + z1 = (INT32) wsptr[2]; + z2 = (INT32) wsptr[4]; + z3 = (INT32) wsptr[6]; + + tmp10 = MULTIPLY(z2 - z3, FIX(0.881747734)); /* c4 */ + tmp12 = MULTIPLY(z1 - z2, FIX(0.314692123)); /* c6 */ + tmp11 = tmp10 + tmp12 + tmp13 - MULTIPLY(z2, FIX(1.841218003)); /* c2+c4-c6 */ + tmp0 = z1 + z3; + z2 -= tmp0; + tmp0 = MULTIPLY(tmp0, FIX(1.274162392)) + tmp13; /* c2 */ + tmp10 += tmp0 - MULTIPLY(z3, FIX(0.077722536)); /* c2-c4-c6 */ + tmp12 += tmp0 - MULTIPLY(z1, FIX(2.470602249)); /* c2+c4+c6 */ + tmp13 += MULTIPLY(z2, FIX(1.414213562)); /* c0 */ + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + + tmp1 = MULTIPLY(z1 + z2, FIX(0.935414347)); /* (c3+c1-c5)/2 */ + tmp2 = MULTIPLY(z1 - z2, FIX(0.170262339)); /* (c3+c5-c1)/2 */ + tmp0 = tmp1 - tmp2; + tmp1 += tmp2; + tmp2 = MULTIPLY(z2 + z3, - FIX(1.378756276)); /* -c1 */ + tmp1 += tmp2; + z2 = MULTIPLY(z1 + z3, FIX(0.613604268)); /* c5 */ + tmp0 += z2; + tmp2 += z2 + MULTIPLY(z3, FIX(1.870828693)); /* c3+c1-c5 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 7; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 6x6 output block. + * + * Optimized algorithm with 3 multiplications in the 1-D kernel. + * cK represents sqrt(2) * cos(K*pi/12). + */ + +GLOBAL(void) +jpeg_idct_6x6 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp1, tmp2, tmp10, tmp11, tmp12; + INT32 z1, z2, z3; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[6*6]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 6; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp0 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + tmp0 += ONE << (CONST_BITS-PASS1_BITS-1); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + tmp10 = MULTIPLY(tmp2, FIX(0.707106781)); /* c4 */ + tmp1 = tmp0 + tmp10; + tmp11 = RIGHT_SHIFT(tmp0 - tmp10 - tmp10, CONST_BITS-PASS1_BITS); + tmp10 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + tmp0 = MULTIPLY(tmp10, FIX(1.224744871)); /* c2 */ + tmp10 = tmp1 + tmp0; + tmp12 = tmp1 - tmp0; + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp1 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */ + tmp0 = tmp1 + ((z1 + z2) << CONST_BITS); + tmp2 = tmp1 + ((z3 - z2) << CONST_BITS); + tmp1 = (z1 - z2 - z3) << PASS1_BITS; + + /* Final output stage */ + + wsptr[6*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS); + wsptr[6*5] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS); + wsptr[6*1] = (int) (tmp11 + tmp1); + wsptr[6*4] = (int) (tmp11 - tmp1); + wsptr[6*2] = (int) RIGHT_SHIFT(tmp12 + tmp2, CONST_BITS-PASS1_BITS); + wsptr[6*3] = (int) RIGHT_SHIFT(tmp12 - tmp2, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 6 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 6; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp0 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + tmp0 <<= CONST_BITS; + tmp2 = (INT32) wsptr[4]; + tmp10 = MULTIPLY(tmp2, FIX(0.707106781)); /* c4 */ + tmp1 = tmp0 + tmp10; + tmp11 = tmp0 - tmp10 - tmp10; + tmp10 = (INT32) wsptr[2]; + tmp0 = MULTIPLY(tmp10, FIX(1.224744871)); /* c2 */ + tmp10 = tmp1 + tmp0; + tmp12 = tmp1 - tmp0; + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + tmp1 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */ + tmp0 = tmp1 + ((z1 + z2) << CONST_BITS); + tmp2 = tmp1 + ((z3 - z2) << CONST_BITS); + tmp1 = (z1 - z2 - z3) << CONST_BITS; + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 6; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 5x5 output block. + * + * Optimized algorithm with 5 multiplications in the 1-D kernel. + * cK represents sqrt(2) * cos(K*pi/10). + */ + +GLOBAL(void) +jpeg_idct_5x5 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp1, tmp10, tmp11, tmp12; + INT32 z1, z2, z3; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[5*5]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 5; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp12 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp12 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + tmp12 += ONE << (CONST_BITS-PASS1_BITS-1); + tmp0 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + tmp1 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z1 = MULTIPLY(tmp0 + tmp1, FIX(0.790569415)); /* (c2+c4)/2 */ + z2 = MULTIPLY(tmp0 - tmp1, FIX(0.353553391)); /* (c2-c4)/2 */ + z3 = tmp12 + z2; + tmp10 = z3 + z1; + tmp11 = z3 - z1; + tmp12 -= z2 << 2; + + /* Odd part */ + + z2 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + + z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c3 */ + tmp0 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c1-c3 */ + tmp1 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c1+c3 */ + + /* Final output stage */ + + wsptr[5*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS); + wsptr[5*4] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS); + wsptr[5*1] = (int) RIGHT_SHIFT(tmp11 + tmp1, CONST_BITS-PASS1_BITS); + wsptr[5*3] = (int) RIGHT_SHIFT(tmp11 - tmp1, CONST_BITS-PASS1_BITS); + wsptr[5*2] = (int) RIGHT_SHIFT(tmp12, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 5 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 5; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp12 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + tmp12 <<= CONST_BITS; + tmp0 = (INT32) wsptr[2]; + tmp1 = (INT32) wsptr[4]; + z1 = MULTIPLY(tmp0 + tmp1, FIX(0.790569415)); /* (c2+c4)/2 */ + z2 = MULTIPLY(tmp0 - tmp1, FIX(0.353553391)); /* (c2-c4)/2 */ + z3 = tmp12 + z2; + tmp10 = z3 + z1; + tmp11 = z3 - z1; + tmp12 -= z2 << 2; + + /* Odd part */ + + z2 = (INT32) wsptr[1]; + z3 = (INT32) wsptr[3]; + + z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c3 */ + tmp0 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c1-c3 */ + tmp1 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c1+c3 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 5; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 4x4 output block. + * + * Optimized algorithm with 3 multiplications in the 1-D kernel. + * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point IDCT]. + */ + +GLOBAL(void) +jpeg_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp2, tmp10, tmp12; + INT32 z1, z2, z3; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[4*4]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 4; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + + tmp10 = (tmp0 + tmp2) << PASS1_BITS; + tmp12 = (tmp0 - tmp2) << PASS1_BITS; + + /* Odd part */ + /* Same rotation as in the even part of the 8x8 LL&M IDCT */ + + z2 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ + /* Add fudge factor here for final descale. */ + z1 += ONE << (CONST_BITS-PASS1_BITS-1); + tmp0 = RIGHT_SHIFT(z1 + MULTIPLY(z2, FIX_0_765366865), /* c2-c6 */ + CONST_BITS-PASS1_BITS); + tmp2 = RIGHT_SHIFT(z1 - MULTIPLY(z3, FIX_1_847759065), /* c2+c6 */ + CONST_BITS-PASS1_BITS); + + /* Final output stage */ + + wsptr[4*0] = (int) (tmp10 + tmp0); + wsptr[4*3] = (int) (tmp10 - tmp0); + wsptr[4*1] = (int) (tmp12 + tmp2); + wsptr[4*2] = (int) (tmp12 - tmp2); + } + + /* Pass 2: process 4 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 4; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp0 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + tmp2 = (INT32) wsptr[2]; + + tmp10 = (tmp0 + tmp2) << CONST_BITS; + tmp12 = (tmp0 - tmp2) << CONST_BITS; + + /* Odd part */ + /* Same rotation as in the even part of the 8x8 LL&M IDCT */ + + z2 = (INT32) wsptr[1]; + z3 = (INT32) wsptr[3]; + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ + tmp0 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ + tmp2 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 4; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 3x3 output block. + * + * Optimized algorithm with 2 multiplications in the 1-D kernel. + * cK represents sqrt(2) * cos(K*pi/6). + */ + +GLOBAL(void) +jpeg_idct_3x3 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp2, tmp10, tmp12; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[3*3]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 3; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp0 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + tmp0 += ONE << (CONST_BITS-PASS1_BITS-1); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + tmp12 = MULTIPLY(tmp2, FIX(0.707106781)); /* c2 */ + tmp10 = tmp0 + tmp12; + tmp2 = tmp0 - tmp12 - tmp12; + + /* Odd part */ + + tmp12 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + tmp0 = MULTIPLY(tmp12, FIX(1.224744871)); /* c1 */ + + /* Final output stage */ + + wsptr[3*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS); + wsptr[3*2] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS); + wsptr[3*1] = (int) RIGHT_SHIFT(tmp2, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 3 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 3; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp0 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + tmp0 <<= CONST_BITS; + tmp2 = (INT32) wsptr[2]; + tmp12 = MULTIPLY(tmp2, FIX(0.707106781)); /* c2 */ + tmp10 = tmp0 + tmp12; + tmp2 = tmp0 - tmp12 - tmp12; + + /* Odd part */ + + tmp12 = (INT32) wsptr[1]; + tmp0 = MULTIPLY(tmp12, FIX(1.224744871)); /* c1 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 3; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 2x2 output block. + * + * Multiplication-less algorithm. + */ + +GLOBAL(void) +jpeg_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; + ISLOW_MULT_TYPE * quantptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + ISHIFT_TEMPS + + /* Pass 1: process columns from input. */ + + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + + /* Column 0 */ + tmp4 = DEQUANTIZE(coef_block[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp5 = DEQUANTIZE(coef_block[DCTSIZE*1], quantptr[DCTSIZE*1]); + /* Add range center and fudge factor for final descale and range-limit. */ + tmp4 += (((DCTELEM) RANGE_CENTER) << 3) + (1 << 2); + + tmp0 = tmp4 + tmp5; + tmp2 = tmp4 - tmp5; + + /* Column 1 */ + tmp4 = DEQUANTIZE(coef_block[DCTSIZE*0+1], quantptr[DCTSIZE*0+1]); + tmp5 = DEQUANTIZE(coef_block[DCTSIZE*1+1], quantptr[DCTSIZE*1+1]); + + tmp1 = tmp4 + tmp5; + tmp3 = tmp4 - tmp5; + + /* Pass 2: process 2 rows, store into output array. */ + + /* Row 0 */ + outptr = output_buf[0] + output_col; + + outptr[0] = range_limit[(int) IRIGHT_SHIFT(tmp0 + tmp1, 3) & RANGE_MASK]; + outptr[1] = range_limit[(int) IRIGHT_SHIFT(tmp0 - tmp1, 3) & RANGE_MASK]; + + /* Row 1 */ + outptr = output_buf[1] + output_col; + + outptr[0] = range_limit[(int) IRIGHT_SHIFT(tmp2 + tmp3, 3) & RANGE_MASK]; + outptr[1] = range_limit[(int) IRIGHT_SHIFT(tmp2 - tmp3, 3) & RANGE_MASK]; +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 1x1 output block. + * + * We hardly need an inverse DCT routine for this: just take the + * average pixel value, which is one-eighth of the DC coefficient. + */ + +GLOBAL(void) +jpeg_idct_1x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + DCTELEM dcval; + ISLOW_MULT_TYPE * quantptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + ISHIFT_TEMPS + + /* 1x1 is trivial: just take the DC coefficient divided by 8. */ + + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + + dcval = DEQUANTIZE(coef_block[0], quantptr[0]); + /* Add range center and fudge factor for descale and range-limit. */ + dcval += (((DCTELEM) RANGE_CENTER) << 3) + (1 << 2); + + output_buf[0][output_col] = + range_limit[(int) IRIGHT_SHIFT(dcval, 3) & RANGE_MASK]; +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 9x9 output block. + * + * Optimized algorithm with 10 multiplications in the 1-D kernel. + * cK represents sqrt(2) * cos(K*pi/18). + */ + +GLOBAL(void) +jpeg_idct_9x9 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp10, tmp11, tmp12, tmp13, tmp14; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[8*9]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp0 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + tmp0 += ONE << (CONST_BITS-PASS1_BITS-1); + + z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp3 = MULTIPLY(z3, FIX(0.707106781)); /* c6 */ + tmp1 = tmp0 + tmp3; + tmp2 = tmp0 - tmp3 - tmp3; + + tmp0 = MULTIPLY(z1 - z2, FIX(0.707106781)); /* c6 */ + tmp11 = tmp2 + tmp0; + tmp14 = tmp2 - tmp0 - tmp0; + + tmp0 = MULTIPLY(z1 + z2, FIX(1.328926049)); /* c2 */ + tmp2 = MULTIPLY(z1, FIX(1.083350441)); /* c4 */ + tmp3 = MULTIPLY(z2, FIX(0.245575608)); /* c8 */ + + tmp10 = tmp1 + tmp0 - tmp3; + tmp12 = tmp1 - tmp0 + tmp2; + tmp13 = tmp1 - tmp2 + tmp3; + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + z2 = MULTIPLY(z2, - FIX(1.224744871)); /* -c3 */ + + tmp2 = MULTIPLY(z1 + z3, FIX(0.909038955)); /* c5 */ + tmp3 = MULTIPLY(z1 + z4, FIX(0.483689525)); /* c7 */ + tmp0 = tmp2 + tmp3 - z2; + tmp1 = MULTIPLY(z3 - z4, FIX(1.392728481)); /* c1 */ + tmp2 += z2 - tmp1; + tmp3 += z2 + tmp1; + tmp1 = MULTIPLY(z1 - z3 - z4, FIX(1.224744871)); /* c3 */ + + /* Final output stage */ + + wsptr[8*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS); + wsptr[8*8] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS); + wsptr[8*1] = (int) RIGHT_SHIFT(tmp11 + tmp1, CONST_BITS-PASS1_BITS); + wsptr[8*7] = (int) RIGHT_SHIFT(tmp11 - tmp1, CONST_BITS-PASS1_BITS); + wsptr[8*2] = (int) RIGHT_SHIFT(tmp12 + tmp2, CONST_BITS-PASS1_BITS); + wsptr[8*6] = (int) RIGHT_SHIFT(tmp12 - tmp2, CONST_BITS-PASS1_BITS); + wsptr[8*3] = (int) RIGHT_SHIFT(tmp13 + tmp3, CONST_BITS-PASS1_BITS); + wsptr[8*5] = (int) RIGHT_SHIFT(tmp13 - tmp3, CONST_BITS-PASS1_BITS); + wsptr[8*4] = (int) RIGHT_SHIFT(tmp14, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 9 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 9; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp0 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + tmp0 <<= CONST_BITS; + + z1 = (INT32) wsptr[2]; + z2 = (INT32) wsptr[4]; + z3 = (INT32) wsptr[6]; + + tmp3 = MULTIPLY(z3, FIX(0.707106781)); /* c6 */ + tmp1 = tmp0 + tmp3; + tmp2 = tmp0 - tmp3 - tmp3; + + tmp0 = MULTIPLY(z1 - z2, FIX(0.707106781)); /* c6 */ + tmp11 = tmp2 + tmp0; + tmp14 = tmp2 - tmp0 - tmp0; + + tmp0 = MULTIPLY(z1 + z2, FIX(1.328926049)); /* c2 */ + tmp2 = MULTIPLY(z1, FIX(1.083350441)); /* c4 */ + tmp3 = MULTIPLY(z2, FIX(0.245575608)); /* c8 */ + + tmp10 = tmp1 + tmp0 - tmp3; + tmp12 = tmp1 - tmp0 + tmp2; + tmp13 = tmp1 - tmp2 + tmp3; + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + z4 = (INT32) wsptr[7]; + + z2 = MULTIPLY(z2, - FIX(1.224744871)); /* -c3 */ + + tmp2 = MULTIPLY(z1 + z3, FIX(0.909038955)); /* c5 */ + tmp3 = MULTIPLY(z1 + z4, FIX(0.483689525)); /* c7 */ + tmp0 = tmp2 + tmp3 - z2; + tmp1 = MULTIPLY(z3 - z4, FIX(1.392728481)); /* c1 */ + tmp2 += z2 - tmp1; + tmp3 += z2 + tmp1; + tmp1 = MULTIPLY(z1 - z3 - z4, FIX(1.224744871)); /* c3 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp13 + tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp13 - tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 8; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 10x10 output block. + * + * Optimized algorithm with 12 multiplications in the 1-D kernel. + * cK represents sqrt(2) * cos(K*pi/20). + */ + +GLOBAL(void) +jpeg_idct_10x10 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp10, tmp11, tmp12, tmp13, tmp14; + INT32 tmp20, tmp21, tmp22, tmp23, tmp24; + INT32 z1, z2, z3, z4, z5; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[8*10]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + z3 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + z3 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + z3 += ONE << (CONST_BITS-PASS1_BITS-1); + z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z1 = MULTIPLY(z4, FIX(1.144122806)); /* c4 */ + z2 = MULTIPLY(z4, FIX(0.437016024)); /* c8 */ + tmp10 = z3 + z1; + tmp11 = z3 - z2; + + tmp22 = RIGHT_SHIFT(z3 - ((z1 - z2) << 1), /* c0 = (c4-c8)*2 */ + CONST_BITS-PASS1_BITS); + + z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c6 */ + tmp12 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c2-c6 */ + tmp13 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c2+c6 */ + + tmp20 = tmp10 + tmp12; + tmp24 = tmp10 - tmp12; + tmp21 = tmp11 + tmp13; + tmp23 = tmp11 - tmp13; + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + tmp11 = z2 + z4; + tmp13 = z2 - z4; + + tmp12 = MULTIPLY(tmp13, FIX(0.309016994)); /* (c3-c7)/2 */ + z5 = z3 << CONST_BITS; + + z2 = MULTIPLY(tmp11, FIX(0.951056516)); /* (c3+c7)/2 */ + z4 = z5 + tmp12; + + tmp10 = MULTIPLY(z1, FIX(1.396802247)) + z2 + z4; /* c1 */ + tmp14 = MULTIPLY(z1, FIX(0.221231742)) - z2 + z4; /* c9 */ + + z2 = MULTIPLY(tmp11, FIX(0.587785252)); /* (c1-c9)/2 */ + z4 = z5 - tmp12 - (tmp13 << (CONST_BITS - 1)); + + tmp12 = (z1 - tmp13 - z3) << PASS1_BITS; + + tmp11 = MULTIPLY(z1, FIX(1.260073511)) - z2 - z4; /* c3 */ + tmp13 = MULTIPLY(z1, FIX(0.642039522)) - z2 + z4; /* c7 */ + + /* Final output stage */ + + wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*9] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*8] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*2] = (int) (tmp22 + tmp12); + wsptr[8*7] = (int) (tmp22 - tmp12); + wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS); + wsptr[8*6] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS); + wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); + wsptr[8*5] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 10 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 10; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + z3 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + z3 <<= CONST_BITS; + z4 = (INT32) wsptr[4]; + z1 = MULTIPLY(z4, FIX(1.144122806)); /* c4 */ + z2 = MULTIPLY(z4, FIX(0.437016024)); /* c8 */ + tmp10 = z3 + z1; + tmp11 = z3 - z2; + + tmp22 = z3 - ((z1 - z2) << 1); /* c0 = (c4-c8)*2 */ + + z2 = (INT32) wsptr[2]; + z3 = (INT32) wsptr[6]; + + z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c6 */ + tmp12 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c2-c6 */ + tmp13 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c2+c6 */ + + tmp20 = tmp10 + tmp12; + tmp24 = tmp10 - tmp12; + tmp21 = tmp11 + tmp13; + tmp23 = tmp11 - tmp13; + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + z3 <<= CONST_BITS; + z4 = (INT32) wsptr[7]; + + tmp11 = z2 + z4; + tmp13 = z2 - z4; + + tmp12 = MULTIPLY(tmp13, FIX(0.309016994)); /* (c3-c7)/2 */ + + z2 = MULTIPLY(tmp11, FIX(0.951056516)); /* (c3+c7)/2 */ + z4 = z3 + tmp12; + + tmp10 = MULTIPLY(z1, FIX(1.396802247)) + z2 + z4; /* c1 */ + tmp14 = MULTIPLY(z1, FIX(0.221231742)) - z2 + z4; /* c9 */ + + z2 = MULTIPLY(tmp11, FIX(0.587785252)); /* (c1-c9)/2 */ + z4 = z3 - tmp12 - (tmp13 << (CONST_BITS - 1)); + + tmp12 = ((z1 - tmp13) << CONST_BITS) - z3; + + tmp11 = MULTIPLY(z1, FIX(1.260073511)) - z2 - z4; /* c3 */ + tmp13 = MULTIPLY(z1, FIX(0.642039522)) - z2 + z4; /* c7 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 8; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing an 11x11 output block. + * + * Optimized algorithm with 24 multiplications in the 1-D kernel. + * cK represents sqrt(2) * cos(K*pi/22). + */ + +GLOBAL(void) +jpeg_idct_11x11 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp10, tmp11, tmp12, tmp13, tmp14; + INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[8*11]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp10 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp10 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + tmp10 += ONE << (CONST_BITS-PASS1_BITS-1); + + z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp20 = MULTIPLY(z2 - z3, FIX(2.546640132)); /* c2+c4 */ + tmp23 = MULTIPLY(z2 - z1, FIX(0.430815045)); /* c2-c6 */ + z4 = z1 + z3; + tmp24 = MULTIPLY(z4, - FIX(1.155664402)); /* -(c2-c10) */ + z4 -= z2; + tmp25 = tmp10 + MULTIPLY(z4, FIX(1.356927976)); /* c2 */ + tmp21 = tmp20 + tmp23 + tmp25 - + MULTIPLY(z2, FIX(1.821790775)); /* c2+c4+c10-c6 */ + tmp20 += tmp25 + MULTIPLY(z3, FIX(2.115825087)); /* c4+c6 */ + tmp23 += tmp25 - MULTIPLY(z1, FIX(1.513598477)); /* c6+c8 */ + tmp24 += tmp25; + tmp22 = tmp24 - MULTIPLY(z3, FIX(0.788749120)); /* c8+c10 */ + tmp24 += MULTIPLY(z2, FIX(1.944413522)) - /* c2+c8 */ + MULTIPLY(z1, FIX(1.390975730)); /* c4+c10 */ + tmp25 = tmp10 - MULTIPLY(z4, FIX(1.414213562)); /* c0 */ + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + tmp11 = z1 + z2; + tmp14 = MULTIPLY(tmp11 + z3 + z4, FIX(0.398430003)); /* c9 */ + tmp11 = MULTIPLY(tmp11, FIX(0.887983902)); /* c3-c9 */ + tmp12 = MULTIPLY(z1 + z3, FIX(0.670361295)); /* c5-c9 */ + tmp13 = tmp14 + MULTIPLY(z1 + z4, FIX(0.366151574)); /* c7-c9 */ + tmp10 = tmp11 + tmp12 + tmp13 - + MULTIPLY(z1, FIX(0.923107866)); /* c7+c5+c3-c1-2*c9 */ + z1 = tmp14 - MULTIPLY(z2 + z3, FIX(1.163011579)); /* c7+c9 */ + tmp11 += z1 + MULTIPLY(z2, FIX(2.073276588)); /* c1+c7+3*c9-c3 */ + tmp12 += z1 - MULTIPLY(z3, FIX(1.192193623)); /* c3+c5-c7-c9 */ + z1 = MULTIPLY(z2 + z4, - FIX(1.798248910)); /* -(c1+c9) */ + tmp11 += z1; + tmp13 += z1 + MULTIPLY(z4, FIX(2.102458632)); /* c1+c5+c9-c7 */ + tmp14 += MULTIPLY(z2, - FIX(1.467221301)) + /* -(c5+c9) */ + MULTIPLY(z3, FIX(1.001388905)) - /* c1-c9 */ + MULTIPLY(z4, FIX(1.684843907)); /* c3+c9 */ + + /* Final output stage */ + + wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*10] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*9] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*8] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS); + wsptr[8*7] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS); + wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); + wsptr[8*6] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); + wsptr[8*5] = (int) RIGHT_SHIFT(tmp25, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 11 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 11; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp10 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + tmp10 <<= CONST_BITS; + + z1 = (INT32) wsptr[2]; + z2 = (INT32) wsptr[4]; + z3 = (INT32) wsptr[6]; + + tmp20 = MULTIPLY(z2 - z3, FIX(2.546640132)); /* c2+c4 */ + tmp23 = MULTIPLY(z2 - z1, FIX(0.430815045)); /* c2-c6 */ + z4 = z1 + z3; + tmp24 = MULTIPLY(z4, - FIX(1.155664402)); /* -(c2-c10) */ + z4 -= z2; + tmp25 = tmp10 + MULTIPLY(z4, FIX(1.356927976)); /* c2 */ + tmp21 = tmp20 + tmp23 + tmp25 - + MULTIPLY(z2, FIX(1.821790775)); /* c2+c4+c10-c6 */ + tmp20 += tmp25 + MULTIPLY(z3, FIX(2.115825087)); /* c4+c6 */ + tmp23 += tmp25 - MULTIPLY(z1, FIX(1.513598477)); /* c6+c8 */ + tmp24 += tmp25; + tmp22 = tmp24 - MULTIPLY(z3, FIX(0.788749120)); /* c8+c10 */ + tmp24 += MULTIPLY(z2, FIX(1.944413522)) - /* c2+c8 */ + MULTIPLY(z1, FIX(1.390975730)); /* c4+c10 */ + tmp25 = tmp10 - MULTIPLY(z4, FIX(1.414213562)); /* c0 */ + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + z4 = (INT32) wsptr[7]; + + tmp11 = z1 + z2; + tmp14 = MULTIPLY(tmp11 + z3 + z4, FIX(0.398430003)); /* c9 */ + tmp11 = MULTIPLY(tmp11, FIX(0.887983902)); /* c3-c9 */ + tmp12 = MULTIPLY(z1 + z3, FIX(0.670361295)); /* c5-c9 */ + tmp13 = tmp14 + MULTIPLY(z1 + z4, FIX(0.366151574)); /* c7-c9 */ + tmp10 = tmp11 + tmp12 + tmp13 - + MULTIPLY(z1, FIX(0.923107866)); /* c7+c5+c3-c1-2*c9 */ + z1 = tmp14 - MULTIPLY(z2 + z3, FIX(1.163011579)); /* c7+c9 */ + tmp11 += z1 + MULTIPLY(z2, FIX(2.073276588)); /* c1+c7+3*c9-c3 */ + tmp12 += z1 - MULTIPLY(z3, FIX(1.192193623)); /* c3+c5-c7-c9 */ + z1 = MULTIPLY(z2 + z4, - FIX(1.798248910)); /* -(c1+c9) */ + tmp11 += z1; + tmp13 += z1 + MULTIPLY(z4, FIX(2.102458632)); /* c1+c5+c9-c7 */ + tmp14 += MULTIPLY(z2, - FIX(1.467221301)) + /* -(c5+c9) */ + MULTIPLY(z3, FIX(1.001388905)) - /* c1-c9 */ + MULTIPLY(z4, FIX(1.684843907)); /* c3+c9 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 8; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 12x12 output block. + * + * Optimized algorithm with 15 multiplications in the 1-D kernel. + * cK represents sqrt(2) * cos(K*pi/24). + */ + +GLOBAL(void) +jpeg_idct_12x12 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; + INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[8*12]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + z3 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + z3 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + z3 += ONE << (CONST_BITS-PASS1_BITS-1); + + z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z4 = MULTIPLY(z4, FIX(1.224744871)); /* c4 */ + + tmp10 = z3 + z4; + tmp11 = z3 - z4; + + z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z4 = MULTIPLY(z1, FIX(1.366025404)); /* c2 */ + z1 <<= CONST_BITS; + z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + z2 <<= CONST_BITS; + + tmp12 = z1 - z2; + + tmp21 = z3 + tmp12; + tmp24 = z3 - tmp12; + + tmp12 = z4 + z2; + + tmp20 = tmp10 + tmp12; + tmp25 = tmp10 - tmp12; + + tmp12 = z4 - z1 - z2; + + tmp22 = tmp11 + tmp12; + tmp23 = tmp11 - tmp12; + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + tmp11 = MULTIPLY(z2, FIX(1.306562965)); /* c3 */ + tmp14 = MULTIPLY(z2, - FIX_0_541196100); /* -c9 */ + + tmp10 = z1 + z3; + tmp15 = MULTIPLY(tmp10 + z4, FIX(0.860918669)); /* c7 */ + tmp12 = tmp15 + MULTIPLY(tmp10, FIX(0.261052384)); /* c5-c7 */ + tmp10 = tmp12 + tmp11 + MULTIPLY(z1, FIX(0.280143716)); /* c1-c5 */ + tmp13 = MULTIPLY(z3 + z4, - FIX(1.045510580)); /* -(c7+c11) */ + tmp12 += tmp13 + tmp14 - MULTIPLY(z3, FIX(1.478575242)); /* c1+c5-c7-c11 */ + tmp13 += tmp15 - tmp11 + MULTIPLY(z4, FIX(1.586706681)); /* c1+c11 */ + tmp15 += tmp14 - MULTIPLY(z1, FIX(0.676326758)) - /* c7-c11 */ + MULTIPLY(z4, FIX(1.982889723)); /* c5+c7 */ + + z1 -= z4; + z2 -= z3; + z3 = MULTIPLY(z1 + z2, FIX_0_541196100); /* c9 */ + tmp11 = z3 + MULTIPLY(z1, FIX_0_765366865); /* c3-c9 */ + tmp14 = z3 - MULTIPLY(z2, FIX_1_847759065); /* c3+c9 */ + + /* Final output stage */ + + wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*11] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*10] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*9] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS); + wsptr[8*8] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS); + wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); + wsptr[8*7] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); + wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS); + wsptr[8*6] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 12 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 12; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + z3 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + z3 <<= CONST_BITS; + + z4 = (INT32) wsptr[4]; + z4 = MULTIPLY(z4, FIX(1.224744871)); /* c4 */ + + tmp10 = z3 + z4; + tmp11 = z3 - z4; + + z1 = (INT32) wsptr[2]; + z4 = MULTIPLY(z1, FIX(1.366025404)); /* c2 */ + z1 <<= CONST_BITS; + z2 = (INT32) wsptr[6]; + z2 <<= CONST_BITS; + + tmp12 = z1 - z2; + + tmp21 = z3 + tmp12; + tmp24 = z3 - tmp12; + + tmp12 = z4 + z2; + + tmp20 = tmp10 + tmp12; + tmp25 = tmp10 - tmp12; + + tmp12 = z4 - z1 - z2; + + tmp22 = tmp11 + tmp12; + tmp23 = tmp11 - tmp12; + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + z4 = (INT32) wsptr[7]; + + tmp11 = MULTIPLY(z2, FIX(1.306562965)); /* c3 */ + tmp14 = MULTIPLY(z2, - FIX_0_541196100); /* -c9 */ + + tmp10 = z1 + z3; + tmp15 = MULTIPLY(tmp10 + z4, FIX(0.860918669)); /* c7 */ + tmp12 = tmp15 + MULTIPLY(tmp10, FIX(0.261052384)); /* c5-c7 */ + tmp10 = tmp12 + tmp11 + MULTIPLY(z1, FIX(0.280143716)); /* c1-c5 */ + tmp13 = MULTIPLY(z3 + z4, - FIX(1.045510580)); /* -(c7+c11) */ + tmp12 += tmp13 + tmp14 - MULTIPLY(z3, FIX(1.478575242)); /* c1+c5-c7-c11 */ + tmp13 += tmp15 - tmp11 + MULTIPLY(z4, FIX(1.586706681)); /* c1+c11 */ + tmp15 += tmp14 - MULTIPLY(z1, FIX(0.676326758)) - /* c7-c11 */ + MULTIPLY(z4, FIX(1.982889723)); /* c5+c7 */ + + z1 -= z4; + z2 -= z3; + z3 = MULTIPLY(z1 + z2, FIX_0_541196100); /* c9 */ + tmp11 = z3 + MULTIPLY(z1, FIX_0_765366865); /* c3-c9 */ + tmp14 = z3 - MULTIPLY(z2, FIX_1_847759065); /* c3+c9 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 8; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 13x13 output block. + * + * Optimized algorithm with 29 multiplications in the 1-D kernel. + * cK represents sqrt(2) * cos(K*pi/26). + */ + +GLOBAL(void) +jpeg_idct_13x13 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; + INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[8*13]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + z1 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + z1 += ONE << (CONST_BITS-PASS1_BITS-1); + + z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z4 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp10 = z3 + z4; + tmp11 = z3 - z4; + + tmp12 = MULTIPLY(tmp10, FIX(1.155388986)); /* (c4+c6)/2 */ + tmp13 = MULTIPLY(tmp11, FIX(0.096834934)) + z1; /* (c4-c6)/2 */ + + tmp20 = MULTIPLY(z2, FIX(1.373119086)) + tmp12 + tmp13; /* c2 */ + tmp22 = MULTIPLY(z2, FIX(0.501487041)) - tmp12 + tmp13; /* c10 */ + + tmp12 = MULTIPLY(tmp10, FIX(0.316450131)); /* (c8-c12)/2 */ + tmp13 = MULTIPLY(tmp11, FIX(0.486914739)) + z1; /* (c8+c12)/2 */ + + tmp21 = MULTIPLY(z2, FIX(1.058554052)) - tmp12 + tmp13; /* c6 */ + tmp25 = MULTIPLY(z2, - FIX(1.252223920)) + tmp12 + tmp13; /* c4 */ + + tmp12 = MULTIPLY(tmp10, FIX(0.435816023)); /* (c2-c10)/2 */ + tmp13 = MULTIPLY(tmp11, FIX(0.937303064)) - z1; /* (c2+c10)/2 */ + + tmp23 = MULTIPLY(z2, - FIX(0.170464608)) - tmp12 - tmp13; /* c12 */ + tmp24 = MULTIPLY(z2, - FIX(0.803364869)) + tmp12 - tmp13; /* c8 */ + + tmp26 = MULTIPLY(tmp11 - z2, FIX(1.414213562)) + z1; /* c0 */ + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + tmp11 = MULTIPLY(z1 + z2, FIX(1.322312651)); /* c3 */ + tmp12 = MULTIPLY(z1 + z3, FIX(1.163874945)); /* c5 */ + tmp15 = z1 + z4; + tmp13 = MULTIPLY(tmp15, FIX(0.937797057)); /* c7 */ + tmp10 = tmp11 + tmp12 + tmp13 - + MULTIPLY(z1, FIX(2.020082300)); /* c7+c5+c3-c1 */ + tmp14 = MULTIPLY(z2 + z3, - FIX(0.338443458)); /* -c11 */ + tmp11 += tmp14 + MULTIPLY(z2, FIX(0.837223564)); /* c5+c9+c11-c3 */ + tmp12 += tmp14 - MULTIPLY(z3, FIX(1.572116027)); /* c1+c5-c9-c11 */ + tmp14 = MULTIPLY(z2 + z4, - FIX(1.163874945)); /* -c5 */ + tmp11 += tmp14; + tmp13 += tmp14 + MULTIPLY(z4, FIX(2.205608352)); /* c3+c5+c9-c7 */ + tmp14 = MULTIPLY(z3 + z4, - FIX(0.657217813)); /* -c9 */ + tmp12 += tmp14; + tmp13 += tmp14; + tmp15 = MULTIPLY(tmp15, FIX(0.338443458)); /* c11 */ + tmp14 = tmp15 + MULTIPLY(z1, FIX(0.318774355)) - /* c9-c11 */ + MULTIPLY(z2, FIX(0.466105296)); /* c1-c7 */ + z1 = MULTIPLY(z3 - z2, FIX(0.937797057)); /* c7 */ + tmp14 += z1; + tmp15 += z1 + MULTIPLY(z3, FIX(0.384515595)) - /* c3-c7 */ + MULTIPLY(z4, FIX(1.742345811)); /* c1+c11 */ + + /* Final output stage */ + + wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*12] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*11] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*10] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS); + wsptr[8*9] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS); + wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); + wsptr[8*8] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); + wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS); + wsptr[8*7] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS); + wsptr[8*6] = (int) RIGHT_SHIFT(tmp26, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 13 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 13; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + z1 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + z1 <<= CONST_BITS; + + z2 = (INT32) wsptr[2]; + z3 = (INT32) wsptr[4]; + z4 = (INT32) wsptr[6]; + + tmp10 = z3 + z4; + tmp11 = z3 - z4; + + tmp12 = MULTIPLY(tmp10, FIX(1.155388986)); /* (c4+c6)/2 */ + tmp13 = MULTIPLY(tmp11, FIX(0.096834934)) + z1; /* (c4-c6)/2 */ + + tmp20 = MULTIPLY(z2, FIX(1.373119086)) + tmp12 + tmp13; /* c2 */ + tmp22 = MULTIPLY(z2, FIX(0.501487041)) - tmp12 + tmp13; /* c10 */ + + tmp12 = MULTIPLY(tmp10, FIX(0.316450131)); /* (c8-c12)/2 */ + tmp13 = MULTIPLY(tmp11, FIX(0.486914739)) + z1; /* (c8+c12)/2 */ + + tmp21 = MULTIPLY(z2, FIX(1.058554052)) - tmp12 + tmp13; /* c6 */ + tmp25 = MULTIPLY(z2, - FIX(1.252223920)) + tmp12 + tmp13; /* c4 */ + + tmp12 = MULTIPLY(tmp10, FIX(0.435816023)); /* (c2-c10)/2 */ + tmp13 = MULTIPLY(tmp11, FIX(0.937303064)) - z1; /* (c2+c10)/2 */ + + tmp23 = MULTIPLY(z2, - FIX(0.170464608)) - tmp12 - tmp13; /* c12 */ + tmp24 = MULTIPLY(z2, - FIX(0.803364869)) + tmp12 - tmp13; /* c8 */ + + tmp26 = MULTIPLY(tmp11 - z2, FIX(1.414213562)) + z1; /* c0 */ + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + z4 = (INT32) wsptr[7]; + + tmp11 = MULTIPLY(z1 + z2, FIX(1.322312651)); /* c3 */ + tmp12 = MULTIPLY(z1 + z3, FIX(1.163874945)); /* c5 */ + tmp15 = z1 + z4; + tmp13 = MULTIPLY(tmp15, FIX(0.937797057)); /* c7 */ + tmp10 = tmp11 + tmp12 + tmp13 - + MULTIPLY(z1, FIX(2.020082300)); /* c7+c5+c3-c1 */ + tmp14 = MULTIPLY(z2 + z3, - FIX(0.338443458)); /* -c11 */ + tmp11 += tmp14 + MULTIPLY(z2, FIX(0.837223564)); /* c5+c9+c11-c3 */ + tmp12 += tmp14 - MULTIPLY(z3, FIX(1.572116027)); /* c1+c5-c9-c11 */ + tmp14 = MULTIPLY(z2 + z4, - FIX(1.163874945)); /* -c5 */ + tmp11 += tmp14; + tmp13 += tmp14 + MULTIPLY(z4, FIX(2.205608352)); /* c3+c5+c9-c7 */ + tmp14 = MULTIPLY(z3 + z4, - FIX(0.657217813)); /* -c9 */ + tmp12 += tmp14; + tmp13 += tmp14; + tmp15 = MULTIPLY(tmp15, FIX(0.338443458)); /* c11 */ + tmp14 = tmp15 + MULTIPLY(z1, FIX(0.318774355)) - /* c9-c11 */ + MULTIPLY(z2, FIX(0.466105296)); /* c1-c7 */ + z1 = MULTIPLY(z3 - z2, FIX(0.937797057)); /* c7 */ + tmp14 += z1; + tmp15 += z1 + MULTIPLY(z3, FIX(0.384515595)) - /* c3-c7 */ + MULTIPLY(z4, FIX(1.742345811)); /* c1+c11 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 8; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 14x14 output block. + * + * Optimized algorithm with 20 multiplications in the 1-D kernel. + * cK represents sqrt(2) * cos(K*pi/28). + */ + +GLOBAL(void) +jpeg_idct_14x14 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; + INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[8*14]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + z1 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + z1 += ONE << (CONST_BITS-PASS1_BITS-1); + z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z2 = MULTIPLY(z4, FIX(1.274162392)); /* c4 */ + z3 = MULTIPLY(z4, FIX(0.314692123)); /* c12 */ + z4 = MULTIPLY(z4, FIX(0.881747734)); /* c8 */ + + tmp10 = z1 + z2; + tmp11 = z1 + z3; + tmp12 = z1 - z4; + + tmp23 = RIGHT_SHIFT(z1 - ((z2 + z3 - z4) << 1), /* c0 = (c4+c12-c8)*2 */ + CONST_BITS-PASS1_BITS); + + z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + z3 = MULTIPLY(z1 + z2, FIX(1.105676686)); /* c6 */ + + tmp13 = z3 + MULTIPLY(z1, FIX(0.273079590)); /* c2-c6 */ + tmp14 = z3 - MULTIPLY(z2, FIX(1.719280954)); /* c6+c10 */ + tmp15 = MULTIPLY(z1, FIX(0.613604268)) - /* c10 */ + MULTIPLY(z2, FIX(1.378756276)); /* c2 */ + + tmp20 = tmp10 + tmp13; + tmp26 = tmp10 - tmp13; + tmp21 = tmp11 + tmp14; + tmp25 = tmp11 - tmp14; + tmp22 = tmp12 + tmp15; + tmp24 = tmp12 - tmp15; + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + tmp13 = z4 << CONST_BITS; + + tmp14 = z1 + z3; + tmp11 = MULTIPLY(z1 + z2, FIX(1.334852607)); /* c3 */ + tmp12 = MULTIPLY(tmp14, FIX(1.197448846)); /* c5 */ + tmp10 = tmp11 + tmp12 + tmp13 - MULTIPLY(z1, FIX(1.126980169)); /* c3+c5-c1 */ + tmp14 = MULTIPLY(tmp14, FIX(0.752406978)); /* c9 */ + tmp16 = tmp14 - MULTIPLY(z1, FIX(1.061150426)); /* c9+c11-c13 */ + z1 -= z2; + tmp15 = MULTIPLY(z1, FIX(0.467085129)) - tmp13; /* c11 */ + tmp16 += tmp15; + z1 += z4; + z4 = MULTIPLY(z2 + z3, - FIX(0.158341681)) - tmp13; /* -c13 */ + tmp11 += z4 - MULTIPLY(z2, FIX(0.424103948)); /* c3-c9-c13 */ + tmp12 += z4 - MULTIPLY(z3, FIX(2.373959773)); /* c3+c5-c13 */ + z4 = MULTIPLY(z3 - z2, FIX(1.405321284)); /* c1 */ + tmp14 += z4 + tmp13 - MULTIPLY(z3, FIX(1.6906431334)); /* c1+c9-c11 */ + tmp15 += z4 + MULTIPLY(z2, FIX(0.674957567)); /* c1+c11-c5 */ + + tmp13 = (z1 - z3) << PASS1_BITS; + + /* Final output stage */ + + wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*13] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*12] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*11] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*3] = (int) (tmp23 + tmp13); + wsptr[8*10] = (int) (tmp23 - tmp13); + wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); + wsptr[8*9] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); + wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS); + wsptr[8*8] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS); + wsptr[8*6] = (int) RIGHT_SHIFT(tmp26 + tmp16, CONST_BITS-PASS1_BITS); + wsptr[8*7] = (int) RIGHT_SHIFT(tmp26 - tmp16, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 14 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 14; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + z1 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + z1 <<= CONST_BITS; + z4 = (INT32) wsptr[4]; + z2 = MULTIPLY(z4, FIX(1.274162392)); /* c4 */ + z3 = MULTIPLY(z4, FIX(0.314692123)); /* c12 */ + z4 = MULTIPLY(z4, FIX(0.881747734)); /* c8 */ + + tmp10 = z1 + z2; + tmp11 = z1 + z3; + tmp12 = z1 - z4; + + tmp23 = z1 - ((z2 + z3 - z4) << 1); /* c0 = (c4+c12-c8)*2 */ + + z1 = (INT32) wsptr[2]; + z2 = (INT32) wsptr[6]; + + z3 = MULTIPLY(z1 + z2, FIX(1.105676686)); /* c6 */ + + tmp13 = z3 + MULTIPLY(z1, FIX(0.273079590)); /* c2-c6 */ + tmp14 = z3 - MULTIPLY(z2, FIX(1.719280954)); /* c6+c10 */ + tmp15 = MULTIPLY(z1, FIX(0.613604268)) - /* c10 */ + MULTIPLY(z2, FIX(1.378756276)); /* c2 */ + + tmp20 = tmp10 + tmp13; + tmp26 = tmp10 - tmp13; + tmp21 = tmp11 + tmp14; + tmp25 = tmp11 - tmp14; + tmp22 = tmp12 + tmp15; + tmp24 = tmp12 - tmp15; + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + z4 = (INT32) wsptr[7]; + z4 <<= CONST_BITS; + + tmp14 = z1 + z3; + tmp11 = MULTIPLY(z1 + z2, FIX(1.334852607)); /* c3 */ + tmp12 = MULTIPLY(tmp14, FIX(1.197448846)); /* c5 */ + tmp10 = tmp11 + tmp12 + z4 - MULTIPLY(z1, FIX(1.126980169)); /* c3+c5-c1 */ + tmp14 = MULTIPLY(tmp14, FIX(0.752406978)); /* c9 */ + tmp16 = tmp14 - MULTIPLY(z1, FIX(1.061150426)); /* c9+c11-c13 */ + z1 -= z2; + tmp15 = MULTIPLY(z1, FIX(0.467085129)) - z4; /* c11 */ + tmp16 += tmp15; + tmp13 = MULTIPLY(z2 + z3, - FIX(0.158341681)) - z4; /* -c13 */ + tmp11 += tmp13 - MULTIPLY(z2, FIX(0.424103948)); /* c3-c9-c13 */ + tmp12 += tmp13 - MULTIPLY(z3, FIX(2.373959773)); /* c3+c5-c13 */ + tmp13 = MULTIPLY(z3 - z2, FIX(1.405321284)); /* c1 */ + tmp14 += tmp13 + z4 - MULTIPLY(z3, FIX(1.6906431334)); /* c1+c9-c11 */ + tmp15 += tmp13 + MULTIPLY(z2, FIX(0.674957567)); /* c1+c11-c5 */ + + tmp13 = ((z1 - z3) << CONST_BITS) + z4; + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[13] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26 + tmp16, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp26 - tmp16, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 8; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 15x15 output block. + * + * Optimized algorithm with 22 multiplications in the 1-D kernel. + * cK represents sqrt(2) * cos(K*pi/30). + */ + +GLOBAL(void) +jpeg_idct_15x15 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; + INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26, tmp27; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[8*15]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + z1 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + z1 += ONE << (CONST_BITS-PASS1_BITS-1); + + z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z4 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp10 = MULTIPLY(z4, FIX(0.437016024)); /* c12 */ + tmp11 = MULTIPLY(z4, FIX(1.144122806)); /* c6 */ + + tmp12 = z1 - tmp10; + tmp13 = z1 + tmp11; + z1 -= (tmp11 - tmp10) << 1; /* c0 = (c6-c12)*2 */ + + z4 = z2 - z3; + z3 += z2; + tmp10 = MULTIPLY(z3, FIX(1.337628990)); /* (c2+c4)/2 */ + tmp11 = MULTIPLY(z4, FIX(0.045680613)); /* (c2-c4)/2 */ + z2 = MULTIPLY(z2, FIX(1.439773946)); /* c4+c14 */ + + tmp20 = tmp13 + tmp10 + tmp11; + tmp23 = tmp12 - tmp10 + tmp11 + z2; + + tmp10 = MULTIPLY(z3, FIX(0.547059574)); /* (c8+c14)/2 */ + tmp11 = MULTIPLY(z4, FIX(0.399234004)); /* (c8-c14)/2 */ + + tmp25 = tmp13 - tmp10 - tmp11; + tmp26 = tmp12 + tmp10 - tmp11 - z2; + + tmp10 = MULTIPLY(z3, FIX(0.790569415)); /* (c6+c12)/2 */ + tmp11 = MULTIPLY(z4, FIX(0.353553391)); /* (c6-c12)/2 */ + + tmp21 = tmp12 + tmp10 + tmp11; + tmp24 = tmp13 - tmp10 + tmp11; + tmp11 += tmp11; + tmp22 = z1 + tmp11; /* c10 = c6-c12 */ + tmp27 = z1 - tmp11 - tmp11; /* c0 = (c6-c12)*2 */ + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z4 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + z3 = MULTIPLY(z4, FIX(1.224744871)); /* c5 */ + z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + tmp13 = z2 - z4; + tmp15 = MULTIPLY(z1 + tmp13, FIX(0.831253876)); /* c9 */ + tmp11 = tmp15 + MULTIPLY(z1, FIX(0.513743148)); /* c3-c9 */ + tmp14 = tmp15 - MULTIPLY(tmp13, FIX(2.176250899)); /* c3+c9 */ + + tmp13 = MULTIPLY(z2, - FIX(0.831253876)); /* -c9 */ + tmp15 = MULTIPLY(z2, - FIX(1.344997024)); /* -c3 */ + z2 = z1 - z4; + tmp12 = z3 + MULTIPLY(z2, FIX(1.406466353)); /* c1 */ + + tmp10 = tmp12 + MULTIPLY(z4, FIX(2.457431844)) - tmp15; /* c1+c7 */ + tmp16 = tmp12 - MULTIPLY(z1, FIX(1.112434820)) + tmp13; /* c1-c13 */ + tmp12 = MULTIPLY(z2, FIX(1.224744871)) - z3; /* c5 */ + z2 = MULTIPLY(z1 + z4, FIX(0.575212477)); /* c11 */ + tmp13 += z2 + MULTIPLY(z1, FIX(0.475753014)) - z3; /* c7-c11 */ + tmp15 += z2 - MULTIPLY(z4, FIX(0.869244010)) + z3; /* c11+c13 */ + + /* Final output stage */ + + wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*14] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*13] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*12] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS); + wsptr[8*11] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS); + wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); + wsptr[8*10] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); + wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS); + wsptr[8*9] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS); + wsptr[8*6] = (int) RIGHT_SHIFT(tmp26 + tmp16, CONST_BITS-PASS1_BITS); + wsptr[8*8] = (int) RIGHT_SHIFT(tmp26 - tmp16, CONST_BITS-PASS1_BITS); + wsptr[8*7] = (int) RIGHT_SHIFT(tmp27, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 15 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 15; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + z1 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + z1 <<= CONST_BITS; + + z2 = (INT32) wsptr[2]; + z3 = (INT32) wsptr[4]; + z4 = (INT32) wsptr[6]; + + tmp10 = MULTIPLY(z4, FIX(0.437016024)); /* c12 */ + tmp11 = MULTIPLY(z4, FIX(1.144122806)); /* c6 */ + + tmp12 = z1 - tmp10; + tmp13 = z1 + tmp11; + z1 -= (tmp11 - tmp10) << 1; /* c0 = (c6-c12)*2 */ + + z4 = z2 - z3; + z3 += z2; + tmp10 = MULTIPLY(z3, FIX(1.337628990)); /* (c2+c4)/2 */ + tmp11 = MULTIPLY(z4, FIX(0.045680613)); /* (c2-c4)/2 */ + z2 = MULTIPLY(z2, FIX(1.439773946)); /* c4+c14 */ + + tmp20 = tmp13 + tmp10 + tmp11; + tmp23 = tmp12 - tmp10 + tmp11 + z2; + + tmp10 = MULTIPLY(z3, FIX(0.547059574)); /* (c8+c14)/2 */ + tmp11 = MULTIPLY(z4, FIX(0.399234004)); /* (c8-c14)/2 */ + + tmp25 = tmp13 - tmp10 - tmp11; + tmp26 = tmp12 + tmp10 - tmp11 - z2; + + tmp10 = MULTIPLY(z3, FIX(0.790569415)); /* (c6+c12)/2 */ + tmp11 = MULTIPLY(z4, FIX(0.353553391)); /* (c6-c12)/2 */ + + tmp21 = tmp12 + tmp10 + tmp11; + tmp24 = tmp13 - tmp10 + tmp11; + tmp11 += tmp11; + tmp22 = z1 + tmp11; /* c10 = c6-c12 */ + tmp27 = z1 - tmp11 - tmp11; /* c0 = (c6-c12)*2 */ + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z4 = (INT32) wsptr[5]; + z3 = MULTIPLY(z4, FIX(1.224744871)); /* c5 */ + z4 = (INT32) wsptr[7]; + + tmp13 = z2 - z4; + tmp15 = MULTIPLY(z1 + tmp13, FIX(0.831253876)); /* c9 */ + tmp11 = tmp15 + MULTIPLY(z1, FIX(0.513743148)); /* c3-c9 */ + tmp14 = tmp15 - MULTIPLY(tmp13, FIX(2.176250899)); /* c3+c9 */ + + tmp13 = MULTIPLY(z2, - FIX(0.831253876)); /* -c9 */ + tmp15 = MULTIPLY(z2, - FIX(1.344997024)); /* -c3 */ + z2 = z1 - z4; + tmp12 = z3 + MULTIPLY(z2, FIX(1.406466353)); /* c1 */ + + tmp10 = tmp12 + MULTIPLY(z4, FIX(2.457431844)) - tmp15; /* c1+c7 */ + tmp16 = tmp12 - MULTIPLY(z1, FIX(1.112434820)) + tmp13; /* c1-c13 */ + tmp12 = MULTIPLY(z2, FIX(1.224744871)) - z3; /* c5 */ + z2 = MULTIPLY(z1 + z4, FIX(0.575212477)); /* c11 */ + tmp13 += z2 + MULTIPLY(z1, FIX(0.475753014)) - z3; /* c7-c11 */ + tmp15 += z2 - MULTIPLY(z4, FIX(0.869244010)) + z3; /* c11+c13 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[14] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[13] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26 + tmp16, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp26 - tmp16, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp27, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 8; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 16x16 output block. + * + * Optimized algorithm with 28 multiplications in the 1-D kernel. + * cK represents sqrt(2) * cos(K*pi/32). + */ + +GLOBAL(void) +jpeg_idct_16x16 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp10, tmp11, tmp12, tmp13; + INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26, tmp27; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[8*16]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp0 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + tmp0 += ONE << (CONST_BITS-PASS1_BITS-1); + + z1 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + tmp1 = MULTIPLY(z1, FIX(1.306562965)); /* c4[16] = c2[8] */ + tmp2 = MULTIPLY(z1, FIX_0_541196100); /* c12[16] = c6[8] */ + + tmp10 = tmp0 + tmp1; + tmp11 = tmp0 - tmp1; + tmp12 = tmp0 + tmp2; + tmp13 = tmp0 - tmp2; + + z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + z3 = z1 - z2; + z4 = MULTIPLY(z3, FIX(0.275899379)); /* c14[16] = c7[8] */ + z3 = MULTIPLY(z3, FIX(1.387039845)); /* c2[16] = c1[8] */ + + tmp0 = z3 + MULTIPLY(z2, FIX_2_562915447); /* (c6+c2)[16] = (c3+c1)[8] */ + tmp1 = z4 + MULTIPLY(z1, FIX_0_899976223); /* (c6-c14)[16] = (c3-c7)[8] */ + tmp2 = z3 - MULTIPLY(z1, FIX(0.601344887)); /* (c2-c10)[16] = (c1-c5)[8] */ + tmp3 = z4 - MULTIPLY(z2, FIX(0.509795579)); /* (c10-c14)[16] = (c5-c7)[8] */ + + tmp20 = tmp10 + tmp0; + tmp27 = tmp10 - tmp0; + tmp21 = tmp12 + tmp1; + tmp26 = tmp12 - tmp1; + tmp22 = tmp13 + tmp2; + tmp25 = tmp13 - tmp2; + tmp23 = tmp11 + tmp3; + tmp24 = tmp11 - tmp3; + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + tmp11 = z1 + z3; + + tmp1 = MULTIPLY(z1 + z2, FIX(1.353318001)); /* c3 */ + tmp2 = MULTIPLY(tmp11, FIX(1.247225013)); /* c5 */ + tmp3 = MULTIPLY(z1 + z4, FIX(1.093201867)); /* c7 */ + tmp10 = MULTIPLY(z1 - z4, FIX(0.897167586)); /* c9 */ + tmp11 = MULTIPLY(tmp11, FIX(0.666655658)); /* c11 */ + tmp12 = MULTIPLY(z1 - z2, FIX(0.410524528)); /* c13 */ + tmp0 = tmp1 + tmp2 + tmp3 - + MULTIPLY(z1, FIX(2.286341144)); /* c7+c5+c3-c1 */ + tmp13 = tmp10 + tmp11 + tmp12 - + MULTIPLY(z1, FIX(1.835730603)); /* c9+c11+c13-c15 */ + z1 = MULTIPLY(z2 + z3, FIX(0.138617169)); /* c15 */ + tmp1 += z1 + MULTIPLY(z2, FIX(0.071888074)); /* c9+c11-c3-c15 */ + tmp2 += z1 - MULTIPLY(z3, FIX(1.125726048)); /* c5+c7+c15-c3 */ + z1 = MULTIPLY(z3 - z2, FIX(1.407403738)); /* c1 */ + tmp11 += z1 - MULTIPLY(z3, FIX(0.766367282)); /* c1+c11-c9-c13 */ + tmp12 += z1 + MULTIPLY(z2, FIX(1.971951411)); /* c1+c5+c13-c7 */ + z2 += z4; + z1 = MULTIPLY(z2, - FIX(0.666655658)); /* -c11 */ + tmp1 += z1; + tmp3 += z1 + MULTIPLY(z4, FIX(1.065388962)); /* c3+c11+c15-c7 */ + z2 = MULTIPLY(z2, - FIX(1.247225013)); /* -c5 */ + tmp10 += z2 + MULTIPLY(z4, FIX(3.141271809)); /* c1+c5+c9-c13 */ + tmp12 += z2; + z2 = MULTIPLY(z3 + z4, - FIX(1.353318001)); /* -c3 */ + tmp2 += z2; + tmp3 += z2; + z2 = MULTIPLY(z4 - z3, FIX(0.410524528)); /* c13 */ + tmp10 += z2; + tmp11 += z2; + + /* Final output stage */ + + wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp0, CONST_BITS-PASS1_BITS); + wsptr[8*15] = (int) RIGHT_SHIFT(tmp20 - tmp0, CONST_BITS-PASS1_BITS); + wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp1, CONST_BITS-PASS1_BITS); + wsptr[8*14] = (int) RIGHT_SHIFT(tmp21 - tmp1, CONST_BITS-PASS1_BITS); + wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp2, CONST_BITS-PASS1_BITS); + wsptr[8*13] = (int) RIGHT_SHIFT(tmp22 - tmp2, CONST_BITS-PASS1_BITS); + wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp3, CONST_BITS-PASS1_BITS); + wsptr[8*12] = (int) RIGHT_SHIFT(tmp23 - tmp3, CONST_BITS-PASS1_BITS); + wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*11] = (int) RIGHT_SHIFT(tmp24 - tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*10] = (int) RIGHT_SHIFT(tmp25 - tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*6] = (int) RIGHT_SHIFT(tmp26 + tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*9] = (int) RIGHT_SHIFT(tmp26 - tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*7] = (int) RIGHT_SHIFT(tmp27 + tmp13, CONST_BITS-PASS1_BITS); + wsptr[8*8] = (int) RIGHT_SHIFT(tmp27 - tmp13, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 16 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 16; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp0 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + tmp0 <<= CONST_BITS; + + z1 = (INT32) wsptr[4]; + tmp1 = MULTIPLY(z1, FIX(1.306562965)); /* c4[16] = c2[8] */ + tmp2 = MULTIPLY(z1, FIX_0_541196100); /* c12[16] = c6[8] */ + + tmp10 = tmp0 + tmp1; + tmp11 = tmp0 - tmp1; + tmp12 = tmp0 + tmp2; + tmp13 = tmp0 - tmp2; + + z1 = (INT32) wsptr[2]; + z2 = (INT32) wsptr[6]; + z3 = z1 - z2; + z4 = MULTIPLY(z3, FIX(0.275899379)); /* c14[16] = c7[8] */ + z3 = MULTIPLY(z3, FIX(1.387039845)); /* c2[16] = c1[8] */ + + tmp0 = z3 + MULTIPLY(z2, FIX_2_562915447); /* (c6+c2)[16] = (c3+c1)[8] */ + tmp1 = z4 + MULTIPLY(z1, FIX_0_899976223); /* (c6-c14)[16] = (c3-c7)[8] */ + tmp2 = z3 - MULTIPLY(z1, FIX(0.601344887)); /* (c2-c10)[16] = (c1-c5)[8] */ + tmp3 = z4 - MULTIPLY(z2, FIX(0.509795579)); /* (c10-c14)[16] = (c5-c7)[8] */ + + tmp20 = tmp10 + tmp0; + tmp27 = tmp10 - tmp0; + tmp21 = tmp12 + tmp1; + tmp26 = tmp12 - tmp1; + tmp22 = tmp13 + tmp2; + tmp25 = tmp13 - tmp2; + tmp23 = tmp11 + tmp3; + tmp24 = tmp11 - tmp3; + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + z4 = (INT32) wsptr[7]; + + tmp11 = z1 + z3; + + tmp1 = MULTIPLY(z1 + z2, FIX(1.353318001)); /* c3 */ + tmp2 = MULTIPLY(tmp11, FIX(1.247225013)); /* c5 */ + tmp3 = MULTIPLY(z1 + z4, FIX(1.093201867)); /* c7 */ + tmp10 = MULTIPLY(z1 - z4, FIX(0.897167586)); /* c9 */ + tmp11 = MULTIPLY(tmp11, FIX(0.666655658)); /* c11 */ + tmp12 = MULTIPLY(z1 - z2, FIX(0.410524528)); /* c13 */ + tmp0 = tmp1 + tmp2 + tmp3 - + MULTIPLY(z1, FIX(2.286341144)); /* c7+c5+c3-c1 */ + tmp13 = tmp10 + tmp11 + tmp12 - + MULTIPLY(z1, FIX(1.835730603)); /* c9+c11+c13-c15 */ + z1 = MULTIPLY(z2 + z3, FIX(0.138617169)); /* c15 */ + tmp1 += z1 + MULTIPLY(z2, FIX(0.071888074)); /* c9+c11-c3-c15 */ + tmp2 += z1 - MULTIPLY(z3, FIX(1.125726048)); /* c5+c7+c15-c3 */ + z1 = MULTIPLY(z3 - z2, FIX(1.407403738)); /* c1 */ + tmp11 += z1 - MULTIPLY(z3, FIX(0.766367282)); /* c1+c11-c9-c13 */ + tmp12 += z1 + MULTIPLY(z2, FIX(1.971951411)); /* c1+c5+c13-c7 */ + z2 += z4; + z1 = MULTIPLY(z2, - FIX(0.666655658)); /* -c11 */ + tmp1 += z1; + tmp3 += z1 + MULTIPLY(z4, FIX(1.065388962)); /* c3+c11+c15-c7 */ + z2 = MULTIPLY(z2, - FIX(1.247225013)); /* -c5 */ + tmp10 += z2 + MULTIPLY(z4, FIX(3.141271809)); /* c1+c5+c9-c13 */ + tmp12 += z2; + z2 = MULTIPLY(z3 + z4, - FIX(1.353318001)); /* -c3 */ + tmp2 += z2; + tmp3 += z2; + z2 = MULTIPLY(z4 - z3, FIX(0.410524528)); /* c13 */ + tmp10 += z2; + tmp11 += z2; + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[15] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[14] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[13] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26 + tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp26 - tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp27 + tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp27 - tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 8; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 16x8 output block. + * + * 8-point IDCT in pass 1 (columns), 16-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_16x8 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp10, tmp11, tmp12, tmp13; + INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26, tmp27; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[8*8]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. + * Note results are scaled up by sqrt(8) compared to a true IDCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * 8-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/16). + */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; ctr--) { + /* Due to quantization, we will usually find that many of the input + * coefficients are zero, especially the AC terms. We can exploit this + * by short-circuiting the IDCT calculation for any column in which all + * the AC terms are zero. In that case each output is equal to the + * DC coefficient (with scale factor as needed). + * With typical images and quantization tables, half or more of the + * column DCT calculations can be simplified this way. + */ + + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && + inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && + inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && + inptr[DCTSIZE*7] == 0) { + /* AC terms all zero */ + int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + wsptr[DCTSIZE*4] = dcval; + wsptr[DCTSIZE*5] = dcval; + wsptr[DCTSIZE*6] = dcval; + wsptr[DCTSIZE*7] = dcval; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + continue; + } + + /* Even part: reverse the even part of the forward DCT. + * The rotator is c(-6). + */ + + z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z2 <<= CONST_BITS; + z3 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + z2 += ONE << (CONST_BITS-PASS1_BITS-1); + + tmp0 = z2 + z3; + tmp1 = z2 - z3; + + z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ + tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ + tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ + + tmp10 = tmp0 + tmp2; + tmp13 = tmp0 - tmp2; + tmp11 = tmp1 + tmp3; + tmp12 = tmp1 - tmp3; + + /* Odd part per figure 8; the matrix is unitary and hence its + * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. + */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + + z2 = tmp0 + tmp2; + z3 = tmp1 + tmp3; + + z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* c3 */ + z2 = MULTIPLY(z2, - FIX_1_961570560); /* -c3-c5 */ + z3 = MULTIPLY(z3, - FIX_0_390180644); /* -c3+c5 */ + z2 += z1; + z3 += z1; + + z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ + tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* -c1+c3+c5-c7 */ + tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* c1+c3-c5-c7 */ + tmp0 += z1 + z2; + tmp3 += z1 + z3; + + z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ + tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* c1+c3-c5+c7 */ + tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* c1+c3+c5-c7 */ + tmp1 += z1 + z3; + tmp2 += z1 + z2; + + /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ + + wsptr[DCTSIZE*0] = (int) RIGHT_SHIFT(tmp10 + tmp3, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*7] = (int) RIGHT_SHIFT(tmp10 - tmp3, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*1] = (int) RIGHT_SHIFT(tmp11 + tmp2, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*6] = (int) RIGHT_SHIFT(tmp11 - tmp2, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*2] = (int) RIGHT_SHIFT(tmp12 + tmp1, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*5] = (int) RIGHT_SHIFT(tmp12 - tmp1, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*3] = (int) RIGHT_SHIFT(tmp13 + tmp0, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*4] = (int) RIGHT_SHIFT(tmp13 - tmp0, CONST_BITS-PASS1_BITS); + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + } + + /* Pass 2: process 8 rows from work array, store into output array. + * 16-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/32). + */ + + wsptr = workspace; + for (ctr = 0; ctr < 8; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp0 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + tmp0 <<= CONST_BITS; + + z1 = (INT32) wsptr[4]; + tmp1 = MULTIPLY(z1, FIX(1.306562965)); /* c4[16] = c2[8] */ + tmp2 = MULTIPLY(z1, FIX_0_541196100); /* c12[16] = c6[8] */ + + tmp10 = tmp0 + tmp1; + tmp11 = tmp0 - tmp1; + tmp12 = tmp0 + tmp2; + tmp13 = tmp0 - tmp2; + + z1 = (INT32) wsptr[2]; + z2 = (INT32) wsptr[6]; + z3 = z1 - z2; + z4 = MULTIPLY(z3, FIX(0.275899379)); /* c14[16] = c7[8] */ + z3 = MULTIPLY(z3, FIX(1.387039845)); /* c2[16] = c1[8] */ + + tmp0 = z3 + MULTIPLY(z2, FIX_2_562915447); /* (c6+c2)[16] = (c3+c1)[8] */ + tmp1 = z4 + MULTIPLY(z1, FIX_0_899976223); /* (c6-c14)[16] = (c3-c7)[8] */ + tmp2 = z3 - MULTIPLY(z1, FIX(0.601344887)); /* (c2-c10)[16] = (c1-c5)[8] */ + tmp3 = z4 - MULTIPLY(z2, FIX(0.509795579)); /* (c10-c14)[16] = (c5-c7)[8] */ + + tmp20 = tmp10 + tmp0; + tmp27 = tmp10 - tmp0; + tmp21 = tmp12 + tmp1; + tmp26 = tmp12 - tmp1; + tmp22 = tmp13 + tmp2; + tmp25 = tmp13 - tmp2; + tmp23 = tmp11 + tmp3; + tmp24 = tmp11 - tmp3; + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + z4 = (INT32) wsptr[7]; + + tmp11 = z1 + z3; + + tmp1 = MULTIPLY(z1 + z2, FIX(1.353318001)); /* c3 */ + tmp2 = MULTIPLY(tmp11, FIX(1.247225013)); /* c5 */ + tmp3 = MULTIPLY(z1 + z4, FIX(1.093201867)); /* c7 */ + tmp10 = MULTIPLY(z1 - z4, FIX(0.897167586)); /* c9 */ + tmp11 = MULTIPLY(tmp11, FIX(0.666655658)); /* c11 */ + tmp12 = MULTIPLY(z1 - z2, FIX(0.410524528)); /* c13 */ + tmp0 = tmp1 + tmp2 + tmp3 - + MULTIPLY(z1, FIX(2.286341144)); /* c7+c5+c3-c1 */ + tmp13 = tmp10 + tmp11 + tmp12 - + MULTIPLY(z1, FIX(1.835730603)); /* c9+c11+c13-c15 */ + z1 = MULTIPLY(z2 + z3, FIX(0.138617169)); /* c15 */ + tmp1 += z1 + MULTIPLY(z2, FIX(0.071888074)); /* c9+c11-c3-c15 */ + tmp2 += z1 - MULTIPLY(z3, FIX(1.125726048)); /* c5+c7+c15-c3 */ + z1 = MULTIPLY(z3 - z2, FIX(1.407403738)); /* c1 */ + tmp11 += z1 - MULTIPLY(z3, FIX(0.766367282)); /* c1+c11-c9-c13 */ + tmp12 += z1 + MULTIPLY(z2, FIX(1.971951411)); /* c1+c5+c13-c7 */ + z2 += z4; + z1 = MULTIPLY(z2, - FIX(0.666655658)); /* -c11 */ + tmp1 += z1; + tmp3 += z1 + MULTIPLY(z4, FIX(1.065388962)); /* c3+c11+c15-c7 */ + z2 = MULTIPLY(z2, - FIX(1.247225013)); /* -c5 */ + tmp10 += z2 + MULTIPLY(z4, FIX(3.141271809)); /* c1+c5+c9-c13 */ + tmp12 += z2; + z2 = MULTIPLY(z3 + z4, - FIX(1.353318001)); /* -c3 */ + tmp2 += z2; + tmp3 += z2; + z2 = MULTIPLY(z4 - z3, FIX(0.410524528)); /* c13 */ + tmp10 += z2; + tmp11 += z2; + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[15] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[14] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[13] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26 + tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp26 - tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp27 + tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp27 - tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 8; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 14x7 output block. + * + * 7-point IDCT in pass 1 (columns), 14-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_14x7 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; + INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[8*7]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. + * 7-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/14). + */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp23 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp23 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + tmp23 += ONE << (CONST_BITS-PASS1_BITS-1); + + z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp20 = MULTIPLY(z2 - z3, FIX(0.881747734)); /* c4 */ + tmp22 = MULTIPLY(z1 - z2, FIX(0.314692123)); /* c6 */ + tmp21 = tmp20 + tmp22 + tmp23 - MULTIPLY(z2, FIX(1.841218003)); /* c2+c4-c6 */ + tmp10 = z1 + z3; + z2 -= tmp10; + tmp10 = MULTIPLY(tmp10, FIX(1.274162392)) + tmp23; /* c2 */ + tmp20 += tmp10 - MULTIPLY(z3, FIX(0.077722536)); /* c2-c4-c6 */ + tmp22 += tmp10 - MULTIPLY(z1, FIX(2.470602249)); /* c2+c4+c6 */ + tmp23 += MULTIPLY(z2, FIX(1.414213562)); /* c0 */ + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + + tmp11 = MULTIPLY(z1 + z2, FIX(0.935414347)); /* (c3+c1-c5)/2 */ + tmp12 = MULTIPLY(z1 - z2, FIX(0.170262339)); /* (c3+c5-c1)/2 */ + tmp10 = tmp11 - tmp12; + tmp11 += tmp12; + tmp12 = MULTIPLY(z2 + z3, - FIX(1.378756276)); /* -c1 */ + tmp11 += tmp12; + z2 = MULTIPLY(z1 + z3, FIX(0.613604268)); /* c5 */ + tmp10 += z2; + tmp12 += z2 + MULTIPLY(z3, FIX(1.870828693)); /* c3+c1-c5 */ + + /* Final output stage */ + + wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*6] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*5] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*4] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*3] = (int) RIGHT_SHIFT(tmp23, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 7 rows from work array, store into output array. + * 14-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/28). + */ + + wsptr = workspace; + for (ctr = 0; ctr < 7; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + z1 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + z1 <<= CONST_BITS; + z4 = (INT32) wsptr[4]; + z2 = MULTIPLY(z4, FIX(1.274162392)); /* c4 */ + z3 = MULTIPLY(z4, FIX(0.314692123)); /* c12 */ + z4 = MULTIPLY(z4, FIX(0.881747734)); /* c8 */ + + tmp10 = z1 + z2; + tmp11 = z1 + z3; + tmp12 = z1 - z4; + + tmp23 = z1 - ((z2 + z3 - z4) << 1); /* c0 = (c4+c12-c8)*2 */ + + z1 = (INT32) wsptr[2]; + z2 = (INT32) wsptr[6]; + + z3 = MULTIPLY(z1 + z2, FIX(1.105676686)); /* c6 */ + + tmp13 = z3 + MULTIPLY(z1, FIX(0.273079590)); /* c2-c6 */ + tmp14 = z3 - MULTIPLY(z2, FIX(1.719280954)); /* c6+c10 */ + tmp15 = MULTIPLY(z1, FIX(0.613604268)) - /* c10 */ + MULTIPLY(z2, FIX(1.378756276)); /* c2 */ + + tmp20 = tmp10 + tmp13; + tmp26 = tmp10 - tmp13; + tmp21 = tmp11 + tmp14; + tmp25 = tmp11 - tmp14; + tmp22 = tmp12 + tmp15; + tmp24 = tmp12 - tmp15; + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + z4 = (INT32) wsptr[7]; + z4 <<= CONST_BITS; + + tmp14 = z1 + z3; + tmp11 = MULTIPLY(z1 + z2, FIX(1.334852607)); /* c3 */ + tmp12 = MULTIPLY(tmp14, FIX(1.197448846)); /* c5 */ + tmp10 = tmp11 + tmp12 + z4 - MULTIPLY(z1, FIX(1.126980169)); /* c3+c5-c1 */ + tmp14 = MULTIPLY(tmp14, FIX(0.752406978)); /* c9 */ + tmp16 = tmp14 - MULTIPLY(z1, FIX(1.061150426)); /* c9+c11-c13 */ + z1 -= z2; + tmp15 = MULTIPLY(z1, FIX(0.467085129)) - z4; /* c11 */ + tmp16 += tmp15; + tmp13 = MULTIPLY(z2 + z3, - FIX(0.158341681)) - z4; /* -c13 */ + tmp11 += tmp13 - MULTIPLY(z2, FIX(0.424103948)); /* c3-c9-c13 */ + tmp12 += tmp13 - MULTIPLY(z3, FIX(2.373959773)); /* c3+c5-c13 */ + tmp13 = MULTIPLY(z3 - z2, FIX(1.405321284)); /* c1 */ + tmp14 += tmp13 + z4 - MULTIPLY(z3, FIX(1.6906431334)); /* c1+c9-c11 */ + tmp15 += tmp13 + MULTIPLY(z2, FIX(0.674957567)); /* c1+c11-c5 */ + + tmp13 = ((z1 - z3) << CONST_BITS) + z4; + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[13] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[12] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp26 + tmp16, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp26 - tmp16, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 8; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 12x6 output block. + * + * 6-point IDCT in pass 1 (columns), 12-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_12x6 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; + INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[8*6]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. + * 6-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/12). + */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp10 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp10 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + tmp10 += ONE << (CONST_BITS-PASS1_BITS-1); + tmp12 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + tmp20 = MULTIPLY(tmp12, FIX(0.707106781)); /* c4 */ + tmp11 = tmp10 + tmp20; + tmp21 = RIGHT_SHIFT(tmp10 - tmp20 - tmp20, CONST_BITS-PASS1_BITS); + tmp20 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + tmp10 = MULTIPLY(tmp20, FIX(1.224744871)); /* c2 */ + tmp20 = tmp11 + tmp10; + tmp22 = tmp11 - tmp10; + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp11 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */ + tmp10 = tmp11 + ((z1 + z2) << CONST_BITS); + tmp12 = tmp11 + ((z3 - z2) << CONST_BITS); + tmp11 = (z1 - z2 - z3) << PASS1_BITS; + + /* Final output stage */ + + wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*5] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*1] = (int) (tmp21 + tmp11); + wsptr[8*4] = (int) (tmp21 - tmp11); + wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*3] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 6 rows from work array, store into output array. + * 12-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/24). + */ + + wsptr = workspace; + for (ctr = 0; ctr < 6; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + z3 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + z3 <<= CONST_BITS; + + z4 = (INT32) wsptr[4]; + z4 = MULTIPLY(z4, FIX(1.224744871)); /* c4 */ + + tmp10 = z3 + z4; + tmp11 = z3 - z4; + + z1 = (INT32) wsptr[2]; + z4 = MULTIPLY(z1, FIX(1.366025404)); /* c2 */ + z1 <<= CONST_BITS; + z2 = (INT32) wsptr[6]; + z2 <<= CONST_BITS; + + tmp12 = z1 - z2; + + tmp21 = z3 + tmp12; + tmp24 = z3 - tmp12; + + tmp12 = z4 + z2; + + tmp20 = tmp10 + tmp12; + tmp25 = tmp10 - tmp12; + + tmp12 = z4 - z1 - z2; + + tmp22 = tmp11 + tmp12; + tmp23 = tmp11 - tmp12; + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + z4 = (INT32) wsptr[7]; + + tmp11 = MULTIPLY(z2, FIX(1.306562965)); /* c3 */ + tmp14 = MULTIPLY(z2, - FIX_0_541196100); /* -c9 */ + + tmp10 = z1 + z3; + tmp15 = MULTIPLY(tmp10 + z4, FIX(0.860918669)); /* c7 */ + tmp12 = tmp15 + MULTIPLY(tmp10, FIX(0.261052384)); /* c5-c7 */ + tmp10 = tmp12 + tmp11 + MULTIPLY(z1, FIX(0.280143716)); /* c1-c5 */ + tmp13 = MULTIPLY(z3 + z4, - FIX(1.045510580)); /* -(c7+c11) */ + tmp12 += tmp13 + tmp14 - MULTIPLY(z3, FIX(1.478575242)); /* c1+c5-c7-c11 */ + tmp13 += tmp15 - tmp11 + MULTIPLY(z4, FIX(1.586706681)); /* c1+c11 */ + tmp15 += tmp14 - MULTIPLY(z1, FIX(0.676326758)) - /* c7-c11 */ + MULTIPLY(z4, FIX(1.982889723)); /* c5+c7 */ + + z1 -= z4; + z2 -= z3; + z3 = MULTIPLY(z1 + z2, FIX_0_541196100); /* c9 */ + tmp11 = z3 + MULTIPLY(z1, FIX_0_765366865); /* c3-c9 */ + tmp14 = z3 - MULTIPLY(z2, FIX_1_847759065); /* c3+c9 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[11] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[10] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp25 + tmp15, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp25 - tmp15, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 8; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 10x5 output block. + * + * 5-point IDCT in pass 1 (columns), 10-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_10x5 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp10, tmp11, tmp12, tmp13, tmp14; + INT32 tmp20, tmp21, tmp22, tmp23, tmp24; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[8*5]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. + * 5-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/10). + */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp12 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp12 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + tmp12 += ONE << (CONST_BITS-PASS1_BITS-1); + tmp13 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + tmp14 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z1 = MULTIPLY(tmp13 + tmp14, FIX(0.790569415)); /* (c2+c4)/2 */ + z2 = MULTIPLY(tmp13 - tmp14, FIX(0.353553391)); /* (c2-c4)/2 */ + z3 = tmp12 + z2; + tmp10 = z3 + z1; + tmp11 = z3 - z1; + tmp12 -= z2 << 2; + + /* Odd part */ + + z2 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + + z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c3 */ + tmp13 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c1-c3 */ + tmp14 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c1+c3 */ + + /* Final output stage */ + + wsptr[8*0] = (int) RIGHT_SHIFT(tmp10 + tmp13, CONST_BITS-PASS1_BITS); + wsptr[8*4] = (int) RIGHT_SHIFT(tmp10 - tmp13, CONST_BITS-PASS1_BITS); + wsptr[8*1] = (int) RIGHT_SHIFT(tmp11 + tmp14, CONST_BITS-PASS1_BITS); + wsptr[8*3] = (int) RIGHT_SHIFT(tmp11 - tmp14, CONST_BITS-PASS1_BITS); + wsptr[8*2] = (int) RIGHT_SHIFT(tmp12, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 5 rows from work array, store into output array. + * 10-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/20). + */ + + wsptr = workspace; + for (ctr = 0; ctr < 5; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + z3 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + z3 <<= CONST_BITS; + z4 = (INT32) wsptr[4]; + z1 = MULTIPLY(z4, FIX(1.144122806)); /* c4 */ + z2 = MULTIPLY(z4, FIX(0.437016024)); /* c8 */ + tmp10 = z3 + z1; + tmp11 = z3 - z2; + + tmp22 = z3 - ((z1 - z2) << 1); /* c0 = (c4-c8)*2 */ + + z2 = (INT32) wsptr[2]; + z3 = (INT32) wsptr[6]; + + z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c6 */ + tmp12 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c2-c6 */ + tmp13 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c2+c6 */ + + tmp20 = tmp10 + tmp12; + tmp24 = tmp10 - tmp12; + tmp21 = tmp11 + tmp13; + tmp23 = tmp11 - tmp13; + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + z3 <<= CONST_BITS; + z4 = (INT32) wsptr[7]; + + tmp11 = z2 + z4; + tmp13 = z2 - z4; + + tmp12 = MULTIPLY(tmp13, FIX(0.309016994)); /* (c3-c7)/2 */ + + z2 = MULTIPLY(tmp11, FIX(0.951056516)); /* (c3+c7)/2 */ + z4 = z3 + tmp12; + + tmp10 = MULTIPLY(z1, FIX(1.396802247)) + z2 + z4; /* c1 */ + tmp14 = MULTIPLY(z1, FIX(0.221231742)) - z2 + z4; /* c9 */ + + z2 = MULTIPLY(tmp11, FIX(0.587785252)); /* (c1-c9)/2 */ + z4 = z3 - tmp12 - (tmp13 << (CONST_BITS - 1)); + + tmp12 = ((z1 - tmp13) << CONST_BITS) - z3; + + tmp11 = MULTIPLY(z1, FIX(1.260073511)) - z2 - z4; /* c3 */ + tmp13 = MULTIPLY(z1, FIX(0.642039522)) - z2 + z4; /* c7 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[9] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[8] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23 + tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp23 - tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp24 + tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp24 - tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 8; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing an 8x4 output block. + * + * 4-point IDCT in pass 1 (columns), 8-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_8x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3; + INT32 tmp10, tmp11, tmp12, tmp13; + INT32 z1, z2, z3; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[8*4]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. + * 4-point IDCT kernel, + * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point IDCT]. + */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + + tmp10 = (tmp0 + tmp2) << PASS1_BITS; + tmp12 = (tmp0 - tmp2) << PASS1_BITS; + + /* Odd part */ + /* Same rotation as in the even part of the 8x8 LL&M IDCT */ + + z2 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ + /* Add fudge factor here for final descale. */ + z1 += ONE << (CONST_BITS-PASS1_BITS-1); + tmp0 = RIGHT_SHIFT(z1 + MULTIPLY(z2, FIX_0_765366865), /* c2-c6 */ + CONST_BITS-PASS1_BITS); + tmp2 = RIGHT_SHIFT(z1 - MULTIPLY(z3, FIX_1_847759065), /* c2+c6 */ + CONST_BITS-PASS1_BITS); + + /* Final output stage */ + + wsptr[8*0] = (int) (tmp10 + tmp0); + wsptr[8*3] = (int) (tmp10 - tmp0); + wsptr[8*1] = (int) (tmp12 + tmp2); + wsptr[8*2] = (int) (tmp12 - tmp2); + } + + /* Pass 2: process rows from work array, store into output array. + * Note that we must descale the results by a factor of 8 == 2**3, + * and also undo the PASS1_BITS scaling. + * 8-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/16). + */ + + wsptr = workspace; + for (ctr = 0; ctr < 4; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part: reverse the even part of the forward DCT. + * The rotator is c(-6). + */ + + /* Add range center and fudge factor for final descale and range-limit. */ + z2 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + z3 = (INT32) wsptr[4]; + + tmp0 = (z2 + z3) << CONST_BITS; + tmp1 = (z2 - z3) << CONST_BITS; + + z2 = (INT32) wsptr[2]; + z3 = (INT32) wsptr[6]; + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ + tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ + tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ + + tmp10 = tmp0 + tmp2; + tmp13 = tmp0 - tmp2; + tmp11 = tmp1 + tmp3; + tmp12 = tmp1 - tmp3; + + /* Odd part per figure 8; the matrix is unitary and hence its + * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. + */ + + tmp0 = (INT32) wsptr[7]; + tmp1 = (INT32) wsptr[5]; + tmp2 = (INT32) wsptr[3]; + tmp3 = (INT32) wsptr[1]; + + z2 = tmp0 + tmp2; + z3 = tmp1 + tmp3; + + z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* c3 */ + z2 = MULTIPLY(z2, - FIX_1_961570560); /* -c3-c5 */ + z3 = MULTIPLY(z3, - FIX_0_390180644); /* -c3+c5 */ + z2 += z1; + z3 += z1; + + z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ + tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* -c1+c3+c5-c7 */ + tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* c1+c3-c5-c7 */ + tmp0 += z1 + z2; + tmp3 += z1 + z3; + + z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ + tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* c1+c3-c5+c7 */ + tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* c1+c3+c5-c7 */ + tmp1 += z1 + z3; + tmp2 += z1 + z2; + + /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp13 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp13 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 6x3 output block. + * + * 3-point IDCT in pass 1 (columns), 6-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_6x3 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp1, tmp2, tmp10, tmp11, tmp12; + INT32 z1, z2, z3; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[6*3]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. + * 3-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/6). + */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 6; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp0 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + tmp0 += ONE << (CONST_BITS-PASS1_BITS-1); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + tmp12 = MULTIPLY(tmp2, FIX(0.707106781)); /* c2 */ + tmp10 = tmp0 + tmp12; + tmp2 = tmp0 - tmp12 - tmp12; + + /* Odd part */ + + tmp12 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + tmp0 = MULTIPLY(tmp12, FIX(1.224744871)); /* c1 */ + + /* Final output stage */ + + wsptr[6*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS); + wsptr[6*2] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS); + wsptr[6*1] = (int) RIGHT_SHIFT(tmp2, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 3 rows from work array, store into output array. + * 6-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/12). + */ + + wsptr = workspace; + for (ctr = 0; ctr < 3; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp0 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + tmp0 <<= CONST_BITS; + tmp2 = (INT32) wsptr[4]; + tmp10 = MULTIPLY(tmp2, FIX(0.707106781)); /* c4 */ + tmp1 = tmp0 + tmp10; + tmp11 = tmp0 - tmp10 - tmp10; + tmp10 = (INT32) wsptr[2]; + tmp0 = MULTIPLY(tmp10, FIX(1.224744871)); /* c2 */ + tmp10 = tmp1 + tmp0; + tmp12 = tmp1 - tmp0; + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + tmp1 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */ + tmp0 = tmp1 + ((z1 + z2) << CONST_BITS); + tmp2 = tmp1 + ((z3 - z2) << CONST_BITS); + tmp1 = (z1 - z2 - z3) << CONST_BITS; + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 6; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 4x2 output block. + * + * 2-point IDCT in pass 1 (columns), 4-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_4x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp2, tmp10, tmp12; + INT32 z1, z2, z3; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + INT32 * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + INT32 workspace[4*2]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 4; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp10 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + + /* Odd part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + + /* Final output stage */ + + wsptr[4*0] = tmp10 + tmp0; + wsptr[4*1] = tmp10 - tmp0; + } + + /* Pass 2: process 2 rows from work array, store into output array. + * 4-point IDCT kernel, + * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point IDCT]. + */ + + wsptr = workspace; + for (ctr = 0; ctr < 2; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp0 = wsptr[0] + ((((INT32) RANGE_CENTER) << 3) + (ONE << 2)); + tmp2 = wsptr[2]; + + tmp10 = (tmp0 + tmp2) << CONST_BITS; + tmp12 = (tmp0 - tmp2) << CONST_BITS; + + /* Odd part */ + /* Same rotation as in the even part of the 8x8 LL&M IDCT */ + + z2 = wsptr[1]; + z3 = wsptr[3]; + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ + tmp0 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ + tmp2 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, + CONST_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, + CONST_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2, + CONST_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2, + CONST_BITS+3) + & RANGE_MASK]; + + wsptr += 4; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 2x1 output block. + * + * 1-point IDCT in pass 1 (columns), 2-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_2x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + DCTELEM tmp0, tmp1; + ISLOW_MULT_TYPE * quantptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + ISHIFT_TEMPS + + /* Pass 1: empty. */ + + /* Pass 2: process 1 row from input, store into output array. */ + + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + outptr = output_buf[0] + output_col; + + /* Even part */ + + tmp0 = DEQUANTIZE(coef_block[0], quantptr[0]); + /* Add range center and fudge factor for final descale and range-limit. */ + tmp0 += (((DCTELEM) RANGE_CENTER) << 3) + (1 << 2); + + /* Odd part */ + + tmp1 = DEQUANTIZE(coef_block[1], quantptr[1]); + + /* Final output stage */ + + outptr[0] = range_limit[(int) IRIGHT_SHIFT(tmp0 + tmp1, 3) & RANGE_MASK]; + outptr[1] = range_limit[(int) IRIGHT_SHIFT(tmp0 - tmp1, 3) & RANGE_MASK]; +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing an 8x16 output block. + * + * 16-point IDCT in pass 1 (columns), 8-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_8x16 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp10, tmp11, tmp12, tmp13; + INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26, tmp27; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[8*16]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. + * 16-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/32). + */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 8; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp0 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + tmp0 += ONE << (CONST_BITS-PASS1_BITS-1); + + z1 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + tmp1 = MULTIPLY(z1, FIX(1.306562965)); /* c4[16] = c2[8] */ + tmp2 = MULTIPLY(z1, FIX_0_541196100); /* c12[16] = c6[8] */ + + tmp10 = tmp0 + tmp1; + tmp11 = tmp0 - tmp1; + tmp12 = tmp0 + tmp2; + tmp13 = tmp0 - tmp2; + + z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + z3 = z1 - z2; + z4 = MULTIPLY(z3, FIX(0.275899379)); /* c14[16] = c7[8] */ + z3 = MULTIPLY(z3, FIX(1.387039845)); /* c2[16] = c1[8] */ + + tmp0 = z3 + MULTIPLY(z2, FIX_2_562915447); /* (c6+c2)[16] = (c3+c1)[8] */ + tmp1 = z4 + MULTIPLY(z1, FIX_0_899976223); /* (c6-c14)[16] = (c3-c7)[8] */ + tmp2 = z3 - MULTIPLY(z1, FIX(0.601344887)); /* (c2-c10)[16] = (c1-c5)[8] */ + tmp3 = z4 - MULTIPLY(z2, FIX(0.509795579)); /* (c10-c14)[16] = (c5-c7)[8] */ + + tmp20 = tmp10 + tmp0; + tmp27 = tmp10 - tmp0; + tmp21 = tmp12 + tmp1; + tmp26 = tmp12 - tmp1; + tmp22 = tmp13 + tmp2; + tmp25 = tmp13 - tmp2; + tmp23 = tmp11 + tmp3; + tmp24 = tmp11 - tmp3; + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + tmp11 = z1 + z3; + + tmp1 = MULTIPLY(z1 + z2, FIX(1.353318001)); /* c3 */ + tmp2 = MULTIPLY(tmp11, FIX(1.247225013)); /* c5 */ + tmp3 = MULTIPLY(z1 + z4, FIX(1.093201867)); /* c7 */ + tmp10 = MULTIPLY(z1 - z4, FIX(0.897167586)); /* c9 */ + tmp11 = MULTIPLY(tmp11, FIX(0.666655658)); /* c11 */ + tmp12 = MULTIPLY(z1 - z2, FIX(0.410524528)); /* c13 */ + tmp0 = tmp1 + tmp2 + tmp3 - + MULTIPLY(z1, FIX(2.286341144)); /* c7+c5+c3-c1 */ + tmp13 = tmp10 + tmp11 + tmp12 - + MULTIPLY(z1, FIX(1.835730603)); /* c9+c11+c13-c15 */ + z1 = MULTIPLY(z2 + z3, FIX(0.138617169)); /* c15 */ + tmp1 += z1 + MULTIPLY(z2, FIX(0.071888074)); /* c9+c11-c3-c15 */ + tmp2 += z1 - MULTIPLY(z3, FIX(1.125726048)); /* c5+c7+c15-c3 */ + z1 = MULTIPLY(z3 - z2, FIX(1.407403738)); /* c1 */ + tmp11 += z1 - MULTIPLY(z3, FIX(0.766367282)); /* c1+c11-c9-c13 */ + tmp12 += z1 + MULTIPLY(z2, FIX(1.971951411)); /* c1+c5+c13-c7 */ + z2 += z4; + z1 = MULTIPLY(z2, - FIX(0.666655658)); /* -c11 */ + tmp1 += z1; + tmp3 += z1 + MULTIPLY(z4, FIX(1.065388962)); /* c3+c11+c15-c7 */ + z2 = MULTIPLY(z2, - FIX(1.247225013)); /* -c5 */ + tmp10 += z2 + MULTIPLY(z4, FIX(3.141271809)); /* c1+c5+c9-c13 */ + tmp12 += z2; + z2 = MULTIPLY(z3 + z4, - FIX(1.353318001)); /* -c3 */ + tmp2 += z2; + tmp3 += z2; + z2 = MULTIPLY(z4 - z3, FIX(0.410524528)); /* c13 */ + tmp10 += z2; + tmp11 += z2; + + /* Final output stage */ + + wsptr[8*0] = (int) RIGHT_SHIFT(tmp20 + tmp0, CONST_BITS-PASS1_BITS); + wsptr[8*15] = (int) RIGHT_SHIFT(tmp20 - tmp0, CONST_BITS-PASS1_BITS); + wsptr[8*1] = (int) RIGHT_SHIFT(tmp21 + tmp1, CONST_BITS-PASS1_BITS); + wsptr[8*14] = (int) RIGHT_SHIFT(tmp21 - tmp1, CONST_BITS-PASS1_BITS); + wsptr[8*2] = (int) RIGHT_SHIFT(tmp22 + tmp2, CONST_BITS-PASS1_BITS); + wsptr[8*13] = (int) RIGHT_SHIFT(tmp22 - tmp2, CONST_BITS-PASS1_BITS); + wsptr[8*3] = (int) RIGHT_SHIFT(tmp23 + tmp3, CONST_BITS-PASS1_BITS); + wsptr[8*12] = (int) RIGHT_SHIFT(tmp23 - tmp3, CONST_BITS-PASS1_BITS); + wsptr[8*4] = (int) RIGHT_SHIFT(tmp24 + tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*11] = (int) RIGHT_SHIFT(tmp24 - tmp10, CONST_BITS-PASS1_BITS); + wsptr[8*5] = (int) RIGHT_SHIFT(tmp25 + tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*10] = (int) RIGHT_SHIFT(tmp25 - tmp11, CONST_BITS-PASS1_BITS); + wsptr[8*6] = (int) RIGHT_SHIFT(tmp26 + tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*9] = (int) RIGHT_SHIFT(tmp26 - tmp12, CONST_BITS-PASS1_BITS); + wsptr[8*7] = (int) RIGHT_SHIFT(tmp27 + tmp13, CONST_BITS-PASS1_BITS); + wsptr[8*8] = (int) RIGHT_SHIFT(tmp27 - tmp13, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process rows from work array, store into output array. + * Note that we must descale the results by a factor of 8 == 2**3, + * and also undo the PASS1_BITS scaling. + * 8-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/16). + */ + + wsptr = workspace; + for (ctr = 0; ctr < 16; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part: reverse the even part of the forward DCT. + * The rotator is c(-6). + */ + + /* Add range center and fudge factor for final descale and range-limit. */ + z2 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + z3 = (INT32) wsptr[4]; + + tmp0 = (z2 + z3) << CONST_BITS; + tmp1 = (z2 - z3) << CONST_BITS; + + z2 = (INT32) wsptr[2]; + z3 = (INT32) wsptr[6]; + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ + tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ + tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ + + tmp10 = tmp0 + tmp2; + tmp13 = tmp0 - tmp2; + tmp11 = tmp1 + tmp3; + tmp12 = tmp1 - tmp3; + + /* Odd part per figure 8; the matrix is unitary and hence its + * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. + */ + + tmp0 = (INT32) wsptr[7]; + tmp1 = (INT32) wsptr[5]; + tmp2 = (INT32) wsptr[3]; + tmp3 = (INT32) wsptr[1]; + + z2 = tmp0 + tmp2; + z3 = tmp1 + tmp3; + + z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* c3 */ + z2 = MULTIPLY(z2, - FIX_1_961570560); /* -c3-c5 */ + z3 = MULTIPLY(z3, - FIX_0_390180644); /* -c3+c5 */ + z2 += z1; + z3 += z1; + + z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ + tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* -c1+c3+c5-c7 */ + tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* c1+c3-c5-c7 */ + tmp0 += z1 + z2; + tmp3 += z1 + z3; + + z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ + tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* c1+c3-c5+c7 */ + tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* c1+c3+c5-c7 */ + tmp1 += z1 + z3; + tmp2 += z1 + z2; + + /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp13 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp13 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 7x14 output block. + * + * 14-point IDCT in pass 1 (columns), 7-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_7x14 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16; + INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25, tmp26; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[7*14]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. + * 14-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/28). + */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 7; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + z1 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + z1 += ONE << (CONST_BITS-PASS1_BITS-1); + z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z2 = MULTIPLY(z4, FIX(1.274162392)); /* c4 */ + z3 = MULTIPLY(z4, FIX(0.314692123)); /* c12 */ + z4 = MULTIPLY(z4, FIX(0.881747734)); /* c8 */ + + tmp10 = z1 + z2; + tmp11 = z1 + z3; + tmp12 = z1 - z4; + + tmp23 = RIGHT_SHIFT(z1 - ((z2 + z3 - z4) << 1), /* c0 = (c4+c12-c8)*2 */ + CONST_BITS-PASS1_BITS); + + z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + z3 = MULTIPLY(z1 + z2, FIX(1.105676686)); /* c6 */ + + tmp13 = z3 + MULTIPLY(z1, FIX(0.273079590)); /* c2-c6 */ + tmp14 = z3 - MULTIPLY(z2, FIX(1.719280954)); /* c6+c10 */ + tmp15 = MULTIPLY(z1, FIX(0.613604268)) - /* c10 */ + MULTIPLY(z2, FIX(1.378756276)); /* c2 */ + + tmp20 = tmp10 + tmp13; + tmp26 = tmp10 - tmp13; + tmp21 = tmp11 + tmp14; + tmp25 = tmp11 - tmp14; + tmp22 = tmp12 + tmp15; + tmp24 = tmp12 - tmp15; + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + tmp13 = z4 << CONST_BITS; + + tmp14 = z1 + z3; + tmp11 = MULTIPLY(z1 + z2, FIX(1.334852607)); /* c3 */ + tmp12 = MULTIPLY(tmp14, FIX(1.197448846)); /* c5 */ + tmp10 = tmp11 + tmp12 + tmp13 - MULTIPLY(z1, FIX(1.126980169)); /* c3+c5-c1 */ + tmp14 = MULTIPLY(tmp14, FIX(0.752406978)); /* c9 */ + tmp16 = tmp14 - MULTIPLY(z1, FIX(1.061150426)); /* c9+c11-c13 */ + z1 -= z2; + tmp15 = MULTIPLY(z1, FIX(0.467085129)) - tmp13; /* c11 */ + tmp16 += tmp15; + z1 += z4; + z4 = MULTIPLY(z2 + z3, - FIX(0.158341681)) - tmp13; /* -c13 */ + tmp11 += z4 - MULTIPLY(z2, FIX(0.424103948)); /* c3-c9-c13 */ + tmp12 += z4 - MULTIPLY(z3, FIX(2.373959773)); /* c3+c5-c13 */ + z4 = MULTIPLY(z3 - z2, FIX(1.405321284)); /* c1 */ + tmp14 += z4 + tmp13 - MULTIPLY(z3, FIX(1.6906431334)); /* c1+c9-c11 */ + tmp15 += z4 + MULTIPLY(z2, FIX(0.674957567)); /* c1+c11-c5 */ + + tmp13 = (z1 - z3) << PASS1_BITS; + + /* Final output stage */ + + wsptr[7*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); + wsptr[7*13] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); + wsptr[7*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); + wsptr[7*12] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); + wsptr[7*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); + wsptr[7*11] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); + wsptr[7*3] = (int) (tmp23 + tmp13); + wsptr[7*10] = (int) (tmp23 - tmp13); + wsptr[7*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); + wsptr[7*9] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); + wsptr[7*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS); + wsptr[7*8] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS); + wsptr[7*6] = (int) RIGHT_SHIFT(tmp26 + tmp16, CONST_BITS-PASS1_BITS); + wsptr[7*7] = (int) RIGHT_SHIFT(tmp26 - tmp16, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 14 rows from work array, store into output array. + * 7-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/14). + */ + + wsptr = workspace; + for (ctr = 0; ctr < 14; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp23 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + tmp23 <<= CONST_BITS; + + z1 = (INT32) wsptr[2]; + z2 = (INT32) wsptr[4]; + z3 = (INT32) wsptr[6]; + + tmp20 = MULTIPLY(z2 - z3, FIX(0.881747734)); /* c4 */ + tmp22 = MULTIPLY(z1 - z2, FIX(0.314692123)); /* c6 */ + tmp21 = tmp20 + tmp22 + tmp23 - MULTIPLY(z2, FIX(1.841218003)); /* c2+c4-c6 */ + tmp10 = z1 + z3; + z2 -= tmp10; + tmp10 = MULTIPLY(tmp10, FIX(1.274162392)) + tmp23; /* c2 */ + tmp20 += tmp10 - MULTIPLY(z3, FIX(0.077722536)); /* c2-c4-c6 */ + tmp22 += tmp10 - MULTIPLY(z1, FIX(2.470602249)); /* c2+c4+c6 */ + tmp23 += MULTIPLY(z2, FIX(1.414213562)); /* c0 */ + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + + tmp11 = MULTIPLY(z1 + z2, FIX(0.935414347)); /* (c3+c1-c5)/2 */ + tmp12 = MULTIPLY(z1 - z2, FIX(0.170262339)); /* (c3+c5-c1)/2 */ + tmp10 = tmp11 - tmp12; + tmp11 += tmp12; + tmp12 = MULTIPLY(z2 + z3, - FIX(1.378756276)); /* -c1 */ + tmp11 += tmp12; + z2 = MULTIPLY(z1 + z3, FIX(0.613604268)); /* c5 */ + tmp10 += z2; + tmp12 += z2 + MULTIPLY(z3, FIX(1.870828693)); /* c3+c1-c5 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp23, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 7; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 6x12 output block. + * + * 12-point IDCT in pass 1 (columns), 6-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_6x12 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp10, tmp11, tmp12, tmp13, tmp14, tmp15; + INT32 tmp20, tmp21, tmp22, tmp23, tmp24, tmp25; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[6*12]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. + * 12-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/24). + */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 6; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + z3 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + z3 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + z3 += ONE << (CONST_BITS-PASS1_BITS-1); + + z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z4 = MULTIPLY(z4, FIX(1.224744871)); /* c4 */ + + tmp10 = z3 + z4; + tmp11 = z3 - z4; + + z1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z4 = MULTIPLY(z1, FIX(1.366025404)); /* c2 */ + z1 <<= CONST_BITS; + z2 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + z2 <<= CONST_BITS; + + tmp12 = z1 - z2; + + tmp21 = z3 + tmp12; + tmp24 = z3 - tmp12; + + tmp12 = z4 + z2; + + tmp20 = tmp10 + tmp12; + tmp25 = tmp10 - tmp12; + + tmp12 = z4 - z1 - z2; + + tmp22 = tmp11 + tmp12; + tmp23 = tmp11 - tmp12; + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + tmp11 = MULTIPLY(z2, FIX(1.306562965)); /* c3 */ + tmp14 = MULTIPLY(z2, - FIX_0_541196100); /* -c9 */ + + tmp10 = z1 + z3; + tmp15 = MULTIPLY(tmp10 + z4, FIX(0.860918669)); /* c7 */ + tmp12 = tmp15 + MULTIPLY(tmp10, FIX(0.261052384)); /* c5-c7 */ + tmp10 = tmp12 + tmp11 + MULTIPLY(z1, FIX(0.280143716)); /* c1-c5 */ + tmp13 = MULTIPLY(z3 + z4, - FIX(1.045510580)); /* -(c7+c11) */ + tmp12 += tmp13 + tmp14 - MULTIPLY(z3, FIX(1.478575242)); /* c1+c5-c7-c11 */ + tmp13 += tmp15 - tmp11 + MULTIPLY(z4, FIX(1.586706681)); /* c1+c11 */ + tmp15 += tmp14 - MULTIPLY(z1, FIX(0.676326758)) - /* c7-c11 */ + MULTIPLY(z4, FIX(1.982889723)); /* c5+c7 */ + + z1 -= z4; + z2 -= z3; + z3 = MULTIPLY(z1 + z2, FIX_0_541196100); /* c9 */ + tmp11 = z3 + MULTIPLY(z1, FIX_0_765366865); /* c3-c9 */ + tmp14 = z3 - MULTIPLY(z2, FIX_1_847759065); /* c3+c9 */ + + /* Final output stage */ + + wsptr[6*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); + wsptr[6*11] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); + wsptr[6*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); + wsptr[6*10] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); + wsptr[6*2] = (int) RIGHT_SHIFT(tmp22 + tmp12, CONST_BITS-PASS1_BITS); + wsptr[6*9] = (int) RIGHT_SHIFT(tmp22 - tmp12, CONST_BITS-PASS1_BITS); + wsptr[6*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS); + wsptr[6*8] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS); + wsptr[6*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); + wsptr[6*7] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); + wsptr[6*5] = (int) RIGHT_SHIFT(tmp25 + tmp15, CONST_BITS-PASS1_BITS); + wsptr[6*6] = (int) RIGHT_SHIFT(tmp25 - tmp15, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 12 rows from work array, store into output array. + * 6-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/12). + */ + + wsptr = workspace; + for (ctr = 0; ctr < 12; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp10 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + tmp10 <<= CONST_BITS; + tmp12 = (INT32) wsptr[4]; + tmp20 = MULTIPLY(tmp12, FIX(0.707106781)); /* c4 */ + tmp11 = tmp10 + tmp20; + tmp21 = tmp10 - tmp20 - tmp20; + tmp20 = (INT32) wsptr[2]; + tmp10 = MULTIPLY(tmp20, FIX(1.224744871)); /* c2 */ + tmp20 = tmp11 + tmp10; + tmp22 = tmp11 - tmp10; + + /* Odd part */ + + z1 = (INT32) wsptr[1]; + z2 = (INT32) wsptr[3]; + z3 = (INT32) wsptr[5]; + tmp11 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */ + tmp10 = tmp11 + ((z1 + z2) << CONST_BITS); + tmp12 = tmp11 + ((z3 - z2) << CONST_BITS); + tmp11 = (z1 - z2 - z3) << CONST_BITS; + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp20 + tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) RIGHT_SHIFT(tmp20 - tmp10, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp21 + tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp21 - tmp11, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp22 + tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp22 - tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 6; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 5x10 output block. + * + * 10-point IDCT in pass 1 (columns), 5-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_5x10 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp10, tmp11, tmp12, tmp13, tmp14; + INT32 tmp20, tmp21, tmp22, tmp23, tmp24; + INT32 z1, z2, z3, z4, z5; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[5*10]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. + * 10-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/20). + */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 5; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + z3 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + z3 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + z3 += ONE << (CONST_BITS-PASS1_BITS-1); + z4 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z1 = MULTIPLY(z4, FIX(1.144122806)); /* c4 */ + z2 = MULTIPLY(z4, FIX(0.437016024)); /* c8 */ + tmp10 = z3 + z1; + tmp11 = z3 - z2; + + tmp22 = RIGHT_SHIFT(z3 - ((z1 - z2) << 1), /* c0 = (c4-c8)*2 */ + CONST_BITS-PASS1_BITS); + + z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c6 */ + tmp12 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c2-c6 */ + tmp13 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c2+c6 */ + + tmp20 = tmp10 + tmp12; + tmp24 = tmp10 - tmp12; + tmp21 = tmp11 + tmp13; + tmp23 = tmp11 - tmp13; + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + z4 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + tmp11 = z2 + z4; + tmp13 = z2 - z4; + + tmp12 = MULTIPLY(tmp13, FIX(0.309016994)); /* (c3-c7)/2 */ + z5 = z3 << CONST_BITS; + + z2 = MULTIPLY(tmp11, FIX(0.951056516)); /* (c3+c7)/2 */ + z4 = z5 + tmp12; + + tmp10 = MULTIPLY(z1, FIX(1.396802247)) + z2 + z4; /* c1 */ + tmp14 = MULTIPLY(z1, FIX(0.221231742)) - z2 + z4; /* c9 */ + + z2 = MULTIPLY(tmp11, FIX(0.587785252)); /* (c1-c9)/2 */ + z4 = z5 - tmp12 - (tmp13 << (CONST_BITS - 1)); + + tmp12 = (z1 - tmp13 - z3) << PASS1_BITS; + + tmp11 = MULTIPLY(z1, FIX(1.260073511)) - z2 - z4; /* c3 */ + tmp13 = MULTIPLY(z1, FIX(0.642039522)) - z2 + z4; /* c7 */ + + /* Final output stage */ + + wsptr[5*0] = (int) RIGHT_SHIFT(tmp20 + tmp10, CONST_BITS-PASS1_BITS); + wsptr[5*9] = (int) RIGHT_SHIFT(tmp20 - tmp10, CONST_BITS-PASS1_BITS); + wsptr[5*1] = (int) RIGHT_SHIFT(tmp21 + tmp11, CONST_BITS-PASS1_BITS); + wsptr[5*8] = (int) RIGHT_SHIFT(tmp21 - tmp11, CONST_BITS-PASS1_BITS); + wsptr[5*2] = (int) (tmp22 + tmp12); + wsptr[5*7] = (int) (tmp22 - tmp12); + wsptr[5*3] = (int) RIGHT_SHIFT(tmp23 + tmp13, CONST_BITS-PASS1_BITS); + wsptr[5*6] = (int) RIGHT_SHIFT(tmp23 - tmp13, CONST_BITS-PASS1_BITS); + wsptr[5*4] = (int) RIGHT_SHIFT(tmp24 + tmp14, CONST_BITS-PASS1_BITS); + wsptr[5*5] = (int) RIGHT_SHIFT(tmp24 - tmp14, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 10 rows from work array, store into output array. + * 5-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/10). + */ + + wsptr = workspace; + for (ctr = 0; ctr < 10; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp12 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + tmp12 <<= CONST_BITS; + tmp13 = (INT32) wsptr[2]; + tmp14 = (INT32) wsptr[4]; + z1 = MULTIPLY(tmp13 + tmp14, FIX(0.790569415)); /* (c2+c4)/2 */ + z2 = MULTIPLY(tmp13 - tmp14, FIX(0.353553391)); /* (c2-c4)/2 */ + z3 = tmp12 + z2; + tmp10 = z3 + z1; + tmp11 = z3 - z1; + tmp12 -= z2 << 2; + + /* Odd part */ + + z2 = (INT32) wsptr[1]; + z3 = (INT32) wsptr[3]; + + z1 = MULTIPLY(z2 + z3, FIX(0.831253876)); /* c3 */ + tmp13 = z1 + MULTIPLY(z2, FIX(0.513743148)); /* c1-c3 */ + tmp14 = z1 - MULTIPLY(z3, FIX(2.176250899)); /* c1+c3 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp13, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp11 + tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp11 - tmp14, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 5; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 4x8 output block. + * + * 8-point IDCT in pass 1 (columns), 4-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_4x8 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3; + INT32 tmp10, tmp11, tmp12, tmp13; + INT32 z1, z2, z3; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[4*8]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. + * Note results are scaled up by sqrt(8) compared to a true IDCT; + * furthermore, we scale the results by 2**PASS1_BITS. + * 8-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/16). + */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 4; ctr > 0; ctr--) { + /* Due to quantization, we will usually find that many of the input + * coefficients are zero, especially the AC terms. We can exploit this + * by short-circuiting the IDCT calculation for any column in which all + * the AC terms are zero. In that case each output is equal to the + * DC coefficient (with scale factor as needed). + * With typical images and quantization tables, half or more of the + * column DCT calculations can be simplified this way. + */ + + if (inptr[DCTSIZE*1] == 0 && inptr[DCTSIZE*2] == 0 && + inptr[DCTSIZE*3] == 0 && inptr[DCTSIZE*4] == 0 && + inptr[DCTSIZE*5] == 0 && inptr[DCTSIZE*6] == 0 && + inptr[DCTSIZE*7] == 0) { + /* AC terms all zero */ + int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; + + wsptr[4*0] = dcval; + wsptr[4*1] = dcval; + wsptr[4*2] = dcval; + wsptr[4*3] = dcval; + wsptr[4*4] = dcval; + wsptr[4*5] = dcval; + wsptr[4*6] = dcval; + wsptr[4*7] = dcval; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + continue; + } + + /* Even part: reverse the even part of the forward DCT. + * The rotator is c(-6). + */ + + z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + z2 <<= CONST_BITS; + z3 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + z2 += ONE << (CONST_BITS-PASS1_BITS-1); + + tmp0 = z2 + z3; + tmp1 = z2 - z3; + + z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ + tmp2 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ + tmp3 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ + + tmp10 = tmp0 + tmp2; + tmp13 = tmp0 - tmp2; + tmp11 = tmp1 + tmp3; + tmp12 = tmp1 - tmp3; + + /* Odd part per figure 8; the matrix is unitary and hence its + * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. + */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + + z2 = tmp0 + tmp2; + z3 = tmp1 + tmp3; + + z1 = MULTIPLY(z2 + z3, FIX_1_175875602); /* c3 */ + z2 = MULTIPLY(z2, - FIX_1_961570560); /* -c3-c5 */ + z3 = MULTIPLY(z3, - FIX_0_390180644); /* -c3+c5 */ + z2 += z1; + z3 += z1; + + z1 = MULTIPLY(tmp0 + tmp3, - FIX_0_899976223); /* -c3+c7 */ + tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* -c1+c3+c5-c7 */ + tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* c1+c3-c5-c7 */ + tmp0 += z1 + z2; + tmp3 += z1 + z3; + + z1 = MULTIPLY(tmp1 + tmp2, - FIX_2_562915447); /* -c1-c3 */ + tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* c1+c3-c5+c7 */ + tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* c1+c3+c5-c7 */ + tmp1 += z1 + z3; + tmp2 += z1 + z2; + + /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ + + wsptr[4*0] = (int) RIGHT_SHIFT(tmp10 + tmp3, CONST_BITS-PASS1_BITS); + wsptr[4*7] = (int) RIGHT_SHIFT(tmp10 - tmp3, CONST_BITS-PASS1_BITS); + wsptr[4*1] = (int) RIGHT_SHIFT(tmp11 + tmp2, CONST_BITS-PASS1_BITS); + wsptr[4*6] = (int) RIGHT_SHIFT(tmp11 - tmp2, CONST_BITS-PASS1_BITS); + wsptr[4*2] = (int) RIGHT_SHIFT(tmp12 + tmp1, CONST_BITS-PASS1_BITS); + wsptr[4*5] = (int) RIGHT_SHIFT(tmp12 - tmp1, CONST_BITS-PASS1_BITS); + wsptr[4*3] = (int) RIGHT_SHIFT(tmp13 + tmp0, CONST_BITS-PASS1_BITS); + wsptr[4*4] = (int) RIGHT_SHIFT(tmp13 - tmp0, CONST_BITS-PASS1_BITS); + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + } + + /* Pass 2: process 8 rows from work array, store into output array. + * 4-point IDCT kernel, + * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point IDCT]. + */ + + wsptr = workspace; + for (ctr = 0; ctr < 8; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp0 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + tmp2 = (INT32) wsptr[2]; + + tmp10 = (tmp0 + tmp2) << CONST_BITS; + tmp12 = (tmp0 - tmp2) << CONST_BITS; + + /* Odd part */ + /* Same rotation as in the even part of the 8x8 LL&M IDCT */ + + z2 = (INT32) wsptr[1]; + z3 = (INT32) wsptr[3]; + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ + tmp0 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ + tmp2 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp12 + tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp12 - tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 4; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 3x6 output block. + * + * 6-point IDCT in pass 1 (columns), 3-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_3x6 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp1, tmp2, tmp10, tmp11, tmp12; + INT32 z1, z2, z3; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[3*6]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. + * 6-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/12). + */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 3; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp0 <<= CONST_BITS; + /* Add fudge factor here for final descale. */ + tmp0 += ONE << (CONST_BITS-PASS1_BITS-1); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + tmp10 = MULTIPLY(tmp2, FIX(0.707106781)); /* c4 */ + tmp1 = tmp0 + tmp10; + tmp11 = RIGHT_SHIFT(tmp0 - tmp10 - tmp10, CONST_BITS-PASS1_BITS); + tmp10 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + tmp0 = MULTIPLY(tmp10, FIX(1.224744871)); /* c2 */ + tmp10 = tmp1 + tmp0; + tmp12 = tmp1 - tmp0; + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z3 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp1 = MULTIPLY(z1 + z3, FIX(0.366025404)); /* c5 */ + tmp0 = tmp1 + ((z1 + z2) << CONST_BITS); + tmp2 = tmp1 + ((z3 - z2) << CONST_BITS); + tmp1 = (z1 - z2 - z3) << PASS1_BITS; + + /* Final output stage */ + + wsptr[3*0] = (int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS-PASS1_BITS); + wsptr[3*5] = (int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS-PASS1_BITS); + wsptr[3*1] = (int) (tmp11 + tmp1); + wsptr[3*4] = (int) (tmp11 - tmp1); + wsptr[3*2] = (int) RIGHT_SHIFT(tmp12 + tmp2, CONST_BITS-PASS1_BITS); + wsptr[3*3] = (int) RIGHT_SHIFT(tmp12 - tmp2, CONST_BITS-PASS1_BITS); + } + + /* Pass 2: process 6 rows from work array, store into output array. + * 3-point IDCT kernel, cK represents sqrt(2) * cos(K*pi/6). + */ + + wsptr = workspace; + for (ctr = 0; ctr < 6; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp0 = (INT32) wsptr[0] + + ((((INT32) RANGE_CENTER) << (PASS1_BITS+3)) + + (ONE << (PASS1_BITS+2))); + tmp0 <<= CONST_BITS; + tmp2 = (INT32) wsptr[2]; + tmp12 = MULTIPLY(tmp2, FIX(0.707106781)); /* c2 */ + tmp10 = tmp0 + tmp12; + tmp2 = tmp0 - tmp12 - tmp12; + + /* Odd part */ + + tmp12 = (INT32) wsptr[1]; + tmp0 = MULTIPLY(tmp12, FIX(1.224744871)); /* c1 */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += 3; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 2x4 output block. + * + * 4-point IDCT in pass 1 (columns), 2-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_2x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp2, tmp10, tmp12; + INT32 z1, z2, z3; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + INT32 * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + INT32 workspace[2*4]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. + * 4-point IDCT kernel, + * cK represents sqrt(2) * cos(K*pi/16) [refers to 8-point IDCT]. + */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = 0; ctr < 2; ctr++, inptr++, quantptr++, wsptr++) { + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + + tmp10 = (tmp0 + tmp2) << CONST_BITS; + tmp12 = (tmp0 - tmp2) << CONST_BITS; + + /* Odd part */ + /* Same rotation as in the even part of the 8x8 LL&M IDCT */ + + z2 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); /* c6 */ + tmp0 = z1 + MULTIPLY(z2, FIX_0_765366865); /* c2-c6 */ + tmp2 = z1 - MULTIPLY(z3, FIX_1_847759065); /* c2+c6 */ + + /* Final output stage */ + + wsptr[2*0] = tmp10 + tmp0; + wsptr[2*3] = tmp10 - tmp0; + wsptr[2*1] = tmp12 + tmp2; + wsptr[2*2] = tmp12 - tmp2; + } + + /* Pass 2: process 4 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 4; ctr++) { + outptr = output_buf[ctr] + output_col; + + /* Even part */ + + /* Add range center and fudge factor for final descale and range-limit. */ + tmp10 = wsptr[0] + + ((((INT32) RANGE_CENTER) << (CONST_BITS+3)) + + (ONE << (CONST_BITS+2))); + + /* Odd part */ + + tmp0 = wsptr[1]; + + /* Final output stage */ + + outptr[0] = range_limit[(int) RIGHT_SHIFT(tmp10 + tmp0, CONST_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) RIGHT_SHIFT(tmp10 - tmp0, CONST_BITS+3) + & RANGE_MASK]; + + wsptr += 2; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a 1x2 output block. + * + * 2-point IDCT in pass 1 (columns), 1-point in pass 2 (rows). + */ + +GLOBAL(void) +jpeg_idct_1x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + DCTELEM tmp0, tmp1; + ISLOW_MULT_TYPE * quantptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + ISHIFT_TEMPS + + /* Process 1 column from input, store into output array. */ + + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + + /* Even part */ + + tmp0 = DEQUANTIZE(coef_block[DCTSIZE*0], quantptr[DCTSIZE*0]); + /* Add range center and fudge factor for final descale and range-limit. */ + tmp0 += (((DCTELEM) RANGE_CENTER) << 3) + (1 << 2); + + /* Odd part */ + + tmp1 = DEQUANTIZE(coef_block[DCTSIZE*1], quantptr[DCTSIZE*1]); + + /* Final output stage */ + + output_buf[0][output_col] = + range_limit[(int) IRIGHT_SHIFT(tmp0 + tmp1, 3) & RANGE_MASK]; + output_buf[1][output_col] = + range_limit[(int) IRIGHT_SHIFT(tmp0 - tmp1, 3) & RANGE_MASK]; +} + +#endif /* IDCT_SCALING_SUPPORTED */ +#endif /* DCT_ISLOW_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jmemmgr.c b/widget/milsko/milskosrc/external/libjpeg/src/jmemmgr.c new file mode 100644 index 0000000000..40377de470 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jmemmgr.c @@ -0,0 +1,1115 @@ +/* + * jmemmgr.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 2011-2019 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the JPEG system-independent memory management + * routines. This code is usable across a wide variety of machines; most + * of the system dependencies have been isolated in a separate file. + * The major functions provided here are: + * * pool-based allocation and freeing of memory; + * * policy decisions about how to divide available memory among the + * virtual arrays; + * * control logic for swapping virtual arrays between main memory and + * backing storage. + * The separate system-dependent file provides the actual backing-storage + * access code, and it contains the policy decision about how much total + * main memory to use. + * This file is system-dependent in the sense that some of its functions + * are unnecessary in some systems. For example, if there is enough virtual + * memory so that backing storage will never be used, much of the virtual + * array control logic could be removed. (Of course, if you have that much + * memory then you shouldn't care about a little bit of unused code...) + */ + +#define JPEG_INTERNALS +#define AM_MEMORY_MANAGER /* we define jvirt_Xarray_control structs */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef NO_GETENV +#ifndef HAVE_STDLIB_H /* should declare getenv() */ +extern char * getenv JPP((const char * name)); +#endif +#endif + + +/* + * Some important notes: + * The allocation routines provided here must never return NULL. + * They should exit to error_exit if unsuccessful. + * + * It's not a good idea to try to merge the sarray and barray routines, + * even though they are textually almost the same, because samples are + * usually stored as bytes while coefficients are shorts or ints. Thus, + * in machines where byte pointers have a different representation from + * word pointers, the resulting machine code could not be the same. + */ + + +/* + * Many machines require storage alignment: longs must start on 4-byte + * boundaries, doubles on 8-byte boundaries, etc. On such machines, malloc() + * always returns pointers that are multiples of the worst-case alignment + * requirement, and we had better do so too. + * There isn't any really portable way to determine the worst-case alignment + * requirement. This module assumes that the alignment requirement is + * multiples of sizeof(ALIGN_TYPE). + * By default, we define ALIGN_TYPE as double. This is necessary on some + * workstations (where doubles really do need 8-byte alignment) and will work + * fine on nearly everything. If your machine has lesser alignment needs, + * you can save a few bytes by making ALIGN_TYPE smaller. + * The only place I know of where this will NOT work is certain Macintosh + * 680x0 compilers that define double as a 10-byte IEEE extended float. + * Doing 10-byte alignment is counterproductive because longwords won't be + * aligned well. Put "#define ALIGN_TYPE long" in jconfig.h if you have + * such a compiler. + */ + +#ifndef ALIGN_TYPE /* so can override from jconfig.h */ +#define ALIGN_TYPE double +#endif + + +/* + * We allocate objects from "pools", where each pool is gotten with a single + * request to jpeg_get_small() or jpeg_get_large(). There is no per-object + * overhead within a pool, except for alignment padding. Each pool has a + * header with a link to the next pool of the same class. + * Small and large pool headers are identical except that the latter's + * link pointer must be FAR on 80x86 machines. + * Notice that the "real" header fields are union'ed with a dummy ALIGN_TYPE + * field. This forces the compiler to make SIZEOF(small_pool_hdr) a multiple + * of the alignment requirement of ALIGN_TYPE. + */ + +typedef union small_pool_struct * small_pool_ptr; + +typedef union small_pool_struct { + struct { + small_pool_ptr next; /* next in list of pools */ + size_t bytes_used; /* how many bytes already used within pool */ + size_t bytes_left; /* bytes still available in this pool */ + } hdr; + ALIGN_TYPE dummy; /* included in union to ensure alignment */ +} small_pool_hdr; + +typedef union large_pool_struct FAR * large_pool_ptr; + +typedef union large_pool_struct { + struct { + large_pool_ptr next; /* next in list of pools */ + size_t bytes_used; /* how many bytes already used within pool */ + size_t bytes_left; /* bytes still available in this pool */ + } hdr; + ALIGN_TYPE dummy; /* included in union to ensure alignment */ +} large_pool_hdr; + + +/* + * Here is the full definition of a memory manager object. + */ + +typedef struct { + struct jpeg_memory_mgr pub; /* public fields */ + + /* Each pool identifier (lifetime class) names a linked list of pools. */ + small_pool_ptr small_list[JPOOL_NUMPOOLS]; + large_pool_ptr large_list[JPOOL_NUMPOOLS]; + + /* Since we only have one lifetime class of virtual arrays, only one + * linked list is necessary (for each datatype). Note that the virtual + * array control blocks being linked together are actually stored somewhere + * in the small-pool list. + */ + jvirt_sarray_ptr virt_sarray_list; + jvirt_barray_ptr virt_barray_list; + + /* This counts total space obtained from jpeg_get_small/large */ + size_t total_space_allocated; + + /* alloc_sarray and alloc_barray set this value for use by virtual + * array routines. + */ + JDIMENSION last_rowsperchunk; /* from most recent alloc_sarray/barray */ +} my_memory_mgr; + +typedef my_memory_mgr * my_mem_ptr; + + +/* + * The control blocks for virtual arrays. + * Note that these blocks are allocated in the "small" pool area. + * System-dependent info for the associated backing store (if any) is hidden + * inside the backing_store_info struct. + */ + +struct jvirt_sarray_control { + JSAMPARRAY mem_buffer; /* => the in-memory buffer */ + JDIMENSION rows_in_array; /* total virtual array height */ + JDIMENSION samplesperrow; /* width of array (and of memory buffer) */ + JDIMENSION maxaccess; /* max rows accessed by access_virt_sarray */ + JDIMENSION rows_in_mem; /* height of memory buffer */ + JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */ + JDIMENSION cur_start_row; /* first logical row # in the buffer */ + JDIMENSION first_undef_row; /* row # of first uninitialized row */ + boolean pre_zero; /* pre-zero mode requested? */ + boolean dirty; /* do current buffer contents need written? */ + boolean b_s_open; /* is backing-store data valid? */ + jvirt_sarray_ptr next; /* link to next virtual sarray control block */ + backing_store_info b_s_info; /* System-dependent control info */ +}; + +struct jvirt_barray_control { + JBLOCKARRAY mem_buffer; /* => the in-memory buffer */ + JDIMENSION rows_in_array; /* total virtual array height */ + JDIMENSION blocksperrow; /* width of array (and of memory buffer) */ + JDIMENSION maxaccess; /* max rows accessed by access_virt_barray */ + JDIMENSION rows_in_mem; /* height of memory buffer */ + JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */ + JDIMENSION cur_start_row; /* first logical row # in the buffer */ + JDIMENSION first_undef_row; /* row # of first uninitialized row */ + boolean pre_zero; /* pre-zero mode requested? */ + boolean dirty; /* do current buffer contents need written? */ + boolean b_s_open; /* is backing-store data valid? */ + jvirt_barray_ptr next; /* link to next virtual barray control block */ + backing_store_info b_s_info; /* System-dependent control info */ +}; + + +#ifdef MEM_STATS /* optional extra stuff for statistics */ + +LOCAL(void) +print_mem_stats (j_common_ptr cinfo, int pool_id) +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + small_pool_ptr shdr_ptr; + large_pool_ptr lhdr_ptr; + + /* Since this is only a debugging stub, we can cheat a little by using + * fprintf directly rather than going through the trace message code. + * This is helpful because message parm array can't handle longs. + */ + fprintf(stderr, "Freeing pool %d, total space = %ld\n", + pool_id, (long) mem->total_space_allocated); + + for (lhdr_ptr = mem->large_list[pool_id]; lhdr_ptr != NULL; + lhdr_ptr = lhdr_ptr->hdr.next) { + fprintf(stderr, " Large chunk used %ld\n", + (long) lhdr_ptr->hdr.bytes_used); + } + + for (shdr_ptr = mem->small_list[pool_id]; shdr_ptr != NULL; + shdr_ptr = shdr_ptr->hdr.next) { + fprintf(stderr, " Small chunk used %ld free %ld\n", + (long) shdr_ptr->hdr.bytes_used, + (long) shdr_ptr->hdr.bytes_left); + } +} + +#endif /* MEM_STATS */ + + +LOCAL(noreturn_t) +out_of_memory (j_common_ptr cinfo, int which) +/* Report an out-of-memory error and stop execution */ +/* If we compiled MEM_STATS support, report alloc requests before dying */ +{ +#ifdef MEM_STATS + cinfo->err->trace_level = 2; /* force self_destruct to report stats */ +#endif + ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, which); +} + + +/* + * Allocation of "small" objects. + * + * For these, we use pooled storage. When a new pool must be created, + * we try to get enough space for the current request plus a "slop" factor, + * where the slop will be the amount of leftover space in the new pool. + * The speed vs. space tradeoff is largely determined by the slop values. + * A different slop value is provided for each pool class (lifetime), + * and we also distinguish the first pool of a class from later ones. + * NOTE: the values given work fairly well on both 16- and 32-bit-int + * machines, but may be too small if longs are 64 bits or more. + */ + +static const size_t first_pool_slop[JPOOL_NUMPOOLS] = +{ + 1600, /* first PERMANENT pool */ + 16000 /* first IMAGE pool */ +}; + +static const size_t extra_pool_slop[JPOOL_NUMPOOLS] = +{ + 0, /* additional PERMANENT pools */ + 5000 /* additional IMAGE pools */ +}; + +#define MIN_SLOP 50 /* greater than 0 to avoid futile looping */ + + +METHODDEF(void *) +alloc_small (j_common_ptr cinfo, int pool_id, size_t sizeofobject) +/* Allocate a "small" object */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + small_pool_ptr hdr_ptr, prev_hdr_ptr; + size_t odd_bytes, min_request, slop; + char * data_ptr; + + /* Check for unsatisfiable request (do now to ensure no overflow below) */ + if (sizeofobject > (size_t) MAX_ALLOC_CHUNK - SIZEOF(small_pool_hdr)) + out_of_memory(cinfo, 1); /* request exceeds malloc's ability */ + + /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */ + odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE); + if (odd_bytes > 0) + sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes; + + /* See if space is available in any existing pool */ + if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + prev_hdr_ptr = NULL; + hdr_ptr = mem->small_list[pool_id]; + while (hdr_ptr != NULL) { + if (hdr_ptr->hdr.bytes_left >= sizeofobject) + break; /* found pool with enough space */ + prev_hdr_ptr = hdr_ptr; + hdr_ptr = hdr_ptr->hdr.next; + } + + /* Time to make a new pool? */ + if (hdr_ptr == NULL) { + /* min_request is what we need now, slop is what will be leftover */ + min_request = sizeofobject + SIZEOF(small_pool_hdr); + if (prev_hdr_ptr == NULL) /* first pool in class? */ + slop = first_pool_slop[pool_id]; + else + slop = extra_pool_slop[pool_id]; + /* Don't ask for more than MAX_ALLOC_CHUNK */ + if (slop > (size_t) MAX_ALLOC_CHUNK - min_request) + slop = (size_t) MAX_ALLOC_CHUNK - min_request; + /* Try to get space, if fail reduce slop and try again */ + for (;;) { + hdr_ptr = (small_pool_ptr) jpeg_get_small(cinfo, min_request + slop); + if (hdr_ptr != NULL) + break; + slop /= 2; + if (slop < MIN_SLOP) /* give up when it gets real small */ + out_of_memory(cinfo, 2); /* jpeg_get_small failed */ + } + mem->total_space_allocated += min_request + slop; + /* Success, initialize the new pool header and add to end of list */ + hdr_ptr->hdr.next = NULL; + hdr_ptr->hdr.bytes_used = 0; + hdr_ptr->hdr.bytes_left = sizeofobject + slop; + if (prev_hdr_ptr == NULL) /* first pool in class? */ + mem->small_list[pool_id] = hdr_ptr; + else + prev_hdr_ptr->hdr.next = hdr_ptr; + } + + /* OK, allocate the object from the current pool */ + data_ptr = (char *) (hdr_ptr + 1); /* point to first data byte in pool */ + data_ptr += hdr_ptr->hdr.bytes_used; /* point to place for object */ + hdr_ptr->hdr.bytes_used += sizeofobject; + hdr_ptr->hdr.bytes_left -= sizeofobject; + + return (void *) data_ptr; +} + + +/* + * Allocation of "large" objects. + * + * The external semantics of these are the same as "small" objects, + * except that FAR pointers are used on 80x86. However the pool + * management heuristics are quite different. We assume that each + * request is large enough that it may as well be passed directly to + * jpeg_get_large; the pool management just links everything together + * so that we can free it all on demand. + * Note: the major use of "large" objects is in JSAMPARRAY and JBLOCKARRAY + * structures. The routines that create these structures (see below) + * deliberately bunch rows together to ensure a large request size. + */ + +METHODDEF(void FAR *) +alloc_large (j_common_ptr cinfo, int pool_id, size_t sizeofobject) +/* Allocate a "large" object */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + large_pool_ptr hdr_ptr; + size_t odd_bytes; + + /* Check for unsatisfiable request (do now to ensure no overflow below) */ + if (sizeofobject > (size_t) MAX_ALLOC_CHUNK - SIZEOF(large_pool_hdr)) + out_of_memory(cinfo, 3); /* request exceeds malloc's ability */ + + /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */ + odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE); + if (odd_bytes > 0) + sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes; + + /* Always make a new pool */ + if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + + hdr_ptr = (large_pool_ptr) jpeg_get_large(cinfo, sizeofobject + + SIZEOF(large_pool_hdr)); + if (hdr_ptr == NULL) + out_of_memory(cinfo, 4); /* jpeg_get_large failed */ + mem->total_space_allocated += sizeofobject + SIZEOF(large_pool_hdr); + + /* Success, initialize the new pool header and add to list */ + hdr_ptr->hdr.next = mem->large_list[pool_id]; + /* We maintain space counts in each pool header for statistical purposes, + * even though they are not needed for allocation. + */ + hdr_ptr->hdr.bytes_used = sizeofobject; + hdr_ptr->hdr.bytes_left = 0; + mem->large_list[pool_id] = hdr_ptr; + + return (void FAR *) (hdr_ptr + 1); /* point to first data byte in pool */ +} + + +/* + * Creation of 2-D sample arrays. + * The pointers are in near heap, the samples themselves in FAR heap. + * + * To minimize allocation overhead and to allow I/O of large contiguous + * blocks, we allocate the sample rows in groups of as many rows as possible + * without exceeding MAX_ALLOC_CHUNK total bytes per allocation request. + * NB: the virtual array control routines, later in this file, know about + * this chunking of rows. The rowsperchunk value is left in the mem manager + * object so that it can be saved away if this sarray is the workspace for + * a virtual array. + */ + +METHODDEF(JSAMPARRAY) +alloc_sarray (j_common_ptr cinfo, int pool_id, + JDIMENSION samplesperrow, JDIMENSION numrows) +/* Allocate a 2-D sample array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + JSAMPARRAY result; + JSAMPROW workspace; + JDIMENSION rowsperchunk, currow, i; + long ltemp; + + /* Calculate max # of rows allowed in one allocation chunk */ + ltemp = (MAX_ALLOC_CHUNK - SIZEOF(large_pool_hdr)) / + ((long) samplesperrow * SIZEOF(JSAMPLE)); + if (ltemp <= 0) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + if (ltemp < (long) numrows) + rowsperchunk = (JDIMENSION) ltemp; + else + rowsperchunk = numrows; + mem->last_rowsperchunk = rowsperchunk; + + /* Get space for row pointers (small object) */ + result = (JSAMPARRAY) alloc_small(cinfo, pool_id, + (size_t) numrows * SIZEOF(JSAMPROW)); + + /* Get the rows themselves (large objects) */ + currow = 0; + while (currow < numrows) { + rowsperchunk = MIN(rowsperchunk, numrows - currow); + workspace = (JSAMPROW) alloc_large(cinfo, pool_id, + (size_t) rowsperchunk * (size_t) samplesperrow * SIZEOF(JSAMPLE)); + for (i = rowsperchunk; i > 0; i--) { + result[currow++] = workspace; + workspace += samplesperrow; + } + } + + return result; +} + + +/* + * Creation of 2-D coefficient-block arrays. + * This is essentially the same as the code for sample arrays, above. + */ + +METHODDEF(JBLOCKARRAY) +alloc_barray (j_common_ptr cinfo, int pool_id, + JDIMENSION blocksperrow, JDIMENSION numrows) +/* Allocate a 2-D coefficient-block array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + JBLOCKARRAY result; + JBLOCKROW workspace; + JDIMENSION rowsperchunk, currow, i; + long ltemp; + + /* Calculate max # of rows allowed in one allocation chunk */ + ltemp = (MAX_ALLOC_CHUNK - SIZEOF(large_pool_hdr)) / + ((long) blocksperrow * SIZEOF(JBLOCK)); + if (ltemp <= 0) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + if (ltemp < (long) numrows) + rowsperchunk = (JDIMENSION) ltemp; + else + rowsperchunk = numrows; + mem->last_rowsperchunk = rowsperchunk; + + /* Get space for row pointers (small object) */ + result = (JBLOCKARRAY) alloc_small(cinfo, pool_id, + (size_t) numrows * SIZEOF(JBLOCKROW)); + + /* Get the rows themselves (large objects) */ + currow = 0; + while (currow < numrows) { + rowsperchunk = MIN(rowsperchunk, numrows - currow); + workspace = (JBLOCKROW) alloc_large(cinfo, pool_id, + (size_t) rowsperchunk * (size_t) blocksperrow * SIZEOF(JBLOCK)); + for (i = rowsperchunk; i > 0; i--) { + result[currow++] = workspace; + workspace += blocksperrow; + } + } + + return result; +} + + +/* + * About virtual array management: + * + * The above "normal" array routines are only used to allocate strip buffers + * (as wide as the image, but just a few rows high). Full-image-sized buffers + * are handled as "virtual" arrays. The array is still accessed a strip at a + * time, but the memory manager must save the whole array for repeated + * accesses. The intended implementation is that there is a strip buffer in + * memory (as high as is possible given the desired memory limit), plus a + * backing file that holds the rest of the array. + * + * The request_virt_array routines are told the total size of the image and + * the maximum number of rows that will be accessed at once. The in-memory + * buffer must be at least as large as the maxaccess value. + * + * The request routines create control blocks but not the in-memory buffers. + * That is postponed until realize_virt_arrays is called. At that time the + * total amount of space needed is known (approximately, anyway), so free + * memory can be divided up fairly. + * + * The access_virt_array routines are responsible for making a specific strip + * area accessible (after reading or writing the backing file, if necessary). + * Note that the access routines are told whether the caller intends to modify + * the accessed strip; during a read-only pass this saves having to rewrite + * data to disk. The access routines are also responsible for pre-zeroing + * any newly accessed rows, if pre-zeroing was requested. + * + * In current usage, the access requests are usually for nonoverlapping + * strips; that is, successive access start_row numbers differ by exactly + * num_rows = maxaccess. This means we can get good performance with simple + * buffer dump/reload logic, by making the in-memory buffer be a multiple + * of the access height; then there will never be accesses across bufferload + * boundaries. The code will still work with overlapping access requests, + * but it doesn't handle bufferload overlaps very efficiently. + */ + + +METHODDEF(jvirt_sarray_ptr) +request_virt_sarray (j_common_ptr cinfo, int pool_id, boolean pre_zero, + JDIMENSION samplesperrow, JDIMENSION numrows, + JDIMENSION maxaccess) +/* Request a virtual 2-D sample array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + jvirt_sarray_ptr result; + + /* Only IMAGE-lifetime virtual arrays are currently supported */ + if (pool_id != JPOOL_IMAGE) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + + /* get control block */ + result = (jvirt_sarray_ptr) alloc_small(cinfo, pool_id, + SIZEOF(struct jvirt_sarray_control)); + + result->mem_buffer = NULL; /* marks array not yet realized */ + result->rows_in_array = numrows; + result->samplesperrow = samplesperrow; + result->maxaccess = maxaccess; + result->pre_zero = pre_zero; + result->b_s_open = FALSE; /* no associated backing-store object */ + result->next = mem->virt_sarray_list; /* add to list of virtual arrays */ + mem->virt_sarray_list = result; + + return result; +} + + +METHODDEF(jvirt_barray_ptr) +request_virt_barray (j_common_ptr cinfo, int pool_id, boolean pre_zero, + JDIMENSION blocksperrow, JDIMENSION numrows, + JDIMENSION maxaccess) +/* Request a virtual 2-D coefficient-block array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + jvirt_barray_ptr result; + + /* Only IMAGE-lifetime virtual arrays are currently supported */ + if (pool_id != JPOOL_IMAGE) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + + /* get control block */ + result = (jvirt_barray_ptr) alloc_small(cinfo, pool_id, + SIZEOF(struct jvirt_barray_control)); + + result->mem_buffer = NULL; /* marks array not yet realized */ + result->rows_in_array = numrows; + result->blocksperrow = blocksperrow; + result->maxaccess = maxaccess; + result->pre_zero = pre_zero; + result->b_s_open = FALSE; /* no associated backing-store object */ + result->next = mem->virt_barray_list; /* add to list of virtual arrays */ + mem->virt_barray_list = result; + + return result; +} + + +METHODDEF(void) +realize_virt_arrays (j_common_ptr cinfo) +/* Allocate the in-memory buffers for any unrealized virtual arrays */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + long bytesperrow, space_per_minheight, maximum_space; + long avail_mem, minheights, max_minheights; + jvirt_sarray_ptr sptr; + jvirt_barray_ptr bptr; + + /* Compute the minimum space needed (maxaccess rows in each buffer) + * and the maximum space needed (full image height in each buffer). + * These may be of use to the system-dependent jpeg_mem_available routine. + */ + space_per_minheight = 0; + maximum_space = 0; + for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { + if (sptr->mem_buffer == NULL) { /* if not realized yet */ + bytesperrow = (long) sptr->samplesperrow * SIZEOF(JSAMPLE); + space_per_minheight += (long) sptr->maxaccess * bytesperrow; + maximum_space += (long) sptr->rows_in_array * bytesperrow; + } + } + for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { + if (bptr->mem_buffer == NULL) { /* if not realized yet */ + bytesperrow = (long) bptr->blocksperrow * SIZEOF(JBLOCK); + space_per_minheight += (long) bptr->maxaccess * bytesperrow; + maximum_space += (long) bptr->rows_in_array * bytesperrow; + } + } + + if (space_per_minheight <= 0) + return; /* no unrealized arrays, no work */ + + /* Determine amount of memory to actually use; this is system-dependent. */ + avail_mem = jpeg_mem_available(cinfo, space_per_minheight, maximum_space, + (long) mem->total_space_allocated); + + /* If the maximum space needed is available, make all the buffers full + * height; otherwise parcel it out with the same number of minheights + * in each buffer. + */ + if (avail_mem >= maximum_space) + max_minheights = 1000000000L; + else { + max_minheights = avail_mem / space_per_minheight; + /* If there doesn't seem to be enough space, try to get the minimum + * anyway. This allows a "stub" implementation of jpeg_mem_available(). + */ + if (max_minheights <= 0) + max_minheights = 1; + } + + /* Allocate the in-memory buffers and initialize backing store as needed. */ + + for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { + if (sptr->mem_buffer == NULL) { /* if not realized yet */ + minheights = ((long) sptr->rows_in_array - 1L) / sptr->maxaccess + 1L; + if (minheights <= max_minheights) { + /* This buffer fits in memory */ + sptr->rows_in_mem = sptr->rows_in_array; + } else { + /* It doesn't fit in memory, create backing store. */ + sptr->rows_in_mem = (JDIMENSION) (max_minheights * sptr->maxaccess); + jpeg_open_backing_store(cinfo, & sptr->b_s_info, + (long) sptr->rows_in_array * + (long) sptr->samplesperrow * + (long) SIZEOF(JSAMPLE)); + sptr->b_s_open = TRUE; + } + sptr->mem_buffer = alloc_sarray(cinfo, JPOOL_IMAGE, + sptr->samplesperrow, sptr->rows_in_mem); + sptr->rowsperchunk = mem->last_rowsperchunk; + sptr->cur_start_row = 0; + sptr->first_undef_row = 0; + sptr->dirty = FALSE; + } + } + + for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { + if (bptr->mem_buffer == NULL) { /* if not realized yet */ + minheights = ((long) bptr->rows_in_array - 1L) / bptr->maxaccess + 1L; + if (minheights <= max_minheights) { + /* This buffer fits in memory */ + bptr->rows_in_mem = bptr->rows_in_array; + } else { + /* It doesn't fit in memory, create backing store. */ + bptr->rows_in_mem = (JDIMENSION) (max_minheights * bptr->maxaccess); + jpeg_open_backing_store(cinfo, & bptr->b_s_info, + (long) bptr->rows_in_array * + (long) bptr->blocksperrow * + (long) SIZEOF(JBLOCK)); + bptr->b_s_open = TRUE; + } + bptr->mem_buffer = alloc_barray(cinfo, JPOOL_IMAGE, + bptr->blocksperrow, bptr->rows_in_mem); + bptr->rowsperchunk = mem->last_rowsperchunk; + bptr->cur_start_row = 0; + bptr->first_undef_row = 0; + bptr->dirty = FALSE; + } + } +} + + +LOCAL(void) +do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, boolean writing) +/* Do backing store read or write of a virtual sample array */ +{ + long bytesperrow, file_offset, byte_count, rows, thisrow, i; + + bytesperrow = (long) ptr->samplesperrow * SIZEOF(JSAMPLE); + file_offset = (long) ptr->cur_start_row * bytesperrow; + /* Loop to read or write each allocation chunk in mem_buffer */ + for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) { + /* One chunk, but check for short chunk at end of buffer */ + rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i); + /* Transfer no more than is currently defined */ + thisrow = (long) ptr->cur_start_row + i; + rows = MIN(rows, (long) ptr->first_undef_row - thisrow); + /* Transfer no more than fits in file */ + rows = MIN(rows, (long) ptr->rows_in_array - thisrow); + if (rows <= 0) /* this chunk might be past end of file! */ + break; + byte_count = rows * bytesperrow; + if (writing) + (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + else + (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + file_offset += byte_count; + } +} + + +LOCAL(void) +do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, boolean writing) +/* Do backing store read or write of a virtual coefficient-block array */ +{ + long bytesperrow, file_offset, byte_count, rows, thisrow, i; + + bytesperrow = (long) ptr->blocksperrow * SIZEOF(JBLOCK); + file_offset = (long) ptr->cur_start_row * bytesperrow; + /* Loop to read or write each allocation chunk in mem_buffer */ + for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) { + /* One chunk, but check for short chunk at end of buffer */ + rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i); + /* Transfer no more than is currently defined */ + thisrow = (long) ptr->cur_start_row + i; + rows = MIN(rows, (long) ptr->first_undef_row - thisrow); + /* Transfer no more than fits in file */ + rows = MIN(rows, (long) ptr->rows_in_array - thisrow); + if (rows <= 0) /* this chunk might be past end of file! */ + break; + byte_count = rows * bytesperrow; + if (writing) + (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + else + (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + file_offset += byte_count; + } +} + + +METHODDEF(JSAMPARRAY) +access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr, + JDIMENSION start_row, JDIMENSION num_rows, + boolean writable) +/* Access the part of a virtual sample array starting at start_row */ +/* and extending for num_rows rows. writable is true if */ +/* caller intends to modify the accessed area. */ +{ + JDIMENSION end_row = start_row + num_rows; + JDIMENSION undef_row; + + /* debugging check */ + if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess || + ptr->mem_buffer == NULL) + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + + /* Make the desired part of the virtual array accessible */ + if (start_row < ptr->cur_start_row || + end_row > ptr->cur_start_row + ptr->rows_in_mem) { + if (! ptr->b_s_open) + ERREXIT(cinfo, JERR_VIRTUAL_BUG); + /* Flush old buffer contents if necessary */ + if (ptr->dirty) { + do_sarray_io(cinfo, ptr, TRUE); + ptr->dirty = FALSE; + } + /* Decide what part of virtual array to access. + * Algorithm: if target address > current window, assume forward scan, + * load starting at target address. If target address < current window, + * assume backward scan, load so that target area is top of window. + * Note that when switching from forward write to forward read, will have + * start_row = 0, so the limiting case applies and we load from 0 anyway. + */ + if (start_row > ptr->cur_start_row) { + ptr->cur_start_row = start_row; + } else { + /* use long arithmetic here to avoid overflow & unsigned problems */ + long ltemp; + + ltemp = (long) end_row - (long) ptr->rows_in_mem; + if (ltemp < 0) + ltemp = 0; /* don't fall off front end of file */ + ptr->cur_start_row = (JDIMENSION) ltemp; + } + /* Read in the selected part of the array. + * During the initial write pass, we will do no actual read + * because the selected part is all undefined. + */ + do_sarray_io(cinfo, ptr, FALSE); + } + /* Ensure the accessed part of the array is defined; prezero if needed. + * To improve locality of access, we only prezero the part of the array + * that the caller is about to access, not the entire in-memory array. + */ + if (ptr->first_undef_row < end_row) { + if (ptr->first_undef_row < start_row) { + if (writable) /* writer skipped over a section of array */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + undef_row = start_row; /* but reader is allowed to read ahead */ + } else { + undef_row = ptr->first_undef_row; + } + if (writable) + ptr->first_undef_row = end_row; + if (ptr->pre_zero) { + size_t bytesperrow = (size_t) ptr->samplesperrow * SIZEOF(JSAMPLE); + undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */ + end_row -= ptr->cur_start_row; + while (undef_row < end_row) { + FMEMZERO((void FAR *) ptr->mem_buffer[undef_row], bytesperrow); + undef_row++; + } + } else { + if (! writable) /* reader looking at undefined data */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + } + } + /* Flag the buffer dirty if caller will write in it */ + if (writable) + ptr->dirty = TRUE; + /* Return address of proper part of the buffer */ + return ptr->mem_buffer + (start_row - ptr->cur_start_row); +} + + +METHODDEF(JBLOCKARRAY) +access_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr, + JDIMENSION start_row, JDIMENSION num_rows, + boolean writable) +/* Access the part of a virtual block array starting at start_row */ +/* and extending for num_rows rows. writable is true if */ +/* caller intends to modify the accessed area. */ +{ + JDIMENSION end_row = start_row + num_rows; + JDIMENSION undef_row; + + /* debugging check */ + if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess || + ptr->mem_buffer == NULL) + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + + /* Make the desired part of the virtual array accessible */ + if (start_row < ptr->cur_start_row || + end_row > ptr->cur_start_row + ptr->rows_in_mem) { + if (! ptr->b_s_open) + ERREXIT(cinfo, JERR_VIRTUAL_BUG); + /* Flush old buffer contents if necessary */ + if (ptr->dirty) { + do_barray_io(cinfo, ptr, TRUE); + ptr->dirty = FALSE; + } + /* Decide what part of virtual array to access. + * Algorithm: if target address > current window, assume forward scan, + * load starting at target address. If target address < current window, + * assume backward scan, load so that target area is top of window. + * Note that when switching from forward write to forward read, will have + * start_row = 0, so the limiting case applies and we load from 0 anyway. + */ + if (start_row > ptr->cur_start_row) { + ptr->cur_start_row = start_row; + } else { + /* use long arithmetic here to avoid overflow & unsigned problems */ + long ltemp; + + ltemp = (long) end_row - (long) ptr->rows_in_mem; + if (ltemp < 0) + ltemp = 0; /* don't fall off front end of file */ + ptr->cur_start_row = (JDIMENSION) ltemp; + } + /* Read in the selected part of the array. + * During the initial write pass, we will do no actual read + * because the selected part is all undefined. + */ + do_barray_io(cinfo, ptr, FALSE); + } + /* Ensure the accessed part of the array is defined; prezero if needed. + * To improve locality of access, we only prezero the part of the array + * that the caller is about to access, not the entire in-memory array. + */ + if (ptr->first_undef_row < end_row) { + if (ptr->first_undef_row < start_row) { + if (writable) /* writer skipped over a section of array */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + undef_row = start_row; /* but reader is allowed to read ahead */ + } else { + undef_row = ptr->first_undef_row; + } + if (writable) + ptr->first_undef_row = end_row; + if (ptr->pre_zero) { + size_t bytesperrow = (size_t) ptr->blocksperrow * SIZEOF(JBLOCK); + undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */ + end_row -= ptr->cur_start_row; + while (undef_row < end_row) { + FMEMZERO((void FAR *) ptr->mem_buffer[undef_row], bytesperrow); + undef_row++; + } + } else { + if (! writable) /* reader looking at undefined data */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + } + } + /* Flag the buffer dirty if caller will write in it */ + if (writable) + ptr->dirty = TRUE; + /* Return address of proper part of the buffer */ + return ptr->mem_buffer + (start_row - ptr->cur_start_row); +} + + +/* + * Release all objects belonging to a specified pool. + */ + +METHODDEF(void) +free_pool (j_common_ptr cinfo, int pool_id) +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + small_pool_ptr shdr_ptr; + large_pool_ptr lhdr_ptr; + size_t space_freed; + + if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + +#ifdef MEM_STATS + if (cinfo->err->trace_level > 1) + print_mem_stats(cinfo, pool_id); /* print pool's memory usage statistics */ +#endif + + /* If freeing IMAGE pool, close any virtual arrays first */ + if (pool_id == JPOOL_IMAGE) { + jvirt_sarray_ptr sptr; + jvirt_barray_ptr bptr; + + for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { + if (sptr->b_s_open) { /* there may be no backing store */ + sptr->b_s_open = FALSE; /* prevent recursive close if error */ + (*sptr->b_s_info.close_backing_store) (cinfo, & sptr->b_s_info); + } + } + mem->virt_sarray_list = NULL; + for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { + if (bptr->b_s_open) { /* there may be no backing store */ + bptr->b_s_open = FALSE; /* prevent recursive close if error */ + (*bptr->b_s_info.close_backing_store) (cinfo, & bptr->b_s_info); + } + } + mem->virt_barray_list = NULL; + } + + /* Release large objects */ + lhdr_ptr = mem->large_list[pool_id]; + mem->large_list[pool_id] = NULL; + + while (lhdr_ptr != NULL) { + large_pool_ptr next_lhdr_ptr = lhdr_ptr->hdr.next; + space_freed = lhdr_ptr->hdr.bytes_used + + lhdr_ptr->hdr.bytes_left + + SIZEOF(large_pool_hdr); + jpeg_free_large(cinfo, (void FAR *) lhdr_ptr, space_freed); + mem->total_space_allocated -= space_freed; + lhdr_ptr = next_lhdr_ptr; + } + + /* Release small objects */ + shdr_ptr = mem->small_list[pool_id]; + mem->small_list[pool_id] = NULL; + + while (shdr_ptr != NULL) { + small_pool_ptr next_shdr_ptr = shdr_ptr->hdr.next; + space_freed = shdr_ptr->hdr.bytes_used + + shdr_ptr->hdr.bytes_left + + SIZEOF(small_pool_hdr); + jpeg_free_small(cinfo, (void *) shdr_ptr, space_freed); + mem->total_space_allocated -= space_freed; + shdr_ptr = next_shdr_ptr; + } +} + + +/* + * Close up shop entirely. + * Note that this cannot be called unless cinfo->mem is non-NULL. + */ + +METHODDEF(void) +self_destruct (j_common_ptr cinfo) +{ + int pool; + + /* Close all backing store, release all memory. + * Releasing pools in reverse order might help avoid fragmentation + * with some (brain-damaged) malloc libraries. + */ + for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) { + free_pool(cinfo, pool); + } + + /* Release the memory manager control block too. */ + jpeg_free_small(cinfo, (void *) cinfo->mem, SIZEOF(my_memory_mgr)); + cinfo->mem = NULL; /* ensures I will be called only once */ + + jpeg_mem_term(cinfo); /* system-dependent cleanup */ +} + + +/* + * Memory manager initialization. + * When this is called, only the error manager pointer is valid in cinfo! + */ + +GLOBAL(void) +jinit_memory_mgr (j_common_ptr cinfo) +{ + my_mem_ptr mem; + long max_to_use; + int pool; + size_t test_mac; + + cinfo->mem = NULL; /* for safety if init fails */ + + /* Check for configuration errors. + * SIZEOF(ALIGN_TYPE) should be a power of 2; otherwise, it probably + * doesn't reflect any real hardware alignment requirement. + * The test is a little tricky: for X>0, X and X-1 have no one-bits + * in common if and only if X is a power of 2, ie has only one one-bit. + * Some compilers may give an "unreachable code" warning here; ignore it. + */ + if ((SIZEOF(ALIGN_TYPE) & (SIZEOF(ALIGN_TYPE)-1)) != 0) + ERREXIT(cinfo, JERR_BAD_ALIGN_TYPE); + /* MAX_ALLOC_CHUNK must be representable as type size_t, and must be + * a multiple of SIZEOF(ALIGN_TYPE). + * Again, an "unreachable code" warning may be ignored here. + * But a "constant too large" warning means you need to fix MAX_ALLOC_CHUNK. + */ + test_mac = (size_t) MAX_ALLOC_CHUNK; + if ((long) test_mac != MAX_ALLOC_CHUNK || + (MAX_ALLOC_CHUNK % SIZEOF(ALIGN_TYPE)) != 0) + ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); + + max_to_use = jpeg_mem_init(cinfo); /* system-dependent initialization */ + + /* Attempt to allocate memory manager's control block */ + mem = (my_mem_ptr) jpeg_get_small(cinfo, SIZEOF(my_memory_mgr)); + + if (mem == NULL) { + jpeg_mem_term(cinfo); /* system-dependent cleanup */ + ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 0); + } + + /* OK, fill in the method pointers */ + mem->pub.alloc_small = alloc_small; + mem->pub.alloc_large = alloc_large; + mem->pub.alloc_sarray = alloc_sarray; + mem->pub.alloc_barray = alloc_barray; + mem->pub.request_virt_sarray = request_virt_sarray; + mem->pub.request_virt_barray = request_virt_barray; + mem->pub.realize_virt_arrays = realize_virt_arrays; + mem->pub.access_virt_sarray = access_virt_sarray; + mem->pub.access_virt_barray = access_virt_barray; + mem->pub.free_pool = free_pool; + mem->pub.self_destruct = self_destruct; + + /* Make MAX_ALLOC_CHUNK accessible to other modules */ + mem->pub.max_alloc_chunk = MAX_ALLOC_CHUNK; + + /* Initialize working state */ + mem->pub.max_memory_to_use = max_to_use; + + for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) { + mem->small_list[pool] = NULL; + mem->large_list[pool] = NULL; + } + mem->virt_sarray_list = NULL; + mem->virt_barray_list = NULL; + + mem->total_space_allocated = SIZEOF(my_memory_mgr); + + /* Declare ourselves open for business */ + cinfo->mem = &mem->pub; + + /* Check for an environment variable JPEGMEM; if found, override the + * default max_memory setting from jpeg_mem_init. Note that the + * surrounding application may again override this value. + * If your system doesn't support getenv(), define NO_GETENV to disable + * this feature. + */ +#ifndef NO_GETENV + { char * memenv; + + if ((memenv = getenv("JPEGMEM")) != NULL) { + char ch = 'x'; + + if (sscanf(memenv, "%ld%c", &max_to_use, &ch) > 0) { + if (ch == 'm' || ch == 'M') + max_to_use *= 1000L; + mem->pub.max_memory_to_use = max_to_use * 1000L; + } + } + } +#endif + +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jmemnobs.c b/widget/milsko/milskosrc/external/libjpeg/src/jmemnobs.c new file mode 100644 index 0000000000..a364cd8223 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jmemnobs.c @@ -0,0 +1,113 @@ +/* + * jmemnobs.c + * + * Copyright (C) 1992-1996, Thomas G. Lane. + * Modified 2019 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides a really simple implementation of the system- + * dependent portion of the JPEG memory manager. This implementation + * assumes that no backing-store files are needed: all required space + * can be obtained from malloc(). + * This is very portable in the sense that it'll compile on almost anything, + * but you'd better have lots of main memory (or virtual memory) if you want + * to process big images. + * Note that the max_memory_to_use option is respected by this implementation. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ +extern void * malloc JPP((size_t size)); +extern void free JPP((void *ptr)); +#endif + + +/* + * Memory allocation and freeing are controlled by the regular library + * routines malloc() and free(). + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * "Large" objects are treated the same as "small" ones. + * NB: although we include FAR keywords in the routine declarations, + * this file won't actually work in 80x86 small/medium model; at least, + * you probably won't be able to process useful-size images in only 64KB. + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * This routine computes the total memory space available for allocation. + */ + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + if (cinfo->mem->max_memory_to_use) + return cinfo->mem->max_memory_to_use - already_allocated; + + /* Here we say, "we got all you want bud!" */ + return max_bytes_needed; +} + + +/* + * Backing store (temporary file) management. + * Since jpeg_mem_available always promised the moon, + * this should never be called and we can just error out. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + ERREXIT(cinfo, JERR_NO_BACKING_STORE); +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. Here, there isn't any. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + return 0; /* just set max_memory_to_use to 0 */ +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* no work */ +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jquant1.c b/widget/milsko/milskosrc/external/libjpeg/src/jquant1.c new file mode 100644 index 0000000000..60b1843e73 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jquant1.c @@ -0,0 +1,851 @@ +/* + * jquant1.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * Modified 2011-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains 1-pass color quantization (color mapping) routines. + * These routines provide mapping to a fixed color map using equally spaced + * color values. Optional Floyd-Steinberg or ordered dithering is available. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +#ifdef QUANT_1PASS_SUPPORTED + + +/* + * The main purpose of 1-pass quantization is to provide a fast, if not very + * high quality, colormapped output capability. A 2-pass quantizer usually + * gives better visual quality; however, for quantized grayscale output this + * quantizer is perfectly adequate. Dithering is highly recommended with this + * quantizer, though you can turn it off if you really want to. + * + * In 1-pass quantization the colormap must be chosen in advance of seeing the + * image. We use a map consisting of all combinations of Ncolors[i] color + * values for the i'th component. The Ncolors[] values are chosen so that + * their product, the total number of colors, is no more than that requested. + * (In most cases, the product will be somewhat less.) + * + * Since the colormap is orthogonal, the representative value for each color + * component can be determined without considering the other components; + * then these indexes can be combined into a colormap index by a standard + * N-dimensional-array-subscript calculation. Most of the arithmetic involved + * can be precalculated and stored in the lookup table colorindex[]. + * colorindex[i][j] maps pixel value j in component i to the nearest + * representative value (grid plane) for that component; this index is + * multiplied by the array stride for component i, so that the + * index of the colormap entry closest to a given pixel value is just + * sum( colorindex[component-number][pixel-component-value] ) + * Aside from being fast, this scheme allows for variable spacing between + * representative values with no additional lookup cost. + * + * If gamma correction has been applied in color conversion, it might be wise + * to adjust the color grid spacing so that the representative colors are + * equidistant in linear space. At this writing, gamma correction is not + * implemented by jdcolor, so nothing is done here. + */ + + +/* Declarations for ordered dithering. + * + * We use a standard 16x16 ordered dither array. The basic concept of ordered + * dithering is described in many references, for instance Dale Schumacher's + * chapter II.2 of Graphics Gems II (James Arvo, ed. Academic Press, 1991). + * In place of Schumacher's comparisons against a "threshold" value, we add a + * "dither" value to the input pixel and then round the result to the nearest + * output value. The dither value is equivalent to (0.5 - threshold) times + * the distance between output values. For ordered dithering, we assume that + * the output colors are equally spaced; if not, results will probably be + * worse, since the dither may be too much or too little at a given point. + * + * The normal calculation would be to form pixel value + dither, range-limit + * this to 0..MAXJSAMPLE, and then index into the colorindex table as usual. + * We can skip the separate range-limiting step by extending the colorindex + * table in both directions. + */ + +#define ODITHER_SIZE 16 /* dimension of dither matrix */ +/* NB: if ODITHER_SIZE is not a power of 2, ODITHER_MASK uses will break */ +#define ODITHER_CELLS (ODITHER_SIZE*ODITHER_SIZE) /* # cells in matrix */ +#define ODITHER_MASK (ODITHER_SIZE-1) /* mask for wrapping around counters */ + +typedef int ODITHER_MATRIX[ODITHER_SIZE][ODITHER_SIZE]; +typedef int (*ODITHER_MATRIX_PTR)[ODITHER_SIZE]; + +static const UINT8 base_dither_matrix[ODITHER_SIZE][ODITHER_SIZE] = { + /* Bayer's order-4 dither array. Generated by the code given in + * Stephen Hawley's article "Ordered Dithering" in Graphics Gems I. + * The values in this array must range from 0 to ODITHER_CELLS-1. + */ + { 0,192, 48,240, 12,204, 60,252, 3,195, 51,243, 15,207, 63,255 }, + { 128, 64,176,112,140, 76,188,124,131, 67,179,115,143, 79,191,127 }, + { 32,224, 16,208, 44,236, 28,220, 35,227, 19,211, 47,239, 31,223 }, + { 160, 96,144, 80,172,108,156, 92,163, 99,147, 83,175,111,159, 95 }, + { 8,200, 56,248, 4,196, 52,244, 11,203, 59,251, 7,199, 55,247 }, + { 136, 72,184,120,132, 68,180,116,139, 75,187,123,135, 71,183,119 }, + { 40,232, 24,216, 36,228, 20,212, 43,235, 27,219, 39,231, 23,215 }, + { 168,104,152, 88,164,100,148, 84,171,107,155, 91,167,103,151, 87 }, + { 2,194, 50,242, 14,206, 62,254, 1,193, 49,241, 13,205, 61,253 }, + { 130, 66,178,114,142, 78,190,126,129, 65,177,113,141, 77,189,125 }, + { 34,226, 18,210, 46,238, 30,222, 33,225, 17,209, 45,237, 29,221 }, + { 162, 98,146, 82,174,110,158, 94,161, 97,145, 81,173,109,157, 93 }, + { 10,202, 58,250, 6,198, 54,246, 9,201, 57,249, 5,197, 53,245 }, + { 138, 74,186,122,134, 70,182,118,137, 73,185,121,133, 69,181,117 }, + { 42,234, 26,218, 38,230, 22,214, 41,233, 25,217, 37,229, 21,213 }, + { 170,106,154, 90,166,102,150, 86,169,105,153, 89,165,101,149, 85 } +}; + + +/* Declarations for Floyd-Steinberg dithering. + * + * Errors are accumulated into the array fserrors[], at a resolution of + * 1/16th of a pixel count. The error at a given pixel is propagated + * to its not-yet-processed neighbors using the standard F-S fractions, + * ... (here) 7/16 + * 3/16 5/16 1/16 + * We work left-to-right on even rows, right-to-left on odd rows. + * + * We can get away with a single array (holding one row's worth of errors) + * by using it to store the current row's errors at pixel columns not yet + * processed, but the next row's errors at columns already processed. We + * need only a few extra variables to hold the errors immediately around the + * current column. (If we are lucky, those variables are in registers, but + * even if not, they're probably cheaper to access than array elements are.) + * + * The fserrors[] array is indexed [component#][position]. + * We provide (#columns + 2) entries per component; the extra entry at each + * end saves us from special-casing the first and last pixels. + * + * Note: on a wide image, we might not have enough room in a PC's near data + * segment to hold the error array; so it is allocated with alloc_large. + */ + +#if BITS_IN_JSAMPLE == 8 +typedef INT16 FSERROR; /* 16 bits should be enough */ +typedef int LOCFSERROR; /* use 'int' for calculation temps */ +#else +typedef INT32 FSERROR; /* may need more than 16 bits */ +typedef INT32 LOCFSERROR; /* be sure calculation temps are big enough */ +#endif + +typedef FSERROR FAR *FSERRPTR; /* pointer to error array (in FAR storage!) */ + + +/* Private subobject */ + +#define MAX_Q_COMPS 4 /* max components I can handle */ + +typedef struct { + struct jpeg_color_quantizer pub; /* public fields */ + + /* Initially allocated colormap is saved here */ + JSAMPARRAY sv_colormap; /* The color map as a 2-D pixel array */ + int sv_actual; /* number of entries in use */ + + JSAMPARRAY colorindex; /* Precomputed mapping for speed */ + /* colorindex[i][j] = index of color closest to pixel value j in component i, + * premultiplied as described above. Since colormap indexes must fit into + * JSAMPLEs, the entries of this array will too. + */ + boolean is_padded; /* is the colorindex padded for odither? */ + + int Ncolors[MAX_Q_COMPS]; /* # of values alloced to each component */ + + /* Variables for ordered dithering */ + int row_index; /* cur row's vertical index in dither matrix */ + ODITHER_MATRIX_PTR odither[MAX_Q_COMPS]; /* one dither array per component */ + + /* Variables for Floyd-Steinberg dithering */ + FSERRPTR fserrors[MAX_Q_COMPS]; /* accumulated errors */ + boolean on_odd_row; /* flag to remember which row we are on */ +} my_cquantizer; + +typedef my_cquantizer * my_cquantize_ptr; + + +/* + * Policy-making subroutines for create_colormap and create_colorindex. + * These routines determine the colormap to be used. The rest of the module + * only assumes that the colormap is orthogonal. + * + * * select_ncolors decides how to divvy up the available colors + * among the components. + * * output_value defines the set of representative values for a component. + * * largest_input_value defines the mapping from input values to + * representative values for a component. + * Note that the latter two routines may impose different policies for + * different components, though this is not currently done. + */ + + +LOCAL(int) +select_ncolors (j_decompress_ptr cinfo, int Ncolors[]) +/* Determine allocation of desired colors to components, */ +/* and fill in Ncolors[] array to indicate choice. */ +/* Return value is total number of colors (product of Ncolors[] values). */ +{ + int nc = cinfo->out_color_components; /* number of color components */ + int max_colors = cinfo->desired_number_of_colors; + int total_colors, iroot, i, j; + boolean changed; + long temp; + static const int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE }; + + /* We can allocate at least the nc'th root of max_colors per component. */ + /* Compute floor(nc'th root of max_colors). */ + iroot = 1; + do { + iroot++; + temp = iroot; /* set temp = iroot ** nc */ + for (i = 1; i < nc; i++) + temp *= iroot; + } while (temp <= (long) max_colors); /* repeat till iroot exceeds root */ + iroot--; /* now iroot = floor(root) */ + + /* Must have at least 2 color values per component */ + if (iroot < 2) + ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, (int) temp); + + /* Initialize to iroot color values for each component */ + total_colors = 1; + for (i = 0; i < nc; i++) { + Ncolors[i] = iroot; + total_colors *= iroot; + } + /* We may be able to increment the count for one or more components without + * exceeding max_colors, though we know not all can be incremented. + * Sometimes, the first component can be incremented more than once! + * (Example: for 16 colors, we start at 2*2*2, go to 3*2*2, then 4*2*2.) + * In RGB colorspace, try to increment G first, then R, then B. + */ + do { + changed = FALSE; + for (i = 0; i < nc; i++) { + j = (cinfo->out_color_space == JCS_RGB ? RGB_order[i] : i); + /* calculate new total_colors if Ncolors[j] is incremented */ + temp = total_colors / Ncolors[j]; + temp *= Ncolors[j]+1; /* done in long arith to avoid oflo */ + if (temp > (long) max_colors) + break; /* won't fit, done with this pass */ + Ncolors[j]++; /* OK, apply the increment */ + total_colors = (int) temp; + changed = TRUE; + } + } while (changed); + + return total_colors; +} + + +LOCAL(int) +output_value (j_decompress_ptr cinfo, int ci, int j, int maxj) +/* Return j'th output value, where j will range from 0 to maxj */ +/* The output values must fall in 0..MAXJSAMPLE in increasing order */ +{ + /* We always provide values 0 and MAXJSAMPLE for each component; + * any additional values are equally spaced between these limits. + * (Forcing the upper and lower values to the limits ensures that + * dithering can't produce a color outside the selected gamut.) + */ + return (int) (((INT32) j * MAXJSAMPLE + maxj/2) / maxj); +} + + +LOCAL(int) +largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj) +/* Return largest input value that should map to j'th output value */ +/* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */ +{ + /* Breakpoints are halfway between values returned by output_value */ + return (int) (((INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj)); +} + + +/* + * Create the colormap. + */ + +LOCAL(void) +create_colormap (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + JSAMPARRAY colormap; /* Created colormap */ + int total_colors; /* Number of distinct output colors */ + int i,j,k, nci, blksize, blkdist, ptr, val; + + /* Select number of colors for each component */ + total_colors = select_ncolors(cinfo, cquantize->Ncolors); + + /* Report selected color counts */ + if (cinfo->out_color_components == 3) + TRACEMS4(cinfo, 1, JTRC_QUANT_3_NCOLORS, + total_colors, cquantize->Ncolors[0], + cquantize->Ncolors[1], cquantize->Ncolors[2]); + else + TRACEMS1(cinfo, 1, JTRC_QUANT_NCOLORS, total_colors); + + /* Allocate and fill in the colormap. */ + /* The colors are ordered in the map in standard row-major order, */ + /* i.e. rightmost (highest-indexed) color changes most rapidly. */ + + colormap = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) total_colors, (JDIMENSION) cinfo->out_color_components); + + /* blksize is number of adjacent repeated entries for a component */ + /* blkdist is distance between groups of identical entries for a component */ + blkdist = total_colors; + + for (i = 0; i < cinfo->out_color_components; i++) { + /* fill in colormap entries for i'th color component */ + nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ + blksize = blkdist / nci; + for (j = 0; j < nci; j++) { + /* Compute j'th output value (out of nci) for component */ + val = output_value(cinfo, i, j, nci-1); + /* Fill in all colormap entries that have this value of this component */ + for (ptr = j * blksize; ptr < total_colors; ptr += blkdist) { + /* fill in blksize entries beginning at ptr */ + for (k = 0; k < blksize; k++) + colormap[i][ptr+k] = (JSAMPLE) val; + } + } + blkdist = blksize; /* blksize of this color is blkdist of next */ + } + + /* Save the colormap in private storage, + * where it will survive color quantization mode changes. + */ + cquantize->sv_colormap = colormap; + cquantize->sv_actual = total_colors; +} + + +/* + * Create the color index table. + */ + +LOCAL(void) +create_colorindex (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + JSAMPROW indexptr; + int i,j,k, nci, blksize, val, pad; + + /* For ordered dither, we pad the color index tables by MAXJSAMPLE in + * each direction (input index values can be -MAXJSAMPLE .. 2*MAXJSAMPLE). + * This is not necessary in the other dithering modes. However, we + * flag whether it was done in case user changes dithering mode. + */ + if (cinfo->dither_mode == JDITHER_ORDERED) { + pad = MAXJSAMPLE*2; + cquantize->is_padded = TRUE; + } else { + pad = 0; + cquantize->is_padded = FALSE; + } + + cquantize->colorindex = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (MAXJSAMPLE+1 + pad), + (JDIMENSION) cinfo->out_color_components); + + /* blksize is number of adjacent repeated entries for a component */ + blksize = cquantize->sv_actual; + + for (i = 0; i < cinfo->out_color_components; i++) { + /* fill in colorindex entries for i'th color component */ + nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ + blksize = blksize / nci; + + /* adjust colorindex pointers to provide padding at negative indexes. */ + if (pad) + cquantize->colorindex[i] += MAXJSAMPLE; + + /* in loop, val = index of current output value, */ + /* and k = largest j that maps to current val */ + indexptr = cquantize->colorindex[i]; + val = 0; + k = largest_input_value(cinfo, i, 0, nci-1); + for (j = 0; j <= MAXJSAMPLE; j++) { + while (j > k) /* advance val if past boundary */ + k = largest_input_value(cinfo, i, ++val, nci-1); + /* premultiply so that no multiplication needed in main processing */ + indexptr[j] = (JSAMPLE) (val * blksize); + } + /* Pad at both ends if necessary */ + if (pad) + for (j = 1; j <= MAXJSAMPLE; j++) { + indexptr[-j] = indexptr[0]; + indexptr[MAXJSAMPLE+j] = indexptr[MAXJSAMPLE]; + } + } +} + + +/* + * Create an ordered-dither array for a component having ncolors + * distinct output values. + */ + +LOCAL(ODITHER_MATRIX_PTR) +make_odither_array (j_decompress_ptr cinfo, int ncolors) +{ + ODITHER_MATRIX_PTR odither; + int j,k; + INT32 num,den; + + odither = (ODITHER_MATRIX_PTR) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(ODITHER_MATRIX)); + /* The inter-value distance for this color is MAXJSAMPLE/(ncolors-1). + * Hence the dither value for the matrix cell with fill order f + * (f=0..N-1) should be (N-1-2*f)/(2*N) * MAXJSAMPLE/(ncolors-1). + * On 16-bit-int machine, be careful to avoid overflow. + */ + den = 2 * ODITHER_CELLS * ((INT32) (ncolors - 1)); + for (j = 0; j < ODITHER_SIZE; j++) { + for (k = 0; k < ODITHER_SIZE; k++) { + num = ((INT32) (ODITHER_CELLS-1 - 2*((int)base_dither_matrix[j][k]))) + * MAXJSAMPLE; + /* Ensure round towards zero despite C's lack of consistency + * about rounding negative values in integer division... + */ + odither[j][k] = (int) (num<0 ? -((-num)/den) : num/den); + } + } + return odither; +} + + +/* + * Create the ordered-dither tables. + * Components having the same number of representative colors may + * share a dither table. + */ + +LOCAL(void) +create_odither_tables (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + ODITHER_MATRIX_PTR odither; + int i, j, nci; + + for (i = 0; i < cinfo->out_color_components; i++) { + nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ + odither = NULL; /* search for matching prior component */ + for (j = 0; j < i; j++) { + if (nci == cquantize->Ncolors[j]) { + odither = cquantize->odither[j]; + break; + } + } + if (odither == NULL) /* need a new table? */ + odither = make_odither_array(cinfo, nci); + cquantize->odither[i] = odither; + } +} + + +/* + * Map some rows of pixels to the output colormapped representation. + */ + +METHODDEF(void) +color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* General case, no dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + JSAMPARRAY colorindex = cquantize->colorindex; + register int pixcode, ci; + register JSAMPROW ptrin, ptrout; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + register int nc = cinfo->out_color_components; + + for (row = 0; row < num_rows; row++) { + ptrin = input_buf[row]; + ptrout = output_buf[row]; + for (col = width; col > 0; col--) { + pixcode = 0; + for (ci = 0; ci < nc; ci++) { + pixcode += GETJSAMPLE(colorindex[ci][GETJSAMPLE(*ptrin++)]); + } + *ptrout++ = (JSAMPLE) pixcode; + } + } +} + + +METHODDEF(void) +color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* Fast path for out_color_components==3, no dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register int pixcode; + register JSAMPROW ptrin, ptrout; + JSAMPROW colorindex0 = cquantize->colorindex[0]; + JSAMPROW colorindex1 = cquantize->colorindex[1]; + JSAMPROW colorindex2 = cquantize->colorindex[2]; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + ptrin = input_buf[row]; + ptrout = output_buf[row]; + for (col = width; col > 0; col--) { + pixcode = GETJSAMPLE(colorindex0[GETJSAMPLE(*ptrin++)]); + pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*ptrin++)]); + pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*ptrin++)]); + *ptrout++ = (JSAMPLE) pixcode; + } + } +} + + +METHODDEF(void) +quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* General case, with ordered dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register JSAMPROW input_ptr; + register JSAMPROW output_ptr; + JSAMPROW colorindex_ci; + int * dither; /* points to active row of dither matrix */ + int row_index, col_index; /* current indexes into dither matrix */ + int nc = cinfo->out_color_components; + int ci; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + /* Initialize output values to 0 so can process components separately */ + FMEMZERO((void FAR *) output_buf[row], (size_t) width * SIZEOF(JSAMPLE)); + row_index = cquantize->row_index; + for (ci = 0; ci < nc; ci++) { + input_ptr = input_buf[row] + ci; + output_ptr = output_buf[row]; + colorindex_ci = cquantize->colorindex[ci]; + dither = cquantize->odither[ci][row_index]; + col_index = 0; + + for (col = width; col > 0; col--) { + /* Form pixel value + dither, range-limit to 0..MAXJSAMPLE, + * select output value, accumulate into output code for this pixel. + * Range-limiting need not be done explicitly, as we have extended + * the colorindex table to produce the right answers for out-of-range + * inputs. The maximum dither is +- MAXJSAMPLE; this sets the + * required amount of padding. + */ + *output_ptr += colorindex_ci[GETJSAMPLE(*input_ptr)+dither[col_index]]; + input_ptr += nc; + output_ptr++; + col_index = (col_index + 1) & ODITHER_MASK; + } + } + /* Advance row index for next row */ + row_index = (row_index + 1) & ODITHER_MASK; + cquantize->row_index = row_index; + } +} + + +METHODDEF(void) +quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* Fast path for out_color_components==3, with ordered dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register int pixcode; + register JSAMPROW input_ptr; + register JSAMPROW output_ptr; + JSAMPROW colorindex0 = cquantize->colorindex[0]; + JSAMPROW colorindex1 = cquantize->colorindex[1]; + JSAMPROW colorindex2 = cquantize->colorindex[2]; + int * dither0; /* points to active row of dither matrix */ + int * dither1; + int * dither2; + int row_index, col_index; /* current indexes into dither matrix */ + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + row_index = cquantize->row_index; + input_ptr = input_buf[row]; + output_ptr = output_buf[row]; + dither0 = cquantize->odither[0][row_index]; + dither1 = cquantize->odither[1][row_index]; + dither2 = cquantize->odither[2][row_index]; + col_index = 0; + + for (col = width; col > 0; col--) { + pixcode = GETJSAMPLE(colorindex0[GETJSAMPLE(*input_ptr++) + + dither0[col_index]]); + pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*input_ptr++) + + dither1[col_index]]); + pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*input_ptr++) + + dither2[col_index]]); + *output_ptr++ = (JSAMPLE) pixcode; + col_index = (col_index + 1) & ODITHER_MASK; + } + row_index = (row_index + 1) & ODITHER_MASK; + cquantize->row_index = row_index; + } +} + + +METHODDEF(void) +quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* General case, with Floyd-Steinberg dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register LOCFSERROR cur; /* current error or pixel value */ + LOCFSERROR belowerr; /* error for pixel below cur */ + LOCFSERROR bpreverr; /* error for below/prev col */ + LOCFSERROR bnexterr; /* error for below/next col */ + LOCFSERROR delta; + register FSERRPTR errorptr; /* => fserrors[] at column before current */ + register JSAMPROW input_ptr; + register JSAMPROW output_ptr; + JSAMPROW colorindex_ci; + JSAMPROW colormap_ci; + int pixcode; + int nc = cinfo->out_color_components; + int dir; /* 1 for left-to-right, -1 for right-to-left */ + int dirnc; /* dir * nc */ + int ci; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + JSAMPLE *range_limit = cinfo->sample_range_limit; + SHIFT_TEMPS + + for (row = 0; row < num_rows; row++) { + /* Initialize output values to 0 so can process components separately */ + FMEMZERO((void FAR *) output_buf[row], (size_t) width * SIZEOF(JSAMPLE)); + for (ci = 0; ci < nc; ci++) { + input_ptr = input_buf[row] + ci; + output_ptr = output_buf[row]; + if (cquantize->on_odd_row) { + /* work right to left in this row */ + input_ptr += (width-1) * nc; /* so point to rightmost pixel */ + output_ptr += width-1; + dir = -1; + dirnc = -nc; + errorptr = cquantize->fserrors[ci] + (width+1); /* => entry after last column */ + } else { + /* work left to right in this row */ + dir = 1; + dirnc = nc; + errorptr = cquantize->fserrors[ci]; /* => entry before first column */ + } + colorindex_ci = cquantize->colorindex[ci]; + colormap_ci = cquantize->sv_colormap[ci]; + /* Preset error values: no error propagated to first pixel from left */ + cur = 0; + /* and no error propagated to row below yet */ + belowerr = bpreverr = 0; + + for (col = width; col > 0; col--) { + /* cur holds the error propagated from the previous pixel on the + * current line. Add the error propagated from the previous line + * to form the complete error correction term for this pixel, and + * round the error term (which is expressed * 16) to an integer. + * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct + * for either sign of the error value. + * Note: errorptr points to *previous* column's array entry. + */ + cur = RIGHT_SHIFT(cur + errorptr[dir] + 8, 4); + /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE. + * The maximum error is +- MAXJSAMPLE; this sets the required size + * of the range_limit array. + */ + cur += GETJSAMPLE(*input_ptr); + cur = GETJSAMPLE(range_limit[cur]); + /* Select output value, accumulate into output code for this pixel */ + pixcode = GETJSAMPLE(colorindex_ci[cur]); + *output_ptr += (JSAMPLE) pixcode; + /* Compute actual representation error at this pixel */ + /* Note: we can do this even though we don't have the final */ + /* pixel code, because the colormap is orthogonal. */ + cur -= GETJSAMPLE(colormap_ci[pixcode]); + /* Compute error fractions to be propagated to adjacent pixels. + * Add these into the running sums, and simultaneously shift the + * next-line error sums left by 1 column. + */ + bnexterr = cur; + delta = cur * 2; + cur += delta; /* form error * 3 */ + errorptr[0] = (FSERROR) (bpreverr + cur); + cur += delta; /* form error * 5 */ + bpreverr = belowerr + cur; + belowerr = bnexterr; + cur += delta; /* form error * 7 */ + /* At this point cur contains the 7/16 error value to be propagated + * to the next pixel on the current line, and all the errors for the + * next line have been shifted over. We are therefore ready to move on. + */ + input_ptr += dirnc; /* advance input ptr to next column */ + output_ptr += dir; /* advance output ptr to next column */ + errorptr += dir; /* advance errorptr to current column */ + } + /* Post-loop cleanup: we must unload the final error value into the + * final fserrors[] entry. Note we need not unload belowerr because + * it is for the dummy column before or after the actual array. + */ + errorptr[0] = (FSERROR) bpreverr; /* unload prev err into array */ + } + cquantize->on_odd_row = (cquantize->on_odd_row ? FALSE : TRUE); + } +} + + +/* + * Allocate workspace for Floyd-Steinberg errors. + */ + +LOCAL(void) +alloc_fs_workspace (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + size_t arraysize; + int i; + + arraysize = ((size_t) cinfo->output_width + (size_t) 2) * SIZEOF(FSERROR); + for (i = 0; i < cinfo->out_color_components; i++) { + cquantize->fserrors[i] = (FSERRPTR) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize); + } +} + + +/* + * Initialize for one-pass color quantization. + */ + +METHODDEF(void) +start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + size_t arraysize; + int i; + + /* Install my colormap. */ + cinfo->colormap = cquantize->sv_colormap; + cinfo->actual_number_of_colors = cquantize->sv_actual; + + /* Initialize for desired dithering mode. */ + switch (cinfo->dither_mode) { + case JDITHER_NONE: + if (cinfo->out_color_components == 3) + cquantize->pub.color_quantize = color_quantize3; + else + cquantize->pub.color_quantize = color_quantize; + break; + case JDITHER_ORDERED: + if (cinfo->out_color_components == 3) + cquantize->pub.color_quantize = quantize3_ord_dither; + else + cquantize->pub.color_quantize = quantize_ord_dither; + cquantize->row_index = 0; /* initialize state for ordered dither */ + /* If user changed to ordered dither from another mode, + * we must recreate the color index table with padding. + * This will cost extra space, but probably isn't very likely. + */ + if (! cquantize->is_padded) + create_colorindex(cinfo); + /* Create ordered-dither tables if we didn't already. */ + if (cquantize->odither[0] == NULL) + create_odither_tables(cinfo); + break; + case JDITHER_FS: + cquantize->pub.color_quantize = quantize_fs_dither; + cquantize->on_odd_row = FALSE; /* initialize state for F-S dither */ + /* Allocate Floyd-Steinberg workspace if didn't already. */ + if (cquantize->fserrors[0] == NULL) + alloc_fs_workspace(cinfo); + /* Initialize the propagated errors to zero. */ + arraysize = ((size_t) cinfo->output_width + (size_t) 2) * SIZEOF(FSERROR); + for (i = 0; i < cinfo->out_color_components; i++) + FMEMZERO((void FAR *) cquantize->fserrors[i], arraysize); + break; + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + } +} + + +/* + * Finish up at the end of the pass. + */ + +METHODDEF(void) +finish_pass_1_quant (j_decompress_ptr cinfo) +{ + /* no work in 1-pass case */ +} + + +/* + * Switch to a new external colormap between output passes. + * Shouldn't get to this module! + */ + +METHODDEF(void) +new_color_map_1_quant (j_decompress_ptr cinfo) +{ + ERREXIT(cinfo, JERR_MODE_CHANGE); +} + + +/* + * Module initialization routine for 1-pass color quantization. + */ + +GLOBAL(void) +jinit_1pass_quantizer (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize; + + cquantize = (my_cquantize_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_cquantizer)); + cinfo->cquantize = &cquantize->pub; + cquantize->pub.start_pass = start_pass_1_quant; + cquantize->pub.finish_pass = finish_pass_1_quant; + cquantize->pub.new_color_map = new_color_map_1_quant; + cquantize->fserrors[0] = NULL; /* Flag FS workspace not allocated */ + cquantize->odither[0] = NULL; /* Also flag odither arrays not allocated */ + + /* Make sure my internal arrays won't overflow */ + if (cinfo->out_color_components > MAX_Q_COMPS) + ERREXIT1(cinfo, JERR_QUANT_COMPONENTS, MAX_Q_COMPS); + /* Make sure colormap indexes can be represented by JSAMPLEs */ + if (cinfo->desired_number_of_colors > (MAXJSAMPLE+1)) + ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXJSAMPLE+1); + + /* Create the colormap and color index table. */ + create_colormap(cinfo); + create_colorindex(cinfo); + + /* Allocate Floyd-Steinberg workspace now if requested. + * We do this now since it is FAR storage and may affect the memory + * manager's space calculations. If the user changes to FS dither + * mode in a later pass, we will allocate the space then, and will + * possibly overrun the max_memory_to_use setting. + */ + if (cinfo->dither_mode == JDITHER_FS) + alloc_fs_workspace(cinfo); +} + +#endif /* QUANT_1PASS_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jquant2.c b/widget/milsko/milskosrc/external/libjpeg/src/jquant2.c new file mode 100644 index 0000000000..662b9bcef3 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jquant2.c @@ -0,0 +1,1311 @@ +/* + * jquant2.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * Modified 2011-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains 2-pass color quantization (color mapping) routines. + * These routines provide selection of a custom color map for an image, + * followed by mapping of the image to that color map, with optional + * Floyd-Steinberg dithering. + * It is also possible to use just the second pass to map to an arbitrary + * externally-given color map. + * + * Note: ordered dithering is not supported, since there isn't any fast + * way to compute intercolor distances; it's unclear that ordered dither's + * fundamental assumptions even hold with an irregularly spaced color map. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +#ifdef QUANT_2PASS_SUPPORTED + + +/* + * This module implements the well-known Heckbert paradigm for color + * quantization. Most of the ideas used here can be traced back to + * Heckbert's seminal paper + * Heckbert, Paul. "Color Image Quantization for Frame Buffer Display", + * Proc. SIGGRAPH '82, Computer Graphics v.16 #3 (July 1982), pp 297-304. + * + * In the first pass over the image, we accumulate a histogram showing the + * usage count of each possible color. To keep the histogram to a reasonable + * size, we reduce the precision of the input; typical practice is to retain + * 5 or 6 bits per color, so that 8 or 4 different input values are counted + * in the same histogram cell. + * + * Next, the color-selection step begins with a box representing the whole + * color space, and repeatedly splits the "largest" remaining box until we + * have as many boxes as desired colors. Then the mean color in each + * remaining box becomes one of the possible output colors. + * + * The second pass over the image maps each input pixel to the closest output + * color (optionally after applying a Floyd-Steinberg dithering correction). + * This mapping is logically trivial, but making it go fast enough requires + * considerable care. + * + * Heckbert-style quantizers vary a good deal in their policies for choosing + * the "largest" box and deciding where to cut it. The particular policies + * used here have proved out well in experimental comparisons, but better ones + * may yet be found. + * + * In earlier versions of the IJG code, this module quantized in YCbCr color + * space, processing the raw upsampled data without a color conversion step. + * This allowed the color conversion math to be done only once per colormap + * entry, not once per pixel. However, that optimization precluded other + * useful optimizations (such as merging color conversion with upsampling) + * and it also interfered with desired capabilities such as quantizing to an + * externally-supplied colormap. We have therefore abandoned that approach. + * The present code works in the post-conversion color space, typically RGB. + * + * To improve the visual quality of the results, we actually work in scaled + * RGB space, giving G distances more weight than R, and R in turn more than + * B. To do everything in integer math, we must use integer scale factors. + * The 2/3/1 scale factors used here correspond loosely to the relative + * weights of the colors in the NTSC grayscale equation. + * If you want to use this code to quantize a non-RGB color space, you'll + * probably need to change these scale factors. + */ + +#define R_SCALE 2 /* scale R distances by this much */ +#define G_SCALE 3 /* scale G distances by this much */ +#define B_SCALE 1 /* and B by this much */ + +/* Relabel R/G/B as components 0/1/2, respecting the RGB ordering defined + * in jmorecfg.h. As the code stands, it will do the right thing for R,G,B + * and B,G,R orders. If you define some other weird order in jmorecfg.h, + * you'll get compile errors until you extend this logic. In that case + * you'll probably want to tweak the histogram sizes too. + */ + +#if RGB_RED == 0 +#define C0_SCALE R_SCALE +#endif +#if RGB_BLUE == 0 +#define C0_SCALE B_SCALE +#endif +#if RGB_GREEN == 1 +#define C1_SCALE G_SCALE +#endif +#if RGB_RED == 2 +#define C2_SCALE R_SCALE +#endif +#if RGB_BLUE == 2 +#define C2_SCALE B_SCALE +#endif + + +/* + * First we have the histogram data structure and routines for creating it. + * + * The number of bits of precision can be adjusted by changing these symbols. + * We recommend keeping 6 bits for G and 5 each for R and B. + * If you have plenty of memory and cycles, 6 bits all around gives marginally + * better results; if you are short of memory, 5 bits all around will save + * some space but degrade the results. + * To maintain a fully accurate histogram, we'd need to allocate a "long" + * (preferably unsigned long) for each cell. In practice this is overkill; + * we can get by with 16 bits per cell. Few of the cell counts will overflow, + * and clamping those that do overflow to the maximum value will give close- + * enough results. This reduces the recommended histogram size from 256Kb + * to 128Kb, which is a useful savings on PC-class machines. + * (In the second pass the histogram space is re-used for pixel mapping data; + * in that capacity, each cell must be able to store zero to the number of + * desired colors. 16 bits/cell is plenty for that too.) + * Since the JPEG code is intended to run in small memory model on 80x86 + * machines, we can't just allocate the histogram in one chunk. Instead + * of a true 3-D array, we use a row of pointers to 2-D arrays. Each + * pointer corresponds to a C0 value (typically 2^5 = 32 pointers) and + * each 2-D array has 2^6*2^5 = 2048 or 2^6*2^6 = 4096 entries. Note that + * on 80x86 machines, the pointer row is in near memory but the actual + * arrays are in far memory (same arrangement as we use for image arrays). + */ + +#define MAXNUMCOLORS (MAXJSAMPLE+1) /* maximum size of colormap */ + +/* These will do the right thing for either R,G,B or B,G,R color order, + * but you may not like the results for other color orders. + */ +#define HIST_C0_BITS 5 /* bits of precision in R/B histogram */ +#define HIST_C1_BITS 6 /* bits of precision in G histogram */ +#define HIST_C2_BITS 5 /* bits of precision in B/R histogram */ + +/* Number of elements along histogram axes. */ +#define HIST_C0_ELEMS (1<cquantize; + register JSAMPROW ptr; + register histptr histp; + register hist3d histogram = cquantize->histogram; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + ptr = input_buf[row]; + for (col = width; col > 0; col--) { + /* get pixel value and index into the histogram */ + histp = & histogram[GETJSAMPLE(ptr[0]) >> C0_SHIFT] + [GETJSAMPLE(ptr[1]) >> C1_SHIFT] + [GETJSAMPLE(ptr[2]) >> C2_SHIFT]; + /* increment, check for overflow and undo increment if so. */ + if (++(*histp) <= 0) + (*histp)--; + ptr += 3; + } + } +} + + +/* + * Next we have the really interesting routines: selection of a colormap + * given the completed histogram. + * These routines work with a list of "boxes", each representing a rectangular + * subset of the input color space (to histogram precision). + */ + +typedef struct { + /* The bounds of the box (inclusive); expressed as histogram indexes */ + int c0min, c0max; + int c1min, c1max; + int c2min, c2max; + /* The volume (actually 2-norm) of the box */ + INT32 volume; + /* The number of nonzero histogram cells within this box */ + long colorcount; +} box; + +typedef box * boxptr; + + +LOCAL(boxptr) +find_biggest_color_pop (boxptr boxlist, int numboxes) +/* Find the splittable box with the largest color population */ +/* Returns NULL if no splittable boxes remain */ +{ + register boxptr boxp; + register int i; + register long maxc = 0; + boxptr which = NULL; + + for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { + if (boxp->colorcount > maxc && boxp->volume > 0) { + which = boxp; + maxc = boxp->colorcount; + } + } + return which; +} + + +LOCAL(boxptr) +find_biggest_volume (boxptr boxlist, int numboxes) +/* Find the splittable box with the largest (scaled) volume */ +/* Returns NULL if no splittable boxes remain */ +{ + register boxptr boxp; + register int i; + register INT32 maxv = 0; + boxptr which = NULL; + + for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { + if (boxp->volume > maxv) { + which = boxp; + maxv = boxp->volume; + } + } + return which; +} + + +LOCAL(void) +update_box (j_decompress_ptr cinfo, boxptr boxp) +/* Shrink the min/max bounds of a box to enclose only nonzero elements, */ +/* and recompute its volume and population */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + histptr histp; + int c0,c1,c2; + int c0min,c0max,c1min,c1max,c2min,c2max; + INT32 dist0,dist1,dist2; + long ccount; + + c0min = boxp->c0min; c0max = boxp->c0max; + c1min = boxp->c1min; c1max = boxp->c1max; + c2min = boxp->c2min; c2max = boxp->c2max; + + if (c0max > c0min) + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c0min = c0min = c0; + goto have_c0min; + } + } + have_c0min: + if (c0max > c0min) + for (c0 = c0max; c0 >= c0min; c0--) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c0max = c0max = c0; + goto have_c0max; + } + } + have_c0max: + if (c1max > c1min) + for (c1 = c1min; c1 <= c1max; c1++) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c1min = c1min = c1; + goto have_c1min; + } + } + have_c1min: + if (c1max > c1min) + for (c1 = c1max; c1 >= c1min; c1--) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c1max = c1max = c1; + goto have_c1max; + } + } + have_c1max: + if (c2max > c2min) + for (c2 = c2min; c2 <= c2max; c2++) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1min][c2]; + for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) + if (*histp != 0) { + boxp->c2min = c2min = c2; + goto have_c2min; + } + } + have_c2min: + if (c2max > c2min) + for (c2 = c2max; c2 >= c2min; c2--) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1min][c2]; + for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) + if (*histp != 0) { + boxp->c2max = c2max = c2; + goto have_c2max; + } + } + have_c2max: + + /* Update box volume. + * We use 2-norm rather than real volume here; this biases the method + * against making long narrow boxes, and it has the side benefit that + * a box is splittable iff norm > 0. + * Since the differences are expressed in histogram-cell units, + * we have to shift back to JSAMPLE units to get consistent distances; + * after which, we scale according to the selected distance scale factors. + */ + dist0 = ((c0max - c0min) << C0_SHIFT) * C0_SCALE; + dist1 = ((c1max - c1min) << C1_SHIFT) * C1_SCALE; + dist2 = ((c2max - c2min) << C2_SHIFT) * C2_SCALE; + boxp->volume = dist0*dist0 + dist1*dist1 + dist2*dist2; + + /* Now scan remaining volume of box and compute population */ + ccount = 0; + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++, histp++) + if (*histp != 0) { + ccount++; + } + } + boxp->colorcount = ccount; +} + + +LOCAL(int) +median_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes, + int desired_colors) +/* Repeatedly select and split the largest box until we have enough boxes */ +{ + int n,lb; + int c0,c1,c2,cmax; + register boxptr b1,b2; + + while (numboxes < desired_colors) { + /* Select box to split. + * Current algorithm: by population for first half, then by volume. + */ + if (numboxes*2 <= desired_colors) { + b1 = find_biggest_color_pop(boxlist, numboxes); + } else { + b1 = find_biggest_volume(boxlist, numboxes); + } + if (b1 == NULL) /* no splittable boxes left! */ + break; + b2 = &boxlist[numboxes]; /* where new box will go */ + /* Copy the color bounds to the new box. */ + b2->c0max = b1->c0max; b2->c1max = b1->c1max; b2->c2max = b1->c2max; + b2->c0min = b1->c0min; b2->c1min = b1->c1min; b2->c2min = b1->c2min; + /* Choose which axis to split the box on. + * Current algorithm: longest scaled axis. + * See notes in update_box about scaling distances. + */ + c0 = ((b1->c0max - b1->c0min) << C0_SHIFT) * C0_SCALE; + c1 = ((b1->c1max - b1->c1min) << C1_SHIFT) * C1_SCALE; + c2 = ((b1->c2max - b1->c2min) << C2_SHIFT) * C2_SCALE; + /* We want to break any ties in favor of green, then red, blue last. + * This code does the right thing for R,G,B or B,G,R color orders only. + */ +#if RGB_RED == 0 + cmax = c1; n = 1; + if (c0 > cmax) { cmax = c0; n = 0; } + if (c2 > cmax) { n = 2; } +#else + cmax = c1; n = 1; + if (c2 > cmax) { cmax = c2; n = 2; } + if (c0 > cmax) { n = 0; } +#endif + /* Choose split point along selected axis, and update box bounds. + * Current algorithm: split at halfway point. + * (Since the box has been shrunk to minimum volume, + * any split will produce two nonempty subboxes.) + * Note that lb value is max for lower box, so must be < old max. + */ + switch (n) { + case 0: + lb = (b1->c0max + b1->c0min) / 2; + b1->c0max = lb; + b2->c0min = lb+1; + break; + case 1: + lb = (b1->c1max + b1->c1min) / 2; + b1->c1max = lb; + b2->c1min = lb+1; + break; + case 2: + lb = (b1->c2max + b1->c2min) / 2; + b1->c2max = lb; + b2->c2min = lb+1; + break; + } + /* Update stats for boxes */ + update_box(cinfo, b1); + update_box(cinfo, b2); + numboxes++; + } + return numboxes; +} + + +LOCAL(void) +compute_color (j_decompress_ptr cinfo, boxptr boxp, int icolor) +/* Compute representative color for a box, put it in colormap[icolor] */ +{ + /* Current algorithm: mean weighted by pixels (not colors) */ + /* Note it is important to get the rounding correct! */ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + histptr histp; + int c0,c1,c2; + int c0min,c0max,c1min,c1max,c2min,c2max; + long count; + long total = 0; + long c0total = 0; + long c1total = 0; + long c2total = 0; + + c0min = boxp->c0min; c0max = boxp->c0max; + c1min = boxp->c1min; c1max = boxp->c1max; + c2min = boxp->c2min; c2max = boxp->c2max; + + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) { + if ((count = *histp++) != 0) { + total += count; + c0total += ((c0 << C0_SHIFT) + ((1<>1)) * count; + c1total += ((c1 << C1_SHIFT) + ((1<>1)) * count; + c2total += ((c2 << C2_SHIFT) + ((1<>1)) * count; + } + } + } + + cinfo->colormap[0][icolor] = (JSAMPLE) ((c0total + (total>>1)) / total); + cinfo->colormap[1][icolor] = (JSAMPLE) ((c1total + (total>>1)) / total); + cinfo->colormap[2][icolor] = (JSAMPLE) ((c2total + (total>>1)) / total); +} + + +LOCAL(void) +select_colors (j_decompress_ptr cinfo, int desired_colors) +/* Master routine for color selection */ +{ + boxptr boxlist; + int numboxes; + int i; + + /* Allocate workspace for box list */ + boxlist = (boxptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, desired_colors * SIZEOF(box)); + /* Initialize one box containing whole space */ + numboxes = 1; + boxlist[0].c0min = 0; + boxlist[0].c0max = MAXJSAMPLE >> C0_SHIFT; + boxlist[0].c1min = 0; + boxlist[0].c1max = MAXJSAMPLE >> C1_SHIFT; + boxlist[0].c2min = 0; + boxlist[0].c2max = MAXJSAMPLE >> C2_SHIFT; + /* Shrink it to actually-used volume and set its statistics */ + update_box(cinfo, & boxlist[0]); + /* Perform median-cut to produce final box list */ + numboxes = median_cut(cinfo, boxlist, numboxes, desired_colors); + /* Compute the representative color for each box, fill colormap */ + for (i = 0; i < numboxes; i++) + compute_color(cinfo, & boxlist[i], i); + cinfo->actual_number_of_colors = numboxes; + TRACEMS1(cinfo, 1, JTRC_QUANT_SELECTED, numboxes); +} + + +/* + * These routines are concerned with the time-critical task of mapping input + * colors to the nearest color in the selected colormap. + * + * We re-use the histogram space as an "inverse color map", essentially a + * cache for the results of nearest-color searches. All colors within a + * histogram cell will be mapped to the same colormap entry, namely the one + * closest to the cell's center. This may not be quite the closest entry to + * the actual input color, but it's almost as good. A zero in the cache + * indicates we haven't found the nearest color for that cell yet; the array + * is cleared to zeroes before starting the mapping pass. When we find the + * nearest color for a cell, its colormap index plus one is recorded in the + * cache for future use. The pass2 scanning routines call fill_inverse_cmap + * when they need to use an unfilled entry in the cache. + * + * Our method of efficiently finding nearest colors is based on the "locally + * sorted search" idea described by Heckbert and on the incremental distance + * calculation described by Spencer W. Thomas in chapter III.1 of Graphics + * Gems II (James Arvo, ed. Academic Press, 1991). Thomas points out that + * the distances from a given colormap entry to each cell of the histogram can + * be computed quickly using an incremental method: the differences between + * distances to adjacent cells themselves differ by a constant. This allows a + * fairly fast implementation of the "brute force" approach of computing the + * distance from every colormap entry to every histogram cell. Unfortunately, + * it needs a work array to hold the best-distance-so-far for each histogram + * cell (because the inner loop has to be over cells, not colormap entries). + * The work array elements have to be INT32s, so the work array would need + * 256Kb at our recommended precision. This is not feasible in DOS machines. + * + * To get around these problems, we apply Thomas' method to compute the + * nearest colors for only the cells within a small subbox of the histogram. + * The work array need be only as big as the subbox, so the memory usage + * problem is solved. Furthermore, we need not fill subboxes that are never + * referenced in pass2; many images use only part of the color gamut, so a + * fair amount of work is saved. An additional advantage of this + * approach is that we can apply Heckbert's locality criterion to quickly + * eliminate colormap entries that are far away from the subbox; typically + * three-fourths of the colormap entries are rejected by Heckbert's criterion, + * and we need not compute their distances to individual cells in the subbox. + * The speed of this approach is heavily influenced by the subbox size: too + * small means too much overhead, too big loses because Heckbert's criterion + * can't eliminate as many colormap entries. Empirically the best subbox + * size seems to be about 1/512th of the histogram (1/8th in each direction). + * + * Thomas' article also describes a refined method which is asymptotically + * faster than the brute-force method, but it is also far more complex and + * cannot efficiently be applied to small subboxes. It is therefore not + * useful for programs intended to be portable to DOS machines. On machines + * with plenty of memory, filling the whole histogram in one shot with Thomas' + * refined method might be faster than the present code --- but then again, + * it might not be any faster, and it's certainly more complicated. + */ + + +/* log2(histogram cells in update box) for each axis; this can be adjusted */ +#define BOX_C0_LOG (HIST_C0_BITS-3) +#define BOX_C1_LOG (HIST_C1_BITS-3) +#define BOX_C2_LOG (HIST_C2_BITS-3) + +#define BOX_C0_ELEMS (1<actual_number_of_colors; + int maxc0, maxc1, maxc2; + int centerc0, centerc1, centerc2; + int i, x, ncolors; + INT32 minmaxdist, min_dist, max_dist, tdist; + INT32 mindist[MAXNUMCOLORS]; /* min distance to colormap entry i */ + + /* Compute true coordinates of update box's upper corner and center. + * Actually we compute the coordinates of the center of the upper-corner + * histogram cell, which are the upper bounds of the volume we care about. + * Note that since ">>" rounds down, the "center" values may be closer to + * min than to max; hence comparisons to them must be "<=", not "<". + */ + maxc0 = minc0 + ((1 << BOX_C0_SHIFT) - (1 << C0_SHIFT)); + centerc0 = (minc0 + maxc0) >> 1; + maxc1 = minc1 + ((1 << BOX_C1_SHIFT) - (1 << C1_SHIFT)); + centerc1 = (minc1 + maxc1) >> 1; + maxc2 = minc2 + ((1 << BOX_C2_SHIFT) - (1 << C2_SHIFT)); + centerc2 = (minc2 + maxc2) >> 1; + + /* For each color in colormap, find: + * 1. its minimum squared-distance to any point in the update box + * (zero if color is within update box); + * 2. its maximum squared-distance to any point in the update box. + * Both of these can be found by considering only the corners of the box. + * We save the minimum distance for each color in mindist[]; + * only the smallest maximum distance is of interest. + */ + minmaxdist = 0x7FFFFFFFL; + + for (i = 0; i < numcolors; i++) { + /* We compute the squared-c0-distance term, then add in the other two. */ + x = GETJSAMPLE(cinfo->colormap[0][i]); + if (x < minc0) { + tdist = (x - minc0) * C0_SCALE; + min_dist = tdist*tdist; + tdist = (x - maxc0) * C0_SCALE; + max_dist = tdist*tdist; + } else if (x > maxc0) { + tdist = (x - maxc0) * C0_SCALE; + min_dist = tdist*tdist; + tdist = (x - minc0) * C0_SCALE; + max_dist = tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + min_dist = 0; + if (x <= centerc0) { + tdist = (x - maxc0) * C0_SCALE; + max_dist = tdist*tdist; + } else { + tdist = (x - minc0) * C0_SCALE; + max_dist = tdist*tdist; + } + } + + x = GETJSAMPLE(cinfo->colormap[1][i]); + if (x < minc1) { + tdist = (x - minc1) * C1_SCALE; + min_dist += tdist*tdist; + tdist = (x - maxc1) * C1_SCALE; + max_dist += tdist*tdist; + } else if (x > maxc1) { + tdist = (x - maxc1) * C1_SCALE; + min_dist += tdist*tdist; + tdist = (x - minc1) * C1_SCALE; + max_dist += tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + if (x <= centerc1) { + tdist = (x - maxc1) * C1_SCALE; + max_dist += tdist*tdist; + } else { + tdist = (x - minc1) * C1_SCALE; + max_dist += tdist*tdist; + } + } + + x = GETJSAMPLE(cinfo->colormap[2][i]); + if (x < minc2) { + tdist = (x - minc2) * C2_SCALE; + min_dist += tdist*tdist; + tdist = (x - maxc2) * C2_SCALE; + max_dist += tdist*tdist; + } else if (x > maxc2) { + tdist = (x - maxc2) * C2_SCALE; + min_dist += tdist*tdist; + tdist = (x - minc2) * C2_SCALE; + max_dist += tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + if (x <= centerc2) { + tdist = (x - maxc2) * C2_SCALE; + max_dist += tdist*tdist; + } else { + tdist = (x - minc2) * C2_SCALE; + max_dist += tdist*tdist; + } + } + + mindist[i] = min_dist; /* save away the results */ + if (max_dist < minmaxdist) + minmaxdist = max_dist; + } + + /* Now we know that no cell in the update box is more than minmaxdist + * away from some colormap entry. Therefore, only colors that are + * within minmaxdist of some part of the box need be considered. + */ + ncolors = 0; + for (i = 0; i < numcolors; i++) { + if (mindist[i] <= minmaxdist) + colorlist[ncolors++] = (JSAMPLE) i; + } + return ncolors; +} + + +LOCAL(void) +find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2, + int numcolors, JSAMPLE colorlist[], JSAMPLE bestcolor[]) +/* Find the closest colormap entry for each cell in the update box, + * given the list of candidate colors prepared by find_nearby_colors. + * Return the indexes of the closest entries in the bestcolor[] array. + * This routine uses Thomas' incremental distance calculation method to + * find the distance from a colormap entry to successive cells in the box. + */ +{ + int ic0, ic1, ic2; + int i, icolor; + register INT32 * bptr; /* pointer into bestdist[] array */ + JSAMPLE * cptr; /* pointer into bestcolor[] array */ + INT32 dist0, dist1; /* initial distance values */ + register INT32 dist2; /* current distance in inner loop */ + INT32 xx0, xx1; /* distance increments */ + register INT32 xx2; + INT32 inc0, inc1, inc2; /* initial values for increments */ + /* This array holds the distance to the nearest-so-far color for each cell */ + INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; + + /* Initialize best-distance for each cell of the update box */ + bptr = bestdist; + for (i = BOX_C0_ELEMS*BOX_C1_ELEMS*BOX_C2_ELEMS-1; i >= 0; i--) + *bptr++ = 0x7FFFFFFFL; + + /* For each color selected by find_nearby_colors, + * compute its distance to the center of each cell in the box. + * If that's less than best-so-far, update best distance and color number. + */ + + /* Nominal steps between cell centers ("x" in Thomas article) */ +#define STEP_C0 ((1 << C0_SHIFT) * C0_SCALE) +#define STEP_C1 ((1 << C1_SHIFT) * C1_SCALE) +#define STEP_C2 ((1 << C2_SHIFT) * C2_SCALE) + + for (i = 0; i < numcolors; i++) { + icolor = GETJSAMPLE(colorlist[i]); + /* Compute (square of) distance from minc0/c1/c2 to this color */ + inc0 = (minc0 - GETJSAMPLE(cinfo->colormap[0][icolor])) * C0_SCALE; + dist0 = inc0*inc0; + inc1 = (minc1 - GETJSAMPLE(cinfo->colormap[1][icolor])) * C1_SCALE; + dist0 += inc1*inc1; + inc2 = (minc2 - GETJSAMPLE(cinfo->colormap[2][icolor])) * C2_SCALE; + dist0 += inc2*inc2; + /* Form the initial difference increments */ + inc0 = inc0 * (2 * STEP_C0) + STEP_C0 * STEP_C0; + inc1 = inc1 * (2 * STEP_C1) + STEP_C1 * STEP_C1; + inc2 = inc2 * (2 * STEP_C2) + STEP_C2 * STEP_C2; + /* Now loop over all cells in box, updating distance per Thomas method */ + bptr = bestdist; + cptr = bestcolor; + xx0 = inc0; + for (ic0 = BOX_C0_ELEMS-1; ic0 >= 0; ic0--) { + dist1 = dist0; + xx1 = inc1; + for (ic1 = BOX_C1_ELEMS-1; ic1 >= 0; ic1--) { + dist2 = dist1; + xx2 = inc2; + for (ic2 = BOX_C2_ELEMS-1; ic2 >= 0; ic2--) { + if (dist2 < *bptr) { + *bptr = dist2; + *cptr = (JSAMPLE) icolor; + } + dist2 += xx2; + xx2 += 2 * STEP_C2 * STEP_C2; + bptr++; + cptr++; + } + dist1 += xx1; + xx1 += 2 * STEP_C1 * STEP_C1; + } + dist0 += xx0; + xx0 += 2 * STEP_C0 * STEP_C0; + } + } +} + + +LOCAL(void) +fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2) +/* Fill the inverse-colormap entries in the update box that contains */ +/* histogram cell c0/c1/c2. (Only that one cell MUST be filled, but */ +/* we can fill as many others as we wish.) */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + int minc0, minc1, minc2; /* lower left corner of update box */ + int ic0, ic1, ic2; + register JSAMPLE * cptr; /* pointer into bestcolor[] array */ + register histptr cachep; /* pointer into main cache array */ + /* This array lists the candidate colormap indexes. */ + JSAMPLE colorlist[MAXNUMCOLORS]; + int numcolors; /* number of candidate colors */ + /* This array holds the actually closest colormap index for each cell. */ + JSAMPLE bestcolor[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; + + /* Convert cell coordinates to update box ID */ + c0 >>= BOX_C0_LOG; + c1 >>= BOX_C1_LOG; + c2 >>= BOX_C2_LOG; + + /* Compute true coordinates of update box's origin corner. + * Actually we compute the coordinates of the center of the corner + * histogram cell, which are the lower bounds of the volume we care about. + */ + minc0 = (c0 << BOX_C0_SHIFT) + ((1 << C0_SHIFT) >> 1); + minc1 = (c1 << BOX_C1_SHIFT) + ((1 << C1_SHIFT) >> 1); + minc2 = (c2 << BOX_C2_SHIFT) + ((1 << C2_SHIFT) >> 1); + + /* Determine which colormap entries are close enough to be candidates + * for the nearest entry to some cell in the update box. + */ + numcolors = find_nearby_colors(cinfo, minc0, minc1, minc2, colorlist); + + /* Determine the actually nearest colors. */ + find_best_colors(cinfo, minc0, minc1, minc2, numcolors, colorlist, + bestcolor); + + /* Save the best color numbers (plus 1) in the main cache array */ + c0 <<= BOX_C0_LOG; /* convert ID back to base cell indexes */ + c1 <<= BOX_C1_LOG; + c2 <<= BOX_C2_LOG; + cptr = bestcolor; + for (ic0 = 0; ic0 < BOX_C0_ELEMS; ic0++) { + for (ic1 = 0; ic1 < BOX_C1_ELEMS; ic1++) { + cachep = & histogram[c0+ic0][c1+ic1][c2]; + for (ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++) { + *cachep++ = (histcell) (GETJSAMPLE(*cptr++) + 1); + } + } + } +} + + +/* + * Map some rows of pixels to the output colormapped representation. + */ + +METHODDEF(void) +pass2_no_dither (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) +/* This version performs no dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + register JSAMPROW inptr, outptr; + register histptr cachep; + register int c0, c1, c2; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + inptr = input_buf[row]; + outptr = output_buf[row]; + for (col = width; col > 0; col--) { + /* get pixel value and index into the cache */ + c0 = GETJSAMPLE(*inptr++) >> C0_SHIFT; + c1 = GETJSAMPLE(*inptr++) >> C1_SHIFT; + c2 = GETJSAMPLE(*inptr++) >> C2_SHIFT; + cachep = & histogram[c0][c1][c2]; + /* If we have not seen this color before, find nearest colormap entry */ + /* and update the cache */ + if (*cachep == 0) + fill_inverse_cmap(cinfo, c0,c1,c2); + /* Now emit the colormap index for this cell */ + *outptr++ = (JSAMPLE) (*cachep - 1); + } + } +} + + +METHODDEF(void) +pass2_fs_dither (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) +/* This version performs Floyd-Steinberg dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + register LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */ + LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */ + LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */ + register FSERRPTR errorptr; /* => fserrors[] at column before current */ + JSAMPROW inptr; /* => current input pixel */ + JSAMPROW outptr; /* => current output pixel */ + histptr cachep; + int dir; /* +1 or -1 depending on direction */ + int dir3; /* 3*dir, for advancing inptr & errorptr */ + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + JSAMPLE *range_limit = cinfo->sample_range_limit; + int *error_limit = cquantize->error_limiter; + JSAMPROW colormap0 = cinfo->colormap[0]; + JSAMPROW colormap1 = cinfo->colormap[1]; + JSAMPROW colormap2 = cinfo->colormap[2]; + SHIFT_TEMPS + + for (row = 0; row < num_rows; row++) { + inptr = input_buf[row]; + outptr = output_buf[row]; + if (cquantize->on_odd_row) { + /* work right to left in this row */ + inptr += (width-1) * 3; /* so point to rightmost pixel */ + outptr += width-1; + dir = -1; + dir3 = -3; + errorptr = cquantize->fserrors + (width+1)*3; /* => entry after last column */ + cquantize->on_odd_row = FALSE; /* flip for next time */ + } else { + /* work left to right in this row */ + dir = 1; + dir3 = 3; + errorptr = cquantize->fserrors; /* => entry before first real column */ + cquantize->on_odd_row = TRUE; /* flip for next time */ + } + /* Preset error values: no error propagated to first pixel from left */ + cur0 = cur1 = cur2 = 0; + /* and no error propagated to row below yet */ + belowerr0 = belowerr1 = belowerr2 = 0; + bpreverr0 = bpreverr1 = bpreverr2 = 0; + + for (col = width; col > 0; col--) { + /* curN holds the error propagated from the previous pixel on the + * current line. Add the error propagated from the previous line + * to form the complete error correction term for this pixel, and + * round the error term (which is expressed * 16) to an integer. + * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct + * for either sign of the error value. + * Note: errorptr points to *previous* column's array entry. + */ + cur0 = RIGHT_SHIFT(cur0 + errorptr[dir3+0] + 8, 4); + cur1 = RIGHT_SHIFT(cur1 + errorptr[dir3+1] + 8, 4); + cur2 = RIGHT_SHIFT(cur2 + errorptr[dir3+2] + 8, 4); + /* Limit the error using transfer function set by init_error_limit. + * See comments with init_error_limit for rationale. + */ + cur0 = error_limit[cur0]; + cur1 = error_limit[cur1]; + cur2 = error_limit[cur2]; + /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE. + * The maximum error is +- MAXJSAMPLE (or less with error limiting); + * this sets the required size of the range_limit array. + */ + cur0 += GETJSAMPLE(inptr[0]); + cur1 += GETJSAMPLE(inptr[1]); + cur2 += GETJSAMPLE(inptr[2]); + cur0 = GETJSAMPLE(range_limit[cur0]); + cur1 = GETJSAMPLE(range_limit[cur1]); + cur2 = GETJSAMPLE(range_limit[cur2]); + /* Index into the cache with adjusted pixel value */ + cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT]; + /* If we have not seen this color before, find nearest colormap */ + /* entry and update the cache */ + if (*cachep == 0) + fill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT); + /* Now emit the colormap index for this cell */ + { register int pixcode = *cachep - 1; + *outptr = (JSAMPLE) pixcode; + /* Compute representation error for this pixel */ + cur0 -= GETJSAMPLE(colormap0[pixcode]); + cur1 -= GETJSAMPLE(colormap1[pixcode]); + cur2 -= GETJSAMPLE(colormap2[pixcode]); + } + /* Compute error fractions to be propagated to adjacent pixels. + * Add these into the running sums, and simultaneously shift the + * next-line error sums left by 1 column. + */ + { register LOCFSERROR bnexterr, delta; + + bnexterr = cur0; /* Process component 0 */ + delta = cur0 * 2; + cur0 += delta; /* form error * 3 */ + errorptr[0] = (FSERROR) (bpreverr0 + cur0); + cur0 += delta; /* form error * 5 */ + bpreverr0 = belowerr0 + cur0; + belowerr0 = bnexterr; + cur0 += delta; /* form error * 7 */ + bnexterr = cur1; /* Process component 1 */ + delta = cur1 * 2; + cur1 += delta; /* form error * 3 */ + errorptr[1] = (FSERROR) (bpreverr1 + cur1); + cur1 += delta; /* form error * 5 */ + bpreverr1 = belowerr1 + cur1; + belowerr1 = bnexterr; + cur1 += delta; /* form error * 7 */ + bnexterr = cur2; /* Process component 2 */ + delta = cur2 * 2; + cur2 += delta; /* form error * 3 */ + errorptr[2] = (FSERROR) (bpreverr2 + cur2); + cur2 += delta; /* form error * 5 */ + bpreverr2 = belowerr2 + cur2; + belowerr2 = bnexterr; + cur2 += delta; /* form error * 7 */ + } + /* At this point curN contains the 7/16 error value to be propagated + * to the next pixel on the current line, and all the errors for the + * next line have been shifted over. We are therefore ready to move on. + */ + inptr += dir3; /* Advance pixel pointers to next column */ + outptr += dir; + errorptr += dir3; /* advance errorptr to current column */ + } + /* Post-loop cleanup: we must unload the final error values into the + * final fserrors[] entry. Note we need not unload belowerrN because + * it is for the dummy column before or after the actual array. + */ + errorptr[0] = (FSERROR) bpreverr0; /* unload prev errs into array */ + errorptr[1] = (FSERROR) bpreverr1; + errorptr[2] = (FSERROR) bpreverr2; + } +} + + +/* + * Initialize the error-limiting transfer function (lookup table). + * The raw F-S error computation can potentially compute error values of up to + * +- MAXJSAMPLE. But we want the maximum correction applied to a pixel to be + * much less, otherwise obviously wrong pixels will be created. (Typical + * effects include weird fringes at color-area boundaries, isolated bright + * pixels in a dark area, etc.) The standard advice for avoiding this problem + * is to ensure that the "corners" of the color cube are allocated as output + * colors; then repeated errors in the same direction cannot cause cascading + * error buildup. However, that only prevents the error from getting + * completely out of hand; Aaron Giles reports that error limiting improves + * the results even with corner colors allocated. + * A simple clamping of the error values to about +- MAXJSAMPLE/8 works pretty + * well, but the smoother transfer function used below is even better. Thanks + * to Aaron Giles for this idea. + */ + +LOCAL(void) +init_error_limit (j_decompress_ptr cinfo) +/* Allocate and fill in the error_limiter table */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + int * table; + int in, out; + + table = (int *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE*2+1) * SIZEOF(int)); + table += MAXJSAMPLE; /* so can index -MAXJSAMPLE .. +MAXJSAMPLE */ + cquantize->error_limiter = table; + +#define STEPSIZE ((MAXJSAMPLE+1)/16) + /* Map errors 1:1 up to +- MAXJSAMPLE/16 */ + out = 0; + for (in = 0; in < STEPSIZE; in++, out++) { + table[in] = out; table[-in] = -out; + } + /* Map errors 1:2 up to +- 3*MAXJSAMPLE/16 */ + for (; in < STEPSIZE*3; in++, out += (in&1) ? 0 : 1) { + table[in] = out; table[-in] = -out; + } + /* Clamp the rest to final out value (which is (MAXJSAMPLE+1)/8) */ + for (; in <= MAXJSAMPLE; in++) { + table[in] = out; table[-in] = -out; + } +#undef STEPSIZE +} + + +/* + * Finish up at the end of each pass. + */ + +METHODDEF(void) +finish_pass1 (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + + /* Select the representative colors and fill in cinfo->colormap */ + cinfo->colormap = cquantize->sv_colormap; + select_colors(cinfo, cquantize->desired); + /* Force next pass to zero the color index table */ + cquantize->needs_zeroed = TRUE; +} + + +METHODDEF(void) +finish_pass2 (j_decompress_ptr cinfo) +{ + /* no work */ +} + + +/* + * Initialize for each processing pass. + */ + +METHODDEF(void) +start_pass_2_quant (j_decompress_ptr cinfo, boolean is_pre_scan) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + int i; + + /* Only F-S dithering or no dithering is supported. */ + /* If user asks for ordered dither, give him F-S. */ + if (cinfo->dither_mode != JDITHER_NONE) + cinfo->dither_mode = JDITHER_FS; + + if (is_pre_scan) { + /* Set up method pointers */ + cquantize->pub.color_quantize = prescan_quantize; + cquantize->pub.finish_pass = finish_pass1; + cquantize->needs_zeroed = TRUE; /* Always zero histogram */ + } else { + /* Set up method pointers */ + if (cinfo->dither_mode == JDITHER_FS) + cquantize->pub.color_quantize = pass2_fs_dither; + else + cquantize->pub.color_quantize = pass2_no_dither; + cquantize->pub.finish_pass = finish_pass2; + + /* Make sure color count is acceptable */ + i = cinfo->actual_number_of_colors; + if (i < 1) + ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 1); + if (i > MAXNUMCOLORS) + ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS); + + if (cinfo->dither_mode == JDITHER_FS) { + size_t arraysize = ((size_t) cinfo->output_width + (size_t) 2) + * (3 * SIZEOF(FSERROR)); + /* Allocate Floyd-Steinberg workspace if we didn't already. */ + if (cquantize->fserrors == NULL) + cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize); + /* Initialize the propagated errors to zero. */ + FMEMZERO((void FAR *) cquantize->fserrors, arraysize); + /* Make the error-limit table if we didn't already. */ + if (cquantize->error_limiter == NULL) + init_error_limit(cinfo); + cquantize->on_odd_row = FALSE; + } + + } + /* Zero the histogram or inverse color map, if necessary */ + if (cquantize->needs_zeroed) { + for (i = 0; i < HIST_C0_ELEMS; i++) { + FMEMZERO((void FAR *) histogram[i], + HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell)); + } + cquantize->needs_zeroed = FALSE; + } +} + + +/* + * Switch to a new external colormap between output passes. + */ + +METHODDEF(void) +new_color_map_2_quant (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + + /* Reset the inverse color map */ + cquantize->needs_zeroed = TRUE; +} + + +/* + * Module initialization routine for 2-pass color quantization. + */ + +GLOBAL(void) +jinit_2pass_quantizer (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize; + int i; + + cquantize = (my_cquantize_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(my_cquantizer)); + cinfo->cquantize = &cquantize->pub; + cquantize->pub.start_pass = start_pass_2_quant; + cquantize->pub.new_color_map = new_color_map_2_quant; + cquantize->fserrors = NULL; /* flag optional arrays not allocated */ + cquantize->error_limiter = NULL; + + /* Make sure jdmaster didn't give me a case I can't handle */ + if (cinfo->out_color_components != 3) + ERREXIT(cinfo, JERR_NOTIMPL); + + /* Allocate the histogram/inverse colormap storage */ + cquantize->histogram = (hist3d) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, HIST_C0_ELEMS * SIZEOF(hist2d)); + for (i = 0; i < HIST_C0_ELEMS; i++) { + cquantize->histogram[i] = (hist2d) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell)); + } + cquantize->needs_zeroed = TRUE; /* histogram is garbage now */ + + /* Allocate storage for the completed colormap, if required. + * We do this now since it is FAR storage and may affect + * the memory manager's space calculations. + */ + if (cinfo->enable_2pass_quant) { + /* Make sure color count is acceptable */ + int desired = cinfo->desired_number_of_colors; + /* Lower bound on # of colors ... somewhat arbitrary as long as > 0 */ + if (desired < 8) + ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 8); + /* Make sure colormap indexes can be represented by JSAMPLEs */ + if (desired > MAXNUMCOLORS) + ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS); + cquantize->sv_colormap = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) desired, (JDIMENSION) 3); + cquantize->desired = desired; + } else + cquantize->sv_colormap = NULL; + + /* Only F-S dithering or no dithering is supported. */ + /* If user asks for ordered dither, give him F-S. */ + if (cinfo->dither_mode != JDITHER_NONE) + cinfo->dither_mode = JDITHER_FS; + + /* Allocate Floyd-Steinberg workspace if necessary. + * This isn't really needed until pass 2, but again it is FAR storage. + * Although we will cope with a later change in dither_mode, + * we do not promise to honor max_memory_to_use if dither_mode changes. + */ + if (cinfo->dither_mode == JDITHER_FS) { + cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + ((size_t) cinfo->output_width + (size_t) 2) * (3 * SIZEOF(FSERROR))); + /* Might as well create the error-limiting table too. */ + init_error_limit(cinfo); + } +} + +#endif /* QUANT_2PASS_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/jutils.c b/widget/milsko/milskosrc/external/libjpeg/src/jutils.c new file mode 100644 index 0000000000..31e16dfb53 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/jutils.c @@ -0,0 +1,224 @@ +/* + * jutils.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * Modified 2009-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains tables and miscellaneous utility routines needed + * for both compression and decompression. + * Note we prefix all global names with "j" to minimize conflicts with + * a surrounding application. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * jpeg_zigzag_order[i] is the zigzag-order position of the i'th element + * of a DCT block read in natural order (left to right, top to bottom). + */ + +#if 0 /* This table is not actually needed in v6a */ + +const int jpeg_zigzag_order[DCTSIZE2] = { + 0, 1, 5, 6, 14, 15, 27, 28, + 2, 4, 7, 13, 16, 26, 29, 42, + 3, 8, 12, 17, 25, 30, 41, 43, + 9, 11, 18, 24, 31, 40, 44, 53, + 10, 19, 23, 32, 39, 45, 52, 54, + 20, 22, 33, 38, 46, 51, 55, 60, + 21, 34, 37, 47, 50, 56, 59, 61, + 35, 36, 48, 49, 57, 58, 62, 63 +}; + +#endif + +/* + * jpeg_natural_order[i] is the natural-order position of the i'th element + * of zigzag order. + * + * When reading corrupted data, the Huffman decoders could attempt + * to reference an entry beyond the end of this array (if the decoded + * zero run length reaches past the end of the block). To prevent + * wild stores without adding an inner-loop test, we put some extra + * "63"s after the real entries. This will cause the extra coefficient + * to be stored in location 63 of the block, not somewhere random. + * The worst case would be a run-length of 15, which means we need 16 + * fake entries. + */ + +const int jpeg_natural_order[DCTSIZE2+16] = { + 0, 1, 8, 16, 9, 2, 3, 10, + 17, 24, 32, 25, 18, 11, 4, 5, + 12, 19, 26, 33, 40, 48, 41, 34, + 27, 20, 13, 6, 7, 14, 21, 28, + 35, 42, 49, 56, 57, 50, 43, 36, + 29, 22, 15, 23, 30, 37, 44, 51, + 58, 59, 52, 45, 38, 31, 39, 46, + 53, 60, 61, 54, 47, 55, 62, 63, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + +const int jpeg_natural_order7[7*7+16] = { + 0, 1, 8, 16, 9, 2, 3, 10, + 17, 24, 32, 25, 18, 11, 4, 5, + 12, 19, 26, 33, 40, 48, 41, 34, + 27, 20, 13, 6, 14, 21, 28, 35, + 42, 49, 50, 43, 36, 29, 22, 30, + 37, 44, 51, 52, 45, 38, 46, 53, + 54, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + +const int jpeg_natural_order6[6*6+16] = { + 0, 1, 8, 16, 9, 2, 3, 10, + 17, 24, 32, 25, 18, 11, 4, 5, + 12, 19, 26, 33, 40, 41, 34, 27, + 20, 13, 21, 28, 35, 42, 43, 36, + 29, 37, 44, 45, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + +const int jpeg_natural_order5[5*5+16] = { + 0, 1, 8, 16, 9, 2, 3, 10, + 17, 24, 32, 25, 18, 11, 4, 12, + 19, 26, 33, 34, 27, 20, 28, 35, + 36, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + +const int jpeg_natural_order4[4*4+16] = { + 0, 1, 8, 16, 9, 2, 3, 10, + 17, 24, 25, 18, 11, 19, 26, 27, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + +const int jpeg_natural_order3[3*3+16] = { + 0, 1, 8, 16, 9, 2, 10, 17, + 18, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + +const int jpeg_natural_order2[2*2+16] = { + 0, 1, 8, 9, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + + +/* + * Arithmetic utilities + */ + +GLOBAL(long) +jdiv_round_up (long a, long b) +/* Compute a/b rounded up to next integer, ie, ceil(a/b) */ +/* Assumes a >= 0, b > 0 */ +{ + return (a + b - 1L) / b; +} + + +GLOBAL(long) +jround_up (long a, long b) +/* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */ +/* Assumes a >= 0, b > 0 */ +{ + a += b - 1L; + return a - (a % b); +} + + +/* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays + * and coefficient-block arrays. This won't work on 80x86 because the arrays + * are FAR and we're assuming a small-pointer memory model. However, some + * DOS compilers provide far-pointer versions of memcpy() and memset() even + * in the small-model libraries. These will be used if USE_FMEM is defined. + * Otherwise, the routines below do it the hard way. (The performance cost + * is not all that great, because these routines aren't very heavily used.) + */ + +#ifndef NEED_FAR_POINTERS /* normal case, same as regular macro */ +#define FMEMCOPY(dest,src,size) MEMCOPY(dest,src,size) +#else /* 80x86 case, define if we can */ +#ifdef USE_FMEM +#define FMEMCOPY(dest,src,size) _fmemcpy((void FAR *)(dest), (const void FAR *)(src), (size_t)(size)) +#else +/* This function is for use by the FMEMZERO macro defined in jpegint.h. + * Do not call this function directly, use the FMEMZERO macro instead. + */ +GLOBAL(void) +jzero_far (void FAR * target, size_t bytestozero) +/* Zero out a chunk of FAR memory. */ +/* This might be sample-array data, block-array data, or alloc_large data. */ +{ + register char FAR * ptr = (char FAR *) target; + register size_t count; + + for (count = bytestozero; count > 0; count--) { + *ptr++ = 0; + } +} +#endif +#endif + + +GLOBAL(void) +jcopy_sample_rows (JSAMPARRAY input_array, + JSAMPARRAY output_array, + int num_rows, JDIMENSION num_cols) +/* Copy some rows of samples from one place to another. + * num_rows rows are copied from *input_array++ to *output_array++; + * these areas may overlap for duplication. + * The source and destination arrays must be at least as wide as num_cols. + */ +{ + register JSAMPROW inptr, outptr; +#ifdef FMEMCOPY + register size_t count = (size_t) num_cols * SIZEOF(JSAMPLE); +#else + register JDIMENSION count; +#endif + register int row; + + for (row = num_rows; row > 0; row--) { + inptr = *input_array++; + outptr = *output_array++; +#ifdef FMEMCOPY + FMEMCOPY(outptr, inptr, count); +#else + for (count = num_cols; count > 0; count--) + *outptr++ = *inptr++; /* needn't bother with GETJSAMPLE() here */ +#endif + } +} + + +GLOBAL(void) +jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row, + JDIMENSION num_blocks) +/* Copy a row of coefficient blocks from one place to another. */ +{ +#ifdef FMEMCOPY + FMEMCOPY(output_row, input_row, (size_t) num_blocks * (DCTSIZE2 * SIZEOF(JCOEF))); +#else + register JCOEFPTR inptr, outptr; + register long count; + + inptr = (JCOEFPTR) input_row; + outptr = (JCOEFPTR) output_row; + for (count = (long) num_blocks * DCTSIZE2; count > 0; count--) { + *outptr++ = *inptr++; + } +#endif +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/rdbmp.c b/widget/milsko/milskosrc/external/libjpeg/src/rdbmp.c new file mode 100644 index 0000000000..6749ea0146 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/rdbmp.c @@ -0,0 +1,469 @@ +/* + * rdbmp.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2009-2019 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to read input images in Microsoft "BMP" + * format (MS Windows 3.x, OS/2 1.x, and OS/2 2.x flavors). + * Currently, only 8-, 24-, and 32-bit images are supported, not 1-bit or + * 4-bit (feeding such low-depth images into JPEG would be silly anyway). + * Also, we don't support RLE-compressed files. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume input from + * an ordinary stdio stream. They further assume that reading begins + * at the start of the file; start_input may need work if the + * user interface has already read some data (e.g., to determine that + * the file is indeed BMP format). + * + * This code contributed by James Arthur Boucher. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef BMP_SUPPORTED + + +/* Macros to deal with unsigned chars as efficiently as compiler allows */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char U_CHAR; +#define UCH(x) ((int) (x)) +#else /* !HAVE_UNSIGNED_CHAR */ +typedef char U_CHAR; +#ifdef CHAR_IS_UNSIGNED +#define UCH(x) ((int) (x)) +#else +#define UCH(x) ((int) (x) & 0xFF) +#endif +#endif /* HAVE_UNSIGNED_CHAR */ + + +#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) + + +/* Private version of data source object */ + +typedef struct _bmp_source_struct * bmp_source_ptr; + +typedef struct _bmp_source_struct { + struct cjpeg_source_struct pub; /* public fields */ + + j_compress_ptr cinfo; /* back link saves passing separate parm */ + + JSAMPARRAY colormap; /* BMP colormap (converted to my format) */ + + jvirt_sarray_ptr whole_image; /* Needed to reverse row order */ + JDIMENSION source_row; /* Current source row number */ + JDIMENSION row_width; /* Physical width of scanlines in file */ + + int bits_per_pixel; /* remembers 8-, 24-, or 32-bit format */ + int cmap_length; /* colormap length */ +} bmp_source_struct; + + +LOCAL(int) +read_byte (bmp_source_ptr sinfo) +/* Read next byte from BMP file */ +{ + register FILE *infile = sinfo->pub.input_file; + register int c; + + if ((c = getc(infile)) == EOF) + ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); + return c; +} + + +LOCAL(void) +read_colormap (bmp_source_ptr sinfo, int cmaplen, int mapentrysize) +/* Read the colormap from a BMP file */ +{ + int i; + + switch (mapentrysize) { + case 3: + /* BGR format (occurs in OS/2 files) */ + for (i = 0; i < cmaplen; i++) { + sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo); + } + break; + case 4: + /* BGR0 format (occurs in MS Windows files) */ + for (i = 0; i < cmaplen; i++) { + sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo); + (void) read_byte(sinfo); + } + break; + default: + ERREXIT(sinfo->cinfo, JERR_BMP_BADCMAP); + } +} + + +/* + * Read one row of pixels. + * The image has been read into the whole_image array, but is otherwise + * unprocessed. We must read it out in top-to-bottom row order, and if + * it is an 8-bit image, we must expand colormapped pixels to 24bit format. + */ + +METHODDEF(JDIMENSION) +get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 8-bit colormap indexes */ +{ + bmp_source_ptr source = (bmp_source_ptr) sinfo; + register JSAMPROW inptr, outptr; + register JSAMPARRAY colormap; + register JDIMENSION col; + register int t; + int cmaplen; + + /* Fetch next row from virtual array */ + source->source_row--; + inptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, + source->whole_image, source->source_row, (JDIMENSION) 1, FALSE); + + /* Expand the colormap indexes to real data */ + outptr = source->pub.buffer[0]; + colormap = source->colormap; + cmaplen = source->cmap_length; + for (col = cinfo->image_width; col > 0; col--) { + t = GETJSAMPLE(*inptr++); + if (t >= cmaplen) + ERREXIT(cinfo, JERR_BMP_OUTOFRANGE); + *outptr++ = colormap[0][t]; /* can omit GETJSAMPLE() safely */ + *outptr++ = colormap[1][t]; + *outptr++ = colormap[2][t]; + } + + return 1; +} + +METHODDEF(JDIMENSION) +get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 24-bit pixels */ +{ + bmp_source_ptr source = (bmp_source_ptr) sinfo; + register JSAMPROW inptr, outptr; + register JDIMENSION col; + + /* Fetch next row from virtual array */ + source->source_row--; + inptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, + source->whole_image, source->source_row, (JDIMENSION) 1, FALSE); + + /* Transfer data. Note source values are in BGR order + * (even though Microsoft's own documents say the opposite). + */ + outptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + outptr[2] = *inptr++; /* can omit GETJSAMPLE() safely */ + outptr[1] = *inptr++; + outptr[0] = *inptr++; + outptr += 3; + } + + return 1; +} + +METHODDEF(JDIMENSION) +get_32bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 32-bit pixels */ +{ + bmp_source_ptr source = (bmp_source_ptr) sinfo; + register JSAMPROW inptr, outptr; + register JDIMENSION col; + + /* Fetch next row from virtual array */ + source->source_row--; + inptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, + source->whole_image, source->source_row, (JDIMENSION) 1, FALSE); + + /* Transfer data. Note source values are in BGR order + * (even though Microsoft's own documents say the opposite). + */ + outptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + outptr[2] = *inptr++; /* can omit GETJSAMPLE() safely */ + outptr[1] = *inptr++; + outptr[0] = *inptr++; + inptr++; /* skip the 4th byte (Alpha channel) */ + outptr += 3; + } + + return 1; +} + + +/* + * This method loads the image into whole_image during the first call on + * get_pixel_rows. The get_pixel_rows pointer is then adjusted to call + * get_8bit_row, get_24bit_row, or get_32bit_row on subsequent calls. + */ + +METHODDEF(JDIMENSION) +preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + bmp_source_ptr source = (bmp_source_ptr) sinfo; + register FILE *infile = source->pub.input_file; + register int c; + register JSAMPROW out_ptr; + JDIMENSION row, col; + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + + /* Read the data into a virtual array in input-file row order. */ + for (row = 0; row < cinfo->image_height; row++) { + if (progress != NULL) { + progress->pub.pass_counter = (long) row; + progress->pub.pass_limit = (long) cinfo->image_height; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } + out_ptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, + source->whole_image, row, (JDIMENSION) 1, TRUE); + for (col = source->row_width; col > 0; col--) { + /* inline copy of read_byte() for speed */ + if ((c = getc(infile)) == EOF) + ERREXIT(cinfo, JERR_INPUT_EOF); + *out_ptr++ = (JSAMPLE) c; + } + } + if (progress != NULL) + progress->completed_extra_passes++; + + /* Set up to read from the virtual array in top-to-bottom order */ + switch (source->bits_per_pixel) { + case 8: + source->pub.get_pixel_rows = get_8bit_row; + break; + case 24: + source->pub.get_pixel_rows = get_24bit_row; + break; + case 32: + source->pub.get_pixel_rows = get_32bit_row; + break; + default: + ERREXIT(cinfo, JERR_BMP_BADDEPTH); + } + source->source_row = cinfo->image_height; + + /* And read the first row */ + return (*source->pub.get_pixel_rows) (cinfo, sinfo); +} + + +/* + * Read the file header; return image size and component count. + */ + +METHODDEF(void) +start_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + bmp_source_ptr source = (bmp_source_ptr) sinfo; + U_CHAR bmpfileheader[14]; + U_CHAR bmpinfoheader[64]; +#define GET_2B(array, offset) ((unsigned int) UCH(array[offset]) + \ + (((unsigned int) UCH(array[offset+1])) << 8)) +#define GET_4B(array, offset) ((INT32) UCH(array[offset]) + \ + (((INT32) UCH(array[offset+1])) << 8) + \ + (((INT32) UCH(array[offset+2])) << 16) + \ + (((INT32) UCH(array[offset+3])) << 24)) + INT32 bfOffBits; + INT32 headerSize; + INT32 biWidth; + INT32 biHeight; + unsigned int biPlanes; + INT32 biCompression; + INT32 biXPelsPerMeter,biYPelsPerMeter; + INT32 biClrUsed = 0; + int mapentrysize = 0; /* 0 indicates no colormap */ + INT32 bPad; + JDIMENSION row_width; + + /* Read and verify the bitmap file header */ + if (! ReadOK(source->pub.input_file, bmpfileheader, 14)) + ERREXIT(cinfo, JERR_INPUT_EOF); + if (GET_2B(bmpfileheader, 0) != 0x4D42) /* 'BM' */ + ERREXIT(cinfo, JERR_BMP_NOT); + bfOffBits = GET_4B(bmpfileheader, 10); + /* We ignore the remaining fileheader fields */ + + /* The infoheader might be 12 bytes (OS/2 1.x), 40 bytes (Windows), + * or 64 bytes (OS/2 2.x). Check the first 4 bytes to find out which. + */ + if (! ReadOK(source->pub.input_file, bmpinfoheader, 4)) + ERREXIT(cinfo, JERR_INPUT_EOF); + headerSize = GET_4B(bmpinfoheader, 0); + if (headerSize < 12 || headerSize > 64) + ERREXIT(cinfo, JERR_BMP_BADHEADER); + if (! ReadOK(source->pub.input_file, bmpinfoheader + 4, headerSize - 4)) + ERREXIT(cinfo, JERR_INPUT_EOF); + + switch ((int) headerSize) { + case 12: + /* Decode OS/2 1.x header (Microsoft calls this a BITMAPCOREHEADER) */ + biWidth = (INT32) GET_2B(bmpinfoheader, 4); + biHeight = (INT32) GET_2B(bmpinfoheader, 6); + biPlanes = GET_2B(bmpinfoheader, 8); + source->bits_per_pixel = (int) GET_2B(bmpinfoheader, 10); + + switch (source->bits_per_pixel) { + case 8: /* colormapped image */ + mapentrysize = 3; /* OS/2 uses RGBTRIPLE colormap */ + TRACEMS2(cinfo, 1, JTRC_BMP_OS2_MAPPED, (int) biWidth, (int) biHeight); + break; + case 24: /* RGB image */ + case 32: /* RGB image + Alpha channel */ + TRACEMS3(cinfo, 1, JTRC_BMP_OS2, (int) biWidth, (int) biHeight, + source->bits_per_pixel); + break; + default: + ERREXIT(cinfo, JERR_BMP_BADDEPTH); + } + break; + case 40: + case 64: + /* Decode Windows 3.x header (Microsoft calls this a BITMAPINFOHEADER) */ + /* or OS/2 2.x header, which has additional fields that we ignore */ + biWidth = GET_4B(bmpinfoheader, 4); + biHeight = GET_4B(bmpinfoheader, 8); + biPlanes = GET_2B(bmpinfoheader, 12); + source->bits_per_pixel = (int) GET_2B(bmpinfoheader, 14); + biCompression = GET_4B(bmpinfoheader, 16); + biXPelsPerMeter = GET_4B(bmpinfoheader, 24); + biYPelsPerMeter = GET_4B(bmpinfoheader, 28); + biClrUsed = GET_4B(bmpinfoheader, 32); + /* biSizeImage, biClrImportant fields are ignored */ + + switch (source->bits_per_pixel) { + case 8: /* colormapped image */ + mapentrysize = 4; /* Windows uses RGBQUAD colormap */ + TRACEMS2(cinfo, 1, JTRC_BMP_MAPPED, (int) biWidth, (int) biHeight); + break; + case 24: /* RGB image */ + case 32: /* RGB image + Alpha channel */ + TRACEMS3(cinfo, 1, JTRC_BMP, (int) biWidth, (int) biHeight, + source->bits_per_pixel); + break; + default: + ERREXIT(cinfo, JERR_BMP_BADDEPTH); + } + if (biCompression != 0) + ERREXIT(cinfo, JERR_BMP_COMPRESSED); + + if (biXPelsPerMeter > 0 && biYPelsPerMeter > 0) { + /* Set JFIF density parameters from the BMP data */ + cinfo->X_density = (UINT16) (biXPelsPerMeter/100); /* 100 cm per meter */ + cinfo->Y_density = (UINT16) (biYPelsPerMeter/100); + cinfo->density_unit = 2; /* dots/cm */ + } + break; + default: + ERREXIT(cinfo, JERR_BMP_BADHEADER); + return; /* avoid compiler warnings for uninitialized variables */ + } + + if (biPlanes != 1) + ERREXIT(cinfo, JERR_BMP_BADPLANES); + /* Sanity check for buffer allocation below */ + if (biWidth <= 0 || biHeight <= 0 || (biWidth >> 24) || (biHeight >> 24)) + ERREXIT(cinfo, JERR_BMP_OUTOFRANGE); + + /* Compute distance to bitmap data --- will adjust for colormap below */ + bPad = bfOffBits - (headerSize + 14); + + /* Read the colormap, if any */ + if (mapentrysize > 0) { + if (biClrUsed <= 0) + biClrUsed = 256; /* assume it's 256 */ + else if (biClrUsed > 256) + ERREXIT(cinfo, JERR_BMP_BADCMAP); + /* Allocate space to store the colormap */ + source->colormap = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, + JPOOL_IMAGE, (JDIMENSION) biClrUsed, (JDIMENSION) 3); + source->cmap_length = (int) biClrUsed; + /* and read it from the file */ + read_colormap(source, (int) biClrUsed, mapentrysize); + /* account for size of colormap */ + bPad -= biClrUsed * mapentrysize; + } + + /* Skip any remaining pad bytes */ + if (bPad < 0) /* incorrect bfOffBits value? */ + ERREXIT(cinfo, JERR_BMP_BADHEADER); + while (--bPad >= 0) { + (void) read_byte(source); + } + + /* Compute row width in file, including padding to 4-byte boundary */ + if (source->bits_per_pixel == 24) + row_width = (JDIMENSION) (biWidth * 3); + else if (source->bits_per_pixel == 32) + row_width = (JDIMENSION) (biWidth * 4); + else + row_width = (JDIMENSION) biWidth; + while ((row_width & 3) != 0) row_width++; + source->row_width = row_width; + + /* Allocate space for inversion array, prepare for preload pass */ + source->whole_image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + row_width, (JDIMENSION) biHeight, (JDIMENSION) 1); + source->pub.get_pixel_rows = preload_image; + if (cinfo->progress != NULL) { + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + progress->total_extra_passes++; /* count file input as separate pass */ + } + + /* Allocate one-row buffer for returned data */ + source->pub.buffer = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, + JPOOL_IMAGE, (JDIMENSION) (biWidth * 3), (JDIMENSION) 1); + source->pub.buffer_height = 1; + + cinfo->in_color_space = JCS_RGB; + cinfo->input_components = 3; + cinfo->data_precision = 8; + cinfo->image_width = (JDIMENSION) biWidth; + cinfo->image_height = (JDIMENSION) biHeight; +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + /* no work */ +} + + +/* + * The module selection routine for BMP format input. + */ + +GLOBAL(cjpeg_source_ptr) +jinit_read_bmp (j_compress_ptr cinfo) +{ + bmp_source_ptr source; + + /* Create module interface object */ + source = (bmp_source_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(bmp_source_struct)); + source->cinfo = cinfo; /* make back link for subroutines */ + /* Fill in method ptrs, except get_pixel_rows which start_input sets */ + source->pub.start_input = start_input_bmp; + source->pub.finish_input = finish_input_bmp; + + return &source->pub; +} + +#endif /* BMP_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/rdcolmap.c b/widget/milsko/milskosrc/external/libjpeg/src/rdcolmap.c new file mode 100644 index 0000000000..42b343763b --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/rdcolmap.c @@ -0,0 +1,253 @@ +/* + * rdcolmap.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file implements djpeg's "-map file" switch. It reads a source image + * and constructs a colormap to be supplied to the JPEG decompressor. + * + * Currently, these file formats are supported for the map file: + * GIF: the contents of the GIF's global colormap are used. + * PPM (either text or raw flavor): the entire file is read and + * each unique pixel value is entered in the map. + * Note that reading a large PPM file will be horrendously slow. + * Typically, a PPM-format map file should contain just one pixel + * of each desired color. Such a file can be extracted from an + * ordinary image PPM file with ppmtomap(1). + * + * Rescaling a PPM that has a maxval unequal to MAXJSAMPLE is not + * currently implemented. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */ + +/* Portions of this code are based on the PBMPLUS library, which is: +** +** Copyright (C) 1988 by Jef Poskanzer. +** +** Permission to use, copy, modify, and distribute this software and its +** documentation for any purpose and without fee is hereby granted, provided +** that the above copyright notice appear in all copies and that both that +** copyright notice and this permission notice appear in supporting +** documentation. This software is provided "as is" without express or +** implied warranty. +*/ + + +/* + * Add a (potentially) new color to the color map. + */ + +LOCAL(void) +add_map_entry (j_decompress_ptr cinfo, int R, int G, int B) +{ + JSAMPROW colormap0 = cinfo->colormap[0]; + JSAMPROW colormap1 = cinfo->colormap[1]; + JSAMPROW colormap2 = cinfo->colormap[2]; + int ncolors = cinfo->actual_number_of_colors; + int index; + + /* Check for duplicate color. */ + for (index = 0; index < ncolors; index++) { + if (GETJSAMPLE(colormap0[index]) == R && + GETJSAMPLE(colormap1[index]) == G && + GETJSAMPLE(colormap2[index]) == B) + return; /* color is already in map */ + } + + /* Check for map overflow. */ + if (ncolors >= (MAXJSAMPLE+1)) + ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, (MAXJSAMPLE+1)); + + /* OK, add color to map. */ + colormap0[ncolors] = (JSAMPLE) R; + colormap1[ncolors] = (JSAMPLE) G; + colormap2[ncolors] = (JSAMPLE) B; + cinfo->actual_number_of_colors++; +} + + +/* + * Extract color map from a GIF file. + */ + +LOCAL(void) +read_gif_map (j_decompress_ptr cinfo, FILE * infile) +{ + int header[13]; + int i, colormaplen; + int R, G, B; + + /* Initial 'G' has already been read by read_color_map */ + /* Read the rest of the GIF header and logical screen descriptor */ + for (i = 1; i < 13; i++) { + if ((header[i] = getc(infile)) == EOF) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + } + + /* Verify GIF Header */ + if (header[1] != 'I' || header[2] != 'F') + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + + /* There must be a global color map. */ + if ((header[10] & 0x80) == 0) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + + /* OK, fetch it. */ + colormaplen = 2 << (header[10] & 0x07); + + for (i = 0; i < colormaplen; i++) { + R = getc(infile); + G = getc(infile); + B = getc(infile); + if (R == EOF || G == EOF || B == EOF) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + add_map_entry(cinfo, + R << (BITS_IN_JSAMPLE-8), + G << (BITS_IN_JSAMPLE-8), + B << (BITS_IN_JSAMPLE-8)); + } +} + + +/* Support routines for reading PPM */ + + +LOCAL(int) +pbm_getc (FILE * infile) +/* Read next char, skipping over any comments */ +/* A comment/newline sequence is returned as a newline */ +{ + register int ch; + + ch = getc(infile); + if (ch == '#') { + do { + ch = getc(infile); + } while (ch != '\n' && ch != EOF); + } + return ch; +} + + +LOCAL(unsigned int) +read_pbm_integer (j_decompress_ptr cinfo, FILE * infile) +/* Read an unsigned decimal integer from the PPM file */ +/* Swallows one trailing character after the integer */ +/* Note that on a 16-bit-int machine, only values up to 64k can be read. */ +/* This should not be a problem in practice. */ +{ + register int ch; + register unsigned int val; + + /* Skip any leading whitespace */ + do { + ch = pbm_getc(infile); + if (ch == EOF) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'); + + if (ch < '0' || ch > '9') + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + + val = ch - '0'; + while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') { + val *= 10; + val += ch - '0'; + } + return val; +} + + +/* + * Extract color map from a PPM file. + */ + +LOCAL(void) +read_ppm_map (j_decompress_ptr cinfo, FILE * infile) +{ + int c; + unsigned int w, h, maxval, row, col; + int R, G, B; + + /* Initial 'P' has already been read by read_color_map */ + c = getc(infile); /* save format discriminator for a sec */ + + /* while we fetch the remaining header info */ + w = read_pbm_integer(cinfo, infile); + h = read_pbm_integer(cinfo, infile); + maxval = read_pbm_integer(cinfo, infile); + + if (w <= 0 || h <= 0 || maxval <= 0) /* error check */ + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + + /* For now, we don't support rescaling from an unusual maxval. */ + if (maxval != (unsigned int) MAXJSAMPLE) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + + switch (c) { + case '3': /* it's a text-format PPM file */ + for (row = 0; row < h; row++) { + for (col = 0; col < w; col++) { + R = read_pbm_integer(cinfo, infile); + G = read_pbm_integer(cinfo, infile); + B = read_pbm_integer(cinfo, infile); + add_map_entry(cinfo, R, G, B); + } + } + break; + + case '6': /* it's a raw-format PPM file */ + for (row = 0; row < h; row++) { + for (col = 0; col < w; col++) { + R = getc(infile); + G = getc(infile); + B = getc(infile); + if (R == EOF || G == EOF || B == EOF) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + add_map_entry(cinfo, R, G, B); + } + } + break; + + default: + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + break; + } +} + + +/* + * Main entry point from djpeg.c. + * Input: opened input file (from file name argument on command line). + * Output: colormap and actual_number_of_colors fields are set in cinfo. + */ + +GLOBAL(void) +read_color_map (j_decompress_ptr cinfo, FILE * infile) +{ + /* Allocate space for a color map of maximum supported size. */ + cinfo->colormap = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (MAXJSAMPLE+1), (JDIMENSION) 3); + cinfo->actual_number_of_colors = 0; /* initialize map to empty */ + + /* Read first byte to determine file format */ + switch (getc(infile)) { + case 'G': + read_gif_map(cinfo, infile); + break; + case 'P': + read_ppm_map(cinfo, infile); + break; + default: + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + break; + } +} + +#endif /* QUANT_2PASS_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/rdgif.c b/widget/milsko/milskosrc/external/libjpeg/src/rdgif.c new file mode 100644 index 0000000000..5d2339ca2b --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/rdgif.c @@ -0,0 +1,679 @@ +/* + * rdgif.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * Modified 2019-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to read input images in GIF format. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume input from + * an ordinary stdio stream. They further assume that reading begins + * at the start of the file; start_input may need work if the + * user interface has already read some data (e.g., to determine that + * the file is indeed GIF format). + */ + +/* + * This code is loosely based on giftoppm from the PBMPLUS distribution + * of Feb. 1991. That file contains the following copyright notice: + * +-------------------------------------------------------------------+ + * | Copyright 1990, David Koblas. | + * | Permission to use, copy, modify, and distribute this software | + * | and its documentation for any purpose and without fee is hereby | + * | granted, provided that the above copyright notice appear in all | + * | copies and that both that copyright notice and this permission | + * | notice appear in supporting documentation. This software is | + * | provided "as is" without express or implied warranty. | + * +-------------------------------------------------------------------+ + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef GIF_SUPPORTED + + +/* Macros to deal with unsigned chars as efficiently as compiler allows */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char U_CHAR; +#define UCH(x) ((int) (x)) +#else /* !HAVE_UNSIGNED_CHAR */ +typedef char U_CHAR; +#ifdef CHAR_IS_UNSIGNED +#define UCH(x) ((int) (x)) +#else +#define UCH(x) ((int) (x) & 0xFF) +#endif +#endif /* HAVE_UNSIGNED_CHAR */ + + +#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) + + +#define MAXCOLORMAPSIZE 256 /* max # of colors in a GIF colormap */ +#define NUMCOLORS 3 /* # of colors */ +#define CM_RED 0 /* color component numbers */ +#define CM_GREEN 1 +#define CM_BLUE 2 + +#define MAX_LZW_BITS 12 /* maximum LZW code size */ +#define LZW_TABLE_SIZE (1< table of prefix symbols */ + UINT8 FAR *symbol_tail; /* => table of suffix bytes */ + UINT8 FAR *symbol_stack; /* => stack for symbol expansions */ + UINT8 FAR *sp; /* stack pointer */ + + /* State for interlaced image processing */ + boolean is_interlaced; /* TRUE if have interlaced image */ + jvirt_sarray_ptr interlaced_image; /* full image in interlaced order */ + JDIMENSION cur_row_number; /* need to know actual row number */ + JDIMENSION pass2_offset; /* # of pixel rows in pass 1 */ + JDIMENSION pass3_offset; /* # of pixel rows in passes 1&2 */ + JDIMENSION pass4_offset; /* # of pixel rows in passes 1,2,3 */ +} gif_source_struct; + +typedef gif_source_struct * gif_source_ptr; + + +/* Forward declarations */ +METHODDEF(JDIMENSION) get_pixel_rows + JPP((j_compress_ptr cinfo, cjpeg_source_ptr sinfo)); +METHODDEF(JDIMENSION) load_interlaced_image + JPP((j_compress_ptr cinfo, cjpeg_source_ptr sinfo)); +METHODDEF(JDIMENSION) get_interlaced_row + JPP((j_compress_ptr cinfo, cjpeg_source_ptr sinfo)); + + +LOCAL(int) +ReadByte (gif_source_ptr sinfo) +/* Read next byte from GIF file */ +{ + register FILE *infile = sinfo->pub.input_file; + register int c; + + if ((c = getc(infile)) == EOF) + ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); + return c; +} + + +LOCAL(int) +GetDataBlock (gif_source_ptr sinfo, U_CHAR *buf) +/* Read a GIF data block, which has a leading count byte */ +/* A zero-length block marks the end of a data block sequence */ +{ + int count; + + count = ReadByte(sinfo); + if (count > 0) { + if (! ReadOK(sinfo->pub.input_file, buf, count)) + ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); + } + return count; +} + + +LOCAL(void) +SkipDataBlocks (gif_source_ptr sinfo) +/* Skip a series of data blocks, until a block terminator is found */ +{ + U_CHAR buf[256]; + + while (GetDataBlock(sinfo, buf) > 0) + /* skip */; +} + + +LOCAL(void) +ReInitLZW (gif_source_ptr sinfo) +/* (Re)initialize LZW state; shared code for startup and Clear processing */ +{ + sinfo->code_size = sinfo->input_code_size + 1; + sinfo->limit_code = sinfo->clear_code << 1; /* 2^code_size */ + sinfo->max_code = sinfo->clear_code + 2; /* first unused code value */ + sinfo->sp = sinfo->symbol_stack; /* init stack to empty */ +} + + +LOCAL(void) +InitLZWCode (gif_source_ptr sinfo) +/* Initialize for a series of LZWReadByte (and hence GetCode) calls */ +{ + /* GetCode initialization */ + sinfo->last_byte = 2; /* make safe to "recopy last two bytes" */ + sinfo->code_buf[0] = 0; + sinfo->code_buf[1] = 0; + sinfo->last_bit = 0; /* nothing in the buffer */ + sinfo->cur_bit = 0; /* force buffer load on first call */ + sinfo->first_time = TRUE; + sinfo->out_of_blocks = FALSE; + + /* LZWReadByte initialization: */ + /* compute special code values (note that these do not change later) */ + sinfo->clear_code = 1 << sinfo->input_code_size; + sinfo->end_code = sinfo->clear_code + 1; + ReInitLZW(sinfo); +} + + +LOCAL(int) +GetCode (gif_source_ptr sinfo) +/* Fetch the next code_size bits from the GIF data */ +/* We assume code_size is less than 16 */ +{ + register INT32 accum; + int offs, count; + + while (sinfo->cur_bit + sinfo->code_size > sinfo->last_bit) { + /* Time to reload the buffer */ + /* First time, share code with Clear case */ + if (sinfo->first_time) { + sinfo->first_time = FALSE; + return sinfo->clear_code; + } + if (sinfo->out_of_blocks) { + WARNMS(sinfo->cinfo, JWRN_GIF_NOMOREDATA); + return sinfo->end_code; /* fake something useful */ + } + /* preserve last two bytes of what we have -- assume code_size <= 16 */ + sinfo->code_buf[0] = sinfo->code_buf[sinfo->last_byte-2]; + sinfo->code_buf[1] = sinfo->code_buf[sinfo->last_byte-1]; + /* Load more bytes; set flag if we reach the terminator block */ + if ((count = GetDataBlock(sinfo, &sinfo->code_buf[2])) == 0) { + sinfo->out_of_blocks = TRUE; + WARNMS(sinfo->cinfo, JWRN_GIF_NOMOREDATA); + return sinfo->end_code; /* fake something useful */ + } + /* Reset counters */ + sinfo->cur_bit = (sinfo->cur_bit - sinfo->last_bit) + 16; + sinfo->last_byte = 2 + count; + sinfo->last_bit = sinfo->last_byte * 8; + } + + /* Form up next 24 bits in accum */ + offs = sinfo->cur_bit >> 3; /* byte containing cur_bit */ + accum = (INT32) UCH(sinfo->code_buf[offs+2]); + accum <<= 8; + accum |= (INT32) UCH(sinfo->code_buf[offs+1]); + accum <<= 8; + accum |= (INT32) UCH(sinfo->code_buf[offs]); + + /* Right-align cur_bit in accum, then mask off desired number of bits */ + accum >>= (sinfo->cur_bit & 7); + sinfo->cur_bit += sinfo->code_size; + return ((int) accum) & ((1 << sinfo->code_size) - 1); +} + + +LOCAL(int) +LZWReadByte (gif_source_ptr sinfo) +/* Read an LZW-compressed byte */ +{ + register int code; /* current working code */ + int incode; /* saves actual input code */ + + /* If any codes are stacked from a previously read symbol, return them */ + if (sinfo->sp > sinfo->symbol_stack) + return (int) *(-- sinfo->sp); + + /* Time to read a new symbol */ + code = GetCode(sinfo); + + if (code == sinfo->clear_code) { + /* Reinit state, swallow any extra Clear codes, and */ + /* return next code, which is expected to be a raw byte. */ + ReInitLZW(sinfo); + do { + code = GetCode(sinfo); + } while (code == sinfo->clear_code); + if (code > sinfo->clear_code) { /* make sure it is a raw byte */ + WARNMS(sinfo->cinfo, JWRN_GIF_BADDATA); + code = 0; /* use something valid */ + } + /* make firstcode, oldcode valid! */ + sinfo->firstcode = sinfo->oldcode = code; + return code; + } + + if (code == sinfo->end_code) { + /* Skip the rest of the image, unless GetCode already read terminator */ + if (! sinfo->out_of_blocks) { + SkipDataBlocks(sinfo); + sinfo->out_of_blocks = TRUE; + } + /* Complain that there's not enough data */ + WARNMS(sinfo->cinfo, JWRN_GIF_ENDCODE); + /* Pad data with 0's */ + return 0; /* fake something usable */ + } + + /* Got normal raw byte or LZW symbol */ + incode = code; /* save for a moment */ + + if (code >= sinfo->max_code) { /* special case for not-yet-defined symbol */ + /* code == max_code is OK; anything bigger is bad data */ + if (code > sinfo->max_code) { + WARNMS(sinfo->cinfo, JWRN_GIF_BADDATA); + incode = 0; /* prevent creation of loops in symbol table */ + } + /* this symbol will be defined as oldcode/firstcode */ + *(sinfo->sp++) = (UINT8) sinfo->firstcode; + code = sinfo->oldcode; + } + + /* If it's a symbol, expand it into the stack */ + while (code >= sinfo->clear_code) { + *(sinfo->sp++) = sinfo->symbol_tail[code]; /* tail is a byte value */ + code = sinfo->symbol_head[code]; /* head is another LZW symbol */ + } + /* At this point code just represents a raw byte */ + sinfo->firstcode = code; /* save for possible future use */ + + /* If there's room in table... */ + if ((code = sinfo->max_code) < LZW_TABLE_SIZE) { + /* Define a new symbol = prev sym + head of this sym's expansion */ + sinfo->symbol_head[code] = (UINT16) sinfo->oldcode; + sinfo->symbol_tail[code] = (UINT8) sinfo->firstcode; + sinfo->max_code++; + /* Is it time to increase code_size? */ + if (sinfo->max_code >= sinfo->limit_code && + sinfo->code_size < MAX_LZW_BITS) { + sinfo->code_size++; + sinfo->limit_code <<= 1; /* keep equal to 2^code_size */ + } + } + + sinfo->oldcode = incode; /* save last input symbol for future use */ + return sinfo->firstcode; /* return first byte of symbol's expansion */ +} + + +LOCAL(void) +ReadColorMap (gif_source_ptr sinfo, int cmaplen, JSAMPARRAY cmap) +/* Read a GIF colormap */ +{ + int i; + + for (i = 0; i < cmaplen; i++) { +#if BITS_IN_JSAMPLE == 8 +#define UPSCALE(x) (x) +#else +#define UPSCALE(x) ((x) << (BITS_IN_JSAMPLE-8)) +#endif + cmap[CM_RED ][i] = (JSAMPLE) UPSCALE(ReadByte(sinfo)); + cmap[CM_GREEN][i] = (JSAMPLE) UPSCALE(ReadByte(sinfo)); + cmap[CM_BLUE ][i] = (JSAMPLE) UPSCALE(ReadByte(sinfo)); + } +} + + +LOCAL(void) +DoExtension (gif_source_ptr sinfo) +/* Process an extension block */ +/* Currently we ignore 'em all */ +{ + int extlabel; + + /* Read extension label byte */ + extlabel = ReadByte(sinfo); + TRACEMS1(sinfo->cinfo, 1, JTRC_GIF_EXTENSION, extlabel); + /* Skip the data block(s) associated with the extension */ + SkipDataBlocks(sinfo); +} + + +/* + * Read the file header; return image size and component count. + */ + +METHODDEF(void) +start_input_gif (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + gif_source_ptr source = (gif_source_ptr) sinfo; + U_CHAR hdrbuf[10]; /* workspace for reading control blocks */ + unsigned int width, height; /* image dimensions */ + int colormaplen, aspectRatio; + int c; + + /* Read and verify GIF Header */ + if (! ReadOK(source->pub.input_file, hdrbuf, 6)) + ERREXIT(cinfo, JERR_GIF_NOT); + if (hdrbuf[0] != 'G' || hdrbuf[1] != 'I' || hdrbuf[2] != 'F') + ERREXIT(cinfo, JERR_GIF_NOT); + /* Check for expected version numbers. + * If unknown version, give warning and try to process anyway; + * this is per recommendation in GIF89a standard. + */ + if ((hdrbuf[3] != '8' || hdrbuf[4] != '7' || hdrbuf[5] != 'a') && + (hdrbuf[3] != '8' || hdrbuf[4] != '9' || hdrbuf[5] != 'a')) + TRACEMS3(cinfo, 1, JTRC_GIF_BADVERSION, hdrbuf[3], hdrbuf[4], hdrbuf[5]); + + /* Read and decipher Logical Screen Descriptor */ + if (! ReadOK(source->pub.input_file, hdrbuf, 7)) + ERREXIT(cinfo, JERR_INPUT_EOF); + width = LM_to_uint(hdrbuf, 0); + height = LM_to_uint(hdrbuf, 2); + /* we ignore the color resolution, sort flag, and background color index */ + aspectRatio = UCH(hdrbuf[6]); + if (aspectRatio != 0 && aspectRatio != 49) + TRACEMS(cinfo, 1, JTRC_GIF_NONSQUARE); + + /* Allocate space to store the colormap */ + source->colormap = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, + JPOOL_IMAGE, (JDIMENSION) MAXCOLORMAPSIZE, (JDIMENSION) NUMCOLORS); + colormaplen = 0; /* indicate initialization */ + + /* Read global colormap if header indicates it is present */ + if (BitSet(hdrbuf[4], COLORMAPFLAG)) { + colormaplen = 2 << (hdrbuf[4] & 0x07); + ReadColorMap(source, colormaplen, source->colormap); + } + + /* Scan until we reach start of desired image. + * We don't currently support skipping images, but could add it easily. + */ + for (;;) { + c = ReadByte(source); + + if (c == ';') /* GIF terminator?? */ + ERREXIT(cinfo, JERR_GIF_IMAGENOTFOUND); + + if (c == '!') { /* Extension */ + DoExtension(source); + continue; + } + + if (c != ',') { /* Not an image separator? */ + WARNMS1(cinfo, JWRN_GIF_CHAR, c); + continue; + } + + /* Read and decipher Local Image Descriptor */ + if (! ReadOK(source->pub.input_file, hdrbuf, 9)) + ERREXIT(cinfo, JERR_INPUT_EOF); + /* we ignore top/left position info, also sort flag */ + width = LM_to_uint(hdrbuf, 4); + height = LM_to_uint(hdrbuf, 6); + if (width <= 0 || height <= 0) + ERREXIT(cinfo, JERR_GIF_OUTOFRANGE); + source->is_interlaced = (BitSet(hdrbuf[8], INTERLACE) != 0); + + /* Read local colormap if header indicates it is present */ + /* Note: if we wanted to support skipping images, */ + /* we'd need to skip rather than read colormap for ignored images */ + if (BitSet(hdrbuf[8], COLORMAPFLAG)) { + colormaplen = 2 << (hdrbuf[8] & 0x07); + ReadColorMap(source, colormaplen, source->colormap); + } + + source->input_code_size = ReadByte(source); /* get min-code-size byte */ + if (source->input_code_size < 2 || source->input_code_size > 8) + ERREXIT1(cinfo, JERR_GIF_CODESIZE, source->input_code_size); + + /* Reached desired image, so break out of loop */ + /* If we wanted to skip this image, */ + /* we'd call SkipDataBlocks and then continue the loop */ + break; + } + + /* Prepare to read selected image: first initialize LZW decompressor */ + source->symbol_head = (UINT16 FAR *) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, LZW_TABLE_SIZE * SIZEOF(UINT16)); + source->symbol_tail = (UINT8 FAR *) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, LZW_TABLE_SIZE * SIZEOF(UINT8)); + source->symbol_stack = (UINT8 FAR *) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, LZW_TABLE_SIZE * SIZEOF(UINT8)); + InitLZWCode(source); + + /* + * If image is interlaced, we read it into a full-size sample array, + * decompressing as we go; then get_interlaced_row selects rows from the + * sample array in the proper order. + */ + if (source->is_interlaced) { + /* We request the virtual array now, but can't access it until virtual + * arrays have been allocated. Hence, the actual work of reading the + * image is postponed until the first call to get_pixel_rows. + */ + source->interlaced_image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + (JDIMENSION) width, (JDIMENSION) height, (JDIMENSION) 1); + if (cinfo->progress != NULL) { + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + progress->total_extra_passes++; /* count file input as separate pass */ + } + source->pub.get_pixel_rows = load_interlaced_image; + } else { + source->pub.get_pixel_rows = get_pixel_rows; + } + + /* Create compressor input buffer. */ + source->pub.buffer = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, + JPOOL_IMAGE, (JDIMENSION) width * NUMCOLORS, (JDIMENSION) 1); + source->pub.buffer_height = 1; + + /* Pad colormap for safety. */ + for (c = colormaplen; c < source->clear_code; c++) { + source->colormap[CM_RED ][c] = + source->colormap[CM_GREEN][c] = + source->colormap[CM_BLUE ][c] = CENTERJSAMPLE; + } + + /* Return info about the image. */ + cinfo->in_color_space = JCS_RGB; + cinfo->input_components = NUMCOLORS; + cinfo->data_precision = BITS_IN_JSAMPLE; /* we always rescale data to this */ + cinfo->image_width = width; + cinfo->image_height = height; + + TRACEMS3(cinfo, 1, JTRC_GIF, width, height, colormaplen); +} + + +/* + * Read one row of pixels. + * This version is used for noninterlaced GIF images: + * we read directly from the GIF file. + */ + +METHODDEF(JDIMENSION) +get_pixel_rows (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + gif_source_ptr source = (gif_source_ptr) sinfo; + register int c; + register JSAMPROW ptr; + register JDIMENSION col; + register JSAMPARRAY colormap = source->colormap; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + c = LZWReadByte(source); + *ptr++ = colormap[CM_RED ][c]; + *ptr++ = colormap[CM_GREEN][c]; + *ptr++ = colormap[CM_BLUE ][c]; + } + return 1; +} + + +/* + * Read one row of pixels. + * This version is used for the first call on get_pixel_rows when + * reading an interlaced GIF file: we read the whole image into memory. + */ + +METHODDEF(JDIMENSION) +load_interlaced_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + gif_source_ptr source = (gif_source_ptr) sinfo; + register JSAMPROW sptr; + register JDIMENSION col; + JDIMENSION row; + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + + /* Read the interlaced image into the virtual array we've created. */ + for (row = 0; row < cinfo->image_height; row++) { + if (progress != NULL) { + progress->pub.pass_counter = (long) row; + progress->pub.pass_limit = (long) cinfo->image_height; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } + sptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, + source->interlaced_image, row, (JDIMENSION) 1, TRUE); + for (col = cinfo->image_width; col > 0; col--) { + *sptr++ = (JSAMPLE) LZWReadByte(source); + } + } + if (progress != NULL) + progress->completed_extra_passes++; + + /* Replace method pointer so subsequent calls don't come here. */ + source->pub.get_pixel_rows = get_interlaced_row; + /* Initialize for get_interlaced_row, and perform first call on it. */ + source->cur_row_number = 0; + source->pass2_offset = (cinfo->image_height + 7) / 8; + source->pass3_offset = source->pass2_offset + (cinfo->image_height + 3) / 8; + source->pass4_offset = source->pass3_offset + (cinfo->image_height + 1) / 4; + + return get_interlaced_row(cinfo, sinfo); +} + + +/* + * Read one row of pixels. + * This version is used for interlaced GIF images: + * we read from the virtual array. + */ + +METHODDEF(JDIMENSION) +get_interlaced_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + gif_source_ptr source = (gif_source_ptr) sinfo; + register int c; + register JSAMPROW sptr, ptr; + register JDIMENSION col; + register JSAMPARRAY colormap = source->colormap; + JDIMENSION irow; + + /* Figure out which row of interlaced image is needed, and access it. */ + switch ((int) (source->cur_row_number & 7)) { + case 0: /* first-pass row */ + irow = source->cur_row_number >> 3; + break; + case 4: /* second-pass row */ + irow = (source->cur_row_number >> 3) + source->pass2_offset; + break; + case 2: /* third-pass row */ + case 6: + irow = (source->cur_row_number >> 2) + source->pass3_offset; + break; + default: /* fourth-pass row */ + irow = (source->cur_row_number >> 1) + source->pass4_offset; + } + sptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, + source->interlaced_image, irow, (JDIMENSION) 1, FALSE); + /* Scan the row, expand colormap, and output */ + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + c = GETJSAMPLE(*sptr++); + *ptr++ = colormap[CM_RED ][c]; + *ptr++ = colormap[CM_GREEN][c]; + *ptr++ = colormap[CM_BLUE ][c]; + } + source->cur_row_number++; /* for next time */ + return 1; +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_input_gif (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + /* no work */ +} + + +/* + * The module selection routine for GIF format input. + */ + +GLOBAL(cjpeg_source_ptr) +jinit_read_gif (j_compress_ptr cinfo) +{ + gif_source_ptr source; + + /* Create module interface object */ + source = (gif_source_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(gif_source_struct)); + source->cinfo = cinfo; /* make back link for subroutines */ + /* Fill in method ptrs, except get_pixel_rows which start_input sets */ + source->pub.start_input = start_input_gif; + source->pub.finish_input = finish_input_gif; + + return &source->pub; +} + +#endif /* GIF_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/rdppm.c b/widget/milsko/milskosrc/external/libjpeg/src/rdppm.c new file mode 100644 index 0000000000..ca6386786d --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/rdppm.c @@ -0,0 +1,501 @@ +/* + * rdppm.c + * + * Copyright (C) 1991-1997, Thomas G. Lane. + * Modified 2009-2020 by Bill Allombert, Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to read input images in PPM/PGM format. + * The extended 2-byte-per-sample raw PPM/PGM formats are supported. + * The PBMPLUS library is NOT required to compile this software + * (but it is highly useful as a set of PPM image manipulation programs). + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume input from + * an ordinary stdio stream. They further assume that reading begins + * at the start of the file; start_input may need work if the + * user interface has already read some data (e.g., to determine that + * the file is indeed PPM format). + */ + +/* Portions of this code are based on the PBMPLUS library, which is: +** +** Copyright (C) 1988 by Jef Poskanzer. +** +** Permission to use, copy, modify, and distribute this software and its +** documentation for any purpose and without fee is hereby granted, provided +** that the above copyright notice appear in all copies and that both that +** copyright notice and this permission notice appear in supporting +** documentation. This software is provided "as is" without express or +** implied warranty. +*/ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef PPM_SUPPORTED + + +/* Macros to deal with unsigned chars as efficiently as compiler allows */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char U_CHAR; +#define UCH(x) ((int) (x)) +#else /* !HAVE_UNSIGNED_CHAR */ +typedef char U_CHAR; +#ifdef CHAR_IS_UNSIGNED +#define UCH(x) ((int) (x)) +#else +#define UCH(x) ((int) (x) & 0xFF) +#endif +#endif /* HAVE_UNSIGNED_CHAR */ + + +#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) + + +/* + * On most systems, reading individual bytes with getc() is drastically less + * efficient than buffering a row at a time with fread(). On PCs, we must + * allocate the buffer in near data space, because we are assuming small-data + * memory model, wherein fread() can't reach far memory. If you need to + * process very wide images on a PC, you might have to compile in large-memory + * model, or else replace fread() with a getc() loop --- which will be much + * slower. + */ + + +/* Private version of data source object */ + +typedef struct { + struct cjpeg_source_struct pub; /* public fields */ + + /* Usually these two pointers point to the same place: */ + U_CHAR *iobuffer; /* fread's I/O buffer */ + JSAMPROW pixrow; /* compressor input buffer */ + size_t buffer_width; /* width of I/O buffer */ + JSAMPLE *rescale; /* => maxval-remapping array, or NULL */ + unsigned int maxval; +} ppm_source_struct; + +typedef ppm_source_struct * ppm_source_ptr; + + +LOCAL(int) +pbm_getc (FILE * infile) +/* Read next char, skipping over any comments */ +/* A comment/newline sequence is returned as a newline */ +{ + register int ch; + + ch = getc(infile); + if (ch == '#') { + do { + ch = getc(infile); + } while (ch != '\n' && ch != EOF); + } + return ch; +} + + +LOCAL(unsigned int) +read_pbm_integer (j_compress_ptr cinfo, FILE * infile) +/* Read an unsigned decimal integer from the PPM file */ +/* Swallows one trailing character after the integer */ +/* Note that on a 16-bit-int machine, only values up to 64k can be read. */ +/* This should not be a problem in practice. */ +{ + register int ch; + register unsigned int val; + + /* Skip any leading whitespace */ + do { + ch = pbm_getc(infile); + if (ch == EOF) + ERREXIT(cinfo, JERR_INPUT_EOF); + } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'); + + if (ch < '0' || ch > '9') + ERREXIT(cinfo, JERR_PPM_NONNUMERIC); + + val = ch - '0'; + while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') { + val *= 10; + val += ch - '0'; + } + return val; +} + + +/* + * Read one row of pixels. + * + * We provide several different versions depending on input file format. + * In all cases, input is scaled to the size of JSAMPLE. + * + * A really fast path is provided for reading byte/sample raw files with + * maxval = MAXJSAMPLE, which is the normal case for 8-bit data. + */ + + +METHODDEF(JDIMENSION) +get_text_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading text-format PGM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + FILE * infile = source->pub.input_file; + register JSAMPROW ptr; + register JSAMPLE *rescale = source->rescale; + unsigned int maxval = source->maxval; + JDIMENSION col; + + ptr = source->pixrow; + for (col = cinfo->image_width; col > 0; col--) { + register unsigned int temp; + temp = read_pbm_integer(cinfo, infile); + if (temp > maxval) + ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); + *ptr++ = rescale[temp]; + } + return 1; +} + + +METHODDEF(JDIMENSION) +get_text_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading text-format PPM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + FILE * infile = source->pub.input_file; + register JSAMPROW ptr; + register JSAMPLE *rescale = source->rescale; + unsigned int maxval = source->maxval; + JDIMENSION col; + + ptr = source->pixrow; + for (col = cinfo->image_width; col > 0; col--) { + register unsigned int temp; + temp = read_pbm_integer(cinfo, infile); + if (temp > maxval) + ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); + *ptr++ = rescale[temp]; + temp = read_pbm_integer(cinfo, infile); + if (temp > maxval) + ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); + *ptr++ = rescale[temp]; + temp = read_pbm_integer(cinfo, infile); + if (temp > maxval) + ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); + *ptr++ = rescale[temp]; + } + return 1; +} + + +METHODDEF(JDIMENSION) +get_scaled_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading raw-byte-format PGM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + register JSAMPROW ptr; + register U_CHAR * bufferptr; + register JSAMPLE *rescale = source->rescale; + unsigned int maxval = source->maxval; + JDIMENSION col; + + if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) + ERREXIT(cinfo, JERR_INPUT_EOF); + ptr = source->pixrow; + bufferptr = source->iobuffer; + for (col = cinfo->image_width; col > 0; col--) { + register unsigned int temp; + temp = (unsigned int) UCH(*bufferptr++); + if (temp > maxval) + ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); + *ptr++ = rescale[temp]; + } + return 1; +} + + +METHODDEF(JDIMENSION) +get_scaled_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading raw-byte-format PPM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + register JSAMPROW ptr; + register U_CHAR * bufferptr; + register JSAMPLE *rescale = source->rescale; + unsigned int maxval = source->maxval; + JDIMENSION col; + + if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) + ERREXIT(cinfo, JERR_INPUT_EOF); + ptr = source->pixrow; + bufferptr = source->iobuffer; + for (col = cinfo->image_width; col > 0; col--) { + register unsigned int temp; + temp = (unsigned int) UCH(*bufferptr++); + if (temp > maxval) + ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); + *ptr++ = rescale[temp]; + temp = (unsigned int) UCH(*bufferptr++); + if (temp > maxval) + ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); + *ptr++ = rescale[temp]; + temp = (unsigned int) UCH(*bufferptr++); + if (temp > maxval) + ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); + *ptr++ = rescale[temp]; + } + return 1; +} + + +METHODDEF(JDIMENSION) +get_raw_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading raw-byte-format files with maxval = MAXJSAMPLE. + * In this case we just read right into the JSAMPLE buffer! + * Note that same code works for PPM and PGM files. + */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + + if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) + ERREXIT(cinfo, JERR_INPUT_EOF); + return 1; +} + + +METHODDEF(JDIMENSION) +get_word_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading raw-word-format PGM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + register JSAMPROW ptr; + register U_CHAR * bufferptr; + register JSAMPLE *rescale = source->rescale; + unsigned int maxval = source->maxval; + JDIMENSION col; + + if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) + ERREXIT(cinfo, JERR_INPUT_EOF); + ptr = source->pixrow; + bufferptr = source->iobuffer; + for (col = cinfo->image_width; col > 0; col--) { + register unsigned int temp; + temp = ((unsigned int) UCH(*bufferptr++)) << 8; + temp |= (unsigned int) UCH(*bufferptr++); + if (temp > maxval) + ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); + *ptr++ = rescale[temp]; + } + return 1; +} + + +METHODDEF(JDIMENSION) +get_word_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading raw-word-format PPM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + register JSAMPROW ptr; + register U_CHAR * bufferptr; + register JSAMPLE *rescale = source->rescale; + unsigned int maxval = source->maxval; + JDIMENSION col; + + if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) + ERREXIT(cinfo, JERR_INPUT_EOF); + ptr = source->pixrow; + bufferptr = source->iobuffer; + for (col = cinfo->image_width; col > 0; col--) { + register unsigned int temp; + temp = ((unsigned int) UCH(*bufferptr++)) << 8; + temp |= (unsigned int) UCH(*bufferptr++); + if (temp > maxval) + ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); + *ptr++ = rescale[temp]; + temp = ((unsigned int) UCH(*bufferptr++)) << 8; + temp |= (unsigned int) UCH(*bufferptr++); + if (temp > maxval) + ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); + *ptr++ = rescale[temp]; + temp = ((unsigned int) UCH(*bufferptr++)) << 8; + temp |= (unsigned int) UCH(*bufferptr++); + if (temp > maxval) + ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); + *ptr++ = rescale[temp]; + } + return 1; +} + + +/* + * Read the file header; return image size and component count. + */ + +METHODDEF(void) +start_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + int c; + unsigned int w, h, maxval; + boolean need_iobuffer, use_raw_buffer, need_rescale; + + if (getc(source->pub.input_file) != 'P') + ERREXIT(cinfo, JERR_PPM_NOT); + + c = getc(source->pub.input_file); /* subformat discriminator character */ + + /* detect unsupported variants (ie, PBM) before trying to read header */ + switch (c) { + case '2': /* it's a text-format PGM file */ + case '3': /* it's a text-format PPM file */ + case '5': /* it's a raw-format PGM file */ + case '6': /* it's a raw-format PPM file */ + break; + default: + ERREXIT(cinfo, JERR_PPM_NOT); + } + + /* fetch the remaining header info */ + w = read_pbm_integer(cinfo, source->pub.input_file); + h = read_pbm_integer(cinfo, source->pub.input_file); + maxval = read_pbm_integer(cinfo, source->pub.input_file); + + if (w <= 0 || h <= 0 || maxval <= 0) /* error check */ + ERREXIT(cinfo, JERR_PPM_NOT); + + if (((long) w >> 24) || /* sanity check for buffer allocation below */ + ((long) maxval >> 16)) /* support max 16-bit (2-byte) sample values */ + ERREXIT(cinfo, JERR_PPM_OUTOFRANGE); + + cinfo->data_precision = BITS_IN_JSAMPLE; /* we always rescale data to this */ + cinfo->image_width = (JDIMENSION) w; + cinfo->image_height = (JDIMENSION) h; + source->maxval = maxval; + + /* initialize flags to most common settings */ + need_iobuffer = TRUE; /* do we need an I/O buffer? */ + use_raw_buffer = FALSE; /* do we map input buffer onto I/O buffer? */ + need_rescale = TRUE; /* do we need a rescale array? */ + + switch (c) { + case '2': /* it's a text-format PGM file */ + cinfo->input_components = 1; + cinfo->in_color_space = JCS_GRAYSCALE; + TRACEMS2(cinfo, 1, JTRC_PGM_TEXT, w, h); + source->pub.get_pixel_rows = get_text_gray_row; + need_iobuffer = FALSE; + break; + + case '3': /* it's a text-format PPM file */ + cinfo->input_components = 3; + cinfo->in_color_space = JCS_RGB; + TRACEMS2(cinfo, 1, JTRC_PPM_TEXT, w, h); + source->pub.get_pixel_rows = get_text_rgb_row; + need_iobuffer = FALSE; + break; + + case '5': /* it's a raw-format PGM file */ + cinfo->input_components = 1; + cinfo->in_color_space = JCS_GRAYSCALE; + TRACEMS2(cinfo, 1, JTRC_PGM, w, h); + if (maxval > 255) { + source->pub.get_pixel_rows = get_word_gray_row; + } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) { + source->pub.get_pixel_rows = get_raw_row; + use_raw_buffer = TRUE; + need_rescale = FALSE; + } else { + source->pub.get_pixel_rows = get_scaled_gray_row; + } + break; + + case '6': /* it's a raw-format PPM file */ + cinfo->input_components = 3; + cinfo->in_color_space = JCS_RGB; + TRACEMS2(cinfo, 1, JTRC_PPM, w, h); + if (maxval > 255) { + source->pub.get_pixel_rows = get_word_rgb_row; + } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) { + source->pub.get_pixel_rows = get_raw_row; + use_raw_buffer = TRUE; + need_rescale = FALSE; + } else { + source->pub.get_pixel_rows = get_scaled_rgb_row; + } + break; + } + + /* Allocate space for I/O buffer: 1 or 3 bytes or words/pixel. */ + if (need_iobuffer) { + source->buffer_width = (size_t) w * (size_t) cinfo->input_components * + ((maxval <= 255) ? SIZEOF(U_CHAR) : (2 * SIZEOF(U_CHAR))); + source->iobuffer = (U_CHAR *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, source->buffer_width); + } + + /* Create compressor input buffer. */ + if (use_raw_buffer) { + /* For unscaled raw-input case, we can just map it onto the I/O buffer. */ + /* Cast here implies near->far pointer conversion on PCs */ + source->pixrow = (JSAMPROW) source->iobuffer; + } else { + /* Need to translate anyway, so make a separate sample buffer. */ + source->pixrow = (JSAMPROW) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (size_t) w * + (size_t) cinfo->input_components * SIZEOF(JSAMPLE)); + } + /* Synthesize a JSAMPARRAY pointer structure */ + source->pub.buffer = & source->pixrow; + source->pub.buffer_height = 1; + + /* Compute the rescaling array if required. */ + if (need_rescale) { + INT32 val, half_maxval; + + /* On 16-bit-int machines we have to be careful of maxval = 65535 */ + source->rescale = (JSAMPLE *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, + JPOOL_IMAGE, ((size_t) maxval + (size_t) 1) * SIZEOF(JSAMPLE)); + half_maxval = maxval / 2; + for (val = 0; val <= (INT32) maxval; val++) { + /* The multiplication here must be done in 32 bits to avoid overflow */ + source->rescale[val] = (JSAMPLE) ((val * MAXJSAMPLE + half_maxval) / maxval); + } + } +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + /* no work */ +} + + +/* + * The module selection routine for PPM format input. + */ + +GLOBAL(cjpeg_source_ptr) +jinit_read_ppm (j_compress_ptr cinfo) +{ + ppm_source_ptr source; + + /* Create module interface object */ + source = (ppm_source_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(ppm_source_struct)); + /* Fill in method ptrs, except get_pixel_rows which start_input sets */ + source->pub.start_input = start_input_ppm; + source->pub.finish_input = finish_input_ppm; + + return &source->pub; +} + +#endif /* PPM_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/rdrle.c b/widget/milsko/milskosrc/external/libjpeg/src/rdrle.c new file mode 100644 index 0000000000..06f2e8aad4 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/rdrle.c @@ -0,0 +1,380 @@ +/* + * rdrle.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * Modified 2019 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to read input images in Utah RLE format. + * The Utah Raster Toolkit library is required (version 3.1 or later). + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume input from + * an ordinary stdio stream. They further assume that reading begins + * at the start of the file; start_input may need work if the + * user interface has already read some data (e.g., to determine that + * the file is indeed RLE format). + * + * Based on code contributed by Mike Lijewski, + * with updates from Robert Hutchinson. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef RLE_SUPPORTED + +/* rle.h is provided by the Utah Raster Toolkit. */ + +#include + +/* + * We assume that JSAMPLE has the same representation as rle_pixel, + * to wit, "unsigned char". Hence we can't cope with 12- or 16-bit samples. + */ + +#if BITS_IN_JSAMPLE != 8 + Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ +#endif + +/* + * We support the following types of RLE files: + * + * GRAYSCALE - 8 bits, no colormap + * MAPPEDGRAY - 8 bits, 1 channel colomap + * PSEUDOCOLOR - 8 bits, 3 channel colormap + * TRUECOLOR - 24 bits, 3 channel colormap + * DIRECTCOLOR - 24 bits, no colormap + * + * For now, we ignore any alpha channel in the image. + */ + +typedef enum + { GRAYSCALE, MAPPEDGRAY, PSEUDOCOLOR, TRUECOLOR, DIRECTCOLOR } rle_kind; + + +/* + * Since RLE stores scanlines bottom-to-top, we have to invert the image + * to conform to JPEG's top-to-bottom order. To do this, we read the + * incoming image into a virtual array on the first get_pixel_rows call, + * then fetch the required row from the virtual array on subsequent calls. + */ + +typedef struct _rle_source_struct * rle_source_ptr; + +typedef struct _rle_source_struct { + struct cjpeg_source_struct pub; /* public fields */ + + rle_kind visual; /* actual type of input file */ + jvirt_sarray_ptr image; /* virtual array to hold the image */ + JDIMENSION row; /* current row # in the virtual array */ + rle_hdr header; /* Input file information */ + rle_pixel **rle_row; /* holds a row returned by rle_getrow() */ + +} rle_source_struct; + + +/* + * Read the file header; return image size and component count. + */ + +METHODDEF(void) +start_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + rle_source_ptr source = (rle_source_ptr) sinfo; + JDIMENSION width, height; +#ifdef PROGRESS_REPORT + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; +#endif + + /* Use RLE library routine to get the header info */ + source->header = *rle_hdr_init(NULL); + source->header.rle_file = source->pub.input_file; + switch (rle_get_setup(&(source->header))) { + case RLE_SUCCESS: + /* A-OK */ + break; + case RLE_NOT_RLE: + ERREXIT(cinfo, JERR_RLE_NOT); + case RLE_NO_SPACE: + ERREXIT(cinfo, JERR_RLE_MEM); + case RLE_EMPTY: + ERREXIT(cinfo, JERR_RLE_EMPTY); + case RLE_EOF: + ERREXIT(cinfo, JERR_RLE_EOF); + default: + ERREXIT(cinfo, JERR_RLE_BADERROR); + } + + /* Figure out what we have, set private vars and return values accordingly */ + + width = source->header.xmax - source->header.xmin + 1; + height = source->header.ymax - source->header.ymin + 1; + source->header.xmin = 0; /* realign horizontally */ + source->header.xmax = width-1; + + cinfo->image_width = width; + cinfo->image_height = height; + cinfo->data_precision = 8; /* we can only handle 8 bit data */ + + if (source->header.ncolors == 1 && source->header.ncmap == 0) { + source->visual = GRAYSCALE; + TRACEMS2(cinfo, 1, JTRC_RLE_GRAY, width, height); + } else if (source->header.ncolors == 1 && source->header.ncmap == 1) { + source->visual = MAPPEDGRAY; + TRACEMS3(cinfo, 1, JTRC_RLE_MAPGRAY, width, height, + 1 << source->header.cmaplen); + } else if (source->header.ncolors == 1 && source->header.ncmap == 3) { + source->visual = PSEUDOCOLOR; + TRACEMS3(cinfo, 1, JTRC_RLE_MAPPED, width, height, + 1 << source->header.cmaplen); + } else if (source->header.ncolors == 3 && source->header.ncmap == 3) { + source->visual = TRUECOLOR; + TRACEMS3(cinfo, 1, JTRC_RLE_FULLMAP, width, height, + 1 << source->header.cmaplen); + } else if (source->header.ncolors == 3 && source->header.ncmap == 0) { + source->visual = DIRECTCOLOR; + TRACEMS2(cinfo, 1, JTRC_RLE, width, height); + } else + ERREXIT(cinfo, JERR_RLE_UNSUPPORTED); + + if (source->visual == GRAYSCALE || source->visual == MAPPEDGRAY) { + cinfo->in_color_space = JCS_GRAYSCALE; + cinfo->input_components = 1; + } else { + cinfo->in_color_space = JCS_RGB; + cinfo->input_components = 3; + } + + /* + * A place to hold each scanline while it's converted. + * (GRAYSCALE scanlines don't need converting) + */ + if (source->visual != GRAYSCALE) { + source->rle_row = (rle_pixel **) (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + width, (JDIMENSION) cinfo->input_components); + } + + /* request a virtual array to hold the image */ + source->image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + width * (JDIMENSION) source->header.ncolors, height, (JDIMENSION) 1); + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + /* count file input as separate pass */ + progress->total_extra_passes++; + } +#endif + + source->pub.buffer_height = 1; +} + + +/* + * Read one row of pixels. + * Called only after load_image has read the image into the virtual array. + * Used for GRAYSCALE, MAPPEDGRAY, TRUECOLOR, and DIRECTCOLOR images. + */ + +METHODDEF(JDIMENSION) +get_rle_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + rle_source_ptr source = (rle_source_ptr) sinfo; + + source->row--; + source->pub.buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE); + + return 1; +} + +/* + * Read one row of pixels. + * Called only after load_image has read the image into the virtual array. + * Used for PSEUDOCOLOR images. + */ + +METHODDEF(JDIMENSION) +get_pseudocolor_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + rle_source_ptr source = (rle_source_ptr) sinfo; + JSAMPROW src_row, dest_row; + JDIMENSION col; + rle_map *colormap; + int val; + + colormap = source->header.cmap; + dest_row = source->pub.buffer[0]; + source->row--; + src_row = * (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE); + + for (col = cinfo->image_width; col > 0; col--) { + val = GETJSAMPLE(*src_row++); + *dest_row++ = (JSAMPLE) (colormap[val ] >> 8); + *dest_row++ = (JSAMPLE) (colormap[val + 256] >> 8); + *dest_row++ = (JSAMPLE) (colormap[val + 512] >> 8); + } + + return 1; +} + + +/* + * Load the image into a virtual array. We have to do this because RLE + * files start at the lower left while the JPEG standard has them starting + * in the upper left. This is called the first time we want to get a row + * of input. What we do is load the RLE data into the array and then call + * the appropriate routine to read one row from the array. Before returning, + * we set source->pub.get_pixel_rows so that subsequent calls go straight to + * the appropriate row-reading routine. + */ + +METHODDEF(JDIMENSION) +load_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + rle_source_ptr source = (rle_source_ptr) sinfo; + JDIMENSION row, col; + JSAMPROW scanline, red_ptr, green_ptr, blue_ptr; + rle_pixel **rle_row; + rle_map *colormap; + char channel; +#ifdef PROGRESS_REPORT + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; +#endif + + /* Read the RLE data into our virtual array. + * We assume here that (a) rle_pixel is represented the same as JSAMPLE, + * and (b) we are not on a machine where FAR pointers differ from regular. + */ + RLE_CLR_BIT(source->header, RLE_ALPHA); /* don't read the alpha channel */ + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_limit = cinfo->image_height; + progress->pub.pass_counter = 0; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + + switch (source->visual) { + + case GRAYSCALE: + case PSEUDOCOLOR: + for (row = 0; row < cinfo->image_height; row++) { + rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); + rle_getrow(&source->header, rle_row); +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_counter++; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + } + break; + + case MAPPEDGRAY: + case TRUECOLOR: + rle_row = source->rle_row; + colormap = source->header.cmap; + for (row = 0; row < cinfo->image_height; row++) { + rle_getrow(&source->header, rle_row); + scanline = * (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); + + for (col = 0; col < cinfo->image_width; col++) { + for (channel = 0; channel < source->header.ncolors; channel++) { + *scanline++ = (JSAMPLE) + (colormap[GETJSAMPLE(rle_row[channel][col]) + 256 * channel] >> 8); + } + } + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_counter++; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + } + break; + + case DIRECTCOLOR: + rle_row = source->rle_row; + for (row = 0; row < cinfo->image_height; row++) { + rle_getrow(&source->header, rle_row); + scanline = * (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); + + red_ptr = rle_row[0]; + green_ptr = rle_row[1]; + blue_ptr = rle_row[2]; + + for (col = cinfo->image_width; col > 0; col--) { + *scanline++ = *red_ptr++; + *scanline++ = *green_ptr++; + *scanline++ = *blue_ptr++; + } + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_counter++; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + } + } + +#ifdef PROGRESS_REPORT + if (progress != NULL) + progress->completed_extra_passes++; +#endif + + /* Set up to call proper row-extraction routine in future */ + if (source->visual == PSEUDOCOLOR) { + source->pub.buffer = source->rle_row; + source->pub.get_pixel_rows = get_pseudocolor_row; + } else { + source->pub.get_pixel_rows = get_rle_row; + } + source->row = cinfo->image_height; + + /* And fetch the topmost (bottommost) row */ + return (*source->pub.get_pixel_rows) (cinfo, sinfo); +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + /* no work */ +} + + +/* + * The module selection routine for RLE format input. + */ + +GLOBAL(cjpeg_source_ptr) +jinit_read_rle (j_compress_ptr cinfo) +{ + rle_source_ptr source; + + /* Create module interface object */ + source = (rle_source_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(rle_source_struct)); + /* Fill in method ptrs */ + source->pub.start_input = start_input_rle; + source->pub.finish_input = finish_input_rle; + source->pub.get_pixel_rows = load_image; + + return &source->pub; +} + +#endif /* RLE_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/rdswitch.c b/widget/milsko/milskosrc/external/libjpeg/src/rdswitch.c new file mode 100644 index 0000000000..8a6675dbc6 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/rdswitch.c @@ -0,0 +1,363 @@ +/* + * rdswitch.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * Modified 2003-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to process some of cjpeg's more complicated + * command-line switches. Switches processed here are: + * -qtables file Read quantization tables from text file + * -scans file Read scan script from text file + * -quality N[,N,...] Set quality ratings + * -qslots N[,N,...] Set component quantization table selectors + * -sample HxV[,HxV,...] Set component sampling factors + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ +#include /* to declare isdigit(), isspace() */ + + +LOCAL(int) +text_getc (FILE * file) +/* Read next char, skipping over any comments (# to end of line) */ +/* A comment/newline sequence is returned as a newline */ +{ + register int ch; + + ch = getc(file); + if (ch == '#') { + do { + ch = getc(file); + } while (ch != '\n' && ch != EOF); + } + return ch; +} + + +LOCAL(boolean) +read_text_integer (FILE * file, long * result, int * termchar) +/* Read an unsigned decimal integer from a file, store it in result */ +/* Reads one trailing character after the integer; returns it in termchar */ +{ + register int ch; + register long val; + + /* Skip any leading whitespace, detect EOF */ + do { + ch = text_getc(file); + if (ch == EOF) { + *termchar = ch; + return FALSE; + } + } while (isspace(ch)); + + if (! isdigit(ch)) { + *termchar = ch; + return FALSE; + } + + val = ch - '0'; + while ((ch = text_getc(file)) != EOF) { + if (! isdigit(ch)) + break; + val *= 10; + val += ch - '0'; + } + *result = val; + *termchar = ch; + return TRUE; +} + + +GLOBAL(boolean) +read_quant_tables (j_compress_ptr cinfo, char * filename, boolean force_baseline) +/* Read a set of quantization tables from the specified file. + * The file is plain ASCII text: decimal numbers with whitespace between. + * Comments preceded by '#' may be included in the file. + * There may be one to NUM_QUANT_TBLS tables in the file, each of 64 values. + * The tables are implicitly numbered 0,1,etc. + * NOTE: does not affect the qslots mapping, which will default to selecting + * table 0 for luminance (or primary) components, 1 for chrominance components. + * You must use -qslots if you want a different component->table mapping. + */ +{ + FILE * fp; + int tblno, i, termchar; + long val; + unsigned int table[DCTSIZE2]; + + if ((fp = fopen(filename, "r")) == NULL) { + fprintf(stderr, "Can't open table file %s\n", filename); + return FALSE; + } + tblno = 0; + + while (read_text_integer(fp, &val, &termchar)) { /* read 1st element of table */ + if (tblno >= NUM_QUANT_TBLS) { + fprintf(stderr, "Too many tables in file %s\n", filename); + fclose(fp); + return FALSE; + } + table[0] = (unsigned int) val; + for (i = 1; i < DCTSIZE2; i++) { + if (! read_text_integer(fp, &val, &termchar)) { + fprintf(stderr, "Invalid table data in file %s\n", filename); + fclose(fp); + return FALSE; + } + table[i] = (unsigned int) val; + } + jpeg_add_quant_table(cinfo, tblno, table, cinfo->q_scale_factor[tblno], + force_baseline); + tblno++; + } + + if (termchar != EOF) { + fprintf(stderr, "Non-numeric data in file %s\n", filename); + fclose(fp); + return FALSE; + } + + fclose(fp); + return TRUE; +} + + +#ifdef C_MULTISCAN_FILES_SUPPORTED + +LOCAL(boolean) +read_scan_integer (FILE * file, long * result, int * termchar) +/* Variant of read_text_integer that always looks for a non-space termchar; + * this simplifies parsing of punctuation in scan scripts. + */ +{ + register int ch; + + if (! read_text_integer(file, result, termchar)) + return FALSE; + ch = *termchar; + while (ch != EOF && isspace(ch)) + ch = text_getc(file); + if (isdigit(ch)) { /* oops, put it back */ + if (ungetc(ch, file) == EOF) + return FALSE; + ch = ' '; + } else { + /* Any separators other than ';' and ':' are ignored; + * this allows user to insert commas, etc, if desired. + */ + if (ch != EOF && ch != ';' && ch != ':') + ch = ' '; + } + *termchar = ch; + return TRUE; +} + + +GLOBAL(boolean) +read_scan_script (j_compress_ptr cinfo, char * filename) +/* Read a scan script from the specified text file. + * Each entry in the file defines one scan to be emitted. + * Entries are separated by semicolons ';'. + * An entry contains one to four component indexes, + * optionally followed by a colon ':' and four progressive-JPEG parameters. + * The component indexes denote which component(s) are to be transmitted + * in the current scan. The first component has index 0. + * Sequential JPEG is used if the progressive-JPEG parameters are omitted. + * The file is free format text: any whitespace may appear between numbers + * and the ':' and ';' punctuation marks. Also, other punctuation (such + * as commas or dashes) can be placed between numbers if desired. + * Comments preceded by '#' may be included in the file. + * Note: we do very little validity checking here; + * jcmaster.c will validate the script parameters. + */ +{ + FILE * fp; + int scanno, ncomps, termchar; + long val; + jpeg_scan_info * scanptr; +#define MAX_SCANS 100 /* quite arbitrary limit */ + jpeg_scan_info scans[MAX_SCANS]; + + if ((fp = fopen(filename, "r")) == NULL) { + fprintf(stderr, "Can't open scan definition file %s\n", filename); + return FALSE; + } + scanptr = scans; + scanno = 0; + + while (read_scan_integer(fp, &val, &termchar)) { + if (scanno >= MAX_SCANS) { + fprintf(stderr, "Too many scans defined in file %s\n", filename); + fclose(fp); + return FALSE; + } + scanptr->component_index[0] = (int) val; + ncomps = 1; + while (termchar == ' ') { + if (ncomps >= MAX_COMPS_IN_SCAN) { + fprintf(stderr, "Too many components in one scan in file %s\n", + filename); + fclose(fp); + return FALSE; + } + if (! read_scan_integer(fp, &val, &termchar)) + goto bogus; + scanptr->component_index[ncomps] = (int) val; + ncomps++; + } + scanptr->comps_in_scan = ncomps; + if (termchar == ':') { + if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ') + goto bogus; + scanptr->Ss = (int) val; + if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ') + goto bogus; + scanptr->Se = (int) val; + if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ') + goto bogus; + scanptr->Ah = (int) val; + if (! read_scan_integer(fp, &val, &termchar)) + goto bogus; + scanptr->Al = (int) val; + } else { + /* set non-progressive parameters */ + scanptr->Ss = 0; + scanptr->Se = DCTSIZE2-1; + scanptr->Ah = 0; + scanptr->Al = 0; + } + if (termchar != ';' && termchar != EOF) { +bogus: + fprintf(stderr, "Invalid scan entry format in file %s\n", filename); + fclose(fp); + return FALSE; + } + scanptr++, scanno++; + } + + if (termchar != EOF) { + fprintf(stderr, "Non-numeric data in file %s\n", filename); + fclose(fp); + return FALSE; + } + + if (scanno > 0) { + /* Stash completed scan list in cinfo structure. + * NOTE: for cjpeg's use, JPOOL_IMAGE is the right lifetime for this data, + * but if you want to compress multiple images you'd want JPOOL_PERMANENT. + */ + scanptr = (jpeg_scan_info *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, scanno * SIZEOF(jpeg_scan_info)); + MEMCOPY(scanptr, scans, scanno * SIZEOF(jpeg_scan_info)); + cinfo->scan_info = scanptr; + cinfo->num_scans = scanno; + } + + fclose(fp); + return TRUE; +} + +#endif /* C_MULTISCAN_FILES_SUPPORTED */ + + +GLOBAL(boolean) +set_quality_ratings (j_compress_ptr cinfo, char *arg, boolean force_baseline) +/* Process a quality-ratings parameter string, of the form + * N[,N,...] + * If there are more q-table slots than parameters, the last value is replicated. + */ +{ + int val = 75; /* default value */ + int tblno; + char ch; + + for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) { + if (*arg) { + ch = ','; /* if not set by sscanf, will be ',' */ + if (sscanf(arg, "%d%c", &val, &ch) < 1) + return FALSE; + if (ch != ',') /* syntax check */ + return FALSE; + /* Convert user 0-100 rating to percentage scaling */ + cinfo->q_scale_factor[tblno] = jpeg_quality_scaling(val); + while (*arg && *arg++ != ','); /* advance to next segment of arg string */ + } else { + /* reached end of parameter, set remaining factors to last value */ + cinfo->q_scale_factor[tblno] = jpeg_quality_scaling(val); + } + } + jpeg_default_qtables(cinfo, force_baseline); + return TRUE; +} + + +GLOBAL(boolean) +set_quant_slots (j_compress_ptr cinfo, char *arg) +/* Process a quantization-table-selectors parameter string, of the form + * N[,N,...] + * If there are more components than parameters, the last value is replicated. + */ +{ + int val = 0; /* default table # */ + int ci; + char ch; + + for (ci = 0; ci < MAX_COMPONENTS; ci++) { + if (*arg) { + ch = ','; /* if not set by sscanf, will be ',' */ + if (sscanf(arg, "%d%c", &val, &ch) < 1) + return FALSE; + if (ch != ',') /* syntax check */ + return FALSE; + if (val < 0 || val >= NUM_QUANT_TBLS) { + fprintf(stderr, "JPEG quantization tables are numbered 0..%d\n", + NUM_QUANT_TBLS-1); + return FALSE; + } + cinfo->comp_info[ci].quant_tbl_no = val; + while (*arg && *arg++ != ','); /* advance to next segment of arg string */ + } else { + /* reached end of parameter, set remaining components to last table */ + cinfo->comp_info[ci].quant_tbl_no = val; + } + } + return TRUE; +} + + +GLOBAL(boolean) +set_sample_factors (j_compress_ptr cinfo, char *arg) +/* Process a sample-factors parameter string, of the form + * HxV[,HxV,...] + * If there are more components than parameters, "1x1" is assumed for the rest. + */ +{ + int ci, val1, val2; + char ch1, ch2; + + for (ci = 0; ci < MAX_COMPONENTS; ci++) { + if (*arg) { + ch2 = ','; /* if not set by sscanf, will be ',' */ + if (sscanf(arg, "%d%c%d%c", &val1, &ch1, &val2, &ch2) < 3) + return FALSE; + if ((ch1 != 'x' && ch1 != 'X') || ch2 != ',') /* syntax check */ + return FALSE; + if (val1 <= 0 || val1 > MAX_SAMP_FACTOR || + val2 <= 0 || val2 > MAX_SAMP_FACTOR) { + fprintf(stderr, "JPEG sampling factors must be 1..%d\n", MAX_SAMP_FACTOR); + return FALSE; + } + cinfo->comp_info[ci].h_samp_factor = val1; + cinfo->comp_info[ci].v_samp_factor = val2; + while (*arg && *arg++ != ','); /* advance to next segment of arg string */ + } else { + /* reached end of parameter, set remaining components to 1x1 sampling */ + cinfo->comp_info[ci].h_samp_factor = 1; + cinfo->comp_info[ci].v_samp_factor = 1; + } + } + return TRUE; +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/rdtarga.c b/widget/milsko/milskosrc/external/libjpeg/src/rdtarga.c new file mode 100644 index 0000000000..c72ad73f6c --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/rdtarga.c @@ -0,0 +1,500 @@ +/* + * rdtarga.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * Modified 2017-2019 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to read input images in Targa format. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume input from + * an ordinary stdio stream. They further assume that reading begins + * at the start of the file; start_input may need work if the + * user interface has already read some data (e.g., to determine that + * the file is indeed Targa format). + * + * Based on code contributed by Lee Daniel Crocker. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef TARGA_SUPPORTED + + +/* Macros to deal with unsigned chars as efficiently as compiler allows */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char U_CHAR; +#define UCH(x) ((int) (x)) +#else /* !HAVE_UNSIGNED_CHAR */ +typedef char U_CHAR; +#ifdef CHAR_IS_UNSIGNED +#define UCH(x) ((int) (x)) +#else +#define UCH(x) ((int) (x) & 0xFF) +#endif +#endif /* HAVE_UNSIGNED_CHAR */ + + +#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) + + +/* Private version of data source object */ + +typedef struct _tga_source_struct * tga_source_ptr; + +typedef struct _tga_source_struct { + struct cjpeg_source_struct pub; /* public fields */ + + j_compress_ptr cinfo; /* back link saves passing separate parm */ + + JSAMPARRAY colormap; /* Targa colormap (converted to my format) */ + + jvirt_sarray_ptr whole_image; /* Needed if funny input row order */ + JDIMENSION current_row; /* Current logical row number to read */ + + /* Pointer to routine to extract next Targa pixel from input file */ + JMETHOD(void, read_pixel, (tga_source_ptr sinfo)); + + /* Result of read_pixel is delivered here: */ + U_CHAR tga_pixel[4]; + + int pixel_size; /* Bytes per Targa pixel (1 to 4) */ + int cmap_length; /* colormap length */ + + /* State info for reading RLE-coded pixels; both counts must be init to 0 */ + int block_count; /* # of pixels remaining in RLE block */ + int dup_pixel_count; /* # of times to duplicate previous pixel */ + + /* This saves the correct pixel-row-expansion method for preload_image */ + JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, + cjpeg_source_ptr sinfo)); +} tga_source_struct; + + +/* For expanding 5-bit pixel values to 8-bit with best rounding */ + +static const UINT8 c5to8bits[32] = { + 0, 8, 16, 25, 33, 41, 49, 58, + 66, 74, 82, 90, 99, 107, 115, 123, + 132, 140, 148, 156, 165, 173, 181, 189, + 197, 206, 214, 222, 230, 239, 247, 255 +}; + + + +LOCAL(int) +read_byte (tga_source_ptr sinfo) +/* Read next byte from Targa file */ +{ + register FILE *infile = sinfo->pub.input_file; + register int c; + + if ((c = getc(infile)) == EOF) + ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); + return c; +} + + +LOCAL(void) +read_colormap (tga_source_ptr sinfo, int cmaplen, int mapentrysize) +/* Read the colormap from a Targa file */ +{ + int i; + + /* Presently only handles 24-bit BGR format */ + if (mapentrysize != 24) + ERREXIT(sinfo->cinfo, JERR_TGA_BADCMAP); + + for (i = 0; i < cmaplen; i++) { + sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo); + } +} + + +/* + * read_pixel methods: get a single pixel from Targa file into tga_pixel[] + */ + +METHODDEF(void) +read_non_rle_pixel (tga_source_ptr sinfo) +/* Read one Targa pixel from the input file; no RLE expansion */ +{ + register int i; + + for (i = 0; i < sinfo->pixel_size; i++) { + sinfo->tga_pixel[i] = (U_CHAR) read_byte(sinfo); + } +} + +METHODDEF(void) +read_rle_pixel (tga_source_ptr sinfo) +/* Read one Targa pixel from the input file, expanding RLE data as needed */ +{ + register int i; + + /* Duplicate previously read pixel? */ + if (sinfo->dup_pixel_count > 0) { + sinfo->dup_pixel_count--; + return; + } + + /* Time to read RLE block header? */ + if (--sinfo->block_count < 0) { /* decrement pixels remaining in block */ + i = read_byte(sinfo); + if (i & 0x80) { /* Start of duplicate-pixel block? */ + sinfo->dup_pixel_count = i & 0x7F; /* number of dups after this one */ + sinfo->block_count = 0; /* then read new block header */ + } else { + sinfo->block_count = i & 0x7F; /* number of pixels after this one */ + } + } + + /* Read next pixel */ + for (i = 0; i < sinfo->pixel_size; i++) { + sinfo->tga_pixel[i] = (U_CHAR) read_byte(sinfo); + } +} + + +/* + * Read one row of pixels. + * + * We provide several different versions depending on input file format. + */ + +METHODDEF(JDIMENSION) +get_8bit_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 8-bit grayscale pixels */ +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + register JSAMPROW ptr; + register JDIMENSION col; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ + *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]); + } + return 1; +} + +METHODDEF(JDIMENSION) +get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 8-bit colormap indexes */ +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + register JSAMPROW ptr; + register JSAMPARRAY colormap; + register JDIMENSION col; + register int t; + int cmaplen; + + ptr = source->pub.buffer[0]; + colormap = source->colormap; + cmaplen = source->cmap_length; + for (col = cinfo->image_width; col > 0; col--) { + (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ + t = UCH(source->tga_pixel[0]); + if (t >= cmaplen) + ERREXIT(cinfo, JERR_TGA_BADPARMS); + *ptr++ = colormap[0][t]; + *ptr++ = colormap[1][t]; + *ptr++ = colormap[2][t]; + } + return 1; +} + +METHODDEF(JDIMENSION) +get_16bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 16-bit pixels */ +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + register int t; + register JSAMPROW ptr; + register JDIMENSION col; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ + t = UCH(source->tga_pixel[0]); + t += UCH(source->tga_pixel[1]) << 8; + /* We expand 5 bit data to 8 bit sample width. + * The format of the 16-bit (LSB first) input word is + * xRRRRRGGGGGBBBBB + */ + ptr[2] = (JSAMPLE) c5to8bits[t & 0x1F]; + t >>= 5; + ptr[1] = (JSAMPLE) c5to8bits[t & 0x1F]; + t >>= 5; + ptr[0] = (JSAMPLE) c5to8bits[t & 0x1F]; + ptr += 3; + } + return 1; +} + +METHODDEF(JDIMENSION) +get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 24-bit pixels */ +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + register JSAMPROW ptr; + register JDIMENSION col; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ + *ptr++ = (JSAMPLE) UCH(source->tga_pixel[2]); /* change BGR to RGB order */ + *ptr++ = (JSAMPLE) UCH(source->tga_pixel[1]); + *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]); + } + return 1; +} + +/* + * Targa also defines a 32-bit pixel format with order B,G,R,A. + * We presently ignore the attribute byte, so the code for reading + * these pixels is identical to the 24-bit routine above. + * This works because the actual pixel length is only known to read_pixel. + */ + +#define get_32bit_row get_24bit_row + + +/* + * This method is for re-reading the input data in standard top-down + * row order. The entire image has already been read into whole_image + * with proper conversion of pixel format, but it's in a funny row order. + */ + +METHODDEF(JDIMENSION) +get_memory_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + JDIMENSION source_row; + + /* Compute row of source that maps to current_row of normal order */ + /* For now, assume image is bottom-up and not interlaced. */ + /* NEEDS WORK to support interlaced images! */ + source_row = cinfo->image_height - source->current_row - 1; + + /* Fetch that row from virtual array */ + source->pub.buffer = (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, + source->whole_image, source_row, (JDIMENSION) 1, FALSE); + + source->current_row++; + return 1; +} + + +/* + * This method loads the image into whole_image during the first call on + * get_pixel_rows. The get_pixel_rows pointer is then adjusted to call + * get_memory_row on subsequent calls. + */ + +METHODDEF(JDIMENSION) +preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + JDIMENSION row; + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + + /* Read the data into a virtual array in input-file row order. */ + for (row = 0; row < cinfo->image_height; row++) { + if (progress != NULL) { + progress->pub.pass_counter = (long) row; + progress->pub.pass_limit = (long) cinfo->image_height; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } + source->pub.buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->whole_image, row, (JDIMENSION) 1, TRUE); + (*source->get_pixel_rows) (cinfo, sinfo); + } + if (progress != NULL) + progress->completed_extra_passes++; + + /* Set up to read from the virtual array in unscrambled order */ + source->pub.get_pixel_rows = get_memory_row; + source->current_row = 0; + /* And read the first row */ + return get_memory_row(cinfo, sinfo); +} + + +/* + * Read the file header; return image size and component count. + */ + +METHODDEF(void) +start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + U_CHAR targaheader[18]; + int idlen, cmaptype, subtype, flags, interlace_type, components; + unsigned int width, height, maplen; + boolean is_bottom_up; + +#define GET_2B(offset) ((unsigned int) UCH(targaheader[offset]) + \ + (((unsigned int) UCH(targaheader[offset+1])) << 8)) + + if (! ReadOK(source->pub.input_file, targaheader, 18)) + ERREXIT(cinfo, JERR_INPUT_EOF); + + /* Pretend "15-bit" pixels are 16-bit --- we ignore attribute bit anyway */ + if (targaheader[16] == 15) + targaheader[16] = 16; + + idlen = UCH(targaheader[0]); + cmaptype = UCH(targaheader[1]); + subtype = UCH(targaheader[2]); + maplen = GET_2B(5); + width = GET_2B(12); + height = GET_2B(14); + source->pixel_size = UCH(targaheader[16]) >> 3; + flags = UCH(targaheader[17]); /* Image Descriptor byte */ + + is_bottom_up = ((flags & 0x20) == 0); /* bit 5 set => top-down */ + interlace_type = flags >> 6; /* bits 6/7 are interlace code */ + + if (cmaptype > 1 || /* cmaptype must be 0 or 1 */ + width <= 0 || height <= 0 || + source->pixel_size < 1 || source->pixel_size > 4 || + (UCH(targaheader[16]) & 7) != 0 || /* bits/pixel must be multiple of 8 */ + interlace_type != 0) /* currently don't allow interlaced image */ + ERREXIT(cinfo, JERR_TGA_BADPARMS); + + if (subtype > 8) { + /* It's an RLE-coded file */ + source->read_pixel = read_rle_pixel; + source->block_count = source->dup_pixel_count = 0; + subtype -= 8; + } else { + /* Non-RLE file */ + source->read_pixel = read_non_rle_pixel; + } + + /* Now should have subtype 1, 2, or 3 */ + components = 3; /* until proven different */ + cinfo->in_color_space = JCS_RGB; + + switch (subtype) { + case 1: /* Colormapped image */ + if (source->pixel_size == 1 && cmaptype == 1) + source->get_pixel_rows = get_8bit_row; + else + ERREXIT(cinfo, JERR_TGA_BADPARMS); + TRACEMS2(cinfo, 1, JTRC_TGA_MAPPED, width, height); + break; + case 2: /* RGB image */ + switch (source->pixel_size) { + case 2: + source->get_pixel_rows = get_16bit_row; + break; + case 3: + source->get_pixel_rows = get_24bit_row; + break; + case 4: + source->get_pixel_rows = get_32bit_row; + break; + default: + ERREXIT(cinfo, JERR_TGA_BADPARMS); + } + TRACEMS2(cinfo, 1, JTRC_TGA, width, height); + break; + case 3: /* Grayscale image */ + components = 1; + cinfo->in_color_space = JCS_GRAYSCALE; + if (source->pixel_size == 1) + source->get_pixel_rows = get_8bit_gray_row; + else + ERREXIT(cinfo, JERR_TGA_BADPARMS); + TRACEMS2(cinfo, 1, JTRC_TGA_GRAY, width, height); + break; + default: + ERREXIT(cinfo, JERR_TGA_BADPARMS); + } + + if (is_bottom_up) { + /* Create a virtual array to buffer the upside-down image. */ + source->whole_image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + (JDIMENSION) width * components, (JDIMENSION) height, (JDIMENSION) 1); + if (cinfo->progress != NULL) { + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + progress->total_extra_passes++; /* count file input as separate pass */ + } + /* source->pub.buffer will point to the virtual array. */ + source->pub.buffer_height = 1; /* in case anyone looks at it */ + source->pub.get_pixel_rows = preload_image; + } else { + /* Don't need a virtual array, but do need a one-row input buffer. */ + source->whole_image = NULL; + source->pub.buffer = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, + JPOOL_IMAGE, (JDIMENSION) width * components, (JDIMENSION) 1); + source->pub.buffer_height = 1; + source->pub.get_pixel_rows = source->get_pixel_rows; + } + + while (idlen--) /* Throw away ID field */ + (void) read_byte(source); + + if (maplen > 0) { + if (maplen > 256 || GET_2B(3) != 0) + ERREXIT(cinfo, JERR_TGA_BADCMAP); + /* Allocate space to store the colormap */ + source->colormap = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, + JPOOL_IMAGE, (JDIMENSION) maplen, (JDIMENSION) 3); + source->cmap_length = (int) maplen; + /* and read it from the file */ + read_colormap(source, (int) maplen, UCH(targaheader[7])); + } else { + if (cmaptype) /* but you promised a cmap! */ + ERREXIT(cinfo, JERR_TGA_BADPARMS); + source->colormap = NULL; + source->cmap_length = 0; + } + + cinfo->input_components = components; + cinfo->data_precision = 8; + cinfo->image_width = width; + cinfo->image_height = height; +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + /* no work */ +} + + +/* + * The module selection routine for Targa format input. + */ + +GLOBAL(cjpeg_source_ptr) +jinit_read_targa (j_compress_ptr cinfo) +{ + tga_source_ptr source; + + /* Create module interface object */ + source = (tga_source_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(tga_source_struct)); + source->cinfo = cinfo; /* make back link for subroutines */ + /* Fill in method ptrs, except get_pixel_rows which start_input sets */ + source->pub.start_input = start_input_tga; + source->pub.finish_input = finish_input_tga; + + return &source->pub; +} + +#endif /* TARGA_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/transupp.c b/widget/milsko/milskosrc/external/libjpeg/src/transupp.c new file mode 100644 index 0000000000..22c369b7e5 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/transupp.c @@ -0,0 +1,2433 @@ +/* + * transupp.c + * + * Copyright (C) 1997-2023, Thomas G. Lane, Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains image transformation routines and other utility code + * used by the jpegtran sample application. These are NOT part of the core + * JPEG library. But we keep these routines separate from jpegtran.c to + * ease the task of maintaining jpegtran-like programs that have other user + * interfaces. + */ + +/* Although this file really shouldn't have access to the library internals, + * it's helpful to let it call jround_up() and jcopy_block_row(). + * Also, the (switchable) virtual memory adaptation code for + * the drop feature has dependencies on library internals. + */ +#define JPEG_INTERNALS + +#include "jinclude.h" +#include "jpeglib.h" +#include "transupp.h" /* My own external interface */ +#include /* to declare isdigit() */ + + +#if TRANSFORMS_SUPPORTED + +/* + * Lossless image transformation routines. These routines work on DCT + * coefficient arrays and thus do not require any lossy decompression + * or recompression of the image. + * Thanks to Guido Vollbeding for the initial design and code of this feature, + * and to Ben Jackson for introducing the cropping feature. + * + * Horizontal flipping is done in-place, using a single top-to-bottom + * pass through the virtual source array. It will thus be much the + * fastest option for images larger than main memory. + * + * The other routines require a set of destination virtual arrays, so they + * need twice as much memory as jpegtran normally does. The destination + * arrays are always written in normal scan order (top to bottom) because + * the virtual array manager expects this. The source arrays will be scanned + * in the corresponding order, which means multiple passes through the source + * arrays for most of the transforms. That could result in much thrashing + * if the image is larger than main memory. + * + * If cropping or trimming is involved, the destination arrays may be smaller + * than the source arrays. Note it is not possible to do horizontal flip + * in-place when a nonzero Y crop offset is specified, since we'd have to move + * data from one block row to another but the virtual array manager doesn't + * guarantee we can touch more than one row at a time. So in that case, + * we have to use a separate destination array. + * + * Some notes about the operating environment of the individual transform + * routines: + * 1. Both the source and destination virtual arrays are allocated from the + * source JPEG object, and therefore should be manipulated by calling the + * source's memory manager. + * 2. The destination's component count should be used. It may be smaller + * than the source's when forcing to grayscale. + * 3. Likewise the destination's sampling factors should be used. When + * forcing to grayscale the destination's sampling factors will be all 1, + * and we may as well take that as the effective iMCU size. + * 4. When "trim" is in effect, the destination's dimensions will be the + * trimmed values but the source's will be untrimmed. + * 5. When "crop" is in effect, the destination's dimensions will be the + * cropped values but the source's will be uncropped. Each transform + * routine is responsible for picking up source data starting at the + * correct X and Y offset for the crop region. (The X and Y offsets + * passed to the transform routines are measured in iMCU blocks of the + * destination.) + * 6. All the routines assume that the source and destination buffers are + * padded out to a full iMCU boundary. This is true, although for the + * source buffer it is an undocumented property of jdcoefct.c. + */ + + +/* Drop code may be used with or without virtual memory adaptation code. + * This code has some dependencies on internal library behavior, so you + * may choose to disable it. For example, it doesn't make a difference + * if you only use jmemnobs anyway. + */ +#ifndef DROP_REQUEST_FROM_SRC +#define DROP_REQUEST_FROM_SRC 1 /* 0 disables adaptation */ +#endif + + +#if DROP_REQUEST_FROM_SRC +/* Force jpeg_read_coefficients to request + * the virtual coefficient arrays from + * the source decompression object. + */ +METHODDEF(jvirt_barray_ptr) +drop_request_virt_barray (j_common_ptr cinfo, int pool_id, boolean pre_zero, + JDIMENSION blocksperrow, JDIMENSION numrows, + JDIMENSION maxaccess) +{ + j_common_ptr srcinfo = (j_common_ptr) cinfo->client_data; + + return (*srcinfo->mem->request_virt_barray) + (srcinfo, pool_id, pre_zero, + blocksperrow, numrows, maxaccess); +} + + +/* Force jpeg_read_coefficients to return + * after requesting and before accessing + * the virtual coefficient arrays. + */ +METHODDEF(int) +drop_consume_input (j_decompress_ptr cinfo) +{ + return JPEG_SUSPENDED; +} + + +METHODDEF(void) +drop_start_input_pass (j_decompress_ptr cinfo) +{ + cinfo->inputctl->consume_input = drop_consume_input; +} + + +LOCAL(void) +drop_request_from_src (j_decompress_ptr dropinfo, j_decompress_ptr srcinfo) +{ + void *save_client_data; + JMETHOD(jvirt_barray_ptr, save_request_virt_barray, + (j_common_ptr cinfo, int pool_id, boolean pre_zero, + JDIMENSION blocksperrow, JDIMENSION numrows, JDIMENSION maxaccess)); + JMETHOD(void, save_start_input_pass, (j_decompress_ptr cinfo)); + + /* Set custom method pointers, save original pointers */ + save_client_data = dropinfo->client_data; + dropinfo->client_data = (void *) srcinfo; + save_request_virt_barray = dropinfo->mem->request_virt_barray; + dropinfo->mem->request_virt_barray = drop_request_virt_barray; + save_start_input_pass = dropinfo->inputctl->start_input_pass; + dropinfo->inputctl->start_input_pass = drop_start_input_pass; + + /* Execute only initialization part. + * Requested coefficient arrays will be realized later by the srcinfo object. + * Next call to the same function will then do the actual data reading. + * NB: since we request the coefficient arrays from another object, + * the inherent realization call is effectively a no-op. + */ + (void) jpeg_read_coefficients(dropinfo); + + /* Reset method pointers */ + dropinfo->client_data = save_client_data; + dropinfo->mem->request_virt_barray = save_request_virt_barray; + dropinfo->inputctl->start_input_pass = save_start_input_pass; + /* Do input initialization for first scan now, + * which also resets the consume_input method. + */ + (*save_start_input_pass)(dropinfo); +} +#endif /* DROP_REQUEST_FROM_SRC */ + + +LOCAL(void) +dequant_comp (j_decompress_ptr cinfo, jpeg_component_info *compptr, + jvirt_barray_ptr coef_array, JQUANT_TBL *qtblptr1) +{ + JDIMENSION blk_x, blk_y; + int offset_y, k; + JQUANT_TBL *qtblptr; + JBLOCKARRAY buffer; + JBLOCKROW block; + JCOEFPTR ptr; + + qtblptr = compptr->quant_table; + for (blk_y = 0; blk_y < compptr->height_in_blocks; + blk_y += compptr->v_samp_factor) { + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef_array, blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + block = buffer[offset_y]; + for (blk_x = 0; blk_x < compptr->width_in_blocks; blk_x++) { + ptr = block[blk_x]; + for (k = 0; k < DCTSIZE2; k++) + if (qtblptr->quantval[k] != qtblptr1->quantval[k]) + ptr[k] *= qtblptr->quantval[k] / qtblptr1->quantval[k]; + } + } + } +} + + +LOCAL(void) +requant_comp (j_decompress_ptr cinfo, jpeg_component_info *compptr, + jvirt_barray_ptr coef_array, JQUANT_TBL *qtblptr1) +{ + JDIMENSION blk_x, blk_y; + int offset_y, k, temp, qval; + JQUANT_TBL *qtblptr; + JBLOCKARRAY buffer; + JBLOCKROW block; + JCOEFPTR ptr; + + qtblptr = compptr->quant_table; + for (blk_y = 0; blk_y < compptr->height_in_blocks; + blk_y += compptr->v_samp_factor) { + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef_array, blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + block = buffer[offset_y]; + for (blk_x = 0; blk_x < compptr->width_in_blocks; blk_x++) { + ptr = block[blk_x]; + for (k = 0; k < DCTSIZE2; k++) { + qval = qtblptr1->quantval[k]; + if (qval == 0) continue; + temp = qtblptr->quantval[k]; + if (temp == qval) continue; + temp *= ptr[k]; + /* The following quantization code is a copy from jcdctmgr.c */ +#ifdef FAST_DIVIDE +#define DIVIDE_BY(a,b) a /= b +#else +#define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0 +#endif + if (temp < 0) { + temp = -temp; + temp += qval>>1; /* for rounding */ + DIVIDE_BY(temp, qval); + temp = -temp; + } else { + temp += qval>>1; /* for rounding */ + DIVIDE_BY(temp, qval); + } + ptr[k] = (JCOEF) temp; + } + } + } + } +} + + +/* Calculate largest common denominator with Euclid's algorithm. + */ +LOCAL(JCOEF) +largest_common_denominator(JCOEF a, JCOEF b) +{ + JCOEF c; + + while (b) { + c = a % b; + a = b; + b = c; + } + + return a; +} + + +LOCAL(void) +adjust_quant(j_decompress_ptr srcinfo, jvirt_barray_ptr *src_coef_arrays, + j_decompress_ptr dropinfo, jvirt_barray_ptr *drop_coef_arrays, + boolean trim, j_compress_ptr dstinfo) +{ + jpeg_component_info *compptr1, *compptr2; + JQUANT_TBL *qtblptr1, *qtblptr2, *qtblptr3; + int ci, k; + + for (ci = 0; ci < dstinfo->num_components && + ci < dropinfo->num_components; ci++) { + compptr1 = srcinfo->comp_info + ci; + compptr2 = dropinfo->comp_info + ci; + qtblptr1 = compptr1->quant_table; + qtblptr2 = compptr2->quant_table; + for (k = 0; k < DCTSIZE2; k++) { + if (qtblptr1->quantval[k] != qtblptr2->quantval[k]) { + if (trim) + requant_comp(dropinfo, compptr2, drop_coef_arrays[ci], qtblptr1); + else { + qtblptr3 = dstinfo->quant_tbl_ptrs[compptr1->quant_tbl_no]; + for (k = 0; k < DCTSIZE2; k++) + if (qtblptr1->quantval[k] != qtblptr2->quantval[k]) + qtblptr3->quantval[k] = largest_common_denominator + (qtblptr1->quantval[k], qtblptr2->quantval[k]); + dequant_comp(srcinfo, compptr1, src_coef_arrays[ci], qtblptr3); + dequant_comp(dropinfo, compptr2, drop_coef_arrays[ci], qtblptr3); + } + break; + } + } + } +} + + +LOCAL(void) +do_drop (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + j_decompress_ptr dropinfo, jvirt_barray_ptr *drop_coef_arrays, + JDIMENSION drop_width, JDIMENSION drop_height) +/* Drop. If the dropinfo component number is smaller than the destination's, + * we fill in the remaining components with zero. This provides the feature + * of dropping grayscale into (arbitrarily sampled) color images. + */ +{ + JDIMENSION comp_width, comp_height; + JDIMENSION blk_y, x_drop_blocks, y_drop_blocks; + int ci, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + jpeg_component_info *compptr; + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = drop_width * compptr->h_samp_factor; + comp_height = drop_height * compptr->v_samp_factor; + x_drop_blocks = x_crop_offset * compptr->h_samp_factor; + y_drop_blocks = y_crop_offset * compptr->v_samp_factor; + for (blk_y = 0; blk_y < comp_height; blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], blk_y + y_drop_blocks, + (JDIMENSION) compptr->v_samp_factor, TRUE); + if (ci < dropinfo->num_components) { +#if DROP_REQUEST_FROM_SRC + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, drop_coef_arrays[ci], blk_y, +#else + src_buffer = (*dropinfo->mem->access_virt_barray) + ((j_common_ptr) dropinfo, drop_coef_arrays[ci], blk_y, +#endif + (JDIMENSION) compptr->v_samp_factor, FALSE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + jcopy_block_row(src_buffer[offset_y], + dst_buffer[offset_y] + x_drop_blocks, + comp_width); + } + } else { + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + FMEMZERO(dst_buffer[offset_y] + x_drop_blocks, + comp_width * SIZEOF(JBLOCK)); + } + } + } + } +} + + +LOCAL(void) +do_crop (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* Crop. This is only used when no rotate/flip is requested with the crop. */ +{ + JDIMENSION dst_blk_y, x_crop_blocks, y_crop_blocks; + int ci, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + jpeg_component_info *compptr; + + /* We simply have to copy the right amount of data (the destination's + * image size) starting at the given X and Y offsets in the source. + */ + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + x_crop_blocks = x_crop_offset * compptr->h_samp_factor; + y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + dst_blk_y + y_crop_blocks, + (JDIMENSION) compptr->v_samp_factor, FALSE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + jcopy_block_row(src_buffer[offset_y] + x_crop_blocks, + dst_buffer[offset_y], + compptr->width_in_blocks); + } + } + } +} + + +LOCAL(void) +do_crop_ext_zero (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* Crop. This is only used when no rotate/flip is requested with the crop. + * Extension: If the destination size is larger than the source, we fill in + * the extra area with zero (neutral gray). Note we also have to zero partial + * iMCUs at the right and bottom edge of the source image area in this case. + */ +{ + JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height; + JDIMENSION dst_blk_y, x_crop_blocks, y_crop_blocks; + int ci, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + jpeg_component_info *compptr; + + MCU_cols = srcinfo->output_width / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); + MCU_rows = srcinfo->output_height / + (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; + comp_height = MCU_rows * compptr->v_samp_factor; + x_crop_blocks = x_crop_offset * compptr->h_samp_factor; + y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + if (dstinfo->jpeg_height > srcinfo->output_height) { + if (dst_blk_y < y_crop_blocks || + dst_blk_y >= y_crop_blocks + comp_height) { + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + FMEMZERO(dst_buffer[offset_y], + compptr->width_in_blocks * SIZEOF(JBLOCK)); + } + continue; + } + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + dst_blk_y - y_crop_blocks, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } else { + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + dst_blk_y + y_crop_blocks, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + if (dstinfo->jpeg_width > srcinfo->output_width) { + if (x_crop_blocks > 0) { + FMEMZERO(dst_buffer[offset_y], + x_crop_blocks * SIZEOF(JBLOCK)); + } + jcopy_block_row(src_buffer[offset_y], + dst_buffer[offset_y] + x_crop_blocks, + comp_width); + if (compptr->width_in_blocks > x_crop_blocks + comp_width) { + FMEMZERO(dst_buffer[offset_y] + + x_crop_blocks + comp_width, + (compptr->width_in_blocks - + x_crop_blocks - comp_width) * SIZEOF(JBLOCK)); + } + } else { + jcopy_block_row(src_buffer[offset_y] + x_crop_blocks, + dst_buffer[offset_y], + compptr->width_in_blocks); + } + } + } + } +} + + +LOCAL(void) +do_crop_ext_flat (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* Crop. This is only used when no rotate/flip is requested with the crop. + * Extension: The destination width is larger than the source and we fill in + * the extra area with the DC of the adjacent block. Note we also have to + * fill partial iMCUs at the right and bottom edge of the source image area + * in this case. + */ +{ + JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height; + JDIMENSION dst_blk_x, dst_blk_y, x_crop_blocks, y_crop_blocks; + int ci, offset_y; + JCOEF dc; + JBLOCKARRAY src_buffer, dst_buffer; + jpeg_component_info *compptr; + + MCU_cols = srcinfo->output_width / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); + MCU_rows = srcinfo->output_height / + (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; + comp_height = MCU_rows * compptr->v_samp_factor; + x_crop_blocks = x_crop_offset * compptr->h_samp_factor; + y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + if (dstinfo->jpeg_height > srcinfo->output_height) { + if (dst_blk_y < y_crop_blocks || + dst_blk_y >= y_crop_blocks + comp_height) { + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + FMEMZERO(dst_buffer[offset_y], + compptr->width_in_blocks * SIZEOF(JBLOCK)); + } + continue; + } + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + dst_blk_y - y_crop_blocks, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } else { + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + dst_blk_y + y_crop_blocks, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + if (x_crop_blocks > 0) { + FMEMZERO(dst_buffer[offset_y], + x_crop_blocks * SIZEOF(JBLOCK)); + dc = src_buffer[offset_y][0][0]; + for (dst_blk_x = 0; dst_blk_x < x_crop_blocks; dst_blk_x++) { + dst_buffer[offset_y][dst_blk_x][0] = dc; + } + } + jcopy_block_row(src_buffer[offset_y], + dst_buffer[offset_y] + x_crop_blocks, + comp_width); + if (compptr->width_in_blocks > x_crop_blocks + comp_width) { + FMEMZERO(dst_buffer[offset_y] + + x_crop_blocks + comp_width, + (compptr->width_in_blocks - + x_crop_blocks - comp_width) * SIZEOF(JBLOCK)); + dc = src_buffer[offset_y][comp_width - 1][0]; + for (dst_blk_x = x_crop_blocks + comp_width; + dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { + dst_buffer[offset_y][dst_blk_x][0] = dc; + } + } + } + } + } +} + + +LOCAL(void) +do_crop_ext_reflect (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* Crop. This is only used when no rotate/flip is requested with the crop. + * Extension: The destination width is larger than the source and we fill in + * the extra area with repeated reflections of the source region. Note we + * also have to fill partial iMCUs at the right and bottom edge of the source + * image area in this case. + */ +{ + JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, src_blk_x; + JDIMENSION dst_blk_x, dst_blk_y, x_crop_blocks, y_crop_blocks; + int ci, k, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JBLOCKROW src_row_ptr, dst_row_ptr; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + + MCU_cols = srcinfo->output_width / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); + MCU_rows = srcinfo->output_height / + (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; + comp_height = MCU_rows * compptr->v_samp_factor; + x_crop_blocks = x_crop_offset * compptr->h_samp_factor; + y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + if (dstinfo->jpeg_height > srcinfo->output_height) { + if (dst_blk_y < y_crop_blocks || + dst_blk_y >= y_crop_blocks + comp_height) { + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + FMEMZERO(dst_buffer[offset_y], + compptr->width_in_blocks * SIZEOF(JBLOCK)); + } + continue; + } + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + dst_blk_y - y_crop_blocks, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } else { + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + dst_blk_y + y_crop_blocks, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + /* Copy source region */ + jcopy_block_row(src_buffer[offset_y], + dst_buffer[offset_y] + x_crop_blocks, + comp_width); + if (x_crop_blocks > 0) { + /* Reflect to left */ + dst_row_ptr = dst_buffer[offset_y] + x_crop_blocks; + for (dst_blk_x = x_crop_blocks; dst_blk_x > 0;) { + src_row_ptr = dst_row_ptr; /* (re)set axis of reflection */ + for (src_blk_x = comp_width; src_blk_x > 0 && dst_blk_x > 0; + src_blk_x--, dst_blk_x--) { + dst_ptr = *--dst_row_ptr; /* destination goes left */ + src_ptr = *src_row_ptr++; /* source goes right */ + /* this unrolled loop doesn't need to know which row it's on... */ + for (k = 0; k < DCTSIZE2; k += 2) { + *dst_ptr++ = *src_ptr++; /* copy even column */ + *dst_ptr++ = - *src_ptr++; /* copy odd column with sign change */ + } + } + } + } + if (compptr->width_in_blocks > x_crop_blocks + comp_width) { + /* Reflect to right */ + dst_row_ptr = dst_buffer[offset_y] + x_crop_blocks + comp_width; + for (dst_blk_x = compptr->width_in_blocks - x_crop_blocks - comp_width; + dst_blk_x > 0;) { + src_row_ptr = dst_row_ptr; /* (re)set axis of reflection */ + for (src_blk_x = comp_width; src_blk_x > 0 && dst_blk_x > 0; + src_blk_x--, dst_blk_x--) { + dst_ptr = *dst_row_ptr++; /* destination goes right */ + src_ptr = *--src_row_ptr; /* source goes left */ + /* this unrolled loop doesn't need to know which row it's on... */ + for (k = 0; k < DCTSIZE2; k += 2) { + *dst_ptr++ = *src_ptr++; /* copy even column */ + *dst_ptr++ = - *src_ptr++; /* copy odd column with sign change */ + } + } + } + } + } + } + } +} + + +LOCAL(void) +do_wipe (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + JDIMENSION drop_width, JDIMENSION drop_height) +/* Wipe - drop content of specified area, fill with zero (neutral gray) */ +{ + JDIMENSION x_wipe_blocks, wipe_width; + JDIMENSION y_wipe_blocks, wipe_bottom; + int ci, offset_y; + JBLOCKARRAY buffer; + jpeg_component_info *compptr; + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + x_wipe_blocks = x_crop_offset * compptr->h_samp_factor; + wipe_width = drop_width * compptr->h_samp_factor; + y_wipe_blocks = y_crop_offset * compptr->v_samp_factor; + wipe_bottom = drop_height * compptr->v_samp_factor + y_wipe_blocks; + for (; y_wipe_blocks < wipe_bottom; + y_wipe_blocks += compptr->v_samp_factor) { + buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], y_wipe_blocks, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + FMEMZERO(buffer[offset_y] + x_wipe_blocks, + wipe_width * SIZEOF(JBLOCK)); + } + } + } +} + + +LOCAL(void) +do_flatten (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + JDIMENSION drop_width, JDIMENSION drop_height) +/* Flatten - drop content of specified area, similar to wipe, + * but fill with average of adjacent blocks, instead of zero. + */ +{ + JDIMENSION x_wipe_blocks, wipe_width, wipe_right; + JDIMENSION y_wipe_blocks, wipe_bottom, blk_x; + int ci, offset_y, dc_left_value, dc_right_value, average; + JBLOCKARRAY buffer; + jpeg_component_info *compptr; + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + x_wipe_blocks = x_crop_offset * compptr->h_samp_factor; + wipe_width = drop_width * compptr->h_samp_factor; + wipe_right = wipe_width + x_wipe_blocks; + y_wipe_blocks = y_crop_offset * compptr->v_samp_factor; + wipe_bottom = drop_height * compptr->v_samp_factor + y_wipe_blocks; + for (; y_wipe_blocks < wipe_bottom; + y_wipe_blocks += compptr->v_samp_factor) { + buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], y_wipe_blocks, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + FMEMZERO(buffer[offset_y] + x_wipe_blocks, + wipe_width * SIZEOF(JBLOCK)); + if (x_wipe_blocks > 0) { + dc_left_value = buffer[offset_y][x_wipe_blocks - 1][0]; + if (wipe_right < compptr->width_in_blocks) { + dc_right_value = buffer[offset_y][wipe_right][0]; + average = (dc_left_value + dc_right_value) >> 1; + } else { + average = dc_left_value; + } + } else if (wipe_right < compptr->width_in_blocks) { + average = buffer[offset_y][wipe_right][0]; + } else continue; + for (blk_x = x_wipe_blocks; blk_x < wipe_right; blk_x++) { + buffer[offset_y][blk_x][0] = (JCOEF) average; + } + } + } + } +} + + +LOCAL(void) +do_reflect (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + JDIMENSION drop_width, JDIMENSION drop_height) +/* Reflect - drop content of specified area, similar to wipe, but + * fill with repeated reflections of the outside area, instead of zero. + * NB: y_crop_offset is assumed to be zero. + */ +{ + JDIMENSION x_wipe_blocks, wipe_width; + JDIMENSION y_wipe_blocks, wipe_bottom; + JDIMENSION src_blk_x, dst_blk_x; + int ci, k, offset_y; + JBLOCKARRAY buffer; + JBLOCKROW src_row_ptr, dst_row_ptr; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + x_wipe_blocks = x_crop_offset * compptr->h_samp_factor; + wipe_width = drop_width * compptr->h_samp_factor; + wipe_bottom = drop_height * compptr->v_samp_factor; + for (y_wipe_blocks = 0; y_wipe_blocks < wipe_bottom; + y_wipe_blocks += compptr->v_samp_factor) { + buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], y_wipe_blocks, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + if (x_wipe_blocks > 0) { + /* Reflect from left */ + dst_row_ptr = buffer[offset_y] + x_wipe_blocks; + for (dst_blk_x = wipe_width; dst_blk_x > 0;) { + src_row_ptr = dst_row_ptr; /* (re)set axis of reflection */ + for (src_blk_x = x_wipe_blocks; + src_blk_x > 0 && dst_blk_x > 0; src_blk_x--, dst_blk_x--) { + dst_ptr = *dst_row_ptr++; /* destination goes right */ + src_ptr = *--src_row_ptr; /* source goes left */ + /* this unrolled loop doesn't need to know which row it's on... */ + for (k = 0; k < DCTSIZE2; k += 2) { + *dst_ptr++ = *src_ptr++; /* copy even column */ + *dst_ptr++ = - *src_ptr++; /* copy odd column with sign change */ + } + } + } + } else if (compptr->width_in_blocks > x_wipe_blocks + wipe_width) { + /* Reflect from right */ + dst_row_ptr = buffer[offset_y] + x_wipe_blocks + wipe_width; + for (dst_blk_x = wipe_width; dst_blk_x > 0;) { + src_row_ptr = dst_row_ptr; /* (re)set axis of reflection */ + src_blk_x = compptr->width_in_blocks - x_wipe_blocks - wipe_width; + for (; src_blk_x > 0 && dst_blk_x > 0; src_blk_x--, dst_blk_x--) { + dst_ptr = *--dst_row_ptr; /* destination goes left */ + src_ptr = *src_row_ptr++; /* source goes right */ + /* this unrolled loop doesn't need to know which row it's on... */ + for (k = 0; k < DCTSIZE2; k += 2) { + *dst_ptr++ = *src_ptr++; /* copy even column */ + *dst_ptr++ = - *src_ptr++; /* copy odd column with sign change */ + } + } + } + } else { + FMEMZERO(buffer[offset_y] + x_wipe_blocks, + wipe_width * SIZEOF(JBLOCK)); + } + } + } + } +} + + +LOCAL(void) +do_flip_h_no_crop (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, + jvirt_barray_ptr *src_coef_arrays) +/* Horizontal flip; done in-place, so no separate dest array is required. + * NB: this only works when y_crop_offset is zero. + */ +{ + JDIMENSION MCU_cols, comp_width, blk_x, blk_y, x_crop_blocks; + int ci, k, offset_y; + JBLOCKARRAY buffer; + JCOEFPTR ptr1, ptr2; + JCOEF temp1, temp2; + jpeg_component_info *compptr; + + /* Horizontal mirroring of DCT blocks is accomplished by swapping + * pairs of blocks in-place. Within a DCT block, we perform horizontal + * mirroring by changing the signs of odd-numbered columns. + * Partial iMCUs at the right edge are left untouched. + */ + MCU_cols = srcinfo->output_width / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; + x_crop_blocks = x_crop_offset * compptr->h_samp_factor; + for (blk_y = 0; blk_y < compptr->height_in_blocks; + blk_y += compptr->v_samp_factor) { + buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + /* Do the mirroring */ + for (blk_x = 0; blk_x * 2 < comp_width; blk_x++) { + ptr1 = buffer[offset_y][blk_x]; + ptr2 = buffer[offset_y][comp_width - blk_x - 1]; + /* this unrolled loop doesn't need to know which row it's on... */ + for (k = 0; k < DCTSIZE2; k += 2) { + temp1 = *ptr1; /* swap even column */ + temp2 = *ptr2; + *ptr1++ = temp2; + *ptr2++ = temp1; + temp1 = *ptr1; /* swap odd column with sign change */ + temp2 = *ptr2; + *ptr1++ = -temp2; + *ptr2++ = -temp1; + } + } + if (x_crop_blocks > 0) { + /* Now left-justify the portion of the data to be kept. + * We can't use a single jcopy_block_row() call because that routine + * depends on memcpy(), whose behavior is unspecified for overlapping + * source and destination areas. Sigh. + */ + for (blk_x = 0; blk_x < compptr->width_in_blocks; blk_x++) { + jcopy_block_row(buffer[offset_y] + blk_x + x_crop_blocks, + buffer[offset_y] + blk_x, + (JDIMENSION) 1); + } + } + } + } + } +} + + +LOCAL(void) +do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* Horizontal flip in general cropping case */ +{ + JDIMENSION MCU_cols, comp_width, dst_blk_x, dst_blk_y; + JDIMENSION x_crop_blocks, y_crop_blocks; + int ci, k, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JBLOCKROW src_row_ptr, dst_row_ptr; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + + /* Here we must output into a separate array because we can't touch + * different rows of a single virtual array simultaneously. Otherwise, + * this is essentially the same as the routine above. + */ + MCU_cols = srcinfo->output_width / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; + x_crop_blocks = x_crop_offset * compptr->h_samp_factor; + y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + dst_blk_y + y_crop_blocks, + (JDIMENSION) compptr->v_samp_factor, FALSE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + dst_row_ptr = dst_buffer[offset_y]; + src_row_ptr = src_buffer[offset_y]; + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { + if (x_crop_blocks + dst_blk_x < comp_width) { + /* Do the mirrorable blocks */ + dst_ptr = dst_row_ptr[dst_blk_x]; + src_ptr = src_row_ptr[comp_width - x_crop_blocks - dst_blk_x - 1]; + /* this unrolled loop doesn't need to know which row it's on... */ + for (k = 0; k < DCTSIZE2; k += 2) { + *dst_ptr++ = *src_ptr++; /* copy even column */ + *dst_ptr++ = - *src_ptr++; /* copy odd column with sign change */ + } + } else { + /* Copy last partial block(s) verbatim */ + jcopy_block_row(src_row_ptr + dst_blk_x + x_crop_blocks, + dst_row_ptr + dst_blk_x, + (JDIMENSION) 1); + } + } + } + } + } +} + + +LOCAL(void) +do_flip_v (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* Vertical flip */ +{ + JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y; + JDIMENSION x_crop_blocks, y_crop_blocks; + int ci, i, j, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JBLOCKROW src_row_ptr, dst_row_ptr; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + + /* We output into a separate array because we can't touch different + * rows of the source virtual array simultaneously. Otherwise, this + * is a pretty straightforward analog of horizontal flip. + * Within a DCT block, vertical mirroring is done by changing the signs + * of odd-numbered rows. + * Partial iMCUs at the bottom edge are copied verbatim. + */ + MCU_rows = srcinfo->output_height / + (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_height = MCU_rows * compptr->v_samp_factor; + x_crop_blocks = x_crop_offset * compptr->h_samp_factor; + y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + if (y_crop_blocks + dst_blk_y < comp_height) { + /* Row is within the mirrorable area. */ + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + comp_height - y_crop_blocks - dst_blk_y - + (JDIMENSION) compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } else { + /* Bottom-edge blocks will be copied verbatim. */ + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + dst_blk_y + y_crop_blocks, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + if (y_crop_blocks + dst_blk_y < comp_height) { + /* Row is within the mirrorable area. */ + dst_row_ptr = dst_buffer[offset_y]; + src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1]; + src_row_ptr += x_crop_blocks; + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; + dst_blk_x++) { + dst_ptr = dst_row_ptr[dst_blk_x]; + src_ptr = src_row_ptr[dst_blk_x]; + for (i = 0; i < DCTSIZE; i += 2) { + /* copy even row */ + for (j = 0; j < DCTSIZE; j++) + *dst_ptr++ = *src_ptr++; + /* copy odd row with sign change */ + for (j = 0; j < DCTSIZE; j++) + *dst_ptr++ = - *src_ptr++; + } + } + } else { + /* Just copy row verbatim. */ + jcopy_block_row(src_buffer[offset_y] + x_crop_blocks, + dst_buffer[offset_y], + compptr->width_in_blocks); + } + } + } + } +} + + +LOCAL(void) +do_transpose (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* Transpose source into destination */ +{ + JDIMENSION dst_blk_x, dst_blk_y, x_crop_blocks, y_crop_blocks; + int ci, i, j, offset_x, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + + /* Transposing pixels within a block just requires transposing the + * DCT coefficients. + * Partial iMCUs at the edges require no special treatment; we simply + * process all the available DCT blocks for every component. + */ + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + x_crop_blocks = x_crop_offset * compptr->h_samp_factor; + y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; + dst_blk_x += compptr->h_samp_factor) { + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + dst_blk_x + x_crop_blocks, + (JDIMENSION) compptr->h_samp_factor, FALSE); + for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { + dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; + src_ptr = src_buffer[offset_x][dst_blk_y + offset_y + y_crop_blocks]; + for (i = 0; i < DCTSIZE; i++) + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + } + } + } + } + } +} + + +LOCAL(void) +do_rot_90 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* 90 degree rotation is equivalent to + * 1. Transposing the image; + * 2. Horizontal mirroring. + * These two steps are merged into a single processing routine. + */ +{ + JDIMENSION MCU_cols, comp_width, dst_blk_x, dst_blk_y; + JDIMENSION x_crop_blocks, y_crop_blocks; + int ci, i, j, offset_x, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + + /* Because of the horizontal mirror step, we can't process partial iMCUs + * at the (output) right edge properly. They just get transposed and + * not mirrored. + */ + MCU_cols = srcinfo->output_height / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; + x_crop_blocks = x_crop_offset * compptr->h_samp_factor; + y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; + dst_blk_x += compptr->h_samp_factor) { + if (x_crop_blocks + dst_blk_x < comp_width) { + /* Block is within the mirrorable area. */ + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + comp_width - x_crop_blocks - dst_blk_x - + (JDIMENSION) compptr->h_samp_factor, + (JDIMENSION) compptr->h_samp_factor, FALSE); + } else { + /* Edge blocks are transposed but not mirrored. */ + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + dst_blk_x + x_crop_blocks, + (JDIMENSION) compptr->h_samp_factor, FALSE); + } + for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { + dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; + if (x_crop_blocks + dst_blk_x < comp_width) { + /* Block is within the mirrorable area. */ + src_ptr = src_buffer[compptr->h_samp_factor - offset_x - 1] + [dst_blk_y + offset_y + y_crop_blocks]; + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + i++; + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; + } + } else { + /* Edge blocks are transposed but not mirrored. */ + src_ptr = src_buffer[offset_x] + [dst_blk_y + offset_y + y_crop_blocks]; + for (i = 0; i < DCTSIZE; i++) + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + } + } + } + } + } + } +} + + +LOCAL(void) +do_rot_270 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* 270 degree rotation is equivalent to + * 1. Horizontal mirroring; + * 2. Transposing the image. + * These two steps are merged into a single processing routine. + */ +{ + JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y; + JDIMENSION x_crop_blocks, y_crop_blocks; + int ci, i, j, offset_x, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + + /* Because of the horizontal mirror step, we can't process partial iMCUs + * at the (output) bottom edge properly. They just get transposed and + * not mirrored. + */ + MCU_rows = srcinfo->output_width / + (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_height = MCU_rows * compptr->v_samp_factor; + x_crop_blocks = x_crop_offset * compptr->h_samp_factor; + y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; + dst_blk_x += compptr->h_samp_factor) { + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + dst_blk_x + x_crop_blocks, + (JDIMENSION) compptr->h_samp_factor, FALSE); + for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { + dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; + if (y_crop_blocks + dst_blk_y < comp_height) { + /* Block is within the mirrorable area. */ + src_ptr = src_buffer[offset_x] + [comp_height - y_crop_blocks - dst_blk_y - offset_y - 1]; + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < DCTSIZE; j++) { + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + j++; + dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; + } + } + } else { + /* Edge blocks are transposed but not mirrored. */ + src_ptr = src_buffer[offset_x] + [dst_blk_y + offset_y + y_crop_blocks]; + for (i = 0; i < DCTSIZE; i++) + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + } + } + } + } + } + } +} + + +LOCAL(void) +do_rot_180 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* 180 degree rotation is equivalent to + * 1. Vertical mirroring; + * 2. Horizontal mirroring. + * These two steps are merged into a single processing routine. + */ +{ + JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y; + JDIMENSION x_crop_blocks, y_crop_blocks; + int ci, i, j, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JBLOCKROW src_row_ptr, dst_row_ptr; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + + MCU_cols = srcinfo->output_width / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); + MCU_rows = srcinfo->output_height / + (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; + comp_height = MCU_rows * compptr->v_samp_factor; + x_crop_blocks = x_crop_offset * compptr->h_samp_factor; + y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + if (y_crop_blocks + dst_blk_y < comp_height) { + /* Row is within the vertically mirrorable area. */ + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + comp_height - y_crop_blocks - dst_blk_y - + (JDIMENSION) compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } else { + /* Bottom-edge rows are only mirrored horizontally. */ + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + dst_blk_y + y_crop_blocks, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + dst_row_ptr = dst_buffer[offset_y]; + if (y_crop_blocks + dst_blk_y < comp_height) { + /* Row is within the mirrorable area. */ + src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1]; + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { + dst_ptr = dst_row_ptr[dst_blk_x]; + if (x_crop_blocks + dst_blk_x < comp_width) { + /* Process the blocks that can be mirrored both ways. */ + src_ptr = src_row_ptr[comp_width - x_crop_blocks - dst_blk_x - 1]; + for (i = 0; i < DCTSIZE; i += 2) { + /* For even row, negate every odd column. */ + for (j = 0; j < DCTSIZE; j += 2) { + *dst_ptr++ = *src_ptr++; + *dst_ptr++ = - *src_ptr++; + } + /* For odd row, negate every even column. */ + for (j = 0; j < DCTSIZE; j += 2) { + *dst_ptr++ = - *src_ptr++; + *dst_ptr++ = *src_ptr++; + } + } + } else { + /* Any remaining right-edge blocks are only mirrored vertically. */ + src_ptr = src_row_ptr[x_crop_blocks + dst_blk_x]; + for (i = 0; i < DCTSIZE; i += 2) { + for (j = 0; j < DCTSIZE; j++) + *dst_ptr++ = *src_ptr++; + for (j = 0; j < DCTSIZE; j++) + *dst_ptr++ = - *src_ptr++; + } + } + } + } else { + /* Remaining rows are just mirrored horizontally. */ + src_row_ptr = src_buffer[offset_y]; + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { + if (x_crop_blocks + dst_blk_x < comp_width) { + /* Process the blocks that can be mirrored. */ + dst_ptr = dst_row_ptr[dst_blk_x]; + src_ptr = src_row_ptr[comp_width - x_crop_blocks - dst_blk_x - 1]; + for (i = 0; i < DCTSIZE2; i += 2) { + *dst_ptr++ = *src_ptr++; + *dst_ptr++ = - *src_ptr++; + } + } else { + /* Any remaining right-edge blocks are only copied. */ + jcopy_block_row(src_row_ptr + dst_blk_x + x_crop_blocks, + dst_row_ptr + dst_blk_x, + (JDIMENSION) 1); + } + } + } + } + } + } +} + + +LOCAL(void) +do_transverse (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) +/* Transverse transpose is equivalent to + * 1. 180 degree rotation; + * 2. Transposition; + * or + * 1. Horizontal mirroring; + * 2. Transposition; + * 3. Horizontal mirroring. + * These steps are merged into a single processing routine. + */ +{ + JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y; + JDIMENSION x_crop_blocks, y_crop_blocks; + int ci, i, j, offset_x, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + + MCU_cols = srcinfo->output_height / + (dstinfo->max_h_samp_factor * dstinfo->min_DCT_h_scaled_size); + MCU_rows = srcinfo->output_width / + (dstinfo->max_v_samp_factor * dstinfo->min_DCT_v_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; + comp_height = MCU_rows * compptr->v_samp_factor; + x_crop_blocks = x_crop_offset * compptr->h_samp_factor; + y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; + dst_blk_x += compptr->h_samp_factor) { + if (x_crop_blocks + dst_blk_x < comp_width) { + /* Block is within the mirrorable area. */ + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + comp_width - x_crop_blocks - dst_blk_x - + (JDIMENSION) compptr->h_samp_factor, + (JDIMENSION) compptr->h_samp_factor, FALSE); + } else { + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], + dst_blk_x + x_crop_blocks, + (JDIMENSION) compptr->h_samp_factor, FALSE); + } + for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { + dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; + if (y_crop_blocks + dst_blk_y < comp_height) { + if (x_crop_blocks + dst_blk_x < comp_width) { + /* Block is within the mirrorable area. */ + src_ptr = src_buffer[compptr->h_samp_factor - offset_x - 1] + [comp_height - y_crop_blocks - dst_blk_y - offset_y - 1]; + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < DCTSIZE; j++) { + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + j++; + dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; + } + i++; + for (j = 0; j < DCTSIZE; j++) { + dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; + j++; + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + } + } + } else { + /* Right-edge blocks are mirrored in y only */ + src_ptr = src_buffer[offset_x] + [comp_height - y_crop_blocks - dst_blk_y - offset_y - 1]; + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < DCTSIZE; j++) { + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + j++; + dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; + } + } + } + } else { + if (x_crop_blocks + dst_blk_x < comp_width) { + /* Bottom-edge blocks are mirrored in x only */ + src_ptr = src_buffer[compptr->h_samp_factor - offset_x - 1] + [dst_blk_y + offset_y + y_crop_blocks]; + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + i++; + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = -src_ptr[i*DCTSIZE+j]; + } + } else { + /* At lower right corner, just transpose, no mirroring */ + src_ptr = src_buffer[offset_x] + [dst_blk_y + offset_y + y_crop_blocks]; + for (i = 0; i < DCTSIZE; i++) + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; + } + } + } + } + } + } + } +} + + +/* Parse an unsigned integer: subroutine for jtransform_parse_crop_spec. + * Returns TRUE if valid integer found, FALSE if not. + * *strptr is advanced over the digit string, and *result is set to its value. + */ + +LOCAL(boolean) +jt_read_integer (const char ** strptr, JDIMENSION * result) +{ + const char * ptr = *strptr; + JDIMENSION val = 0; + + for (; isdigit((int)*ptr); ptr++) { + val = val * 10 + (JDIMENSION) (*ptr - '0'); + } + *result = val; + if (ptr == *strptr) + return FALSE; /* oops, no digits */ + *strptr = ptr; + return TRUE; +} + + +/* Parse a crop specification (written in X11 geometry style). + * The routine returns TRUE if the spec string is valid, FALSE if not. + * + * The crop spec string should have the format + * [{fr}]x[{fr}]{+-}{+-} + * where width, height, xoffset, and yoffset are unsigned integers. + * Each of the elements can be omitted to indicate a default value. + * (A weakness of this style is that it is not possible to omit xoffset + * while specifying yoffset, since they look alike.) + * + * This code is loosely based on XParseGeometry from the X11 distribution. + */ + +GLOBAL(boolean) +jtransform_parse_crop_spec (jpeg_transform_info *info, const char *spec) +{ + info->crop = FALSE; + info->crop_width_set = JCROP_UNSET; + info->crop_height_set = JCROP_UNSET; + info->crop_xoffset_set = JCROP_UNSET; + info->crop_yoffset_set = JCROP_UNSET; + + if (isdigit((int)*spec)) { + /* fetch width */ + if (! jt_read_integer(&spec, &info->crop_width)) + return FALSE; + if (*spec == 'f' || *spec == 'F') { + spec++; + info->crop_width_set = JCROP_FORCE; + } else if (*spec == 'r' || *spec == 'R') { + spec++; + info->crop_width_set = JCROP_REFLECT; + } else + info->crop_width_set = JCROP_POS; + } + if (*spec == 'x' || *spec == 'X') { + /* fetch height */ + spec++; + if (! jt_read_integer(&spec, &info->crop_height)) + return FALSE; + if (*spec == 'f' || *spec == 'F') { + spec++; + info->crop_height_set = JCROP_FORCE; + } else if (*spec == 'r' || *spec == 'R') { + spec++; + info->crop_height_set = JCROP_REFLECT; + } else + info->crop_height_set = JCROP_POS; + } + if (*spec == '+' || *spec == '-') { + /* fetch xoffset */ + info->crop_xoffset_set = (*spec == '-') ? JCROP_NEG : JCROP_POS; + spec++; + if (! jt_read_integer(&spec, &info->crop_xoffset)) + return FALSE; + } + if (*spec == '+' || *spec == '-') { + /* fetch yoffset */ + info->crop_yoffset_set = (*spec == '-') ? JCROP_NEG : JCROP_POS; + spec++; + if (! jt_read_integer(&spec, &info->crop_yoffset)) + return FALSE; + } + /* We had better have gotten to the end of the string. */ + if (*spec != '\0') + return FALSE; + info->crop = TRUE; + return TRUE; +} + + +/* Trim off any partial iMCUs on the indicated destination edge */ + +LOCAL(void) +trim_right_edge (jpeg_transform_info *info, JDIMENSION full_width) +{ + JDIMENSION MCU_cols; + + MCU_cols = info->output_width / info->iMCU_sample_width; + if (MCU_cols > 0 && info->x_crop_offset + MCU_cols == + full_width / info->iMCU_sample_width) + info->output_width = MCU_cols * info->iMCU_sample_width; +} + +LOCAL(void) +trim_bottom_edge (jpeg_transform_info *info, JDIMENSION full_height) +{ + JDIMENSION MCU_rows; + + MCU_rows = info->output_height / info->iMCU_sample_height; + if (MCU_rows > 0 && info->y_crop_offset + MCU_rows == + full_height / info->iMCU_sample_height) + info->output_height = MCU_rows * info->iMCU_sample_height; +} + + +/* Request any required workspace. + * + * This routine figures out the size that the output image will be + * (which implies that all the transform parameters must be set before + * it is called). + * + * We allocate the workspace virtual arrays from the source decompression + * object, so that all the arrays (both the original data and the workspace) + * will be taken into account while making memory management decisions. + * Hence, this routine must be called after jpeg_read_header (which reads + * the image dimensions) and before jpeg_read_coefficients (which realizes + * the source's virtual arrays). + * + * This function returns FALSE right away if -perfect is given + * and transformation is not perfect. Otherwise returns TRUE. + */ + +GLOBAL(boolean) +jtransform_request_workspace (j_decompress_ptr srcinfo, + jpeg_transform_info *info) +{ + jvirt_barray_ptr *coef_arrays; + boolean need_workspace, transpose_it; + jpeg_component_info *compptr; + JDIMENSION xoffset, yoffset, dtemp; + JDIMENSION width_in_iMCUs, height_in_iMCUs; + JDIMENSION width_in_blocks, height_in_blocks; + int itemp, ci, h_samp_factor, v_samp_factor; + + /* Determine number of components in output image */ + if (info->force_grayscale && + (srcinfo->jpeg_color_space == JCS_YCbCr || + srcinfo->jpeg_color_space == JCS_BG_YCC) && + srcinfo->num_components == 3) + /* We'll only process the first component */ + info->num_components = 1; + else + /* Process all the components */ + info->num_components = srcinfo->num_components; + + /* Compute output image dimensions and related values. */ + jpeg_core_output_dimensions(srcinfo); + + /* Return right away if -perfect is given and transformation is not perfect. + */ + if (info->perfect) { + if (info->num_components == 1) { + if (!jtransform_perfect_transform(srcinfo->output_width, + srcinfo->output_height, + srcinfo->min_DCT_h_scaled_size, + srcinfo->min_DCT_v_scaled_size, + info->transform)) + return FALSE; + } else { + if (!jtransform_perfect_transform(srcinfo->output_width, + srcinfo->output_height, + srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size, + srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size, + info->transform)) + return FALSE; + } + } + + /* If there is only one output component, force the iMCU size to be 1; + * else use the source iMCU size. (This allows us to do the right thing + * when reducing color to grayscale, and also provides a handy way of + * cleaning up "funny" grayscale images whose sampling factors are not 1x1.) + */ + switch (info->transform) { + case JXFORM_TRANSPOSE: + case JXFORM_TRANSVERSE: + case JXFORM_ROT_90: + case JXFORM_ROT_270: + info->output_width = srcinfo->output_height; + info->output_height = srcinfo->output_width; + if (info->num_components == 1) { + info->iMCU_sample_width = srcinfo->min_DCT_v_scaled_size; + info->iMCU_sample_height = srcinfo->min_DCT_h_scaled_size; + } else { + info->iMCU_sample_width = + srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size; + info->iMCU_sample_height = + srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size; + } + break; + default: + info->output_width = srcinfo->output_width; + info->output_height = srcinfo->output_height; + if (info->num_components == 1) { + info->iMCU_sample_width = srcinfo->min_DCT_h_scaled_size; + info->iMCU_sample_height = srcinfo->min_DCT_v_scaled_size; + } else { + info->iMCU_sample_width = + srcinfo->max_h_samp_factor * srcinfo->min_DCT_h_scaled_size; + info->iMCU_sample_height = + srcinfo->max_v_samp_factor * srcinfo->min_DCT_v_scaled_size; + } + } + + /* If cropping has been requested, compute the crop area's position and + * dimensions, ensuring that its upper left corner falls at an iMCU boundary. + */ + if (info->crop) { + /* Insert default values for unset crop parameters */ + if (info->crop_xoffset_set == JCROP_UNSET) + info->crop_xoffset = 0; /* default to +0 */ + if (info->crop_yoffset_set == JCROP_UNSET) + info->crop_yoffset = 0; /* default to +0 */ + if (info->crop_width_set == JCROP_UNSET) { + if (info->crop_xoffset >= info->output_width) + ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); + info->crop_width = info->output_width - info->crop_xoffset; + } else { + /* Check for crop extension */ + if (info->crop_width > info->output_width) { + /* Crop extension does not work when transforming! */ + if (info->transform != JXFORM_NONE || + info->crop_xoffset >= info->crop_width || + info->crop_xoffset > info->crop_width - info->output_width) + ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); + } else { + if (info->crop_xoffset >= info->output_width || + info->crop_width <= 0 || + info->crop_xoffset > info->output_width - info->crop_width) + ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); + } + } + if (info->crop_height_set == JCROP_UNSET) { + if (info->crop_yoffset >= info->output_height) + ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); + info->crop_height = info->output_height - info->crop_yoffset; + } else { + /* Check for crop extension */ + if (info->crop_height > info->output_height) { + /* Crop extension does not work when transforming! */ + if (info->transform != JXFORM_NONE || + info->crop_yoffset >= info->crop_height || + info->crop_yoffset > info->crop_height - info->output_height) + ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); + } else { + if (info->crop_yoffset >= info->output_height || + info->crop_height <= 0 || + info->crop_yoffset > info->output_height - info->crop_height) + ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); + } + } + /* Convert negative crop offsets into regular offsets */ + if (info->crop_xoffset_set != JCROP_NEG) + xoffset = info->crop_xoffset; + else if (info->crop_width > info->output_width) /* crop extension */ + xoffset = info->crop_width - info->output_width - info->crop_xoffset; + else + xoffset = info->output_width - info->crop_width - info->crop_xoffset; + if (info->crop_yoffset_set != JCROP_NEG) + yoffset = info->crop_yoffset; + else if (info->crop_height > info->output_height) /* crop extension */ + yoffset = info->crop_height - info->output_height - info->crop_yoffset; + else + yoffset = info->output_height - info->crop_height - info->crop_yoffset; + /* Now adjust so that upper left corner falls at an iMCU boundary */ + switch (info->transform) { + case JXFORM_DROP: + /* Ensure the effective drop region will not exceed the requested */ + itemp = info->iMCU_sample_width; + dtemp = itemp - 1 - ((xoffset + itemp - 1) % itemp); + xoffset += dtemp; + if (info->crop_width <= dtemp) + info->drop_width = 0; + else if (xoffset + info->crop_width - dtemp == info->output_width) + /* Matching right edge: include partial iMCU */ + info->drop_width = (info->crop_width - dtemp + itemp - 1) / itemp; + else + info->drop_width = (info->crop_width - dtemp) / itemp; + itemp = info->iMCU_sample_height; + dtemp = itemp - 1 - ((yoffset + itemp - 1) % itemp); + yoffset += dtemp; + if (info->crop_height <= dtemp) + info->drop_height = 0; + else if (yoffset + info->crop_height - dtemp == info->output_height) + /* Matching bottom edge: include partial iMCU */ + info->drop_height = (info->crop_height - dtemp + itemp - 1) / itemp; + else + info->drop_height = (info->crop_height - dtemp) / itemp; + /* Check if sampling factors match for dropping */ + if (info->drop_width != 0 && info->drop_height != 0) + for (ci = 0; ci < info->num_components && + ci < info->drop_ptr->num_components; ci++) { + if (info->drop_ptr->comp_info[ci].h_samp_factor * + srcinfo->max_h_samp_factor != + srcinfo->comp_info[ci].h_samp_factor * + info->drop_ptr->max_h_samp_factor) + ERREXIT6(srcinfo, JERR_BAD_DROP_SAMPLING, ci, + info->drop_ptr->comp_info[ci].h_samp_factor, + info->drop_ptr->max_h_samp_factor, + srcinfo->comp_info[ci].h_samp_factor, + srcinfo->max_h_samp_factor, 'h'); + if (info->drop_ptr->comp_info[ci].v_samp_factor * + srcinfo->max_v_samp_factor != + srcinfo->comp_info[ci].v_samp_factor * + info->drop_ptr->max_v_samp_factor) + ERREXIT6(srcinfo, JERR_BAD_DROP_SAMPLING, ci, + info->drop_ptr->comp_info[ci].v_samp_factor, + info->drop_ptr->max_v_samp_factor, + srcinfo->comp_info[ci].v_samp_factor, + srcinfo->max_v_samp_factor, 'v'); + } + break; + case JXFORM_WIPE: + /* Ensure the effective wipe region will cover the requested */ + info->drop_width = (JDIMENSION) jdiv_round_up + ((long) (info->crop_width + (xoffset % info->iMCU_sample_width)), + (long) info->iMCU_sample_width); + info->drop_height = (JDIMENSION) jdiv_round_up + ((long) (info->crop_height + (yoffset % info->iMCU_sample_height)), + (long) info->iMCU_sample_height); + break; + default: + /* Ensure the effective crop region will cover the requested */ + if (info->crop_width_set == JCROP_FORCE || + info->crop_width > info->output_width) + info->output_width = info->crop_width; + else + info->output_width = + info->crop_width + (xoffset % info->iMCU_sample_width); + if (info->crop_height_set == JCROP_FORCE || + info->crop_height > info->output_height) + info->output_height = info->crop_height; + else + info->output_height = + info->crop_height + (yoffset % info->iMCU_sample_height); + } + /* Save x/y offsets measured in iMCUs */ + info->x_crop_offset = xoffset / info->iMCU_sample_width; + info->y_crop_offset = yoffset / info->iMCU_sample_height; + } else { + info->x_crop_offset = 0; + info->y_crop_offset = 0; + } + + /* Figure out whether we need workspace arrays, + * and if so whether they are transposed relative to the source. + */ + need_workspace = FALSE; + transpose_it = FALSE; + switch (info->transform) { + case JXFORM_NONE: + if (info->x_crop_offset != 0 || info->y_crop_offset != 0 || + info->output_width > srcinfo->output_width || + info->output_height > srcinfo->output_height) + need_workspace = TRUE; + /* No workspace needed if neither cropping nor transforming */ + break; + case JXFORM_FLIP_H: + if (info->trim) + trim_right_edge(info, srcinfo->output_width); + if (info->y_crop_offset != 0) + need_workspace = TRUE; + /* do_flip_h_no_crop doesn't need a workspace array */ + break; + case JXFORM_FLIP_V: + if (info->trim) + trim_bottom_edge(info, srcinfo->output_height); + /* Need workspace arrays having same dimensions as source image. */ + need_workspace = TRUE; + break; + case JXFORM_TRANSPOSE: + /* transpose does NOT have to trim anything */ + /* Need workspace arrays having transposed dimensions. */ + need_workspace = TRUE; + transpose_it = TRUE; + break; + case JXFORM_TRANSVERSE: + if (info->trim) { + trim_right_edge(info, srcinfo->output_height); + trim_bottom_edge(info, srcinfo->output_width); + } + /* Need workspace arrays having transposed dimensions. */ + need_workspace = TRUE; + transpose_it = TRUE; + break; + case JXFORM_ROT_90: + if (info->trim) + trim_right_edge(info, srcinfo->output_height); + /* Need workspace arrays having transposed dimensions. */ + need_workspace = TRUE; + transpose_it = TRUE; + break; + case JXFORM_ROT_180: + if (info->trim) { + trim_right_edge(info, srcinfo->output_width); + trim_bottom_edge(info, srcinfo->output_height); + } + /* Need workspace arrays having same dimensions as source image. */ + need_workspace = TRUE; + break; + case JXFORM_ROT_270: + if (info->trim) + trim_bottom_edge(info, srcinfo->output_width); + /* Need workspace arrays having transposed dimensions. */ + need_workspace = TRUE; + transpose_it = TRUE; + break; + case JXFORM_WIPE: + break; + case JXFORM_DROP: +#if DROP_REQUEST_FROM_SRC + drop_request_from_src(info->drop_ptr, srcinfo); +#endif + break; + } + + /* Allocate workspace if needed. + * Note that we allocate arrays padded out to the next iMCU boundary, + * so that transform routines need not worry about missing edge blocks. + */ + if (need_workspace) { + coef_arrays = (jvirt_barray_ptr *) (*srcinfo->mem->alloc_small) + ((j_common_ptr) srcinfo, JPOOL_IMAGE, + SIZEOF(jvirt_barray_ptr) * info->num_components); + width_in_iMCUs = (JDIMENSION) jdiv_round_up + ((long) info->output_width, (long) info->iMCU_sample_width); + height_in_iMCUs = (JDIMENSION) jdiv_round_up + ((long) info->output_height, (long) info->iMCU_sample_height); + for (ci = 0; ci < info->num_components; ci++) { + compptr = srcinfo->comp_info + ci; + if (info->num_components == 1) { + /* we're going to force samp factors to 1x1 in this case */ + h_samp_factor = v_samp_factor = 1; + } else if (transpose_it) { + h_samp_factor = compptr->v_samp_factor; + v_samp_factor = compptr->h_samp_factor; + } else { + h_samp_factor = compptr->h_samp_factor; + v_samp_factor = compptr->v_samp_factor; + } + width_in_blocks = width_in_iMCUs * h_samp_factor; + height_in_blocks = height_in_iMCUs * v_samp_factor; + coef_arrays[ci] = (*srcinfo->mem->request_virt_barray) + ((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE, + width_in_blocks, height_in_blocks, (JDIMENSION) v_samp_factor); + } + info->workspace_coef_arrays = coef_arrays; + } else + info->workspace_coef_arrays = NULL; + + return TRUE; +} + + +/* Transpose destination image parameters */ + +LOCAL(void) +transpose_critical_parameters (j_compress_ptr dstinfo) +{ + int tblno, i, j, ci, itemp; + jpeg_component_info *compptr; + JQUANT_TBL *qtblptr; + JDIMENSION jtemp; + UINT16 qtemp; + + /* Transpose image dimensions */ + jtemp = dstinfo->image_width; + dstinfo->image_width = dstinfo->image_height; + dstinfo->image_height = jtemp; + itemp = dstinfo->min_DCT_h_scaled_size; + dstinfo->min_DCT_h_scaled_size = dstinfo->min_DCT_v_scaled_size; + dstinfo->min_DCT_v_scaled_size = itemp; + + /* Transpose sampling factors */ + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + itemp = compptr->h_samp_factor; + compptr->h_samp_factor = compptr->v_samp_factor; + compptr->v_samp_factor = itemp; + } + + /* Transpose quantization tables */ + for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) { + qtblptr = dstinfo->quant_tbl_ptrs[tblno]; + if (qtblptr != NULL) { + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < i; j++) { + qtemp = qtblptr->quantval[i*DCTSIZE+j]; + qtblptr->quantval[i*DCTSIZE+j] = qtblptr->quantval[j*DCTSIZE+i]; + qtblptr->quantval[j*DCTSIZE+i] = qtemp; + } + } + } + } +} + + +/* Adjust Exif image parameters. + * + * We try to adjust the Tags ExifImageWidth and ExifImageHeight if possible. + */ + +LOCAL(void) +adjust_exif_parameters (JOCTET FAR * data, unsigned int length, + JDIMENSION new_width, JDIMENSION new_height) +{ + boolean is_motorola; /* Flag for byte order */ + unsigned int number_of_tags, tagnum; + unsigned int firstoffset, offset; + JDIMENSION new_value; + + if (length < 12) return; /* Length of an IFD entry */ + + /* Discover byte order */ + if (GETJOCTET(data[0]) == 0x49 && GETJOCTET(data[1]) == 0x49) + is_motorola = FALSE; + else if (GETJOCTET(data[0]) == 0x4D && GETJOCTET(data[1]) == 0x4D) + is_motorola = TRUE; + else + return; + + /* Check Tag Mark */ + if (is_motorola) { + if (GETJOCTET(data[2]) != 0) return; + if (GETJOCTET(data[3]) != 0x2A) return; + } else { + if (GETJOCTET(data[3]) != 0) return; + if (GETJOCTET(data[2]) != 0x2A) return; + } + + /* Get first IFD offset (offset to IFD0) */ + if (is_motorola) { + if (GETJOCTET(data[4]) != 0) return; + if (GETJOCTET(data[5]) != 0) return; + firstoffset = GETJOCTET(data[6]); + firstoffset <<= 8; + firstoffset += GETJOCTET(data[7]); + } else { + if (GETJOCTET(data[7]) != 0) return; + if (GETJOCTET(data[6]) != 0) return; + firstoffset = GETJOCTET(data[5]); + firstoffset <<= 8; + firstoffset += GETJOCTET(data[4]); + } + if (firstoffset > length - 2) return; /* check end of data segment */ + + /* Get the number of directory entries contained in this IFD */ + if (is_motorola) { + number_of_tags = GETJOCTET(data[firstoffset]); + number_of_tags <<= 8; + number_of_tags += GETJOCTET(data[firstoffset+1]); + } else { + number_of_tags = GETJOCTET(data[firstoffset+1]); + number_of_tags <<= 8; + number_of_tags += GETJOCTET(data[firstoffset]); + } + if (number_of_tags == 0) return; + firstoffset += 2; + + /* Search for ExifSubIFD offset Tag in IFD0 */ + for (;;) { + if (firstoffset > length - 12) return; /* check end of data segment */ + /* Get Tag number */ + if (is_motorola) { + tagnum = GETJOCTET(data[firstoffset]); + tagnum <<= 8; + tagnum += GETJOCTET(data[firstoffset+1]); + } else { + tagnum = GETJOCTET(data[firstoffset+1]); + tagnum <<= 8; + tagnum += GETJOCTET(data[firstoffset]); + } + if (tagnum == 0x8769) break; /* found ExifSubIFD offset Tag */ + if (--number_of_tags == 0) return; + firstoffset += 12; + } + + /* Get the ExifSubIFD offset */ + if (is_motorola) { + if (GETJOCTET(data[firstoffset+8]) != 0) return; + if (GETJOCTET(data[firstoffset+9]) != 0) return; + offset = GETJOCTET(data[firstoffset+10]); + offset <<= 8; + offset += GETJOCTET(data[firstoffset+11]); + } else { + if (GETJOCTET(data[firstoffset+11]) != 0) return; + if (GETJOCTET(data[firstoffset+10]) != 0) return; + offset = GETJOCTET(data[firstoffset+9]); + offset <<= 8; + offset += GETJOCTET(data[firstoffset+8]); + } + if (offset > length - 2) return; /* check end of data segment */ + + /* Get the number of directory entries contained in this SubIFD */ + if (is_motorola) { + number_of_tags = GETJOCTET(data[offset]); + number_of_tags <<= 8; + number_of_tags += GETJOCTET(data[offset+1]); + } else { + number_of_tags = GETJOCTET(data[offset+1]); + number_of_tags <<= 8; + number_of_tags += GETJOCTET(data[offset]); + } + if (number_of_tags < 2) return; + offset += 2; + + /* Search for ExifImageWidth and ExifImageHeight Tags in this SubIFD */ + do { + if (offset > length - 12) return; /* check end of data segment */ + /* Get Tag number */ + if (is_motorola) { + tagnum = GETJOCTET(data[offset]); + tagnum <<= 8; + tagnum += GETJOCTET(data[offset+1]); + } else { + tagnum = GETJOCTET(data[offset+1]); + tagnum <<= 8; + tagnum += GETJOCTET(data[offset]); + } + if (tagnum == 0xA002 || tagnum == 0xA003) { + if (tagnum == 0xA002) + new_value = new_width; /* ExifImageWidth Tag */ + else + new_value = new_height; /* ExifImageHeight Tag */ + if (is_motorola) { + data[offset+2] = 0; /* Format = unsigned long (4 octets) */ + data[offset+3] = 4; + data[offset+4] = 0; /* Number Of Components = 1 */ + data[offset+5] = 0; + data[offset+6] = 0; + data[offset+7] = 1; + data[offset+8] = 0; + data[offset+9] = 0; + data[offset+10] = (JOCTET)((new_value >> 8) & 0xFF); + data[offset+11] = (JOCTET)(new_value & 0xFF); + } else { + data[offset+2] = 4; /* Format = unsigned long (4 octets) */ + data[offset+3] = 0; + data[offset+4] = 1; /* Number Of Components = 1 */ + data[offset+5] = 0; + data[offset+6] = 0; + data[offset+7] = 0; + data[offset+8] = (JOCTET)(new_value & 0xFF); + data[offset+9] = (JOCTET)((new_value >> 8) & 0xFF); + data[offset+10] = 0; + data[offset+11] = 0; + } + } + offset += 12; + } while (--number_of_tags); +} + + +/* Adjust output image parameters as needed. + * + * This must be called after jpeg_copy_critical_parameters() + * and before jpeg_write_coefficients(). + * + * The return value is the set of virtual coefficient arrays to be written + * (either the ones allocated by jtransform_request_workspace, or the + * original source data arrays). The caller will need to pass this value + * to jpeg_write_coefficients(). + */ + +GLOBAL(jvirt_barray_ptr *) +jtransform_adjust_parameters (j_decompress_ptr srcinfo, + j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jpeg_transform_info *info) +{ + /* If force-to-grayscale is requested, adjust destination parameters */ + if (info->force_grayscale) { + /* First, ensure we have YCC or grayscale data, and that the source's + * Y channel is full resolution. (No reasonable person would make Y + * be less than full resolution, so actually coping with that case + * isn't worth extra code space. But we check it to avoid crashing.) + */ + if ((((dstinfo->jpeg_color_space == JCS_YCbCr || + dstinfo->jpeg_color_space == JCS_BG_YCC) && + dstinfo->num_components == 3) || + (dstinfo->jpeg_color_space == JCS_GRAYSCALE && + dstinfo->num_components == 1)) && + srcinfo->comp_info[0].h_samp_factor == srcinfo->max_h_samp_factor && + srcinfo->comp_info[0].v_samp_factor == srcinfo->max_v_samp_factor) { + /* We use jpeg_set_colorspace to make sure subsidiary settings get fixed + * properly. Among other things, it sets the target h_samp_factor & + * v_samp_factor to 1, which typically won't match the source. + * We have to preserve the source's quantization table number, however. + */ + int sv_quant_tbl_no = dstinfo->comp_info[0].quant_tbl_no; + jpeg_set_colorspace(dstinfo, JCS_GRAYSCALE); + dstinfo->comp_info[0].quant_tbl_no = sv_quant_tbl_no; + } else { + /* Sorry, can't do it */ + ERREXIT(dstinfo, JERR_CONVERSION_NOTIMPL); + } + } else if (info->num_components == 1) { + /* For a single-component source, we force the destination sampling factors + * to 1x1, with or without force_grayscale. This is useful because some + * decoders choke on grayscale images with other sampling factors. + */ + dstinfo->comp_info[0].h_samp_factor = 1; + dstinfo->comp_info[0].v_samp_factor = 1; + } + + /* Correct the destination's image dimensions as necessary + * for rotate/flip, resize, and crop operations. + */ + dstinfo->jpeg_width = info->output_width; + dstinfo->jpeg_height = info->output_height; + + /* Transpose destination image parameters, adjust quantization */ + switch (info->transform) { + case JXFORM_TRANSPOSE: + case JXFORM_TRANSVERSE: + case JXFORM_ROT_90: + case JXFORM_ROT_270: + transpose_critical_parameters(dstinfo); + break; + case JXFORM_DROP: + if (info->drop_width != 0 && info->drop_height != 0) + adjust_quant(srcinfo, src_coef_arrays, + info->drop_ptr, info->drop_coef_arrays, + info->trim, dstinfo); + break; + default: + break; + } + + /* Adjust Exif properties */ + if (srcinfo->marker_list != NULL && + srcinfo->marker_list->marker == JPEG_APP0+1 && + srcinfo->marker_list->data_length >= 6 && + GETJOCTET(srcinfo->marker_list->data[0]) == 0x45 && + GETJOCTET(srcinfo->marker_list->data[1]) == 0x78 && + GETJOCTET(srcinfo->marker_list->data[2]) == 0x69 && + GETJOCTET(srcinfo->marker_list->data[3]) == 0x66 && + GETJOCTET(srcinfo->marker_list->data[4]) == 0 && + GETJOCTET(srcinfo->marker_list->data[5]) == 0) { + /* Suppress output of JFIF marker */ + dstinfo->write_JFIF_header = FALSE; + /* Adjust Exif image parameters */ + if (dstinfo->jpeg_width != srcinfo->image_width || + dstinfo->jpeg_height != srcinfo->image_height) + /* Align data segment to start of TIFF structure for parsing */ + adjust_exif_parameters(srcinfo->marker_list->data + 6, + srcinfo->marker_list->data_length - 6, + dstinfo->jpeg_width, dstinfo->jpeg_height); + } + + /* Return the appropriate output data set */ + if (info->workspace_coef_arrays != NULL) + return info->workspace_coef_arrays; + return src_coef_arrays; +} + + +/* Execute the actual transformation, if any. + * + * This must be called *after* jpeg_write_coefficients, because it depends + * on jpeg_write_coefficients to have computed subsidiary values such as + * the per-component width and height fields in the destination object. + * + * Note that some transformations will modify the source data arrays! + */ + +GLOBAL(void) +jtransform_execute_transform (j_decompress_ptr srcinfo, + j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jpeg_transform_info *info) +{ + jvirt_barray_ptr *dst_coef_arrays = info->workspace_coef_arrays; + + /* Note: conditions tested here should match those in switch statement + * in jtransform_request_workspace() + */ + switch (info->transform) { + case JXFORM_NONE: + if (info->output_width > srcinfo->output_width || + info->output_height > srcinfo->output_height) { + if (info->output_width > srcinfo->output_width && + info->crop_width_set == JCROP_REFLECT) + do_crop_ext_reflect(srcinfo, dstinfo, + info->x_crop_offset, info->y_crop_offset, + src_coef_arrays, dst_coef_arrays); + else if (info->output_width > srcinfo->output_width && + info->crop_width_set == JCROP_FORCE) + do_crop_ext_flat(srcinfo, dstinfo, + info->x_crop_offset, info->y_crop_offset, + src_coef_arrays, dst_coef_arrays); + else + do_crop_ext_zero(srcinfo, dstinfo, + info->x_crop_offset, info->y_crop_offset, + src_coef_arrays, dst_coef_arrays); + } else if (info->x_crop_offset != 0 || info->y_crop_offset != 0) + do_crop(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, + src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_FLIP_H: + if (info->y_crop_offset != 0) + do_flip_h(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, + src_coef_arrays, dst_coef_arrays); + else + do_flip_h_no_crop(srcinfo, dstinfo, info->x_crop_offset, + src_coef_arrays); + break; + case JXFORM_FLIP_V: + do_flip_v(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, + src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_TRANSPOSE: + do_transpose(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, + src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_TRANSVERSE: + do_transverse(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, + src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_ROT_90: + do_rot_90(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, + src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_ROT_180: + do_rot_180(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, + src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_ROT_270: + do_rot_270(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, + src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_WIPE: + if (info->crop_width_set == JCROP_REFLECT && + info->y_crop_offset == 0 && info->drop_height == + (JDIMENSION) jdiv_round_up + ((long) info->output_height, (long) info->iMCU_sample_height) && + (info->x_crop_offset == 0 || + info->x_crop_offset + info->drop_width == + (JDIMENSION) jdiv_round_up + ((long) info->output_width, (long) info->iMCU_sample_width))) + do_reflect(srcinfo, dstinfo, info->x_crop_offset, + src_coef_arrays, info->drop_width, info->drop_height); + else if (info->crop_width_set == JCROP_FORCE) + do_flatten(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, + src_coef_arrays, info->drop_width, info->drop_height); + else + do_wipe(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, + src_coef_arrays, info->drop_width, info->drop_height); + break; + case JXFORM_DROP: + if (info->drop_width != 0 && info->drop_height != 0) + do_drop(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, + src_coef_arrays, info->drop_ptr, info->drop_coef_arrays, + info->drop_width, info->drop_height); + break; + } +} + +/* jtransform_perfect_transform + * + * Determine whether lossless transformation is perfectly + * possible for a specified image and transformation. + * + * Inputs: + * image_width, image_height: source image dimensions. + * MCU_width, MCU_height: pixel dimensions of MCU. + * transform: transformation identifier. + * Parameter sources from initialized jpeg_struct + * (after reading source header): + * image_width = cinfo.image_width + * image_height = cinfo.image_height + * MCU_width = cinfo.max_h_samp_factor * cinfo.block_size + * MCU_height = cinfo.max_v_samp_factor * cinfo.block_size + * Result: + * TRUE = perfect transformation possible + * FALSE = perfect transformation not possible + * (may use custom action then) + */ + +GLOBAL(boolean) +jtransform_perfect_transform(JDIMENSION image_width, JDIMENSION image_height, + int MCU_width, int MCU_height, + JXFORM_CODE transform) +{ + boolean result = TRUE; /* initialize TRUE */ + + switch (transform) { + case JXFORM_FLIP_H: + case JXFORM_ROT_270: + if (image_width % (JDIMENSION) MCU_width) + result = FALSE; + break; + case JXFORM_FLIP_V: + case JXFORM_ROT_90: + if (image_height % (JDIMENSION) MCU_height) + result = FALSE; + break; + case JXFORM_TRANSVERSE: + case JXFORM_ROT_180: + if (image_width % (JDIMENSION) MCU_width) + result = FALSE; + if (image_height % (JDIMENSION) MCU_height) + result = FALSE; + break; + default: + break; + } + + return result; +} + +#endif /* TRANSFORMS_SUPPORTED */ + + +/* Setup decompression object to save desired markers in memory. + * This must be called before jpeg_read_header() to have the desired effect. + */ + +GLOBAL(void) +jcopy_markers_setup (j_decompress_ptr srcinfo, JCOPY_OPTION option) +{ +#ifdef SAVE_MARKERS_SUPPORTED + int m; + + /* Save comments except under NONE option */ + if (option != JCOPYOPT_NONE) { + jpeg_save_markers(srcinfo, JPEG_COM, 0xFFFF); + } + /* Save all types of APPn markers iff ALL option */ + if (option == JCOPYOPT_ALL) { + for (m = 0; m < 16; m++) + jpeg_save_markers(srcinfo, JPEG_APP0 + m, 0xFFFF); + } +#endif /* SAVE_MARKERS_SUPPORTED */ +} + +/* Copy markers saved in the given source object to the destination object. + * This should be called just after jpeg_start_compress() or + * jpeg_write_coefficients(). + * Note that those routines will have written the SOI, and also the + * JFIF APP0 or Adobe APP14 markers if selected. + */ + +GLOBAL(void) +jcopy_markers_execute (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + JCOPY_OPTION option) +{ + jpeg_saved_marker_ptr marker; + + /* In the current implementation, we don't actually need to examine the + * option flag here; we just copy everything that got saved. + * But to avoid confusion, we do not output JFIF and Adobe APP14 markers + * if the encoder library already wrote one. + */ + for (marker = srcinfo->marker_list; marker != NULL; marker = marker->next) { + if (dstinfo->write_JFIF_header && + marker->marker == JPEG_APP0 && + marker->data_length >= 5 && + GETJOCTET(marker->data[0]) == 0x4A && + GETJOCTET(marker->data[1]) == 0x46 && + GETJOCTET(marker->data[2]) == 0x49 && + GETJOCTET(marker->data[3]) == 0x46 && + GETJOCTET(marker->data[4]) == 0) + continue; /* reject duplicate JFIF */ + if (dstinfo->write_Adobe_marker && + marker->marker == JPEG_APP0+14 && + marker->data_length >= 5 && + GETJOCTET(marker->data[0]) == 0x41 && + GETJOCTET(marker->data[1]) == 0x64 && + GETJOCTET(marker->data[2]) == 0x6F && + GETJOCTET(marker->data[3]) == 0x62 && + GETJOCTET(marker->data[4]) == 0x65) + continue; /* reject duplicate Adobe */ +#ifdef NEED_FAR_POINTERS + /* We could use jpeg_write_marker if the data weren't FAR... */ + { + unsigned int i; + jpeg_write_m_header(dstinfo, marker->marker, marker->data_length); + for (i = 0; i < marker->data_length; i++) + jpeg_write_m_byte(dstinfo, marker->data[i]); + } +#else + jpeg_write_marker(dstinfo, marker->marker, + marker->data, marker->data_length); +#endif + } +} diff --git a/widget/milsko/milskosrc/external/libjpeg/src/wrbmp.c b/widget/milsko/milskosrc/external/libjpeg/src/wrbmp.c new file mode 100644 index 0000000000..bed699ff40 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/wrbmp.c @@ -0,0 +1,437 @@ +/* + * wrbmp.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * Modified 2017-2019 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write output images in Microsoft "BMP" + * format (MS Windows 3.x and OS/2 1.x flavors). + * Either 8-bit colormapped or 24-bit full-color format can be written. + * No compression is supported. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume output to + * an ordinary stdio stream. + * + * This code contributed by James Arthur Boucher. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef BMP_SUPPORTED + + +/* + * To support 12-bit JPEG data, we'd have to scale output down to 8 bits. + * This is not yet implemented. + */ + +#if BITS_IN_JSAMPLE != 8 + Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ +#endif + +/* + * Since BMP stores scanlines bottom-to-top, we have to invert the image + * from JPEG's top-to-bottom order. To do this, we save the outgoing data + * in a virtual array during put_pixel_row calls, then actually emit the + * BMP file during finish_output. The virtual array contains one JSAMPLE per + * pixel if the output is grayscale or colormapped, three if it is full color. + */ + +/* Private version of data destination object */ + +typedef struct { + struct djpeg_dest_struct pub; /* public fields */ + + boolean is_os2; /* saves the OS2 format request flag */ + + jvirt_sarray_ptr whole_image; /* needed to reverse row order */ + JDIMENSION data_width; /* JSAMPLEs per row */ + JDIMENSION row_width; /* physical width of one row in the BMP file */ + int pad_bytes; /* number of padding bytes needed per row */ + JDIMENSION cur_output_row; /* next row# to write to virtual array */ +} bmp_dest_struct; + +typedef bmp_dest_struct * bmp_dest_ptr; + + +/* Forward declarations */ +LOCAL(void) write_colormap + JPP((j_decompress_ptr cinfo, bmp_dest_ptr dest, + int map_colors, int map_entry_size)); + + +/* + * Write some pixel data. + * In this module rows_supplied will always be 1. + */ + +METHODDEF(void) +put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +/* This version is for writing 24-bit pixels */ +{ + bmp_dest_ptr dest = (bmp_dest_ptr) dinfo; + register JSAMPROW inptr, outptr; + register JDIMENSION col; + int pad; + + /* Access next row in virtual array */ + outptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, + dest->whole_image, dest->cur_output_row, (JDIMENSION) 1, TRUE); + dest->cur_output_row++; + + /* Transfer data. Note destination values must be in BGR order + * (even though Microsoft's own documents say the opposite). + */ + inptr = dest->pub.buffer[0]; + for (col = cinfo->output_width; col > 0; col--) { + outptr[2] = *inptr++; /* can omit GETJSAMPLE() safely */ + outptr[1] = *inptr++; + outptr[0] = *inptr++; + outptr += 3; + } + + /* Zero out the pad bytes. */ + pad = dest->pad_bytes; + while (--pad >= 0) + *outptr++ = 0; +} + +METHODDEF(void) +put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +/* This version is for grayscale OR quantized color output */ +{ + bmp_dest_ptr dest = (bmp_dest_ptr) dinfo; + register JSAMPROW inptr, outptr; + register JDIMENSION col; + int pad; + + /* Access next row in virtual array */ + outptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, + dest->whole_image, dest->cur_output_row, (JDIMENSION) 1, TRUE); + dest->cur_output_row++; + + /* Transfer data. */ + inptr = dest->pub.buffer[0]; + for (col = cinfo->output_width; col > 0; col--) { + *outptr++ = *inptr++; /* can omit GETJSAMPLE() safely */ + } + + /* Zero out the pad bytes. */ + pad = dest->pad_bytes; + while (--pad >= 0) + *outptr++ = 0; +} + + +/* + * Startup: normally writes the file header. + * In this module we may as well postpone everything until finish_output. + */ + +METHODDEF(void) +start_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + /* no work here */ +} + + +/* + * Finish up at the end of the file. + * + * Here is where we really output the BMP file. + * + * First, routines to write the Windows and OS/2 variants of the file header. + */ + +LOCAL(void) +write_bmp_header (j_decompress_ptr cinfo, bmp_dest_ptr dest) +/* Write a Windows-style BMP file header, including colormap if needed */ +{ + char bmpfileheader[14]; + char bmpinfoheader[40]; +#define PUT_2B(array, offset, value) \ + (array[offset] = (char) ((value) & 0xFF), \ + array[offset+1] = (char) (((value) >> 8) & 0xFF)) +#define PUT_4B(array, offset, value) \ + (array[offset] = (char) ((value) & 0xFF), \ + array[offset+1] = (char) (((value) >> 8) & 0xFF), \ + array[offset+2] = (char) (((value) >> 16) & 0xFF), \ + array[offset+3] = (char) (((value) >> 24) & 0xFF)) + INT32 headersize, bfSize; + int bits_per_pixel, cmap_entries; + + /* Compute colormap size and total file size */ + if (cinfo->out_color_space == JCS_RGB) { + if (cinfo->quantize_colors) { + /* Colormapped RGB */ + bits_per_pixel = 8; + cmap_entries = 256; + } else { + /* Unquantized, full color RGB */ + bits_per_pixel = 24; + cmap_entries = 0; + } + } else { + /* Grayscale output. We need to fake a 256-entry colormap. */ + bits_per_pixel = 8; + cmap_entries = 256; + } + /* File size */ + headersize = 14 + 40 + cmap_entries * 4; /* Header and colormap */ + bfSize = headersize + (INT32) dest->row_width * (INT32) cinfo->output_height; + + /* Set unused fields of header to 0 */ + MEMZERO(bmpfileheader, SIZEOF(bmpfileheader)); + MEMZERO(bmpinfoheader, SIZEOF(bmpinfoheader)); + + /* Fill the file header */ + bmpfileheader[0] = 0x42; /* first 2 bytes are ASCII 'B', 'M' */ + bmpfileheader[1] = 0x4D; + PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */ + /* we leave bfReserved1 & bfReserved2 = 0 */ + PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */ + + /* Fill the info header (Microsoft calls this a BITMAPINFOHEADER) */ + PUT_2B(bmpinfoheader, 0, 40); /* biSize */ + PUT_4B(bmpinfoheader, 4, cinfo->output_width); /* biWidth */ + PUT_4B(bmpinfoheader, 8, cinfo->output_height); /* biHeight */ + PUT_2B(bmpinfoheader, 12, 1); /* biPlanes - must be 1 */ + PUT_2B(bmpinfoheader, 14, bits_per_pixel); /* biBitCount */ + /* we leave biCompression = 0, for none */ + /* we leave biSizeImage = 0; this is correct for uncompressed data */ + if (cinfo->density_unit == 2) { /* if have density in dots/cm, then */ + PUT_4B(bmpinfoheader, 24, (INT32) (cinfo->X_density*100)); /* XPels/M */ + PUT_4B(bmpinfoheader, 28, (INT32) (cinfo->Y_density*100)); /* XPels/M */ + } + PUT_2B(bmpinfoheader, 32, cmap_entries); /* biClrUsed */ + /* we leave biClrImportant = 0 */ + + if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t) 14) + ERREXIT(cinfo, JERR_FILE_WRITE); + if (JFWRITE(dest->pub.output_file, bmpinfoheader, 40) != (size_t) 40) + ERREXIT(cinfo, JERR_FILE_WRITE); + + if (cmap_entries > 0) + write_colormap(cinfo, dest, cmap_entries, 4); +} + + +LOCAL(void) +write_os2_header (j_decompress_ptr cinfo, bmp_dest_ptr dest) +/* Write an OS2-style BMP file header, including colormap if needed */ +{ + char bmpfileheader[14]; + char bmpcoreheader[12]; + INT32 headersize, bfSize; + int bits_per_pixel, cmap_entries; + + /* Compute colormap size and total file size */ + if (cinfo->out_color_space == JCS_RGB) { + if (cinfo->quantize_colors) { + /* Colormapped RGB */ + bits_per_pixel = 8; + cmap_entries = 256; + } else { + /* Unquantized, full color RGB */ + bits_per_pixel = 24; + cmap_entries = 0; + } + } else { + /* Grayscale output. We need to fake a 256-entry colormap. */ + bits_per_pixel = 8; + cmap_entries = 256; + } + /* File size */ + headersize = 14 + 12 + cmap_entries * 3; /* Header and colormap */ + bfSize = headersize + (INT32) dest->row_width * (INT32) cinfo->output_height; + + /* Set unused fields of header to 0 */ + MEMZERO(bmpfileheader, SIZEOF(bmpfileheader)); + MEMZERO(bmpcoreheader, SIZEOF(bmpcoreheader)); + + /* Fill the file header */ + bmpfileheader[0] = 0x42; /* first 2 bytes are ASCII 'B', 'M' */ + bmpfileheader[1] = 0x4D; + PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */ + /* we leave bfReserved1 & bfReserved2 = 0 */ + PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */ + + /* Fill the info header (Microsoft calls this a BITMAPCOREHEADER) */ + PUT_2B(bmpcoreheader, 0, 12); /* bcSize */ + PUT_2B(bmpcoreheader, 4, cinfo->output_width); /* bcWidth */ + PUT_2B(bmpcoreheader, 6, cinfo->output_height); /* bcHeight */ + PUT_2B(bmpcoreheader, 8, 1); /* bcPlanes - must be 1 */ + PUT_2B(bmpcoreheader, 10, bits_per_pixel); /* bcBitCount */ + + if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t) 14) + ERREXIT(cinfo, JERR_FILE_WRITE); + if (JFWRITE(dest->pub.output_file, bmpcoreheader, 12) != (size_t) 12) + ERREXIT(cinfo, JERR_FILE_WRITE); + + if (cmap_entries > 0) + write_colormap(cinfo, dest, cmap_entries, 3); +} + + +/* + * Write the colormap. + * Windows uses BGR0 map entries; OS/2 uses BGR entries. + */ + +LOCAL(void) +write_colormap (j_decompress_ptr cinfo, bmp_dest_ptr dest, + int map_colors, int map_entry_size) +{ + JSAMPARRAY colormap = cinfo->colormap; + int num_colors = cinfo->actual_number_of_colors; + FILE * outfile = dest->pub.output_file; + int i; + + if (colormap != NULL) { + if (cinfo->out_color_components == 3) { + /* Normal case with RGB colormap */ + for (i = 0; i < num_colors; i++) { + putc(GETJSAMPLE(colormap[2][i]), outfile); + putc(GETJSAMPLE(colormap[1][i]), outfile); + putc(GETJSAMPLE(colormap[0][i]), outfile); + if (map_entry_size == 4) + putc(0, outfile); + } + } else { + /* Grayscale colormap (only happens with grayscale quantization) */ + for (i = 0; i < num_colors; i++) { + putc(GETJSAMPLE(colormap[0][i]), outfile); + putc(GETJSAMPLE(colormap[0][i]), outfile); + putc(GETJSAMPLE(colormap[0][i]), outfile); + if (map_entry_size == 4) + putc(0, outfile); + } + } + } else { + /* If no colormap, must be grayscale data. Generate a linear "map". */ + for (i = 0; i < 256; i++) { + putc(i, outfile); + putc(i, outfile); + putc(i, outfile); + if (map_entry_size == 4) + putc(0, outfile); + } + } + /* Pad colormap to ensure specified number of colormap entries */ + if (i > map_colors) + ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, i); + for (; i < map_colors; i++) { + putc(CENTERJSAMPLE, outfile); + putc(CENTERJSAMPLE, outfile); + putc(CENTERJSAMPLE, outfile); + if (map_entry_size == 4) + putc(0, outfile); + } +} + + +METHODDEF(void) +finish_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + bmp_dest_ptr dest = (bmp_dest_ptr) dinfo; + register FILE * outfile = dest->pub.output_file; + register JSAMPROW data_ptr; + JDIMENSION row; + register JDIMENSION col; + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + + /* Write the header and colormap */ + if (dest->is_os2) + write_os2_header(cinfo, dest); + else + write_bmp_header(cinfo, dest); + + /* Write the file body from our virtual array */ + for (row = cinfo->output_height; row > 0; row--) { + if (progress != NULL) { + progress->pub.pass_counter = (long) (cinfo->output_height - row); + progress->pub.pass_limit = (long) cinfo->output_height; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } + data_ptr = * (*cinfo->mem->access_virt_sarray) ((j_common_ptr) cinfo, + dest->whole_image, row - 1, (JDIMENSION) 1, FALSE); + for (col = dest->row_width; col > 0; col--) { + putc(GETJSAMPLE(*data_ptr), outfile); + data_ptr++; + } + } + if (progress != NULL) + progress->completed_extra_passes++; + + /* Make sure we wrote the output file OK */ + JFFLUSH(outfile); + if (JFERROR(outfile)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * The module selection routine for BMP format output. + */ + +GLOBAL(djpeg_dest_ptr) +jinit_write_bmp (j_decompress_ptr cinfo, boolean is_os2) +{ + bmp_dest_ptr dest; + JDIMENSION row_width; + + /* Create module interface object, fill in method pointers */ + dest = (bmp_dest_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(bmp_dest_struct)); + dest->pub.start_output = start_output_bmp; + dest->pub.finish_output = finish_output_bmp; + dest->is_os2 = is_os2; + + switch (cinfo->out_color_space) { + case JCS_GRAYSCALE: + dest->pub.put_pixel_rows = put_gray_rows; + break; + case JCS_RGB: + if (cinfo->quantize_colors) + dest->pub.put_pixel_rows = put_gray_rows; + else + dest->pub.put_pixel_rows = put_pixel_rows; + break; + default: + ERREXIT(cinfo, JERR_BMP_COLORSPACE); + } + + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfo); + + /* Determine width of rows in the BMP file (padded to 4-byte boundary). */ + row_width = cinfo->output_width * cinfo->output_components; + dest->data_width = row_width; + while ((row_width & 3) != 0) row_width++; + dest->row_width = row_width; + dest->pad_bytes = (int) (row_width - dest->data_width); + + /* Allocate space for inversion array, prepare for write pass */ + dest->whole_image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + row_width, cinfo->output_height, (JDIMENSION) 1); + dest->cur_output_row = 0; + if (cinfo->progress != NULL) { + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + progress->total_extra_passes++; /* count file input as separate pass */ + } + + /* Create decompressor output buffer. */ + dest->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, row_width, (JDIMENSION) 1); + dest->pub.buffer_height = 1; + + return &dest->pub; +} + +#endif /* BMP_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/wrgif.c b/widget/milsko/milskosrc/external/libjpeg/src/wrgif.c new file mode 100644 index 0000000000..9d472de106 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/wrgif.c @@ -0,0 +1,566 @@ +/* + * wrgif.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * Modified 2015-2019 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write output images in GIF format. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume output to + * an ordinary stdio stream. + */ + +/* + * This code is loosely based on ppmtogif from the PBMPLUS distribution + * of Feb. 1991. That file contains the following copyright notice: + * Based on GIFENCODE by David Rowley . + * Lempel-Ziv compression based on "compress" by Spencer W. Thomas et al. + * Copyright (C) 1989 by Jef Poskanzer. + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, provided + * that the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation. This software is provided "as is" without express or + * implied warranty. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef GIF_SUPPORTED + + +#define MAX_LZW_BITS 12 /* maximum LZW code size (4096 symbols) */ + +typedef INT16 code_int; /* must hold -1 .. 2**MAX_LZW_BITS */ + +#define LZW_TABLE_SIZE ((code_int) 1 << MAX_LZW_BITS) + +#define HSIZE 5003 /* hash table size for 80% occupancy */ + +typedef int hash_int; /* must hold -2*HSIZE..2*HSIZE */ + +#define MAXCODE(n_bits) (((code_int) 1 << (n_bits)) - 1) + + +/* + * The LZW hash table consists of two parallel arrays: + * hash_code[i] code of symbol in slot i, or 0 if empty slot + * hash_value[i] symbol's value; undefined if empty slot + * where slot values (i) range from 0 to HSIZE-1. The symbol value is + * its prefix symbol's code concatenated with its suffix character. + * + * Algorithm: use open addressing double hashing (no chaining) on the + * prefix code / suffix character combination. We do a variant of Knuth's + * algorithm D (vol. 3, sec. 6.4) along with G. Knott's relatively-prime + * secondary probe. + * + * The hash_value[] table is allocated from FAR heap space since it would + * use up rather a lot of the near data space in a PC. + */ + +typedef INT32 hash_entry; /* must hold (code_int<<8) | byte */ + +#define HASH_ENTRY(prefix, suffix) ((((hash_entry) (prefix)) << 8) | (suffix)) + + +/* Private version of data destination object */ + +typedef struct { + struct djpeg_dest_struct pub; /* public fields */ + + j_decompress_ptr cinfo; /* back link saves passing separate parm */ + + /* State for packing variable-width codes into a bitstream */ + int n_bits; /* current number of bits/code */ + code_int maxcode; /* maximum code, given n_bits */ + int init_bits; /* initial n_bits ... restored after clear */ + INT32 cur_accum; /* holds bits not yet output */ + int cur_bits; /* # of bits in cur_accum */ + + /* LZW string construction */ + code_int waiting_code; /* symbol not yet output; may be extendable */ + boolean first_byte; /* if TRUE, waiting_code is not valid */ + + /* State for GIF code assignment */ + code_int ClearCode; /* clear code (doesn't change) */ + code_int EOFCode; /* EOF code (ditto) */ + code_int free_code; /* LZW: first not-yet-used symbol code */ + code_int code_counter; /* not LZW: counts output symbols */ + + /* LZW hash table */ + code_int *hash_code; /* => hash table of symbol codes */ + hash_entry FAR *hash_value; /* => hash table of symbol values */ + + /* GIF data packet construction buffer */ + int bytesinpkt; /* # of bytes in current packet */ + char packetbuf[256]; /* workspace for accumulating packet */ + +} gif_dest_struct; + +typedef gif_dest_struct * gif_dest_ptr; + + +/* + * Routines to package finished data bytes into GIF data blocks. + * A data block consists of a count byte (1..255) and that many data bytes. + */ + +LOCAL(void) +flush_packet (gif_dest_ptr dinfo) +/* flush any accumulated data */ +{ + if (dinfo->bytesinpkt > 0) { /* never write zero-length packet */ + dinfo->packetbuf[0] = (char) dinfo->bytesinpkt++; + if (JFWRITE(dinfo->pub.output_file, dinfo->packetbuf, dinfo->bytesinpkt) + != (size_t) dinfo->bytesinpkt) + ERREXIT(dinfo->cinfo, JERR_FILE_WRITE); + dinfo->bytesinpkt = 0; + } +} + + +/* Add a character to current packet; flush to disk if necessary */ +#define CHAR_OUT(dinfo, c) \ + { (dinfo)->packetbuf[++(dinfo)->bytesinpkt] = (char) (c); \ + if ((dinfo)->bytesinpkt >= 255) \ + flush_packet(dinfo); \ + } + + +/* Routine to convert variable-width codes into a byte stream */ + +LOCAL(void) +output (gif_dest_ptr dinfo, code_int code) +/* Emit a code of n_bits bits */ +/* Uses cur_accum and cur_bits to reblock into 8-bit bytes */ +{ + dinfo->cur_accum |= ((INT32) code) << dinfo->cur_bits; + dinfo->cur_bits += dinfo->n_bits; + + while (dinfo->cur_bits >= 8) { + CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF); + dinfo->cur_accum >>= 8; + dinfo->cur_bits -= 8; + } + + /* + * If the next entry is going to be too big for the code size, + * then increase it, if possible. We do this here to ensure + * that it's done in sync with the decoder's codesize increases. + */ + if (dinfo->free_code > dinfo->maxcode) { + dinfo->n_bits++; + if (dinfo->n_bits == MAX_LZW_BITS) + dinfo->maxcode = LZW_TABLE_SIZE; /* free_code will never exceed this */ + else + dinfo->maxcode = MAXCODE(dinfo->n_bits); + } +} + + +/* Compression initialization & termination */ + + +LOCAL(void) +clear_hash (gif_dest_ptr dinfo) +/* Fill the hash table with empty entries */ +{ + /* It's sufficient to zero hash_code[] */ + MEMZERO(dinfo->hash_code, HSIZE * SIZEOF(code_int)); +} + + +LOCAL(void) +clear_block (gif_dest_ptr dinfo) +/* Reset compressor and issue a Clear code */ +{ + clear_hash(dinfo); /* delete all the symbols */ + dinfo->free_code = dinfo->ClearCode + 2; + output(dinfo, dinfo->ClearCode); /* inform decoder */ + dinfo->n_bits = dinfo->init_bits; /* reset code size */ + dinfo->maxcode = MAXCODE(dinfo->n_bits); +} + + +LOCAL(void) +compress_init (gif_dest_ptr dinfo, int i_bits) +/* Initialize compressor */ +{ + /* init all the state variables */ + dinfo->n_bits = dinfo->init_bits = i_bits; + dinfo->maxcode = MAXCODE(dinfo->n_bits); + dinfo->ClearCode = ((code_int) 1 << (i_bits - 1)); + dinfo->EOFCode = dinfo->ClearCode + 1; + dinfo->code_counter = dinfo->free_code = dinfo->ClearCode + 2; + dinfo->first_byte = TRUE; /* no waiting symbol yet */ + /* init output buffering vars */ + dinfo->bytesinpkt = 0; + dinfo->cur_accum = 0; + dinfo->cur_bits = 0; + /* clear hash table */ + if (dinfo->hash_code != NULL) + clear_hash(dinfo); + /* GIF specifies an initial Clear code */ + output(dinfo, dinfo->ClearCode); +} + + +LOCAL(void) +compress_term (gif_dest_ptr dinfo) +/* Clean up at end */ +{ + /* Flush out the buffered LZW code */ + if (! dinfo->first_byte) + output(dinfo, dinfo->waiting_code); + /* Send an EOF code */ + output(dinfo, dinfo->EOFCode); + /* Flush the bit-packing buffer */ + if (dinfo->cur_bits > 0) { + CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF); + } + /* Flush the packet buffer */ + flush_packet(dinfo); +} + + +/* GIF header construction */ + + +LOCAL(void) +put_word (gif_dest_ptr dinfo, unsigned int w) +/* Emit a 16-bit word, LSB first */ +{ + putc(w & 0xFF, dinfo->pub.output_file); + putc((w >> 8) & 0xFF, dinfo->pub.output_file); +} + + +LOCAL(void) +put_3bytes (gif_dest_ptr dinfo, int val) +/* Emit 3 copies of same byte value --- handy subr for colormap construction */ +{ + putc(val, dinfo->pub.output_file); + putc(val, dinfo->pub.output_file); + putc(val, dinfo->pub.output_file); +} + + +LOCAL(void) +emit_header (gif_dest_ptr dinfo, int num_colors, JSAMPARRAY colormap) +/* Output the GIF file header, including color map */ +/* If colormap == NULL, synthesize a grayscale colormap */ +{ + int BitsPerPixel, ColorMapSize, InitCodeSize, FlagByte; + int cshift = dinfo->cinfo->data_precision - 8; + int i; + + if (num_colors > 256) + ERREXIT1(dinfo->cinfo, JERR_TOO_MANY_COLORS, num_colors); + /* Compute bits/pixel and related values */ + BitsPerPixel = 1; + while (num_colors > (1 << BitsPerPixel)) + BitsPerPixel++; + ColorMapSize = 1 << BitsPerPixel; + if (BitsPerPixel <= 1) + InitCodeSize = 2; + else + InitCodeSize = BitsPerPixel; + /* + * Write the GIF header. + * Note that we generate a plain GIF87 header for maximum compatibility. + */ + putc('G', dinfo->pub.output_file); + putc('I', dinfo->pub.output_file); + putc('F', dinfo->pub.output_file); + putc('8', dinfo->pub.output_file); + putc('7', dinfo->pub.output_file); + putc('a', dinfo->pub.output_file); + /* Write the Logical Screen Descriptor */ + put_word(dinfo, (unsigned int) dinfo->cinfo->output_width); + put_word(dinfo, (unsigned int) dinfo->cinfo->output_height); + FlagByte = 0x80; /* Yes, there is a global color table */ + FlagByte |= (BitsPerPixel - 1) << 4; /* color resolution */ + FlagByte |= (BitsPerPixel - 1); /* size of global color table */ + putc(FlagByte, dinfo->pub.output_file); + putc(0, dinfo->pub.output_file); /* Background color index */ + putc(0, dinfo->pub.output_file); /* Reserved (aspect ratio in GIF89) */ + /* Write the Global Color Map */ + /* If the color map is more than 8 bits precision, */ + /* we reduce it to 8 bits by shifting */ + for (i = 0; i < ColorMapSize; i++) { + if (i < num_colors) { + if (colormap != NULL) { + if (dinfo->cinfo->out_color_space == JCS_RGB) { + /* Normal case: RGB color map */ + putc(GETJSAMPLE(colormap[0][i]) >> cshift, dinfo->pub.output_file); + putc(GETJSAMPLE(colormap[1][i]) >> cshift, dinfo->pub.output_file); + putc(GETJSAMPLE(colormap[2][i]) >> cshift, dinfo->pub.output_file); + } else { + /* Grayscale "color map": possible if quantizing grayscale image */ + put_3bytes(dinfo, GETJSAMPLE(colormap[0][i]) >> cshift); + } + } else { + /* Create a grayscale map of num_colors values, range 0..255 */ + put_3bytes(dinfo, (i * 255 + (num_colors - 1) / 2) / (num_colors - 1)); + } + } else { + /* fill out the map to a power of 2 */ + put_3bytes(dinfo, CENTERJSAMPLE >> cshift); + } + } + /* Write image separator and Image Descriptor */ + putc(',', dinfo->pub.output_file); /* separator */ + put_word(dinfo, 0); /* left/top offset */ + put_word(dinfo, 0); + put_word(dinfo, (unsigned int) dinfo->cinfo->output_width); /* image size */ + put_word(dinfo, (unsigned int) dinfo->cinfo->output_height); + /* flag byte: not interlaced, no local color map */ + putc(0x00, dinfo->pub.output_file); + /* Write Initial Code Size byte */ + putc(InitCodeSize, dinfo->pub.output_file); + + /* Initialize for compression of image data */ + compress_init(dinfo, InitCodeSize + 1); +} + + +/* + * Startup: write the file header. + */ + +METHODDEF(void) +start_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + gif_dest_ptr dest = (gif_dest_ptr) dinfo; + + if (cinfo->quantize_colors) + emit_header(dest, cinfo->actual_number_of_colors, cinfo->colormap); + else + emit_header(dest, 256, (JSAMPARRAY) NULL); +} + + +/* + * Write some pixel data. + * In this module rows_supplied will always be 1. + */ + + +/* + * The LZW algorithm proper + */ + +METHODDEF(void) +put_LZW_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + gif_dest_ptr dest = (gif_dest_ptr) dinfo; + register JSAMPROW ptr; + register JDIMENSION col; + code_int c; + register hash_int i; + register hash_int disp; + register hash_entry probe_value; + + ptr = dest->pub.buffer[0]; + for (col = cinfo->output_width; col > 0; col--) { + /* Accept and compress one 8-bit byte */ + c = (code_int) GETJSAMPLE(*ptr++); + + if (dest->first_byte) { /* need to initialize waiting_code */ + dest->waiting_code = c; + dest->first_byte = FALSE; + continue; + } + + /* Probe hash table to see if a symbol exists for + * waiting_code followed by c. + * If so, replace waiting_code by that symbol and continue. + */ + i = ((hash_int) c << (MAX_LZW_BITS-8)) + dest->waiting_code; + /* i is less than twice 2**MAX_LZW_BITS, therefore less than twice HSIZE */ + if (i >= HSIZE) + i -= HSIZE; + + probe_value = HASH_ENTRY(dest->waiting_code, c); + + if (dest->hash_code[i] == 0) { + /* hit empty slot; desired symbol not in table */ + output(dest, dest->waiting_code); + if (dest->free_code < LZW_TABLE_SIZE) { + dest->hash_code[i] = dest->free_code++; /* add symbol to hashtable */ + dest->hash_value[i] = probe_value; + } else + clear_block(dest); + dest->waiting_code = c; + continue; + } + if (dest->hash_value[i] == probe_value) { + dest->waiting_code = dest->hash_code[i]; + continue; + } + + if (i == 0) /* secondary hash (after G. Knott) */ + disp = 1; + else + disp = HSIZE - i; + for (;;) { + i -= disp; + if (i < 0) + i += HSIZE; + if (dest->hash_code[i] == 0) { + /* hit empty slot; desired symbol not in table */ + output(dest, dest->waiting_code); + if (dest->free_code < LZW_TABLE_SIZE) { + dest->hash_code[i] = dest->free_code++; /* add symbol to hashtable */ + dest->hash_value[i] = probe_value; + } else + clear_block(dest); + dest->waiting_code = c; + break; + } + if (dest->hash_value[i] == probe_value) { + dest->waiting_code = dest->hash_code[i]; + break; + } + } + } +} + + +/* + * The pseudo-compression algorithm. + * + * In this version we simply output each pixel value as a separate symbol; + * thus, no compression occurs. In fact, there is expansion of one bit per + * pixel, because we use a symbol width one bit wider than the pixel width. + * + * GIF ordinarily uses variable-width symbols, and the decoder will expect + * to ratchet up the symbol width after a fixed number of symbols. + * To simplify the logic and keep the expansion penalty down, we emit a + * GIF Clear code to reset the decoder just before the width would ratchet up. + * Thus, all the symbols in the output file will have the same bit width. + * Note that emitting the Clear codes at the right times is a mere matter of + * counting output symbols and is in no way dependent on the LZW algorithm. + * + * With a small basic pixel width (low color count), Clear codes will be + * needed very frequently, causing the file to expand even more. So this + * simplistic approach wouldn't work too well on bilevel images, for example. + * But for output of JPEG conversions the pixel width will usually be 8 bits + * (129 to 256 colors), so the overhead added by Clear symbols is only about + * one symbol in every 256. + */ + +METHODDEF(void) +put_raw_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + gif_dest_ptr dest = (gif_dest_ptr) dinfo; + register JSAMPROW ptr; + register JDIMENSION col; + code_int c; + + ptr = dest->pub.buffer[0]; + for (col = cinfo->output_width; col > 0; col--) { + c = (code_int) GETJSAMPLE(*ptr++); + /* Accept and output one pixel value. + * The given value must be less than n_bits wide. + */ + + /* Output the given pixel value as a symbol. */ + output(dest, c); + /* Issue Clear codes often enough to keep the reader from ratcheting up + * its symbol size. + */ + if (dest->code_counter < dest->maxcode) { + dest->code_counter++; + } else { + output(dest, dest->ClearCode); + dest->code_counter = dest->ClearCode + 2; /* reset the counter */ + } + } +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + gif_dest_ptr dest = (gif_dest_ptr) dinfo; + + /* Flush compression mechanism */ + compress_term(dest); + /* Write a zero-length data block to end the series */ + putc(0, dest->pub.output_file); + /* Write the GIF terminator mark */ + putc(';', dest->pub.output_file); + /* Make sure we wrote the output file OK */ + JFFLUSH(dest->pub.output_file); + if (JFERROR(dest->pub.output_file)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * The module selection routine for GIF format output. + */ + +GLOBAL(djpeg_dest_ptr) +jinit_write_gif (j_decompress_ptr cinfo, boolean is_lzw) +{ + gif_dest_ptr dest; + + /* Create module interface object, fill in method pointers */ + dest = (gif_dest_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(gif_dest_struct)); + dest->cinfo = cinfo; /* make back link for subroutines */ + dest->pub.start_output = start_output_gif; + dest->pub.finish_output = finish_output_gif; + + if (cinfo->out_color_space != JCS_GRAYSCALE && + cinfo->out_color_space != JCS_RGB) + ERREXIT(cinfo, JERR_GIF_COLORSPACE); + + /* Force quantization if color or if > 8 bits input */ + if (cinfo->out_color_space != JCS_GRAYSCALE || cinfo->data_precision > 8) { + /* Force quantization to at most 256 colors */ + cinfo->quantize_colors = TRUE; + if (cinfo->desired_number_of_colors > 256) + cinfo->desired_number_of_colors = 256; + } + + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfo); + + if (cinfo->output_components != 1) /* safety check: just one component? */ + ERREXIT(cinfo, JERR_GIF_BUG); + + /* Create decompressor output buffer. */ + dest->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, cinfo->output_width, (JDIMENSION) 1); + dest->pub.buffer_height = 1; + + if (is_lzw) { + dest->pub.put_pixel_rows = put_LZW_pixel_rows; + /* Allocate space for hash table */ + dest->hash_code = (code_int *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, HSIZE * SIZEOF(code_int)); + dest->hash_value = (hash_entry FAR *) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, HSIZE * SIZEOF(hash_entry)); + } else { + dest->pub.put_pixel_rows = put_raw_pixel_rows; + /* Mark tables unused */ + dest->hash_code = NULL; + dest->hash_value = NULL; + } + + return &dest->pub; +} + +#endif /* GIF_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/wrppm.c b/widget/milsko/milskosrc/external/libjpeg/src/wrppm.c new file mode 100644 index 0000000000..c9e03ad10d --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/wrppm.c @@ -0,0 +1,264 @@ +/* + * wrppm.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * Modified 2009-2020 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write output images in PPM/PGM format. + * The extended 2-byte-per-sample raw PPM/PGM formats are supported. + * The PBMPLUS library is NOT required to compile this software + * (but it is highly useful as a set of PPM image manipulation programs). + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume output to + * an ordinary stdio stream. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef PPM_SUPPORTED + + +/* + * For 12-bit JPEG data, we either downscale the values to 8 bits + * (to write standard byte-per-sample PPM/PGM files), or output + * nonstandard word-per-sample PPM/PGM files. Downscaling is done + * if PPM_NORAWWORD is defined (this can be done in the Makefile + * or in jconfig.h). + * (When the core library supports data precision reduction, a cleaner + * implementation will be to ask for that instead.) + */ + +#if BITS_IN_JSAMPLE == 8 +#define PUTPPMSAMPLE(ptr,v) *ptr++ = (char) (v) +#define BYTESPERSAMPLE 1 +#define PPM_MAXVAL 255 +#else +#ifdef PPM_NORAWWORD +#define PUTPPMSAMPLE(ptr,v) *ptr++ = (char) ((v) >> (BITS_IN_JSAMPLE-8)) +#define BYTESPERSAMPLE 1 +#define PPM_MAXVAL 255 +#else +/* The word-per-sample format always puts the MSB first. */ +#define PUTPPMSAMPLE(ptr,v) \ + { register int val_ = v; \ + *ptr++ = (char) ((val_ >> 8) & 0xFF); \ + *ptr++ = (char) (val_ & 0xFF); \ + } +#define BYTESPERSAMPLE 2 +#define PPM_MAXVAL ((1<pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +/* + * This code is used when we have to copy the data and apply a pixel + * format translation. Typically this only happens in 12-bit mode. + */ + +METHODDEF(void) +copy_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; + register char * bufferptr; + register JSAMPROW ptr; + register JDIMENSION col; + + ptr = dest->pixrow; + bufferptr = dest->iobuffer; + for (col = dest->samples_per_row; col > 0; col--) { + PUTPPMSAMPLE(bufferptr, GETJSAMPLE(*ptr++)); + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +/* + * Write some pixel data when color quantization is in effect. + * We have to demap the color index values to straight data. + */ + +METHODDEF(void) +put_demapped_rgb (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; + register char * bufferptr; + register int pixval; + register JSAMPROW ptr; + register JSAMPROW color_map0 = cinfo->colormap[0]; + register JSAMPROW color_map1 = cinfo->colormap[1]; + register JSAMPROW color_map2 = cinfo->colormap[2]; + register JDIMENSION col; + + ptr = dest->pixrow; + bufferptr = dest->iobuffer; + for (col = cinfo->output_width; col > 0; col--) { + pixval = GETJSAMPLE(*ptr++); + PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map0[pixval])); + PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map1[pixval])); + PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map2[pixval])); + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + +METHODDEF(void) +put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; + register char * bufferptr; + register JSAMPROW ptr; + register JSAMPROW color_map0 = cinfo->colormap[0]; + register JDIMENSION col; + + ptr = dest->pixrow; + bufferptr = dest->iobuffer; + for (col = cinfo->output_width; col > 0; col--) { + PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map0[GETJSAMPLE(*ptr++)])); + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +/* + * Startup: write the file header. + */ + +METHODDEF(void) +start_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + /* Emit file header */ + switch (cinfo->out_color_space) { + case JCS_GRAYSCALE: + /* emit header for raw PGM format */ + fprintf(dinfo->output_file, "P5\n%ld %ld\n%d\n", + (long) cinfo->output_width, (long) cinfo->output_height, + PPM_MAXVAL); + break; + case JCS_RGB: + /* emit header for raw PPM format */ + fprintf(dinfo->output_file, "P6\n%ld %ld\n%d\n", + (long) cinfo->output_width, (long) cinfo->output_height, + PPM_MAXVAL); + break; + default: + ERREXIT(cinfo, JERR_PPM_COLORSPACE); + } +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + /* Make sure we wrote the output file OK */ + JFFLUSH(dinfo->output_file); + if (JFERROR(dinfo->output_file)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * The module selection routine for PPM format output. + */ + +GLOBAL(djpeg_dest_ptr) +jinit_write_ppm (j_decompress_ptr cinfo) +{ + ppm_dest_ptr dest; + + /* Create module interface object, fill in method pointers */ + dest = (ppm_dest_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(ppm_dest_struct)); + dest->pub.start_output = start_output_ppm; + dest->pub.finish_output = finish_output_ppm; + + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfo); + + /* Create physical I/O buffer. Note we make this near on a PC. */ + dest->samples_per_row = cinfo->output_width * cinfo->out_color_components; + dest->buffer_width = dest->samples_per_row * (BYTESPERSAMPLE * SIZEOF(char)); + dest->iobuffer = (char *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, dest->buffer_width); + + if (cinfo->quantize_colors || BITS_IN_JSAMPLE != 8 || + SIZEOF(JSAMPLE) != SIZEOF(char)) { + /* When quantizing, we need an output buffer for colormap indexes + * that's separate from the physical I/O buffer. We also need a + * separate buffer if pixel format translation must take place. + */ + dest->pixrow = (JSAMPROW) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (size_t) cinfo->output_width * + (size_t) cinfo->output_components * SIZEOF(JSAMPLE)); + if (! cinfo->quantize_colors) + dest->pub.put_pixel_rows = copy_pixel_rows; + else if (cinfo->out_color_space == JCS_GRAYSCALE) + dest->pub.put_pixel_rows = put_demapped_gray; + else + dest->pub.put_pixel_rows = put_demapped_rgb; + } else { + /* We will fwrite() directly from decompressor output buffer. */ + /* Cast here implies near->far pointer conversion on PCs */ + dest->pixrow = (JSAMPROW) dest->iobuffer; + dest->pub.put_pixel_rows = put_pixel_rows; + } + /* Synthesize a JSAMPARRAY pointer structure */ + dest->pub.buffer = & dest->pixrow; + dest->pub.buffer_height = 1; + + return &dest->pub; +} + +#endif /* PPM_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/wrrle.c b/widget/milsko/milskosrc/external/libjpeg/src/wrrle.c new file mode 100644 index 0000000000..dc2fadb887 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/wrrle.c @@ -0,0 +1,306 @@ +/* + * wrrle.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * Modified 2017-2019 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write output images in RLE format. + * The Utah Raster Toolkit library is required (version 3.1 or later). + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume output to + * an ordinary stdio stream. + * + * Based on code contributed by Mike Lijewski, + * with updates from Robert Hutchinson. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef RLE_SUPPORTED + +/* rle.h is provided by the Utah Raster Toolkit. */ + +#include + +/* + * We assume that JSAMPLE has the same representation as rle_pixel, + * to wit, "unsigned char". Hence we can't cope with 12- or 16-bit samples. + */ + +#if BITS_IN_JSAMPLE != 8 + Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ +#endif + + +/* + * Since RLE stores scanlines bottom-to-top, we have to invert the image + * from JPEG's top-to-bottom order. To do this, we save the outgoing data + * in a virtual array during put_pixel_row calls, then actually emit the + * RLE file during finish_output. + */ + + +/* + * For now, if we emit an RLE color map then it is always 256 entries long, + * though not all of the entries need be used. + */ + +#define CMAPBITS 8 +#define CMAPLENGTH (1<<(CMAPBITS)) + +typedef struct { + struct djpeg_dest_struct pub; /* public fields */ + + jvirt_sarray_ptr image; /* virtual array to store the output image */ + rle_map *colormap; /* RLE-style color map, or NULL if none */ + rle_pixel **rle_row; /* To pass rows to rle_putrow() */ + +} rle_dest_struct; + +typedef rle_dest_struct * rle_dest_ptr; + + +/* Forward declarations */ +METHODDEF(void) rle_put_pixel_rows + JPP((j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied)); + + +/* + * Write the file header. + * + * In this module it's easier to wait till finish_output to write anything. + */ + +METHODDEF(void) +start_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + rle_dest_ptr dest = (rle_dest_ptr) dinfo; + size_t cmapsize; + int ci, i; +#ifdef PROGRESS_REPORT + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; +#endif + + /* + * Make sure the image can be stored in RLE format. + * + * - RLE stores image dimensions as *signed* 16 bit integers. JPEG + * uses unsigned, so we have to check the width. + * + * - Colorspace is expected to be grayscale or RGB. + * + * - The number of channels (components) is expected to be 1 (grayscale/ + * pseudocolor) or 3 (truecolor/directcolor). + * (could be 2 or 4 if using an alpha channel, but we aren't) + */ + + if (cinfo->output_width > 32767 || cinfo->output_height > 32767) + ERREXIT2(cinfo, JERR_RLE_DIMENSIONS, cinfo->output_width, + cinfo->output_height); + + if (cinfo->out_color_space != JCS_GRAYSCALE && + cinfo->out_color_space != JCS_RGB) + ERREXIT(cinfo, JERR_RLE_COLORSPACE); + + if (cinfo->output_components != 1 && cinfo->output_components != 3) + ERREXIT1(cinfo, JERR_RLE_TOOMANYCHANNELS, cinfo->num_components); + + /* Convert colormap, if any, to RLE format. */ + + dest->colormap = NULL; + + if (cinfo->quantize_colors) { + /* Allocate storage for RLE-style cmap, zero any extra entries */ + cmapsize = cinfo->out_color_components * CMAPLENGTH * SIZEOF(rle_map); + dest->colormap = (rle_map *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, cmapsize); + MEMZERO(dest->colormap, cmapsize); + + /* Save away data in RLE format --- note 8-bit left shift! */ + /* Shifting would need adjustment for JSAMPLEs wider than 8 bits. */ + for (ci = 0; ci < cinfo->out_color_components; ci++) { + for (i = 0; i < cinfo->actual_number_of_colors; i++) { + dest->colormap[ci * CMAPLENGTH + i] = + GETJSAMPLE(cinfo->colormap[ci][i]) << 8; + } + } + } + + /* Set the output buffer to the first row */ + dest->pub.buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->image, (JDIMENSION) 0, (JDIMENSION) 1, TRUE); + dest->pub.buffer_height = 1; + + dest->pub.put_pixel_rows = rle_put_pixel_rows; + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->total_extra_passes++; /* count file writing as separate pass */ + } +#endif +} + + +/* + * Write some pixel data. + * + * This routine just saves the data away in a virtual array. + */ + +METHODDEF(void) +rle_put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + rle_dest_ptr dest = (rle_dest_ptr) dinfo; + + if (cinfo->output_scanline < cinfo->output_height) { + dest->pub.buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->image, + cinfo->output_scanline, (JDIMENSION) 1, TRUE); + } +} + + +/* + * Finish up at the end of the file. + * + * Here is where we really output the RLE file. + */ + +METHODDEF(void) +finish_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + rle_dest_ptr dest = (rle_dest_ptr) dinfo; + rle_hdr header; /* Output file information */ + rle_pixel **rle_row, *red_ptr, *green_ptr, *blue_ptr; + JSAMPROW output_row; + char cmapcomment[80]; + int row, col; + int ci; +#ifdef PROGRESS_REPORT + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; +#endif + + /* Initialize the header info */ + header = *rle_hdr_init(NULL); + header.rle_file = dest->pub.output_file; + header.xmin = 0; + header.xmax = cinfo->output_width - 1; + header.ymin = 0; + header.ymax = cinfo->output_height - 1; + header.alpha = 0; + header.ncolors = cinfo->output_components; + for (ci = 0; ci < cinfo->output_components; ci++) { + RLE_SET_BIT(header, ci); + } + if (cinfo->quantize_colors) { + header.ncmap = cinfo->out_color_components; + header.cmaplen = CMAPBITS; + header.cmap = dest->colormap; + /* Add a comment to the output image with the true colormap length. */ + sprintf(cmapcomment, "color_map_length=%d", cinfo->actual_number_of_colors); + rle_putcom(cmapcomment, &header); + } + + /* Emit the RLE header and color map (if any) */ + rle_put_setup(&header); + + /* Now output the RLE data from our virtual array. + * We assume here that (a) rle_pixel is represented the same as JSAMPLE, + * and (b) we are not on a machine where FAR pointers differ from regular. + */ + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_limit = cinfo->output_height; + progress->pub.pass_counter = 0; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + + if (cinfo->output_components == 1) { + for (row = cinfo->output_height - 1; row >= 0; row--) { + rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->image, + (JDIMENSION) row, (JDIMENSION) 1, FALSE); + rle_putrow(rle_row, (int) cinfo->output_width, &header); +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_counter++; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + } + } else { + for (row = cinfo->output_height - 1; row >= 0; row--) { + output_row = * (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->image, + (JDIMENSION) row, (JDIMENSION) 1, FALSE); + rle_row = dest->rle_row; + red_ptr = rle_row[0]; + green_ptr = rle_row[1]; + blue_ptr = rle_row[2]; + for (col = cinfo->output_width; col > 0; col--) { + *red_ptr++ = GETJSAMPLE(*output_row++); + *green_ptr++ = GETJSAMPLE(*output_row++); + *blue_ptr++ = GETJSAMPLE(*output_row++); + } + rle_putrow(rle_row, (int) cinfo->output_width, &header); +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_counter++; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + } + } + +#ifdef PROGRESS_REPORT + if (progress != NULL) + progress->completed_extra_passes++; +#endif + + /* Emit file trailer */ + rle_puteof(&header); + JFFLUSH(dest->pub.output_file); + if (JFERROR(dest->pub.output_file)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * The module selection routine for RLE format output. + */ + +GLOBAL(djpeg_dest_ptr) +jinit_write_rle (j_decompress_ptr cinfo) +{ + rle_dest_ptr dest; + + /* Create module interface object, fill in method pointers */ + dest = (rle_dest_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(rle_dest_struct)); + dest->pub.start_output = start_output_rle; + dest->pub.finish_output = finish_output_rle; + + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfo); + + /* Allocate a work array for output to the RLE library. */ + dest->rle_row = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, + JPOOL_IMAGE, cinfo->output_width, (JDIMENSION) cinfo->output_components); + + /* Allocate a virtual array to hold the image. */ + dest->image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + cinfo->output_width * (JDIMENSION) cinfo->output_components, + cinfo->output_height, (JDIMENSION) 1); + + return &dest->pub; +} + +#endif /* RLE_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libjpeg/src/wrtarga.c b/widget/milsko/milskosrc/external/libjpeg/src/wrtarga.c new file mode 100644 index 0000000000..8ded5183c4 --- /dev/null +++ b/widget/milsko/milskosrc/external/libjpeg/src/wrtarga.c @@ -0,0 +1,254 @@ +/* + * wrtarga.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * Modified 2015-2019 by Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write output images in Targa format. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume output to + * an ordinary stdio stream. + * + * Based on code contributed by Lee Daniel Crocker. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef TARGA_SUPPORTED + + +/* + * To support 12-bit JPEG data, we'd have to scale output down to 8 bits. + * This is not yet implemented. + */ + +#if BITS_IN_JSAMPLE != 8 + Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ +#endif + +/* + * The output buffer needs to be writable by fwrite(). On PCs, we must + * allocate the buffer in near data space, because we are assuming small-data + * memory model, wherein fwrite() can't reach far memory. If you need to + * process very wide images on a PC, you might have to compile in large-memory + * model, or else replace fwrite() with a putc() loop --- which will be much + * slower. + */ + + +/* Private version of data destination object */ + +typedef struct { + struct djpeg_dest_struct pub; /* public fields */ + + char *iobuffer; /* physical I/O buffer */ + JDIMENSION buffer_width; /* width of one row */ +} tga_dest_struct; + +typedef tga_dest_struct * tga_dest_ptr; + + +LOCAL(void) +write_header (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, int num_colors) +/* Create and write a Targa header */ +{ + char targaheader[18]; + + /* Set unused fields of header to 0 */ + MEMZERO(targaheader, SIZEOF(targaheader)); + + if (num_colors > 0) { + targaheader[1] = 1; /* color map type 1 */ + targaheader[5] = (char) (num_colors & 0xFF); + targaheader[6] = (char) (num_colors >> 8); + targaheader[7] = 24; /* 24 bits per cmap entry */ + } + + targaheader[12] = (char) (cinfo->output_width & 0xFF); + targaheader[13] = (char) (cinfo->output_width >> 8); + targaheader[14] = (char) (cinfo->output_height & 0xFF); + targaheader[15] = (char) (cinfo->output_height >> 8); + targaheader[17] = 0x20; /* Top-down, non-interlaced */ + + if (cinfo->out_color_space == JCS_GRAYSCALE) { + targaheader[2] = 3; /* image type = uncompressed grayscale */ + targaheader[16] = 8; /* bits per pixel */ + } else { /* must be RGB */ + if (num_colors > 0) { + targaheader[2] = 1; /* image type = colormapped RGB */ + targaheader[16] = 8; + } else { + targaheader[2] = 2; /* image type = uncompressed RGB */ + targaheader[16] = 24; + } + } + + if (JFWRITE(dinfo->output_file, targaheader, 18) != (size_t) 18) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * Write some pixel data. + * In this module rows_supplied will always be 1. + */ + +METHODDEF(void) +put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +/* used for unquantized full-color output */ +{ + tga_dest_ptr dest = (tga_dest_ptr) dinfo; + register JSAMPROW inptr; + register char * outptr; + register JDIMENSION col; + + inptr = dest->pub.buffer[0]; + outptr = dest->iobuffer; + for (col = cinfo->output_width; col > 0; col--) { + outptr[0] = (char) GETJSAMPLE(inptr[2]); /* RGB to BGR order */ + outptr[1] = (char) GETJSAMPLE(inptr[1]); + outptr[2] = (char) GETJSAMPLE(inptr[0]); + inptr += 3, outptr += 3; + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + +METHODDEF(void) +put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +/* used for grayscale OR quantized color output */ +{ + tga_dest_ptr dest = (tga_dest_ptr) dinfo; + register JSAMPROW inptr; + register char * outptr; + register JDIMENSION col; + + inptr = dest->pub.buffer[0]; + outptr = dest->iobuffer; + for (col = cinfo->output_width; col > 0; col--) { + *outptr++ = (char) GETJSAMPLE(*inptr++); + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +/* + * Write some demapped pixel data when color quantization is in effect. + * For Targa, this is only applied to grayscale data. + */ + +METHODDEF(void) +put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + tga_dest_ptr dest = (tga_dest_ptr) dinfo; + register JSAMPROW inptr; + register char * outptr; + register JSAMPROW color_map0 = cinfo->colormap[0]; + register JDIMENSION col; + + inptr = dest->pub.buffer[0]; + outptr = dest->iobuffer; + for (col = cinfo->output_width; col > 0; col--) { + *outptr++ = (char) GETJSAMPLE(color_map0[GETJSAMPLE(*inptr++)]); + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +/* + * Startup: write the file header. + */ + +METHODDEF(void) +start_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + int num_colors, i; + FILE *outfile; + + switch (cinfo->out_color_space) { + case JCS_GRAYSCALE: + /* Targa doesn't have a mapped grayscale format, so we will */ + /* demap quantized gray output. Never emit a colormap. */ + write_header(cinfo, dinfo, 0); + if (cinfo->quantize_colors) + dinfo->put_pixel_rows = put_demapped_gray; + else + dinfo->put_pixel_rows = put_gray_rows; + break; + case JCS_RGB: + if (cinfo->quantize_colors) { + /* We only support 8-bit colormap indexes, so only 256 colors */ + num_colors = cinfo->actual_number_of_colors; + if (num_colors > 256) + ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, num_colors); + write_header(cinfo, dinfo, num_colors); + /* Write the colormap. Note Targa uses BGR byte order */ + outfile = dinfo->output_file; + for (i = 0; i < num_colors; i++) { + putc(GETJSAMPLE(cinfo->colormap[2][i]), outfile); + putc(GETJSAMPLE(cinfo->colormap[1][i]), outfile); + putc(GETJSAMPLE(cinfo->colormap[0][i]), outfile); + } + dinfo->put_pixel_rows = put_gray_rows; + } else { + write_header(cinfo, dinfo, 0); + dinfo->put_pixel_rows = put_pixel_rows; + } + break; + default: + ERREXIT(cinfo, JERR_TGA_COLORSPACE); + } +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + /* Make sure we wrote the output file OK */ + JFFLUSH(dinfo->output_file); + if (JFERROR(dinfo->output_file)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * The module selection routine for Targa format output. + */ + +GLOBAL(djpeg_dest_ptr) +jinit_write_targa (j_decompress_ptr cinfo) +{ + tga_dest_ptr dest; + + /* Create module interface object, fill in method pointers */ + dest = (tga_dest_ptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, SIZEOF(tga_dest_struct)); + dest->pub.start_output = start_output_tga; + dest->pub.finish_output = finish_output_tga; + + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfo); + + /* Create I/O buffer. Note we make this near on a PC. */ + dest->buffer_width = cinfo->output_width * cinfo->output_components; + dest->iobuffer = (char *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, + JPOOL_IMAGE, (size_t) dest->buffer_width * SIZEOF(char)); + + /* Create decompressor output buffer. */ + dest->pub.buffer = (*cinfo->mem->alloc_sarray) ((j_common_ptr) cinfo, + JPOOL_IMAGE, dest->buffer_width, (JDIMENSION) 1); + dest->pub.buffer_height = 1; + + return &dest->pub; +} + +#endif /* TARGA_SUPPORTED */ diff --git a/widget/milsko/milskosrc/external/libpng/.appveyor.yml b/widget/milsko/milskosrc/external/libpng/.appveyor.yml new file mode 100644 index 0000000000..70d5e00d44 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/.appveyor.yml @@ -0,0 +1,81 @@ +version: 1.6.x-{build} + +branches: + except: + - /libpng[0-1][0-8]/ + - /v[0-1][.][0-8][.][0-9]+/ + +image: + - Visual Studio 2022 + +shallow_clone: true + +environment: + matrix: + - TOOLCHAIN: vstudio + AUTOMATION: cmake + ARCH: x86 + - TOOLCHAIN: vstudio + AUTOMATION: cmake + ARCH: x64 + - TOOLCHAIN: vstudio + AUTOMATION: cmake + ARCH: arm64 + - TOOLCHAIN: llvm + AUTOMATION: cmake + ARCH: x64 + - TOOLCHAIN: msys2 + AUTOMATION: cmake + ARCH: i686 + - TOOLCHAIN: msys2 + AUTOMATION: cmake + ARCH: x86_64 + - TOOLCHAIN: msys2 + AUTOMATION: configure + ARCH: i686 + - TOOLCHAIN: msys2 + AUTOMATION: configure + ARCH: x86_64 + - TOOLCHAIN: msys2 + AUTOMATION: makefiles + ARCH: i686 + - TOOLCHAIN: msys2 + AUTOMATION: makefiles + ARCH: x86_64 + +install: + - 'if "%TOOLCHAIN%"=="vstudio" C:\tools\vcpkg\vcpkg.exe install zlib:%ARCH%-windows' + - 'if "%TOOLCHAIN%"=="vstudio" C:\tools\vcpkg\vcpkg.exe integrate install' + - 'if "%TOOLCHAIN%"=="llvm" C:\tools\vcpkg\vcpkg.exe install zlib:%ARCH%-windows' + - 'if "%TOOLCHAIN%"=="llvm" C:\tools\vcpkg\vcpkg.exe integrate install' + - 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" C:\msys64\usr\bin\pacman.exe -S --noconfirm mingw-w64-%ARCH%-cmake mingw-w64-%ARCH%-ninja' + +before_build: + - 'if "%TOOLCHAIN%"=="vstudio" set CI_CMAKE_GENERATOR=Visual Studio 17 2022' + - 'if "%TOOLCHAIN%"=="vstudio" set CI_CMAKE_TOOLCHAIN_FILE=C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake' + - 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="x86" set CI_CMAKE_GENERATOR_PLATFORM=Win32' + - 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="x64" set CI_CMAKE_GENERATOR_PLATFORM=x64' + - 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="arm64" set CI_CMAKE_GENERATOR_PLATFORM=ARM64' + - 'if "%TOOLCHAIN%"=="vstudio" if "%ARCH%"=="arm64" set CI_CMAKE_VARS=-DPNG_TESTS=0' + - 'if "%TOOLCHAIN%"=="llvm" set CI_CMAKE_GENERATOR=Ninja' + - 'if "%TOOLCHAIN%"=="llvm" set CI_CMAKE_TOOLCHAIN_FILE=C:\tools\vcpkg\scripts\buildsystems\vcpkg.cmake' + - 'if "%TOOLCHAIN%"=="llvm" set CI_CC=clang' + - 'if "%TOOLCHAIN%"=="msys2" set CI_CMAKE_GENERATOR=Ninja' + - 'if "%TOOLCHAIN%"=="msys2" set CI_CC=gcc' + - 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="i686" set MSYSTEM=MINGW32' + - 'if "%TOOLCHAIN%"=="msys2" if "%ARCH%"=="x86_64" set MSYSTEM=MINGW64' + - 'set CI_CMAKE_BUILD_FLAGS=-j2' + - 'set CI_CTEST_FLAGS=-j2' + - 'set CI_MAKE_FLAGS=-j2' + - 'set CI_MAKEFILES=scripts/makefile.gcc scripts/makefile.msys scripts/makefile.std' + +build_script: + - 'if "%TOOLCHAIN%"=="vstudio" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"' + - 'if "%TOOLCHAIN%"=="llvm" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"' + - 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="cmake" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_cmake.sh"' + - 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="configure" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_configure.sh"' + - 'if "%TOOLCHAIN%"=="msys2" if "%AUTOMATION%"=="makefiles" C:\msys64\usr\bin\bash.exe -l "%APPVEYOR_BUILD_FOLDER%\ci\ci_verify_makefiles.sh"' + +cache: + - 'C:\tools\vcpkg\installed' + - 'C:\msys64\var\cache\pacman' diff --git a/widget/milsko/milskosrc/external/libpng/.cmake-format.yaml b/widget/milsko/milskosrc/external/libpng/.cmake-format.yaml new file mode 100644 index 0000000000..67c53d2db1 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/.cmake-format.yaml @@ -0,0 +1,94 @@ +# https://pypi.org/project/cmakelang +# https://github.com/cheshirekow/cmake_format + +# ---------------------- +# Options for formatting +# ---------------------- + +# How wide to allow formatted cmake files +# TODO: Reflow the CMake files to allow setting the maximum line width to 100. +line_width: 255 + +# How many spaces to tab for indent +tab_size: 2 + +# If true, lines are indented using tab characters (utf-8 0x09) instead of +# space characters (utf-8 0x20). In cases where the layout would +# require a fractional tab character, the behavior of the fractional +# indentation is governed by +use_tabchars: false + +# If is True, then the value of this variable indicates how +# fractional indentions are handled during whitespace replacement. If set to +# 'use-space', fractional indentation is left as spaces (utf-8 0x20). If set +# to `round-up` fractional indentation is replaced with a single tab character +# (utf-8 0x09) effectively shifting the column to the next tabstop +fractional_tab_policy: "use-space" + +# Enable comment markup parsing and reflow +enable_markup: false + +# ------------------- +# Options for linting +# ------------------- + +# Lint codes to disable +disabled_codes: [ + # TODO: + # Reconcile the CMake variable names with the patterns below, then + # re-enable the "invalid variable name XXX" messages. + "C0103", + + # TODO: + # Add brief COMMENT arguments to the `add_custom_target` commands. + "C0113", +] + +# Regular expression pattern describing valid function names +function_pattern: "[0-9a-z_]+" + +# Regular expression pattern describing valid macro names +macro_pattern: "[0-9A-Z_]+" + +# Regular expression pattern describing valid names for variables with global +# (cache) scope +global_var_pattern: "[A-Z][0-9A-Z_]+" + +# Regular expression pattern describing valid names for variables with global +# scope (but internal semantic) +internal_var_pattern: "_[A-Z][0-9A-Z_]+" + +# Regular expression pattern describing valid names for variables with local +# scope +local_var_pattern: "[a-z][a-z0-9_]+" + +# Regular expression pattern describing valid names for privatedirectory +# variables +private_var_pattern: "_[0-9a-z_]+" + +# Regular expression pattern describing valid names for public directory +# variables +public_var_pattern: "[A-Z][0-9A-Z_]+" + +# Regular expression pattern describing valid names for function/macro +# arguments and loop variables. +argument_var_pattern: "[a-z][a-z0-9_]+" + +# Regular expression pattern describing valid names for keywords used in +# functions or macros +keyword_pattern: "[A-Z][0-9A-Z_]+" + +# In the heuristic for C0201, how many conditionals to match within a loop in +# before considering the loop a parser +max_conditionals_custom_parser: 2 + +# Require at least this many newlines between statements; +# require no more than this many newlines between statements; +# etc. +min_statement_spacing: 1 +max_statement_spacing: 2 +max_returns: 6 +max_branches: 12 +max_arguments: 5 +max_localvars: 15 +max_statements: 50 diff --git a/widget/milsko/milskosrc/external/libpng/.editorconfig b/widget/milsko/milskosrc/external/libpng/.editorconfig new file mode 100644 index 0000000000..4181a3796b --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/.editorconfig @@ -0,0 +1,55 @@ +# https://editorconfig.org + +root = true + +[*] +charset = utf-8 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.txt] +indent_size = unset +indent_style = space + +[*.[chS]] +indent_size = 3 +indent_style = space +max_doc_length = 80 +max_line_length = 80 + +[*.dfa] +indent_size = 3 +indent_style = space +max_doc_length = 80 +max_line_length = 80 + +[*.awk] +indent_size = 3 +indent_style = space +max_doc_length = 80 +max_line_length = 100 + +[*.cmake] +indent_size = 2 +indent_style = space +max_doc_length = 80 +max_line_length = 100 + +[*.sh] +indent_size = 4 +indent_style = space +max_doc_length = 100 +max_line_length = 100 + +[{Makefile.in,aclocal.m4,ltmain.sh}] +indent_size = unset +indent_style = unset +insert_final_newline = unset +max_doc_length = unset +max_line_length = unset +trim_trailing_whitespace = unset + +[COMMIT_EDITMSG] +indent_style = space +max_doc_length = unset +max_line_length = 72 diff --git a/widget/milsko/milskosrc/external/libpng/.editorconfig-checker.json b/widget/milsko/milskosrc/external/libpng/.editorconfig-checker.json new file mode 100644 index 0000000000..ef08e0801e --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/.editorconfig-checker.json @@ -0,0 +1,9 @@ +{ + "Disable": { + "IndentSize": true + }, + "Exclude": [ + ".git/", + "out/" + ] +} diff --git a/widget/milsko/milskosrc/external/libpng/.yamllint.yml b/widget/milsko/milskosrc/external/libpng/.yamllint.yml new file mode 100644 index 0000000000..9b7af5f2c3 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/.yamllint.yml @@ -0,0 +1,7 @@ +extends: default +rules: + document-start: disable + document-end: disable + line-length: disable + truthy: + check-keys: false diff --git a/widget/milsko/milskosrc/external/libpng/LICENSE b/widget/milsko/milskosrc/external/libpng/LICENSE new file mode 100644 index 0000000000..ea6df986cb --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/LICENSE @@ -0,0 +1,134 @@ +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE +========================================= + +PNG Reference Library License version 2 +--------------------------------------- + + * Copyright (c) 1995-2025 The PNG Reference Library Authors. + * Copyright (c) 2018-2025 Cosmin Truta. + * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. + * Copyright (c) 1996-1997 Andreas Dilger. + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + +The software is supplied "as is", without warranty of any kind, +express or implied, including, without limitation, the warranties +of merchantability, fitness for a particular purpose, title, and +non-infringement. In no event shall the Copyright owners, or +anyone distributing the software, be liable for any damages or +other liability, whether in contract, tort or otherwise, arising +from, out of, or in connection with the software, or the use or +other dealings in the software, even if advised of the possibility +of such damage. + +Permission is hereby granted to use, copy, modify, and distribute +this software, or portions hereof, for any purpose, without fee, +subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you + must not claim that you wrote the original software. If you + use this software in a product, an acknowledgment in the product + documentation would be appreciated, but is not required. + + 2. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. + + 3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + + +PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35) +----------------------------------------------------------------------- + +libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are +Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are +derived from libpng-1.0.6, and are distributed according to the same +disclaimer and license as libpng-1.0.6 with the following individuals +added to the list of Contributing Authors: + + Simon-Pierre Cadieux + Eric S. Raymond + Mans Rullgard + Cosmin Truta + Gilles Vollant + James Yu + Mandar Sahastrabuddhe + Google Inc. + Vadim Barkov + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of + the library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is + with the user. + +Some files in the "contrib" directory and some configure-generated +files that are distributed with libpng have other copyright owners, and +are released under other open source licenses. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from +libpng-0.96, and are distributed according to the same disclaimer and +license as libpng-0.96, with the following individuals added to the +list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, +and are distributed according to the same disclaimer and license as +libpng-0.88, with the following individuals added to the list of +Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +Some files in the "scripts" directory have other copyright owners, +but are released under this license. + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing +Authors and Group 42, Inc. disclaim all warranties, expressed or +implied, including, without limitation, the warranties of +merchantability and of fitness for any purpose. The Contributing +Authors and Group 42, Inc. assume no liability for direct, indirect, +incidental, special, exemplary, or consequential damages, which may +result from the use of the PNG Reference Library, even if advised of +the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + + 1. The origin of this source code must not be misrepresented. + + 2. Altered versions must be plainly marked as such and must not + be misrepresented as being the original source. + + 3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, +without fee, and encourage the use of this source code as a component +to supporting the PNG file format in commercial products. If you use +this source code in a product, acknowledgment is not required but would +be appreciated. diff --git a/widget/milsko/milskosrc/external/libpng/README b/widget/milsko/milskosrc/external/libpng/README new file mode 100644 index 0000000000..2eb633ac0f --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/README @@ -0,0 +1,184 @@ +README for libpng version 1.6.50 +================================ + +See the note about version numbers near the top of `png.h`. +See `INSTALL` for instructions on how to install libpng. + +Libpng comes in several distribution formats. Get `libpng-*.tar.gz` +or `libpng-*.tar.xz` if you want UNIX-style line endings in the text +files, or `lpng*.7z` or `lpng*.zip` if you want DOS-style line endings. + +For a detailed description on using libpng, read `libpng-manual.txt`. +For examples of libpng in a program, see `example.c` and `pngtest.c`. +For usage information and restrictions (what little they are) on libpng, +see `png.h`. For a description on using zlib (the compression library +used by libpng) and zlib's restrictions, see `zlib.h`. + +You should use zlib 1.0.4 or later to run this, but it _may_ work with +versions as old as zlib 0.95. Even so, there are bugs in older zlib +versions which can cause the output of invalid compression streams for +some images. + +You should also note that zlib is a compression library that is useful +for more things than just PNG files. You can use zlib as a drop-in +replacement for `fread()` and `fwrite()`, if you are so inclined. + +zlib should be available at the same place that libpng is, or at +https://zlib.net . + +You may also want a copy of the PNG specification. It is available +as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find +these at http://www.libpng.org/pub/png/pngdocs.html . + +This code is currently being archived at https://libpng.sourceforge.io +in the download area, and at http://libpng.download/src . + +This release, based in a large way on Glenn's, Guy's and Andreas' +earlier work, was created and will be supported by myself and the PNG +development group. + +Send comments, corrections and commendations to `png-mng-implement` +at `lists.sourceforge.net`. (Subscription is required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-implement +to subscribe.) + +Send general questions about the PNG specification to `png-mng-misc` +at `lists.sourceforge.net`. (Subscription is required; visit +https://lists.sourceforge.net/lists/listinfo/png-mng-misc +to subscribe.) + +Historical notes +---------------- + +The libpng library has been in extensive use and testing since mid-1995. +Version 0.89, published a year later, was the first official release. +By late 1997, it had finally gotten to the stage where there hadn't +been significant changes to the API in some time, and people have a bad +feeling about libraries with versions below 1.0. Version 1.0.0 was +released in March 1998. + +Note that some of the changes to the `png_info` structure render this +version of the library binary incompatible with libpng-0.89 or +earlier versions if you are using a shared library. The type of the +`filler` parameter for `png_set_filler()` has changed from `png_byte` +to `png_uint_32`, which will affect shared-library applications that +use this function. + +To avoid problems with changes to the internals of the `info_struct`, +new APIs have been made available in 0.95 to avoid direct application +access to `info_ptr`. These functions are the `png_set_` and +`png_get_` functions. These functions should be used when +accessing/storing the `info_struct` data, rather than manipulating it +directly, to avoid such problems in the future. + +It is important to note that the APIs did not make current programs +that access the info struct directly incompatible with the new +library, through libpng-1.2.x. In libpng-1.4.x, which was meant to +be a transitional release, members of the `png_struct` and the +`info_struct` can still be accessed, but the compiler will issue a +warning about deprecated usage. Since libpng-1.5.0, direct access +to these structs is not allowed, and the definitions of the structs +reside in private `pngstruct.h` and `pnginfo.h` header files that are +not accessible to applications. It is strongly suggested that new +programs use the new APIs (as shown in `example.c` and `pngtest.c`), +and older programs be converted to the new format, to facilitate +upgrades in the future. + +The additions since 0.89 include the ability to read from a PNG stream +which has had some (or all) of the signature bytes read by the calling +application. This also allows the reading of embedded PNG streams that +do not have the PNG file signature. As well, it is now possible to set +the library action on the detection of chunk CRC errors. It is possible +to set different actions based on whether the CRC error occurred in a +critical or an ancillary chunk. + +The additions since 0.90 include the ability to compile libpng as a +Windows DLL, and new APIs for accessing data in the `info_struct`. +Experimental functions included the ability to set weighting and cost +factors for row filter selection, direct reads of integers from buffers +on big-endian processors that support misaligned data access, faster +methods of doing alpha composition, and more accurate 16-to-8 bit color +conversion. Some of these experimental functions, such as the weighted +filter heuristics, have since been removed. + +Files included in this distribution +----------------------------------- + + ANNOUNCE => Announcement of this version, with recent changes + AUTHORS => List of contributing authors + CHANGES => Description of changes between libpng versions + INSTALL => Instructions to install libpng + LICENSE => License to use and redistribute libpng + README => This file + TODO => Things not implemented in the current library + TRADEMARK => Trademark information + example.c => Example code for using libpng functions + libpng.3 => Manual page for libpng (includes libpng-manual.txt) + libpng-manual.txt => Description of libpng and its functions + libpngpf.3 => Manual page for libpng's private functions (deprecated) + png.5 => Manual page for the PNG format + png.c => Basic interface functions common to library + png.h => Library function and interface declarations (public) + pngpriv.h => Library function and interface declarations (private) + pngconf.h => System specific library configuration (public) + pngstruct.h => png_struct declaration (private) + pnginfo.h => png_info struct declaration (private) + pngdebug.h => debugging macros (private) + pngerror.c => Error/warning message I/O functions + pngget.c => Functions for retrieving info from struct + pngmem.c => Memory handling functions + pngbar.png => PNG logo, 88x31 + pngnow.png => PNG logo, 98x31 + pngpread.c => Progressive reading functions + pngread.c => Read data/helper high-level functions + pngrio.c => Lowest-level data read I/O functions + pngrtran.c => Read data transformation functions + pngrutil.c => Read data utility functions + pngset.c => Functions for storing data into the info_struct + pngtest.c => Library test program + pngtest.png => Library test sample image + pngtrans.c => Common data transformation functions + pngwio.c => Lowest-level write I/O functions + pngwrite.c => High-level write functions + pngwtran.c => Write data transformations + pngwutil.c => Write utility functions + arm/ => Optimized code for ARM Neon + intel/ => Optimized code for INTEL SSE2 + loongarch/ => Optimized code for LoongArch LSX + mips/ => Optimized code for MIPS MSA and MIPS MMI + powerpc/ => Optimized code for PowerPC VSX + riscv/ => Optimized code for the RISC-V platform + ci/ => Scripts for continuous integration + contrib/ => External contributions + arm-neon/ => Optimized code for the ARM-NEON platform + mips-msa/ => Optimized code for the MIPS-MSA platform + powerpc-vsx/ => Optimized code for the POWERPC-VSX platform + examples/ => Examples of libpng usage + gregbook/ => Source code for PNG reading and writing, from + "PNG: The Definitive Guide" by Greg Roelofs, + O'Reilly, 1999 + libtests/ => Test programs + pngexif/ => Program to inspect the EXIF information in PNG files + pngminim/ => Minimal decoder, encoder, and progressive decoder + programs demonstrating the use of pngusr.dfa + pngminus/ => Simple pnm2png and png2pnm programs + pngsuite/ => Test images + riscv-rvv/ => Optimized code for the RISC-V Vector platform + testpngs/ => Test images + tools/ => Various tools + visupng/ => VisualPng, a Windows viewer for PNG images + projects/ => Project files and workspaces for various IDEs + owatcom/ => OpenWatcom project + visualc71/ => Microsoft Visual C++ 7.1 workspace + vstudio/ => Microsoft Visual Studio workspace + scripts/ => Scripts and makefiles for building libpng + (see scripts/README.txt for the complete list) + tests/ => Test scripts + +Good luck, and happy coding! + + * Cosmin Truta (current maintainer, since 2018) + * Glenn Randers-Pehrson (former maintainer, 1998-2018) + * Andreas Eric Dilger (former maintainer, 1996-1997) + * Guy Eric Schalnat (original author and former maintainer, 1995-1996) + (formerly of Group 42, Inc.) diff --git a/widget/milsko/milskosrc/external/libpng/include/config.h b/widget/milsko/milskosrc/external/libpng/include/config.h new file mode 100644 index 0000000000..ff2e3aad41 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/include/config.h @@ -0,0 +1,138 @@ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the 'feenableexcept' function. */ +#undef HAVE_FEENABLEEXCEPT + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the 'm' library (-lm). */ +#undef HAVE_LIBM + +/* Define to 1 if you have the 'z' library (-lz). */ +#undef HAVE_LIBZ + +/* Define to 1 if you have the 'pow' function. */ +#undef HAVE_POW + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ +#undef LT_OBJDIR + +/* Name of package */ +#undef PACKAGE + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Turn on ARM Neon optimizations at run-time */ +#undef PNG_ARM_NEON_API_SUPPORTED + +/* Check for ARM Neon support at run-time */ +#undef PNG_ARM_NEON_CHECK_SUPPORTED + +/* Enable ARM Neon optimizations */ +#undef PNG_ARM_NEON_OPT + +/* Enable Intel SSE optimizations */ +#undef PNG_INTEL_SSE_OPT + +/* Enable LOONGARCH LSX optimizations */ +#undef PNG_LOONGARCH_LSX_OPT + +/* Turn on MIPS MMI optimizations at run-time */ +#undef PNG_MIPS_MMI_API_SUPPORTED + +/* Check for MIPS MMI support at run-time */ +#undef PNG_MIPS_MMI_CHECK_SUPPORTED + +/* Enable MIPS MMI optimizations */ +#undef PNG_MIPS_MMI_OPT + +/* Turn on MIPS MSA optimizations at run-time */ +#undef PNG_MIPS_MSA_API_SUPPORTED + +/* Check for MIPS MSA support at run-time */ +#undef PNG_MIPS_MSA_CHECK_SUPPORTED + +/* Enable MIPS MSA optimizations */ +#undef PNG_MIPS_MSA_OPT + +/* Turn on POWERPC VSX optimizations at run-time */ +#undef PNG_POWERPC_VSX_API_SUPPORTED + +/* Check for POWERPC VSX support at run-time */ +#undef PNG_POWERPC_VSX_CHECK_SUPPORTED + +/* Enable POWERPC VSX optimizations */ +#undef PNG_POWERPC_VSX_OPT + +/* Enable RISCV RVV optimizations */ +#undef PNG_RISCV_RVV_OPT + +/* Define to 1 if all of the C89 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ +#undef STDC_HEADERS + +/* Define to 1 if your declares 'struct tm'. */ +#undef TM_IN_SYS_TIME + +/* Version number of package */ +#undef VERSION + +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported only directly. */ +#undef restrict +/* Work around a bug in older versions of Sun C++, which did not + #define __restrict__ or support _Restrict or __restrict__ + even though the corresponding Sun C compiler ended up with + "#define restrict _Restrict" or "#define restrict __restrict__" + in the previous line. This workaround can be removed once + we assume Oracle Developer Studio 12.5 (2016) or later. */ +#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__ +# define _Restrict +# define __restrict__ +#endif diff --git a/widget/milsko/milskosrc/external/libpng/include/png.h b/widget/milsko/milskosrc/external/libpng/include/png.h new file mode 100644 index 0000000000..b9985e8168 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/include/png.h @@ -0,0 +1,3377 @@ +/* png.h - header file for PNG reference library + * + * libpng version 1.6.50 + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. (See LICENSE, below.) + * + * Authors and maintainers: + * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat + * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger + * libpng versions 0.97, January 1998, through 1.6.35, July 2018: + * Glenn Randers-Pehrson + * libpng versions 1.6.36, December 2018, through 1.6.50, July 2025: + * Cosmin Truta + * See also "Contributing Authors", below. + */ + +/* + * COPYRIGHT NOTICE, DISCLAIMER, and LICENSE + * ========================================= + * + * PNG Reference Library License version 2 + * --------------------------------------- + * + * * Copyright (c) 1995-2025 The PNG Reference Library Authors. + * * Copyright (c) 2018-2025 Cosmin Truta. + * * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. + * * Copyright (c) 1996-1997 Andreas Dilger. + * * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * The software is supplied "as is", without warranty of any kind, + * express or implied, including, without limitation, the warranties + * of merchantability, fitness for a particular purpose, title, and + * non-infringement. In no event shall the Copyright owners, or + * anyone distributing the software, be liable for any damages or + * other liability, whether in contract, tort or otherwise, arising + * from, out of, or in connection with the software, or the use or + * other dealings in the software, even if advised of the possibility + * of such damage. + * + * Permission is hereby granted to use, copy, modify, and distribute + * this software, or portions hereof, for any purpose, without fee, + * subject to the following restrictions: + * + * 1. The origin of this software must not be misrepresented; you + * must not claim that you wrote the original software. If you + * use this software in a product, an acknowledgment in the product + * documentation would be appreciated, but is not required. + * + * 2. Altered source versions must be plainly marked as such, and must + * not be misrepresented as being the original software. + * + * 3. This Copyright notice may not be removed or altered from any + * source or altered source distribution. + * + * + * PNG Reference Library License version 1 (for libpng 0.5 through 1.6.35) + * ----------------------------------------------------------------------- + * + * libpng versions 1.0.7, July 1, 2000, through 1.6.35, July 15, 2018 are + * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson, are + * derived from libpng-1.0.6, and are distributed according to the same + * disclaimer and license as libpng-1.0.6 with the following individuals + * added to the list of Contributing Authors: + * + * Simon-Pierre Cadieux + * Eric S. Raymond + * Mans Rullgard + * Cosmin Truta + * Gilles Vollant + * James Yu + * Mandar Sahastrabuddhe + * Google Inc. + * Vadim Barkov + * + * and with the following additions to the disclaimer: + * + * There is no warranty against interference with your enjoyment of + * the library or against infringement. There is no warranty that our + * efforts or the library will fulfill any of your particular purposes + * or needs. This library is provided with all faults, and the entire + * risk of satisfactory quality, performance, accuracy, and effort is + * with the user. + * + * Some files in the "contrib" directory and some configure-generated + * files that are distributed with libpng have other copyright owners, and + * are released under other open source licenses. + * + * libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are + * Copyright (c) 1998-2000 Glenn Randers-Pehrson, are derived from + * libpng-0.96, and are distributed according to the same disclaimer and + * license as libpng-0.96, with the following individuals added to the + * list of Contributing Authors: + * + * Tom Lane + * Glenn Randers-Pehrson + * Willem van Schaik + * + * libpng versions 0.89, June 1996, through 0.96, May 1997, are + * Copyright (c) 1996-1997 Andreas Dilger, are derived from libpng-0.88, + * and are distributed according to the same disclaimer and license as + * libpng-0.88, with the following individuals added to the list of + * Contributing Authors: + * + * John Bowler + * Kevin Bracey + * Sam Bushell + * Magnus Holmgren + * Greg Roelofs + * Tom Tanner + * + * Some files in the "scripts" directory have other copyright owners, + * but are released under this license. + * + * libpng versions 0.5, May 1995, through 0.88, January 1996, are + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * For the purposes of this copyright and license, "Contributing Authors" + * is defined as the following set of individuals: + * + * Andreas Dilger + * Dave Martindale + * Guy Eric Schalnat + * Paul Schmidt + * Tim Wegner + * + * The PNG Reference Library is supplied "AS IS". The Contributing + * Authors and Group 42, Inc. disclaim all warranties, expressed or + * implied, including, without limitation, the warranties of + * merchantability and of fitness for any purpose. The Contributing + * Authors and Group 42, Inc. assume no liability for direct, indirect, + * incidental, special, exemplary, or consequential damages, which may + * result from the use of the PNG Reference Library, even if advised of + * the possibility of such damage. + * + * Permission is hereby granted to use, copy, modify, and distribute this + * source code, or portions hereof, for any purpose, without fee, subject + * to the following restrictions: + * + * 1. The origin of this source code must not be misrepresented. + * + * 2. Altered versions must be plainly marked as such and must not + * be misrepresented as being the original source. + * + * 3. This Copyright notice may not be removed or altered from any + * source or altered source distribution. + * + * The Contributing Authors and Group 42, Inc. specifically permit, + * without fee, and encourage the use of this source code as a component + * to supporting the PNG file format in commercial products. If you use + * this source code in a product, acknowledgment is not required but would + * be appreciated. + * + * END OF COPYRIGHT NOTICE, DISCLAIMER, and LICENSE. + * + * TRADEMARK + * ========= + * + * The name "libpng" has not been registered by the Copyright owners + * as a trademark in any jurisdiction. However, because libpng has + * been distributed and maintained world-wide, continually since 1995, + * the Copyright owners claim "common-law trademark protection" in any + * jurisdiction where common-law trademark is recognized. + */ + +/* + * A "png_get_copyright" function is available, for convenient use in "about" + * boxes and the like: + * + * printf("%s", png_get_copyright(NULL)); + * + * Also, the PNG logo (in PNG format, of course) is supplied in the + * files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + */ + +/* + * The contributing authors would like to thank all those who helped + * with testing, bug fixes, and patience. This wouldn't have been + * possible without all of you. + * + * Thanks to Frank J. T. Wojcik for helping with the documentation. + */ + +/* Note about libpng version numbers: + * + * Due to various miscommunications, unforeseen code incompatibilities + * and occasional factors outside the authors' control, version numbering + * on the library has not always been consistent and straightforward. + * The following table summarizes matters since version 0.89c, which was + * the first widely used release: + * + * source png.h png.h shared-lib + * version string int version + * ------- ------ ----- ---------- + * 0.89c "1.0 beta 3" 0.89 89 1.0.89 + * 0.90 "1.0 beta 4" 0.90 90 0.90 [should have been 2.0.90] + * 0.95 "1.0 beta 5" 0.95 95 0.95 [should have been 2.0.95] + * 0.96 "1.0 beta 6" 0.96 96 0.96 [should have been 2.0.96] + * 0.97b "1.00.97 beta 7" 1.00.97 97 1.0.1 [should have been 2.0.97] + * 0.97c 0.97 97 2.0.97 + * 0.98 0.98 98 2.0.98 + * 0.99 0.99 98 2.0.99 + * 0.99a-m 0.99 99 2.0.99 + * 1.00 1.00 100 2.1.0 [100 should be 10000] + * 1.0.0 (from here on, the 100 2.1.0 [100 should be 10000] + * 1.0.1 png.h string is 10001 2.1.0 + * 1.0.1a-e identical to the 10002 from here on, the shared library + * 1.0.2 source version) 10002 is 2.V where V is the source code + * 1.0.2a-b 10003 version, except as noted. + * 1.0.3 10003 + * 1.0.3a-d 10004 + * 1.0.4 10004 + * 1.0.4a-f 10005 + * 1.0.5 (+ 2 patches) 10005 + * 1.0.5a-d 10006 + * 1.0.5e-r 10100 (not source compatible) + * 1.0.5s-v 10006 (not binary compatible) + * 1.0.6 (+ 3 patches) 10006 (still binary incompatible) + * 1.0.6d-f 10007 (still binary incompatible) + * 1.0.6g 10007 + * 1.0.6h 10007 10.6h (testing xy.z so-numbering) + * 1.0.6i 10007 10.6i + * 1.0.6j 10007 2.1.0.6j (incompatible with 1.0.0) + * 1.0.7beta11-14 DLLNUM 10007 2.1.0.7beta11-14 (binary compatible) + * 1.0.7beta15-18 1 10007 2.1.0.7beta15-18 (binary compatible) + * 1.0.7rc1-2 1 10007 2.1.0.7rc1-2 (binary compatible) + * 1.0.7 1 10007 (still compatible) + * ... + * 1.0.69 10 10069 10.so.0.69[.0] + * ... + * 1.2.59 13 10259 12.so.0.59[.0] + * ... + * 1.4.20 14 10420 14.so.0.20[.0] + * ... + * 1.5.30 15 10530 15.so.15.30[.0] + * ... + * 1.6.50 16 10650 16.so.16.50[.0] + * + * Henceforth the source version will match the shared-library major and + * minor numbers; the shared-library major version number will be used for + * changes in backward compatibility, as it is intended. + * The PNG_LIBPNG_VER macro, which is not used within libpng but is + * available for applications, is an unsigned integer of the form XYYZZ + * corresponding to the source version X.Y.Z (leading zeros in Y and Z). + * Beta versions were given the previous public release number plus a + * letter, until version 1.0.6j; from then on they were given the upcoming + * public release number plus "betaNN" or "rcNN". + * + * Binary incompatibility exists only when applications make direct access + * to the info_ptr or png_ptr members through png.h, and the compiled + * application is loaded with a different version of the library. + * + * See libpng.txt or libpng.3 for more information. The PNG specification + * is available as a W3C Recommendation and as an ISO/IEC Standard; see + * + */ + +#ifndef PNG_H +#define PNG_H + +/* This is not the place to learn how to use libpng. The file libpng-manual.txt + * describes how to use libpng, and the file example.c summarizes it + * with some code on which to build. This file is useful for looking + * at the actual function definitions and structure components. If that + * file has been stripped from your copy of libpng, you can find it at + * + * + * If you just need to read a PNG file and don't want to read the documentation + * skip to the end of this file and read the section entitled 'simplified API'. + */ + +/* Version information for png.h - this should match the version in png.c */ +#define PNG_LIBPNG_VER_STRING "1.6.50" +#define PNG_HEADER_VERSION_STRING " libpng version " PNG_LIBPNG_VER_STRING "\n" + +/* The versions of shared library builds should stay in sync, going forward */ +#define PNG_LIBPNG_VER_SHAREDLIB 16 +#define PNG_LIBPNG_VER_SONUM PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */ +#define PNG_LIBPNG_VER_DLLNUM PNG_LIBPNG_VER_SHAREDLIB /* [Deprecated] */ + +/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ +#define PNG_LIBPNG_VER_MAJOR 1 +#define PNG_LIBPNG_VER_MINOR 6 +#define PNG_LIBPNG_VER_RELEASE 50 + +/* This should be zero for a public release, or non-zero for a + * development version. + */ +#define PNG_LIBPNG_VER_BUILD 0 + +/* Release Status */ +#define PNG_LIBPNG_BUILD_ALPHA 1 +#define PNG_LIBPNG_BUILD_BETA 2 +#define PNG_LIBPNG_BUILD_RC 3 +#define PNG_LIBPNG_BUILD_STABLE 4 +#define PNG_LIBPNG_BUILD_RELEASE_STATUS_MASK 7 + +/* Release-Specific Flags */ +#define PNG_LIBPNG_BUILD_PATCH 8 /* Can be OR'ed with + PNG_LIBPNG_BUILD_STABLE only */ +#define PNG_LIBPNG_BUILD_PRIVATE 16 /* Cannot be OR'ed with + PNG_LIBPNG_BUILD_SPECIAL */ +#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with + PNG_LIBPNG_BUILD_PRIVATE */ + +#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE + +/* Careful here. At one time, Guy wanted to use 082, but that + * would be octal. We must not include leading zeros. + * Versions 0.7 through 1.0.0 were in the range 0 to 100 here + * (only version 1.0.0 was mis-numbered 100 instead of 10000). + * From version 1.0.1 it is: + * XXYYZZ, where XX=major, YY=minor, ZZ=release + */ +#define PNG_LIBPNG_VER 10650 /* 1.6.50 */ + +/* Library configuration: these options cannot be changed after + * the library has been built. + */ +#ifndef PNGLCONF_H +/* If pnglibconf.h is missing, you can + * copy scripts/pnglibconf.h.prebuilt to pnglibconf.h + */ +# include "pnglibconf.h" +#endif + +#ifndef PNG_VERSION_INFO_ONLY +/* Machine specific configuration. */ +# include "pngconf.h" +#endif + +/* + * Added at libpng-1.2.8 + * + * Ref MSDN: Private as priority over Special + * VS_FF_PRIVATEBUILD File *was not* built using standard release + * procedures. If this value is given, the StringFileInfo block must + * contain a PrivateBuild string. + * + * VS_FF_SPECIALBUILD File *was* built by the original company using + * standard release procedures but is a variation of the standard + * file of the same version number. If this value is given, the + * StringFileInfo block must contain a SpecialBuild string. + */ + +#ifdef PNG_USER_PRIVATEBUILD /* From pnglibconf.h */ +# define PNG_LIBPNG_BUILD_TYPE \ + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE) +#else +# ifdef PNG_LIBPNG_SPECIALBUILD +# define PNG_LIBPNG_BUILD_TYPE \ + (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL) +# else +# define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE) +# endif +#endif + +#ifndef PNG_VERSION_INFO_ONLY + +/* Inhibit C++ name-mangling for libpng functions but not for system calls. */ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* Version information for C files, stored in png.c. This had better match + * the version above. + */ +#define png_libpng_ver png_get_header_ver(NULL) + +/* This file is arranged in several sections: + * + * 1. [omitted] + * 2. Any configuration options that can be specified by for the application + * code when it is built. (Build time configuration is in pnglibconf.h) + * 3. Type definitions (base types are defined in pngconf.h), structure + * definitions. + * 4. Exported library functions. + * 5. Simplified API. + * 6. Implementation options. + * + * The library source code has additional files (principally pngpriv.h) that + * allow configuration of the library. + */ + +/* Section 1: [omitted] */ + +/* Section 2: run time configuration + * See pnglibconf.h for build time configuration + * + * Run time configuration allows the application to choose between + * implementations of certain arithmetic APIs. The default is set + * at build time and recorded in pnglibconf.h, but it is safe to + * override these (and only these) settings. Note that this won't + * change what the library does, only application code, and the + * settings can (and probably should) be made on a per-file basis + * by setting the #defines before including png.h + * + * Use macros to read integers from PNG data or use the exported + * functions? + * PNG_USE_READ_MACROS: use the macros (see below) Note that + * the macros evaluate their argument multiple times. + * PNG_NO_USE_READ_MACROS: call the relevant library function. + * + * Use the alternative algorithm for compositing alpha samples that + * does not use division? + * PNG_READ_COMPOSITE_NODIV_SUPPORTED: use the 'no division' + * algorithm. + * PNG_NO_READ_COMPOSITE_NODIV: use the 'division' algorithm. + * + * How to handle benign errors if PNG_ALLOW_BENIGN_ERRORS is + * false? + * PNG_ALLOW_BENIGN_ERRORS: map calls to the benign error + * APIs to png_warning. + * Otherwise the calls are mapped to png_error. + */ + +/* Section 3: type definitions, including structures and compile time + * constants. + * See pngconf.h for base types that vary by machine/system + */ + +/* This triggers a compiler error in png.c, if png.c and png.h + * do not agree upon the version number. + */ +typedef char* png_libpng_version_1_6_50; + +/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. + * + * png_struct is the cache of information used while reading or writing a single + * PNG file. One of these is always required, although the simplified API + * (below) hides the creation and destruction of it. + */ +typedef struct png_struct_def png_struct; +typedef const png_struct * png_const_structp; +typedef png_struct * png_structp; +typedef png_struct * * png_structpp; + +/* png_info contains information read from or to be written to a PNG file. One + * or more of these must exist while reading or creating a PNG file. The + * information is not used by libpng during read but is used to control what + * gets written when a PNG file is created. "png_get_" function calls read + * information during read and "png_set_" functions calls write information + * when creating a PNG. + * been moved into a separate header file that is not accessible to + * applications. Read libpng-manual.txt or libpng.3 for more info. + */ +typedef struct png_info_def png_info; +typedef png_info * png_infop; +typedef const png_info * png_const_infop; +typedef png_info * * png_infopp; + +/* Types with names ending 'p' are pointer types. The corresponding types with + * names ending 'rp' are identical pointer types except that the pointer is + * marked 'restrict', which means that it is the only pointer to the object + * passed to the function. Applications should not use the 'restrict' types; + * it is always valid to pass 'p' to a pointer with a function argument of the + * corresponding 'rp' type. Different compilers have different rules with + * regard to type matching in the presence of 'restrict'. For backward + * compatibility libpng callbacks never have 'restrict' in their parameters and, + * consequentially, writing portable application code is extremely difficult if + * an attempt is made to use 'restrict'. + */ +typedef png_struct * PNG_RESTRICT png_structrp; +typedef const png_struct * PNG_RESTRICT png_const_structrp; +typedef png_info * PNG_RESTRICT png_inforp; +typedef const png_info * PNG_RESTRICT png_const_inforp; + +/* Three color definitions. The order of the red, green, and blue, (and the + * exact size) is not important, although the size of the fields need to + * be png_byte or png_uint_16 (as defined below). + */ +typedef struct png_color_struct +{ + png_byte red; + png_byte green; + png_byte blue; +} png_color; +typedef png_color * png_colorp; +typedef const png_color * png_const_colorp; +typedef png_color * * png_colorpp; + +typedef struct png_color_16_struct +{ + png_byte index; /* used for palette files */ + png_uint_16 red; /* for use in red green blue files */ + png_uint_16 green; + png_uint_16 blue; + png_uint_16 gray; /* for use in grayscale files */ +} png_color_16; +typedef png_color_16 * png_color_16p; +typedef const png_color_16 * png_const_color_16p; +typedef png_color_16 * * png_color_16pp; + +typedef struct png_color_8_struct +{ + png_byte red; /* for use in red green blue files */ + png_byte green; + png_byte blue; + png_byte gray; /* for use in grayscale files */ + png_byte alpha; /* for alpha channel files */ +} png_color_8; +typedef png_color_8 * png_color_8p; +typedef const png_color_8 * png_const_color_8p; +typedef png_color_8 * * png_color_8pp; + +/* + * The following two structures are used for the in-core representation + * of sPLT chunks. + */ +typedef struct png_sPLT_entry_struct +{ + png_uint_16 red; + png_uint_16 green; + png_uint_16 blue; + png_uint_16 alpha; + png_uint_16 frequency; +} png_sPLT_entry; +typedef png_sPLT_entry * png_sPLT_entryp; +typedef const png_sPLT_entry * png_const_sPLT_entryp; +typedef png_sPLT_entry * * png_sPLT_entrypp; + +/* When the depth of the sPLT palette is 8 bits, the color and alpha samples + * occupy the LSB of their respective members, and the MSB of each member + * is zero-filled. The frequency member always occupies the full 16 bits. + */ + +typedef struct png_sPLT_struct +{ + png_charp name; /* palette name */ + png_byte depth; /* depth of palette samples */ + png_sPLT_entryp entries; /* palette entries */ + png_int_32 nentries; /* number of palette entries */ +} png_sPLT_t; +typedef png_sPLT_t * png_sPLT_tp; +typedef const png_sPLT_t * png_const_sPLT_tp; +typedef png_sPLT_t * * png_sPLT_tpp; + +#ifdef PNG_TEXT_SUPPORTED +/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file, + * and whether that contents is compressed or not. The "key" field + * points to a regular zero-terminated C string. The "text" fields can be a + * regular C string, an empty string, or a NULL pointer. + * However, the structure returned by png_get_text() will always contain + * the "text" field as a regular zero-terminated C string (possibly + * empty), never a NULL pointer, so it can be safely used in printf() and + * other string-handling functions. Note that the "itxt_length", "lang", and + * "lang_key" members of the structure only exist when the library is built + * with iTXt chunk support. Prior to libpng-1.4.0 the library was built by + * default without iTXt support. Also note that when iTXt *is* supported, + * the "lang" and "lang_key" fields contain NULL pointers when the + * "compression" field contains * PNG_TEXT_COMPRESSION_NONE or + * PNG_TEXT_COMPRESSION_zTXt. Note that the "compression value" is not the + * same as what appears in the PNG tEXt/zTXt/iTXt chunk's "compression flag" + * which is always 0 or 1, or its "compression method" which is always 0. + */ +typedef struct png_text_struct +{ + int compression; /* compression value: + -1: tEXt, none + 0: zTXt, deflate + 1: iTXt, none + 2: iTXt, deflate */ + png_charp key; /* keyword, 1-79 character description of "text" */ + png_charp text; /* comment, may be an empty string (ie "") + or a NULL pointer */ + size_t text_length; /* length of the text string */ + size_t itxt_length; /* length of the itxt string */ + png_charp lang; /* language code, 0-79 characters + or a NULL pointer */ + png_charp lang_key; /* keyword translated UTF-8 string, 0 or more + chars or a NULL pointer */ +} png_text; +typedef png_text * png_textp; +typedef const png_text * png_const_textp; +typedef png_text * * png_textpp; +#endif + +/* Supported compression types for text in PNG files (tEXt, and zTXt). + * The values of the PNG_TEXT_COMPRESSION_ defines should NOT be changed. */ +#define PNG_TEXT_COMPRESSION_NONE_WR -3 +#define PNG_TEXT_COMPRESSION_zTXt_WR -2 +#define PNG_TEXT_COMPRESSION_NONE -1 +#define PNG_TEXT_COMPRESSION_zTXt 0 +#define PNG_ITXT_COMPRESSION_NONE 1 +#define PNG_ITXT_COMPRESSION_zTXt 2 +#define PNG_TEXT_COMPRESSION_LAST 3 /* Not a valid value */ + +/* png_time is a way to hold the time in an machine independent way. + * Two conversions are provided, both from time_t and struct tm. There + * is no portable way to convert to either of these structures, as far + * as I know. If you know of a portable way, send it to me. As a side + * note - PNG has always been Year 2000 compliant! + */ +typedef struct png_time_struct +{ + png_uint_16 year; /* full year, as in, 1995 */ + png_byte month; /* month of year, 1 - 12 */ + png_byte day; /* day of month, 1 - 31 */ + png_byte hour; /* hour of day, 0 - 23 */ + png_byte minute; /* minute of hour, 0 - 59 */ + png_byte second; /* second of minute, 0 - 60 (for leap seconds) */ +} png_time; +typedef png_time * png_timep; +typedef const png_time * png_const_timep; +typedef png_time * * png_timepp; + +#if defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) ||\ + defined(PNG_USER_CHUNKS_SUPPORTED) +/* png_unknown_chunk is a structure to hold queued chunks for which there is + * no specific support. The idea is that we can use this to queue + * up private chunks for output even though the library doesn't actually + * know about their semantics. + * + * The data in the structure is set by libpng on read and used on write. + */ +typedef struct png_unknown_chunk_t +{ + png_byte name[5]; /* Textual chunk name with '\0' terminator */ + png_byte *data; /* Data, should not be modified on read! */ + size_t size; + + /* On write 'location' must be set using the flag values listed below. + * Notice that on read it is set by libpng however the values stored have + * more bits set than are listed below. Always treat the value as a + * bitmask. On write set only one bit - setting multiple bits may cause the + * chunk to be written in multiple places. + */ + png_byte location; /* mode of operation at read time */ +} +png_unknown_chunk; + +typedef png_unknown_chunk * png_unknown_chunkp; +typedef const png_unknown_chunk * png_const_unknown_chunkp; +typedef png_unknown_chunk * * png_unknown_chunkpp; +#endif + +/* Flag values for the unknown chunk location byte. */ +#define PNG_HAVE_IHDR 0x01 +#define PNG_HAVE_PLTE 0x02 +#define PNG_AFTER_IDAT 0x08 + +/* Maximum positive integer used in PNG is (2^31)-1 */ +#define PNG_UINT_31_MAX ((png_uint_32)0x7fffffffL) +#define PNG_UINT_32_MAX ((png_uint_32)(-1)) +#define PNG_SIZE_MAX ((size_t)(-1)) + +/* These are constants for fixed point values encoded in the + * PNG specification manner (x100000) + */ +#define PNG_FP_1 100000 +#define PNG_FP_HALF 50000 +#define PNG_FP_MAX ((png_fixed_point)0x7fffffffL) +#define PNG_FP_MIN (-PNG_FP_MAX) + +/* These describe the color_type field in png_info. */ +/* color type masks */ +#define PNG_COLOR_MASK_PALETTE 1 +#define PNG_COLOR_MASK_COLOR 2 +#define PNG_COLOR_MASK_ALPHA 4 + +/* color types. Note that not all combinations are legal */ +#define PNG_COLOR_TYPE_GRAY 0 +#define PNG_COLOR_TYPE_PALETTE (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_PALETTE) +#define PNG_COLOR_TYPE_RGB (PNG_COLOR_MASK_COLOR) +#define PNG_COLOR_TYPE_RGB_ALPHA (PNG_COLOR_MASK_COLOR | PNG_COLOR_MASK_ALPHA) +#define PNG_COLOR_TYPE_GRAY_ALPHA (PNG_COLOR_MASK_ALPHA) +/* aliases */ +#define PNG_COLOR_TYPE_RGBA PNG_COLOR_TYPE_RGB_ALPHA +#define PNG_COLOR_TYPE_GA PNG_COLOR_TYPE_GRAY_ALPHA + +/* This is for compression type. PNG 1.0-1.2 only define the single type. */ +#define PNG_COMPRESSION_TYPE_BASE 0 /* Deflate method 8, 32K window */ +#define PNG_COMPRESSION_TYPE_DEFAULT PNG_COMPRESSION_TYPE_BASE + +/* This is for filter type. PNG 1.0-1.2 only define the single type. */ +#define PNG_FILTER_TYPE_BASE 0 /* Single row per-byte filtering */ +#define PNG_INTRAPIXEL_DIFFERENCING 64 /* Used only in MNG datastreams */ +#define PNG_FILTER_TYPE_DEFAULT PNG_FILTER_TYPE_BASE + +/* These are for the interlacing type. These values should NOT be changed. */ +#define PNG_INTERLACE_NONE 0 /* Non-interlaced image */ +#define PNG_INTERLACE_ADAM7 1 /* Adam7 interlacing */ +#define PNG_INTERLACE_LAST 2 /* Not a valid value */ + +/* These are for the oFFs chunk. These values should NOT be changed. */ +#define PNG_OFFSET_PIXEL 0 /* Offset in pixels */ +#define PNG_OFFSET_MICROMETER 1 /* Offset in micrometers (1/10^6 meter) */ +#define PNG_OFFSET_LAST 2 /* Not a valid value */ + +/* These are for the pCAL chunk. These values should NOT be changed. */ +#define PNG_EQUATION_LINEAR 0 /* Linear transformation */ +#define PNG_EQUATION_BASE_E 1 /* Exponential base e transform */ +#define PNG_EQUATION_ARBITRARY 2 /* Arbitrary base exponential transform */ +#define PNG_EQUATION_HYPERBOLIC 3 /* Hyperbolic sine transformation */ +#define PNG_EQUATION_LAST 4 /* Not a valid value */ + +/* These are for the sCAL chunk. These values should NOT be changed. */ +#define PNG_SCALE_UNKNOWN 0 /* unknown unit (image scale) */ +#define PNG_SCALE_METER 1 /* meters per pixel */ +#define PNG_SCALE_RADIAN 2 /* radians per pixel */ +#define PNG_SCALE_LAST 3 /* Not a valid value */ + +/* These are for the pHYs chunk. These values should NOT be changed. */ +#define PNG_RESOLUTION_UNKNOWN 0 /* pixels/unknown unit (aspect ratio) */ +#define PNG_RESOLUTION_METER 1 /* pixels/meter */ +#define PNG_RESOLUTION_LAST 2 /* Not a valid value */ + +/* These are for the sRGB chunk. These values should NOT be changed. */ +#define PNG_sRGB_INTENT_PERCEPTUAL 0 +#define PNG_sRGB_INTENT_RELATIVE 1 +#define PNG_sRGB_INTENT_SATURATION 2 +#define PNG_sRGB_INTENT_ABSOLUTE 3 +#define PNG_sRGB_INTENT_LAST 4 /* Not a valid value */ + +/* This is for text chunks */ +#define PNG_KEYWORD_MAX_LENGTH 79 + +/* Maximum number of entries in PLTE/sPLT/tRNS arrays */ +#define PNG_MAX_PALETTE_LENGTH 256 + +/* These determine if an ancillary chunk's data has been successfully read + * from the PNG header, or if the application has filled in the corresponding + * data in the info_struct to be written into the output file. The values + * of the PNG_INFO_ defines should NOT be changed. + */ +#define PNG_INFO_gAMA 0x0001U +#define PNG_INFO_sBIT 0x0002U +#define PNG_INFO_cHRM 0x0004U +#define PNG_INFO_PLTE 0x0008U +#define PNG_INFO_tRNS 0x0010U +#define PNG_INFO_bKGD 0x0020U +#define PNG_INFO_hIST 0x0040U +#define PNG_INFO_pHYs 0x0080U +#define PNG_INFO_oFFs 0x0100U +#define PNG_INFO_tIME 0x0200U +#define PNG_INFO_pCAL 0x0400U +#define PNG_INFO_sRGB 0x0800U /* GR-P, 0.96a */ +#define PNG_INFO_iCCP 0x1000U /* ESR, 1.0.6 */ +#define PNG_INFO_sPLT 0x2000U /* ESR, 1.0.6 */ +#define PNG_INFO_sCAL 0x4000U /* ESR, 1.0.6 */ +#define PNG_INFO_IDAT 0x8000U /* ESR, 1.0.6 */ +#define PNG_INFO_eXIf 0x10000U /* GR-P, 1.6.31 */ +#define PNG_INFO_cICP 0x20000U /* PNGv3: 1.6.45 */ +#define PNG_INFO_cLLI 0x40000U /* PNGv3: 1.6.45 */ +#define PNG_INFO_mDCV 0x80000U /* PNGv3: 1.6.45 */ +/* APNG: these chunks are stored as unknown, these flags are never set + * however they are provided as a convenience for implementors of APNG and + * avoids any merge conflicts. + * + * Private chunks: these chunk names violate the chunk name recommendations + * because the chunk definitions have no signature and because the private + * chunks with these names have been reserved. Private definitions should + * avoid them. + */ +#define PNG_INFO_acTL 0x100000U /* PNGv3: 1.6.45: unknown */ +#define PNG_INFO_fcTL 0x200000U /* PNGv3: 1.6.45: unknown */ +#define PNG_INFO_fdAT 0x400000U /* PNGv3: 1.6.45: unknown */ + +/* This is used for the transformation routines, as some of them + * change these values for the row. It also should enable using + * the routines for other purposes. + */ +typedef struct png_row_info_struct +{ + png_uint_32 width; /* width of row */ + size_t rowbytes; /* number of bytes in row */ + png_byte color_type; /* color type of row */ + png_byte bit_depth; /* bit depth of row */ + png_byte channels; /* number of channels (1, 2, 3, or 4) */ + png_byte pixel_depth; /* bits per pixel (depth * channels) */ +} png_row_info; + +typedef png_row_info * png_row_infop; +typedef png_row_info * * png_row_infopp; + +/* These are the function types for the I/O functions and for the functions + * that allow the user to override the default I/O functions with his or her + * own. The png_error_ptr type should match that of user-supplied warning + * and error functions, while the png_rw_ptr type should match that of the + * user read/write data functions. Note that the 'write' function must not + * modify the buffer it is passed. The 'read' function, on the other hand, is + * expected to return the read data in the buffer. + */ +typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp)); +typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, size_t)); +typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp)); +typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32, + int)); +typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint_32, + int)); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +typedef PNG_CALLBACK(void, *png_progressive_info_ptr, (png_structp, png_infop)); +typedef PNG_CALLBACK(void, *png_progressive_end_ptr, (png_structp, png_infop)); + +/* The following callback receives png_uint_32 row_number, int pass for the + * png_bytep data of the row. When transforming an interlaced image the + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) + */ +typedef PNG_CALLBACK(void, *png_progressive_row_ptr, (png_structp, png_bytep, + png_uint_32, int)); +#endif + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +typedef PNG_CALLBACK(void, *png_user_transform_ptr, (png_structp, png_row_infop, + png_bytep)); +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp, + png_unknown_chunkp)); +#endif +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED +/* not used anywhere */ +/* typedef PNG_CALLBACK(void, *png_unknown_chunk_ptr, (png_structp)); */ +#endif + +#ifdef PNG_SETJMP_SUPPORTED +/* This must match the function definition in , and the application + * must include this before png.h to obtain the definition of jmp_buf. The + * function is required to be PNG_NORETURN, but this is not checked. If the + * function does return the application will crash via an abort() or similar + * system level call. + * + * If you get a warning here while building the library you may need to make + * changes to ensure that pnglibconf.h records the calling convention used by + * your compiler. This may be very difficult - try using a different compiler + * to build the library! + */ +PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), (jmp_buf, int), typedef); +#endif + +/* Transform masks for the high-level interface */ +#define PNG_TRANSFORM_IDENTITY 0x0000 /* read and write */ +#define PNG_TRANSFORM_STRIP_16 0x0001 /* read only */ +#define PNG_TRANSFORM_STRIP_ALPHA 0x0002 /* read only */ +#define PNG_TRANSFORM_PACKING 0x0004 /* read and write */ +#define PNG_TRANSFORM_PACKSWAP 0x0008 /* read and write */ +#define PNG_TRANSFORM_EXPAND 0x0010 /* read only */ +#define PNG_TRANSFORM_INVERT_MONO 0x0020 /* read and write */ +#define PNG_TRANSFORM_SHIFT 0x0040 /* read and write */ +#define PNG_TRANSFORM_BGR 0x0080 /* read and write */ +#define PNG_TRANSFORM_SWAP_ALPHA 0x0100 /* read and write */ +#define PNG_TRANSFORM_SWAP_ENDIAN 0x0200 /* read and write */ +#define PNG_TRANSFORM_INVERT_ALPHA 0x0400 /* read and write */ +#define PNG_TRANSFORM_STRIP_FILLER 0x0800 /* write only */ +/* Added to libpng-1.2.34 */ +#define PNG_TRANSFORM_STRIP_FILLER_BEFORE PNG_TRANSFORM_STRIP_FILLER +#define PNG_TRANSFORM_STRIP_FILLER_AFTER 0x1000 /* write only */ +/* Added to libpng-1.4.0 */ +#define PNG_TRANSFORM_GRAY_TO_RGB 0x2000 /* read only */ +/* Added to libpng-1.5.4 */ +#define PNG_TRANSFORM_EXPAND_16 0x4000 /* read only */ +#if ~0U > 0xffffU /* or else this might break on a 16-bit machine */ +#define PNG_TRANSFORM_SCALE_16 0x8000 /* read only */ +#endif + +/* Flags for MNG supported features */ +#define PNG_FLAG_MNG_EMPTY_PLTE 0x01 +#define PNG_FLAG_MNG_FILTER_64 0x04 +#define PNG_ALL_MNG_FEATURES 0x05 + +/* NOTE: prior to 1.5 these functions had no 'API' style declaration, + * this allowed the zlib default functions to be used on Windows + * platforms. In 1.5 the zlib default malloc (which just calls malloc and + * ignores the first argument) should be completely compatible with the + * following. + */ +typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp, + png_alloc_size_t)); +typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp)); + +/* Section 4: exported functions + * Here are the function definitions most commonly used. This is not + * the place to find out how to use libpng. See libpng-manual.txt for the + * full explanation, see example.c for the summary. This just provides + * a simple one line description of the use of each function. + * + * The PNG_EXPORT() and PNG_EXPORTA() macros used below are defined in + * pngconf.h and in the *.dfn files in the scripts directory. + * + * PNG_EXPORT(ordinal, type, name, (args)); + * + * ordinal: ordinal that is used while building + * *.def files. The ordinal value is only + * relevant when preprocessing png.h with + * the *.dfn files for building symbol table + * entries, and are removed by pngconf.h. + * type: return type of the function + * name: function name + * args: function arguments, with types + * + * When we wish to append attributes to a function prototype we use + * the PNG_EXPORTA() macro instead. + * + * PNG_EXPORTA(ordinal, type, name, (args), attributes); + * + * ordinal, type, name, and args: same as in PNG_EXPORT(). + * attributes: function attributes + */ + +/* Returns the version number of the library */ +PNG_EXPORT(1, png_uint_32, png_access_version_number, (void)); + +/* Tell lib we have already handled the first magic bytes. + * Handling more than 8 bytes from the beginning of the file is an error. + */ +PNG_EXPORT(2, void, png_set_sig_bytes, (png_structrp png_ptr, int num_bytes)); + +/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a + * PNG file. Returns zero if the supplied bytes match the 8-byte PNG + * signature, and non-zero otherwise. Having num_to_check == 0 or + * start > 7 will always fail (i.e. return non-zero). + */ +PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, size_t start, + size_t num_to_check)); + +/* Simple signature checking function. This is the same as calling + * png_check_sig(sig, n) := (png_sig_cmp(sig, 0, n) == 0). + */ +#define png_check_sig(sig, n) (png_sig_cmp((sig), 0, (n)) == 0) /* DEPRECATED */ + +/* Allocate and initialize png_ptr struct for reading, and any other memory. */ +PNG_EXPORTA(4, png_structp, png_create_read_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn), + PNG_ALLOCATED); + +/* Allocate and initialize png_ptr struct for writing, and any other memory */ +PNG_EXPORTA(5, png_structp, png_create_write_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn), + PNG_ALLOCATED); + +PNG_EXPORT(6, size_t, png_get_compression_buffer_size, + (png_const_structrp png_ptr)); + +PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structrp png_ptr, + size_t size)); + +/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp + * match up. + */ +#ifdef PNG_SETJMP_SUPPORTED +/* This function returns the jmp_buf built in to *png_ptr. It must be + * supplied with an appropriate 'longjmp' function to use on that jmp_buf + * unless the default error function is overridden in which case NULL is + * acceptable. The size of the jmp_buf is checked against the actual size + * allocated by the library - the call will return NULL on a mismatch + * indicating an ABI mismatch. + */ +PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structrp png_ptr, + png_longjmp_ptr longjmp_fn, size_t jmp_buf_size)); +# define png_jmpbuf(png_ptr) \ + (*png_set_longjmp_fn((png_ptr), longjmp, (sizeof (jmp_buf)))) +#else +# define png_jmpbuf(png_ptr) \ + (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP) +#endif +/* This function should be used by libpng applications in place of + * longjmp(png_ptr->jmpbuf, val). If longjmp_fn() has been set, it + * will use it; otherwise it will call PNG_ABORT(). This function was + * added in libpng-1.5.0. + */ +PNG_EXPORTA(9, void, png_longjmp, (png_const_structrp png_ptr, int val), + PNG_NORETURN); + +#ifdef PNG_READ_SUPPORTED +/* Reset the compression stream */ +PNG_EXPORTA(10, int, png_reset_zstream, (png_structrp png_ptr), PNG_DEPRECATED); +#endif + +/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */ +#ifdef PNG_USER_MEM_SUPPORTED +PNG_EXPORTA(11, png_structp, png_create_read_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); +PNG_EXPORTA(12, png_structp, png_create_write_struct_2, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, + png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn), + PNG_ALLOCATED); +#endif + +/* Write the PNG file signature. */ +PNG_EXPORT(13, void, png_write_sig, (png_structrp png_ptr)); + +/* Write a PNG chunk - size, type, (optional) data, CRC. */ +PNG_EXPORT(14, void, png_write_chunk, (png_structrp png_ptr, png_const_bytep + chunk_name, png_const_bytep data, size_t length)); + +/* Write the start of a PNG chunk - length and chunk name. */ +PNG_EXPORT(15, void, png_write_chunk_start, (png_structrp png_ptr, + png_const_bytep chunk_name, png_uint_32 length)); + +/* Write the data of a PNG chunk started with png_write_chunk_start(). */ +PNG_EXPORT(16, void, png_write_chunk_data, (png_structrp png_ptr, + png_const_bytep data, size_t length)); + +/* Finish a chunk started with png_write_chunk_start() (includes CRC). */ +PNG_EXPORT(17, void, png_write_chunk_end, (png_structrp png_ptr)); + +/* Allocate and initialize the info structure */ +PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_const_structrp png_ptr), + PNG_ALLOCATED); + +/* DEPRECATED: this function allowed init structures to be created using the + * default allocation method (typically malloc). Use is deprecated in 1.6.0 and + * the API will be removed in the future. + */ +PNG_EXPORTA(19, void, png_info_init_3, (png_infopp info_ptr, + size_t png_info_struct_size), PNG_DEPRECATED); + +/* Writes all the PNG information before the image. */ +PNG_EXPORT(20, void, png_write_info_before_PLTE, + (png_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(21, void, png_write_info, + (png_structrp png_ptr, png_const_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the information before the actual image data. */ +PNG_EXPORT(22, void, png_read_info, + (png_structrp png_ptr, png_inforp info_ptr)); +#endif + +#ifdef PNG_TIME_RFC1123_SUPPORTED + /* Convert to a US string format: there is no localization support in this + * routine. The original implementation used a 29 character buffer in + * png_struct, this will be removed in future versions. + */ +#if PNG_LIBPNG_VER < 10700 +/* To do: remove this from libpng17 (and from libpng17/png.c and pngstruct.h) */ +PNG_EXPORTA(23, png_const_charp, png_convert_to_rfc1123, (png_structrp png_ptr, + png_const_timep ptime),PNG_DEPRECATED); +#endif +PNG_EXPORT(241, int, png_convert_to_rfc1123_buffer, (char out[29], + png_const_timep ptime)); +#endif + +#ifdef PNG_CONVERT_tIME_SUPPORTED +/* Convert from a struct tm to png_time */ +PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime, + const struct tm * ttime)); + +/* Convert from time_t to png_time. Uses gmtime() */ +PNG_EXPORT(25, void, png_convert_from_time_t, (png_timep ptime, time_t ttime)); +#endif /* CONVERT_tIME */ + +#ifdef PNG_READ_EXPAND_SUPPORTED +/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */ +PNG_EXPORT(26, void, png_set_expand, (png_structrp png_ptr)); +PNG_EXPORT(27, void, png_set_expand_gray_1_2_4_to_8, (png_structrp png_ptr)); +PNG_EXPORT(28, void, png_set_palette_to_rgb, (png_structrp png_ptr)); +PNG_EXPORT(29, void, png_set_tRNS_to_alpha, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* Expand to 16-bit channels, forces conversion of palette to RGB and expansion + * of a tRNS chunk if present. + */ +PNG_EXPORT(221, void, png_set_expand_16, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +/* Use blue, green, red order for pixels. */ +PNG_EXPORT(30, void, png_set_bgr, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +/* Expand the grayscale to 24-bit RGB if necessary. */ +PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +/* Reduce RGB to grayscale. */ +#define PNG_ERROR_ACTION_NONE 1 +#define PNG_ERROR_ACTION_WARN 2 +#define PNG_ERROR_ACTION_ERROR 3 +#define PNG_RGB_TO_GRAY_DEFAULT (-1)/*for red/green coefficients*/ + +PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structrp png_ptr, + int error_action, double red, double green)) +PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structrp png_ptr, + int error_action, png_fixed_point red, png_fixed_point green)) + +PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (png_const_structrp + png_ptr)); +#endif + +#ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth, + png_colorp palette)); +#endif + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED +/* How the alpha channel is interpreted - this affects how the color channels + * of a PNG file are returned to the calling application when an alpha channel, + * or a tRNS chunk in a palette file, is present. + * + * This has no effect on the way pixels are written into a PNG output + * datastream. The color samples in a PNG datastream are never premultiplied + * with the alpha samples. + * + * The default is to return data according to the PNG specification: the alpha + * channel is a linear measure of the contribution of the pixel to the + * corresponding composited pixel, and the color channels are unassociated + * (not premultiplied). The gamma encoded color channels must be scaled + * according to the contribution and to do this it is necessary to undo + * the encoding, scale the color values, perform the composition and re-encode + * the values. This is the 'PNG' mode. + * + * The alternative is to 'associate' the alpha with the color information by + * storing color channel values that have been scaled by the alpha. + * image. These are the 'STANDARD', 'ASSOCIATED' or 'PREMULTIPLIED' modes + * (the latter being the two common names for associated alpha color channels). + * + * For the 'OPTIMIZED' mode, a pixel is treated as opaque only if the alpha + * value is equal to the maximum value. + * + * The final choice is to gamma encode the alpha channel as well. This is + * broken because, in practice, no implementation that uses this choice + * correctly undoes the encoding before handling alpha composition. Use this + * choice only if other serious errors in the software or hardware you use + * mandate it; the typical serious error is for dark halos to appear around + * opaque areas of the composited PNG image because of arithmetic overflow. + * + * The API function png_set_alpha_mode specifies which of these choices to use + * with an enumerated 'mode' value and the gamma of the required output: + */ +#define PNG_ALPHA_PNG 0 /* according to the PNG standard */ +#define PNG_ALPHA_STANDARD 1 /* according to Porter/Duff */ +#define PNG_ALPHA_ASSOCIATED 1 /* as above; this is the normal practice */ +#define PNG_ALPHA_PREMULTIPLIED 1 /* as above */ +#define PNG_ALPHA_OPTIMIZED 2 /* 'PNG' for opaque pixels, else 'STANDARD' */ +#define PNG_ALPHA_BROKEN 3 /* the alpha channel is gamma encoded */ + +PNG_FP_EXPORT(227, void, png_set_alpha_mode, (png_structrp png_ptr, int mode, + double output_gamma)) +PNG_FIXED_EXPORT(228, void, png_set_alpha_mode_fixed, (png_structrp png_ptr, + int mode, png_fixed_point output_gamma)) +#endif + +#if defined(PNG_GAMMA_SUPPORTED) || defined(PNG_READ_ALPHA_MODE_SUPPORTED) +/* The output_gamma value is a screen gamma in libpng terminology: it expresses + * how to decode the output values, not how they are encoded. + */ +#define PNG_DEFAULT_sRGB -1 /* sRGB gamma and color space */ +#define PNG_GAMMA_MAC_18 -2 /* Old Mac '1.8' gamma and color space */ +#define PNG_GAMMA_sRGB 220000 /* Television standards--matches sRGB gamma */ +#define PNG_GAMMA_LINEAR PNG_FP_1 /* Linear */ +#endif + +/* The following are examples of calls to png_set_alpha_mode to achieve the + * required overall gamma correction and, where necessary, alpha + * premultiplication. + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); + * This is the default libpng handling of the alpha channel - it is not + * pre-multiplied into the color components. In addition the call states + * that the output is for a sRGB system and causes all PNG files without gAMA + * chunks to be assumed to be encoded using sRGB. + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); + * In this case the output is assumed to be something like an sRGB conformant + * display preceded by a power-law lookup table of power 1.45. This is how + * early Mac systems behaved. + * + * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_GAMMA_LINEAR); + * This is the classic Jim Blinn approach and will work in academic + * environments where everything is done by the book. It has the shortcoming + * of assuming that input PNG data with no gamma information is linear - this + * is unlikely to be correct unless the PNG files where generated locally. + * Most of the time the output precision will be so low as to show + * significant banding in dark areas of the image. + * + * png_set_expand_16(pp); + * png_set_alpha_mode(pp, PNG_ALPHA_STANDARD, PNG_DEFAULT_sRGB); + * This is a somewhat more realistic Jim Blinn inspired approach. PNG files + * are assumed to have the sRGB encoding if not marked with a gamma value and + * the output is always 16 bits per component. This permits accurate scaling + * and processing of the data. If you know that your input PNG files were + * generated locally you might need to replace PNG_DEFAULT_sRGB with the + * correct value for your system. + * + * png_set_alpha_mode(pp, PNG_ALPHA_OPTIMIZED, PNG_DEFAULT_sRGB); + * If you just need to composite the PNG image onto an existing background + * and if you control the code that does this you can use the optimization + * setting. In this case you just copy completely opaque pixels to the + * output. For pixels that are not completely transparent (you just skip + * those) you do the composition math using png_composite or png_composite_16 + * below then encode the resultant 8-bit or 16-bit values to match the output + * encoding. + * + * Other cases + * If neither the PNG nor the standard linear encoding work for you because + * of the software or hardware you use then you have a big problem. The PNG + * case will probably result in halos around the image. The linear encoding + * will probably result in a washed out, too bright, image (it's actually too + * contrasty.) Try the ALPHA_OPTIMIZED mode above - this will probably + * substantially reduce the halos. Alternatively try: + * + * png_set_alpha_mode(pp, PNG_ALPHA_BROKEN, PNG_DEFAULT_sRGB); + * This option will also reduce the halos, but there will be slight dark + * halos round the opaque parts of the image where the background is light. + * In the OPTIMIZED mode the halos will be light halos where the background + * is dark. Take your pick - the halos are unavoidable unless you can get + * your hardware/software fixed! (The OPTIMIZED approach is slightly + * faster.) + * + * When the default gamma of PNG files doesn't match the output gamma. + * If you have PNG files with no gamma information png_set_alpha_mode allows + * you to provide a default gamma, but it also sets the output gamma to the + * matching value. If you know your PNG files have a gamma that doesn't + * match the output you can take advantage of the fact that + * png_set_alpha_mode always sets the output gamma but only sets the PNG + * default if it is not already set: + * + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_DEFAULT_sRGB); + * png_set_alpha_mode(pp, PNG_ALPHA_PNG, PNG_GAMMA_MAC); + * The first call sets both the default and the output gamma values, the + * second call overrides the output gamma without changing the default. This + * is easier than achieving the same effect with png_set_gamma. You must use + * PNG_ALPHA_PNG for the first call - internal checking in png_set_alpha will + * fire if more than one call to png_set_alpha_mode and png_set_background is + * made in the same read operation, however multiple calls with PNG_ALPHA_PNG + * are ignored. + */ + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED +PNG_EXPORT(36, void, png_set_strip_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +PNG_EXPORT(37, void, png_set_swap_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +PNG_EXPORT(38, void, png_set_invert_alpha, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) +/* Add a filler byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */ +PNG_EXPORT(39, void, png_set_filler, (png_structrp png_ptr, png_uint_32 filler, + int flags)); +/* The values of the PNG_FILLER_ defines should NOT be changed */ +# define PNG_FILLER_BEFORE 0 +# define PNG_FILLER_AFTER 1 +/* Add an alpha byte to 8-bit or 16-bit Gray or 24-bit or 48-bit RGB images. */ +PNG_EXPORT(40, void, png_set_add_alpha, (png_structrp png_ptr, + png_uint_32 filler, int flags)); +#endif /* READ_FILLER || WRITE_FILLER */ + +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +/* Swap bytes in 16-bit depth files. */ +PNG_EXPORT(41, void, png_set_swap, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) +/* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ +PNG_EXPORT(42, void, png_set_packing, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) +/* Swap packing order of pixels in bytes. */ +PNG_EXPORT(43, void, png_set_packswap, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) +/* Converts files to legal bit depths. */ +PNG_EXPORT(44, void, png_set_shift, (png_structrp png_ptr, png_const_color_8p + true_bits)); +#endif + +#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ + defined(PNG_WRITE_INTERLACING_SUPPORTED) +/* Have the code handle the interlacing. Returns the number of passes. + * MUST be called before png_read_update_info or png_start_read_image, + * otherwise it will not have the desired effect. Note that it is still + * necessary to call png_read_row or png_read_rows png_get_image_height + * times for each pass. +*/ +PNG_EXPORT(45, int, png_set_interlace_handling, (png_structrp png_ptr)); +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +/* Invert monochrome files */ +PNG_EXPORT(46, void, png_set_invert_mono, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_BACKGROUND_SUPPORTED +/* Handle alpha and tRNS by replacing with a background color. Prior to + * libpng-1.5.4 this API must not be called before the PNG file header has been + * read. Doing so will result in unexpected behavior and possible warnings or + * errors if the PNG file contains a bKGD chunk. + */ +PNG_FP_EXPORT(47, void, png_set_background, (png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, double background_gamma)) +PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, png_fixed_point background_gamma)) +#endif +#ifdef PNG_READ_BACKGROUND_SUPPORTED +# define PNG_BACKGROUND_GAMMA_UNKNOWN 0 +# define PNG_BACKGROUND_GAMMA_SCREEN 1 +# define PNG_BACKGROUND_GAMMA_FILE 2 +# define PNG_BACKGROUND_GAMMA_UNIQUE 3 +#endif + +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED +/* Scale a 16-bit depth file down to 8-bit, accurately. */ +PNG_EXPORT(229, void, png_set_scale_16, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED +#define PNG_READ_16_TO_8_SUPPORTED /* Name prior to 1.5.4 */ +/* Strip the second byte of information from a 16-bit depth file. */ +PNG_EXPORT(48, void, png_set_strip_16, (png_structrp png_ptr)); +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* Turn on quantizing, and reduce the palette to the number of colors + * available. + */ +PNG_EXPORT(49, void, png_set_quantize, (png_structrp png_ptr, + png_colorp palette, int num_palette, int maximum_colors, + png_const_uint_16p histogram, int full_quantize)); +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* The threshold on gamma processing is configurable but hard-wired into the + * library. The following is the floating point variant. + */ +#define PNG_GAMMA_THRESHOLD (PNG_GAMMA_THRESHOLD_FIXED*.00001) + +/* Handle gamma correction. Screen_gamma=(display_exponent). + * NOTE: this API simply sets the screen and file gamma values. It will + * therefore override the value for gamma in a PNG file if it is called after + * the file header has been read - use with care - call before reading the PNG + * file for best results! + * + * These routines accept the same gamma values as png_set_alpha_mode (described + * above). The PNG_GAMMA_ defines and PNG_DEFAULT_sRGB can be passed to either + * API (floating point or fixed.) Notice, however, that the 'file_gamma' value + * is the inverse of a 'screen gamma' value. + */ +PNG_FP_EXPORT(50, void, png_set_gamma, (png_structrp png_ptr, + double screen_gamma, double override_file_gamma)) +PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structrp png_ptr, + png_fixed_point screen_gamma, png_fixed_point override_file_gamma)) +#endif + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +/* Set how many lines between output flushes - 0 for no flushing */ +PNG_EXPORT(51, void, png_set_flush, (png_structrp png_ptr, int nrows)); +/* Flush the current PNG output buffer */ +PNG_EXPORT(52, void, png_write_flush, (png_structrp png_ptr)); +#endif + +/* Optional update palette with requested transformations */ +PNG_EXPORT(53, void, png_start_read_image, (png_structrp png_ptr)); + +/* Optional call to update the users info structure */ +PNG_EXPORT(54, void, png_read_update_info, (png_structrp png_ptr, + png_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read one or more rows of image data. */ +PNG_EXPORT(55, void, png_read_rows, (png_structrp png_ptr, png_bytepp row, + png_bytepp display_row, png_uint_32 num_rows)); +#endif + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read a row of data. */ +PNG_EXPORT(56, void, png_read_row, (png_structrp png_ptr, png_bytep row, + png_bytep display_row)); +#endif + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the whole image into memory at once. */ +PNG_EXPORT(57, void, png_read_image, (png_structrp png_ptr, png_bytepp image)); +#endif + +/* Write a row of image data */ +PNG_EXPORT(58, void, png_write_row, (png_structrp png_ptr, + png_const_bytep row)); + +/* Write a few rows of image data: (*row) is not written; however, the type + * is declared as writeable to maintain compatibility with previous versions + * of libpng and to allow the 'display_row' array from read_rows to be passed + * unchanged to write_rows. + */ +PNG_EXPORT(59, void, png_write_rows, (png_structrp png_ptr, png_bytepp row, + png_uint_32 num_rows)); + +/* Write the image data */ +PNG_EXPORT(60, void, png_write_image, (png_structrp png_ptr, png_bytepp image)); + +/* Write the end of the PNG file. */ +PNG_EXPORT(61, void, png_write_end, (png_structrp png_ptr, + png_inforp info_ptr)); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the end of the PNG file. */ +PNG_EXPORT(62, void, png_read_end, (png_structrp png_ptr, png_inforp info_ptr)); +#endif + +/* Free any memory associated with the png_info_struct */ +PNG_EXPORT(63, void, png_destroy_info_struct, (png_const_structrp png_ptr, + png_infopp info_ptr_ptr)); + +/* Free any memory associated with the png_struct and the png_info_structs */ +PNG_EXPORT(64, void, png_destroy_read_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr)); + +/* Free any memory associated with the png_struct and the png_info_structs */ +PNG_EXPORT(65, void, png_destroy_write_struct, (png_structpp png_ptr_ptr, + png_infopp info_ptr_ptr)); + +/* Set the libpng method of handling chunk CRC errors */ +PNG_EXPORT(66, void, png_set_crc_action, (png_structrp png_ptr, int crit_action, + int ancil_action)); + +/* Values for png_set_crc_action() say how to handle CRC errors in + * ancillary and critical chunks, and whether to use the data contained + * therein. Note that it is impossible to "discard" data in a critical + * chunk. For versions prior to 0.90, the action was always error/quit, + * whereas in version 0.90 and later, the action for CRC errors in ancillary + * chunks is warn/discard. These values should NOT be changed. + * + * value action:critical action:ancillary + */ +#define PNG_CRC_DEFAULT 0 /* error/quit warn/discard data */ +#define PNG_CRC_ERROR_QUIT 1 /* error/quit error/quit */ +#define PNG_CRC_WARN_DISCARD 2 /* (INVALID) warn/discard data */ +#define PNG_CRC_WARN_USE 3 /* warn/use data warn/use data */ +#define PNG_CRC_QUIET_USE 4 /* quiet/use data quiet/use data */ +#define PNG_CRC_NO_CHANGE 5 /* use current value use current value */ + +#ifdef PNG_WRITE_SUPPORTED +/* These functions give the user control over the scan-line filtering in + * libpng and the compression methods used by zlib. These functions are + * mainly useful for testing, as the defaults should work with most users. + * Those users who are tight on memory or want faster performance at the + * expense of compression can modify them. See the compression library + * header file (zlib.h) for an explanation of the compression functions. + */ + +/* Set the filtering method(s) used by libpng. Currently, the only valid + * value for "method" is 0. + */ +PNG_EXPORT(67, void, png_set_filter, (png_structrp png_ptr, int method, + int filters)); +#endif /* WRITE */ + +/* Flags for png_set_filter() to say which filters to use. The flags + * are chosen so that they don't conflict with real filter types + * below, in case they are supplied instead of the #defined constants. + * These values should NOT be changed. + */ +#define PNG_NO_FILTERS 0x00 +#define PNG_FILTER_NONE 0x08 +#define PNG_FILTER_SUB 0x10 +#define PNG_FILTER_UP 0x20 +#define PNG_FILTER_AVG 0x40 +#define PNG_FILTER_PAETH 0x80 +#define PNG_FAST_FILTERS (PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_UP) +#define PNG_ALL_FILTERS (PNG_FAST_FILTERS | PNG_FILTER_AVG | PNG_FILTER_PAETH) + +/* Filter values (not flags) - used in pngwrite.c, pngwutil.c for now. + * These defines should NOT be changed. + */ +#define PNG_FILTER_VALUE_NONE 0 +#define PNG_FILTER_VALUE_SUB 1 +#define PNG_FILTER_VALUE_UP 2 +#define PNG_FILTER_VALUE_AVG 3 +#define PNG_FILTER_VALUE_PAETH 4 +#define PNG_FILTER_VALUE_LAST 5 + +#ifdef PNG_WRITE_SUPPORTED +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* DEPRECATED */ +PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structrp png_ptr, + int heuristic_method, int num_weights, png_const_doublep filter_weights, + png_const_doublep filter_costs)) +PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed, + (png_structrp png_ptr, int heuristic_method, int num_weights, + png_const_fixed_point_p filter_weights, + png_const_fixed_point_p filter_costs)) +#endif /* WRITE_WEIGHTED_FILTER */ + +/* The following are no longer used and will be removed from libpng-1.7: */ +#define PNG_FILTER_HEURISTIC_DEFAULT 0 /* Currently "UNWEIGHTED" */ +#define PNG_FILTER_HEURISTIC_UNWEIGHTED 1 /* Used by libpng < 0.95 */ +#define PNG_FILTER_HEURISTIC_WEIGHTED 2 /* Experimental feature */ +#define PNG_FILTER_HEURISTIC_LAST 3 /* Not a valid value */ + +/* Set the library compression level. Currently, valid values range from + * 0 - 9, corresponding directly to the zlib compression levels 0 - 9 + * (0 - no compression, 9 - "maximal" compression). Note that tests have + * shown that zlib compression levels 3-6 usually perform as well as level 9 + * for PNG images, and do considerably fewer calculations. In the future, + * these values may not correspond directly to the zlib compression levels. + */ +#ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED +PNG_EXPORT(69, void, png_set_compression_level, (png_structrp png_ptr, + int level)); + +PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structrp png_ptr, + int mem_level)); + +PNG_EXPORT(71, void, png_set_compression_strategy, (png_structrp png_ptr, + int strategy)); + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structrp png_ptr, + int window_bits)); + +PNG_EXPORT(73, void, png_set_compression_method, (png_structrp png_ptr, + int method)); +#endif /* WRITE_CUSTOMIZE_COMPRESSION */ + +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +/* Also set zlib parameters for compressing non-IDAT chunks */ +PNG_EXPORT(222, void, png_set_text_compression_level, (png_structrp png_ptr, + int level)); + +PNG_EXPORT(223, void, png_set_text_compression_mem_level, (png_structrp png_ptr, + int mem_level)); + +PNG_EXPORT(224, void, png_set_text_compression_strategy, (png_structrp png_ptr, + int strategy)); + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +PNG_EXPORT(225, void, png_set_text_compression_window_bits, + (png_structrp png_ptr, int window_bits)); + +PNG_EXPORT(226, void, png_set_text_compression_method, (png_structrp png_ptr, + int method)); +#endif /* WRITE_CUSTOMIZE_ZTXT_COMPRESSION */ +#endif /* WRITE */ + +/* These next functions are called for input/output, memory, and error + * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c, + * and call standard C I/O routines such as fread(), fwrite(), and + * fprintf(). These functions can be made to use other I/O routines + * at run time for those applications that need to handle I/O in a + * different manner by calling png_set_???_fn(). See libpng-manual.txt for + * more information. + */ + +#ifdef PNG_STDIO_SUPPORTED +/* Initialize the input/output for the PNG file to the default functions. */ +PNG_EXPORT(74, void, png_init_io, (png_structrp png_ptr, FILE *fp)); +#endif + +/* Replace the (error and abort), and warning functions with user + * supplied functions. If no messages are to be printed you must still + * write and use replacement functions. The replacement error_fn should + * still do a longjmp to the last setjmp location if you are using this + * method of error handling. If error_fn or warning_fn is NULL, the + * default function will be used. + */ + +PNG_EXPORT(75, void, png_set_error_fn, (png_structrp png_ptr, + png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn)); + +/* Return the user pointer associated with the error functions */ +PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structrp png_ptr)); + +/* Replace the default data output functions with a user supplied one(s). + * If buffered output is not used, then output_flush_fn can be set to NULL. + * If PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile time + * output_flush_fn will be ignored (and thus can be NULL). + * It is probably a mistake to use NULL for output_flush_fn if + * write_data_fn is not also NULL unless you have built libpng with + * PNG_WRITE_FLUSH_SUPPORTED undefined, because in this case libpng's + * default flush function, which uses the standard *FILE structure, will + * be used. + */ +PNG_EXPORT(77, void, png_set_write_fn, (png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)); + +/* Replace the default data input function with a user supplied one. */ +PNG_EXPORT(78, void, png_set_read_fn, (png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr read_data_fn)); + +/* Return the user pointer associated with the I/O functions */ +PNG_EXPORT(79, png_voidp, png_get_io_ptr, (png_const_structrp png_ptr)); + +PNG_EXPORT(80, void, png_set_read_status_fn, (png_structrp png_ptr, + png_read_status_ptr read_row_fn)); + +PNG_EXPORT(81, void, png_set_write_status_fn, (png_structrp png_ptr, + png_write_status_ptr write_row_fn)); + +#ifdef PNG_USER_MEM_SUPPORTED +/* Replace the default memory allocation functions with user supplied one(s). */ +PNG_EXPORT(82, void, png_set_mem_fn, (png_structrp png_ptr, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn)); +/* Return the user pointer associated with the memory functions */ +PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED +PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structrp png_ptr, + png_user_transform_ptr read_user_transform_fn)); +#endif + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED +PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structrp png_ptr, + png_user_transform_ptr write_user_transform_fn)); +#endif + +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +PNG_EXPORT(86, void, png_set_user_transform_info, (png_structrp png_ptr, + png_voidp user_transform_ptr, int user_transform_depth, + int user_transform_channels)); +/* Return the user pointer associated with the user transform functions */ +PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr, + (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED +/* Return information about the row currently being processed. Note that these + * APIs do not fail but will return unexpected results if called outside a user + * transform callback. Also note that when transforming an interlaced image the + * row number is the row number within the sub-image of the interlace pass, so + * the value will increase to the height of the sub-image (not the full image) + * then reset to 0 for the next pass. + * + * Use PNG_ROW_FROM_PASS_ROW(row, pass) and PNG_COL_FROM_PASS_COL(col, pass) to + * find the output pixel (x,y) given an interlaced sub-image pixel + * (row,col,pass). (See below for these macros.) + */ +PNG_EXPORT(217, png_uint_32, png_get_current_row_number, (png_const_structrp)); +PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structrp)); +#endif + +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED +/* This callback is called only for *unknown* chunks. If + * PNG_HANDLE_AS_UNKNOWN_SUPPORTED is set then it is possible to set known + * chunks to be treated as unknown, however in this case the callback must do + * any processing required by the chunk (e.g. by calling the appropriate + * png_set_ APIs.) + * + * There is no write support - on write, by default, all the chunks in the + * 'unknown' list are written in the specified position. + * + * The integer return from the callback function is interpreted thus: + * + * negative: An error occurred; png_chunk_error will be called. + * zero: The chunk was not handled, the chunk will be saved. A critical + * chunk will cause an error at this point unless it is to be saved. + * positive: The chunk was handled, libpng will ignore/discard it. + * + * See "INTERACTION WITH USER CHUNK CALLBACKS" below for important notes about + * how this behavior will change in libpng 1.7 + */ +PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structrp png_ptr, + png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn)); +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structrp png_ptr)); +#endif + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +/* Sets the function callbacks for the push reader, and a pointer to a + * user-defined structure available to the callback functions. + */ +PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structrp png_ptr, + png_voidp progressive_ptr, png_progressive_info_ptr info_fn, + png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn)); + +/* Returns the user pointer associated with the push read functions */ +PNG_EXPORT(91, png_voidp, png_get_progressive_ptr, + (png_const_structrp png_ptr)); + +/* Function to be called when data becomes available */ +PNG_EXPORT(92, void, png_process_data, (png_structrp png_ptr, + png_inforp info_ptr, png_bytep buffer, size_t buffer_size)); + +/* A function which may be called *only* within png_process_data to stop the + * processing of any more data. The function returns the number of bytes + * remaining, excluding any that libpng has cached internally. A subsequent + * call to png_process_data must supply these bytes again. If the argument + * 'save' is set to true the routine will first save all the pending data and + * will always return 0. + */ +PNG_EXPORT(219, size_t, png_process_data_pause, (png_structrp, int save)); + +/* A function which may be called *only* outside (after) a call to + * png_process_data. It returns the number of bytes of data to skip in the + * input. Normally it will return 0, but if it returns a non-zero value the + * application must skip than number of bytes of input data and pass the + * following data to the next call to png_process_data. + */ +PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structrp)); + +/* Function that combines rows. 'new_row' is a flag that should come from + * the callback and be non-NULL if anything needs to be done; the library + * stores its own version of the new data internally and ignores the passed + * in value. + */ +PNG_EXPORT(93, void, png_progressive_combine_row, (png_const_structrp png_ptr, + png_bytep old_row, png_const_bytep new_row)); +#endif /* PROGRESSIVE_READ */ + +PNG_EXPORTA(94, png_voidp, png_malloc, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); +/* Added at libpng version 1.4.0 */ +PNG_EXPORTA(95, png_voidp, png_calloc, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); + +/* Added at libpng version 1.2.4 */ +PNG_EXPORTA(96, png_voidp, png_malloc_warn, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED); + +/* Frees a pointer allocated by png_malloc() */ +PNG_EXPORT(97, void, png_free, (png_const_structrp png_ptr, png_voidp ptr)); + +/* Free data that was allocated internally */ +PNG_EXPORT(98, void, png_free_data, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 free_me, int num)); + +/* Reassign the responsibility for freeing existing data, whether allocated + * by libpng or by the application; this works on the png_info structure passed + * in, without changing the state for other png_info structures. + */ +PNG_EXPORT(99, void, png_data_freer, (png_const_structrp png_ptr, + png_inforp info_ptr, int freer, png_uint_32 mask)); + +/* Assignments for png_data_freer */ +#define PNG_DESTROY_WILL_FREE_DATA 1 +#define PNG_SET_WILL_FREE_DATA 1 +#define PNG_USER_WILL_FREE_DATA 2 +/* Flags for png_ptr->free_me and info_ptr->free_me */ +#define PNG_FREE_HIST 0x0008U +#define PNG_FREE_ICCP 0x0010U +#define PNG_FREE_SPLT 0x0020U +#define PNG_FREE_ROWS 0x0040U +#define PNG_FREE_PCAL 0x0080U +#define PNG_FREE_SCAL 0x0100U +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +# define PNG_FREE_UNKN 0x0200U +#endif +/* PNG_FREE_LIST 0x0400U removed in 1.6.0 because it is ignored */ +#define PNG_FREE_PLTE 0x1000U +#define PNG_FREE_TRNS 0x2000U +#define PNG_FREE_TEXT 0x4000U +#define PNG_FREE_EXIF 0x8000U /* Added at libpng-1.6.31 */ +#define PNG_FREE_ALL 0xffffU +#define PNG_FREE_MUL 0x4220U /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */ + +#ifdef PNG_USER_MEM_SUPPORTED +PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_const_structrp png_ptr, + png_alloc_size_t size), PNG_ALLOCATED PNG_DEPRECATED); +PNG_EXPORTA(101, void, png_free_default, (png_const_structrp png_ptr, + png_voidp ptr), PNG_DEPRECATED); +#endif + +#ifdef PNG_ERROR_TEXT_SUPPORTED +/* Fatal error in PNG image of libpng - can't continue */ +PNG_EXPORTA(102, void, png_error, (png_const_structrp png_ptr, + png_const_charp error_message), PNG_NORETURN); + +/* The same, but the chunk name is prepended to the error string. */ +PNG_EXPORTA(103, void, png_chunk_error, (png_const_structrp png_ptr, + png_const_charp error_message), PNG_NORETURN); + +#else +/* Fatal error in PNG image of libpng - can't continue */ +PNG_EXPORTA(104, void, png_err, (png_const_structrp png_ptr), PNG_NORETURN); +# define png_error(s1,s2) png_err(s1) +# define png_chunk_error(s1,s2) png_err(s1) +#endif + +#ifdef PNG_WARNINGS_SUPPORTED +/* Non-fatal error in libpng. Can continue, but may have a problem. */ +PNG_EXPORT(105, void, png_warning, (png_const_structrp png_ptr, + png_const_charp warning_message)); + +/* Non-fatal error in libpng, chunk name is prepended to message. */ +PNG_EXPORT(106, void, png_chunk_warning, (png_const_structrp png_ptr, + png_const_charp warning_message)); +#else +# define png_warning(s1,s2) ((void)(s1)) +# define png_chunk_warning(s1,s2) ((void)(s1)) +#endif + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +/* Benign error in libpng. Can continue, but may have a problem. + * User can choose whether to handle as a fatal error or as a warning. */ +PNG_EXPORT(107, void, png_benign_error, (png_const_structrp png_ptr, + png_const_charp warning_message)); + +#ifdef PNG_READ_SUPPORTED +/* Same, chunk name is prepended to message (only during read) */ +PNG_EXPORT(108, void, png_chunk_benign_error, (png_const_structrp png_ptr, + png_const_charp warning_message)); +#endif + +PNG_EXPORT(109, void, png_set_benign_errors, + (png_structrp png_ptr, int allowed)); +#else +# ifdef PNG_ALLOW_BENIGN_ERRORS +# define png_benign_error png_warning +# define png_chunk_benign_error png_chunk_warning +# else +# define png_benign_error png_error +# define png_chunk_benign_error png_chunk_error +# endif +#endif + +/* The png_set_ functions are for storing values in the png_info_struct. + * Similarly, the png_get_ calls are used to read values from the + * png_info_struct, either storing the parameters in the passed variables, or + * setting pointers into the png_info_struct where the data is stored. The + * png_get_ functions return a non-zero value if the data was available + * in info_ptr, or return zero and do not change any of the parameters if the + * data was not available. + * + * These functions should be used instead of directly accessing png_info + * to avoid problems with future changes in the size and internal layout of + * png_info_struct. + */ +/* Returns "flag" if chunk data is valid in info_ptr. */ +PNG_EXPORT(110, png_uint_32, png_get_valid, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 flag)); + +/* Returns number of bytes needed to hold a transformed row. */ +PNG_EXPORT(111, size_t, png_get_rowbytes, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +#ifdef PNG_INFO_IMAGE_SUPPORTED +/* Returns row_pointers, which is an array of pointers to scanlines that was + * returned from png_read_png(). + */ +PNG_EXPORT(112, png_bytepp, png_get_rows, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Set row_pointers, which is an array of pointers to scanlines for use + * by png_write_png(). + */ +PNG_EXPORT(113, void, png_set_rows, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytepp row_pointers)); +#endif + +/* Returns number of color channels in image. */ +PNG_EXPORT(114, png_byte, png_get_channels, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +#ifdef PNG_EASY_ACCESS_SUPPORTED +/* Returns image width in pixels. */ +PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image height in pixels. */ +PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image bit_depth. */ +PNG_EXPORT(117, png_byte, png_get_bit_depth, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image color_type. */ +PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image filter_type. */ +PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image interlace_type. */ +PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image compression_type. */ +PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); + +/* Returns image resolution in pixels per meter, from pHYs chunk data. */ +PNG_EXPORT(122, png_uint_32, png_get_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(123, png_uint_32, png_get_x_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +/* Returns pixel aspect ratio, computed from pHYs chunk data. */ +PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) + +/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */ +PNG_EXPORT(126, png_int_32, png_get_x_offset_pixels, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(127, png_int_32, png_get_y_offset_pixels, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(128, png_int_32, png_get_x_offset_microns, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); +PNG_EXPORT(129, png_int_32, png_get_y_offset_microns, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +#endif /* EASY_ACCESS */ + +#ifdef PNG_READ_SUPPORTED +/* Returns pointer to signature string read from PNG header */ +PNG_EXPORT(130, png_const_bytep, png_get_signature, (png_const_structrp png_ptr, + png_const_inforp info_ptr)); +#endif + +#ifdef PNG_bKGD_SUPPORTED +PNG_EXPORT(131, png_uint_32, png_get_bKGD, (png_const_structrp png_ptr, + png_inforp info_ptr, png_color_16p *background)); +#endif + +#ifdef PNG_bKGD_SUPPORTED +PNG_EXPORT(132, void, png_set_bKGD, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_color_16p background)); +#endif + +#ifdef PNG_cHRM_SUPPORTED +PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *white_x, double *white_y, double *red_x, + double *red_y, double *green_x, double *green_y, double *blue_x, + double *blue_y)) +PNG_FP_EXPORT(230, png_uint_32, png_get_cHRM_XYZ, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *red_X, double *red_Y, double *red_Z, + double *green_X, double *green_Y, double *green_Z, double *blue_X, + double *blue_Y, double *blue_Z)) +PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_white_x, png_fixed_point *int_white_y, + png_fixed_point *int_red_x, png_fixed_point *int_red_y, + png_fixed_point *int_green_x, png_fixed_point *int_green_y, + png_fixed_point *int_blue_x, png_fixed_point *int_blue_y)) +PNG_FIXED_EXPORT(231, png_uint_32, png_get_cHRM_XYZ_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_red_X, png_fixed_point *int_red_Y, + png_fixed_point *int_red_Z, png_fixed_point *int_green_X, + png_fixed_point *int_green_Y, png_fixed_point *int_green_Z, + png_fixed_point *int_blue_X, png_fixed_point *int_blue_Y, + png_fixed_point *int_blue_Z)) +#endif + +#ifdef PNG_cHRM_SUPPORTED +PNG_FP_EXPORT(135, void, png_set_cHRM, (png_const_structrp png_ptr, + png_inforp info_ptr, + double white_x, double white_y, double red_x, double red_y, double green_x, + double green_y, double blue_x, double blue_y)) +PNG_FP_EXPORT(232, void, png_set_cHRM_XYZ, (png_const_structrp png_ptr, + png_inforp info_ptr, double red_X, double red_Y, double red_Z, + double green_X, double green_Y, double green_Z, double blue_X, + double blue_Y, double blue_Z)) +PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_white_x, + png_fixed_point int_white_y, png_fixed_point int_red_x, + png_fixed_point int_red_y, png_fixed_point int_green_x, + png_fixed_point int_green_y, png_fixed_point int_blue_x, + png_fixed_point int_blue_y)) +PNG_FIXED_EXPORT(233, void, png_set_cHRM_XYZ_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_red_X, png_fixed_point int_red_Y, + png_fixed_point int_red_Z, png_fixed_point int_green_X, + png_fixed_point int_green_Y, png_fixed_point int_green_Z, + png_fixed_point int_blue_X, png_fixed_point int_blue_Y, + png_fixed_point int_blue_Z)) +#endif + +#ifdef PNG_cICP_SUPPORTED +PNG_EXPORT(250, png_uint_32, png_get_cICP, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_bytep colour_primaries, + png_bytep transfer_function, png_bytep matrix_coefficients, + png_bytep video_full_range_flag)); +#endif + +#ifdef PNG_cICP_SUPPORTED +PNG_EXPORT(251, void, png_set_cICP, (png_const_structrp png_ptr, + png_inforp info_ptr, png_byte colour_primaries, + png_byte transfer_function, png_byte matrix_coefficients, + png_byte video_full_range_flag)); +#endif + +#ifdef PNG_cLLI_SUPPORTED +PNG_FP_EXPORT(252, png_uint_32, png_get_cLLI, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *maximum_content_light_level, + double *maximum_frame_average_light_level)) +PNG_FIXED_EXPORT(253, png_uint_32, png_get_cLLI_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + /* The values below are in cd/m2 (nits) and are scaled by 10,000; not + * 100,000 as in the case of png_fixed_point. + */ + png_uint_32p maximum_content_light_level_scaled_by_10000, + png_uint_32p maximum_frame_average_light_level_scaled_by_10000)) +#endif + +#ifdef PNG_cLLI_SUPPORTED +PNG_FP_EXPORT(254, void, png_set_cLLI, (png_const_structrp png_ptr, + png_inforp info_ptr, double maximum_content_light_level, + double maximum_frame_average_light_level)) +PNG_FIXED_EXPORT(255, void, png_set_cLLI_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, + /* The values below are in cd/m2 (nits) and are scaled by 10,000; not + * 100,000 as in the case of png_fixed_point. + */ + png_uint_32 maximum_content_light_level_scaled_by_10000, + png_uint_32 maximum_frame_average_light_level_scaled_by_10000)) +#endif + +#ifdef PNG_eXIf_SUPPORTED +PNG_EXPORT(246, png_uint_32, png_get_eXIf, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytep *exif)); +PNG_EXPORT(247, void, png_set_eXIf, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytep exif)); + +PNG_EXPORT(248, png_uint_32, png_get_eXIf_1, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *num_exif, png_bytep *exif)); +PNG_EXPORT(249, void, png_set_eXIf_1, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 num_exif, png_bytep exif)); +#endif + +#ifdef PNG_gAMA_SUPPORTED +PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA, (png_const_structrp png_ptr, + png_const_inforp info_ptr, double *file_gamma)) +PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_file_gamma)) +#endif + +#ifdef PNG_gAMA_SUPPORTED +PNG_FP_EXPORT(139, void, png_set_gAMA, (png_const_structrp png_ptr, + png_inforp info_ptr, double file_gamma)) +PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, png_fixed_point int_file_gamma)) +#endif + +#ifdef PNG_hIST_SUPPORTED +PNG_EXPORT(141, png_uint_32, png_get_hIST, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_16p *hist)); +PNG_EXPORT(142, void, png_set_hIST, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_uint_16p hist)); +#endif + +PNG_EXPORT(143, png_uint_32, png_get_IHDR, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *width, png_uint_32 *height, + int *bit_depth, int *color_type, int *interlace_method, + int *compression_method, int *filter_method)); + +PNG_EXPORT(144, void, png_set_IHDR, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_method, int compression_method, + int filter_method)); + +#ifdef PNG_mDCV_SUPPORTED +PNG_FP_EXPORT(256, png_uint_32, png_get_mDCV, (png_const_structrp png_ptr, + png_const_inforp info_ptr, + /* The chromaticities of the mastering display. As cHRM, but independent of + * the encoding endpoints in cHRM, or cICP, or iCCP. These values will + * always be in the range 0 to 1.3107. + */ + double *white_x, double *white_y, double *red_x, double *red_y, + double *green_x, double *green_y, double *blue_x, double *blue_y, + /* Mastering display luminance in cd/m2 (nits). */ + double *mastering_display_maximum_luminance, + double *mastering_display_minimum_luminance)) + +PNG_FIXED_EXPORT(257, png_uint_32, png_get_mDCV_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_white_x, png_fixed_point *int_white_y, + png_fixed_point *int_red_x, png_fixed_point *int_red_y, + png_fixed_point *int_green_x, png_fixed_point *int_green_y, + png_fixed_point *int_blue_x, png_fixed_point *int_blue_y, + /* Mastering display luminance in cd/m2 (nits) multiplied (scaled) by + * 10,000. + */ + png_uint_32p mastering_display_maximum_luminance_scaled_by_10000, + png_uint_32p mastering_display_minimum_luminance_scaled_by_10000)) +#endif + +#ifdef PNG_mDCV_SUPPORTED +PNG_FP_EXPORT(258, void, png_set_mDCV, (png_const_structrp png_ptr, + png_inforp info_ptr, + /* The chromaticities of the mastering display. As cHRM, but independent of + * the encoding endpoints in cHRM, or cICP, or iCCP. + */ + double white_x, double white_y, double red_x, double red_y, double green_x, + double green_y, double blue_x, double blue_y, + /* Mastering display luminance in cd/m2 (nits). */ + double mastering_display_maximum_luminance, + double mastering_display_minimum_luminance)) + +PNG_FIXED_EXPORT(259, void, png_set_mDCV_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, + /* The admissible range of these values is not the full range of a PNG + * fixed point value. Negative values cannot be encoded and the maximum + * value is about 1.3 */ + png_fixed_point int_white_x, png_fixed_point int_white_y, + png_fixed_point int_red_x, png_fixed_point int_red_y, + png_fixed_point int_green_x, png_fixed_point int_green_y, + png_fixed_point int_blue_x, png_fixed_point int_blue_y, + /* These are PNG unsigned 4 byte values: 31-bit unsigned values. The MSB + * must be zero. + */ + png_uint_32 mastering_display_maximum_luminance_scaled_by_10000, + png_uint_32 mastering_display_minimum_luminance_scaled_by_10000)) +#endif + +#ifdef PNG_oFFs_SUPPORTED +PNG_EXPORT(145, png_uint_32, png_get_oFFs, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_int_32 *offset_x, png_int_32 *offset_y, + int *unit_type)); +#endif + +#ifdef PNG_oFFs_SUPPORTED +PNG_EXPORT(146, void, png_set_oFFs, (png_const_structrp png_ptr, + png_inforp info_ptr, png_int_32 offset_x, png_int_32 offset_y, + int unit_type)); +#endif + +#ifdef PNG_pCAL_SUPPORTED +PNG_EXPORT(147, png_uint_32, png_get_pCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, png_charp *purpose, png_int_32 *X0, + png_int_32 *X1, int *type, int *nparams, png_charp *units, + png_charpp *params)); +#endif + +#ifdef PNG_pCAL_SUPPORTED +PNG_EXPORT(148, void, png_set_pCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_charp purpose, png_int_32 X0, png_int_32 X1, + int type, int nparams, png_const_charp units, png_charpp params)); +#endif + +#ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(149, png_uint_32, png_get_pHYs, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, + int *unit_type)); +#endif + +#ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(150, void, png_set_pHYs, (png_const_structrp png_ptr, + png_inforp info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type)); +#endif + +PNG_EXPORT(151, png_uint_32, png_get_PLTE, (png_const_structrp png_ptr, + png_inforp info_ptr, png_colorp *palette, int *num_palette)); + +PNG_EXPORT(152, void, png_set_PLTE, (png_structrp png_ptr, + png_inforp info_ptr, png_const_colorp palette, int num_palette)); + +#ifdef PNG_sBIT_SUPPORTED +PNG_EXPORT(153, png_uint_32, png_get_sBIT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_color_8p *sig_bit)); +#endif + +#ifdef PNG_sBIT_SUPPORTED +PNG_EXPORT(154, void, png_set_sBIT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_color_8p sig_bit)); +#endif + +#ifdef PNG_sRGB_SUPPORTED +PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structrp png_ptr, + png_const_inforp info_ptr, int *file_srgb_intent)); +#endif + +#ifdef PNG_sRGB_SUPPORTED +PNG_EXPORT(156, void, png_set_sRGB, (png_const_structrp png_ptr, + png_inforp info_ptr, int srgb_intent)); +PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_const_structrp png_ptr, + png_inforp info_ptr, int srgb_intent)); +#endif + +#ifdef PNG_iCCP_SUPPORTED +PNG_EXPORT(158, png_uint_32, png_get_iCCP, (png_const_structrp png_ptr, + png_inforp info_ptr, png_charpp name, int *compression_type, + png_bytepp profile, png_uint_32 *proflen)); +#endif + +#ifdef PNG_iCCP_SUPPORTED +PNG_EXPORT(159, void, png_set_iCCP, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_charp name, int compression_type, + png_const_bytep profile, png_uint_32 proflen)); +#endif + +#ifdef PNG_sPLT_SUPPORTED +PNG_EXPORT(160, int, png_get_sPLT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_sPLT_tpp entries)); +#endif + +#ifdef PNG_sPLT_SUPPORTED +PNG_EXPORT(161, void, png_set_sPLT, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_sPLT_tp entries, int nentries)); +#endif + +#ifdef PNG_TEXT_SUPPORTED +/* png_get_text also returns the number of text chunks in *num_text */ +PNG_EXPORT(162, int, png_get_text, (png_const_structrp png_ptr, + png_inforp info_ptr, png_textp *text_ptr, int *num_text)); +#endif + +/* Note while png_set_text() will accept a structure whose text, + * language, and translated keywords are NULL pointers, the structure + * returned by png_get_text will always contain regular + * zero-terminated C strings. They might be empty strings but + * they will never be NULL pointers. + */ + +#ifdef PNG_TEXT_SUPPORTED +PNG_EXPORT(163, void, png_set_text, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_textp text_ptr, int num_text)); +#endif + +#ifdef PNG_tIME_SUPPORTED +PNG_EXPORT(164, png_uint_32, png_get_tIME, (png_const_structrp png_ptr, + png_inforp info_ptr, png_timep *mod_time)); +#endif + +#ifdef PNG_tIME_SUPPORTED +PNG_EXPORT(165, void, png_set_tIME, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_timep mod_time)); +#endif + +#ifdef PNG_tRNS_SUPPORTED +PNG_EXPORT(166, png_uint_32, png_get_tRNS, (png_const_structrp png_ptr, + png_inforp info_ptr, png_bytep *trans_alpha, int *num_trans, + png_color_16p *trans_color)); +#endif + +#ifdef PNG_tRNS_SUPPORTED +PNG_EXPORT(167, void, png_set_tRNS, (png_structrp png_ptr, + png_inforp info_ptr, png_const_bytep trans_alpha, int num_trans, + png_const_color_16p trans_color)); +#endif + +#ifdef PNG_sCAL_SUPPORTED +PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL, (png_const_structrp png_ptr, + png_const_inforp info_ptr, int *unit, double *width, double *height)) +#if defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) || \ + defined(PNG_FLOATING_POINT_SUPPORTED) +/* NOTE: this API is currently implemented using floating point arithmetic, + * consequently it can only be used on systems with floating point support. + * In any case the range of values supported by png_fixed_point is small and it + * is highly recommended that png_get_sCAL_s be used instead. + */ +PNG_FIXED_EXPORT(214, png_uint_32, png_get_sCAL_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit, + png_fixed_point *width, png_fixed_point *height)) +#endif +PNG_EXPORT(169, png_uint_32, png_get_sCAL_s, + (png_const_structrp png_ptr, png_const_inforp info_ptr, int *unit, + png_charpp swidth, png_charpp sheight)); + +PNG_FP_EXPORT(170, void, png_set_sCAL, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, double width, double height)) +PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, png_fixed_point width, + png_fixed_point height)) +PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr, + png_inforp info_ptr, int unit, + png_const_charp swidth, png_const_charp sheight)); +#endif /* sCAL */ + +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED +/* Provide the default handling for all unknown chunks or, optionally, for + * specific unknown chunks. + * + * NOTE: prior to 1.6.0 the handling specified for particular chunks on read was + * ignored and the default was used, the per-chunk setting only had an effect on + * write. If you wish to have chunk-specific handling on read in code that must + * work on earlier versions you must use a user chunk callback to specify the + * desired handling (keep or discard.) + * + * The 'keep' parameter is a PNG_HANDLE_CHUNK_ value as listed below. The + * parameter is interpreted as follows: + * + * READ: + * PNG_HANDLE_CHUNK_AS_DEFAULT: + * Known chunks: do normal libpng processing, do not keep the chunk (but + * see the comments below about PNG_HANDLE_AS_UNKNOWN_SUPPORTED) + * Unknown chunks: for a specific chunk use the global default, when used + * as the default discard the chunk data. + * PNG_HANDLE_CHUNK_NEVER: + * Discard the chunk data. + * PNG_HANDLE_CHUNK_IF_SAFE: + * Keep the chunk data if the chunk is not critical else raise a chunk + * error. + * PNG_HANDLE_CHUNK_ALWAYS: + * Keep the chunk data. + * + * If the chunk data is saved it can be retrieved using png_get_unknown_chunks, + * below. Notice that specifying "AS_DEFAULT" as a global default is equivalent + * to specifying "NEVER", however when "AS_DEFAULT" is used for specific chunks + * it simply resets the behavior to the libpng default. + * + * INTERACTION WITH USER CHUNK CALLBACKS: + * The per-chunk handling is always used when there is a png_user_chunk_ptr + * callback and the callback returns 0; the chunk is then always stored *unless* + * it is critical and the per-chunk setting is other than ALWAYS. Notice that + * the global default is *not* used in this case. (In effect the per-chunk + * value is incremented to at least IF_SAFE.) + * + * IMPORTANT NOTE: this behavior will change in libpng 1.7 - the global and + * per-chunk defaults will be honored. If you want to preserve the current + * behavior when your callback returns 0 you must set PNG_HANDLE_CHUNK_IF_SAFE + * as the default - if you don't do this libpng 1.6 will issue a warning. + * + * If you want unhandled unknown chunks to be discarded in libpng 1.6 and + * earlier simply return '1' (handled). + * + * PNG_HANDLE_AS_UNKNOWN_SUPPORTED: + * If this is *not* set known chunks will always be handled by libpng and + * will never be stored in the unknown chunk list. Known chunks listed to + * png_set_keep_unknown_chunks will have no effect. If it is set then known + * chunks listed with a keep other than AS_DEFAULT will *never* be processed + * by libpng, in addition critical chunks must either be processed by the + * callback or saved. + * + * The IHDR and IEND chunks must not be listed. Because this turns off the + * default handling for chunks that would otherwise be recognized the + * behavior of libpng transformations may well become incorrect! + * + * WRITE: + * When writing chunks the options only apply to the chunks specified by + * png_set_unknown_chunks (below), libpng will *always* write known chunks + * required by png_set_ calls and will always write the core critical chunks + * (as required for PLTE). + * + * Each chunk in the png_set_unknown_chunks list is looked up in the + * png_set_keep_unknown_chunks list to find the keep setting, this is then + * interpreted as follows: + * + * PNG_HANDLE_CHUNK_AS_DEFAULT: + * Write safe-to-copy chunks and write other chunks if the global + * default is set to _ALWAYS, otherwise don't write this chunk. + * PNG_HANDLE_CHUNK_NEVER: + * Do not write the chunk. + * PNG_HANDLE_CHUNK_IF_SAFE: + * Write the chunk if it is safe-to-copy, otherwise do not write it. + * PNG_HANDLE_CHUNK_ALWAYS: + * Write the chunk. + * + * Note that the default behavior is effectively the opposite of the read case - + * in read unknown chunks are not stored by default, in write they are written + * by default. Also the behavior of PNG_HANDLE_CHUNK_IF_SAFE is very different + * - on write the safe-to-copy bit is checked, on read the critical bit is + * checked and on read if the chunk is critical an error will be raised. + * + * num_chunks: + * =========== + * If num_chunks is positive, then the "keep" parameter specifies the manner + * for handling only those chunks appearing in the chunk_list array, + * otherwise the chunk list array is ignored. + * + * If num_chunks is 0 the "keep" parameter specifies the default behavior for + * unknown chunks, as described above. + * + * If num_chunks is negative, then the "keep" parameter specifies the manner + * for handling all unknown chunks plus all chunks recognized by libpng + * except for the IHDR, PLTE, tRNS, IDAT, and IEND chunks (which continue to + * be processed by libpng. + */ +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +PNG_EXPORT(172, void, png_set_keep_unknown_chunks, (png_structrp png_ptr, + int keep, png_const_bytep chunk_list, int num_chunks)); +#endif /* HANDLE_AS_UNKNOWN */ + +/* The "keep" PNG_HANDLE_CHUNK_ parameter for the specified chunk is returned; + * the result is therefore true (non-zero) if special handling is required, + * false for the default handling. + */ +PNG_EXPORT(173, int, png_handle_as_unknown, (png_const_structrp png_ptr, + png_const_bytep chunk_name)); +#endif /* SET_UNKNOWN_CHUNKS */ + +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +PNG_EXPORT(174, void, png_set_unknown_chunks, (png_const_structrp png_ptr, + png_inforp info_ptr, png_const_unknown_chunkp unknowns, + int num_unknowns)); + /* NOTE: prior to 1.6.0 this routine set the 'location' field of the added + * unknowns to the location currently stored in the png_struct. This is + * invariably the wrong value on write. To fix this call the following API + * for each chunk in the list with the correct location. If you know your + * code won't be compiled on earlier versions you can rely on + * png_set_unknown_chunks(write-ptr, png_get_unknown_chunks(read-ptr)) doing + * the correct thing. + */ + +PNG_EXPORT(175, void, png_set_unknown_chunk_location, + (png_const_structrp png_ptr, png_inforp info_ptr, int chunk, int location)); + +PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structrp png_ptr, + png_inforp info_ptr, png_unknown_chunkpp entries)); +#endif + +/* Png_free_data() will turn off the "valid" flag for anything it frees. + * If you need to turn it off for a chunk that your application has freed, + * you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK); + */ +PNG_EXPORT(177, void, png_set_invalid, (png_const_structrp png_ptr, + png_inforp info_ptr, int mask)); + +#ifdef PNG_INFO_IMAGE_SUPPORTED +/* The "params" pointer is currently not used and is for future expansion. */ +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +PNG_EXPORT(178, void, png_read_png, (png_structrp png_ptr, png_inforp info_ptr, + int transforms, png_voidp params)); +#endif +#ifdef PNG_WRITE_SUPPORTED +PNG_EXPORT(179, void, png_write_png, (png_structrp png_ptr, png_inforp info_ptr, + int transforms, png_voidp params)); +#endif +#endif + +PNG_EXPORT(180, png_const_charp, png_get_copyright, + (png_const_structrp png_ptr)); +PNG_EXPORT(181, png_const_charp, png_get_header_ver, + (png_const_structrp png_ptr)); +PNG_EXPORT(182, png_const_charp, png_get_header_version, + (png_const_structrp png_ptr)); +PNG_EXPORT(183, png_const_charp, png_get_libpng_ver, + (png_const_structrp png_ptr)); + +#ifdef PNG_MNG_FEATURES_SUPPORTED +PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structrp png_ptr, + png_uint_32 mng_features_permitted)); +#endif + +/* For use in png_set_keep_unknown, added to version 1.2.6 */ +#define PNG_HANDLE_CHUNK_AS_DEFAULT 0 +#define PNG_HANDLE_CHUNK_NEVER 1 +#define PNG_HANDLE_CHUNK_IF_SAFE 2 +#define PNG_HANDLE_CHUNK_ALWAYS 3 +#define PNG_HANDLE_CHUNK_LAST 4 + +/* Strip the prepended error numbers ("#nnn ") from error and warning + * messages before passing them to the error or warning handler. + */ +#ifdef PNG_ERROR_NUMBERS_SUPPORTED +PNG_EXPORT(185, void, png_set_strip_error_numbers, (png_structrp png_ptr, + png_uint_32 strip_mode)); +#endif + +/* Added in libpng-1.2.6 */ +#ifdef PNG_SET_USER_LIMITS_SUPPORTED +PNG_EXPORT(186, void, png_set_user_limits, (png_structrp png_ptr, + png_uint_32 user_width_max, png_uint_32 user_height_max)); +PNG_EXPORT(187, png_uint_32, png_get_user_width_max, + (png_const_structrp png_ptr)); +PNG_EXPORT(188, png_uint_32, png_get_user_height_max, + (png_const_structrp png_ptr)); +/* Added in libpng-1.4.0 */ +PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structrp png_ptr, + png_uint_32 user_chunk_cache_max)); +PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max, + (png_const_structrp png_ptr)); +/* Added in libpng-1.4.1 */ +PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structrp png_ptr, + png_alloc_size_t user_chunk_cache_max)); +PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max, + (png_const_structrp png_ptr)); +#endif + +#if defined(PNG_INCH_CONVERSIONS_SUPPORTED) +PNG_EXPORT(193, png_uint_32, png_get_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_EXPORT(194, png_uint_32, png_get_x_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch, + (png_const_structrp png_ptr, png_const_inforp info_ptr)); + +PNG_FP_EXPORT(196, float, png_get_x_offset_inches, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#endif + +PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structrp png_ptr, + png_const_inforp info_ptr)) +#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */ +PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed, + (png_const_structrp png_ptr, png_const_inforp info_ptr)) +#endif + +# ifdef PNG_pHYs_SUPPORTED +PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structrp png_ptr, + png_const_inforp info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, + int *unit_type)); +# endif /* pHYs */ +#endif /* INCH_CONVERSIONS */ + +/* Added in libpng-1.4.0 */ +#ifdef PNG_IO_STATE_SUPPORTED +PNG_EXPORT(199, png_uint_32, png_get_io_state, (png_const_structrp png_ptr)); + +/* Removed from libpng 1.6; use png_get_io_chunk_type. */ +PNG_REMOVED(200, png_const_bytep, png_get_io_chunk_name, (png_structrp png_ptr), + PNG_DEPRECATED) + +PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type, + (png_const_structrp png_ptr)); + +/* The flags returned by png_get_io_state() are the following: */ +# define PNG_IO_NONE 0x0000 /* no I/O at this moment */ +# define PNG_IO_READING 0x0001 /* currently reading */ +# define PNG_IO_WRITING 0x0002 /* currently writing */ +# define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */ +# define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */ +# define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */ +# define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */ +# define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */ +# define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */ +#endif /* IO_STATE */ + +/* Interlace support. The following macros are always defined so that if + * libpng interlace handling is turned off the macros may be used to handle + * interlaced images within the application. + */ +#define PNG_INTERLACE_ADAM7_PASSES 7 + +/* Two macros to return the first row and first column of the original, + * full, image which appears in a given pass. 'pass' is in the range 0 + * to 6 and the result is in the range 0 to 7. + */ +#define PNG_PASS_START_ROW(pass) (((1&~(pass))<<(3-((pass)>>1)))&7) +#define PNG_PASS_START_COL(pass) (((1& (pass))<<(3-(((pass)+1)>>1)))&7) + +/* A macro to return the offset between pixels in the output row for a pair of + * pixels in the input - effectively the inverse of the 'COL_SHIFT' macro that + * follows. Note that ROW_OFFSET is the offset from one row to the next whereas + * COL_OFFSET is from one column to the next, within a row. + */ +#define PNG_PASS_ROW_OFFSET(pass) ((pass)>2?(8>>(((pass)-1)>>1)):8) +#define PNG_PASS_COL_OFFSET(pass) (1<<((7-(pass))>>1)) + +/* Two macros to help evaluate the number of rows or columns in each + * pass. This is expressed as a shift - effectively log2 of the number or + * rows or columns in each 8x8 tile of the original image. + */ +#define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3) +#define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3) + +/* Hence two macros to determine the number of rows or columns in a given + * pass of an image given its height or width. In fact these macros may + * return non-zero even though the sub-image is empty, because the other + * dimension may be empty for a small image. + */ +#define PNG_PASS_ROWS(height, pass) (((height)+(((1<>PNG_PASS_ROW_SHIFT(pass)) +#define PNG_PASS_COLS(width, pass) (((width)+(((1<>PNG_PASS_COL_SHIFT(pass)) + +/* For the reader row callbacks (both progressive and sequential) it is + * necessary to find the row in the output image given a row in an interlaced + * image, so two more macros: + */ +#define PNG_ROW_FROM_PASS_ROW(y_in, pass) \ + (((y_in)<>(((7-(off))-(pass))<<2)) & 0xF) | \ + ((0x01145AF0>>(((7-(off))-(pass))<<2)) & 0xF0)) + +#define PNG_ROW_IN_INTERLACE_PASS(y, pass) \ + ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1) +#define PNG_COL_IN_INTERLACE_PASS(x, pass) \ + ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1) + +#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED +/* With these routines we avoid an integer divide, which will be slower on + * most machines. However, it does take more operations than the corresponding + * divide method, so it may be slower on a few RISC systems. There are two + * shifts (by 8 or 16 bits) and an addition, versus a single integer divide. + * + * Note that the rounding factors are NOT supposed to be the same! 128 and + * 32768 are correct for the NODIV code; 127 and 32767 are correct for the + * standard method. + * + * [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ] + */ + + /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ + +# define png_composite(composite, fg, alpha, bg) \ + { \ + png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \ + * (png_uint_16)(alpha) \ + + (png_uint_16)(bg)*(png_uint_16)(255 \ + - (png_uint_16)(alpha)) + 128); \ + (composite) = (png_byte)(((temp + (temp >> 8)) >> 8) & 0xff); \ + } + +# define png_composite_16(composite, fg, alpha, bg) \ + { \ + png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \ + * (png_uint_32)(alpha) \ + + (png_uint_32)(bg)*(65535 \ + - (png_uint_32)(alpha)) + 32768); \ + (composite) = (png_uint_16)(0xffff & ((temp + (temp >> 16)) >> 16)); \ + } + +#else /* Standard method using integer division */ + +# define png_composite(composite, fg, alpha, bg) \ + (composite) = \ + (png_byte)(0xff & (((png_uint_16)(fg) * (png_uint_16)(alpha) + \ + (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \ + 127) / 255)) + +# define png_composite_16(composite, fg, alpha, bg) \ + (composite) = \ + (png_uint_16)(0xffff & (((png_uint_32)(fg) * (png_uint_32)(alpha) + \ + (png_uint_32)(bg)*(png_uint_32)(65535 - (png_uint_32)(alpha)) + \ + 32767) / 65535)) +#endif /* READ_COMPOSITE_NODIV */ + +#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf)); +PNG_EXPORT(202, png_uint_16, png_get_uint_16, (png_const_bytep buf)); +PNG_EXPORT(203, png_int_32, png_get_int_32, (png_const_bytep buf)); +#endif + +PNG_EXPORT(204, png_uint_32, png_get_uint_31, (png_const_structrp png_ptr, + png_const_bytep buf)); +/* No png_get_int_16 -- may be added if there's a real need for it. */ + +/* Place a 32-bit number into a buffer in PNG byte order (big-endian). */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(205, void, png_save_uint_32, (png_bytep buf, png_uint_32 i)); +#endif +#ifdef PNG_SAVE_INT_32_SUPPORTED +PNG_EXPORT(206, void, png_save_int_32, (png_bytep buf, png_int_32 i)); +#endif + +/* Place a 16-bit number into a buffer in PNG byte order. + * The parameter is declared unsigned int, not png_uint_16, + * just to avoid potential problems on pre-ANSI C compilers. + */ +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i)); +/* No png_save_int_16 -- may be added if there's a real need for it. */ +#endif + +#ifdef PNG_USE_READ_MACROS +/* Inline macros to do direct reads of bytes from the input buffer. + * The png_get_int_32() routine assumes we are using two's complement + * format for negative values, which is almost certainly true. + */ +# define PNG_get_uint_32(buf) \ + (((png_uint_32)(*(buf)) << 24) + \ + ((png_uint_32)(*((buf) + 1)) << 16) + \ + ((png_uint_32)(*((buf) + 2)) << 8) + \ + ((png_uint_32)(*((buf) + 3)))) + + /* From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the + * function) incorrectly returned a value of type png_uint_32. + */ +# define PNG_get_uint_16(buf) \ + ((png_uint_16) \ + (((unsigned int)(*(buf)) << 8) + \ + ((unsigned int)(*((buf) + 1))))) + +# define PNG_get_int_32(buf) \ + ((png_int_32)((*(buf) & 0x80) \ + ? -((png_int_32)(((png_get_uint_32(buf)^0xffffffffU)+1U)&0x7fffffffU)) \ + : (png_int_32)png_get_uint_32(buf))) + +/* If PNG_PREFIX is defined the same thing as below happens in pnglibconf.h, + * but defining a macro name prefixed with PNG_PREFIX. + */ +# ifndef PNG_PREFIX +# define png_get_uint_32(buf) PNG_get_uint_32(buf) +# define png_get_uint_16(buf) PNG_get_uint_16(buf) +# define png_get_int_32(buf) PNG_get_int_32(buf) +# endif +#else +# ifdef PNG_PREFIX + /* No macros; revert to the (redefined) function */ +# define PNG_get_uint_32 (png_get_uint_32) +# define PNG_get_uint_16 (png_get_uint_16) +# define PNG_get_int_32 (png_get_int_32) +# endif +#endif + +#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +PNG_EXPORT(242, void, png_set_check_for_invalid_index, + (png_structrp png_ptr, int allowed)); +# ifdef PNG_GET_PALETTE_MAX_SUPPORTED +PNG_EXPORT(243, int, png_get_palette_max, (png_const_structp png_ptr, + png_const_infop info_ptr)); +# endif +#endif /* CHECK_FOR_INVALID_INDEX */ + +/******************************************************************************* + * Section 5: SIMPLIFIED API + ******************************************************************************* + * + * Please read the documentation in libpng-manual.txt (TODO: write said + * documentation) if you don't understand what follows. + * + * The simplified API hides the details of both libpng and the PNG file format + * itself. It allows PNG files to be read into a very limited number of + * in-memory bitmap formats or to be written from the same formats. If these + * formats do not accommodate your needs then you can, and should, use the more + * sophisticated APIs above - these support a wide variety of in-memory formats + * and a wide variety of sophisticated transformations to those formats as well + * as a wide variety of APIs to manipulate ancillary information. + * + * To read a PNG file using the simplified API: + * + * 1) Declare a 'png_image' structure (see below) on the stack, set the + * version field to PNG_IMAGE_VERSION and the 'opaque' pointer to NULL + * (this is REQUIRED, your program may crash if you don't do it.) + * 2) Call the appropriate png_image_begin_read... function. + * 3) Set the png_image 'format' member to the required sample format. + * 4) Allocate a buffer for the image and, if required, the color-map. + * 5) Call png_image_finish_read to read the image and, if required, the + * color-map into your buffers. + * + * There are no restrictions on the format of the PNG input itself; all valid + * color types, bit depths, and interlace methods are acceptable, and the + * input image is transformed as necessary to the requested in-memory format + * during the png_image_finish_read() step. The only caveat is that if you + * request a color-mapped image from a PNG that is full-color or makes + * complex use of an alpha channel the transformation is extremely lossy and the + * result may look terrible. + * + * To write a PNG file using the simplified API: + * + * 1) Declare a 'png_image' structure on the stack and memset() it to all zero. + * 2) Initialize the members of the structure that describe the image, setting + * the 'format' member to the format of the image samples. + * 3) Call the appropriate png_image_write... function with a pointer to the + * image and, if necessary, the color-map to write the PNG data. + * + * png_image is a structure that describes the in-memory format of an image + * when it is being read or defines the in-memory format of an image that you + * need to write: + */ +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) || \ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) + +#define PNG_IMAGE_VERSION 1 + +typedef struct png_control *png_controlp; +typedef struct +{ + png_controlp opaque; /* Initialize to NULL, free with png_image_free */ + png_uint_32 version; /* Set to PNG_IMAGE_VERSION */ + png_uint_32 width; /* Image width in pixels (columns) */ + png_uint_32 height; /* Image height in pixels (rows) */ + png_uint_32 format; /* Image format as defined below */ + png_uint_32 flags; /* A bit mask containing informational flags */ + png_uint_32 colormap_entries; + /* Number of entries in the color-map */ + + /* In the event of an error or warning the following field will be set to a + * non-zero value and the 'message' field will contain a '\0' terminated + * string with the libpng error or warning message. If both warnings and + * an error were encountered, only the error is recorded. If there + * are multiple warnings, only the first one is recorded. + * + * The upper 30 bits of this value are reserved, the low two bits contain + * a value as follows: + */ +# define PNG_IMAGE_WARNING 1 +# define PNG_IMAGE_ERROR 2 + /* + * The result is a two-bit code such that a value more than 1 indicates + * a failure in the API just called: + * + * 0 - no warning or error + * 1 - warning + * 2 - error + * 3 - error preceded by warning + */ +# define PNG_IMAGE_FAILED(png_cntrl) ((((png_cntrl).warning_or_error)&0x03)>1) + + png_uint_32 warning_or_error; + + char message[64]; +} png_image, *png_imagep; + +/* The samples of the image have one to four channels whose components have + * original values in the range 0 to 1.0: + * + * 1: A single gray or luminance channel (G). + * 2: A gray/luminance channel and an alpha channel (GA). + * 3: Three red, green, blue color channels (RGB). + * 4: Three color channels and an alpha channel (RGBA). + * + * The components are encoded in one of two ways: + * + * a) As a small integer, value 0..255, contained in a single byte. For the + * alpha channel the original value is simply value/255. For the color or + * luminance channels the value is encoded according to the sRGB specification + * and matches the 8-bit format expected by typical display devices. + * + * The color/gray channels are not scaled (pre-multiplied) by the alpha + * channel and are suitable for passing to color management software. + * + * b) As a value in the range 0..65535, contained in a 2-byte integer. All + * channels can be converted to the original value by dividing by 65535; all + * channels are linear. Color channels use the RGB encoding (RGB end-points) of + * the sRGB specification. This encoding is identified by the + * PNG_FORMAT_FLAG_LINEAR flag below. + * + * When the simplified API needs to convert between sRGB and linear colorspaces, + * the actual sRGB transfer curve defined in the sRGB specification (see the + * article at ) is used, not the gamma=1/2.2 + * approximation used elsewhere in libpng. + * + * When an alpha channel is present it is expected to denote pixel coverage + * of the color or luminance channels and is returned as an associated alpha + * channel: the color/gray channels are scaled (pre-multiplied) by the alpha + * value. + * + * The samples are either contained directly in the image data, between 1 and 8 + * bytes per pixel according to the encoding, or are held in a color-map indexed + * by bytes in the image data. In the case of a color-map the color-map entries + * are individual samples, encoded as above, and the image data has one byte per + * pixel to select the relevant sample from the color-map. + */ + +/* PNG_FORMAT_* + * + * #defines to be used in png_image::format. Each #define identifies a + * particular layout of sample data and, if present, alpha values. There are + * separate defines for each of the two component encodings. + * + * A format is built up using single bit flag values. All combinations are + * valid. Formats can be built up from the flag values or you can use one of + * the predefined values below. When testing formats always use the FORMAT_FLAG + * macros to test for individual features - future versions of the library may + * add new flags. + * + * When reading or writing color-mapped images the format should be set to the + * format of the entries in the color-map then png_image_{read,write}_colormap + * called to read or write the color-map and set the format correctly for the + * image data. Do not set the PNG_FORMAT_FLAG_COLORMAP bit directly! + * + * NOTE: libpng can be built with particular features disabled. If you see + * compiler errors because the definition of one of the following flags has been + * compiled out it is because libpng does not have the required support. It is + * possible, however, for the libpng configuration to enable the format on just + * read or just write; in that case you may see an error at run time. You can + * guard against this by checking for the definition of the appropriate + * "_SUPPORTED" macro, one of: + * + * PNG_SIMPLIFIED_{READ,WRITE}_{BGR,AFIRST}_SUPPORTED + */ +#define PNG_FORMAT_FLAG_ALPHA 0x01U /* format with an alpha channel */ +#define PNG_FORMAT_FLAG_COLOR 0x02U /* color format: otherwise grayscale */ +#define PNG_FORMAT_FLAG_LINEAR 0x04U /* 2-byte channels else 1-byte */ +#define PNG_FORMAT_FLAG_COLORMAP 0x08U /* image data is color-mapped */ + +#ifdef PNG_FORMAT_BGR_SUPPORTED +# define PNG_FORMAT_FLAG_BGR 0x10U /* BGR colors, else order is RGB */ +#endif + +#ifdef PNG_FORMAT_AFIRST_SUPPORTED +# define PNG_FORMAT_FLAG_AFIRST 0x20U /* alpha channel comes first */ +#endif + +#define PNG_FORMAT_FLAG_ASSOCIATED_ALPHA 0x40U /* alpha channel is associated */ + +/* Commonly used formats have predefined macros. + * + * First the single byte (sRGB) formats: + */ +#define PNG_FORMAT_GRAY 0 +#define PNG_FORMAT_GA PNG_FORMAT_FLAG_ALPHA +#define PNG_FORMAT_AG (PNG_FORMAT_GA|PNG_FORMAT_FLAG_AFIRST) +#define PNG_FORMAT_RGB PNG_FORMAT_FLAG_COLOR +#define PNG_FORMAT_BGR (PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_BGR) +#define PNG_FORMAT_RGBA (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_ARGB (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_AFIRST) +#define PNG_FORMAT_BGRA (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_ABGR (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_AFIRST) + +/* Then the linear 2-byte formats. When naming these "Y" is used to + * indicate a luminance (gray) channel. + */ +#define PNG_FORMAT_LINEAR_Y PNG_FORMAT_FLAG_LINEAR +#define PNG_FORMAT_LINEAR_Y_ALPHA (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_ALPHA) +#define PNG_FORMAT_LINEAR_RGB (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR) +#define PNG_FORMAT_LINEAR_RGB_ALPHA \ + (PNG_FORMAT_FLAG_LINEAR|PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA) + +/* With color-mapped formats the image data is one byte for each pixel, the byte + * is an index into the color-map which is formatted as above. To obtain a + * color-mapped format it is sufficient just to add the PNG_FOMAT_FLAG_COLORMAP + * to one of the above definitions, or you can use one of the definitions below. + */ +#define PNG_FORMAT_RGB_COLORMAP (PNG_FORMAT_RGB|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_BGR_COLORMAP (PNG_FORMAT_BGR|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_RGBA_COLORMAP (PNG_FORMAT_RGBA|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_ARGB_COLORMAP (PNG_FORMAT_ARGB|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_BGRA_COLORMAP (PNG_FORMAT_BGRA|PNG_FORMAT_FLAG_COLORMAP) +#define PNG_FORMAT_ABGR_COLORMAP (PNG_FORMAT_ABGR|PNG_FORMAT_FLAG_COLORMAP) + +/* PNG_IMAGE macros + * + * These are convenience macros to derive information from a png_image + * structure. The PNG_IMAGE_SAMPLE_ macros return values appropriate to the + * actual image sample values - either the entries in the color-map or the + * pixels in the image. The PNG_IMAGE_PIXEL_ macros return corresponding values + * for the pixels and will always return 1 for color-mapped formats. The + * remaining macros return information about the rows in the image and the + * complete image. + * + * NOTE: All the macros that take a png_image::format parameter are compile time + * constants if the format parameter is, itself, a constant. Therefore these + * macros can be used in array declarations and case labels where required. + * Similarly the macros are also pre-processor constants (sizeof is not used) so + * they can be used in #if tests. + * + * First the information about the samples. + */ +#define PNG_IMAGE_SAMPLE_CHANNELS(fmt)\ + (((fmt)&(PNG_FORMAT_FLAG_COLOR|PNG_FORMAT_FLAG_ALPHA))+1) + /* Return the total number of channels in a given format: 1..4 */ + +#define PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)\ + ((((fmt) & PNG_FORMAT_FLAG_LINEAR) >> 2)+1) + /* Return the size in bytes of a single component of a pixel or color-map + * entry (as appropriate) in the image: 1 or 2. + */ + +#define PNG_IMAGE_SAMPLE_SIZE(fmt)\ + (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * PNG_IMAGE_SAMPLE_COMPONENT_SIZE(fmt)) + /* This is the size of the sample data for one sample. If the image is + * color-mapped it is the size of one color-map entry (and image pixels are + * one byte in size), otherwise it is the size of one image pixel. + */ + +#define PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(fmt)\ + (PNG_IMAGE_SAMPLE_CHANNELS(fmt) * 256) + /* The maximum size of the color-map required by the format expressed in a + * count of components. This can be used to compile-time allocate a + * color-map: + * + * png_uint_16 colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(linear_fmt)]; + * + * png_byte colormap[PNG_IMAGE_MAXIMUM_COLORMAP_COMPONENTS(sRGB_fmt)]; + * + * Alternatively use the PNG_IMAGE_COLORMAP_SIZE macro below to use the + * information from one of the png_image_begin_read_ APIs and dynamically + * allocate the required memory. + */ + +/* Corresponding information about the pixels */ +#define PNG_IMAGE_PIXEL_(test,fmt)\ + (((fmt)&PNG_FORMAT_FLAG_COLORMAP)?1:test(fmt)) + +#define PNG_IMAGE_PIXEL_CHANNELS(fmt)\ + PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_CHANNELS,fmt) + /* The number of separate channels (components) in a pixel; 1 for a + * color-mapped image. + */ + +#define PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt)\ + PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_COMPONENT_SIZE,fmt) + /* The size, in bytes, of each component in a pixel; 1 for a color-mapped + * image. + */ + +#define PNG_IMAGE_PIXEL_SIZE(fmt) PNG_IMAGE_PIXEL_(PNG_IMAGE_SAMPLE_SIZE,fmt) + /* The size, in bytes, of a complete pixel; 1 for a color-mapped image. */ + +/* Information about the whole row, or whole image */ +#define PNG_IMAGE_ROW_STRIDE(image)\ + (PNG_IMAGE_PIXEL_CHANNELS((image).format) * (image).width) + /* Return the total number of components in a single row of the image; this + * is the minimum 'row stride', the minimum count of components between each + * row. For a color-mapped image this is the minimum number of bytes in a + * row. + * + * WARNING: this macro overflows for some images with more than one component + * and very large image widths. libpng will refuse to process an image where + * this macro would overflow. + */ + +#define PNG_IMAGE_BUFFER_SIZE(image, row_stride)\ + (PNG_IMAGE_PIXEL_COMPONENT_SIZE((image).format)*(image).height*(row_stride)) + /* Return the size, in bytes, of an image buffer given a png_image and a row + * stride - the number of components to leave space for in each row. + * + * WARNING: this macro overflows a 32-bit integer for some large PNG images, + * libpng will refuse to process an image where such an overflow would occur. + */ + +#define PNG_IMAGE_SIZE(image)\ + PNG_IMAGE_BUFFER_SIZE(image, PNG_IMAGE_ROW_STRIDE(image)) + /* Return the size, in bytes, of the image in memory given just a png_image; + * the row stride is the minimum stride required for the image. + */ + +#define PNG_IMAGE_COLORMAP_SIZE(image)\ + (PNG_IMAGE_SAMPLE_SIZE((image).format) * (image).colormap_entries) + /* Return the size, in bytes, of the color-map of this image. If the image + * format is not a color-map format this will return a size sufficient for + * 256 entries in the given format; check PNG_FORMAT_FLAG_COLORMAP if + * you don't want to allocate a color-map in this case. + */ + +/* PNG_IMAGE_FLAG_* + * + * Flags containing additional information about the image are held in the + * 'flags' field of png_image. + */ +#define PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB 0x01 + /* This indicates that the RGB values of the in-memory bitmap do not + * correspond to the red, green and blue end-points defined by sRGB. + */ + +#define PNG_IMAGE_FLAG_FAST 0x02 + /* On write emphasise speed over compression; the resultant PNG file will be + * larger but will be produced significantly faster, particular for large + * images. Do not use this option for images which will be distributed, only + * used it when producing intermediate files that will be read back in + * repeatedly. For a typical 24-bit image the option will double the read + * speed at the cost of increasing the image size by 25%, however for many + * more compressible images the PNG file can be 10 times larger with only a + * slight speed gain. + */ + +#define PNG_IMAGE_FLAG_16BIT_sRGB 0x04 + /* On read if the image is a 16-bit per component image and there is no gAMA + * or sRGB chunk assume that the components are sRGB encoded. Notice that + * images output by the simplified API always have gamma information; setting + * this flag only affects the interpretation of 16-bit images from an + * external source. It is recommended that the application expose this flag + * to the user; the user can normally easily recognize the difference between + * linear and sRGB encoding. This flag has no effect on write - the data + * passed to the write APIs must have the correct encoding (as defined + * above.) + * + * If the flag is not set (the default) input 16-bit per component data is + * assumed to be linear. + * + * NOTE: the flag can only be set after the png_image_begin_read_ call, + * because that call initializes the 'flags' field. + */ + +#ifdef PNG_SIMPLIFIED_READ_SUPPORTED +/* READ APIs + * --------- + * + * The png_image passed to the read APIs must have been initialized by setting + * the png_controlp field 'opaque' to NULL (or, safer, memset the whole thing.) + */ +#ifdef PNG_STDIO_SUPPORTED +PNG_EXPORT(234, int, png_image_begin_read_from_file, (png_imagep image, + const char *file_name)); + /* The named file is opened for read and the image header is filled in + * from the PNG header in the file. + */ + +PNG_EXPORT(235, int, png_image_begin_read_from_stdio, (png_imagep image, + FILE *file)); + /* The PNG header is read from the stdio FILE object. */ +#endif /* STDIO */ + +PNG_EXPORT(236, int, png_image_begin_read_from_memory, (png_imagep image, + png_const_voidp memory, size_t size)); + /* The PNG header is read from the given memory buffer. */ + +PNG_EXPORT(237, int, png_image_finish_read, (png_imagep image, + png_const_colorp background, void *buffer, png_int_32 row_stride, + void *colormap)); + /* Finish reading the image into the supplied buffer and clean up the + * png_image structure. + * + * row_stride is the step, in byte or 2-byte units as appropriate, + * between adjacent rows. A positive stride indicates that the top-most row + * is first in the buffer - the normal top-down arrangement. A negative + * stride indicates that the bottom-most row is first in the buffer. + * + * background need only be supplied if an alpha channel must be removed from + * a png_byte format and the removal is to be done by compositing on a solid + * color; otherwise it may be NULL and any composition will be done directly + * onto the buffer. The value is an sRGB color to use for the background, + * for grayscale output the green channel is used. + * + * background must be supplied when an alpha channel must be removed from a + * single byte color-mapped output format, in other words if: + * + * 1) The original format from png_image_begin_read_from_* had + * PNG_FORMAT_FLAG_ALPHA set. + * 2) The format set by the application does not. + * 3) The format set by the application has PNG_FORMAT_FLAG_COLORMAP set and + * PNG_FORMAT_FLAG_LINEAR *not* set. + * + * For linear output removing the alpha channel is always done by compositing + * on black and background is ignored. + * + * colormap must be supplied when PNG_FORMAT_FLAG_COLORMAP is set. It must + * be at least the size (in bytes) returned by PNG_IMAGE_COLORMAP_SIZE. + * image->colormap_entries will be updated to the actual number of entries + * written to the colormap; this may be less than the original value. + */ + +PNG_EXPORT(238, void, png_image_free, (png_imagep image)); + /* Free any data allocated by libpng in image->opaque, setting the pointer to + * NULL. May be called at any time after the structure is initialized. + */ +#endif /* SIMPLIFIED_READ */ + +#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED +/* WRITE APIS + * ---------- + * For write you must initialize a png_image structure to describe the image to + * be written. To do this use memset to set the whole structure to 0 then + * initialize fields describing your image. + * + * version: must be set to PNG_IMAGE_VERSION + * opaque: must be initialized to NULL + * width: image width in pixels + * height: image height in rows + * format: the format of the data (image and color-map) you wish to write + * flags: set to 0 unless one of the defined flags applies; set + * PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB for color format images where the RGB + * values do not correspond to the colors in sRGB. + * colormap_entries: set to the number of entries in the color-map (0 to 256) + */ +#ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED +PNG_EXPORT(239, int, png_image_write_to_file, (png_imagep image, + const char *file, int convert_to_8bit, const void *buffer, + png_int_32 row_stride, const void *colormap)); + /* Write the image to the named file. */ + +PNG_EXPORT(240, int, png_image_write_to_stdio, (png_imagep image, FILE *file, + int convert_to_8_bit, const void *buffer, png_int_32 row_stride, + const void *colormap)); + /* Write the image to the given FILE object. */ +#endif /* SIMPLIFIED_WRITE_STDIO */ + +/* With all write APIs if image is in one of the linear formats with 16-bit + * data then setting convert_to_8_bit will cause the output to be an 8-bit PNG + * gamma encoded according to the sRGB specification, otherwise a 16-bit linear + * encoded PNG file is written. + * + * With color-mapped data formats the colormap parameter point to a color-map + * with at least image->colormap_entries encoded in the specified format. If + * the format is linear the written PNG color-map will be converted to sRGB + * regardless of the convert_to_8_bit flag. + * + * With all APIs row_stride is handled as in the read APIs - it is the spacing + * from one row to the next in component sized units (1 or 2 bytes) and if + * negative indicates a bottom-up row layout in the buffer. If row_stride is + * zero, libpng will calculate it for you from the image width and number of + * channels. + * + * Note that the write API does not support interlacing, sub-8-bit pixels or + * most ancillary chunks. If you need to write text chunks (e.g. for copyright + * notices) you need to use one of the other APIs. + */ + +PNG_EXPORT(245, int, png_image_write_to_memory, (png_imagep image, void *memory, + png_alloc_size_t * PNG_RESTRICT memory_bytes, int convert_to_8_bit, + const void *buffer, png_int_32 row_stride, const void *colormap)); + /* Write the image to the given memory buffer. The function both writes the + * whole PNG data stream to *memory and updates *memory_bytes with the count + * of bytes written. + * + * 'memory' may be NULL. In this case *memory_bytes is not read however on + * success the number of bytes which would have been written will still be + * stored in *memory_bytes. On failure *memory_bytes will contain 0. + * + * If 'memory' is not NULL it must point to memory[*memory_bytes] of + * writeable memory. + * + * If the function returns success memory[*memory_bytes] (if 'memory' is not + * NULL) contains the written PNG data. *memory_bytes will always be less + * than or equal to the original value. + * + * If the function returns false and *memory_bytes was not changed an error + * occurred during write. If *memory_bytes was changed, or is not 0 if + * 'memory' was NULL, the write would have succeeded but for the memory + * buffer being too small. *memory_bytes contains the required number of + * bytes and will be bigger that the original value. + */ + +#define png_image_write_get_memory_size(image, size, convert_to_8_bit, buffer,\ + row_stride, colormap)\ + png_image_write_to_memory(&(image), 0, &(size), convert_to_8_bit, buffer,\ + row_stride, colormap) + /* Return the amount of memory in 'size' required to compress this image. + * The png_image structure 'image' must be filled in as in the above + * function and must not be changed before the actual write call, the buffer + * and all other parameters must also be identical to that in the final + * write call. The 'size' variable need not be initialized. + * + * NOTE: the macro returns true/false, if false is returned 'size' will be + * set to zero and the write failed and probably will fail if tried again. + */ + +/* You can pre-allocate the buffer by making sure it is of sufficient size + * regardless of the amount of compression achieved. The buffer size will + * always be bigger than the original image and it will never be filled. The + * following macros are provided to assist in allocating the buffer. + */ +#define PNG_IMAGE_DATA_SIZE(image) (PNG_IMAGE_SIZE(image)+(image).height) + /* The number of uncompressed bytes in the PNG byte encoding of the image; + * uncompressing the PNG IDAT data will give this number of bytes. + * + * NOTE: while PNG_IMAGE_SIZE cannot overflow for an image in memory this + * macro can because of the extra bytes used in the PNG byte encoding. You + * need to avoid this macro if your image size approaches 2^30 in width or + * height. The same goes for the remainder of these macros; they all produce + * bigger numbers than the actual in-memory image size. + */ +#ifndef PNG_ZLIB_MAX_SIZE +# define PNG_ZLIB_MAX_SIZE(b) ((b)+(((b)+7U)>>3)+(((b)+63U)>>6)+11U) + /* An upper bound on the number of compressed bytes given 'b' uncompressed + * bytes. This is based on deflateBounds() in zlib; different + * implementations of zlib compression may conceivably produce more data so + * if your zlib implementation is not zlib itself redefine this macro + * appropriately. + */ +#endif + +#define PNG_IMAGE_COMPRESSED_SIZE_MAX(image)\ + PNG_ZLIB_MAX_SIZE((png_alloc_size_t)PNG_IMAGE_DATA_SIZE(image)) + /* An upper bound on the size of the data in the PNG IDAT chunks. */ + +#define PNG_IMAGE_PNG_SIZE_MAX_(image, image_size)\ + ((8U/*sig*/+25U/*IHDR*/+16U/*gAMA*/+44U/*cHRM*/+12U/*IEND*/+\ + (((image).format&PNG_FORMAT_FLAG_COLORMAP)?/*colormap: PLTE, tRNS*/\ + 12U+3U*(image).colormap_entries/*PLTE data*/+\ + (((image).format&PNG_FORMAT_FLAG_ALPHA)?\ + 12U/*tRNS*/+(image).colormap_entries:0U):0U)+\ + 12U)+(12U*((image_size)/PNG_ZBUF_SIZE))/*IDAT*/+(image_size)) + /* A helper for the following macro; if your compiler cannot handle the + * following macro use this one with the result of + * PNG_IMAGE_COMPRESSED_SIZE_MAX(image) as the second argument (most + * compilers should handle this just fine.) + */ + +#define PNG_IMAGE_PNG_SIZE_MAX(image)\ + PNG_IMAGE_PNG_SIZE_MAX_(image, PNG_IMAGE_COMPRESSED_SIZE_MAX(image)) + /* An upper bound on the total length of the PNG data stream for 'image'. + * The result is of type png_alloc_size_t, on 32-bit systems this may + * overflow even though PNG_IMAGE_DATA_SIZE does not overflow; the write will + * run out of buffer space but return a corrected size which should work. + */ +#endif /* SIMPLIFIED_WRITE */ +/******************************************************************************* + * END OF SIMPLIFIED API + ******************************************************************************/ +#endif /* SIMPLIFIED_{READ|WRITE} */ + +/******************************************************************************* + * Section 6: IMPLEMENTATION OPTIONS + ******************************************************************************* + * + * Support for arbitrary implementation-specific optimizations. The API allows + * particular options to be turned on or off. 'Option' is the number of the + * option and 'onoff' is 0 (off) or non-0 (on). The value returned is given + * by the PNG_OPTION_ defines below. + * + * HARDWARE: normally hardware capabilities, such as the Intel SSE instructions, + * are detected at run time, however sometimes it may be impossible + * to do this in user mode, in which case it is necessary to discover + * the capabilities in an OS specific way. Such capabilities are + * listed here when libpng has support for them and must be turned + * ON by the application if present. + * + * SOFTWARE: sometimes software optimizations actually result in performance + * decrease on some architectures or systems, or with some sets of + * PNG images. 'Software' options allow such optimizations to be + * selected at run time. + */ +#ifdef PNG_SET_OPTION_SUPPORTED + +/* HARDWARE: ARM Neon SIMD instructions supported */ +#ifdef PNG_ARM_NEON_API_SUPPORTED +# define PNG_ARM_NEON 0 +#endif + +/* SOFTWARE: Force maximum window */ +#define PNG_MAXIMUM_INFLATE_WINDOW 2 + +/* SOFTWARE: Check ICC profile for sRGB */ +#define PNG_SKIP_sRGB_CHECK_PROFILE 4 + +/* HARDWARE: MIPS MSA SIMD instructions supported */ +#ifdef PNG_MIPS_MSA_API_SUPPORTED +# define PNG_MIPS_MSA 6 +#endif + +/* SOFTWARE: Disable Adler32 check on IDAT */ +#ifdef PNG_DISABLE_ADLER32_CHECK_SUPPORTED +# define PNG_IGNORE_ADLER32 8 +#endif + +/* HARDWARE: PowerPC VSX SIMD instructions supported */ +#ifdef PNG_POWERPC_VSX_API_SUPPORTED +# define PNG_POWERPC_VSX 10 +#endif + +/* HARDWARE: MIPS MMI SIMD instructions supported */ +#ifdef PNG_MIPS_MMI_API_SUPPORTED +# define PNG_MIPS_MMI 12 +#endif + +/* HARDWARE: RISC-V RVV SIMD instructions supported */ +#ifdef PNG_RISCV_RVV_API_SUPPORTED +# define PNG_RISCV_RVV 14 +#endif + +/* Next option - numbers must be even */ +#define PNG_OPTION_NEXT 16 + +/* Return values: NOTE: there are four values and 'off' is *not* zero */ +#define PNG_OPTION_UNSET 0 /* Unset - defaults to off */ +#define PNG_OPTION_INVALID 1 /* Option number out of range */ +#define PNG_OPTION_OFF 2 +#define PNG_OPTION_ON 3 + +PNG_EXPORT(244, int, png_set_option, (png_structrp png_ptr, int option, + int onoff)); +#endif /* SET_OPTION */ + +/******************************************************************************* + * END OF HARDWARE AND SOFTWARE OPTIONS + ******************************************************************************/ + +/* Maintainer: Put new public prototypes here ^, in libpng.3, in project + * defs, and in scripts/symbols.def. + */ + +/* The last ordinal number (this is the *last* one already used; the next + * one to use is one more than this.) + */ +#ifdef PNG_EXPORT_LAST_ORDINAL + PNG_EXPORT_LAST_ORDINAL(259); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* PNG_VERSION_INFO_ONLY */ +/* Do not put anything past this line */ +#endif /* PNG_H */ diff --git a/widget/milsko/milskosrc/external/libpng/include/pngconf.h b/widget/milsko/milskosrc/external/libpng/include/pngconf.h new file mode 100644 index 0000000000..d1081b54dd --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/include/pngconf.h @@ -0,0 +1,615 @@ +/* pngconf.h - machine-configurable file for libpng + * + * libpng version 1.6.50 + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * Any machine specific code is near the front of this file, so if you + * are configuring libpng for a machine, you may want to read the section + * starting here down to where it starts to typedef png_color, png_text, + * and png_info. + */ + +#ifndef PNGCONF_H +#define PNGCONF_H + +#ifndef PNG_BUILDING_SYMBOL_TABLE /* else includes may cause problems */ + +/* From libpng 1.6.0 libpng requires an ANSI X3.159-1989 ("ISOC90") compliant C + * compiler for correct compilation. The following header files are required by + * the standard. If your compiler doesn't provide these header files, or they + * do not match the standard, you will need to provide/improve them. + */ +#include +#include + +/* Library header files. These header files are all defined by ISOC90; libpng + * expects conformant implementations, however, an ISOC90 conformant system need + * not provide these header files if the functionality cannot be implemented. + * In this case it will be necessary to disable the relevant parts of libpng in + * the build of pnglibconf.h. + * + * Prior to 1.6.0 string.h was included here; the API changes in 1.6.0 to not + * include this unnecessary header file. + */ + +#ifdef PNG_STDIO_SUPPORTED + /* Required for the definition of FILE: */ +# include +#endif + +#ifdef PNG_SETJMP_SUPPORTED + /* Required for the definition of jmp_buf and the declaration of longjmp: */ +# include +#endif + +#ifdef PNG_CONVERT_tIME_SUPPORTED + /* Required for struct tm: */ +# include +#endif + +#endif /* PNG_BUILDING_SYMBOL_TABLE */ + +/* Prior to 1.6.0, it was possible to turn off 'const' in declarations, + * using PNG_NO_CONST. This is no longer supported. + */ +#define PNG_CONST const /* backward compatibility only */ + +/* This controls optimization of the reading of 16-bit and 32-bit + * values from PNG files. It can be set on a per-app-file basis: it + * just changes whether a macro is used when the function is called. + * The library builder sets the default; if read functions are not + * built into the library the macro implementation is forced on. + */ +#ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED +# define PNG_USE_READ_MACROS +#endif +#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS) +# if PNG_DEFAULT_READ_MACROS +# define PNG_USE_READ_MACROS +# endif +#endif + +/* COMPILER SPECIFIC OPTIONS. + * + * These options are provided so that a variety of difficult compilers + * can be used. Some are fixed at build time (e.g. PNG_API_RULE + * below) but still have compiler specific implementations, others + * may be changed on a per-file basis when compiling against libpng. + */ + +/* The PNGARG macro was used in versions of libpng prior to 1.6.0 to protect + * against legacy (pre ISOC90) compilers that did not understand function + * prototypes. [Deprecated.] + */ +#ifndef PNGARG +# define PNGARG(arglist) arglist +#endif + +/* Function calling conventions. + * ============================= + * Normally it is not necessary to specify to the compiler how to call + * a function - it just does it - however on x86 systems derived from + * Microsoft and Borland C compilers ('IBM PC', 'DOS', 'Windows' systems + * and some others) there are multiple ways to call a function and the + * default can be changed on the compiler command line. For this reason + * libpng specifies the calling convention of every exported function and + * every function called via a user supplied function pointer. This is + * done in this file by defining the following macros: + * + * PNGAPI Calling convention for exported functions. + * PNGCBAPI Calling convention for user provided (callback) functions. + * PNGCAPI Calling convention used by the ANSI-C library (required + * for longjmp callbacks and sometimes used internally to + * specify the calling convention for zlib). + * + * These macros should never be overridden. If it is necessary to + * change calling convention in a private build this can be done + * by setting PNG_API_RULE (which defaults to 0) to one of the values + * below to select the correct 'API' variants. + * + * PNG_API_RULE=0 Use PNGCAPI - the 'C' calling convention - throughout. + * This is correct in every known environment. + * PNG_API_RULE=1 Use the operating system convention for PNGAPI and + * the 'C' calling convention (from PNGCAPI) for + * callbacks (PNGCBAPI). This is no longer required + * in any known environment - if it has to be used + * please post an explanation of the problem to the + * libpng mailing list. + * + * These cases only differ if the operating system does not use the C + * calling convention, at present this just means the above cases + * (x86 DOS/Windows systems) and, even then, this does not apply to + * Cygwin running on those systems. + * + * Note that the value must be defined in pnglibconf.h so that what + * the application uses to call the library matches the conventions + * set when building the library. + */ + +/* Symbol export + * ============= + * When building a shared library it is almost always necessary to tell + * the compiler which symbols to export. The png.h macro 'PNG_EXPORT' + * is used to mark the symbols. On some systems these symbols can be + * extracted at link time and need no special processing by the compiler, + * on other systems the symbols are flagged by the compiler and just + * the declaration requires a special tag applied (unfortunately) in a + * compiler dependent way. Some systems can do either. + * + * A small number of older systems also require a symbol from a DLL to + * be flagged to the program that calls it. This is a problem because + * we do not know in the header file included by application code that + * the symbol will come from a shared library, as opposed to a statically + * linked one. For this reason the application must tell us by setting + * the magic flag PNG_USE_DLL to turn on the special processing before + * it includes png.h. + * + * Four additional macros are used to make this happen: + * + * PNG_IMPEXP The magic (if any) to cause a symbol to be exported from + * the build or imported if PNG_USE_DLL is set - compiler + * and system specific. + * + * PNG_EXPORT_TYPE(type) A macro that pre or appends PNG_IMPEXP to + * 'type', compiler specific. + * + * PNG_DLL_EXPORT Set to the magic to use during a libpng build to + * make a symbol exported from the DLL. Not used in the + * public header files; see pngpriv.h for how it is used + * in the libpng build. + * + * PNG_DLL_IMPORT Set to the magic to force the libpng symbols to come + * from a DLL - used to define PNG_IMPEXP when + * PNG_USE_DLL is set. + */ + +/* System specific discovery. + * ========================== + * This code is used at build time to find PNG_IMPEXP, the API settings + * and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL + * import processing is possible. On Windows systems it also sets + * compiler-specific macros to the values required to change the calling + * conventions of the various functions. + */ +#if defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || \ + defined(__CYGWIN__) + /* Windows system (DOS doesn't support DLLs). Includes builds under Cygwin or + * MinGW on any architecture currently supported by Windows. Also includes + * Watcom builds but these need special treatment because they are not + * compatible with GCC or Visual C because of different calling conventions. + */ +# if PNG_API_RULE == 2 + /* If this line results in an error, either because __watcall is not + * understood or because of a redefine just below you cannot use *this* + * build of the library with the compiler you are using. *This* build was + * build using Watcom and applications must also be built using Watcom! + */ +# define PNGCAPI __watcall +# endif + +# if defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 800)) +# define PNGCAPI __cdecl +# if PNG_API_RULE == 1 + /* If this line results in an error __stdcall is not understood and + * PNG_API_RULE should not have been set to '1'. + */ +# define PNGAPI __stdcall +# endif +# else + /* An older compiler, or one not detected (erroneously) above, + * if necessary override on the command line to get the correct + * variants for the compiler. + */ +# ifndef PNGCAPI +# define PNGCAPI _cdecl +# endif +# if PNG_API_RULE == 1 && !defined(PNGAPI) +# define PNGAPI _stdcall +# endif +# endif /* compiler/api */ + + /* NOTE: PNGCBAPI always defaults to PNGCAPI. */ + +# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD) +# error PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed +# endif + +# define PNG_DLL_EXPORT __declspec(dllexport) +# ifndef PNG_DLL_IMPORT +# define PNG_DLL_IMPORT __declspec(dllimport) +# endif + +#else /* !Windows */ +# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__) +# define PNGAPI _System +# else /* !Windows/x86 && !OS/2 */ + /* Use the defaults, or define PNG*API on the command line (but + * this will have to be done for every compile!) + */ +# endif /* other system, !OS/2 */ +#endif /* !Windows/x86 */ + +/* Now do all the defaulting . */ +#ifndef PNGCAPI +# define PNGCAPI +#endif +#ifndef PNGCBAPI +# define PNGCBAPI PNGCAPI +#endif +#ifndef PNGAPI +# define PNGAPI PNGCAPI +#endif + +/* PNG_IMPEXP may be set on the compilation system command line or (if not set) + * then in an internal header file when building the library, otherwise (when + * using the library) it is set here. + */ +#ifndef PNG_IMPEXP +# if defined(PNG_USE_DLL) && defined(PNG_DLL_IMPORT) + /* This forces use of a DLL, disallowing static linking */ +# define PNG_IMPEXP PNG_DLL_IMPORT +# endif + +# ifndef PNG_IMPEXP +# define PNG_IMPEXP +# endif +#endif + +/* In 1.5.2 the definition of PNG_FUNCTION has been changed to always treat + * 'attributes' as a storage class - the attributes go at the start of the + * function definition, and attributes are always appended regardless of the + * compiler. This considerably simplifies these macros but may cause problems + * if any compilers both need function attributes and fail to handle them as + * a storage class (this is unlikely.) + */ +#ifndef PNG_FUNCTION +# define PNG_FUNCTION(type, name, args, attributes) attributes type name args +#endif + +#ifndef PNG_EXPORT_TYPE +# define PNG_EXPORT_TYPE(type) PNG_IMPEXP type +#endif + + /* The ordinal value is only relevant when preprocessing png.h for symbol + * table entries, so we discard it here. See the .dfn files in the + * scripts directory. + */ + +#ifndef PNG_EXPORTA +# define PNG_EXPORTA(ordinal, type, name, args, attributes) \ + PNG_FUNCTION(PNG_EXPORT_TYPE(type), (PNGAPI name), args, \ + PNG_LINKAGE_API attributes) +#endif + +/* ANSI-C (C90) does not permit a macro to be invoked with an empty argument, + * so make something non-empty to satisfy the requirement: + */ +#define PNG_EMPTY /*empty list*/ + +#define PNG_EXPORT(ordinal, type, name, args) \ + PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY) + +/* Use PNG_REMOVED to comment out a removed interface. */ +#ifndef PNG_REMOVED +# define PNG_REMOVED(ordinal, type, name, args, attributes) +#endif + +#ifndef PNG_CALLBACK +# define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) args +#endif + +/* Support for compiler specific function attributes. These are used + * so that where compiler support is available incorrect use of API + * functions in png.h will generate compiler warnings. + * + * Added at libpng-1.2.41. + */ + +#ifndef PNG_NO_PEDANTIC_WARNINGS +# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED +# define PNG_PEDANTIC_WARNINGS_SUPPORTED +# endif +#endif + +#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED + /* Support for compiler specific function attributes. These are used + * so that where compiler support is available, incorrect use of API + * functions in png.h will generate compiler warnings. Added at libpng + * version 1.2.41. Disabling these removes the warnings but may also produce + * less efficient code. + */ +# if defined(__clang__) && defined(__has_attribute) + /* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */ +# if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__) +# define PNG_USE_RESULT __attribute__((__warn_unused_result__)) +# endif +# if !defined(PNG_NORETURN) && __has_attribute(__noreturn__) +# define PNG_NORETURN __attribute__((__noreturn__)) +# endif +# if !defined(PNG_ALLOCATED) && __has_attribute(__malloc__) +# define PNG_ALLOCATED __attribute__((__malloc__)) +# endif +# if !defined(PNG_DEPRECATED) && __has_attribute(__deprecated__) +# define PNG_DEPRECATED __attribute__((__deprecated__)) +# endif +# if !defined(PNG_PRIVATE) +# ifdef __has_extension +# if __has_extension(attribute_unavailable_with_message) +# define PNG_PRIVATE __attribute__((__unavailable__(\ + "This function is not exported by libpng."))) +# endif +# endif +# endif +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif + +# elif defined(__GNUC__) +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT __attribute__((__warn_unused_result__)) +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __attribute__((__noreturn__)) +# endif +# if __GNUC__ >= 3 +# ifndef PNG_ALLOCATED +# define PNG_ALLOCATED __attribute__((__malloc__)) +# endif +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __attribute__((__deprecated__)) +# endif +# ifndef PNG_PRIVATE +# if 0 /* Doesn't work so we use deprecated instead*/ +# define PNG_PRIVATE \ + __attribute__((warning("This function is not exported by libpng."))) +# else +# define PNG_PRIVATE \ + __attribute__((__deprecated__)) +# endif +# endif +# if ((__GNUC__ > 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1)) +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif +# endif /* __GNUC__.__GNUC_MINOR__ > 3.0 */ +# endif /* __GNUC__ >= 3 */ + +# elif defined(_MSC_VER) && (_MSC_VER >= 1300) +# ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* not supported */ +# endif +# ifndef PNG_NORETURN +# define PNG_NORETURN __declspec(noreturn) +# endif +# ifndef PNG_ALLOCATED +# if (_MSC_VER >= 1400) +# define PNG_ALLOCATED __declspec(restrict) +# endif +# endif +# ifndef PNG_DEPRECATED +# define PNG_DEPRECATED __declspec(deprecated) +# endif +# ifndef PNG_PRIVATE +# define PNG_PRIVATE __declspec(deprecated) +# endif +# ifndef PNG_RESTRICT +# if (_MSC_VER >= 1400) +# define PNG_RESTRICT __restrict +# endif +# endif + +# elif defined(__WATCOMC__) +# ifndef PNG_RESTRICT +# define PNG_RESTRICT __restrict +# endif +# endif +#endif /* PNG_PEDANTIC_WARNINGS */ + +#ifndef PNG_DEPRECATED +# define PNG_DEPRECATED /* Use of this function is deprecated */ +#endif +#ifndef PNG_USE_RESULT +# define PNG_USE_RESULT /* The result of this function must be checked */ +#endif +#ifndef PNG_NORETURN +# define PNG_NORETURN /* This function does not return */ +#endif +#ifndef PNG_ALLOCATED +# define PNG_ALLOCATED /* The result of the function is new memory */ +#endif +#ifndef PNG_PRIVATE +# define PNG_PRIVATE /* This is a private libpng function */ +#endif +#ifndef PNG_RESTRICT +# define PNG_RESTRICT /* The C99 "restrict" feature */ +#endif + +#ifndef PNG_FP_EXPORT /* A floating point API. */ +# ifdef PNG_FLOATING_POINT_SUPPORTED +# define PNG_FP_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args); +# else /* No floating point APIs */ +# define PNG_FP_EXPORT(ordinal, type, name, args) +# endif +#endif +#ifndef PNG_FIXED_EXPORT /* A fixed point API. */ +# ifdef PNG_FIXED_POINT_SUPPORTED +# define PNG_FIXED_EXPORT(ordinal, type, name, args)\ + PNG_EXPORT(ordinal, type, name, args); +# else /* No fixed point APIs */ +# define PNG_FIXED_EXPORT(ordinal, type, name, args) +# endif +#endif + +#ifndef PNG_BUILDING_SYMBOL_TABLE +/* Some typedefs to get us started. These should be safe on most of the common + * platforms. + * + * png_uint_32 and png_int_32 may, currently, be larger than required to hold a + * 32-bit value however this is not normally advisable. + * + * png_uint_16 and png_int_16 should always be two bytes in size - this is + * verified at library build time. + * + * png_byte must always be one byte in size. + * + * The checks below use constants from limits.h, as defined by the ISOC90 + * standard. + */ +#if CHAR_BIT == 8 && UCHAR_MAX == 255 + typedef unsigned char png_byte; +#else +# error libpng requires 8-bit bytes +#endif + +#if INT_MIN == -32768 && INT_MAX == 32767 + typedef int png_int_16; +#elif SHRT_MIN == -32768 && SHRT_MAX == 32767 + typedef short png_int_16; +#else +# error libpng requires a signed 16-bit integer type +#endif + +#if UINT_MAX == 65535 + typedef unsigned int png_uint_16; +#elif USHRT_MAX == 65535 + typedef unsigned short png_uint_16; +#else +# error libpng requires an unsigned 16-bit integer type +#endif + +#if INT_MIN < -2147483646 && INT_MAX > 2147483646 + typedef int png_int_32; +#elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646 + typedef long int png_int_32; +#else +# error libpng requires a signed 32-bit (or longer) integer type +#endif + +#if UINT_MAX > 4294967294U + typedef unsigned int png_uint_32; +#elif ULONG_MAX > 4294967294U + typedef unsigned long int png_uint_32; +#else +# error libpng requires an unsigned 32-bit (or longer) integer type +#endif + +/* Prior to 1.6.0, it was possible to disable the use of size_t and ptrdiff_t. + * From 1.6.0 onwards, an ISO C90 compiler, as well as a standard-compliant + * behavior of sizeof and ptrdiff_t are required. + * The legacy typedefs are provided here for backwards compatibility. + */ +typedef size_t png_size_t; +typedef ptrdiff_t png_ptrdiff_t; + +/* libpng needs to know the maximum value of 'size_t' and this controls the + * definition of png_alloc_size_t, below. This maximum value of size_t limits + * but does not control the maximum allocations the library makes - there is + * direct application control of this through png_set_user_limits(). + */ +#ifndef PNG_SMALL_SIZE_T + /* Compiler specific tests for systems where size_t is known to be less than + * 32 bits (some of these systems may no longer work because of the lack of + * 'far' support; see above.) + */ +# if (defined(__TURBOC__) && !defined(__FLAT__)) ||\ + (defined(_MSC_VER) && defined(MAXSEG_64K)) +# define PNG_SMALL_SIZE_T +# endif +#endif + +/* png_alloc_size_t is guaranteed to be no smaller than size_t, and no smaller + * than png_uint_32. Casts from size_t or png_uint_32 to png_alloc_size_t are + * not necessary; in fact, it is recommended not to use them at all, so that + * the compiler can complain when something turns out to be problematic. + * + * Casts in the other direction (from png_alloc_size_t to size_t or + * png_uint_32) should be explicitly applied; however, we do not expect to + * encounter practical situations that require such conversions. + * + * PNG_SMALL_SIZE_T must be defined if the maximum value of size_t is less than + * 4294967295 - i.e. less than the maximum value of png_uint_32. + */ +#ifdef PNG_SMALL_SIZE_T + typedef png_uint_32 png_alloc_size_t; +#else + typedef size_t png_alloc_size_t; +#endif + +/* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler + * implementations of Intel CPU specific support of user-mode segmented address + * spaces, where 16-bit pointers address more than 65536 bytes of memory using + * separate 'segment' registers. The implementation requires two different + * types of pointer (only one of which includes the segment value.) + * + * If required this support is available in version 1.2 of libpng and may be + * available in versions through 1.5, although the correctness of the code has + * not been verified recently. + */ + +/* Typedef for floating-point numbers that are converted to fixed-point with a + * multiple of 100,000, e.g., gamma + */ +typedef png_int_32 png_fixed_point; + +/* Add typedefs for pointers */ +typedef void * png_voidp; +typedef const void * png_const_voidp; +typedef png_byte * png_bytep; +typedef const png_byte * png_const_bytep; +typedef png_uint_32 * png_uint_32p; +typedef const png_uint_32 * png_const_uint_32p; +typedef png_int_32 * png_int_32p; +typedef const png_int_32 * png_const_int_32p; +typedef png_uint_16 * png_uint_16p; +typedef const png_uint_16 * png_const_uint_16p; +typedef png_int_16 * png_int_16p; +typedef const png_int_16 * png_const_int_16p; +typedef char * png_charp; +typedef const char * png_const_charp; +typedef png_fixed_point * png_fixed_point_p; +typedef const png_fixed_point * png_const_fixed_point_p; +typedef size_t * png_size_tp; +typedef const size_t * png_const_size_tp; + +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double * png_doublep; +typedef const double * png_const_doublep; +#endif + +/* Pointers to pointers; i.e. arrays */ +typedef png_byte * * png_bytepp; +typedef png_uint_32 * * png_uint_32pp; +typedef png_int_32 * * png_int_32pp; +typedef png_uint_16 * * png_uint_16pp; +typedef png_int_16 * * png_int_16pp; +typedef const char * * png_const_charpp; +typedef char * * png_charpp; +typedef png_fixed_point * * png_fixed_point_pp; +#ifdef PNG_FLOATING_POINT_SUPPORTED +typedef double * * png_doublepp; +#endif + +/* Pointers to pointers to pointers; i.e., pointer to array */ +typedef char * * * png_charppp; + +#ifdef PNG_STDIO_SUPPORTED +/* With PNG_STDIO_SUPPORTED it was possible to use I/O streams that were + * not necessarily stdio FILE streams, to allow building Windows applications + * before Win32 and Windows CE applications before WinCE 3.0, but that kind + * of support has long been discontinued. + */ +typedef FILE * png_FILE_p; /* [Deprecated] */ +#endif + +#endif /* PNG_BUILDING_SYMBOL_TABLE */ + +#endif /* PNGCONF_H */ diff --git a/widget/milsko/milskosrc/external/libpng/include/pngdebug.h b/widget/milsko/milskosrc/external/libpng/include/pngdebug.h new file mode 100644 index 0000000000..af1ae9e821 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/include/pngdebug.h @@ -0,0 +1,156 @@ +/* pngdebug.h - internal debugging macros for libpng + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2013 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +#ifndef PNGPRIV_H +# error This file must not be included by applications; please include +#endif + +/* Define PNG_DEBUG at compile time for debugging information. Higher + * numbers for PNG_DEBUG mean more debugging information. This has + * only been added since version 0.95 so it is not implemented throughout + * libpng yet, but more support will be added as needed. + * + * png_debug[1-2]?(level, message ,arg{0-2}) + * Expands to a statement (either a simple expression or a compound + * do..while(0) statement) that outputs a message with parameter + * substitution if PNG_DEBUG is defined to 2 or more. If PNG_DEBUG + * is undefined, 0 or 1 every png_debug expands to a simple expression + * (actually ((void)0)). + * + * level: level of detail of message, starting at 0. A level 'n' + * message is preceded by 'n' 3-space indentations (not implemented + * on Microsoft compilers unless PNG_DEBUG_FILE is also + * defined, to allow debug DLL compilation with no standard IO). + * message: a printf(3) style text string. A trailing '\n' is added + * to the message. + * arg: 0 to 2 arguments for printf(3) style substitution in message. + */ +#ifndef PNGDEBUG_H +#define PNGDEBUG_H +/* These settings control the formatting of messages in png.c and pngerror.c */ +/* Moved to pngdebug.h at 1.5.0 */ +# ifndef PNG_LITERAL_SHARP +# define PNG_LITERAL_SHARP 0x23 +# endif +# ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET +# define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b +# endif +# ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET +# define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d +# endif +# ifndef PNG_STRING_NEWLINE +# define PNG_STRING_NEWLINE "\n" +# endif + +#ifdef PNG_DEBUG +# if (PNG_DEBUG > 0) +# if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER) +# include +# if (PNG_DEBUG > 1) +# ifndef _DEBUG +# define _DEBUG +# endif +# ifndef png_debug +# define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2) +# endif +# endif +# else /* PNG_DEBUG_FILE || !_MSC_VER */ +# ifndef PNG_STDIO_SUPPORTED +# include /* not included yet */ +# endif +# ifndef PNG_DEBUG_FILE +# define PNG_DEBUG_FILE stderr +# endif /* PNG_DEBUG_FILE */ + +# if (PNG_DEBUG > 1) +# ifdef __STDC__ +# ifndef png_debug +# define png_debug(l,m) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s" m PNG_STRING_NEWLINE,(num_tabs==1 ? " " : \ + (num_tabs==2 ? " " : (num_tabs>2 ? " " : "")))); \ + } while (0) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s" m PNG_STRING_NEWLINE,(num_tabs==1 ? " " : \ + (num_tabs==2 ? " " : (num_tabs>2 ? " " : ""))),p1); \ + } while (0) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + do { \ + int num_tabs=l; \ + fprintf(PNG_DEBUG_FILE,"%s" m PNG_STRING_NEWLINE,(num_tabs==1 ? " " : \ + (num_tabs==2 ? " " : (num_tabs>2 ? " " : ""))),p1,p2);\ + } while (0) +# endif +# else /* __STDC __ */ +# ifndef png_debug +# define png_debug(l,m) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format); \ + } while (0) +# endif +# ifndef png_debug1 +# define png_debug1(l,m,p1) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1); \ + } while (0) +# endif +# ifndef png_debug2 +# define png_debug2(l,m,p1,p2) \ + do { \ + int num_tabs=l; \ + char format[256]; \ + snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \ + (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \ + m,PNG_STRING_NEWLINE); \ + fprintf(PNG_DEBUG_FILE,format,p1,p2); \ + } while (0) +# endif +# endif /* __STDC __ */ +# endif /* (PNG_DEBUG > 1) */ + +# endif /* _MSC_VER */ +# endif /* (PNG_DEBUG > 0) */ +#endif /* PNG_DEBUG */ +#ifndef png_debug +# define png_debug(l, m) ((void)0) +#endif +#ifndef png_debug1 +# define png_debug1(l, m, p1) ((void)0) +#endif +#ifndef png_debug2 +# define png_debug2(l, m, p1, p2) ((void)0) +#endif +#endif /* PNGDEBUG_H */ diff --git a/widget/milsko/milskosrc/external/libpng/include/pnginfo.h b/widget/milsko/milskosrc/external/libpng/include/pnginfo.h new file mode 100644 index 0000000000..584a42f956 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/include/pnginfo.h @@ -0,0 +1,263 @@ +/* pnginfo.h - internal structures for libpng + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2013,2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +#ifndef PNGPRIV_H +# error This file must not be included by applications; please include +#endif + +/* INTERNAL, PRIVATE definition of a PNG. + * + * png_info is a modifiable description of a PNG datastream. The fields inside + * this structure are accessed through png_get_() functions and modified + * using png_set_() functions. + * + * Some functions in libpng do directly access members of png_info. However, + * this should be avoided. png_struct objects contain members which hold + * caches, sometimes optimised, of the values from png_info objects, and + * png_info is not passed to the functions which read and write image data. + */ +#ifndef PNGINFO_H +#define PNGINFO_H + +struct png_info_def +{ + /* The following are necessary for every PNG file */ + png_uint_32 width; /* width of image in pixels (from IHDR) */ + png_uint_32 height; /* height of image in pixels (from IHDR) */ + png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */ + size_t rowbytes; /* bytes needed to hold an untransformed row */ + png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */ + png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */ + png_uint_16 num_trans; /* number of transparent palette color (tRNS) */ + png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ + png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */ + /* The following three should have been named *_method not *_type */ + png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ + png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ + png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + + /* The following are set by png_set_IHDR, called from the application on + * write, but the are never actually used by the write code. + */ + png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */ + png_byte pixel_depth; /* number of bits per pixel */ + png_byte spare_byte; /* to align the data, and for future use */ + +#ifdef PNG_READ_SUPPORTED + /* This is never set during write */ + png_byte signature[8]; /* magic bytes read by libpng from start of file */ +#endif + + /* The rest of the data is optional. If you are reading, check the + * valid field to see if the information in these are valid. If you + * are writing, set the valid field to those chunks you want written, + * and initialize the appropriate fields below. + */ + +#ifdef PNG_cICP_SUPPORTED + /* cICP chunk data */ + png_byte cicp_colour_primaries; + png_byte cicp_transfer_function; + png_byte cicp_matrix_coefficients; + png_byte cicp_video_full_range_flag; +#endif + +#ifdef PNG_iCCP_SUPPORTED + /* iCCP chunk data. */ + png_charp iccp_name; /* profile name */ + png_bytep iccp_profile; /* International Color Consortium profile data */ + png_uint_32 iccp_proflen; /* ICC profile data length */ +#endif + +#ifdef PNG_cLLI_SUPPORTED + png_uint_32 maxCLL; /* cd/m2 (nits) * 10,000 */ + png_uint_32 maxFALL; +#endif + +#ifdef PNG_mDCV_SUPPORTED + png_uint_16 mastering_red_x; /* CIE (xy) x * 50,000 */ + png_uint_16 mastering_red_y; + png_uint_16 mastering_green_x; + png_uint_16 mastering_green_y; + png_uint_16 mastering_blue_x; + png_uint_16 mastering_blue_y; + png_uint_16 mastering_white_x; + png_uint_16 mastering_white_y; + png_uint_32 mastering_maxDL; /* cd/m2 (nits) * 10,000 */ + png_uint_32 mastering_minDL; +#endif + +#ifdef PNG_TEXT_SUPPORTED + /* The tEXt, and zTXt chunks contain human-readable textual data in + * uncompressed, compressed, and optionally compressed forms, respectively. + * The data in "text" is an array of pointers to uncompressed, + * null-terminated C strings. Each chunk has a keyword that describes the + * textual data contained in that chunk. Keywords are not required to be + * unique, and the text string may be empty. Any number of text chunks may + * be in an image. + */ + int num_text; /* number of comments read or comments to write */ + int max_text; /* current size of text array */ + png_textp text; /* array of comments read or comments to write */ +#endif /* TEXT */ + +#ifdef PNG_tIME_SUPPORTED + /* The tIME chunk holds the last time the displayed image data was + * modified. See the png_time struct for the contents of this struct. + */ + png_time mod_time; +#endif + +#ifdef PNG_sBIT_SUPPORTED + /* The sBIT chunk specifies the number of significant high-order bits + * in the pixel data. Values are in the range [1, bit_depth], and are + * only specified for the channels in the pixel data. The contents of + * the low-order bits is not specified. Data is valid if + * (valid & PNG_INFO_sBIT) is non-zero. + */ + png_color_8 sig_bit; /* significant bits in color channels */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \ +defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The tRNS chunk supplies transparency data for paletted images and + * other image types that don't need a full alpha channel. There are + * "num_trans" transparency values for a paletted image, stored in the + * same order as the palette colors, starting from index 0. Values + * for the data are in the range [0, 255], ranging from fully transparent + * to fully opaque, respectively. For non-paletted images, there is a + * single color specified that should be treated as fully transparent. + * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. + */ + png_bytep trans_alpha; /* alpha values for paletted image */ + png_color_16 trans_color; /* transparent color for non-palette image */ +#endif + +#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + /* The bKGD chunk gives the suggested image background color if the + * display program does not have its own background color and the image + * is needs to composited onto a background before display. The colors + * in "background" are normally in the same color space/depth as the + * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero. + */ + png_color_16 background; +#endif + +#ifdef PNG_oFFs_SUPPORTED + /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards + * and downwards from the top-left corner of the display, page, or other + * application-specific co-ordinate space. See the PNG_OFFSET_ defines + * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero. + */ + png_int_32 x_offset; /* x offset on page */ + png_int_32 y_offset; /* y offset on page */ + png_byte offset_unit_type; /* offset units type */ +#endif + +#ifdef PNG_pHYs_SUPPORTED + /* The pHYs chunk gives the physical pixel density of the image for + * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_ + * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. + */ + png_uint_32 x_pixels_per_unit; /* horizontal pixel density */ + png_uint_32 y_pixels_per_unit; /* vertical pixel density */ + png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */ +#endif + +#ifdef PNG_eXIf_SUPPORTED + png_uint_32 num_exif; /* Added at libpng-1.6.31 */ + png_bytep exif; +#endif + +#ifdef PNG_hIST_SUPPORTED + /* The hIST chunk contains the relative frequency or importance of the + * various palette entries, so that a viewer can intelligently select a + * reduced-color palette, if required. Data is an array of "num_palette" + * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST) + * is non-zero. + */ + png_uint_16p hist; +#endif + +#ifdef PNG_pCAL_SUPPORTED + /* The pCAL chunk describes a transformation between the stored pixel + * values and original physical data values used to create the image. + * The integer range [0, 2^bit_depth - 1] maps to the floating-point + * range given by [pcal_X0, pcal_X1], and are further transformed by a + * (possibly non-linear) transformation function given by "pcal_type" + * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_ + * defines below, and the PNG-Group's PNG extensions document for a + * complete description of the transformations and how they should be + * implemented, and for a description of the ASCII parameter strings. + * Data values are valid if (valid & PNG_INFO_pCAL) non-zero. + */ + png_charp pcal_purpose; /* pCAL chunk description string */ + png_int_32 pcal_X0; /* minimum value */ + png_int_32 pcal_X1; /* maximum value */ + png_charp pcal_units; /* Latin-1 string giving physical units */ + png_charpp pcal_params; /* ASCII strings containing parameter values */ + png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */ + png_byte pcal_nparams; /* number of parameters given in pcal_params */ +#endif + +/* New members added in libpng-1.0.6 */ + png_uint_32 free_me; /* flags items libpng is responsible for freeing */ + +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED + /* Storage for unknown chunks that the library doesn't recognize. */ + png_unknown_chunkp unknown_chunks; + + /* The type of this field is limited by the type of + * png_struct::user_chunk_cache_max, else overflow can occur. + */ + int unknown_chunks_num; +#endif + +#ifdef PNG_sPLT_SUPPORTED + /* Data on sPLT chunks (there may be more than one). */ + png_sPLT_tp splt_palettes; + int splt_palettes_num; /* Match type returned by png_get API */ +#endif + +#ifdef PNG_sCAL_SUPPORTED + /* The sCAL chunk describes the actual physical dimensions of the + * subject matter of the graphic. The chunk contains a unit specification + * a byte value, and two ASCII strings representing floating-point + * values. The values are width and height corresponding to one pixel + * in the image. Data values are valid if (valid & PNG_INFO_sCAL) is + * non-zero. + */ + png_byte scal_unit; /* unit of physical scale */ + png_charp scal_s_width; /* string containing height */ + png_charp scal_s_height; /* string containing width */ +#endif + +#ifdef PNG_INFO_IMAGE_SUPPORTED + /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) + non-zero */ + /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ + png_bytepp row_pointers; /* the image bits */ +#endif + +#ifdef PNG_cHRM_SUPPORTED + png_xy cHRM; +#endif + +#ifdef PNG_gAMA_SUPPORTED + png_fixed_point gamma; +#endif + +#ifdef PNG_sRGB_SUPPORTED + int rendering_intent; +#endif +}; +#endif /* PNGINFO_H */ diff --git a/widget/milsko/milskosrc/external/libpng/include/pnglibconf.h b/widget/milsko/milskosrc/external/libpng/include/pnglibconf.h new file mode 100644 index 0000000000..52fab8bfe3 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/include/pnglibconf.h @@ -0,0 +1,237 @@ +/* pnglibconf.h - library build configuration */ + +/* libpng version 1.6.50 */ + +/* Copyright (c) 2018-2025 Cosmin Truta */ +/* Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson */ + +/* This code is released under the libpng license. */ +/* For conditions of distribution and use, see the disclaimer */ +/* and license in png.h */ + +/* pnglibconf.h */ +/* Machine generated file: DO NOT EDIT */ +/* Derived from: scripts/pnglibconf.dfa */ +#ifndef PNGLCONF_H +#define PNGLCONF_H +/* options */ +#define PNG_16BIT_SUPPORTED +#define PNG_ALIGNED_MEMORY_SUPPORTED +/*#undef PNG_ARM_NEON_API_SUPPORTED*/ +/*#undef PNG_ARM_NEON_CHECK_SUPPORTED*/ +#define PNG_BENIGN_ERRORS_SUPPORTED +#define PNG_BENIGN_READ_ERRORS_SUPPORTED +/*#undef PNG_BENIGN_WRITE_ERRORS_SUPPORTED*/ +#define PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +#define PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_COLORSPACE_SUPPORTED +#define PNG_CONSOLE_IO_SUPPORTED +#define PNG_CONVERT_tIME_SUPPORTED +/*#undef PNG_DISABLE_ADLER32_CHECK_SUPPORTED*/ +#define PNG_EASY_ACCESS_SUPPORTED +/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/ +#define PNG_ERROR_TEXT_SUPPORTED +#define PNG_FIXED_POINT_SUPPORTED +#define PNG_FLOATING_ARITHMETIC_SUPPORTED +#define PNG_FLOATING_POINT_SUPPORTED +#define PNG_FORMAT_AFIRST_SUPPORTED +#define PNG_FORMAT_BGR_SUPPORTED +#define PNG_GAMMA_SUPPORTED +#define PNG_GET_PALETTE_MAX_SUPPORTED +#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED +#define PNG_INCH_CONVERSIONS_SUPPORTED +#define PNG_INFO_IMAGE_SUPPORTED +#define PNG_IO_STATE_SUPPORTED +/*#undef PNG_MIPS_MMI_API_SUPPORTED*/ +/*#undef PNG_MIPS_MMI_CHECK_SUPPORTED*/ +/*#undef PNG_MIPS_MSA_API_SUPPORTED*/ +/*#undef PNG_MIPS_MSA_CHECK_SUPPORTED*/ +#define PNG_MNG_FEATURES_SUPPORTED +#define PNG_POINTER_INDEXING_SUPPORTED +/*#undef PNG_POWERPC_VSX_API_SUPPORTED*/ +/*#undef PNG_POWERPC_VSX_CHECK_SUPPORTED*/ +#define PNG_PROGRESSIVE_READ_SUPPORTED +#define PNG_READ_16BIT_SUPPORTED +#define PNG_READ_ALPHA_MODE_SUPPORTED +#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_READ_BACKGROUND_SUPPORTED +#define PNG_READ_BGR_SUPPORTED +#define PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_READ_COMPOSITE_NODIV_SUPPORTED +#define PNG_READ_COMPRESSED_TEXT_SUPPORTED +#define PNG_READ_EXPAND_16_SUPPORTED +#define PNG_READ_EXPAND_SUPPORTED +#define PNG_READ_FILLER_SUPPORTED +#define PNG_READ_GAMMA_SUPPORTED +#define PNG_READ_GET_PALETTE_MAX_SUPPORTED +#define PNG_READ_GRAY_TO_RGB_SUPPORTED +#define PNG_READ_INTERLACING_SUPPORTED +#define PNG_READ_INT_FUNCTIONS_SUPPORTED +#define PNG_READ_INVERT_ALPHA_SUPPORTED +#define PNG_READ_INVERT_SUPPORTED +#define PNG_READ_OPT_PLTE_SUPPORTED +#define PNG_READ_PACKSWAP_SUPPORTED +#define PNG_READ_PACK_SUPPORTED +#define PNG_READ_QUANTIZE_SUPPORTED +#define PNG_READ_RGB_TO_GRAY_SUPPORTED +#define PNG_READ_SCALE_16_TO_8_SUPPORTED +#define PNG_READ_SHIFT_SUPPORTED +#define PNG_READ_STRIP_16_TO_8_SUPPORTED +#define PNG_READ_STRIP_ALPHA_SUPPORTED +#define PNG_READ_SUPPORTED +#define PNG_READ_SWAP_ALPHA_SUPPORTED +#define PNG_READ_SWAP_SUPPORTED +#define PNG_READ_TEXT_SUPPORTED +#define PNG_READ_TRANSFORMS_SUPPORTED +#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_READ_USER_CHUNKS_SUPPORTED +#define PNG_READ_USER_TRANSFORM_SUPPORTED +#define PNG_READ_bKGD_SUPPORTED +#define PNG_READ_cHRM_SUPPORTED +#define PNG_READ_cICP_SUPPORTED +#define PNG_READ_cLLI_SUPPORTED +#define PNG_READ_eXIf_SUPPORTED +#define PNG_READ_gAMA_SUPPORTED +#define PNG_READ_hIST_SUPPORTED +#define PNG_READ_iCCP_SUPPORTED +#define PNG_READ_iTXt_SUPPORTED +#define PNG_READ_mDCV_SUPPORTED +#define PNG_READ_oFFs_SUPPORTED +#define PNG_READ_pCAL_SUPPORTED +#define PNG_READ_pHYs_SUPPORTED +#define PNG_READ_sBIT_SUPPORTED +#define PNG_READ_sCAL_SUPPORTED +#define PNG_READ_sPLT_SUPPORTED +#define PNG_READ_sRGB_SUPPORTED +#define PNG_READ_tEXt_SUPPORTED +#define PNG_READ_tIME_SUPPORTED +#define PNG_READ_tRNS_SUPPORTED +#define PNG_READ_zTXt_SUPPORTED +#define PNG_SAVE_INT_32_SUPPORTED +#define PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_SEQUENTIAL_READ_SUPPORTED +#define PNG_SETJMP_SUPPORTED +#define PNG_SET_OPTION_SUPPORTED +#define PNG_SET_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_SET_USER_LIMITS_SUPPORTED +#define PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED +#define PNG_SIMPLIFIED_READ_BGR_SUPPORTED +#define PNG_SIMPLIFIED_READ_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED +#define PNG_SIMPLIFIED_WRITE_SUPPORTED +#define PNG_STDIO_SUPPORTED +#define PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_TEXT_SUPPORTED +#define PNG_TIME_RFC1123_SUPPORTED +#define PNG_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_USER_CHUNKS_SUPPORTED +#define PNG_USER_LIMITS_SUPPORTED +#define PNG_USER_MEM_SUPPORTED +#define PNG_USER_TRANSFORM_INFO_SUPPORTED +#define PNG_USER_TRANSFORM_PTR_SUPPORTED +#define PNG_WARNINGS_SUPPORTED +#define PNG_WRITE_16BIT_SUPPORTED +#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED +#define PNG_WRITE_BGR_SUPPORTED +#define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED +#define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED +#define PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED +#define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +#define PNG_WRITE_FILLER_SUPPORTED +#define PNG_WRITE_FILTER_SUPPORTED +#define PNG_WRITE_FLUSH_SUPPORTED +#define PNG_WRITE_GET_PALETTE_MAX_SUPPORTED +#define PNG_WRITE_INTERLACING_SUPPORTED +#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED +#define PNG_WRITE_INVERT_ALPHA_SUPPORTED +#define PNG_WRITE_INVERT_SUPPORTED +#define PNG_WRITE_OPTIMIZE_CMF_SUPPORTED +#define PNG_WRITE_PACKSWAP_SUPPORTED +#define PNG_WRITE_PACK_SUPPORTED +#define PNG_WRITE_SHIFT_SUPPORTED +#define PNG_WRITE_SUPPORTED +#define PNG_WRITE_SWAP_ALPHA_SUPPORTED +#define PNG_WRITE_SWAP_SUPPORTED +#define PNG_WRITE_TEXT_SUPPORTED +#define PNG_WRITE_TRANSFORMS_SUPPORTED +#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED +#define PNG_WRITE_USER_TRANSFORM_SUPPORTED +#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED +#define PNG_WRITE_bKGD_SUPPORTED +#define PNG_WRITE_cHRM_SUPPORTED +#define PNG_WRITE_cICP_SUPPORTED +#define PNG_WRITE_cLLI_SUPPORTED +#define PNG_WRITE_eXIf_SUPPORTED +#define PNG_WRITE_gAMA_SUPPORTED +#define PNG_WRITE_hIST_SUPPORTED +#define PNG_WRITE_iCCP_SUPPORTED +#define PNG_WRITE_iTXt_SUPPORTED +#define PNG_WRITE_mDCV_SUPPORTED +#define PNG_WRITE_oFFs_SUPPORTED +#define PNG_WRITE_pCAL_SUPPORTED +#define PNG_WRITE_pHYs_SUPPORTED +#define PNG_WRITE_sBIT_SUPPORTED +#define PNG_WRITE_sCAL_SUPPORTED +#define PNG_WRITE_sPLT_SUPPORTED +#define PNG_WRITE_sRGB_SUPPORTED +#define PNG_WRITE_tEXt_SUPPORTED +#define PNG_WRITE_tIME_SUPPORTED +#define PNG_WRITE_tRNS_SUPPORTED +#define PNG_WRITE_zTXt_SUPPORTED +#define PNG_bKGD_SUPPORTED +#define PNG_cHRM_SUPPORTED +#define PNG_cICP_SUPPORTED +#define PNG_cLLI_SUPPORTED +#define PNG_eXIf_SUPPORTED +#define PNG_gAMA_SUPPORTED +#define PNG_hIST_SUPPORTED +#define PNG_iCCP_SUPPORTED +#define PNG_iTXt_SUPPORTED +#define PNG_mDCV_SUPPORTED +#define PNG_oFFs_SUPPORTED +#define PNG_pCAL_SUPPORTED +#define PNG_pHYs_SUPPORTED +#define PNG_sBIT_SUPPORTED +#define PNG_sCAL_SUPPORTED +#define PNG_sPLT_SUPPORTED +#define PNG_sRGB_SUPPORTED +#define PNG_tEXt_SUPPORTED +#define PNG_tIME_SUPPORTED +#define PNG_tRNS_SUPPORTED +#define PNG_zTXt_SUPPORTED +/* end of options */ +/* settings */ +#ifdef __WATCOMC__ +#define PNG_API_RULE 2 +#else +#define PNG_API_RULE 0 +#endif +#define PNG_DEFAULT_READ_MACROS 1 +#define PNG_GAMMA_THRESHOLD_FIXED 5000 +#define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE +#define PNG_INFLATE_BUF_SIZE 1024 +#define PNG_LINKAGE_API extern +#define PNG_LINKAGE_CALLBACK extern +#define PNG_LINKAGE_DATA extern +#define PNG_LINKAGE_FUNCTION extern +#define PNG_MAX_GAMMA_8 11 +#define PNG_QUANTIZE_BLUE_BITS 5 +#define PNG_QUANTIZE_GREEN_BITS 5 +#define PNG_QUANTIZE_RED_BITS 5 +#define PNG_TEXT_Z_DEFAULT_COMPRESSION (-1) +#define PNG_TEXT_Z_DEFAULT_STRATEGY 0 +#define PNG_USER_CHUNK_CACHE_MAX 1000 +#define PNG_USER_CHUNK_MALLOC_MAX 8000000 +#define PNG_USER_HEIGHT_MAX 1000000 +#define PNG_USER_WIDTH_MAX 1000000 +#define PNG_ZBUF_SIZE 8192 +#define PNG_ZLIB_VERNUM 0 /* unknown */ +#define PNG_Z_DEFAULT_COMPRESSION (-1) +#define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0 +#define PNG_Z_DEFAULT_STRATEGY 1 +#define PNG_sCAL_PRECISION 5 +#define PNG_sRGB_PROFILE_CHECKS 2 +/* end of settings */ +#endif /* PNGLCONF_H */ diff --git a/widget/milsko/milskosrc/external/libpng/include/pngpriv.h b/widget/milsko/milskosrc/external/libpng/include/pngpriv.h new file mode 100644 index 0000000000..e3054b90aa --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/include/pngpriv.h @@ -0,0 +1,2217 @@ +/* pngpriv.h - private declarations for use inside libpng + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +/* The symbols declared in this file (including the functions declared + * as extern) are PRIVATE. They are not part of the libpng public + * interface, and are not recommended for use by regular applications. + * Some of them may become public in the future; others may stay private, + * change in an incompatible way, or even disappear. + * Although the libpng users are not forbidden to include this header, + * they should be well aware of the issues that may arise from doing so. + */ + + +/* pngpriv.h must be included first in each translation unit inside libpng. + * On the other hand, it must not be included at all, directly or indirectly, + * by any application code that uses the libpng API. + */ +#ifndef PNGPRIV_H +# define PNGPRIV_H +#else +# error Duplicate inclusion of pngpriv.h; please check the libpng source files +#endif + +#if defined(PNG_H) || defined(PNGCONF_H) || defined(PNGLCONF_H) +# error This file must not be included by applications; please include +#endif + +/* Feature Test Macros. The following are defined here to ensure that correctly + * implemented libraries reveal the APIs libpng needs to build and hide those + * that are not needed and potentially damaging to the compilation. + * + * Feature Test Macros must be defined before any system header is included (see + * POSIX 1003.1 2.8.2 "POSIX Symbols." + * + * These macros only have an effect if the operating system supports either + * POSIX 1003.1 or C99, or both. On other operating systems (particularly + * Windows/Visual Studio) there is no effect; the OS specific tests below are + * still required (as of 2011-05-02.) + */ +#ifndef _POSIX_SOURCE +# define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */ +#endif + +#ifndef PNG_VERSION_INFO_ONLY +/* Standard library headers not required by png.h: */ +# include +# include +#endif + +#define PNGLIB_BUILD /*libpng is being built, not used*/ + +/* If HAVE_CONFIG_H is defined during the build then the build system must + * provide an appropriate "config.h" file on the include path. The header file + * must provide definitions as required below (search for "HAVE_CONFIG_H"); + * see configure.ac for more details of the requirements. The macro + * "PNG_NO_CONFIG_H" is provided for maintainers to test for dependencies on + * 'configure'; define this macro to prevent the configure build including the + * configure generated config.h. Libpng is expected to compile without *any* + * special build system support on a reasonably ANSI-C compliant system. + */ +#if defined(HAVE_CONFIG_H) && !defined(PNG_NO_CONFIG_H) +# include + /* Pick up the definition of 'restrict' from config.h if it was read: */ +# define PNG_RESTRICT restrict +#endif + +/* To support symbol prefixing it is necessary to know *before* including png.h + * whether the fixed point (and maybe other) APIs are exported, because if they + * are not internal definitions may be required. This is handled below just + * before png.h is included, but load the configuration now if it is available. + */ +#include "pnglibconf.h" + +/* Local renames may change non-exported API functions from png.h */ +#if defined(PNG_PREFIX) && !defined(PNGPREFIX_H) +# include "pngprefix.h" +#endif + +#ifdef PNG_USER_CONFIG +# include "pngusr.h" + /* These should have been defined in pngusr.h */ +# ifndef PNG_USER_PRIVATEBUILD +# define PNG_USER_PRIVATEBUILD "Custom libpng build" +# endif +# ifndef PNG_USER_DLLFNAME_POSTFIX +# define PNG_USER_DLLFNAME_POSTFIX "Cb" +# endif +#endif + +/* Compile time options. + * ===================== + * In a multi-arch build the compiler may compile the code several times for the + * same object module, producing different binaries for different architectures. + * When this happens configure-time setting of the target host options cannot be + * done and this interferes with the handling of the ARM NEON optimizations, and + * possibly other similar optimizations. Put additional tests here; in general + * this is needed when the same option can be changed at both compile time and + * run time depending on the target OS (i.e. iOS vs Android.) + * + * NOTE: symbol prefixing does not pass $(CFLAGS) to the preprocessor, because + * this is not possible with certain compilers (Oracle SUN OS CC), as a result + * it is necessary to ensure that all extern functions that *might* be used + * regardless of $(CFLAGS) get declared in this file. The test on __ARM_NEON__ + * below is one example of this behavior because it is controlled by the + * presence or not of -mfpu=neon on the GCC command line, it is possible to do + * this in $(CC), e.g. "CC=gcc -mfpu=neon", but people who build libpng rarely + * do this. + */ +#ifndef PNG_ARM_NEON_OPT + /* ARM NEON optimizations are being controlled by the compiler settings, + * typically the target FPU. If the FPU has been set to NEON (-mfpu=neon + * with GCC) then the compiler will define __ARM_NEON__ and we can rely + * unconditionally on NEON instructions not crashing, otherwise we must + * disable use of NEON instructions. + * + * NOTE: at present these optimizations depend on 'ALIGNED_MEMORY', so they + * can only be turned on automatically if that is supported too. If + * PNG_ARM_NEON_OPT is set in CPPFLAGS (to >0) then arm/arm_init.c will fail + * to compile with an appropriate #error if ALIGNED_MEMORY has been turned + * off. + * + * Note that gcc-4.9 defines __ARM_NEON instead of the deprecated + * __ARM_NEON__, so we check both variants. + * + * To disable ARM_NEON optimizations entirely, and skip compiling the + * associated assembler code, pass --enable-arm-neon=no to configure + * or put -DPNG_ARM_NEON_OPT=0 in CPPFLAGS. + */ +# if (defined(__ARM_NEON__) || defined(__ARM_NEON)) && \ + defined(PNG_ALIGNED_MEMORY_SUPPORTED) +# define PNG_ARM_NEON_OPT 2 +# else +# define PNG_ARM_NEON_OPT 0 +# endif +#endif + +#ifndef PNG_RISCV_RVV_OPT + /* RISCV_RVV optimizations are being controlled by the compiler settings, + * typically the target compiler will define __riscv but the rvv extension + * availability has to be explicitly stated. This is why if no + * PNG_RISCV_RVV_OPT was defined then a runtime check will be executed. + * + * To enable RISCV_RVV optimizations unconditionally, and compile the + * associated code, pass --enable-riscv-rvv=yes or --enable-riscv-rvv=on + * to configure or put -DPNG_RISCV_RVV_OPT=2 in CPPFLAGS. + */ + +# define PNG_RISCV_RVV_OPT 0 +#endif + +#if PNG_ARM_NEON_OPT > 0 + /* NEON optimizations are to be at least considered by libpng, so enable the + * callbacks to do this. + */ +# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_neon +# ifndef PNG_ARM_NEON_IMPLEMENTATION + /* Use the intrinsics code by default. */ +# define PNG_ARM_NEON_IMPLEMENTATION 1 +# endif +#else /* PNG_ARM_NEON_OPT == 0 */ +# define PNG_ARM_NEON_IMPLEMENTATION 0 +#endif /* PNG_ARM_NEON_OPT > 0 */ + +#ifndef PNG_MIPS_MSA_OPT +# if defined(__mips_msa) && (__mips_isa_rev >= 5) && \ + defined(PNG_ALIGNED_MEMORY_SUPPORTED) +# define PNG_MIPS_MSA_OPT 2 +# else +# define PNG_MIPS_MSA_OPT 0 +# endif +#endif + +#ifndef PNG_MIPS_MMI_OPT +# ifdef PNG_MIPS_MMI +# if defined(__mips_loongson_mmi) && (_MIPS_SIM == _ABI64) && \ + defined(PNG_ALIGNED_MEMORY_SUPPORTED) +# define PNG_MIPS_MMI_OPT 1 +# else +# define PNG_MIPS_MMI_OPT 0 +# endif +# else +# define PNG_MIPS_MMI_OPT 0 +# endif +#endif + +#ifndef PNG_POWERPC_VSX_OPT +# if defined(__PPC64__) && defined(__ALTIVEC__) && defined(__VSX__) +# define PNG_POWERPC_VSX_OPT 2 +# else +# define PNG_POWERPC_VSX_OPT 0 +# endif +#endif + +#ifndef PNG_LOONGARCH_LSX_OPT +# if defined(__loongarch_sx) +# define PNG_LOONGARCH_LSX_OPT 1 +# else +# define PNG_LOONGARCH_LSX_OPT 0 +# endif +#endif + +#ifndef PNG_INTEL_SSE_OPT +# ifdef PNG_INTEL_SSE + /* Only check for SSE if the build configuration has been modified to + * enable SSE optimizations. This means that these optimizations will + * be off by default. See contrib/intel for more details. + */ +# if defined(__SSE4_1__) || defined(__AVX__) || defined(__SSSE3__) || \ + defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \ + (defined(_M_IX86_FP) && _M_IX86_FP >= 2) +# define PNG_INTEL_SSE_OPT 1 +# else +# define PNG_INTEL_SSE_OPT 0 +# endif +# else +# define PNG_INTEL_SSE_OPT 0 +# endif +#endif + +#if PNG_INTEL_SSE_OPT > 0 +# ifndef PNG_INTEL_SSE_IMPLEMENTATION +# if defined(__SSE4_1__) || defined(__AVX__) + /* We are not actually using AVX, but checking for AVX is the best + way we can detect SSE4.1 and SSSE3 on MSVC. + */ +# define PNG_INTEL_SSE_IMPLEMENTATION 3 +# elif defined(__SSSE3__) +# define PNG_INTEL_SSE_IMPLEMENTATION 2 +# elif defined(__SSE2__) || defined(_M_X64) || defined(_M_AMD64) || \ + (defined(_M_IX86_FP) && _M_IX86_FP >= 2) +# define PNG_INTEL_SSE_IMPLEMENTATION 1 +# else +# define PNG_INTEL_SSE_IMPLEMENTATION 0 +# endif +# endif + +# if PNG_INTEL_SSE_IMPLEMENTATION > 0 +# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_sse2 +# endif +#else +# define PNG_INTEL_SSE_IMPLEMENTATION 0 +#endif + +#if PNG_MIPS_MSA_OPT > 0 +# ifndef PNG_MIPS_MSA_IMPLEMENTATION +# if defined(__mips_msa) +# if defined(__clang__) +# elif defined(__GNUC__) +# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) +# define PNG_MIPS_MSA_IMPLEMENTATION 2 +# endif /* no GNUC support */ +# endif /* __GNUC__ */ +# else /* !defined __mips_msa */ +# define PNG_MIPS_MSA_IMPLEMENTATION 2 +# endif /* __mips_msa */ +# endif /* !PNG_MIPS_MSA_IMPLEMENTATION */ + +# ifndef PNG_MIPS_MSA_IMPLEMENTATION +# define PNG_MIPS_MSA_IMPLEMENTATION 1 +# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_mips +# endif +#else +# define PNG_MIPS_MSA_IMPLEMENTATION 0 +#endif /* PNG_MIPS_MSA_OPT > 0 */ + +#if PNG_MIPS_MMI_OPT > 0 +# ifndef PNG_MIPS_MMI_IMPLEMENTATION +# if defined(__mips_loongson_mmi) && (_MIPS_SIM == _ABI64) +# define PNG_MIPS_MMI_IMPLEMENTATION 2 +# else /* !defined __mips_loongson_mmi || _MIPS_SIM != _ABI64 */ +# define PNG_MIPS_MMI_IMPLEMENTATION 0 +# endif /* __mips_loongson_mmi && _MIPS_SIM == _ABI64 */ +# endif /* !PNG_MIPS_MMI_IMPLEMENTATION */ + +# if PNG_MIPS_MMI_IMPLEMENTATION > 0 +# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_mips +# endif +#else +# define PNG_MIPS_MMI_IMPLEMENTATION 0 +#endif /* PNG_MIPS_MMI_OPT > 0 */ + +#if PNG_POWERPC_VSX_OPT > 0 +# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_vsx +# define PNG_POWERPC_VSX_IMPLEMENTATION 1 +#else +# define PNG_POWERPC_VSX_IMPLEMENTATION 0 +#endif + +#if PNG_LOONGARCH_LSX_OPT > 0 +# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_lsx +# define PNG_LOONGARCH_LSX_IMPLEMENTATION 1 +#else +# define PNG_LOONGARCH_LSX_IMPLEMENTATION 0 +#endif + +#if PNG_RISCV_RVV_OPT > 0 +# define PNG_FILTER_OPTIMIZATIONS png_init_filter_functions_rvv +# ifndef PNG_RISCV_RVV_IMPLEMENTATION + /* Use the intrinsics code by default. */ +# define PNG_RISCV_RVV_IMPLEMENTATION 1 +# endif +#else +# define PNG_RISCV_RVV_IMPLEMENTATION 0 +#endif + +/* Is this a build of a DLL where compilation of the object modules requires + * different preprocessor settings to those required for a simple library? If + * so PNG_BUILD_DLL must be set. + * + * If libpng is used inside a DLL but that DLL does not export the libpng APIs + * PNG_BUILD_DLL must not be set. To avoid the code below kicking in build a + * static library of libpng then link the DLL against that. + */ +#ifndef PNG_BUILD_DLL +# ifdef DLL_EXPORT + /* This is set by libtool when files are compiled for a DLL; libtool + * always compiles twice, even on systems where it isn't necessary. Set + * PNG_BUILD_DLL in case it is necessary: + */ +# define PNG_BUILD_DLL +# else +# ifdef _WINDLL + /* This is set by the Microsoft Visual Studio IDE in projects that + * build a DLL. It can't easily be removed from those projects (it + * isn't visible in the Visual Studio UI) so it is a fairly reliable + * indication that PNG_IMPEXP needs to be set to the DLL export + * attributes. + */ +# define PNG_BUILD_DLL +# else +# ifdef __DLL__ + /* This is set by the Borland C system when compiling for a DLL + * (as above.) + */ +# define PNG_BUILD_DLL +# else + /* Add additional compiler cases here. */ +# endif +# endif +# endif +#endif /* Setting PNG_BUILD_DLL if required */ + +/* See pngconf.h for more details: the builder of the library may set this on + * the command line to the right thing for the specific compilation system or it + * may be automagically set above (at present we know of no system where it does + * need to be set on the command line.) + * + * PNG_IMPEXP must be set here when building the library to prevent pngconf.h + * setting it to the "import" setting for a DLL build. + */ +#ifndef PNG_IMPEXP +# ifdef PNG_BUILD_DLL +# define PNG_IMPEXP PNG_DLL_EXPORT +# else + /* Not building a DLL, or the DLL doesn't require specific export + * definitions. + */ +# define PNG_IMPEXP +# endif +#endif + +/* No warnings for private or deprecated functions in the build: */ +#ifndef PNG_DEPRECATED +# define PNG_DEPRECATED +#endif +#ifndef PNG_PRIVATE +# define PNG_PRIVATE +#endif + +/* Symbol preprocessing support. + * + * To enable listing global, but internal, symbols the following macros should + * always be used to declare an extern data or function object in this file. + */ +#ifndef PNG_INTERNAL_DATA +# define PNG_INTERNAL_DATA(type, name, array) PNG_LINKAGE_DATA type name array +#endif + +#ifndef PNG_INTERNAL_FUNCTION +# define PNG_INTERNAL_FUNCTION(type, name, args, attributes)\ + PNG_LINKAGE_FUNCTION PNG_FUNCTION(type, name, args, PNG_EMPTY attributes) +#endif + +#ifndef PNG_INTERNAL_CALLBACK +# define PNG_INTERNAL_CALLBACK(type, name, args, attributes)\ + PNG_LINKAGE_CALLBACK PNG_FUNCTION(type, (PNGCBAPI name), args,\ + PNG_EMPTY attributes) +#endif + +/* If floating or fixed point APIs are disabled they may still be compiled + * internally. To handle this make sure they are declared as the appropriate + * internal extern function (otherwise the symbol prefixing stuff won't work and + * the functions will be used without definitions.) + * + * NOTE: although all the API functions are declared here they are not all + * actually built! Because the declarations are still made it is necessary to + * fake out types that they depend on. + */ +#ifndef PNG_FP_EXPORT +# ifndef PNG_FLOATING_POINT_SUPPORTED +# define PNG_FP_EXPORT(ordinal, type, name, args)\ + PNG_INTERNAL_FUNCTION(type, name, args, PNG_EMPTY); +# ifndef PNG_VERSION_INFO_ONLY + typedef struct png_incomplete png_double; + typedef png_double* png_doublep; + typedef const png_double* png_const_doublep; + typedef png_double** png_doublepp; +# endif +# endif +#endif +#ifndef PNG_FIXED_EXPORT +# ifndef PNG_FIXED_POINT_SUPPORTED +# define PNG_FIXED_EXPORT(ordinal, type, name, args)\ + PNG_INTERNAL_FUNCTION(type, name, args, PNG_EMPTY); +# endif +#endif + +#include "png.h" + +/* pngconf.h does not set PNG_DLL_EXPORT unless it is required, so: */ +#ifndef PNG_DLL_EXPORT +# define PNG_DLL_EXPORT +#endif + +/* This is a global switch to set the compilation for an installed system + * (a release build). It can be set for testing debug builds to ensure that + * they will compile when the build type is switched to RC or STABLE, the + * default is just to use PNG_LIBPNG_BUILD_BASE_TYPE. Set this in CPPFLAGS + * with either: + * + * -DPNG_RELEASE_BUILD Turns on the release compile path + * -DPNG_RELEASE_BUILD=0 Turns it off + * or in your pngusr.h with + * #define PNG_RELEASE_BUILD=1 Turns on the release compile path + * #define PNG_RELEASE_BUILD=0 Turns it off + */ +#ifndef PNG_RELEASE_BUILD +# define PNG_RELEASE_BUILD (PNG_LIBPNG_BUILD_BASE_TYPE >= PNG_LIBPNG_BUILD_RC) +#endif + +/* SECURITY and SAFETY: + * + * libpng is built with support for internal limits on image dimensions and + * memory usage. These are documented in scripts/pnglibconf.dfa of the + * source and recorded in the machine generated header file pnglibconf.h. + */ + +/* If you are running on a machine where you cannot allocate more + * than 64K of memory at once, uncomment this. While libpng will not + * normally need that much memory in a chunk (unless you load up a very + * large file), zlib needs to know how big of a chunk it can use, and + * libpng thus makes sure to check any memory allocation to verify it + * will fit into memory. + * + * zlib provides 'MAXSEG_64K' which, if defined, indicates the + * same limit and pngconf.h (already included) sets the limit + * if certain operating systems are detected. + */ +#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K) +# define PNG_MAX_MALLOC_64K +#endif + +#ifndef PNG_UNUSED +/* Unused formal parameter warnings are silenced using the following macro + * which is expected to have no bad effects on performance (optimizing + * compilers will probably remove it entirely). Note that if you replace + * it with something other than whitespace, you must include the terminating + * semicolon. + */ +# define PNG_UNUSED(param) (void)param; +#endif + +/* Just a little check that someone hasn't tried to define something + * contradictory. + */ +#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K) +# undef PNG_ZBUF_SIZE +# define PNG_ZBUF_SIZE 65536L +#endif + +/* If warnings or errors are turned off the code is disabled or redirected here. + * From 1.5.4 functions have been added to allow very limited formatting of + * error and warning messages - this code will also be disabled here. + */ +#ifdef PNG_WARNINGS_SUPPORTED +# define PNG_WARNING_PARAMETERS(p) png_warning_parameters p; +#else +# define png_warning_parameter(p,number,string) ((void)0) +# define png_warning_parameter_unsigned(p,number,format,value) ((void)0) +# define png_warning_parameter_signed(p,number,format,value) ((void)0) +# define png_formatted_warning(pp,p,message) ((void)(pp)) +# define PNG_WARNING_PARAMETERS(p) +#endif +#ifndef PNG_ERROR_TEXT_SUPPORTED +# define png_fixed_error(s1,s2) png_err(s1) +#endif + +/* Some fixed point APIs are still required even if not exported because + * they get used by the corresponding floating point APIs. This magic + * deals with this: + */ +#ifdef PNG_FIXED_POINT_SUPPORTED +# define PNGFAPI PNGAPI +#else +# define PNGFAPI /* PRIVATE */ +#endif + +#ifndef PNG_VERSION_INFO_ONLY +/* Other defines specific to compilers can go here. Try to keep + * them inside an appropriate ifdef/endif pair for portability. + */ + +/* C allows up-casts from (void*) to any pointer and (const void*) to any + * pointer to a const object. C++ regards this as a type error and requires an + * explicit, static, cast and provides the static_cast<> rune to ensure that + * const is not cast away. + */ +#ifdef __cplusplus +# define png_voidcast(type, value) static_cast(value) +# define png_constcast(type, value) const_cast(value) +# define png_aligncast(type, value) \ + static_cast(static_cast(value)) +# define png_aligncastconst(type, value) \ + static_cast(static_cast(value)) +#else +# define png_voidcast(type, value) (value) +# define png_constcast(type, value) ((type)(void*)(const void*)(value)) +# define png_aligncast(type, value) ((void*)(value)) +# define png_aligncastconst(type, value) ((const void*)(value)) +#endif /* __cplusplus */ + +#if defined(PNG_FLOATING_POINT_SUPPORTED) ||\ + defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) + /* png.c requires the following ANSI-C constants if the conversion of + * floating point to ASCII is implemented therein: + * + * DBL_DIG Maximum number of decimal digits (can be set to any constant) + * DBL_MIN Smallest normalized fp number (can be set to an arbitrary value) + * DBL_MAX Maximum floating point number (can be set to an arbitrary value) + */ +# include + +# include + +# if defined(_AMIGA) && defined(__SASC) && defined(_M68881) + /* Amiga SAS/C: We must include builtin FPU functions when compiling using + * MATH=68881 + */ +# include +# endif +#endif + +/* This provides the non-ANSI (far) memory allocation routines. */ +#if defined(__TURBOC__) && defined(__MSDOS__) +# include +# include +#endif + +#if defined(_WIN32) || defined(__WIN32__) || defined(__NT__) +# include +#endif +#endif /* PNG_VERSION_INFO_ONLY */ + +/* Moved here around 1.5.0beta36 from pngconf.h */ +/* Users may want to use these so they are not private. Any library + * functions that are passed far data must be model-independent. + */ + +/* Platform-independent functions */ +#ifndef PNG_ABORT +# define PNG_ABORT() abort() +#endif + +/* These macros may need to be architecture dependent. */ +#define PNG_ALIGN_NONE 0 /* do not use data alignment */ +#define PNG_ALIGN_ALWAYS 1 /* assume unaligned accesses are OK */ +#ifdef offsetof +# define PNG_ALIGN_OFFSET 2 /* use offsetof to determine alignment */ +#else +# define PNG_ALIGN_OFFSET -1 /* prevent the use of this */ +#endif +#define PNG_ALIGN_SIZE 3 /* use sizeof to determine alignment */ + +#ifndef PNG_ALIGN_TYPE + /* Default to using aligned access optimizations and requiring alignment to a + * multiple of the data type size. Override in a compiler specific fashion + * if necessary by inserting tests here: + */ +# define PNG_ALIGN_TYPE PNG_ALIGN_SIZE +#endif + +#if PNG_ALIGN_TYPE == PNG_ALIGN_SIZE + /* This is used because in some compiler implementations non-aligned + * structure members are supported, so the offsetof approach below fails. + * Set PNG_ALIGN_SIZE=0 for compiler combinations where unaligned access + * is good for performance. Do not do this unless you have tested the + * result and understand it. + */ +# define png_alignof(type) (sizeof(type)) +#else +# if PNG_ALIGN_TYPE == PNG_ALIGN_OFFSET +# define png_alignof(type) offsetof(struct{char c; type t;}, t) +# else +# if PNG_ALIGN_TYPE == PNG_ALIGN_ALWAYS +# define png_alignof(type) 1 +# endif + /* Else leave png_alignof undefined to prevent use thereof */ +# endif +#endif + +/* This implicitly assumes alignment is always a multiple of 2. */ +#ifdef png_alignof +# define png_isaligned(ptr, type) \ + (((type)(size_t)((const void*)(ptr)) & (type)(png_alignof(type)-1)) == 0) +#else +# define png_isaligned(ptr, type) 0 +#endif + +/* End of memory model/platform independent support */ +/* End of 1.5.0beta36 move from pngconf.h */ + +/* CONSTANTS and UTILITY MACROS + * These are used internally by libpng and not exposed in the API + */ + +/* Various modes of operation. Note that after an init, mode is set to + * zero automatically when the structure is created. Three of these + * are defined in png.h because they need to be visible to applications + * that call png_set_unknown_chunk(). + */ +/* #define PNG_HAVE_IHDR 0x01U (defined in png.h) */ +/* #define PNG_HAVE_PLTE 0x02U (defined in png.h) */ +#define PNG_HAVE_IDAT 0x04U +/* #define PNG_AFTER_IDAT 0x08U (defined in png.h) */ +#define PNG_HAVE_IEND 0x10U + /* 0x20U (unused) */ + /* 0x40U (unused) */ + /* 0x80U (unused) */ +#define PNG_HAVE_CHUNK_HEADER 0x100U +#define PNG_WROTE_tIME 0x200U +#define PNG_WROTE_INFO_BEFORE_PLTE 0x400U +#define PNG_BACKGROUND_IS_GRAY 0x800U +#define PNG_HAVE_PNG_SIGNATURE 0x1000U +#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000U /* Have another chunk after IDAT */ +#define PNG_WROTE_eXIf 0x4000U +#define PNG_IS_READ_STRUCT 0x8000U /* Else is a write struct */ + +/* Flags for the transformations the PNG library does on the image data */ +#define PNG_BGR 0x0001U +#define PNG_INTERLACE 0x0002U +#define PNG_PACK 0x0004U +#define PNG_SHIFT 0x0008U +#define PNG_SWAP_BYTES 0x0010U +#define PNG_INVERT_MONO 0x0020U +#define PNG_QUANTIZE 0x0040U +#define PNG_COMPOSE 0x0080U /* Was PNG_BACKGROUND */ +#define PNG_BACKGROUND_EXPAND 0x0100U +#define PNG_EXPAND_16 0x0200U /* Added to libpng 1.5.2 */ +#define PNG_16_TO_8 0x0400U /* Becomes 'chop' in 1.5.4 */ +#define PNG_RGBA 0x0800U +#define PNG_EXPAND 0x1000U +#define PNG_GAMMA 0x2000U +#define PNG_GRAY_TO_RGB 0x4000U +#define PNG_FILLER 0x8000U +#define PNG_PACKSWAP 0x10000U +#define PNG_SWAP_ALPHA 0x20000U +#define PNG_STRIP_ALPHA 0x40000U +#define PNG_INVERT_ALPHA 0x80000U +#define PNG_USER_TRANSFORM 0x100000U +#define PNG_RGB_TO_GRAY_ERR 0x200000U +#define PNG_RGB_TO_GRAY_WARN 0x400000U +#define PNG_RGB_TO_GRAY 0x600000U /* two bits, RGB_TO_GRAY_ERR|WARN */ +#define PNG_ENCODE_ALPHA 0x800000U /* Added to libpng-1.5.4 */ +#define PNG_ADD_ALPHA 0x1000000U /* Added to libpng-1.2.7 */ +#define PNG_EXPAND_tRNS 0x2000000U /* Added to libpng-1.2.9 */ +#define PNG_SCALE_16_TO_8 0x4000000U /* Added to libpng-1.5.4 */ + /* 0x8000000U unused */ + /* 0x10000000U unused */ + /* 0x20000000U unused */ + /* 0x40000000U unused */ +/* Flags for png_create_struct */ +#define PNG_STRUCT_PNG 0x0001U +#define PNG_STRUCT_INFO 0x0002U + +/* Flags for the png_ptr->flags rather than declaring a byte for each one */ +#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001U +#define PNG_FLAG_ZSTREAM_INITIALIZED 0x0002U /* Added to libpng-1.6.0 */ + /* 0x0004U unused */ +#define PNG_FLAG_ZSTREAM_ENDED 0x0008U /* Added to libpng-1.6.0 */ + /* 0x0010U unused */ + /* 0x0020U unused */ +#define PNG_FLAG_ROW_INIT 0x0040U +#define PNG_FLAG_FILLER_AFTER 0x0080U +#define PNG_FLAG_CRC_ANCILLARY_USE 0x0100U +#define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200U +#define PNG_FLAG_CRC_CRITICAL_USE 0x0400U +#define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800U +/* PNG_FLAG_ASSUME_sRGB unused 0x1000U * Added to libpng-1.5.4 */ +#define PNG_FLAG_OPTIMIZE_ALPHA 0x2000U /* Added to libpng-1.5.4 */ +#define PNG_FLAG_DETECT_UNINITIALIZED 0x4000U /* Added to libpng-1.5.4 */ +/* #define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000U */ +/* #define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000U */ +#define PNG_FLAG_LIBRARY_MISMATCH 0x20000U +#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000U +#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000U +#define PNG_FLAG_BENIGN_ERRORS_WARN 0x100000U /* Added to libpng-1.4.0 */ +#define PNG_FLAG_APP_WARNINGS_WARN 0x200000U /* Added to libpng-1.6.0 */ +#define PNG_FLAG_APP_ERRORS_WARN 0x400000U /* Added to libpng-1.6.0 */ + /* 0x800000U unused */ + /* 0x1000000U unused */ + /* 0x2000000U unused */ + /* 0x4000000U unused */ + /* 0x8000000U unused */ + /* 0x10000000U unused */ + /* 0x20000000U unused */ + /* 0x40000000U unused */ + +#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \ + PNG_FLAG_CRC_ANCILLARY_NOWARN) + +#define PNG_FLAG_CRC_CRITICAL_MASK (PNG_FLAG_CRC_CRITICAL_USE | \ + PNG_FLAG_CRC_CRITICAL_IGNORE) + +#define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \ + PNG_FLAG_CRC_CRITICAL_MASK) + +/* Save typing and make code easier to understand */ + +#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \ + abs((int)((c1).green) - (int)((c2).green)) + \ + abs((int)((c1).blue) - (int)((c2).blue))) + +/* Added to libpng-1.6.0: scale a 16-bit value in the range 0..65535 to 0..255 + * by dividing by 257 *with rounding*. This macro is exact for the given range. + * See the discourse in pngrtran.c png_do_scale_16_to_8. The values in the + * macro were established by experiment (modifying the added value). The macro + * has a second variant that takes a value already scaled by 255 and divides by + * 65535 - this has a maximum error of .502. Over the range 0..65535*65535 it + * only gives off-by-one errors and only for 0.5% (1 in 200) of the values. + */ +#define PNG_DIV65535(v24) (((v24) + 32895) >> 16) +#define PNG_DIV257(v16) PNG_DIV65535((png_uint_32)(v16) * 255) + +/* Added to libpng-1.2.6 JB */ +#define PNG_ROWBYTES(pixel_bits, width) \ + ((pixel_bits) >= 8 ? \ + ((size_t)(width) * (((size_t)(pixel_bits)) >> 3)) : \ + (( ((size_t)(width) * ((size_t)(pixel_bits))) + 7) >> 3) ) + +/* This returns the number of trailing bits in the last byte of a row, 0 if the + * last byte is completely full of pixels. It is, in principle, (pixel_bits x + * width) % 8, but that would overflow for large 'width'. The second macro is + * the same except that it returns the number of unused bits in the last byte; + * (8-TRAILBITS), but 0 when TRAILBITS is 0. + * + * NOTE: these macros are intended to be self-evidently correct and never + * overflow on the assumption that pixel_bits is in the range 0..255. The + * arguments are evaluated only once and they can be signed (e.g. as a result of + * the integral promotions). The result of the expression always has type + * (png_uint_32), however the compiler always knows it is in the range 0..7. + */ +#define PNG_TRAILBITS(pixel_bits, width) \ + (((pixel_bits) * ((width) % (png_uint_32)8)) % 8) + +#define PNG_PADBITS(pixel_bits, width) \ + ((8 - PNG_TRAILBITS(pixel_bits, width)) % 8) + +/* PNG_OUT_OF_RANGE returns true if value is outside the range + * ideal-delta..ideal+delta. Each argument is evaluated twice. + * "ideal" and "delta" should be constants, normally simple + * integers, "value" a variable. Added to libpng-1.2.6 JB + */ +#define PNG_OUT_OF_RANGE(value, ideal, delta) \ + ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) ) + +/* Conversions between fixed and floating point, only defined if + * required (to make sure the code doesn't accidentally use float + * when it is supposedly disabled.) + */ +#ifdef PNG_FLOATING_POINT_SUPPORTED +/* The floating point conversion can't overflow, though it can and + * does lose accuracy relative to the original fixed point value. + * In practice this doesn't matter because png_fixed_point only + * stores numbers with very low precision. The png_ptr and s + * arguments are unused by default but are there in case error + * checking becomes a requirement. + */ +#define png_float(png_ptr, fixed, s) (.00001 * (fixed)) + +/* The fixed point conversion performs range checking and evaluates + * its argument multiple times, so must be used with care. The + * range checking uses the PNG specification values for a signed + * 32-bit fixed point value except that the values are deliberately + * rounded-to-zero to an integral value - 21474 (21474.83 is roughly + * (2^31-1) * 100000). 's' is a string that describes the value being + * converted. + * + * NOTE: this macro will raise a png_error if the range check fails, + * therefore it is normally only appropriate to use this on values + * that come from API calls or other sources where an out of range + * error indicates a programming error, not a data error! + * + * NOTE: by default this is off - the macro is not used - because the + * function call saves a lot of code. + */ +#ifdef PNG_FIXED_POINT_MACRO_SUPPORTED +#define png_fixed(png_ptr, fp, s) ((fp) <= 21474 && (fp) >= -21474 ?\ + ((png_fixed_point)(100000 * (fp))) : (png_fixed_error(png_ptr, s),0)) +#define png_fixed_ITU(png_ptr, fp, s) ((fp) <= 214748 && (fp) >= 0 ?\ + ((png_uint_32)(10000 * (fp))) : (png_fixed_error(png_ptr, s),0)) +#endif +/* else the corresponding function is defined below, inside the scope of the + * cplusplus test. + */ +#endif + +/* Constants for known chunk types. If you need to add a chunk, define the name + * here. For historical reasons these constants have the form png_; i.e. + * the prefix is lower case. Please use decimal values as the parameters to + * match the ISO PNG specification and to avoid relying on the C locale + * interpretation of character values. + * + * Prior to 1.5.6 these constants were strings, as of 1.5.6 png_uint_32 values + * are computed and a new macro (PNG_STRING_FROM_CHUNK) added to allow a string + * to be generated if required. + * + * PNG_32b correctly produces a value shifted by up to 24 bits, even on + * architectures where (int) is only 16 bits. + * + * 1.6.47: PNG_32b was made into a preprocessor evaluable macro by replacing the + * static_cast with a promoting binary operation using a guaranteed 32-bit + * (minimum) unsigned value. + */ +#define PNG_32b(b,s) (((0xFFFFFFFFU)&(b)) << (s)) +#define PNG_U32(b1,b2,b3,b4) \ + (PNG_32b(b1,24) | PNG_32b(b2,16) | PNG_32b(b3,8) | PNG_32b(b4,0)) + +/* Chunk name validation. When using these macros all the arguments should be + * constants, otherwise code bloat may well occur. The macros are provided + * primarily for use in #if checks. + * + * PNG_32to8 produces a byte value with the right shift; used to extract the + * byte value from a chunk name. + */ +#define PNG_32to8(cn,s) (((cn) >> (s)) & 0xffU) +#define PNG_CN_VALID_UPPER(b) ((b) >= 65 && (b) <= 90) /* upper-case ASCII */ +#define PNG_CN_VALID_ASCII(b) PNG_CN_VALID_UPPER((b) & ~32U) +#define PNG_CHUNK_NAME_VALID(cn) (\ + PNG_CN_VALID_ASCII(PNG_32to8(cn,24)) && /* critical, !ancillary */\ + PNG_CN_VALID_ASCII(PNG_32to8(cn,16)) && /* public, !privately defined */\ + PNG_CN_VALID_UPPER(PNG_32to8(cn, 8)) && /* VALID, !reserved */\ + PNG_CN_VALID_ASCII(PNG_32to8(cn, 0)) /* data-dependent, !copy ok */) + +/* Constants for known chunk types. + * + * MAINTAINERS: If you need to add a chunk, define the name here. + * For historical reasons these constants have the form png_; i.e. + * the prefix is lower case. Please use decimal values as the parameters to + * match the ISO PNG specification and to avoid relying on the C locale + * interpretation of character values. Please keep the list sorted. + * + * Notice that PNG_U32 is used to define a 32-bit value for the 4 byte chunk + * type. In fact the specification does not express chunk types this way, + * however using a 32-bit value means that the chunk type can be read from the + * stream using exactly the same code as used for a 32-bit unsigned value and + * can be examined far more efficiently (using one arithmetic compare). + * + * Prior to 1.5.6 the chunk type constants were expressed as C strings. The + * libpng API still uses strings for 'unknown' chunks and a macro, + * PNG_STRING_FROM_CHUNK, allows a string to be generated if required. Notice + * that for portable code numeric values must still be used; the string "IHDR" + * is not portable and neither is PNG_U32('I', 'H', 'D', 'R'). + * + * In 1.7.0 the definitions will be made public in png.h to avoid having to + * duplicate the same definitions in application code. + */ +#define png_IDAT PNG_U32( 73, 68, 65, 84) +#define png_IEND PNG_U32( 73, 69, 78, 68) +#define png_IHDR PNG_U32( 73, 72, 68, 82) +#define png_PLTE PNG_U32( 80, 76, 84, 69) +#define png_acTL PNG_U32( 97, 99, 84, 76) /* PNGv3: APNG */ +#define png_bKGD PNG_U32( 98, 75, 71, 68) +#define png_cHRM PNG_U32( 99, 72, 82, 77) +#define png_cICP PNG_U32( 99, 73, 67, 80) /* PNGv3 */ +#define png_cLLI PNG_U32( 99, 76, 76, 73) /* PNGv3 */ +#define png_eXIf PNG_U32(101, 88, 73, 102) /* registered July 2017 */ +#define png_fcTL PNG_U32(102, 99, 84, 76) /* PNGv3: APNG */ +#define png_fdAT PNG_U32(102, 100, 65, 84) /* PNGv3: APNG */ +#define png_fRAc PNG_U32(102, 82, 65, 99) /* registered, not defined */ +#define png_gAMA PNG_U32(103, 65, 77, 65) +#define png_gIFg PNG_U32(103, 73, 70, 103) +#define png_gIFt PNG_U32(103, 73, 70, 116) /* deprecated */ +#define png_gIFx PNG_U32(103, 73, 70, 120) +#define png_hIST PNG_U32(104, 73, 83, 84) +#define png_iCCP PNG_U32(105, 67, 67, 80) +#define png_iTXt PNG_U32(105, 84, 88, 116) +#define png_mDCV PNG_U32(109, 68, 67, 86) /* PNGv3 */ +#define png_oFFs PNG_U32(111, 70, 70, 115) +#define png_pCAL PNG_U32(112, 67, 65, 76) +#define png_pHYs PNG_U32(112, 72, 89, 115) +#define png_sBIT PNG_U32(115, 66, 73, 84) +#define png_sCAL PNG_U32(115, 67, 65, 76) +#define png_sPLT PNG_U32(115, 80, 76, 84) +#define png_sRGB PNG_U32(115, 82, 71, 66) +#define png_sTER PNG_U32(115, 84, 69, 82) +#define png_tEXt PNG_U32(116, 69, 88, 116) +#define png_tIME PNG_U32(116, 73, 77, 69) +#define png_tRNS PNG_U32(116, 82, 78, 83) +#define png_zTXt PNG_U32(122, 84, 88, 116) + +/* The following will work on (signed char*) strings, whereas the get_uint_32 + * macro will fail on top-bit-set values because of the sign extension. + */ +#define PNG_CHUNK_FROM_STRING(s)\ + PNG_U32(0xff & (s)[0], 0xff & (s)[1], 0xff & (s)[2], 0xff & (s)[3]) + +/* This uses (char), not (png_byte) to avoid warnings on systems where (char) is + * signed and the argument is a (char[]) This macro will fail miserably on + * systems where (char) is more than 8 bits. + */ +#define PNG_STRING_FROM_CHUNK(s,c)\ + (void)(((char*)(s))[0]=(char)(((c)>>24) & 0xff), \ + ((char*)(s))[1]=(char)(((c)>>16) & 0xff),\ + ((char*)(s))[2]=(char)(((c)>>8) & 0xff), \ + ((char*)(s))[3]=(char)((c & 0xff))) + +/* Do the same but terminate with a null character. */ +#define PNG_CSTRING_FROM_CHUNK(s,c)\ + (void)(PNG_STRING_FROM_CHUNK(s,c), ((char*)(s))[4] = 0) + +/* Test on flag values as defined in the spec (section 5.4): */ +#define PNG_CHUNK_ANCILLARY(c) (1 & ((c) >> 29)) +#define PNG_CHUNK_CRITICAL(c) (!PNG_CHUNK_ANCILLARY(c)) +#define PNG_CHUNK_PRIVATE(c) (1 & ((c) >> 21)) +#define PNG_CHUNK_RESERVED(c) (1 & ((c) >> 13)) +#define PNG_CHUNK_SAFE_TO_COPY(c) (1 & ((c) >> 5)) + +/* Known chunks. All supported chunks must be listed here. The macro PNG_CHUNK + * contains the four character ASCII name by which the chunk is identified. The + * macro is implemented as required to build tables or switch statements which + * require entries for every known chunk. The macro also contains an index + * value which should be in order (this is checked in png.c). + * + * Notice that "known" does not require "SUPPORTED"; tables should be built in + * such a way that chunks unsupported in a build require no more than the table + * entry (which should be small.) In particular function pointers for + * unsupported chunks should be NULL. + * + * At present these index values are not exported (not part of the public API) + * so can be changed at will. For convenience the names are in lexical sort + * order but with the critical chunks at the start in the order of occurence in + * a PNG. + * + * PNG_INFO_ values do not exist for every one of these chunk handles; for + * example PNG_INFO_{IDAT,IEND,tEXt,iTXt,zTXt} and possibly other chunks in the + * future. + */ +#define PNG_KNOWN_CHUNKS\ + PNG_CHUNK(IHDR, 0)\ + PNG_CHUNK(PLTE, 1)\ + PNG_CHUNK(IDAT, 2)\ + PNG_CHUNK(IEND, 3)\ + PNG_CHUNK(acTL, 4)\ + PNG_CHUNK(bKGD, 5)\ + PNG_CHUNK(cHRM, 6)\ + PNG_CHUNK(cICP, 7)\ + PNG_CHUNK(cLLI, 8)\ + PNG_CHUNK(eXIf, 9)\ + PNG_CHUNK(fcTL, 10)\ + PNG_CHUNK(fdAT, 11)\ + PNG_CHUNK(gAMA, 12)\ + PNG_CHUNK(hIST, 13)\ + PNG_CHUNK(iCCP, 14)\ + PNG_CHUNK(iTXt, 15)\ + PNG_CHUNK(mDCV, 16)\ + PNG_CHUNK(oFFs, 17)\ + PNG_CHUNK(pCAL, 18)\ + PNG_CHUNK(pHYs, 19)\ + PNG_CHUNK(sBIT, 20)\ + PNG_CHUNK(sCAL, 21)\ + PNG_CHUNK(sPLT, 22)\ + PNG_CHUNK(sRGB, 23)\ + PNG_CHUNK(tEXt, 24)\ + PNG_CHUNK(tIME, 25)\ + PNG_CHUNK(tRNS, 26)\ + PNG_CHUNK(zTXt, 27) + +/* Gamma values (new at libpng-1.5.4): */ +#define PNG_GAMMA_MAC_OLD 151724 /* Assume '1.8' is really 2.2/1.45! */ +#define PNG_GAMMA_MAC_INVERSE 65909 +#define PNG_GAMMA_sRGB_INVERSE 45455 + +/* gamma sanity check. libpng cannot implement gamma transforms outside a + * certain limit because of its use of 16-bit fixed point intermediate values. + * Gamma values that are too large or too small will zap the 16-bit values all + * to 0 or 65535 resulting in an obvious 'bad' image. + * + * In libpng 1.6.0 the limits were changed from 0.07..3 to 0.01..100 to + * accommodate the optimal 16-bit gamma of 36 and its reciprocal. + * + * These are png_fixed_point integral values: + */ +#define PNG_LIB_GAMMA_MIN 1000 +#define PNG_LIB_GAMMA_MAX 10000000 + +/* Almost everything below is C specific; the #defines above can be used in + * non-C code (so long as it is C-preprocessed) the rest of this stuff cannot. + */ +#ifndef PNG_VERSION_INFO_ONLY + +#include "pngstruct.h" +#include "pnginfo.h" + +/* Validate the include paths - the include path used to generate pnglibconf.h + * must match that used in the build, or we must be using pnglibconf.h.prebuilt: + */ +#if PNG_ZLIB_VERNUM != 0 && PNG_ZLIB_VERNUM != ZLIB_VERNUM +# error The include path of is incorrect + /* When pnglibconf.h was built, the copy of zlib.h that it used was not the + * same as the one being used here. Considering how libpng makes decisions + * to use the zlib API based on the zlib version number, the -I options must + * match. + * + * A possible cause of this mismatch is that you passed an -I option in + * CFLAGS, which is unlikely to work. All the preprocessor options, and all + * the -I options in particular, should be in CPPFLAGS. + */ +#endif + +/* This is used for 16-bit gamma tables -- only the top level pointers are + * const; this could be changed: + */ +typedef const png_uint_16p * png_const_uint_16pp; + +/* Added to libpng-1.5.7: sRGB conversion tables */ +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) +#ifdef PNG_SIMPLIFIED_READ_SUPPORTED +PNG_INTERNAL_DATA(const png_uint_16, png_sRGB_table, [256]); + /* Convert from an sRGB encoded value 0..255 to a 16-bit linear value, + * 0..65535. This table gives the closest 16-bit answers (no errors). + */ +#endif + +PNG_INTERNAL_DATA(const png_uint_16, png_sRGB_base, [512]); +PNG_INTERNAL_DATA(const png_byte, png_sRGB_delta, [512]); + +#define PNG_sRGB_FROM_LINEAR(linear) \ + ((png_byte)(0xff & ((png_sRGB_base[(linear)>>15] \ + + ((((linear) & 0x7fff)*png_sRGB_delta[(linear)>>15])>>12)) >> 8))) + /* Given a value 'linear' in the range 0..255*65535 calculate the 8-bit sRGB + * encoded value with maximum error 0.646365. Note that the input is not a + * 16-bit value; it has been multiplied by 255! */ +#endif /* SIMPLIFIED_READ/WRITE */ + + +/* Inhibit C++ name-mangling for libpng functions but not for system calls. */ +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* Internal functions; these are not exported from a DLL however because they + * are used within several of the C source files they have to be C extern. + * + * All of these functions must be declared with PNG_INTERNAL_FUNCTION. + */ +/* Zlib support */ +#define PNG_UNEXPECTED_ZLIB_RETURN (-7) +PNG_INTERNAL_FUNCTION(void, png_zstream_error,(png_structrp png_ptr, int ret), + PNG_EMPTY); + /* Used by the zlib handling functions to ensure that z_stream::msg is always + * set before they return. + */ + +#ifdef PNG_WRITE_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_free_buffer_list,(png_structrp png_ptr, + png_compression_bufferp *list),PNG_EMPTY); + /* Free the buffer list used by the compressed write code. */ +#endif + +#if defined(PNG_FLOATING_POINT_SUPPORTED) && \ + !defined(PNG_FIXED_POINT_MACRO_SUPPORTED) && \ + (defined(PNG_gAMA_SUPPORTED) || defined(PNG_cHRM_SUPPORTED) || \ + defined(PNG_sCAL_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_mDCV_SUPPORTED) || \ + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)) || \ + (defined(PNG_sCAL_SUPPORTED) && \ + defined(PNG_FLOATING_ARITHMETIC_SUPPORTED)) +PNG_INTERNAL_FUNCTION(png_fixed_point,png_fixed,(png_const_structrp png_ptr, + double fp, png_const_charp text),PNG_EMPTY); +#endif + +#if defined(PNG_FLOATING_POINT_SUPPORTED) && \ + !defined(PNG_FIXED_POINT_MACRO_SUPPORTED) && \ + (defined(PNG_cLLI_SUPPORTED) || defined(PNG_mDCV_SUPPORTED)) +PNG_INTERNAL_FUNCTION(png_uint_32,png_fixed_ITU,(png_const_structrp png_ptr, + double fp, png_const_charp text),PNG_EMPTY); +#endif + +/* Check the user version string for compatibility, returns false if the version + * numbers aren't compatible. + */ +PNG_INTERNAL_FUNCTION(int,png_user_version_check,(png_structrp png_ptr, + png_const_charp user_png_ver),PNG_EMPTY); + +#ifdef PNG_READ_SUPPORTED /* should only be used on read */ +/* Security: read limits on the largest allocations while reading a PNG. This + * avoids very large allocations caused by PNG files with damaged or altered + * chunk 'length' fields. + */ +#ifdef PNG_SET_USER_LIMITS_SUPPORTED /* run-time limit */ +# define png_chunk_max(png_ptr) ((png_ptr)->user_chunk_malloc_max) + +#elif PNG_USER_CHUNK_MALLOC_MAX > 0 /* compile-time limit */ +# define png_chunk_max(png_ptr) ((void)png_ptr, PNG_USER_CHUNK_MALLOC_MAX) + +#elif (defined PNG_MAX_MALLOC_64K) /* legacy system limit */ +# define png_chunk_max(png_ptr) ((void)png_ptr, 65536U) + +#else /* modern system limit SIZE_MAX (C99) */ +# define png_chunk_max(png_ptr) ((void)png_ptr, PNG_SIZE_MAX) +#endif +#endif /* READ */ + +/* Internal base allocator - no messages, NULL on failure to allocate. This + * does, however, call the application provided allocator and that could call + * png_error (although that would be a bug in the application implementation.) + */ +PNG_INTERNAL_FUNCTION(png_voidp,png_malloc_base,(png_const_structrp png_ptr, + png_alloc_size_t size),PNG_ALLOCATED); + +#if defined(PNG_TEXT_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) ||\ + defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) +/* Internal array allocator, outputs no error or warning messages on failure, + * just returns NULL. + */ +PNG_INTERNAL_FUNCTION(png_voidp,png_malloc_array,(png_const_structrp png_ptr, + int nelements, size_t element_size),PNG_ALLOCATED); + +/* The same but an existing array is extended by add_elements. This function + * also memsets the new elements to 0 and copies the old elements. The old + * array is not freed or altered. + */ +PNG_INTERNAL_FUNCTION(png_voidp,png_realloc_array,(png_const_structrp png_ptr, + png_const_voidp array, int old_elements, int add_elements, + size_t element_size),PNG_ALLOCATED); +#endif /* text, sPLT or unknown chunks */ + +/* Magic to create a struct when there is no struct to call the user supplied + * memory allocators. Because error handling has not been set up the memory + * handlers can't safely call png_error, but this is an obscure and undocumented + * restriction so libpng has to assume that the 'free' handler, at least, might + * call png_error. + */ +PNG_INTERNAL_FUNCTION(png_structp,png_create_png_struct, + (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, + png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, + png_free_ptr free_fn),PNG_ALLOCATED); + +/* Free memory from internal libpng struct */ +PNG_INTERNAL_FUNCTION(void,png_destroy_png_struct,(png_structrp png_ptr), + PNG_EMPTY); + +/* Free an allocated jmp_buf (always succeeds) */ +PNG_INTERNAL_FUNCTION(void,png_free_jmpbuf,(png_structrp png_ptr),PNG_EMPTY); + +/* Function to allocate memory for zlib. PNGAPI is disallowed. */ +PNG_INTERNAL_FUNCTION(voidpf,png_zalloc,(voidpf png_ptr, uInt items, uInt size), + PNG_ALLOCATED); + +/* Function to free memory for zlib. PNGAPI is disallowed. */ +PNG_INTERNAL_FUNCTION(void,png_zfree,(voidpf png_ptr, voidpf ptr),PNG_EMPTY); + +/* Next four functions are used internally as callbacks. PNGCBAPI is required + * but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3, changed to + * PNGCBAPI at 1.5.0 + */ + +PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_default_read_data,(png_structp png_ptr, + png_bytep data, size_t length),PNG_EMPTY); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_push_fill_buffer,(png_structp png_ptr, + png_bytep buffer, size_t length),PNG_EMPTY); +#endif + +PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_default_write_data,(png_structp png_ptr, + png_bytep data, size_t length),PNG_EMPTY); + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +# ifdef PNG_STDIO_SUPPORTED +PNG_INTERNAL_FUNCTION(void PNGCBAPI,png_default_flush,(png_structp png_ptr), + PNG_EMPTY); +# endif +#endif + +/* Reset the CRC variable */ +PNG_INTERNAL_FUNCTION(void,png_reset_crc,(png_structrp png_ptr),PNG_EMPTY); + +/* Write the "data" buffer to whatever output you are using */ +PNG_INTERNAL_FUNCTION(void,png_write_data,(png_structrp png_ptr, + png_const_bytep data, size_t length),PNG_EMPTY); + +/* Read and check the PNG file signature */ +PNG_INTERNAL_FUNCTION(void,png_read_sig,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); + +/* Read the chunk header (length + type name) */ +PNG_INTERNAL_FUNCTION(png_uint_32,png_read_chunk_header,(png_structrp png_ptr), + PNG_EMPTY); + +/* Read data from whatever input you are using into the "data" buffer */ +PNG_INTERNAL_FUNCTION(void,png_read_data,(png_structrp png_ptr, png_bytep data, + size_t length),PNG_EMPTY); + +/* Read bytes into buf, and update png_ptr->crc */ +PNG_INTERNAL_FUNCTION(void,png_crc_read,(png_structrp png_ptr, png_bytep buf, + png_uint_32 length),PNG_EMPTY); + +/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */ +PNG_INTERNAL_FUNCTION(int,png_crc_finish,(png_structrp png_ptr, + png_uint_32 skip),PNG_EMPTY); + +/* Calculate the CRC over a section of data. Note that we are only + * passing a maximum of 64K on systems that have this as a memory limit, + * since this is the maximum buffer size we can specify. + */ +PNG_INTERNAL_FUNCTION(void,png_calculate_crc,(png_structrp png_ptr, + png_const_bytep ptr, size_t length),PNG_EMPTY); + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_flush,(png_structrp png_ptr),PNG_EMPTY); +#endif + +/* Write various chunks */ + +/* Write the IHDR chunk, and update the png_struct with the necessary + * information. + */ +PNG_INTERNAL_FUNCTION(void,png_write_IHDR,(png_structrp png_ptr, + png_uint_32 width, png_uint_32 height, int bit_depth, int color_type, + int compression_method, int filter_method, int interlace_method),PNG_EMPTY); + +PNG_INTERNAL_FUNCTION(void,png_write_PLTE,(png_structrp png_ptr, + png_const_colorp palette, png_uint_32 num_pal),PNG_EMPTY); + +PNG_INTERNAL_FUNCTION(void,png_compress_IDAT,(png_structrp png_ptr, + png_const_bytep row_data, png_alloc_size_t row_data_length, int flush), + PNG_EMPTY); + +PNG_INTERNAL_FUNCTION(void,png_write_IEND,(png_structrp png_ptr),PNG_EMPTY); + +#ifdef PNG_WRITE_gAMA_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_gAMA_fixed,(png_structrp png_ptr, + png_fixed_point file_gamma),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_sBIT_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_sBIT,(png_structrp png_ptr, + png_const_color_8p sbit, int color_type),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_cHRM_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_cHRM_fixed,(png_structrp png_ptr, + const png_xy *xy), PNG_EMPTY); + /* The xy value must have been previously validated */ +#endif + +#ifdef PNG_WRITE_cICP_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_cICP,(png_structrp png_ptr, + png_byte colour_primaries, png_byte transfer_function, + png_byte matrix_coefficients, png_byte video_full_range_flag), PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_cLLI_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_cLLI_fixed,(png_structrp png_ptr, + png_uint_32 maxCLL, png_uint_32 maxFALL), PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_mDCV_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_mDCV_fixed,(png_structrp png_ptr, + png_uint_16 red_x, png_uint_16 red_y, + png_uint_16 green_x, png_uint_16 green_y, + png_uint_16 blue_x, png_uint_16 blue_y, + png_uint_16 white_x, png_uint_16 white_y, + png_uint_32 maxDL, png_uint_32 minDL), PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_sRGB_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_sRGB,(png_structrp png_ptr, + int intent),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_eXIf_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_eXIf,(png_structrp png_ptr, + png_bytep exif, int num_exif),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_iCCP_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_iCCP,(png_structrp png_ptr, + png_const_charp name, png_const_bytep profile, png_uint_32 proflen), + PNG_EMPTY); + /* Writes a previously 'set' profile. The profile argument is **not** + * compressed. + */ +#endif + +#ifdef PNG_WRITE_sPLT_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_sPLT,(png_structrp png_ptr, + png_const_sPLT_tp palette),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_tRNS_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_tRNS,(png_structrp png_ptr, + png_const_bytep trans, png_const_color_16p values, int number, + int color_type),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_bKGD_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_bKGD,(png_structrp png_ptr, + png_const_color_16p values, int color_type),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_hIST_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_hIST,(png_structrp png_ptr, + png_const_uint_16p hist, int num_hist),PNG_EMPTY); +#endif + +/* Chunks that have keywords */ +#ifdef PNG_WRITE_tEXt_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_tEXt,(png_structrp png_ptr, + png_const_charp key, png_const_charp text, size_t text_len),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_zTXt_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_zTXt,(png_structrp png_ptr, png_const_charp + key, png_const_charp text, int compression),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_iTXt_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_iTXt,(png_structrp png_ptr, + int compression, png_const_charp key, png_const_charp lang, + png_const_charp lang_key, png_const_charp text),PNG_EMPTY); +#endif + +#ifdef PNG_TEXT_SUPPORTED /* Added at version 1.0.14 and 1.2.4 */ +PNG_INTERNAL_FUNCTION(int,png_set_text_2,(png_const_structrp png_ptr, + png_inforp info_ptr, png_const_textp text_ptr, int num_text),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_oFFs_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_oFFs,(png_structrp png_ptr, + png_int_32 x_offset, png_int_32 y_offset, int unit_type),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_pCAL_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_pCAL,(png_structrp png_ptr, + png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams, + png_const_charp units, png_charpp params),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_pHYs_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_pHYs,(png_structrp png_ptr, + png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit, + int unit_type),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_tIME_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_tIME,(png_structrp png_ptr, + png_const_timep mod_time),PNG_EMPTY); +#endif + +#ifdef PNG_WRITE_sCAL_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_write_sCAL_s,(png_structrp png_ptr, + int unit, png_const_charp width, png_const_charp height),PNG_EMPTY); +#endif + +/* Called when finished processing a row of data */ +PNG_INTERNAL_FUNCTION(void,png_write_finish_row,(png_structrp png_ptr), + PNG_EMPTY); + +/* Internal use only. Called before first row of data */ +PNG_INTERNAL_FUNCTION(void,png_write_start_row,(png_structrp png_ptr), + PNG_EMPTY); + +/* Combine a row of data, dealing with alpha, etc. if requested. 'row' is an + * array of png_ptr->width pixels. If the image is not interlaced or this + * is the final pass this just does a memcpy, otherwise the "display" flag + * is used to determine whether to copy pixels that are not in the current pass. + * + * Because 'png_do_read_interlace' (below) replicates pixels this allows this + * function to achieve the documented 'blocky' appearance during interlaced read + * if display is 1 and the 'sparkle' appearance, where existing pixels in 'row' + * are not changed if they are not in the current pass, when display is 0. + * + * 'display' must be 0 or 1, otherwise the memcpy will be done regardless. + * + * The API always reads from the png_struct row buffer and always assumes that + * it is full width (png_do_read_interlace has already been called.) + * + * This function is only ever used to write to row buffers provided by the + * caller of the relevant libpng API and the row must have already been + * transformed by the read transformations. + * + * The PNG_USE_COMPILE_TIME_MASKS option causes generation of pre-computed + * bitmasks for use within the code, otherwise runtime generated masks are used. + * The default is compile time masks. + */ +#ifndef PNG_USE_COMPILE_TIME_MASKS +# define PNG_USE_COMPILE_TIME_MASKS 1 +#endif +PNG_INTERNAL_FUNCTION(void,png_combine_row,(png_const_structrp png_ptr, + png_bytep row, int display),PNG_EMPTY); + +#ifdef PNG_READ_INTERLACING_SUPPORTED +/* Expand an interlaced row: the 'row_info' describes the pass data that has + * been read in and must correspond to the pixels in 'row', the pixels are + * expanded (moved apart) in 'row' to match the final layout, when doing this + * the pixels are *replicated* to the intervening space. This is essential for + * the correct operation of png_combine_row, above. + */ +PNG_INTERNAL_FUNCTION(void,png_do_read_interlace,(png_row_infop row_info, + png_bytep row, int pass, png_uint_32 transformations),PNG_EMPTY); +#endif + +/* GRR TO DO (2.0 or whenever): simplify other internal calling interfaces */ + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED +/* Grab pixels out of a row for an interlaced pass */ +PNG_INTERNAL_FUNCTION(void,png_do_write_interlace,(png_row_infop row_info, + png_bytep row, int pass),PNG_EMPTY); +#endif + +/* Unfilter a row: check the filter value before calling this, there is no point + * calling it for PNG_FILTER_VALUE_NONE. + */ +PNG_INTERNAL_FUNCTION(void,png_read_filter_row,(png_structrp pp, png_row_infop + row_info, png_bytep row, png_const_bytep prev_row, int filter),PNG_EMPTY); + +#if PNG_ARM_NEON_OPT > 0 +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_neon,(png_row_infop row_info, + png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_neon,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_neon,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_neon,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_neon,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_neon,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_neon,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +#endif + +#if PNG_MIPS_MSA_IMPLEMENTATION == 1 +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_msa,(png_row_infop row_info, + png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_msa,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_msa,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_msa,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_msa,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_msa,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_msa,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +#endif + +#if PNG_MIPS_MMI_IMPLEMENTATION > 0 +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_mmi,(png_row_infop row_info, + png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_mmi,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_mmi,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_mmi,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_mmi,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_mmi,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_mmi,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +#endif + +#if PNG_POWERPC_VSX_OPT > 0 +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_vsx,(png_row_infop row_info, + png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_vsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_vsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_vsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_vsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_vsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_vsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +#endif + +#if PNG_INTEL_SSE_IMPLEMENTATION > 0 +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_sse2,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_sse2,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_sse2,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_sse2,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_sse2,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_sse2,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +#endif + +#if PNG_LOONGARCH_LSX_IMPLEMENTATION == 1 +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_lsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_lsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_lsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_lsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_lsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_lsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_lsx,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +#endif + +#if PNG_RISCV_RVV_OPT > 0 +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_up_rvv,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub3_rvv,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_sub4_rvv,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg3_rvv,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_avg4_rvv,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth3_rvv,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_filter_row_paeth4_rvv,(png_row_infop + row_info, png_bytep row, png_const_bytep prev_row),PNG_EMPTY); +#endif + +/* Choose the best filter to use and filter the row data */ +PNG_INTERNAL_FUNCTION(void,png_write_find_filter,(png_structrp png_ptr, + png_row_infop row_info),PNG_EMPTY); + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_read_IDAT_data,(png_structrp png_ptr, + png_bytep output, png_alloc_size_t avail_out),PNG_EMPTY); + /* Read 'avail_out' bytes of data from the IDAT stream. If the output buffer + * is NULL the function checks, instead, for the end of the stream. In this + * case a benign error will be issued if the stream end is not found or if + * extra data has to be consumed. + */ +PNG_INTERNAL_FUNCTION(void,png_read_finish_IDAT,(png_structrp png_ptr), + PNG_EMPTY); + /* This cleans up when the IDAT LZ stream does not end when the last image + * byte is read; there is still some pending input. + */ + +PNG_INTERNAL_FUNCTION(void,png_read_finish_row,(png_structrp png_ptr), + PNG_EMPTY); + /* Finish a row while reading, dealing with interlacing passes, etc. */ +#endif /* SEQUENTIAL_READ */ + +/* Initialize the row buffers, etc. */ +PNG_INTERNAL_FUNCTION(void,png_read_start_row,(png_structrp png_ptr),PNG_EMPTY); + +#if ZLIB_VERNUM >= 0x1240 +PNG_INTERNAL_FUNCTION(int,png_zlib_inflate,(png_structrp png_ptr, int flush), + PNG_EMPTY); +# define PNG_INFLATE(pp, flush) png_zlib_inflate(pp, flush) +#else /* Zlib < 1.2.4 */ +# define PNG_INFLATE(pp, flush) inflate(&(pp)->zstream, flush) +#endif /* Zlib < 1.2.4 */ + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED +/* Optional call to update the users info structure */ +PNG_INTERNAL_FUNCTION(void,png_read_transform_info,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +#endif + +/* Shared transform functions, defined in pngtran.c */ +#if defined(PNG_WRITE_FILLER_SUPPORTED) || \ + defined(PNG_READ_STRIP_ALPHA_SUPPORTED) +PNG_INTERNAL_FUNCTION(void,png_do_strip_channel,(png_row_infop row_info, + png_bytep row, int at_start),PNG_EMPTY); +#endif + +#ifdef PNG_16BIT_SUPPORTED +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +PNG_INTERNAL_FUNCTION(void,png_do_swap,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) +PNG_INTERNAL_FUNCTION(void,png_do_packswap,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +PNG_INTERNAL_FUNCTION(void,png_do_invert,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +PNG_INTERNAL_FUNCTION(void,png_do_bgr,(png_row_infop row_info, + png_bytep row),PNG_EMPTY); +#endif + +/* The following decodes the appropriate chunks, and does error correction, + * then calls the appropriate callback for the chunk if it is valid. + */ +typedef enum +{ + /* Result of a call to png_handle_chunk made to handle the current chunk + * png_struct::chunk_name on read. Always informational, either the stream + * is read for the next chunk or the routine will call png_error. + * + * NOTE: order is important internally. handled_saved and above are regarded + * as handling the chunk. + */ + handled_error = 0, /* bad crc or known and bad format or too long */ + handled_discarded, /* not saved in the unknown chunk list */ + handled_saved, /* saved in the unknown chunk list */ + handled_ok /* known, supported and handled without error */ +} png_handle_result_code; + +PNG_INTERNAL_FUNCTION(png_handle_result_code,png_handle_unknown, + (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length, int keep), + PNG_EMPTY); + /* This is the function that gets called for unknown chunks. The 'keep' + * argument is either non-zero for a known chunk that has been set to be + * handled as unknown or zero for an unknown chunk. By default the function + * just skips the chunk or errors out if it is critical. + */ + +PNG_INTERNAL_FUNCTION(png_handle_result_code,png_handle_chunk, + (png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length),PNG_EMPTY); + /* This handles the current chunk png_ptr->chunk_name with unread + * data[length] and returns one of the above result codes. + */ + +#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) ||\ + defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) +PNG_INTERNAL_FUNCTION(int,png_chunk_unknown_handling, + (png_const_structrp png_ptr, png_uint_32 chunk_name),PNG_EMPTY); + /* Exactly as the API png_handle_as_unknown() except that the argument is a + * 32-bit chunk name, not a string. + */ +#endif /* READ_UNKNOWN_CHUNKS || HANDLE_AS_UNKNOWN */ + +/* Handle the transformations for reading and writing */ +#ifdef PNG_READ_TRANSFORMS_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_read_transformations,(png_structrp png_ptr, + png_row_infop row_info),PNG_EMPTY); +#endif +#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_do_write_transformations,(png_structrp png_ptr, + png_row_infop row_info),PNG_EMPTY); +#endif + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_init_read_transformations,(png_structrp png_ptr), + PNG_EMPTY); +#endif + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_push_read_chunk,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_read_sig,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_check_crc,(png_structrp png_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_save_buffer,(png_structrp png_ptr), + PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_restore_buffer,(png_structrp png_ptr, + png_bytep buffer, size_t buffer_length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_read_IDAT,(png_structrp png_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_process_IDAT_data,(png_structrp png_ptr, + png_bytep buffer, size_t buffer_length),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_process_row,(png_structrp png_ptr), + PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_have_info,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_have_end,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_have_row,(png_structrp png_ptr, + png_bytep row),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_push_read_end,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_process_some_data,(png_structrp png_ptr, + png_inforp info_ptr),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_read_push_finish_row,(png_structrp png_ptr), + PNG_EMPTY); +#endif /* PROGRESSIVE_READ */ + +#ifdef PNG_iCCP_SUPPORTED +/* Routines for checking parts of an ICC profile. */ +#ifdef PNG_READ_iCCP_SUPPORTED +PNG_INTERNAL_FUNCTION(int,png_icc_check_length,(png_const_structrp png_ptr, + png_const_charp name, png_uint_32 profile_length), PNG_EMPTY); +#endif /* READ_iCCP */ +PNG_INTERNAL_FUNCTION(int,png_icc_check_header,(png_const_structrp png_ptr, + png_const_charp name, png_uint_32 profile_length, + png_const_bytep profile /* first 132 bytes only */, int color_type), + PNG_EMPTY); +PNG_INTERNAL_FUNCTION(int,png_icc_check_tag_table,(png_const_structrp png_ptr, + png_const_charp name, png_uint_32 profile_length, + png_const_bytep profile /* header plus whole tag table */), PNG_EMPTY); +#endif /* iCCP */ + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_set_rgb_coefficients, (png_structrp png_ptr), + PNG_EMPTY); + /* Set the rgb_to_gray coefficients from the cHRM Y values (if unset) */ +#endif /* READ_RGB_TO_GRAY */ + +/* Added at libpng version 1.4.0 */ +PNG_INTERNAL_FUNCTION(void,png_check_IHDR,(png_const_structrp png_ptr, + png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_type, int compression_type, + int filter_type),PNG_EMPTY); + +/* Added at libpng version 1.5.10 */ +#if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \ + defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED) +PNG_INTERNAL_FUNCTION(void,png_do_check_palette_indexes, + (png_structrp png_ptr, png_row_infop row_info),PNG_EMPTY); +#endif + +#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED) +PNG_INTERNAL_FUNCTION(void,png_fixed_error,(png_const_structrp png_ptr, + png_const_charp name),PNG_NORETURN); +#endif + +/* Puts 'string' into 'buffer' at buffer[pos], taking care never to overwrite + * the end. Always leaves the buffer nul terminated. Never errors out (and + * there is no error code.) + */ +PNG_INTERNAL_FUNCTION(size_t,png_safecat,(png_charp buffer, size_t bufsize, + size_t pos, png_const_charp string),PNG_EMPTY); + +/* Various internal functions to handle formatted warning messages, currently + * only implemented for warnings. + */ +#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_TIME_RFC1123_SUPPORTED) +/* Utility to dump an unsigned value into a buffer, given a start pointer and + * and end pointer (which should point just *beyond* the end of the buffer!) + * Returns the pointer to the start of the formatted string. This utility only + * does unsigned values. + */ +PNG_INTERNAL_FUNCTION(png_charp,png_format_number,(png_const_charp start, + png_charp end, int format, png_alloc_size_t number),PNG_EMPTY); + +/* Convenience macro that takes an array: */ +#define PNG_FORMAT_NUMBER(buffer,format,number) \ + png_format_number(buffer, buffer + (sizeof buffer), format, number) + +/* Suggested size for a number buffer (enough for 64 bits and a sign!) */ +#define PNG_NUMBER_BUFFER_SIZE 24 + +/* These are the integer formats currently supported, the name is formed from + * the standard printf(3) format string. + */ +#define PNG_NUMBER_FORMAT_u 1 /* chose unsigned API! */ +#define PNG_NUMBER_FORMAT_02u 2 +#define PNG_NUMBER_FORMAT_d 1 /* chose signed API! */ +#define PNG_NUMBER_FORMAT_02d 2 +#define PNG_NUMBER_FORMAT_x 3 +#define PNG_NUMBER_FORMAT_02x 4 +#define PNG_NUMBER_FORMAT_fixed 5 /* choose the signed API */ +#endif + +#ifdef PNG_WARNINGS_SUPPORTED +/* New defines and members adding in libpng-1.5.4 */ +# define PNG_WARNING_PARAMETER_SIZE 32 +# define PNG_WARNING_PARAMETER_COUNT 8 /* Maximum 9; see pngerror.c */ + +/* An l-value of this type has to be passed to the APIs below to cache the + * values of the parameters to a formatted warning message. + */ +typedef char png_warning_parameters[PNG_WARNING_PARAMETER_COUNT][ + PNG_WARNING_PARAMETER_SIZE]; + +PNG_INTERNAL_FUNCTION(void,png_warning_parameter,(png_warning_parameters p, + int number, png_const_charp string),PNG_EMPTY); + /* Parameters are limited in size to PNG_WARNING_PARAMETER_SIZE characters, + * including the trailing '\0'. + */ +PNG_INTERNAL_FUNCTION(void,png_warning_parameter_unsigned, + (png_warning_parameters p, int number, int format, png_alloc_size_t value), + PNG_EMPTY); + /* Use png_alloc_size_t because it is an unsigned type as big as any we + * need to output. Use the following for a signed value. + */ +PNG_INTERNAL_FUNCTION(void,png_warning_parameter_signed, + (png_warning_parameters p, int number, int format, png_int_32 value), + PNG_EMPTY); + +PNG_INTERNAL_FUNCTION(void,png_formatted_warning,(png_const_structrp png_ptr, + png_warning_parameters p, png_const_charp message),PNG_EMPTY); + /* 'message' follows the X/Open approach of using @1, @2 to insert + * parameters previously supplied using the above functions. Errors in + * specifying the parameters will simply result in garbage substitutions. + */ +#endif + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +/* Application errors (new in 1.6); use these functions (declared below) for + * errors in the parameters or order of API function calls on read. The + * 'warning' should be used for an error that can be handled completely; the + * 'error' for one which can be handled safely but which may lose application + * information or settings. + * + * By default these both result in a png_error call prior to release, while in a + * released version the 'warning' is just a warning. However if the application + * explicitly disables benign errors (explicitly permitting the code to lose + * information) they both turn into warnings. + * + * If benign errors aren't supported they end up as the corresponding base call + * (png_warning or png_error.) + */ +PNG_INTERNAL_FUNCTION(void,png_app_warning,(png_const_structrp png_ptr, + png_const_charp message),PNG_EMPTY); + /* The application provided invalid parameters to an API function or called + * an API function at the wrong time, libpng can completely recover. + */ + +PNG_INTERNAL_FUNCTION(void,png_app_error,(png_const_structrp png_ptr, + png_const_charp message),PNG_EMPTY); + /* As above but libpng will ignore the call, or attempt some other partial + * recovery from the error. + */ +#else +# define png_app_warning(pp,s) png_warning(pp,s) +# define png_app_error(pp,s) png_error(pp,s) +#endif + +PNG_INTERNAL_FUNCTION(void,png_chunk_report,(png_const_structrp png_ptr, + png_const_charp message, int error),PNG_EMPTY); + /* Report a recoverable issue in chunk data. On read this is used to report + * a problem found while reading a particular chunk and the + * png_chunk_benign_error or png_chunk_warning function is used as + * appropriate. On write this is used to report an error that comes from + * data set via an application call to a png_set_ API and png_app_error or + * png_app_warning is used as appropriate. + * + * The 'error' parameter must have one of the following values: + */ +#define PNG_CHUNK_WARNING 0 /* never an error */ +#define PNG_CHUNK_WRITE_ERROR 1 /* an error only on write */ +#define PNG_CHUNK_ERROR 2 /* always an error */ + +/* ASCII to FP interfaces, currently only implemented if sCAL + * support is required. + */ +#if defined(PNG_sCAL_SUPPORTED) +/* MAX_DIGITS is actually the maximum number of characters in an sCAL + * width or height, derived from the precision (number of significant + * digits - a build time settable option) and assumptions about the + * maximum ridiculous exponent. + */ +#define PNG_sCAL_MAX_DIGITS (PNG_sCAL_PRECISION+1/*.*/+1/*E*/+10/*exponent*/) + +#ifdef PNG_FLOATING_POINT_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_ascii_from_fp,(png_const_structrp png_ptr, + png_charp ascii, size_t size, double fp, unsigned int precision), + PNG_EMPTY); +#endif /* FLOATING_POINT */ + +#ifdef PNG_FIXED_POINT_SUPPORTED +PNG_INTERNAL_FUNCTION(void,png_ascii_from_fixed,(png_const_structrp png_ptr, + png_charp ascii, size_t size, png_fixed_point fp),PNG_EMPTY); +#endif /* FIXED_POINT */ +#endif /* sCAL */ + +#if defined(PNG_sCAL_SUPPORTED) || defined(PNG_pCAL_SUPPORTED) +/* An internal API to validate the format of a floating point number. + * The result is the index of the next character. If the number is + * not valid it will be the index of a character in the supposed number. + * + * The format of a number is defined in the PNG extensions specification + * and this API is strictly conformant to that spec, not anyone elses! + * + * The format as a regular expression is: + * + * [+-]?[0-9]+.?([Ee][+-]?[0-9]+)? + * + * or: + * + * [+-]?.[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)? + * + * The complexity is that either integer or fraction must be present and the + * fraction is permitted to have no digits only if the integer is present. + * + * NOTE: The dangling E problem. + * There is a PNG valid floating point number in the following: + * + * PNG floating point numbers are not greedy. + * + * Working this out requires *TWO* character lookahead (because of the + * sign), the parser does not do this - it will fail at the 'r' - this + * doesn't matter for PNG sCAL chunk values, but it requires more care + * if the value were ever to be embedded in something more complex. Use + * ANSI-C strtod if you need the lookahead. + */ +/* State table for the parser. */ +#define PNG_FP_INTEGER 0 /* before or in integer */ +#define PNG_FP_FRACTION 1 /* before or in fraction */ +#define PNG_FP_EXPONENT 2 /* before or in exponent */ +#define PNG_FP_STATE 3 /* mask for the above */ +#define PNG_FP_SAW_SIGN 4 /* Saw +/- in current state */ +#define PNG_FP_SAW_DIGIT 8 /* Saw a digit in current state */ +#define PNG_FP_SAW_DOT 16 /* Saw a dot in current state */ +#define PNG_FP_SAW_E 32 /* Saw an E (or e) in current state */ +#define PNG_FP_SAW_ANY 60 /* Saw any of the above 4 */ + +/* These three values don't affect the parser. They are set but not used. + */ +#define PNG_FP_WAS_VALID 64 /* Preceding substring is a valid fp number */ +#define PNG_FP_NEGATIVE 128 /* A negative number, including "-0" */ +#define PNG_FP_NONZERO 256 /* A non-zero value */ +#define PNG_FP_STICKY 448 /* The above three flags */ + +/* This is available for the caller to store in 'state' if required. Do not + * call the parser after setting it (the parser sometimes clears it.) + */ +#define PNG_FP_INVALID 512 /* Available for callers as a distinct value */ + +/* Result codes for the parser (boolean - true means ok, false means + * not ok yet.) + */ +#define PNG_FP_MAYBE 0 /* The number may be valid in the future */ +#define PNG_FP_OK 1 /* The number is valid */ + +/* Tests on the sticky non-zero and negative flags. To pass these checks + * the state must also indicate that the whole number is valid - this is + * achieved by testing PNG_FP_SAW_DIGIT (see the implementation for why this + * is equivalent to PNG_FP_OK above.) + */ +#define PNG_FP_NZ_MASK (PNG_FP_SAW_DIGIT | PNG_FP_NEGATIVE | PNG_FP_NONZERO) + /* NZ_MASK: the string is valid and a non-zero negative value */ +#define PNG_FP_Z_MASK (PNG_FP_SAW_DIGIT | PNG_FP_NONZERO) + /* Z MASK: the string is valid and a non-zero value. */ + /* PNG_FP_SAW_DIGIT: the string is valid. */ +#define PNG_FP_IS_ZERO(state) (((state) & PNG_FP_Z_MASK) == PNG_FP_SAW_DIGIT) +#define PNG_FP_IS_POSITIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_Z_MASK) +#define PNG_FP_IS_NEGATIVE(state) (((state) & PNG_FP_NZ_MASK) == PNG_FP_NZ_MASK) + +/* The actual parser. This can be called repeatedly. It updates + * the index into the string and the state variable (which must + * be initialized to 0). It returns a result code, as above. There + * is no point calling the parser any more if it fails to advance to + * the end of the string - it is stuck on an invalid character (or + * terminated by '\0'). + * + * Note that the pointer will consume an E or even an E+ and then leave + * a 'maybe' state even though a preceding integer.fraction is valid. + * The PNG_FP_WAS_VALID flag indicates that a preceding substring was + * a valid number. It's possible to recover from this by calling + * the parser again (from the start, with state 0) but with a string + * that omits the last character (i.e. set the size to the index of + * the problem character.) This has not been tested within libpng. + */ +PNG_INTERNAL_FUNCTION(int,png_check_fp_number,(png_const_charp string, + size_t size, int *statep, size_t *whereami),PNG_EMPTY); + +/* This is the same but it checks a complete string and returns true + * only if it just contains a floating point number. As of 1.5.4 this + * function also returns the state at the end of parsing the number if + * it was valid (otherwise it returns 0.) This can be used for testing + * for negative or zero values using the sticky flag. + */ +PNG_INTERNAL_FUNCTION(int,png_check_fp_string,(png_const_charp string, + size_t size),PNG_EMPTY); +#endif /* pCAL || sCAL */ + +#if defined(PNG_READ_GAMMA_SUPPORTED) ||\ + defined(PNG_COLORSPACE_SUPPORTED) ||\ + defined(PNG_INCH_CONVERSIONS_SUPPORTED) ||\ + defined(PNG_READ_pHYs_SUPPORTED) +/* Added at libpng version 1.5.0 */ +/* This is a utility to provide a*times/div (rounded) and indicate + * if there is an overflow. The result is a boolean - false (0) + * for overflow, true (1) if no overflow, in which case *res + * holds the result. + */ +PNG_INTERNAL_FUNCTION(int,png_muldiv,(png_fixed_point_p res, png_fixed_point a, + png_int_32 multiplied_by, png_int_32 divided_by),PNG_EMPTY); + +/* Calculate a reciprocal - used for gamma values. This returns + * 0 if the argument is 0 in order to maintain an undefined value; + * there are no warnings. + */ +PNG_INTERNAL_FUNCTION(png_fixed_point,png_reciprocal,(png_fixed_point a), + PNG_EMPTY); +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* The same but gives a reciprocal of the product of two fixed point + * values. Accuracy is suitable for gamma calculations but this is + * not exact - use png_muldiv for that. Only required at present on read. + */ +PNG_INTERNAL_FUNCTION(png_fixed_point,png_reciprocal2,(png_fixed_point a, + png_fixed_point b),PNG_EMPTY); + +/* Return true if the gamma value is significantly different from 1.0 */ +PNG_INTERNAL_FUNCTION(int,png_gamma_significant,(png_fixed_point gamma_value), + PNG_EMPTY); + +/* PNGv3: 'resolve' the file gamma according to the new PNGv3 rules for colour + * space information. + * + * NOTE: this uses precisely those chunks that libpng supports. For example it + * doesn't use iCCP and it can only use cICP for known and manageable + * transforms. For this reason a gamma specified by png_set_gamma always takes + * precedence. + */ +PNG_INTERNAL_FUNCTION(png_fixed_point,png_resolve_file_gamma, + (png_const_structrp png_ptr),PNG_EMPTY); + +/* Internal fixed point gamma correction. These APIs are called as + * required to convert single values - they don't need to be fast, + * they are not used when processing image pixel values. + * + * While the input is an 'unsigned' value it must actually be the + * correct bit value - 0..255 or 0..65535 as required. + */ +PNG_INTERNAL_FUNCTION(png_uint_16,png_gamma_correct,(png_structrp png_ptr, + unsigned int value, png_fixed_point gamma_value),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(png_uint_16,png_gamma_16bit_correct,(unsigned int value, + png_fixed_point gamma_value),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(png_byte,png_gamma_8bit_correct,(unsigned int value, + png_fixed_point gamma_value),PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_destroy_gamma_table,(png_structrp png_ptr), + PNG_EMPTY); +PNG_INTERNAL_FUNCTION(void,png_build_gamma_table,(png_structrp png_ptr, + int bit_depth),PNG_EMPTY); +#endif /* READ_GAMMA */ + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +/* Set the RGB coefficients if not already set by png_set_rgb_to_gray */ +PNG_INTERNAL_FUNCTION(void,png_set_rgb_coefficients,(png_structrp png_ptr), + PNG_EMPTY); +#endif + +#if defined(PNG_cHRM_SUPPORTED) || defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) +PNG_INTERNAL_FUNCTION(int,png_XYZ_from_xy,(png_XYZ *XYZ, const png_xy *xy), + PNG_EMPTY); +#endif /* cHRM || READ_RGB_TO_GRAY */ + +#ifdef PNG_COLORSPACE_SUPPORTED +PNG_INTERNAL_FUNCTION(int,png_xy_from_XYZ,(png_xy *xy, const png_XYZ *XYZ), + PNG_EMPTY); +#endif + +/* SIMPLIFIED READ/WRITE SUPPORT */ +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) +/* The internal structure that png_image::opaque points to. */ +typedef struct png_control +{ + png_structp png_ptr; + png_infop info_ptr; + png_voidp error_buf; /* Always a jmp_buf at present. */ + + png_const_bytep memory; /* Memory buffer. */ + size_t size; /* Size of the memory buffer. */ + + unsigned int for_write :1; /* Otherwise it is a read structure */ + unsigned int owned_file :1; /* We own the file in io_ptr */ +} png_control; + +/* Return the pointer to the jmp_buf from a png_control: necessary because C + * does not reveal the type of the elements of jmp_buf. + */ +#ifdef __cplusplus +# define png_control_jmp_buf(pc) (((jmp_buf*)((pc)->error_buf))[0]) +#else +# define png_control_jmp_buf(pc) ((pc)->error_buf) +#endif + +/* Utility to safely execute a piece of libpng code catching and logging any + * errors that might occur. Returns true on success, false on failure (either + * of the function or as a result of a png_error.) + */ +PNG_INTERNAL_CALLBACK(void,png_safe_error,(png_structp png_ptr, + png_const_charp error_message),PNG_NORETURN); + +#ifdef PNG_WARNINGS_SUPPORTED +PNG_INTERNAL_CALLBACK(void,png_safe_warning,(png_structp png_ptr, + png_const_charp warning_message),PNG_EMPTY); +#else +# define png_safe_warning 0/*dummy argument*/ +#endif + +PNG_INTERNAL_FUNCTION(int,png_safe_execute,(png_imagep image, + int (*function)(png_voidp), png_voidp arg),PNG_EMPTY); + +/* Utility to log an error; this also cleans up the png_image; the function + * always returns 0 (false). + */ +PNG_INTERNAL_FUNCTION(int,png_image_error,(png_imagep image, + png_const_charp error_message),PNG_EMPTY); + +#ifndef PNG_SIMPLIFIED_READ_SUPPORTED +/* png_image_free is used by the write code but not exported */ +PNG_INTERNAL_FUNCTION(void, png_image_free, (png_imagep image), PNG_EMPTY); +#endif /* !SIMPLIFIED_READ */ + +#endif /* SIMPLIFIED READ/WRITE */ + +/* These are initialization functions for hardware specific PNG filter + * optimizations; list these here then select the appropriate one at compile + * time using the macro PNG_FILTER_OPTIMIZATIONS. If the macro is not defined + * the generic code is used. + */ +#ifdef PNG_FILTER_OPTIMIZATIONS +PNG_INTERNAL_FUNCTION(void, PNG_FILTER_OPTIMIZATIONS, (png_structp png_ptr, + unsigned int bpp), PNG_EMPTY); + /* Just declare the optimization that will be used */ +#else + /* List *all* the possible optimizations here - this branch is required if + * the builder of libpng passes the definition of PNG_FILTER_OPTIMIZATIONS in + * CFLAGS in place of CPPFLAGS *and* uses symbol prefixing. + */ +# if PNG_ARM_NEON_OPT > 0 +PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_neon, + (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); +#endif + +#if PNG_MIPS_MSA_IMPLEMENTATION == 1 +PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_mips, + (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); +#endif + +# if PNG_MIPS_MMI_IMPLEMENTATION > 0 +PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_mips, + (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); +# endif + +# if PNG_INTEL_SSE_IMPLEMENTATION > 0 +PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_sse2, + (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); +# endif +#endif + +#if PNG_LOONGARCH_LSX_OPT > 0 +PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_lsx, + (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); +#endif + +# if PNG_RISCV_RVV_OPT > 0 +PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_rvv, + (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); +#endif + +PNG_INTERNAL_FUNCTION(png_uint_32, png_check_keyword, (png_structrp png_ptr, + png_const_charp key, png_bytep new_key), PNG_EMPTY); + +#if PNG_ARM_NEON_IMPLEMENTATION == 1 +PNG_INTERNAL_FUNCTION(void, + png_riffle_palette_neon, + (png_structrp), + PNG_EMPTY); +PNG_INTERNAL_FUNCTION(int, + png_do_expand_palette_rgba8_neon, + (png_structrp, + png_row_infop, + png_const_bytep, + const png_bytepp, + const png_bytepp), + PNG_EMPTY); +PNG_INTERNAL_FUNCTION(int, + png_do_expand_palette_rgb8_neon, + (png_structrp, + png_row_infop, + png_const_bytep, + const png_bytepp, + const png_bytepp), + PNG_EMPTY); +#endif + +/* Maintainer: Put new private prototypes here ^ */ + +#include "pngdebug.h" + +#ifdef __cplusplus +} +#endif + +#endif /* PNG_VERSION_INFO_ONLY */ diff --git a/widget/milsko/milskosrc/external/libpng/include/pngstruct.h b/widget/milsko/milskosrc/external/libpng/include/pngstruct.h new file mode 100644 index 0000000000..084422bc1e --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/include/pngstruct.h @@ -0,0 +1,465 @@ +/* pngstruct.h - internal structures for libpng + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +#ifndef PNGPRIV_H +# error This file must not be included by applications; please include +#endif + +#ifndef PNGSTRUCT_H +#define PNGSTRUCT_H +/* zlib.h defines the structure z_stream, an instance of which is included + * in this structure and is required for decompressing the LZ compressed + * data in PNG files. + */ +#ifndef ZLIB_CONST + /* We must ensure that zlib uses 'const' in declarations. */ +# define ZLIB_CONST +#endif +#include "zlib.h" +#ifdef const + /* zlib.h sometimes #defines const to nothing, undo this. */ +# undef const +#endif + +/* zlib.h has mediocre z_const use before 1.2.6, this stuff is for compatibility + * with older builds. + */ +#if ZLIB_VERNUM < 0x1260 +# define PNGZ_MSG_CAST(s) png_constcast(char*,s) +# define PNGZ_INPUT_CAST(b) png_constcast(png_bytep,b) +#else +# define PNGZ_MSG_CAST(s) (s) +# define PNGZ_INPUT_CAST(b) (b) +#endif + +/* zlib.h declares a magic type 'uInt' that limits the amount of data that zlib + * can handle at once. This type need be no larger than 16 bits (so maximum of + * 65535), this define allows us to discover how big it is, but limited by the + * maximum for size_t. The value can be overridden in a library build + * (pngusr.h, or set it in CPPFLAGS) and it works to set it to a considerably + * lower value (e.g. 255 works). A lower value may help memory usage (slightly) + * and may even improve performance on some systems (and degrade it on others.) + */ +#ifndef ZLIB_IO_MAX +# define ZLIB_IO_MAX ((uInt)-1) +#endif + +#ifdef PNG_WRITE_SUPPORTED +/* The type of a compression buffer list used by the write code. */ +typedef struct png_compression_buffer +{ + struct png_compression_buffer *next; + png_byte output[1]; /* actually zbuf_size */ +} png_compression_buffer, *png_compression_bufferp; + +#define PNG_COMPRESSION_BUFFER_SIZE(pp)\ + (offsetof(png_compression_buffer, output) + (pp)->zbuffer_size) +#endif + +/* Colorspace support; structures used in png_struct, png_info and in internal + * functions to hold and communicate information about the color space. + */ +/* The chromaticities of the red, green and blue colorants and the chromaticity + * of the corresponding white point (i.e. of rgb(1.0,1.0,1.0)). + */ +typedef struct png_xy +{ + png_fixed_point redx, redy; + png_fixed_point greenx, greeny; + png_fixed_point bluex, bluey; + png_fixed_point whitex, whitey; +} png_xy; + +/* The same data as above but encoded as CIE XYZ values. When this data comes + * from chromaticities the sum of the Y values is assumed to be 1.0 + */ +typedef struct png_XYZ +{ + png_fixed_point red_X, red_Y, red_Z; + png_fixed_point green_X, green_Y, green_Z; + png_fixed_point blue_X, blue_Y, blue_Z; +} png_XYZ; + +/* Chunk index values as an enum, PNG_INDEX_unknown is also a count of the + * number of chunks. + */ +#define PNG_CHUNK(cHNK, i) PNG_INDEX_ ## cHNK = (i), +typedef enum +{ + PNG_KNOWN_CHUNKS + PNG_INDEX_unknown +} png_index; +#undef PNG_CHUNK + +/* Chunk flag values. These are (png_uint_32 values) with exactly one bit set + * and can be combined into a flag set with bitwise 'or'. + * + * TODO: C23: convert these macros to C23 inlines (which are static). + */ +#define png_chunk_flag_from_index(i) (0x80000000U >> (31 - (i))) + /* The flag coresponding to the given png_index enum value. This is defined + * for png_unknown as well (until it reaches the value 32) but this should + * not be relied on. + */ + +#define png_file_has_chunk(png_ptr, i)\ + (((png_ptr)->chunks & png_chunk_flag_from_index(i)) != 0) + /* The chunk has been recorded in png_struct */ + +#define png_file_add_chunk(pnt_ptr, i)\ + ((void)((png_ptr)->chunks |= png_chunk_flag_from_index(i))) + /* Record the chunk in the png_struct */ + +struct png_struct_def +{ +#ifdef PNG_SETJMP_SUPPORTED + jmp_buf jmp_buf_local; /* New name in 1.6.0 for jmp_buf in png_struct */ + png_longjmp_ptr longjmp_fn;/* setjmp non-local goto function. */ + jmp_buf *jmp_buf_ptr; /* passed to longjmp_fn */ + size_t jmp_buf_size; /* size of the above, if allocated */ +#endif + png_error_ptr error_fn; /* function for printing errors and aborting */ +#ifdef PNG_WARNINGS_SUPPORTED + png_error_ptr warning_fn; /* function for printing warnings */ +#endif + png_voidp error_ptr; /* user supplied struct for error functions */ + png_rw_ptr write_data_fn; /* function for writing output data */ + png_rw_ptr read_data_fn; /* function for reading input data */ + png_voidp io_ptr; /* ptr to application struct for I/O functions */ + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr read_user_transform_fn; /* user read transform */ +#endif + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED + png_user_transform_ptr write_user_transform_fn; /* user write transform */ +#endif + +/* These were added in libpng-1.0.2 */ +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) + png_voidp user_transform_ptr; /* user supplied struct for user transform */ + png_byte user_transform_depth; /* bit depth of user transformed pixels */ + png_byte user_transform_channels; /* channels in user transformed pixels */ +#endif +#endif + + png_uint_32 mode; /* tells us where we are in the PNG file */ + png_uint_32 flags; /* flags indicating various things to libpng */ + png_uint_32 transformations; /* which transformations to perform */ + + png_uint_32 zowner; /* ID (chunk type) of zstream owner, 0 if none */ + z_stream zstream; /* decompression structure */ + +#ifdef PNG_WRITE_SUPPORTED + png_compression_bufferp zbuffer_list; /* Created on demand during write */ + uInt zbuffer_size; /* size of the actual buffer */ + + int zlib_level; /* holds zlib compression level */ + int zlib_method; /* holds zlib compression method */ + int zlib_window_bits; /* holds zlib compression window bits */ + int zlib_mem_level; /* holds zlib compression memory level */ + int zlib_strategy; /* holds zlib compression strategy */ +#endif +/* Added at libpng 1.5.4 */ +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED + int zlib_text_level; /* holds zlib compression level */ + int zlib_text_method; /* holds zlib compression method */ + int zlib_text_window_bits; /* holds zlib compression window bits */ + int zlib_text_mem_level; /* holds zlib compression memory level */ + int zlib_text_strategy; /* holds zlib compression strategy */ +#endif +/* End of material added at libpng 1.5.4 */ +/* Added at libpng 1.6.0 */ +#ifdef PNG_WRITE_SUPPORTED + int zlib_set_level; /* Actual values set into the zstream on write */ + int zlib_set_method; + int zlib_set_window_bits; + int zlib_set_mem_level; + int zlib_set_strategy; +#endif + + png_uint_32 chunks; /* PNG_CF_ for every chunk read or (NYI) written */ +# define png_has_chunk(png_ptr, cHNK)\ + png_file_has_chunk(png_ptr, PNG_INDEX_ ## cHNK) + /* Convenience accessor - use this to check for a known chunk by name */ + + png_uint_32 width; /* width of image in pixels */ + png_uint_32 height; /* height of image in pixels */ + png_uint_32 num_rows; /* number of rows in current pass */ + png_uint_32 usr_width; /* width of row at start of write */ + size_t rowbytes; /* size of row in bytes */ + png_uint_32 iwidth; /* width of current interlaced row in pixels */ + png_uint_32 row_number; /* current row in interlace pass */ + png_uint_32 chunk_name; /* PNG_CHUNK() id of current chunk */ + png_bytep prev_row; /* buffer to save previous (unfiltered) row. + * While reading this is a pointer into + * big_prev_row; while writing it is separately + * allocated if needed. + */ + png_bytep row_buf; /* buffer to save current (unfiltered) row. + * While reading, this is a pointer into + * big_row_buf; while writing it is separately + * allocated. + */ +#ifdef PNG_WRITE_FILTER_SUPPORTED + png_bytep try_row; /* buffer to save trial row when filtering */ + png_bytep tst_row; /* buffer to save best trial row when filtering */ +#endif + size_t info_rowbytes; /* Added in 1.5.4: cache of updated row bytes */ + + png_uint_32 idat_size; /* current IDAT size for read */ + png_uint_32 crc; /* current chunk CRC value */ + png_colorp palette; /* palette from the input file */ + png_uint_16 num_palette; /* number of color entries in palette */ + +/* Added at libpng-1.5.10 */ +#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED + int num_palette_max; /* maximum palette index found in IDAT */ +#endif + + png_uint_16 num_trans; /* number of transparency values */ + png_byte compression; /* file compression type (always 0) */ + png_byte filter; /* file filter type (always 0) */ + png_byte interlaced; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + png_byte pass; /* current interlace pass (0 - 6) */ + png_byte do_filter; /* row filter flags (see PNG_FILTER_ in png.h ) */ + png_byte color_type; /* color type of file */ + png_byte bit_depth; /* bit depth of file */ + png_byte usr_bit_depth; /* bit depth of users row: write only */ + png_byte pixel_depth; /* number of bits per pixel */ + png_byte channels; /* number of channels in file */ +#ifdef PNG_WRITE_SUPPORTED + png_byte usr_channels; /* channels at start of write: write only */ +#endif + png_byte sig_bytes; /* magic bytes read/written from start of file */ + png_byte maximum_pixel_depth; + /* pixel depth used for the row buffers */ + png_byte transformed_pixel_depth; + /* pixel depth after read/write transforms */ +#if ZLIB_VERNUM >= 0x1240 + png_byte zstream_start; /* at start of an input zlib stream */ +#endif /* Zlib >= 1.2.4 */ +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) + png_uint_16 filler; /* filler bytes for pixel expansion */ +#endif + +#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) + png_byte background_gamma_type; + png_fixed_point background_gamma; + png_color_16 background; /* background color in screen gamma space */ +#ifdef PNG_READ_GAMMA_SUPPORTED + png_color_16 background_1; /* background normalized to gamma 1.0 */ +#endif +#endif /* bKGD */ + +#ifdef PNG_WRITE_FLUSH_SUPPORTED + png_flush_ptr output_flush_fn; /* Function for flushing output */ + png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */ + png_uint_32 flush_rows; /* number of rows written since last flush */ +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + png_xy chromaticities; /* From mDVC, cICP, [iCCP], sRGB or cHRM */ +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED + int gamma_shift; /* number of "insignificant" bits in 16-bit gamma */ + png_fixed_point screen_gamma; /* screen gamma value (display exponent) */ + png_fixed_point file_gamma; /* file gamma value (encoding exponent) */ + png_fixed_point chunk_gamma; /* from cICP, iCCP, sRGB or gAMA */ + png_fixed_point default_gamma;/* from png_set_alpha_mode */ + + png_bytep gamma_table; /* gamma table for 8-bit depth files */ + png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */ +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) || \ + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) + png_bytep gamma_from_1; /* converts from 1.0 to screen */ + png_bytep gamma_to_1; /* converts from file to 1.0 */ + png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */ + png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */ +#endif /* READ_BACKGROUND || READ_ALPHA_MODE || RGB_TO_GRAY */ +#endif /* READ_GAMMA */ + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) + png_color_8 sig_bit; /* significant bits in each available channel */ +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) + png_color_8 shift; /* shift for significant bit transformation */ +#endif + +#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ + || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + png_bytep trans_alpha; /* alpha values for paletted files */ + png_color_16 trans_color; /* transparent color for non-paletted files */ +#endif + + png_read_status_ptr read_row_fn; /* called after each row is decoded */ + png_write_status_ptr write_row_fn; /* called after each row is encoded */ +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED + png_progressive_info_ptr info_fn; /* called after header data fully read */ + png_progressive_row_ptr row_fn; /* called after a prog. row is decoded */ + png_progressive_end_ptr end_fn; /* called after image is complete */ + png_bytep save_buffer_ptr; /* current location in save_buffer */ + png_bytep save_buffer; /* buffer for previously read data */ + png_bytep current_buffer_ptr; /* current location in current_buffer */ + png_bytep current_buffer; /* buffer for recently used data */ + png_uint_32 push_length; /* size of current input chunk */ + png_uint_32 skip_length; /* bytes to skip in input data */ + size_t save_buffer_size; /* amount of data now in save_buffer */ + size_t save_buffer_max; /* total size of save_buffer */ + size_t buffer_size; /* total amount of available input data */ + size_t current_buffer_size; /* amount of data now in current_buffer */ + int process_mode; /* what push library is currently doing */ + int cur_palette; /* current push library palette index */ +#endif /* PROGRESSIVE_READ */ + +#ifdef PNG_READ_QUANTIZE_SUPPORTED + png_bytep palette_lookup; /* lookup table for quantizing */ + png_bytep quantize_index; /* index translation for palette files */ +#endif + +/* Options */ +#ifdef PNG_SET_OPTION_SUPPORTED + png_uint_32 options; /* On/off state (up to 16 options) */ +#endif + +#if PNG_LIBPNG_VER < 10700 +/* To do: remove this from libpng-1.7 */ +#ifdef PNG_TIME_RFC1123_SUPPORTED + char time_buffer[29]; /* String to hold RFC 1123 time text */ +#endif /* TIME_RFC1123 */ +#endif /* LIBPNG_VER < 10700 */ + +/* New members added in libpng-1.0.6 */ + + png_uint_32 free_me; /* flags items libpng is responsible for freeing */ + +#ifdef PNG_USER_CHUNKS_SUPPORTED + png_voidp user_chunk_ptr; +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED + png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */ +#endif /* READ_USER_CHUNKS */ +#endif /* USER_CHUNKS */ + +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED + int unknown_default; /* As PNG_HANDLE_* */ + unsigned int num_chunk_list; /* Number of entries in the list */ + png_bytep chunk_list; /* List of png_byte[5]; the textual chunk name + * followed by a PNG_HANDLE_* byte */ +#endif + +/* New members added in libpng-1.0.3 */ +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + png_byte rgb_to_gray_status; + /* Added in libpng 1.5.5 to record setting of coefficients: */ + png_byte rgb_to_gray_coefficients_set; + /* These were changed from png_byte in libpng-1.0.6 */ + png_uint_16 rgb_to_gray_red_coeff; + png_uint_16 rgb_to_gray_green_coeff; + /* deleted in 1.5.5: rgb_to_gray_blue_coeff; */ +#endif + +/* New member added in libpng-1.6.36 */ +#if defined(PNG_READ_EXPAND_SUPPORTED) && \ + (defined(PNG_ARM_NEON_IMPLEMENTATION) || \ + defined(PNG_RISCV_RVV_IMPLEMENTATION)) + png_bytep riffled_palette; /* buffer for accelerated palette expansion */ +#endif + +/* New member added in libpng-1.0.4 (renamed in 1.0.9) */ +#if defined(PNG_MNG_FEATURES_SUPPORTED) +/* Changed from png_byte to png_uint_32 at version 1.2.0 */ + png_uint_32 mng_features_permitted; +#endif + +/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */ +#ifdef PNG_MNG_FEATURES_SUPPORTED + png_byte filter_type; +#endif + +/* New members added in libpng-1.2.0 */ + +/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ +#ifdef PNG_USER_MEM_SUPPORTED + png_voidp mem_ptr; /* user supplied struct for mem functions */ + png_malloc_ptr malloc_fn; /* function for allocating memory */ + png_free_ptr free_fn; /* function for freeing memory */ +#endif + +/* New member added in libpng-1.0.13 and 1.2.0 */ + png_bytep big_row_buf; /* buffer to save current (unfiltered) row */ + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* The following three members were added at version 1.0.14 and 1.2.4 */ + png_bytep quantize_sort; /* working sort array */ + png_bytep index_to_palette; /* where the original index currently is + in the palette */ + png_bytep palette_to_index; /* which original index points to this + palette color */ +#endif + +/* New members added in libpng-1.0.16 and 1.2.6 */ + png_byte compression_type; + +#ifdef PNG_USER_LIMITS_SUPPORTED + png_uint_32 user_width_max; + png_uint_32 user_height_max; + + /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown + * chunks that can be stored (0 means unlimited). + */ + png_uint_32 user_chunk_cache_max; + + /* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk + * can occupy when decompressed. 0 means unlimited. + */ + png_alloc_size_t user_chunk_malloc_max; +#endif + +/* New member added in libpng-1.0.25 and 1.2.17 */ +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED + /* Temporary storage for unknown chunk that the library doesn't recognize, + * used while reading the chunk. + */ + png_unknown_chunk unknown_chunk; +#endif + +/* New member added in libpng-1.2.26 */ + size_t old_big_row_buf_size; + +#ifdef PNG_READ_SUPPORTED +/* New member added in libpng-1.2.30 */ + png_bytep read_buffer; /* buffer for reading chunk data */ + png_alloc_size_t read_buffer_size; /* current size of the buffer */ +#endif +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED + uInt IDAT_read_size; /* limit on read buffer size for IDAT */ +#endif + +#ifdef PNG_IO_STATE_SUPPORTED +/* New member added in libpng-1.4.0 */ + png_uint_32 io_state; +#endif + +/* New member added in libpng-1.5.6 */ + png_bytep big_prev_row; + +/* New member added in libpng-1.5.7 */ + void (*read_filter[PNG_FILTER_VALUE_LAST-1])(png_row_infop row_info, + png_bytep row, png_const_bytep prev_row); +}; +#endif /* PNGSTRUCT_H */ diff --git a/widget/milsko/milskosrc/external/libpng/src/png.c b/widget/milsko/milskosrc/external/libpng/src/png.c new file mode 100644 index 0000000000..6e21915c40 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/src/png.c @@ -0,0 +1,4039 @@ +/* png.c - location for general purpose libpng functions + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +#include "pngpriv.h" + +/* Generate a compiler error if there is an old png.h in the search path. */ +typedef png_libpng_version_1_6_50 Your_png_h_is_not_version_1_6_50; + +/* Sanity check the chunks definitions - PNG_KNOWN_CHUNKS from pngpriv.h and the + * corresponding macro definitions. This causes a compile time failure if + * something is wrong but generates no code. + * + * (1) The first check is that the PNG_CHUNK(cHNK, index) 'index' values must + * increment from 0 to the last value. + */ +#define PNG_CHUNK(cHNK, index) != (index) || ((index)+1) + +#if 0 PNG_KNOWN_CHUNKS < 0 +# error PNG_KNOWN_CHUNKS chunk definitions are not in order +#endif + +#undef PNG_CHUNK + +/* (2) The chunk name macros, png_cHNK, must all be valid and defined. Since + * this is a preprocessor test undefined pp-tokens come out as zero and will + * fail this test. + */ +#define PNG_CHUNK(cHNK, index) !PNG_CHUNK_NAME_VALID(png_ ## cHNK) || + +#if PNG_KNOWN_CHUNKS 0 +# error png_cHNK not defined for some known cHNK +#endif + +#undef PNG_CHUNK + +/* Tells libpng that we have already handled the first "num_bytes" bytes + * of the PNG file signature. If the PNG data is embedded into another + * stream we can set num_bytes = 8 so that libpng will not attempt to read + * or write any of the magic bytes before it starts on the IHDR. + */ + +#ifdef PNG_READ_SUPPORTED +void PNGAPI +png_set_sig_bytes(png_structrp png_ptr, int num_bytes) +{ + unsigned int nb = (unsigned int)num_bytes; + + png_debug(1, "in png_set_sig_bytes"); + + if (png_ptr == NULL) + return; + + if (num_bytes < 0) + nb = 0; + + if (nb > 8) + png_error(png_ptr, "Too many bytes for PNG signature"); + + png_ptr->sig_bytes = (png_byte)nb; +} + +/* Checks whether the supplied bytes match the PNG signature. We allow + * checking less than the full 8-byte signature so that those apps that + * already read the first few bytes of a file to determine the file type + * can simply check the remaining bytes for extra assurance. Returns + * an integer less than, equal to, or greater than zero if sig is found, + * respectively, to be less than, to match, or be greater than the correct + * PNG signature (this is the same behavior as strcmp, memcmp, etc). + */ +int PNGAPI +png_sig_cmp(png_const_bytep sig, size_t start, size_t num_to_check) +{ + static const png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10}; + + if (num_to_check > 8) + num_to_check = 8; + + else if (num_to_check < 1) + return -1; + + if (start > 7) + return -1; + + if (start + num_to_check > 8) + num_to_check = 8 - start; + + return memcmp(&sig[start], &png_signature[start], num_to_check); +} + +#endif /* READ */ + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) +/* Function to allocate memory for zlib */ +PNG_FUNCTION(voidpf /* PRIVATE */, +png_zalloc,(voidpf png_ptr, uInt items, uInt size),PNG_ALLOCATED) +{ + png_alloc_size_t num_bytes = size; + + if (png_ptr == NULL) + return NULL; + + if (items >= (~(png_alloc_size_t)0)/size) + { + png_warning (png_voidcast(png_structrp, png_ptr), + "Potential overflow in png_zalloc()"); + return NULL; + } + + num_bytes *= items; + return png_malloc_warn(png_voidcast(png_structrp, png_ptr), num_bytes); +} + +/* Function to free memory for zlib */ +void /* PRIVATE */ +png_zfree(voidpf png_ptr, voidpf ptr) +{ + png_free(png_voidcast(png_const_structrp,png_ptr), ptr); +} + +/* Reset the CRC variable to 32 bits of 1's. Care must be taken + * in case CRC is > 32 bits to leave the top bits 0. + */ +void /* PRIVATE */ +png_reset_crc(png_structrp png_ptr) +{ + /* The cast is safe because the crc is a 32-bit value. */ + png_ptr->crc = (png_uint_32)crc32(0, Z_NULL, 0); +} + +/* Calculate the CRC over a section of data. We can only pass as + * much data to this routine as the largest single buffer size. We + * also check that this data will actually be used before going to the + * trouble of calculating it. + */ +void /* PRIVATE */ +png_calculate_crc(png_structrp png_ptr, png_const_bytep ptr, size_t length) +{ + int need_crc = 1; + + if (PNG_CHUNK_ANCILLARY(png_ptr->chunk_name) != 0) + { + if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) == + (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN)) + need_crc = 0; + } + + else /* critical */ + { + if ((png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) != 0) + need_crc = 0; + } + + /* 'uLong' is defined in zlib.h as unsigned long; this means that on some + * systems it is a 64-bit value. crc32, however, returns 32 bits so the + * following cast is safe. 'uInt' may be no more than 16 bits, so it is + * necessary to perform a loop here. + */ + if (need_crc != 0 && length > 0) + { + uLong crc = png_ptr->crc; /* Should never issue a warning */ + + do + { + uInt safe_length = (uInt)length; +#ifndef __COVERITY__ + if (safe_length == 0) + safe_length = (uInt)-1; /* evil, but safe */ +#endif + + crc = crc32(crc, ptr, safe_length); + + /* The following should never issue compiler warnings; if they do the + * target system has characteristics that will probably violate other + * assumptions within the libpng code. + */ + ptr += safe_length; + length -= safe_length; + } + while (length > 0); + + /* And the following is always safe because the crc is only 32 bits. */ + png_ptr->crc = (png_uint_32)crc; + } +} + +/* Check a user supplied version number, called from both read and write + * functions that create a png_struct. + */ +int +png_user_version_check(png_structrp png_ptr, png_const_charp user_png_ver) +{ + /* Libpng versions 1.0.0 and later are binary compatible if the version + * string matches through the second '.'; we must recompile any + * applications that use any older library version. + */ + + if (user_png_ver != NULL) + { + int i = -1; + int found_dots = 0; + + do + { + i++; + if (user_png_ver[i] != PNG_LIBPNG_VER_STRING[i]) + png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; + if (user_png_ver[i] == '.') + found_dots++; + } while (found_dots < 2 && user_png_ver[i] != 0 && + PNG_LIBPNG_VER_STRING[i] != 0); + } + + else + png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH; + + if ((png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH) != 0) + { +#ifdef PNG_WARNINGS_SUPPORTED + size_t pos = 0; + char m[128]; + + pos = png_safecat(m, (sizeof m), pos, + "Application built with libpng-"); + pos = png_safecat(m, (sizeof m), pos, user_png_ver); + pos = png_safecat(m, (sizeof m), pos, " but running with "); + pos = png_safecat(m, (sizeof m), pos, PNG_LIBPNG_VER_STRING); + PNG_UNUSED(pos) + + png_warning(png_ptr, m); +#endif + +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + png_ptr->flags = 0; +#endif + + return 0; + } + + /* Success return. */ + return 1; +} + +/* Generic function to create a png_struct for either read or write - this + * contains the common initialization. + */ +PNG_FUNCTION(png_structp /* PRIVATE */, +png_create_png_struct,(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn),PNG_ALLOCATED) +{ + png_struct create_struct; +# ifdef PNG_SETJMP_SUPPORTED + jmp_buf create_jmp_buf; +# endif + + /* This temporary stack-allocated structure is used to provide a place to + * build enough context to allow the user provided memory allocator (if any) + * to be called. + */ + memset(&create_struct, 0, (sizeof create_struct)); + +# ifdef PNG_USER_LIMITS_SUPPORTED + create_struct.user_width_max = PNG_USER_WIDTH_MAX; + create_struct.user_height_max = PNG_USER_HEIGHT_MAX; + +# ifdef PNG_USER_CHUNK_CACHE_MAX + create_struct.user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX; +# endif + +# if PNG_USER_CHUNK_MALLOC_MAX > 0 /* default to compile-time limit */ + create_struct.user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX; + + /* No compile-time limit, so initialize to the system limit: */ +# elif defined PNG_MAX_MALLOC_64K /* legacy system limit */ + create_struct.user_chunk_malloc_max = 65536U; + +# else /* modern system limit SIZE_MAX (C99) */ + create_struct.user_chunk_malloc_max = PNG_SIZE_MAX; +# endif +# endif + + /* The following two API calls simply set fields in png_struct, so it is safe + * to do them now even though error handling is not yet set up. + */ +# ifdef PNG_USER_MEM_SUPPORTED + png_set_mem_fn(&create_struct, mem_ptr, malloc_fn, free_fn); +# else + PNG_UNUSED(mem_ptr) + PNG_UNUSED(malloc_fn) + PNG_UNUSED(free_fn) +# endif + + /* (*error_fn) can return control to the caller after the error_ptr is set, + * this will result in a memory leak unless the error_fn does something + * extremely sophisticated. The design lacks merit but is implicit in the + * API. + */ + png_set_error_fn(&create_struct, error_ptr, error_fn, warn_fn); + +# ifdef PNG_SETJMP_SUPPORTED + if (!setjmp(create_jmp_buf)) +# endif + { +# ifdef PNG_SETJMP_SUPPORTED + /* Temporarily fake out the longjmp information until we have + * successfully completed this function. This only works if we have + * setjmp() support compiled in, but it is safe - this stuff should + * never happen. + */ + create_struct.jmp_buf_ptr = &create_jmp_buf; + create_struct.jmp_buf_size = 0; /*stack allocation*/ + create_struct.longjmp_fn = longjmp; +# endif + /* Call the general version checker (shared with read and write code): + */ + if (png_user_version_check(&create_struct, user_png_ver) != 0) + { + png_structrp png_ptr = png_voidcast(png_structrp, + png_malloc_warn(&create_struct, (sizeof *png_ptr))); + + if (png_ptr != NULL) + { + /* png_ptr->zstream holds a back-pointer to the png_struct, so + * this can only be done now: + */ + create_struct.zstream.zalloc = png_zalloc; + create_struct.zstream.zfree = png_zfree; + create_struct.zstream.opaque = png_ptr; + +# ifdef PNG_SETJMP_SUPPORTED + /* Eliminate the local error handling: */ + create_struct.jmp_buf_ptr = NULL; + create_struct.jmp_buf_size = 0; + create_struct.longjmp_fn = 0; +# endif + + *png_ptr = create_struct; + + /* This is the successful return point */ + return png_ptr; + } + } + } + + /* A longjmp because of a bug in the application storage allocator or a + * simple failure to allocate the png_struct. + */ + return NULL; +} + +/* Allocate the memory for an info_struct for the application. */ +PNG_FUNCTION(png_infop,PNGAPI +png_create_info_struct,(png_const_structrp png_ptr),PNG_ALLOCATED) +{ + png_inforp info_ptr; + + png_debug(1, "in png_create_info_struct"); + + if (png_ptr == NULL) + return NULL; + + /* Use the internal API that does not (or at least should not) error out, so + * that this call always returns ok. The application typically sets up the + * error handling *after* creating the info_struct because this is the way it + * has always been done in 'example.c'. + */ + info_ptr = png_voidcast(png_inforp, png_malloc_base(png_ptr, + (sizeof *info_ptr))); + + if (info_ptr != NULL) + memset(info_ptr, 0, (sizeof *info_ptr)); + + return info_ptr; +} + +/* This function frees the memory associated with a single info struct. + * Normally, one would use either png_destroy_read_struct() or + * png_destroy_write_struct() to free an info struct, but this may be + * useful for some applications. From libpng 1.6.0 this function is also used + * internally to implement the png_info release part of the 'struct' destroy + * APIs. This ensures that all possible approaches free the same data (all of + * it). + */ +void PNGAPI +png_destroy_info_struct(png_const_structrp png_ptr, png_infopp info_ptr_ptr) +{ + png_inforp info_ptr = NULL; + + png_debug(1, "in png_destroy_info_struct"); + + if (png_ptr == NULL) + return; + + if (info_ptr_ptr != NULL) + info_ptr = *info_ptr_ptr; + + if (info_ptr != NULL) + { + /* Do this first in case of an error below; if the app implements its own + * memory management this can lead to png_free calling png_error, which + * will abort this routine and return control to the app error handler. + * An infinite loop may result if it then tries to free the same info + * ptr. + */ + *info_ptr_ptr = NULL; + + png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); + memset(info_ptr, 0, (sizeof *info_ptr)); + png_free(png_ptr, info_ptr); + } +} + +/* Initialize the info structure. This is now an internal function (0.89) + * and applications using it are urged to use png_create_info_struct() + * instead. Use deprecated in 1.6.0, internal use removed (used internally it + * is just a memset). + * + * NOTE: it is almost inconceivable that this API is used because it bypasses + * the user-memory mechanism and the user error handling/warning mechanisms in + * those cases where it does anything other than a memset. + */ +PNG_FUNCTION(void,PNGAPI +png_info_init_3,(png_infopp ptr_ptr, size_t png_info_struct_size), + PNG_DEPRECATED) +{ + png_inforp info_ptr = *ptr_ptr; + + png_debug(1, "in png_info_init_3"); + + if (info_ptr == NULL) + return; + + if ((sizeof (png_info)) > png_info_struct_size) + { + *ptr_ptr = NULL; + /* The following line is why this API should not be used: */ + free(info_ptr); + info_ptr = png_voidcast(png_inforp, png_malloc_base(NULL, + (sizeof *info_ptr))); + if (info_ptr == NULL) + return; + *ptr_ptr = info_ptr; + } + + /* Set everything to 0 */ + memset(info_ptr, 0, (sizeof *info_ptr)); +} + +void PNGAPI +png_data_freer(png_const_structrp png_ptr, png_inforp info_ptr, + int freer, png_uint_32 mask) +{ + png_debug(1, "in png_data_freer"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + if (freer == PNG_DESTROY_WILL_FREE_DATA) + info_ptr->free_me |= mask; + + else if (freer == PNG_USER_WILL_FREE_DATA) + info_ptr->free_me &= ~mask; + + else + png_error(png_ptr, "Unknown freer parameter in png_data_freer"); +} + +void PNGAPI +png_free_data(png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 mask, + int num) +{ + png_debug(1, "in png_free_data"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + +#ifdef PNG_TEXT_SUPPORTED + /* Free text item num or (if num == -1) all text items */ + if (info_ptr->text != NULL && + ((mask & PNG_FREE_TEXT) & info_ptr->free_me) != 0) + { + if (num != -1) + { + png_free(png_ptr, info_ptr->text[num].key); + info_ptr->text[num].key = NULL; + } + + else + { + int i; + + for (i = 0; i < info_ptr->num_text; i++) + png_free(png_ptr, info_ptr->text[i].key); + + png_free(png_ptr, info_ptr->text); + info_ptr->text = NULL; + info_ptr->num_text = 0; + info_ptr->max_text = 0; + } + } +#endif + +#ifdef PNG_tRNS_SUPPORTED + /* Free any tRNS entry */ + if (((mask & PNG_FREE_TRNS) & info_ptr->free_me) != 0) + { + info_ptr->valid &= ~PNG_INFO_tRNS; + png_free(png_ptr, info_ptr->trans_alpha); + info_ptr->trans_alpha = NULL; + info_ptr->num_trans = 0; + } +#endif + +#ifdef PNG_sCAL_SUPPORTED + /* Free any sCAL entry */ + if (((mask & PNG_FREE_SCAL) & info_ptr->free_me) != 0) + { + png_free(png_ptr, info_ptr->scal_s_width); + png_free(png_ptr, info_ptr->scal_s_height); + info_ptr->scal_s_width = NULL; + info_ptr->scal_s_height = NULL; + info_ptr->valid &= ~PNG_INFO_sCAL; + } +#endif + +#ifdef PNG_pCAL_SUPPORTED + /* Free any pCAL entry */ + if (((mask & PNG_FREE_PCAL) & info_ptr->free_me) != 0) + { + png_free(png_ptr, info_ptr->pcal_purpose); + png_free(png_ptr, info_ptr->pcal_units); + info_ptr->pcal_purpose = NULL; + info_ptr->pcal_units = NULL; + + if (info_ptr->pcal_params != NULL) + { + int i; + + for (i = 0; i < info_ptr->pcal_nparams; i++) + png_free(png_ptr, info_ptr->pcal_params[i]); + + png_free(png_ptr, info_ptr->pcal_params); + info_ptr->pcal_params = NULL; + } + info_ptr->valid &= ~PNG_INFO_pCAL; + } +#endif + +#ifdef PNG_iCCP_SUPPORTED + /* Free any profile entry */ + if (((mask & PNG_FREE_ICCP) & info_ptr->free_me) != 0) + { + png_free(png_ptr, info_ptr->iccp_name); + png_free(png_ptr, info_ptr->iccp_profile); + info_ptr->iccp_name = NULL; + info_ptr->iccp_profile = NULL; + info_ptr->valid &= ~PNG_INFO_iCCP; + } +#endif + +#ifdef PNG_sPLT_SUPPORTED + /* Free a given sPLT entry, or (if num == -1) all sPLT entries */ + if (info_ptr->splt_palettes != NULL && + ((mask & PNG_FREE_SPLT) & info_ptr->free_me) != 0) + { + if (num != -1) + { + png_free(png_ptr, info_ptr->splt_palettes[num].name); + png_free(png_ptr, info_ptr->splt_palettes[num].entries); + info_ptr->splt_palettes[num].name = NULL; + info_ptr->splt_palettes[num].entries = NULL; + } + + else + { + int i; + + for (i = 0; i < info_ptr->splt_palettes_num; i++) + { + png_free(png_ptr, info_ptr->splt_palettes[i].name); + png_free(png_ptr, info_ptr->splt_palettes[i].entries); + } + + png_free(png_ptr, info_ptr->splt_palettes); + info_ptr->splt_palettes = NULL; + info_ptr->splt_palettes_num = 0; + info_ptr->valid &= ~PNG_INFO_sPLT; + } + } +#endif + +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED + if (info_ptr->unknown_chunks != NULL && + ((mask & PNG_FREE_UNKN) & info_ptr->free_me) != 0) + { + if (num != -1) + { + png_free(png_ptr, info_ptr->unknown_chunks[num].data); + info_ptr->unknown_chunks[num].data = NULL; + } + + else + { + int i; + + for (i = 0; i < info_ptr->unknown_chunks_num; i++) + png_free(png_ptr, info_ptr->unknown_chunks[i].data); + + png_free(png_ptr, info_ptr->unknown_chunks); + info_ptr->unknown_chunks = NULL; + info_ptr->unknown_chunks_num = 0; + } + } +#endif + +#ifdef PNG_eXIf_SUPPORTED + /* Free any eXIf entry */ + if (((mask & PNG_FREE_EXIF) & info_ptr->free_me) != 0) + { + if (info_ptr->exif) + { + png_free(png_ptr, info_ptr->exif); + info_ptr->exif = NULL; + } + info_ptr->valid &= ~PNG_INFO_eXIf; + } +#endif + +#ifdef PNG_hIST_SUPPORTED + /* Free any hIST entry */ + if (((mask & PNG_FREE_HIST) & info_ptr->free_me) != 0) + { + png_free(png_ptr, info_ptr->hist); + info_ptr->hist = NULL; + info_ptr->valid &= ~PNG_INFO_hIST; + } +#endif + + /* Free any PLTE entry that was internally allocated */ + if (((mask & PNG_FREE_PLTE) & info_ptr->free_me) != 0) + { + png_free(png_ptr, info_ptr->palette); + info_ptr->palette = NULL; + info_ptr->valid &= ~PNG_INFO_PLTE; + info_ptr->num_palette = 0; + } + +#ifdef PNG_INFO_IMAGE_SUPPORTED + /* Free any image bits attached to the info structure */ + if (((mask & PNG_FREE_ROWS) & info_ptr->free_me) != 0) + { + if (info_ptr->row_pointers != NULL) + { + png_uint_32 row; + for (row = 0; row < info_ptr->height; row++) + png_free(png_ptr, info_ptr->row_pointers[row]); + + png_free(png_ptr, info_ptr->row_pointers); + info_ptr->row_pointers = NULL; + } + info_ptr->valid &= ~PNG_INFO_IDAT; + } +#endif + + if (num != -1) + mask &= ~PNG_FREE_MUL; + + info_ptr->free_me &= ~mask; +} +#endif /* READ || WRITE */ + +/* This function returns a pointer to the io_ptr associated with the user + * functions. The application should free any memory associated with this + * pointer before png_write_destroy() or png_read_destroy() are called. + */ +png_voidp PNGAPI +png_get_io_ptr(png_const_structrp png_ptr) +{ + if (png_ptr == NULL) + return NULL; + + return png_ptr->io_ptr; +} + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) +# ifdef PNG_STDIO_SUPPORTED +/* Initialize the default input/output functions for the PNG file. If you + * use your own read or write routines, you can call either png_set_read_fn() + * or png_set_write_fn() instead of png_init_io(). If you have defined + * PNG_NO_STDIO or otherwise disabled PNG_STDIO_SUPPORTED, you must use a + * function of your own because "FILE *" isn't necessarily available. + */ +void PNGAPI +png_init_io(png_structrp png_ptr, FILE *fp) +{ + png_debug(1, "in png_init_io"); + + if (png_ptr == NULL) + return; + + png_ptr->io_ptr = (png_voidp)fp; +} +# endif + +# ifdef PNG_SAVE_INT_32_SUPPORTED +/* PNG signed integers are saved in 32-bit 2's complement format. ANSI C-90 + * defines a cast of a signed integer to an unsigned integer either to preserve + * the value, if it is positive, or to calculate: + * + * (UNSIGNED_MAX+1) + integer + * + * Where UNSIGNED_MAX is the appropriate maximum unsigned value, so when the + * negative integral value is added the result will be an unsigned value + * corresponding to the 2's complement representation. + */ +void PNGAPI +png_save_int_32(png_bytep buf, png_int_32 i) +{ + png_save_uint_32(buf, (png_uint_32)i); +} +# endif + +# ifdef PNG_TIME_RFC1123_SUPPORTED +/* Convert the supplied time into an RFC 1123 string suitable for use in + * a "Creation Time" or other text-based time string. + */ +int PNGAPI +png_convert_to_rfc1123_buffer(char out[29], png_const_timep ptime) +{ + static const char short_months[12][4] = + {"Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; + + if (out == NULL) + return 0; + + if (ptime->year > 9999 /* RFC1123 limitation */ || + ptime->month == 0 || ptime->month > 12 || + ptime->day == 0 || ptime->day > 31 || + ptime->hour > 23 || ptime->minute > 59 || + ptime->second > 60) + return 0; + + { + size_t pos = 0; + char number_buf[5] = {0, 0, 0, 0, 0}; /* enough for a four-digit year */ + +# define APPEND_STRING(string) pos = png_safecat(out, 29, pos, (string)) +# define APPEND_NUMBER(format, value)\ + APPEND_STRING(PNG_FORMAT_NUMBER(number_buf, format, (value))) +# define APPEND(ch) if (pos < 28) out[pos++] = (ch) + + APPEND_NUMBER(PNG_NUMBER_FORMAT_u, (unsigned)ptime->day); + APPEND(' '); + APPEND_STRING(short_months[(ptime->month - 1)]); + APPEND(' '); + APPEND_NUMBER(PNG_NUMBER_FORMAT_u, ptime->year); + APPEND(' '); + APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->hour); + APPEND(':'); + APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->minute); + APPEND(':'); + APPEND_NUMBER(PNG_NUMBER_FORMAT_02u, (unsigned)ptime->second); + APPEND_STRING(" +0000"); /* This reliably terminates the buffer */ + PNG_UNUSED (pos) + +# undef APPEND +# undef APPEND_NUMBER +# undef APPEND_STRING + } + + return 1; +} + +# if PNG_LIBPNG_VER < 10700 +/* To do: remove the following from libpng-1.7 */ +/* Original API that uses a private buffer in png_struct. + * Deprecated because it causes png_struct to carry a spurious temporary + * buffer (png_struct::time_buffer), better to have the caller pass this in. + */ +png_const_charp PNGAPI +png_convert_to_rfc1123(png_structrp png_ptr, png_const_timep ptime) +{ + if (png_ptr != NULL) + { + /* The only failure above if png_ptr != NULL is from an invalid ptime */ + if (png_convert_to_rfc1123_buffer(png_ptr->time_buffer, ptime) == 0) + png_warning(png_ptr, "Ignoring invalid time value"); + + else + return png_ptr->time_buffer; + } + + return NULL; +} +# endif /* LIBPNG_VER < 10700 */ +# endif /* TIME_RFC1123 */ + +#endif /* READ || WRITE */ + +png_const_charp PNGAPI +png_get_copyright(png_const_structrp png_ptr) +{ + PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */ +#ifdef PNG_STRING_COPYRIGHT + return PNG_STRING_COPYRIGHT +#else + return PNG_STRING_NEWLINE \ + "libpng version 1.6.50" PNG_STRING_NEWLINE \ + "Copyright (c) 2018-2025 Cosmin Truta" PNG_STRING_NEWLINE \ + "Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson" \ + PNG_STRING_NEWLINE \ + "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ + "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ + PNG_STRING_NEWLINE; +#endif +} + +/* The following return the library version as a short string in the + * format 1.0.0 through 99.99.99zz. To get the version of *.h files + * used with your application, print out PNG_LIBPNG_VER_STRING, which + * is defined in png.h. + * Note: now there is no difference between png_get_libpng_ver() and + * png_get_header_ver(). Due to the version_nn_nn_nn typedef guard, + * it is guaranteed that png.c uses the correct version of png.h. + */ +png_const_charp PNGAPI +png_get_libpng_ver(png_const_structrp png_ptr) +{ + /* Version of *.c files used when building libpng */ + return png_get_header_ver(png_ptr); +} + +png_const_charp PNGAPI +png_get_header_ver(png_const_structrp png_ptr) +{ + /* Version of *.h files used when building libpng */ + PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */ + return PNG_LIBPNG_VER_STRING; +} + +png_const_charp PNGAPI +png_get_header_version(png_const_structrp png_ptr) +{ + /* Returns longer string containing both version and date */ + PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */ +#ifdef __STDC__ + return PNG_HEADER_VERSION_STRING +# ifndef PNG_READ_SUPPORTED + " (NO READ SUPPORT)" +# endif + PNG_STRING_NEWLINE; +#else + return PNG_HEADER_VERSION_STRING; +#endif +} + +#ifdef PNG_BUILD_GRAYSCALE_PALETTE_SUPPORTED +/* NOTE: this routine is not used internally! */ +/* Build a grayscale palette. Palette is assumed to be 1 << bit_depth + * large of png_color. This lets grayscale images be treated as + * paletted. Most useful for gamma correction and simplification + * of code. This API is not used internally. + */ +void PNGAPI +png_build_grayscale_palette(int bit_depth, png_colorp palette) +{ + int num_palette; + int color_inc; + int i; + int v; + + png_debug(1, "in png_do_build_grayscale_palette"); + + if (palette == NULL) + return; + + switch (bit_depth) + { + case 1: + num_palette = 2; + color_inc = 0xff; + break; + + case 2: + num_palette = 4; + color_inc = 0x55; + break; + + case 4: + num_palette = 16; + color_inc = 0x11; + break; + + case 8: + num_palette = 256; + color_inc = 1; + break; + + default: + num_palette = 0; + color_inc = 0; + break; + } + + for (i = 0, v = 0; i < num_palette; i++, v += color_inc) + { + palette[i].red = (png_byte)(v & 0xff); + palette[i].green = (png_byte)(v & 0xff); + palette[i].blue = (png_byte)(v & 0xff); + } +} +#endif + +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED +int PNGAPI +png_handle_as_unknown(png_const_structrp png_ptr, png_const_bytep chunk_name) +{ + /* Check chunk_name and return "keep" value if it's on the list, else 0 */ + png_const_bytep p, p_end; + + if (png_ptr == NULL || chunk_name == NULL || png_ptr->num_chunk_list == 0) + return PNG_HANDLE_CHUNK_AS_DEFAULT; + + p_end = png_ptr->chunk_list; + p = p_end + png_ptr->num_chunk_list*5; /* beyond end */ + + /* The code is the fifth byte after each four byte string. Historically this + * code was always searched from the end of the list, this is no longer + * necessary because the 'set' routine handles duplicate entries correctly. + */ + do /* num_chunk_list > 0, so at least one */ + { + p -= 5; + + if (memcmp(chunk_name, p, 4) == 0) + return p[4]; + } + while (p > p_end); + + /* This means that known chunks should be processed and unknown chunks should + * be handled according to the value of png_ptr->unknown_default; this can be + * confusing because, as a result, there are two levels of defaulting for + * unknown chunks. + */ + return PNG_HANDLE_CHUNK_AS_DEFAULT; +} + +#if defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) ||\ + defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) +int /* PRIVATE */ +png_chunk_unknown_handling(png_const_structrp png_ptr, png_uint_32 chunk_name) +{ + png_byte chunk_string[5]; + + PNG_CSTRING_FROM_CHUNK(chunk_string, chunk_name); + return png_handle_as_unknown(png_ptr, chunk_string); +} +#endif /* READ_UNKNOWN_CHUNKS || HANDLE_AS_UNKNOWN */ +#endif /* SET_UNKNOWN_CHUNKS */ + +#ifdef PNG_READ_SUPPORTED +/* This function, added to libpng-1.0.6g, is untested. */ +int PNGAPI +png_reset_zstream(png_structrp png_ptr) +{ + if (png_ptr == NULL) + return Z_STREAM_ERROR; + + /* WARNING: this resets the window bits to the maximum! */ + return inflateReset(&png_ptr->zstream); +} +#endif /* READ */ + +/* This function was added to libpng-1.0.7 */ +png_uint_32 PNGAPI +png_access_version_number(void) +{ + /* Version of *.c files used when building libpng */ + return (png_uint_32)PNG_LIBPNG_VER; +} + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) +/* Ensure that png_ptr->zstream.msg holds some appropriate error message string. + * If it doesn't 'ret' is used to set it to something appropriate, even in cases + * like Z_OK or Z_STREAM_END where the error code is apparently a success code. + */ +void /* PRIVATE */ +png_zstream_error(png_structrp png_ptr, int ret) +{ + /* Translate 'ret' into an appropriate error string, priority is given to the + * one in zstream if set. This always returns a string, even in cases like + * Z_OK or Z_STREAM_END where the error code is a success code. + */ + if (png_ptr->zstream.msg == NULL) switch (ret) + { + default: + case Z_OK: + png_ptr->zstream.msg = PNGZ_MSG_CAST("unexpected zlib return code"); + break; + + case Z_STREAM_END: + /* Normal exit */ + png_ptr->zstream.msg = PNGZ_MSG_CAST("unexpected end of LZ stream"); + break; + + case Z_NEED_DICT: + /* This means the deflate stream did not have a dictionary; this + * indicates a bogus PNG. + */ + png_ptr->zstream.msg = PNGZ_MSG_CAST("missing LZ dictionary"); + break; + + case Z_ERRNO: + /* gz APIs only: should not happen */ + png_ptr->zstream.msg = PNGZ_MSG_CAST("zlib IO error"); + break; + + case Z_STREAM_ERROR: + /* internal libpng error */ + png_ptr->zstream.msg = PNGZ_MSG_CAST("bad parameters to zlib"); + break; + + case Z_DATA_ERROR: + png_ptr->zstream.msg = PNGZ_MSG_CAST("damaged LZ stream"); + break; + + case Z_MEM_ERROR: + png_ptr->zstream.msg = PNGZ_MSG_CAST("insufficient memory"); + break; + + case Z_BUF_ERROR: + /* End of input or output; not a problem if the caller is doing + * incremental read or write. + */ + png_ptr->zstream.msg = PNGZ_MSG_CAST("truncated"); + break; + + case Z_VERSION_ERROR: + png_ptr->zstream.msg = PNGZ_MSG_CAST("unsupported zlib version"); + break; + + case PNG_UNEXPECTED_ZLIB_RETURN: + /* Compile errors here mean that zlib now uses the value co-opted in + * pngpriv.h for PNG_UNEXPECTED_ZLIB_RETURN; update the switch above + * and change pngpriv.h. Note that this message is "... return", + * whereas the default/Z_OK one is "... return code". + */ + png_ptr->zstream.msg = PNGZ_MSG_CAST("unexpected zlib return"); + break; + } +} + +#ifdef PNG_COLORSPACE_SUPPORTED +static png_int_32 +png_fp_add(png_int_32 addend0, png_int_32 addend1, int *error) +{ + /* Safely add two fixed point values setting an error flag and returning 0.5 + * on overflow. + * IMPLEMENTATION NOTE: ANSI requires signed overflow not to occur, therefore + * relying on addition of two positive values producing a negative one is not + * safe. + */ + if (addend0 > 0) + { + if (0x7fffffff - addend0 >= addend1) + return addend0+addend1; + } + else if (addend0 < 0) + { + if (-0x7fffffff - addend0 <= addend1) + return addend0+addend1; + } + else + return addend1; + + *error = 1; + return PNG_FP_1/2; +} + +static png_int_32 +png_fp_sub(png_int_32 addend0, png_int_32 addend1, int *error) +{ + /* As above but calculate addend0-addend1. */ + if (addend1 > 0) + { + if (-0x7fffffff + addend1 <= addend0) + return addend0-addend1; + } + else if (addend1 < 0) + { + if (0x7fffffff + addend1 >= addend0) + return addend0-addend1; + } + else + return addend0; + + *error = 1; + return PNG_FP_1/2; +} + +static int +png_safe_add(png_int_32 *addend0_and_result, png_int_32 addend1, + png_int_32 addend2) +{ + /* Safely add three integers. Returns 0 on success, 1 on overflow. Does not + * set the result on overflow. + */ + int error = 0; + int result = png_fp_add(*addend0_and_result, + png_fp_add(addend1, addend2, &error), + &error); + if (!error) *addend0_and_result = result; + return error; +} + +/* Added at libpng-1.5.5 to support read and write of true CIEXYZ values for + * cHRM, as opposed to using chromaticities. These internal APIs return + * non-zero on a parameter error. The X, Y and Z values are required to be + * positive and less than 1.0. + */ +int /* PRIVATE */ +png_xy_from_XYZ(png_xy *xy, const png_XYZ *XYZ) +{ + /* NOTE: returns 0 on success, 1 means error. */ + png_int_32 d, dred, dgreen, dblue, dwhite, whiteX, whiteY; + + /* 'd' in each of the blocks below is just X+Y+Z for each component, + * x, y and z are X,Y,Z/(X+Y+Z). + */ + d = XYZ->red_X; + if (png_safe_add(&d, XYZ->red_Y, XYZ->red_Z)) + return 1; + dred = d; + if (png_muldiv(&xy->redx, XYZ->red_X, PNG_FP_1, dred) == 0) + return 1; + if (png_muldiv(&xy->redy, XYZ->red_Y, PNG_FP_1, dred) == 0) + return 1; + + d = XYZ->green_X; + if (png_safe_add(&d, XYZ->green_Y, XYZ->green_Z)) + return 1; + dgreen = d; + if (png_muldiv(&xy->greenx, XYZ->green_X, PNG_FP_1, dgreen) == 0) + return 1; + if (png_muldiv(&xy->greeny, XYZ->green_Y, PNG_FP_1, dgreen) == 0) + return 1; + + d = XYZ->blue_X; + if (png_safe_add(&d, XYZ->blue_Y, XYZ->blue_Z)) + return 1; + dblue = d; + if (png_muldiv(&xy->bluex, XYZ->blue_X, PNG_FP_1, dblue) == 0) + return 1; + if (png_muldiv(&xy->bluey, XYZ->blue_Y, PNG_FP_1, dblue) == 0) + return 1; + + /* The reference white is simply the sum of the end-point (X,Y,Z) vectors so + * the fillowing calculates (X+Y+Z) of the reference white (media white, + * encoding white) itself: + */ + d = dblue; + if (png_safe_add(&d, dred, dgreen)) + return 1; + dwhite = d; + + /* Find the white X,Y values from the sum of the red, green and blue X,Y + * values. + */ + d = XYZ->red_X; + if (png_safe_add(&d, XYZ->green_X, XYZ->blue_X)) + return 1; + whiteX = d; + + d = XYZ->red_Y; + if (png_safe_add(&d, XYZ->green_Y, XYZ->blue_Y)) + return 1; + whiteY = d; + + if (png_muldiv(&xy->whitex, whiteX, PNG_FP_1, dwhite) == 0) + return 1; + if (png_muldiv(&xy->whitey, whiteY, PNG_FP_1, dwhite) == 0) + return 1; + + return 0; +} + +int /* PRIVATE */ +png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy) +{ + /* NOTE: returns 0 on success, 1 means error. */ + png_fixed_point red_inverse, green_inverse, blue_scale; + png_fixed_point left, right, denominator; + + /* Check xy and, implicitly, z. Note that wide gamut color spaces typically + * have end points with 0 tristimulus values (these are impossible end + * points, but they are used to cover the possible colors). We check + * xy->whitey against 5, not 0, to avoid a possible integer overflow. + * + * The limits here will *not* accept ACES AP0, where bluey is -7700 + * (-0.0770) because the PNG spec itself requires the xy values to be + * unsigned. whitey is also required to be 5 or more to avoid overflow. + * + * Instead the upper limits have been relaxed to accomodate ACES AP1 where + * redz ends up as -600 (-0.006). ProPhotoRGB was already "in range." + * The new limit accomodates the AP0 and AP1 ranges for z but not AP0 redy. + */ + const png_fixed_point fpLimit = PNG_FP_1+(PNG_FP_1/10); + if (xy->redx < 0 || xy->redx > fpLimit) return 1; + if (xy->redy < 0 || xy->redy > fpLimit-xy->redx) return 1; + if (xy->greenx < 0 || xy->greenx > fpLimit) return 1; + if (xy->greeny < 0 || xy->greeny > fpLimit-xy->greenx) return 1; + if (xy->bluex < 0 || xy->bluex > fpLimit) return 1; + if (xy->bluey < 0 || xy->bluey > fpLimit-xy->bluex) return 1; + if (xy->whitex < 0 || xy->whitex > fpLimit) return 1; + if (xy->whitey < 5 || xy->whitey > fpLimit-xy->whitex) return 1; + + /* The reverse calculation is more difficult because the original tristimulus + * value had 9 independent values (red,green,blue)x(X,Y,Z) however only 8 + * derived values were recorded in the cHRM chunk; + * (red,green,blue,white)x(x,y). This loses one degree of freedom and + * therefore an arbitrary ninth value has to be introduced to undo the + * original transformations. + * + * Think of the original end-points as points in (X,Y,Z) space. The + * chromaticity values (c) have the property: + * + * C + * c = --------- + * X + Y + Z + * + * For each c (x,y,z) from the corresponding original C (X,Y,Z). Thus the + * three chromaticity values (x,y,z) for each end-point obey the + * relationship: + * + * x + y + z = 1 + * + * This describes the plane in (X,Y,Z) space that intersects each axis at the + * value 1.0; call this the chromaticity plane. Thus the chromaticity + * calculation has scaled each end-point so that it is on the x+y+z=1 plane + * and chromaticity is the intersection of the vector from the origin to the + * (X,Y,Z) value with the chromaticity plane. + * + * To fully invert the chromaticity calculation we would need the three + * end-point scale factors, (red-scale, green-scale, blue-scale), but these + * were not recorded. Instead we calculated the reference white (X,Y,Z) and + * recorded the chromaticity of this. The reference white (X,Y,Z) would have + * given all three of the scale factors since: + * + * color-C = color-c * color-scale + * white-C = red-C + green-C + blue-C + * = red-c*red-scale + green-c*green-scale + blue-c*blue-scale + * + * But cHRM records only white-x and white-y, so we have lost the white scale + * factor: + * + * white-C = white-c*white-scale + * + * To handle this the inverse transformation makes an arbitrary assumption + * about white-scale: + * + * Assume: white-Y = 1.0 + * Hence: white-scale = 1/white-y + * Or: red-Y + green-Y + blue-Y = 1.0 + * + * Notice the last statement of the assumption gives an equation in three of + * the nine values we want to calculate. 8 more equations come from the + * above routine as summarised at the top above (the chromaticity + * calculation): + * + * Given: color-x = color-X / (color-X + color-Y + color-Z) + * Hence: (color-x - 1)*color-X + color.x*color-Y + color.x*color-Z = 0 + * + * This is 9 simultaneous equations in the 9 variables "color-C" and can be + * solved by Cramer's rule. Cramer's rule requires calculating 10 9x9 matrix + * determinants, however this is not as bad as it seems because only 28 of + * the total of 90 terms in the various matrices are non-zero. Nevertheless + * Cramer's rule is notoriously numerically unstable because the determinant + * calculation involves the difference of large, but similar, numbers. It is + * difficult to be sure that the calculation is stable for real world values + * and it is certain that it becomes unstable where the end points are close + * together. + * + * So this code uses the perhaps slightly less optimal but more + * understandable and totally obvious approach of calculating color-scale. + * + * This algorithm depends on the precision in white-scale and that is + * (1/white-y), so we can immediately see that as white-y approaches 0 the + * accuracy inherent in the cHRM chunk drops off substantially. + * + * libpng arithmetic: a simple inversion of the above equations + * ------------------------------------------------------------ + * + * white_scale = 1/white-y + * white-X = white-x * white-scale + * white-Y = 1.0 + * white-Z = (1 - white-x - white-y) * white_scale + * + * white-C = red-C + green-C + blue-C + * = red-c*red-scale + green-c*green-scale + blue-c*blue-scale + * + * This gives us three equations in (red-scale,green-scale,blue-scale) where + * all the coefficients are now known: + * + * red-x*red-scale + green-x*green-scale + blue-x*blue-scale + * = white-x/white-y + * red-y*red-scale + green-y*green-scale + blue-y*blue-scale = 1 + * red-z*red-scale + green-z*green-scale + blue-z*blue-scale + * = (1 - white-x - white-y)/white-y + * + * In the last equation color-z is (1 - color-x - color-y) so we can add all + * three equations together to get an alternative third: + * + * red-scale + green-scale + blue-scale = 1/white-y = white-scale + * + * So now we have a Cramer's rule solution where the determinants are just + * 3x3 - far more tractible. Unfortunately 3x3 determinants still involve + * multiplication of three coefficients so we can't guarantee to avoid + * overflow in the libpng fixed point representation. Using Cramer's rule in + * floating point is probably a good choice here, but it's not an option for + * fixed point. Instead proceed to simplify the first two equations by + * eliminating what is likely to be the largest value, blue-scale: + * + * blue-scale = white-scale - red-scale - green-scale + * + * Hence: + * + * (red-x - blue-x)*red-scale + (green-x - blue-x)*green-scale = + * (white-x - blue-x)*white-scale + * + * (red-y - blue-y)*red-scale + (green-y - blue-y)*green-scale = + * 1 - blue-y*white-scale + * + * And now we can trivially solve for (red-scale,green-scale): + * + * green-scale = + * (white-x - blue-x)*white-scale - (red-x - blue-x)*red-scale + * ----------------------------------------------------------- + * green-x - blue-x + * + * red-scale = + * 1 - blue-y*white-scale - (green-y - blue-y) * green-scale + * --------------------------------------------------------- + * red-y - blue-y + * + * Hence: + * + * red-scale = + * ( (green-x - blue-x) * (white-y - blue-y) - + * (green-y - blue-y) * (white-x - blue-x) ) / white-y + * ------------------------------------------------------------------------- + * (green-x - blue-x)*(red-y - blue-y)-(green-y - blue-y)*(red-x - blue-x) + * + * green-scale = + * ( (red-y - blue-y) * (white-x - blue-x) - + * (red-x - blue-x) * (white-y - blue-y) ) / white-y + * ------------------------------------------------------------------------- + * (green-x - blue-x)*(red-y - blue-y)-(green-y - blue-y)*(red-x - blue-x) + * + * Accuracy: + * The input values have 5 decimal digits of accuracy. + * + * In the previous implementation the values were all in the range 0 < value + * < 1, so simple products are in the same range but may need up to 10 + * decimal digits to preserve the original precision and avoid underflow. + * Because we are using a 32-bit signed representation we cannot match this; + * the best is a little over 9 decimal digits, less than 10. + * + * This range has now been extended to allow values up to 1.1, or 110,000 in + * fixed point. + * + * The approach used here is to preserve the maximum precision within the + * signed representation. Because the red-scale calculation above uses the + * difference between two products of values that must be in the range + * -1.1..+1.1 it is sufficient to divide the product by 8; + * ceil(121,000/32767*2). The factor is irrelevant in the calculation + * because it is applied to both numerator and denominator. + * + * Note that the values of the differences of the products of the + * chromaticities in the above equations tend to be small, for example for + * the sRGB chromaticities they are: + * + * red numerator: -0.04751 + * green numerator: -0.08788 + * denominator: -0.2241 (without white-y multiplication) + * + * The resultant Y coefficients from the chromaticities of some widely used + * color space definitions are (to 15 decimal places): + * + * sRGB + * 0.212639005871510 0.715168678767756 0.072192315360734 + * Kodak ProPhoto + * 0.288071128229293 0.711843217810102 0.000085653960605 + * Adobe RGB + * 0.297344975250536 0.627363566255466 0.075291458493998 + * Adobe Wide Gamut RGB + * 0.258728243040113 0.724682314948566 0.016589442011321 + */ + { + int error = 0; + + /* By the argument above overflow should be impossible here, however the + * code now simply returns a failure code. The xy subtracts in the + * arguments to png_muldiv are *not* checked for overflow because the + * checks at the start guarantee they are in the range 0..110000 and + * png_fixed_point is a 32-bit signed number. + */ + if (png_muldiv(&left, xy->greenx-xy->bluex, xy->redy - xy->bluey, 8) == 0) + return 1; + if (png_muldiv(&right, xy->greeny-xy->bluey, xy->redx - xy->bluex, 8) == + 0) + return 1; + denominator = png_fp_sub(left, right, &error); + if (error) return 1; + + /* Now find the red numerator. */ + if (png_muldiv(&left, xy->greenx-xy->bluex, xy->whitey-xy->bluey, 8) == 0) + return 1; + if (png_muldiv(&right, xy->greeny-xy->bluey, xy->whitex-xy->bluex, 8) == + 0) + return 1; + + /* Overflow is possible here and it indicates an extreme set of PNG cHRM + * chunk values. This calculation actually returns the reciprocal of the + * scale value because this allows us to delay the multiplication of + * white-y into the denominator, which tends to produce a small number. + */ + if (png_muldiv(&red_inverse, xy->whitey, denominator, + png_fp_sub(left, right, &error)) == 0 || error || + red_inverse <= xy->whitey /* r+g+b scales = white scale */) + return 1; + + /* Similarly for green_inverse: */ + if (png_muldiv(&left, xy->redy-xy->bluey, xy->whitex-xy->bluex, 8) == 0) + return 1; + if (png_muldiv(&right, xy->redx-xy->bluex, xy->whitey-xy->bluey, 8) == 0) + return 1; + if (png_muldiv(&green_inverse, xy->whitey, denominator, + png_fp_sub(left, right, &error)) == 0 || error || + green_inverse <= xy->whitey) + return 1; + + /* And the blue scale, the checks above guarantee this can't overflow but + * it can still produce 0 for extreme cHRM values. + */ + blue_scale = png_fp_sub(png_fp_sub(png_reciprocal(xy->whitey), + png_reciprocal(red_inverse), &error), + png_reciprocal(green_inverse), &error); + if (error || blue_scale <= 0) + return 1; + } + + /* And fill in the png_XYZ. Again the subtracts are safe because of the + * checks on the xy values at the start (the subtracts just calculate the + * corresponding z values.) + */ + if (png_muldiv(&XYZ->red_X, xy->redx, PNG_FP_1, red_inverse) == 0) + return 1; + if (png_muldiv(&XYZ->red_Y, xy->redy, PNG_FP_1, red_inverse) == 0) + return 1; + if (png_muldiv(&XYZ->red_Z, PNG_FP_1 - xy->redx - xy->redy, PNG_FP_1, + red_inverse) == 0) + return 1; + + if (png_muldiv(&XYZ->green_X, xy->greenx, PNG_FP_1, green_inverse) == 0) + return 1; + if (png_muldiv(&XYZ->green_Y, xy->greeny, PNG_FP_1, green_inverse) == 0) + return 1; + if (png_muldiv(&XYZ->green_Z, PNG_FP_1 - xy->greenx - xy->greeny, PNG_FP_1, + green_inverse) == 0) + return 1; + + if (png_muldiv(&XYZ->blue_X, xy->bluex, blue_scale, PNG_FP_1) == 0) + return 1; + if (png_muldiv(&XYZ->blue_Y, xy->bluey, blue_scale, PNG_FP_1) == 0) + return 1; + if (png_muldiv(&XYZ->blue_Z, PNG_FP_1 - xy->bluex - xy->bluey, blue_scale, + PNG_FP_1) == 0) + return 1; + + return 0; /*success*/ +} +#endif /* COLORSPACE */ + +#ifdef PNG_READ_iCCP_SUPPORTED +/* Error message generation */ +static char +png_icc_tag_char(png_uint_32 byte) +{ + byte &= 0xff; + if (byte >= 32 && byte <= 126) + return (char)byte; + else + return '?'; +} + +static void +png_icc_tag_name(char *name, png_uint_32 tag) +{ + name[0] = '\''; + name[1] = png_icc_tag_char(tag >> 24); + name[2] = png_icc_tag_char(tag >> 16); + name[3] = png_icc_tag_char(tag >> 8); + name[4] = png_icc_tag_char(tag ); + name[5] = '\''; +} + +static int +is_ICC_signature_char(png_alloc_size_t it) +{ + return it == 32 || (it >= 48 && it <= 57) || (it >= 65 && it <= 90) || + (it >= 97 && it <= 122); +} + +static int +is_ICC_signature(png_alloc_size_t it) +{ + return is_ICC_signature_char(it >> 24) /* checks all the top bits */ && + is_ICC_signature_char((it >> 16) & 0xff) && + is_ICC_signature_char((it >> 8) & 0xff) && + is_ICC_signature_char(it & 0xff); +} + +static int +png_icc_profile_error(png_const_structrp png_ptr, png_const_charp name, + png_alloc_size_t value, png_const_charp reason) +{ + size_t pos; + char message[196]; /* see below for calculation */ + + pos = png_safecat(message, (sizeof message), 0, "profile '"); /* 9 chars */ + pos = png_safecat(message, pos+79, pos, name); /* Truncate to 79 chars */ + pos = png_safecat(message, (sizeof message), pos, "': "); /* +2 = 90 */ + if (is_ICC_signature(value) != 0) + { + /* So 'value' is at most 4 bytes and the following cast is safe */ + png_icc_tag_name(message+pos, (png_uint_32)value); + pos += 6; /* total +8; less than the else clause */ + message[pos++] = ':'; + message[pos++] = ' '; + } +# ifdef PNG_WARNINGS_SUPPORTED + else + { + char number[PNG_NUMBER_BUFFER_SIZE]; /* +24 = 114 */ + + pos = png_safecat(message, (sizeof message), pos, + png_format_number(number, number+(sizeof number), + PNG_NUMBER_FORMAT_x, value)); + pos = png_safecat(message, (sizeof message), pos, "h: "); /* +2 = 116 */ + } +# endif + /* The 'reason' is an arbitrary message, allow +79 maximum 195 */ + pos = png_safecat(message, (sizeof message), pos, reason); + PNG_UNUSED(pos) + + png_chunk_benign_error(png_ptr, message); + + return 0; +} + +/* Encoded value of D50 as an ICC XYZNumber. From the ICC 2010 spec the value + * is XYZ(0.9642,1.0,0.8249), which scales to: + * + * (63189.8112, 65536, 54060.6464) + */ +static const png_byte D50_nCIEXYZ[12] = + { 0x00, 0x00, 0xf6, 0xd6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xd3, 0x2d }; + +static int /* bool */ +icc_check_length(png_const_structrp png_ptr, png_const_charp name, + png_uint_32 profile_length) +{ + if (profile_length < 132) + return png_icc_profile_error(png_ptr, name, profile_length, "too short"); + return 1; +} + +int /* PRIVATE */ +png_icc_check_length(png_const_structrp png_ptr, png_const_charp name, + png_uint_32 profile_length) +{ + if (!icc_check_length(png_ptr, name, profile_length)) + return 0; + + /* This needs to be here because the 'normal' check is in + * png_decompress_chunk, yet this happens after the attempt to + * png_malloc_base the required data. We only need this on read; on write + * the caller supplies the profile buffer so libpng doesn't allocate it. See + * the call to icc_check_length below (the write case). + */ + if (profile_length > png_chunk_max(png_ptr)) + return png_icc_profile_error(png_ptr, name, profile_length, + "profile too long"); + + return 1; +} + +int /* PRIVATE */ +png_icc_check_header(png_const_structrp png_ptr, png_const_charp name, + png_uint_32 profile_length, + png_const_bytep profile/* first 132 bytes only */, int color_type) +{ + png_uint_32 temp; + + /* Length check; this cannot be ignored in this code because profile_length + * is used later to check the tag table, so even if the profile seems over + * long profile_length from the caller must be correct. The caller can fix + * this up on read or write by just passing in the profile header length. + */ + temp = png_get_uint_32(profile); + if (temp != profile_length) + return png_icc_profile_error(png_ptr, name, temp, + "length does not match profile"); + + temp = (png_uint_32) (*(profile+8)); + if (temp > 3 && (profile_length & 3)) + return png_icc_profile_error(png_ptr, name, profile_length, + "invalid length"); + + temp = png_get_uint_32(profile+128); /* tag count: 12 bytes/tag */ + if (temp > 357913930 || /* (2^32-4-132)/12: maximum possible tag count */ + profile_length < 132+12*temp) /* truncated tag table */ + return png_icc_profile_error(png_ptr, name, temp, + "tag count too large"); + + /* The 'intent' must be valid or we can't store it, ICC limits the intent to + * 16 bits. + */ + temp = png_get_uint_32(profile+64); + if (temp >= 0xffff) /* The ICC limit */ + return png_icc_profile_error(png_ptr, name, temp, + "invalid rendering intent"); + + /* This is just a warning because the profile may be valid in future + * versions. + */ + if (temp >= PNG_sRGB_INTENT_LAST) + (void)png_icc_profile_error(png_ptr, name, temp, + "intent outside defined range"); + + /* At this point the tag table can't be checked because it hasn't necessarily + * been loaded; however, various header fields can be checked. These checks + * are for values permitted by the PNG spec in an ICC profile; the PNG spec + * restricts the profiles that can be passed in an iCCP chunk (they must be + * appropriate to processing PNG data!) + */ + + /* Data checks (could be skipped). These checks must be independent of the + * version number; however, the version number doesn't accommodate changes in + * the header fields (just the known tags and the interpretation of the + * data.) + */ + temp = png_get_uint_32(profile+36); /* signature 'ascp' */ + if (temp != 0x61637370) + return png_icc_profile_error(png_ptr, name, temp, + "invalid signature"); + + /* Currently the PCS illuminant/adopted white point (the computational + * white point) are required to be D50, + * however the profile contains a record of the illuminant so perhaps ICC + * expects to be able to change this in the future (despite the rationale in + * the introduction for using a fixed PCS adopted white.) Consequently the + * following is just a warning. + */ + if (memcmp(profile+68, D50_nCIEXYZ, 12) != 0) + (void)png_icc_profile_error(png_ptr, name, 0/*no tag value*/, + "PCS illuminant is not D50"); + + /* The PNG spec requires this: + * "If the iCCP chunk is present, the image samples conform to the colour + * space represented by the embedded ICC profile as defined by the + * International Color Consortium [ICC]. The colour space of the ICC profile + * shall be an RGB colour space for colour images (PNG colour types 2, 3, and + * 6), or a greyscale colour space for greyscale images (PNG colour types 0 + * and 4)." + * + * This checking code ensures the embedded profile (on either read or write) + * conforms to the specification requirements. Notice that an ICC 'gray' + * color-space profile contains the information to transform the monochrome + * data to XYZ or L*a*b (according to which PCS the profile uses) and this + * should be used in preference to the standard libpng K channel replication + * into R, G and B channels. + * + * Previously it was suggested that an RGB profile on grayscale data could be + * handled. However it it is clear that using an RGB profile in this context + * must be an error - there is no specification of what it means. Thus it is + * almost certainly more correct to ignore the profile. + */ + temp = png_get_uint_32(profile+16); /* data colour space field */ + switch (temp) + { + case 0x52474220: /* 'RGB ' */ + if ((color_type & PNG_COLOR_MASK_COLOR) == 0) + return png_icc_profile_error(png_ptr, name, temp, + "RGB color space not permitted on grayscale PNG"); + break; + + case 0x47524159: /* 'GRAY' */ + if ((color_type & PNG_COLOR_MASK_COLOR) != 0) + return png_icc_profile_error(png_ptr, name, temp, + "Gray color space not permitted on RGB PNG"); + break; + + default: + return png_icc_profile_error(png_ptr, name, temp, + "invalid ICC profile color space"); + } + + /* It is up to the application to check that the profile class matches the + * application requirements; the spec provides no guidance, but it's pretty + * weird if the profile is not scanner ('scnr'), monitor ('mntr'), printer + * ('prtr') or 'spac' (for generic color spaces). Issue a warning in these + * cases. Issue an error for device link or abstract profiles - these don't + * contain the records necessary to transform the color-space to anything + * other than the target device (and not even that for an abstract profile). + * Profiles of these classes may not be embedded in images. + */ + temp = png_get_uint_32(profile+12); /* profile/device class */ + switch (temp) + { + case 0x73636e72: /* 'scnr' */ + case 0x6d6e7472: /* 'mntr' */ + case 0x70727472: /* 'prtr' */ + case 0x73706163: /* 'spac' */ + /* All supported */ + break; + + case 0x61627374: /* 'abst' */ + /* May not be embedded in an image */ + return png_icc_profile_error(png_ptr, name, temp, + "invalid embedded Abstract ICC profile"); + + case 0x6c696e6b: /* 'link' */ + /* DeviceLink profiles cannot be interpreted in a non-device specific + * fashion, if an app uses the AToB0Tag in the profile the results are + * undefined unless the result is sent to the intended device, + * therefore a DeviceLink profile should not be found embedded in a + * PNG. + */ + return png_icc_profile_error(png_ptr, name, temp, + "unexpected DeviceLink ICC profile class"); + + case 0x6e6d636c: /* 'nmcl' */ + /* A NamedColor profile is also device specific, however it doesn't + * contain an AToB0 tag that is open to misinterpretation. Almost + * certainly it will fail the tests below. + */ + (void)png_icc_profile_error(png_ptr, name, temp, + "unexpected NamedColor ICC profile class"); + break; + + default: + /* To allow for future enhancements to the profile accept unrecognized + * profile classes with a warning, these then hit the test below on the + * tag content to ensure they are backward compatible with one of the + * understood profiles. + */ + (void)png_icc_profile_error(png_ptr, name, temp, + "unrecognized ICC profile class"); + break; + } + + /* For any profile other than a device link one the PCS must be encoded + * either in XYZ or Lab. + */ + temp = png_get_uint_32(profile+20); + switch (temp) + { + case 0x58595a20: /* 'XYZ ' */ + case 0x4c616220: /* 'Lab ' */ + break; + + default: + return png_icc_profile_error(png_ptr, name, temp, + "unexpected ICC PCS encoding"); + } + + return 1; +} + +int /* PRIVATE */ +png_icc_check_tag_table(png_const_structrp png_ptr, png_const_charp name, + png_uint_32 profile_length, + png_const_bytep profile /* header plus whole tag table */) +{ + png_uint_32 tag_count = png_get_uint_32(profile+128); + png_uint_32 itag; + png_const_bytep tag = profile+132; /* The first tag */ + + /* First scan all the tags in the table and add bits to the icc_info value + * (temporarily in 'tags'). + */ + for (itag=0; itag < tag_count; ++itag, tag += 12) + { + png_uint_32 tag_id = png_get_uint_32(tag+0); + png_uint_32 tag_start = png_get_uint_32(tag+4); /* must be aligned */ + png_uint_32 tag_length = png_get_uint_32(tag+8);/* not padded */ + + /* The ICC specification does not exclude zero length tags, therefore the + * start might actually be anywhere if there is no data, but this would be + * a clear abuse of the intent of the standard so the start is checked for + * being in range. All defined tag types have an 8 byte header - a 4 byte + * type signature then 0. + */ + + /* This is a hard error; potentially it can cause read outside the + * profile. + */ + if (tag_start > profile_length || tag_length > profile_length - tag_start) + return png_icc_profile_error(png_ptr, name, tag_id, + "ICC profile tag outside profile"); + + if ((tag_start & 3) != 0) + { + /* CNHP730S.icc shipped with Microsoft Windows 64 violates this; it is + * only a warning here because libpng does not care about the + * alignment. + */ + (void)png_icc_profile_error(png_ptr, name, tag_id, + "ICC profile tag start not a multiple of 4"); + } + } + + return 1; /* success, maybe with warnings */ +} +#endif /* READ_iCCP */ + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +#if (defined PNG_READ_mDCV_SUPPORTED) || (defined PNG_READ_cHRM_SUPPORTED) +static int +have_chromaticities(png_const_structrp png_ptr) +{ + /* Handle new PNGv3 chunks and the precedence rules to determine whether + * png_struct::chromaticities must be processed. Only required for RGB to + * gray. + * + * mDCV: this is the mastering colour space and it is independent of the + * encoding so it needs to be used regardless of the encoded space. + * + * cICP: first in priority but not yet implemented - the chromaticities come + * from the 'primaries'. + * + * iCCP: not supported by libpng (so ignored) + * + * sRGB: the defaults match sRGB + * + * cHRM: calculate the coefficients + */ +# ifdef PNG_READ_mDCV_SUPPORTED + if (png_has_chunk(png_ptr, mDCV)) + return 1; +# define check_chromaticities 1 +# endif /*mDCV*/ + +# ifdef PNG_READ_sRGB_SUPPORTED + if (png_has_chunk(png_ptr, sRGB)) + return 0; +# endif /*sRGB*/ + +# ifdef PNG_READ_cHRM_SUPPORTED + if (png_has_chunk(png_ptr, cHRM)) + return 1; +# define check_chromaticities 1 +# endif /*cHRM*/ + + return 0; /* sRGB defaults */ +} +#endif /* READ_mDCV || READ_cHRM */ + +void /* PRIVATE */ +png_set_rgb_coefficients(png_structrp png_ptr) +{ + /* Set the rgb_to_gray coefficients from the colorspace if available. Note + * that '_set' means that png_rgb_to_gray was called **and** it successfully + * set up the coefficients. + */ + if (png_ptr->rgb_to_gray_coefficients_set == 0) + { +# if check_chromaticities + png_XYZ xyz; + + if (have_chromaticities(png_ptr) && + png_XYZ_from_xy(&xyz, &png_ptr->chromaticities) == 0) + { + /* png_set_rgb_to_gray has not set the coefficients, get them from the + * Y * values of the colorspace colorants. + */ + png_fixed_point r = xyz.red_Y; + png_fixed_point g = xyz.green_Y; + png_fixed_point b = xyz.blue_Y; + png_fixed_point total = r+g+b; + + if (total > 0 && + r >= 0 && png_muldiv(&r, r, 32768, total) && r >= 0 && r <= 32768 && + g >= 0 && png_muldiv(&g, g, 32768, total) && g >= 0 && g <= 32768 && + b >= 0 && png_muldiv(&b, b, 32768, total) && b >= 0 && b <= 32768 && + r+g+b <= 32769) + { + /* We allow 0 coefficients here. r+g+b may be 32769 if two or + * all of the coefficients were rounded up. Handle this by + * reducing the *largest* coefficient by 1; this matches the + * approach used for the default coefficients in pngrtran.c + */ + int add = 0; + + if (r+g+b > 32768) + add = -1; + else if (r+g+b < 32768) + add = 1; + + if (add != 0) + { + if (g >= r && g >= b) + g += add; + else if (r >= g && r >= b) + r += add; + else + b += add; + } + + /* Check for an internal error. */ + if (r+g+b != 32768) + png_error(png_ptr, + "internal error handling cHRM coefficients"); + + else + { + png_ptr->rgb_to_gray_red_coeff = (png_uint_16)r; + png_ptr->rgb_to_gray_green_coeff = (png_uint_16)g; + } + } + } + else +# endif /* check_chromaticities */ + { + /* Use the historical REC 709 (etc) values: */ + png_ptr->rgb_to_gray_red_coeff = 6968; + png_ptr->rgb_to_gray_green_coeff = 23434; + /* png_ptr->rgb_to_gray_blue_coeff = 2366; */ + } + } +} +#endif /* READ_RGB_TO_GRAY */ + +void /* PRIVATE */ +png_check_IHDR(png_const_structrp png_ptr, + png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_type, int compression_type, + int filter_type) +{ + int error = 0; + + /* Check for width and height valid values */ + if (width == 0) + { + png_warning(png_ptr, "Image width is zero in IHDR"); + error = 1; + } + + if (width > PNG_UINT_31_MAX) + { + png_warning(png_ptr, "Invalid image width in IHDR"); + error = 1; + } + + /* The bit mask on the first line below must be at least as big as a + * png_uint_32. "~7U" is not adequate on 16-bit systems because it will + * be an unsigned 16-bit value. Casting to (png_alloc_size_t) makes the + * type of the result at least as bit (in bits) as the RHS of the > operator + * which also avoids a common warning on 64-bit systems that the comparison + * of (png_uint_32) against the constant value on the RHS will always be + * false. + */ + if (((width + 7) & ~(png_alloc_size_t)7) > + (((PNG_SIZE_MAX + - 48 /* big_row_buf hack */ + - 1) /* filter byte */ + / 8) /* 8-byte RGBA pixels */ + - 1)) /* extra max_pixel_depth pad */ + { + /* The size of the row must be within the limits of this architecture. + * Because the read code can perform arbitrary transformations the + * maximum size is checked here. Because the code in png_read_start_row + * adds extra space "for safety's sake" in several places a conservative + * limit is used here. + * + * NOTE: it would be far better to check the size that is actually used, + * but the effect in the real world is minor and the changes are more + * extensive, therefore much more dangerous and much more difficult to + * write in a way that avoids compiler warnings. + */ + png_warning(png_ptr, "Image width is too large for this architecture"); + error = 1; + } + +#ifdef PNG_SET_USER_LIMITS_SUPPORTED + if (width > png_ptr->user_width_max) +#else + if (width > PNG_USER_WIDTH_MAX) +#endif + { + png_warning(png_ptr, "Image width exceeds user limit in IHDR"); + error = 1; + } + + if (height == 0) + { + png_warning(png_ptr, "Image height is zero in IHDR"); + error = 1; + } + + if (height > PNG_UINT_31_MAX) + { + png_warning(png_ptr, "Invalid image height in IHDR"); + error = 1; + } + +#ifdef PNG_SET_USER_LIMITS_SUPPORTED + if (height > png_ptr->user_height_max) +#else + if (height > PNG_USER_HEIGHT_MAX) +#endif + { + png_warning(png_ptr, "Image height exceeds user limit in IHDR"); + error = 1; + } + + /* Check other values */ + if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 && + bit_depth != 8 && bit_depth != 16) + { + png_warning(png_ptr, "Invalid bit depth in IHDR"); + error = 1; + } + + if (color_type < 0 || color_type == 1 || + color_type == 5 || color_type > 6) + { + png_warning(png_ptr, "Invalid color type in IHDR"); + error = 1; + } + + if (((color_type == PNG_COLOR_TYPE_PALETTE) && bit_depth > 8) || + ((color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_GRAY_ALPHA || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) && bit_depth < 8)) + { + png_warning(png_ptr, "Invalid color type/bit depth combination in IHDR"); + error = 1; + } + + if (interlace_type >= PNG_INTERLACE_LAST) + { + png_warning(png_ptr, "Unknown interlace method in IHDR"); + error = 1; + } + + if (compression_type != PNG_COMPRESSION_TYPE_BASE) + { + png_warning(png_ptr, "Unknown compression method in IHDR"); + error = 1; + } + +#ifdef PNG_MNG_FEATURES_SUPPORTED + /* Accept filter_method 64 (intrapixel differencing) only if + * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and + * 2. Libpng did not read a PNG signature (this filter_method is only + * used in PNG datastreams that are embedded in MNG datastreams) and + * 3. The application called png_permit_mng_features with a mask that + * included PNG_FLAG_MNG_FILTER_64 and + * 4. The filter_method is 64 and + * 5. The color_type is RGB or RGBA + */ + if ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) != 0 && + png_ptr->mng_features_permitted != 0) + png_warning(png_ptr, "MNG features are not allowed in a PNG datastream"); + + if (filter_type != PNG_FILTER_TYPE_BASE) + { + if (!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) != 0 && + (filter_type == PNG_INTRAPIXEL_DIFFERENCING) && + ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) == 0) && + (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA))) + { + png_warning(png_ptr, "Unknown filter method in IHDR"); + error = 1; + } + + if ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) != 0) + { + png_warning(png_ptr, "Invalid filter method in IHDR"); + error = 1; + } + } + +#else + if (filter_type != PNG_FILTER_TYPE_BASE) + { + png_warning(png_ptr, "Unknown filter method in IHDR"); + error = 1; + } +#endif + + if (error == 1) + png_error(png_ptr, "Invalid IHDR data"); +} + +#if defined(PNG_sCAL_SUPPORTED) || defined(PNG_pCAL_SUPPORTED) +/* ASCII to fp functions */ +/* Check an ASCII formatted floating point value, see the more detailed + * comments in pngpriv.h + */ +/* The following is used internally to preserve the sticky flags */ +#define png_fp_add(state, flags) ((state) |= (flags)) +#define png_fp_set(state, value) ((state) = (value) | ((state) & PNG_FP_STICKY)) + +int /* PRIVATE */ +png_check_fp_number(png_const_charp string, size_t size, int *statep, + size_t *whereami) +{ + int state = *statep; + size_t i = *whereami; + + while (i < size) + { + int type; + /* First find the type of the next character */ + switch (string[i]) + { + case 43: type = PNG_FP_SAW_SIGN; break; + case 45: type = PNG_FP_SAW_SIGN + PNG_FP_NEGATIVE; break; + case 46: type = PNG_FP_SAW_DOT; break; + case 48: type = PNG_FP_SAW_DIGIT; break; + case 49: case 50: case 51: case 52: + case 53: case 54: case 55: case 56: + case 57: type = PNG_FP_SAW_DIGIT + PNG_FP_NONZERO; break; + case 69: + case 101: type = PNG_FP_SAW_E; break; + default: goto PNG_FP_End; + } + + /* Now deal with this type according to the current + * state, the type is arranged to not overlap the + * bits of the PNG_FP_STATE. + */ + switch ((state & PNG_FP_STATE) + (type & PNG_FP_SAW_ANY)) + { + case PNG_FP_INTEGER + PNG_FP_SAW_SIGN: + if ((state & PNG_FP_SAW_ANY) != 0) + goto PNG_FP_End; /* not a part of the number */ + + png_fp_add(state, type); + break; + + case PNG_FP_INTEGER + PNG_FP_SAW_DOT: + /* Ok as trailer, ok as lead of fraction. */ + if ((state & PNG_FP_SAW_DOT) != 0) /* two dots */ + goto PNG_FP_End; + + else if ((state & PNG_FP_SAW_DIGIT) != 0) /* trailing dot? */ + png_fp_add(state, type); + + else + png_fp_set(state, PNG_FP_FRACTION | type); + + break; + + case PNG_FP_INTEGER + PNG_FP_SAW_DIGIT: + if ((state & PNG_FP_SAW_DOT) != 0) /* delayed fraction */ + png_fp_set(state, PNG_FP_FRACTION | PNG_FP_SAW_DOT); + + png_fp_add(state, type | PNG_FP_WAS_VALID); + + break; + + case PNG_FP_INTEGER + PNG_FP_SAW_E: + if ((state & PNG_FP_SAW_DIGIT) == 0) + goto PNG_FP_End; + + png_fp_set(state, PNG_FP_EXPONENT); + + break; + + /* case PNG_FP_FRACTION + PNG_FP_SAW_SIGN: + goto PNG_FP_End; ** no sign in fraction */ + + /* case PNG_FP_FRACTION + PNG_FP_SAW_DOT: + goto PNG_FP_End; ** Because SAW_DOT is always set */ + + case PNG_FP_FRACTION + PNG_FP_SAW_DIGIT: + png_fp_add(state, type | PNG_FP_WAS_VALID); + break; + + case PNG_FP_FRACTION + PNG_FP_SAW_E: + /* This is correct because the trailing '.' on an + * integer is handled above - so we can only get here + * with the sequence ".E" (with no preceding digits). + */ + if ((state & PNG_FP_SAW_DIGIT) == 0) + goto PNG_FP_End; + + png_fp_set(state, PNG_FP_EXPONENT); + + break; + + case PNG_FP_EXPONENT + PNG_FP_SAW_SIGN: + if ((state & PNG_FP_SAW_ANY) != 0) + goto PNG_FP_End; /* not a part of the number */ + + png_fp_add(state, PNG_FP_SAW_SIGN); + + break; + + /* case PNG_FP_EXPONENT + PNG_FP_SAW_DOT: + goto PNG_FP_End; */ + + case PNG_FP_EXPONENT + PNG_FP_SAW_DIGIT: + png_fp_add(state, PNG_FP_SAW_DIGIT | PNG_FP_WAS_VALID); + + break; + + /* case PNG_FP_EXPONEXT + PNG_FP_SAW_E: + goto PNG_FP_End; */ + + default: goto PNG_FP_End; /* I.e. break 2 */ + } + + /* The character seems ok, continue. */ + ++i; + } + +PNG_FP_End: + /* Here at the end, update the state and return the correct + * return code. + */ + *statep = state; + *whereami = i; + + return (state & PNG_FP_SAW_DIGIT) != 0; +} + + +/* The same but for a complete string. */ +int +png_check_fp_string(png_const_charp string, size_t size) +{ + int state=0; + size_t char_index=0; + + if (png_check_fp_number(string, size, &state, &char_index) != 0 && + (char_index == size || string[char_index] == 0)) + return state /* must be non-zero - see above */; + + return 0; /* i.e. fail */ +} +#endif /* pCAL || sCAL */ + +#ifdef PNG_sCAL_SUPPORTED +# ifdef PNG_FLOATING_POINT_SUPPORTED +/* Utility used below - a simple accurate power of ten from an integral + * exponent. + */ +static double +png_pow10(int power) +{ + int recip = 0; + double d = 1; + + /* Handle negative exponent with a reciprocal at the end because + * 10 is exact whereas .1 is inexact in base 2 + */ + if (power < 0) + { + if (power < DBL_MIN_10_EXP) return 0; + recip = 1; power = -power; + } + + if (power > 0) + { + /* Decompose power bitwise. */ + double mult = 10; + do + { + if (power & 1) d *= mult; + mult *= mult; + power >>= 1; + } + while (power > 0); + + if (recip != 0) d = 1/d; + } + /* else power is 0 and d is 1 */ + + return d; +} + +/* Function to format a floating point value in ASCII with a given + * precision. + */ +void /* PRIVATE */ +png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, size_t size, + double fp, unsigned int precision) +{ + /* We use standard functions from math.h, but not printf because + * that would require stdio. The caller must supply a buffer of + * sufficient size or we will png_error. The tests on size and + * the space in ascii[] consumed are indicated below. + */ + if (precision < 1) + precision = DBL_DIG; + + /* Enforce the limit of the implementation precision too. */ + if (precision > DBL_DIG+1) + precision = DBL_DIG+1; + + /* Basic sanity checks */ + if (size >= precision+5) /* See the requirements below. */ + { + if (fp < 0) + { + fp = -fp; + *ascii++ = 45; /* '-' PLUS 1 TOTAL 1 */ + --size; + } + + if (fp >= DBL_MIN && fp <= DBL_MAX) + { + int exp_b10; /* A base 10 exponent */ + double base; /* 10^exp_b10 */ + + /* First extract a base 10 exponent of the number, + * the calculation below rounds down when converting + * from base 2 to base 10 (multiply by log10(2) - + * 0.3010, but 77/256 is 0.3008, so exp_b10 needs to + * be increased. Note that the arithmetic shift + * performs a floor() unlike C arithmetic - using a + * C multiply would break the following for negative + * exponents. + */ + (void)frexp(fp, &exp_b10); /* exponent to base 2 */ + + exp_b10 = (exp_b10 * 77) >> 8; /* <= exponent to base 10 */ + + /* Avoid underflow here. */ + base = png_pow10(exp_b10); /* May underflow */ + + while (base < DBL_MIN || base < fp) + { + /* And this may overflow. */ + double test = png_pow10(exp_b10+1); + + if (test <= DBL_MAX) + { + ++exp_b10; base = test; + } + + else + break; + } + + /* Normalize fp and correct exp_b10, after this fp is in the + * range [.1,1) and exp_b10 is both the exponent and the digit + * *before* which the decimal point should be inserted + * (starting with 0 for the first digit). Note that this + * works even if 10^exp_b10 is out of range because of the + * test on DBL_MAX above. + */ + fp /= base; + while (fp >= 1) + { + fp /= 10; ++exp_b10; + } + + /* Because of the code above fp may, at this point, be + * less than .1, this is ok because the code below can + * handle the leading zeros this generates, so no attempt + * is made to correct that here. + */ + + { + unsigned int czero, clead, cdigits; + char exponent[10]; + + /* Allow up to two leading zeros - this will not lengthen + * the number compared to using E-n. + */ + if (exp_b10 < 0 && exp_b10 > -3) /* PLUS 3 TOTAL 4 */ + { + czero = 0U-exp_b10; /* PLUS 2 digits: TOTAL 3 */ + exp_b10 = 0; /* Dot added below before first output. */ + } + else + czero = 0; /* No zeros to add */ + + /* Generate the digit list, stripping trailing zeros and + * inserting a '.' before a digit if the exponent is 0. + */ + clead = czero; /* Count of leading zeros */ + cdigits = 0; /* Count of digits in list. */ + + do + { + double d; + + fp *= 10; + /* Use modf here, not floor and subtract, so that + * the separation is done in one step. At the end + * of the loop don't break the number into parts so + * that the final digit is rounded. + */ + if (cdigits+czero+1 < precision+clead) + fp = modf(fp, &d); + + else + { + d = floor(fp + .5); + + if (d > 9) + { + /* Rounding up to 10, handle that here. */ + if (czero > 0) + { + --czero; d = 1; + if (cdigits == 0) --clead; + } + else + { + while (cdigits > 0 && d > 9) + { + int ch = *--ascii; + + if (exp_b10 != (-1)) + ++exp_b10; + + else if (ch == 46) + { + ch = *--ascii; ++size; + /* Advance exp_b10 to '1', so that the + * decimal point happens after the + * previous digit. + */ + exp_b10 = 1; + } + + --cdigits; + d = ch - 47; /* I.e. 1+(ch-48) */ + } + + /* Did we reach the beginning? If so adjust the + * exponent but take into account the leading + * decimal point. + */ + if (d > 9) /* cdigits == 0 */ + { + if (exp_b10 == (-1)) + { + /* Leading decimal point (plus zeros?), if + * we lose the decimal point here it must + * be reentered below. + */ + int ch = *--ascii; + + if (ch == 46) + { + ++size; exp_b10 = 1; + } + + /* Else lost a leading zero, so 'exp_b10' is + * still ok at (-1) + */ + } + else + ++exp_b10; + + /* In all cases we output a '1' */ + d = 1; + } + } + } + fp = 0; /* Guarantees termination below. */ + } + + if (d == 0) + { + ++czero; + if (cdigits == 0) ++clead; + } + else + { + /* Included embedded zeros in the digit count. */ + cdigits += czero - clead; + clead = 0; + + while (czero > 0) + { + /* exp_b10 == (-1) means we just output the decimal + * place - after the DP don't adjust 'exp_b10' any + * more! + */ + if (exp_b10 != (-1)) + { + if (exp_b10 == 0) + { + *ascii++ = 46; --size; + } + /* PLUS 1: TOTAL 4 */ + --exp_b10; + } + *ascii++ = 48; --czero; + } + + if (exp_b10 != (-1)) + { + if (exp_b10 == 0) + { + *ascii++ = 46; --size; /* counted above */ + } + + --exp_b10; + } + *ascii++ = (char)(48 + (int)d); ++cdigits; + } + } + while (cdigits+czero < precision+clead && fp > DBL_MIN); + + /* The total output count (max) is now 4+precision */ + + /* Check for an exponent, if we don't need one we are + * done and just need to terminate the string. At this + * point, exp_b10==(-1) is effectively a flag: it got + * to '-1' because of the decrement, after outputting + * the decimal point above. (The exponent required is + * *not* -1.) + */ + if (exp_b10 >= (-1) && exp_b10 <= 2) + { + /* The following only happens if we didn't output the + * leading zeros above for negative exponent, so this + * doesn't add to the digit requirement. Note that the + * two zeros here can only be output if the two leading + * zeros were *not* output, so this doesn't increase + * the output count. + */ + while (exp_b10-- > 0) *ascii++ = 48; + + *ascii = 0; + + /* Total buffer requirement (including the '\0') is + * 5+precision - see check at the start. + */ + return; + } + + /* Here if an exponent is required, adjust size for + * the digits we output but did not count. The total + * digit output here so far is at most 1+precision - no + * decimal point and no leading or trailing zeros have + * been output. + */ + size -= cdigits; + + *ascii++ = 69; --size; /* 'E': PLUS 1 TOTAL 2+precision */ + + /* The following use of an unsigned temporary avoids ambiguities in + * the signed arithmetic on exp_b10 and permits GCC at least to do + * better optimization. + */ + { + unsigned int uexp_b10; + + if (exp_b10 < 0) + { + *ascii++ = 45; --size; /* '-': PLUS 1 TOTAL 3+precision */ + uexp_b10 = 0U-exp_b10; + } + + else + uexp_b10 = 0U+exp_b10; + + cdigits = 0; + + while (uexp_b10 > 0) + { + exponent[cdigits++] = (char)(48 + uexp_b10 % 10); + uexp_b10 /= 10; + } + } + + /* Need another size check here for the exponent digits, so + * this need not be considered above. + */ + if (size > cdigits) + { + while (cdigits > 0) *ascii++ = exponent[--cdigits]; + + *ascii = 0; + + return; + } + } + } + else if (!(fp >= DBL_MIN)) + { + *ascii++ = 48; /* '0' */ + *ascii = 0; + return; + } + else + { + *ascii++ = 105; /* 'i' */ + *ascii++ = 110; /* 'n' */ + *ascii++ = 102; /* 'f' */ + *ascii = 0; + return; + } + } + + /* Here on buffer too small. */ + png_error(png_ptr, "ASCII conversion buffer too small"); +} +# endif /* FLOATING_POINT */ + +# ifdef PNG_FIXED_POINT_SUPPORTED +/* Function to format a fixed point value in ASCII. + */ +void /* PRIVATE */ +png_ascii_from_fixed(png_const_structrp png_ptr, png_charp ascii, + size_t size, png_fixed_point fp) +{ + /* Require space for 10 decimal digits, a decimal point, a minus sign and a + * trailing \0, 13 characters: + */ + if (size > 12) + { + png_uint_32 num; + + /* Avoid overflow here on the minimum integer. */ + if (fp < 0) + { + *ascii++ = 45; num = (png_uint_32)(-fp); + } + else + num = (png_uint_32)fp; + + if (num <= 0x80000000) /* else overflowed */ + { + unsigned int ndigits = 0, first = 16 /* flag value */; + char digits[10] = {0}; + + while (num) + { + /* Split the low digit off num: */ + unsigned int tmp = num/10; + num -= tmp*10; + digits[ndigits++] = (char)(48 + num); + /* Record the first non-zero digit, note that this is a number + * starting at 1, it's not actually the array index. + */ + if (first == 16 && num > 0) + first = ndigits; + num = tmp; + } + + if (ndigits > 0) + { + while (ndigits > 5) *ascii++ = digits[--ndigits]; + /* The remaining digits are fractional digits, ndigits is '5' or + * smaller at this point. It is certainly not zero. Check for a + * non-zero fractional digit: + */ + if (first <= 5) + { + unsigned int i; + *ascii++ = 46; /* decimal point */ + /* ndigits may be <5 for small numbers, output leading zeros + * then ndigits digits to first: + */ + i = 5; + while (ndigits < i) + { + *ascii++ = 48; --i; + } + while (ndigits >= first) *ascii++ = digits[--ndigits]; + /* Don't output the trailing zeros! */ + } + } + else + *ascii++ = 48; + + /* And null terminate the string: */ + *ascii = 0; + return; + } + } + + /* Here on buffer too small. */ + png_error(png_ptr, "ASCII conversion buffer too small"); +} +# endif /* FIXED_POINT */ +#endif /* SCAL */ + +#if defined(PNG_FLOATING_POINT_SUPPORTED) && \ + !defined(PNG_FIXED_POINT_MACRO_SUPPORTED) && \ + (defined(PNG_gAMA_SUPPORTED) || defined(PNG_cHRM_SUPPORTED) || \ + defined(PNG_sCAL_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)) || \ + (defined(PNG_sCAL_SUPPORTED) && \ + defined(PNG_FLOATING_ARITHMETIC_SUPPORTED)) +png_fixed_point +png_fixed(png_const_structrp png_ptr, double fp, png_const_charp text) +{ + double r = floor(100000 * fp + .5); + + if (r > 2147483647. || r < -2147483648.) + png_fixed_error(png_ptr, text); + +# ifndef PNG_ERROR_TEXT_SUPPORTED + PNG_UNUSED(text) +# endif + + return (png_fixed_point)r; +} +#endif + +#if defined(PNG_FLOATING_POINT_SUPPORTED) && \ + !defined(PNG_FIXED_POINT_MACRO_SUPPORTED) && \ + (defined(PNG_cLLI_SUPPORTED) || defined(PNG_mDCV_SUPPORTED)) +png_uint_32 +png_fixed_ITU(png_const_structrp png_ptr, double fp, png_const_charp text) +{ + double r = floor(10000 * fp + .5); + + if (r > 2147483647. || r < 0) + png_fixed_error(png_ptr, text); + +# ifndef PNG_ERROR_TEXT_SUPPORTED + PNG_UNUSED(text) +# endif + + return (png_uint_32)r; +} +#endif + + +#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_COLORSPACE_SUPPORTED) ||\ + defined(PNG_INCH_CONVERSIONS_SUPPORTED) || defined(PNG_READ_pHYs_SUPPORTED) +/* muldiv functions */ +/* This API takes signed arguments and rounds the result to the nearest + * integer (or, for a fixed point number - the standard argument - to + * the nearest .00001). Overflow and divide by zero are signalled in + * the result, a boolean - true on success, false on overflow. + */ +int /* PRIVATE */ +png_muldiv(png_fixed_point_p res, png_fixed_point a, png_int_32 times, + png_int_32 divisor) +{ + /* Return a * times / divisor, rounded. */ + if (divisor != 0) + { + if (a == 0 || times == 0) + { + *res = 0; + return 1; + } + else + { +#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + double r = a; + r *= times; + r /= divisor; + r = floor(r+.5); + + /* A png_fixed_point is a 32-bit integer. */ + if (r <= 2147483647. && r >= -2147483648.) + { + *res = (png_fixed_point)r; + return 1; + } +#else + int negative = 0; + png_uint_32 A, T, D; + png_uint_32 s16, s32, s00; + + if (a < 0) + negative = 1, A = -a; + else + A = a; + + if (times < 0) + negative = !negative, T = -times; + else + T = times; + + if (divisor < 0) + negative = !negative, D = -divisor; + else + D = divisor; + + /* Following can't overflow because the arguments only + * have 31 bits each, however the result may be 32 bits. + */ + s16 = (A >> 16) * (T & 0xffff) + + (A & 0xffff) * (T >> 16); + /* Can't overflow because the a*times bit is only 30 + * bits at most. + */ + s32 = (A >> 16) * (T >> 16) + (s16 >> 16); + s00 = (A & 0xffff) * (T & 0xffff); + + s16 = (s16 & 0xffff) << 16; + s00 += s16; + + if (s00 < s16) + ++s32; /* carry */ + + if (s32 < D) /* else overflow */ + { + /* s32.s00 is now the 64-bit product, do a standard + * division, we know that s32 < D, so the maximum + * required shift is 31. + */ + int bitshift = 32; + png_fixed_point result = 0; /* NOTE: signed */ + + while (--bitshift >= 0) + { + png_uint_32 d32, d00; + + if (bitshift > 0) + d32 = D >> (32-bitshift), d00 = D << bitshift; + + else + d32 = 0, d00 = D; + + if (s32 > d32) + { + if (s00 < d00) --s32; /* carry */ + s32 -= d32, s00 -= d00, result += 1<= d00) + s32 = 0, s00 -= d00, result += 1<= (D >> 1)) + ++result; + + if (negative != 0) + result = -result; + + /* Check for overflow. */ + if ((negative != 0 && result <= 0) || + (negative == 0 && result >= 0)) + { + *res = result; + return 1; + } + } +#endif + } + } + + return 0; +} + +/* Calculate a reciprocal, return 0 on div-by-zero or overflow. */ +png_fixed_point +png_reciprocal(png_fixed_point a) +{ +#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + double r = floor(1E10/a+.5); + + if (r <= 2147483647. && r >= -2147483648.) + return (png_fixed_point)r; +#else + png_fixed_point res; + + if (png_muldiv(&res, 100000, 100000, a) != 0) + return res; +#endif + + return 0; /* error/overflow */ +} +#endif /* READ_GAMMA || COLORSPACE || INCH_CONVERSIONS || READ_pHYS */ + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* This is the shared test on whether a gamma value is 'significant' - whether + * it is worth doing gamma correction. + */ +int /* PRIVATE */ +png_gamma_significant(png_fixed_point gamma_val) +{ + /* sRGB: 1/2.2 == 0.4545(45) + * AdobeRGB: 1/(2+51/256) ~= 0.45471 5dp + * + * So the correction from AdobeRGB to sRGB (output) is: + * + * 2.2/(2+51/256) == 1.00035524 + * + * I.e. vanishly small (<4E-4) but still detectable in 16-bit linear (+/- + * 23). Note that the Adobe choice seems to be something intended to give an + * exact number with 8 binary fractional digits - it is the closest to 2.2 + * that is possible a base 2 .8p representation. + */ + return gamma_val < PNG_FP_1 - PNG_GAMMA_THRESHOLD_FIXED || + gamma_val > PNG_FP_1 + PNG_GAMMA_THRESHOLD_FIXED; +} + +#ifndef PNG_FLOATING_ARITHMETIC_SUPPORTED +/* A local convenience routine. */ +static png_fixed_point +png_product2(png_fixed_point a, png_fixed_point b) +{ + /* The required result is a * b; the following preserves accuracy. */ +#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED /* Should now be unused */ + double r = a * 1E-5; + r *= b; + r = floor(r+.5); + + if (r <= 2147483647. && r >= -2147483648.) + return (png_fixed_point)r; +#else + png_fixed_point res; + + if (png_muldiv(&res, a, b, 100000) != 0) + return res; +#endif + + return 0; /* overflow */ +} +#endif /* FLOATING_ARITHMETIC */ + +png_fixed_point +png_reciprocal2(png_fixed_point a, png_fixed_point b) +{ + /* The required result is 1/a * 1/b; the following preserves accuracy. */ +#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + if (a != 0 && b != 0) + { + double r = 1E15/a; + r /= b; + r = floor(r+.5); + + if (r <= 2147483647. && r >= -2147483648.) + return (png_fixed_point)r; + } +#else + /* This may overflow because the range of png_fixed_point isn't symmetric, + * but this API is only used for the product of file and screen gamma so it + * doesn't matter that the smallest number it can produce is 1/21474, not + * 1/100000 + */ + png_fixed_point res = png_product2(a, b); + + if (res != 0) + return png_reciprocal(res); +#endif + + return 0; /* overflow */ +} +#endif /* READ_GAMMA */ + +#ifdef PNG_READ_GAMMA_SUPPORTED /* gamma table code */ +#ifndef PNG_FLOATING_ARITHMETIC_SUPPORTED +/* Fixed point gamma. + * + * The code to calculate the tables used below can be found in the shell script + * contrib/tools/intgamma.sh + * + * To calculate gamma this code implements fast log() and exp() calls using only + * fixed point arithmetic. This code has sufficient precision for either 8-bit + * or 16-bit sample values. + * + * The tables used here were calculated using simple 'bc' programs, but C double + * precision floating point arithmetic would work fine. + * + * 8-bit log table + * This is a table of -log(value/255)/log(2) for 'value' in the range 128 to + * 255, so it's the base 2 logarithm of a normalized 8-bit floating point + * mantissa. The numbers are 32-bit fractions. + */ +static const png_uint_32 +png_8bit_l2[128] = +{ + 4270715492U, 4222494797U, 4174646467U, 4127164793U, 4080044201U, 4033279239U, + 3986864580U, 3940795015U, 3895065449U, 3849670902U, 3804606499U, 3759867474U, + 3715449162U, 3671346997U, 3627556511U, 3584073329U, 3540893168U, 3498011834U, + 3455425220U, 3413129301U, 3371120137U, 3329393864U, 3287946700U, 3246774933U, + 3205874930U, 3165243125U, 3124876025U, 3084770202U, 3044922296U, 3005329011U, + 2965987113U, 2926893432U, 2888044853U, 2849438323U, 2811070844U, 2772939474U, + 2735041326U, 2697373562U, 2659933400U, 2622718104U, 2585724991U, 2548951424U, + 2512394810U, 2476052606U, 2439922311U, 2404001468U, 2368287663U, 2332778523U, + 2297471715U, 2262364947U, 2227455964U, 2192742551U, 2158222529U, 2123893754U, + 2089754119U, 2055801552U, 2022034013U, 1988449497U, 1955046031U, 1921821672U, + 1888774511U, 1855902668U, 1823204291U, 1790677560U, 1758320682U, 1726131893U, + 1694109454U, 1662251657U, 1630556815U, 1599023271U, 1567649391U, 1536433567U, + 1505374214U, 1474469770U, 1443718700U, 1413119487U, 1382670639U, 1352370686U, + 1322218179U, 1292211689U, 1262349810U, 1232631153U, 1203054352U, 1173618059U, + 1144320946U, 1115161701U, 1086139034U, 1057251672U, 1028498358U, 999877854U, + 971388940U, 943030410U, 914801076U, 886699767U, 858725327U, 830876614U, + 803152505U, 775551890U, 748073672U, 720716771U, 693480120U, 666362667U, + 639363374U, 612481215U, 585715177U, 559064263U, 532527486U, 506103872U, + 479792461U, 453592303U, 427502463U, 401522014U, 375650043U, 349885648U, + 324227938U, 298676034U, 273229066U, 247886176U, 222646516U, 197509248U, + 172473545U, 147538590U, 122703574U, 97967701U, 73330182U, 48790236U, + 24347096U, 0U + +#if 0 + /* The following are the values for 16-bit tables - these work fine for the + * 8-bit conversions but produce very slightly larger errors in the 16-bit + * log (about 1.2 as opposed to 0.7 absolute error in the final value). To + * use these all the shifts below must be adjusted appropriately. + */ + 65166, 64430, 63700, 62976, 62257, 61543, 60835, 60132, 59434, 58741, 58054, + 57371, 56693, 56020, 55352, 54689, 54030, 53375, 52726, 52080, 51439, 50803, + 50170, 49542, 48918, 48298, 47682, 47070, 46462, 45858, 45257, 44661, 44068, + 43479, 42894, 42312, 41733, 41159, 40587, 40020, 39455, 38894, 38336, 37782, + 37230, 36682, 36137, 35595, 35057, 34521, 33988, 33459, 32932, 32408, 31887, + 31369, 30854, 30341, 29832, 29325, 28820, 28319, 27820, 27324, 26830, 26339, + 25850, 25364, 24880, 24399, 23920, 23444, 22970, 22499, 22029, 21562, 21098, + 20636, 20175, 19718, 19262, 18808, 18357, 17908, 17461, 17016, 16573, 16132, + 15694, 15257, 14822, 14390, 13959, 13530, 13103, 12678, 12255, 11834, 11415, + 10997, 10582, 10168, 9756, 9346, 8937, 8531, 8126, 7723, 7321, 6921, 6523, + 6127, 5732, 5339, 4947, 4557, 4169, 3782, 3397, 3014, 2632, 2251, 1872, 1495, + 1119, 744, 372 +#endif +}; + +static png_int_32 +png_log8bit(unsigned int x) +{ + unsigned int lg2 = 0; + /* Each time 'x' is multiplied by 2, 1 must be subtracted off the final log, + * because the log is actually negate that means adding 1. The final + * returned value thus has the range 0 (for 255 input) to 7.994 (for 1 + * input), return -1 for the overflow (log 0) case, - so the result is + * always at most 19 bits. + */ + if ((x &= 0xff) == 0) + return -1; + + if ((x & 0xf0) == 0) + lg2 = 4, x <<= 4; + + if ((x & 0xc0) == 0) + lg2 += 2, x <<= 2; + + if ((x & 0x80) == 0) + lg2 += 1, x <<= 1; + + /* result is at most 19 bits, so this cast is safe: */ + return (png_int_32)((lg2 << 16) + ((png_8bit_l2[x-128]+32768)>>16)); +} + +/* The above gives exact (to 16 binary places) log2 values for 8-bit images, + * for 16-bit images we use the most significant 8 bits of the 16-bit value to + * get an approximation then multiply the approximation by a correction factor + * determined by the remaining up to 8 bits. This requires an additional step + * in the 16-bit case. + * + * We want log2(value/65535), we have log2(v'/255), where: + * + * value = v' * 256 + v'' + * = v' * f + * + * So f is value/v', which is equal to (256+v''/v') since v' is in the range 128 + * to 255 and v'' is in the range 0 to 255 f will be in the range 256 to less + * than 258. The final factor also needs to correct for the fact that our 8-bit + * value is scaled by 255, whereas the 16-bit values must be scaled by 65535. + * + * This gives a final formula using a calculated value 'x' which is value/v' and + * scaling by 65536 to match the above table: + * + * log2(x/257) * 65536 + * + * Since these numbers are so close to '1' we can use simple linear + * interpolation between the two end values 256/257 (result -368.61) and 258/257 + * (result 367.179). The values used below are scaled by a further 64 to give + * 16-bit precision in the interpolation: + * + * Start (256): -23591 + * Zero (257): 0 + * End (258): 23499 + */ +#ifdef PNG_16BIT_SUPPORTED +static png_int_32 +png_log16bit(png_uint_32 x) +{ + unsigned int lg2 = 0; + + /* As above, but now the input has 16 bits. */ + if ((x &= 0xffff) == 0) + return -1; + + if ((x & 0xff00) == 0) + lg2 = 8, x <<= 8; + + if ((x & 0xf000) == 0) + lg2 += 4, x <<= 4; + + if ((x & 0xc000) == 0) + lg2 += 2, x <<= 2; + + if ((x & 0x8000) == 0) + lg2 += 1, x <<= 1; + + /* Calculate the base logarithm from the top 8 bits as a 28-bit fractional + * value. + */ + lg2 <<= 28; + lg2 += (png_8bit_l2[(x>>8)-128]+8) >> 4; + + /* Now we need to interpolate the factor, this requires a division by the top + * 8 bits. Do this with maximum precision. + */ + x = ((x << 16) + (x >> 9)) / (x >> 8); + + /* Since we divided by the top 8 bits of 'x' there will be a '1' at 1<<24, + * the value at 1<<16 (ignoring this) will be 0 or 1; this gives us exactly + * 16 bits to interpolate to get the low bits of the result. Round the + * answer. Note that the end point values are scaled by 64 to retain overall + * precision and that 'lg2' is current scaled by an extra 12 bits, so adjust + * the overall scaling by 6-12. Round at every step. + */ + x -= 1U << 24; + + if (x <= 65536U) /* <= '257' */ + lg2 += ((23591U * (65536U-x)) + (1U << (16+6-12-1))) >> (16+6-12); + + else + lg2 -= ((23499U * (x-65536U)) + (1U << (16+6-12-1))) >> (16+6-12); + + /* Safe, because the result can't have more than 20 bits: */ + return (png_int_32)((lg2 + 2048) >> 12); +} +#endif /* 16BIT */ + +/* The 'exp()' case must invert the above, taking a 20-bit fixed point + * logarithmic value and returning a 16 or 8-bit number as appropriate. In + * each case only the low 16 bits are relevant - the fraction - since the + * integer bits (the top 4) simply determine a shift. + * + * The worst case is the 16-bit distinction between 65535 and 65534. This + * requires perhaps spurious accuracy in the decoding of the logarithm to + * distinguish log2(65535/65534.5) - 10^-5 or 17 bits. There is little chance + * of getting this accuracy in practice. + * + * To deal with this the following exp() function works out the exponent of the + * fractional part of the logarithm by using an accurate 32-bit value from the + * top four fractional bits then multiplying in the remaining bits. + */ +static const png_uint_32 +png_32bit_exp[16] = +{ + /* NOTE: the first entry is deliberately set to the maximum 32-bit value. */ + 4294967295U, 4112874773U, 3938502376U, 3771522796U, 3611622603U, 3458501653U, + 3311872529U, 3171459999U, 3037000500U, 2908241642U, 2784941738U, 2666869345U, + 2553802834U, 2445529972U, 2341847524U, 2242560872U +}; + +/* Adjustment table; provided to explain the numbers in the code below. */ +#if 0 +for (i=11;i>=0;--i){ print i, " ", (1 - e(-(2^i)/65536*l(2))) * 2^(32-i), "\n"} + 11 44937.64284865548751208448 + 10 45180.98734845585101160448 + 9 45303.31936980687359311872 + 8 45364.65110595323018870784 + 7 45395.35850361789624614912 + 6 45410.72259715102037508096 + 5 45418.40724413220722311168 + 4 45422.25021786898173001728 + 3 45424.17186732298419044352 + 2 45425.13273269940811464704 + 1 45425.61317555035558641664 + 0 45425.85339951654943850496 +#endif + +static png_uint_32 +png_exp(png_fixed_point x) +{ + if (x > 0 && x <= 0xfffff) /* Else overflow or zero (underflow) */ + { + /* Obtain a 4-bit approximation */ + png_uint_32 e = png_32bit_exp[(x >> 12) & 0x0f]; + + /* Incorporate the low 12 bits - these decrease the returned value by + * multiplying by a number less than 1 if the bit is set. The multiplier + * is determined by the above table and the shift. Notice that the values + * converge on 45426 and this is used to allow linear interpolation of the + * low bits. + */ + if (x & 0x800) + e -= (((e >> 16) * 44938U) + 16U) >> 5; + + if (x & 0x400) + e -= (((e >> 16) * 45181U) + 32U) >> 6; + + if (x & 0x200) + e -= (((e >> 16) * 45303U) + 64U) >> 7; + + if (x & 0x100) + e -= (((e >> 16) * 45365U) + 128U) >> 8; + + if (x & 0x080) + e -= (((e >> 16) * 45395U) + 256U) >> 9; + + if (x & 0x040) + e -= (((e >> 16) * 45410U) + 512U) >> 10; + + /* And handle the low 6 bits in a single block. */ + e -= (((e >> 16) * 355U * (x & 0x3fU)) + 256U) >> 9; + + /* Handle the upper bits of x. */ + e >>= x >> 16; + return e; + } + + /* Check for overflow */ + if (x <= 0) + return png_32bit_exp[0]; + + /* Else underflow */ + return 0; +} + +static png_byte +png_exp8bit(png_fixed_point lg2) +{ + /* Get a 32-bit value: */ + png_uint_32 x = png_exp(lg2); + + /* Convert the 32-bit value to 0..255 by multiplying by 256-1. Note that the + * second, rounding, step can't overflow because of the first, subtraction, + * step. + */ + x -= x >> 8; + return (png_byte)(((x + 0x7fffffU) >> 24) & 0xff); +} + +#ifdef PNG_16BIT_SUPPORTED +static png_uint_16 +png_exp16bit(png_fixed_point lg2) +{ + /* Get a 32-bit value: */ + png_uint_32 x = png_exp(lg2); + + /* Convert the 32-bit value to 0..65535 by multiplying by 65536-1: */ + x -= x >> 16; + return (png_uint_16)((x + 32767U) >> 16); +} +#endif /* 16BIT */ +#endif /* FLOATING_ARITHMETIC */ + +png_byte +png_gamma_8bit_correct(unsigned int value, png_fixed_point gamma_val) +{ + if (value > 0 && value < 255) + { +# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + /* 'value' is unsigned, ANSI-C90 requires the compiler to correctly + * convert this to a floating point value. This includes values that + * would overflow if 'value' were to be converted to 'int'. + * + * Apparently GCC, however, does an intermediate conversion to (int) + * on some (ARM) but not all (x86) platforms, possibly because of + * hardware FP limitations. (E.g. if the hardware conversion always + * assumes the integer register contains a signed value.) This results + * in ANSI-C undefined behavior for large values. + * + * Other implementations on the same machine might actually be ANSI-C90 + * conformant and therefore compile spurious extra code for the large + * values. + * + * We can be reasonably sure that an unsigned to float conversion + * won't be faster than an int to float one. Therefore this code + * assumes responsibility for the undefined behavior, which it knows + * can't happen because of the check above. + * + * Note the argument to this routine is an (unsigned int) because, on + * 16-bit platforms, it is assigned a value which might be out of + * range for an (int); that would result in undefined behavior in the + * caller if the *argument* ('value') were to be declared (int). + */ + double r = floor(255*pow((int)/*SAFE*/value/255.,gamma_val*.00001)+.5); + return (png_byte)r; +# else + png_int_32 lg2 = png_log8bit(value); + png_fixed_point res; + + if (png_muldiv(&res, gamma_val, lg2, PNG_FP_1) != 0) + return png_exp8bit(res); + + /* Overflow. */ + value = 0; +# endif + } + + return (png_byte)(value & 0xff); +} + +#ifdef PNG_16BIT_SUPPORTED +png_uint_16 +png_gamma_16bit_correct(unsigned int value, png_fixed_point gamma_val) +{ + if (value > 0 && value < 65535) + { +# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + /* The same (unsigned int)->(double) constraints apply here as above, + * however in this case the (unsigned int) to (int) conversion can + * overflow on an ANSI-C90 compliant system so the cast needs to ensure + * that this is not possible. + */ + double r = floor(65535*pow((png_int_32)value/65535., + gamma_val*.00001)+.5); + return (png_uint_16)r; +# else + png_int_32 lg2 = png_log16bit(value); + png_fixed_point res; + + if (png_muldiv(&res, gamma_val, lg2, PNG_FP_1) != 0) + return png_exp16bit(res); + + /* Overflow. */ + value = 0; +# endif + } + + return (png_uint_16)value; +} +#endif /* 16BIT */ + +/* This does the right thing based on the bit_depth field of the + * png_struct, interpreting values as 8-bit or 16-bit. While the result + * is nominally a 16-bit value if bit depth is 8 then the result is + * 8-bit (as are the arguments.) + */ +png_uint_16 /* PRIVATE */ +png_gamma_correct(png_structrp png_ptr, unsigned int value, + png_fixed_point gamma_val) +{ + if (png_ptr->bit_depth == 8) + return png_gamma_8bit_correct(value, gamma_val); + +#ifdef PNG_16BIT_SUPPORTED + else + return png_gamma_16bit_correct(value, gamma_val); +#else + /* should not reach this */ + return 0; +#endif /* 16BIT */ +} + +#ifdef PNG_16BIT_SUPPORTED +/* Internal function to build a single 16-bit table - the table consists of + * 'num' 256 entry subtables, where 'num' is determined by 'shift' - the amount + * to shift the input values right (or 16-number_of_signifiant_bits). + * + * The caller is responsible for ensuring that the table gets cleaned up on + * png_error (i.e. if one of the mallocs below fails) - i.e. the *table argument + * should be somewhere that will be cleaned. + */ +static void +png_build_16bit_table(png_structrp png_ptr, png_uint_16pp *ptable, + unsigned int shift, png_fixed_point gamma_val) +{ + /* Various values derived from 'shift': */ + unsigned int num = 1U << (8U - shift); +#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + /* CSE the division and work round wacky GCC warnings (see the comments + * in png_gamma_8bit_correct for where these come from.) + */ + double fmax = 1.0 / (((png_int_32)1 << (16U - shift)) - 1); +#endif + unsigned int max = (1U << (16U - shift)) - 1U; + unsigned int max_by_2 = 1U << (15U - shift); + unsigned int i; + + png_uint_16pp table = *ptable = + (png_uint_16pp)png_calloc(png_ptr, num * (sizeof (png_uint_16p))); + + for (i = 0; i < num; i++) + { + png_uint_16p sub_table = table[i] = + (png_uint_16p)png_malloc(png_ptr, 256 * (sizeof (png_uint_16))); + + /* The 'threshold' test is repeated here because it can arise for one of + * the 16-bit tables even if the others don't hit it. + */ + if (png_gamma_significant(gamma_val) != 0) + { + /* The old code would overflow at the end and this would cause the + * 'pow' function to return a result >1, resulting in an + * arithmetic error. This code follows the spec exactly; ig is + * the recovered input sample, it always has 8-16 bits. + * + * We want input * 65535/max, rounded, the arithmetic fits in 32 + * bits (unsigned) so long as max <= 32767. + */ + unsigned int j; + for (j = 0; j < 256; j++) + { + png_uint_32 ig = (j << (8-shift)) + i; +# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED + /* Inline the 'max' scaling operation: */ + /* See png_gamma_8bit_correct for why the cast to (int) is + * required here. + */ + double d = floor(65535.*pow(ig*fmax, gamma_val*.00001)+.5); + sub_table[j] = (png_uint_16)d; +# else + if (shift != 0) + ig = (ig * 65535U + max_by_2)/max; + + sub_table[j] = png_gamma_16bit_correct(ig, gamma_val); +# endif + } + } + else + { + /* We must still build a table, but do it the fast way. */ + unsigned int j; + + for (j = 0; j < 256; j++) + { + png_uint_32 ig = (j << (8-shift)) + i; + + if (shift != 0) + ig = (ig * 65535U + max_by_2)/max; + + sub_table[j] = (png_uint_16)ig; + } + } + } +} + +/* NOTE: this function expects the *inverse* of the overall gamma transformation + * required. + */ +static void +png_build_16to8_table(png_structrp png_ptr, png_uint_16pp *ptable, + unsigned int shift, png_fixed_point gamma_val) +{ + unsigned int num = 1U << (8U - shift); + unsigned int max = (1U << (16U - shift))-1U; + unsigned int i; + png_uint_32 last; + + png_uint_16pp table = *ptable = + (png_uint_16pp)png_calloc(png_ptr, num * (sizeof (png_uint_16p))); + + /* 'num' is the number of tables and also the number of low bits of low + * bits of the input 16-bit value used to select a table. Each table is + * itself indexed by the high 8 bits of the value. + */ + for (i = 0; i < num; i++) + table[i] = (png_uint_16p)png_malloc(png_ptr, + 256 * (sizeof (png_uint_16))); + + /* 'gamma_val' is set to the reciprocal of the value calculated above, so + * pow(out,g) is an *input* value. 'last' is the last input value set. + * + * In the loop 'i' is used to find output values. Since the output is + * 8-bit there are only 256 possible values. The tables are set up to + * select the closest possible output value for each input by finding + * the input value at the boundary between each pair of output values + * and filling the table up to that boundary with the lower output + * value. + * + * The boundary values are 0.5,1.5..253.5,254.5. Since these are 9-bit + * values the code below uses a 16-bit value in i; the values start at + * 128.5 (for 0.5) and step by 257, for a total of 254 values (the last + * entries are filled with 255). Start i at 128 and fill all 'last' + * table entries <= 'max' + */ + last = 0; + for (i = 0; i < 255; ++i) /* 8-bit output value */ + { + /* Find the corresponding maximum input value */ + png_uint_16 out = (png_uint_16)(i * 257U); /* 16-bit output value */ + + /* Find the boundary value in 16 bits: */ + png_uint_32 bound = png_gamma_16bit_correct(out+128U, gamma_val); + + /* Adjust (round) to (16-shift) bits: */ + bound = (bound * max + 32768U)/65535U + 1U; + + while (last < bound) + { + table[last & (0xffU >> shift)][last >> (8U - shift)] = out; + last++; + } + } + + /* And fill in the final entries. */ + while (last < (num << 8)) + { + table[last & (0xff >> shift)][last >> (8U - shift)] = 65535U; + last++; + } +} +#endif /* 16BIT */ + +/* Build a single 8-bit table: same as the 16-bit case but much simpler (and + * typically much faster). Note that libpng currently does no sBIT processing + * (apparently contrary to the spec) so a 256-entry table is always generated. + */ +static void +png_build_8bit_table(png_structrp png_ptr, png_bytepp ptable, + png_fixed_point gamma_val) +{ + unsigned int i; + png_bytep table = *ptable = (png_bytep)png_malloc(png_ptr, 256); + + if (png_gamma_significant(gamma_val) != 0) + for (i=0; i<256; i++) + table[i] = png_gamma_8bit_correct(i, gamma_val); + + else + for (i=0; i<256; ++i) + table[i] = (png_byte)(i & 0xff); +} + +/* Used from png_read_destroy and below to release the memory used by the gamma + * tables. + */ +void /* PRIVATE */ +png_destroy_gamma_table(png_structrp png_ptr) +{ + png_free(png_ptr, png_ptr->gamma_table); + png_ptr->gamma_table = NULL; + +#ifdef PNG_16BIT_SUPPORTED + if (png_ptr->gamma_16_table != NULL) + { + int i; + int istop = (1 << (8 - png_ptr->gamma_shift)); + for (i = 0; i < istop; i++) + { + png_free(png_ptr, png_ptr->gamma_16_table[i]); + } + png_free(png_ptr, png_ptr->gamma_16_table); + png_ptr->gamma_16_table = NULL; + } +#endif /* 16BIT */ + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) || \ + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) + png_free(png_ptr, png_ptr->gamma_from_1); + png_ptr->gamma_from_1 = NULL; + png_free(png_ptr, png_ptr->gamma_to_1); + png_ptr->gamma_to_1 = NULL; + +#ifdef PNG_16BIT_SUPPORTED + if (png_ptr->gamma_16_from_1 != NULL) + { + int i; + int istop = (1 << (8 - png_ptr->gamma_shift)); + for (i = 0; i < istop; i++) + { + png_free(png_ptr, png_ptr->gamma_16_from_1[i]); + } + png_free(png_ptr, png_ptr->gamma_16_from_1); + png_ptr->gamma_16_from_1 = NULL; + } + if (png_ptr->gamma_16_to_1 != NULL) + { + int i; + int istop = (1 << (8 - png_ptr->gamma_shift)); + for (i = 0; i < istop; i++) + { + png_free(png_ptr, png_ptr->gamma_16_to_1[i]); + } + png_free(png_ptr, png_ptr->gamma_16_to_1); + png_ptr->gamma_16_to_1 = NULL; + } +#endif /* 16BIT */ +#endif /* READ_BACKGROUND || READ_ALPHA_MODE || RGB_TO_GRAY */ +} + +/* We build the 8- or 16-bit gamma tables here. Note that for 16-bit + * tables, we don't make a full table if we are reducing to 8-bit in + * the future. Note also how the gamma_16 tables are segmented so that + * we don't need to allocate > 64K chunks for a full 16-bit table. + * + * TODO: move this to pngrtran.c and make it static. Better yet create + * pngcolor.c and put all the PNG_COLORSPACE stuff in there. + */ +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) || \ + defined(PNG_READ_RGB_TO_GRAY_SUPPORTED) +# define GAMMA_TRANSFORMS 1 /* #ifdef CSE */ +#else +# define GAMMA_TRANSFORMS 0 +#endif + +void /* PRIVATE */ +png_build_gamma_table(png_structrp png_ptr, int bit_depth) +{ + png_fixed_point file_gamma, screen_gamma; + png_fixed_point correction; +# if GAMMA_TRANSFORMS + png_fixed_point file_to_linear, linear_to_screen; +# endif + + png_debug(1, "in png_build_gamma_table"); + + /* Remove any existing table; this copes with multiple calls to + * png_read_update_info. The warning is because building the gamma tables + * multiple times is a performance hit - it's harmless but the ability to + * call png_read_update_info() multiple times is new in 1.5.6 so it seems + * sensible to warn if the app introduces such a hit. + */ + if (png_ptr->gamma_table != NULL || png_ptr->gamma_16_table != NULL) + { + png_warning(png_ptr, "gamma table being rebuilt"); + png_destroy_gamma_table(png_ptr); + } + + /* The following fields are set, finally, in png_init_read_transformations. + * If file_gamma is 0 (unset) nothing can be done otherwise if screen_gamma + * is 0 (unset) there is no gamma correction but to/from linear is possible. + */ + file_gamma = png_ptr->file_gamma; + screen_gamma = png_ptr->screen_gamma; +# if GAMMA_TRANSFORMS + file_to_linear = png_reciprocal(file_gamma); +# endif + + if (screen_gamma > 0) + { +# if GAMMA_TRANSFORMS + linear_to_screen = png_reciprocal(screen_gamma); +# endif + correction = png_reciprocal2(screen_gamma, file_gamma); + } + else /* screen gamma unknown */ + { +# if GAMMA_TRANSFORMS + linear_to_screen = file_gamma; +# endif + correction = PNG_FP_1; + } + + if (bit_depth <= 8) + { + png_build_8bit_table(png_ptr, &png_ptr->gamma_table, correction); + +#if GAMMA_TRANSFORMS + if ((png_ptr->transformations & (PNG_COMPOSE | PNG_RGB_TO_GRAY)) != 0) + { + png_build_8bit_table(png_ptr, &png_ptr->gamma_to_1, file_to_linear); + + png_build_8bit_table(png_ptr, &png_ptr->gamma_from_1, + linear_to_screen); + } +#endif /* GAMMA_TRANSFORMS */ + } +#ifdef PNG_16BIT_SUPPORTED + else + { + png_byte shift, sig_bit; + + if ((png_ptr->color_type & PNG_COLOR_MASK_COLOR) != 0) + { + sig_bit = png_ptr->sig_bit.red; + + if (png_ptr->sig_bit.green > sig_bit) + sig_bit = png_ptr->sig_bit.green; + + if (png_ptr->sig_bit.blue > sig_bit) + sig_bit = png_ptr->sig_bit.blue; + } + else + sig_bit = png_ptr->sig_bit.gray; + + /* 16-bit gamma code uses this equation: + * + * ov = table[(iv & 0xff) >> gamma_shift][iv >> 8] + * + * Where 'iv' is the input color value and 'ov' is the output value - + * pow(iv, gamma). + * + * Thus the gamma table consists of up to 256 256-entry tables. The table + * is selected by the (8-gamma_shift) most significant of the low 8 bits + * of the color value then indexed by the upper 8 bits: + * + * table[low bits][high 8 bits] + * + * So the table 'n' corresponds to all those 'iv' of: + * + * ..<(n+1 << gamma_shift)-1> + * + */ + if (sig_bit > 0 && sig_bit < 16U) + /* shift == insignificant bits */ + shift = (png_byte)((16U - sig_bit) & 0xff); + + else + shift = 0; /* keep all 16 bits */ + + if ((png_ptr->transformations & (PNG_16_TO_8 | PNG_SCALE_16_TO_8)) != 0) + { + /* PNG_MAX_GAMMA_8 is the number of bits to keep - effectively + * the significant bits in the *input* when the output will + * eventually be 8 bits. By default it is 11. + */ + if (shift < (16U - PNG_MAX_GAMMA_8)) + shift = (16U - PNG_MAX_GAMMA_8); + } + + if (shift > 8U) + shift = 8U; /* Guarantees at least one table! */ + + png_ptr->gamma_shift = shift; + + /* NOTE: prior to 1.5.4 this test used to include PNG_BACKGROUND (now + * PNG_COMPOSE). This effectively smashed the background calculation for + * 16-bit output because the 8-bit table assumes the result will be + * reduced to 8 bits. + */ + if ((png_ptr->transformations & (PNG_16_TO_8 | PNG_SCALE_16_TO_8)) != 0) + png_build_16to8_table(png_ptr, &png_ptr->gamma_16_table, shift, + png_reciprocal(correction)); + else + png_build_16bit_table(png_ptr, &png_ptr->gamma_16_table, shift, + correction); + +# if GAMMA_TRANSFORMS + if ((png_ptr->transformations & (PNG_COMPOSE | PNG_RGB_TO_GRAY)) != 0) + { + png_build_16bit_table(png_ptr, &png_ptr->gamma_16_to_1, shift, + file_to_linear); + + /* Notice that the '16 from 1' table should be full precision, however + * the lookup on this table still uses gamma_shift, so it can't be. + * TODO: fix this. + */ + png_build_16bit_table(png_ptr, &png_ptr->gamma_16_from_1, shift, + linear_to_screen); + } +#endif /* GAMMA_TRANSFORMS */ + } +#endif /* 16BIT */ +} +#endif /* READ_GAMMA */ + +/* HARDWARE OR SOFTWARE OPTION SUPPORT */ +#ifdef PNG_SET_OPTION_SUPPORTED +int PNGAPI +png_set_option(png_structrp png_ptr, int option, int onoff) +{ + if (png_ptr != NULL && option >= 0 && option < PNG_OPTION_NEXT && + (option & 1) == 0) + { + png_uint_32 mask = 3U << option; + png_uint_32 setting = (2U + (onoff != 0)) << option; + png_uint_32 current = png_ptr->options; + + png_ptr->options = (png_uint_32)((current & ~mask) | setting); + + return (int)(current & mask) >> option; + } + + return PNG_OPTION_INVALID; +} +#endif + +/* sRGB support */ +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) +/* sRGB conversion tables; these are machine generated with the code in + * contrib/tools/makesRGB.c. The actual sRGB transfer curve defined in the + * specification (see the article at https://en.wikipedia.org/wiki/SRGB) + * is used, not the gamma=1/2.2 approximation use elsewhere in libpng. + * The sRGB to linear table is exact (to the nearest 16-bit linear fraction). + * The inverse (linear to sRGB) table has accuracies as follows: + * + * For all possible (255*65535+1) input values: + * + * error: -0.515566 - 0.625971, 79441 (0.475369%) of readings inexact + * + * For the input values corresponding to the 65536 16-bit values: + * + * error: -0.513727 - 0.607759, 308 (0.469978%) of readings inexact + * + * In all cases the inexact readings are only off by one. + */ + +#ifdef PNG_SIMPLIFIED_READ_SUPPORTED +/* The convert-to-sRGB table is only currently required for read. */ +const png_uint_16 png_sRGB_table[256] = +{ + 0,20,40,60,80,99,119,139, + 159,179,199,219,241,264,288,313, + 340,367,396,427,458,491,526,562, + 599,637,677,718,761,805,851,898, + 947,997,1048,1101,1156,1212,1270,1330, + 1391,1453,1517,1583,1651,1720,1790,1863, + 1937,2013,2090,2170,2250,2333,2418,2504, + 2592,2681,2773,2866,2961,3058,3157,3258, + 3360,3464,3570,3678,3788,3900,4014,4129, + 4247,4366,4488,4611,4736,4864,4993,5124, + 5257,5392,5530,5669,5810,5953,6099,6246, + 6395,6547,6700,6856,7014,7174,7335,7500, + 7666,7834,8004,8177,8352,8528,8708,8889, + 9072,9258,9445,9635,9828,10022,10219,10417, + 10619,10822,11028,11235,11446,11658,11873,12090, + 12309,12530,12754,12980,13209,13440,13673,13909, + 14146,14387,14629,14874,15122,15371,15623,15878, + 16135,16394,16656,16920,17187,17456,17727,18001, + 18277,18556,18837,19121,19407,19696,19987,20281, + 20577,20876,21177,21481,21787,22096,22407,22721, + 23038,23357,23678,24002,24329,24658,24990,25325, + 25662,26001,26344,26688,27036,27386,27739,28094, + 28452,28813,29176,29542,29911,30282,30656,31033, + 31412,31794,32179,32567,32957,33350,33745,34143, + 34544,34948,35355,35764,36176,36591,37008,37429, + 37852,38278,38706,39138,39572,40009,40449,40891, + 41337,41785,42236,42690,43147,43606,44069,44534, + 45002,45473,45947,46423,46903,47385,47871,48359, + 48850,49344,49841,50341,50844,51349,51858,52369, + 52884,53401,53921,54445,54971,55500,56032,56567, + 57105,57646,58190,58737,59287,59840,60396,60955, + 61517,62082,62650,63221,63795,64372,64952,65535 +}; +#endif /* SIMPLIFIED_READ */ + +/* The base/delta tables are required for both read and write (but currently + * only the simplified versions.) + */ +const png_uint_16 png_sRGB_base[512] = +{ + 128,1782,3383,4644,5675,6564,7357,8074, + 8732,9346,9921,10463,10977,11466,11935,12384, + 12816,13233,13634,14024,14402,14769,15125,15473, + 15812,16142,16466,16781,17090,17393,17690,17981, + 18266,18546,18822,19093,19359,19621,19879,20133, + 20383,20630,20873,21113,21349,21583,21813,22041, + 22265,22487,22707,22923,23138,23350,23559,23767, + 23972,24175,24376,24575,24772,24967,25160,25352, + 25542,25730,25916,26101,26284,26465,26645,26823, + 27000,27176,27350,27523,27695,27865,28034,28201, + 28368,28533,28697,28860,29021,29182,29341,29500, + 29657,29813,29969,30123,30276,30429,30580,30730, + 30880,31028,31176,31323,31469,31614,31758,31902, + 32045,32186,32327,32468,32607,32746,32884,33021, + 33158,33294,33429,33564,33697,33831,33963,34095, + 34226,34357,34486,34616,34744,34873,35000,35127, + 35253,35379,35504,35629,35753,35876,35999,36122, + 36244,36365,36486,36606,36726,36845,36964,37083, + 37201,37318,37435,37551,37668,37783,37898,38013, + 38127,38241,38354,38467,38580,38692,38803,38915, + 39026,39136,39246,39356,39465,39574,39682,39790, + 39898,40005,40112,40219,40325,40431,40537,40642, + 40747,40851,40955,41059,41163,41266,41369,41471, + 41573,41675,41777,41878,41979,42079,42179,42279, + 42379,42478,42577,42676,42775,42873,42971,43068, + 43165,43262,43359,43456,43552,43648,43743,43839, + 43934,44028,44123,44217,44311,44405,44499,44592, + 44685,44778,44870,44962,45054,45146,45238,45329, + 45420,45511,45601,45692,45782,45872,45961,46051, + 46140,46229,46318,46406,46494,46583,46670,46758, + 46846,46933,47020,47107,47193,47280,47366,47452, + 47538,47623,47709,47794,47879,47964,48048,48133, + 48217,48301,48385,48468,48552,48635,48718,48801, + 48884,48966,49048,49131,49213,49294,49376,49458, + 49539,49620,49701,49782,49862,49943,50023,50103, + 50183,50263,50342,50422,50501,50580,50659,50738, + 50816,50895,50973,51051,51129,51207,51285,51362, + 51439,51517,51594,51671,51747,51824,51900,51977, + 52053,52129,52205,52280,52356,52432,52507,52582, + 52657,52732,52807,52881,52956,53030,53104,53178, + 53252,53326,53400,53473,53546,53620,53693,53766, + 53839,53911,53984,54056,54129,54201,54273,54345, + 54417,54489,54560,54632,54703,54774,54845,54916, + 54987,55058,55129,55199,55269,55340,55410,55480, + 55550,55620,55689,55759,55828,55898,55967,56036, + 56105,56174,56243,56311,56380,56448,56517,56585, + 56653,56721,56789,56857,56924,56992,57059,57127, + 57194,57261,57328,57395,57462,57529,57595,57662, + 57728,57795,57861,57927,57993,58059,58125,58191, + 58256,58322,58387,58453,58518,58583,58648,58713, + 58778,58843,58908,58972,59037,59101,59165,59230, + 59294,59358,59422,59486,59549,59613,59677,59740, + 59804,59867,59930,59993,60056,60119,60182,60245, + 60308,60370,60433,60495,60558,60620,60682,60744, + 60806,60868,60930,60992,61054,61115,61177,61238, + 61300,61361,61422,61483,61544,61605,61666,61727, + 61788,61848,61909,61969,62030,62090,62150,62211, + 62271,62331,62391,62450,62510,62570,62630,62689, + 62749,62808,62867,62927,62986,63045,63104,63163, + 63222,63281,63340,63398,63457,63515,63574,63632, + 63691,63749,63807,63865,63923,63981,64039,64097, + 64155,64212,64270,64328,64385,64443,64500,64557, + 64614,64672,64729,64786,64843,64900,64956,65013, + 65070,65126,65183,65239,65296,65352,65409,65465 +}; + +const png_byte png_sRGB_delta[512] = +{ + 207,201,158,129,113,100,90,82,77,72,68,64,61,59,56,54, + 52,50,49,47,46,45,43,42,41,40,39,39,38,37,36,36, + 35,34,34,33,33,32,32,31,31,30,30,30,29,29,28,28, + 28,27,27,27,27,26,26,26,25,25,25,25,24,24,24,24, + 23,23,23,23,23,22,22,22,22,22,22,21,21,21,21,21, + 21,20,20,20,20,20,20,20,20,19,19,19,19,19,19,19, + 19,18,18,18,18,18,18,18,18,18,18,17,17,17,17,17, + 17,17,17,17,17,17,16,16,16,16,16,16,16,16,16,16, + 16,16,16,16,15,15,15,15,15,15,15,15,15,15,15,15, + 15,15,15,15,14,14,14,14,14,14,14,14,14,14,14,14, + 14,14,14,14,14,14,14,13,13,13,13,13,13,13,13,13, + 13,13,13,13,13,13,13,13,13,13,13,13,13,13,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12, + 12,12,12,12,12,12,12,12,12,12,12,12,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11, + 11,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10, + 10,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7 +}; +#endif /* SIMPLIFIED READ/WRITE sRGB support */ + +/* SIMPLIFIED READ/WRITE SUPPORT */ +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) +static int +png_image_free_function(png_voidp argument) +{ + png_imagep image = png_voidcast(png_imagep, argument); + png_controlp cp = image->opaque; + png_control c; + + /* Double check that we have a png_ptr - it should be impossible to get here + * without one. + */ + if (cp->png_ptr == NULL) + return 0; + + /* First free any data held in the control structure. */ +# ifdef PNG_STDIO_SUPPORTED + if (cp->owned_file != 0) + { + FILE *fp = png_voidcast(FILE *, cp->png_ptr->io_ptr); + cp->owned_file = 0; + + /* Ignore errors here. */ + if (fp != NULL) + { + cp->png_ptr->io_ptr = NULL; + (void)fclose(fp); + } + } +# endif + + /* Copy the control structure so that the original, allocated, version can be + * safely freed. Notice that a png_error here stops the remainder of the + * cleanup, but this is probably fine because that would indicate bad memory + * problems anyway. + */ + c = *cp; + image->opaque = &c; + png_free(c.png_ptr, cp); + + /* Then the structures, calling the correct API. */ + if (c.for_write != 0) + { +# ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED + png_destroy_write_struct(&c.png_ptr, &c.info_ptr); +# else + png_error(c.png_ptr, "simplified write not supported"); +# endif + } + else + { +# ifdef PNG_SIMPLIFIED_READ_SUPPORTED + png_destroy_read_struct(&c.png_ptr, &c.info_ptr, NULL); +# else + png_error(c.png_ptr, "simplified read not supported"); +# endif + } + + /* Success. */ + return 1; +} + +void PNGAPI +png_image_free(png_imagep image) +{ + /* Safely call the real function, but only if doing so is safe at this point + * (if not inside an error handling context). Otherwise assume + * png_safe_execute will call this API after the return. + */ + if (image != NULL && image->opaque != NULL && + image->opaque->error_buf == NULL) + { + png_image_free_function(image); + image->opaque = NULL; + } +} + +int /* PRIVATE */ +png_image_error(png_imagep image, png_const_charp error_message) +{ + /* Utility to log an error. */ + png_safecat(image->message, (sizeof image->message), 0, error_message); + image->warning_or_error |= PNG_IMAGE_ERROR; + png_image_free(image); + return 0; +} + +#endif /* SIMPLIFIED READ/WRITE */ +#endif /* READ || WRITE */ diff --git a/widget/milsko/milskosrc/external/libpng/src/pngerror.c b/widget/milsko/milskosrc/external/libpng/src/pngerror.c new file mode 100644 index 0000000000..01a7ef5347 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/src/pngerror.c @@ -0,0 +1,971 @@ +/* pngerror.c - stub functions for i/o and memory allocation + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This file provides a location for all error handling. Users who + * need special error handling are expected to write replacement functions + * and use png_set_error_fn() to use those functions. See the instructions + * at each function. + */ + +#include "pngpriv.h" + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + +static PNG_FUNCTION(void /* PRIVATE */, +png_default_error,(png_const_structrp png_ptr, png_const_charp error_message), + PNG_NORETURN); + +#ifdef PNG_WARNINGS_SUPPORTED +static void /* PRIVATE */ +png_default_warning(png_const_structrp png_ptr, + png_const_charp warning_message); +#endif /* WARNINGS */ + +/* This function is called whenever there is a fatal error. This function + * should not be changed. If there is a need to handle errors differently, + * you should supply a replacement error function and use png_set_error_fn() + * to replace the error function at run-time. + */ +#ifdef PNG_ERROR_TEXT_SUPPORTED +PNG_FUNCTION(void,PNGAPI +png_error,(png_const_structrp png_ptr, png_const_charp error_message), + PNG_NORETURN) +{ +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + char msg[16]; + if (png_ptr != NULL) + { + if ((png_ptr->flags & + (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) != 0) + { + if (*error_message == PNG_LITERAL_SHARP) + { + /* Strip "#nnnn " from beginning of error message. */ + int offset; + for (offset = 1; offset<15; offset++) + if (error_message[offset] == ' ') + break; + + if ((png_ptr->flags & PNG_FLAG_STRIP_ERROR_TEXT) != 0) + { + int i; + for (i = 0; i < offset - 1; i++) + msg[i] = error_message[i + 1]; + msg[i - 1] = '\0'; + error_message = msg; + } + + else + error_message += offset; + } + + else + { + if ((png_ptr->flags & PNG_FLAG_STRIP_ERROR_TEXT) != 0) + { + msg[0] = '0'; + msg[1] = '\0'; + error_message = msg; + } + } + } + } +#endif + if (png_ptr != NULL && png_ptr->error_fn != NULL) + (*(png_ptr->error_fn))(png_constcast(png_structrp,png_ptr), + error_message); + + /* If the custom handler doesn't exist, or if it returns, + use the default handler, which will not return. */ + png_default_error(png_ptr, error_message); +} +#else +PNG_FUNCTION(void,PNGAPI +png_err,(png_const_structrp png_ptr),PNG_NORETURN) +{ + /* Prior to 1.5.2 the error_fn received a NULL pointer, expressed + * erroneously as '\0', instead of the empty string "". This was + * apparently an error, introduced in libpng-1.2.20, and png_default_error + * will crash in this case. + */ + if (png_ptr != NULL && png_ptr->error_fn != NULL) + (*(png_ptr->error_fn))(png_constcast(png_structrp,png_ptr), ""); + + /* If the custom handler doesn't exist, or if it returns, + use the default handler, which will not return. */ + png_default_error(png_ptr, ""); +} +#endif /* ERROR_TEXT */ + +/* Utility to safely appends strings to a buffer. This never errors out so + * error checking is not required in the caller. + */ +size_t +png_safecat(png_charp buffer, size_t bufsize, size_t pos, + png_const_charp string) +{ + if (buffer != NULL && pos < bufsize) + { + if (string != NULL) + while (*string != '\0' && pos < bufsize-1) + buffer[pos++] = *string++; + + buffer[pos] = '\0'; + } + + return pos; +} + +#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_TIME_RFC1123_SUPPORTED) +/* Utility to dump an unsigned value into a buffer, given a start pointer and + * and end pointer (which should point just *beyond* the end of the buffer!) + * Returns the pointer to the start of the formatted string. + */ +png_charp +png_format_number(png_const_charp start, png_charp end, int format, + png_alloc_size_t number) +{ + int count = 0; /* number of digits output */ + int mincount = 1; /* minimum number required */ + int output = 0; /* digit output (for the fixed point format) */ + + *--end = '\0'; + + /* This is written so that the loop always runs at least once, even with + * number zero. + */ + while (end > start && (number != 0 || count < mincount)) + { + + static const char digits[] = "0123456789ABCDEF"; + + switch (format) + { + case PNG_NUMBER_FORMAT_fixed: + /* Needs five digits (the fraction) */ + mincount = 5; + if (output != 0 || number % 10 != 0) + { + *--end = digits[number % 10]; + output = 1; + } + number /= 10; + break; + + case PNG_NUMBER_FORMAT_02u: + /* Expects at least 2 digits. */ + mincount = 2; + /* FALLTHROUGH */ + + case PNG_NUMBER_FORMAT_u: + *--end = digits[number % 10]; + number /= 10; + break; + + case PNG_NUMBER_FORMAT_02x: + /* This format expects at least two digits */ + mincount = 2; + /* FALLTHROUGH */ + + case PNG_NUMBER_FORMAT_x: + *--end = digits[number & 0xf]; + number >>= 4; + break; + + default: /* an error */ + number = 0; + break; + } + + /* Keep track of the number of digits added */ + ++count; + + /* Float a fixed number here: */ + if ((format == PNG_NUMBER_FORMAT_fixed) && (count == 5) && (end > start)) + { + /* End of the fraction, but maybe nothing was output? In that case + * drop the decimal point. If the number is a true zero handle that + * here. + */ + if (output != 0) + *--end = '.'; + else if (number == 0) /* and !output */ + *--end = '0'; + } + } + + return end; +} +#endif + +#ifdef PNG_WARNINGS_SUPPORTED +/* This function is called whenever there is a non-fatal error. This function + * should not be changed. If there is a need to handle warnings differently, + * you should supply a replacement warning function and use + * png_set_error_fn() to replace the warning function at run-time. + */ +void PNGAPI +png_warning(png_const_structrp png_ptr, png_const_charp warning_message) +{ + int offset = 0; + if (png_ptr != NULL) + { +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + if ((png_ptr->flags & + (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT)) != 0) +#endif + { + if (*warning_message == PNG_LITERAL_SHARP) + { + for (offset = 1; offset < 15; offset++) + if (warning_message[offset] == ' ') + break; + } + } + } + if (png_ptr != NULL && png_ptr->warning_fn != NULL) + (*(png_ptr->warning_fn))(png_constcast(png_structrp,png_ptr), + warning_message + offset); + else + png_default_warning(png_ptr, warning_message + offset); +} + +/* These functions support 'formatted' warning messages with up to + * PNG_WARNING_PARAMETER_COUNT parameters. In the format string the parameter + * is introduced by @, where 'number' starts at 1. This follows the + * standard established by X/Open for internationalizable error messages. + */ +void +png_warning_parameter(png_warning_parameters p, int number, + png_const_charp string) +{ + if (number > 0 && number <= PNG_WARNING_PARAMETER_COUNT) + (void)png_safecat(p[number-1], (sizeof p[number-1]), 0, string); +} + +void +png_warning_parameter_unsigned(png_warning_parameters p, int number, int format, + png_alloc_size_t value) +{ + char buffer[PNG_NUMBER_BUFFER_SIZE] = {0}; + png_warning_parameter(p, number, PNG_FORMAT_NUMBER(buffer, format, value)); +} + +void +png_warning_parameter_signed(png_warning_parameters p, int number, int format, + png_int_32 value) +{ + png_alloc_size_t u; + png_charp str; + char buffer[PNG_NUMBER_BUFFER_SIZE] = {0}; + + /* Avoid overflow by doing the negate in a png_alloc_size_t: */ + u = (png_alloc_size_t)value; + if (value < 0) + u = ~u + 1; + + str = PNG_FORMAT_NUMBER(buffer, format, u); + + if (value < 0 && str > buffer) + *--str = '-'; + + png_warning_parameter(p, number, str); +} + +void +png_formatted_warning(png_const_structrp png_ptr, png_warning_parameters p, + png_const_charp message) +{ + /* The internal buffer is just 192 bytes - enough for all our messages, + * overflow doesn't happen because this code checks! If someone figures + * out how to send us a message longer than 192 bytes, all that will + * happen is that the message will be truncated appropriately. + */ + size_t i = 0; /* Index in the msg[] buffer: */ + char msg[192]; + + /* Each iteration through the following loop writes at most one character + * to msg[i++] then returns here to validate that there is still space for + * the trailing '\0'. It may (in the case of a parameter) read more than + * one character from message[]; it must check for '\0' and continue to the + * test if it finds the end of string. + */ + while (i<(sizeof msg)-1 && *message != '\0') + { + /* '@' at end of string is now just printed (previously it was skipped); + * it is an error in the calling code to terminate the string with @. + */ + if (p != NULL && *message == '@' && message[1] != '\0') + { + int parameter_char = *++message; /* Consume the '@' */ + static const char valid_parameters[] = "123456789"; + int parameter = 0; + + /* Search for the parameter digit, the index in the string is the + * parameter to use. + */ + while (valid_parameters[parameter] != parameter_char && + valid_parameters[parameter] != '\0') + ++parameter; + + /* If the parameter digit is out of range it will just get printed. */ + if (parameter < PNG_WARNING_PARAMETER_COUNT) + { + /* Append this parameter */ + png_const_charp parm = p[parameter]; + png_const_charp pend = p[parameter] + (sizeof p[parameter]); + + /* No need to copy the trailing '\0' here, but there is no guarantee + * that parm[] has been initialized, so there is no guarantee of a + * trailing '\0': + */ + while (i<(sizeof msg)-1 && *parm != '\0' && parm < pend) + msg[i++] = *parm++; + + /* Consume the parameter digit too: */ + ++message; + continue; + } + + /* else not a parameter and there is a character after the @ sign; just + * copy that. This is known not to be '\0' because of the test above. + */ + } + + /* At this point *message can't be '\0', even in the bad parameter case + * above where there is a lone '@' at the end of the message string. + */ + msg[i++] = *message++; + } + + /* i is always less than (sizeof msg), so: */ + msg[i] = '\0'; + + /* And this is the formatted message. It may be larger than + * PNG_MAX_ERROR_TEXT, but that is only used for 'chunk' errors and these + * are not (currently) formatted. + */ + png_warning(png_ptr, msg); +} +#endif /* WARNINGS */ + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +void PNGAPI +png_benign_error(png_const_structrp png_ptr, png_const_charp error_message) +{ + if ((png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN) != 0) + { +# ifdef PNG_READ_SUPPORTED + if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0 && + png_ptr->chunk_name != 0) + png_chunk_warning(png_ptr, error_message); + else +# endif + png_warning(png_ptr, error_message); + } + + else + { +# ifdef PNG_READ_SUPPORTED + if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0 && + png_ptr->chunk_name != 0) + png_chunk_error(png_ptr, error_message); + else +# endif + png_error(png_ptr, error_message); + } + +# ifndef PNG_ERROR_TEXT_SUPPORTED + PNG_UNUSED(error_message) +# endif +} + +void /* PRIVATE */ +png_app_warning(png_const_structrp png_ptr, png_const_charp error_message) +{ + if ((png_ptr->flags & PNG_FLAG_APP_WARNINGS_WARN) != 0) + png_warning(png_ptr, error_message); + else + png_error(png_ptr, error_message); + +# ifndef PNG_ERROR_TEXT_SUPPORTED + PNG_UNUSED(error_message) +# endif +} + +void /* PRIVATE */ +png_app_error(png_const_structrp png_ptr, png_const_charp error_message) +{ + if ((png_ptr->flags & PNG_FLAG_APP_ERRORS_WARN) != 0) + png_warning(png_ptr, error_message); + else + png_error(png_ptr, error_message); + +# ifndef PNG_ERROR_TEXT_SUPPORTED + PNG_UNUSED(error_message) +# endif +} +#endif /* BENIGN_ERRORS */ + +#define PNG_MAX_ERROR_TEXT 196 /* Currently limited by profile_error in png.c */ +#if defined(PNG_WARNINGS_SUPPORTED) || \ + (defined(PNG_READ_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED)) +/* These utilities are used internally to build an error message that relates + * to the current chunk. The chunk name comes from png_ptr->chunk_name, + * which is used to prefix the message. The message is limited in length + * to 63 bytes. The name characters are output as hex digits wrapped in [] + * if the character is invalid. + */ +#define isnonalpha(c) ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97)) +static const char png_digit[16] = { + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', + 'A', 'B', 'C', 'D', 'E', 'F' +}; + +static void /* PRIVATE */ +png_format_buffer(png_const_structrp png_ptr, png_charp buffer, png_const_charp + error_message) +{ + png_uint_32 chunk_name = png_ptr->chunk_name; + int iout = 0, ishift = 24; + + while (ishift >= 0) + { + int c = (int)(chunk_name >> ishift) & 0xff; + + ishift -= 8; + if (isnonalpha(c) != 0) + { + buffer[iout++] = PNG_LITERAL_LEFT_SQUARE_BRACKET; + buffer[iout++] = png_digit[(c & 0xf0) >> 4]; + buffer[iout++] = png_digit[c & 0x0f]; + buffer[iout++] = PNG_LITERAL_RIGHT_SQUARE_BRACKET; + } + + else + { + buffer[iout++] = (char)c; + } + } + + if (error_message == NULL) + buffer[iout] = '\0'; + + else + { + int iin = 0; + + buffer[iout++] = ':'; + buffer[iout++] = ' '; + + while (iin < PNG_MAX_ERROR_TEXT-1 && error_message[iin] != '\0') + buffer[iout++] = error_message[iin++]; + + /* iin < PNG_MAX_ERROR_TEXT, so the following is safe: */ + buffer[iout] = '\0'; + } +} +#endif /* WARNINGS || ERROR_TEXT */ + +#if defined(PNG_READ_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED) +PNG_FUNCTION(void,PNGAPI +png_chunk_error,(png_const_structrp png_ptr, png_const_charp error_message), + PNG_NORETURN) +{ + char msg[18+PNG_MAX_ERROR_TEXT]; + if (png_ptr == NULL) + png_error(png_ptr, error_message); + + else + { + png_format_buffer(png_ptr, msg, error_message); + png_error(png_ptr, msg); + } +} +#endif /* READ && ERROR_TEXT */ + +#ifdef PNG_WARNINGS_SUPPORTED +void PNGAPI +png_chunk_warning(png_const_structrp png_ptr, png_const_charp warning_message) +{ + char msg[18+PNG_MAX_ERROR_TEXT]; + if (png_ptr == NULL) + png_warning(png_ptr, warning_message); + + else + { + png_format_buffer(png_ptr, msg, warning_message); + png_warning(png_ptr, msg); + } +} +#endif /* WARNINGS */ + +#ifdef PNG_READ_SUPPORTED +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +void PNGAPI +png_chunk_benign_error(png_const_structrp png_ptr, png_const_charp + error_message) +{ + if ((png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN) != 0) + png_chunk_warning(png_ptr, error_message); + + else + png_chunk_error(png_ptr, error_message); + +# ifndef PNG_ERROR_TEXT_SUPPORTED + PNG_UNUSED(error_message) +# endif +} +#endif +#endif /* READ */ + +void /* PRIVATE */ +png_chunk_report(png_const_structrp png_ptr, png_const_charp message, int error) +{ +# ifndef PNG_WARNINGS_SUPPORTED + PNG_UNUSED(message) +# endif + + /* This is always supported, but for just read or just write it + * unconditionally does the right thing. + */ +# if defined(PNG_READ_SUPPORTED) && defined(PNG_WRITE_SUPPORTED) + if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0) +# endif + +# ifdef PNG_READ_SUPPORTED + { + if (error < PNG_CHUNK_ERROR) + png_chunk_warning(png_ptr, message); + + else + png_chunk_benign_error(png_ptr, message); + } +# endif + +# if defined(PNG_READ_SUPPORTED) && defined(PNG_WRITE_SUPPORTED) + else if ((png_ptr->mode & PNG_IS_READ_STRUCT) == 0) +# endif + +# ifdef PNG_WRITE_SUPPORTED + { + if (error < PNG_CHUNK_WRITE_ERROR) + png_app_warning(png_ptr, message); + + else + png_app_error(png_ptr, message); + } +# endif +} + +#ifdef PNG_ERROR_TEXT_SUPPORTED +#ifdef PNG_FLOATING_POINT_SUPPORTED +PNG_FUNCTION(void, +png_fixed_error,(png_const_structrp png_ptr, png_const_charp name),PNG_NORETURN) +{ +# define fixed_message "fixed point overflow in " +# define fixed_message_ln ((sizeof fixed_message)-1) + unsigned int iin; + char msg[fixed_message_ln+PNG_MAX_ERROR_TEXT]; + memcpy(msg, fixed_message, fixed_message_ln); + iin = 0; + if (name != NULL) + while (iin < (PNG_MAX_ERROR_TEXT-1) && name[iin] != 0) + { + msg[fixed_message_ln + iin] = name[iin]; + ++iin; + } + msg[fixed_message_ln + iin] = 0; + png_error(png_ptr, msg); +} +#endif +#endif + +#ifdef PNG_SETJMP_SUPPORTED +/* This API only exists if ANSI-C style error handling is used, + * otherwise it is necessary for png_default_error to be overridden. + */ +jmp_buf* PNGAPI +png_set_longjmp_fn(png_structrp png_ptr, png_longjmp_ptr longjmp_fn, + size_t jmp_buf_size) +{ + /* From libpng 1.6.0 the app gets one chance to set a 'jmpbuf_size' value + * and it must not change after that. Libpng doesn't care how big the + * buffer is, just that it doesn't change. + * + * If the buffer size is no *larger* than the size of jmp_buf when libpng is + * compiled a built in jmp_buf is returned; this preserves the pre-1.6.0 + * semantics that this call will not fail. If the size is larger, however, + * the buffer is allocated and this may fail, causing the function to return + * NULL. + */ + if (png_ptr == NULL) + return NULL; + + if (png_ptr->jmp_buf_ptr == NULL) + { + png_ptr->jmp_buf_size = 0; /* not allocated */ + + if (jmp_buf_size <= (sizeof png_ptr->jmp_buf_local)) + png_ptr->jmp_buf_ptr = &png_ptr->jmp_buf_local; + + else + { + png_ptr->jmp_buf_ptr = png_voidcast(jmp_buf *, + png_malloc_warn(png_ptr, jmp_buf_size)); + + if (png_ptr->jmp_buf_ptr == NULL) + return NULL; /* new NULL return on OOM */ + + png_ptr->jmp_buf_size = jmp_buf_size; + } + } + + else /* Already allocated: check the size */ + { + size_t size = png_ptr->jmp_buf_size; + + if (size == 0) + { + size = (sizeof png_ptr->jmp_buf_local); + if (png_ptr->jmp_buf_ptr != &png_ptr->jmp_buf_local) + { + /* This is an internal error in libpng: somehow we have been left + * with a stack allocated jmp_buf when the application regained + * control. It's always possible to fix this up, but for the moment + * this is a png_error because that makes it easy to detect. + */ + png_error(png_ptr, "Libpng jmp_buf still allocated"); + /* png_ptr->jmp_buf_ptr = &png_ptr->jmp_buf_local; */ + } + } + + if (size != jmp_buf_size) + { + png_warning(png_ptr, "Application jmp_buf size changed"); + return NULL; /* caller will probably crash: no choice here */ + } + } + + /* Finally fill in the function, now we have a satisfactory buffer. It is + * valid to change the function on every call. + */ + png_ptr->longjmp_fn = longjmp_fn; + return png_ptr->jmp_buf_ptr; +} + +void /* PRIVATE */ +png_free_jmpbuf(png_structrp png_ptr) +{ + if (png_ptr != NULL) + { + jmp_buf *jb = png_ptr->jmp_buf_ptr; + + /* A size of 0 is used to indicate a local, stack, allocation of the + * pointer; used here and in png.c + */ + if (jb != NULL && png_ptr->jmp_buf_size > 0) + { + + /* This stuff is so that a failure to free the error control structure + * does not leave libpng in a state with no valid error handling: the + * free always succeeds, if there is an error it gets ignored. + */ + if (jb != &png_ptr->jmp_buf_local) + { + /* Make an internal, libpng, jmp_buf to return here */ + jmp_buf free_jmp_buf; + + if (!setjmp(free_jmp_buf)) + { + png_ptr->jmp_buf_ptr = &free_jmp_buf; /* come back here */ + png_ptr->jmp_buf_size = 0; /* stack allocation */ + png_ptr->longjmp_fn = longjmp; + png_free(png_ptr, jb); /* Return to setjmp on error */ + } + } + } + + /* *Always* cancel everything out: */ + png_ptr->jmp_buf_size = 0; + png_ptr->jmp_buf_ptr = NULL; + png_ptr->longjmp_fn = 0; + } +} +#endif + +/* This is the default error handling function. Note that replacements for + * this function MUST NOT RETURN, or the program will likely crash. This + * function is used by default, or if the program supplies NULL for the + * error function pointer in png_set_error_fn(). + */ +static PNG_FUNCTION(void /* PRIVATE */, +png_default_error,(png_const_structrp png_ptr, png_const_charp error_message), + PNG_NORETURN) +{ +#ifdef PNG_CONSOLE_IO_SUPPORTED +#ifdef PNG_ERROR_NUMBERS_SUPPORTED + /* Check on NULL only added in 1.5.4 */ + if (error_message != NULL && *error_message == PNG_LITERAL_SHARP) + { + /* Strip "#nnnn " from beginning of error message. */ + int offset; + char error_number[16]; + for (offset = 0; offset<15; offset++) + { + error_number[offset] = error_message[offset + 1]; + if (error_message[offset] == ' ') + break; + } + + if ((offset > 1) && (offset < 15)) + { + error_number[offset - 1] = '\0'; + fprintf(stderr, "libpng error no. %s: %s", + error_number, error_message + offset + 1); + fprintf(stderr, PNG_STRING_NEWLINE); + } + + else + { + fprintf(stderr, "libpng error: %s, offset=%d", + error_message, offset); + fprintf(stderr, PNG_STRING_NEWLINE); + } + } + else +#endif + { + fprintf(stderr, "libpng error: %s", error_message ? error_message : + "undefined"); + fprintf(stderr, PNG_STRING_NEWLINE); + } +#else + PNG_UNUSED(error_message) /* Make compiler happy */ +#endif + png_longjmp(png_ptr, 1); +} + +PNG_FUNCTION(void,PNGAPI +png_longjmp,(png_const_structrp png_ptr, int val),PNG_NORETURN) +{ +#ifdef PNG_SETJMP_SUPPORTED + if (png_ptr != NULL && png_ptr->longjmp_fn != NULL && + png_ptr->jmp_buf_ptr != NULL) + png_ptr->longjmp_fn(*png_ptr->jmp_buf_ptr, val); +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(val) +#endif + + /* If control reaches this point, png_longjmp() must not return. The only + * choice is to terminate the whole process (or maybe the thread); to do + * this the ANSI-C abort() function is used unless a different method is + * implemented by overriding the default configuration setting for + * PNG_ABORT(). + */ + PNG_ABORT(); +} + +#ifdef PNG_WARNINGS_SUPPORTED +/* This function is called when there is a warning, but the library thinks + * it can continue anyway. Replacement functions don't have to do anything + * here if you don't want them to. In the default configuration, png_ptr is + * not used, but it is passed in case it may be useful. + */ +static void /* PRIVATE */ +png_default_warning(png_const_structrp png_ptr, png_const_charp warning_message) +{ +#ifdef PNG_CONSOLE_IO_SUPPORTED +# ifdef PNG_ERROR_NUMBERS_SUPPORTED + if (*warning_message == PNG_LITERAL_SHARP) + { + int offset; + char warning_number[16]; + for (offset = 0; offset < 15; offset++) + { + warning_number[offset] = warning_message[offset + 1]; + if (warning_message[offset] == ' ') + break; + } + + if ((offset > 1) && (offset < 15)) + { + warning_number[offset + 1] = '\0'; + fprintf(stderr, "libpng warning no. %s: %s", + warning_number, warning_message + offset); + fprintf(stderr, PNG_STRING_NEWLINE); + } + + else + { + fprintf(stderr, "libpng warning: %s", + warning_message); + fprintf(stderr, PNG_STRING_NEWLINE); + } + } + else +# endif + + { + fprintf(stderr, "libpng warning: %s", warning_message); + fprintf(stderr, PNG_STRING_NEWLINE); + } +#else + PNG_UNUSED(warning_message) /* Make compiler happy */ +#endif + PNG_UNUSED(png_ptr) /* Make compiler happy */ +} +#endif /* WARNINGS */ + +/* This function is called when the application wants to use another method + * of handling errors and warnings. Note that the error function MUST NOT + * return to the calling routine or serious problems will occur. The return + * method used in the default routine calls longjmp(png_ptr->jmp_buf_ptr, 1) + */ +void PNGAPI +png_set_error_fn(png_structrp png_ptr, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warning_fn) +{ + if (png_ptr == NULL) + return; + + png_ptr->error_ptr = error_ptr; + png_ptr->error_fn = error_fn; +#ifdef PNG_WARNINGS_SUPPORTED + png_ptr->warning_fn = warning_fn; +#else + PNG_UNUSED(warning_fn) +#endif +} + + +/* This function returns a pointer to the error_ptr associated with the user + * functions. The application should free any memory associated with this + * pointer before png_write_destroy and png_read_destroy are called. + */ +png_voidp PNGAPI +png_get_error_ptr(png_const_structrp png_ptr) +{ + if (png_ptr == NULL) + return NULL; + + return (png_voidp)png_ptr->error_ptr; +} + + +#ifdef PNG_ERROR_NUMBERS_SUPPORTED +void PNGAPI +png_set_strip_error_numbers(png_structrp png_ptr, png_uint_32 strip_mode) +{ + if (png_ptr != NULL) + { + png_ptr->flags &= + ((~(PNG_FLAG_STRIP_ERROR_NUMBERS | + PNG_FLAG_STRIP_ERROR_TEXT))&strip_mode); + } +} +#endif + +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) ||\ + defined(PNG_SIMPLIFIED_WRITE_SUPPORTED) + /* Currently the above both depend on SETJMP_SUPPORTED, however it would be + * possible to implement without setjmp support just so long as there is some + * way to handle the error return here: + */ +PNG_FUNCTION(void /* PRIVATE */, (PNGCBAPI +png_safe_error),(png_structp png_nonconst_ptr, png_const_charp error_message), + PNG_NORETURN) +{ + png_const_structrp png_ptr = png_nonconst_ptr; + png_imagep image = png_voidcast(png_imagep, png_ptr->error_ptr); + + /* An error is always logged here, overwriting anything (typically a warning) + * that is already there: + */ + if (image != NULL) + { + png_safecat(image->message, (sizeof image->message), 0, error_message); + image->warning_or_error |= PNG_IMAGE_ERROR; + + /* Retrieve the jmp_buf from within the png_control, making this work for + * C++ compilation too is pretty tricky: C++ wants a pointer to the first + * element of a jmp_buf, but C doesn't tell us the type of that. + */ + if (image->opaque != NULL && image->opaque->error_buf != NULL) + longjmp(png_control_jmp_buf(image->opaque), 1); + + /* Missing longjmp buffer, the following is to help debugging: */ + { + size_t pos = png_safecat(image->message, (sizeof image->message), 0, + "bad longjmp: "); + png_safecat(image->message, (sizeof image->message), pos, + error_message); + } + } + + /* Here on an internal programming error. */ + abort(); +} + +#ifdef PNG_WARNINGS_SUPPORTED +void /* PRIVATE */ PNGCBAPI +png_safe_warning(png_structp png_nonconst_ptr, png_const_charp warning_message) +{ + png_const_structrp png_ptr = png_nonconst_ptr; + png_imagep image = png_voidcast(png_imagep, png_ptr->error_ptr); + + /* A warning is only logged if there is no prior warning or error. */ + if (image->warning_or_error == 0) + { + png_safecat(image->message, (sizeof image->message), 0, warning_message); + image->warning_or_error |= PNG_IMAGE_WARNING; + } +} +#endif + +int /* PRIVATE */ +png_safe_execute(png_imagep image, int (*function)(png_voidp), png_voidp arg) +{ + const png_voidp saved_error_buf = image->opaque->error_buf; + jmp_buf safe_jmpbuf; + + /* Safely execute function(arg), with png_error returning back here. */ + if (setjmp(safe_jmpbuf) == 0) + { + int result; + + image->opaque->error_buf = safe_jmpbuf; + result = function(arg); + image->opaque->error_buf = saved_error_buf; + + if (result) + return 1; /* success */ + } + + /* The function failed either because of a caught png_error and a regular + * return of false above or because of an uncaught png_error from the + * function itself. Ensure that the error_buf is always set back to the + * value saved above: + */ + image->opaque->error_buf = saved_error_buf; + + /* On the final false return, when about to return control to the caller, the + * image is freed (png_image_free does this check but it is duplicated here + * for clarity: + */ + if (saved_error_buf == NULL) + png_image_free(image); + + return 0; /* failure */ +} +#endif /* SIMPLIFIED READ || SIMPLIFIED_WRITE */ +#endif /* READ || WRITE */ diff --git a/widget/milsko/milskosrc/external/libpng/src/pngget.c b/widget/milsko/milskosrc/external/libpng/src/pngget.c new file mode 100644 index 0000000000..1ebb1144ff --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/src/pngget.c @@ -0,0 +1,1370 @@ +/* pngget.c - retrieval of values from info struct + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + */ + +#include "pngpriv.h" + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + +png_uint_32 PNGAPI +png_get_valid(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_uint_32 flag) +{ + if (png_ptr != NULL && info_ptr != NULL) + { +#ifdef PNG_READ_tRNS_SUPPORTED + /* png_handle_PLTE() may have canceled a valid tRNS chunk but left the + * 'valid' flag for the detection of duplicate chunks. Do not report a + * valid tRNS chunk in this case. + */ + if (flag == PNG_INFO_tRNS && png_ptr->num_trans == 0) + return 0; +#endif + + return info_ptr->valid & flag; + } + + return 0; +} + +size_t PNGAPI +png_get_rowbytes(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->rowbytes; + + return 0; +} + +#ifdef PNG_INFO_IMAGE_SUPPORTED +png_bytepp PNGAPI +png_get_rows(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->row_pointers; + + return 0; +} +#endif + +#ifdef PNG_EASY_ACCESS_SUPPORTED +/* Easy access to info, added in libpng-0.99 */ +png_uint_32 PNGAPI +png_get_image_width(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->width; + + return 0; +} + +png_uint_32 PNGAPI +png_get_image_height(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->height; + + return 0; +} + +png_byte PNGAPI +png_get_bit_depth(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->bit_depth; + + return 0; +} + +png_byte PNGAPI +png_get_color_type(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->color_type; + + return 0; +} + +png_byte PNGAPI +png_get_filter_type(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->filter_type; + + return 0; +} + +png_byte PNGAPI +png_get_interlace_type(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->interlace_type; + + return 0; +} + +png_byte PNGAPI +png_get_compression_type(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->compression_type; + + return 0; +} + +png_uint_32 PNGAPI +png_get_x_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp + info_ptr) +{ +#ifdef PNG_pHYs_SUPPORTED + png_debug(1, "in png_get_x_pixels_per_meter"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_pHYs) != 0) + { + if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER) + return info_ptr->x_pixels_per_unit; + } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) +#endif + + return 0; +} + +png_uint_32 PNGAPI +png_get_y_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp + info_ptr) +{ +#ifdef PNG_pHYs_SUPPORTED + png_debug(1, "in png_get_y_pixels_per_meter"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_pHYs) != 0) + { + if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER) + return info_ptr->y_pixels_per_unit; + } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) +#endif + + return 0; +} + +png_uint_32 PNGAPI +png_get_pixels_per_meter(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ +#ifdef PNG_pHYs_SUPPORTED + png_debug(1, "in png_get_pixels_per_meter"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_pHYs) != 0) + { + if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER && + info_ptr->x_pixels_per_unit == info_ptr->y_pixels_per_unit) + return info_ptr->x_pixels_per_unit; + } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) +#endif + + return 0; +} + +#ifdef PNG_FLOATING_POINT_SUPPORTED +float PNGAPI +png_get_pixel_aspect_ratio(png_const_structrp png_ptr, png_const_inforp + info_ptr) +{ +#ifdef PNG_READ_pHYs_SUPPORTED + png_debug(1, "in png_get_pixel_aspect_ratio"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_pHYs) != 0) + { + if (info_ptr->x_pixels_per_unit != 0) + return (float)info_ptr->y_pixels_per_unit + / (float)info_ptr->x_pixels_per_unit; + } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) +#endif + + return (float)0.0; +} +#endif + +#ifdef PNG_FIXED_POINT_SUPPORTED +png_fixed_point PNGAPI +png_get_pixel_aspect_ratio_fixed(png_const_structrp png_ptr, + png_const_inforp info_ptr) +{ +#ifdef PNG_READ_pHYs_SUPPORTED + png_debug(1, "in png_get_pixel_aspect_ratio_fixed"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_pHYs) != 0 && + info_ptr->x_pixels_per_unit > 0 && info_ptr->y_pixels_per_unit > 0 && + info_ptr->x_pixels_per_unit <= PNG_UINT_31_MAX && + info_ptr->y_pixels_per_unit <= PNG_UINT_31_MAX) + { + png_fixed_point res; + + /* The following casts work because a PNG 4 byte integer only has a valid + * range of 0..2^31-1; otherwise the cast might overflow. + */ + if (png_muldiv(&res, (png_int_32)info_ptr->y_pixels_per_unit, PNG_FP_1, + (png_int_32)info_ptr->x_pixels_per_unit) != 0) + return res; + } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) +#endif + + return 0; +} +#endif + +png_int_32 PNGAPI +png_get_x_offset_microns(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ +#ifdef PNG_oFFs_SUPPORTED + png_debug(1, "in png_get_x_offset_microns"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_oFFs) != 0) + { + if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER) + return info_ptr->x_offset; + } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) +#endif + + return 0; +} + +png_int_32 PNGAPI +png_get_y_offset_microns(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ +#ifdef PNG_oFFs_SUPPORTED + png_debug(1, "in png_get_y_offset_microns"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_oFFs) != 0) + { + if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER) + return info_ptr->y_offset; + } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) +#endif + + return 0; +} + +png_int_32 PNGAPI +png_get_x_offset_pixels(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ +#ifdef PNG_oFFs_SUPPORTED + png_debug(1, "in png_get_x_offset_pixels"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_oFFs) != 0) + { + if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL) + return info_ptr->x_offset; + } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) +#endif + + return 0; +} + +png_int_32 PNGAPI +png_get_y_offset_pixels(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ +#ifdef PNG_oFFs_SUPPORTED + png_debug(1, "in png_get_y_offset_pixels"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_oFFs) != 0) + { + if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL) + return info_ptr->y_offset; + } +#else + PNG_UNUSED(png_ptr) + PNG_UNUSED(info_ptr) +#endif + + return 0; +} + +#ifdef PNG_INCH_CONVERSIONS_SUPPORTED +static png_uint_32 +ppi_from_ppm(png_uint_32 ppm) +{ +#if 0 + /* The conversion is *(2.54/100), in binary (32 digits): + * .00000110100000001001110101001001 + */ + png_uint_32 t1001, t1101; + ppm >>= 1; /* .1 */ + t1001 = ppm + (ppm >> 3); /* .1001 */ + t1101 = t1001 + (ppm >> 1); /* .1101 */ + ppm >>= 20; /* .000000000000000000001 */ + t1101 += t1101 >> 15; /* .1101000000000001101 */ + t1001 >>= 11; /* .000000000001001 */ + t1001 += t1001 >> 12; /* .000000000001001000000001001 */ + ppm += t1001; /* .000000000001001000001001001 */ + ppm += t1101; /* .110100000001001110101001001 */ + return (ppm + 16) >> 5;/* .00000110100000001001110101001001 */ +#else + /* The argument is a PNG unsigned integer, so it is not permitted + * to be bigger than 2^31. + */ + png_fixed_point result; + if (ppm <= PNG_UINT_31_MAX && png_muldiv(&result, (png_int_32)ppm, 127, + 5000) != 0) + return (png_uint_32)result; + + /* Overflow. */ + return 0; +#endif +} + +png_uint_32 PNGAPI +png_get_pixels_per_inch(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + return ppi_from_ppm(png_get_pixels_per_meter(png_ptr, info_ptr)); +} + +png_uint_32 PNGAPI +png_get_x_pixels_per_inch(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + return ppi_from_ppm(png_get_x_pixels_per_meter(png_ptr, info_ptr)); +} + +png_uint_32 PNGAPI +png_get_y_pixels_per_inch(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + return ppi_from_ppm(png_get_y_pixels_per_meter(png_ptr, info_ptr)); +} + +#ifdef PNG_FIXED_POINT_SUPPORTED +static png_fixed_point +png_fixed_inches_from_microns(png_const_structrp png_ptr, png_int_32 microns) +{ + /* Convert from meters * 1,000,000 to inches * 100,000, meters to + * inches is simply *(100/2.54), so we want *(10/2.54) == 500/127. + * Notice that this can overflow - a warning is output and 0 is + * returned. + */ + png_fixed_point result; + + if (png_muldiv(&result, microns, 500, 127) != 0) + return result; + + png_warning(png_ptr, "fixed point overflow ignored"); + return 0; +} + +png_fixed_point PNGAPI +png_get_x_offset_inches_fixed(png_const_structrp png_ptr, + png_const_inforp info_ptr) +{ + return png_fixed_inches_from_microns(png_ptr, + png_get_x_offset_microns(png_ptr, info_ptr)); +} +#endif /* FIXED_POINT */ + +#ifdef PNG_FIXED_POINT_SUPPORTED +png_fixed_point PNGAPI +png_get_y_offset_inches_fixed(png_const_structrp png_ptr, + png_const_inforp info_ptr) +{ + return png_fixed_inches_from_microns(png_ptr, + png_get_y_offset_microns(png_ptr, info_ptr)); +} +#endif + +#ifdef PNG_FLOATING_POINT_SUPPORTED +float PNGAPI +png_get_x_offset_inches(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + /* To avoid the overflow do the conversion directly in floating + * point. + */ + return (float)(png_get_x_offset_microns(png_ptr, info_ptr) * .00003937); +} +#endif + +#ifdef PNG_FLOATING_POINT_SUPPORTED +float PNGAPI +png_get_y_offset_inches(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + /* To avoid the overflow do the conversion directly in floating + * point. + */ + return (float)(png_get_y_offset_microns(png_ptr, info_ptr) * .00003937); +} +#endif + +#ifdef PNG_pHYs_SUPPORTED +png_uint_32 PNGAPI +png_get_pHYs_dpi(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) +{ + png_uint_32 retval = 0; + + png_debug1(1, "in %s retrieval function", "pHYs"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_pHYs) != 0) + { + if (res_x != NULL) + { + *res_x = info_ptr->x_pixels_per_unit; + retval |= PNG_INFO_pHYs; + } + + if (res_y != NULL) + { + *res_y = info_ptr->y_pixels_per_unit; + retval |= PNG_INFO_pHYs; + } + + if (unit_type != NULL) + { + *unit_type = (int)info_ptr->phys_unit_type; + retval |= PNG_INFO_pHYs; + + if (*unit_type == 1) + { + if (res_x != NULL) *res_x = (png_uint_32)(*res_x * .0254 + .50); + if (res_y != NULL) *res_y = (png_uint_32)(*res_y * .0254 + .50); + } + } + } + + return retval; +} +#endif /* pHYs */ +#endif /* INCH_CONVERSIONS */ + +/* png_get_channels really belongs in here, too, but it's been around longer */ + +#endif /* EASY_ACCESS */ + + +png_byte PNGAPI +png_get_channels(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->channels; + + return 0; +} + +#ifdef PNG_READ_SUPPORTED +png_const_bytep PNGAPI +png_get_signature(png_const_structrp png_ptr, png_const_inforp info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return info_ptr->signature; + + return NULL; +} +#endif + +#ifdef PNG_bKGD_SUPPORTED +png_uint_32 PNGAPI +png_get_bKGD(png_const_structrp png_ptr, png_inforp info_ptr, + png_color_16p *background) +{ + png_debug1(1, "in %s retrieval function", "bKGD"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_bKGD) != 0 && + background != NULL) + { + *background = &(info_ptr->background); + return PNG_INFO_bKGD; + } + + return 0; +} +#endif + +#ifdef PNG_cHRM_SUPPORTED +/* The XYZ APIs were added in 1.5.5 to take advantage of the code added at the + * same time to correct the rgb grayscale coefficient defaults obtained from the + * cHRM chunk in 1.5.4 + */ +# ifdef PNG_FLOATING_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_cHRM(png_const_structrp png_ptr, png_const_inforp info_ptr, + double *whitex, double *whitey, double *redx, double *redy, + double *greenx, double *greeny, double *bluex, double *bluey) +{ + png_debug1(1, "in %s retrieval function", "cHRM"); + + /* PNGv3: this just returns the values store from the cHRM, if any. */ + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_cHRM) != 0) + { + if (whitex != NULL) + *whitex = png_float(png_ptr, info_ptr->cHRM.whitex, "cHRM wx"); + if (whitey != NULL) + *whitey = png_float(png_ptr, info_ptr->cHRM.whitey, "cHRM wy"); + if (redx != NULL) + *redx = png_float(png_ptr, info_ptr->cHRM.redx, "cHRM rx"); + if (redy != NULL) + *redy = png_float(png_ptr, info_ptr->cHRM.redy, "cHRM ry"); + if (greenx != NULL) + *greenx = png_float(png_ptr, info_ptr->cHRM.greenx, "cHRM gx"); + if (greeny != NULL) + *greeny = png_float(png_ptr, info_ptr->cHRM.greeny, "cHRM gy"); + if (bluex != NULL) + *bluex = png_float(png_ptr, info_ptr->cHRM.bluex, "cHRM bx"); + if (bluey != NULL) + *bluey = png_float(png_ptr, info_ptr->cHRM.bluey, "cHRM by"); + return PNG_INFO_cHRM; + } + + return 0; +} + +png_uint_32 PNGAPI +png_get_cHRM_XYZ(png_const_structrp png_ptr, png_const_inforp info_ptr, + double *red_X, double *red_Y, double *red_Z, double *green_X, + double *green_Y, double *green_Z, double *blue_X, double *blue_Y, + double *blue_Z) +{ + png_XYZ XYZ; + png_debug1(1, "in %s retrieval function", "cHRM_XYZ(float)"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_cHRM) != 0 && + png_XYZ_from_xy(&XYZ, &info_ptr->cHRM) == 0) + { + if (red_X != NULL) + *red_X = png_float(png_ptr, XYZ.red_X, "cHRM red X"); + if (red_Y != NULL) + *red_Y = png_float(png_ptr, XYZ.red_Y, "cHRM red Y"); + if (red_Z != NULL) + *red_Z = png_float(png_ptr, XYZ.red_Z, "cHRM red Z"); + if (green_X != NULL) + *green_X = png_float(png_ptr, XYZ.green_X, "cHRM green X"); + if (green_Y != NULL) + *green_Y = png_float(png_ptr, XYZ.green_Y, "cHRM green Y"); + if (green_Z != NULL) + *green_Z = png_float(png_ptr, XYZ.green_Z, "cHRM green Z"); + if (blue_X != NULL) + *blue_X = png_float(png_ptr, XYZ.blue_X, "cHRM blue X"); + if (blue_Y != NULL) + *blue_Y = png_float(png_ptr, XYZ.blue_Y, "cHRM blue Y"); + if (blue_Z != NULL) + *blue_Z = png_float(png_ptr, XYZ.blue_Z, "cHRM blue Z"); + return PNG_INFO_cHRM; + } + + return 0; +} +# endif + +# ifdef PNG_FIXED_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_cHRM_XYZ_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *int_red_X, png_fixed_point *int_red_Y, + png_fixed_point *int_red_Z, png_fixed_point *int_green_X, + png_fixed_point *int_green_Y, png_fixed_point *int_green_Z, + png_fixed_point *int_blue_X, png_fixed_point *int_blue_Y, + png_fixed_point *int_blue_Z) +{ + png_XYZ XYZ; + png_debug1(1, "in %s retrieval function", "cHRM_XYZ"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_cHRM) != 0U && + png_XYZ_from_xy(&XYZ, &info_ptr->cHRM) == 0) + { + if (int_red_X != NULL) *int_red_X = XYZ.red_X; + if (int_red_Y != NULL) *int_red_Y = XYZ.red_Y; + if (int_red_Z != NULL) *int_red_Z = XYZ.red_Z; + if (int_green_X != NULL) *int_green_X = XYZ.green_X; + if (int_green_Y != NULL) *int_green_Y = XYZ.green_Y; + if (int_green_Z != NULL) *int_green_Z = XYZ.green_Z; + if (int_blue_X != NULL) *int_blue_X = XYZ.blue_X; + if (int_blue_Y != NULL) *int_blue_Y = XYZ.blue_Y; + if (int_blue_Z != NULL) *int_blue_Z = XYZ.blue_Z; + return PNG_INFO_cHRM; + } + + return 0; +} + +png_uint_32 PNGAPI +png_get_cHRM_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *whitex, png_fixed_point *whitey, png_fixed_point *redx, + png_fixed_point *redy, png_fixed_point *greenx, png_fixed_point *greeny, + png_fixed_point *bluex, png_fixed_point *bluey) +{ + png_debug1(1, "in %s retrieval function", "cHRM"); + + /* PNGv3: this just returns the values store from the cHRM, if any. */ + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_cHRM) != 0) + { + if (whitex != NULL) *whitex = info_ptr->cHRM.whitex; + if (whitey != NULL) *whitey = info_ptr->cHRM.whitey; + if (redx != NULL) *redx = info_ptr->cHRM.redx; + if (redy != NULL) *redy = info_ptr->cHRM.redy; + if (greenx != NULL) *greenx = info_ptr->cHRM.greenx; + if (greeny != NULL) *greeny = info_ptr->cHRM.greeny; + if (bluex != NULL) *bluex = info_ptr->cHRM.bluex; + if (bluey != NULL) *bluey = info_ptr->cHRM.bluey; + return PNG_INFO_cHRM; + } + + return 0; +} +# endif +#endif + +#ifdef PNG_gAMA_SUPPORTED +# ifdef PNG_FIXED_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_gAMA_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *file_gamma) +{ + png_debug1(1, "in %s retrieval function", "gAMA"); + + /* PNGv3 compatibility: only report gAMA if it is really present. */ + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_gAMA) != 0) + { + if (file_gamma != NULL) *file_gamma = info_ptr->gamma; + return PNG_INFO_gAMA; + } + + return 0; +} +# endif + +# ifdef PNG_FLOATING_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_gAMA(png_const_structrp png_ptr, png_const_inforp info_ptr, + double *file_gamma) +{ + png_debug1(1, "in %s retrieval function", "gAMA(float)"); + + /* PNGv3 compatibility: only report gAMA if it is really present. */ + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_gAMA) != 0) + { + if (file_gamma != NULL) + *file_gamma = png_float(png_ptr, info_ptr->gamma, "gAMA"); + + return PNG_INFO_gAMA; + } + + return 0; +} +# endif +#endif + +#ifdef PNG_sRGB_SUPPORTED +png_uint_32 PNGAPI +png_get_sRGB(png_const_structrp png_ptr, png_const_inforp info_ptr, + int *file_srgb_intent) +{ + png_debug1(1, "in %s retrieval function", "sRGB"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_sRGB) != 0) + { + if (file_srgb_intent != NULL) + *file_srgb_intent = info_ptr->rendering_intent; + return PNG_INFO_sRGB; + } + + return 0; +} +#endif + +#ifdef PNG_iCCP_SUPPORTED +png_uint_32 PNGAPI +png_get_iCCP(png_const_structrp png_ptr, png_inforp info_ptr, + png_charpp name, int *compression_type, + png_bytepp profile, png_uint_32 *proflen) +{ + png_debug1(1, "in %s retrieval function", "iCCP"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_iCCP) != 0 && + name != NULL && profile != NULL && proflen != NULL) + { + *name = info_ptr->iccp_name; + *profile = info_ptr->iccp_profile; + *proflen = png_get_uint_32(info_ptr->iccp_profile); + /* This is somewhat irrelevant since the profile data returned has + * actually been uncompressed. + */ + if (compression_type != NULL) + *compression_type = PNG_COMPRESSION_TYPE_BASE; + return PNG_INFO_iCCP; + } + + return 0; + +} +#endif + +#ifdef PNG_sPLT_SUPPORTED +int PNGAPI +png_get_sPLT(png_const_structrp png_ptr, png_inforp info_ptr, + png_sPLT_tpp spalettes) +{ + png_debug1(1, "in %s retrieval function", "sPLT"); + + if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL) + { + *spalettes = info_ptr->splt_palettes; + return info_ptr->splt_palettes_num; + } + + return 0; +} +#endif + +#ifdef PNG_cICP_SUPPORTED +png_uint_32 PNGAPI +png_get_cICP(png_const_structrp png_ptr, + png_const_inforp info_ptr, png_bytep colour_primaries, + png_bytep transfer_function, png_bytep matrix_coefficients, + png_bytep video_full_range_flag) +{ + png_debug1(1, "in %s retrieval function", "cICP"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_cICP) != 0 && + colour_primaries != NULL && transfer_function != NULL && + matrix_coefficients != NULL && video_full_range_flag != NULL) + { + *colour_primaries = info_ptr->cicp_colour_primaries; + *transfer_function = info_ptr->cicp_transfer_function; + *matrix_coefficients = info_ptr->cicp_matrix_coefficients; + *video_full_range_flag = info_ptr->cicp_video_full_range_flag; + return (PNG_INFO_cICP); + } + + return 0; +} +#endif + +#ifdef PNG_cLLI_SUPPORTED +# ifdef PNG_FIXED_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_cLLI_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_uint_32p maxCLL, + png_uint_32p maxFALL) +{ + png_debug1(1, "in %s retrieval function", "cLLI"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_cLLI) != 0) + { + if (maxCLL != NULL) *maxCLL = info_ptr->maxCLL; + if (maxFALL != NULL) *maxFALL = info_ptr->maxFALL; + return PNG_INFO_cLLI; + } + + return 0; +} +# endif + +# ifdef PNG_FLOATING_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_cLLI(png_const_structrp png_ptr, png_const_inforp info_ptr, + double *maxCLL, double *maxFALL) +{ + png_debug1(1, "in %s retrieval function", "cLLI(float)"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_cLLI) != 0) + { + if (maxCLL != NULL) *maxCLL = info_ptr->maxCLL * .0001; + if (maxFALL != NULL) *maxFALL = info_ptr->maxFALL * .0001; + return PNG_INFO_cLLI; + } + + return 0; +} +# endif +#endif /* cLLI */ + +#ifdef PNG_mDCV_SUPPORTED +# ifdef PNG_FIXED_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_mDCV_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_fixed_point *white_x, png_fixed_point *white_y, + png_fixed_point *red_x, png_fixed_point *red_y, + png_fixed_point *green_x, png_fixed_point *green_y, + png_fixed_point *blue_x, png_fixed_point *blue_y, + png_uint_32p mastering_maxDL, png_uint_32p mastering_minDL) +{ + png_debug1(1, "in %s retrieval function", "mDCV"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_mDCV) != 0) + { + if (white_x != NULL) *white_x = info_ptr->mastering_white_x * 2; + if (white_y != NULL) *white_y = info_ptr->mastering_white_y * 2; + if (red_x != NULL) *red_x = info_ptr->mastering_red_x * 2; + if (red_y != NULL) *red_y = info_ptr->mastering_red_y * 2; + if (green_x != NULL) *green_x = info_ptr->mastering_green_x * 2; + if (green_y != NULL) *green_y = info_ptr->mastering_green_y * 2; + if (blue_x != NULL) *blue_x = info_ptr->mastering_blue_x * 2; + if (blue_y != NULL) *blue_y = info_ptr->mastering_blue_y * 2; + if (mastering_maxDL != NULL) *mastering_maxDL = info_ptr->mastering_maxDL; + if (mastering_minDL != NULL) *mastering_minDL = info_ptr->mastering_minDL; + return PNG_INFO_mDCV; + } + + return 0; +} +# endif + +# ifdef PNG_FLOATING_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_mDCV(png_const_structrp png_ptr, png_const_inforp info_ptr, + double *white_x, double *white_y, double *red_x, double *red_y, + double *green_x, double *green_y, double *blue_x, double *blue_y, + double *mastering_maxDL, double *mastering_minDL) +{ + png_debug1(1, "in %s retrieval function", "mDCV(float)"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_mDCV) != 0) + { + if (white_x != NULL) *white_x = info_ptr->mastering_white_x * .00002; + if (white_y != NULL) *white_y = info_ptr->mastering_white_y * .00002; + if (red_x != NULL) *red_x = info_ptr->mastering_red_x * .00002; + if (red_y != NULL) *red_y = info_ptr->mastering_red_y * .00002; + if (green_x != NULL) *green_x = info_ptr->mastering_green_x * .00002; + if (green_y != NULL) *green_y = info_ptr->mastering_green_y * .00002; + if (blue_x != NULL) *blue_x = info_ptr->mastering_blue_x * .00002; + if (blue_y != NULL) *blue_y = info_ptr->mastering_blue_y * .00002; + if (mastering_maxDL != NULL) + *mastering_maxDL = info_ptr->mastering_maxDL * .0001; + if (mastering_minDL != NULL) + *mastering_minDL = info_ptr->mastering_minDL * .0001; + return PNG_INFO_mDCV; + } + + return 0; +} +# endif /* FLOATING_POINT */ +#endif /* mDCV */ + +#ifdef PNG_eXIf_SUPPORTED +png_uint_32 PNGAPI +png_get_eXIf(png_const_structrp png_ptr, png_inforp info_ptr, + png_bytep *exif) +{ + png_warning(png_ptr, "png_get_eXIf does not work; use png_get_eXIf_1"); + PNG_UNUSED(info_ptr) + PNG_UNUSED(exif) + return 0; +} + +png_uint_32 PNGAPI +png_get_eXIf_1(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_uint_32 *num_exif, png_bytep *exif) +{ + png_debug1(1, "in %s retrieval function", "eXIf"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_eXIf) != 0 && exif != NULL) + { + *num_exif = info_ptr->num_exif; + *exif = info_ptr->exif; + return PNG_INFO_eXIf; + } + + return 0; +} +#endif + +#ifdef PNG_hIST_SUPPORTED +png_uint_32 PNGAPI +png_get_hIST(png_const_structrp png_ptr, png_inforp info_ptr, + png_uint_16p *hist) +{ + png_debug1(1, "in %s retrieval function", "hIST"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_hIST) != 0 && hist != NULL) + { + *hist = info_ptr->hist; + return PNG_INFO_hIST; + } + + return 0; +} +#endif + +png_uint_32 PNGAPI +png_get_IHDR(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_uint_32 *width, png_uint_32 *height, int *bit_depth, + int *color_type, int *interlace_type, int *compression_type, + int *filter_type) +{ + png_debug1(1, "in %s retrieval function", "IHDR"); + + if (png_ptr == NULL || info_ptr == NULL) + return 0; + + if (width != NULL) + *width = info_ptr->width; + + if (height != NULL) + *height = info_ptr->height; + + if (bit_depth != NULL) + *bit_depth = info_ptr->bit_depth; + + if (color_type != NULL) + *color_type = info_ptr->color_type; + + if (compression_type != NULL) + *compression_type = info_ptr->compression_type; + + if (filter_type != NULL) + *filter_type = info_ptr->filter_type; + + if (interlace_type != NULL) + *interlace_type = info_ptr->interlace_type; + + /* This is redundant if we can be sure that the info_ptr values were all + * assigned in png_set_IHDR(). We do the check anyhow in case an + * application has ignored our advice not to mess with the members + * of info_ptr directly. + */ + png_check_IHDR(png_ptr, info_ptr->width, info_ptr->height, + info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type, + info_ptr->compression_type, info_ptr->filter_type); + + return 1; +} + +#ifdef PNG_oFFs_SUPPORTED +png_uint_32 PNGAPI +png_get_oFFs(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type) +{ + png_debug1(1, "in %s retrieval function", "oFFs"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_oFFs) != 0 && + offset_x != NULL && offset_y != NULL && unit_type != NULL) + { + *offset_x = info_ptr->x_offset; + *offset_y = info_ptr->y_offset; + *unit_type = (int)info_ptr->offset_unit_type; + return PNG_INFO_oFFs; + } + + return 0; +} +#endif + +#ifdef PNG_pCAL_SUPPORTED +png_uint_32 PNGAPI +png_get_pCAL(png_const_structrp png_ptr, png_inforp info_ptr, + png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams, + png_charp *units, png_charpp *params) +{ + png_debug1(1, "in %s retrieval function", "pCAL"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_pCAL) != 0 && + purpose != NULL && X0 != NULL && X1 != NULL && type != NULL && + nparams != NULL && units != NULL && params != NULL) + { + *purpose = info_ptr->pcal_purpose; + *X0 = info_ptr->pcal_X0; + *X1 = info_ptr->pcal_X1; + *type = (int)info_ptr->pcal_type; + *nparams = (int)info_ptr->pcal_nparams; + *units = info_ptr->pcal_units; + *params = info_ptr->pcal_params; + return PNG_INFO_pCAL; + } + + return 0; +} +#endif + +#ifdef PNG_sCAL_SUPPORTED +# ifdef PNG_FIXED_POINT_SUPPORTED +# if defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) || \ + defined(PNG_FLOATING_POINT_SUPPORTED) +png_uint_32 PNGAPI +png_get_sCAL_fixed(png_const_structrp png_ptr, png_const_inforp info_ptr, + int *unit, png_fixed_point *width, png_fixed_point *height) +{ + png_debug1(1, "in %s retrieval function", "sCAL"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_sCAL) != 0) + { + *unit = info_ptr->scal_unit; + /*TODO: make this work without FP support; the API is currently eliminated + * if neither floating point APIs nor internal floating point arithmetic + * are enabled. + */ + *width = png_fixed(png_ptr, atof(info_ptr->scal_s_width), "sCAL width"); + *height = png_fixed(png_ptr, atof(info_ptr->scal_s_height), + "sCAL height"); + return PNG_INFO_sCAL; + } + + return 0; +} +# endif /* FLOATING_ARITHMETIC */ +# endif /* FIXED_POINT */ +# ifdef PNG_FLOATING_POINT_SUPPORTED +png_uint_32 PNGAPI +png_get_sCAL(png_const_structrp png_ptr, png_const_inforp info_ptr, + int *unit, double *width, double *height) +{ + png_debug1(1, "in %s retrieval function", "sCAL(float)"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_sCAL) != 0) + { + *unit = info_ptr->scal_unit; + *width = atof(info_ptr->scal_s_width); + *height = atof(info_ptr->scal_s_height); + return PNG_INFO_sCAL; + } + + return 0; +} +# endif /* FLOATING POINT */ +png_uint_32 PNGAPI +png_get_sCAL_s(png_const_structrp png_ptr, png_const_inforp info_ptr, + int *unit, png_charpp width, png_charpp height) +{ + png_debug1(1, "in %s retrieval function", "sCAL(str)"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_sCAL) != 0) + { + *unit = info_ptr->scal_unit; + *width = info_ptr->scal_s_width; + *height = info_ptr->scal_s_height; + return PNG_INFO_sCAL; + } + + return 0; +} +#endif /* sCAL */ + +#ifdef PNG_pHYs_SUPPORTED +png_uint_32 PNGAPI +png_get_pHYs(png_const_structrp png_ptr, png_const_inforp info_ptr, + png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type) +{ + png_uint_32 retval = 0; + + png_debug1(1, "in %s retrieval function", "pHYs"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_pHYs) != 0) + { + if (res_x != NULL) + { + *res_x = info_ptr->x_pixels_per_unit; + retval |= PNG_INFO_pHYs; + } + + if (res_y != NULL) + { + *res_y = info_ptr->y_pixels_per_unit; + retval |= PNG_INFO_pHYs; + } + + if (unit_type != NULL) + { + *unit_type = (int)info_ptr->phys_unit_type; + retval |= PNG_INFO_pHYs; + } + } + + return retval; +} +#endif /* pHYs */ + +png_uint_32 PNGAPI +png_get_PLTE(png_const_structrp png_ptr, png_inforp info_ptr, + png_colorp *palette, int *num_palette) +{ + png_debug1(1, "in %s retrieval function", "PLTE"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_PLTE) != 0 && palette != NULL) + { + *palette = info_ptr->palette; + *num_palette = info_ptr->num_palette; + png_debug1(3, "num_palette = %d", *num_palette); + return PNG_INFO_PLTE; + } + + return 0; +} + +#ifdef PNG_sBIT_SUPPORTED +png_uint_32 PNGAPI +png_get_sBIT(png_const_structrp png_ptr, png_inforp info_ptr, + png_color_8p *sig_bit) +{ + png_debug1(1, "in %s retrieval function", "sBIT"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_sBIT) != 0 && sig_bit != NULL) + { + *sig_bit = &(info_ptr->sig_bit); + return PNG_INFO_sBIT; + } + + return 0; +} +#endif + +#ifdef PNG_TEXT_SUPPORTED +int PNGAPI +png_get_text(png_const_structrp png_ptr, png_inforp info_ptr, + png_textp *text_ptr, int *num_text) +{ + if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0) + { + png_debug1(1, "in text retrieval function, chunk typeid = 0x%lx", + (unsigned long)png_ptr->chunk_name); + + if (text_ptr != NULL) + *text_ptr = info_ptr->text; + + if (num_text != NULL) + *num_text = info_ptr->num_text; + + return info_ptr->num_text; + } + + if (num_text != NULL) + *num_text = 0; + + return 0; +} +#endif + +#ifdef PNG_tIME_SUPPORTED +png_uint_32 PNGAPI +png_get_tIME(png_const_structrp png_ptr, png_inforp info_ptr, + png_timep *mod_time) +{ + png_debug1(1, "in %s retrieval function", "tIME"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_tIME) != 0 && mod_time != NULL) + { + *mod_time = &(info_ptr->mod_time); + return PNG_INFO_tIME; + } + + return 0; +} +#endif + +#ifdef PNG_tRNS_SUPPORTED +png_uint_32 PNGAPI +png_get_tRNS(png_const_structrp png_ptr, png_inforp info_ptr, + png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color) +{ + png_uint_32 retval = 0; + + png_debug1(1, "in %s retrieval function", "tRNS"); + + if (png_ptr != NULL && info_ptr != NULL && + (info_ptr->valid & PNG_INFO_tRNS) != 0) + { + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (trans_alpha != NULL) + { + *trans_alpha = info_ptr->trans_alpha; + retval |= PNG_INFO_tRNS; + } + + if (trans_color != NULL) + *trans_color = &(info_ptr->trans_color); + } + + else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */ + { + if (trans_color != NULL) + { + *trans_color = &(info_ptr->trans_color); + retval |= PNG_INFO_tRNS; + } + + if (trans_alpha != NULL) + *trans_alpha = NULL; + } + + if (num_trans != NULL) + { + *num_trans = info_ptr->num_trans; + retval |= PNG_INFO_tRNS; + } + } + + return retval; +} +#endif + +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +int PNGAPI +png_get_unknown_chunks(png_const_structrp png_ptr, png_inforp info_ptr, + png_unknown_chunkpp unknowns) +{ + if (png_ptr != NULL && info_ptr != NULL && unknowns != NULL) + { + *unknowns = info_ptr->unknown_chunks; + return info_ptr->unknown_chunks_num; + } + + return 0; +} +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +png_byte PNGAPI +png_get_rgb_to_gray_status(png_const_structrp png_ptr) +{ + return (png_byte)(png_ptr ? png_ptr->rgb_to_gray_status : 0); +} +#endif + +#ifdef PNG_USER_CHUNKS_SUPPORTED +png_voidp PNGAPI +png_get_user_chunk_ptr(png_const_structrp png_ptr) +{ + return (png_ptr ? png_ptr->user_chunk_ptr : NULL); +} +#endif + +size_t PNGAPI +png_get_compression_buffer_size(png_const_structrp png_ptr) +{ + if (png_ptr == NULL) + return 0; + +#ifdef PNG_WRITE_SUPPORTED + if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0) +#endif + { +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED + return png_ptr->IDAT_read_size; +#else + return PNG_IDAT_READ_SIZE; +#endif + } + +#ifdef PNG_WRITE_SUPPORTED + else + return png_ptr->zbuffer_size; +#endif +} + +#ifdef PNG_SET_USER_LIMITS_SUPPORTED +/* These functions were added to libpng 1.2.6 and were enabled + * by default in libpng-1.4.0 */ +png_uint_32 PNGAPI +png_get_user_width_max(png_const_structrp png_ptr) +{ + return (png_ptr ? png_ptr->user_width_max : 0); +} + +png_uint_32 PNGAPI +png_get_user_height_max(png_const_structrp png_ptr) +{ + return (png_ptr ? png_ptr->user_height_max : 0); +} + +/* This function was added to libpng 1.4.0 */ +png_uint_32 PNGAPI +png_get_chunk_cache_max(png_const_structrp png_ptr) +{ + return (png_ptr ? png_ptr->user_chunk_cache_max : 0); +} + +/* This function was added to libpng 1.4.1 */ +png_alloc_size_t PNGAPI +png_get_chunk_malloc_max(png_const_structrp png_ptr) +{ + return (png_ptr ? png_ptr->user_chunk_malloc_max : 0); +} +#endif /* SET_USER_LIMITS */ + +/* These functions were added to libpng 1.4.0 */ +#ifdef PNG_IO_STATE_SUPPORTED +png_uint_32 PNGAPI +png_get_io_state(png_const_structrp png_ptr) +{ + return png_ptr->io_state; +} + +png_uint_32 PNGAPI +png_get_io_chunk_type(png_const_structrp png_ptr) +{ + return png_ptr->chunk_name; +} +#endif /* IO_STATE */ + +#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED +# ifdef PNG_GET_PALETTE_MAX_SUPPORTED +int PNGAPI +png_get_palette_max(png_const_structp png_ptr, png_const_infop info_ptr) +{ + if (png_ptr != NULL && info_ptr != NULL) + return png_ptr->num_palette_max; + + return -1; +} +# endif +#endif + +#endif /* READ || WRITE */ diff --git a/widget/milsko/milskosrc/external/libpng/src/pngmem.c b/widget/milsko/milskosrc/external/libpng/src/pngmem.c new file mode 100644 index 0000000000..71e61c99f7 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/src/pngmem.c @@ -0,0 +1,282 @@ +/* pngmem.c - stub functions for memory allocation + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2014,2016 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This file provides a location for all memory allocation. Users who + * need special memory handling are expected to supply replacement + * functions for png_malloc() and png_free(), and to use + * png_create_read_struct_2() and png_create_write_struct_2() to + * identify the replacement functions. + */ + +#include "pngpriv.h" + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) +/* Free a png_struct */ +void /* PRIVATE */ +png_destroy_png_struct(png_structrp png_ptr) +{ + if (png_ptr != NULL) + { + /* png_free might call png_error and may certainly call + * png_get_mem_ptr, so fake a temporary png_struct to support this. + */ + png_struct dummy_struct = *png_ptr; + memset(png_ptr, 0, (sizeof *png_ptr)); + png_free(&dummy_struct, png_ptr); + +# ifdef PNG_SETJMP_SUPPORTED + /* We may have a jmp_buf left to deallocate. */ + png_free_jmpbuf(&dummy_struct); +# endif + } +} + +/* Allocate memory. For reasonable files, size should never exceed + * 64K. However, zlib may allocate more than 64K if you don't tell + * it not to. See zconf.h and png.h for more information. zlib does + * need to allocate exactly 64K, so whatever you call here must + * have the ability to do that. + */ +PNG_FUNCTION(png_voidp,PNGAPI +png_calloc,(png_const_structrp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) +{ + png_voidp ret; + + ret = png_malloc(png_ptr, size); + + if (ret != NULL) + memset(ret, 0, size); + + return ret; +} + +/* png_malloc_base, an internal function added at libpng 1.6.0, does the work of + * allocating memory, taking into account limits and PNG_USER_MEM_SUPPORTED. + * Checking and error handling must happen outside this routine; it returns NULL + * if the allocation cannot be done (for any reason.) + */ +PNG_FUNCTION(png_voidp /* PRIVATE */, +png_malloc_base,(png_const_structrp png_ptr, png_alloc_size_t size), + PNG_ALLOCATED) +{ + /* Moved to png_malloc_base from png_malloc_default in 1.6.0; the DOS + * allocators have also been removed in 1.6.0, so any 16-bit system now has + * to implement a user memory handler. This checks to be sure it isn't + * called with big numbers. + */ +# ifdef PNG_MAX_MALLOC_64K + /* This is support for legacy systems which had segmented addressing + * limiting the maximum allocation size to 65536. It takes precedence + * over PNG_SIZE_MAX which is set to 65535 on true 16-bit systems. + * + * TODO: libpng-1.8: finally remove both cases. + */ + if (size > 65536U) return NULL; +# endif + + /* This is checked too because the system malloc call below takes a (size_t). + */ + if (size > PNG_SIZE_MAX) return NULL; + +# ifdef PNG_USER_MEM_SUPPORTED + if (png_ptr != NULL && png_ptr->malloc_fn != NULL) + return png_ptr->malloc_fn(png_constcast(png_structrp,png_ptr), size); +# else + PNG_UNUSED(png_ptr) +# endif + + /* Use the system malloc */ + return malloc((size_t)/*SAFE*/size); /* checked for truncation above */ +} + +#if defined(PNG_TEXT_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) ||\ + defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) +/* This is really here only to work round a spurious warning in GCC 4.6 and 4.7 + * that arises because of the checks in png_realloc_array that are repeated in + * png_malloc_array. + */ +static png_voidp +png_malloc_array_checked(png_const_structrp png_ptr, int nelements, + size_t element_size) +{ + png_alloc_size_t req = (png_alloc_size_t)nelements; /* known to be > 0 */ + + if (req <= PNG_SIZE_MAX/element_size) + return png_malloc_base(png_ptr, req * element_size); + + /* The failure case when the request is too large */ + return NULL; +} + +PNG_FUNCTION(png_voidp /* PRIVATE */, +png_malloc_array,(png_const_structrp png_ptr, int nelements, + size_t element_size),PNG_ALLOCATED) +{ + if (nelements <= 0 || element_size == 0) + png_error(png_ptr, "internal error: array alloc"); + + return png_malloc_array_checked(png_ptr, nelements, element_size); +} + +PNG_FUNCTION(png_voidp /* PRIVATE */, +png_realloc_array,(png_const_structrp png_ptr, png_const_voidp old_array, + int old_elements, int add_elements, size_t element_size),PNG_ALLOCATED) +{ + /* These are internal errors: */ + if (add_elements <= 0 || element_size == 0 || old_elements < 0 || + (old_array == NULL && old_elements > 0)) + png_error(png_ptr, "internal error: array realloc"); + + /* Check for overflow on the elements count (so the caller does not have to + * check.) + */ + if (add_elements <= INT_MAX - old_elements) + { + png_voidp new_array = png_malloc_array_checked(png_ptr, + old_elements+add_elements, element_size); + + if (new_array != NULL) + { + /* Because png_malloc_array worked the size calculations below cannot + * overflow. + */ + if (old_elements > 0) + memcpy(new_array, old_array, element_size*(unsigned)old_elements); + + memset((char*)new_array + element_size*(unsigned)old_elements, 0, + element_size*(unsigned)add_elements); + + return new_array; + } + } + + return NULL; /* error */ +} +#endif /* TEXT || sPLT || STORE_UNKNOWN_CHUNKS */ + +/* Various functions that have different error handling are derived from this. + * png_malloc always exists, but if PNG_USER_MEM_SUPPORTED is defined a separate + * function png_malloc_default is also provided. + */ +PNG_FUNCTION(png_voidp,PNGAPI +png_malloc,(png_const_structrp png_ptr, png_alloc_size_t size),PNG_ALLOCATED) +{ + png_voidp ret; + + if (png_ptr == NULL) + return NULL; + + ret = png_malloc_base(png_ptr, size); + + if (ret == NULL) + png_error(png_ptr, "Out of memory"); /* 'm' means png_malloc */ + + return ret; +} + +#ifdef PNG_USER_MEM_SUPPORTED +PNG_FUNCTION(png_voidp,PNGAPI +png_malloc_default,(png_const_structrp png_ptr, png_alloc_size_t size), + PNG_ALLOCATED PNG_DEPRECATED) +{ + png_voidp ret; + + if (png_ptr == NULL) + return NULL; + + /* Passing 'NULL' here bypasses the application provided memory handler. */ + ret = png_malloc_base(NULL/*use malloc*/, size); + + if (ret == NULL) + png_error(png_ptr, "Out of Memory"); /* 'M' means png_malloc_default */ + + return ret; +} +#endif /* USER_MEM */ + +/* This function was added at libpng version 1.2.3. The png_malloc_warn() + * function will issue a png_warning and return NULL instead of issuing a + * png_error, if it fails to allocate the requested memory. + */ +PNG_FUNCTION(png_voidp,PNGAPI +png_malloc_warn,(png_const_structrp png_ptr, png_alloc_size_t size), + PNG_ALLOCATED) +{ + if (png_ptr != NULL) + { + png_voidp ret = png_malloc_base(png_ptr, size); + + if (ret != NULL) + return ret; + + png_warning(png_ptr, "Out of memory"); + } + + return NULL; +} + +/* Free a pointer allocated by png_malloc(). If ptr is NULL, return + * without taking any action. + */ +void PNGAPI +png_free(png_const_structrp png_ptr, png_voidp ptr) +{ + if (png_ptr == NULL || ptr == NULL) + return; + +#ifdef PNG_USER_MEM_SUPPORTED + if (png_ptr->free_fn != NULL) + png_ptr->free_fn(png_constcast(png_structrp,png_ptr), ptr); + + else + png_free_default(png_ptr, ptr); +} + +PNG_FUNCTION(void,PNGAPI +png_free_default,(png_const_structrp png_ptr, png_voidp ptr),PNG_DEPRECATED) +{ + if (png_ptr == NULL || ptr == NULL) + return; +#endif /* USER_MEM */ + + free(ptr); +} + +#ifdef PNG_USER_MEM_SUPPORTED +/* This function is called when the application wants to use another method + * of allocating and freeing memory. + */ +void PNGAPI +png_set_mem_fn(png_structrp png_ptr, png_voidp mem_ptr, png_malloc_ptr + malloc_fn, png_free_ptr free_fn) +{ + if (png_ptr != NULL) + { + png_ptr->mem_ptr = mem_ptr; + png_ptr->malloc_fn = malloc_fn; + png_ptr->free_fn = free_fn; + } +} + +/* This function returns a pointer to the mem_ptr associated with the user + * functions. The application should free any memory associated with this + * pointer before png_write_destroy and png_read_destroy are called. + */ +png_voidp PNGAPI +png_get_mem_ptr(png_const_structrp png_ptr) +{ + if (png_ptr == NULL) + return NULL; + + return png_ptr->mem_ptr; +} +#endif /* USER_MEM */ +#endif /* READ || WRITE */ diff --git a/widget/milsko/milskosrc/external/libpng/src/pngpread.c b/widget/milsko/milskosrc/external/libpng/src/pngpread.c new file mode 100644 index 0000000000..37aa432aec --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/src/pngpread.c @@ -0,0 +1,945 @@ +/* pngpread.c - read a png file in push mode + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +#include "pngpriv.h" + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED + +/* Push model modes */ +#define PNG_READ_SIG_MODE 0 +#define PNG_READ_CHUNK_MODE 1 +#define PNG_READ_IDAT_MODE 2 +#define PNG_READ_tEXt_MODE 4 +#define PNG_READ_zTXt_MODE 5 +#define PNG_READ_DONE_MODE 6 +#define PNG_READ_iTXt_MODE 7 +#define PNG_ERROR_MODE 8 + +#define PNG_PUSH_SAVE_BUFFER_IF_FULL \ +if (png_ptr->push_length + 4 > png_ptr->buffer_size) \ + { png_push_save_buffer(png_ptr); return; } +#define PNG_PUSH_SAVE_BUFFER_IF_LT(N) \ +if (png_ptr->buffer_size < N) \ + { png_push_save_buffer(png_ptr); return; } + +#ifdef PNG_READ_INTERLACING_SUPPORTED +/* Arrays to facilitate interlacing - use pass (0 - 6) as index. */ + +/* Start of interlace block */ +static const png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; +/* Offset to next interlace block */ +static const png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; +/* Start of interlace block in the y direction */ +static const png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; +/* Offset to next interlace block in the y direction */ +static const png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; + +/* TODO: Move these arrays to a common utility module to avoid duplication. */ +#endif + +void PNGAPI +png_process_data(png_structrp png_ptr, png_inforp info_ptr, + png_bytep buffer, size_t buffer_size) +{ + if (png_ptr == NULL || info_ptr == NULL) + return; + + png_push_restore_buffer(png_ptr, buffer, buffer_size); + + while (png_ptr->buffer_size) + { + png_process_some_data(png_ptr, info_ptr); + } +} + +size_t PNGAPI +png_process_data_pause(png_structrp png_ptr, int save) +{ + if (png_ptr != NULL) + { + /* It's easiest for the caller if we do the save; then the caller doesn't + * have to supply the same data again: + */ + if (save != 0) + png_push_save_buffer(png_ptr); + else + { + /* This includes any pending saved bytes: */ + size_t remaining = png_ptr->buffer_size; + png_ptr->buffer_size = 0; + + /* So subtract the saved buffer size, unless all the data + * is actually 'saved', in which case we just return 0 + */ + if (png_ptr->save_buffer_size < remaining) + return remaining - png_ptr->save_buffer_size; + } + } + + return 0; +} + +png_uint_32 PNGAPI +png_process_data_skip(png_structrp png_ptr) +{ +/* TODO: Deprecate and remove this API. + * Somewhere the implementation of this seems to have been lost, + * or abandoned. It was only to support some internal back-door access + * to png_struct) in libpng-1.4.x. + */ + png_app_warning(png_ptr, +"png_process_data_skip is not implemented in any current version of libpng"); + return 0; +} + +/* What we do with the incoming data depends on what we were previously + * doing before we ran out of data... + */ +void /* PRIVATE */ +png_process_some_data(png_structrp png_ptr, png_inforp info_ptr) +{ + if (png_ptr == NULL) + return; + + switch (png_ptr->process_mode) + { + case PNG_READ_SIG_MODE: + { + png_push_read_sig(png_ptr, info_ptr); + break; + } + + case PNG_READ_CHUNK_MODE: + { + png_push_read_chunk(png_ptr, info_ptr); + break; + } + + case PNG_READ_IDAT_MODE: + { + png_push_read_IDAT(png_ptr); + break; + } + + default: + { + png_ptr->buffer_size = 0; + break; + } + } +} + +/* Read any remaining signature bytes from the stream and compare them with + * the correct PNG signature. It is possible that this routine is called + * with bytes already read from the signature, either because they have been + * checked by the calling application, or because of multiple calls to this + * routine. + */ +void /* PRIVATE */ +png_push_read_sig(png_structrp png_ptr, png_inforp info_ptr) +{ + size_t num_checked = png_ptr->sig_bytes; /* SAFE, does not exceed 8 */ + size_t num_to_check = 8 - num_checked; + + if (png_ptr->buffer_size < num_to_check) + { + num_to_check = png_ptr->buffer_size; + } + + png_push_fill_buffer(png_ptr, &(info_ptr->signature[num_checked]), + num_to_check); + png_ptr->sig_bytes = (png_byte)(png_ptr->sig_bytes + num_to_check); + + if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check) != 0) + { + if (num_checked < 4 && + png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4) != 0) + png_error(png_ptr, "Not a PNG file"); + + else + png_error(png_ptr, "PNG file corrupted by ASCII conversion"); + } + else + { + if (png_ptr->sig_bytes >= 8) + { + png_ptr->process_mode = PNG_READ_CHUNK_MODE; + } + } +} + +void /* PRIVATE */ +png_push_read_chunk(png_structrp png_ptr, png_inforp info_ptr) +{ + png_uint_32 chunk_name; +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + int keep; /* unknown handling method */ +#endif + + /* First we make sure we have enough data for the 4-byte chunk name + * and the 4-byte chunk length before proceeding with decoding the + * chunk data. To fully decode each of these chunks, we also make + * sure we have enough data in the buffer for the 4-byte CRC at the + * end of every chunk (except IDAT, which is handled separately). + */ + if ((png_ptr->mode & PNG_HAVE_CHUNK_HEADER) == 0) + { + PNG_PUSH_SAVE_BUFFER_IF_LT(8) + png_ptr->push_length = png_read_chunk_header(png_ptr); + png_ptr->mode |= PNG_HAVE_CHUNK_HEADER; + } + + chunk_name = png_ptr->chunk_name; + + if (chunk_name == png_IDAT) + { + if ((png_ptr->mode & PNG_AFTER_IDAT) != 0) + png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT; + + /* If we reach an IDAT chunk, this means we have read all of the + * header chunks, and we can start reading the image (or if this + * is called after the image has been read - we have an error). + */ + if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) + png_error(png_ptr, "Missing IHDR before IDAT"); + + else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && + (png_ptr->mode & PNG_HAVE_PLTE) == 0) + png_error(png_ptr, "Missing PLTE before IDAT"); + + png_ptr->process_mode = PNG_READ_IDAT_MODE; + + if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) + if ((png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT) == 0) + if (png_ptr->push_length == 0) + return; + + png_ptr->mode |= PNG_HAVE_IDAT; + + if ((png_ptr->mode & PNG_AFTER_IDAT) != 0) + png_benign_error(png_ptr, "Too many IDATs found"); + } + + else if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) + { + /* These flags must be set consistently for all non-IDAT chunks, + * including the unknown chunks. + */ + png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT | PNG_AFTER_IDAT; + } + + if (chunk_name == png_IHDR) + { + if (png_ptr->push_length != 13) + png_error(png_ptr, "Invalid IHDR length"); + + PNG_PUSH_SAVE_BUFFER_IF_FULL + png_handle_chunk(png_ptr, info_ptr, png_ptr->push_length); + } + + else if (chunk_name == png_IEND) + { + PNG_PUSH_SAVE_BUFFER_IF_FULL + png_handle_chunk(png_ptr, info_ptr, png_ptr->push_length); + + png_ptr->process_mode = PNG_READ_DONE_MODE; + png_push_have_end(png_ptr, info_ptr); + } + +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + else if ((keep = png_chunk_unknown_handling(png_ptr, chunk_name)) != 0) + { + PNG_PUSH_SAVE_BUFFER_IF_FULL + png_handle_unknown(png_ptr, info_ptr, png_ptr->push_length, keep); + + if (chunk_name == png_PLTE) + png_ptr->mode |= PNG_HAVE_PLTE; + } +#endif + + else if (chunk_name == png_IDAT) + { + png_ptr->idat_size = png_ptr->push_length; + png_ptr->process_mode = PNG_READ_IDAT_MODE; + png_push_have_info(png_ptr, info_ptr); + png_ptr->zstream.avail_out = + (uInt) PNG_ROWBYTES(png_ptr->pixel_depth, + png_ptr->iwidth) + 1; + png_ptr->zstream.next_out = png_ptr->row_buf; + return; + } + + else + { + PNG_PUSH_SAVE_BUFFER_IF_FULL + png_handle_chunk(png_ptr, info_ptr, png_ptr->push_length); + } + + png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; +} + +void PNGCBAPI +png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, size_t length) +{ + png_bytep ptr; + + if (png_ptr == NULL) + return; + + ptr = buffer; + if (png_ptr->save_buffer_size != 0) + { + size_t save_size; + + if (length < png_ptr->save_buffer_size) + save_size = length; + + else + save_size = png_ptr->save_buffer_size; + + memcpy(ptr, png_ptr->save_buffer_ptr, save_size); + length -= save_size; + ptr += save_size; + png_ptr->buffer_size -= save_size; + png_ptr->save_buffer_size -= save_size; + png_ptr->save_buffer_ptr += save_size; + } + if (length != 0 && png_ptr->current_buffer_size != 0) + { + size_t save_size; + + if (length < png_ptr->current_buffer_size) + save_size = length; + + else + save_size = png_ptr->current_buffer_size; + + memcpy(ptr, png_ptr->current_buffer_ptr, save_size); + png_ptr->buffer_size -= save_size; + png_ptr->current_buffer_size -= save_size; + png_ptr->current_buffer_ptr += save_size; + } +} + +void /* PRIVATE */ +png_push_save_buffer(png_structrp png_ptr) +{ + if (png_ptr->save_buffer_size != 0) + { + if (png_ptr->save_buffer_ptr != png_ptr->save_buffer) + { + size_t i, istop; + png_bytep sp; + png_bytep dp; + + istop = png_ptr->save_buffer_size; + for (i = 0, sp = png_ptr->save_buffer_ptr, dp = png_ptr->save_buffer; + i < istop; i++, sp++, dp++) + { + *dp = *sp; + } + } + } + if (png_ptr->save_buffer_size + png_ptr->current_buffer_size > + png_ptr->save_buffer_max) + { + size_t new_max; + png_bytep old_buffer; + + if (png_ptr->save_buffer_size > PNG_SIZE_MAX - + (png_ptr->current_buffer_size + 256)) + { + png_error(png_ptr, "Potential overflow of save_buffer"); + } + + new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256; + old_buffer = png_ptr->save_buffer; + png_ptr->save_buffer = (png_bytep)png_malloc_warn(png_ptr, + (size_t)new_max); + + if (png_ptr->save_buffer == NULL) + { + png_free(png_ptr, old_buffer); + png_error(png_ptr, "Insufficient memory for save_buffer"); + } + + if (old_buffer) + memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size); + else if (png_ptr->save_buffer_size) + png_error(png_ptr, "save_buffer error"); + png_free(png_ptr, old_buffer); + png_ptr->save_buffer_max = new_max; + } + if (png_ptr->current_buffer_size) + { + memcpy(png_ptr->save_buffer + png_ptr->save_buffer_size, + png_ptr->current_buffer_ptr, png_ptr->current_buffer_size); + png_ptr->save_buffer_size += png_ptr->current_buffer_size; + png_ptr->current_buffer_size = 0; + } + png_ptr->save_buffer_ptr = png_ptr->save_buffer; + png_ptr->buffer_size = 0; +} + +void /* PRIVATE */ +png_push_restore_buffer(png_structrp png_ptr, png_bytep buffer, + size_t buffer_length) +{ + png_ptr->current_buffer = buffer; + png_ptr->current_buffer_size = buffer_length; + png_ptr->buffer_size = buffer_length + png_ptr->save_buffer_size; + png_ptr->current_buffer_ptr = png_ptr->current_buffer; +} + +void /* PRIVATE */ +png_push_read_IDAT(png_structrp png_ptr) +{ + if ((png_ptr->mode & PNG_HAVE_CHUNK_HEADER) == 0) + { + png_byte chunk_length[4]; + png_byte chunk_tag[4]; + + /* TODO: this code can be commoned up with the same code in push_read */ + PNG_PUSH_SAVE_BUFFER_IF_LT(8) + png_push_fill_buffer(png_ptr, chunk_length, 4); + png_ptr->push_length = png_get_uint_31(png_ptr, chunk_length); + png_reset_crc(png_ptr); + png_crc_read(png_ptr, chunk_tag, 4); + png_ptr->chunk_name = PNG_CHUNK_FROM_STRING(chunk_tag); + png_ptr->mode |= PNG_HAVE_CHUNK_HEADER; + + if (png_ptr->chunk_name != png_IDAT) + { + png_ptr->process_mode = PNG_READ_CHUNK_MODE; + + if ((png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED) == 0) + png_error(png_ptr, "Not enough compressed data"); + + return; + } + + png_ptr->idat_size = png_ptr->push_length; + } + + if (png_ptr->idat_size != 0 && png_ptr->save_buffer_size != 0) + { + size_t save_size = png_ptr->save_buffer_size; + png_uint_32 idat_size = png_ptr->idat_size; + + /* We want the smaller of 'idat_size' and 'current_buffer_size', but they + * are of different types and we don't know which variable has the fewest + * bits. Carefully select the smaller and cast it to the type of the + * larger - this cannot overflow. Do not cast in the following test - it + * will break on either 16-bit or 64-bit platforms. + */ + if (idat_size < save_size) + save_size = (size_t)idat_size; + + else + idat_size = (png_uint_32)save_size; + + png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size); + + png_process_IDAT_data(png_ptr, png_ptr->save_buffer_ptr, save_size); + + png_ptr->idat_size -= idat_size; + png_ptr->buffer_size -= save_size; + png_ptr->save_buffer_size -= save_size; + png_ptr->save_buffer_ptr += save_size; + } + + if (png_ptr->idat_size != 0 && png_ptr->current_buffer_size != 0) + { + size_t save_size = png_ptr->current_buffer_size; + png_uint_32 idat_size = png_ptr->idat_size; + + /* We want the smaller of 'idat_size' and 'current_buffer_size', but they + * are of different types and we don't know which variable has the fewest + * bits. Carefully select the smaller and cast it to the type of the + * larger - this cannot overflow. + */ + if (idat_size < save_size) + save_size = (size_t)idat_size; + + else + idat_size = (png_uint_32)save_size; + + png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size); + + png_process_IDAT_data(png_ptr, png_ptr->current_buffer_ptr, save_size); + + png_ptr->idat_size -= idat_size; + png_ptr->buffer_size -= save_size; + png_ptr->current_buffer_size -= save_size; + png_ptr->current_buffer_ptr += save_size; + } + + if (png_ptr->idat_size == 0) + { + PNG_PUSH_SAVE_BUFFER_IF_LT(4) + png_crc_finish(png_ptr, 0); + png_ptr->mode &= ~PNG_HAVE_CHUNK_HEADER; + png_ptr->mode |= PNG_AFTER_IDAT; + png_ptr->zowner = 0; + } +} + +void /* PRIVATE */ +png_process_IDAT_data(png_structrp png_ptr, png_bytep buffer, + size_t buffer_length) +{ + /* The caller checks for a non-zero buffer length. */ + if (!(buffer_length > 0) || buffer == NULL) + png_error(png_ptr, "No IDAT data (internal error)"); + + /* This routine must process all the data it has been given + * before returning, calling the row callback as required to + * handle the uncompressed results. + */ + png_ptr->zstream.next_in = buffer; + /* TODO: WARNING: TRUNCATION ERROR: DANGER WILL ROBINSON: */ + png_ptr->zstream.avail_in = (uInt)buffer_length; + + /* Keep going until the decompressed data is all processed + * or the stream marked as finished. + */ + while (png_ptr->zstream.avail_in > 0 && + (png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED) == 0) + { + int ret; + + /* We have data for zlib, but we must check that zlib + * has someplace to put the results. It doesn't matter + * if we don't expect any results -- it may be the input + * data is just the LZ end code. + */ + if (!(png_ptr->zstream.avail_out > 0)) + { + /* TODO: WARNING: TRUNCATION ERROR: DANGER WILL ROBINSON: */ + png_ptr->zstream.avail_out = (uInt)(PNG_ROWBYTES(png_ptr->pixel_depth, + png_ptr->iwidth) + 1); + + png_ptr->zstream.next_out = png_ptr->row_buf; + } + + /* Using Z_SYNC_FLUSH here means that an unterminated + * LZ stream (a stream with a missing end code) can still + * be handled, otherwise (Z_NO_FLUSH) a future zlib + * implementation might defer output and therefore + * change the current behavior (see comments in inflate.c + * for why this doesn't happen at present with zlib 1.2.5). + */ + ret = PNG_INFLATE(png_ptr, Z_SYNC_FLUSH); + + /* Check for any failure before proceeding. */ + if (ret != Z_OK && ret != Z_STREAM_END) + { + /* Terminate the decompression. */ + png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED; + png_ptr->zowner = 0; + + /* This may be a truncated stream (missing or + * damaged end code). Treat that as a warning. + */ + if (png_ptr->row_number >= png_ptr->num_rows || + png_ptr->pass > 6) + png_warning(png_ptr, "Truncated compressed data in IDAT"); + + else + { + if (ret == Z_DATA_ERROR) + png_benign_error(png_ptr, "IDAT: ADLER32 checksum mismatch"); + else + png_error(png_ptr, "Decompression error in IDAT"); + } + + /* Skip the check on unprocessed input */ + return; + } + + /* Did inflate output any data? */ + if (png_ptr->zstream.next_out != png_ptr->row_buf) + { + /* Is this unexpected data after the last row? + * If it is, artificially terminate the LZ output + * here. + */ + if (png_ptr->row_number >= png_ptr->num_rows || + png_ptr->pass > 6) + { + /* Extra data. */ + png_warning(png_ptr, "Extra compressed data in IDAT"); + png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED; + png_ptr->zowner = 0; + + /* Do no more processing; skip the unprocessed + * input check below. + */ + return; + } + + /* Do we have a complete row? */ + if (png_ptr->zstream.avail_out == 0) + png_push_process_row(png_ptr); + } + + /* And check for the end of the stream. */ + if (ret == Z_STREAM_END) + png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED; + } + + /* All the data should have been processed, if anything + * is left at this point we have bytes of IDAT data + * after the zlib end code. + */ + if (png_ptr->zstream.avail_in > 0) + png_warning(png_ptr, "Extra compression data in IDAT"); +} + +void /* PRIVATE */ +png_push_process_row(png_structrp png_ptr) +{ + /* 1.5.6: row_info moved out of png_struct to a local here. */ + png_row_info row_info; + + row_info.width = png_ptr->iwidth; /* NOTE: width of current interlaced row */ + row_info.color_type = png_ptr->color_type; + row_info.bit_depth = png_ptr->bit_depth; + row_info.channels = png_ptr->channels; + row_info.pixel_depth = png_ptr->pixel_depth; + row_info.rowbytes = PNG_ROWBYTES(row_info.pixel_depth, row_info.width); + + if (png_ptr->row_buf[0] > PNG_FILTER_VALUE_NONE) + { + if (png_ptr->row_buf[0] < PNG_FILTER_VALUE_LAST) + png_read_filter_row(png_ptr, &row_info, png_ptr->row_buf + 1, + png_ptr->prev_row + 1, png_ptr->row_buf[0]); + else + png_error(png_ptr, "bad adaptive filter value"); + } + + /* libpng 1.5.6: the following line was copying png_ptr->rowbytes before + * 1.5.6, while the buffer really is this big in current versions of libpng + * it may not be in the future, so this was changed just to copy the + * interlaced row count: + */ + memcpy(png_ptr->prev_row, png_ptr->row_buf, row_info.rowbytes + 1); + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED + if (png_ptr->transformations != 0) + png_do_read_transformations(png_ptr, &row_info); +#endif + + /* The transformed pixel depth should match the depth now in row_info. */ + if (png_ptr->transformed_pixel_depth == 0) + { + png_ptr->transformed_pixel_depth = row_info.pixel_depth; + if (row_info.pixel_depth > png_ptr->maximum_pixel_depth) + png_error(png_ptr, "progressive row overflow"); + } + + else if (png_ptr->transformed_pixel_depth != row_info.pixel_depth) + png_error(png_ptr, "internal progressive row size calculation error"); + + +#ifdef PNG_READ_INTERLACING_SUPPORTED + /* Expand interlaced rows to full size */ + if (png_ptr->interlaced != 0 && + (png_ptr->transformations & PNG_INTERLACE) != 0) + { + if (png_ptr->pass < 6) + png_do_read_interlace(&row_info, png_ptr->row_buf + 1, png_ptr->pass, + png_ptr->transformations); + + switch (png_ptr->pass) + { + case 0: + { + int i; + for (i = 0; i < 8 && png_ptr->pass == 0; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); /* Updates png_ptr->pass */ + } + + if (png_ptr->pass == 2) /* Pass 1 might be empty */ + { + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + + if (png_ptr->pass == 4 && png_ptr->height <= 4) + { + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + + if (png_ptr->pass == 6 && png_ptr->height <= 4) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + + break; + } + + case 1: + { + int i; + for (i = 0; i < 8 && png_ptr->pass == 1; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + + if (png_ptr->pass == 2) /* Skip top 4 generated rows */ + { + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + + break; + } + + case 2: + { + int i; + + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + + for (i = 0; i < 4 && png_ptr->pass == 2; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + + if (png_ptr->pass == 4) /* Pass 3 might be empty */ + { + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + + break; + } + + case 3: + { + int i; + + for (i = 0; i < 4 && png_ptr->pass == 3; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + + if (png_ptr->pass == 4) /* Skip top two generated rows */ + { + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + + break; + } + + case 4: + { + int i; + + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + + for (i = 0; i < 2 && png_ptr->pass == 4; i++) + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + + if (png_ptr->pass == 6) /* Pass 5 might be empty */ + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + + break; + } + + case 5: + { + int i; + + for (i = 0; i < 2 && png_ptr->pass == 5; i++) + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } + + if (png_ptr->pass == 6) /* Skip top generated row */ + { + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + + break; + } + + default: + case 6: + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + + if (png_ptr->pass != 6) + break; + + png_push_have_row(png_ptr, NULL); + png_read_push_finish_row(png_ptr); + } + } + } + else +#endif + { + png_push_have_row(png_ptr, png_ptr->row_buf + 1); + png_read_push_finish_row(png_ptr); + } +} + +void /* PRIVATE */ +png_read_push_finish_row(png_structrp png_ptr) +{ + png_ptr->row_number++; + if (png_ptr->row_number < png_ptr->num_rows) + return; + +#ifdef PNG_READ_INTERLACING_SUPPORTED + if (png_ptr->interlaced != 0) + { + png_ptr->row_number = 0; + memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); + + do + { + png_ptr->pass++; + if ((png_ptr->pass == 1 && png_ptr->width < 5) || + (png_ptr->pass == 3 && png_ptr->width < 3) || + (png_ptr->pass == 5 && png_ptr->width < 2)) + png_ptr->pass++; + + if (png_ptr->pass > 7) + png_ptr->pass--; + + if (png_ptr->pass >= 7) + break; + + png_ptr->iwidth = (png_ptr->width + + png_pass_inc[png_ptr->pass] - 1 - + png_pass_start[png_ptr->pass]) / + png_pass_inc[png_ptr->pass]; + + if ((png_ptr->transformations & PNG_INTERLACE) != 0) + break; + + png_ptr->num_rows = (png_ptr->height + + png_pass_yinc[png_ptr->pass] - 1 - + png_pass_ystart[png_ptr->pass]) / + png_pass_yinc[png_ptr->pass]; + + } while (png_ptr->iwidth == 0 || png_ptr->num_rows == 0); + } +#endif /* READ_INTERLACING */ +} + +void /* PRIVATE */ +png_push_have_info(png_structrp png_ptr, png_inforp info_ptr) +{ + if (png_ptr->info_fn != NULL) + (*(png_ptr->info_fn))(png_ptr, info_ptr); +} + +void /* PRIVATE */ +png_push_have_end(png_structrp png_ptr, png_inforp info_ptr) +{ + if (png_ptr->end_fn != NULL) + (*(png_ptr->end_fn))(png_ptr, info_ptr); +} + +void /* PRIVATE */ +png_push_have_row(png_structrp png_ptr, png_bytep row) +{ + if (png_ptr->row_fn != NULL) + (*(png_ptr->row_fn))(png_ptr, row, png_ptr->row_number, + (int)png_ptr->pass); +} + +#ifdef PNG_READ_INTERLACING_SUPPORTED +void PNGAPI +png_progressive_combine_row(png_const_structrp png_ptr, png_bytep old_row, + png_const_bytep new_row) +{ + if (png_ptr == NULL) + return; + + /* new_row is a flag here - if it is NULL then the app callback was called + * from an empty row (see the calls to png_struct::row_fn below), otherwise + * it must be png_ptr->row_buf+1 + */ + if (new_row != NULL) + png_combine_row(png_ptr, old_row, 1/*blocky display*/); +} +#endif /* READ_INTERLACING */ + +void PNGAPI +png_set_progressive_read_fn(png_structrp png_ptr, png_voidp progressive_ptr, + png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn, + png_progressive_end_ptr end_fn) +{ + if (png_ptr == NULL) + return; + + png_ptr->info_fn = info_fn; + png_ptr->row_fn = row_fn; + png_ptr->end_fn = end_fn; + + png_set_read_fn(png_ptr, progressive_ptr, png_push_fill_buffer); +} + +png_voidp PNGAPI +png_get_progressive_ptr(png_const_structrp png_ptr) +{ + if (png_ptr == NULL) + return NULL; + + return png_ptr->io_ptr; +} +#endif /* PROGRESSIVE_READ */ diff --git a/widget/milsko/milskosrc/external/libpng/src/pngread.c b/widget/milsko/milskosrc/external/libpng/src/pngread.c new file mode 100644 index 0000000000..212afb7d21 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/src/pngread.c @@ -0,0 +1,4098 @@ +/* pngread.c - read a PNG file + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This file contains routines that an application calls directly to + * read a PNG file or stream. + */ + +#include "pngpriv.h" +#if defined(PNG_SIMPLIFIED_READ_SUPPORTED) && defined(PNG_STDIO_SUPPORTED) +# include +#endif + +#ifdef PNG_READ_SUPPORTED + +/* Create a PNG structure for reading, and allocate any memory needed. */ +PNG_FUNCTION(png_structp,PNGAPI +png_create_read_struct,(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn),PNG_ALLOCATED) +{ +#ifndef PNG_USER_MEM_SUPPORTED + png_structp png_ptr = png_create_png_struct(user_png_ver, error_ptr, + error_fn, warn_fn, NULL, NULL, NULL); +#else + return png_create_read_struct_2(user_png_ver, error_ptr, error_fn, + warn_fn, NULL, NULL, NULL); +} + +/* Alternate create PNG structure for reading, and allocate any memory + * needed. + */ +PNG_FUNCTION(png_structp,PNGAPI +png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn),PNG_ALLOCATED) +{ + png_structp png_ptr = png_create_png_struct(user_png_ver, error_ptr, + error_fn, warn_fn, mem_ptr, malloc_fn, free_fn); +#endif /* USER_MEM */ + + if (png_ptr != NULL) + { + png_ptr->mode = PNG_IS_READ_STRUCT; + + /* Added in libpng-1.6.0; this can be used to detect a read structure if + * required (it will be zero in a write structure.) + */ +# ifdef PNG_SEQUENTIAL_READ_SUPPORTED + png_ptr->IDAT_read_size = PNG_IDAT_READ_SIZE; +# endif + +# ifdef PNG_BENIGN_READ_ERRORS_SUPPORTED + png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN; + + /* In stable builds only warn if an application error can be completely + * handled. + */ +# if PNG_RELEASE_BUILD + png_ptr->flags |= PNG_FLAG_APP_WARNINGS_WARN; +# endif +# endif + + /* TODO: delay this, it can be done in png_init_io (if the app doesn't + * do it itself) avoiding setting the default function if it is not + * required. + */ + png_set_read_fn(png_ptr, NULL, NULL); + } + + return png_ptr; +} + + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the information before the actual image data. This has been + * changed in v0.90 to allow reading a file that already has the magic + * bytes read from the stream. You can tell libpng how many bytes have + * been read from the beginning of the stream (up to the maximum of 8) + * via png_set_sig_bytes(), and we will only check the remaining bytes + * here. The application can then have access to the signature bytes we + * read if it is determined that this isn't a valid PNG file. + */ +void PNGAPI +png_read_info(png_structrp png_ptr, png_inforp info_ptr) +{ +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + int keep; +#endif + + png_debug(1, "in png_read_info"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + /* Read and check the PNG file signature. */ + png_read_sig(png_ptr, info_ptr); + + for (;;) + { + png_uint_32 length = png_read_chunk_header(png_ptr); + png_uint_32 chunk_name = png_ptr->chunk_name; + + /* IDAT logic needs to happen here to simplify getting the two flags + * right. + */ + if (chunk_name == png_IDAT) + { + if ((png_ptr->mode & PNG_HAVE_IHDR) == 0) + png_chunk_error(png_ptr, "Missing IHDR before IDAT"); + + else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && + (png_ptr->mode & PNG_HAVE_PLTE) == 0) + png_chunk_error(png_ptr, "Missing PLTE before IDAT"); + + else if ((png_ptr->mode & PNG_AFTER_IDAT) != 0) + png_chunk_benign_error(png_ptr, "Too many IDATs found"); + + png_ptr->mode |= PNG_HAVE_IDAT; + } + + else if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) + { + png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT; + png_ptr->mode |= PNG_AFTER_IDAT; + } + + if (chunk_name == png_IHDR) + png_handle_chunk(png_ptr, info_ptr, length); + + else if (chunk_name == png_IEND) + png_handle_chunk(png_ptr, info_ptr, length); + +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + else if ((keep = png_chunk_unknown_handling(png_ptr, chunk_name)) != 0) + { + png_handle_unknown(png_ptr, info_ptr, length, keep); + + if (chunk_name == png_PLTE) + png_ptr->mode |= PNG_HAVE_PLTE; + + else if (chunk_name == png_IDAT) + { + png_ptr->idat_size = 0; /* It has been consumed */ + break; + } + } +#endif + + else if (chunk_name == png_IDAT) + { + png_ptr->idat_size = length; + break; + } + + else + png_handle_chunk(png_ptr, info_ptr, length); + } +} +#endif /* SEQUENTIAL_READ */ + +/* Optional call to update the users info_ptr structure */ +void PNGAPI +png_read_update_info(png_structrp png_ptr, png_inforp info_ptr) +{ + png_debug(1, "in png_read_update_info"); + + if (png_ptr != NULL) + { + if ((png_ptr->flags & PNG_FLAG_ROW_INIT) == 0) + { + png_read_start_row(png_ptr); + +# ifdef PNG_READ_TRANSFORMS_SUPPORTED + png_read_transform_info(png_ptr, info_ptr); +# else + PNG_UNUSED(info_ptr) +# endif + } + + /* New in 1.6.0 this avoids the bug of doing the initializations twice */ + else + png_app_error(png_ptr, + "png_read_update_info/png_start_read_image: duplicate call"); + } +} + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Initialize palette, background, etc, after transformations + * are set, but before any reading takes place. This allows + * the user to obtain a gamma-corrected palette, for example. + * If the user doesn't call this, we will do it ourselves. + */ +void PNGAPI +png_start_read_image(png_structrp png_ptr) +{ + png_debug(1, "in png_start_read_image"); + + if (png_ptr != NULL) + { + if ((png_ptr->flags & PNG_FLAG_ROW_INIT) == 0) + png_read_start_row(png_ptr); + + /* New in 1.6.0 this avoids the bug of doing the initializations twice */ + else + png_app_error(png_ptr, + "png_start_read_image/png_read_update_info: duplicate call"); + } +} +#endif /* SEQUENTIAL_READ */ + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_MNG_FEATURES_SUPPORTED +/* Undoes intrapixel differencing, + * NOTE: this is apparently only supported in the 'sequential' reader. + */ +static void +png_do_read_intrapixel(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_read_intrapixel"); + + if ( + (row_info->color_type & PNG_COLOR_MASK_COLOR) != 0) + { + int bytes_per_pixel; + png_uint_32 row_width = row_info->width; + + if (row_info->bit_depth == 8) + { + png_bytep rp; + png_uint_32 i; + + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + bytes_per_pixel = 3; + + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + bytes_per_pixel = 4; + + else + return; + + for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) + { + *(rp) = (png_byte)((256 + *rp + *(rp + 1)) & 0xff); + *(rp+2) = (png_byte)((256 + *(rp + 2) + *(rp + 1)) & 0xff); + } + } + else if (row_info->bit_depth == 16) + { + png_bytep rp; + png_uint_32 i; + + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + bytes_per_pixel = 6; + + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + bytes_per_pixel = 8; + + else + return; + + for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) + { + png_uint_32 s0 = (png_uint_32)(*(rp ) << 8) | *(rp + 1); + png_uint_32 s1 = (png_uint_32)(*(rp + 2) << 8) | *(rp + 3); + png_uint_32 s2 = (png_uint_32)(*(rp + 4) << 8) | *(rp + 5); + png_uint_32 red = (s0 + s1 + 65536) & 0xffff; + png_uint_32 blue = (s2 + s1 + 65536) & 0xffff; + *(rp ) = (png_byte)((red >> 8) & 0xff); + *(rp + 1) = (png_byte)(red & 0xff); + *(rp + 4) = (png_byte)((blue >> 8) & 0xff); + *(rp + 5) = (png_byte)(blue & 0xff); + } + } + } +} +#endif /* MNG_FEATURES */ + +void PNGAPI +png_read_row(png_structrp png_ptr, png_bytep row, png_bytep dsp_row) +{ + png_row_info row_info; + + if (png_ptr == NULL) + return; + + png_debug2(1, "in png_read_row (row %lu, pass %d)", + (unsigned long)png_ptr->row_number, png_ptr->pass); + + /* png_read_start_row sets the information (in particular iwidth) for this + * interlace pass. + */ + if ((png_ptr->flags & PNG_FLAG_ROW_INIT) == 0) + png_read_start_row(png_ptr); + + /* 1.5.6: row_info moved out of png_struct to a local here. */ + row_info.width = png_ptr->iwidth; /* NOTE: width of current interlaced row */ + row_info.color_type = png_ptr->color_type; + row_info.bit_depth = png_ptr->bit_depth; + row_info.channels = png_ptr->channels; + row_info.pixel_depth = png_ptr->pixel_depth; + row_info.rowbytes = PNG_ROWBYTES(row_info.pixel_depth, row_info.width); + +#ifdef PNG_WARNINGS_SUPPORTED + if (png_ptr->row_number == 0 && png_ptr->pass == 0) + { + /* Check for transforms that have been set but were defined out */ +#if defined(PNG_WRITE_INVERT_SUPPORTED) && !defined(PNG_READ_INVERT_SUPPORTED) + if ((png_ptr->transformations & PNG_INVERT_MONO) != 0) + png_warning(png_ptr, "PNG_READ_INVERT_SUPPORTED is not defined"); +#endif + +#if defined(PNG_WRITE_FILLER_SUPPORTED) && !defined(PNG_READ_FILLER_SUPPORTED) + if ((png_ptr->transformations & PNG_FILLER) != 0) + png_warning(png_ptr, "PNG_READ_FILLER_SUPPORTED is not defined"); +#endif + +#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \ + !defined(PNG_READ_PACKSWAP_SUPPORTED) + if ((png_ptr->transformations & PNG_PACKSWAP) != 0) + png_warning(png_ptr, "PNG_READ_PACKSWAP_SUPPORTED is not defined"); +#endif + +#if defined(PNG_WRITE_PACK_SUPPORTED) && !defined(PNG_READ_PACK_SUPPORTED) + if ((png_ptr->transformations & PNG_PACK) != 0) + png_warning(png_ptr, "PNG_READ_PACK_SUPPORTED is not defined"); +#endif + +#if defined(PNG_WRITE_SHIFT_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED) + if ((png_ptr->transformations & PNG_SHIFT) != 0) + png_warning(png_ptr, "PNG_READ_SHIFT_SUPPORTED is not defined"); +#endif + +#if defined(PNG_WRITE_BGR_SUPPORTED) && !defined(PNG_READ_BGR_SUPPORTED) + if ((png_ptr->transformations & PNG_BGR) != 0) + png_warning(png_ptr, "PNG_READ_BGR_SUPPORTED is not defined"); +#endif + +#if defined(PNG_WRITE_SWAP_SUPPORTED) && !defined(PNG_READ_SWAP_SUPPORTED) + if ((png_ptr->transformations & PNG_SWAP_BYTES) != 0) + png_warning(png_ptr, "PNG_READ_SWAP_SUPPORTED is not defined"); +#endif + } +#endif /* WARNINGS */ + +#ifdef PNG_READ_INTERLACING_SUPPORTED + /* If interlaced and we do not need a new row, combine row and return. + * Notice that the pixels we have from previous rows have been transformed + * already; we can only combine like with like (transformed or + * untransformed) and, because of the libpng API for interlaced images, this + * means we must transform before de-interlacing. + */ + if (png_ptr->interlaced != 0 && + (png_ptr->transformations & PNG_INTERLACE) != 0) + { + switch (png_ptr->pass) + { + case 0: + if (png_ptr->row_number & 0x07) + { + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, 1/*display*/); + png_read_finish_row(png_ptr); + return; + } + break; + + case 1: + if ((png_ptr->row_number & 0x07) || png_ptr->width < 5) + { + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, 1/*display*/); + + png_read_finish_row(png_ptr); + return; + } + break; + + case 2: + if ((png_ptr->row_number & 0x07) != 4) + { + if (dsp_row != NULL && (png_ptr->row_number & 4)) + png_combine_row(png_ptr, dsp_row, 1/*display*/); + + png_read_finish_row(png_ptr); + return; + } + break; + + case 3: + if ((png_ptr->row_number & 3) || png_ptr->width < 3) + { + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, 1/*display*/); + + png_read_finish_row(png_ptr); + return; + } + break; + + case 4: + if ((png_ptr->row_number & 3) != 2) + { + if (dsp_row != NULL && (png_ptr->row_number & 2)) + png_combine_row(png_ptr, dsp_row, 1/*display*/); + + png_read_finish_row(png_ptr); + return; + } + break; + + case 5: + if ((png_ptr->row_number & 1) || png_ptr->width < 2) + { + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, 1/*display*/); + + png_read_finish_row(png_ptr); + return; + } + break; + + default: + case 6: + if ((png_ptr->row_number & 1) == 0) + { + png_read_finish_row(png_ptr); + return; + } + break; + } + } +#endif + + if ((png_ptr->mode & PNG_HAVE_IDAT) == 0) + png_error(png_ptr, "Invalid attempt to read row data"); + + /* Fill the row with IDAT data: */ + png_ptr->row_buf[0]=255; /* to force error if no data was found */ + png_read_IDAT_data(png_ptr, png_ptr->row_buf, row_info.rowbytes + 1); + + if (png_ptr->row_buf[0] > PNG_FILTER_VALUE_NONE) + { + if (png_ptr->row_buf[0] < PNG_FILTER_VALUE_LAST) + png_read_filter_row(png_ptr, &row_info, png_ptr->row_buf + 1, + png_ptr->prev_row + 1, png_ptr->row_buf[0]); + else + png_error(png_ptr, "bad adaptive filter value"); + } + + /* libpng 1.5.6: the following line was copying png_ptr->rowbytes before + * 1.5.6, while the buffer really is this big in current versions of libpng + * it may not be in the future, so this was changed just to copy the + * interlaced count: + */ + memcpy(png_ptr->prev_row, png_ptr->row_buf, row_info.rowbytes + 1); + +#ifdef PNG_MNG_FEATURES_SUPPORTED + if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) != 0 && + (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING)) + { + /* Intrapixel differencing */ + png_do_read_intrapixel(&row_info, png_ptr->row_buf + 1); + } +#endif + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED + if (png_ptr->transformations +# ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED + || png_ptr->num_palette_max >= 0 +# endif + ) + png_do_read_transformations(png_ptr, &row_info); +#endif + + /* The transformed pixel depth should match the depth now in row_info. */ + if (png_ptr->transformed_pixel_depth == 0) + { + png_ptr->transformed_pixel_depth = row_info.pixel_depth; + if (row_info.pixel_depth > png_ptr->maximum_pixel_depth) + png_error(png_ptr, "sequential row overflow"); + } + + else if (png_ptr->transformed_pixel_depth != row_info.pixel_depth) + png_error(png_ptr, "internal sequential row size calculation error"); + +#ifdef PNG_READ_INTERLACING_SUPPORTED + /* Expand interlaced rows to full size */ + if (png_ptr->interlaced != 0 && + (png_ptr->transformations & PNG_INTERLACE) != 0) + { + if (png_ptr->pass < 6) + png_do_read_interlace(&row_info, png_ptr->row_buf + 1, png_ptr->pass, + png_ptr->transformations); + + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, 1/*display*/); + + if (row != NULL) + png_combine_row(png_ptr, row, 0/*row*/); + } + + else +#endif + { + if (row != NULL) + png_combine_row(png_ptr, row, -1/*ignored*/); + + if (dsp_row != NULL) + png_combine_row(png_ptr, dsp_row, -1/*ignored*/); + } + png_read_finish_row(png_ptr); + + if (png_ptr->read_row_fn != NULL) + (*(png_ptr->read_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass); + +} +#endif /* SEQUENTIAL_READ */ + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read one or more rows of image data. If the image is interlaced, + * and png_set_interlace_handling() has been called, the rows need to + * contain the contents of the rows from the previous pass. If the + * image has alpha or transparency, and png_handle_alpha()[*] has been + * called, the rows contents must be initialized to the contents of the + * screen. + * + * "row" holds the actual image, and pixels are placed in it + * as they arrive. If the image is displayed after each pass, it will + * appear to "sparkle" in. "display_row" can be used to display a + * "chunky" progressive image, with finer detail added as it becomes + * available. If you do not want this "chunky" display, you may pass + * NULL for display_row. If you do not want the sparkle display, and + * you have not called png_handle_alpha(), you may pass NULL for rows. + * If you have called png_handle_alpha(), and the image has either an + * alpha channel or a transparency chunk, you must provide a buffer for + * rows. In this case, you do not have to provide a display_row buffer + * also, but you may. If the image is not interlaced, or if you have + * not called png_set_interlace_handling(), the display_row buffer will + * be ignored, so pass NULL to it. + * + * [*] png_handle_alpha() does not exist yet, as of this version of libpng + */ + +void PNGAPI +png_read_rows(png_structrp png_ptr, png_bytepp row, + png_bytepp display_row, png_uint_32 num_rows) +{ + png_uint_32 i; + png_bytepp rp; + png_bytepp dp; + + png_debug(1, "in png_read_rows"); + + if (png_ptr == NULL) + return; + + rp = row; + dp = display_row; + if (rp != NULL && dp != NULL) + for (i = 0; i < num_rows; i++) + { + png_bytep rptr = *rp++; + png_bytep dptr = *dp++; + + png_read_row(png_ptr, rptr, dptr); + } + + else if (rp != NULL) + for (i = 0; i < num_rows; i++) + { + png_bytep rptr = *rp; + png_read_row(png_ptr, rptr, NULL); + rp++; + } + + else if (dp != NULL) + for (i = 0; i < num_rows; i++) + { + png_bytep dptr = *dp; + png_read_row(png_ptr, NULL, dptr); + dp++; + } +} +#endif /* SEQUENTIAL_READ */ + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the entire image. If the image has an alpha channel or a tRNS + * chunk, and you have called png_handle_alpha()[*], you will need to + * initialize the image to the current image that PNG will be overlaying. + * We set the num_rows again here, in case it was incorrectly set in + * png_read_start_row() by a call to png_read_update_info() or + * png_start_read_image() if png_set_interlace_handling() wasn't called + * prior to either of these functions like it should have been. You can + * only call this function once. If you desire to have an image for + * each pass of a interlaced image, use png_read_rows() instead. + * + * [*] png_handle_alpha() does not exist yet, as of this version of libpng + */ +void PNGAPI +png_read_image(png_structrp png_ptr, png_bytepp image) +{ + png_uint_32 i, image_height; + int pass, j; + png_bytepp rp; + + png_debug(1, "in png_read_image"); + + if (png_ptr == NULL) + return; + +#ifdef PNG_READ_INTERLACING_SUPPORTED + if ((png_ptr->flags & PNG_FLAG_ROW_INIT) == 0) + { + pass = png_set_interlace_handling(png_ptr); + /* And make sure transforms are initialized. */ + png_start_read_image(png_ptr); + } + else + { + if (png_ptr->interlaced != 0 && + (png_ptr->transformations & PNG_INTERLACE) == 0) + { + /* Caller called png_start_read_image or png_read_update_info without + * first turning on the PNG_INTERLACE transform. We can fix this here, + * but the caller should do it! + */ + png_warning(png_ptr, "Interlace handling should be turned on when " + "using png_read_image"); + /* Make sure this is set correctly */ + png_ptr->num_rows = png_ptr->height; + } + + /* Obtain the pass number, which also turns on the PNG_INTERLACE flag in + * the above error case. + */ + pass = png_set_interlace_handling(png_ptr); + } +#else + if (png_ptr->interlaced) + png_error(png_ptr, + "Cannot read interlaced image -- interlace handler disabled"); + + pass = 1; +#endif + + image_height=png_ptr->height; + + for (j = 0; j < pass; j++) + { + rp = image; + for (i = 0; i < image_height; i++) + { + png_read_row(png_ptr, *rp, NULL); + rp++; + } + } +} +#endif /* SEQUENTIAL_READ */ + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +/* Read the end of the PNG file. Will not read past the end of the + * file, will verify the end is accurate, and will read any comments + * or time information at the end of the file, if info is not NULL. + */ +void PNGAPI +png_read_end(png_structrp png_ptr, png_inforp info_ptr) +{ +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + int keep; +#endif + + png_debug(1, "in png_read_end"); + + if (png_ptr == NULL) + return; + + /* If png_read_end is called in the middle of reading the rows there may + * still be pending IDAT data and an owned zstream. Deal with this here. + */ +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + if (png_chunk_unknown_handling(png_ptr, png_IDAT) == 0) +#endif + png_read_finish_IDAT(png_ptr); + +#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED + /* Report invalid palette index; added at libng-1.5.10 */ + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && + png_ptr->num_palette_max >= png_ptr->num_palette) + png_benign_error(png_ptr, "Read palette index exceeding num_palette"); +#endif + + do + { + png_uint_32 length = png_read_chunk_header(png_ptr); + png_uint_32 chunk_name = png_ptr->chunk_name; + + if (chunk_name != png_IDAT) + { + /* These flags must be set consistently for all non-IDAT chunks, + * including the unknown chunks. + */ + png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT | PNG_AFTER_IDAT; + } + + if (chunk_name == png_IEND) + png_handle_chunk(png_ptr, info_ptr, length); + + else if (chunk_name == png_IHDR) + png_handle_chunk(png_ptr, info_ptr, length); + + else if (info_ptr == NULL) + png_crc_finish(png_ptr, length); + +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED + else if ((keep = png_chunk_unknown_handling(png_ptr, chunk_name)) != 0) + { + if (chunk_name == png_IDAT) + { + if ((length > 0 && !(png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED)) + || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT) != 0) + png_benign_error(png_ptr, ".Too many IDATs found"); + } + png_handle_unknown(png_ptr, info_ptr, length, keep); + if (chunk_name == png_PLTE) + png_ptr->mode |= PNG_HAVE_PLTE; + } +#endif + + else if (chunk_name == png_IDAT) + { + /* Zero length IDATs are legal after the last IDAT has been + * read, but not after other chunks have been read. 1.6 does not + * always read all the deflate data; specifically it cannot be relied + * upon to read the Adler32 at the end. If it doesn't ignore IDAT + * chunks which are longer than zero as well: + */ + if ((length > 0 && !(png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED)) + || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT) != 0) + png_benign_error(png_ptr, "..Too many IDATs found"); + + png_crc_finish(png_ptr, length); + } + + else + png_handle_chunk(png_ptr, info_ptr, length); + } while ((png_ptr->mode & PNG_HAVE_IEND) == 0); +} +#endif /* SEQUENTIAL_READ */ + +/* Free all memory used in the read struct */ +static void +png_read_destroy(png_structrp png_ptr) +{ + png_debug(1, "in png_read_destroy"); + +#ifdef PNG_READ_GAMMA_SUPPORTED + png_destroy_gamma_table(png_ptr); +#endif + + png_free(png_ptr, png_ptr->big_row_buf); + png_ptr->big_row_buf = NULL; + png_free(png_ptr, png_ptr->big_prev_row); + png_ptr->big_prev_row = NULL; + png_free(png_ptr, png_ptr->read_buffer); + png_ptr->read_buffer = NULL; + +#ifdef PNG_READ_QUANTIZE_SUPPORTED + png_free(png_ptr, png_ptr->palette_lookup); + png_ptr->palette_lookup = NULL; + png_free(png_ptr, png_ptr->quantize_index); + png_ptr->quantize_index = NULL; +#endif + + if ((png_ptr->free_me & PNG_FREE_PLTE) != 0) + { + png_zfree(png_ptr, png_ptr->palette); + png_ptr->palette = NULL; + } + png_ptr->free_me &= ~PNG_FREE_PLTE; + +#if defined(PNG_tRNS_SUPPORTED) || \ + defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) + if ((png_ptr->free_me & PNG_FREE_TRNS) != 0) + { + png_free(png_ptr, png_ptr->trans_alpha); + png_ptr->trans_alpha = NULL; + } + png_ptr->free_me &= ~PNG_FREE_TRNS; +#endif + + inflateEnd(&png_ptr->zstream); + +#ifdef PNG_PROGRESSIVE_READ_SUPPORTED + png_free(png_ptr, png_ptr->save_buffer); + png_ptr->save_buffer = NULL; +#endif + +#if defined(PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED) && \ + defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) + png_free(png_ptr, png_ptr->unknown_chunk.data); + png_ptr->unknown_chunk.data = NULL; +#endif + +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED + png_free(png_ptr, png_ptr->chunk_list); + png_ptr->chunk_list = NULL; +#endif + +#if defined(PNG_READ_EXPAND_SUPPORTED) && \ + (defined(PNG_ARM_NEON_IMPLEMENTATION) || \ + defined(PNG_RISCV_RVV_IMPLEMENTATION)) + png_free(png_ptr, png_ptr->riffled_palette); + png_ptr->riffled_palette = NULL; +#endif + + /* NOTE: the 'setjmp' buffer may still be allocated and the memory and error + * callbacks are still set at this point. They are required to complete the + * destruction of the png_struct itself. + */ +} + +/* Free all memory used by the read */ +void PNGAPI +png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr, + png_infopp end_info_ptr_ptr) +{ + png_structrp png_ptr = NULL; + + png_debug(1, "in png_destroy_read_struct"); + + if (png_ptr_ptr != NULL) + png_ptr = *png_ptr_ptr; + + if (png_ptr == NULL) + return; + + /* libpng 1.6.0: use the API to destroy info structs to ensure consistent + * behavior. Prior to 1.6.0 libpng did extra 'info' destruction in this API. + * The extra was, apparently, unnecessary yet this hides memory leak bugs. + */ + png_destroy_info_struct(png_ptr, end_info_ptr_ptr); + png_destroy_info_struct(png_ptr, info_ptr_ptr); + + *png_ptr_ptr = NULL; + png_read_destroy(png_ptr); + png_destroy_png_struct(png_ptr); +} + +void PNGAPI +png_set_read_status_fn(png_structrp png_ptr, png_read_status_ptr read_row_fn) +{ + if (png_ptr == NULL) + return; + + png_ptr->read_row_fn = read_row_fn; +} + + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +#ifdef PNG_INFO_IMAGE_SUPPORTED +void PNGAPI +png_read_png(png_structrp png_ptr, png_inforp info_ptr, + int transforms, voidp params) +{ + png_debug(1, "in png_read_png"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + /* png_read_info() gives us all of the information from the + * PNG file before the first IDAT (image data chunk). + */ + png_read_info(png_ptr, info_ptr); + if (info_ptr->height > PNG_UINT_32_MAX/(sizeof (png_bytep))) + png_error(png_ptr, "Image is too high to process with png_read_png()"); + + /* -------------- image transformations start here ------------------- */ + /* libpng 1.6.10: add code to cause a png_app_error if a selected TRANSFORM + * is not implemented. This will only happen in de-configured (non-default) + * libpng builds. The results can be unexpected - png_read_png may return + * short or mal-formed rows because the transform is skipped. + */ + + /* Tell libpng to strip 16-bit/color files down to 8 bits per color. + */ + if ((transforms & PNG_TRANSFORM_SCALE_16) != 0) + /* Added at libpng-1.5.4. "strip_16" produces the same result that it + * did in earlier versions, while "scale_16" is now more accurate. + */ +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED + png_set_scale_16(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_SCALE_16 not supported"); +#endif + + /* If both SCALE and STRIP are required pngrtran will effectively cancel the + * latter by doing SCALE first. This is ok and allows apps not to check for + * which is supported to get the right answer. + */ + if ((transforms & PNG_TRANSFORM_STRIP_16) != 0) +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED + png_set_strip_16(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_STRIP_16 not supported"); +#endif + + /* Strip alpha bytes from the input data without combining with + * the background (not recommended). + */ + if ((transforms & PNG_TRANSFORM_STRIP_ALPHA) != 0) +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED + png_set_strip_alpha(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_STRIP_ALPHA not supported"); +#endif + + /* Extract multiple pixels with bit depths of 1, 2, or 4 from a single + * byte into separate bytes (useful for paletted and grayscale images). + */ + if ((transforms & PNG_TRANSFORM_PACKING) != 0) +#ifdef PNG_READ_PACK_SUPPORTED + png_set_packing(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_PACKING not supported"); +#endif + + /* Change the order of packed pixels to least significant bit first + * (not useful if you are using png_set_packing). + */ + if ((transforms & PNG_TRANSFORM_PACKSWAP) != 0) +#ifdef PNG_READ_PACKSWAP_SUPPORTED + png_set_packswap(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_PACKSWAP not supported"); +#endif + + /* Expand paletted colors into true RGB triplets + * Expand grayscale images to full 8 bits from 1, 2, or 4 bits/pixel + * Expand paletted or RGB images with transparency to full alpha + * channels so the data will be available as RGBA quartets. + */ + if ((transforms & PNG_TRANSFORM_EXPAND) != 0) +#ifdef PNG_READ_EXPAND_SUPPORTED + png_set_expand(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_EXPAND not supported"); +#endif + + /* We don't handle background color or gamma transformation or quantizing. + */ + + /* Invert monochrome files to have 0 as white and 1 as black + */ + if ((transforms & PNG_TRANSFORM_INVERT_MONO) != 0) +#ifdef PNG_READ_INVERT_SUPPORTED + png_set_invert_mono(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_INVERT_MONO not supported"); +#endif + + /* If you want to shift the pixel values from the range [0,255] or + * [0,65535] to the original [0,7] or [0,31], or whatever range the + * colors were originally in: + */ + if ((transforms & PNG_TRANSFORM_SHIFT) != 0) +#ifdef PNG_READ_SHIFT_SUPPORTED + if ((info_ptr->valid & PNG_INFO_sBIT) != 0) + png_set_shift(png_ptr, &info_ptr->sig_bit); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_SHIFT not supported"); +#endif + + /* Flip the RGB pixels to BGR (or RGBA to BGRA) */ + if ((transforms & PNG_TRANSFORM_BGR) != 0) +#ifdef PNG_READ_BGR_SUPPORTED + png_set_bgr(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_BGR not supported"); +#endif + + /* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */ + if ((transforms & PNG_TRANSFORM_SWAP_ALPHA) != 0) +#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED + png_set_swap_alpha(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_SWAP_ALPHA not supported"); +#endif + + /* Swap bytes of 16-bit files to least significant byte first */ + if ((transforms & PNG_TRANSFORM_SWAP_ENDIAN) != 0) +#ifdef PNG_READ_SWAP_SUPPORTED + png_set_swap(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_SWAP_ENDIAN not supported"); +#endif + +/* Added at libpng-1.2.41 */ + /* Invert the alpha channel from opacity to transparency */ + if ((transforms & PNG_TRANSFORM_INVERT_ALPHA) != 0) +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED + png_set_invert_alpha(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_INVERT_ALPHA not supported"); +#endif + +/* Added at libpng-1.2.41 */ + /* Expand grayscale image to RGB */ + if ((transforms & PNG_TRANSFORM_GRAY_TO_RGB) != 0) +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED + png_set_gray_to_rgb(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_GRAY_TO_RGB not supported"); +#endif + +/* Added at libpng-1.5.4 */ + if ((transforms & PNG_TRANSFORM_EXPAND_16) != 0) +#ifdef PNG_READ_EXPAND_16_SUPPORTED + png_set_expand_16(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_EXPAND_16 not supported"); +#endif + + /* We don't handle adding filler bytes */ + + /* We use png_read_image and rely on that for interlace handling, but we also + * call png_read_update_info therefore must turn on interlace handling now: + */ + (void)png_set_interlace_handling(png_ptr); + + /* Optional call to gamma correct and add the background to the palette + * and update info structure. REQUIRED if you are expecting libpng to + * update the palette for you (i.e., you selected such a transform above). + */ + png_read_update_info(png_ptr, info_ptr); + + /* -------------- image transformations end here ------------------- */ + + png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0); + if (info_ptr->row_pointers == NULL) + { + png_uint_32 iptr; + + info_ptr->row_pointers = png_voidcast(png_bytepp, png_malloc(png_ptr, + info_ptr->height * (sizeof (png_bytep)))); + + for (iptr=0; iptrheight; iptr++) + info_ptr->row_pointers[iptr] = NULL; + + info_ptr->free_me |= PNG_FREE_ROWS; + + for (iptr = 0; iptr < info_ptr->height; iptr++) + info_ptr->row_pointers[iptr] = png_voidcast(png_bytep, + png_malloc(png_ptr, info_ptr->rowbytes)); + } + + png_read_image(png_ptr, info_ptr->row_pointers); + info_ptr->valid |= PNG_INFO_IDAT; + + /* Read rest of file, and get additional chunks in info_ptr - REQUIRED */ + png_read_end(png_ptr, info_ptr); + + PNG_UNUSED(params) +} +#endif /* INFO_IMAGE */ +#endif /* SEQUENTIAL_READ */ + +#ifdef PNG_SIMPLIFIED_READ_SUPPORTED +/* SIMPLIFIED READ + * + * This code currently relies on the sequential reader, though it could easily + * be made to work with the progressive one. + */ +/* Arguments to png_image_finish_read: */ + +/* Encoding of PNG data (used by the color-map code) */ +# define P_NOTSET 0 /* File encoding not yet known */ +# define P_sRGB 1 /* 8-bit encoded to sRGB gamma */ +# define P_LINEAR 2 /* 16-bit linear: not encoded, NOT pre-multiplied! */ +# define P_FILE 3 /* 8-bit encoded to file gamma, not sRGB or linear */ +# define P_LINEAR8 4 /* 8-bit linear: only from a file value */ + +/* Color-map processing: after libpng has run on the PNG image further + * processing may be needed to convert the data to color-map indices. + */ +#define PNG_CMAP_NONE 0 +#define PNG_CMAP_GA 1 /* Process GA data to a color-map with alpha */ +#define PNG_CMAP_TRANS 2 /* Process GA data to a background index */ +#define PNG_CMAP_RGB 3 /* Process RGB data */ +#define PNG_CMAP_RGB_ALPHA 4 /* Process RGBA data */ + +/* The following document where the background is for each processing case. */ +#define PNG_CMAP_NONE_BACKGROUND 256 +#define PNG_CMAP_GA_BACKGROUND 231 +#define PNG_CMAP_TRANS_BACKGROUND 254 +#define PNG_CMAP_RGB_BACKGROUND 256 +#define PNG_CMAP_RGB_ALPHA_BACKGROUND 216 + +typedef struct +{ + /* Arguments: */ + png_imagep image; + png_voidp buffer; + png_int_32 row_stride; + png_voidp colormap; + png_const_colorp background; + /* Local variables: */ + png_voidp local_row; + png_voidp first_row; + ptrdiff_t row_bytes; /* step between rows */ + int file_encoding; /* E_ values above */ + png_fixed_point gamma_to_linear; /* For P_FILE, reciprocal of gamma */ + int colormap_processing; /* PNG_CMAP_ values above */ +} png_image_read_control; + +/* Do all the *safe* initialization - 'safe' means that png_error won't be + * called, so setting up the jmp_buf is not required. This means that anything + * called from here must *not* call png_malloc - it has to call png_malloc_warn + * instead so that control is returned safely back to this routine. + */ +static int +png_image_read_init(png_imagep image) +{ + if (image->opaque == NULL) + { + png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, image, + png_safe_error, png_safe_warning); + + /* And set the rest of the structure to NULL to ensure that the various + * fields are consistent. + */ + memset(image, 0, (sizeof *image)); + image->version = PNG_IMAGE_VERSION; + + if (png_ptr != NULL) + { + png_infop info_ptr = png_create_info_struct(png_ptr); + + if (info_ptr != NULL) + { + png_controlp control = png_voidcast(png_controlp, + png_malloc_warn(png_ptr, (sizeof *control))); + + if (control != NULL) + { + memset(control, 0, (sizeof *control)); + + control->png_ptr = png_ptr; + control->info_ptr = info_ptr; + control->for_write = 0; + + image->opaque = control; + return 1; + } + + /* Error clean up */ + png_destroy_info_struct(png_ptr, &info_ptr); + } + + png_destroy_read_struct(&png_ptr, NULL, NULL); + } + + return png_image_error(image, "png_image_read: out of memory"); + } + + return png_image_error(image, "png_image_read: opaque pointer not NULL"); +} + +/* Utility to find the base format of a PNG file from a png_struct. */ +static png_uint_32 +png_image_format(png_structrp png_ptr) +{ + png_uint_32 format = 0; + + if ((png_ptr->color_type & PNG_COLOR_MASK_COLOR) != 0) + format |= PNG_FORMAT_FLAG_COLOR; + + if ((png_ptr->color_type & PNG_COLOR_MASK_ALPHA) != 0) + format |= PNG_FORMAT_FLAG_ALPHA; + + /* Use png_ptr here, not info_ptr, because by examination png_handle_tRNS + * sets the png_struct fields; that's all we are interested in here. The + * precise interaction with an app call to png_set_tRNS and PNG file reading + * is unclear. + */ + else if (png_ptr->num_trans > 0) + format |= PNG_FORMAT_FLAG_ALPHA; + + if (png_ptr->bit_depth == 16) + format |= PNG_FORMAT_FLAG_LINEAR; + + if ((png_ptr->color_type & PNG_COLOR_MASK_PALETTE) != 0) + format |= PNG_FORMAT_FLAG_COLORMAP; + + return format; +} + +static int +chromaticities_match_sRGB(const png_xy *xy) +{ +# define sRGB_TOLERANCE 1000 + static const png_xy sRGB_xy = /* From ITU-R BT.709-3 */ + { + /* color x y */ + /* red */ 64000, 33000, + /* green */ 30000, 60000, + /* blue */ 15000, 6000, + /* white */ 31270, 32900 + }; + + if (PNG_OUT_OF_RANGE(xy->whitex, sRGB_xy.whitex,sRGB_TOLERANCE) || + PNG_OUT_OF_RANGE(xy->whitey, sRGB_xy.whitey,sRGB_TOLERANCE) || + PNG_OUT_OF_RANGE(xy->redx, sRGB_xy.redx, sRGB_TOLERANCE) || + PNG_OUT_OF_RANGE(xy->redy, sRGB_xy.redy, sRGB_TOLERANCE) || + PNG_OUT_OF_RANGE(xy->greenx, sRGB_xy.greenx,sRGB_TOLERANCE) || + PNG_OUT_OF_RANGE(xy->greeny, sRGB_xy.greeny,sRGB_TOLERANCE) || + PNG_OUT_OF_RANGE(xy->bluex, sRGB_xy.bluex, sRGB_TOLERANCE) || + PNG_OUT_OF_RANGE(xy->bluey, sRGB_xy.bluey, sRGB_TOLERANCE)) + return 0; + return 1; +} + +/* Is the given gamma significantly different from sRGB? The test is the same + * one used in pngrtran.c when deciding whether to do gamma correction. The + * arithmetic optimizes the division by using the fact that the inverse of the + * file sRGB gamma is 2.2 + */ +static int +png_gamma_not_sRGB(png_fixed_point g) +{ + /* 1.6.47: use the same sanity checks as used in pngrtran.c */ + if (g < PNG_LIB_GAMMA_MIN || g > PNG_LIB_GAMMA_MAX) + return 0; /* Includes the uninitialized value 0 */ + + return png_gamma_significant((g * 11 + 2)/5 /* i.e. *2.2, rounded */); +} + +/* Do the main body of a 'png_image_begin_read' function; read the PNG file + * header and fill in all the information. This is executed in a safe context, + * unlike the init routine above. + */ +static int +png_image_is_not_sRGB(png_const_structrp png_ptr) +{ + /* Does the colorspace **not** match sRGB? The flag is only set if the + * answer can be determined reliably. + * + * png_struct::chromaticities always exists since the simplified API + * requires rgb-to-gray. The mDCV, cICP and cHRM chunks may all set it to + * a non-sRGB value, so it needs to be checked but **only** if one of + * those chunks occured in the file. + */ + /* Highest priority: check to be safe. */ + if (png_has_chunk(png_ptr, cICP) || png_has_chunk(png_ptr, mDCV)) + return !chromaticities_match_sRGB(&png_ptr->chromaticities); + + /* If the image is marked as sRGB then it is... */ + if (png_has_chunk(png_ptr, sRGB)) + return 0; + + /* Last stop: cHRM, must check: */ + if (png_has_chunk(png_ptr, cHRM)) + return !chromaticities_match_sRGB(&png_ptr->chromaticities); + + /* Else default to sRGB */ + return 0; +} + +static int +png_image_read_header(png_voidp argument) +{ + png_imagep image = png_voidcast(png_imagep, argument); + png_structrp png_ptr = image->opaque->png_ptr; + png_inforp info_ptr = image->opaque->info_ptr; + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED + png_set_benign_errors(png_ptr, 1/*warn*/); +#endif + png_read_info(png_ptr, info_ptr); + + /* Do this the fast way; just read directly out of png_struct. */ + image->width = png_ptr->width; + image->height = png_ptr->height; + + { + png_uint_32 format = png_image_format(png_ptr); + + image->format = format; + + /* Greyscale images don't (typically) have colour space information and + * using it is pretty much impossible, so use sRGB for grayscale (it + * doesn't matter r==g==b so the transform is irrelevant.) + */ + if ((format & PNG_FORMAT_FLAG_COLOR) != 0 && + png_image_is_not_sRGB(png_ptr)) + image->flags |= PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB; + } + + /* We need the maximum number of entries regardless of the format the + * application sets here. + */ + { + png_uint_32 cmap_entries; + + switch (png_ptr->color_type) + { + case PNG_COLOR_TYPE_GRAY: + cmap_entries = 1U << png_ptr->bit_depth; + break; + + case PNG_COLOR_TYPE_PALETTE: + cmap_entries = (png_uint_32)png_ptr->num_palette; + break; + + default: + cmap_entries = 256; + break; + } + + if (cmap_entries > 256) + cmap_entries = 256; + + image->colormap_entries = cmap_entries; + } + + return 1; +} + +#ifdef PNG_STDIO_SUPPORTED +int PNGAPI +png_image_begin_read_from_stdio(png_imagep image, FILE *file) +{ + if (image != NULL && image->version == PNG_IMAGE_VERSION) + { + if (file != NULL) + { + if (png_image_read_init(image) != 0) + { + /* This is slightly evil, but png_init_io doesn't do anything other + * than this and we haven't changed the standard IO functions so + * this saves a 'safe' function. + */ + image->opaque->png_ptr->io_ptr = file; + return png_safe_execute(image, png_image_read_header, image); + } + } + + else + return png_image_error(image, + "png_image_begin_read_from_stdio: invalid argument"); + } + + else if (image != NULL) + return png_image_error(image, + "png_image_begin_read_from_stdio: incorrect PNG_IMAGE_VERSION"); + + return 0; +} + +int PNGAPI +png_image_begin_read_from_file(png_imagep image, const char *file_name) +{ + if (image != NULL && image->version == PNG_IMAGE_VERSION) + { + if (file_name != NULL) + { + FILE *fp = fopen(file_name, "rb"); + + if (fp != NULL) + { + if (png_image_read_init(image) != 0) + { + image->opaque->png_ptr->io_ptr = fp; + image->opaque->owned_file = 1; + return png_safe_execute(image, png_image_read_header, image); + } + + /* Clean up: just the opened file. */ + (void)fclose(fp); + } + + else + return png_image_error(image, strerror(errno)); + } + + else + return png_image_error(image, + "png_image_begin_read_from_file: invalid argument"); + } + + else if (image != NULL) + return png_image_error(image, + "png_image_begin_read_from_file: incorrect PNG_IMAGE_VERSION"); + + return 0; +} +#endif /* STDIO */ + +static void PNGCBAPI +png_image_memory_read(png_structp png_ptr, png_bytep out, size_t need) +{ + if (png_ptr != NULL) + { + png_imagep image = png_voidcast(png_imagep, png_ptr->io_ptr); + if (image != NULL) + { + png_controlp cp = image->opaque; + if (cp != NULL) + { + png_const_bytep memory = cp->memory; + size_t size = cp->size; + + if (memory != NULL && size >= need) + { + memcpy(out, memory, need); + cp->memory = memory + need; + cp->size = size - need; + return; + } + + png_error(png_ptr, "read beyond end of data"); + } + } + + png_error(png_ptr, "invalid memory read"); + } +} + +int PNGAPI png_image_begin_read_from_memory(png_imagep image, + png_const_voidp memory, size_t size) +{ + if (image != NULL && image->version == PNG_IMAGE_VERSION) + { + if (memory != NULL && size > 0) + { + if (png_image_read_init(image) != 0) + { + /* Now set the IO functions to read from the memory buffer and + * store it into io_ptr. Again do this in-place to avoid calling a + * libpng function that requires error handling. + */ + image->opaque->memory = png_voidcast(png_const_bytep, memory); + image->opaque->size = size; + image->opaque->png_ptr->io_ptr = image; + image->opaque->png_ptr->read_data_fn = png_image_memory_read; + + return png_safe_execute(image, png_image_read_header, image); + } + } + + else + return png_image_error(image, + "png_image_begin_read_from_memory: invalid argument"); + } + + else if (image != NULL) + return png_image_error(image, + "png_image_begin_read_from_memory: incorrect PNG_IMAGE_VERSION"); + + return 0; +} + +/* Utility function to skip chunks that are not used by the simplified image + * read functions and an appropriate macro to call it. + */ +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +static void +png_image_skip_unused_chunks(png_structrp png_ptr) +{ + /* Prepare the reader to ignore all recognized chunks whose data will not + * be used, i.e., all chunks recognized by libpng except for those + * involved in basic image reading: + * + * IHDR, PLTE, IDAT, IEND + * + * Or image data handling: + * + * tRNS, bKGD, gAMA, cHRM, sRGB, [iCCP] and sBIT. + * + * This provides a small performance improvement and eliminates any + * potential vulnerability to security problems in the unused chunks. + * + * At present the iCCP chunk data isn't used, so iCCP chunk can be ignored + * too. This allows the simplified API to be compiled without iCCP support. + */ + { + static const png_byte chunks_to_process[] = { + 98, 75, 71, 68, '\0', /* bKGD */ + 99, 72, 82, 77, '\0', /* cHRM */ + 99, 73, 67, 80, '\0', /* cICP */ + 103, 65, 77, 65, '\0', /* gAMA */ + 109, 68, 67, 86, '\0', /* mDCV */ + 115, 66, 73, 84, '\0', /* sBIT */ + 115, 82, 71, 66, '\0', /* sRGB */ + }; + + /* Ignore unknown chunks and all other chunks except for the + * IHDR, PLTE, tRNS, IDAT, and IEND chunks. + */ + png_set_keep_unknown_chunks(png_ptr, PNG_HANDLE_CHUNK_NEVER, + NULL, -1); + + /* But do not ignore image data handling chunks */ + png_set_keep_unknown_chunks(png_ptr, PNG_HANDLE_CHUNK_AS_DEFAULT, + chunks_to_process, (int)/*SAFE*/(sizeof chunks_to_process)/5); + } +} + +# define PNG_SKIP_CHUNKS(p) png_image_skip_unused_chunks(p) +#else +# define PNG_SKIP_CHUNKS(p) ((void)0) +#endif /* HANDLE_AS_UNKNOWN */ + +/* The following macro gives the exact rounded answer for all values in the + * range 0..255 (it actually divides by 51.2, but the rounding still generates + * the correct numbers 0..5 + */ +#define PNG_DIV51(v8) (((v8) * 5 + 130) >> 8) + +/* Utility functions to make particular color-maps */ +static void +set_file_encoding(png_image_read_control *display) +{ + png_structrp png_ptr = display->image->opaque->png_ptr; + png_fixed_point g = png_resolve_file_gamma(png_ptr); + + /* PNGv3: the result may be 0 however the 'default_gamma' should have been + * set before this is called so zero is an error: + */ + if (g == 0) + png_error(png_ptr, "internal: default gamma not set"); + + if (png_gamma_significant(g) != 0) + { + if (png_gamma_not_sRGB(g) != 0) + { + display->file_encoding = P_FILE; + display->gamma_to_linear = png_reciprocal(g); + } + + else + display->file_encoding = P_sRGB; + } + + else + display->file_encoding = P_LINEAR8; +} + +static unsigned int +decode_gamma(png_image_read_control *display, png_uint_32 value, int encoding) +{ + if (encoding == P_FILE) /* double check */ + encoding = display->file_encoding; + + if (encoding == P_NOTSET) /* must be the file encoding */ + { + set_file_encoding(display); + encoding = display->file_encoding; + } + + switch (encoding) + { + case P_FILE: + value = png_gamma_16bit_correct(value*257, display->gamma_to_linear); + break; + + case P_sRGB: + value = png_sRGB_table[value]; + break; + + case P_LINEAR: + break; + + case P_LINEAR8: + value *= 257; + break; + +#ifdef __GNUC__ + default: + png_error(display->image->opaque->png_ptr, + "unexpected encoding (internal error)"); +#endif + } + + return value; +} + +static png_uint_32 +png_colormap_compose(png_image_read_control *display, + png_uint_32 foreground, int foreground_encoding, png_uint_32 alpha, + png_uint_32 background, int encoding) +{ + /* The file value is composed on the background, the background has the given + * encoding and so does the result, the file is encoded with P_FILE and the + * file and alpha are 8-bit values. The (output) encoding will always be + * P_LINEAR or P_sRGB. + */ + png_uint_32 f = decode_gamma(display, foreground, foreground_encoding); + png_uint_32 b = decode_gamma(display, background, encoding); + + /* The alpha is always an 8-bit value (it comes from the palette), the value + * scaled by 255 is what PNG_sRGB_FROM_LINEAR requires. + */ + f = f * alpha + b * (255-alpha); + + if (encoding == P_LINEAR) + { + /* Scale to 65535; divide by 255, approximately (in fact this is extremely + * accurate, it divides by 255.00000005937181414556, with no overflow.) + */ + f *= 257; /* Now scaled by 65535 */ + f += f >> 16; + f = (f+32768) >> 16; + } + + else /* P_sRGB */ + f = PNG_sRGB_FROM_LINEAR(f); + + return f; +} + +/* NOTE: P_LINEAR values to this routine must be 16-bit, but P_FILE values must + * be 8-bit. + */ +static void +png_create_colormap_entry(png_image_read_control *display, + png_uint_32 ip, png_uint_32 red, png_uint_32 green, png_uint_32 blue, + png_uint_32 alpha, int encoding) +{ + png_imagep image = display->image; + int output_encoding = (image->format & PNG_FORMAT_FLAG_LINEAR) != 0 ? + P_LINEAR : P_sRGB; + int convert_to_Y = (image->format & PNG_FORMAT_FLAG_COLOR) == 0 && + (red != green || green != blue); + + if (ip > 255) + png_error(image->opaque->png_ptr, "color-map index out of range"); + + /* Update the cache with whether the file gamma is significantly different + * from sRGB. + */ + if (encoding == P_FILE) + { + if (display->file_encoding == P_NOTSET) + set_file_encoding(display); + + /* Note that the cached value may be P_FILE too, but if it is then the + * gamma_to_linear member has been set. + */ + encoding = display->file_encoding; + } + + if (encoding == P_FILE) + { + png_fixed_point g = display->gamma_to_linear; + + red = png_gamma_16bit_correct(red*257, g); + green = png_gamma_16bit_correct(green*257, g); + blue = png_gamma_16bit_correct(blue*257, g); + + if (convert_to_Y != 0 || output_encoding == P_LINEAR) + { + alpha *= 257; + encoding = P_LINEAR; + } + + else + { + red = PNG_sRGB_FROM_LINEAR(red * 255); + green = PNG_sRGB_FROM_LINEAR(green * 255); + blue = PNG_sRGB_FROM_LINEAR(blue * 255); + encoding = P_sRGB; + } + } + + else if (encoding == P_LINEAR8) + { + /* This encoding occurs quite frequently in test cases because PngSuite + * includes a gAMA 1.0 chunk with most images. + */ + red *= 257; + green *= 257; + blue *= 257; + alpha *= 257; + encoding = P_LINEAR; + } + + else if (encoding == P_sRGB && + (convert_to_Y != 0 || output_encoding == P_LINEAR)) + { + /* The values are 8-bit sRGB values, but must be converted to 16-bit + * linear. + */ + red = png_sRGB_table[red]; + green = png_sRGB_table[green]; + blue = png_sRGB_table[blue]; + alpha *= 257; + encoding = P_LINEAR; + } + + /* This is set if the color isn't gray but the output is. */ + if (encoding == P_LINEAR) + { + if (convert_to_Y != 0) + { + /* NOTE: these values are copied from png_do_rgb_to_gray */ + png_uint_32 y = (png_uint_32)6968 * red + (png_uint_32)23434 * green + + (png_uint_32)2366 * blue; + + if (output_encoding == P_LINEAR) + y = (y + 16384) >> 15; + + else + { + /* y is scaled by 32768, we need it scaled by 255: */ + y = (y + 128) >> 8; + y *= 255; + y = PNG_sRGB_FROM_LINEAR((y + 64) >> 7); + alpha = PNG_DIV257(alpha); + encoding = P_sRGB; + } + + blue = red = green = y; + } + + else if (output_encoding == P_sRGB) + { + red = PNG_sRGB_FROM_LINEAR(red * 255); + green = PNG_sRGB_FROM_LINEAR(green * 255); + blue = PNG_sRGB_FROM_LINEAR(blue * 255); + alpha = PNG_DIV257(alpha); + encoding = P_sRGB; + } + } + + if (encoding != output_encoding) + png_error(image->opaque->png_ptr, "bad encoding (internal error)"); + + /* Store the value. */ + { +# ifdef PNG_FORMAT_AFIRST_SUPPORTED + int afirst = (image->format & PNG_FORMAT_FLAG_AFIRST) != 0 && + (image->format & PNG_FORMAT_FLAG_ALPHA) != 0; +# else +# define afirst 0 +# endif +# ifdef PNG_FORMAT_BGR_SUPPORTED + int bgr = (image->format & PNG_FORMAT_FLAG_BGR) != 0 ? 2 : 0; +# else +# define bgr 0 +# endif + + if (output_encoding == P_LINEAR) + { + png_uint_16p entry = png_voidcast(png_uint_16p, display->colormap); + + entry += ip * PNG_IMAGE_SAMPLE_CHANNELS(image->format); + + /* The linear 16-bit values must be pre-multiplied by the alpha channel + * value, if less than 65535 (this is, effectively, composite on black + * if the alpha channel is removed.) + */ + switch (PNG_IMAGE_SAMPLE_CHANNELS(image->format)) + { + case 4: + entry[afirst ? 0 : 3] = (png_uint_16)alpha; + /* FALLTHROUGH */ + + case 3: + if (alpha < 65535) + { + if (alpha > 0) + { + blue = (blue * alpha + 32767U)/65535U; + green = (green * alpha + 32767U)/65535U; + red = (red * alpha + 32767U)/65535U; + } + + else + red = green = blue = 0; + } + entry[afirst + (2 ^ bgr)] = (png_uint_16)blue; + entry[afirst + 1] = (png_uint_16)green; + entry[afirst + bgr] = (png_uint_16)red; + break; + + case 2: + entry[1 ^ afirst] = (png_uint_16)alpha; + /* FALLTHROUGH */ + + case 1: + if (alpha < 65535) + { + if (alpha > 0) + green = (green * alpha + 32767U)/65535U; + + else + green = 0; + } + entry[afirst] = (png_uint_16)green; + break; + + default: + break; + } + } + + else /* output encoding is P_sRGB */ + { + png_bytep entry = png_voidcast(png_bytep, display->colormap); + + entry += ip * PNG_IMAGE_SAMPLE_CHANNELS(image->format); + + switch (PNG_IMAGE_SAMPLE_CHANNELS(image->format)) + { + case 4: + entry[afirst ? 0 : 3] = (png_byte)alpha; + /* FALLTHROUGH */ + case 3: + entry[afirst + (2 ^ bgr)] = (png_byte)blue; + entry[afirst + 1] = (png_byte)green; + entry[afirst + bgr] = (png_byte)red; + break; + + case 2: + entry[1 ^ afirst] = (png_byte)alpha; + /* FALLTHROUGH */ + case 1: + entry[afirst] = (png_byte)green; + break; + + default: + break; + } + } + +# ifdef afirst +# undef afirst +# endif +# ifdef bgr +# undef bgr +# endif + } +} + +static int +make_gray_file_colormap(png_image_read_control *display) +{ + unsigned int i; + + for (i=0; i<256; ++i) + png_create_colormap_entry(display, i, i, i, i, 255, P_FILE); + + return (int)i; +} + +static int +make_gray_colormap(png_image_read_control *display) +{ + unsigned int i; + + for (i=0; i<256; ++i) + png_create_colormap_entry(display, i, i, i, i, 255, P_sRGB); + + return (int)i; +} +#define PNG_GRAY_COLORMAP_ENTRIES 256 + +static int +make_ga_colormap(png_image_read_control *display) +{ + unsigned int i, a; + + /* Alpha is retained, the output will be a color-map with entries + * selected by six levels of alpha. One transparent entry, 6 gray + * levels for all the intermediate alpha values, leaving 230 entries + * for the opaque grays. The color-map entries are the six values + * [0..5]*51, the GA processing uses PNG_DIV51(value) to find the + * relevant entry. + * + * if (alpha > 229) // opaque + * { + * // The 231 entries are selected to make the math below work: + * base = 0; + * entry = (231 * gray + 128) >> 8; + * } + * else if (alpha < 26) // transparent + * { + * base = 231; + * entry = 0; + * } + * else // partially opaque + * { + * base = 226 + 6 * PNG_DIV51(alpha); + * entry = PNG_DIV51(gray); + * } + */ + i = 0; + while (i < 231) + { + unsigned int gray = (i * 256 + 115) / 231; + png_create_colormap_entry(display, i++, gray, gray, gray, 255, P_sRGB); + } + + /* 255 is used here for the component values for consistency with the code + * that undoes premultiplication in pngwrite.c. + */ + png_create_colormap_entry(display, i++, 255, 255, 255, 0, P_sRGB); + + for (a=1; a<5; ++a) + { + unsigned int g; + + for (g=0; g<6; ++g) + png_create_colormap_entry(display, i++, g*51, g*51, g*51, a*51, + P_sRGB); + } + + return (int)i; +} + +#define PNG_GA_COLORMAP_ENTRIES 256 + +static int +make_rgb_colormap(png_image_read_control *display) +{ + unsigned int i, r; + + /* Build a 6x6x6 opaque RGB cube */ + for (i=r=0; r<6; ++r) + { + unsigned int g; + + for (g=0; g<6; ++g) + { + unsigned int b; + + for (b=0; b<6; ++b) + png_create_colormap_entry(display, i++, r*51, g*51, b*51, 255, + P_sRGB); + } + } + + return (int)i; +} + +#define PNG_RGB_COLORMAP_ENTRIES 216 + +/* Return a palette index to the above palette given three 8-bit sRGB values. */ +#define PNG_RGB_INDEX(r,g,b) \ + ((png_byte)(6 * (6 * PNG_DIV51(r) + PNG_DIV51(g)) + PNG_DIV51(b))) + +static int +png_image_read_colormap(png_voidp argument) +{ + png_image_read_control *display = + png_voidcast(png_image_read_control*, argument); + png_imagep image = display->image; + + png_structrp png_ptr = image->opaque->png_ptr; + png_uint_32 output_format = image->format; + int output_encoding = (output_format & PNG_FORMAT_FLAG_LINEAR) != 0 ? + P_LINEAR : P_sRGB; + + unsigned int cmap_entries; + unsigned int output_processing; /* Output processing option */ + unsigned int data_encoding = P_NOTSET; /* Encoding libpng must produce */ + + /* Background information; the background color and the index of this color + * in the color-map if it exists (else 256). + */ + unsigned int background_index = 256; + png_uint_32 back_r, back_g, back_b; + + /* Flags to accumulate things that need to be done to the input. */ + int expand_tRNS = 0; + + /* Exclude the NYI feature of compositing onto a color-mapped buffer; it is + * very difficult to do, the results look awful, and it is difficult to see + * what possible use it is because the application can't control the + * color-map. + */ + if (((png_ptr->color_type & PNG_COLOR_MASK_ALPHA) != 0 || + png_ptr->num_trans > 0) /* alpha in input */ && + ((output_format & PNG_FORMAT_FLAG_ALPHA) == 0) /* no alpha in output */) + { + if (output_encoding == P_LINEAR) /* compose on black */ + back_b = back_g = back_r = 0; + + else if (display->background == NULL /* no way to remove it */) + png_error(png_ptr, + "background color must be supplied to remove alpha/transparency"); + + /* Get a copy of the background color (this avoids repeating the checks + * below.) The encoding is 8-bit sRGB or 16-bit linear, depending on the + * output format. + */ + else + { + back_g = display->background->green; + if ((output_format & PNG_FORMAT_FLAG_COLOR) != 0) + { + back_r = display->background->red; + back_b = display->background->blue; + } + else + back_b = back_r = back_g; + } + } + + else if (output_encoding == P_LINEAR) + back_b = back_r = back_g = 65535; + + else + back_b = back_r = back_g = 255; + + /* Default the input file gamma if required - this is necessary because + * libpng assumes that if no gamma information is present the data is in the + * output format, but the simplified API deduces the gamma from the input + * format. The 'default' gamma value is also set by png_set_alpha_mode, but + * this is happening before any such call, so: + * + * TODO: should be an internal API and all this code should be copied into a + * single common gamma+colorspace file. + */ + if (png_ptr->bit_depth == 16 && + (image->flags & PNG_IMAGE_FLAG_16BIT_sRGB) == 0) + png_ptr->default_gamma = PNG_GAMMA_LINEAR; + + else + png_ptr->default_gamma = PNG_GAMMA_sRGB_INVERSE; + + /* Decide what to do based on the PNG color type of the input data. The + * utility function png_create_colormap_entry deals with most aspects of the + * output transformations; this code works out how to produce bytes of + * color-map entries from the original format. + */ + switch (png_ptr->color_type) + { + case PNG_COLOR_TYPE_GRAY: + if (png_ptr->bit_depth <= 8) + { + /* There at most 256 colors in the output, regardless of + * transparency. + */ + unsigned int step, i, val, trans = 256/*ignore*/, back_alpha = 0; + + cmap_entries = 1U << png_ptr->bit_depth; + if (cmap_entries > image->colormap_entries) + png_error(png_ptr, "gray[8] color-map: too few entries"); + + step = 255 / (cmap_entries - 1); + output_processing = PNG_CMAP_NONE; + + /* If there is a tRNS chunk then this either selects a transparent + * value or, if the output has no alpha, the background color. + */ + if (png_ptr->num_trans > 0) + { + trans = png_ptr->trans_color.gray; + + if ((output_format & PNG_FORMAT_FLAG_ALPHA) == 0) + back_alpha = output_encoding == P_LINEAR ? 65535 : 255; + } + + /* png_create_colormap_entry just takes an RGBA and writes the + * corresponding color-map entry using the format from 'image', + * including the required conversion to sRGB or linear as + * appropriate. The input values are always either sRGB (if the + * gamma correction flag is 0) or 0..255 scaled file encoded values + * (if the function must gamma correct them). + */ + for (i=val=0; ibit_depth < 8) + png_set_packing(png_ptr); + } + + else /* bit depth is 16 */ + { + /* The 16-bit input values can be converted directly to 8-bit gamma + * encoded values; however, if a tRNS chunk is present 257 color-map + * entries are required. This means that the extra entry requires + * special processing; add an alpha channel, sacrifice gray level + * 254 and convert transparent (alpha==0) entries to that. + * + * Use libpng to chop the data to 8 bits. Convert it to sRGB at the + * same time to minimize quality loss. If a tRNS chunk is present + * this means libpng must handle it too; otherwise it is impossible + * to do the exact match on the 16-bit value. + * + * If the output has no alpha channel *and* the background color is + * gray then it is possible to let libpng handle the substitution by + * ensuring that the corresponding gray level matches the background + * color exactly. + */ + data_encoding = P_sRGB; + + if (PNG_GRAY_COLORMAP_ENTRIES > image->colormap_entries) + png_error(png_ptr, "gray[16] color-map: too few entries"); + + cmap_entries = (unsigned int)make_gray_colormap(display); + + if (png_ptr->num_trans > 0) + { + unsigned int back_alpha; + + if ((output_format & PNG_FORMAT_FLAG_ALPHA) != 0) + back_alpha = 0; + + else + { + if (back_r == back_g && back_g == back_b) + { + /* Background is gray; no special processing will be + * required. + */ + png_color_16 c; + png_uint_32 gray = back_g; + + if (output_encoding == P_LINEAR) + { + gray = PNG_sRGB_FROM_LINEAR(gray * 255); + + /* And make sure the corresponding palette entry + * matches. + */ + png_create_colormap_entry(display, gray, back_g, back_g, + back_g, 65535, P_LINEAR); + } + + /* The background passed to libpng, however, must be the + * sRGB value. + */ + c.index = 0; /*unused*/ + c.gray = c.red = c.green = c.blue = (png_uint_16)gray; + + /* NOTE: does this work without expanding tRNS to alpha? + * It should be the color->gray case below apparently + * doesn't. + */ + png_set_background_fixed(png_ptr, &c, + PNG_BACKGROUND_GAMMA_SCREEN, 0/*need_expand*/, + 0/*gamma: not used*/); + + output_processing = PNG_CMAP_NONE; + break; + } +#ifdef __COVERITY__ + /* Coverity claims that output_encoding cannot be 2 (P_LINEAR) + * here. + */ + back_alpha = 255; +#else + back_alpha = output_encoding == P_LINEAR ? 65535 : 255; +#endif + } + + /* output_processing means that the libpng-processed row will be + * 8-bit GA and it has to be processing to single byte color-map + * values. Entry 254 is replaced by either a completely + * transparent entry or by the background color at full + * precision (and the background color is not a simple gray + * level in this case.) + */ + expand_tRNS = 1; + output_processing = PNG_CMAP_TRANS; + background_index = 254; + + /* And set (overwrite) color-map entry 254 to the actual + * background color at full precision. + */ + png_create_colormap_entry(display, 254, back_r, back_g, back_b, + back_alpha, output_encoding); + } + + else + output_processing = PNG_CMAP_NONE; + } + break; + + case PNG_COLOR_TYPE_GRAY_ALPHA: + /* 8-bit or 16-bit PNG with two channels - gray and alpha. A minimum + * of 65536 combinations. If, however, the alpha channel is to be + * removed there are only 256 possibilities if the background is gray. + * (Otherwise there is a subset of the 65536 possibilities defined by + * the triangle between black, white and the background color.) + * + * Reduce 16-bit files to 8-bit and sRGB encode the result. No need to + * worry about tRNS matching - tRNS is ignored if there is an alpha + * channel. + */ + data_encoding = P_sRGB; + + if ((output_format & PNG_FORMAT_FLAG_ALPHA) != 0) + { + if (PNG_GA_COLORMAP_ENTRIES > image->colormap_entries) + png_error(png_ptr, "gray+alpha color-map: too few entries"); + + cmap_entries = (unsigned int)make_ga_colormap(display); + + background_index = PNG_CMAP_GA_BACKGROUND; + output_processing = PNG_CMAP_GA; + } + + else /* alpha is removed */ + { + /* Alpha must be removed as the PNG data is processed when the + * background is a color because the G and A channels are + * independent and the vector addition (non-parallel vectors) is a + * 2-D problem. + * + * This can be reduced to the same algorithm as above by making a + * colormap containing gray levels (for the opaque grays), a + * background entry (for a transparent pixel) and a set of four six + * level color values, one set for each intermediate alpha value. + * See the comments in make_ga_colormap for how this works in the + * per-pixel processing. + * + * If the background is gray, however, we only need a 256 entry gray + * level color map. It is sufficient to make the entry generated + * for the background color be exactly the color specified. + */ + if ((output_format & PNG_FORMAT_FLAG_COLOR) == 0 || + (back_r == back_g && back_g == back_b)) + { + /* Background is gray; no special processing will be required. */ + png_color_16 c; + png_uint_32 gray = back_g; + + if (PNG_GRAY_COLORMAP_ENTRIES > image->colormap_entries) + png_error(png_ptr, "gray-alpha color-map: too few entries"); + + cmap_entries = (unsigned int)make_gray_colormap(display); + + if (output_encoding == P_LINEAR) + { + gray = PNG_sRGB_FROM_LINEAR(gray * 255); + + /* And make sure the corresponding palette entry matches. */ + png_create_colormap_entry(display, gray, back_g, back_g, + back_g, 65535, P_LINEAR); + } + + /* The background passed to libpng, however, must be the sRGB + * value. + */ + c.index = 0; /*unused*/ + c.gray = c.red = c.green = c.blue = (png_uint_16)gray; + + png_set_background_fixed(png_ptr, &c, + PNG_BACKGROUND_GAMMA_SCREEN, 0/*need_expand*/, + 0/*gamma: not used*/); + + output_processing = PNG_CMAP_NONE; + } + + else + { + png_uint_32 i, a; + + /* This is the same as png_make_ga_colormap, above, except that + * the entries are all opaque. + */ + if (PNG_GA_COLORMAP_ENTRIES > image->colormap_entries) + png_error(png_ptr, "ga-alpha color-map: too few entries"); + + i = 0; + while (i < 231) + { + png_uint_32 gray = (i * 256 + 115) / 231; + png_create_colormap_entry(display, i++, gray, gray, gray, + 255, P_sRGB); + } + + /* NOTE: this preserves the full precision of the application + * background color. + */ + background_index = i; + png_create_colormap_entry(display, i++, back_r, back_g, back_b, +#ifdef __COVERITY__ + /* Coverity claims that output_encoding + * cannot be 2 (P_LINEAR) here. + */ 255U, +#else + output_encoding == P_LINEAR ? 65535U : 255U, +#endif + output_encoding); + + /* For non-opaque input composite on the sRGB background - this + * requires inverting the encoding for each component. The input + * is still converted to the sRGB encoding because this is a + * reasonable approximate to the logarithmic curve of human + * visual sensitivity, at least over the narrow range which PNG + * represents. Consequently 'G' is always sRGB encoded, while + * 'A' is linear. We need the linear background colors. + */ + if (output_encoding == P_sRGB) /* else already linear */ + { + /* This may produce a value not exactly matching the + * background, but that's ok because these numbers are only + * used when alpha != 0 + */ + back_r = png_sRGB_table[back_r]; + back_g = png_sRGB_table[back_g]; + back_b = png_sRGB_table[back_b]; + } + + for (a=1; a<5; ++a) + { + unsigned int g; + + /* PNG_sRGB_FROM_LINEAR expects a 16-bit linear value scaled + * by an 8-bit alpha value (0..255). + */ + png_uint_32 alpha = 51 * a; + png_uint_32 back_rx = (255-alpha) * back_r; + png_uint_32 back_gx = (255-alpha) * back_g; + png_uint_32 back_bx = (255-alpha) * back_b; + + for (g=0; g<6; ++g) + { + png_uint_32 gray = png_sRGB_table[g*51] * alpha; + + png_create_colormap_entry(display, i++, + PNG_sRGB_FROM_LINEAR(gray + back_rx), + PNG_sRGB_FROM_LINEAR(gray + back_gx), + PNG_sRGB_FROM_LINEAR(gray + back_bx), 255, P_sRGB); + } + } + + cmap_entries = i; + output_processing = PNG_CMAP_GA; + } + } + break; + + case PNG_COLOR_TYPE_RGB: + case PNG_COLOR_TYPE_RGB_ALPHA: + /* Exclude the case where the output is gray; we can always handle this + * with the cases above. + */ + if ((output_format & PNG_FORMAT_FLAG_COLOR) == 0) + { + /* The color-map will be grayscale, so we may as well convert the + * input RGB values to a simple grayscale and use the grayscale + * code above. + * + * NOTE: calling this apparently damages the recognition of the + * transparent color in background color handling; call + * png_set_tRNS_to_alpha before png_set_background_fixed. + */ + png_set_rgb_to_gray_fixed(png_ptr, PNG_ERROR_ACTION_NONE, -1, + -1); + data_encoding = P_sRGB; + + /* The output will now be one or two 8-bit gray or gray+alpha + * channels. The more complex case arises when the input has alpha. + */ + if ((png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA || + png_ptr->num_trans > 0) && + (output_format & PNG_FORMAT_FLAG_ALPHA) != 0) + { + /* Both input and output have an alpha channel, so no background + * processing is required; just map the GA bytes to the right + * color-map entry. + */ + expand_tRNS = 1; + + if (PNG_GA_COLORMAP_ENTRIES > image->colormap_entries) + png_error(png_ptr, "rgb[ga] color-map: too few entries"); + + cmap_entries = (unsigned int)make_ga_colormap(display); + background_index = PNG_CMAP_GA_BACKGROUND; + output_processing = PNG_CMAP_GA; + } + + else + { + const png_fixed_point gamma = png_resolve_file_gamma(png_ptr); + + /* Either the input or the output has no alpha channel, so there + * will be no non-opaque pixels in the color-map; it will just be + * grayscale. + */ + if (PNG_GRAY_COLORMAP_ENTRIES > image->colormap_entries) + png_error(png_ptr, "rgb[gray] color-map: too few entries"); + + /* Ideally this code would use libpng to do the gamma correction, + * but if an input alpha channel is to be removed we will hit the + * libpng bug in gamma+compose+rgb-to-gray (the double gamma + * correction bug). Fix this by dropping the gamma correction in + * this case and doing it in the palette; this will result in + * duplicate palette entries, but that's better than the + * alternative of double gamma correction. + * + * NOTE: PNGv3: check the resolved result of all the potentially + * different colour space chunks. + */ + if ((png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA || + png_ptr->num_trans > 0) && + png_gamma_not_sRGB(gamma) != 0) + { + cmap_entries = (unsigned int)make_gray_file_colormap(display); + data_encoding = P_FILE; + } + + else + cmap_entries = (unsigned int)make_gray_colormap(display); + + /* But if the input has alpha or transparency it must be removed + */ + if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA || + png_ptr->num_trans > 0) + { + png_color_16 c; + png_uint_32 gray = back_g; + + /* We need to ensure that the application background exists in + * the colormap and that completely transparent pixels map to + * it. Achieve this simply by ensuring that the entry + * selected for the background really is the background color. + */ + if (data_encoding == P_FILE) /* from the fixup above */ + { + /* The app supplied a gray which is in output_encoding, we + * need to convert it to a value of the input (P_FILE) + * encoding then set this palette entry to the required + * output encoding. + */ + if (output_encoding == P_sRGB) + gray = png_sRGB_table[gray]; /* now P_LINEAR */ + + gray = PNG_DIV257(png_gamma_16bit_correct(gray, gamma)); + /* now P_FILE */ + + /* And make sure the corresponding palette entry contains + * exactly the required sRGB value. + */ + png_create_colormap_entry(display, gray, back_g, back_g, + back_g, 0/*unused*/, output_encoding); + } + + else if (output_encoding == P_LINEAR) + { + gray = PNG_sRGB_FROM_LINEAR(gray * 255); + + /* And make sure the corresponding palette entry matches. + */ + png_create_colormap_entry(display, gray, back_g, back_g, + back_g, 0/*unused*/, P_LINEAR); + } + + /* The background passed to libpng, however, must be the + * output (normally sRGB) value. + */ + c.index = 0; /*unused*/ + c.gray = c.red = c.green = c.blue = (png_uint_16)gray; + + /* NOTE: the following is apparently a bug in libpng. Without + * it the transparent color recognition in + * png_set_background_fixed seems to go wrong. + */ + expand_tRNS = 1; + png_set_background_fixed(png_ptr, &c, + PNG_BACKGROUND_GAMMA_SCREEN, 0/*need_expand*/, + 0/*gamma: not used*/); + } + + output_processing = PNG_CMAP_NONE; + } + } + + else /* output is color */ + { + /* We could use png_quantize here so long as there is no transparent + * color or alpha; png_quantize ignores alpha. Easier overall just + * to do it once and using PNG_DIV51 on the 6x6x6 reduced RGB cube. + * Consequently we always want libpng to produce sRGB data. + */ + data_encoding = P_sRGB; + + /* Is there any transparency or alpha? */ + if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA || + png_ptr->num_trans > 0) + { + /* Is there alpha in the output too? If so all four channels are + * processed into a special RGB cube with alpha support. + */ + if ((output_format & PNG_FORMAT_FLAG_ALPHA) != 0) + { + png_uint_32 r; + + if (PNG_RGB_COLORMAP_ENTRIES+1+27 > image->colormap_entries) + png_error(png_ptr, "rgb+alpha color-map: too few entries"); + + cmap_entries = (unsigned int)make_rgb_colormap(display); + + /* Add a transparent entry. */ + png_create_colormap_entry(display, cmap_entries, 255, 255, + 255, 0, P_sRGB); + + /* This is stored as the background index for the processing + * algorithm. + */ + background_index = cmap_entries++; + + /* Add 27 r,g,b entries each with alpha 0.5. */ + for (r=0; r<256; r = (r << 1) | 0x7f) + { + png_uint_32 g; + + for (g=0; g<256; g = (g << 1) | 0x7f) + { + png_uint_32 b; + + /* This generates components with the values 0, 127 and + * 255 + */ + for (b=0; b<256; b = (b << 1) | 0x7f) + png_create_colormap_entry(display, cmap_entries++, + r, g, b, 128, P_sRGB); + } + } + + expand_tRNS = 1; + output_processing = PNG_CMAP_RGB_ALPHA; + } + + else + { + /* Alpha/transparency must be removed. The background must + * exist in the color map (achieved by setting adding it after + * the 666 color-map). If the standard processing code will + * pick up this entry automatically that's all that is + * required; libpng can be called to do the background + * processing. + */ + unsigned int sample_size = + PNG_IMAGE_SAMPLE_SIZE(output_format); + png_uint_32 r, g, b; /* sRGB background */ + + if (PNG_RGB_COLORMAP_ENTRIES+1+27 > image->colormap_entries) + png_error(png_ptr, "rgb-alpha color-map: too few entries"); + + cmap_entries = (unsigned int)make_rgb_colormap(display); + + png_create_colormap_entry(display, cmap_entries, back_r, + back_g, back_b, 0/*unused*/, output_encoding); + + if (output_encoding == P_LINEAR) + { + r = PNG_sRGB_FROM_LINEAR(back_r * 255); + g = PNG_sRGB_FROM_LINEAR(back_g * 255); + b = PNG_sRGB_FROM_LINEAR(back_b * 255); + } + + else + { + r = back_r; + g = back_g; + b = back_g; + } + + /* Compare the newly-created color-map entry with the one the + * PNG_CMAP_RGB algorithm will use. If the two entries don't + * match, add the new one and set this as the background + * index. + */ + if (memcmp((png_const_bytep)display->colormap + + sample_size * cmap_entries, + (png_const_bytep)display->colormap + + sample_size * PNG_RGB_INDEX(r,g,b), + sample_size) != 0) + { + /* The background color must be added. */ + background_index = cmap_entries++; + + /* Add 27 r,g,b entries each with created by composing with + * the background at alpha 0.5. + */ + for (r=0; r<256; r = (r << 1) | 0x7f) + { + for (g=0; g<256; g = (g << 1) | 0x7f) + { + /* This generates components with the values 0, 127 + * and 255 + */ + for (b=0; b<256; b = (b << 1) | 0x7f) + png_create_colormap_entry(display, cmap_entries++, + png_colormap_compose(display, r, P_sRGB, 128, + back_r, output_encoding), + png_colormap_compose(display, g, P_sRGB, 128, + back_g, output_encoding), + png_colormap_compose(display, b, P_sRGB, 128, + back_b, output_encoding), + 0/*unused*/, output_encoding); + } + } + + expand_tRNS = 1; + output_processing = PNG_CMAP_RGB_ALPHA; + } + + else /* background color is in the standard color-map */ + { + png_color_16 c; + + c.index = 0; /*unused*/ + c.red = (png_uint_16)back_r; + c.gray = c.green = (png_uint_16)back_g; + c.blue = (png_uint_16)back_b; + + png_set_background_fixed(png_ptr, &c, + PNG_BACKGROUND_GAMMA_SCREEN, 0/*need_expand*/, + 0/*gamma: not used*/); + + output_processing = PNG_CMAP_RGB; + } + } + } + + else /* no alpha or transparency in the input */ + { + /* Alpha in the output is irrelevant, simply map the opaque input + * pixels to the 6x6x6 color-map. + */ + if (PNG_RGB_COLORMAP_ENTRIES > image->colormap_entries) + png_error(png_ptr, "rgb color-map: too few entries"); + + cmap_entries = (unsigned int)make_rgb_colormap(display); + output_processing = PNG_CMAP_RGB; + } + } + break; + + case PNG_COLOR_TYPE_PALETTE: + /* It's already got a color-map. It may be necessary to eliminate the + * tRNS entries though. + */ + { + unsigned int num_trans = png_ptr->num_trans; + png_const_bytep trans = num_trans > 0 ? png_ptr->trans_alpha : NULL; + png_const_colorp colormap = png_ptr->palette; + int do_background = trans != NULL && + (output_format & PNG_FORMAT_FLAG_ALPHA) == 0; + unsigned int i; + + /* Just in case: */ + if (trans == NULL) + num_trans = 0; + + output_processing = PNG_CMAP_NONE; + data_encoding = P_FILE; /* Don't change from color-map indices */ + cmap_entries = (unsigned int)png_ptr->num_palette; + if (cmap_entries > 256) + cmap_entries = 256; + + if (cmap_entries > (unsigned int)image->colormap_entries) + png_error(png_ptr, "palette color-map: too few entries"); + + for (i=0; i < cmap_entries; ++i) + { + if (do_background != 0 && i < num_trans && trans[i] < 255) + { + if (trans[i] == 0) + png_create_colormap_entry(display, i, back_r, back_g, + back_b, 0, output_encoding); + + else + { + /* Must compose the PNG file color in the color-map entry + * on the sRGB color in 'back'. + */ + png_create_colormap_entry(display, i, + png_colormap_compose(display, colormap[i].red, + P_FILE, trans[i], back_r, output_encoding), + png_colormap_compose(display, colormap[i].green, + P_FILE, trans[i], back_g, output_encoding), + png_colormap_compose(display, colormap[i].blue, + P_FILE, trans[i], back_b, output_encoding), + output_encoding == P_LINEAR ? trans[i] * 257U : + trans[i], + output_encoding); + } + } + + else + png_create_colormap_entry(display, i, colormap[i].red, + colormap[i].green, colormap[i].blue, + i < num_trans ? trans[i] : 255U, P_FILE/*8-bit*/); + } + + /* The PNG data may have indices packed in fewer than 8 bits, it + * must be expanded if so. + */ + if (png_ptr->bit_depth < 8) + png_set_packing(png_ptr); + } + break; + + default: + png_error(png_ptr, "invalid PNG color type"); + /*NOT REACHED*/ + } + + /* Now deal with the output processing */ + if (expand_tRNS != 0 && png_ptr->num_trans > 0 && + (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) == 0) + png_set_tRNS_to_alpha(png_ptr); + + switch (data_encoding) + { + case P_sRGB: + /* Change to 8-bit sRGB */ + png_set_alpha_mode_fixed(png_ptr, PNG_ALPHA_PNG, PNG_GAMMA_sRGB); + /* FALLTHROUGH */ + + case P_FILE: + if (png_ptr->bit_depth > 8) + png_set_scale_16(png_ptr); + break; + +#ifdef __GNUC__ + default: + png_error(png_ptr, "bad data option (internal error)"); +#endif + } + + if (cmap_entries > 256 || cmap_entries > image->colormap_entries) + png_error(png_ptr, "color map overflow (BAD internal error)"); + + image->colormap_entries = cmap_entries; + + /* Double check using the recorded background index */ + switch (output_processing) + { + case PNG_CMAP_NONE: + if (background_index != PNG_CMAP_NONE_BACKGROUND) + goto bad_background; + break; + + case PNG_CMAP_GA: + if (background_index != PNG_CMAP_GA_BACKGROUND) + goto bad_background; + break; + + case PNG_CMAP_TRANS: + if (background_index >= cmap_entries || + background_index != PNG_CMAP_TRANS_BACKGROUND) + goto bad_background; + break; + + case PNG_CMAP_RGB: + if (background_index != PNG_CMAP_RGB_BACKGROUND) + goto bad_background; + break; + + case PNG_CMAP_RGB_ALPHA: + if (background_index != PNG_CMAP_RGB_ALPHA_BACKGROUND) + goto bad_background; + break; + + default: + png_error(png_ptr, "bad processing option (internal error)"); + + bad_background: + png_error(png_ptr, "bad background index (internal error)"); + } + + display->colormap_processing = (int)output_processing; + + return 1/*ok*/; +} + +/* The final part of the color-map read called from png_image_finish_read. */ +static int +png_image_read_and_map(png_voidp argument) +{ + png_image_read_control *display = png_voidcast(png_image_read_control*, + argument); + png_imagep image = display->image; + png_structrp png_ptr = image->opaque->png_ptr; + int passes; + + /* Called when the libpng data must be transformed into the color-mapped + * form. There is a local row buffer in display->local and this routine must + * do the interlace handling. + */ + switch (png_ptr->interlaced) + { + case PNG_INTERLACE_NONE: + passes = 1; + break; + + case PNG_INTERLACE_ADAM7: + passes = PNG_INTERLACE_ADAM7_PASSES; + break; + + default: + png_error(png_ptr, "unknown interlace type"); + } + + { + png_uint_32 height = image->height; + png_uint_32 width = image->width; + int proc = display->colormap_processing; + png_bytep first_row = png_voidcast(png_bytep, display->first_row); + ptrdiff_t step_row = display->row_bytes; + int pass; + + for (pass = 0; pass < passes; ++pass) + { + unsigned int startx, stepx, stepy; + png_uint_32 y; + + if (png_ptr->interlaced == PNG_INTERLACE_ADAM7) + { + /* The row may be empty for a short image: */ + if (PNG_PASS_COLS(width, pass) == 0) + continue; + + startx = PNG_PASS_START_COL(pass); + stepx = PNG_PASS_COL_OFFSET(pass); + y = PNG_PASS_START_ROW(pass); + stepy = PNG_PASS_ROW_OFFSET(pass); + } + + else + { + y = 0; + startx = 0; + stepx = stepy = 1; + } + + for (; ylocal_row); + png_bytep outrow = first_row + y * step_row; + png_const_bytep end_row = outrow + width; + + /* Read read the libpng data into the temporary buffer. */ + png_read_row(png_ptr, inrow, NULL); + + /* Now process the row according to the processing option, note + * that the caller verifies that the format of the libpng output + * data is as required. + */ + outrow += startx; + switch (proc) + { + case PNG_CMAP_GA: + for (; outrow < end_row; outrow += stepx) + { + /* The data is always in the PNG order */ + unsigned int gray = *inrow++; + unsigned int alpha = *inrow++; + unsigned int entry; + + /* NOTE: this code is copied as a comment in + * make_ga_colormap above. Please update the + * comment if you change this code! + */ + if (alpha > 229) /* opaque */ + { + entry = (231 * gray + 128) >> 8; + } + else if (alpha < 26) /* transparent */ + { + entry = 231; + } + else /* partially opaque */ + { + entry = 226 + 6 * PNG_DIV51(alpha) + PNG_DIV51(gray); + } + + *outrow = (png_byte)entry; + } + break; + + case PNG_CMAP_TRANS: + for (; outrow < end_row; outrow += stepx) + { + png_byte gray = *inrow++; + png_byte alpha = *inrow++; + + if (alpha == 0) + *outrow = PNG_CMAP_TRANS_BACKGROUND; + + else if (gray != PNG_CMAP_TRANS_BACKGROUND) + *outrow = gray; + + else + *outrow = (png_byte)(PNG_CMAP_TRANS_BACKGROUND+1); + } + break; + + case PNG_CMAP_RGB: + for (; outrow < end_row; outrow += stepx) + { + *outrow = PNG_RGB_INDEX(inrow[0], inrow[1], inrow[2]); + inrow += 3; + } + break; + + case PNG_CMAP_RGB_ALPHA: + for (; outrow < end_row; outrow += stepx) + { + unsigned int alpha = inrow[3]; + + /* Because the alpha entries only hold alpha==0.5 values + * split the processing at alpha==0.25 (64) and 0.75 + * (196). + */ + + if (alpha >= 196) + *outrow = PNG_RGB_INDEX(inrow[0], inrow[1], + inrow[2]); + + else if (alpha < 64) + *outrow = PNG_CMAP_RGB_ALPHA_BACKGROUND; + + else + { + /* Likewise there are three entries for each of r, g + * and b. We could select the entry by popcount on + * the top two bits on those architectures that + * support it, this is what the code below does, + * crudely. + */ + unsigned int back_i = PNG_CMAP_RGB_ALPHA_BACKGROUND+1; + + /* Here are how the values map: + * + * 0x00 .. 0x3f -> 0 + * 0x40 .. 0xbf -> 1 + * 0xc0 .. 0xff -> 2 + * + * So, as above with the explicit alpha checks, the + * breakpoints are at 64 and 196. + */ + if (inrow[0] & 0x80) back_i += 9; /* red */ + if (inrow[0] & 0x40) back_i += 9; + if (inrow[0] & 0x80) back_i += 3; /* green */ + if (inrow[0] & 0x40) back_i += 3; + if (inrow[0] & 0x80) back_i += 1; /* blue */ + if (inrow[0] & 0x40) back_i += 1; + + *outrow = (png_byte)back_i; + } + + inrow += 4; + } + break; + + default: + break; + } + } + } + } + + return 1; +} + +static int +png_image_read_colormapped(png_voidp argument) +{ + png_image_read_control *display = png_voidcast(png_image_read_control*, + argument); + png_imagep image = display->image; + png_controlp control = image->opaque; + png_structrp png_ptr = control->png_ptr; + png_inforp info_ptr = control->info_ptr; + + int passes = 0; /* As a flag */ + + PNG_SKIP_CHUNKS(png_ptr); + + /* Update the 'info' structure and make sure the result is as required; first + * make sure to turn on the interlace handling if it will be required + * (because it can't be turned on *after* the call to png_read_update_info!) + */ + if (display->colormap_processing == PNG_CMAP_NONE) + passes = png_set_interlace_handling(png_ptr); + + png_read_update_info(png_ptr, info_ptr); + + /* The expected output can be deduced from the colormap_processing option. */ + switch (display->colormap_processing) + { + case PNG_CMAP_NONE: + /* Output must be one channel and one byte per pixel, the output + * encoding can be anything. + */ + if ((info_ptr->color_type == PNG_COLOR_TYPE_PALETTE || + info_ptr->color_type == PNG_COLOR_TYPE_GRAY) && + info_ptr->bit_depth == 8) + break; + + goto bad_output; + + case PNG_CMAP_TRANS: + case PNG_CMAP_GA: + /* Output must be two channels and the 'G' one must be sRGB, the latter + * can be checked with an exact number because it should have been set + * to this number above! + */ + if (info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && + info_ptr->bit_depth == 8 && + png_ptr->screen_gamma == PNG_GAMMA_sRGB && + image->colormap_entries == 256) + break; + + goto bad_output; + + case PNG_CMAP_RGB: + /* Output must be 8-bit sRGB encoded RGB */ + if (info_ptr->color_type == PNG_COLOR_TYPE_RGB && + info_ptr->bit_depth == 8 && + png_ptr->screen_gamma == PNG_GAMMA_sRGB && + image->colormap_entries == 216) + break; + + goto bad_output; + + case PNG_CMAP_RGB_ALPHA: + /* Output must be 8-bit sRGB encoded RGBA */ + if (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA && + info_ptr->bit_depth == 8 && + png_ptr->screen_gamma == PNG_GAMMA_sRGB && + image->colormap_entries == 244 /* 216 + 1 + 27 */) + break; + + goto bad_output; + + default: + bad_output: + png_error(png_ptr, "bad color-map processing (internal error)"); + } + + /* Now read the rows. Do this here if it is possible to read directly into + * the output buffer, otherwise allocate a local row buffer of the maximum + * size libpng requires and call the relevant processing routine safely. + */ + { + png_voidp first_row = display->buffer; + ptrdiff_t row_bytes = display->row_stride; + + /* The following expression is designed to work correctly whether it gives + * a signed or an unsigned result. + */ + if (row_bytes < 0) + { + char *ptr = png_voidcast(char*, first_row); + ptr += (image->height-1) * (-row_bytes); + first_row = png_voidcast(png_voidp, ptr); + } + + display->first_row = first_row; + display->row_bytes = row_bytes; + } + + if (passes == 0) + { + int result; + png_voidp row = png_malloc(png_ptr, png_get_rowbytes(png_ptr, info_ptr)); + + display->local_row = row; + result = png_safe_execute(image, png_image_read_and_map, display); + display->local_row = NULL; + png_free(png_ptr, row); + + return result; + } + + else + { + png_alloc_size_t row_bytes = (png_alloc_size_t)display->row_bytes; + + while (--passes >= 0) + { + png_uint_32 y = image->height; + png_bytep row = png_voidcast(png_bytep, display->first_row); + + for (; y > 0; --y) + { + png_read_row(png_ptr, row, NULL); + row += row_bytes; + } + } + + return 1; + } +} + +/* Just the row reading part of png_image_read. */ +static int +png_image_read_composite(png_voidp argument) +{ + png_image_read_control *display = png_voidcast(png_image_read_control*, + argument); + png_imagep image = display->image; + png_structrp png_ptr = image->opaque->png_ptr; + int passes; + + switch (png_ptr->interlaced) + { + case PNG_INTERLACE_NONE: + passes = 1; + break; + + case PNG_INTERLACE_ADAM7: + passes = PNG_INTERLACE_ADAM7_PASSES; + break; + + default: + png_error(png_ptr, "unknown interlace type"); + } + + { + png_uint_32 height = image->height; + png_uint_32 width = image->width; + ptrdiff_t step_row = display->row_bytes; + unsigned int channels = + (image->format & PNG_FORMAT_FLAG_COLOR) != 0 ? 3 : 1; + int pass; + + for (pass = 0; pass < passes; ++pass) + { + unsigned int startx, stepx, stepy; + png_uint_32 y; + + if (png_ptr->interlaced == PNG_INTERLACE_ADAM7) + { + /* The row may be empty for a short image: */ + if (PNG_PASS_COLS(width, pass) == 0) + continue; + + startx = PNG_PASS_START_COL(pass) * channels; + stepx = PNG_PASS_COL_OFFSET(pass) * channels; + y = PNG_PASS_START_ROW(pass); + stepy = PNG_PASS_ROW_OFFSET(pass); + } + + else + { + y = 0; + startx = 0; + stepx = channels; + stepy = 1; + } + + for (; ylocal_row); + png_bytep outrow; + png_const_bytep end_row; + + /* Read the row, which is packed: */ + png_read_row(png_ptr, inrow, NULL); + + outrow = png_voidcast(png_bytep, display->first_row); + outrow += y * step_row; + end_row = outrow + width * channels; + + /* Now do the composition on each pixel in this row. */ + outrow += startx; + for (; outrow < end_row; outrow += stepx) + { + png_byte alpha = inrow[channels]; + + if (alpha > 0) /* else no change to the output */ + { + unsigned int c; + + for (c=0; cimage; + png_structrp png_ptr = image->opaque->png_ptr; + png_inforp info_ptr = image->opaque->info_ptr; + png_uint_32 height = image->height; + png_uint_32 width = image->width; + int pass, passes; + + /* Double check the convoluted logic below. We expect to get here with + * libpng doing rgb to gray and gamma correction but background processing + * left to the png_image_read_background function. The rows libpng produce + * might be 8 or 16-bit but should always have two channels; gray plus alpha. + */ + if ((png_ptr->transformations & PNG_RGB_TO_GRAY) == 0) + png_error(png_ptr, "lost rgb to gray"); + + if ((png_ptr->transformations & PNG_COMPOSE) != 0) + png_error(png_ptr, "unexpected compose"); + + if (png_get_channels(png_ptr, info_ptr) != 2) + png_error(png_ptr, "lost/gained channels"); + + /* Expect the 8-bit case to always remove the alpha channel */ + if ((image->format & PNG_FORMAT_FLAG_LINEAR) == 0 && + (image->format & PNG_FORMAT_FLAG_ALPHA) != 0) + png_error(png_ptr, "unexpected 8-bit transformation"); + + switch (png_ptr->interlaced) + { + case PNG_INTERLACE_NONE: + passes = 1; + break; + + case PNG_INTERLACE_ADAM7: + passes = PNG_INTERLACE_ADAM7_PASSES; + break; + + default: + png_error(png_ptr, "unknown interlace type"); + } + + /* Use direct access to info_ptr here because otherwise the simplified API + * would require PNG_EASY_ACCESS_SUPPORTED (just for this.) Note this is + * checking the value after libpng expansions, not the original value in the + * PNG. + */ + switch (info_ptr->bit_depth) + { + case 8: + /* 8-bit sRGB gray values with an alpha channel; the alpha channel is + * to be removed by composing on a background: either the row if + * display->background is NULL or display->background->green if not. + * Unlike the code above ALPHA_OPTIMIZED has *not* been done. + */ + { + png_bytep first_row = png_voidcast(png_bytep, display->first_row); + ptrdiff_t step_row = display->row_bytes; + + for (pass = 0; pass < passes; ++pass) + { + unsigned int startx, stepx, stepy; + png_uint_32 y; + + if (png_ptr->interlaced == PNG_INTERLACE_ADAM7) + { + /* The row may be empty for a short image: */ + if (PNG_PASS_COLS(width, pass) == 0) + continue; + + startx = PNG_PASS_START_COL(pass); + stepx = PNG_PASS_COL_OFFSET(pass); + y = PNG_PASS_START_ROW(pass); + stepy = PNG_PASS_ROW_OFFSET(pass); + } + + else + { + y = 0; + startx = 0; + stepx = stepy = 1; + } + + if (display->background == NULL) + { + for (; ylocal_row); + png_bytep outrow = first_row + y * step_row; + png_const_bytep end_row = outrow + width; + + /* Read the row, which is packed: */ + png_read_row(png_ptr, inrow, NULL); + + /* Now do the composition on each pixel in this row. */ + outrow += startx; + for (; outrow < end_row; outrow += stepx) + { + png_byte alpha = inrow[1]; + + if (alpha > 0) /* else no change to the output */ + { + png_uint_32 component = inrow[0]; + + if (alpha < 255) /* else just use component */ + { + /* Since PNG_OPTIMIZED_ALPHA was not set it is + * necessary to invert the sRGB transfer + * function and multiply the alpha out. + */ + component = png_sRGB_table[component] * alpha; + component += png_sRGB_table[outrow[0]] * + (255-alpha); + component = PNG_sRGB_FROM_LINEAR(component); + } + + outrow[0] = (png_byte)component; + } + + inrow += 2; /* gray and alpha channel */ + } + } + } + + else /* constant background value */ + { + png_byte background8 = display->background->green; + png_uint_16 background = png_sRGB_table[background8]; + + for (; ylocal_row); + png_bytep outrow = first_row + y * step_row; + png_const_bytep end_row = outrow + width; + + /* Read the row, which is packed: */ + png_read_row(png_ptr, inrow, NULL); + + /* Now do the composition on each pixel in this row. */ + outrow += startx; + for (; outrow < end_row; outrow += stepx) + { + png_byte alpha = inrow[1]; + + if (alpha > 0) /* else use background */ + { + png_uint_32 component = inrow[0]; + + if (alpha < 255) /* else just use component */ + { + component = png_sRGB_table[component] * alpha; + component += background * (255-alpha); + component = PNG_sRGB_FROM_LINEAR(component); + } + + outrow[0] = (png_byte)component; + } + + else + outrow[0] = background8; + + inrow += 2; /* gray and alpha channel */ + } + } + } + } + } + break; + + case 16: + /* 16-bit linear with pre-multiplied alpha; the pre-multiplication must + * still be done and, maybe, the alpha channel removed. This code also + * handles the alpha-first option. + */ + { + png_uint_16p first_row = png_voidcast(png_uint_16p, + display->first_row); + /* The division by two is safe because the caller passed in a + * stride which was multiplied by 2 (below) to get row_bytes. + */ + ptrdiff_t step_row = display->row_bytes / 2; + unsigned int preserve_alpha = (image->format & + PNG_FORMAT_FLAG_ALPHA) != 0; + unsigned int outchannels = 1U+preserve_alpha; + int swap_alpha = 0; + +# ifdef PNG_SIMPLIFIED_READ_AFIRST_SUPPORTED + if (preserve_alpha != 0 && + (image->format & PNG_FORMAT_FLAG_AFIRST) != 0) + swap_alpha = 1; +# endif + + for (pass = 0; pass < passes; ++pass) + { + unsigned int startx, stepx, stepy; + png_uint_32 y; + + /* The 'x' start and step are adjusted to output components here. + */ + if (png_ptr->interlaced == PNG_INTERLACE_ADAM7) + { + /* The row may be empty for a short image: */ + if (PNG_PASS_COLS(width, pass) == 0) + continue; + + startx = PNG_PASS_START_COL(pass) * outchannels; + stepx = PNG_PASS_COL_OFFSET(pass) * outchannels; + y = PNG_PASS_START_ROW(pass); + stepy = PNG_PASS_ROW_OFFSET(pass); + } + + else + { + y = 0; + startx = 0; + stepx = outchannels; + stepy = 1; + } + + for (; ylocal_row), NULL); + inrow = png_voidcast(png_const_uint_16p, display->local_row); + + /* Now do the pre-multiplication on each pixel in this row. + */ + outrow += startx; + for (; outrow < end_row; outrow += stepx) + { + png_uint_32 component = inrow[0]; + png_uint_16 alpha = inrow[1]; + + if (alpha > 0) /* else 0 */ + { + if (alpha < 65535) /* else just use component */ + { + component *= alpha; + component += 32767; + component /= 65535; + } + } + + else + component = 0; + + outrow[swap_alpha] = (png_uint_16)component; + if (preserve_alpha != 0) + outrow[1 ^ swap_alpha] = alpha; + + inrow += 2; /* components and alpha channel */ + } + } + } + } + break; + +#ifdef __GNUC__ + default: + png_error(png_ptr, "unexpected bit depth"); +#endif + } + + return 1; +} + +/* The guts of png_image_finish_read as a png_safe_execute callback. */ +static int +png_image_read_direct(png_voidp argument) +{ + png_image_read_control *display = png_voidcast(png_image_read_control*, + argument); + png_imagep image = display->image; + png_structrp png_ptr = image->opaque->png_ptr; + png_inforp info_ptr = image->opaque->info_ptr; + + png_uint_32 format = image->format; + int linear = (format & PNG_FORMAT_FLAG_LINEAR) != 0; + int do_local_compose = 0; + int do_local_background = 0; /* to avoid double gamma correction bug */ + int passes = 0; + + /* Add transforms to ensure the correct output format is produced then check + * that the required implementation support is there. Always expand; always + * need 8 bits minimum, no palette and expanded tRNS. + */ + png_set_expand(png_ptr); + + /* Now check the format to see if it was modified. */ + { + png_uint_32 base_format = png_image_format(png_ptr) & + ~PNG_FORMAT_FLAG_COLORMAP /* removed by png_set_expand */; + png_uint_32 change = format ^ base_format; + png_fixed_point output_gamma; + int mode; /* alpha mode */ + + /* Do this first so that we have a record if rgb to gray is happening. */ + if ((change & PNG_FORMAT_FLAG_COLOR) != 0) + { + /* gray<->color transformation required. */ + if ((format & PNG_FORMAT_FLAG_COLOR) != 0) + png_set_gray_to_rgb(png_ptr); + + else + { + /* libpng can't do both rgb to gray and + * background/pre-multiplication if there is also significant gamma + * correction, because both operations require linear colors and + * the code only supports one transform doing the gamma correction. + * Handle this by doing the pre-multiplication or background + * operation in this code, if necessary. + * + * TODO: fix this by rewriting pngrtran.c (!) + * + * For the moment (given that fixing this in pngrtran.c is an + * enormous change) 'do_local_background' is used to indicate that + * the problem exists. + */ + if ((base_format & PNG_FORMAT_FLAG_ALPHA) != 0) + do_local_background = 1/*maybe*/; + + png_set_rgb_to_gray_fixed(png_ptr, PNG_ERROR_ACTION_NONE, + PNG_RGB_TO_GRAY_DEFAULT, PNG_RGB_TO_GRAY_DEFAULT); + } + + change &= ~PNG_FORMAT_FLAG_COLOR; + } + + /* Set the gamma appropriately, linear for 16-bit input, sRGB otherwise. + */ + { + /* This is safe but should no longer be necessary as + * png_ptr->default_gamma should have been set after the + * info-before-IDAT was read in png_image_read_header. + * + * TODO: 1.8: remove this and see what happens. + */ + png_fixed_point input_gamma_default; + + if ((base_format & PNG_FORMAT_FLAG_LINEAR) != 0 && + (image->flags & PNG_IMAGE_FLAG_16BIT_sRGB) == 0) + input_gamma_default = PNG_GAMMA_LINEAR; + else + input_gamma_default = PNG_DEFAULT_sRGB; + + /* Call png_set_alpha_mode to set the default for the input gamma; the + * output gamma is set by a second call below. + */ + png_set_alpha_mode_fixed(png_ptr, PNG_ALPHA_PNG, input_gamma_default); + } + + if (linear != 0) + { + /* If there *is* an alpha channel in the input it must be multiplied + * out; use PNG_ALPHA_STANDARD, otherwise just use PNG_ALPHA_PNG. + */ + if ((base_format & PNG_FORMAT_FLAG_ALPHA) != 0) + mode = PNG_ALPHA_STANDARD; /* associated alpha */ + + else + mode = PNG_ALPHA_PNG; + + output_gamma = PNG_GAMMA_LINEAR; + } + + else + { + mode = PNG_ALPHA_PNG; + output_gamma = PNG_DEFAULT_sRGB; + } + + if ((change & PNG_FORMAT_FLAG_ASSOCIATED_ALPHA) != 0) + { + mode = PNG_ALPHA_OPTIMIZED; + change &= ~PNG_FORMAT_FLAG_ASSOCIATED_ALPHA; + } + + /* If 'do_local_background' is set check for the presence of gamma + * correction; this is part of the work-round for the libpng bug + * described above. + * + * TODO: fix libpng and remove this. + */ + if (do_local_background != 0) + { + png_fixed_point gtest; + + /* This is 'png_gamma_threshold' from pngrtran.c; the test used for + * gamma correction, the screen gamma hasn't been set on png_struct + * yet; it's set below. png_struct::gamma, however, is set to the + * final value. + */ + if (png_muldiv(>est, output_gamma, + png_resolve_file_gamma(png_ptr), PNG_FP_1) != 0 && + png_gamma_significant(gtest) == 0) + do_local_background = 0; + + else if (mode == PNG_ALPHA_STANDARD) + { + do_local_background = 2/*required*/; + mode = PNG_ALPHA_PNG; /* prevent libpng doing it */ + } + + /* else leave as 1 for the checks below */ + } + + /* If the bit-depth changes then handle that here. */ + if ((change & PNG_FORMAT_FLAG_LINEAR) != 0) + { + if (linear != 0 /*16-bit output*/) + png_set_expand_16(png_ptr); + + else /* 8-bit output */ + png_set_scale_16(png_ptr); + + change &= ~PNG_FORMAT_FLAG_LINEAR; + } + + /* Now the background/alpha channel changes. */ + if ((change & PNG_FORMAT_FLAG_ALPHA) != 0) + { + /* Removing an alpha channel requires composition for the 8-bit + * formats; for the 16-bit it is already done, above, by the + * pre-multiplication and the channel just needs to be stripped. + */ + if ((base_format & PNG_FORMAT_FLAG_ALPHA) != 0) + { + /* If RGB->gray is happening the alpha channel must be left and the + * operation completed locally. + * + * TODO: fix libpng and remove this. + */ + if (do_local_background != 0) + do_local_background = 2/*required*/; + + /* 16-bit output: just remove the channel */ + else if (linear != 0) /* compose on black (well, pre-multiply) */ + png_set_strip_alpha(png_ptr); + + /* 8-bit output: do an appropriate compose */ + else if (display->background != NULL) + { + png_color_16 c; + + c.index = 0; /*unused*/ + c.red = display->background->red; + c.green = display->background->green; + c.blue = display->background->blue; + c.gray = display->background->green; + + /* This is always an 8-bit sRGB value, using the 'green' channel + * for gray is much better than calculating the luminance here; + * we can get off-by-one errors in that calculation relative to + * the app expectations and that will show up in transparent + * pixels. + */ + png_set_background_fixed(png_ptr, &c, + PNG_BACKGROUND_GAMMA_SCREEN, 0/*need_expand*/, + 0/*gamma: not used*/); + } + + else /* compose on row: implemented below. */ + { + do_local_compose = 1; + /* This leaves the alpha channel in the output, so it has to be + * removed by the code below. Set the encoding to the 'OPTIMIZE' + * one so the code only has to hack on the pixels that require + * composition. + */ + mode = PNG_ALPHA_OPTIMIZED; + } + } + + else /* output needs an alpha channel */ + { + /* This is tricky because it happens before the swap operation has + * been accomplished; however, the swap does *not* swap the added + * alpha channel (weird API), so it must be added in the correct + * place. + */ + png_uint_32 filler; /* opaque filler */ + int where; + + if (linear != 0) + filler = 65535; + + else + filler = 255; + +#ifdef PNG_FORMAT_AFIRST_SUPPORTED + if ((format & PNG_FORMAT_FLAG_AFIRST) != 0) + { + where = PNG_FILLER_BEFORE; + change &= ~PNG_FORMAT_FLAG_AFIRST; + } + + else +#endif + where = PNG_FILLER_AFTER; + + png_set_add_alpha(png_ptr, filler, where); + } + + /* This stops the (irrelevant) call to swap_alpha below. */ + change &= ~PNG_FORMAT_FLAG_ALPHA; + } + + /* Now set the alpha mode correctly; this is always done, even if there is + * no alpha channel in either the input or the output because it correctly + * sets the output gamma. + */ + png_set_alpha_mode_fixed(png_ptr, mode, output_gamma); + +# ifdef PNG_FORMAT_BGR_SUPPORTED + if ((change & PNG_FORMAT_FLAG_BGR) != 0) + { + /* Check only the output format; PNG is never BGR; don't do this if + * the output is gray, but fix up the 'format' value in that case. + */ + if ((format & PNG_FORMAT_FLAG_COLOR) != 0) + png_set_bgr(png_ptr); + + else + format &= ~PNG_FORMAT_FLAG_BGR; + + change &= ~PNG_FORMAT_FLAG_BGR; + } +# endif + +# ifdef PNG_FORMAT_AFIRST_SUPPORTED + if ((change & PNG_FORMAT_FLAG_AFIRST) != 0) + { + /* Only relevant if there is an alpha channel - it's particularly + * important to handle this correctly because do_local_compose may + * be set above and then libpng will keep the alpha channel for this + * code to remove. + */ + if ((format & PNG_FORMAT_FLAG_ALPHA) != 0) + { + /* Disable this if doing a local background, + * TODO: remove this when local background is no longer required. + */ + if (do_local_background != 2) + png_set_swap_alpha(png_ptr); + } + + else + format &= ~PNG_FORMAT_FLAG_AFIRST; + + change &= ~PNG_FORMAT_FLAG_AFIRST; + } +# endif + + /* If the *output* is 16-bit then we need to check for a byte-swap on this + * architecture. + */ + if (linear != 0) + { + png_uint_16 le = 0x0001; + + if ((*(png_const_bytep) & le) != 0) + png_set_swap(png_ptr); + } + + /* If change is not now 0 some transformation is missing - error out. */ + if (change != 0) + png_error(png_ptr, "png_read_image: unsupported transformation"); + } + + PNG_SKIP_CHUNKS(png_ptr); + + /* Update the 'info' structure and make sure the result is as required; first + * make sure to turn on the interlace handling if it will be required + * (because it can't be turned on *after* the call to png_read_update_info!) + * + * TODO: remove the do_local_background fixup below. + */ + if (do_local_compose == 0 && do_local_background != 2) + passes = png_set_interlace_handling(png_ptr); + + png_read_update_info(png_ptr, info_ptr); + + { + png_uint_32 info_format = 0; + + if ((info_ptr->color_type & PNG_COLOR_MASK_COLOR) != 0) + info_format |= PNG_FORMAT_FLAG_COLOR; + + if ((info_ptr->color_type & PNG_COLOR_MASK_ALPHA) != 0) + { + /* do_local_compose removes this channel below. */ + if (do_local_compose == 0) + { + /* do_local_background does the same if required. */ + if (do_local_background != 2 || + (format & PNG_FORMAT_FLAG_ALPHA) != 0) + info_format |= PNG_FORMAT_FLAG_ALPHA; + } + } + + else if (do_local_compose != 0) /* internal error */ + png_error(png_ptr, "png_image_read: alpha channel lost"); + + if ((format & PNG_FORMAT_FLAG_ASSOCIATED_ALPHA) != 0) { + info_format |= PNG_FORMAT_FLAG_ASSOCIATED_ALPHA; + } + + if (info_ptr->bit_depth == 16) + info_format |= PNG_FORMAT_FLAG_LINEAR; + +#ifdef PNG_FORMAT_BGR_SUPPORTED + if ((png_ptr->transformations & PNG_BGR) != 0) + info_format |= PNG_FORMAT_FLAG_BGR; +#endif + +#ifdef PNG_FORMAT_AFIRST_SUPPORTED + if (do_local_background == 2) + { + if ((format & PNG_FORMAT_FLAG_AFIRST) != 0) + info_format |= PNG_FORMAT_FLAG_AFIRST; + } + + if ((png_ptr->transformations & PNG_SWAP_ALPHA) != 0 || + ((png_ptr->transformations & PNG_ADD_ALPHA) != 0 && + (png_ptr->flags & PNG_FLAG_FILLER_AFTER) == 0)) + { + if (do_local_background == 2) + png_error(png_ptr, "unexpected alpha swap transformation"); + + info_format |= PNG_FORMAT_FLAG_AFIRST; + } +# endif + + /* This is actually an internal error. */ + if (info_format != format) + png_error(png_ptr, "png_read_image: invalid transformations"); + } + + /* Now read the rows. If do_local_compose is set then it is necessary to use + * a local row buffer. The output will be GA, RGBA or BGRA and must be + * converted to G, RGB or BGR as appropriate. The 'local_row' member of the + * display acts as a flag. + */ + { + png_voidp first_row = display->buffer; + ptrdiff_t row_bytes = display->row_stride; + + if (linear != 0) + row_bytes *= 2; + + /* The following expression is designed to work correctly whether it gives + * a signed or an unsigned result. + */ + if (row_bytes < 0) + { + char *ptr = png_voidcast(char*, first_row); + ptr += (image->height-1) * (-row_bytes); + first_row = png_voidcast(png_voidp, ptr); + } + + display->first_row = first_row; + display->row_bytes = row_bytes; + } + + if (do_local_compose != 0) + { + int result; + png_voidp row = png_malloc(png_ptr, png_get_rowbytes(png_ptr, info_ptr)); + + display->local_row = row; + result = png_safe_execute(image, png_image_read_composite, display); + display->local_row = NULL; + png_free(png_ptr, row); + + return result; + } + + else if (do_local_background == 2) + { + int result; + png_voidp row = png_malloc(png_ptr, png_get_rowbytes(png_ptr, info_ptr)); + + display->local_row = row; + result = png_safe_execute(image, png_image_read_background, display); + display->local_row = NULL; + png_free(png_ptr, row); + + return result; + } + + else + { + png_alloc_size_t row_bytes = (png_alloc_size_t)display->row_bytes; + + while (--passes >= 0) + { + png_uint_32 y = image->height; + png_bytep row = png_voidcast(png_bytep, display->first_row); + + for (; y > 0; --y) + { + png_read_row(png_ptr, row, NULL); + row += row_bytes; + } + } + + return 1; + } +} + +int PNGAPI +png_image_finish_read(png_imagep image, png_const_colorp background, + void *buffer, png_int_32 row_stride, void *colormap) +{ + if (image != NULL && image->version == PNG_IMAGE_VERSION) + { + /* Check for row_stride overflow. This check is not performed on the + * original PNG format because it may not occur in the output PNG format + * and libpng deals with the issues of reading the original. + */ + unsigned int channels = PNG_IMAGE_PIXEL_CHANNELS(image->format); + + /* The following checks just the 'row_stride' calculation to ensure it + * fits in a signed 32-bit value. Because channels/components can be + * either 1 or 2 bytes in size the length of a row can still overflow 32 + * bits; this is just to verify that the 'row_stride' argument can be + * represented. + */ + if (image->width <= 0x7fffffffU/channels) /* no overflow */ + { + png_uint_32 check; + png_uint_32 png_row_stride = image->width * channels; + + if (row_stride == 0) + row_stride = (png_int_32)/*SAFE*/png_row_stride; + + if (row_stride < 0) + check = (png_uint_32)(-row_stride); + + else + check = (png_uint_32)row_stride; + + /* This verifies 'check', the absolute value of the actual stride + * passed in and detects overflow in the application calculation (i.e. + * if the app did actually pass in a non-zero 'row_stride'. + */ + if (image->opaque != NULL && buffer != NULL && check >= png_row_stride) + { + /* Now check for overflow of the image buffer calculation; this + * limits the whole image size to 32 bits for API compatibility with + * the current, 32-bit, PNG_IMAGE_BUFFER_SIZE macro. + * + * The PNG_IMAGE_BUFFER_SIZE macro is: + * + * (PNG_IMAGE_PIXEL_COMPONENT_SIZE(fmt)*height*(row_stride)) + * + * And the component size is always 1 or 2, so make sure that the + * number of *bytes* that the application is saying are available + * does actually fit into a 32-bit number. + * + * NOTE: this will be changed in 1.7 because PNG_IMAGE_BUFFER_SIZE + * will be changed to use png_alloc_size_t; bigger images can be + * accommodated on 64-bit systems. + */ + if (image->height <= + 0xffffffffU/PNG_IMAGE_PIXEL_COMPONENT_SIZE(image->format)/check) + { + if ((image->format & PNG_FORMAT_FLAG_COLORMAP) == 0 || + (image->colormap_entries > 0 && colormap != NULL)) + { + int result; + png_image_read_control display; + + memset(&display, 0, (sizeof display)); + display.image = image; + display.buffer = buffer; + display.row_stride = row_stride; + display.colormap = colormap; + display.background = background; + display.local_row = NULL; + + /* Choose the correct 'end' routine; for the color-map case + * all the setup has already been done. + */ + if ((image->format & PNG_FORMAT_FLAG_COLORMAP) != 0) + result = + png_safe_execute(image, + png_image_read_colormap, &display) && + png_safe_execute(image, + png_image_read_colormapped, &display); + + else + result = + png_safe_execute(image, + png_image_read_direct, &display); + + png_image_free(image); + return result; + } + + else + return png_image_error(image, + "png_image_finish_read[color-map]: no color-map"); + } + + else + return png_image_error(image, + "png_image_finish_read: image too large"); + } + + else + return png_image_error(image, + "png_image_finish_read: invalid argument"); + } + + else + return png_image_error(image, + "png_image_finish_read: row_stride too large"); + } + + else if (image != NULL) + return png_image_error(image, + "png_image_finish_read: damaged PNG_IMAGE_VERSION"); + + return 0; +} + +#endif /* SIMPLIFIED_READ */ +#endif /* READ */ diff --git a/widget/milsko/milskosrc/external/libpng/src/pngrio.c b/widget/milsko/milskosrc/external/libpng/src/pngrio.c new file mode 100644 index 0000000000..b4a216161b --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/src/pngrio.c @@ -0,0 +1,119 @@ +/* pngrio.c - functions for data input + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This file provides a location for all input. Users who need + * special handling are expected to write a function that has the same + * arguments as this and performs a similar function, but that possibly + * has a different input method. Note that you shouldn't change this + * function, but rather write a replacement function and then make + * libpng use it at run time with png_set_read_fn(...). + */ + +#include "pngpriv.h" + +#ifdef PNG_READ_SUPPORTED + +/* Read the data from whatever input you are using. The default routine + * reads from a file pointer. Note that this routine sometimes gets called + * with very small lengths, so you should implement some kind of simple + * buffering if you are using unbuffered reads. This should never be asked + * to read more than 64K on a 16-bit machine. + */ +void /* PRIVATE */ +png_read_data(png_structrp png_ptr, png_bytep data, size_t length) +{ + png_debug1(4, "reading %d bytes", (int)length); + + if (png_ptr->read_data_fn != NULL) + (*(png_ptr->read_data_fn))(png_ptr, data, length); + + else + png_error(png_ptr, "Call to NULL read function"); +} + +#ifdef PNG_STDIO_SUPPORTED +/* This is the function that does the actual reading of data. If you are + * not reading from a standard C stream, you should create a replacement + * read_data function and use it at run time with png_set_read_fn(), rather + * than changing the library. + */ +void PNGCBAPI +png_default_read_data(png_structp png_ptr, png_bytep data, size_t length) +{ + size_t check; + + if (png_ptr == NULL) + return; + + /* fread() returns 0 on error, so it is OK to store this in a size_t + * instead of an int, which is what fread() actually returns. + */ + check = fread(data, 1, length, png_voidcast(FILE *, png_ptr->io_ptr)); + + if (check != length) + png_error(png_ptr, "Read Error"); +} +#endif + +/* This function allows the application to supply a new input function + * for libpng if standard C streams aren't being used. + * + * This function takes as its arguments: + * + * png_ptr - pointer to a png input data structure + * + * io_ptr - pointer to user supplied structure containing info about + * the input functions. May be NULL. + * + * read_data_fn - pointer to a new input function that takes as its + * arguments a pointer to a png_struct, a pointer to + * a location where input data can be stored, and a 32-bit + * unsigned int that is the number of bytes to be read. + * To exit and output any fatal error messages the new write + * function should call png_error(png_ptr, "Error msg"). + * May be NULL, in which case libpng's default function will + * be used. + */ +void PNGAPI +png_set_read_fn(png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr read_data_fn) +{ + if (png_ptr == NULL) + return; + + png_ptr->io_ptr = io_ptr; + +#ifdef PNG_STDIO_SUPPORTED + if (read_data_fn != NULL) + png_ptr->read_data_fn = read_data_fn; + + else + png_ptr->read_data_fn = png_default_read_data; +#else + png_ptr->read_data_fn = read_data_fn; +#endif + +#ifdef PNG_WRITE_SUPPORTED + /* It is an error to write to a read device */ + if (png_ptr->write_data_fn != NULL) + { + png_ptr->write_data_fn = NULL; + png_warning(png_ptr, + "Can't set both read_data_fn and write_data_fn in the" + " same structure"); + } +#endif + +#ifdef PNG_WRITE_FLUSH_SUPPORTED + png_ptr->output_flush_fn = NULL; +#endif +} +#endif /* READ */ diff --git a/widget/milsko/milskosrc/external/libpng/src/pngrtran.c b/widget/milsko/milskosrc/external/libpng/src/pngrtran.c new file mode 100644 index 0000000000..1809db7047 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/src/pngrtran.c @@ -0,0 +1,5124 @@ +/* pngrtran.c - transforms the data in a row for PNG readers + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This file contains functions optionally called by an application + * in order to tell libpng how to handle data when reading a PNG. + * Transformations that are used in both reading and writing are + * in pngtrans.c. + */ + +#include "pngpriv.h" + +#ifdef PNG_ARM_NEON_IMPLEMENTATION +# if PNG_ARM_NEON_IMPLEMENTATION == 1 +# define PNG_ARM_NEON_INTRINSICS_AVAILABLE +# if defined(_MSC_VER) && !defined(__clang__) && defined(_M_ARM64) +# include +# else +# include +# endif +# endif +#endif + +#ifdef PNG_RISCV_RVV_IMPLEMENTATION +# if PNG_RISCV_RVV_IMPLEMENTATION == 1 +# define PNG_RISCV_RVV_INTRINSICS_AVAILABLE +# endif +#endif + +#ifdef PNG_READ_SUPPORTED + +/* Set the action on getting a CRC error for an ancillary or critical chunk. */ +void PNGAPI +png_set_crc_action(png_structrp png_ptr, int crit_action, int ancil_action) +{ + png_debug(1, "in png_set_crc_action"); + + if (png_ptr == NULL) + return; + + /* Tell libpng how we react to CRC errors in critical chunks */ + switch (crit_action) + { + case PNG_CRC_NO_CHANGE: /* Leave setting as is */ + break; + + case PNG_CRC_WARN_USE: /* Warn/use data */ + png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; + png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE; + break; + + case PNG_CRC_QUIET_USE: /* Quiet/use data */ + png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; + png_ptr->flags |= PNG_FLAG_CRC_CRITICAL_USE | + PNG_FLAG_CRC_CRITICAL_IGNORE; + break; + + case PNG_CRC_WARN_DISCARD: /* Not a valid action for critical data */ + png_warning(png_ptr, + "Can't discard critical data on CRC error"); + /* FALLTHROUGH */ + case PNG_CRC_ERROR_QUIT: /* Error/quit */ + + case PNG_CRC_DEFAULT: + default: + png_ptr->flags &= ~PNG_FLAG_CRC_CRITICAL_MASK; + break; + } + + /* Tell libpng how we react to CRC errors in ancillary chunks */ + switch (ancil_action) + { + case PNG_CRC_NO_CHANGE: /* Leave setting as is */ + break; + + case PNG_CRC_WARN_USE: /* Warn/use data */ + png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; + png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE; + break; + + case PNG_CRC_QUIET_USE: /* Quiet/use data */ + png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; + png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_USE | + PNG_FLAG_CRC_ANCILLARY_NOWARN; + break; + + case PNG_CRC_ERROR_QUIT: /* Error/quit */ + png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; + png_ptr->flags |= PNG_FLAG_CRC_ANCILLARY_NOWARN; + break; + + case PNG_CRC_WARN_DISCARD: /* Warn/discard data */ + + case PNG_CRC_DEFAULT: + default: + png_ptr->flags &= ~PNG_FLAG_CRC_ANCILLARY_MASK; + break; + } +} + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED +/* Is it OK to set a transformation now? Only if png_start_read_image or + * png_read_update_info have not been called. It is not necessary for the IHDR + * to have been read in all cases; the need_IHDR parameter allows for this + * check too. + */ +static int +png_rtran_ok(png_structrp png_ptr, int need_IHDR) +{ + if (png_ptr != NULL) + { + if ((png_ptr->flags & PNG_FLAG_ROW_INIT) != 0) + png_app_error(png_ptr, + "invalid after png_start_read_image or png_read_update_info"); + + else if (need_IHDR && (png_ptr->mode & PNG_HAVE_IHDR) == 0) + png_app_error(png_ptr, "invalid before the PNG header has been read"); + + else + { + /* Turn on failure to initialize correctly for all transforms. */ + png_ptr->flags |= PNG_FLAG_DETECT_UNINITIALIZED; + + return 1; /* Ok */ + } + } + + return 0; /* no png_error possible! */ +} +#endif + +#ifdef PNG_READ_BACKGROUND_SUPPORTED +/* Handle alpha and tRNS via a background color */ +void PNGFAPI +png_set_background_fixed(png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, png_fixed_point background_gamma) +{ + png_debug(1, "in png_set_background_fixed"); + + if (png_rtran_ok(png_ptr, 0) == 0 || background_color == NULL) + return; + + if (background_gamma_code == PNG_BACKGROUND_GAMMA_UNKNOWN) + { + png_warning(png_ptr, "Application must supply a known background gamma"); + return; + } + + png_ptr->transformations |= PNG_COMPOSE | PNG_STRIP_ALPHA; + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + + png_ptr->background = *background_color; + png_ptr->background_gamma = background_gamma; + png_ptr->background_gamma_type = (png_byte)(background_gamma_code); + if (need_expand != 0) + png_ptr->transformations |= PNG_BACKGROUND_EXPAND; + else + png_ptr->transformations &= ~PNG_BACKGROUND_EXPAND; +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_background(png_structrp png_ptr, + png_const_color_16p background_color, int background_gamma_code, + int need_expand, double background_gamma) +{ + png_set_background_fixed(png_ptr, background_color, background_gamma_code, + need_expand, png_fixed(png_ptr, background_gamma, "png_set_background")); +} +# endif /* FLOATING_POINT */ +#endif /* READ_BACKGROUND */ + +/* Scale 16-bit depth files to 8-bit depth. If both of these are set then the + * one that pngrtran does first (scale) happens. This is necessary to allow the + * TRANSFORM and API behavior to be somewhat consistent, and it's simpler. + */ +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED +void PNGAPI +png_set_scale_16(png_structrp png_ptr) +{ + png_debug(1, "in png_set_scale_16"); + + if (png_rtran_ok(png_ptr, 0) == 0) + return; + + png_ptr->transformations |= PNG_SCALE_16_TO_8; +} +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED +/* Chop 16-bit depth files to 8-bit depth */ +void PNGAPI +png_set_strip_16(png_structrp png_ptr) +{ + png_debug(1, "in png_set_strip_16"); + + if (png_rtran_ok(png_ptr, 0) == 0) + return; + + png_ptr->transformations |= PNG_16_TO_8; +} +#endif + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED +void PNGAPI +png_set_strip_alpha(png_structrp png_ptr) +{ + png_debug(1, "in png_set_strip_alpha"); + + if (png_rtran_ok(png_ptr, 0) == 0) + return; + + png_ptr->transformations |= PNG_STRIP_ALPHA; +} +#endif + +#if defined(PNG_READ_ALPHA_MODE_SUPPORTED) || defined(PNG_READ_GAMMA_SUPPORTED) +/* PNGv3 conformance: this private API exists to resolve the now mandatory error + * resolution when multiple conflicting sources of gamma or colour space + * information are available. + * + * Terminology (assuming power law, "gamma", encodings): + * "screen" gamma: a power law imposed by the output device when digital + * samples are converted to visible light output. The EOTF - volage to + * luminance on output. + * + * "file" gamma: a power law used to encode luminance levels from the input + * data (the scene or the mastering display system) into digital voltages. + * The OETF - luminance to voltage on input. + * + * gamma "correction": a power law matching the **inverse** of the overall + * transfer function from input luminance levels to output levels. The + * **inverse** of the OOTF; the correction "corrects" for the OOTF by aiming + * to make the overall OOTF (including the correction) linear. + * + * It is important to understand this terminology because the defined terms are + * scattered throughout the libpng code and it is very easy to end up with the + * inverse of the power law required. + * + * Variable and struct::member names: + * file_gamma OETF how the PNG data was encoded + * + * screen_gamma EOTF how the screen will decode digital levels + * + * -- not used -- OOTF the net effect OETF x EOTF + * gamma_correction the inverse of OOTF to make the result linear + * + * All versions of libpng require a call to "png_set_gamma" to establish the + * "screen" gamma, the power law representing the EOTF. png_set_gamma may also + * set or default the "file" gamma; the OETF. gamma_correction is calculated + * internally. + * + * The earliest libpng versions required file_gamma to be supplied to set_gamma. + * Later versions started allowing png_set_gamma and, later, png_set_alpha_mode, + * to cause defaulting from the file data. + * + * PNGv3 mandated a particular form for this defaulting, one that is compatible + * with what libpng did except that if libpng detected inconsistencies it marked + * all the chunks as "invalid". PNGv3 effectively invalidates this prior code. + * + * Behaviour implemented below: + * translate_gamma_flags(gamma, is_screen) + * The libpng-1.6 API for the gamma parameters to libpng APIs + * (png_set_gamma and png_set_alpha_mode at present). This allows the + * 'gamma' value to be passed as a png_fixed_point number or as one of a + * set of integral values for specific "well known" examples of transfer + * functions. This is compatible with PNGv3. + */ +static png_fixed_point +translate_gamma_flags(png_fixed_point output_gamma, int is_screen) +{ + /* Check for flag values. The main reason for having the old Mac value as a + * flag is that it is pretty near impossible to work out what the correct + * value is from Apple documentation - a working Mac system is needed to + * discover the value! + */ + if (output_gamma == PNG_DEFAULT_sRGB || + output_gamma == PNG_FP_1 / PNG_DEFAULT_sRGB) + { + if (is_screen != 0) + output_gamma = PNG_GAMMA_sRGB; + else + output_gamma = PNG_GAMMA_sRGB_INVERSE; + } + + else if (output_gamma == PNG_GAMMA_MAC_18 || + output_gamma == PNG_FP_1 / PNG_GAMMA_MAC_18) + { + if (is_screen != 0) + output_gamma = PNG_GAMMA_MAC_OLD; + else + output_gamma = PNG_GAMMA_MAC_INVERSE; + } + + return output_gamma; +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +static png_fixed_point +convert_gamma_value(png_structrp png_ptr, double output_gamma) +{ + /* The following silently ignores cases where fixed point (times 100,000) + * gamma values are passed to the floating point API. This is safe and it + * means the fixed point constants work just fine with the floating point + * API. The alternative would just lead to undetected errors and spurious + * bug reports. Negative values fail inside the _fixed API unless they + * correspond to the flag values. + */ + if (output_gamma > 0 && output_gamma < 128) + output_gamma *= PNG_FP_1; + + /* This preserves -1 and -2 exactly: */ + output_gamma = floor(output_gamma + .5); + + if (output_gamma > PNG_FP_MAX || output_gamma < PNG_FP_MIN) + png_fixed_error(png_ptr, "gamma value"); + + return (png_fixed_point)output_gamma; +} +# endif + +static int +unsupported_gamma(png_structrp png_ptr, png_fixed_point gamma, int warn) +{ + /* Validate a gamma value to ensure it is in a reasonable range. The value + * is expected to be 1 or greater, but this range test allows for some + * viewing correction values. The intent is to weed out the API users + * who might use the inverse of the gamma value accidentally! + * + * 1.6.47: apply the test in png_set_gamma as well but only warn and return + * false if it fires. + * + * TODO: 1.8: make this an app_error in png_set_gamma as well. + */ + if (gamma < PNG_LIB_GAMMA_MIN || gamma > PNG_LIB_GAMMA_MAX) + { +# define msg "gamma out of supported range" + if (warn) + png_app_warning(png_ptr, msg); + else + png_app_error(png_ptr, msg); + return 1; +# undef msg + } + + return 0; +} +#endif /* READ_ALPHA_MODE || READ_GAMMA */ + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED +void PNGFAPI +png_set_alpha_mode_fixed(png_structrp png_ptr, int mode, + png_fixed_point output_gamma) +{ + png_fixed_point file_gamma; + int compose = 0; + + png_debug(1, "in png_set_alpha_mode_fixed"); + + if (png_rtran_ok(png_ptr, 0) == 0) + return; + + output_gamma = translate_gamma_flags(output_gamma, 1/*screen*/); + if (unsupported_gamma(png_ptr, output_gamma, 0/*error*/)) + return; + + /* The default file gamma is the inverse of the output gamma; the output + * gamma may be changed below so get the file value first. The default_gamma + * is set here and from the simplified API (which uses a different algorithm) + * so don't overwrite a set value: + */ + file_gamma = png_ptr->default_gamma; + if (file_gamma == 0) + { + file_gamma = png_reciprocal(output_gamma); + png_ptr->default_gamma = file_gamma; + } + + /* There are really 8 possibilities here, composed of any combination + * of: + * + * premultiply the color channels + * do not encode non-opaque pixels + * encode the alpha as well as the color channels + * + * The differences disappear if the input/output ('screen') gamma is 1.0, + * because then the encoding is a no-op and there is only the choice of + * premultiplying the color channels or not. + * + * png_set_alpha_mode and png_set_background interact because both use + * png_compose to do the work. Calling both is only useful when + * png_set_alpha_mode is used to set the default mode - PNG_ALPHA_PNG - along + * with a default gamma value. Otherwise PNG_COMPOSE must not be set. + */ + switch (mode) + { + case PNG_ALPHA_PNG: /* default: png standard */ + /* No compose, but it may be set by png_set_background! */ + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + break; + + case PNG_ALPHA_ASSOCIATED: /* color channels premultiplied */ + compose = 1; + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + /* The output is linear: */ + output_gamma = PNG_FP_1; + break; + + case PNG_ALPHA_OPTIMIZED: /* associated, non-opaque pixels linear */ + compose = 1; + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags |= PNG_FLAG_OPTIMIZE_ALPHA; + /* output_gamma records the encoding of opaque pixels! */ + break; + + case PNG_ALPHA_BROKEN: /* associated, non-linear, alpha encoded */ + compose = 1; + png_ptr->transformations |= PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + break; + + default: + png_error(png_ptr, "invalid alpha mode"); + } + + /* Set the screen gamma values: */ + png_ptr->screen_gamma = output_gamma; + + /* Finally, if pre-multiplying, set the background fields to achieve the + * desired result. + */ + if (compose != 0) + { + /* And obtain alpha pre-multiplication by composing on black: */ + memset(&png_ptr->background, 0, (sizeof png_ptr->background)); + png_ptr->background_gamma = file_gamma; /* just in case */ + png_ptr->background_gamma_type = PNG_BACKGROUND_GAMMA_FILE; + png_ptr->transformations &= ~PNG_BACKGROUND_EXPAND; + + if ((png_ptr->transformations & PNG_COMPOSE) != 0) + png_error(png_ptr, + "conflicting calls to set alpha mode and background"); + + png_ptr->transformations |= PNG_COMPOSE; + } +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_alpha_mode(png_structrp png_ptr, int mode, double output_gamma) +{ + png_set_alpha_mode_fixed(png_ptr, mode, convert_gamma_value(png_ptr, + output_gamma)); +} +# endif +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +/* Dither file to 8-bit. Supply a palette, the current number + * of elements in the palette, the maximum number of elements + * allowed, and a histogram if possible. If the current number + * of colors is greater than the maximum number, the palette will be + * modified to fit in the maximum number. "full_quantize" indicates + * whether we need a quantizing cube set up for RGB images, or if we + * simply are reducing the number of colors in a paletted image. + */ + +typedef struct png_dsort_struct +{ + struct png_dsort_struct * next; + png_byte left; + png_byte right; +} png_dsort; +typedef png_dsort * png_dsortp; +typedef png_dsort * * png_dsortpp; + +void PNGAPI +png_set_quantize(png_structrp png_ptr, png_colorp palette, + int num_palette, int maximum_colors, png_const_uint_16p histogram, + int full_quantize) +{ + png_debug(1, "in png_set_quantize"); + + if (png_rtran_ok(png_ptr, 0) == 0) + return; + + png_ptr->transformations |= PNG_QUANTIZE; + + if (full_quantize == 0) + { + int i; + + png_ptr->quantize_index = (png_bytep)png_malloc(png_ptr, + (png_alloc_size_t)num_palette); + for (i = 0; i < num_palette; i++) + png_ptr->quantize_index[i] = (png_byte)i; + } + + if (num_palette > maximum_colors) + { + if (histogram != NULL) + { + /* This is easy enough, just throw out the least used colors. + * Perhaps not the best solution, but good enough. + */ + + int i; + + /* Initialize an array to sort colors */ + png_ptr->quantize_sort = (png_bytep)png_malloc(png_ptr, + (png_alloc_size_t)num_palette); + + /* Initialize the quantize_sort array */ + for (i = 0; i < num_palette; i++) + png_ptr->quantize_sort[i] = (png_byte)i; + + /* Find the least used palette entries by starting a + * bubble sort, and running it until we have sorted + * out enough colors. Note that we don't care about + * sorting all the colors, just finding which are + * least used. + */ + + for (i = num_palette - 1; i >= maximum_colors; i--) + { + int done; /* To stop early if the list is pre-sorted */ + int j; + + done = 1; + for (j = 0; j < i; j++) + { + if (histogram[png_ptr->quantize_sort[j]] + < histogram[png_ptr->quantize_sort[j + 1]]) + { + png_byte t; + + t = png_ptr->quantize_sort[j]; + png_ptr->quantize_sort[j] = png_ptr->quantize_sort[j + 1]; + png_ptr->quantize_sort[j + 1] = t; + done = 0; + } + } + + if (done != 0) + break; + } + + /* Swap the palette around, and set up a table, if necessary */ + if (full_quantize != 0) + { + int j = num_palette; + + /* Put all the useful colors within the max, but don't + * move the others. + */ + for (i = 0; i < maximum_colors; i++) + { + if ((int)png_ptr->quantize_sort[i] >= maximum_colors) + { + do + j--; + while ((int)png_ptr->quantize_sort[j] >= maximum_colors); + + palette[i] = palette[j]; + } + } + } + else + { + int j = num_palette; + + /* Move all the used colors inside the max limit, and + * develop a translation table. + */ + for (i = 0; i < maximum_colors; i++) + { + /* Only move the colors we need to */ + if ((int)png_ptr->quantize_sort[i] >= maximum_colors) + { + png_color tmp_color; + + do + j--; + while ((int)png_ptr->quantize_sort[j] >= maximum_colors); + + tmp_color = palette[j]; + palette[j] = palette[i]; + palette[i] = tmp_color; + /* Indicate where the color went */ + png_ptr->quantize_index[j] = (png_byte)i; + png_ptr->quantize_index[i] = (png_byte)j; + } + } + + /* Find closest color for those colors we are not using */ + for (i = 0; i < num_palette; i++) + { + if ((int)png_ptr->quantize_index[i] >= maximum_colors) + { + int min_d, k, min_k, d_index; + + /* Find the closest color to one we threw out */ + d_index = png_ptr->quantize_index[i]; + min_d = PNG_COLOR_DIST(palette[d_index], palette[0]); + for (k = 1, min_k = 0; k < maximum_colors; k++) + { + int d; + + d = PNG_COLOR_DIST(palette[d_index], palette[k]); + + if (d < min_d) + { + min_d = d; + min_k = k; + } + } + /* Point to closest color */ + png_ptr->quantize_index[i] = (png_byte)min_k; + } + } + } + png_free(png_ptr, png_ptr->quantize_sort); + png_ptr->quantize_sort = NULL; + } + else + { + /* This is much harder to do simply (and quickly). Perhaps + * we need to go through a median cut routine, but those + * don't always behave themselves with only a few colors + * as input. So we will just find the closest two colors, + * and throw out one of them (chosen somewhat randomly). + * [We don't understand this at all, so if someone wants to + * work on improving it, be our guest - AED, GRP] + */ + int i; + int max_d; + int num_new_palette; + png_dsortp t; + png_dsortpp hash; + + t = NULL; + + /* Initialize palette index arrays */ + png_ptr->index_to_palette = (png_bytep)png_malloc(png_ptr, + (png_alloc_size_t)num_palette); + png_ptr->palette_to_index = (png_bytep)png_malloc(png_ptr, + (png_alloc_size_t)num_palette); + + /* Initialize the sort array */ + for (i = 0; i < num_palette; i++) + { + png_ptr->index_to_palette[i] = (png_byte)i; + png_ptr->palette_to_index[i] = (png_byte)i; + } + + hash = (png_dsortpp)png_calloc(png_ptr, (png_alloc_size_t)(769 * + (sizeof (png_dsortp)))); + + num_new_palette = num_palette; + + /* Initial wild guess at how far apart the farthest pixel + * pair we will be eliminating will be. Larger + * numbers mean more areas will be allocated, Smaller + * numbers run the risk of not saving enough data, and + * having to do this all over again. + * + * I have not done extensive checking on this number. + */ + max_d = 96; + + while (num_new_palette > maximum_colors) + { + for (i = 0; i < num_new_palette - 1; i++) + { + int j; + + for (j = i + 1; j < num_new_palette; j++) + { + int d; + + d = PNG_COLOR_DIST(palette[i], palette[j]); + + if (d <= max_d) + { + + t = (png_dsortp)png_malloc_warn(png_ptr, + (png_alloc_size_t)(sizeof (png_dsort))); + + if (t == NULL) + break; + + t->next = hash[d]; + t->left = (png_byte)i; + t->right = (png_byte)j; + hash[d] = t; + } + } + if (t == NULL) + break; + } + + if (t != NULL) + for (i = 0; i <= max_d; i++) + { + if (hash[i] != NULL) + { + png_dsortp p; + + for (p = hash[i]; p; p = p->next) + { + if ((int)png_ptr->index_to_palette[p->left] + < num_new_palette && + (int)png_ptr->index_to_palette[p->right] + < num_new_palette) + { + int j, next_j; + + if (num_new_palette & 0x01) + { + j = p->left; + next_j = p->right; + } + else + { + j = p->right; + next_j = p->left; + } + + num_new_palette--; + palette[png_ptr->index_to_palette[j]] + = palette[num_new_palette]; + if (full_quantize == 0) + { + int k; + + for (k = 0; k < num_palette; k++) + { + if (png_ptr->quantize_index[k] == + png_ptr->index_to_palette[j]) + png_ptr->quantize_index[k] = + png_ptr->index_to_palette[next_j]; + + if ((int)png_ptr->quantize_index[k] == + num_new_palette) + png_ptr->quantize_index[k] = + png_ptr->index_to_palette[j]; + } + } + + png_ptr->index_to_palette[png_ptr->palette_to_index + [num_new_palette]] = png_ptr->index_to_palette[j]; + + png_ptr->palette_to_index[png_ptr->index_to_palette[j]] + = png_ptr->palette_to_index[num_new_palette]; + + png_ptr->index_to_palette[j] = + (png_byte)num_new_palette; + + png_ptr->palette_to_index[num_new_palette] = + (png_byte)j; + } + if (num_new_palette <= maximum_colors) + break; + } + if (num_new_palette <= maximum_colors) + break; + } + } + + for (i = 0; i < 769; i++) + { + if (hash[i] != NULL) + { + png_dsortp p = hash[i]; + while (p) + { + t = p->next; + png_free(png_ptr, p); + p = t; + } + } + hash[i] = 0; + } + max_d += 96; + } + png_free(png_ptr, hash); + png_free(png_ptr, png_ptr->palette_to_index); + png_free(png_ptr, png_ptr->index_to_palette); + png_ptr->palette_to_index = NULL; + png_ptr->index_to_palette = NULL; + } + num_palette = maximum_colors; + } + if (png_ptr->palette == NULL) + { + png_ptr->palette = palette; + } + png_ptr->num_palette = (png_uint_16)num_palette; + + if (full_quantize != 0) + { + int i; + png_bytep distance; + int total_bits = PNG_QUANTIZE_RED_BITS + PNG_QUANTIZE_GREEN_BITS + + PNG_QUANTIZE_BLUE_BITS; + int num_red = (1 << PNG_QUANTIZE_RED_BITS); + int num_green = (1 << PNG_QUANTIZE_GREEN_BITS); + int num_blue = (1 << PNG_QUANTIZE_BLUE_BITS); + size_t num_entries = ((size_t)1 << total_bits); + + png_ptr->palette_lookup = (png_bytep)png_calloc(png_ptr, + (png_alloc_size_t)(num_entries)); + + distance = (png_bytep)png_malloc(png_ptr, (png_alloc_size_t)num_entries); + + memset(distance, 0xff, num_entries); + + for (i = 0; i < num_palette; i++) + { + int ir, ig, ib; + int r = (palette[i].red >> (8 - PNG_QUANTIZE_RED_BITS)); + int g = (palette[i].green >> (8 - PNG_QUANTIZE_GREEN_BITS)); + int b = (palette[i].blue >> (8 - PNG_QUANTIZE_BLUE_BITS)); + + for (ir = 0; ir < num_red; ir++) + { + /* int dr = abs(ir - r); */ + int dr = ((ir > r) ? ir - r : r - ir); + int index_r = (ir << (PNG_QUANTIZE_BLUE_BITS + + PNG_QUANTIZE_GREEN_BITS)); + + for (ig = 0; ig < num_green; ig++) + { + /* int dg = abs(ig - g); */ + int dg = ((ig > g) ? ig - g : g - ig); + int dt = dr + dg; + int dm = ((dr > dg) ? dr : dg); + int index_g = index_r | (ig << PNG_QUANTIZE_BLUE_BITS); + + for (ib = 0; ib < num_blue; ib++) + { + int d_index = index_g | ib; + /* int db = abs(ib - b); */ + int db = ((ib > b) ? ib - b : b - ib); + int dmax = ((dm > db) ? dm : db); + int d = dmax + dt + db; + + if (d < (int)distance[d_index]) + { + distance[d_index] = (png_byte)d; + png_ptr->palette_lookup[d_index] = (png_byte)i; + } + } + } + } + } + + png_free(png_ptr, distance); + } +} +#endif /* READ_QUANTIZE */ + +#ifdef PNG_READ_GAMMA_SUPPORTED +void PNGFAPI +png_set_gamma_fixed(png_structrp png_ptr, png_fixed_point scrn_gamma, + png_fixed_point file_gamma) +{ + png_debug(1, "in png_set_gamma_fixed"); + + if (png_rtran_ok(png_ptr, 0) == 0) + return; + + /* New in libpng-1.5.4 - reserve particular negative values as flags. */ + scrn_gamma = translate_gamma_flags(scrn_gamma, 1/*screen*/); + file_gamma = translate_gamma_flags(file_gamma, 0/*file*/); + + /* Checking the gamma values for being >0 was added in 1.5.4 along with the + * premultiplied alpha support; this actually hides an undocumented feature + * of the previous implementation which allowed gamma processing to be + * disabled in background handling. There is no evidence (so far) that this + * was being used; however, png_set_background itself accepted and must still + * accept '0' for the gamma value it takes, because it isn't always used. + * + * Since this is an API change (albeit a very minor one that removes an + * undocumented API feature) the following checks were only enabled in + * libpng-1.6.0. + */ + if (file_gamma <= 0) + png_app_error(png_ptr, "invalid file gamma in png_set_gamma"); + if (scrn_gamma <= 0) + png_app_error(png_ptr, "invalid screen gamma in png_set_gamma"); + + if (unsupported_gamma(png_ptr, file_gamma, 1/*warn*/) || + unsupported_gamma(png_ptr, scrn_gamma, 1/*warn*/)) + return; + + /* 1.6.47: png_struct::file_gamma and png_struct::screen_gamma are now only + * written by this API. This removes dependencies on the order of API calls + * and allows the complex gamma checks to be delayed until needed. + */ + png_ptr->file_gamma = file_gamma; + png_ptr->screen_gamma = scrn_gamma; +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_gamma(png_structrp png_ptr, double scrn_gamma, double file_gamma) +{ + png_set_gamma_fixed(png_ptr, convert_gamma_value(png_ptr, scrn_gamma), + convert_gamma_value(png_ptr, file_gamma)); +} +# endif /* FLOATING_POINT */ +#endif /* READ_GAMMA */ + +#ifdef PNG_READ_EXPAND_SUPPORTED +/* Expand paletted images to RGB, expand grayscale images of + * less than 8-bit depth to 8-bit depth, and expand tRNS chunks + * to alpha channels. + */ +void PNGAPI +png_set_expand(png_structrp png_ptr) +{ + png_debug(1, "in png_set_expand"); + + if (png_rtran_ok(png_ptr, 0) == 0) + return; + + png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS); +} + +/* GRR 19990627: the following three functions currently are identical + * to png_set_expand(). However, it is entirely reasonable that someone + * might wish to expand an indexed image to RGB but *not* expand a single, + * fully transparent palette entry to a full alpha channel--perhaps instead + * convert tRNS to the grayscale/RGB format (16-bit RGB value), or replace + * the transparent color with a particular RGB value, or drop tRNS entirely. + * IOW, a future version of the library may make the transformations flag + * a bit more fine-grained, with separate bits for each of these three + * functions. + * + * More to the point, these functions make it obvious what libpng will be + * doing, whereas "expand" can (and does) mean any number of things. + * + * GRP 20060307: In libpng-1.2.9, png_set_gray_1_2_4_to_8() was modified + * to expand only the sample depth but not to expand the tRNS to alpha + * and its name was changed to png_set_expand_gray_1_2_4_to_8(). + */ + +/* Expand paletted images to RGB. */ +void PNGAPI +png_set_palette_to_rgb(png_structrp png_ptr) +{ + png_debug(1, "in png_set_palette_to_rgb"); + + if (png_rtran_ok(png_ptr, 0) == 0) + return; + + png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS); +} + +/* Expand grayscale images of less than 8-bit depth to 8 bits. */ +void PNGAPI +png_set_expand_gray_1_2_4_to_8(png_structrp png_ptr) +{ + png_debug(1, "in png_set_expand_gray_1_2_4_to_8"); + + if (png_rtran_ok(png_ptr, 0) == 0) + return; + + png_ptr->transformations |= PNG_EXPAND; +} + +/* Expand tRNS chunks to alpha channels. */ +void PNGAPI +png_set_tRNS_to_alpha(png_structrp png_ptr) +{ + png_debug(1, "in png_set_tRNS_to_alpha"); + + if (png_rtran_ok(png_ptr, 0) == 0) + return; + + png_ptr->transformations |= (PNG_EXPAND | PNG_EXPAND_tRNS); +} +#endif /* READ_EXPAND */ + +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* Expand to 16-bit channels, expand the tRNS chunk too (because otherwise + * it may not work correctly.) + */ +void PNGAPI +png_set_expand_16(png_structrp png_ptr) +{ + png_debug(1, "in png_set_expand_16"); + + if (png_rtran_ok(png_ptr, 0) == 0) + return; + + png_ptr->transformations |= (PNG_EXPAND_16 | PNG_EXPAND | PNG_EXPAND_tRNS); +} +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +void PNGAPI +png_set_gray_to_rgb(png_structrp png_ptr) +{ + png_debug(1, "in png_set_gray_to_rgb"); + + if (png_rtran_ok(png_ptr, 0) == 0) + return; + + /* Because rgb must be 8 bits or more: */ + png_set_expand_gray_1_2_4_to_8(png_ptr); + png_ptr->transformations |= PNG_GRAY_TO_RGB; +} +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +void PNGFAPI +png_set_rgb_to_gray_fixed(png_structrp png_ptr, int error_action, + png_fixed_point red, png_fixed_point green) +{ + png_debug(1, "in png_set_rgb_to_gray_fixed"); + + /* Need the IHDR here because of the check on color_type below. */ + /* TODO: fix this */ + if (png_rtran_ok(png_ptr, 1) == 0) + return; + + switch (error_action) + { + case PNG_ERROR_ACTION_NONE: + png_ptr->transformations |= PNG_RGB_TO_GRAY; + break; + + case PNG_ERROR_ACTION_WARN: + png_ptr->transformations |= PNG_RGB_TO_GRAY_WARN; + break; + + case PNG_ERROR_ACTION_ERROR: + png_ptr->transformations |= PNG_RGB_TO_GRAY_ERR; + break; + + default: + png_error(png_ptr, "invalid error action to rgb_to_gray"); + } + + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) +#ifdef PNG_READ_EXPAND_SUPPORTED + png_ptr->transformations |= PNG_EXPAND; +#else + { + /* Make this an error in 1.6 because otherwise the application may assume + * that it just worked and get a memory overwrite. + */ + png_error(png_ptr, + "Cannot do RGB_TO_GRAY without EXPAND_SUPPORTED"); + + /* png_ptr->transformations &= ~PNG_RGB_TO_GRAY; */ + } +#endif + { + if (red >= 0 && green >= 0 && red + green <= PNG_FP_1) + { + png_uint_16 red_int, green_int; + + /* NOTE: this calculation does not round, but this behavior is retained + * for consistency; the inaccuracy is very small. The code here always + * overwrites the coefficients, regardless of whether they have been + * defaulted or set already. + */ + red_int = (png_uint_16)(((png_uint_32)red*32768)/100000); + green_int = (png_uint_16)(((png_uint_32)green*32768)/100000); + + png_ptr->rgb_to_gray_red_coeff = red_int; + png_ptr->rgb_to_gray_green_coeff = green_int; + png_ptr->rgb_to_gray_coefficients_set = 1; + } + + else if (red >= 0 && green >= 0) + png_app_warning(png_ptr, + "ignoring out of range rgb_to_gray coefficients"); + } +} + +#ifdef PNG_FLOATING_POINT_SUPPORTED +/* Convert a RGB image to a grayscale of the same width. This allows us, + * for example, to convert a 24 bpp RGB image into an 8 bpp grayscale image. + */ + +void PNGAPI +png_set_rgb_to_gray(png_structrp png_ptr, int error_action, double red, + double green) +{ + png_set_rgb_to_gray_fixed(png_ptr, error_action, + png_fixed(png_ptr, red, "rgb to gray red coefficient"), + png_fixed(png_ptr, green, "rgb to gray green coefficient")); +} +#endif /* FLOATING POINT */ + +#endif /* RGB_TO_GRAY */ + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +void PNGAPI +png_set_read_user_transform_fn(png_structrp png_ptr, png_user_transform_ptr + read_user_transform_fn) +{ + png_debug(1, "in png_set_read_user_transform_fn"); + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + png_ptr->transformations |= PNG_USER_TRANSFORM; + png_ptr->read_user_transform_fn = read_user_transform_fn; +#endif +} +#endif + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED +#ifdef PNG_READ_GAMMA_SUPPORTED +/* In the case of gamma transformations only do transformations on images where + * the [file] gamma and screen_gamma are not close reciprocals, otherwise it + * slows things down slightly, and also needlessly introduces small errors. + */ +static int /* PRIVATE */ +png_gamma_threshold(png_fixed_point screen_gamma, png_fixed_point file_gamma) +{ + /* PNG_GAMMA_THRESHOLD is the threshold for performing gamma + * correction as a difference of the overall transform from 1.0 + * + * We want to compare the threshold with s*f - 1, if we get + * overflow here it is because of wacky gamma values so we + * turn on processing anyway. + */ + png_fixed_point gtest; + return !png_muldiv(>est, screen_gamma, file_gamma, PNG_FP_1) || + png_gamma_significant(gtest); +} +#endif + +/* Initialize everything needed for the read. This includes modifying + * the palette. + */ + +/* For the moment 'png_init_palette_transformations' and + * 'png_init_rgb_transformations' only do some flag canceling optimizations. + * The intent is that these two routines should have palette or rgb operations + * extracted from 'png_init_read_transformations'. + */ +static void /* PRIVATE */ +png_init_palette_transformations(png_structrp png_ptr) +{ + /* Called to handle the (input) palette case. In png_do_read_transformations + * the first step is to expand the palette if requested, so this code must + * take care to only make changes that are invariant with respect to the + * palette expansion, or only do them if there is no expansion. + * + * STRIP_ALPHA has already been handled in the caller (by setting num_trans + * to 0.) + */ + int input_has_alpha = 0; + int input_has_transparency = 0; + + if (png_ptr->num_trans > 0) + { + int i; + + /* Ignore if all the entries are opaque (unlikely!) */ + for (i=0; inum_trans; ++i) + { + if (png_ptr->trans_alpha[i] == 255) + continue; + else if (png_ptr->trans_alpha[i] == 0) + input_has_transparency = 1; + else + { + input_has_transparency = 1; + input_has_alpha = 1; + break; + } + } + } + + /* If no alpha we can optimize. */ + if (input_has_alpha == 0) + { + /* Any alpha means background and associative alpha processing is + * required, however if the alpha is 0 or 1 throughout OPTIMIZE_ALPHA + * and ENCODE_ALPHA are irrelevant. + */ + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + + if (input_has_transparency == 0) + png_ptr->transformations &= ~(PNG_COMPOSE | PNG_BACKGROUND_EXPAND); + } + +#if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED) + /* png_set_background handling - deals with the complexity of whether the + * background color is in the file format or the screen format in the case + * where an 'expand' will happen. + */ + + /* The following code cannot be entered in the alpha pre-multiplication case + * because PNG_BACKGROUND_EXPAND is cancelled below. + */ + if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) != 0 && + (png_ptr->transformations & PNG_EXPAND) != 0) + { + { + png_ptr->background.red = + png_ptr->palette[png_ptr->background.index].red; + png_ptr->background.green = + png_ptr->palette[png_ptr->background.index].green; + png_ptr->background.blue = + png_ptr->palette[png_ptr->background.index].blue; + +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED + if ((png_ptr->transformations & PNG_INVERT_ALPHA) != 0) + { + if ((png_ptr->transformations & PNG_EXPAND_tRNS) == 0) + { + /* Invert the alpha channel (in tRNS) unless the pixels are + * going to be expanded, in which case leave it for later + */ + int i, istop = png_ptr->num_trans; + + for (i = 0; i < istop; i++) + png_ptr->trans_alpha[i] = + (png_byte)(255 - png_ptr->trans_alpha[i]); + } + } +#endif /* READ_INVERT_ALPHA */ + } + } /* background expand and (therefore) no alpha association. */ +#endif /* READ_EXPAND && READ_BACKGROUND */ +} + +static void /* PRIVATE */ +png_init_rgb_transformations(png_structrp png_ptr) +{ + /* Added to libpng-1.5.4: check the color type to determine whether there + * is any alpha or transparency in the image and simply cancel the + * background and alpha mode stuff if there isn't. + */ + int input_has_alpha = (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) != 0; + int input_has_transparency = png_ptr->num_trans > 0; + + /* If no alpha we can optimize. */ + if (input_has_alpha == 0) + { + /* Any alpha means background and associative alpha processing is + * required, however if the alpha is 0 or 1 throughout OPTIMIZE_ALPHA + * and ENCODE_ALPHA are irrelevant. + */ +# ifdef PNG_READ_ALPHA_MODE_SUPPORTED + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; +# endif + + if (input_has_transparency == 0) + png_ptr->transformations &= ~(PNG_COMPOSE | PNG_BACKGROUND_EXPAND); + } + +#if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED) + /* png_set_background handling - deals with the complexity of whether the + * background color is in the file format or the screen format in the case + * where an 'expand' will happen. + */ + + /* The following code cannot be entered in the alpha pre-multiplication case + * because PNG_BACKGROUND_EXPAND is cancelled below. + */ + if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) != 0 && + (png_ptr->transformations & PNG_EXPAND) != 0 && + (png_ptr->color_type & PNG_COLOR_MASK_COLOR) == 0) + /* i.e., GRAY or GRAY_ALPHA */ + { + { + /* Expand background and tRNS chunks */ + int gray = png_ptr->background.gray; + int trans_gray = png_ptr->trans_color.gray; + + switch (png_ptr->bit_depth) + { + case 1: + gray *= 0xff; + trans_gray *= 0xff; + break; + + case 2: + gray *= 0x55; + trans_gray *= 0x55; + break; + + case 4: + gray *= 0x11; + trans_gray *= 0x11; + break; + + default: + + case 8: + /* FALLTHROUGH */ /* (Already 8 bits) */ + + case 16: + /* Already a full 16 bits */ + break; + } + + png_ptr->background.red = png_ptr->background.green = + png_ptr->background.blue = (png_uint_16)gray; + + if ((png_ptr->transformations & PNG_EXPAND_tRNS) == 0) + { + png_ptr->trans_color.red = png_ptr->trans_color.green = + png_ptr->trans_color.blue = (png_uint_16)trans_gray; + } + } + } /* background expand and (therefore) no alpha association. */ +#endif /* READ_EXPAND && READ_BACKGROUND */ +} + +#ifdef PNG_READ_GAMMA_SUPPORTED +png_fixed_point /* PRIVATE */ +png_resolve_file_gamma(png_const_structrp png_ptr) +{ + png_fixed_point file_gamma; + + /* The file gamma is determined by these precedence rules, in this order + * (i.e. use the first value found): + * + * png_set_gamma; png_struct::file_gammma if not zero, then: + * png_struct::chunk_gamma if not 0 (determined the PNGv3 rules), then: + * png_set_gamma; 1/png_struct::screen_gamma if not zero + * + * 0 (i.e. do no gamma handling) + */ + file_gamma = png_ptr->file_gamma; + if (file_gamma != 0) + return file_gamma; + + file_gamma = png_ptr->chunk_gamma; + if (file_gamma != 0) + return file_gamma; + + file_gamma = png_ptr->default_gamma; + if (file_gamma != 0) + return file_gamma; + + /* If png_reciprocal oveflows it returns 0 which indicates to the caller that + * there is no usable file gamma. (The checks added to png_set_gamma and + * png_set_alpha_mode should prevent a screen_gamma which would overflow.) + */ + if (png_ptr->screen_gamma != 0) + file_gamma = png_reciprocal(png_ptr->screen_gamma); + + return file_gamma; +} + +static int +png_init_gamma_values(png_structrp png_ptr) +{ + /* The following temporary indicates if overall gamma correction is + * required. + */ + int gamma_correction = 0; + png_fixed_point file_gamma, screen_gamma; + + /* Resolve the file_gamma. See above: if png_ptr::screen_gamma is set + * file_gamma will always be set here: + */ + file_gamma = png_resolve_file_gamma(png_ptr); + screen_gamma = png_ptr->screen_gamma; + + if (file_gamma > 0) /* file has been set */ + { + if (screen_gamma > 0) /* screen set too */ + gamma_correction = png_gamma_threshold(file_gamma, screen_gamma); + + else + /* Assume the output matches the input; a long time default behavior + * of libpng, although the standard has nothing to say about this. + */ + screen_gamma = png_reciprocal(file_gamma); + } + + else /* both unset, prevent corrections: */ + file_gamma = screen_gamma = PNG_FP_1; + + png_ptr->file_gamma = file_gamma; + png_ptr->screen_gamma = screen_gamma; + return gamma_correction; + +} +#endif /* READ_GAMMA */ + +void /* PRIVATE */ +png_init_read_transformations(png_structrp png_ptr) +{ + png_debug(1, "in png_init_read_transformations"); + + /* This internal function is called from png_read_start_row in pngrutil.c + * and it is called before the 'rowbytes' calculation is done, so the code + * in here can change or update the transformations flags. + * + * First do updates that do not depend on the details of the PNG image data + * being processed. + */ + +#ifdef PNG_READ_GAMMA_SUPPORTED + /* Prior to 1.5.4 these tests were performed from png_set_gamma, 1.5.4 adds + * png_set_alpha_mode and this is another source for a default file gamma so + * the test needs to be performed later - here. In addition prior to 1.5.4 + * the tests were repeated for the PALETTE color type here - this is no + * longer necessary (and doesn't seem to have been necessary before.) + * + * PNGv3: the new mandatory precedence/priority rules for colour space chunks + * are handled here (by calling the above function). + * + * Turn the gamma transformation on or off as appropriate. Notice that + * PNG_GAMMA just refers to the file->screen correction. Alpha composition + * may independently cause gamma correction because it needs linear data + * (e.g. if the file has a gAMA chunk but the screen gamma hasn't been + * specified.) In any case this flag may get turned off in the code + * immediately below if the transform can be handled outside the row loop. + */ + if (png_init_gamma_values(png_ptr) != 0) + png_ptr->transformations |= PNG_GAMMA; + + else + png_ptr->transformations &= ~PNG_GAMMA; +#endif + + /* Certain transformations have the effect of preventing other + * transformations that happen afterward in png_do_read_transformations; + * resolve the interdependencies here. From the code of + * png_do_read_transformations the order is: + * + * 1) PNG_EXPAND (including PNG_EXPAND_tRNS) + * 2) PNG_STRIP_ALPHA (if no compose) + * 3) PNG_RGB_TO_GRAY + * 4) PNG_GRAY_TO_RGB iff !PNG_BACKGROUND_IS_GRAY + * 5) PNG_COMPOSE + * 6) PNG_GAMMA + * 7) PNG_STRIP_ALPHA (if compose) + * 8) PNG_ENCODE_ALPHA + * 9) PNG_SCALE_16_TO_8 + * 10) PNG_16_TO_8 + * 11) PNG_QUANTIZE (converts to palette) + * 12) PNG_EXPAND_16 + * 13) PNG_GRAY_TO_RGB iff PNG_BACKGROUND_IS_GRAY + * 14) PNG_INVERT_MONO + * 15) PNG_INVERT_ALPHA + * 16) PNG_SHIFT + * 17) PNG_PACK + * 18) PNG_BGR + * 19) PNG_PACKSWAP + * 20) PNG_FILLER (includes PNG_ADD_ALPHA) + * 21) PNG_SWAP_ALPHA + * 22) PNG_SWAP_BYTES + * 23) PNG_USER_TRANSFORM [must be last] + */ +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED + if ((png_ptr->transformations & PNG_STRIP_ALPHA) != 0 && + (png_ptr->transformations & PNG_COMPOSE) == 0) + { + /* Stripping the alpha channel happens immediately after the 'expand' + * transformations, before all other transformation, so it cancels out + * the alpha handling. It has the side effect negating the effect of + * PNG_EXPAND_tRNS too: + */ + png_ptr->transformations &= ~(PNG_BACKGROUND_EXPAND | PNG_ENCODE_ALPHA | + PNG_EXPAND_tRNS); + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + + /* Kill the tRNS chunk itself too. Prior to 1.5.4 this did not happen + * so transparency information would remain just so long as it wasn't + * expanded. This produces unexpected API changes if the set of things + * that do PNG_EXPAND_tRNS changes (perfectly possible given the + * documentation - which says ask for what you want, accept what you + * get.) This makes the behavior consistent from 1.5.4: + */ + png_ptr->num_trans = 0; + } +#endif /* STRIP_ALPHA supported, no COMPOSE */ + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED + /* If the screen gamma is about 1.0 then the OPTIMIZE_ALPHA and ENCODE_ALPHA + * settings will have no effect. + */ + if (png_gamma_significant(png_ptr->screen_gamma) == 0) + { + png_ptr->transformations &= ~PNG_ENCODE_ALPHA; + png_ptr->flags &= ~PNG_FLAG_OPTIMIZE_ALPHA; + } +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + /* Make sure the coefficients for the rgb to gray conversion are set + * appropriately. + */ + if ((png_ptr->transformations & PNG_RGB_TO_GRAY) != 0) + png_set_rgb_coefficients(png_ptr); +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +#if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED) + /* Detect gray background and attempt to enable optimization for + * gray --> RGB case. + * + * Note: if PNG_BACKGROUND_EXPAND is set and color_type is either RGB or + * RGB_ALPHA (in which case need_expand is superfluous anyway), the + * background color might actually be gray yet not be flagged as such. + * This is not a problem for the current code, which uses + * PNG_BACKGROUND_IS_GRAY only to decide when to do the + * png_do_gray_to_rgb() transformation. + * + * TODO: this code needs to be revised to avoid the complexity and + * interdependencies. The color type of the background should be recorded in + * png_set_background, along with the bit depth, then the code has a record + * of exactly what color space the background is currently in. + */ + if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) != 0) + { + /* PNG_BACKGROUND_EXPAND: the background is in the file color space, so if + * the file was grayscale the background value is gray. + */ + if ((png_ptr->color_type & PNG_COLOR_MASK_COLOR) == 0) + png_ptr->mode |= PNG_BACKGROUND_IS_GRAY; + } + + else if ((png_ptr->transformations & PNG_COMPOSE) != 0) + { + /* PNG_COMPOSE: png_set_background was called with need_expand false, + * so the color is in the color space of the output or png_set_alpha_mode + * was called and the color is black. Ignore RGB_TO_GRAY because that + * happens before GRAY_TO_RGB. + */ + if ((png_ptr->transformations & PNG_GRAY_TO_RGB) != 0) + { + if (png_ptr->background.red == png_ptr->background.green && + png_ptr->background.red == png_ptr->background.blue) + { + png_ptr->mode |= PNG_BACKGROUND_IS_GRAY; + png_ptr->background.gray = png_ptr->background.red; + } + } + } +#endif /* READ_EXPAND && READ_BACKGROUND */ +#endif /* READ_GRAY_TO_RGB */ + + /* For indexed PNG data (PNG_COLOR_TYPE_PALETTE) many of the transformations + * can be performed directly on the palette, and some (such as rgb to gray) + * can be optimized inside the palette. This is particularly true of the + * composite (background and alpha) stuff, which can be pretty much all done + * in the palette even if the result is expanded to RGB or gray afterward. + * + * NOTE: this is Not Yet Implemented, the code behaves as in 1.5.1 and + * earlier and the palette stuff is actually handled on the first row. This + * leads to the reported bug that the palette returned by png_get_PLTE is not + * updated. + */ + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + png_init_palette_transformations(png_ptr); + + else + png_init_rgb_transformations(png_ptr); + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \ + defined(PNG_READ_EXPAND_16_SUPPORTED) + if ((png_ptr->transformations & PNG_EXPAND_16) != 0 && + (png_ptr->transformations & PNG_COMPOSE) != 0 && + (png_ptr->transformations & PNG_BACKGROUND_EXPAND) == 0 && + png_ptr->bit_depth != 16) + { + /* TODO: fix this. Because the expand_16 operation is after the compose + * handling the background color must be 8, not 16, bits deep, but the + * application will supply a 16-bit value so reduce it here. + * + * The PNG_BACKGROUND_EXPAND code above does not expand to 16 bits at + * present, so that case is ok (until do_expand_16 is moved.) + * + * NOTE: this discards the low 16 bits of the user supplied background + * color, but until expand_16 works properly there is no choice! + */ +# define CHOP(x) (x)=((png_uint_16)PNG_DIV257(x)) + CHOP(png_ptr->background.red); + CHOP(png_ptr->background.green); + CHOP(png_ptr->background.blue); + CHOP(png_ptr->background.gray); +# undef CHOP + } +#endif /* READ_BACKGROUND && READ_EXPAND_16 */ + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \ + (defined(PNG_READ_SCALE_16_TO_8_SUPPORTED) || \ + defined(PNG_READ_STRIP_16_TO_8_SUPPORTED)) + if ((png_ptr->transformations & (PNG_16_TO_8|PNG_SCALE_16_TO_8)) != 0 && + (png_ptr->transformations & PNG_COMPOSE) != 0 && + (png_ptr->transformations & PNG_BACKGROUND_EXPAND) == 0 && + png_ptr->bit_depth == 16) + { + /* On the other hand, if a 16-bit file is to be reduced to 8-bits per + * component this will also happen after PNG_COMPOSE and so the background + * color must be pre-expanded here. + * + * TODO: fix this too. + */ + png_ptr->background.red = (png_uint_16)(png_ptr->background.red * 257); + png_ptr->background.green = + (png_uint_16)(png_ptr->background.green * 257); + png_ptr->background.blue = (png_uint_16)(png_ptr->background.blue * 257); + png_ptr->background.gray = (png_uint_16)(png_ptr->background.gray * 257); + } +#endif + + /* NOTE: below 'PNG_READ_ALPHA_MODE_SUPPORTED' is presumed to also enable the + * background support (see the comments in scripts/pnglibconf.dfa), this + * allows pre-multiplication of the alpha channel to be implemented as + * compositing on black. This is probably sub-optimal and has been done in + * 1.5.4 betas simply to enable external critique and testing (i.e. to + * implement the new API quickly, without lots of internal changes.) + */ + +#ifdef PNG_READ_GAMMA_SUPPORTED +# ifdef PNG_READ_BACKGROUND_SUPPORTED + /* Includes ALPHA_MODE */ + png_ptr->background_1 = png_ptr->background; +# endif + + /* This needs to change - in the palette image case a whole set of tables are + * built when it would be quicker to just calculate the correct value for + * each palette entry directly. Also, the test is too tricky - why check + * PNG_RGB_TO_GRAY if PNG_GAMMA is not set? The answer seems to be that + * PNG_GAMMA is cancelled even if the gamma is known? The test excludes the + * PNG_COMPOSE case, so apparently if there is no *overall* gamma correction + * the gamma tables will not be built even if composition is required on a + * gamma encoded value. + * + * In 1.5.4 this is addressed below by an additional check on the individual + * file gamma - if it is not 1.0 both RGB_TO_GRAY and COMPOSE need the + * tables. + */ + if ((png_ptr->transformations & PNG_GAMMA) != 0 || + ((png_ptr->transformations & PNG_RGB_TO_GRAY) != 0 && + (png_gamma_significant(png_ptr->file_gamma) != 0 || + png_gamma_significant(png_ptr->screen_gamma) != 0)) || + ((png_ptr->transformations & PNG_COMPOSE) != 0 && + (png_gamma_significant(png_ptr->file_gamma) != 0 || + png_gamma_significant(png_ptr->screen_gamma) != 0 +# ifdef PNG_READ_BACKGROUND_SUPPORTED + || (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_UNIQUE && + png_gamma_significant(png_ptr->background_gamma) != 0) +# endif + )) || ((png_ptr->transformations & PNG_ENCODE_ALPHA) != 0 && + png_gamma_significant(png_ptr->screen_gamma) != 0)) + { + png_build_gamma_table(png_ptr, png_ptr->bit_depth); + +#ifdef PNG_READ_BACKGROUND_SUPPORTED + if ((png_ptr->transformations & PNG_COMPOSE) != 0) + { + /* Issue a warning about this combination: because RGB_TO_GRAY is + * optimized to do the gamma transform if present yet do_background has + * to do the same thing if both options are set a + * double-gamma-correction happens. This is true in all versions of + * libpng to date. + */ + if ((png_ptr->transformations & PNG_RGB_TO_GRAY) != 0) + png_warning(png_ptr, + "libpng does not support gamma+background+rgb_to_gray"); + + if ((png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) != 0) + { + /* We don't get to here unless there is a tRNS chunk with non-opaque + * entries - see the checking code at the start of this function. + */ + png_color back, back_1; + png_colorp palette = png_ptr->palette; + int num_palette = png_ptr->num_palette; + int i; + if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE) + { + + back.red = png_ptr->gamma_table[png_ptr->background.red]; + back.green = png_ptr->gamma_table[png_ptr->background.green]; + back.blue = png_ptr->gamma_table[png_ptr->background.blue]; + + back_1.red = png_ptr->gamma_to_1[png_ptr->background.red]; + back_1.green = png_ptr->gamma_to_1[png_ptr->background.green]; + back_1.blue = png_ptr->gamma_to_1[png_ptr->background.blue]; + } + else + { + png_fixed_point g, gs; + + switch (png_ptr->background_gamma_type) + { + case PNG_BACKGROUND_GAMMA_SCREEN: + g = (png_ptr->screen_gamma); + gs = PNG_FP_1; + break; + + case PNG_BACKGROUND_GAMMA_FILE: + g = png_reciprocal(png_ptr->file_gamma); + gs = png_reciprocal2(png_ptr->file_gamma, + png_ptr->screen_gamma); + break; + + case PNG_BACKGROUND_GAMMA_UNIQUE: + g = png_reciprocal(png_ptr->background_gamma); + gs = png_reciprocal2(png_ptr->background_gamma, + png_ptr->screen_gamma); + break; + default: + g = PNG_FP_1; /* back_1 */ + gs = PNG_FP_1; /* back */ + break; + } + + if (png_gamma_significant(gs) != 0) + { + back.red = png_gamma_8bit_correct(png_ptr->background.red, + gs); + back.green = png_gamma_8bit_correct(png_ptr->background.green, + gs); + back.blue = png_gamma_8bit_correct(png_ptr->background.blue, + gs); + } + + else + { + back.red = (png_byte)png_ptr->background.red; + back.green = (png_byte)png_ptr->background.green; + back.blue = (png_byte)png_ptr->background.blue; + } + + if (png_gamma_significant(g) != 0) + { + back_1.red = png_gamma_8bit_correct(png_ptr->background.red, + g); + back_1.green = png_gamma_8bit_correct( + png_ptr->background.green, g); + back_1.blue = png_gamma_8bit_correct(png_ptr->background.blue, + g); + } + + else + { + back_1.red = (png_byte)png_ptr->background.red; + back_1.green = (png_byte)png_ptr->background.green; + back_1.blue = (png_byte)png_ptr->background.blue; + } + } + + for (i = 0; i < num_palette; i++) + { + if (i < (int)png_ptr->num_trans && + png_ptr->trans_alpha[i] != 0xff) + { + if (png_ptr->trans_alpha[i] == 0) + { + palette[i] = back; + } + else /* if (png_ptr->trans_alpha[i] != 0xff) */ + { + png_byte v, w; + + v = png_ptr->gamma_to_1[palette[i].red]; + png_composite(w, v, png_ptr->trans_alpha[i], back_1.red); + palette[i].red = png_ptr->gamma_from_1[w]; + + v = png_ptr->gamma_to_1[palette[i].green]; + png_composite(w, v, png_ptr->trans_alpha[i], back_1.green); + palette[i].green = png_ptr->gamma_from_1[w]; + + v = png_ptr->gamma_to_1[palette[i].blue]; + png_composite(w, v, png_ptr->trans_alpha[i], back_1.blue); + palette[i].blue = png_ptr->gamma_from_1[w]; + } + } + else + { + palette[i].red = png_ptr->gamma_table[palette[i].red]; + palette[i].green = png_ptr->gamma_table[palette[i].green]; + palette[i].blue = png_ptr->gamma_table[palette[i].blue]; + } + } + + /* Prevent the transformations being done again. + * + * NOTE: this is highly dubious; it removes the transformations in + * place. This seems inconsistent with the general treatment of the + * transformations elsewhere. + */ + png_ptr->transformations &= ~(PNG_COMPOSE | PNG_GAMMA); + } /* color_type == PNG_COLOR_TYPE_PALETTE */ + + /* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */ + else /* color_type != PNG_COLOR_TYPE_PALETTE */ + { + int gs_sig, g_sig; + png_fixed_point g = PNG_FP_1; /* Correction to linear */ + png_fixed_point gs = PNG_FP_1; /* Correction to screen */ + + switch (png_ptr->background_gamma_type) + { + case PNG_BACKGROUND_GAMMA_SCREEN: + g = png_ptr->screen_gamma; + /* gs = PNG_FP_1; */ + break; + + case PNG_BACKGROUND_GAMMA_FILE: + g = png_reciprocal(png_ptr->file_gamma); + gs = png_reciprocal2(png_ptr->file_gamma, + png_ptr->screen_gamma); + break; + + case PNG_BACKGROUND_GAMMA_UNIQUE: + g = png_reciprocal(png_ptr->background_gamma); + gs = png_reciprocal2(png_ptr->background_gamma, + png_ptr->screen_gamma); + break; + + default: + png_error(png_ptr, "invalid background gamma type"); + } + + g_sig = png_gamma_significant(g); + gs_sig = png_gamma_significant(gs); + + if (g_sig != 0) + png_ptr->background_1.gray = png_gamma_correct(png_ptr, + png_ptr->background.gray, g); + + if (gs_sig != 0) + png_ptr->background.gray = png_gamma_correct(png_ptr, + png_ptr->background.gray, gs); + + if ((png_ptr->background.red != png_ptr->background.green) || + (png_ptr->background.red != png_ptr->background.blue) || + (png_ptr->background.red != png_ptr->background.gray)) + { + /* RGB or RGBA with color background */ + if (g_sig != 0) + { + png_ptr->background_1.red = png_gamma_correct(png_ptr, + png_ptr->background.red, g); + + png_ptr->background_1.green = png_gamma_correct(png_ptr, + png_ptr->background.green, g); + + png_ptr->background_1.blue = png_gamma_correct(png_ptr, + png_ptr->background.blue, g); + } + + if (gs_sig != 0) + { + png_ptr->background.red = png_gamma_correct(png_ptr, + png_ptr->background.red, gs); + + png_ptr->background.green = png_gamma_correct(png_ptr, + png_ptr->background.green, gs); + + png_ptr->background.blue = png_gamma_correct(png_ptr, + png_ptr->background.blue, gs); + } + } + + else + { + /* GRAY, GRAY ALPHA, RGB, or RGBA with gray background */ + png_ptr->background_1.red = png_ptr->background_1.green + = png_ptr->background_1.blue = png_ptr->background_1.gray; + + png_ptr->background.red = png_ptr->background.green + = png_ptr->background.blue = png_ptr->background.gray; + } + + /* The background is now in screen gamma: */ + png_ptr->background_gamma_type = PNG_BACKGROUND_GAMMA_SCREEN; + } /* color_type != PNG_COLOR_TYPE_PALETTE */ + }/* png_ptr->transformations & PNG_BACKGROUND */ + + else + /* Transformation does not include PNG_BACKGROUND */ +#endif /* READ_BACKGROUND */ + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + /* RGB_TO_GRAY needs to have non-gamma-corrected values! */ + && ((png_ptr->transformations & PNG_EXPAND) == 0 || + (png_ptr->transformations & PNG_RGB_TO_GRAY) == 0) +#endif + ) + { + png_colorp palette = png_ptr->palette; + int num_palette = png_ptr->num_palette; + int i; + + /* NOTE: there are other transformations that should probably be in + * here too. + */ + for (i = 0; i < num_palette; i++) + { + palette[i].red = png_ptr->gamma_table[palette[i].red]; + palette[i].green = png_ptr->gamma_table[palette[i].green]; + palette[i].blue = png_ptr->gamma_table[palette[i].blue]; + } + + /* Done the gamma correction. */ + png_ptr->transformations &= ~PNG_GAMMA; + } /* color_type == PALETTE && !PNG_BACKGROUND transformation */ + } +#ifdef PNG_READ_BACKGROUND_SUPPORTED + else +#endif +#endif /* READ_GAMMA */ + +#ifdef PNG_READ_BACKGROUND_SUPPORTED + /* No GAMMA transformation (see the hanging else 4 lines above) */ + if ((png_ptr->transformations & PNG_COMPOSE) != 0 && + (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)) + { + int i; + int istop = (int)png_ptr->num_trans; + png_color back; + png_colorp palette = png_ptr->palette; + + back.red = (png_byte)png_ptr->background.red; + back.green = (png_byte)png_ptr->background.green; + back.blue = (png_byte)png_ptr->background.blue; + + for (i = 0; i < istop; i++) + { + if (png_ptr->trans_alpha[i] == 0) + { + palette[i] = back; + } + + else if (png_ptr->trans_alpha[i] != 0xff) + { + /* The png_composite() macro is defined in png.h */ + png_composite(palette[i].red, palette[i].red, + png_ptr->trans_alpha[i], back.red); + + png_composite(palette[i].green, palette[i].green, + png_ptr->trans_alpha[i], back.green); + + png_composite(palette[i].blue, palette[i].blue, + png_ptr->trans_alpha[i], back.blue); + } + } + + png_ptr->transformations &= ~PNG_COMPOSE; + } +#endif /* READ_BACKGROUND */ + +#ifdef PNG_READ_SHIFT_SUPPORTED + if ((png_ptr->transformations & PNG_SHIFT) != 0 && + (png_ptr->transformations & PNG_EXPAND) == 0 && + (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)) + { + int i; + int istop = png_ptr->num_palette; + int shift = 8 - png_ptr->sig_bit.red; + + png_ptr->transformations &= ~PNG_SHIFT; + + /* significant bits can be in the range 1 to 7 for a meaningful result, if + * the number of significant bits is 0 then no shift is done (this is an + * error condition which is silently ignored.) + */ + if (shift > 0 && shift < 8) + for (i=0; ipalette[i].red; + + component >>= shift; + png_ptr->palette[i].red = (png_byte)component; + } + + shift = 8 - png_ptr->sig_bit.green; + if (shift > 0 && shift < 8) + for (i=0; ipalette[i].green; + + component >>= shift; + png_ptr->palette[i].green = (png_byte)component; + } + + shift = 8 - png_ptr->sig_bit.blue; + if (shift > 0 && shift < 8) + for (i=0; ipalette[i].blue; + + component >>= shift; + png_ptr->palette[i].blue = (png_byte)component; + } + } +#endif /* READ_SHIFT */ +} + +/* Modify the info structure to reflect the transformations. The + * info should be updated so a PNG file could be written with it, + * assuming the transformations result in valid PNG data. + */ +void /* PRIVATE */ +png_read_transform_info(png_structrp png_ptr, png_inforp info_ptr) +{ + png_debug(1, "in png_read_transform_info"); + +#ifdef PNG_READ_EXPAND_SUPPORTED + if ((png_ptr->transformations & PNG_EXPAND) != 0) + { + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + /* This check must match what actually happens in + * png_do_expand_palette; if it ever checks the tRNS chunk to see if + * it is all opaque we must do the same (at present it does not.) + */ + if (png_ptr->num_trans > 0) + info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA; + + else + info_ptr->color_type = PNG_COLOR_TYPE_RGB; + + info_ptr->bit_depth = 8; + info_ptr->num_trans = 0; + + if (png_ptr->palette == NULL) + png_error (png_ptr, "Palette is NULL in indexed image"); + } + else + { + if (png_ptr->num_trans != 0) + { + if ((png_ptr->transformations & PNG_EXPAND_tRNS) != 0) + info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; + } + if (info_ptr->bit_depth < 8) + info_ptr->bit_depth = 8; + + info_ptr->num_trans = 0; + } + } +#endif + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) + /* The following is almost certainly wrong unless the background value is in + * the screen space! + */ + if ((png_ptr->transformations & PNG_COMPOSE) != 0) + info_ptr->background = png_ptr->background; +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED + /* The following used to be conditional on PNG_GAMMA (prior to 1.5.4), + * however it seems that the code in png_init_read_transformations, which has + * been called before this from png_read_update_info->png_read_start_row + * sometimes does the gamma transform and cancels the flag. + * + * TODO: this is confusing. It only changes the result of png_get_gAMA and, + * yes, it does return the value that the transformed data effectively has + * but does any app really understand this? + */ + info_ptr->gamma = png_ptr->file_gamma; +#endif + + if (info_ptr->bit_depth == 16) + { +# ifdef PNG_READ_16BIT_SUPPORTED +# ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED + if ((png_ptr->transformations & PNG_SCALE_16_TO_8) != 0) + info_ptr->bit_depth = 8; +# endif + +# ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED + if ((png_ptr->transformations & PNG_16_TO_8) != 0) + info_ptr->bit_depth = 8; +# endif + +# else + /* No 16-bit support: force chopping 16-bit input down to 8, in this case + * the app program can chose if both APIs are available by setting the + * correct scaling to use. + */ +# ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED + /* For compatibility with previous versions use the strip method by + * default. This code works because if PNG_SCALE_16_TO_8 is already + * set the code below will do that in preference to the chop. + */ + png_ptr->transformations |= PNG_16_TO_8; + info_ptr->bit_depth = 8; +# else + +# ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED + png_ptr->transformations |= PNG_SCALE_16_TO_8; + info_ptr->bit_depth = 8; +# else + + CONFIGURATION ERROR: you must enable at least one 16 to 8 method +# endif +# endif +#endif /* !READ_16BIT */ + } + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED + if ((png_ptr->transformations & PNG_GRAY_TO_RGB) != 0) + info_ptr->color_type = (png_byte)(info_ptr->color_type | + PNG_COLOR_MASK_COLOR); +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + if ((png_ptr->transformations & PNG_RGB_TO_GRAY) != 0) + info_ptr->color_type = (png_byte)(info_ptr->color_type & + ~PNG_COLOR_MASK_COLOR); +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED + if ((png_ptr->transformations & PNG_QUANTIZE) != 0) + { + if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) || + (info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) && + png_ptr->palette_lookup != 0 && info_ptr->bit_depth == 8) + { + info_ptr->color_type = PNG_COLOR_TYPE_PALETTE; + } + } +#endif + +#ifdef PNG_READ_EXPAND_16_SUPPORTED + if ((png_ptr->transformations & PNG_EXPAND_16) != 0 && + info_ptr->bit_depth == 8 && + info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) + { + info_ptr->bit_depth = 16; + } +#endif + +#ifdef PNG_READ_PACK_SUPPORTED + if ((png_ptr->transformations & PNG_PACK) != 0 && + (info_ptr->bit_depth < 8)) + info_ptr->bit_depth = 8; +#endif + + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + info_ptr->channels = 1; + + else if ((info_ptr->color_type & PNG_COLOR_MASK_COLOR) != 0) + info_ptr->channels = 3; + + else + info_ptr->channels = 1; + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED + if ((png_ptr->transformations & PNG_STRIP_ALPHA) != 0) + { + info_ptr->color_type = (png_byte)(info_ptr->color_type & + ~PNG_COLOR_MASK_ALPHA); + info_ptr->num_trans = 0; + } +#endif + + if ((info_ptr->color_type & PNG_COLOR_MASK_ALPHA) != 0) + info_ptr->channels++; + +#ifdef PNG_READ_FILLER_SUPPORTED + /* STRIP_ALPHA and FILLER allowed: MASK_ALPHA bit stripped above */ + if ((png_ptr->transformations & PNG_FILLER) != 0 && + (info_ptr->color_type == PNG_COLOR_TYPE_RGB || + info_ptr->color_type == PNG_COLOR_TYPE_GRAY)) + { + info_ptr->channels++; + /* If adding a true alpha channel not just filler */ + if ((png_ptr->transformations & PNG_ADD_ALPHA) != 0) + info_ptr->color_type |= PNG_COLOR_MASK_ALPHA; + } +#endif + +#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) && \ +defined(PNG_READ_USER_TRANSFORM_SUPPORTED) + if ((png_ptr->transformations & PNG_USER_TRANSFORM) != 0) + { + if (png_ptr->user_transform_depth != 0) + info_ptr->bit_depth = png_ptr->user_transform_depth; + + if (png_ptr->user_transform_channels != 0) + info_ptr->channels = png_ptr->user_transform_channels; + } +#endif + + info_ptr->pixel_depth = (png_byte)(info_ptr->channels * + info_ptr->bit_depth); + + info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, info_ptr->width); + + /* Adding in 1.5.4: cache the above value in png_struct so that we can later + * check in png_rowbytes that the user buffer won't get overwritten. Note + * that the field is not always set - if png_read_update_info isn't called + * the application has to either not do any transforms or get the calculation + * right itself. + */ + png_ptr->info_rowbytes = info_ptr->rowbytes; + +#ifndef PNG_READ_EXPAND_SUPPORTED + if (png_ptr != NULL) + return; +#endif +} + +#ifdef PNG_READ_PACK_SUPPORTED +/* Unpack pixels of 1, 2, or 4 bits per pixel into 1 byte per pixel, + * without changing the actual values. Thus, if you had a row with + * a bit depth of 1, you would end up with bytes that only contained + * the numbers 0 or 1. If you would rather they contain 0 and 255, use + * png_do_shift() after this. + */ +static void +png_do_unpack(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_unpack"); + + if (row_info->bit_depth < 8) + { + png_uint_32 i; + png_uint_32 row_width=row_info->width; + + switch (row_info->bit_depth) + { + case 1: + { + png_bytep sp = row + (size_t)((row_width - 1) >> 3); + png_bytep dp = row + (size_t)row_width - 1; + png_uint_32 shift = 7U - ((row_width + 7U) & 0x07); + for (i = 0; i < row_width; i++) + { + *dp = (png_byte)((*sp >> shift) & 0x01); + + if (shift == 7) + { + shift = 0; + sp--; + } + + else + shift++; + + dp--; + } + break; + } + + case 2: + { + + png_bytep sp = row + (size_t)((row_width - 1) >> 2); + png_bytep dp = row + (size_t)row_width - 1; + png_uint_32 shift = ((3U - ((row_width + 3U) & 0x03)) << 1); + for (i = 0; i < row_width; i++) + { + *dp = (png_byte)((*sp >> shift) & 0x03); + + if (shift == 6) + { + shift = 0; + sp--; + } + + else + shift += 2; + + dp--; + } + break; + } + + case 4: + { + png_bytep sp = row + (size_t)((row_width - 1) >> 1); + png_bytep dp = row + (size_t)row_width - 1; + png_uint_32 shift = ((1U - ((row_width + 1U) & 0x01)) << 2); + for (i = 0; i < row_width; i++) + { + *dp = (png_byte)((*sp >> shift) & 0x0f); + + if (shift == 4) + { + shift = 0; + sp--; + } + + else + shift = 4; + + dp--; + } + break; + } + + default: + break; + } + row_info->bit_depth = 8; + row_info->pixel_depth = (png_byte)(8 * row_info->channels); + row_info->rowbytes = row_width * row_info->channels; + } +} +#endif + +#ifdef PNG_READ_SHIFT_SUPPORTED +/* Reverse the effects of png_do_shift. This routine merely shifts the + * pixels back to their significant bits values. Thus, if you have + * a row of bit depth 8, but only 5 are significant, this will shift + * the values back to 0 through 31. + */ +static void +png_do_unshift(png_row_infop row_info, png_bytep row, + png_const_color_8p sig_bits) +{ + int color_type; + + png_debug(1, "in png_do_unshift"); + + /* The palette case has already been handled in the _init routine. */ + color_type = row_info->color_type; + + if (color_type != PNG_COLOR_TYPE_PALETTE) + { + int shift[4]; + int channels = 0; + int bit_depth = row_info->bit_depth; + + if ((color_type & PNG_COLOR_MASK_COLOR) != 0) + { + shift[channels++] = bit_depth - sig_bits->red; + shift[channels++] = bit_depth - sig_bits->green; + shift[channels++] = bit_depth - sig_bits->blue; + } + + else + { + shift[channels++] = bit_depth - sig_bits->gray; + } + + if ((color_type & PNG_COLOR_MASK_ALPHA) != 0) + { + shift[channels++] = bit_depth - sig_bits->alpha; + } + + { + int c, have_shift; + + for (c = have_shift = 0; c < channels; ++c) + { + /* A shift of more than the bit depth is an error condition but it + * gets ignored here. + */ + if (shift[c] <= 0 || shift[c] >= bit_depth) + shift[c] = 0; + + else + have_shift = 1; + } + + if (have_shift == 0) + return; + } + + switch (bit_depth) + { + default: + /* Must be 1bpp gray: should not be here! */ + /* NOTREACHED */ + break; + + case 2: + /* Must be 2bpp gray */ + /* assert(channels == 1 && shift[0] == 1) */ + { + png_bytep bp = row; + png_bytep bp_end = bp + row_info->rowbytes; + + while (bp < bp_end) + { + int b = (*bp >> 1) & 0x55; + *bp++ = (png_byte)b; + } + break; + } + + case 4: + /* Must be 4bpp gray */ + /* assert(channels == 1) */ + { + png_bytep bp = row; + png_bytep bp_end = bp + row_info->rowbytes; + int gray_shift = shift[0]; + int mask = 0xf >> gray_shift; + + mask |= mask << 4; + + while (bp < bp_end) + { + int b = (*bp >> gray_shift) & mask; + *bp++ = (png_byte)b; + } + break; + } + + case 8: + /* Single byte components, G, GA, RGB, RGBA */ + { + png_bytep bp = row; + png_bytep bp_end = bp + row_info->rowbytes; + int channel = 0; + + while (bp < bp_end) + { + int b = *bp >> shift[channel]; + if (++channel >= channels) + channel = 0; + *bp++ = (png_byte)b; + } + break; + } + +#ifdef PNG_READ_16BIT_SUPPORTED + case 16: + /* Double byte components, G, GA, RGB, RGBA */ + { + png_bytep bp = row; + png_bytep bp_end = bp + row_info->rowbytes; + int channel = 0; + + while (bp < bp_end) + { + int value = (bp[0] << 8) + bp[1]; + + value >>= shift[channel]; + if (++channel >= channels) + channel = 0; + *bp++ = (png_byte)(value >> 8); + *bp++ = (png_byte)value; + } + break; + } +#endif + } + } +} +#endif + +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED +/* Scale rows of bit depth 16 down to 8 accurately */ +static void +png_do_scale_16_to_8(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_scale_16_to_8"); + + if (row_info->bit_depth == 16) + { + png_bytep sp = row; /* source */ + png_bytep dp = row; /* destination */ + png_bytep ep = sp + row_info->rowbytes; /* end+1 */ + + while (sp < ep) + { + /* The input is an array of 16-bit components, these must be scaled to + * 8 bits each. For a 16-bit value V the required value (from the PNG + * specification) is: + * + * (V * 255) / 65535 + * + * This reduces to round(V / 257), or floor((V + 128.5)/257) + * + * Represent V as the two byte value vhi.vlo. Make a guess that the + * result is the top byte of V, vhi, then the correction to this value + * is: + * + * error = floor(((V-vhi.vhi) + 128.5) / 257) + * = floor(((vlo-vhi) + 128.5) / 257) + * + * This can be approximated using integer arithmetic (and a signed + * shift): + * + * error = (vlo-vhi+128) >> 8; + * + * The approximate differs from the exact answer only when (vlo-vhi) is + * 128; it then gives a correction of +1 when the exact correction is + * 0. This gives 128 errors. The exact answer (correct for all 16-bit + * input values) is: + * + * error = (vlo-vhi+128)*65535 >> 24; + * + * An alternative arithmetic calculation which also gives no errors is: + * + * (V * 255 + 32895) >> 16 + */ + + png_int_32 tmp = *sp++; /* must be signed! */ + tmp += (((int)*sp++ - tmp + 128) * 65535) >> 24; + *dp++ = (png_byte)tmp; + } + + row_info->bit_depth = 8; + row_info->pixel_depth = (png_byte)(8 * row_info->channels); + row_info->rowbytes = row_info->width * row_info->channels; + } +} +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED +static void +/* Simply discard the low byte. This was the default behavior prior + * to libpng-1.5.4. + */ +png_do_chop(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_chop"); + + if (row_info->bit_depth == 16) + { + png_bytep sp = row; /* source */ + png_bytep dp = row; /* destination */ + png_bytep ep = sp + row_info->rowbytes; /* end+1 */ + + while (sp < ep) + { + *dp++ = *sp; + sp += 2; /* skip low byte */ + } + + row_info->bit_depth = 8; + row_info->pixel_depth = (png_byte)(8 * row_info->channels); + row_info->rowbytes = row_info->width * row_info->channels; + } +} +#endif + +#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED +static void +png_do_read_swap_alpha(png_row_infop row_info, png_bytep row) +{ + png_uint_32 row_width = row_info->width; + + png_debug(1, "in png_do_read_swap_alpha"); + + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + /* This converts from RGBA to ARGB */ + if (row_info->bit_depth == 8) + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_byte save; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + save = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = save; + } + } + +#ifdef PNG_READ_16BIT_SUPPORTED + /* This converts from RRGGBBAA to AARRGGBB */ + else + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_byte save[2]; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + save[0] = *(--sp); + save[1] = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = save[0]; + *(--dp) = save[1]; + } + } +#endif + } + + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + /* This converts from GA to AG */ + if (row_info->bit_depth == 8) + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_byte save; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + save = *(--sp); + *(--dp) = *(--sp); + *(--dp) = save; + } + } + +#ifdef PNG_READ_16BIT_SUPPORTED + /* This converts from GGAA to AAGG */ + else + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_byte save[2]; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + save[0] = *(--sp); + save[1] = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = save[0]; + *(--dp) = save[1]; + } + } +#endif + } +} +#endif + +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED +static void +png_do_read_invert_alpha(png_row_infop row_info, png_bytep row) +{ + png_uint_32 row_width; + png_debug(1, "in png_do_read_invert_alpha"); + + row_width = row_info->width; + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + if (row_info->bit_depth == 8) + { + /* This inverts the alpha channel in RGBA */ + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + *(--dp) = (png_byte)(255 - *(--sp)); + +/* This does nothing: + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + We can replace it with: +*/ + sp-=3; + dp=sp; + } + } + +#ifdef PNG_READ_16BIT_SUPPORTED + /* This inverts the alpha channel in RRGGBBAA */ + else + { + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + *(--dp) = (png_byte)(255 - *(--sp)); + *(--dp) = (png_byte)(255 - *(--sp)); + +/* This does nothing: + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + We can replace it with: +*/ + sp-=6; + dp=sp; + } + } +#endif + } + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + if (row_info->bit_depth == 8) + { + /* This inverts the alpha channel in GA */ + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + *(--dp) = (png_byte)(255 - *(--sp)); + *(--dp) = *(--sp); + } + } + +#ifdef PNG_READ_16BIT_SUPPORTED + else + { + /* This inverts the alpha channel in GGAA */ + png_bytep sp = row + row_info->rowbytes; + png_bytep dp = sp; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + *(--dp) = (png_byte)(255 - *(--sp)); + *(--dp) = (png_byte)(255 - *(--sp)); +/* + *(--dp) = *(--sp); + *(--dp) = *(--sp); +*/ + sp-=2; + dp=sp; + } + } +#endif + } +} +#endif + +#ifdef PNG_READ_FILLER_SUPPORTED +/* Add filler channel if we have RGB color */ +static void +png_do_read_filler(png_row_infop row_info, png_bytep row, + png_uint_32 filler, png_uint_32 flags) +{ + png_uint_32 i; + png_uint_32 row_width = row_info->width; + +#ifdef PNG_READ_16BIT_SUPPORTED + png_byte hi_filler = (png_byte)(filler>>8); +#endif + png_byte lo_filler = (png_byte)filler; + + png_debug(1, "in png_do_read_filler"); + + if ( + row_info->color_type == PNG_COLOR_TYPE_GRAY) + { + if (row_info->bit_depth == 8) + { + if ((flags & PNG_FLAG_FILLER_AFTER) != 0) + { + /* This changes the data from G to GX */ + png_bytep sp = row + (size_t)row_width; + png_bytep dp = sp + (size_t)row_width; + for (i = 1; i < row_width; i++) + { + *(--dp) = lo_filler; + *(--dp) = *(--sp); + } + *(--dp) = lo_filler; + row_info->channels = 2; + row_info->pixel_depth = 16; + row_info->rowbytes = row_width * 2; + } + + else + { + /* This changes the data from G to XG */ + png_bytep sp = row + (size_t)row_width; + png_bytep dp = sp + (size_t)row_width; + for (i = 0; i < row_width; i++) + { + *(--dp) = *(--sp); + *(--dp) = lo_filler; + } + row_info->channels = 2; + row_info->pixel_depth = 16; + row_info->rowbytes = row_width * 2; + } + } + +#ifdef PNG_READ_16BIT_SUPPORTED + else if (row_info->bit_depth == 16) + { + if ((flags & PNG_FLAG_FILLER_AFTER) != 0) + { + /* This changes the data from GG to GGXX */ + png_bytep sp = row + (size_t)row_width * 2; + png_bytep dp = sp + (size_t)row_width * 2; + for (i = 1; i < row_width; i++) + { + *(--dp) = lo_filler; + *(--dp) = hi_filler; + *(--dp) = *(--sp); + *(--dp) = *(--sp); + } + *(--dp) = lo_filler; + *(--dp) = hi_filler; + row_info->channels = 2; + row_info->pixel_depth = 32; + row_info->rowbytes = row_width * 4; + } + + else + { + /* This changes the data from GG to XXGG */ + png_bytep sp = row + (size_t)row_width * 2; + png_bytep dp = sp + (size_t)row_width * 2; + for (i = 0; i < row_width; i++) + { + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = lo_filler; + *(--dp) = hi_filler; + } + row_info->channels = 2; + row_info->pixel_depth = 32; + row_info->rowbytes = row_width * 4; + } + } +#endif + } /* COLOR_TYPE == GRAY */ + else if (row_info->color_type == PNG_COLOR_TYPE_RGB) + { + if (row_info->bit_depth == 8) + { + if ((flags & PNG_FLAG_FILLER_AFTER) != 0) + { + /* This changes the data from RGB to RGBX */ + png_bytep sp = row + (size_t)row_width * 3; + png_bytep dp = sp + (size_t)row_width; + for (i = 1; i < row_width; i++) + { + *(--dp) = lo_filler; + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + } + *(--dp) = lo_filler; + row_info->channels = 4; + row_info->pixel_depth = 32; + row_info->rowbytes = row_width * 4; + } + + else + { + /* This changes the data from RGB to XRGB */ + png_bytep sp = row + (size_t)row_width * 3; + png_bytep dp = sp + (size_t)row_width; + for (i = 0; i < row_width; i++) + { + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = lo_filler; + } + row_info->channels = 4; + row_info->pixel_depth = 32; + row_info->rowbytes = row_width * 4; + } + } + +#ifdef PNG_READ_16BIT_SUPPORTED + else if (row_info->bit_depth == 16) + { + if ((flags & PNG_FLAG_FILLER_AFTER) != 0) + { + /* This changes the data from RRGGBB to RRGGBBXX */ + png_bytep sp = row + (size_t)row_width * 6; + png_bytep dp = sp + (size_t)row_width * 2; + for (i = 1; i < row_width; i++) + { + *(--dp) = lo_filler; + *(--dp) = hi_filler; + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + } + *(--dp) = lo_filler; + *(--dp) = hi_filler; + row_info->channels = 4; + row_info->pixel_depth = 64; + row_info->rowbytes = row_width * 8; + } + + else + { + /* This changes the data from RRGGBB to XXRRGGBB */ + png_bytep sp = row + (size_t)row_width * 6; + png_bytep dp = sp + (size_t)row_width * 2; + for (i = 0; i < row_width; i++) + { + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = *(--sp); + *(--dp) = lo_filler; + *(--dp) = hi_filler; + } + + row_info->channels = 4; + row_info->pixel_depth = 64; + row_info->rowbytes = row_width * 8; + } + } +#endif + } /* COLOR_TYPE == RGB */ +} +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED +/* Expand grayscale files to RGB, with or without alpha */ +static void +png_do_gray_to_rgb(png_row_infop row_info, png_bytep row) +{ + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + png_debug(1, "in png_do_gray_to_rgb"); + + if (row_info->bit_depth >= 8 && + (row_info->color_type & PNG_COLOR_MASK_COLOR) == 0) + { + if (row_info->color_type == PNG_COLOR_TYPE_GRAY) + { + if (row_info->bit_depth == 8) + { + /* This changes G to RGB */ + png_bytep sp = row + (size_t)row_width - 1; + png_bytep dp = sp + (size_t)row_width * 2; + for (i = 0; i < row_width; i++) + { + *(dp--) = *sp; + *(dp--) = *sp; + *(dp--) = *(sp--); + } + } + + else + { + /* This changes GG to RRGGBB */ + png_bytep sp = row + (size_t)row_width * 2 - 1; + png_bytep dp = sp + (size_t)row_width * 4; + for (i = 0; i < row_width; i++) + { + *(dp--) = *sp; + *(dp--) = *(sp - 1); + *(dp--) = *sp; + *(dp--) = *(sp - 1); + *(dp--) = *(sp--); + *(dp--) = *(sp--); + } + } + } + + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + if (row_info->bit_depth == 8) + { + /* This changes GA to RGBA */ + png_bytep sp = row + (size_t)row_width * 2 - 1; + png_bytep dp = sp + (size_t)row_width * 2; + for (i = 0; i < row_width; i++) + { + *(dp--) = *(sp--); + *(dp--) = *sp; + *(dp--) = *sp; + *(dp--) = *(sp--); + } + } + + else + { + /* This changes GGAA to RRGGBBAA */ + png_bytep sp = row + (size_t)row_width * 4 - 1; + png_bytep dp = sp + (size_t)row_width * 4; + for (i = 0; i < row_width; i++) + { + *(dp--) = *(sp--); + *(dp--) = *(sp--); + *(dp--) = *sp; + *(dp--) = *(sp - 1); + *(dp--) = *sp; + *(dp--) = *(sp - 1); + *(dp--) = *(sp--); + *(dp--) = *(sp--); + } + } + } + row_info->channels = (png_byte)(row_info->channels + 2); + row_info->color_type |= PNG_COLOR_MASK_COLOR; + row_info->pixel_depth = (png_byte)(row_info->channels * + row_info->bit_depth); + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); + } +} +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED +/* Reduce RGB files to grayscale, with or without alpha + * using the equation given in Poynton's ColorFAQ of 1998-01-04 at + * (THIS LINK IS DEAD June 2008 but + * versions dated 1998 through November 2002 have been archived at + * https://web.archive.org/web/20000816232553/www.inforamp.net/ + * ~poynton/notes/colour_and_gamma/ColorFAQ.txt ) + * Charles Poynton poynton at poynton.com + * + * Y = 0.212671 * R + 0.715160 * G + 0.072169 * B + * + * which can be expressed with integers as + * + * Y = (6969 * R + 23434 * G + 2365 * B)/32768 + * + * Poynton's current link (as of January 2003 through July 2011): + * + * has changed the numbers slightly: + * + * Y = 0.2126*R + 0.7152*G + 0.0722*B + * + * which can be expressed with integers as + * + * Y = (6966 * R + 23436 * G + 2366 * B)/32768 + * + * Historically, however, libpng uses numbers derived from the ITU-R Rec 709 + * end point chromaticities and the D65 white point. Depending on the + * precision used for the D65 white point this produces a variety of different + * numbers, however if the four decimal place value used in ITU-R Rec 709 is + * used (0.3127,0.3290) the Y calculation would be: + * + * Y = (6968 * R + 23435 * G + 2366 * B)/32768 + * + * While this is correct the rounding results in an overflow for white, because + * the sum of the rounded coefficients is 32769, not 32768. Consequently + * libpng uses, instead, the closest non-overflowing approximation: + * + * Y = (6968 * R + 23434 * G + 2366 * B)/32768 + * + * Starting with libpng-1.5.5, if the image being converted has a cHRM chunk + * (including an sRGB chunk) then the chromaticities are used to calculate the + * coefficients. See the chunk handling in pngrutil.c for more information. + * + * In all cases the calculation is to be done in a linear colorspace. If no + * gamma information is available to correct the encoding of the original RGB + * values this results in an implicit assumption that the original PNG RGB + * values were linear. + * + * Other integer coefficients can be used via png_set_rgb_to_gray(). Because + * the API takes just red and green coefficients the blue coefficient is + * calculated to make the sum 32768. This will result in different rounding + * to that used above. + */ +static int +png_do_rgb_to_gray(png_structrp png_ptr, png_row_infop row_info, png_bytep row) +{ + int rgb_error = 0; + + png_debug(1, "in png_do_rgb_to_gray"); + + if ((row_info->color_type & PNG_COLOR_MASK_PALETTE) == 0 && + (row_info->color_type & PNG_COLOR_MASK_COLOR) != 0) + { + png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff; + png_uint_32 gc = png_ptr->rgb_to_gray_green_coeff; + png_uint_32 bc = 32768 - rc - gc; + png_uint_32 row_width = row_info->width; + int have_alpha = (row_info->color_type & PNG_COLOR_MASK_ALPHA) != 0; + + if (row_info->bit_depth == 8) + { +#ifdef PNG_READ_GAMMA_SUPPORTED + /* Notice that gamma to/from 1 are not necessarily inverses (if + * there is an overall gamma correction). Prior to 1.5.5 this code + * checked the linearized values for equality; this doesn't match + * the documentation, the original values must be checked. + */ + if (png_ptr->gamma_from_1 != NULL && png_ptr->gamma_to_1 != NULL) + { + png_bytep sp = row; + png_bytep dp = row; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + png_byte red = *(sp++); + png_byte green = *(sp++); + png_byte blue = *(sp++); + + if (red != green || red != blue) + { + red = png_ptr->gamma_to_1[red]; + green = png_ptr->gamma_to_1[green]; + blue = png_ptr->gamma_to_1[blue]; + + rgb_error |= 1; + *(dp++) = png_ptr->gamma_from_1[ + (rc*red + gc*green + bc*blue + 16384)>>15]; + } + + else + { + /* If there is no overall correction the table will not be + * set. + */ + if (png_ptr->gamma_table != NULL) + red = png_ptr->gamma_table[red]; + + *(dp++) = red; + } + + if (have_alpha != 0) + *(dp++) = *(sp++); + } + } + else +#endif + { + png_bytep sp = row; + png_bytep dp = row; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + png_byte red = *(sp++); + png_byte green = *(sp++); + png_byte blue = *(sp++); + + if (red != green || red != blue) + { + rgb_error |= 1; + /* NOTE: this is the historical approach which simply + * truncates the results. + */ + *(dp++) = (png_byte)((rc*red + gc*green + bc*blue)>>15); + } + + else + *(dp++) = red; + + if (have_alpha != 0) + *(dp++) = *(sp++); + } + } + } + + else /* RGB bit_depth == 16 */ + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (png_ptr->gamma_16_to_1 != NULL && png_ptr->gamma_16_from_1 != NULL) + { + png_bytep sp = row; + png_bytep dp = row; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + png_uint_16 red, green, blue, w; + png_byte hi,lo; + + hi=*(sp)++; lo=*(sp)++; red = (png_uint_16)((hi << 8) | (lo)); + hi=*(sp)++; lo=*(sp)++; green = (png_uint_16)((hi << 8) | (lo)); + hi=*(sp)++; lo=*(sp)++; blue = (png_uint_16)((hi << 8) | (lo)); + + if (red == green && red == blue) + { + if (png_ptr->gamma_16_table != NULL) + w = png_ptr->gamma_16_table[(red & 0xff) + >> png_ptr->gamma_shift][red >> 8]; + + else + w = red; + } + + else + { + png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red & 0xff) + >> png_ptr->gamma_shift][red>>8]; + png_uint_16 green_1 = + png_ptr->gamma_16_to_1[(green & 0xff) >> + png_ptr->gamma_shift][green>>8]; + png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue & 0xff) + >> png_ptr->gamma_shift][blue>>8]; + png_uint_16 gray16 = (png_uint_16)((rc*red_1 + gc*green_1 + + bc*blue_1 + 16384)>>15); + w = png_ptr->gamma_16_from_1[(gray16 & 0xff) >> + png_ptr->gamma_shift][gray16 >> 8]; + rgb_error |= 1; + } + + *(dp++) = (png_byte)((w>>8) & 0xff); + *(dp++) = (png_byte)(w & 0xff); + + if (have_alpha != 0) + { + *(dp++) = *(sp++); + *(dp++) = *(sp++); + } + } + } + else +#endif + { + png_bytep sp = row; + png_bytep dp = row; + png_uint_32 i; + + for (i = 0; i < row_width; i++) + { + png_uint_16 red, green, blue, gray16; + png_byte hi,lo; + + hi=*(sp)++; lo=*(sp)++; red = (png_uint_16)((hi << 8) | (lo)); + hi=*(sp)++; lo=*(sp)++; green = (png_uint_16)((hi << 8) | (lo)); + hi=*(sp)++; lo=*(sp)++; blue = (png_uint_16)((hi << 8) | (lo)); + + if (red != green || red != blue) + rgb_error |= 1; + + /* From 1.5.5 in the 16-bit case do the accurate conversion even + * in the 'fast' case - this is because this is where the code + * ends up when handling linear 16-bit data. + */ + gray16 = (png_uint_16)((rc*red + gc*green + bc*blue + 16384) >> + 15); + *(dp++) = (png_byte)((gray16 >> 8) & 0xff); + *(dp++) = (png_byte)(gray16 & 0xff); + + if (have_alpha != 0) + { + *(dp++) = *(sp++); + *(dp++) = *(sp++); + } + } + } + } + + row_info->channels = (png_byte)(row_info->channels - 2); + row_info->color_type = (png_byte)(row_info->color_type & + ~PNG_COLOR_MASK_COLOR); + row_info->pixel_depth = (png_byte)(row_info->channels * + row_info->bit_depth); + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); + } + return rgb_error; +} +#endif + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) +/* Replace any alpha or transparency with the supplied background color. + * "background" is already in the screen gamma, while "background_1" is + * at a gamma of 1.0. Paletted files have already been taken care of. + */ +static void +png_do_compose(png_row_infop row_info, png_bytep row, png_structrp png_ptr) +{ +#ifdef PNG_READ_GAMMA_SUPPORTED + png_const_bytep gamma_table = png_ptr->gamma_table; + png_const_bytep gamma_from_1 = png_ptr->gamma_from_1; + png_const_bytep gamma_to_1 = png_ptr->gamma_to_1; + png_const_uint_16pp gamma_16 = png_ptr->gamma_16_table; + png_const_uint_16pp gamma_16_from_1 = png_ptr->gamma_16_from_1; + png_const_uint_16pp gamma_16_to_1 = png_ptr->gamma_16_to_1; + int gamma_shift = png_ptr->gamma_shift; + int optimize = (png_ptr->flags & PNG_FLAG_OPTIMIZE_ALPHA) != 0; +#endif + + png_bytep sp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + int shift; + + png_debug(1, "in png_do_compose"); + + switch (row_info->color_type) + { + case PNG_COLOR_TYPE_GRAY: + { + switch (row_info->bit_depth) + { + case 1: + { + sp = row; + shift = 7; + for (i = 0; i < row_width; i++) + { + if ((png_uint_16)((*sp >> shift) & 0x01) + == png_ptr->trans_color.gray) + { + unsigned int tmp = *sp & (0x7f7f >> (7 - shift)); + tmp |= + (unsigned int)(png_ptr->background.gray << shift); + *sp = (png_byte)(tmp & 0xff); + } + + if (shift == 0) + { + shift = 7; + sp++; + } + + else + shift--; + } + break; + } + + case 2: + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_table != NULL) + { + sp = row; + shift = 6; + for (i = 0; i < row_width; i++) + { + if ((png_uint_16)((*sp >> shift) & 0x03) + == png_ptr->trans_color.gray) + { + unsigned int tmp = *sp & (0x3f3f >> (6 - shift)); + tmp |= + (unsigned int)png_ptr->background.gray << shift; + *sp = (png_byte)(tmp & 0xff); + } + + else + { + unsigned int p = (*sp >> shift) & 0x03; + unsigned int g = (gamma_table [p | (p << 2) | + (p << 4) | (p << 6)] >> 6) & 0x03; + unsigned int tmp = *sp & (0x3f3f >> (6 - shift)); + tmp |= (unsigned int)(g << shift); + *sp = (png_byte)(tmp & 0xff); + } + + if (shift == 0) + { + shift = 6; + sp++; + } + + else + shift -= 2; + } + } + + else +#endif + { + sp = row; + shift = 6; + for (i = 0; i < row_width; i++) + { + if ((png_uint_16)((*sp >> shift) & 0x03) + == png_ptr->trans_color.gray) + { + unsigned int tmp = *sp & (0x3f3f >> (6 - shift)); + tmp |= + (unsigned int)png_ptr->background.gray << shift; + *sp = (png_byte)(tmp & 0xff); + } + + if (shift == 0) + { + shift = 6; + sp++; + } + + else + shift -= 2; + } + } + break; + } + + case 4: + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_table != NULL) + { + sp = row; + shift = 4; + for (i = 0; i < row_width; i++) + { + if ((png_uint_16)((*sp >> shift) & 0x0f) + == png_ptr->trans_color.gray) + { + unsigned int tmp = *sp & (0x0f0f >> (4 - shift)); + tmp |= + (unsigned int)(png_ptr->background.gray << shift); + *sp = (png_byte)(tmp & 0xff); + } + + else + { + unsigned int p = (*sp >> shift) & 0x0f; + unsigned int g = (gamma_table[p | (p << 4)] >> 4) & + 0x0f; + unsigned int tmp = *sp & (0x0f0f >> (4 - shift)); + tmp |= (unsigned int)(g << shift); + *sp = (png_byte)(tmp & 0xff); + } + + if (shift == 0) + { + shift = 4; + sp++; + } + + else + shift -= 4; + } + } + + else +#endif + { + sp = row; + shift = 4; + for (i = 0; i < row_width; i++) + { + if ((png_uint_16)((*sp >> shift) & 0x0f) + == png_ptr->trans_color.gray) + { + unsigned int tmp = *sp & (0x0f0f >> (4 - shift)); + tmp |= + (unsigned int)(png_ptr->background.gray << shift); + *sp = (png_byte)(tmp & 0xff); + } + + if (shift == 0) + { + shift = 4; + sp++; + } + + else + shift -= 4; + } + } + break; + } + + case 8: + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_table != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp++) + { + if (*sp == png_ptr->trans_color.gray) + *sp = (png_byte)png_ptr->background.gray; + + else + *sp = gamma_table[*sp]; + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp++) + { + if (*sp == png_ptr->trans_color.gray) + *sp = (png_byte)png_ptr->background.gray; + } + } + break; + } + + case 16: + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_16 != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 2) + { + png_uint_16 v; + + v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + + if (v == png_ptr->trans_color.gray) + { + /* Background is already in screen gamma */ + *sp = (png_byte)((png_ptr->background.gray >> 8) + & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.gray + & 0xff); + } + + else + { + v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + } + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 2) + { + png_uint_16 v; + + v = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + + if (v == png_ptr->trans_color.gray) + { + *sp = (png_byte)((png_ptr->background.gray >> 8) + & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.gray + & 0xff); + } + } + } + break; + } + + default: + break; + } + break; + } + + case PNG_COLOR_TYPE_RGB: + { + if (row_info->bit_depth == 8) + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_table != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 3) + { + if (*sp == png_ptr->trans_color.red && + *(sp + 1) == png_ptr->trans_color.green && + *(sp + 2) == png_ptr->trans_color.blue) + { + *sp = (png_byte)png_ptr->background.red; + *(sp + 1) = (png_byte)png_ptr->background.green; + *(sp + 2) = (png_byte)png_ptr->background.blue; + } + + else + { + *sp = gamma_table[*sp]; + *(sp + 1) = gamma_table[*(sp + 1)]; + *(sp + 2) = gamma_table[*(sp + 2)]; + } + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 3) + { + if (*sp == png_ptr->trans_color.red && + *(sp + 1) == png_ptr->trans_color.green && + *(sp + 2) == png_ptr->trans_color.blue) + { + *sp = (png_byte)png_ptr->background.red; + *(sp + 1) = (png_byte)png_ptr->background.green; + *(sp + 2) = (png_byte)png_ptr->background.blue; + } + } + } + } + else /* if (row_info->bit_depth == 16) */ + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_16 != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 6) + { + png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + + png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) + + *(sp + 3)); + + png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) + + *(sp + 5)); + + if (r == png_ptr->trans_color.red && + g == png_ptr->trans_color.green && + b == png_ptr->trans_color.blue) + { + /* Background is already in screen gamma */ + *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); + *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) + & 0xff); + *(sp + 3) = (png_byte)(png_ptr->background.green + & 0xff); + *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) + & 0xff); + *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); + } + + else + { + png_uint_16 v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + + v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; + *(sp + 2) = (png_byte)((v >> 8) & 0xff); + *(sp + 3) = (png_byte)(v & 0xff); + + v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; + *(sp + 4) = (png_byte)((v >> 8) & 0xff); + *(sp + 5) = (png_byte)(v & 0xff); + } + } + } + + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 6) + { + png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + + png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) + + *(sp + 3)); + + png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) + + *(sp + 5)); + + if (r == png_ptr->trans_color.red && + g == png_ptr->trans_color.green && + b == png_ptr->trans_color.blue) + { + *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); + *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) + & 0xff); + *(sp + 3) = (png_byte)(png_ptr->background.green + & 0xff); + *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) + & 0xff); + *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); + } + } + } + } + break; + } + + case PNG_COLOR_TYPE_GRAY_ALPHA: + { + if (row_info->bit_depth == 8) + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_to_1 != NULL && gamma_from_1 != NULL && + gamma_table != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 2) + { + png_uint_16 a = *(sp + 1); + + if (a == 0xff) + *sp = gamma_table[*sp]; + + else if (a == 0) + { + /* Background is already in screen gamma */ + *sp = (png_byte)png_ptr->background.gray; + } + + else + { + png_byte v, w; + + v = gamma_to_1[*sp]; + png_composite(w, v, a, png_ptr->background_1.gray); + if (optimize == 0) + w = gamma_from_1[w]; + *sp = w; + } + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 2) + { + png_byte a = *(sp + 1); + + if (a == 0) + *sp = (png_byte)png_ptr->background.gray; + + else if (a < 0xff) + png_composite(*sp, *sp, a, png_ptr->background.gray); + } + } + } + else /* if (png_ptr->bit_depth == 16) */ + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_16 != NULL && gamma_16_from_1 != NULL && + gamma_16_to_1 != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 4) + { + png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8) + + *(sp + 3)); + + if (a == (png_uint_16)0xffff) + { + png_uint_16 v; + + v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + } + + else if (a == 0) + { + /* Background is already in screen gamma */ + *sp = (png_byte)((png_ptr->background.gray >> 8) + & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); + } + + else + { + png_uint_16 g, v, w; + + g = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; + png_composite_16(v, g, a, png_ptr->background_1.gray); + if (optimize != 0) + w = v; + else + w = gamma_16_from_1[(v & 0xff) >> + gamma_shift][v >> 8]; + *sp = (png_byte)((w >> 8) & 0xff); + *(sp + 1) = (png_byte)(w & 0xff); + } + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 4) + { + png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8) + + *(sp + 3)); + + if (a == 0) + { + *sp = (png_byte)((png_ptr->background.gray >> 8) + & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.gray & 0xff); + } + + else if (a < 0xffff) + { + png_uint_16 g, v; + + g = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + png_composite_16(v, g, a, png_ptr->background.gray); + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + } + } + } + } + break; + } + + case PNG_COLOR_TYPE_RGB_ALPHA: + { + if (row_info->bit_depth == 8) + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_to_1 != NULL && gamma_from_1 != NULL && + gamma_table != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 4) + { + png_byte a = *(sp + 3); + + if (a == 0xff) + { + *sp = gamma_table[*sp]; + *(sp + 1) = gamma_table[*(sp + 1)]; + *(sp + 2) = gamma_table[*(sp + 2)]; + } + + else if (a == 0) + { + /* Background is already in screen gamma */ + *sp = (png_byte)png_ptr->background.red; + *(sp + 1) = (png_byte)png_ptr->background.green; + *(sp + 2) = (png_byte)png_ptr->background.blue; + } + + else + { + png_byte v, w; + + v = gamma_to_1[*sp]; + png_composite(w, v, a, png_ptr->background_1.red); + if (optimize == 0) w = gamma_from_1[w]; + *sp = w; + + v = gamma_to_1[*(sp + 1)]; + png_composite(w, v, a, png_ptr->background_1.green); + if (optimize == 0) w = gamma_from_1[w]; + *(sp + 1) = w; + + v = gamma_to_1[*(sp + 2)]; + png_composite(w, v, a, png_ptr->background_1.blue); + if (optimize == 0) w = gamma_from_1[w]; + *(sp + 2) = w; + } + } + } + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 4) + { + png_byte a = *(sp + 3); + + if (a == 0) + { + *sp = (png_byte)png_ptr->background.red; + *(sp + 1) = (png_byte)png_ptr->background.green; + *(sp + 2) = (png_byte)png_ptr->background.blue; + } + + else if (a < 0xff) + { + png_composite(*sp, *sp, a, png_ptr->background.red); + + png_composite(*(sp + 1), *(sp + 1), a, + png_ptr->background.green); + + png_composite(*(sp + 2), *(sp + 2), a, + png_ptr->background.blue); + } + } + } + } + else /* if (row_info->bit_depth == 16) */ + { +#ifdef PNG_READ_GAMMA_SUPPORTED + if (gamma_16 != NULL && gamma_16_from_1 != NULL && + gamma_16_to_1 != NULL) + { + sp = row; + for (i = 0; i < row_width; i++, sp += 8) + { + png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) + << 8) + (png_uint_16)(*(sp + 7))); + + if (a == (png_uint_16)0xffff) + { + png_uint_16 v; + + v = gamma_16[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + + v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)]; + *(sp + 2) = (png_byte)((v >> 8) & 0xff); + *(sp + 3) = (png_byte)(v & 0xff); + + v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)]; + *(sp + 4) = (png_byte)((v >> 8) & 0xff); + *(sp + 5) = (png_byte)(v & 0xff); + } + + else if (a == 0) + { + /* Background is already in screen gamma */ + *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); + *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) + & 0xff); + *(sp + 3) = (png_byte)(png_ptr->background.green + & 0xff); + *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) + & 0xff); + *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); + } + + else + { + png_uint_16 v, w; + + v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp]; + png_composite_16(w, v, a, png_ptr->background_1.red); + if (optimize == 0) + w = gamma_16_from_1[((w & 0xff) >> gamma_shift)][w >> + 8]; + *sp = (png_byte)((w >> 8) & 0xff); + *(sp + 1) = (png_byte)(w & 0xff); + + v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)]; + png_composite_16(w, v, a, png_ptr->background_1.green); + if (optimize == 0) + w = gamma_16_from_1[((w & 0xff) >> gamma_shift)][w >> + 8]; + + *(sp + 2) = (png_byte)((w >> 8) & 0xff); + *(sp + 3) = (png_byte)(w & 0xff); + + v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)]; + png_composite_16(w, v, a, png_ptr->background_1.blue); + if (optimize == 0) + w = gamma_16_from_1[((w & 0xff) >> gamma_shift)][w >> + 8]; + + *(sp + 4) = (png_byte)((w >> 8) & 0xff); + *(sp + 5) = (png_byte)(w & 0xff); + } + } + } + + else +#endif + { + sp = row; + for (i = 0; i < row_width; i++, sp += 8) + { + png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6)) + << 8) + (png_uint_16)(*(sp + 7))); + + if (a == 0) + { + *sp = (png_byte)((png_ptr->background.red >> 8) & 0xff); + *(sp + 1) = (png_byte)(png_ptr->background.red & 0xff); + *(sp + 2) = (png_byte)((png_ptr->background.green >> 8) + & 0xff); + *(sp + 3) = (png_byte)(png_ptr->background.green + & 0xff); + *(sp + 4) = (png_byte)((png_ptr->background.blue >> 8) + & 0xff); + *(sp + 5) = (png_byte)(png_ptr->background.blue & 0xff); + } + + else if (a < 0xffff) + { + png_uint_16 v; + + png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1)); + png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8) + + *(sp + 3)); + png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8) + + *(sp + 5)); + + png_composite_16(v, r, a, png_ptr->background.red); + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + + png_composite_16(v, g, a, png_ptr->background.green); + *(sp + 2) = (png_byte)((v >> 8) & 0xff); + *(sp + 3) = (png_byte)(v & 0xff); + + png_composite_16(v, b, a, png_ptr->background.blue); + *(sp + 4) = (png_byte)((v >> 8) & 0xff); + *(sp + 5) = (png_byte)(v & 0xff); + } + } + } + } + break; + } + + default: + break; + } +} +#endif /* READ_BACKGROUND || READ_ALPHA_MODE */ + +#ifdef PNG_READ_GAMMA_SUPPORTED +/* Gamma correct the image, avoiding the alpha channel. Make sure + * you do this after you deal with the transparency issue on grayscale + * or RGB images. If your bit depth is 8, use gamma_table, if it + * is 16, use gamma_16_table and gamma_shift. Build these with + * build_gamma_table(). + */ +static void +png_do_gamma(png_row_infop row_info, png_bytep row, png_structrp png_ptr) +{ + png_const_bytep gamma_table = png_ptr->gamma_table; + png_const_uint_16pp gamma_16_table = png_ptr->gamma_16_table; + int gamma_shift = png_ptr->gamma_shift; + + png_bytep sp; + png_uint_32 i; + png_uint_32 row_width=row_info->width; + + png_debug(1, "in png_do_gamma"); + + if (((row_info->bit_depth <= 8 && gamma_table != NULL) || + (row_info->bit_depth == 16 && gamma_16_table != NULL))) + { + switch (row_info->color_type) + { + case PNG_COLOR_TYPE_RGB: + { + if (row_info->bit_depth == 8) + { + sp = row; + for (i = 0; i < row_width; i++) + { + *sp = gamma_table[*sp]; + sp++; + *sp = gamma_table[*sp]; + sp++; + *sp = gamma_table[*sp]; + sp++; + } + } + + else /* if (row_info->bit_depth == 16) */ + { + sp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 v; + + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + } + } + break; + } + + case PNG_COLOR_TYPE_RGB_ALPHA: + { + if (row_info->bit_depth == 8) + { + sp = row; + for (i = 0; i < row_width; i++) + { + *sp = gamma_table[*sp]; + sp++; + + *sp = gamma_table[*sp]; + sp++; + + *sp = gamma_table[*sp]; + sp++; + + sp++; + } + } + + else /* if (row_info->bit_depth == 16) */ + { + sp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + + v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 4; + } + } + break; + } + + case PNG_COLOR_TYPE_GRAY_ALPHA: + { + if (row_info->bit_depth == 8) + { + sp = row; + for (i = 0; i < row_width; i++) + { + *sp = gamma_table[*sp]; + sp += 2; + } + } + + else /* if (row_info->bit_depth == 16) */ + { + sp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 4; + } + } + break; + } + + case PNG_COLOR_TYPE_GRAY: + { + if (row_info->bit_depth == 2) + { + sp = row; + for (i = 0; i < row_width; i += 4) + { + int a = *sp & 0xc0; + int b = *sp & 0x30; + int c = *sp & 0x0c; + int d = *sp & 0x03; + + *sp = (png_byte)( + ((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)]) ) & 0xc0)| + ((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)| + ((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)| + ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) )); + sp++; + } + } + + if (row_info->bit_depth == 4) + { + sp = row; + for (i = 0; i < row_width; i += 2) + { + int msb = *sp & 0xf0; + int lsb = *sp & 0x0f; + + *sp = (png_byte)((((int)gamma_table[msb | (msb >> 4)]) & 0xf0) + | (((int)gamma_table[(lsb << 4) | lsb]) >> 4)); + sp++; + } + } + + else if (row_info->bit_depth == 8) + { + sp = row; + for (i = 0; i < row_width; i++) + { + *sp = gamma_table[*sp]; + sp++; + } + } + + else if (row_info->bit_depth == 16) + { + sp = row; + for (i = 0; i < row_width; i++) + { + png_uint_16 v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp]; + *sp = (png_byte)((v >> 8) & 0xff); + *(sp + 1) = (png_byte)(v & 0xff); + sp += 2; + } + } + break; + } + + default: + break; + } + } +} +#endif + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED +/* Encode the alpha channel to the output gamma (the input channel is always + * linear.) Called only with color types that have an alpha channel. Needs the + * from_1 tables. + */ +static void +png_do_encode_alpha(png_row_infop row_info, png_bytep row, png_structrp png_ptr) +{ + png_uint_32 row_width = row_info->width; + + png_debug(1, "in png_do_encode_alpha"); + + if ((row_info->color_type & PNG_COLOR_MASK_ALPHA) != 0) + { + if (row_info->bit_depth == 8) + { + png_bytep table = png_ptr->gamma_from_1; + + if (table != NULL) + { + int step = (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 4 : 2; + + /* The alpha channel is the last component: */ + row += step - 1; + + for (; row_width > 0; --row_width, row += step) + *row = table[*row]; + + return; + } + } + + else if (row_info->bit_depth == 16) + { + png_uint_16pp table = png_ptr->gamma_16_from_1; + int gamma_shift = png_ptr->gamma_shift; + + if (table != NULL) + { + int step = (row_info->color_type & PNG_COLOR_MASK_COLOR) ? 8 : 4; + + /* The alpha channel is the last component: */ + row += step - 2; + + for (; row_width > 0; --row_width, row += step) + { + png_uint_16 v; + + v = table[*(row + 1) >> gamma_shift][*row]; + *row = (png_byte)((v >> 8) & 0xff); + *(row + 1) = (png_byte)(v & 0xff); + } + + return; + } + } + } + + /* Only get to here if called with a weird row_info; no harm has been done, + * so just issue a warning. + */ + png_warning(png_ptr, "png_do_encode_alpha: unexpected call"); +} +#endif + +#ifdef PNG_READ_EXPAND_SUPPORTED +/* Expands a palette row to an RGB or RGBA row depending + * upon whether you supply trans and num_trans. + */ +static void +png_do_expand_palette(png_structrp png_ptr, png_row_infop row_info, + png_bytep row, png_const_colorp palette, png_const_bytep trans_alpha, + int num_trans) +{ + int shift, value; + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width=row_info->width; + + png_debug(1, "in png_do_expand_palette"); + + if (row_info->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (row_info->bit_depth < 8) + { + switch (row_info->bit_depth) + { + case 1: + { + sp = row + (size_t)((row_width - 1) >> 3); + dp = row + (size_t)row_width - 1; + shift = 7 - (int)((row_width + 7) & 0x07); + for (i = 0; i < row_width; i++) + { + if ((*sp >> shift) & 0x01) + *dp = 1; + + else + *dp = 0; + + if (shift == 7) + { + shift = 0; + sp--; + } + + else + shift++; + + dp--; + } + break; + } + + case 2: + { + sp = row + (size_t)((row_width - 1) >> 2); + dp = row + (size_t)row_width - 1; + shift = (int)((3 - ((row_width + 3) & 0x03)) << 1); + for (i = 0; i < row_width; i++) + { + value = (*sp >> shift) & 0x03; + *dp = (png_byte)value; + if (shift == 6) + { + shift = 0; + sp--; + } + + else + shift += 2; + + dp--; + } + break; + } + + case 4: + { + sp = row + (size_t)((row_width - 1) >> 1); + dp = row + (size_t)row_width - 1; + shift = (int)((row_width & 0x01) << 2); + for (i = 0; i < row_width; i++) + { + value = (*sp >> shift) & 0x0f; + *dp = (png_byte)value; + if (shift == 4) + { + shift = 0; + sp--; + } + + else + shift += 4; + + dp--; + } + break; + } + + default: + break; + } + row_info->bit_depth = 8; + row_info->pixel_depth = 8; + row_info->rowbytes = row_width; + } + + if (row_info->bit_depth == 8) + { + { + if (num_trans > 0) + { + sp = row + (size_t)row_width - 1; + dp = row + ((size_t)row_width << 2) - 1; + + i = 0; +#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE + if (png_ptr->riffled_palette != NULL) + { + /* The RGBA optimization works with png_ptr->bit_depth == 8 + * but sometimes row_info->bit_depth has been changed to 8. + * In these cases, the palette hasn't been riffled. + */ + i = png_do_expand_palette_rgba8_neon(png_ptr, row_info, row, + &sp, &dp); + } +#else + PNG_UNUSED(png_ptr) +#endif + + for (; i < row_width; i++) + { + if ((int)(*sp) >= num_trans) + *dp-- = 0xff; + else + *dp-- = trans_alpha[*sp]; + *dp-- = palette[*sp].blue; + *dp-- = palette[*sp].green; + *dp-- = palette[*sp].red; + sp--; + } + row_info->bit_depth = 8; + row_info->pixel_depth = 32; + row_info->rowbytes = row_width * 4; + row_info->color_type = 6; + row_info->channels = 4; + } + + else + { + sp = row + (size_t)row_width - 1; + dp = row + (size_t)(row_width * 3) - 1; + i = 0; +#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE + i = png_do_expand_palette_rgb8_neon(png_ptr, row_info, row, + &sp, &dp); +#else + PNG_UNUSED(png_ptr) +#endif + + for (; i < row_width; i++) + { + *dp-- = palette[*sp].blue; + *dp-- = palette[*sp].green; + *dp-- = palette[*sp].red; + sp--; + } + + row_info->bit_depth = 8; + row_info->pixel_depth = 24; + row_info->rowbytes = row_width * 3; + row_info->color_type = 2; + row_info->channels = 3; + } + } + } + } +} + +/* If the bit depth < 8, it is expanded to 8. Also, if the already + * expanded transparency value is supplied, an alpha channel is built. + */ +static void +png_do_expand(png_row_infop row_info, png_bytep row, + png_const_color_16p trans_color) +{ + int shift, value; + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width=row_info->width; + + png_debug(1, "in png_do_expand"); + + if (row_info->color_type == PNG_COLOR_TYPE_GRAY) + { + unsigned int gray = trans_color != NULL ? trans_color->gray : 0; + + if (row_info->bit_depth < 8) + { + switch (row_info->bit_depth) + { + case 1: + { + gray = (gray & 0x01) * 0xff; + sp = row + (size_t)((row_width - 1) >> 3); + dp = row + (size_t)row_width - 1; + shift = 7 - (int)((row_width + 7) & 0x07); + for (i = 0; i < row_width; i++) + { + if ((*sp >> shift) & 0x01) + *dp = 0xff; + + else + *dp = 0; + + if (shift == 7) + { + shift = 0; + sp--; + } + + else + shift++; + + dp--; + } + break; + } + + case 2: + { + gray = (gray & 0x03) * 0x55; + sp = row + (size_t)((row_width - 1) >> 2); + dp = row + (size_t)row_width - 1; + shift = (int)((3 - ((row_width + 3) & 0x03)) << 1); + for (i = 0; i < row_width; i++) + { + value = (*sp >> shift) & 0x03; + *dp = (png_byte)(value | (value << 2) | (value << 4) | + (value << 6)); + if (shift == 6) + { + shift = 0; + sp--; + } + + else + shift += 2; + + dp--; + } + break; + } + + case 4: + { + gray = (gray & 0x0f) * 0x11; + sp = row + (size_t)((row_width - 1) >> 1); + dp = row + (size_t)row_width - 1; + shift = (int)((1 - ((row_width + 1) & 0x01)) << 2); + for (i = 0; i < row_width; i++) + { + value = (*sp >> shift) & 0x0f; + *dp = (png_byte)(value | (value << 4)); + if (shift == 4) + { + shift = 0; + sp--; + } + + else + shift = 4; + + dp--; + } + break; + } + + default: + break; + } + + row_info->bit_depth = 8; + row_info->pixel_depth = 8; + row_info->rowbytes = row_width; + } + + if (trans_color != NULL) + { + if (row_info->bit_depth == 8) + { + gray = gray & 0xff; + sp = row + (size_t)row_width - 1; + dp = row + ((size_t)row_width << 1) - 1; + + for (i = 0; i < row_width; i++) + { + if ((*sp & 0xffU) == gray) + *dp-- = 0; + + else + *dp-- = 0xff; + + *dp-- = *sp--; + } + } + + else if (row_info->bit_depth == 16) + { + unsigned int gray_high = (gray >> 8) & 0xff; + unsigned int gray_low = gray & 0xff; + sp = row + row_info->rowbytes - 1; + dp = row + (row_info->rowbytes << 1) - 1; + for (i = 0; i < row_width; i++) + { + if ((*(sp - 1) & 0xffU) == gray_high && + (*(sp) & 0xffU) == gray_low) + { + *dp-- = 0; + *dp-- = 0; + } + + else + { + *dp-- = 0xff; + *dp-- = 0xff; + } + + *dp-- = *sp--; + *dp-- = *sp--; + } + } + + row_info->color_type = PNG_COLOR_TYPE_GRAY_ALPHA; + row_info->channels = 2; + row_info->pixel_depth = (png_byte)(row_info->bit_depth << 1); + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, + row_width); + } + } + else if (row_info->color_type == PNG_COLOR_TYPE_RGB && + trans_color != NULL) + { + if (row_info->bit_depth == 8) + { + png_byte red = (png_byte)(trans_color->red & 0xff); + png_byte green = (png_byte)(trans_color->green & 0xff); + png_byte blue = (png_byte)(trans_color->blue & 0xff); + sp = row + (size_t)row_info->rowbytes - 1; + dp = row + ((size_t)row_width << 2) - 1; + for (i = 0; i < row_width; i++) + { + if (*(sp - 2) == red && *(sp - 1) == green && *(sp) == blue) + *dp-- = 0; + + else + *dp-- = 0xff; + + *dp-- = *sp--; + *dp-- = *sp--; + *dp-- = *sp--; + } + } + else if (row_info->bit_depth == 16) + { + png_byte red_high = (png_byte)((trans_color->red >> 8) & 0xff); + png_byte green_high = (png_byte)((trans_color->green >> 8) & 0xff); + png_byte blue_high = (png_byte)((trans_color->blue >> 8) & 0xff); + png_byte red_low = (png_byte)(trans_color->red & 0xff); + png_byte green_low = (png_byte)(trans_color->green & 0xff); + png_byte blue_low = (png_byte)(trans_color->blue & 0xff); + sp = row + row_info->rowbytes - 1; + dp = row + ((size_t)row_width << 3) - 1; + for (i = 0; i < row_width; i++) + { + if (*(sp - 5) == red_high && + *(sp - 4) == red_low && + *(sp - 3) == green_high && + *(sp - 2) == green_low && + *(sp - 1) == blue_high && + *(sp ) == blue_low) + { + *dp-- = 0; + *dp-- = 0; + } + + else + { + *dp-- = 0xff; + *dp-- = 0xff; + } + + *dp-- = *sp--; + *dp-- = *sp--; + *dp-- = *sp--; + *dp-- = *sp--; + *dp-- = *sp--; + *dp-- = *sp--; + } + } + row_info->color_type = PNG_COLOR_TYPE_RGB_ALPHA; + row_info->channels = 4; + row_info->pixel_depth = (png_byte)(row_info->bit_depth << 2); + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); + } +} +#endif + +#ifdef PNG_READ_EXPAND_16_SUPPORTED +/* If the bit depth is 8 and the color type is not a palette type expand the + * whole row to 16 bits. Has no effect otherwise. + */ +static void +png_do_expand_16(png_row_infop row_info, png_bytep row) +{ + if (row_info->bit_depth == 8 && + row_info->color_type != PNG_COLOR_TYPE_PALETTE) + { + /* The row have a sequence of bytes containing [0..255] and we need + * to turn it into another row containing [0..65535], to do this we + * calculate: + * + * (input / 255) * 65535 + * + * Which happens to be exactly input * 257 and this can be achieved + * simply by byte replication in place (copying backwards). + */ + png_byte *sp = row + row_info->rowbytes; /* source, last byte + 1 */ + png_byte *dp = sp + row_info->rowbytes; /* destination, end + 1 */ + while (dp > sp) + { + dp[-2] = dp[-1] = *--sp; dp -= 2; + } + + row_info->rowbytes *= 2; + row_info->bit_depth = 16; + row_info->pixel_depth = (png_byte)(row_info->channels * 16); + } +} +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED +static void +png_do_quantize(png_row_infop row_info, png_bytep row, + png_const_bytep palette_lookup, png_const_bytep quantize_lookup) +{ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width=row_info->width; + + png_debug(1, "in png_do_quantize"); + + if (row_info->bit_depth == 8) + { + if (row_info->color_type == PNG_COLOR_TYPE_RGB && palette_lookup) + { + int r, g, b, p; + sp = row; + dp = row; + for (i = 0; i < row_width; i++) + { + r = *sp++; + g = *sp++; + b = *sp++; + + /* This looks real messy, but the compiler will reduce + * it down to a reasonable formula. For example, with + * 5 bits per color, we get: + * p = (((r >> 3) & 0x1f) << 10) | + * (((g >> 3) & 0x1f) << 5) | + * ((b >> 3) & 0x1f); + */ + p = (((r >> (8 - PNG_QUANTIZE_RED_BITS)) & + ((1 << PNG_QUANTIZE_RED_BITS) - 1)) << + (PNG_QUANTIZE_GREEN_BITS + PNG_QUANTIZE_BLUE_BITS)) | + (((g >> (8 - PNG_QUANTIZE_GREEN_BITS)) & + ((1 << PNG_QUANTIZE_GREEN_BITS) - 1)) << + (PNG_QUANTIZE_BLUE_BITS)) | + ((b >> (8 - PNG_QUANTIZE_BLUE_BITS)) & + ((1 << PNG_QUANTIZE_BLUE_BITS) - 1)); + + *dp++ = palette_lookup[p]; + } + + row_info->color_type = PNG_COLOR_TYPE_PALETTE; + row_info->channels = 1; + row_info->pixel_depth = row_info->bit_depth; + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); + } + + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA && + palette_lookup != NULL) + { + int r, g, b, p; + sp = row; + dp = row; + for (i = 0; i < row_width; i++) + { + r = *sp++; + g = *sp++; + b = *sp++; + sp++; + + p = (((r >> (8 - PNG_QUANTIZE_RED_BITS)) & + ((1 << PNG_QUANTIZE_RED_BITS) - 1)) << + (PNG_QUANTIZE_GREEN_BITS + PNG_QUANTIZE_BLUE_BITS)) | + (((g >> (8 - PNG_QUANTIZE_GREEN_BITS)) & + ((1 << PNG_QUANTIZE_GREEN_BITS) - 1)) << + (PNG_QUANTIZE_BLUE_BITS)) | + ((b >> (8 - PNG_QUANTIZE_BLUE_BITS)) & + ((1 << PNG_QUANTIZE_BLUE_BITS) - 1)); + + *dp++ = palette_lookup[p]; + } + + row_info->color_type = PNG_COLOR_TYPE_PALETTE; + row_info->channels = 1; + row_info->pixel_depth = row_info->bit_depth; + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width); + } + + else if (row_info->color_type == PNG_COLOR_TYPE_PALETTE && + quantize_lookup) + { + sp = row; + + for (i = 0; i < row_width; i++, sp++) + { + *sp = quantize_lookup[*sp]; + } + } + } +} +#endif /* READ_QUANTIZE */ + +/* Transform the row. The order of transformations is significant, + * and is very touchy. If you add a transformation, take care to + * decide how it fits in with the other transformations here. + */ +void /* PRIVATE */ +png_do_read_transformations(png_structrp png_ptr, png_row_infop row_info) +{ + png_debug(1, "in png_do_read_transformations"); + + if (png_ptr->row_buf == NULL) + { + /* Prior to 1.5.4 this output row/pass where the NULL pointer is, but this + * error is incredibly rare and incredibly easy to debug without this + * information. + */ + png_error(png_ptr, "NULL row buffer"); + } + + /* The following is debugging; prior to 1.5.4 the code was never compiled in; + * in 1.5.4 PNG_FLAG_DETECT_UNINITIALIZED was added and the macro + * PNG_WARN_UNINITIALIZED_ROW removed. In 1.6 the new flag is set only for + * all transformations, however in practice the ROW_INIT always gets done on + * demand, if necessary. + */ + if ((png_ptr->flags & PNG_FLAG_DETECT_UNINITIALIZED) != 0 && + (png_ptr->flags & PNG_FLAG_ROW_INIT) == 0) + { + /* Application has failed to call either png_read_start_image() or + * png_read_update_info() after setting transforms that expand pixels. + * This check added to libpng-1.2.19 (but not enabled until 1.5.4). + */ + png_error(png_ptr, "Uninitialized row"); + } + +#ifdef PNG_READ_EXPAND_SUPPORTED + if ((png_ptr->transformations & PNG_EXPAND) != 0) + { + if (row_info->color_type == PNG_COLOR_TYPE_PALETTE) + { +#ifdef PNG_ARM_NEON_INTRINSICS_AVAILABLE + if ((png_ptr->num_trans > 0) && (png_ptr->bit_depth == 8)) + { + if (png_ptr->riffled_palette == NULL) + { + /* Initialize the accelerated palette expansion. */ + png_ptr->riffled_palette = + (png_bytep)png_malloc(png_ptr, 256 * 4); + png_riffle_palette_neon(png_ptr); + } + } +#endif + png_do_expand_palette(png_ptr, row_info, png_ptr->row_buf + 1, + png_ptr->palette, png_ptr->trans_alpha, png_ptr->num_trans); + } + + else + { + if (png_ptr->num_trans != 0 && + (png_ptr->transformations & PNG_EXPAND_tRNS) != 0) + png_do_expand(row_info, png_ptr->row_buf + 1, + &(png_ptr->trans_color)); + + else + png_do_expand(row_info, png_ptr->row_buf + 1, NULL); + } + } +#endif + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED + if ((png_ptr->transformations & PNG_STRIP_ALPHA) != 0 && + (png_ptr->transformations & PNG_COMPOSE) == 0 && + (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA || + row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) + png_do_strip_channel(row_info, png_ptr->row_buf + 1, + 0 /* at_start == false, because SWAP_ALPHA happens later */); +#endif + +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + if ((png_ptr->transformations & PNG_RGB_TO_GRAY) != 0) + { + int rgb_error = + png_do_rgb_to_gray(png_ptr, row_info, + png_ptr->row_buf + 1); + + if (rgb_error != 0) + { + png_ptr->rgb_to_gray_status=1; + if ((png_ptr->transformations & PNG_RGB_TO_GRAY) == + PNG_RGB_TO_GRAY_WARN) + png_warning(png_ptr, "png_do_rgb_to_gray found nongray pixel"); + + if ((png_ptr->transformations & PNG_RGB_TO_GRAY) == + PNG_RGB_TO_GRAY_ERR) + png_error(png_ptr, "png_do_rgb_to_gray found nongray pixel"); + } + } +#endif + +/* From Andreas Dilger e-mail to png-implement, 26 March 1998: + * + * In most cases, the "simple transparency" should be done prior to doing + * gray-to-RGB, or you will have to test 3x as many bytes to check if a + * pixel is transparent. You would also need to make sure that the + * transparency information is upgraded to RGB. + * + * To summarize, the current flow is: + * - Gray + simple transparency -> compare 1 or 2 gray bytes and composite + * with background "in place" if transparent, + * convert to RGB if necessary + * - Gray + alpha -> composite with gray background and remove alpha bytes, + * convert to RGB if necessary + * + * To support RGB backgrounds for gray images we need: + * - Gray + simple transparency -> convert to RGB + simple transparency, + * compare 3 or 6 bytes and composite with + * background "in place" if transparent + * (3x compare/pixel compared to doing + * composite with gray bkgrnd) + * - Gray + alpha -> convert to RGB + alpha, composite with background and + * remove alpha bytes (3x float + * operations/pixel compared with composite + * on gray background) + * + * Greg's change will do this. The reason it wasn't done before is for + * performance, as this increases the per-pixel operations. If we would check + * in advance if the background was gray or RGB, and position the gray-to-RGB + * transform appropriately, then it would save a lot of work/time. + */ + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED + /* If gray -> RGB, do so now only if background is non-gray; else do later + * for performance reasons + */ + if ((png_ptr->transformations & PNG_GRAY_TO_RGB) != 0 && + (png_ptr->mode & PNG_BACKGROUND_IS_GRAY) == 0) + png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1); +#endif + +#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) + if ((png_ptr->transformations & PNG_COMPOSE) != 0) + png_do_compose(row_info, png_ptr->row_buf + 1, png_ptr); +#endif + +#ifdef PNG_READ_GAMMA_SUPPORTED + if ((png_ptr->transformations & PNG_GAMMA) != 0 && +#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + /* Because RGB_TO_GRAY does the gamma transform. */ + (png_ptr->transformations & PNG_RGB_TO_GRAY) == 0 && +#endif +#if defined(PNG_READ_BACKGROUND_SUPPORTED) ||\ + defined(PNG_READ_ALPHA_MODE_SUPPORTED) + /* Because PNG_COMPOSE does the gamma transform if there is something to + * do (if there is an alpha channel or transparency.) + */ + !((png_ptr->transformations & PNG_COMPOSE) != 0 && + ((png_ptr->num_trans != 0) || + (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) != 0)) && +#endif + /* Because png_init_read_transformations transforms the palette, unless + * RGB_TO_GRAY will do the transform. + */ + (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE)) + png_do_gamma(row_info, png_ptr->row_buf + 1, png_ptr); +#endif + +#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED + if ((png_ptr->transformations & PNG_STRIP_ALPHA) != 0 && + (png_ptr->transformations & PNG_COMPOSE) != 0 && + (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA || + row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)) + png_do_strip_channel(row_info, png_ptr->row_buf + 1, + 0 /* at_start == false, because SWAP_ALPHA happens later */); +#endif + +#ifdef PNG_READ_ALPHA_MODE_SUPPORTED + if ((png_ptr->transformations & PNG_ENCODE_ALPHA) != 0 && + (row_info->color_type & PNG_COLOR_MASK_ALPHA) != 0) + png_do_encode_alpha(row_info, png_ptr->row_buf + 1, png_ptr); +#endif + +#ifdef PNG_READ_SCALE_16_TO_8_SUPPORTED + if ((png_ptr->transformations & PNG_SCALE_16_TO_8) != 0) + png_do_scale_16_to_8(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_STRIP_16_TO_8_SUPPORTED + /* There is no harm in doing both of these because only one has any effect, + * by putting the 'scale' option first if the app asks for scale (either by + * calling the API or in a TRANSFORM flag) this is what happens. + */ + if ((png_ptr->transformations & PNG_16_TO_8) != 0) + png_do_chop(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_QUANTIZE_SUPPORTED + if ((png_ptr->transformations & PNG_QUANTIZE) != 0) + { + png_do_quantize(row_info, png_ptr->row_buf + 1, + png_ptr->palette_lookup, png_ptr->quantize_index); + + if (row_info->rowbytes == 0) + png_error(png_ptr, "png_do_quantize returned rowbytes=0"); + } +#endif /* READ_QUANTIZE */ + +#ifdef PNG_READ_EXPAND_16_SUPPORTED + /* Do the expansion now, after all the arithmetic has been done. Notice + * that previous transformations can handle the PNG_EXPAND_16 flag if this + * is efficient (particularly true in the case of gamma correction, where + * better accuracy results faster!) + */ + if ((png_ptr->transformations & PNG_EXPAND_16) != 0) + png_do_expand_16(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED + /* NOTE: moved here in 1.5.4 (from much later in this list.) */ + if ((png_ptr->transformations & PNG_GRAY_TO_RGB) != 0 && + (png_ptr->mode & PNG_BACKGROUND_IS_GRAY) != 0) + png_do_gray_to_rgb(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_INVERT_SUPPORTED + if ((png_ptr->transformations & PNG_INVERT_MONO) != 0) + png_do_invert(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED + if ((png_ptr->transformations & PNG_INVERT_ALPHA) != 0) + png_do_read_invert_alpha(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_SHIFT_SUPPORTED + if ((png_ptr->transformations & PNG_SHIFT) != 0) + png_do_unshift(row_info, png_ptr->row_buf + 1, + &(png_ptr->shift)); +#endif + +#ifdef PNG_READ_PACK_SUPPORTED + if ((png_ptr->transformations & PNG_PACK) != 0) + png_do_unpack(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED + /* Added at libpng-1.5.10 */ + if (row_info->color_type == PNG_COLOR_TYPE_PALETTE && + png_ptr->num_palette_max >= 0) + png_do_check_palette_indexes(png_ptr, row_info); +#endif + +#ifdef PNG_READ_BGR_SUPPORTED + if ((png_ptr->transformations & PNG_BGR) != 0) + png_do_bgr(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_PACKSWAP_SUPPORTED + if ((png_ptr->transformations & PNG_PACKSWAP) != 0) + png_do_packswap(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_FILLER_SUPPORTED + if ((png_ptr->transformations & PNG_FILLER) != 0) + png_do_read_filler(row_info, png_ptr->row_buf + 1, + (png_uint_32)png_ptr->filler, png_ptr->flags); +#endif + +#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED + if ((png_ptr->transformations & PNG_SWAP_ALPHA) != 0) + png_do_read_swap_alpha(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_READ_16BIT_SUPPORTED +#ifdef PNG_READ_SWAP_SUPPORTED + if ((png_ptr->transformations & PNG_SWAP_BYTES) != 0) + png_do_swap(row_info, png_ptr->row_buf + 1); +#endif +#endif + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + if ((png_ptr->transformations & PNG_USER_TRANSFORM) != 0) + { + if (png_ptr->read_user_transform_fn != NULL) + (*(png_ptr->read_user_transform_fn)) /* User read transform function */ + (png_ptr, /* png_ptr */ + row_info, /* row_info: */ + /* png_uint_32 width; width of row */ + /* size_t rowbytes; number of bytes in row */ + /* png_byte color_type; color type of pixels */ + /* png_byte bit_depth; bit depth of samples */ + /* png_byte channels; number of channels (1-4) */ + /* png_byte pixel_depth; bits per pixel (depth*channels) */ + png_ptr->row_buf + 1); /* start of pixel data for row */ +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED + if (png_ptr->user_transform_depth != 0) + row_info->bit_depth = png_ptr->user_transform_depth; + + if (png_ptr->user_transform_channels != 0) + row_info->channels = png_ptr->user_transform_channels; +#endif + row_info->pixel_depth = (png_byte)(row_info->bit_depth * + row_info->channels); + + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_info->width); + } +#endif +} + +#endif /* READ_TRANSFORMS */ +#endif /* READ */ diff --git a/widget/milsko/milskosrc/external/libpng/src/pngrutil.c b/widget/milsko/milskosrc/external/libpng/src/pngrutil.c new file mode 100644 index 0000000000..e7c7bbe48e --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/src/pngrutil.c @@ -0,0 +1,4695 @@ +/* pngrutil.c - utilities to read a PNG file + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This file contains routines that are only called from within + * libpng itself during the course of reading an image. + */ + +#include "pngpriv.h" + +#ifdef PNG_READ_SUPPORTED + +/* The minimum 'zlib' stream is assumed to be just the 2 byte header, 5 bytes + * minimum 'deflate' stream, and the 4 byte checksum. + */ +#define LZ77Min (2U+5U+4U) + +#ifdef PNG_READ_INTERLACING_SUPPORTED +/* Arrays to facilitate interlacing - use pass (0 - 6) as index. */ + +/* Start of interlace block */ +static const png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; +/* Offset to next interlace block */ +static const png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; +/* Start of interlace block in the y direction */ +static const png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; +/* Offset to next interlace block in the y direction */ +static const png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; + +/* TODO: Move these arrays to a common utility module to avoid duplication. */ +#endif + +png_uint_32 PNGAPI +png_get_uint_31(png_const_structrp png_ptr, png_const_bytep buf) +{ + png_uint_32 uval = png_get_uint_32(buf); + + if (uval > PNG_UINT_31_MAX) + png_error(png_ptr, "PNG unsigned integer out of range"); + + return uval; +} + +#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED +/* NOTE: the read macros will obscure these definitions, so that if + * PNG_USE_READ_MACROS is set the library will not use them internally, + * but the APIs will still be available externally. + * + * The parentheses around "PNGAPI function_name" in the following three + * functions are necessary because they allow the macros to co-exist with + * these (unused but exported) functions. + */ + +/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */ +png_uint_32 (PNGAPI +png_get_uint_32)(png_const_bytep buf) +{ + png_uint_32 uval = + ((png_uint_32)(*(buf )) << 24) + + ((png_uint_32)(*(buf + 1)) << 16) + + ((png_uint_32)(*(buf + 2)) << 8) + + ((png_uint_32)(*(buf + 3)) ) ; + + return uval; +} + +/* Grab a signed 32-bit integer from a buffer in big-endian format. The + * data is stored in the PNG file in two's complement format and there + * is no guarantee that a 'png_int_32' is exactly 32 bits, therefore + * the following code does a two's complement to native conversion. + */ +png_int_32 (PNGAPI +png_get_int_32)(png_const_bytep buf) +{ + png_uint_32 uval = png_get_uint_32(buf); + if ((uval & 0x80000000) == 0) /* non-negative */ + return (png_int_32)uval; + + uval = (uval ^ 0xffffffff) + 1; /* 2's complement: -x = ~x+1 */ + if ((uval & 0x80000000) == 0) /* no overflow */ + return -(png_int_32)uval; + /* The following has to be safe; this function only gets called on PNG data + * and if we get here that data is invalid. 0 is the most safe value and + * if not then an attacker would surely just generate a PNG with 0 instead. + */ + return 0; +} + +/* Grab an unsigned 16-bit integer from a buffer in big-endian format. */ +png_uint_16 (PNGAPI +png_get_uint_16)(png_const_bytep buf) +{ + /* ANSI-C requires an int value to accommodate at least 16 bits so this + * works and allows the compiler not to worry about possible narrowing + * on 32-bit systems. (Pre-ANSI systems did not make integers smaller + * than 16 bits either.) + */ + unsigned int val = + ((unsigned int)(*buf) << 8) + + ((unsigned int)(*(buf + 1))); + + return (png_uint_16)val; +} + +#endif /* READ_INT_FUNCTIONS */ + +/* Read and check the PNG file signature */ +void /* PRIVATE */ +png_read_sig(png_structrp png_ptr, png_inforp info_ptr) +{ + size_t num_checked, num_to_check; + + /* Exit if the user application does not expect a signature. */ + if (png_ptr->sig_bytes >= 8) + return; + + num_checked = png_ptr->sig_bytes; + num_to_check = 8 - num_checked; + +#ifdef PNG_IO_STATE_SUPPORTED + png_ptr->io_state = PNG_IO_READING | PNG_IO_SIGNATURE; +#endif + + /* The signature must be serialized in a single I/O call. */ + png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check); + png_ptr->sig_bytes = 8; + + if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check) != 0) + { + if (num_checked < 4 && + png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4) != 0) + png_error(png_ptr, "Not a PNG file"); + else + png_error(png_ptr, "PNG file corrupted by ASCII conversion"); + } + if (num_checked < 3) + png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE; +} + +/* This function is called to verify that a chunk name is valid. + * Do this using the bit-whacking approach from contrib/tools/pngfix.c + * + * Copied from libpng 1.7. + */ +static int +check_chunk_name(png_uint_32 name) +{ + png_uint_32 t; + + /* Remove bit 5 from all but the reserved byte; this means + * every 8-bit unit must be in the range 65-90 to be valid. + * So bit 5 must be zero, bit 6 must be set and bit 7 zero. + */ + name &= ~PNG_U32(32,32,0,32); + t = (name & ~0x1f1f1f1fU) ^ 0x40404040U; + + /* Subtract 65 for each 8-bit quantity, this must not + * overflow and each byte must then be in the range 0-25. + */ + name -= PNG_U32(65,65,65,65); + t |= name; + + /* Subtract 26, handling the overflow which should set the + * top three bits of each byte. + */ + name -= PNG_U32(25,25,25,26); + t |= ~name; + + return (t & 0xe0e0e0e0U) == 0U; +} + +/* Read the chunk header (length + type name). + * Put the type name into png_ptr->chunk_name, and return the length. + */ +png_uint_32 /* PRIVATE */ +png_read_chunk_header(png_structrp png_ptr) +{ + png_byte buf[8]; + png_uint_32 chunk_name, length; + +#ifdef PNG_IO_STATE_SUPPORTED + png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_HDR; +#endif + + /* Read the length and the chunk name. png_struct::chunk_name is immediately + * updated even if they are detectably wrong. This aids error message + * handling by allowing png_chunk_error to be used. + */ + png_read_data(png_ptr, buf, 8); + length = png_get_uint_31(png_ptr, buf); + png_ptr->chunk_name = chunk_name = PNG_CHUNK_FROM_STRING(buf+4); + + /* Reset the crc and run it over the chunk name. */ + png_reset_crc(png_ptr); + png_calculate_crc(png_ptr, buf + 4, 4); + + png_debug2(0, "Reading chunk typeid = 0x%lx, length = %lu", + (unsigned long)png_ptr->chunk_name, (unsigned long)length); + + /* Sanity check the length (first by <= 0x80) and the chunk name. An error + * here indicates a broken stream and libpng has no recovery from this. + */ + if (buf[0] >= 0x80U) + png_chunk_error(png_ptr, "bad header (invalid length)"); + + /* Check to see if chunk name is valid. */ + if (!check_chunk_name(chunk_name)) + png_chunk_error(png_ptr, "bad header (invalid type)"); + +#ifdef PNG_IO_STATE_SUPPORTED + png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_DATA; +#endif + + return length; +} + +/* Read data, and (optionally) run it through the CRC. */ +void /* PRIVATE */ +png_crc_read(png_structrp png_ptr, png_bytep buf, png_uint_32 length) +{ + if (png_ptr == NULL) + return; + + png_read_data(png_ptr, buf, length); + png_calculate_crc(png_ptr, buf, length); +} + +/* Compare the CRC stored in the PNG file with that calculated by libpng from + * the data it has read thus far. + */ +static int +png_crc_error(png_structrp png_ptr, int handle_as_ancillary) +{ + png_byte crc_bytes[4]; + png_uint_32 crc; + int need_crc = 1; + + /* There are four flags two for ancillary and two for critical chunks. The + * default setting of these flags is all zero. + * + * PNG_FLAG_CRC_ANCILLARY_USE + * PNG_FLAG_CRC_ANCILLARY_NOWARN + * USE+NOWARN: no CRC calculation (implemented here), else; + * NOWARN: png_chunk_error on error (implemented in png_crc_finish) + * else: png_chunk_warning on error (implemented in png_crc_finish) + * This is the default. + * + * I.e. NOWARN without USE produces png_chunk_error. The default setting + * where neither are set does the same thing. + * + * PNG_FLAG_CRC_CRITICAL_USE + * PNG_FLAG_CRC_CRITICAL_IGNORE + * IGNORE: no CRC calculation (implemented here), else; + * USE: png_chunk_warning on error (implemented in png_crc_finish) + * else: png_chunk_error on error (implemented in png_crc_finish) + * This is the default. + * + * This arose because of original mis-implementation and has persisted for + * compatibility reasons. + * + * TODO: the flag names are internal so maybe this can be changed to + * something comprehensible. + */ + if (handle_as_ancillary || PNG_CHUNK_ANCILLARY(png_ptr->chunk_name) != 0) + { + if ((png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_MASK) == + (PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN)) + need_crc = 0; + } + + else /* critical */ + { + if ((png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) != 0) + need_crc = 0; + } + +#ifdef PNG_IO_STATE_SUPPORTED + png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_CRC; +#endif + + /* The chunk CRC must be serialized in a single I/O call. */ + png_read_data(png_ptr, crc_bytes, 4); + + if (need_crc != 0) + { + crc = png_get_uint_32(crc_bytes); + return crc != png_ptr->crc; + } + + else + return 0; +} + +/* Optionally skip data and then check the CRC. Depending on whether we + * are reading an ancillary or critical chunk, and how the program has set + * things up, we may calculate the CRC on the data and print a message. + * Returns '1' if there was a CRC error, '0' otherwise. + * + * There is one public version which is used in most places and another which + * takes the value for the 'critical' flag to check. This allows PLTE and IEND + * handling code to ignore the CRC error and removes some confusing code + * duplication. + */ +static int +png_crc_finish_critical(png_structrp png_ptr, png_uint_32 skip, + int handle_as_ancillary) +{ + /* The size of the local buffer for inflate is a good guess as to a + * reasonable size to use for buffering reads from the application. + */ + while (skip > 0) + { + png_uint_32 len; + png_byte tmpbuf[PNG_INFLATE_BUF_SIZE]; + + len = (sizeof tmpbuf); + if (len > skip) + len = skip; + skip -= len; + + png_crc_read(png_ptr, tmpbuf, len); + } + + /* If 'handle_as_ancillary' has been requested and this is a critical chunk + * but PNG_FLAG_CRC_CRITICAL_IGNORE was set then png_read_crc did not, in + * fact, calculate the CRC so the ANCILLARY settings should not be used + * instead. + */ + if (handle_as_ancillary && + (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) != 0) + handle_as_ancillary = 0; + + /* TODO: this might be more comprehensible if png_crc_error was inlined here. + */ + if (png_crc_error(png_ptr, handle_as_ancillary) != 0) + { + /* See above for the explanation of how the flags work. */ + if (handle_as_ancillary || PNG_CHUNK_ANCILLARY(png_ptr->chunk_name) != 0 ? + (png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN) == 0 : + (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_USE) != 0) + png_chunk_warning(png_ptr, "CRC error"); + + else + png_chunk_error(png_ptr, "CRC error"); + + return 1; + } + + return 0; +} + +int /* PRIVATE */ +png_crc_finish(png_structrp png_ptr, png_uint_32 skip) +{ + return png_crc_finish_critical(png_ptr, skip, 0/*critical handling*/); +} + +#if defined(PNG_READ_iCCP_SUPPORTED) || defined(PNG_READ_iTXt_SUPPORTED) ||\ + defined(PNG_READ_pCAL_SUPPORTED) || defined(PNG_READ_sCAL_SUPPORTED) ||\ + defined(PNG_READ_sPLT_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) ||\ + defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_READ_eXIf_SUPPORTED) ||\ + defined(PNG_SEQUENTIAL_READ_SUPPORTED) +/* Manage the read buffer; this simply reallocates the buffer if it is not small + * enough (or if it is not allocated). The routine returns a pointer to the + * buffer; if an error occurs and 'warn' is set the routine returns NULL, else + * it will call png_error on failure. + */ +static png_bytep +png_read_buffer(png_structrp png_ptr, png_alloc_size_t new_size) +{ + png_bytep buffer = png_ptr->read_buffer; + + if (new_size > png_chunk_max(png_ptr)) return NULL; + + if (buffer != NULL && new_size > png_ptr->read_buffer_size) + { + png_ptr->read_buffer = NULL; + png_ptr->read_buffer_size = 0; + png_free(png_ptr, buffer); + buffer = NULL; + } + + if (buffer == NULL) + { + buffer = png_voidcast(png_bytep, png_malloc_base(png_ptr, new_size)); + + if (buffer != NULL) + { +# ifndef PNG_NO_MEMZERO /* for detecting UIM bugs **only** */ + memset(buffer, 0, new_size); /* just in case */ +# endif + png_ptr->read_buffer = buffer; + png_ptr->read_buffer_size = new_size; + } + } + + return buffer; +} +#endif /* READ_iCCP|iTXt|pCAL|sCAL|sPLT|tEXt|zTXt|eXIf|SEQUENTIAL_READ */ + +/* png_inflate_claim: claim the zstream for some nefarious purpose that involves + * decompression. Returns Z_OK on success, else a zlib error code. It checks + * the owner but, in final release builds, just issues a warning if some other + * chunk apparently owns the stream. Prior to release it does a png_error. + */ +static int +png_inflate_claim(png_structrp png_ptr, png_uint_32 owner) +{ + if (png_ptr->zowner != 0) + { + char msg[64]; + + PNG_STRING_FROM_CHUNK(msg, png_ptr->zowner); + /* So the message that results is " using zstream"; this is an + * internal error, but is very useful for debugging. i18n requirements + * are minimal. + */ + (void)png_safecat(msg, (sizeof msg), 4, " using zstream"); +#if PNG_RELEASE_BUILD + png_chunk_warning(png_ptr, msg); + png_ptr->zowner = 0; +#else + png_chunk_error(png_ptr, msg); +#endif + } + + /* Implementation note: unlike 'png_deflate_claim' this internal function + * does not take the size of the data as an argument. Some efficiency could + * be gained by using this when it is known *if* the zlib stream itself does + * not record the number; however, this is an illusion: the original writer + * of the PNG may have selected a lower window size, and we really must + * follow that because, for systems with with limited capabilities, we + * would otherwise reject the application's attempts to use a smaller window + * size (zlib doesn't have an interface to say "this or lower"!). + * + * inflateReset2 was added to zlib 1.2.4; before this the window could not be + * reset, therefore it is necessary to always allocate the maximum window + * size with earlier zlibs just in case later compressed chunks need it. + */ + { + int ret; /* zlib return code */ +#if ZLIB_VERNUM >= 0x1240 + int window_bits = 0; + +# if defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_MAXIMUM_INFLATE_WINDOW) + if (((png_ptr->options >> PNG_MAXIMUM_INFLATE_WINDOW) & 3) == + PNG_OPTION_ON) + { + window_bits = 15; + png_ptr->zstream_start = 0; /* fixed window size */ + } + + else + { + png_ptr->zstream_start = 1; + } +# endif + +#endif /* ZLIB_VERNUM >= 0x1240 */ + + /* Set this for safety, just in case the previous owner left pointers to + * memory allocations. + */ + png_ptr->zstream.next_in = NULL; + png_ptr->zstream.avail_in = 0; + png_ptr->zstream.next_out = NULL; + png_ptr->zstream.avail_out = 0; + + if ((png_ptr->flags & PNG_FLAG_ZSTREAM_INITIALIZED) != 0) + { +#if ZLIB_VERNUM >= 0x1240 + ret = inflateReset2(&png_ptr->zstream, window_bits); +#else + ret = inflateReset(&png_ptr->zstream); +#endif + } + + else + { +#if ZLIB_VERNUM >= 0x1240 + ret = inflateInit2(&png_ptr->zstream, window_bits); +#else + ret = inflateInit(&png_ptr->zstream); +#endif + + if (ret == Z_OK) + png_ptr->flags |= PNG_FLAG_ZSTREAM_INITIALIZED; + } + +#ifdef PNG_DISABLE_ADLER32_CHECK_SUPPORTED + if (((png_ptr->options >> PNG_IGNORE_ADLER32) & 3) == PNG_OPTION_ON) + /* Turn off validation of the ADLER32 checksum in IDAT chunks */ + ret = inflateValidate(&png_ptr->zstream, 0); +#endif + + if (ret == Z_OK) + png_ptr->zowner = owner; + + else + png_zstream_error(png_ptr, ret); + + return ret; + } + +#ifdef window_bits +# undef window_bits +#endif +} + +#if ZLIB_VERNUM >= 0x1240 +/* Handle the start of the inflate stream if we called inflateInit2(strm,0); + * in this case some zlib versions skip validation of the CINFO field and, in + * certain circumstances, libpng may end up displaying an invalid image, in + * contrast to implementations that call zlib in the normal way (e.g. libpng + * 1.5). + */ +int /* PRIVATE */ +png_zlib_inflate(png_structrp png_ptr, int flush) +{ + if (png_ptr->zstream_start && png_ptr->zstream.avail_in > 0) + { + if ((*png_ptr->zstream.next_in >> 4) > 7) + { + png_ptr->zstream.msg = "invalid window size (libpng)"; + return Z_DATA_ERROR; + } + + png_ptr->zstream_start = 0; + } + + return inflate(&png_ptr->zstream, flush); +} +#endif /* Zlib >= 1.2.4 */ + +#ifdef PNG_READ_COMPRESSED_TEXT_SUPPORTED +#if defined(PNG_READ_zTXt_SUPPORTED) || defined (PNG_READ_iTXt_SUPPORTED) +/* png_inflate now returns zlib error codes including Z_OK and Z_STREAM_END to + * allow the caller to do multiple calls if required. If the 'finish' flag is + * set Z_FINISH will be passed to the final inflate() call and Z_STREAM_END must + * be returned or there has been a problem, otherwise Z_SYNC_FLUSH is used and + * Z_OK or Z_STREAM_END will be returned on success. + * + * The input and output sizes are updated to the actual amounts of data consumed + * or written, not the amount available (as in a z_stream). The data pointers + * are not changed, so the next input is (data+input_size) and the next + * available output is (output+output_size). + */ +static int +png_inflate(png_structrp png_ptr, png_uint_32 owner, int finish, + /* INPUT: */ png_const_bytep input, png_uint_32p input_size_ptr, + /* OUTPUT: */ png_bytep output, png_alloc_size_t *output_size_ptr) +{ + if (png_ptr->zowner == owner) /* Else not claimed */ + { + int ret; + png_alloc_size_t avail_out = *output_size_ptr; + png_uint_32 avail_in = *input_size_ptr; + + /* zlib can't necessarily handle more than 65535 bytes at once (i.e. it + * can't even necessarily handle 65536 bytes) because the type uInt is + * "16 bits or more". Consequently it is necessary to chunk the input to + * zlib. This code uses ZLIB_IO_MAX, from pngpriv.h, as the maximum (the + * maximum value that can be stored in a uInt.) It is possible to set + * ZLIB_IO_MAX to a lower value in pngpriv.h and this may sometimes have + * a performance advantage, because it reduces the amount of data accessed + * at each step and that may give the OS more time to page it in. + */ + png_ptr->zstream.next_in = PNGZ_INPUT_CAST(input); + /* avail_in and avail_out are set below from 'size' */ + png_ptr->zstream.avail_in = 0; + png_ptr->zstream.avail_out = 0; + + /* Read directly into the output if it is available (this is set to + * a local buffer below if output is NULL). + */ + if (output != NULL) + png_ptr->zstream.next_out = output; + + do + { + uInt avail; + Byte local_buffer[PNG_INFLATE_BUF_SIZE]; + + /* zlib INPUT BUFFER */ + /* The setting of 'avail_in' used to be outside the loop; by setting it + * inside it is possible to chunk the input to zlib and simply rely on + * zlib to advance the 'next_in' pointer. This allows arbitrary + * amounts of data to be passed through zlib at the unavoidable cost of + * requiring a window save (memcpy of up to 32768 output bytes) + * every ZLIB_IO_MAX input bytes. + */ + avail_in += png_ptr->zstream.avail_in; /* not consumed last time */ + + avail = ZLIB_IO_MAX; + + if (avail_in < avail) + avail = (uInt)avail_in; /* safe: < than ZLIB_IO_MAX */ + + avail_in -= avail; + png_ptr->zstream.avail_in = avail; + + /* zlib OUTPUT BUFFER */ + avail_out += png_ptr->zstream.avail_out; /* not written last time */ + + avail = ZLIB_IO_MAX; /* maximum zlib can process */ + + if (output == NULL) + { + /* Reset the output buffer each time round if output is NULL and + * make available the full buffer, up to 'remaining_space' + */ + png_ptr->zstream.next_out = local_buffer; + if ((sizeof local_buffer) < avail) + avail = (sizeof local_buffer); + } + + if (avail_out < avail) + avail = (uInt)avail_out; /* safe: < ZLIB_IO_MAX */ + + png_ptr->zstream.avail_out = avail; + avail_out -= avail; + + /* zlib inflate call */ + /* In fact 'avail_out' may be 0 at this point, that happens at the end + * of the read when the final LZ end code was not passed at the end of + * the previous chunk of input data. Tell zlib if we have reached the + * end of the output buffer. + */ + ret = PNG_INFLATE(png_ptr, avail_out > 0 ? Z_NO_FLUSH : + (finish ? Z_FINISH : Z_SYNC_FLUSH)); + } while (ret == Z_OK); + + /* For safety kill the local buffer pointer now */ + if (output == NULL) + png_ptr->zstream.next_out = NULL; + + /* Claw back the 'size' and 'remaining_space' byte counts. */ + avail_in += png_ptr->zstream.avail_in; + avail_out += png_ptr->zstream.avail_out; + + /* Update the input and output sizes; the updated values are the amount + * consumed or written, effectively the inverse of what zlib uses. + */ + if (avail_out > 0) + *output_size_ptr -= avail_out; + + if (avail_in > 0) + *input_size_ptr -= avail_in; + + /* Ensure png_ptr->zstream.msg is set (even in the success case!) */ + png_zstream_error(png_ptr, ret); + return ret; + } + + else + { + /* This is a bad internal error. The recovery assigns to the zstream msg + * pointer, which is not owned by the caller, but this is safe; it's only + * used on errors! + */ + png_ptr->zstream.msg = PNGZ_MSG_CAST("zstream unclaimed"); + return Z_STREAM_ERROR; + } +} + +/* + * Decompress trailing data in a chunk. The assumption is that read_buffer + * points at an allocated area holding the contents of a chunk with a + * trailing compressed part. What we get back is an allocated area + * holding the original prefix part and an uncompressed version of the + * trailing part (the malloc area passed in is freed). + */ +static int +png_decompress_chunk(png_structrp png_ptr, + png_uint_32 chunklength, png_uint_32 prefix_size, + png_alloc_size_t *newlength /* must be initialized to the maximum! */, + int terminate /*add a '\0' to the end of the uncompressed data*/) +{ + /* TODO: implement different limits for different types of chunk. + * + * The caller supplies *newlength set to the maximum length of the + * uncompressed data, but this routine allocates space for the prefix and + * maybe a '\0' terminator too. We have to assume that 'prefix_size' is + * limited only by the maximum chunk size. + */ + png_alloc_size_t limit = png_chunk_max(png_ptr); + + if (limit >= prefix_size + (terminate != 0)) + { + int ret; + + limit -= prefix_size + (terminate != 0); + + if (limit < *newlength) + *newlength = limit; + + /* Now try to claim the stream. */ + ret = png_inflate_claim(png_ptr, png_ptr->chunk_name); + + if (ret == Z_OK) + { + png_uint_32 lzsize = chunklength - prefix_size; + + ret = png_inflate(png_ptr, png_ptr->chunk_name, 1/*finish*/, + /* input: */ png_ptr->read_buffer + prefix_size, &lzsize, + /* output: */ NULL, newlength); + + if (ret == Z_STREAM_END) + { + /* Use 'inflateReset' here, not 'inflateReset2' because this + * preserves the previously decided window size (otherwise it would + * be necessary to store the previous window size.) In practice + * this doesn't matter anyway, because png_inflate will call inflate + * with Z_FINISH in almost all cases, so the window will not be + * maintained. + */ + if (inflateReset(&png_ptr->zstream) == Z_OK) + { + /* Because of the limit checks above we know that the new, + * expanded, size will fit in a size_t (let alone an + * png_alloc_size_t). Use png_malloc_base here to avoid an + * extra OOM message. + */ + png_alloc_size_t new_size = *newlength; + png_alloc_size_t buffer_size = prefix_size + new_size + + (terminate != 0); + png_bytep text = png_voidcast(png_bytep, png_malloc_base(png_ptr, + buffer_size)); + + if (text != NULL) + { + memset(text, 0, buffer_size); + + ret = png_inflate(png_ptr, png_ptr->chunk_name, 1/*finish*/, + png_ptr->read_buffer + prefix_size, &lzsize, + text + prefix_size, newlength); + + if (ret == Z_STREAM_END) + { + if (new_size == *newlength) + { + if (terminate != 0) + text[prefix_size + *newlength] = 0; + + if (prefix_size > 0) + memcpy(text, png_ptr->read_buffer, prefix_size); + + { + png_bytep old_ptr = png_ptr->read_buffer; + + png_ptr->read_buffer = text; + png_ptr->read_buffer_size = buffer_size; + text = old_ptr; /* freed below */ + } + } + + else + { + /* The size changed on the second read, there can be no + * guarantee that anything is correct at this point. + * The 'msg' pointer has been set to "unexpected end of + * LZ stream", which is fine, but return an error code + * that the caller won't accept. + */ + ret = PNG_UNEXPECTED_ZLIB_RETURN; + } + } + + else if (ret == Z_OK) + ret = PNG_UNEXPECTED_ZLIB_RETURN; /* for safety */ + + /* Free the text pointer (this is the old read_buffer on + * success) + */ + png_free(png_ptr, text); + + /* This really is very benign, but it's still an error because + * the extra space may otherwise be used as a Trojan Horse. + */ + if (ret == Z_STREAM_END && + chunklength - prefix_size != lzsize) + png_chunk_benign_error(png_ptr, "extra compressed data"); + } + + else + { + /* Out of memory allocating the buffer */ + ret = Z_MEM_ERROR; + png_zstream_error(png_ptr, Z_MEM_ERROR); + } + } + + else + { + /* inflateReset failed, store the error message */ + png_zstream_error(png_ptr, ret); + ret = PNG_UNEXPECTED_ZLIB_RETURN; + } + } + + else if (ret == Z_OK) + ret = PNG_UNEXPECTED_ZLIB_RETURN; + + /* Release the claimed stream */ + png_ptr->zowner = 0; + } + + else /* the claim failed */ if (ret == Z_STREAM_END) /* impossible! */ + ret = PNG_UNEXPECTED_ZLIB_RETURN; + + return ret; + } + + else + { + /* Application/configuration limits exceeded */ + png_zstream_error(png_ptr, Z_MEM_ERROR); + return Z_MEM_ERROR; + } +} +#endif /* READ_zTXt || READ_iTXt */ +#endif /* READ_COMPRESSED_TEXT */ + +#ifdef PNG_READ_iCCP_SUPPORTED +/* Perform a partial read and decompress, producing 'avail_out' bytes and + * reading from the current chunk as required. + */ +static int +png_inflate_read(png_structrp png_ptr, png_bytep read_buffer, uInt read_size, + png_uint_32p chunk_bytes, png_bytep next_out, png_alloc_size_t *out_size, + int finish) +{ + if (png_ptr->zowner == png_ptr->chunk_name) + { + int ret; + + /* next_in and avail_in must have been initialized by the caller. */ + png_ptr->zstream.next_out = next_out; + png_ptr->zstream.avail_out = 0; /* set in the loop */ + + do + { + if (png_ptr->zstream.avail_in == 0) + { + if (read_size > *chunk_bytes) + read_size = (uInt)*chunk_bytes; + *chunk_bytes -= read_size; + + if (read_size > 0) + png_crc_read(png_ptr, read_buffer, read_size); + + png_ptr->zstream.next_in = read_buffer; + png_ptr->zstream.avail_in = read_size; + } + + if (png_ptr->zstream.avail_out == 0) + { + uInt avail = ZLIB_IO_MAX; + if (avail > *out_size) + avail = (uInt)*out_size; + *out_size -= avail; + + png_ptr->zstream.avail_out = avail; + } + + /* Use Z_SYNC_FLUSH when there is no more chunk data to ensure that all + * the available output is produced; this allows reading of truncated + * streams. + */ + ret = PNG_INFLATE(png_ptr, *chunk_bytes > 0 ? + Z_NO_FLUSH : (finish ? Z_FINISH : Z_SYNC_FLUSH)); + } + while (ret == Z_OK && (*out_size > 0 || png_ptr->zstream.avail_out > 0)); + + *out_size += png_ptr->zstream.avail_out; + png_ptr->zstream.avail_out = 0; /* Should not be required, but is safe */ + + /* Ensure the error message pointer is always set: */ + png_zstream_error(png_ptr, ret); + return ret; + } + + else + { + png_ptr->zstream.msg = PNGZ_MSG_CAST("zstream unclaimed"); + return Z_STREAM_ERROR; + } +} +#endif /* READ_iCCP */ + +/* CHUNK HANDLING */ +/* Read and check the IDHR chunk */ +static png_handle_result_code +png_handle_IHDR(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_byte buf[13]; + png_uint_32 width, height; + int bit_depth, color_type, compression_type, filter_type; + int interlace_type; + + png_debug(1, "in png_handle_IHDR"); + + /* Length and position are checked by the caller. */ + + png_ptr->mode |= PNG_HAVE_IHDR; + + png_crc_read(png_ptr, buf, 13); + png_crc_finish(png_ptr, 0); + + width = png_get_uint_31(png_ptr, buf); + height = png_get_uint_31(png_ptr, buf + 4); + bit_depth = buf[8]; + color_type = buf[9]; + compression_type = buf[10]; + filter_type = buf[11]; + interlace_type = buf[12]; + + /* Set internal variables */ + png_ptr->width = width; + png_ptr->height = height; + png_ptr->bit_depth = (png_byte)bit_depth; + png_ptr->interlaced = (png_byte)interlace_type; + png_ptr->color_type = (png_byte)color_type; +#ifdef PNG_MNG_FEATURES_SUPPORTED + png_ptr->filter_type = (png_byte)filter_type; +#endif + png_ptr->compression_type = (png_byte)compression_type; + + /* Find number of channels */ + switch (png_ptr->color_type) + { + default: /* invalid, png_set_IHDR calls png_error */ + case PNG_COLOR_TYPE_GRAY: + case PNG_COLOR_TYPE_PALETTE: + png_ptr->channels = 1; + break; + + case PNG_COLOR_TYPE_RGB: + png_ptr->channels = 3; + break; + + case PNG_COLOR_TYPE_GRAY_ALPHA: + png_ptr->channels = 2; + break; + + case PNG_COLOR_TYPE_RGB_ALPHA: + png_ptr->channels = 4; + break; + } + + /* Set up other useful info */ + png_ptr->pixel_depth = (png_byte)(png_ptr->bit_depth * png_ptr->channels); + png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->width); + png_debug1(3, "bit_depth = %d", png_ptr->bit_depth); + png_debug1(3, "channels = %d", png_ptr->channels); + png_debug1(3, "rowbytes = %lu", (unsigned long)png_ptr->rowbytes); + + /* Rely on png_set_IHDR to completely validate the data and call png_error if + * it's wrong. + */ + png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth, + color_type, interlace_type, compression_type, filter_type); + + return handled_ok; + PNG_UNUSED(length) +} + +/* Read and check the palette */ +/* TODO: there are several obvious errors in this code when handling + * out-of-place chunks and there is much over-complexity caused by trying to + * patch up the problems. + */ +static png_handle_result_code +png_handle_PLTE(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_const_charp errmsg = NULL; + + png_debug(1, "in png_handle_PLTE"); + + /* 1.6.47: consistency. This used to be especially treated as a critical + * error even in an image which is not colour mapped, there isn't a good + * justification for treating some errors here one way and others another so + * everything uses the same logic. + */ + if ((png_ptr->mode & PNG_HAVE_PLTE) != 0) + errmsg = "duplicate"; + + else if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) + errmsg = "out of place"; + + else if ((png_ptr->color_type & PNG_COLOR_MASK_COLOR) == 0) + errmsg = "ignored in grayscale PNG"; + + else if (length > 3*PNG_MAX_PALETTE_LENGTH || (length % 3) != 0) + errmsg = "invalid"; + + /* This drops PLTE in favour of tRNS or bKGD because both of those chunks + * can have an effect on the rendering of the image whereas PLTE only matters + * in the case of an 8-bit display with a decoder which controls the palette. + * + * The alternative here is to ignore the error and store the palette anyway; + * destroying the tRNS will definately cause problems. + * + * NOTE: the case of PNG_COLOR_TYPE_PALETTE need not be considered because + * the png_handle_ routines for the three 'after PLTE' chunks tRNS, bKGD and + * hIST all check for a preceding PLTE in these cases. + */ + else if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE && + (png_has_chunk(png_ptr, tRNS) || png_has_chunk(png_ptr, bKGD))) + errmsg = "out of place"; + + else + { + /* If the palette has 256 or fewer entries but is too large for the bit + * depth we don't issue an error to preserve the behavior of previous + * libpng versions. We silently truncate the unused extra palette entries + * here. + */ + const unsigned max_palette_length = + (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ? + 1U << png_ptr->bit_depth : PNG_MAX_PALETTE_LENGTH; + + /* The cast is safe because 'length' is less than + * 3*PNG_MAX_PALETTE_LENGTH + */ + const unsigned num = (length > 3U*max_palette_length) ? + max_palette_length : (unsigned)length / 3U; + + unsigned i, j; + png_byte buf[3*PNG_MAX_PALETTE_LENGTH]; + png_color palette[PNG_MAX_PALETTE_LENGTH]; + + /* Read the chunk into the buffer then read to the end of the chunk. */ + png_crc_read(png_ptr, buf, num*3U); + png_crc_finish_critical(png_ptr, length - 3U*num, + /* Handle as ancillary if PLTE is optional: */ + png_ptr->color_type != PNG_COLOR_TYPE_PALETTE); + + for (i = 0U, j = 0U; i < num; i++) + { + palette[i].red = buf[j++]; + palette[i].green = buf[j++]; + palette[i].blue = buf[j++]; + } + + /* A valid PLTE chunk has been read */ + png_ptr->mode |= PNG_HAVE_PLTE; + + /* TODO: png_set_PLTE has the side effect of setting png_ptr->palette to + * its own copy of the palette. This has the side effect that when + * png_start_row is called (this happens after any call to + * png_read_update_info) the info_ptr palette gets changed. This is + * extremely unexpected and confusing. + * + * REVIEW: there have been consistent bugs in the past about gamma and + * similar transforms to colour mapped images being useless because the + * modified palette cannot be accessed because of the above. + * + * CONSIDER: Fix this by not sharing the palette in this way. But does + * this completely fix the problem? + */ + png_set_PLTE(png_ptr, info_ptr, palette, num); + return handled_ok; + } + + /* Here on error: errmsg is non NULL. */ + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + png_crc_finish(png_ptr, length); + png_chunk_error(png_ptr, errmsg); + } + + else /* not critical to this image */ + { + png_crc_finish_critical(png_ptr, length, 1/*handle as ancillary*/); + png_chunk_benign_error(png_ptr, errmsg); + } + + /* Because PNG_UNUSED(errmsg) does not work if all the uses are compiled out + * (this does happen). + */ + return errmsg != NULL ? handled_error : handled_error; +} + +/* On read the IDAT chunk is always handled specially, even if marked for + * unknown handling (this is allowed), so: + */ +#define png_handle_IDAT NULL + +static png_handle_result_code +png_handle_IEND(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_debug(1, "in png_handle_IEND"); + + png_ptr->mode |= (PNG_AFTER_IDAT | PNG_HAVE_IEND); + + if (length != 0) + png_chunk_benign_error(png_ptr, "invalid"); + + png_crc_finish_critical(png_ptr, length, 1/*handle as ancillary*/); + + return handled_ok; + PNG_UNUSED(info_ptr) +} + +#ifdef PNG_READ_gAMA_SUPPORTED +static png_handle_result_code +png_handle_gAMA(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_uint_32 ugamma; + png_byte buf[4]; + + png_debug(1, "in png_handle_gAMA"); + + png_crc_read(png_ptr, buf, 4); + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + ugamma = png_get_uint_32(buf); + + if (ugamma > PNG_UINT_31_MAX) + { + png_chunk_benign_error(png_ptr, "invalid"); + return handled_error; + } + + png_set_gAMA_fixed(png_ptr, info_ptr, (png_fixed_point)/*SAFE*/ugamma); + +#ifdef PNG_READ_GAMMA_SUPPORTED + /* PNGv3: chunk precedence for gamma is cICP, [iCCP], sRGB, gAMA. gAMA is + * at the end of the chain so simply check for an unset value. + */ + if (png_ptr->chunk_gamma == 0) + png_ptr->chunk_gamma = (png_fixed_point)/*SAFE*/ugamma; +#endif /*READ_GAMMA*/ + + return handled_ok; + PNG_UNUSED(length) +} +#else +# define png_handle_gAMA NULL +#endif + +#ifdef PNG_READ_sBIT_SUPPORTED +static png_handle_result_code /* PRIVATE */ +png_handle_sBIT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + unsigned int truelen, i; + png_byte sample_depth; + png_byte buf[4]; + + png_debug(1, "in png_handle_sBIT"); + + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + truelen = 3; + sample_depth = 8; + } + + else + { + truelen = png_ptr->channels; + sample_depth = png_ptr->bit_depth; + } + + if (length != truelen) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "bad length"); + return handled_error; + } + + buf[0] = buf[1] = buf[2] = buf[3] = sample_depth; + png_crc_read(png_ptr, buf, truelen); + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + for (i=0; i sample_depth) + { + png_chunk_benign_error(png_ptr, "invalid"); + return handled_error; + } + } + + if ((png_ptr->color_type & PNG_COLOR_MASK_COLOR) != 0) + { + png_ptr->sig_bit.red = buf[0]; + png_ptr->sig_bit.green = buf[1]; + png_ptr->sig_bit.blue = buf[2]; + png_ptr->sig_bit.alpha = buf[3]; + } + + else /* grayscale */ + { + png_ptr->sig_bit.gray = buf[0]; + png_ptr->sig_bit.red = buf[0]; + png_ptr->sig_bit.green = buf[0]; + png_ptr->sig_bit.blue = buf[0]; + png_ptr->sig_bit.alpha = buf[1]; + } + + png_set_sBIT(png_ptr, info_ptr, &(png_ptr->sig_bit)); + return handled_ok; +} +#else +# define png_handle_sBIT NULL +#endif + +#ifdef PNG_READ_cHRM_SUPPORTED +static png_int_32 +png_get_int_32_checked(png_const_bytep buf, int *error) +{ + png_uint_32 uval = png_get_uint_32(buf); + if ((uval & 0x80000000) == 0) /* non-negative */ + return (png_int_32)uval; + + uval = (uval ^ 0xffffffff) + 1; /* 2's complement: -x = ~x+1 */ + if ((uval & 0x80000000) == 0) /* no overflow */ + return -(png_int_32)uval; + + /* This version of png_get_int_32 has a way of returning the error to the + * caller, so: + */ + *error = 1; + return 0; /* Safe */ +} + +static png_handle_result_code /* PRIVATE */ +png_handle_cHRM(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + int error = 0; + png_xy xy; + png_byte buf[32]; + + png_debug(1, "in png_handle_cHRM"); + + png_crc_read(png_ptr, buf, 32); + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + xy.whitex = png_get_int_32_checked(buf + 0, &error); + xy.whitey = png_get_int_32_checked(buf + 4, &error); + xy.redx = png_get_int_32_checked(buf + 8, &error); + xy.redy = png_get_int_32_checked(buf + 12, &error); + xy.greenx = png_get_int_32_checked(buf + 16, &error); + xy.greeny = png_get_int_32_checked(buf + 20, &error); + xy.bluex = png_get_int_32_checked(buf + 24, &error); + xy.bluey = png_get_int_32_checked(buf + 28, &error); + + if (error) + { + png_chunk_benign_error(png_ptr, "invalid"); + return handled_error; + } + + /* png_set_cHRM may complain about some of the values but this doesn't matter + * because it was a cHRM and it did have vaguely (if, perhaps, ridiculous) + * values. Ridiculousity will be checked if the values are used later. + */ + png_set_cHRM_fixed(png_ptr, info_ptr, xy.whitex, xy.whitey, xy.redx, xy.redy, + xy.greenx, xy.greeny, xy.bluex, xy.bluey); + + /* We only use 'chromaticities' for RGB to gray */ +# ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + /* There is no need to check sRGB here, cICP is NYI and iCCP is not + * supported so just check mDCV. + */ + if (!png_has_chunk(png_ptr, mDCV)) + { + png_ptr->chromaticities = xy; + } +# endif /* READ_RGB_TO_GRAY */ + + return handled_ok; + PNG_UNUSED(length) +} +#else +# define png_handle_cHRM NULL +#endif + +#ifdef PNG_READ_sRGB_SUPPORTED +static png_handle_result_code /* PRIVATE */ +png_handle_sRGB(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_byte intent; + + png_debug(1, "in png_handle_sRGB"); + + png_crc_read(png_ptr, &intent, 1); + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + /* This checks the range of the "rendering intent" because it is specified in + * the PNG spec itself; the "reserved" values will result in the chunk not + * being accepted, just as they do with the various "reserved" values in + * IHDR. + */ + if (intent > 3/*PNGv3 spec*/) + { + png_chunk_benign_error(png_ptr, "invalid"); + return handled_error; + } + + png_set_sRGB(png_ptr, info_ptr, intent); + /* NOTE: png_struct::chromaticities is not set here because the RGB to gray + * coefficients are known without a need for the chromaticities. + */ + +#ifdef PNG_READ_GAMMA_SUPPORTED + /* PNGv3: chunk precedence for gamma is cICP, [iCCP], sRGB, gAMA. iCCP is + * not supported by libpng so the only requirement is to check for cICP + * setting the gamma (this is NYI, but this check is safe.) + */ + if (!png_has_chunk(png_ptr, cICP) || png_ptr->chunk_gamma == 0) + png_ptr->chunk_gamma = PNG_GAMMA_sRGB_INVERSE; +#endif /*READ_GAMMA*/ + + return handled_ok; + PNG_UNUSED(length) +} +#else +# define png_handle_sRGB NULL +#endif /* READ_sRGB */ + +#ifdef PNG_READ_iCCP_SUPPORTED +static png_handle_result_code /* PRIVATE */ +png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +/* Note: this does not properly handle profiles that are > 64K under DOS */ +{ + png_const_charp errmsg = NULL; /* error message output, or no error */ + int finished = 0; /* crc checked */ + + png_debug(1, "in png_handle_iCCP"); + + /* PNGv3: allow PNG files with both sRGB and iCCP because the PNG spec only + * ever said that there "should" be only one, not "shall" and the PNGv3 + * colour chunk precedence rules give a handling for this case anyway. + */ + { + uInt read_length, keyword_length; + char keyword[81]; + + /* Find the keyword; the keyword plus separator and compression method + * bytes can be at most 81 characters long. + */ + read_length = 81; /* maximum */ + if (read_length > length) + read_length = (uInt)/*SAFE*/length; + + png_crc_read(png_ptr, (png_bytep)keyword, read_length); + length -= read_length; + + if (length < LZ77Min) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "too short"); + return handled_error; + } + + keyword_length = 0; + while (keyword_length < 80 && keyword_length < read_length && + keyword[keyword_length] != 0) + ++keyword_length; + + /* TODO: make the keyword checking common */ + if (keyword_length >= 1 && keyword_length <= 79) + { + /* We only understand '0' compression - deflate - so if we get a + * different value we can't safely decode the chunk. + */ + if (keyword_length+1 < read_length && + keyword[keyword_length+1] == PNG_COMPRESSION_TYPE_BASE) + { + read_length -= keyword_length+2; + + if (png_inflate_claim(png_ptr, png_iCCP) == Z_OK) + { + Byte profile_header[132]={0}; + Byte local_buffer[PNG_INFLATE_BUF_SIZE]; + png_alloc_size_t size = (sizeof profile_header); + + png_ptr->zstream.next_in = (Bytef*)keyword + (keyword_length+2); + png_ptr->zstream.avail_in = read_length; + (void)png_inflate_read(png_ptr, local_buffer, + (sizeof local_buffer), &length, profile_header, &size, + 0/*finish: don't, because the output is too small*/); + + if (size == 0) + { + /* We have the ICC profile header; do the basic header checks. + */ + png_uint_32 profile_length = png_get_uint_32(profile_header); + + if (png_icc_check_length(png_ptr, keyword, profile_length) != + 0) + { + /* The length is apparently ok, so we can check the 132 + * byte header. + */ + if (png_icc_check_header(png_ptr, keyword, profile_length, + profile_header, png_ptr->color_type) != 0) + { + /* Now read the tag table; a variable size buffer is + * needed at this point, allocate one for the whole + * profile. The header check has already validated + * that none of this stuff will overflow. + */ + png_uint_32 tag_count = + png_get_uint_32(profile_header + 128); + png_bytep profile = png_read_buffer(png_ptr, + profile_length); + + if (profile != NULL) + { + memcpy(profile, profile_header, + (sizeof profile_header)); + + size = 12 * tag_count; + + (void)png_inflate_read(png_ptr, local_buffer, + (sizeof local_buffer), &length, + profile + (sizeof profile_header), &size, 0); + + /* Still expect a buffer error because we expect + * there to be some tag data! + */ + if (size == 0) + { + if (png_icc_check_tag_table(png_ptr, + keyword, profile_length, profile) != 0) + { + /* The profile has been validated for basic + * security issues, so read the whole thing in. + */ + size = profile_length - (sizeof profile_header) + - 12 * tag_count; + + (void)png_inflate_read(png_ptr, local_buffer, + (sizeof local_buffer), &length, + profile + (sizeof profile_header) + + 12 * tag_count, &size, 1/*finish*/); + + if (length > 0 && !(png_ptr->flags & + PNG_FLAG_BENIGN_ERRORS_WARN)) + errmsg = "extra compressed data"; + + /* But otherwise allow extra data: */ + else if (size == 0) + { + if (length > 0) + { + /* This can be handled completely, so + * keep going. + */ + png_chunk_warning(png_ptr, + "extra compressed data"); + } + + png_crc_finish(png_ptr, length); + finished = 1; + + /* Steal the profile for info_ptr. */ + if (info_ptr != NULL) + { + png_free_data(png_ptr, info_ptr, + PNG_FREE_ICCP, 0); + + info_ptr->iccp_name = png_voidcast(char*, + png_malloc_base(png_ptr, + keyword_length+1)); + if (info_ptr->iccp_name != NULL) + { + memcpy(info_ptr->iccp_name, keyword, + keyword_length+1); + info_ptr->iccp_proflen = + profile_length; + info_ptr->iccp_profile = profile; + png_ptr->read_buffer = NULL; /*steal*/ + info_ptr->free_me |= PNG_FREE_ICCP; + info_ptr->valid |= PNG_INFO_iCCP; + } + + else + errmsg = "out of memory"; + } + + /* else the profile remains in the read + * buffer which gets reused for subsequent + * chunks. + */ + + if (errmsg == NULL) + { + png_ptr->zowner = 0; + return handled_ok; + } + } + if (errmsg == NULL) + errmsg = png_ptr->zstream.msg; + } + /* else png_icc_check_tag_table output an error */ + } + else /* profile truncated */ + errmsg = png_ptr->zstream.msg; + } + + else + errmsg = "out of memory"; + } + + /* else png_icc_check_header output an error */ + } + + /* else png_icc_check_length output an error */ + } + + else /* profile truncated */ + errmsg = png_ptr->zstream.msg; + + /* Release the stream */ + png_ptr->zowner = 0; + } + + else /* png_inflate_claim failed */ + errmsg = png_ptr->zstream.msg; + } + + else + errmsg = "bad compression method"; /* or missing */ + } + + else + errmsg = "bad keyword"; + } + + /* Failure: the reason is in 'errmsg' */ + if (finished == 0) + png_crc_finish(png_ptr, length); + + if (errmsg != NULL) /* else already output */ + png_chunk_benign_error(png_ptr, errmsg); + + return handled_error; +} +#else +# define png_handle_iCCP NULL +#endif /* READ_iCCP */ + +#ifdef PNG_READ_sPLT_SUPPORTED +static png_handle_result_code /* PRIVATE */ +png_handle_sPLT(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +/* Note: this does not properly handle chunks that are > 64K under DOS */ +{ + png_bytep entry_start, buffer; + png_sPLT_t new_palette; + png_sPLT_entryp pp; + png_uint_32 data_length; + int entry_size, i; + png_uint_32 skip = 0; + png_uint_32 dl; + size_t max_dl; + + png_debug(1, "in png_handle_sPLT"); + +#ifdef PNG_USER_LIMITS_SUPPORTED + if (png_ptr->user_chunk_cache_max != 0) + { + if (png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + return handled_error; + } + + if (--png_ptr->user_chunk_cache_max == 1) + { + png_warning(png_ptr, "No space in chunk cache for sPLT"); + png_crc_finish(png_ptr, length); + return handled_error; + } + } +#endif + + buffer = png_read_buffer(png_ptr, length+1); + if (buffer == NULL) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of memory"); + return handled_error; + } + + + /* WARNING: this may break if size_t is less than 32 bits; it is assumed + * that the PNG_MAX_MALLOC_64K test is enabled in this case, but this is a + * potential breakage point if the types in pngconf.h aren't exactly right. + */ + png_crc_read(png_ptr, buffer, length); + + if (png_crc_finish(png_ptr, skip) != 0) + return handled_error; + + buffer[length] = 0; + + for (entry_start = buffer; *entry_start; entry_start++) + /* Empty loop to find end of name */ ; + + ++entry_start; + + /* A sample depth should follow the separator, and we should be on it */ + if (length < 2U || entry_start > buffer + (length - 2U)) + { + png_warning(png_ptr, "malformed sPLT chunk"); + return handled_error; + } + + new_palette.depth = *entry_start++; + entry_size = (new_palette.depth == 8 ? 6 : 10); + /* This must fit in a png_uint_32 because it is derived from the original + * chunk data length. + */ + data_length = length - (png_uint_32)(entry_start - buffer); + + /* Integrity-check the data length */ + if ((data_length % (unsigned int)entry_size) != 0) + { + png_warning(png_ptr, "sPLT chunk has bad length"); + return handled_error; + } + + dl = (png_uint_32)(data_length / (unsigned int)entry_size); + max_dl = PNG_SIZE_MAX / (sizeof (png_sPLT_entry)); + + if (dl > max_dl) + { + png_warning(png_ptr, "sPLT chunk too long"); + return handled_error; + } + + new_palette.nentries = (png_int_32)(data_length / (unsigned int)entry_size); + + new_palette.entries = (png_sPLT_entryp)png_malloc_warn(png_ptr, + (png_alloc_size_t) new_palette.nentries * (sizeof (png_sPLT_entry))); + + if (new_palette.entries == NULL) + { + png_warning(png_ptr, "sPLT chunk requires too much memory"); + return handled_error; + } + + for (i = 0; i < new_palette.nentries; i++) + { + pp = new_palette.entries + i; + + if (new_palette.depth == 8) + { + pp->red = *entry_start++; + pp->green = *entry_start++; + pp->blue = *entry_start++; + pp->alpha = *entry_start++; + } + + else + { + pp->red = png_get_uint_16(entry_start); entry_start += 2; + pp->green = png_get_uint_16(entry_start); entry_start += 2; + pp->blue = png_get_uint_16(entry_start); entry_start += 2; + pp->alpha = png_get_uint_16(entry_start); entry_start += 2; + } + + pp->frequency = png_get_uint_16(entry_start); entry_start += 2; + } + + /* Discard all chunk data except the name and stash that */ + new_palette.name = (png_charp)buffer; + + png_set_sPLT(png_ptr, info_ptr, &new_palette, 1); + + png_free(png_ptr, new_palette.entries); + return handled_ok; +} +#else +# define png_handle_sPLT NULL +#endif /* READ_sPLT */ + +#ifdef PNG_READ_tRNS_SUPPORTED +static png_handle_result_code /* PRIVATE */ +png_handle_tRNS(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_byte readbuf[PNG_MAX_PALETTE_LENGTH]; + + png_debug(1, "in png_handle_tRNS"); + + if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) + { + png_byte buf[2]; + + if (length != 2) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return handled_error; + } + + png_crc_read(png_ptr, buf, 2); + png_ptr->num_trans = 1; + png_ptr->trans_color.gray = png_get_uint_16(buf); + } + + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) + { + png_byte buf[6]; + + if (length != 6) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return handled_error; + } + + png_crc_read(png_ptr, buf, length); + png_ptr->num_trans = 1; + png_ptr->trans_color.red = png_get_uint_16(buf); + png_ptr->trans_color.green = png_get_uint_16(buf + 2); + png_ptr->trans_color.blue = png_get_uint_16(buf + 4); + } + + else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + if ((png_ptr->mode & PNG_HAVE_PLTE) == 0) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return handled_error; + } + + if (length > (unsigned int) png_ptr->num_palette || + length > (unsigned int) PNG_MAX_PALETTE_LENGTH || + length == 0) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return handled_error; + } + + png_crc_read(png_ptr, readbuf, length); + png_ptr->num_trans = (png_uint_16)length; + } + + else + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid with alpha channel"); + return handled_error; + } + + if (png_crc_finish(png_ptr, 0) != 0) + { + png_ptr->num_trans = 0; + return handled_error; + } + + /* TODO: this is a horrible side effect in the palette case because the + * png_struct ends up with a pointer to the tRNS buffer owned by the + * png_info. Fix this. + */ + png_set_tRNS(png_ptr, info_ptr, readbuf, png_ptr->num_trans, + &(png_ptr->trans_color)); + return handled_ok; +} +#else +# define png_handle_tRNS NULL +#endif + +#ifdef PNG_READ_bKGD_SUPPORTED +static png_handle_result_code /* PRIVATE */ +png_handle_bKGD(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + unsigned int truelen; + png_byte buf[6]; + png_color_16 background; + + png_debug(1, "in png_handle_bKGD"); + + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + if ((png_ptr->mode & PNG_HAVE_PLTE) == 0) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of place"); + return handled_error; + } + + truelen = 1; + } + + else if ((png_ptr->color_type & PNG_COLOR_MASK_COLOR) != 0) + truelen = 6; + + else + truelen = 2; + + if (length != truelen) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return handled_error; + } + + png_crc_read(png_ptr, buf, truelen); + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + /* We convert the index value into RGB components so that we can allow + * arbitrary RGB values for background when we have transparency, and + * so it is easy to determine the RGB values of the background color + * from the info_ptr struct. + */ + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + background.index = buf[0]; + + if (info_ptr != NULL && info_ptr->num_palette != 0) + { + if (buf[0] >= info_ptr->num_palette) + { + png_chunk_benign_error(png_ptr, "invalid index"); + return handled_error; + } + + background.red = (png_uint_16)png_ptr->palette[buf[0]].red; + background.green = (png_uint_16)png_ptr->palette[buf[0]].green; + background.blue = (png_uint_16)png_ptr->palette[buf[0]].blue; + } + + else + background.red = background.green = background.blue = 0; + + background.gray = 0; + } + + else if ((png_ptr->color_type & PNG_COLOR_MASK_COLOR) == 0) /* GRAY */ + { + if (png_ptr->bit_depth <= 8) + { + if (buf[0] != 0 || buf[1] >= (unsigned int)(1 << png_ptr->bit_depth)) + { + png_chunk_benign_error(png_ptr, "invalid gray level"); + return handled_error; + } + } + + background.index = 0; + background.red = + background.green = + background.blue = + background.gray = png_get_uint_16(buf); + } + + else + { + if (png_ptr->bit_depth <= 8) + { + if (buf[0] != 0 || buf[2] != 0 || buf[4] != 0) + { + png_chunk_benign_error(png_ptr, "invalid color"); + return handled_error; + } + } + + background.index = 0; + background.red = png_get_uint_16(buf); + background.green = png_get_uint_16(buf + 2); + background.blue = png_get_uint_16(buf + 4); + background.gray = 0; + } + + png_set_bKGD(png_ptr, info_ptr, &background); + return handled_ok; +} +#else +# define png_handle_bKGD NULL +#endif + +#ifdef PNG_READ_cICP_SUPPORTED +static png_handle_result_code /* PRIVATE */ +png_handle_cICP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_byte buf[4]; + + png_debug(1, "in png_handle_cICP"); + + png_crc_read(png_ptr, buf, 4); + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + png_set_cICP(png_ptr, info_ptr, buf[0], buf[1], buf[2], buf[3]); + + /* We only use 'chromaticities' for RGB to gray */ +# ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + if (!png_has_chunk(png_ptr, mDCV)) + { + /* TODO: png_ptr->chromaticities = chromaticities; */ + } +# endif /* READ_RGB_TO_GRAY */ + +#ifdef PNG_READ_GAMMA_SUPPORTED + /* PNGv3: chunk precedence for gamma is cICP, [iCCP], sRGB, gAMA. cICP is + * at the head so simply set the gamma if it can be determined. If not + * chunk_gamma remains unchanged; sRGB and gAMA handling check it for + * being zero. + */ + /* TODO: set png_struct::chunk_gamma when possible */ +#endif /*READ_GAMMA*/ + + return handled_ok; + PNG_UNUSED(length) +} +#else +# define png_handle_cICP NULL +#endif + +#ifdef PNG_READ_cLLI_SUPPORTED +static png_handle_result_code /* PRIVATE */ +png_handle_cLLI(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_byte buf[8]; + + png_debug(1, "in png_handle_cLLI"); + + png_crc_read(png_ptr, buf, 8); + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + /* The error checking happens here, this puts it in just one place: */ + png_set_cLLI_fixed(png_ptr, info_ptr, png_get_uint_32(buf), + png_get_uint_32(buf+4)); + return handled_ok; + PNG_UNUSED(length) +} +#else +# define png_handle_cLLI NULL +#endif + +#ifdef PNG_READ_mDCV_SUPPORTED +static png_handle_result_code /* PRIVATE */ +png_handle_mDCV(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_xy chromaticities; + png_byte buf[24]; + + png_debug(1, "in png_handle_mDCV"); + + png_crc_read(png_ptr, buf, 24); + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + /* The error checking happens here, this puts it in just one place. The + * odd /50000 scaling factor makes it more difficult but the (x.y) values are + * only two bytes so a <<1 is safe. + * + * WARNING: the PNG specification defines the cHRM chunk to **start** with + * the white point (x,y). The W3C PNG v3 specification puts the white point + * **after* R,G,B. The x,y values in mDCV are also scaled by 50,000 and + * stored in just two bytes, whereas those in cHRM are scaled by 100,000 and + * stored in four bytes. This is very, very confusing. These APIs remove + * the confusion by copying the existing, well established, API. + */ + chromaticities.redx = png_get_uint_16(buf+ 0U) << 1; /* red x */ + chromaticities.redy = png_get_uint_16(buf+ 2U) << 1; /* red y */ + chromaticities.greenx = png_get_uint_16(buf+ 4U) << 1; /* green x */ + chromaticities.greeny = png_get_uint_16(buf+ 6U) << 1; /* green y */ + chromaticities.bluex = png_get_uint_16(buf+ 8U) << 1; /* blue x */ + chromaticities.bluey = png_get_uint_16(buf+10U) << 1; /* blue y */ + chromaticities.whitex = png_get_uint_16(buf+12U) << 1; /* white x */ + chromaticities.whitey = png_get_uint_16(buf+14U) << 1; /* white y */ + + png_set_mDCV_fixed(png_ptr, info_ptr, + chromaticities.whitex, chromaticities.whitey, + chromaticities.redx, chromaticities.redy, + chromaticities.greenx, chromaticities.greeny, + chromaticities.bluex, chromaticities.bluey, + png_get_uint_32(buf+16U), /* peak luminance */ + png_get_uint_32(buf+20U));/* minimum perceivable luminance */ + + /* We only use 'chromaticities' for RGB to gray */ +# ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED + png_ptr->chromaticities = chromaticities; +# endif /* READ_RGB_TO_GRAY */ + + return handled_ok; + PNG_UNUSED(length) +} +#else +# define png_handle_mDCV NULL +#endif + +#ifdef PNG_READ_eXIf_SUPPORTED +static png_handle_result_code /* PRIVATE */ +png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_bytep buffer = NULL; + + png_debug(1, "in png_handle_eXIf"); + + buffer = png_read_buffer(png_ptr, length); + + if (buffer == NULL) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of memory"); + return handled_error; + } + + png_crc_read(png_ptr, buffer, length); + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + /* PNGv3: the code used to check the byte order mark at the start for MM or + * II, however PNGv3 states that the the first 4 bytes should be checked. + * The caller ensures that there are four bytes available. + */ + { + png_uint_32 header = png_get_uint_32(buffer); + + /* These numbers are copied from the PNGv3 spec: */ + if (header != 0x49492A00 && header != 0x4D4D002A) + { + png_chunk_benign_error(png_ptr, "invalid"); + return handled_error; + } + } + + png_set_eXIf_1(png_ptr, info_ptr, length, buffer); + return handled_ok; +} +#else +# define png_handle_eXIf NULL +#endif + +#ifdef PNG_READ_hIST_SUPPORTED +static png_handle_result_code /* PRIVATE */ +png_handle_hIST(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + unsigned int num, i; + png_uint_16 readbuf[PNG_MAX_PALETTE_LENGTH]; + + png_debug(1, "in png_handle_hIST"); + + /* This cast is safe because the chunk definition limits the length to a + * maximum of 1024 bytes. + * + * TODO: maybe use png_uint_32 anyway, not unsigned int, to reduce the + * casts. + */ + num = (unsigned int)length / 2 ; + + if (length != num * 2 || + num != (unsigned int)png_ptr->num_palette || + num > (unsigned int)PNG_MAX_PALETTE_LENGTH) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "invalid"); + return handled_error; + } + + for (i = 0; i < num; i++) + { + png_byte buf[2]; + + png_crc_read(png_ptr, buf, 2); + readbuf[i] = png_get_uint_16(buf); + } + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + png_set_hIST(png_ptr, info_ptr, readbuf); + return handled_ok; +} +#else +# define png_handle_hIST NULL +#endif + +#ifdef PNG_READ_pHYs_SUPPORTED +static png_handle_result_code /* PRIVATE */ +png_handle_pHYs(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_byte buf[9]; + png_uint_32 res_x, res_y; + int unit_type; + + png_debug(1, "in png_handle_pHYs"); + + png_crc_read(png_ptr, buf, 9); + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + res_x = png_get_uint_32(buf); + res_y = png_get_uint_32(buf + 4); + unit_type = buf[8]; + png_set_pHYs(png_ptr, info_ptr, res_x, res_y, unit_type); + return handled_ok; + PNG_UNUSED(length) +} +#else +# define png_handle_pHYs NULL +#endif + +#ifdef PNG_READ_oFFs_SUPPORTED +static png_handle_result_code /* PRIVATE */ +png_handle_oFFs(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_byte buf[9]; + png_int_32 offset_x, offset_y; + int unit_type; + + png_debug(1, "in png_handle_oFFs"); + + png_crc_read(png_ptr, buf, 9); + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + offset_x = png_get_int_32(buf); + offset_y = png_get_int_32(buf + 4); + unit_type = buf[8]; + png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y, unit_type); + return handled_ok; + PNG_UNUSED(length) +} +#else +# define png_handle_oFFs NULL +#endif + +#ifdef PNG_READ_pCAL_SUPPORTED +/* Read the pCAL chunk (described in the PNG Extensions document) */ +static png_handle_result_code /* PRIVATE */ +png_handle_pCAL(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_int_32 X0, X1; + png_byte type, nparams; + png_bytep buffer, buf, units, endptr; + png_charpp params; + int i; + + png_debug(1, "in png_handle_pCAL"); + png_debug1(2, "Allocating and reading pCAL chunk data (%u bytes)", + length + 1); + + buffer = png_read_buffer(png_ptr, length+1); + + if (buffer == NULL) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of memory"); + return handled_error; + } + + png_crc_read(png_ptr, buffer, length); + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + buffer[length] = 0; /* Null terminate the last string */ + + png_debug(3, "Finding end of pCAL purpose string"); + for (buf = buffer; *buf; buf++) + /* Empty loop */ ; + + endptr = buffer + length; + + /* We need to have at least 12 bytes after the purpose string + * in order to get the parameter information. + */ + if (endptr - buf <= 12) + { + png_chunk_benign_error(png_ptr, "invalid"); + return handled_error; + } + + png_debug(3, "Reading pCAL X0, X1, type, nparams, and units"); + X0 = png_get_int_32((png_bytep)buf+1); + X1 = png_get_int_32((png_bytep)buf+5); + type = buf[9]; + nparams = buf[10]; + units = buf + 11; + + png_debug(3, "Checking pCAL equation type and number of parameters"); + /* Check that we have the right number of parameters for known + * equation types. + */ + if ((type == PNG_EQUATION_LINEAR && nparams != 2) || + (type == PNG_EQUATION_BASE_E && nparams != 3) || + (type == PNG_EQUATION_ARBITRARY && nparams != 3) || + (type == PNG_EQUATION_HYPERBOLIC && nparams != 4)) + { + png_chunk_benign_error(png_ptr, "invalid parameter count"); + return handled_error; + } + + else if (type >= PNG_EQUATION_LAST) + { + png_chunk_benign_error(png_ptr, "unrecognized equation type"); + } + + for (buf = units; *buf; buf++) + /* Empty loop to move past the units string. */ ; + + png_debug(3, "Allocating pCAL parameters array"); + + params = png_voidcast(png_charpp, png_malloc_warn(png_ptr, + nparams * (sizeof (png_charp)))); + + if (params == NULL) + { + png_chunk_benign_error(png_ptr, "out of memory"); + return handled_error; + } + + /* Get pointers to the start of each parameter string. */ + for (i = 0; i < nparams; i++) + { + buf++; /* Skip the null string terminator from previous parameter. */ + + png_debug1(3, "Reading pCAL parameter %d", i); + + for (params[i] = (png_charp)buf; buf <= endptr && *buf != 0; buf++) + /* Empty loop to move past each parameter string */ ; + + /* Make sure we haven't run out of data yet */ + if (buf > endptr) + { + png_free(png_ptr, params); + png_chunk_benign_error(png_ptr, "invalid data"); + return handled_error; + } + } + + png_set_pCAL(png_ptr, info_ptr, (png_charp)buffer, X0, X1, type, nparams, + (png_charp)units, params); + + /* TODO: BUG: png_set_pCAL calls png_chunk_report which, in this case, calls + * png_benign_error and that can error out. + * + * png_read_buffer needs to be allocated with space for both nparams and the + * parameter strings. Not hard to do. + */ + png_free(png_ptr, params); + return handled_ok; +} +#else +# define png_handle_pCAL NULL +#endif + +#ifdef PNG_READ_sCAL_SUPPORTED +/* Read the sCAL chunk */ +static png_handle_result_code /* PRIVATE */ +png_handle_sCAL(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_bytep buffer; + size_t i; + int state; + + png_debug(1, "in png_handle_sCAL"); + png_debug1(2, "Allocating and reading sCAL chunk data (%u bytes)", + length + 1); + + buffer = png_read_buffer(png_ptr, length+1); + + if (buffer == NULL) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of memory"); + return handled_error; + } + + png_crc_read(png_ptr, buffer, length); + buffer[length] = 0; /* Null terminate the last string */ + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + /* Validate the unit. */ + if (buffer[0] != 1 && buffer[0] != 2) + { + png_chunk_benign_error(png_ptr, "invalid unit"); + return handled_error; + } + + /* Validate the ASCII numbers, need two ASCII numbers separated by + * a '\0' and they need to fit exactly in the chunk data. + */ + i = 1; + state = 0; + + if (png_check_fp_number((png_const_charp)buffer, length, &state, &i) == 0 || + i >= length || buffer[i++] != 0) + png_chunk_benign_error(png_ptr, "bad width format"); + + else if (PNG_FP_IS_POSITIVE(state) == 0) + png_chunk_benign_error(png_ptr, "non-positive width"); + + else + { + size_t heighti = i; + + state = 0; + if (png_check_fp_number((png_const_charp)buffer, length, + &state, &i) == 0 || i != length) + png_chunk_benign_error(png_ptr, "bad height format"); + + else if (PNG_FP_IS_POSITIVE(state) == 0) + png_chunk_benign_error(png_ptr, "non-positive height"); + + else + { + /* This is the (only) success case. */ + png_set_sCAL_s(png_ptr, info_ptr, buffer[0], + (png_charp)buffer+1, (png_charp)buffer+heighti); + return handled_ok; + } + } + + return handled_error; +} +#else +# define png_handle_sCAL NULL +#endif + +#ifdef PNG_READ_tIME_SUPPORTED +static png_handle_result_code /* PRIVATE */ +png_handle_tIME(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_byte buf[7]; + png_time mod_time; + + png_debug(1, "in png_handle_tIME"); + + /* TODO: what is this doing here? It should be happened in pngread.c and + * pngpread.c, although it could be moved to png_handle_chunk below and + * thereby avoid some code duplication. + */ + if ((png_ptr->mode & PNG_HAVE_IDAT) != 0) + png_ptr->mode |= PNG_AFTER_IDAT; + + png_crc_read(png_ptr, buf, 7); + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + mod_time.second = buf[6]; + mod_time.minute = buf[5]; + mod_time.hour = buf[4]; + mod_time.day = buf[3]; + mod_time.month = buf[2]; + mod_time.year = png_get_uint_16(buf); + + png_set_tIME(png_ptr, info_ptr, &mod_time); + return handled_ok; + PNG_UNUSED(length) +} +#else +# define png_handle_tIME NULL +#endif + +#ifdef PNG_READ_tEXt_SUPPORTED +/* Note: this does not properly handle chunks that are > 64K under DOS */ +static png_handle_result_code /* PRIVATE */ +png_handle_tEXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_text text_info; + png_bytep buffer; + png_charp key; + png_charp text; + png_uint_32 skip = 0; + + png_debug(1, "in png_handle_tEXt"); + +#ifdef PNG_USER_LIMITS_SUPPORTED + if (png_ptr->user_chunk_cache_max != 0) + { + if (png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + return handled_error; + } + + if (--png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "no space in chunk cache"); + return handled_error; + } + } +#endif + + buffer = png_read_buffer(png_ptr, length+1); + + if (buffer == NULL) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of memory"); + return handled_error; + } + + png_crc_read(png_ptr, buffer, length); + + if (png_crc_finish(png_ptr, skip) != 0) + return handled_error; + + key = (png_charp)buffer; + key[length] = 0; + + for (text = key; *text; text++) + /* Empty loop to find end of key */ ; + + if (text != key + length) + text++; + + text_info.compression = PNG_TEXT_COMPRESSION_NONE; + text_info.key = key; + text_info.lang = NULL; + text_info.lang_key = NULL; + text_info.itxt_length = 0; + text_info.text = text; + text_info.text_length = strlen(text); + + if (png_set_text_2(png_ptr, info_ptr, &text_info, 1) == 0) + return handled_ok; + + png_chunk_benign_error(png_ptr, "out of memory"); + return handled_error; +} +#else +# define png_handle_tEXt NULL +#endif + +#ifdef PNG_READ_zTXt_SUPPORTED +/* Note: this does not correctly handle chunks that are > 64K under DOS */ +static png_handle_result_code /* PRIVATE */ +png_handle_zTXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_const_charp errmsg = NULL; + png_bytep buffer; + png_uint_32 keyword_length; + + png_debug(1, "in png_handle_zTXt"); + +#ifdef PNG_USER_LIMITS_SUPPORTED + if (png_ptr->user_chunk_cache_max != 0) + { + if (png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + return handled_error; + } + + if (--png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "no space in chunk cache"); + return handled_error; + } + } +#endif + + /* Note, "length" is sufficient here; we won't be adding + * a null terminator later. The limit check in png_handle_chunk should be + * sufficient. + */ + buffer = png_read_buffer(png_ptr, length); + + if (buffer == NULL) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of memory"); + return handled_error; + } + + png_crc_read(png_ptr, buffer, length); + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + /* TODO: also check that the keyword contents match the spec! */ + for (keyword_length = 0; + keyword_length < length && buffer[keyword_length] != 0; + ++keyword_length) + /* Empty loop to find end of name */ ; + + if (keyword_length > 79 || keyword_length < 1) + errmsg = "bad keyword"; + + /* zTXt must have some LZ data after the keyword, although it may expand to + * zero bytes; we need a '\0' at the end of the keyword, the compression type + * then the LZ data: + */ + else if (keyword_length + 3 > length) + errmsg = "truncated"; + + else if (buffer[keyword_length+1] != PNG_COMPRESSION_TYPE_BASE) + errmsg = "unknown compression type"; + + else + { + png_alloc_size_t uncompressed_length = PNG_SIZE_MAX; + + /* TODO: at present png_decompress_chunk imposes a single application + * level memory limit, this should be split to different values for iCCP + * and text chunks. + */ + if (png_decompress_chunk(png_ptr, length, keyword_length+2, + &uncompressed_length, 1/*terminate*/) == Z_STREAM_END) + { + png_text text; + + if (png_ptr->read_buffer == NULL) + errmsg="Read failure in png_handle_zTXt"; + else + { + /* It worked; png_ptr->read_buffer now looks like a tEXt chunk + * except for the extra compression type byte and the fact that + * it isn't necessarily '\0' terminated. + */ + buffer = png_ptr->read_buffer; + buffer[uncompressed_length+(keyword_length+2)] = 0; + + text.compression = PNG_TEXT_COMPRESSION_zTXt; + text.key = (png_charp)buffer; + text.text = (png_charp)(buffer + keyword_length+2); + text.text_length = uncompressed_length; + text.itxt_length = 0; + text.lang = NULL; + text.lang_key = NULL; + + if (png_set_text_2(png_ptr, info_ptr, &text, 1) == 0) + return handled_ok; + + errmsg = "out of memory"; + } + } + + else + errmsg = png_ptr->zstream.msg; + } + + png_chunk_benign_error(png_ptr, errmsg); + return handled_error; +} +#else +# define png_handle_zTXt NULL +#endif + +#ifdef PNG_READ_iTXt_SUPPORTED +/* Note: this does not correctly handle chunks that are > 64K under DOS */ +static png_handle_result_code /* PRIVATE */ +png_handle_iTXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + png_const_charp errmsg = NULL; + png_bytep buffer; + png_uint_32 prefix_length; + + png_debug(1, "in png_handle_iTXt"); + +#ifdef PNG_USER_LIMITS_SUPPORTED + if (png_ptr->user_chunk_cache_max != 0) + { + if (png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + return handled_error; + } + + if (--png_ptr->user_chunk_cache_max == 1) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "no space in chunk cache"); + return handled_error; + } + } +#endif + + buffer = png_read_buffer(png_ptr, length+1); + + if (buffer == NULL) + { + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "out of memory"); + return handled_error; + } + + png_crc_read(png_ptr, buffer, length); + + if (png_crc_finish(png_ptr, 0) != 0) + return handled_error; + + /* First the keyword. */ + for (prefix_length=0; + prefix_length < length && buffer[prefix_length] != 0; + ++prefix_length) + /* Empty loop */ ; + + /* Perform a basic check on the keyword length here. */ + if (prefix_length > 79 || prefix_length < 1) + errmsg = "bad keyword"; + + /* Expect keyword, compression flag, compression type, language, translated + * keyword (both may be empty but are 0 terminated) then the text, which may + * be empty. + */ + else if (prefix_length + 5 > length) + errmsg = "truncated"; + + else if (buffer[prefix_length+1] == 0 || + (buffer[prefix_length+1] == 1 && + buffer[prefix_length+2] == PNG_COMPRESSION_TYPE_BASE)) + { + int compressed = buffer[prefix_length+1] != 0; + png_uint_32 language_offset, translated_keyword_offset; + png_alloc_size_t uncompressed_length = 0; + + /* Now the language tag */ + prefix_length += 3; + language_offset = prefix_length; + + for (; prefix_length < length && buffer[prefix_length] != 0; + ++prefix_length) + /* Empty loop */ ; + + /* WARNING: the length may be invalid here, this is checked below. */ + translated_keyword_offset = ++prefix_length; + + for (; prefix_length < length && buffer[prefix_length] != 0; + ++prefix_length) + /* Empty loop */ ; + + /* prefix_length should now be at the trailing '\0' of the translated + * keyword, but it may already be over the end. None of this arithmetic + * can overflow because chunks are at most 2^31 bytes long, but on 16-bit + * systems the available allocation may overflow. + */ + ++prefix_length; + + if (compressed == 0 && prefix_length <= length) + uncompressed_length = length - prefix_length; + + else if (compressed != 0 && prefix_length < length) + { + uncompressed_length = PNG_SIZE_MAX; + + /* TODO: at present png_decompress_chunk imposes a single application + * level memory limit, this should be split to different values for + * iCCP and text chunks. + */ + if (png_decompress_chunk(png_ptr, length, prefix_length, + &uncompressed_length, 1/*terminate*/) == Z_STREAM_END) + buffer = png_ptr->read_buffer; + + else + errmsg = png_ptr->zstream.msg; + } + + else + errmsg = "truncated"; + + if (errmsg == NULL) + { + png_text text; + + buffer[uncompressed_length+prefix_length] = 0; + + if (compressed == 0) + text.compression = PNG_ITXT_COMPRESSION_NONE; + + else + text.compression = PNG_ITXT_COMPRESSION_zTXt; + + text.key = (png_charp)buffer; + text.lang = (png_charp)buffer + language_offset; + text.lang_key = (png_charp)buffer + translated_keyword_offset; + text.text = (png_charp)buffer + prefix_length; + text.text_length = 0; + text.itxt_length = uncompressed_length; + + if (png_set_text_2(png_ptr, info_ptr, &text, 1) == 0) + return handled_ok; + + errmsg = "out of memory"; + } + } + + else + errmsg = "bad compression info"; + + if (errmsg != NULL) + png_chunk_benign_error(png_ptr, errmsg); + return handled_error; +} +#else +# define png_handle_iTXt NULL +#endif + +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +/* Utility function for png_handle_unknown; set up png_ptr::unknown_chunk */ +static int +png_cache_unknown_chunk(png_structrp png_ptr, png_uint_32 length) +{ + const png_alloc_size_t limit = png_chunk_max(png_ptr); + + if (png_ptr->unknown_chunk.data != NULL) + { + png_free(png_ptr, png_ptr->unknown_chunk.data); + png_ptr->unknown_chunk.data = NULL; + } + + if (length <= limit) + { + PNG_CSTRING_FROM_CHUNK(png_ptr->unknown_chunk.name, png_ptr->chunk_name); + /* The following is safe because of the PNG_SIZE_MAX init above */ + png_ptr->unknown_chunk.size = (size_t)length/*SAFE*/; + /* 'mode' is a flag array, only the bottom four bits matter here */ + png_ptr->unknown_chunk.location = (png_byte)png_ptr->mode/*SAFE*/; + + if (length == 0) + png_ptr->unknown_chunk.data = NULL; + + else + { + /* Do a 'warn' here - it is handled below. */ + png_ptr->unknown_chunk.data = png_voidcast(png_bytep, + png_malloc_warn(png_ptr, length)); + } + } + + if (png_ptr->unknown_chunk.data == NULL && length > 0) + { + /* This is benign because we clean up correctly */ + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, "unknown chunk exceeds memory limits"); + return 0; + } + + else + { + if (length > 0) + png_crc_read(png_ptr, png_ptr->unknown_chunk.data, length); + png_crc_finish(png_ptr, 0); + return 1; + } +} +#endif /* READ_UNKNOWN_CHUNKS */ + +/* Handle an unknown, or known but disabled, chunk */ +png_handle_result_code /*PRIVATE*/ +png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr, + png_uint_32 length, int keep) +{ + png_handle_result_code handled = handled_discarded; /* the default */ + + png_debug(1, "in png_handle_unknown"); + +#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED + /* NOTE: this code is based on the code in libpng-1.4.12 except for fixing + * the bug which meant that setting a non-default behavior for a specific + * chunk would be ignored (the default was always used unless a user + * callback was installed). + * + * 'keep' is the value from the png_chunk_unknown_handling, the setting for + * this specific chunk_name, if PNG_HANDLE_AS_UNKNOWN_SUPPORTED, if not it + * will always be PNG_HANDLE_CHUNK_AS_DEFAULT and it needs to be set here. + * This is just an optimization to avoid multiple calls to the lookup + * function. + */ +# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +# ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED + keep = png_chunk_unknown_handling(png_ptr, png_ptr->chunk_name); +# endif +# endif + + /* One of the following methods will read the chunk or skip it (at least one + * of these is always defined because this is the only way to switch on + * PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) + */ +# ifdef PNG_READ_USER_CHUNKS_SUPPORTED + /* The user callback takes precedence over the chunk keep value, but the + * keep value is still required to validate a save of a critical chunk. + */ + if (png_ptr->read_user_chunk_fn != NULL) + { + if (png_cache_unknown_chunk(png_ptr, length) != 0) + { + /* Callback to user unknown chunk handler */ + int ret = (*(png_ptr->read_user_chunk_fn))(png_ptr, + &png_ptr->unknown_chunk); + + /* ret is: + * negative: An error occurred; png_chunk_error will be called. + * zero: The chunk was not handled, the chunk will be discarded + * unless png_set_keep_unknown_chunks has been used to set + * a 'keep' behavior for this particular chunk, in which + * case that will be used. A critical chunk will cause an + * error at this point unless it is to be saved. + * positive: The chunk was handled, libpng will ignore/discard it. + */ + if (ret < 0) /* handled_error */ + png_chunk_error(png_ptr, "error in user chunk"); + + else if (ret == 0) + { + /* If the keep value is 'default' or 'never' override it, but + * still error out on critical chunks unless the keep value is + * 'always' While this is weird it is the behavior in 1.4.12. + * A possible improvement would be to obey the value set for the + * chunk, but this would be an API change that would probably + * damage some applications. + * + * The png_app_warning below catches the case that matters, where + * the application has not set specific save or ignore for this + * chunk or global save or ignore. + */ + if (keep < PNG_HANDLE_CHUNK_IF_SAFE) + { +# ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED + if (png_ptr->unknown_default < PNG_HANDLE_CHUNK_IF_SAFE) + { + png_chunk_warning(png_ptr, "Saving unknown chunk:"); + png_app_warning(png_ptr, + "forcing save of an unhandled chunk;" + " please call png_set_keep_unknown_chunks"); + /* with keep = PNG_HANDLE_CHUNK_IF_SAFE */ + } +# endif + keep = PNG_HANDLE_CHUNK_IF_SAFE; + } + } + + else /* chunk was handled */ + { + handled = handled_ok; + /* Critical chunks can be safely discarded at this point. */ + keep = PNG_HANDLE_CHUNK_NEVER; + } + } + + else + keep = PNG_HANDLE_CHUNK_NEVER; /* insufficient memory */ + } + + else + /* Use the SAVE_UNKNOWN_CHUNKS code or skip the chunk */ +# endif /* READ_USER_CHUNKS */ + +# ifdef PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED + { + /* keep is currently just the per-chunk setting, if there was no + * setting change it to the global default now (not that this may + * still be AS_DEFAULT) then obtain the cache of the chunk if required, + * if not simply skip the chunk. + */ + if (keep == PNG_HANDLE_CHUNK_AS_DEFAULT) + keep = png_ptr->unknown_default; + + if (keep == PNG_HANDLE_CHUNK_ALWAYS || + (keep == PNG_HANDLE_CHUNK_IF_SAFE && + PNG_CHUNK_ANCILLARY(png_ptr->chunk_name))) + { + if (png_cache_unknown_chunk(png_ptr, length) == 0) + keep = PNG_HANDLE_CHUNK_NEVER; + } + + else + png_crc_finish(png_ptr, length); + } +# else +# ifndef PNG_READ_USER_CHUNKS_SUPPORTED +# error no method to support READ_UNKNOWN_CHUNKS +# endif + + { + /* If here there is no read callback pointer set and no support is + * compiled in to just save the unknown chunks, so simply skip this + * chunk. If 'keep' is something other than AS_DEFAULT or NEVER then + * the app has erroneously asked for unknown chunk saving when there + * is no support. + */ + if (keep > PNG_HANDLE_CHUNK_NEVER) + png_app_error(png_ptr, "no unknown chunk support available"); + + png_crc_finish(png_ptr, length); + } +# endif + +# ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED + /* Now store the chunk in the chunk list if appropriate, and if the limits + * permit it. + */ + if (keep == PNG_HANDLE_CHUNK_ALWAYS || + (keep == PNG_HANDLE_CHUNK_IF_SAFE && + PNG_CHUNK_ANCILLARY(png_ptr->chunk_name))) + { +# ifdef PNG_USER_LIMITS_SUPPORTED + switch (png_ptr->user_chunk_cache_max) + { + case 2: + png_ptr->user_chunk_cache_max = 1; + png_chunk_benign_error(png_ptr, "no space in chunk cache"); + /* FALLTHROUGH */ + case 1: + /* NOTE: prior to 1.6.0 this case resulted in an unknown critical + * chunk being skipped, now there will be a hard error below. + */ + break; + + default: /* not at limit */ + --(png_ptr->user_chunk_cache_max); + /* FALLTHROUGH */ + case 0: /* no limit */ +# endif /* USER_LIMITS */ + /* Here when the limit isn't reached or when limits are compiled + * out; store the chunk. + */ + png_set_unknown_chunks(png_ptr, info_ptr, + &png_ptr->unknown_chunk, 1); + handled = handled_saved; +# ifdef PNG_USER_LIMITS_SUPPORTED + break; + } +# endif + } +# else /* no store support: the chunk must be handled by the user callback */ + PNG_UNUSED(info_ptr) +# endif + + /* Regardless of the error handling below the cached data (if any) can be + * freed now. Notice that the data is not freed if there is a png_error, but + * it will be freed by destroy_read_struct. + */ + if (png_ptr->unknown_chunk.data != NULL) + png_free(png_ptr, png_ptr->unknown_chunk.data); + png_ptr->unknown_chunk.data = NULL; + +#else /* !PNG_READ_UNKNOWN_CHUNKS_SUPPORTED */ + /* There is no support to read an unknown chunk, so just skip it. */ + png_crc_finish(png_ptr, length); + PNG_UNUSED(info_ptr) + PNG_UNUSED(keep) +#endif /* !READ_UNKNOWN_CHUNKS */ + + /* Check for unhandled critical chunks */ + if (handled < handled_saved && PNG_CHUNK_CRITICAL(png_ptr->chunk_name)) + png_chunk_error(png_ptr, "unhandled critical chunk"); + + return handled; +} + +/* APNG handling: the minimal implementation of APNG handling in libpng 1.6 + * requires that those significant applications which already handle APNG not + * get hosed. To do this ensure the code here will have to ensure than APNG + * data by default (at least in 1.6) gets stored in the unknown chunk list. + * Maybe this can be relaxed in a few years but at present it's just the only + * safe way. + * + * ATM just cause unknown handling for all three chunks: + */ +#define png_handle_acTL NULL +#define png_handle_fcTL NULL +#define png_handle_fdAT NULL + +/* + * 1.6.47: This is the new table driven interface to all the chunk handling. + * + * The table describes the PNG standard rules for **reading** known chunks - + * every chunk which has an entry in PNG_KNOWN_CHUNKS. The table contains an + * entry for each PNG_INDEX_cHNK describing the rules. + * + * In this initial version the only information in the entry is the + * png_handle_cHNK function for the chunk in question. When chunk support is + * compiled out the entry will be NULL. + */ +static const struct +{ + png_handle_result_code (*handler)( + png_structrp, png_inforp, png_uint_32 length); + /* A chunk-specific 'handler', NULL if the chunk is not supported in this + * build. + */ + + /* Crushing these values helps on modern 32-bit architectures because the + * pointer and the following bit fields both end up requiring 32 bits. + * Typically this will halve the table size. On 64-bit architectures the + * table entries will typically be 8 bytes. + */ + png_uint_32 max_length :12; /* Length min, max in bytes */ + png_uint_32 min_length :8; + /* Length errors on critical chunks have special handling to preserve the + * existing behaviour in libpng 1.6. Anciallary chunks are checked below + * and produce a 'benign' error. + */ + png_uint_32 pos_before :4; /* PNG_HAVE_ values chunk must precede */ + png_uint_32 pos_after :4; /* PNG_HAVE_ values chunk must follow */ + /* NOTE: PLTE, tRNS and bKGD require special handling which depends on + * the colour type of the base image. + */ + png_uint_32 multiple :1; /* Multiple occurences permitted */ + /* This is enabled for PLTE because PLTE may, in practice, be optional */ +} +read_chunks[PNG_INDEX_unknown] = +{ + /* Definitions as above but done indirectly by #define so that + * PNG_KNOWN_CHUNKS can be used safely to build the table in order. + * + * Each CDcHNK definition lists the values for the parameters **after** + * the first, 'handler', function. 'handler' is NULL when the chunk has no + * compiled in support. + */ +# define NoCheck 0x801U /* Do not check the maximum length */ +# define Limit 0x802U /* Limit to png_chunk_max bytes */ +# define LKMin 3U+LZ77Min /* Minimum length of keyword+LZ77 */ + +#define hIHDR PNG_HAVE_IHDR +#define hPLTE PNG_HAVE_PLTE +#define hIDAT PNG_HAVE_IDAT + /* For the two chunks, tRNS and bKGD which can occur in PNGs without a PLTE + * but must occur after the PLTE use this and put the check in the handler + * routine for colour mapped images were PLTE is required. Also put a check + * in PLTE for other image types to drop the PLTE if tRNS or bKGD have been + * seen. + */ +#define hCOL (PNG_HAVE_PLTE|PNG_HAVE_IDAT) + /* Used for the decoding chunks which must be before PLTE. */ +#define aIDAT PNG_AFTER_IDAT + + /* Chunks from W3C PNG v3: */ + /* cHNK max_len, min, before, after, multiple */ +# define CDIHDR 13U, 13U, hIHDR, 0, 0 +# define CDPLTE NoCheck, 0U, 0, hIHDR, 1 + /* PLTE errors are only critical for colour-map images, consequently the + * hander does all the checks. + */ +# define CDIDAT NoCheck, 0U, aIDAT, hIHDR, 1 +# define CDIEND NoCheck, 0U, 0, aIDAT, 0 + /* Historically data was allowed in IEND */ +# define CDtRNS 256U, 0U, hIDAT, hIHDR, 0 +# define CDcHRM 32U, 32U, hCOL, hIHDR, 0 +# define CDgAMA 4U, 4U, hCOL, hIHDR, 0 +# define CDiCCP NoCheck, LKMin, hCOL, hIHDR, 0 +# define CDsBIT 4U, 1U, hCOL, hIHDR, 0 +# define CDsRGB 1U, 1U, hCOL, hIHDR, 0 +# define CDcICP 4U, 4U, hCOL, hIHDR, 0 +# define CDmDCV 24U, 24U, hCOL, hIHDR, 0 +# define CDeXIf Limit, 4U, 0, hIHDR, 0 +# define CDcLLI 8U, 8U, hCOL, hIHDR, 0 +# define CDtEXt NoCheck, 2U, 0, hIHDR, 1 + /* Allocates 'length+1'; checked in the handler */ +# define CDzTXt Limit, LKMin, 0, hIHDR, 1 +# define CDiTXt NoCheck, 6U, 0, hIHDR, 1 + /* Allocates 'length+1'; checked in the handler */ +# define CDbKGD 6U, 1U, hIDAT, hIHDR, 0 +# define CDhIST 1024U, 0U, hPLTE, hIHDR, 0 +# define CDpHYs 9U, 9U, hIDAT, hIHDR, 0 +# define CDsPLT NoCheck, 3U, hIDAT, hIHDR, 1 + /* Allocates 'length+1'; checked in the handler */ +# define CDtIME 7U, 7U, 0, hIHDR, 0 +# define CDacTL 8U, 8U, hIDAT, hIHDR, 0 +# define CDfcTL 25U, 26U, 0, hIHDR, 1 +# define CDfdAT Limit, 4U, hIDAT, hIHDR, 1 + /* Supported chunks from PNG extensions 1.5.0, NYI so limit */ +# define CDoFFs 9U, 9U, hIDAT, hIHDR, 0 +# define CDpCAL NoCheck, 14U, hIDAT, hIHDR, 0 + /* Allocates 'length+1'; checked in the handler */ +# define CDsCAL Limit, 4U, hIDAT, hIHDR, 0 + /* Allocates 'length+1'; checked in the handler */ + +# define PNG_CHUNK(cHNK, index) { png_handle_ ## cHNK, CD ## cHNK }, + PNG_KNOWN_CHUNKS +# undef PNG_CHUNK +}; + + +static png_index +png_chunk_index_from_name(png_uint_32 chunk_name) +{ + /* For chunk png_cHNK return PNG_INDEX_cHNK. Return PNG_INDEX_unknown if + * chunk_name is not known. Notice that in a particular build "known" does + * not necessarily mean "supported", although the inverse applies. + */ + switch (chunk_name) + { +# define PNG_CHUNK(cHNK, index)\ + case png_ ## cHNK: return PNG_INDEX_ ## cHNK; /* == index */ + + PNG_KNOWN_CHUNKS + +# undef PNG_CHUNK + + default: return PNG_INDEX_unknown; + } +} + +png_handle_result_code /*PRIVATE*/ +png_handle_chunk(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) +{ + /* CSE: these things don't change, these autos are just to save typing and + * make the code more clear. + */ + const png_uint_32 chunk_name = png_ptr->chunk_name; + const png_index chunk_index = png_chunk_index_from_name(chunk_name); + + png_handle_result_code handled = handled_error; + png_const_charp errmsg = NULL; + + /* Is this a known chunk? If not there are no checks performed here; + * png_handle_unknown does the correct checks. This means that the values + * for known but unsupported chunks in the above table are not used here + * however the chunks_seen fields in png_struct are still set. + */ + if (chunk_index == PNG_INDEX_unknown || + read_chunks[chunk_index].handler == NULL) + { + handled = png_handle_unknown( + png_ptr, info_ptr, length, PNG_HANDLE_CHUNK_AS_DEFAULT); + } + + /* First check the position. The first check is historical; the stream must + * start with IHDR and anything else causes libpng to give up immediately. + */ + else if (chunk_index != PNG_INDEX_IHDR && + (png_ptr->mode & PNG_HAVE_IHDR) == 0) + png_chunk_error(png_ptr, "missing IHDR"); /* NORETURN */ + + /* Before all the pos_before chunks, after all the pos_after chunks. */ + else if (((png_ptr->mode & read_chunks[chunk_index].pos_before) != 0) || + ((png_ptr->mode & read_chunks[chunk_index].pos_after) != + read_chunks[chunk_index].pos_after)) + { + errmsg = "out of place"; + } + + /* Now check for duplicates: duplicated critical chunks also produce a + * full error. + */ + else if (read_chunks[chunk_index].multiple == 0 && + png_file_has_chunk(png_ptr, chunk_index)) + { + errmsg = "duplicate"; + } + + else if (length < read_chunks[chunk_index].min_length) + errmsg = "too short"; + else + { + /* NOTE: apart from IHDR the critical chunks (PLTE, IDAT and IEND) are set + * up above not to do any length checks. + * + * The png_chunk_max check ensures that the variable length chunks are + * always checked at this point for being within the system allocation + * limits. + */ + unsigned max_length = read_chunks[chunk_index].max_length; + + switch (max_length) + { + case Limit: + /* png_read_chunk_header has already png_error'ed chunks with a + * length exceeding the 31-bit PNG limit, so just check the memory + * limit: + */ + if (length <= png_chunk_max(png_ptr)) + goto MeetsLimit; + + errmsg = "length exceeds libpng limit"; + break; + + default: + if (length <= max_length) + goto MeetsLimit; + + errmsg = "too long"; + break; + + case NoCheck: + MeetsLimit: + handled = read_chunks[chunk_index].handler( + png_ptr, info_ptr, length); + break; + } + } + + /* If there was an error or the chunk was simply skipped it is not counted as + * 'seen'. + */ + if (errmsg != NULL) + { + if (PNG_CHUNK_CRITICAL(chunk_name)) /* stop immediately */ + png_chunk_error(png_ptr, errmsg); + else /* ancillary chunk */ + { + /* The chunk data is skipped: */ + png_crc_finish(png_ptr, length); + png_chunk_benign_error(png_ptr, errmsg); + } + } + + else if (handled >= handled_saved) + { + if (chunk_index != PNG_INDEX_unknown) + png_file_add_chunk(png_ptr, chunk_index); + } + + return handled; +} + +/* Combines the row recently read in with the existing pixels in the row. This + * routine takes care of alpha and transparency if requested. This routine also + * handles the two methods of progressive display of interlaced images, + * depending on the 'display' value; if 'display' is true then the whole row + * (dp) is filled from the start by replicating the available pixels. If + * 'display' is false only those pixels present in the pass are filled in. + */ +void /* PRIVATE */ +png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display) +{ + unsigned int pixel_depth = png_ptr->transformed_pixel_depth; + png_const_bytep sp = png_ptr->row_buf + 1; + png_alloc_size_t row_width = png_ptr->width; + unsigned int pass = png_ptr->pass; + png_bytep end_ptr = 0; + png_byte end_byte = 0; + unsigned int end_mask; + + png_debug(1, "in png_combine_row"); + + /* Added in 1.5.6: it should not be possible to enter this routine until at + * least one row has been read from the PNG data and transformed. + */ + if (pixel_depth == 0) + png_error(png_ptr, "internal row logic error"); + + /* Added in 1.5.4: the pixel depth should match the information returned by + * any call to png_read_update_info at this point. Do not continue if we got + * this wrong. + */ + if (png_ptr->info_rowbytes != 0 && png_ptr->info_rowbytes != + PNG_ROWBYTES(pixel_depth, row_width)) + png_error(png_ptr, "internal row size calculation error"); + + /* Don't expect this to ever happen: */ + if (row_width == 0) + png_error(png_ptr, "internal row width error"); + + /* Preserve the last byte in cases where only part of it will be overwritten, + * the multiply below may overflow, we don't care because ANSI-C guarantees + * we get the low bits. + */ + end_mask = (pixel_depth * row_width) & 7; + if (end_mask != 0) + { + /* end_ptr == NULL is a flag to say do nothing */ + end_ptr = dp + PNG_ROWBYTES(pixel_depth, row_width) - 1; + end_byte = *end_ptr; +# ifdef PNG_READ_PACKSWAP_SUPPORTED + if ((png_ptr->transformations & PNG_PACKSWAP) != 0) + /* little-endian byte */ + end_mask = (unsigned int)(0xff << end_mask); + + else /* big-endian byte */ +# endif + end_mask = 0xff >> end_mask; + /* end_mask is now the bits to *keep* from the destination row */ + } + + /* For non-interlaced images this reduces to a memcpy(). A memcpy() + * will also happen if interlacing isn't supported or if the application + * does not call png_set_interlace_handling(). In the latter cases the + * caller just gets a sequence of the unexpanded rows from each interlace + * pass. + */ +#ifdef PNG_READ_INTERLACING_SUPPORTED + if (png_ptr->interlaced != 0 && + (png_ptr->transformations & PNG_INTERLACE) != 0 && + pass < 6 && (display == 0 || + /* The following copies everything for 'display' on passes 0, 2 and 4. */ + (display == 1 && (pass & 1) != 0))) + { + /* Narrow images may have no bits in a pass; the caller should handle + * this, but this test is cheap: + */ + if (row_width <= PNG_PASS_START_COL(pass)) + return; + + if (pixel_depth < 8) + { + /* For pixel depths up to 4 bpp the 8-pixel mask can be expanded to fit + * into 32 bits, then a single loop over the bytes using the four byte + * values in the 32-bit mask can be used. For the 'display' option the + * expanded mask may also not require any masking within a byte. To + * make this work the PACKSWAP option must be taken into account - it + * simply requires the pixels to be reversed in each byte. + * + * The 'regular' case requires a mask for each of the first 6 passes, + * the 'display' case does a copy for the even passes in the range + * 0..6. This has already been handled in the test above. + * + * The masks are arranged as four bytes with the first byte to use in + * the lowest bits (little-endian) regardless of the order (PACKSWAP or + * not) of the pixels in each byte. + * + * NOTE: the whole of this logic depends on the caller of this function + * only calling it on rows appropriate to the pass. This function only + * understands the 'x' logic; the 'y' logic is handled by the caller. + * + * The following defines allow generation of compile time constant bit + * masks for each pixel depth and each possibility of swapped or not + * swapped bytes. Pass 'p' is in the range 0..6; 'x', a pixel index, + * is in the range 0..7; and the result is 1 if the pixel is to be + * copied in the pass, 0 if not. 'S' is for the sparkle method, 'B' + * for the block method. + * + * With some compilers a compile time expression of the general form: + * + * (shift >= 32) ? (a >> (shift-32)) : (b >> shift) + * + * Produces warnings with values of 'shift' in the range 33 to 63 + * because the right hand side of the ?: expression is evaluated by + * the compiler even though it isn't used. Microsoft Visual C (various + * versions) and the Intel C compiler are known to do this. To avoid + * this the following macros are used in 1.5.6. This is a temporary + * solution to avoid destabilizing the code during the release process. + */ +# if PNG_USE_COMPILE_TIME_MASKS +# define PNG_LSR(x,s) ((x)>>((s) & 0x1f)) +# define PNG_LSL(x,s) ((x)<<((s) & 0x1f)) +# else +# define PNG_LSR(x,s) ((x)>>(s)) +# define PNG_LSL(x,s) ((x)<<(s)) +# endif +# define S_COPY(p,x) (((p)<4 ? PNG_LSR(0x80088822,(3-(p))*8+(7-(x))) :\ + PNG_LSR(0xaa55ff00,(7-(p))*8+(7-(x)))) & 1) +# define B_COPY(p,x) (((p)<4 ? PNG_LSR(0xff0fff33,(3-(p))*8+(7-(x))) :\ + PNG_LSR(0xff55ff00,(7-(p))*8+(7-(x)))) & 1) + + /* Return a mask for pass 'p' pixel 'x' at depth 'd'. The mask is + * little endian - the first pixel is at bit 0 - however the extra + * parameter 's' can be set to cause the mask position to be swapped + * within each byte, to match the PNG format. This is done by XOR of + * the shift with 7, 6 or 4 for bit depths 1, 2 and 4. + */ +# define PIXEL_MASK(p,x,d,s) \ + (PNG_LSL(((PNG_LSL(1U,(d)))-1),(((x)*(d))^((s)?8-(d):0)))) + + /* Hence generate the appropriate 'block' or 'sparkle' pixel copy mask. + */ +# define S_MASKx(p,x,d,s) (S_COPY(p,x)?PIXEL_MASK(p,x,d,s):0) +# define B_MASKx(p,x,d,s) (B_COPY(p,x)?PIXEL_MASK(p,x,d,s):0) + + /* Combine 8 of these to get the full mask. For the 1-bpp and 2-bpp + * cases the result needs replicating, for the 4-bpp case the above + * generates a full 32 bits. + */ +# define MASK_EXPAND(m,d) ((m)*((d)==1?0x01010101:((d)==2?0x00010001:1))) + +# define S_MASK(p,d,s) MASK_EXPAND(S_MASKx(p,0,d,s) + S_MASKx(p,1,d,s) +\ + S_MASKx(p,2,d,s) + S_MASKx(p,3,d,s) + S_MASKx(p,4,d,s) +\ + S_MASKx(p,5,d,s) + S_MASKx(p,6,d,s) + S_MASKx(p,7,d,s), d) + +# define B_MASK(p,d,s) MASK_EXPAND(B_MASKx(p,0,d,s) + B_MASKx(p,1,d,s) +\ + B_MASKx(p,2,d,s) + B_MASKx(p,3,d,s) + B_MASKx(p,4,d,s) +\ + B_MASKx(p,5,d,s) + B_MASKx(p,6,d,s) + B_MASKx(p,7,d,s), d) + +#if PNG_USE_COMPILE_TIME_MASKS + /* Utility macros to construct all the masks for a depth/swap + * combination. The 's' parameter says whether the format is PNG + * (big endian bytes) or not. Only the three odd-numbered passes are + * required for the display/block algorithm. + */ +# define S_MASKS(d,s) { S_MASK(0,d,s), S_MASK(1,d,s), S_MASK(2,d,s),\ + S_MASK(3,d,s), S_MASK(4,d,s), S_MASK(5,d,s) } + +# define B_MASKS(d,s) { B_MASK(1,d,s), B_MASK(3,d,s), B_MASK(5,d,s) } + +# define DEPTH_INDEX(d) ((d)==1?0:((d)==2?1:2)) + + /* Hence the pre-compiled masks indexed by PACKSWAP (or not), depth and + * then pass: + */ + static const png_uint_32 row_mask[2/*PACKSWAP*/][3/*depth*/][6] = + { + /* Little-endian byte masks for PACKSWAP */ + { S_MASKS(1,0), S_MASKS(2,0), S_MASKS(4,0) }, + /* Normal (big-endian byte) masks - PNG format */ + { S_MASKS(1,1), S_MASKS(2,1), S_MASKS(4,1) } + }; + + /* display_mask has only three entries for the odd passes, so index by + * pass>>1. + */ + static const png_uint_32 display_mask[2][3][3] = + { + /* Little-endian byte masks for PACKSWAP */ + { B_MASKS(1,0), B_MASKS(2,0), B_MASKS(4,0) }, + /* Normal (big-endian byte) masks - PNG format */ + { B_MASKS(1,1), B_MASKS(2,1), B_MASKS(4,1) } + }; + +# define MASK(pass,depth,display,png)\ + ((display)?display_mask[png][DEPTH_INDEX(depth)][pass>>1]:\ + row_mask[png][DEPTH_INDEX(depth)][pass]) + +#else /* !PNG_USE_COMPILE_TIME_MASKS */ + /* This is the runtime alternative: it seems unlikely that this will + * ever be either smaller or faster than the compile time approach. + */ +# define MASK(pass,depth,display,png)\ + ((display)?B_MASK(pass,depth,png):S_MASK(pass,depth,png)) +#endif /* !USE_COMPILE_TIME_MASKS */ + + /* Use the appropriate mask to copy the required bits. In some cases + * the byte mask will be 0 or 0xff; optimize these cases. row_width is + * the number of pixels, but the code copies bytes, so it is necessary + * to special case the end. + */ + png_uint_32 pixels_per_byte = 8 / pixel_depth; + png_uint_32 mask; + +# ifdef PNG_READ_PACKSWAP_SUPPORTED + if ((png_ptr->transformations & PNG_PACKSWAP) != 0) + mask = MASK(pass, pixel_depth, display, 0); + + else +# endif + mask = MASK(pass, pixel_depth, display, 1); + + for (;;) + { + png_uint_32 m; + + /* It doesn't matter in the following if png_uint_32 has more than + * 32 bits because the high bits always match those in m<<24; it is, + * however, essential to use OR here, not +, because of this. + */ + m = mask; + mask = (m >> 8) | (m << 24); /* rotate right to good compilers */ + m &= 0xff; + + if (m != 0) /* something to copy */ + { + if (m != 0xff) + *dp = (png_byte)((*dp & ~m) | (*sp & m)); + else + *dp = *sp; + } + + /* NOTE: this may overwrite the last byte with garbage if the image + * is not an exact number of bytes wide; libpng has always done + * this. + */ + if (row_width <= pixels_per_byte) + break; /* May need to restore part of the last byte */ + + row_width -= pixels_per_byte; + ++dp; + ++sp; + } + } + + else /* pixel_depth >= 8 */ + { + unsigned int bytes_to_copy, bytes_to_jump; + + /* Validate the depth - it must be a multiple of 8 */ + if (pixel_depth & 7) + png_error(png_ptr, "invalid user transform pixel depth"); + + pixel_depth >>= 3; /* now in bytes */ + row_width *= pixel_depth; + + /* Regardless of pass number the Adam 7 interlace always results in a + * fixed number of pixels to copy then to skip. There may be a + * different number of pixels to skip at the start though. + */ + { + unsigned int offset = PNG_PASS_START_COL(pass) * pixel_depth; + + row_width -= offset; + dp += offset; + sp += offset; + } + + /* Work out the bytes to copy. */ + if (display != 0) + { + /* When doing the 'block' algorithm the pixel in the pass gets + * replicated to adjacent pixels. This is why the even (0,2,4,6) + * passes are skipped above - the entire expanded row is copied. + */ + bytes_to_copy = (1<<((6-pass)>>1)) * pixel_depth; + + /* But don't allow this number to exceed the actual row width. */ + if (bytes_to_copy > row_width) + bytes_to_copy = (unsigned int)/*SAFE*/row_width; + } + + else /* normal row; Adam7 only ever gives us one pixel to copy. */ + bytes_to_copy = pixel_depth; + + /* In Adam7 there is a constant offset between where the pixels go. */ + bytes_to_jump = PNG_PASS_COL_OFFSET(pass) * pixel_depth; + + /* And simply copy these bytes. Some optimization is possible here, + * depending on the value of 'bytes_to_copy'. Special case the low + * byte counts, which we know to be frequent. + * + * Notice that these cases all 'return' rather than 'break' - this + * avoids an unnecessary test on whether to restore the last byte + * below. + */ + switch (bytes_to_copy) + { + case 1: + for (;;) + { + *dp = *sp; + + if (row_width <= bytes_to_jump) + return; + + dp += bytes_to_jump; + sp += bytes_to_jump; + row_width -= bytes_to_jump; + } + + case 2: + /* There is a possibility of a partial copy at the end here; this + * slows the code down somewhat. + */ + do + { + dp[0] = sp[0]; dp[1] = sp[1]; + + if (row_width <= bytes_to_jump) + return; + + sp += bytes_to_jump; + dp += bytes_to_jump; + row_width -= bytes_to_jump; + } + while (row_width > 1); + + /* And there can only be one byte left at this point: */ + *dp = *sp; + return; + + case 3: + /* This can only be the RGB case, so each copy is exactly one + * pixel and it is not necessary to check for a partial copy. + */ + for (;;) + { + dp[0] = sp[0]; dp[1] = sp[1]; dp[2] = sp[2]; + + if (row_width <= bytes_to_jump) + return; + + sp += bytes_to_jump; + dp += bytes_to_jump; + row_width -= bytes_to_jump; + } + + default: +#if PNG_ALIGN_TYPE != PNG_ALIGN_NONE + /* Check for double byte alignment and, if possible, use a + * 16-bit copy. Don't attempt this for narrow images - ones that + * are less than an interlace panel wide. Don't attempt it for + * wide bytes_to_copy either - use the memcpy there. + */ + if (bytes_to_copy < 16 /*else use memcpy*/ && + png_isaligned(dp, png_uint_16) && + png_isaligned(sp, png_uint_16) && + bytes_to_copy % (sizeof (png_uint_16)) == 0 && + bytes_to_jump % (sizeof (png_uint_16)) == 0) + { + /* Everything is aligned for png_uint_16 copies, but try for + * png_uint_32 first. + */ + if (png_isaligned(dp, png_uint_32) && + png_isaligned(sp, png_uint_32) && + bytes_to_copy % (sizeof (png_uint_32)) == 0 && + bytes_to_jump % (sizeof (png_uint_32)) == 0) + { + png_uint_32p dp32 = png_aligncast(png_uint_32p,dp); + png_const_uint_32p sp32 = png_aligncastconst( + png_const_uint_32p, sp); + size_t skip = (bytes_to_jump-bytes_to_copy) / + (sizeof (png_uint_32)); + + do + { + size_t c = bytes_to_copy; + do + { + *dp32++ = *sp32++; + c -= (sizeof (png_uint_32)); + } + while (c > 0); + + if (row_width <= bytes_to_jump) + return; + + dp32 += skip; + sp32 += skip; + row_width -= bytes_to_jump; + } + while (bytes_to_copy <= row_width); + + /* Get to here when the row_width truncates the final copy. + * There will be 1-3 bytes left to copy, so don't try the + * 16-bit loop below. + */ + dp = (png_bytep)dp32; + sp = (png_const_bytep)sp32; + do + *dp++ = *sp++; + while (--row_width > 0); + return; + } + + /* Else do it in 16-bit quantities, but only if the size is + * not too large. + */ + else + { + png_uint_16p dp16 = png_aligncast(png_uint_16p, dp); + png_const_uint_16p sp16 = png_aligncastconst( + png_const_uint_16p, sp); + size_t skip = (bytes_to_jump-bytes_to_copy) / + (sizeof (png_uint_16)); + + do + { + size_t c = bytes_to_copy; + do + { + *dp16++ = *sp16++; + c -= (sizeof (png_uint_16)); + } + while (c > 0); + + if (row_width <= bytes_to_jump) + return; + + dp16 += skip; + sp16 += skip; + row_width -= bytes_to_jump; + } + while (bytes_to_copy <= row_width); + + /* End of row - 1 byte left, bytes_to_copy > row_width: */ + dp = (png_bytep)dp16; + sp = (png_const_bytep)sp16; + do + *dp++ = *sp++; + while (--row_width > 0); + return; + } + } +#endif /* ALIGN_TYPE code */ + + /* The true default - use a memcpy: */ + for (;;) + { + memcpy(dp, sp, bytes_to_copy); + + if (row_width <= bytes_to_jump) + return; + + sp += bytes_to_jump; + dp += bytes_to_jump; + row_width -= bytes_to_jump; + if (bytes_to_copy > row_width) + bytes_to_copy = (unsigned int)/*SAFE*/row_width; + } + } + + /* NOT REACHED*/ + } /* pixel_depth >= 8 */ + + /* Here if pixel_depth < 8 to check 'end_ptr' below. */ + } + else +#endif /* READ_INTERLACING */ + + /* If here then the switch above wasn't used so just memcpy the whole row + * from the temporary row buffer (notice that this overwrites the end of the + * destination row if it is a partial byte.) + */ + memcpy(dp, sp, PNG_ROWBYTES(pixel_depth, row_width)); + + /* Restore the overwritten bits from the last byte if necessary. */ + if (end_ptr != NULL) + *end_ptr = (png_byte)((end_byte & end_mask) | (*end_ptr & ~end_mask)); +} + +#ifdef PNG_READ_INTERLACING_SUPPORTED +void /* PRIVATE */ +png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass, + png_uint_32 transformations /* Because these may affect the byte layout */) +{ + png_debug(1, "in png_do_read_interlace"); + if (row != NULL && row_info != NULL) + { + png_uint_32 final_width; + + final_width = row_info->width * png_pass_inc[pass]; + + switch (row_info->pixel_depth) + { + case 1: + { + png_bytep sp = row + (size_t)((row_info->width - 1) >> 3); + png_bytep dp = row + (size_t)((final_width - 1) >> 3); + unsigned int sshift, dshift; + unsigned int s_start, s_end; + int s_inc; + int jstop = (int)png_pass_inc[pass]; + png_byte v; + png_uint_32 i; + int j; + +#ifdef PNG_READ_PACKSWAP_SUPPORTED + if ((transformations & PNG_PACKSWAP) != 0) + { + sshift = ((row_info->width + 7) & 0x07); + dshift = ((final_width + 7) & 0x07); + s_start = 7; + s_end = 0; + s_inc = -1; + } + + else +#endif + { + sshift = 7 - ((row_info->width + 7) & 0x07); + dshift = 7 - ((final_width + 7) & 0x07); + s_start = 0; + s_end = 7; + s_inc = 1; + } + + for (i = 0; i < row_info->width; i++) + { + v = (png_byte)((*sp >> sshift) & 0x01); + for (j = 0; j < jstop; j++) + { + unsigned int tmp = *dp & (0x7f7f >> (7 - dshift)); + tmp |= (unsigned int)(v << dshift); + *dp = (png_byte)(tmp & 0xff); + + if (dshift == s_end) + { + dshift = s_start; + dp--; + } + + else + dshift = (unsigned int)((int)dshift + s_inc); + } + + if (sshift == s_end) + { + sshift = s_start; + sp--; + } + + else + sshift = (unsigned int)((int)sshift + s_inc); + } + break; + } + + case 2: + { + png_bytep sp = row + (png_uint_32)((row_info->width - 1) >> 2); + png_bytep dp = row + (png_uint_32)((final_width - 1) >> 2); + unsigned int sshift, dshift; + unsigned int s_start, s_end; + int s_inc; + int jstop = (int)png_pass_inc[pass]; + png_uint_32 i; + +#ifdef PNG_READ_PACKSWAP_SUPPORTED + if ((transformations & PNG_PACKSWAP) != 0) + { + sshift = (((row_info->width + 3) & 0x03) << 1); + dshift = (((final_width + 3) & 0x03) << 1); + s_start = 6; + s_end = 0; + s_inc = -2; + } + + else +#endif + { + sshift = ((3 - ((row_info->width + 3) & 0x03)) << 1); + dshift = ((3 - ((final_width + 3) & 0x03)) << 1); + s_start = 0; + s_end = 6; + s_inc = 2; + } + + for (i = 0; i < row_info->width; i++) + { + png_byte v; + int j; + + v = (png_byte)((*sp >> sshift) & 0x03); + for (j = 0; j < jstop; j++) + { + unsigned int tmp = *dp & (0x3f3f >> (6 - dshift)); + tmp |= (unsigned int)(v << dshift); + *dp = (png_byte)(tmp & 0xff); + + if (dshift == s_end) + { + dshift = s_start; + dp--; + } + + else + dshift = (unsigned int)((int)dshift + s_inc); + } + + if (sshift == s_end) + { + sshift = s_start; + sp--; + } + + else + sshift = (unsigned int)((int)sshift + s_inc); + } + break; + } + + case 4: + { + png_bytep sp = row + (size_t)((row_info->width - 1) >> 1); + png_bytep dp = row + (size_t)((final_width - 1) >> 1); + unsigned int sshift, dshift; + unsigned int s_start, s_end; + int s_inc; + png_uint_32 i; + int jstop = (int)png_pass_inc[pass]; + +#ifdef PNG_READ_PACKSWAP_SUPPORTED + if ((transformations & PNG_PACKSWAP) != 0) + { + sshift = (((row_info->width + 1) & 0x01) << 2); + dshift = (((final_width + 1) & 0x01) << 2); + s_start = 4; + s_end = 0; + s_inc = -4; + } + + else +#endif + { + sshift = ((1 - ((row_info->width + 1) & 0x01)) << 2); + dshift = ((1 - ((final_width + 1) & 0x01)) << 2); + s_start = 0; + s_end = 4; + s_inc = 4; + } + + for (i = 0; i < row_info->width; i++) + { + png_byte v = (png_byte)((*sp >> sshift) & 0x0f); + int j; + + for (j = 0; j < jstop; j++) + { + unsigned int tmp = *dp & (0xf0f >> (4 - dshift)); + tmp |= (unsigned int)(v << dshift); + *dp = (png_byte)(tmp & 0xff); + + if (dshift == s_end) + { + dshift = s_start; + dp--; + } + + else + dshift = (unsigned int)((int)dshift + s_inc); + } + + if (sshift == s_end) + { + sshift = s_start; + sp--; + } + + else + sshift = (unsigned int)((int)sshift + s_inc); + } + break; + } + + default: + { + size_t pixel_bytes = (row_info->pixel_depth >> 3); + + png_bytep sp = row + (size_t)(row_info->width - 1) + * pixel_bytes; + + png_bytep dp = row + (size_t)(final_width - 1) * pixel_bytes; + + int jstop = (int)png_pass_inc[pass]; + png_uint_32 i; + + for (i = 0; i < row_info->width; i++) + { + png_byte v[8]; /* SAFE; pixel_depth does not exceed 64 */ + int j; + + memcpy(v, sp, pixel_bytes); + + for (j = 0; j < jstop; j++) + { + memcpy(dp, v, pixel_bytes); + dp -= pixel_bytes; + } + + sp -= pixel_bytes; + } + break; + } + } + + row_info->width = final_width; + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, final_width); + } +#ifndef PNG_READ_PACKSWAP_SUPPORTED + PNG_UNUSED(transformations) /* Silence compiler warning */ +#endif +} +#endif /* READ_INTERLACING */ + +static void +png_read_filter_row_sub(png_row_infop row_info, png_bytep row, + png_const_bytep prev_row) +{ + size_t i; + size_t istop = row_info->rowbytes; + unsigned int bpp = (row_info->pixel_depth + 7) >> 3; + png_bytep rp = row + bpp; + + PNG_UNUSED(prev_row) + + for (i = bpp; i < istop; i++) + { + *rp = (png_byte)(((int)(*rp) + (int)(*(rp-bpp))) & 0xff); + rp++; + } +} + +static void +png_read_filter_row_up(png_row_infop row_info, png_bytep row, + png_const_bytep prev_row) +{ + size_t i; + size_t istop = row_info->rowbytes; + png_bytep rp = row; + png_const_bytep pp = prev_row; + + for (i = 0; i < istop; i++) + { + *rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff); + rp++; + } +} + +static void +png_read_filter_row_avg(png_row_infop row_info, png_bytep row, + png_const_bytep prev_row) +{ + size_t i; + png_bytep rp = row; + png_const_bytep pp = prev_row; + unsigned int bpp = (row_info->pixel_depth + 7) >> 3; + size_t istop = row_info->rowbytes - bpp; + + for (i = 0; i < bpp; i++) + { + *rp = (png_byte)(((int)(*rp) + + ((int)(*pp++) / 2 )) & 0xff); + + rp++; + } + + for (i = 0; i < istop; i++) + { + *rp = (png_byte)(((int)(*rp) + + (int)(*pp++ + *(rp-bpp)) / 2 ) & 0xff); + + rp++; + } +} + +static void +png_read_filter_row_paeth_1byte_pixel(png_row_infop row_info, png_bytep row, + png_const_bytep prev_row) +{ + png_bytep rp_end = row + row_info->rowbytes; + int a, c; + + /* First pixel/byte */ + c = *prev_row++; + a = *row + c; + *row++ = (png_byte)a; + + /* Remainder */ + while (row < rp_end) + { + int b, pa, pb, pc, p; + + a &= 0xff; /* From previous iteration or start */ + b = *prev_row++; + + p = b - c; + pc = a - c; + +#ifdef PNG_USE_ABS + pa = abs(p); + pb = abs(pc); + pc = abs(p + pc); +#else + pa = p < 0 ? -p : p; + pb = pc < 0 ? -pc : pc; + pc = (p + pc) < 0 ? -(p + pc) : p + pc; +#endif + + /* Find the best predictor, the least of pa, pb, pc favoring the earlier + * ones in the case of a tie. + */ + if (pb < pa) + { + pa = pb; a = b; + } + if (pc < pa) a = c; + + /* Calculate the current pixel in a, and move the previous row pixel to c + * for the next time round the loop + */ + c = b; + a += *row; + *row++ = (png_byte)a; + } +} + +static void +png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row, + png_const_bytep prev_row) +{ + unsigned int bpp = (row_info->pixel_depth + 7) >> 3; + png_bytep rp_end = row + bpp; + + /* Process the first pixel in the row completely (this is the same as 'up' + * because there is only one candidate predictor for the first row). + */ + while (row < rp_end) + { + int a = *row + *prev_row++; + *row++ = (png_byte)a; + } + + /* Remainder */ + rp_end = rp_end + (row_info->rowbytes - bpp); + + while (row < rp_end) + { + int a, b, c, pa, pb, pc, p; + + c = *(prev_row - bpp); + a = *(row - bpp); + b = *prev_row++; + + p = b - c; + pc = a - c; + +#ifdef PNG_USE_ABS + pa = abs(p); + pb = abs(pc); + pc = abs(p + pc); +#else + pa = p < 0 ? -p : p; + pb = pc < 0 ? -pc : pc; + pc = (p + pc) < 0 ? -(p + pc) : p + pc; +#endif + + if (pb < pa) + { + pa = pb; a = b; + } + if (pc < pa) a = c; + + a += *row; + *row++ = (png_byte)a; + } +} + +static void +png_init_filter_functions(png_structrp pp) + /* This function is called once for every PNG image (except for PNG images + * that only use PNG_FILTER_VALUE_NONE for all rows) to set the + * implementations required to reverse the filtering of PNG rows. Reversing + * the filter is the first transformation performed on the row data. It is + * performed in place, therefore an implementation can be selected based on + * the image pixel format. If the implementation depends on image width then + * take care to ensure that it works correctly if the image is interlaced - + * interlacing causes the actual row width to vary. + */ +{ + unsigned int bpp = (pp->pixel_depth + 7) >> 3; + + pp->read_filter[PNG_FILTER_VALUE_SUB-1] = png_read_filter_row_sub; + pp->read_filter[PNG_FILTER_VALUE_UP-1] = png_read_filter_row_up; + pp->read_filter[PNG_FILTER_VALUE_AVG-1] = png_read_filter_row_avg; + if (bpp == 1) + pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = + png_read_filter_row_paeth_1byte_pixel; + else + pp->read_filter[PNG_FILTER_VALUE_PAETH-1] = + png_read_filter_row_paeth_multibyte_pixel; + +#ifdef PNG_FILTER_OPTIMIZATIONS + /* To use this define PNG_FILTER_OPTIMIZATIONS as the name of a function to + * call to install hardware optimizations for the above functions; simply + * replace whatever elements of the pp->read_filter[] array with a hardware + * specific (or, for that matter, generic) optimization. + * + * To see an example of this examine what configure.ac does when + * --enable-arm-neon is specified on the command line. + */ + PNG_FILTER_OPTIMIZATIONS(pp, bpp); +#endif +} + +void /* PRIVATE */ +png_read_filter_row(png_structrp pp, png_row_infop row_info, png_bytep row, + png_const_bytep prev_row, int filter) +{ + /* OPTIMIZATION: DO NOT MODIFY THIS FUNCTION, instead #define + * PNG_FILTER_OPTIMIZATIONS to a function that overrides the generic + * implementations. See png_init_filter_functions above. + */ + if (filter > PNG_FILTER_VALUE_NONE && filter < PNG_FILTER_VALUE_LAST) + { + if (pp->read_filter[0] == NULL) + png_init_filter_functions(pp); + + pp->read_filter[filter-1](row_info, row, prev_row); + } +} + +#ifdef PNG_SEQUENTIAL_READ_SUPPORTED +void /* PRIVATE */ +png_read_IDAT_data(png_structrp png_ptr, png_bytep output, + png_alloc_size_t avail_out) +{ + /* Loop reading IDATs and decompressing the result into output[avail_out] */ + png_ptr->zstream.next_out = output; + png_ptr->zstream.avail_out = 0; /* safety: set below */ + + if (output == NULL) + avail_out = 0; + + do + { + int ret; + png_byte tmpbuf[PNG_INFLATE_BUF_SIZE]; + + if (png_ptr->zstream.avail_in == 0) + { + uInt avail_in; + png_bytep buffer; + + while (png_ptr->idat_size == 0) + { + png_crc_finish(png_ptr, 0); + + png_ptr->idat_size = png_read_chunk_header(png_ptr); + /* This is an error even in the 'check' case because the code just + * consumed a non-IDAT header. + */ + if (png_ptr->chunk_name != png_IDAT) + png_error(png_ptr, "Not enough image data"); + } + + avail_in = png_ptr->IDAT_read_size; + + if (avail_in > png_chunk_max(png_ptr)) + avail_in = (uInt)/*SAFE*/png_chunk_max(png_ptr); + + if (avail_in > png_ptr->idat_size) + avail_in = (uInt)png_ptr->idat_size; + + /* A PNG with a gradually increasing IDAT size will defeat this attempt + * to minimize memory usage by causing lots of re-allocs, but + * realistically doing IDAT_read_size re-allocs is not likely to be a + * big problem. + * + * An error here corresponds to the system being out of memory. + */ + buffer = png_read_buffer(png_ptr, avail_in); + + if (buffer == NULL) + png_chunk_error(png_ptr, "out of memory"); + + png_crc_read(png_ptr, buffer, avail_in); + png_ptr->idat_size -= avail_in; + + png_ptr->zstream.next_in = buffer; + png_ptr->zstream.avail_in = avail_in; + } + + /* And set up the output side. */ + if (output != NULL) /* standard read */ + { + uInt out = ZLIB_IO_MAX; + + if (out > avail_out) + out = (uInt)avail_out; + + avail_out -= out; + png_ptr->zstream.avail_out = out; + } + + else /* after last row, checking for end */ + { + png_ptr->zstream.next_out = tmpbuf; + png_ptr->zstream.avail_out = (sizeof tmpbuf); + } + + /* Use NO_FLUSH; this gives zlib the maximum opportunity to optimize the + * process. If the LZ stream is truncated the sequential reader will + * terminally damage the stream, above, by reading the chunk header of the + * following chunk (it then exits with png_error). + * + * TODO: deal more elegantly with truncated IDAT lists. + */ + ret = PNG_INFLATE(png_ptr, Z_NO_FLUSH); + + /* Take the unconsumed output back. */ + if (output != NULL) + avail_out += png_ptr->zstream.avail_out; + + else /* avail_out counts the extra bytes */ + avail_out += (sizeof tmpbuf) - png_ptr->zstream.avail_out; + + png_ptr->zstream.avail_out = 0; + + if (ret == Z_STREAM_END) + { + /* Do this for safety; we won't read any more into this row. */ + png_ptr->zstream.next_out = NULL; + + png_ptr->mode |= PNG_AFTER_IDAT; + png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED; + + if (png_ptr->zstream.avail_in > 0 || png_ptr->idat_size > 0) + png_chunk_benign_error(png_ptr, "Extra compressed data"); + break; + } + + if (ret != Z_OK) + { + png_zstream_error(png_ptr, ret); + + if (output != NULL) + png_chunk_error(png_ptr, png_ptr->zstream.msg); + + else /* checking */ + { + png_chunk_benign_error(png_ptr, png_ptr->zstream.msg); + return; + } + } + } while (avail_out > 0); + + if (avail_out > 0) + { + /* The stream ended before the image; this is the same as too few IDATs so + * should be handled the same way. + */ + if (output != NULL) + png_error(png_ptr, "Not enough image data"); + + else /* the deflate stream contained extra data */ + png_chunk_benign_error(png_ptr, "Too much image data"); + } +} + +void /* PRIVATE */ +png_read_finish_IDAT(png_structrp png_ptr) +{ + /* We don't need any more data and the stream should have ended, however the + * LZ end code may actually not have been processed. In this case we must + * read it otherwise stray unread IDAT data or, more likely, an IDAT chunk + * may still remain to be consumed. + */ + if ((png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED) == 0) + { + /* The NULL causes png_read_IDAT_data to swallow any remaining bytes in + * the compressed stream, but the stream may be damaged too, so even after + * this call we may need to terminate the zstream ownership. + */ + png_read_IDAT_data(png_ptr, NULL, 0); + png_ptr->zstream.next_out = NULL; /* safety */ + + /* Now clear everything out for safety; the following may not have been + * done. + */ + if ((png_ptr->flags & PNG_FLAG_ZSTREAM_ENDED) == 0) + { + png_ptr->mode |= PNG_AFTER_IDAT; + png_ptr->flags |= PNG_FLAG_ZSTREAM_ENDED; + } + } + + /* If the zstream has not been released do it now *and* terminate the reading + * of the final IDAT chunk. + */ + if (png_ptr->zowner == png_IDAT) + { + /* Always do this; the pointers otherwise point into the read buffer. */ + png_ptr->zstream.next_in = NULL; + png_ptr->zstream.avail_in = 0; + + /* Now we no longer own the zstream. */ + png_ptr->zowner = 0; + + /* The slightly weird semantics of the sequential IDAT reading is that we + * are always in or at the end of an IDAT chunk, so we always need to do a + * crc_finish here. If idat_size is non-zero we also need to read the + * spurious bytes at the end of the chunk now. + */ + (void)png_crc_finish(png_ptr, png_ptr->idat_size); + } +} + +void /* PRIVATE */ +png_read_finish_row(png_structrp png_ptr) +{ + png_debug(1, "in png_read_finish_row"); + png_ptr->row_number++; + if (png_ptr->row_number < png_ptr->num_rows) + return; + + if (png_ptr->interlaced != 0) + { + png_ptr->row_number = 0; + + /* TO DO: don't do this if prev_row isn't needed (requires + * read-ahead of the next row's filter byte. + */ + memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); + + do + { + png_ptr->pass++; + + if (png_ptr->pass >= 7) + break; + + png_ptr->iwidth = (png_ptr->width + + png_pass_inc[png_ptr->pass] - 1 - + png_pass_start[png_ptr->pass]) / + png_pass_inc[png_ptr->pass]; + + if ((png_ptr->transformations & PNG_INTERLACE) == 0) + { + png_ptr->num_rows = (png_ptr->height + + png_pass_yinc[png_ptr->pass] - 1 - + png_pass_ystart[png_ptr->pass]) / + png_pass_yinc[png_ptr->pass]; + } + + else /* if (png_ptr->transformations & PNG_INTERLACE) */ + break; /* libpng deinterlacing sees every row */ + + } while (png_ptr->num_rows == 0 || png_ptr->iwidth == 0); + + if (png_ptr->pass < 7) + return; + } + + /* Here after at the end of the last row of the last pass. */ + png_read_finish_IDAT(png_ptr); +} +#endif /* SEQUENTIAL_READ */ + +void /* PRIVATE */ +png_read_start_row(png_structrp png_ptr) +{ + unsigned int max_pixel_depth; + size_t row_bytes; + + png_debug(1, "in png_read_start_row"); + +#ifdef PNG_READ_TRANSFORMS_SUPPORTED + png_init_read_transformations(png_ptr); +#endif + if (png_ptr->interlaced != 0) + { + if ((png_ptr->transformations & PNG_INTERLACE) == 0) + png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 - + png_pass_ystart[0]) / png_pass_yinc[0]; + + else + png_ptr->num_rows = png_ptr->height; + + png_ptr->iwidth = (png_ptr->width + + png_pass_inc[png_ptr->pass] - 1 - + png_pass_start[png_ptr->pass]) / + png_pass_inc[png_ptr->pass]; + } + + else + { + png_ptr->num_rows = png_ptr->height; + png_ptr->iwidth = png_ptr->width; + } + + max_pixel_depth = (unsigned int)png_ptr->pixel_depth; + + /* WARNING: * png_read_transform_info (pngrtran.c) performs a simpler set of + * calculations to calculate the final pixel depth, then + * png_do_read_transforms actually does the transforms. This means that the + * code which effectively calculates this value is actually repeated in three + * separate places. They must all match. Innocent changes to the order of + * transformations can and will break libpng in a way that causes memory + * overwrites. + * + * TODO: fix this. + */ +#ifdef PNG_READ_PACK_SUPPORTED + if ((png_ptr->transformations & PNG_PACK) != 0 && png_ptr->bit_depth < 8) + max_pixel_depth = 8; +#endif + +#ifdef PNG_READ_EXPAND_SUPPORTED + if ((png_ptr->transformations & PNG_EXPAND) != 0) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (png_ptr->num_trans != 0) + max_pixel_depth = 32; + + else + max_pixel_depth = 24; + } + + else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) + { + if (max_pixel_depth < 8) + max_pixel_depth = 8; + + if (png_ptr->num_trans != 0) + max_pixel_depth *= 2; + } + + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB) + { + if (png_ptr->num_trans != 0) + { + max_pixel_depth *= 4; + max_pixel_depth /= 3; + } + } + } +#endif + +#ifdef PNG_READ_EXPAND_16_SUPPORTED + if ((png_ptr->transformations & PNG_EXPAND_16) != 0) + { +# ifdef PNG_READ_EXPAND_SUPPORTED + /* In fact it is an error if it isn't supported, but checking is + * the safe way. + */ + if ((png_ptr->transformations & PNG_EXPAND) != 0) + { + if (png_ptr->bit_depth < 16) + max_pixel_depth *= 2; + } + else +# endif + png_ptr->transformations &= ~PNG_EXPAND_16; + } +#endif + +#ifdef PNG_READ_FILLER_SUPPORTED + if ((png_ptr->transformations & (PNG_FILLER)) != 0) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY) + { + if (max_pixel_depth <= 8) + max_pixel_depth = 16; + + else + max_pixel_depth = 32; + } + + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB || + png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + if (max_pixel_depth <= 32) + max_pixel_depth = 32; + + else + max_pixel_depth = 64; + } + } +#endif + +#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED + if ((png_ptr->transformations & PNG_GRAY_TO_RGB) != 0) + { + if ( +#ifdef PNG_READ_EXPAND_SUPPORTED + (png_ptr->num_trans != 0 && + (png_ptr->transformations & PNG_EXPAND) != 0) || +#endif +#ifdef PNG_READ_FILLER_SUPPORTED + (png_ptr->transformations & (PNG_FILLER)) != 0 || +#endif + png_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + if (max_pixel_depth <= 16) + max_pixel_depth = 32; + + else + max_pixel_depth = 64; + } + + else + { + if (max_pixel_depth <= 8) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + max_pixel_depth = 32; + + else + max_pixel_depth = 24; + } + + else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + max_pixel_depth = 64; + + else + max_pixel_depth = 48; + } + } +#endif + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) && \ +defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) + if ((png_ptr->transformations & PNG_USER_TRANSFORM) != 0) + { + unsigned int user_pixel_depth = png_ptr->user_transform_depth * + png_ptr->user_transform_channels; + + if (user_pixel_depth > max_pixel_depth) + max_pixel_depth = user_pixel_depth; + } +#endif + + /* This value is stored in png_struct and double checked in the row read + * code. + */ + png_ptr->maximum_pixel_depth = (png_byte)max_pixel_depth; + png_ptr->transformed_pixel_depth = 0; /* calculated on demand */ + + /* Align the width on the next larger 8 pixels. Mainly used + * for interlacing + */ + row_bytes = ((png_ptr->width + 7) & ~((png_uint_32)7)); + /* Calculate the maximum bytes needed, adding a byte and a pixel + * for safety's sake + */ + row_bytes = PNG_ROWBYTES(max_pixel_depth, row_bytes) + + 1 + ((max_pixel_depth + 7) >> 3U); + +#ifdef PNG_MAX_MALLOC_64K + if (row_bytes > (png_uint_32)65536L) + png_error(png_ptr, "This image requires a row greater than 64KB"); +#endif + + if (row_bytes + 48 > png_ptr->old_big_row_buf_size) + { + png_free(png_ptr, png_ptr->big_row_buf); + png_free(png_ptr, png_ptr->big_prev_row); + + if (png_ptr->interlaced != 0) + png_ptr->big_row_buf = (png_bytep)png_calloc(png_ptr, + row_bytes + 48); + + else + png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr, row_bytes + 48); + + png_ptr->big_prev_row = (png_bytep)png_malloc(png_ptr, row_bytes + 48); + +#ifdef PNG_ALIGNED_MEMORY_SUPPORTED + /* Use 16-byte aligned memory for row_buf with at least 16 bytes + * of padding before and after row_buf; treat prev_row similarly. + * NOTE: the alignment is to the start of the pixels, one beyond the start + * of the buffer, because of the filter byte. Prior to libpng 1.5.6 this + * was incorrect; the filter byte was aligned, which had the exact + * opposite effect of that intended. + */ + { + png_bytep temp = png_ptr->big_row_buf + 32; + size_t extra = (size_t)temp & 0x0f; + png_ptr->row_buf = temp - extra - 1/*filter byte*/; + + temp = png_ptr->big_prev_row + 32; + extra = (size_t)temp & 0x0f; + png_ptr->prev_row = temp - extra - 1/*filter byte*/; + } +#else + /* Use 31 bytes of padding before and 17 bytes after row_buf. */ + png_ptr->row_buf = png_ptr->big_row_buf + 31; + png_ptr->prev_row = png_ptr->big_prev_row + 31; +#endif + png_ptr->old_big_row_buf_size = row_bytes + 48; + } + +#ifdef PNG_MAX_MALLOC_64K + if (png_ptr->rowbytes > 65535) + png_error(png_ptr, "This image requires a row greater than 64KB"); + +#endif + if (png_ptr->rowbytes > (PNG_SIZE_MAX - 1)) + png_error(png_ptr, "Row has too many bytes to allocate in memory"); + + memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1); + + png_debug1(3, "width = %u,", png_ptr->width); + png_debug1(3, "height = %u,", png_ptr->height); + png_debug1(3, "iwidth = %u,", png_ptr->iwidth); + png_debug1(3, "num_rows = %u,", png_ptr->num_rows); + png_debug1(3, "rowbytes = %lu,", (unsigned long)png_ptr->rowbytes); + png_debug1(3, "irowbytes = %lu", + (unsigned long)PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1); + + /* The sequential reader needs a buffer for IDAT, but the progressive reader + * does not, so free the read buffer now regardless; the sequential reader + * reallocates it on demand. + */ + if (png_ptr->read_buffer != NULL) + { + png_bytep buffer = png_ptr->read_buffer; + + png_ptr->read_buffer_size = 0; + png_ptr->read_buffer = NULL; + png_free(png_ptr, buffer); + } + + /* Finally claim the zstream for the inflate of the IDAT data, use the bits + * value from the stream (note that this will result in a fatal error if the + * IDAT stream has a bogus deflate header window_bits value, but this should + * not be happening any longer!) + */ + if (png_inflate_claim(png_ptr, png_IDAT) != Z_OK) + png_error(png_ptr, png_ptr->zstream.msg); + + png_ptr->flags |= PNG_FLAG_ROW_INIT; +} +#endif /* READ */ diff --git a/widget/milsko/milskosrc/external/libpng/src/pngset.c b/widget/milsko/milskosrc/external/libpng/src/pngset.c new file mode 100644 index 0000000000..3e63c2724e --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/src/pngset.c @@ -0,0 +1,1986 @@ +/* pngset.c - storage of image information into info struct + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * The functions here are used during reads to store data from the file + * into the info struct, and during writes to store application data + * into the info struct for writing into the file. This abstracts the + * info struct and allows us to change the structure in the future. + */ + +#include "pngpriv.h" + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + +#ifdef PNG_bKGD_SUPPORTED +void PNGAPI +png_set_bKGD(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_color_16p background) +{ + png_debug1(1, "in %s storage function", "bKGD"); + + if (png_ptr == NULL || info_ptr == NULL || background == NULL) + return; + + info_ptr->background = *background; + info_ptr->valid |= PNG_INFO_bKGD; +} +#endif + +#ifdef PNG_cHRM_SUPPORTED +void PNGFAPI +png_set_cHRM_fixed(png_const_structrp png_ptr, png_inforp info_ptr, + png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x, + png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y, + png_fixed_point blue_x, png_fixed_point blue_y) +{ + png_debug1(1, "in %s storage function", "cHRM fixed"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + info_ptr->cHRM.redx = red_x; + info_ptr->cHRM.redy = red_y; + info_ptr->cHRM.greenx = green_x; + info_ptr->cHRM.greeny = green_y; + info_ptr->cHRM.bluex = blue_x; + info_ptr->cHRM.bluey = blue_y; + info_ptr->cHRM.whitex = white_x; + info_ptr->cHRM.whitey = white_y; + + info_ptr->valid |= PNG_INFO_cHRM; +} + +void PNGFAPI +png_set_cHRM_XYZ_fixed(png_const_structrp png_ptr, png_inforp info_ptr, + png_fixed_point int_red_X, png_fixed_point int_red_Y, + png_fixed_point int_red_Z, png_fixed_point int_green_X, + png_fixed_point int_green_Y, png_fixed_point int_green_Z, + png_fixed_point int_blue_X, png_fixed_point int_blue_Y, + png_fixed_point int_blue_Z) +{ + png_XYZ XYZ; + png_xy xy; + + png_debug1(1, "in %s storage function", "cHRM XYZ fixed"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + XYZ.red_X = int_red_X; + XYZ.red_Y = int_red_Y; + XYZ.red_Z = int_red_Z; + XYZ.green_X = int_green_X; + XYZ.green_Y = int_green_Y; + XYZ.green_Z = int_green_Z; + XYZ.blue_X = int_blue_X; + XYZ.blue_Y = int_blue_Y; + XYZ.blue_Z = int_blue_Z; + + if (png_xy_from_XYZ(&xy, &XYZ) == 0) + { + info_ptr->cHRM = xy; + info_ptr->valid |= PNG_INFO_cHRM; + } + + else + png_app_error(png_ptr, "invalid cHRM XYZ"); +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_cHRM(png_const_structrp png_ptr, png_inforp info_ptr, + double white_x, double white_y, double red_x, double red_y, + double green_x, double green_y, double blue_x, double blue_y) +{ + png_set_cHRM_fixed(png_ptr, info_ptr, + png_fixed(png_ptr, white_x, "cHRM White X"), + png_fixed(png_ptr, white_y, "cHRM White Y"), + png_fixed(png_ptr, red_x, "cHRM Red X"), + png_fixed(png_ptr, red_y, "cHRM Red Y"), + png_fixed(png_ptr, green_x, "cHRM Green X"), + png_fixed(png_ptr, green_y, "cHRM Green Y"), + png_fixed(png_ptr, blue_x, "cHRM Blue X"), + png_fixed(png_ptr, blue_y, "cHRM Blue Y")); +} + +void PNGAPI +png_set_cHRM_XYZ(png_const_structrp png_ptr, png_inforp info_ptr, double red_X, + double red_Y, double red_Z, double green_X, double green_Y, double green_Z, + double blue_X, double blue_Y, double blue_Z) +{ + png_set_cHRM_XYZ_fixed(png_ptr, info_ptr, + png_fixed(png_ptr, red_X, "cHRM Red X"), + png_fixed(png_ptr, red_Y, "cHRM Red Y"), + png_fixed(png_ptr, red_Z, "cHRM Red Z"), + png_fixed(png_ptr, green_X, "cHRM Green X"), + png_fixed(png_ptr, green_Y, "cHRM Green Y"), + png_fixed(png_ptr, green_Z, "cHRM Green Z"), + png_fixed(png_ptr, blue_X, "cHRM Blue X"), + png_fixed(png_ptr, blue_Y, "cHRM Blue Y"), + png_fixed(png_ptr, blue_Z, "cHRM Blue Z")); +} +# endif /* FLOATING_POINT */ + +#endif /* cHRM */ + +#ifdef PNG_cICP_SUPPORTED +void PNGAPI +png_set_cICP(png_const_structrp png_ptr, png_inforp info_ptr, + png_byte colour_primaries, png_byte transfer_function, + png_byte matrix_coefficients, png_byte video_full_range_flag) +{ + png_debug1(1, "in %s storage function", "cICP"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + info_ptr->cicp_colour_primaries = colour_primaries; + info_ptr->cicp_transfer_function = transfer_function; + info_ptr->cicp_matrix_coefficients = matrix_coefficients; + info_ptr->cicp_video_full_range_flag = video_full_range_flag; + + if (info_ptr->cicp_matrix_coefficients != 0) + { + png_warning(png_ptr, "Invalid cICP matrix coefficients"); + return; + } + + info_ptr->valid |= PNG_INFO_cICP; +} +#endif /* cICP */ + +#ifdef PNG_cLLI_SUPPORTED +void PNGFAPI +png_set_cLLI_fixed(png_const_structrp png_ptr, png_inforp info_ptr, + /* The values below are in cd/m2 (nits) and are scaled by 10,000; not + * 100,000 as in the case of png_fixed_point. + */ + png_uint_32 maxCLL, png_uint_32 maxFALL) +{ + png_debug1(1, "in %s storage function", "cLLI"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + /* Check the light level range: */ + if (maxCLL > 0x7FFFFFFFU || maxFALL > 0x7FFFFFFFU) + { + /* The limit is 200kcd/m2; somewhat bright but not inconceivable because + * human vision is said to run up to 100Mcd/m2. The sun is about 2Gcd/m2. + * + * The reference sRGB monitor is 80cd/m2 and the limit of PQ encoding is + * 2kcd/m2. + */ + png_chunk_report(png_ptr, "cLLI light level exceeds PNG limit", + PNG_CHUNK_WRITE_ERROR); + return; + } + + info_ptr->maxCLL = maxCLL; + info_ptr->maxFALL = maxFALL; + info_ptr->valid |= PNG_INFO_cLLI; +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_cLLI(png_const_structrp png_ptr, png_inforp info_ptr, + double maxCLL, double maxFALL) +{ + png_set_cLLI_fixed(png_ptr, info_ptr, + png_fixed_ITU(png_ptr, maxCLL, "png_set_cLLI(maxCLL)"), + png_fixed_ITU(png_ptr, maxFALL, "png_set_cLLI(maxFALL)")); +} +# endif /* FLOATING_POINT */ +#endif /* cLLI */ + +#ifdef PNG_mDCV_SUPPORTED +static png_uint_16 +png_ITU_fixed_16(int *error, png_fixed_point v) +{ + /* Return a safe uint16_t value scaled according to the ITU H273 rules for + * 16-bit display chromaticities. Functions like the corresponding + * png_fixed() internal function with regard to errors: it's an error on + * write, a chunk_benign_error on read: See the definition of + * png_chunk_report in pngpriv.h. + */ + v /= 2; /* rounds to 0 in C: avoids insignificant arithmetic errors */ + if (v > 65535 || v < 0) + { + *error = 1; + return 0; + } + + return (png_uint_16)/*SAFE*/v; +} + +void PNGAPI +png_set_mDCV_fixed(png_const_structrp png_ptr, png_inforp info_ptr, + png_fixed_point white_x, png_fixed_point white_y, + png_fixed_point red_x, png_fixed_point red_y, + png_fixed_point green_x, png_fixed_point green_y, + png_fixed_point blue_x, png_fixed_point blue_y, + png_uint_32 maxDL, + png_uint_32 minDL) +{ + png_uint_16 rx, ry, gx, gy, bx, by, wx, wy; + int error; + + png_debug1(1, "in %s storage function", "mDCV"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + /* Check the input values to ensure they are in the expected range: */ + error = 0; + rx = png_ITU_fixed_16(&error, red_x); + ry = png_ITU_fixed_16(&error, red_y); + gx = png_ITU_fixed_16(&error, green_x); + gy = png_ITU_fixed_16(&error, green_y); + bx = png_ITU_fixed_16(&error, blue_x); + by = png_ITU_fixed_16(&error, blue_y); + wx = png_ITU_fixed_16(&error, white_x); + wy = png_ITU_fixed_16(&error, white_y); + + if (error) + { + png_chunk_report(png_ptr, + "mDCV chromaticities outside representable range", + PNG_CHUNK_WRITE_ERROR); + return; + } + + /* Check the light level range: */ + if (maxDL > 0x7FFFFFFFU || minDL > 0x7FFFFFFFU) + { + /* The limit is 200kcd/m2; somewhat bright but not inconceivable because + * human vision is said to run up to 100Mcd/m2. The sun is about 2Gcd/m2. + * + * The reference sRGB monitor is 80cd/m2 and the limit of PQ encoding is + * 2kcd/m2. + */ + png_chunk_report(png_ptr, "mDCV display light level exceeds PNG limit", + PNG_CHUNK_WRITE_ERROR); + return; + } + + /* All values are safe, the settings are accepted. + * + * IMPLEMENTATION NOTE: in practice the values can be checked and assigned + * but the result is confusing if a writing app calls png_set_mDCV more than + * once, the second time with an invalid value. This approach is more + * obviously correct at the cost of typing and a very slight machine + * overhead. + */ + info_ptr->mastering_red_x = rx; + info_ptr->mastering_red_y = ry; + info_ptr->mastering_green_x = gx; + info_ptr->mastering_green_y = gy; + info_ptr->mastering_blue_x = bx; + info_ptr->mastering_blue_y = by; + info_ptr->mastering_white_x = wx; + info_ptr->mastering_white_y = wy; + info_ptr->mastering_maxDL = maxDL; + info_ptr->mastering_minDL = minDL; + info_ptr->valid |= PNG_INFO_mDCV; +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_mDCV(png_const_structrp png_ptr, png_inforp info_ptr, + double white_x, double white_y, double red_x, double red_y, double green_x, + double green_y, double blue_x, double blue_y, + double maxDL, double minDL) +{ + png_set_mDCV_fixed(png_ptr, info_ptr, + png_fixed(png_ptr, white_x, "png_set_mDCV(white(x))"), + png_fixed(png_ptr, white_y, "png_set_mDCV(white(y))"), + png_fixed(png_ptr, red_x, "png_set_mDCV(red(x))"), + png_fixed(png_ptr, red_y, "png_set_mDCV(red(y))"), + png_fixed(png_ptr, green_x, "png_set_mDCV(green(x))"), + png_fixed(png_ptr, green_y, "png_set_mDCV(green(y))"), + png_fixed(png_ptr, blue_x, "png_set_mDCV(blue(x))"), + png_fixed(png_ptr, blue_y, "png_set_mDCV(blue(y))"), + png_fixed_ITU(png_ptr, maxDL, "png_set_mDCV(maxDL)"), + png_fixed_ITU(png_ptr, minDL, "png_set_mDCV(minDL)")); +} +# endif /* FLOATING_POINT */ +#endif /* mDCV */ + +#ifdef PNG_eXIf_SUPPORTED +void PNGAPI +png_set_eXIf(png_const_structrp png_ptr, png_inforp info_ptr, + png_bytep exif) +{ + png_warning(png_ptr, "png_set_eXIf does not work; use png_set_eXIf_1"); + PNG_UNUSED(info_ptr) + PNG_UNUSED(exif) +} + +void PNGAPI +png_set_eXIf_1(png_const_structrp png_ptr, png_inforp info_ptr, + png_uint_32 num_exif, png_bytep exif) +{ + png_bytep new_exif; + + png_debug1(1, "in %s storage function", "eXIf"); + + if (png_ptr == NULL || info_ptr == NULL || + (png_ptr->mode & PNG_WROTE_eXIf) != 0) + return; + + new_exif = png_voidcast(png_bytep, png_malloc_warn(png_ptr, num_exif)); + + if (new_exif == NULL) + { + png_warning(png_ptr, "Insufficient memory for eXIf chunk data"); + return; + } + + memcpy(new_exif, exif, (size_t)num_exif); + + png_free_data(png_ptr, info_ptr, PNG_FREE_EXIF, 0); + + info_ptr->num_exif = num_exif; + info_ptr->exif = new_exif; + info_ptr->free_me |= PNG_FREE_EXIF; + info_ptr->valid |= PNG_INFO_eXIf; +} +#endif /* eXIf */ + +#ifdef PNG_gAMA_SUPPORTED +void PNGFAPI +png_set_gAMA_fixed(png_const_structrp png_ptr, png_inforp info_ptr, + png_fixed_point file_gamma) +{ + png_debug1(1, "in %s storage function", "gAMA"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + info_ptr->gamma = file_gamma; + info_ptr->valid |= PNG_INFO_gAMA; +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_gAMA(png_const_structrp png_ptr, png_inforp info_ptr, double file_gamma) +{ + png_set_gAMA_fixed(png_ptr, info_ptr, png_fixed(png_ptr, file_gamma, + "png_set_gAMA")); +} +# endif +#endif + +#ifdef PNG_hIST_SUPPORTED +void PNGAPI +png_set_hIST(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_uint_16p hist) +{ + int i; + + png_debug1(1, "in %s storage function", "hIST"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + if (info_ptr->num_palette == 0 || info_ptr->num_palette + > PNG_MAX_PALETTE_LENGTH) + { + png_warning(png_ptr, + "Invalid palette size, hIST allocation skipped"); + + return; + } + + png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0); + + /* Changed from info->num_palette to PNG_MAX_PALETTE_LENGTH in + * version 1.2.1 + */ + info_ptr->hist = png_voidcast(png_uint_16p, png_malloc_warn(png_ptr, + PNG_MAX_PALETTE_LENGTH * (sizeof (png_uint_16)))); + + if (info_ptr->hist == NULL) + { + png_warning(png_ptr, "Insufficient memory for hIST chunk data"); + return; + } + + for (i = 0; i < info_ptr->num_palette; i++) + info_ptr->hist[i] = hist[i]; + + info_ptr->free_me |= PNG_FREE_HIST; + info_ptr->valid |= PNG_INFO_hIST; +} +#endif + +void PNGAPI +png_set_IHDR(png_const_structrp png_ptr, png_inforp info_ptr, + png_uint_32 width, png_uint_32 height, int bit_depth, + int color_type, int interlace_type, int compression_type, + int filter_type) +{ + png_debug1(1, "in %s storage function", "IHDR"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + info_ptr->width = width; + info_ptr->height = height; + info_ptr->bit_depth = (png_byte)bit_depth; + info_ptr->color_type = (png_byte)color_type; + info_ptr->compression_type = (png_byte)compression_type; + info_ptr->filter_type = (png_byte)filter_type; + info_ptr->interlace_type = (png_byte)interlace_type; + + png_check_IHDR (png_ptr, info_ptr->width, info_ptr->height, + info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type, + info_ptr->compression_type, info_ptr->filter_type); + + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + info_ptr->channels = 1; + + else if ((info_ptr->color_type & PNG_COLOR_MASK_COLOR) != 0) + info_ptr->channels = 3; + + else + info_ptr->channels = 1; + + if ((info_ptr->color_type & PNG_COLOR_MASK_ALPHA) != 0) + info_ptr->channels++; + + info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth); + + info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width); +} + +#ifdef PNG_oFFs_SUPPORTED +void PNGAPI +png_set_oFFs(png_const_structrp png_ptr, png_inforp info_ptr, + png_int_32 offset_x, png_int_32 offset_y, int unit_type) +{ + png_debug1(1, "in %s storage function", "oFFs"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + info_ptr->x_offset = offset_x; + info_ptr->y_offset = offset_y; + info_ptr->offset_unit_type = (png_byte)unit_type; + info_ptr->valid |= PNG_INFO_oFFs; +} +#endif + +#ifdef PNG_pCAL_SUPPORTED +void PNGAPI +png_set_pCAL(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_charp purpose, png_int_32 X0, png_int_32 X1, int type, + int nparams, png_const_charp units, png_charpp params) +{ + size_t length; + int i; + + png_debug1(1, "in %s storage function", "pCAL"); + + if (png_ptr == NULL || info_ptr == NULL || purpose == NULL || units == NULL + || (nparams > 0 && params == NULL)) + return; + + length = strlen(purpose) + 1; + png_debug1(3, "allocating purpose for info (%lu bytes)", + (unsigned long)length); + + /* TODO: validate format of calibration name and unit name */ + + /* Check that the type matches the specification. */ + if (type < 0 || type > 3) + { + png_chunk_report(png_ptr, "Invalid pCAL equation type", + PNG_CHUNK_WRITE_ERROR); + return; + } + + if (nparams < 0 || nparams > 255) + { + png_chunk_report(png_ptr, "Invalid pCAL parameter count", + PNG_CHUNK_WRITE_ERROR); + return; + } + + /* Validate params[nparams] */ + for (i=0; ipcal_purpose = png_voidcast(png_charp, + png_malloc_warn(png_ptr, length)); + + if (info_ptr->pcal_purpose == NULL) + { + png_chunk_report(png_ptr, "Insufficient memory for pCAL purpose", + PNG_CHUNK_WRITE_ERROR); + return; + } + + memcpy(info_ptr->pcal_purpose, purpose, length); + + info_ptr->free_me |= PNG_FREE_PCAL; + + png_debug(3, "storing X0, X1, type, and nparams in info"); + info_ptr->pcal_X0 = X0; + info_ptr->pcal_X1 = X1; + info_ptr->pcal_type = (png_byte)type; + info_ptr->pcal_nparams = (png_byte)nparams; + + length = strlen(units) + 1; + png_debug1(3, "allocating units for info (%lu bytes)", + (unsigned long)length); + + info_ptr->pcal_units = png_voidcast(png_charp, + png_malloc_warn(png_ptr, length)); + + if (info_ptr->pcal_units == NULL) + { + png_warning(png_ptr, "Insufficient memory for pCAL units"); + return; + } + + memcpy(info_ptr->pcal_units, units, length); + + info_ptr->pcal_params = png_voidcast(png_charpp, png_malloc_warn(png_ptr, + (size_t)(((unsigned int)nparams + 1) * (sizeof (png_charp))))); + + if (info_ptr->pcal_params == NULL) + { + png_warning(png_ptr, "Insufficient memory for pCAL params"); + return; + } + + memset(info_ptr->pcal_params, 0, ((unsigned int)nparams + 1) * + (sizeof (png_charp))); + + for (i = 0; i < nparams; i++) + { + length = strlen(params[i]) + 1; + png_debug2(3, "allocating parameter %d for info (%lu bytes)", i, + (unsigned long)length); + + info_ptr->pcal_params[i] = (png_charp)png_malloc_warn(png_ptr, length); + + if (info_ptr->pcal_params[i] == NULL) + { + png_warning(png_ptr, "Insufficient memory for pCAL parameter"); + return; + } + + memcpy(info_ptr->pcal_params[i], params[i], length); + } + + info_ptr->valid |= PNG_INFO_pCAL; +} +#endif + +#ifdef PNG_sCAL_SUPPORTED +void PNGAPI +png_set_sCAL_s(png_const_structrp png_ptr, png_inforp info_ptr, + int unit, png_const_charp swidth, png_const_charp sheight) +{ + size_t lengthw = 0, lengthh = 0; + + png_debug1(1, "in %s storage function", "sCAL"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + /* Double check the unit (should never get here with an invalid + * unit unless this is an API call.) + */ + if (unit != 1 && unit != 2) + png_error(png_ptr, "Invalid sCAL unit"); + + if (swidth == NULL || (lengthw = strlen(swidth)) == 0 || + swidth[0] == 45 /* '-' */ || !png_check_fp_string(swidth, lengthw)) + png_error(png_ptr, "Invalid sCAL width"); + + if (sheight == NULL || (lengthh = strlen(sheight)) == 0 || + sheight[0] == 45 /* '-' */ || !png_check_fp_string(sheight, lengthh)) + png_error(png_ptr, "Invalid sCAL height"); + + info_ptr->scal_unit = (png_byte)unit; + + ++lengthw; + + png_debug1(3, "allocating unit for info (%u bytes)", (unsigned int)lengthw); + + info_ptr->scal_s_width = png_voidcast(png_charp, + png_malloc_warn(png_ptr, lengthw)); + + if (info_ptr->scal_s_width == NULL) + { + png_warning(png_ptr, "Memory allocation failed while processing sCAL"); + + return; + } + + memcpy(info_ptr->scal_s_width, swidth, lengthw); + + ++lengthh; + + png_debug1(3, "allocating unit for info (%u bytes)", (unsigned int)lengthh); + + info_ptr->scal_s_height = png_voidcast(png_charp, + png_malloc_warn(png_ptr, lengthh)); + + if (info_ptr->scal_s_height == NULL) + { + png_free(png_ptr, info_ptr->scal_s_width); + info_ptr->scal_s_width = NULL; + + png_warning(png_ptr, "Memory allocation failed while processing sCAL"); + return; + } + + memcpy(info_ptr->scal_s_height, sheight, lengthh); + + info_ptr->free_me |= PNG_FREE_SCAL; + info_ptr->valid |= PNG_INFO_sCAL; +} + +# ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_sCAL(png_const_structrp png_ptr, png_inforp info_ptr, int unit, + double width, double height) +{ + png_debug1(1, "in %s storage function", "sCAL"); + + /* Check the arguments. */ + if (width <= 0) + png_warning(png_ptr, "Invalid sCAL width ignored"); + + else if (height <= 0) + png_warning(png_ptr, "Invalid sCAL height ignored"); + + else + { + /* Convert 'width' and 'height' to ASCII. */ + char swidth[PNG_sCAL_MAX_DIGITS+1]; + char sheight[PNG_sCAL_MAX_DIGITS+1]; + + png_ascii_from_fp(png_ptr, swidth, (sizeof swidth), width, + PNG_sCAL_PRECISION); + png_ascii_from_fp(png_ptr, sheight, (sizeof sheight), height, + PNG_sCAL_PRECISION); + + png_set_sCAL_s(png_ptr, info_ptr, unit, swidth, sheight); + } +} +# endif + +# ifdef PNG_FIXED_POINT_SUPPORTED +void PNGAPI +png_set_sCAL_fixed(png_const_structrp png_ptr, png_inforp info_ptr, int unit, + png_fixed_point width, png_fixed_point height) +{ + png_debug1(1, "in %s storage function", "sCAL"); + + /* Check the arguments. */ + if (width <= 0) + png_warning(png_ptr, "Invalid sCAL width ignored"); + + else if (height <= 0) + png_warning(png_ptr, "Invalid sCAL height ignored"); + + else + { + /* Convert 'width' and 'height' to ASCII. */ + char swidth[PNG_sCAL_MAX_DIGITS+1]; + char sheight[PNG_sCAL_MAX_DIGITS+1]; + + png_ascii_from_fixed(png_ptr, swidth, (sizeof swidth), width); + png_ascii_from_fixed(png_ptr, sheight, (sizeof sheight), height); + + png_set_sCAL_s(png_ptr, info_ptr, unit, swidth, sheight); + } +} +# endif +#endif + +#ifdef PNG_pHYs_SUPPORTED +void PNGAPI +png_set_pHYs(png_const_structrp png_ptr, png_inforp info_ptr, + png_uint_32 res_x, png_uint_32 res_y, int unit_type) +{ + png_debug1(1, "in %s storage function", "pHYs"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + info_ptr->x_pixels_per_unit = res_x; + info_ptr->y_pixels_per_unit = res_y; + info_ptr->phys_unit_type = (png_byte)unit_type; + info_ptr->valid |= PNG_INFO_pHYs; +} +#endif + +void PNGAPI +png_set_PLTE(png_structrp png_ptr, png_inforp info_ptr, + png_const_colorp palette, int num_palette) +{ + + png_uint_32 max_palette_length; + + png_debug1(1, "in %s storage function", "PLTE"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + max_palette_length = (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ? + (1 << info_ptr->bit_depth) : PNG_MAX_PALETTE_LENGTH; + + if (num_palette < 0 || num_palette > (int) max_palette_length) + { + if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + png_error(png_ptr, "Invalid palette length"); + + else + { + png_warning(png_ptr, "Invalid palette length"); + + return; + } + } + + if ((num_palette > 0 && palette == NULL) || + (num_palette == 0 +# ifdef PNG_MNG_FEATURES_SUPPORTED + && (png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) == 0 +# endif + )) + { + png_error(png_ptr, "Invalid palette"); + } + + /* It may not actually be necessary to set png_ptr->palette here; + * we do it for backward compatibility with the way the png_handle_tRNS + * function used to do the allocation. + * + * 1.6.0: the above statement appears to be incorrect; something has to set + * the palette inside png_struct on read. + */ + png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0); + + /* Changed in libpng-1.2.1 to allocate PNG_MAX_PALETTE_LENGTH instead + * of num_palette entries, in case of an invalid PNG file or incorrect + * call to png_set_PLTE() with too-large sample values. + */ + png_ptr->palette = png_voidcast(png_colorp, png_calloc(png_ptr, + PNG_MAX_PALETTE_LENGTH * (sizeof (png_color)))); + + if (num_palette > 0) + memcpy(png_ptr->palette, palette, (unsigned int)num_palette * + (sizeof (png_color))); + + info_ptr->palette = png_ptr->palette; + info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette; + info_ptr->free_me |= PNG_FREE_PLTE; + info_ptr->valid |= PNG_INFO_PLTE; +} + +#ifdef PNG_sBIT_SUPPORTED +void PNGAPI +png_set_sBIT(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_color_8p sig_bit) +{ + png_debug1(1, "in %s storage function", "sBIT"); + + if (png_ptr == NULL || info_ptr == NULL || sig_bit == NULL) + return; + + info_ptr->sig_bit = *sig_bit; + info_ptr->valid |= PNG_INFO_sBIT; +} +#endif + +#ifdef PNG_sRGB_SUPPORTED +void PNGAPI +png_set_sRGB(png_const_structrp png_ptr, png_inforp info_ptr, int srgb_intent) +{ + png_debug1(1, "in %s storage function", "sRGB"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + info_ptr->rendering_intent = srgb_intent; + info_ptr->valid |= PNG_INFO_sRGB; +} + +void PNGAPI +png_set_sRGB_gAMA_and_cHRM(png_const_structrp png_ptr, png_inforp info_ptr, + int srgb_intent) +{ + png_debug1(1, "in %s storage function", "sRGB_gAMA_and_cHRM"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + png_set_sRGB(png_ptr, info_ptr, srgb_intent); + +# ifdef PNG_gAMA_SUPPORTED + png_set_gAMA_fixed(png_ptr, info_ptr, PNG_GAMMA_sRGB_INVERSE); +# endif /* gAMA */ + +# ifdef PNG_cHRM_SUPPORTED + png_set_cHRM_fixed(png_ptr, info_ptr, + /* color x y */ + /* white */ 31270, 32900, + /* red */ 64000, 33000, + /* green */ 30000, 60000, + /* blue */ 15000, 6000); +# endif /* cHRM */ +} +#endif /* sRGB */ + + +#ifdef PNG_iCCP_SUPPORTED +void PNGAPI +png_set_iCCP(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_charp name, int compression_type, + png_const_bytep profile, png_uint_32 proflen) +{ + png_charp new_iccp_name; + png_bytep new_iccp_profile; + size_t length; + + png_debug1(1, "in %s storage function", "iCCP"); + + if (png_ptr == NULL || info_ptr == NULL || name == NULL || profile == NULL) + return; + + if (compression_type != PNG_COMPRESSION_TYPE_BASE) + png_app_error(png_ptr, "Invalid iCCP compression method"); + + length = strlen(name)+1; + new_iccp_name = png_voidcast(png_charp, png_malloc_warn(png_ptr, length)); + + if (new_iccp_name == NULL) + { + png_benign_error(png_ptr, "Insufficient memory to process iCCP chunk"); + + return; + } + + memcpy(new_iccp_name, name, length); + new_iccp_profile = png_voidcast(png_bytep, + png_malloc_warn(png_ptr, proflen)); + + if (new_iccp_profile == NULL) + { + png_free(png_ptr, new_iccp_name); + png_benign_error(png_ptr, + "Insufficient memory to process iCCP profile"); + + return; + } + + memcpy(new_iccp_profile, profile, proflen); + + png_free_data(png_ptr, info_ptr, PNG_FREE_ICCP, 0); + + info_ptr->iccp_proflen = proflen; + info_ptr->iccp_name = new_iccp_name; + info_ptr->iccp_profile = new_iccp_profile; + info_ptr->free_me |= PNG_FREE_ICCP; + info_ptr->valid |= PNG_INFO_iCCP; +} +#endif + +#ifdef PNG_TEXT_SUPPORTED +void PNGAPI +png_set_text(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_textp text_ptr, int num_text) +{ + int ret; + ret = png_set_text_2(png_ptr, info_ptr, text_ptr, num_text); + + if (ret != 0) + png_error(png_ptr, "Insufficient memory to store text"); +} + +int /* PRIVATE */ +png_set_text_2(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_textp text_ptr, int num_text) +{ + int i; + + png_debug1(1, "in text storage function, chunk typeid = 0x%lx", + png_ptr == NULL ? 0xabadca11UL : (unsigned long)png_ptr->chunk_name); + + if (png_ptr == NULL || info_ptr == NULL || num_text <= 0 || text_ptr == NULL) + return 0; + + /* Make sure we have enough space in the "text" array in info_struct + * to hold all of the incoming text_ptr objects. This compare can't overflow + * because max_text >= num_text (anyway, subtract of two positive integers + * can't overflow in any case.) + */ + if (num_text > info_ptr->max_text - info_ptr->num_text) + { + int old_num_text = info_ptr->num_text; + int max_text; + png_textp new_text = NULL; + + /* Calculate an appropriate max_text, checking for overflow. */ + max_text = old_num_text; + if (num_text <= INT_MAX - max_text) + { + max_text += num_text; + + /* Round up to a multiple of 8 */ + if (max_text < INT_MAX-8) + max_text = (max_text + 8) & ~0x7; + + else + max_text = INT_MAX; + + /* Now allocate a new array and copy the old members in; this does all + * the overflow checks. + */ + new_text = png_voidcast(png_textp,png_realloc_array(png_ptr, + info_ptr->text, old_num_text, max_text-old_num_text, + sizeof *new_text)); + } + + if (new_text == NULL) + { + png_chunk_report(png_ptr, "too many text chunks", + PNG_CHUNK_WRITE_ERROR); + + return 1; + } + + png_free(png_ptr, info_ptr->text); + + info_ptr->text = new_text; + info_ptr->free_me |= PNG_FREE_TEXT; + info_ptr->max_text = max_text; + /* num_text is adjusted below as the entries are copied in */ + + png_debug1(3, "allocated %d entries for info_ptr->text", max_text); + } + + for (i = 0; i < num_text; i++) + { + size_t text_length, key_len; + size_t lang_len, lang_key_len; + png_textp textp = &(info_ptr->text[info_ptr->num_text]); + + if (text_ptr[i].key == NULL) + continue; + + if (text_ptr[i].compression < PNG_TEXT_COMPRESSION_NONE || + text_ptr[i].compression >= PNG_TEXT_COMPRESSION_LAST) + { + png_chunk_report(png_ptr, "text compression mode is out of range", + PNG_CHUNK_WRITE_ERROR); + continue; + } + + key_len = strlen(text_ptr[i].key); + + if (text_ptr[i].compression <= 0) + { + lang_len = 0; + lang_key_len = 0; + } + + else +# ifdef PNG_iTXt_SUPPORTED + { + /* Set iTXt data */ + + if (text_ptr[i].lang != NULL) + lang_len = strlen(text_ptr[i].lang); + + else + lang_len = 0; + + if (text_ptr[i].lang_key != NULL) + lang_key_len = strlen(text_ptr[i].lang_key); + + else + lang_key_len = 0; + } +# else /* iTXt */ + { + png_chunk_report(png_ptr, "iTXt chunk not supported", + PNG_CHUNK_WRITE_ERROR); + continue; + } +# endif + + if (text_ptr[i].text == NULL || text_ptr[i].text[0] == '\0') + { + text_length = 0; +# ifdef PNG_iTXt_SUPPORTED + if (text_ptr[i].compression > 0) + textp->compression = PNG_ITXT_COMPRESSION_NONE; + + else +# endif + textp->compression = PNG_TEXT_COMPRESSION_NONE; + } + + else + { + text_length = strlen(text_ptr[i].text); + textp->compression = text_ptr[i].compression; + } + + textp->key = png_voidcast(png_charp,png_malloc_base(png_ptr, + key_len + text_length + lang_len + lang_key_len + 4)); + + if (textp->key == NULL) + { + png_chunk_report(png_ptr, "text chunk: out of memory", + PNG_CHUNK_WRITE_ERROR); + + return 1; + } + + png_debug2(2, "Allocated %lu bytes at %p in png_set_text", + (unsigned long)(png_uint_32) + (key_len + lang_len + lang_key_len + text_length + 4), + textp->key); + + memcpy(textp->key, text_ptr[i].key, key_len); + *(textp->key + key_len) = '\0'; + + if (text_ptr[i].compression > 0) + { + textp->lang = textp->key + key_len + 1; + memcpy(textp->lang, text_ptr[i].lang, lang_len); + *(textp->lang + lang_len) = '\0'; + textp->lang_key = textp->lang + lang_len + 1; + memcpy(textp->lang_key, text_ptr[i].lang_key, lang_key_len); + *(textp->lang_key + lang_key_len) = '\0'; + textp->text = textp->lang_key + lang_key_len + 1; + } + + else + { + textp->lang=NULL; + textp->lang_key=NULL; + textp->text = textp->key + key_len + 1; + } + + if (text_length != 0) + memcpy(textp->text, text_ptr[i].text, text_length); + + *(textp->text + text_length) = '\0'; + +# ifdef PNG_iTXt_SUPPORTED + if (textp->compression > 0) + { + textp->text_length = 0; + textp->itxt_length = text_length; + } + + else +# endif + { + textp->text_length = text_length; + textp->itxt_length = 0; + } + + info_ptr->num_text++; + png_debug1(3, "transferred text chunk %d", info_ptr->num_text); + } + + return 0; +} +#endif + +#ifdef PNG_tIME_SUPPORTED +void PNGAPI +png_set_tIME(png_const_structrp png_ptr, png_inforp info_ptr, + png_const_timep mod_time) +{ + png_debug1(1, "in %s storage function", "tIME"); + + if (png_ptr == NULL || info_ptr == NULL || mod_time == NULL || + (png_ptr->mode & PNG_WROTE_tIME) != 0) + return; + + if (mod_time->month == 0 || mod_time->month > 12 || + mod_time->day == 0 || mod_time->day > 31 || + mod_time->hour > 23 || mod_time->minute > 59 || + mod_time->second > 60) + { + png_warning(png_ptr, "Ignoring invalid time value"); + + return; + } + + info_ptr->mod_time = *mod_time; + info_ptr->valid |= PNG_INFO_tIME; +} +#endif + +#ifdef PNG_tRNS_SUPPORTED +void PNGAPI +png_set_tRNS(png_structrp png_ptr, png_inforp info_ptr, + png_const_bytep trans_alpha, int num_trans, png_const_color_16p trans_color) +{ + png_debug1(1, "in %s storage function", "tRNS"); + + if (png_ptr == NULL || info_ptr == NULL) + + return; + + if (trans_alpha != NULL) + { + /* It may not actually be necessary to set png_ptr->trans_alpha here; + * we do it for backward compatibility with the way the png_handle_tRNS + * function used to do the allocation. + * + * 1.6.0: The above statement is incorrect; png_handle_tRNS effectively + * relies on png_set_tRNS storing the information in png_struct + * (otherwise it won't be there for the code in pngrtran.c). + */ + + png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0); + + if (num_trans > 0 && num_trans <= PNG_MAX_PALETTE_LENGTH) + { + /* Changed from num_trans to PNG_MAX_PALETTE_LENGTH in version 1.2.1 */ + info_ptr->trans_alpha = png_voidcast(png_bytep, + png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH)); + memcpy(info_ptr->trans_alpha, trans_alpha, (size_t)num_trans); + + info_ptr->free_me |= PNG_FREE_TRNS; + info_ptr->valid |= PNG_INFO_tRNS; + } + png_ptr->trans_alpha = info_ptr->trans_alpha; + } + + if (trans_color != NULL) + { +#ifdef PNG_WARNINGS_SUPPORTED + if (info_ptr->bit_depth < 16) + { + int sample_max = (1 << info_ptr->bit_depth) - 1; + + if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY && + trans_color->gray > sample_max) || + (info_ptr->color_type == PNG_COLOR_TYPE_RGB && + (trans_color->red > sample_max || + trans_color->green > sample_max || + trans_color->blue > sample_max))) + png_warning(png_ptr, + "tRNS chunk has out-of-range samples for bit_depth"); + } +#endif + + info_ptr->trans_color = *trans_color; + + if (num_trans == 0) + num_trans = 1; + } + + info_ptr->num_trans = (png_uint_16)num_trans; + + if (num_trans != 0) + { + info_ptr->free_me |= PNG_FREE_TRNS; + info_ptr->valid |= PNG_INFO_tRNS; + } +} +#endif + +#ifdef PNG_sPLT_SUPPORTED +void PNGAPI +png_set_sPLT(png_const_structrp png_ptr, + png_inforp info_ptr, png_const_sPLT_tp entries, int nentries) +/* + * entries - array of png_sPLT_t structures + * to be added to the list of palettes + * in the info structure. + * + * nentries - number of palette structures to be + * added. + */ +{ + png_sPLT_tp np; + + png_debug1(1, "in %s storage function", "sPLT"); + + if (png_ptr == NULL || info_ptr == NULL || nentries <= 0 || entries == NULL) + return; + + /* Use the internal realloc function, which checks for all the possible + * overflows. Notice that the parameters are (int) and (size_t) + */ + np = png_voidcast(png_sPLT_tp,png_realloc_array(png_ptr, + info_ptr->splt_palettes, info_ptr->splt_palettes_num, nentries, + sizeof *np)); + + if (np == NULL) + { + /* Out of memory or too many chunks */ + png_chunk_report(png_ptr, "too many sPLT chunks", PNG_CHUNK_WRITE_ERROR); + return; + } + + png_free(png_ptr, info_ptr->splt_palettes); + + info_ptr->splt_palettes = np; + info_ptr->free_me |= PNG_FREE_SPLT; + + np += info_ptr->splt_palettes_num; + + do + { + size_t length; + + /* Skip invalid input entries */ + if (entries->name == NULL || entries->entries == NULL) + { + /* png_handle_sPLT doesn't do this, so this is an app error */ + png_app_error(png_ptr, "png_set_sPLT: invalid sPLT"); + /* Just skip the invalid entry */ + continue; + } + + np->depth = entries->depth; + + /* In the event of out-of-memory just return - there's no point keeping + * on trying to add sPLT chunks. + */ + length = strlen(entries->name) + 1; + np->name = png_voidcast(png_charp, png_malloc_base(png_ptr, length)); + + if (np->name == NULL) + break; + + memcpy(np->name, entries->name, length); + + /* IMPORTANT: we have memory now that won't get freed if something else + * goes wrong; this code must free it. png_malloc_array produces no + * warnings; use a png_chunk_report (below) if there is an error. + */ + np->entries = png_voidcast(png_sPLT_entryp, png_malloc_array(png_ptr, + entries->nentries, sizeof (png_sPLT_entry))); + + if (np->entries == NULL) + { + png_free(png_ptr, np->name); + np->name = NULL; + break; + } + + np->nentries = entries->nentries; + /* This multiply can't overflow because png_malloc_array has already + * checked it when doing the allocation. + */ + memcpy(np->entries, entries->entries, + (unsigned int)entries->nentries * sizeof (png_sPLT_entry)); + + /* Note that 'continue' skips the advance of the out pointer and out + * count, so an invalid entry is not added. + */ + info_ptr->valid |= PNG_INFO_sPLT; + ++(info_ptr->splt_palettes_num); + ++np; + ++entries; + } + while (--nentries); + + if (nentries > 0) + png_chunk_report(png_ptr, "sPLT out of memory", PNG_CHUNK_WRITE_ERROR); +} +#endif /* sPLT */ + +#ifdef PNG_STORE_UNKNOWN_CHUNKS_SUPPORTED +static png_byte +check_location(png_const_structrp png_ptr, int location) +{ + location &= (PNG_HAVE_IHDR|PNG_HAVE_PLTE|PNG_AFTER_IDAT); + + /* New in 1.6.0; copy the location and check it. This is an API + * change; previously the app had to use the + * png_set_unknown_chunk_location API below for each chunk. + */ + if (location == 0 && (png_ptr->mode & PNG_IS_READ_STRUCT) == 0) + { + /* Write struct, so unknown chunks come from the app */ + png_app_warning(png_ptr, + "png_set_unknown_chunks now expects a valid location"); + /* Use the old behavior */ + location = (png_byte)(png_ptr->mode & + (PNG_HAVE_IHDR|PNG_HAVE_PLTE|PNG_AFTER_IDAT)); + } + + /* This need not be an internal error - if the app calls + * png_set_unknown_chunks on a read pointer it must get the location right. + */ + if (location == 0) + png_error(png_ptr, "invalid location in png_set_unknown_chunks"); + + /* Now reduce the location to the top-most set bit by removing each least + * significant bit in turn. + */ + while (location != (location & -location)) + location &= ~(location & -location); + + /* The cast is safe because 'location' is a bit mask and only the low four + * bits are significant. + */ + return (png_byte)location; +} + +void PNGAPI +png_set_unknown_chunks(png_const_structrp png_ptr, + png_inforp info_ptr, png_const_unknown_chunkp unknowns, int num_unknowns) +{ + png_unknown_chunkp np; + + if (png_ptr == NULL || info_ptr == NULL || num_unknowns <= 0 || + unknowns == NULL) + return; + + /* Check for the failure cases where support has been disabled at compile + * time. This code is hardly ever compiled - it's here because + * STORE_UNKNOWN_CHUNKS is set by both read and write code (compiling in this + * code) but may be meaningless if the read or write handling of unknown + * chunks is not compiled in. + */ +# if !defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) && \ + defined(PNG_READ_SUPPORTED) + if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0) + { + png_app_error(png_ptr, "no unknown chunk support on read"); + + return; + } +# endif +# if !defined(PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED) && \ + defined(PNG_WRITE_SUPPORTED) + if ((png_ptr->mode & PNG_IS_READ_STRUCT) == 0) + { + png_app_error(png_ptr, "no unknown chunk support on write"); + + return; + } +# endif + + /* Prior to 1.6.0 this code used png_malloc_warn; however, this meant that + * unknown critical chunks could be lost with just a warning resulting in + * undefined behavior. Now png_chunk_report is used to provide behavior + * appropriate to read or write. + */ + np = png_voidcast(png_unknown_chunkp, png_realloc_array(png_ptr, + info_ptr->unknown_chunks, info_ptr->unknown_chunks_num, num_unknowns, + sizeof *np)); + + if (np == NULL) + { + png_chunk_report(png_ptr, "too many unknown chunks", + PNG_CHUNK_WRITE_ERROR); + return; + } + + png_free(png_ptr, info_ptr->unknown_chunks); + + info_ptr->unknown_chunks = np; /* safe because it is initialized */ + info_ptr->free_me |= PNG_FREE_UNKN; + + np += info_ptr->unknown_chunks_num; + + /* Increment unknown_chunks_num each time round the loop to protect the + * just-allocated chunk data. + */ + for (; num_unknowns > 0; --num_unknowns, ++unknowns) + { + memcpy(np->name, unknowns->name, (sizeof np->name)); + np->name[(sizeof np->name)-1] = '\0'; + np->location = check_location(png_ptr, unknowns->location); + + if (unknowns->size == 0) + { + np->data = NULL; + np->size = 0; + } + + else + { + np->data = png_voidcast(png_bytep, + png_malloc_base(png_ptr, unknowns->size)); + + if (np->data == NULL) + { + png_chunk_report(png_ptr, "unknown chunk: out of memory", + PNG_CHUNK_WRITE_ERROR); + /* But just skip storing the unknown chunk */ + continue; + } + + memcpy(np->data, unknowns->data, unknowns->size); + np->size = unknowns->size; + } + + /* These increments are skipped on out-of-memory for the data - the + * unknown chunk entry gets overwritten if the png_chunk_report returns. + * This is correct in the read case (the chunk is just dropped.) + */ + ++np; + ++(info_ptr->unknown_chunks_num); + } +} + +void PNGAPI +png_set_unknown_chunk_location(png_const_structrp png_ptr, png_inforp info_ptr, + int chunk, int location) +{ + /* This API is pretty pointless in 1.6.0 because the location can be set + * before the call to png_set_unknown_chunks. + * + * TODO: add a png_app_warning in 1.7 + */ + if (png_ptr != NULL && info_ptr != NULL && chunk >= 0 && + chunk < info_ptr->unknown_chunks_num) + { + if ((location & (PNG_HAVE_IHDR|PNG_HAVE_PLTE|PNG_AFTER_IDAT)) == 0) + { + png_app_error(png_ptr, "invalid unknown chunk location"); + /* Fake out the pre 1.6.0 behavior: */ + if (((unsigned int)location & PNG_HAVE_IDAT) != 0) /* undocumented! */ + location = PNG_AFTER_IDAT; + + else + location = PNG_HAVE_IHDR; /* also undocumented */ + } + + info_ptr->unknown_chunks[chunk].location = + check_location(png_ptr, location); + } +} +#endif /* STORE_UNKNOWN_CHUNKS */ + +#ifdef PNG_MNG_FEATURES_SUPPORTED +png_uint_32 PNGAPI +png_permit_mng_features(png_structrp png_ptr, png_uint_32 mng_features) +{ + png_debug(1, "in png_permit_mng_features"); + + if (png_ptr == NULL) + return 0; + + png_ptr->mng_features_permitted = mng_features & PNG_ALL_MNG_FEATURES; + + return png_ptr->mng_features_permitted; +} +#endif + +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED +static unsigned int +add_one_chunk(png_bytep list, unsigned int count, png_const_bytep add, int keep) +{ + unsigned int i; + + /* Utility function: update the 'keep' state of a chunk if it is already in + * the list, otherwise add it to the list. + */ + for (i=0; i= PNG_HANDLE_CHUNK_LAST) + { + png_app_error(png_ptr, "png_set_keep_unknown_chunks: invalid keep"); + + return; + } + + if (num_chunks_in <= 0) + { + png_ptr->unknown_default = keep; + + /* '0' means just set the flags, so stop here */ + if (num_chunks_in == 0) + return; + } + + if (num_chunks_in < 0) + { + /* Ignore all unknown chunks and all chunks recognized by + * libpng except for IHDR, PLTE, tRNS, IDAT, and IEND + */ + static const png_byte chunks_to_ignore[] = { + 98, 75, 71, 68, '\0', /* bKGD */ + 99, 72, 82, 77, '\0', /* cHRM */ + 99, 73, 67, 80, '\0', /* cICP */ + 99, 76, 76, 73, '\0', /* cLLI */ + 101, 88, 73, 102, '\0', /* eXIf */ + 103, 65, 77, 65, '\0', /* gAMA */ + 104, 73, 83, 84, '\0', /* hIST */ + 105, 67, 67, 80, '\0', /* iCCP */ + 105, 84, 88, 116, '\0', /* iTXt */ + 109, 68, 67, 86, '\0', /* mDCV */ + 111, 70, 70, 115, '\0', /* oFFs */ + 112, 67, 65, 76, '\0', /* pCAL */ + 112, 72, 89, 115, '\0', /* pHYs */ + 115, 66, 73, 84, '\0', /* sBIT */ + 115, 67, 65, 76, '\0', /* sCAL */ + 115, 80, 76, 84, '\0', /* sPLT */ + 115, 84, 69, 82, '\0', /* sTER */ + 115, 82, 71, 66, '\0', /* sRGB */ + 116, 69, 88, 116, '\0', /* tEXt */ + 116, 73, 77, 69, '\0', /* tIME */ + 122, 84, 88, 116, '\0' /* zTXt */ + }; + + chunk_list = chunks_to_ignore; + num_chunks = (unsigned int)/*SAFE*/(sizeof chunks_to_ignore)/5U; + } + + else /* num_chunks_in > 0 */ + { + if (chunk_list == NULL) + { + /* Prior to 1.6.0 this was silently ignored, now it is an app_error + * which can be switched off. + */ + png_app_error(png_ptr, "png_set_keep_unknown_chunks: no chunk list"); + + return; + } + + num_chunks = (unsigned int)num_chunks_in; + } + + old_num_chunks = png_ptr->num_chunk_list; + if (png_ptr->chunk_list == NULL) + old_num_chunks = 0; + + /* Since num_chunks is always restricted to UINT_MAX/5 this can't overflow. + */ + if (num_chunks + old_num_chunks > UINT_MAX/5) + { + png_app_error(png_ptr, "png_set_keep_unknown_chunks: too many chunks"); + + return; + } + + /* If these chunks are being reset to the default then no more memory is + * required because add_one_chunk above doesn't extend the list if the 'keep' + * parameter is the default. + */ + if (keep != 0) + { + new_list = png_voidcast(png_bytep, png_malloc(png_ptr, + 5 * (num_chunks + old_num_chunks))); + + if (old_num_chunks > 0) + memcpy(new_list, png_ptr->chunk_list, 5*old_num_chunks); + } + + else if (old_num_chunks > 0) + new_list = png_ptr->chunk_list; + + else + new_list = NULL; + + /* Add the new chunks together with each one's handling code. If the chunk + * already exists the code is updated, otherwise the chunk is added to the + * end. (In libpng 1.6.0 order no longer matters because this code enforces + * the earlier convention that the last setting is the one that is used.) + */ + if (new_list != NULL) + { + png_const_bytep inlist; + png_bytep outlist; + unsigned int i; + + for (i=0; ichunk_list != new_list) + png_free(png_ptr, new_list); + + new_list = NULL; + } + } + + else + num_chunks = 0; + + png_ptr->num_chunk_list = num_chunks; + + if (png_ptr->chunk_list != new_list) + { + if (png_ptr->chunk_list != NULL) + png_free(png_ptr, png_ptr->chunk_list); + + png_ptr->chunk_list = new_list; + } +} +#endif + +#ifdef PNG_READ_USER_CHUNKS_SUPPORTED +void PNGAPI +png_set_read_user_chunk_fn(png_structrp png_ptr, png_voidp user_chunk_ptr, + png_user_chunk_ptr read_user_chunk_fn) +{ + png_debug(1, "in png_set_read_user_chunk_fn"); + + if (png_ptr == NULL) + return; + + png_ptr->read_user_chunk_fn = read_user_chunk_fn; + png_ptr->user_chunk_ptr = user_chunk_ptr; +} +#endif + +#ifdef PNG_INFO_IMAGE_SUPPORTED +void PNGAPI +png_set_rows(png_const_structrp png_ptr, png_inforp info_ptr, + png_bytepp row_pointers) +{ + png_debug(1, "in png_set_rows"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + if (info_ptr->row_pointers != NULL && + (info_ptr->row_pointers != row_pointers)) + png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0); + + info_ptr->row_pointers = row_pointers; + + if (row_pointers != NULL) + info_ptr->valid |= PNG_INFO_IDAT; +} +#endif + +void PNGAPI +png_set_compression_buffer_size(png_structrp png_ptr, size_t size) +{ + png_debug(1, "in png_set_compression_buffer_size"); + + if (png_ptr == NULL) + return; + + if (size == 0 || size > PNG_UINT_31_MAX) + png_error(png_ptr, "invalid compression buffer size"); + +# ifdef PNG_SEQUENTIAL_READ_SUPPORTED + if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0) + { + png_ptr->IDAT_read_size = (png_uint_32)size; /* checked above */ + return; + } +# endif + +# ifdef PNG_WRITE_SUPPORTED + if ((png_ptr->mode & PNG_IS_READ_STRUCT) == 0) + { + if (png_ptr->zowner != 0) + { + png_warning(png_ptr, + "Compression buffer size cannot be changed because it is in use"); + + return; + } + +#ifndef __COVERITY__ + /* Some compilers complain that this is always false. However, it + * can be true when integer overflow happens. + */ + if (size > ZLIB_IO_MAX) + { + png_warning(png_ptr, + "Compression buffer size limited to system maximum"); + size = ZLIB_IO_MAX; /* must fit */ + } +#endif + + if (size < 6) + { + /* Deflate will potentially go into an infinite loop on a SYNC_FLUSH + * if this is permitted. + */ + png_warning(png_ptr, + "Compression buffer size cannot be reduced below 6"); + + return; + } + + if (png_ptr->zbuffer_size != size) + { + png_free_buffer_list(png_ptr, &png_ptr->zbuffer_list); + png_ptr->zbuffer_size = (uInt)size; + } + } +# endif +} + +void PNGAPI +png_set_invalid(png_const_structrp png_ptr, png_inforp info_ptr, int mask) +{ + if (png_ptr != NULL && info_ptr != NULL) + info_ptr->valid &= (unsigned int)(~mask); +} + + +#ifdef PNG_SET_USER_LIMITS_SUPPORTED +/* This function was added to libpng 1.2.6 */ +void PNGAPI +png_set_user_limits(png_structrp png_ptr, png_uint_32 user_width_max, + png_uint_32 user_height_max) +{ + png_debug(1, "in png_set_user_limits"); + + /* Images with dimensions larger than these limits will be + * rejected by png_set_IHDR(). To accept any PNG datastream + * regardless of dimensions, set both limits to 0x7fffffff. + */ + if (png_ptr == NULL) + return; + + png_ptr->user_width_max = user_width_max; + png_ptr->user_height_max = user_height_max; +} + +/* This function was added to libpng 1.4.0 */ +void PNGAPI +png_set_chunk_cache_max(png_structrp png_ptr, png_uint_32 user_chunk_cache_max) +{ + png_debug(1, "in png_set_chunk_cache_max"); + + if (png_ptr != NULL) + png_ptr->user_chunk_cache_max = user_chunk_cache_max; +} + +/* This function was added to libpng 1.4.1 */ +void PNGAPI +png_set_chunk_malloc_max(png_structrp png_ptr, + png_alloc_size_t user_chunk_malloc_max) +{ + png_debug(1, "in png_set_chunk_malloc_max"); + + /* pngstruct::user_chunk_malloc_max is initialized to a non-zero value in + * png.c. This API supports '0' for unlimited, make sure the correct + * (unlimited) value is set here to avoid a need to check for 0 everywhere + * the parameter is used. + */ + if (png_ptr != NULL) + { + if (user_chunk_malloc_max == 0U) /* unlimited */ + { +# ifdef PNG_MAX_MALLOC_64K + png_ptr->user_chunk_malloc_max = 65536U; +# else + png_ptr->user_chunk_malloc_max = PNG_SIZE_MAX; +# endif + } + else + png_ptr->user_chunk_malloc_max = user_chunk_malloc_max; + } +} +#endif /* ?SET_USER_LIMITS */ + + +#ifdef PNG_BENIGN_ERRORS_SUPPORTED +void PNGAPI +png_set_benign_errors(png_structrp png_ptr, int allowed) +{ + png_debug(1, "in png_set_benign_errors"); + + /* If allowed is 1, png_benign_error() is treated as a warning. + * + * If allowed is 0, png_benign_error() is treated as an error (which + * is the default behavior if png_set_benign_errors() is not called). + */ + + if (allowed != 0) + png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN | + PNG_FLAG_APP_WARNINGS_WARN | PNG_FLAG_APP_ERRORS_WARN; + + else + png_ptr->flags &= ~(PNG_FLAG_BENIGN_ERRORS_WARN | + PNG_FLAG_APP_WARNINGS_WARN | PNG_FLAG_APP_ERRORS_WARN); +} +#endif /* BENIGN_ERRORS */ + +#ifdef PNG_CHECK_FOR_INVALID_INDEX_SUPPORTED + /* Whether to report invalid palette index; added at libng-1.5.10. + * It is possible for an indexed (color-type==3) PNG file to contain + * pixels with invalid (out-of-range) indexes if the PLTE chunk has + * fewer entries than the image's bit-depth would allow. We recover + * from this gracefully by filling any incomplete palette with zeros + * (opaque black). By default, when this occurs libpng will issue + * a benign error. This API can be used to override that behavior. + */ +void PNGAPI +png_set_check_for_invalid_index(png_structrp png_ptr, int allowed) +{ + png_debug(1, "in png_set_check_for_invalid_index"); + + if (allowed > 0) + png_ptr->num_palette_max = 0; + + else + png_ptr->num_palette_max = -1; +} +#endif + +#if defined(PNG_TEXT_SUPPORTED) || defined(PNG_pCAL_SUPPORTED) || \ + defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) +/* Check that the tEXt or zTXt keyword is valid per PNG 1.0 specification, + * and if invalid, correct the keyword rather than discarding the entire + * chunk. The PNG 1.0 specification requires keywords 1-79 characters in + * length, forbids leading or trailing whitespace, multiple internal spaces, + * and the non-break space (0x80) from ISO 8859-1. Returns keyword length. + * + * The 'new_key' buffer must be 80 characters in size (for the keyword plus a + * trailing '\0'). If this routine returns 0 then there was no keyword, or a + * valid one could not be generated, and the caller must png_error. + */ +png_uint_32 /* PRIVATE */ +png_check_keyword(png_structrp png_ptr, png_const_charp key, png_bytep new_key) +{ +#ifdef PNG_WARNINGS_SUPPORTED + png_const_charp orig_key = key; +#endif + png_uint_32 key_len = 0; + int bad_character = 0; + int space = 1; + + png_debug(1, "in png_check_keyword"); + + if (key == NULL) + { + *new_key = 0; + return 0; + } + + while (*key && key_len < 79) + { + png_byte ch = (png_byte)*key++; + + if ((ch > 32 && ch <= 126) || (ch >= 161 /*&& ch <= 255*/)) + { + *new_key++ = ch; ++key_len; space = 0; + } + + else if (space == 0) + { + /* A space or an invalid character when one wasn't seen immediately + * before; output just a space. + */ + *new_key++ = 32; ++key_len; space = 1; + + /* If the character was not a space then it is invalid. */ + if (ch != 32) + bad_character = ch; + } + + else if (bad_character == 0) + bad_character = ch; /* just skip it, record the first error */ + } + + if (key_len > 0 && space != 0) /* trailing space */ + { + --key_len; --new_key; + if (bad_character == 0) + bad_character = 32; + } + + /* Terminate the keyword */ + *new_key = 0; + + if (key_len == 0) + return 0; + +#ifdef PNG_WARNINGS_SUPPORTED + /* Try to only output one warning per keyword: */ + if (*key != 0) /* keyword too long */ + png_warning(png_ptr, "keyword truncated"); + + else if (bad_character != 0) + { + PNG_WARNING_PARAMETERS(p) + + png_warning_parameter(p, 1, orig_key); + png_warning_parameter_signed(p, 2, PNG_NUMBER_FORMAT_02x, bad_character); + + png_formatted_warning(png_ptr, p, "keyword \"@1\": bad character '0x@2'"); + } +#else /* !WARNINGS */ + PNG_UNUSED(png_ptr) +#endif /* !WARNINGS */ + + return key_len; +} +#endif /* TEXT || pCAL || iCCP || sPLT */ +#endif /* READ || WRITE */ diff --git a/widget/milsko/milskosrc/external/libpng/src/pngtrans.c b/widget/milsko/milskosrc/external/libpng/src/pngtrans.c new file mode 100644 index 0000000000..222b4987f9 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/src/pngtrans.c @@ -0,0 +1,867 @@ +/* pngtrans.c - transforms the data in a row (used by both readers and writers) + * + * Copyright (c) 2018-2024 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +#include "pngpriv.h" + +#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +/* Turn on BGR-to-RGB mapping */ +void PNGAPI +png_set_bgr(png_structrp png_ptr) +{ + png_debug(1, "in png_set_bgr"); + + if (png_ptr == NULL) + return; + + png_ptr->transformations |= PNG_BGR; +} +#endif + +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +/* Turn on 16-bit byte swapping */ +void PNGAPI +png_set_swap(png_structrp png_ptr) +{ + png_debug(1, "in png_set_swap"); + + if (png_ptr == NULL) + return; + + if (png_ptr->bit_depth == 16) + png_ptr->transformations |= PNG_SWAP_BYTES; +} +#endif + +#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED) +/* Turn on pixel packing */ +void PNGAPI +png_set_packing(png_structrp png_ptr) +{ + png_debug(1, "in png_set_packing"); + + if (png_ptr == NULL) + return; + + if (png_ptr->bit_depth < 8) + { + png_ptr->transformations |= PNG_PACK; +# ifdef PNG_WRITE_SUPPORTED + png_ptr->usr_bit_depth = 8; +# endif + } +} +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED) +/* Turn on packed pixel swapping */ +void PNGAPI +png_set_packswap(png_structrp png_ptr) +{ + png_debug(1, "in png_set_packswap"); + + if (png_ptr == NULL) + return; + + if (png_ptr->bit_depth < 8) + png_ptr->transformations |= PNG_PACKSWAP; +} +#endif + +#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) +void PNGAPI +png_set_shift(png_structrp png_ptr, png_const_color_8p true_bits) +{ + png_debug(1, "in png_set_shift"); + + if (png_ptr == NULL) + return; + + png_ptr->transformations |= PNG_SHIFT; + png_ptr->shift = *true_bits; +} +#endif + +#if defined(PNG_READ_INTERLACING_SUPPORTED) || \ + defined(PNG_WRITE_INTERLACING_SUPPORTED) +int PNGAPI +png_set_interlace_handling(png_structrp png_ptr) +{ + png_debug(1, "in png_set_interlace handling"); + + if (png_ptr != 0 && png_ptr->interlaced != 0) + { + png_ptr->transformations |= PNG_INTERLACE; + return 7; + } + + return 1; +} +#endif + +#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) +/* Add a filler byte on read, or remove a filler or alpha byte on write. + * The filler type has changed in v0.95 to allow future 2-byte fillers + * for 48-bit input data, as well as to avoid problems with some compilers + * that don't like bytes as parameters. + */ +void PNGAPI +png_set_filler(png_structrp png_ptr, png_uint_32 filler, int filler_loc) +{ + png_debug(1, "in png_set_filler"); + + if (png_ptr == NULL) + return; + + /* In libpng 1.6 it is possible to determine whether this is a read or write + * operation and therefore to do more checking here for a valid call. + */ + if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0) + { +# ifdef PNG_READ_FILLER_SUPPORTED + /* On read png_set_filler is always valid, regardless of the base PNG + * format, because other transformations can give a format where the + * filler code can execute (basically an 8 or 16-bit component RGB or G + * format.) + * + * NOTE: usr_channels is not used by the read code! (This has led to + * confusion in the past.) The filler is only used in the read code. + */ + png_ptr->filler = (png_uint_16)filler; +# else + png_app_error(png_ptr, "png_set_filler not supported on read"); + PNG_UNUSED(filler) /* not used in the write case */ + return; +# endif + } + + else /* write */ + { +# ifdef PNG_WRITE_FILLER_SUPPORTED + /* On write the usr_channels parameter must be set correctly at the + * start to record the number of channels in the app-supplied data. + */ + switch (png_ptr->color_type) + { + case PNG_COLOR_TYPE_RGB: + png_ptr->usr_channels = 4; + break; + + case PNG_COLOR_TYPE_GRAY: + if (png_ptr->bit_depth >= 8) + { + png_ptr->usr_channels = 2; + break; + } + + else + { + /* There simply isn't any code in libpng to strip out bits + * from bytes when the components are less than a byte in + * size! + */ + png_app_error(png_ptr, + "png_set_filler is invalid for" + " low bit depth gray output"); + return; + } + + default: + png_app_error(png_ptr, + "png_set_filler: inappropriate color type"); + return; + } +# else + png_app_error(png_ptr, "png_set_filler not supported on write"); + return; +# endif + } + + /* Here on success - libpng supports the operation, set the transformation + * and the flag to say where the filler channel is. + */ + png_ptr->transformations |= PNG_FILLER; + + if (filler_loc == PNG_FILLER_AFTER) + png_ptr->flags |= PNG_FLAG_FILLER_AFTER; + + else + png_ptr->flags &= ~PNG_FLAG_FILLER_AFTER; +} + +/* Added to libpng-1.2.7 */ +void PNGAPI +png_set_add_alpha(png_structrp png_ptr, png_uint_32 filler, int filler_loc) +{ + png_debug(1, "in png_set_add_alpha"); + + if (png_ptr == NULL) + return; + + png_set_filler(png_ptr, filler, filler_loc); + /* The above may fail to do anything. */ + if ((png_ptr->transformations & PNG_FILLER) != 0) + png_ptr->transformations |= PNG_ADD_ALPHA; +} + +#endif + +#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED) +void PNGAPI +png_set_swap_alpha(png_structrp png_ptr) +{ + png_debug(1, "in png_set_swap_alpha"); + + if (png_ptr == NULL) + return; + + png_ptr->transformations |= PNG_SWAP_ALPHA; +} +#endif + +#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \ + defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED) +void PNGAPI +png_set_invert_alpha(png_structrp png_ptr) +{ + png_debug(1, "in png_set_invert_alpha"); + + if (png_ptr == NULL) + return; + + png_ptr->transformations |= PNG_INVERT_ALPHA; +} +#endif + +#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED) +void PNGAPI +png_set_invert_mono(png_structrp png_ptr) +{ + png_debug(1, "in png_set_invert_mono"); + + if (png_ptr == NULL) + return; + + png_ptr->transformations |= PNG_INVERT_MONO; +} + +/* Invert monochrome grayscale data */ +void /* PRIVATE */ +png_do_invert(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_invert"); + + /* This test removed from libpng version 1.0.13 and 1.2.0: + * if (row_info->bit_depth == 1 && + */ + if (row_info->color_type == PNG_COLOR_TYPE_GRAY) + { + png_bytep rp = row; + size_t i; + size_t istop = row_info->rowbytes; + + for (i = 0; i < istop; i++) + { + *rp = (png_byte)(~(*rp)); + rp++; + } + } + + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && + row_info->bit_depth == 8) + { + png_bytep rp = row; + size_t i; + size_t istop = row_info->rowbytes; + + for (i = 0; i < istop; i += 2) + { + *rp = (png_byte)(~(*rp)); + rp += 2; + } + } + +#ifdef PNG_16BIT_SUPPORTED + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA && + row_info->bit_depth == 16) + { + png_bytep rp = row; + size_t i; + size_t istop = row_info->rowbytes; + + for (i = 0; i < istop; i += 4) + { + *rp = (png_byte)(~(*rp)); + *(rp + 1) = (png_byte)(~(*(rp + 1))); + rp += 4; + } + } +#endif +} +#endif + +#ifdef PNG_16BIT_SUPPORTED +#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) +/* Swaps byte order on 16-bit depth images */ +void /* PRIVATE */ +png_do_swap(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_swap"); + + if (row_info->bit_depth == 16) + { + png_bytep rp = row; + png_uint_32 i; + png_uint_32 istop= row_info->width * row_info->channels; + + for (i = 0; i < istop; i++, rp += 2) + { +#ifdef PNG_BUILTIN_BSWAP16_SUPPORTED + /* Feature added to libpng-1.6.11 for testing purposes, not + * enabled by default. + */ + *(png_uint_16*)rp = __builtin_bswap16(*(png_uint_16*)rp); +#else + png_byte t = *rp; + *rp = *(rp + 1); + *(rp + 1) = t; +#endif + } + } +} +#endif +#endif + +#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED) +static const png_byte onebppswaptable[256] = { + 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, + 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, + 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, + 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, + 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4, + 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, + 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, + 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC, + 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, + 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2, + 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, + 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA, + 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, + 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, + 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, + 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, + 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, + 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1, + 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, + 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9, + 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, + 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, + 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED, + 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, + 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, + 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, + 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, + 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB, + 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, + 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7, + 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, + 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF +}; + +static const png_byte twobppswaptable[256] = { + 0x00, 0x40, 0x80, 0xC0, 0x10, 0x50, 0x90, 0xD0, + 0x20, 0x60, 0xA0, 0xE0, 0x30, 0x70, 0xB0, 0xF0, + 0x04, 0x44, 0x84, 0xC4, 0x14, 0x54, 0x94, 0xD4, + 0x24, 0x64, 0xA4, 0xE4, 0x34, 0x74, 0xB4, 0xF4, + 0x08, 0x48, 0x88, 0xC8, 0x18, 0x58, 0x98, 0xD8, + 0x28, 0x68, 0xA8, 0xE8, 0x38, 0x78, 0xB8, 0xF8, + 0x0C, 0x4C, 0x8C, 0xCC, 0x1C, 0x5C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2B, 0x6B, 0xAB, 0xEB, 0x3B, 0x7B, 0xBB, 0xFB, + 0x0F, 0x4F, 0x8F, 0xCF, 0x1F, 0x5F, 0x9F, 0xDF, + 0x2F, 0x6F, 0xAF, 0xEF, 0x3F, 0x7F, 0xBF, 0xFF +}; + +static const png_byte fourbppswaptable[256] = { + 0x00, 0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, + 0x80, 0x90, 0xA0, 0xB0, 0xC0, 0xD0, 0xE0, 0xF0, + 0x01, 0x11, 0x21, 0x31, 0x41, 0x51, 0x61, 0x71, + 0x81, 0x91, 0xA1, 0xB1, 0xC1, 0xD1, 0xE1, 0xF1, + 0x02, 0x12, 0x22, 0x32, 0x42, 0x52, 0x62, 0x72, + 0x82, 0x92, 0xA2, 0xB2, 0xC2, 0xD2, 0xE2, 0xF2, + 0x03, 0x13, 0x23, 0x33, 0x43, 0x53, 0x63, 0x73, + 0x83, 0x93, 0xA3, 0xB3, 0xC3, 0xD3, 0xE3, 0xF3, + 0x04, 0x14, 0x24, 0x34, 0x44, 0x54, 0x64, 0x74, + 0x84, 0x94, 0xA4, 0xB4, 0xC4, 0xD4, 0xE4, 0xF4, + 0x05, 0x15, 0x25, 0x35, 0x45, 0x55, 0x65, 0x75, + 0x85, 0x95, 0xA5, 0xB5, 0xC5, 0xD5, 0xE5, 0xF5, + 0x06, 0x16, 0x26, 0x36, 0x46, 0x56, 0x66, 0x76, + 0x86, 0x96, 0xA6, 0xB6, 0xC6, 0xD6, 0xE6, 0xF6, + 0x07, 0x17, 0x27, 0x37, 0x47, 0x57, 0x67, 0x77, + 0x87, 0x97, 0xA7, 0xB7, 0xC7, 0xD7, 0xE7, 0xF7, + 0x08, 0x18, 0x28, 0x38, 0x48, 0x58, 0x68, 0x78, + 0x88, 0x98, 0xA8, 0xB8, 0xC8, 0xD8, 0xE8, 0xF8, + 0x09, 0x19, 0x29, 0x39, 0x49, 0x59, 0x69, 0x79, + 0x89, 0x99, 0xA9, 0xB9, 0xC9, 0xD9, 0xE9, 0xF9, + 0x0A, 0x1A, 0x2A, 0x3A, 0x4A, 0x5A, 0x6A, 0x7A, + 0x8A, 0x9A, 0xAA, 0xBA, 0xCA, 0xDA, 0xEA, 0xFA, + 0x0B, 0x1B, 0x2B, 0x3B, 0x4B, 0x5B, 0x6B, 0x7B, + 0x8B, 0x9B, 0xAB, 0xBB, 0xCB, 0xDB, 0xEB, 0xFB, + 0x0C, 0x1C, 0x2C, 0x3C, 0x4C, 0x5C, 0x6C, 0x7C, + 0x8C, 0x9C, 0xAC, 0xBC, 0xCC, 0xDC, 0xEC, 0xFC, + 0x0D, 0x1D, 0x2D, 0x3D, 0x4D, 0x5D, 0x6D, 0x7D, + 0x8D, 0x9D, 0xAD, 0xBD, 0xCD, 0xDD, 0xED, 0xFD, + 0x0E, 0x1E, 0x2E, 0x3E, 0x4E, 0x5E, 0x6E, 0x7E, + 0x8E, 0x9E, 0xAE, 0xBE, 0xCE, 0xDE, 0xEE, 0xFE, + 0x0F, 0x1F, 0x2F, 0x3F, 0x4F, 0x5F, 0x6F, 0x7F, + 0x8F, 0x9F, 0xAF, 0xBF, 0xCF, 0xDF, 0xEF, 0xFF +}; + +/* Swaps pixel packing order within bytes */ +void /* PRIVATE */ +png_do_packswap(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_packswap"); + + if (row_info->bit_depth < 8) + { + png_bytep rp; + png_const_bytep end, table; + + end = row + row_info->rowbytes; + + if (row_info->bit_depth == 1) + table = onebppswaptable; + + else if (row_info->bit_depth == 2) + table = twobppswaptable; + + else if (row_info->bit_depth == 4) + table = fourbppswaptable; + + else + return; + + for (rp = row; rp < end; rp++) + *rp = table[*rp]; + } +} +#endif /* PACKSWAP || WRITE_PACKSWAP */ + +#if defined(PNG_WRITE_FILLER_SUPPORTED) || \ + defined(PNG_READ_STRIP_ALPHA_SUPPORTED) +/* Remove a channel - this used to be 'png_do_strip_filler' but it used a + * somewhat weird combination of flags to determine what to do. All the calls + * to png_do_strip_filler are changed in 1.5.2 to call this instead with the + * correct arguments. + * + * The routine isn't general - the channel must be the channel at the start or + * end (not in the middle) of each pixel. + */ +void /* PRIVATE */ +png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start) +{ + png_bytep sp = row; /* source pointer */ + png_bytep dp = row; /* destination pointer */ + png_bytep ep = row + row_info->rowbytes; /* One beyond end of row */ + + png_debug(1, "in png_do_strip_channel"); + + /* At the start sp will point to the first byte to copy and dp to where + * it is copied to. ep always points just beyond the end of the row, so + * the loop simply copies (channels-1) channels until sp reaches ep. + * + * at_start: 0 -- convert AG, XG, ARGB, XRGB, AAGG, XXGG, etc. + * nonzero -- convert GA, GX, RGBA, RGBX, GGAA, RRGGBBXX, etc. + */ + + /* GA, GX, XG cases */ + if (row_info->channels == 2) + { + if (row_info->bit_depth == 8) + { + if (at_start != 0) /* Skip initial filler */ + ++sp; + else /* Skip initial channel and, for sp, the filler */ + { + sp += 2; ++dp; + } + + /* For a 1 pixel wide image there is nothing to do */ + while (sp < ep) + { + *dp++ = *sp; sp += 2; + } + + row_info->pixel_depth = 8; + } + + else if (row_info->bit_depth == 16) + { + if (at_start != 0) /* Skip initial filler */ + sp += 2; + else /* Skip initial channel and, for sp, the filler */ + { + sp += 4; dp += 2; + } + + while (sp < ep) + { + *dp++ = *sp++; *dp++ = *sp; sp += 3; + } + + row_info->pixel_depth = 16; + } + + else + return; /* bad bit depth */ + + row_info->channels = 1; + + /* Finally fix the color type if it records an alpha channel */ + if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + row_info->color_type = PNG_COLOR_TYPE_GRAY; + } + + /* RGBA, RGBX, XRGB cases */ + else if (row_info->channels == 4) + { + if (row_info->bit_depth == 8) + { + if (at_start != 0) /* Skip initial filler */ + ++sp; + else /* Skip initial channels and, for sp, the filler */ + { + sp += 4; dp += 3; + } + + /* Note that the loop adds 3 to dp and 4 to sp each time. */ + while (sp < ep) + { + *dp++ = *sp++; *dp++ = *sp++; *dp++ = *sp; sp += 2; + } + + row_info->pixel_depth = 24; + } + + else if (row_info->bit_depth == 16) + { + if (at_start != 0) /* Skip initial filler */ + sp += 2; + else /* Skip initial channels and, for sp, the filler */ + { + sp += 8; dp += 6; + } + + while (sp < ep) + { + /* Copy 6 bytes, skip 2 */ + *dp++ = *sp++; *dp++ = *sp++; + *dp++ = *sp++; *dp++ = *sp++; + *dp++ = *sp++; *dp++ = *sp; sp += 3; + } + + row_info->pixel_depth = 48; + } + + else + return; /* bad bit depth */ + + row_info->channels = 3; + + /* Finally fix the color type if it records an alpha channel */ + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + row_info->color_type = PNG_COLOR_TYPE_RGB; + } + + else + return; /* The filler channel has gone already */ + + /* Fix the rowbytes value. */ + row_info->rowbytes = (size_t)(dp-row); +} +#endif + +#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED) +/* Swaps red and blue bytes within a pixel */ +void /* PRIVATE */ +png_do_bgr(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_bgr"); + + if ((row_info->color_type & PNG_COLOR_MASK_COLOR) != 0) + { + png_uint_32 row_width = row_info->width; + if (row_info->bit_depth == 8) + { + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + { + png_bytep rp; + png_uint_32 i; + + for (i = 0, rp = row; i < row_width; i++, rp += 3) + { + png_byte save = *rp; + *rp = *(rp + 2); + *(rp + 2) = save; + } + } + + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_bytep rp; + png_uint_32 i; + + for (i = 0, rp = row; i < row_width; i++, rp += 4) + { + png_byte save = *rp; + *rp = *(rp + 2); + *(rp + 2) = save; + } + } + } + +#ifdef PNG_16BIT_SUPPORTED + else if (row_info->bit_depth == 16) + { + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + { + png_bytep rp; + png_uint_32 i; + + for (i = 0, rp = row; i < row_width; i++, rp += 6) + { + png_byte save = *rp; + *rp = *(rp + 4); + *(rp + 4) = save; + save = *(rp + 1); + *(rp + 1) = *(rp + 5); + *(rp + 5) = save; + } + } + + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + png_bytep rp; + png_uint_32 i; + + for (i = 0, rp = row; i < row_width; i++, rp += 8) + { + png_byte save = *rp; + *rp = *(rp + 4); + *(rp + 4) = save; + save = *(rp + 1); + *(rp + 1) = *(rp + 5); + *(rp + 5) = save; + } + } + } +#endif + } +} +#endif /* READ_BGR || WRITE_BGR */ + +#if defined(PNG_READ_CHECK_FOR_INVALID_INDEX_SUPPORTED) || \ + defined(PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED) +/* Added at libpng-1.5.10 */ +void /* PRIVATE */ +png_do_check_palette_indexes(png_structrp png_ptr, png_row_infop row_info) +{ + png_debug(1, "in png_do_check_palette_indexes"); + + if (png_ptr->num_palette < (1 << row_info->bit_depth) && + png_ptr->num_palette > 0) /* num_palette can be 0 in MNG files */ + { + /* Calculations moved outside switch in an attempt to stop different + * compiler warnings. 'padding' is in *bits* within the last byte, it is + * an 'int' because pixel_depth becomes an 'int' in the expression below, + * and this calculation is used because it avoids warnings that other + * forms produced on either GCC or MSVC. + */ + int padding = PNG_PADBITS(row_info->pixel_depth, row_info->width); + png_bytep rp = png_ptr->row_buf + row_info->rowbytes; + + switch (row_info->bit_depth) + { + case 1: + { + /* in this case, all bytes must be 0 so we don't need + * to unpack the pixels except for the rightmost one. + */ + for (; rp > png_ptr->row_buf; rp--) + { + if ((*rp >> padding) != 0) + png_ptr->num_palette_max = 1; + padding = 0; + } + + break; + } + + case 2: + { + for (; rp > png_ptr->row_buf; rp--) + { + int i = ((*rp >> padding) & 0x03); + + if (i > png_ptr->num_palette_max) + png_ptr->num_palette_max = i; + + i = (((*rp >> padding) >> 2) & 0x03); + + if (i > png_ptr->num_palette_max) + png_ptr->num_palette_max = i; + + i = (((*rp >> padding) >> 4) & 0x03); + + if (i > png_ptr->num_palette_max) + png_ptr->num_palette_max = i; + + i = (((*rp >> padding) >> 6) & 0x03); + + if (i > png_ptr->num_palette_max) + png_ptr->num_palette_max = i; + + padding = 0; + } + + break; + } + + case 4: + { + for (; rp > png_ptr->row_buf; rp--) + { + int i = ((*rp >> padding) & 0x0f); + + if (i > png_ptr->num_palette_max) + png_ptr->num_palette_max = i; + + i = (((*rp >> padding) >> 4) & 0x0f); + + if (i > png_ptr->num_palette_max) + png_ptr->num_palette_max = i; + + padding = 0; + } + + break; + } + + case 8: + { + for (; rp > png_ptr->row_buf; rp--) + { + if (*rp > png_ptr->num_palette_max) + png_ptr->num_palette_max = (int) *rp; + } + + break; + } + + default: + break; + } + } +} +#endif /* CHECK_FOR_INVALID_INDEX */ + +#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ + defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +void PNGAPI +png_set_user_transform_info(png_structrp png_ptr, png_voidp + user_transform_ptr, int user_transform_depth, int user_transform_channels) +{ + png_debug(1, "in png_set_user_transform_info"); + + if (png_ptr == NULL) + return; + +#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED + if ((png_ptr->mode & PNG_IS_READ_STRUCT) != 0 && + (png_ptr->flags & PNG_FLAG_ROW_INIT) != 0) + { + png_app_error(png_ptr, + "info change after png_start_read_image or png_read_update_info"); + return; + } +#endif + + png_ptr->user_transform_ptr = user_transform_ptr; + png_ptr->user_transform_depth = (png_byte)user_transform_depth; + png_ptr->user_transform_channels = (png_byte)user_transform_channels; +} +#endif + +/* This function returns a pointer to the user_transform_ptr associated with + * the user transform functions. The application should free any memory + * associated with this pointer before png_write_destroy and png_read_destroy + * are called. + */ +#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED +png_voidp PNGAPI +png_get_user_transform_ptr(png_const_structrp png_ptr) +{ + if (png_ptr == NULL) + return NULL; + + return png_ptr->user_transform_ptr; +} +#endif + +#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED +png_uint_32 PNGAPI +png_get_current_row_number(png_const_structrp png_ptr) +{ + /* See the comments in png.h - this is the sub-image row when reading an + * interlaced image. + */ + if (png_ptr != NULL) + return png_ptr->row_number; + + return PNG_UINT_32_MAX; /* help the app not to fail silently */ +} + +png_byte PNGAPI +png_get_current_pass_number(png_const_structrp png_ptr) +{ + if (png_ptr != NULL) + return png_ptr->pass; + return 8; /* invalid */ +} +#endif /* USER_TRANSFORM_INFO */ +#endif /* READ_USER_TRANSFORM || WRITE_USER_TRANSFORM */ +#endif /* READ || WRITE */ diff --git a/widget/milsko/milskosrc/external/libpng/src/pngwio.c b/widget/milsko/milskosrc/external/libpng/src/pngwio.c new file mode 100644 index 0000000000..96a3187ff0 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/src/pngwio.c @@ -0,0 +1,167 @@ +/* pngwio.c - functions for data output + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2014,2016,2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This file provides a location for all output. Users who need + * special handling are expected to write functions that have the same + * arguments as these and perform similar functions, but that possibly + * use different output methods. Note that you shouldn't change these + * functions, but rather write replacement functions and then change + * them at run time with png_set_write_fn(...). + */ + +#include "pngpriv.h" + +#ifdef PNG_WRITE_SUPPORTED + +/* Write the data to whatever output you are using. The default routine + * writes to a file pointer. Note that this routine sometimes gets called + * with very small lengths, so you should implement some kind of simple + * buffering if you are using unbuffered writes. This should never be asked + * to write more than 64K on a 16-bit machine. + */ + +void /* PRIVATE */ +png_write_data(png_structrp png_ptr, png_const_bytep data, size_t length) +{ + /* NOTE: write_data_fn must not change the buffer! */ + if (png_ptr->write_data_fn != NULL ) + (*(png_ptr->write_data_fn))(png_ptr, png_constcast(png_bytep,data), + length); + + else + png_error(png_ptr, "Call to NULL write function"); +} + +#ifdef PNG_STDIO_SUPPORTED +/* This is the function that does the actual writing of data. If you are + * not writing to a standard C stream, you should create a replacement + * write_data function and use it at run time with png_set_write_fn(), rather + * than changing the library. + */ +void PNGCBAPI +png_default_write_data(png_structp png_ptr, png_bytep data, size_t length) +{ + size_t check; + + if (png_ptr == NULL) + return; + + check = fwrite(data, 1, length, (FILE *)png_ptr->io_ptr); + + if (check != length) + png_error(png_ptr, "Write Error"); +} +#endif + +/* This function is called to output any data pending writing (normally + * to disk). After png_flush is called, there should be no data pending + * writing in any buffers. + */ +#ifdef PNG_WRITE_FLUSH_SUPPORTED +void /* PRIVATE */ +png_flush(png_structrp png_ptr) +{ + if (png_ptr->output_flush_fn != NULL) + (*(png_ptr->output_flush_fn))(png_ptr); +} + +# ifdef PNG_STDIO_SUPPORTED +void PNGCBAPI +png_default_flush(png_structp png_ptr) +{ + FILE *io_ptr; + + if (png_ptr == NULL) + return; + + io_ptr = png_voidcast(FILE *, png_ptr->io_ptr); + fflush(io_ptr); +} +# endif +#endif + +/* This function allows the application to supply new output functions for + * libpng if standard C streams aren't being used. + * + * This function takes as its arguments: + * png_ptr - pointer to a png output data structure + * io_ptr - pointer to user supplied structure containing info about + * the output functions. May be NULL. + * write_data_fn - pointer to a new output function that takes as its + * arguments a pointer to a png_struct, a pointer to + * data to be written, and a 32-bit unsigned int that is + * the number of bytes to be written. The new write + * function should call png_error(png_ptr, "Error msg") + * to exit and output any fatal error messages. May be + * NULL, in which case libpng's default function will + * be used. + * flush_data_fn - pointer to a new flush function that takes as its + * arguments a pointer to a png_struct. After a call to + * the flush function, there should be no data in any buffers + * or pending transmission. If the output method doesn't do + * any buffering of output, a function prototype must still be + * supplied although it doesn't have to do anything. If + * PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile + * time, output_flush_fn will be ignored, although it must be + * supplied for compatibility. May be NULL, in which case + * libpng's default function will be used, if + * PNG_WRITE_FLUSH_SUPPORTED is defined. This is not + * a good idea if io_ptr does not point to a standard + * *FILE structure. + */ +void PNGAPI +png_set_write_fn(png_structrp png_ptr, png_voidp io_ptr, + png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn) +{ + if (png_ptr == NULL) + return; + + png_ptr->io_ptr = io_ptr; + +#ifdef PNG_STDIO_SUPPORTED + if (write_data_fn != NULL) + png_ptr->write_data_fn = write_data_fn; + + else + png_ptr->write_data_fn = png_default_write_data; +#else + png_ptr->write_data_fn = write_data_fn; +#endif + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +# ifdef PNG_STDIO_SUPPORTED + + if (output_flush_fn != NULL) + png_ptr->output_flush_fn = output_flush_fn; + + else + png_ptr->output_flush_fn = png_default_flush; + +# else + png_ptr->output_flush_fn = output_flush_fn; +# endif +#else + PNG_UNUSED(output_flush_fn) +#endif /* WRITE_FLUSH */ + +#ifdef PNG_READ_SUPPORTED + /* It is an error to read while writing a png file */ + if (png_ptr->read_data_fn != NULL) + { + png_ptr->read_data_fn = NULL; + + png_warning(png_ptr, + "Can't set both read_data_fn and write_data_fn in the" + " same structure"); + } +#endif +} +#endif /* WRITE */ diff --git a/widget/milsko/milskosrc/external/libpng/src/pngwrite.c b/widget/milsko/milskosrc/external/libpng/src/pngwrite.c new file mode 100644 index 0000000000..35a5d17b60 --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/src/pngwrite.c @@ -0,0 +1,2449 @@ +/* pngwrite.c - general routines to write a PNG file + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +#include "pngpriv.h" +#ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED +# include +#endif /* SIMPLIFIED_WRITE_STDIO */ + +#ifdef PNG_WRITE_SUPPORTED + +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED +/* Write out all the unknown chunks for the current given location */ +static void +write_unknown_chunks(png_structrp png_ptr, png_const_inforp info_ptr, + unsigned int where) +{ + if (info_ptr->unknown_chunks_num != 0) + { + png_const_unknown_chunkp up; + + png_debug(5, "writing extra chunks"); + + for (up = info_ptr->unknown_chunks; + up < info_ptr->unknown_chunks + info_ptr->unknown_chunks_num; + ++up) + if ((up->location & where) != 0) + { + /* If per-chunk unknown chunk handling is enabled use it, otherwise + * just write the chunks the application has set. + */ +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED + int keep = png_handle_as_unknown(png_ptr, up->name); + + /* NOTE: this code is radically different from the read side in the + * matter of handling an ancillary unknown chunk. In the read side + * the default behavior is to discard it, in the code below the default + * behavior is to write it. Critical chunks are, however, only + * written if explicitly listed or if the default is set to write all + * unknown chunks. + * + * The default handling is also slightly weird - it is not possible to + * stop the writing of all unsafe-to-copy chunks! + * + * TODO: REVIEW: this would seem to be a bug. + */ + if (keep != PNG_HANDLE_CHUNK_NEVER && + ((up->name[3] & 0x20) /* safe-to-copy overrides everything */ || + keep == PNG_HANDLE_CHUNK_ALWAYS || + (keep == PNG_HANDLE_CHUNK_AS_DEFAULT && + png_ptr->unknown_default == PNG_HANDLE_CHUNK_ALWAYS))) +#endif + { + /* TODO: review, what is wrong with a zero length unknown chunk? */ + if (up->size == 0) + png_warning(png_ptr, "Writing zero-length unknown chunk"); + + png_write_chunk(png_ptr, up->name, up->data, up->size); + } + } + } +} +#endif /* WRITE_UNKNOWN_CHUNKS */ + +/* Writes all the PNG information. This is the suggested way to use the + * library. If you have a new chunk to add, make a function to write it, + * and put it in the correct location here. If you want the chunk written + * after the image data, put it in png_write_end(). I strongly encourage + * you to supply a PNG_INFO_ flag, and check info_ptr->valid before + * writing the chunk, as that will keep the code from breaking if you want + * to just write a plain PNG file. If you have long comments, I suggest + * writing them in png_write_end(), and compressing them. + */ +void PNGAPI +png_write_info_before_PLTE(png_structrp png_ptr, png_const_inforp info_ptr) +{ + png_debug(1, "in png_write_info_before_PLTE"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + if ((png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE) == 0) + { + /* Write PNG signature */ + png_write_sig(png_ptr); + +#ifdef PNG_MNG_FEATURES_SUPPORTED + if ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) != 0 && \ + png_ptr->mng_features_permitted != 0) + { + png_warning(png_ptr, + "MNG features are not allowed in a PNG datastream"); + png_ptr->mng_features_permitted = 0; + } +#endif + + /* Write IHDR information. */ + png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height, + info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type, + info_ptr->filter_type, +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + info_ptr->interlace_type +#else + 0 +#endif + ); + + /* The rest of these check to see if the valid field has the appropriate + * flag set, and if it does, writes the chunk. + * + * 1.6.0: COLORSPACE support controls the writing of these chunks too, and + * the chunks will be written if the WRITE routine is there and + * information * is available in the COLORSPACE. (See + * png_colorspace_sync_info in png.c for where the valid flags get set.) + * + * Under certain circumstances the colorspace can be invalidated without + * syncing the info_struct 'valid' flags; this happens if libpng detects + * an error and calls png_error while the color space is being set, yet + * the application continues writing the PNG. So check the 'invalid' + * flag here too. + */ +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED + /* Write unknown chunks first; PNG v3 establishes a precedence order + * for colourspace chunks. It is certain therefore that new + * colourspace chunks will have a precedence and very likely it will be + * higher than all known so far. Writing the unknown chunks here is + * most likely to present the chunks in the most convenient order. + * + * FUTURE: maybe write chunks in the order the app calls png_set_chnk + * to give the app control. + */ + write_unknown_chunks(png_ptr, info_ptr, PNG_HAVE_IHDR); +#endif + +#ifdef PNG_WRITE_sBIT_SUPPORTED + /* PNG v3: a streaming app will need to see this before cICP because + * the information is helpful in handling HLG encoding (which is + * natively 10 bits but gets expanded to 16 in PNG.) + * + * The app shouldn't care about the order ideally, but it might have + * no choice. In PNG v3, apps are allowed to reject PNGs where the + * APNG chunks are out of order so it behooves libpng to be nice here. + */ + if ((info_ptr->valid & PNG_INFO_sBIT) != 0) + png_write_sBIT(png_ptr, &(info_ptr->sig_bit), info_ptr->color_type); +#endif + + /* PNG v3: the July 2004 version of the TR introduced the concept of colour + * space priority. As above it therefore behooves libpng to write the colour + * space chunks in the priority order so that a streaming app need not buffer + * them. + * + * PNG v3: Chunks mDCV and cLLI provide ancillary information for the + * interpretation of the colourspace chunkgs but do not require support for + * those chunks so are outside the "COLORSPACE" check but before the write of + * the colourspace chunks themselves. + */ +#ifdef PNG_WRITE_cLLI_SUPPORTED + if ((info_ptr->valid & PNG_INFO_cLLI) != 0) + { + png_write_cLLI_fixed(png_ptr, info_ptr->maxCLL, info_ptr->maxFALL); + } +#endif +#ifdef PNG_WRITE_mDCV_SUPPORTED + if ((info_ptr->valid & PNG_INFO_mDCV) != 0) + { + png_write_mDCV_fixed(png_ptr, + info_ptr->mastering_red_x, info_ptr->mastering_red_y, + info_ptr->mastering_green_x, info_ptr->mastering_green_y, + info_ptr->mastering_blue_x, info_ptr->mastering_blue_y, + info_ptr->mastering_white_x, info_ptr->mastering_white_y, + info_ptr->mastering_maxDL, info_ptr->mastering_minDL); + } +#endif + +# ifdef PNG_WRITE_cICP_SUPPORTED /* Priority 4 */ + if ((info_ptr->valid & PNG_INFO_cICP) != 0) + { + png_write_cICP(png_ptr, + info_ptr->cicp_colour_primaries, + info_ptr->cicp_transfer_function, + info_ptr->cicp_matrix_coefficients, + info_ptr->cicp_video_full_range_flag); + } +# endif + +# ifdef PNG_WRITE_iCCP_SUPPORTED /* Priority 3 */ + if ((info_ptr->valid & PNG_INFO_iCCP) != 0) + { + png_write_iCCP(png_ptr, info_ptr->iccp_name, + info_ptr->iccp_profile, info_ptr->iccp_proflen); + } +# endif + +# ifdef PNG_WRITE_sRGB_SUPPORTED /* Priority 2 */ + if ((info_ptr->valid & PNG_INFO_sRGB) != 0) + png_write_sRGB(png_ptr, info_ptr->rendering_intent); +# endif /* WRITE_sRGB */ + +# ifdef PNG_WRITE_gAMA_SUPPORTED /* Priority 1 */ + if ((info_ptr->valid & PNG_INFO_gAMA) != 0) + png_write_gAMA_fixed(png_ptr, info_ptr->gamma); +# endif + +# ifdef PNG_WRITE_cHRM_SUPPORTED /* Also priority 1 */ + if ((info_ptr->valid & PNG_INFO_cHRM) != 0) + png_write_cHRM_fixed(png_ptr, &info_ptr->cHRM); +# endif + + png_ptr->mode |= PNG_WROTE_INFO_BEFORE_PLTE; + } +} + +void PNGAPI +png_write_info(png_structrp png_ptr, png_const_inforp info_ptr) +{ +#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) + int i; +#endif + + png_debug(1, "in png_write_info"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + png_write_info_before_PLTE(png_ptr, info_ptr); + + if ((info_ptr->valid & PNG_INFO_PLTE) != 0) + png_write_PLTE(png_ptr, info_ptr->palette, + (png_uint_32)info_ptr->num_palette); + + else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + png_error(png_ptr, "Valid palette required for paletted images"); + +#ifdef PNG_WRITE_tRNS_SUPPORTED + if ((info_ptr->valid & PNG_INFO_tRNS) !=0) + { +#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED + /* Invert the alpha channel (in tRNS) */ + if ((png_ptr->transformations & PNG_INVERT_ALPHA) != 0 && + info_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + int j, jend; + + jend = info_ptr->num_trans; + if (jend > PNG_MAX_PALETTE_LENGTH) + jend = PNG_MAX_PALETTE_LENGTH; + + for (j = 0; jtrans_alpha[j] = + (png_byte)(255 - info_ptr->trans_alpha[j]); + } +#endif + png_write_tRNS(png_ptr, info_ptr->trans_alpha, &(info_ptr->trans_color), + info_ptr->num_trans, info_ptr->color_type); + } +#endif +#ifdef PNG_WRITE_bKGD_SUPPORTED + if ((info_ptr->valid & PNG_INFO_bKGD) != 0) + png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type); +#endif + +#ifdef PNG_WRITE_eXIf_SUPPORTED + if ((info_ptr->valid & PNG_INFO_eXIf) != 0) + { + png_write_eXIf(png_ptr, info_ptr->exif, info_ptr->num_exif); + png_ptr->mode |= PNG_WROTE_eXIf; + } +#endif + +#ifdef PNG_WRITE_hIST_SUPPORTED + if ((info_ptr->valid & PNG_INFO_hIST) != 0) + png_write_hIST(png_ptr, info_ptr->hist, info_ptr->num_palette); +#endif + +#ifdef PNG_WRITE_oFFs_SUPPORTED + if ((info_ptr->valid & PNG_INFO_oFFs) != 0) + png_write_oFFs(png_ptr, info_ptr->x_offset, info_ptr->y_offset, + info_ptr->offset_unit_type); +#endif + +#ifdef PNG_WRITE_pCAL_SUPPORTED + if ((info_ptr->valid & PNG_INFO_pCAL) != 0) + png_write_pCAL(png_ptr, info_ptr->pcal_purpose, info_ptr->pcal_X0, + info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams, + info_ptr->pcal_units, info_ptr->pcal_params); +#endif + +#ifdef PNG_WRITE_sCAL_SUPPORTED + if ((info_ptr->valid & PNG_INFO_sCAL) != 0) + png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit, + info_ptr->scal_s_width, info_ptr->scal_s_height); +#endif /* sCAL */ + +#ifdef PNG_WRITE_pHYs_SUPPORTED + if ((info_ptr->valid & PNG_INFO_pHYs) != 0) + png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit, + info_ptr->y_pixels_per_unit, info_ptr->phys_unit_type); +#endif /* pHYs */ + +#ifdef PNG_WRITE_tIME_SUPPORTED + if ((info_ptr->valid & PNG_INFO_tIME) != 0) + { + png_write_tIME(png_ptr, &(info_ptr->mod_time)); + png_ptr->mode |= PNG_WROTE_tIME; + } +#endif /* tIME */ + +#ifdef PNG_WRITE_sPLT_SUPPORTED + if ((info_ptr->valid & PNG_INFO_sPLT) != 0) + for (i = 0; i < (int)info_ptr->splt_palettes_num; i++) + png_write_sPLT(png_ptr, info_ptr->splt_palettes + i); +#endif /* sPLT */ + +#ifdef PNG_WRITE_TEXT_SUPPORTED + /* Check to see if we need to write text chunks */ + for (i = 0; i < info_ptr->num_text; i++) + { + png_debug2(2, "Writing header text chunk %d, type %d", i, + info_ptr->text[i].compression); + /* An internationalized chunk? */ + if (info_ptr->text[i].compression > 0) + { +#ifdef PNG_WRITE_iTXt_SUPPORTED + /* Write international chunk */ + png_write_iTXt(png_ptr, + info_ptr->text[i].compression, + info_ptr->text[i].key, + info_ptr->text[i].lang, + info_ptr->text[i].lang_key, + info_ptr->text[i].text); + /* Mark this chunk as written */ + if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; + else + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; +#else + png_warning(png_ptr, "Unable to write international text"); +#endif + } + + /* If we want a compressed text chunk */ + else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_zTXt) + { +#ifdef PNG_WRITE_zTXt_SUPPORTED + /* Write compressed chunk */ + png_write_zTXt(png_ptr, info_ptr->text[i].key, + info_ptr->text[i].text, info_ptr->text[i].compression); + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; +#else + png_warning(png_ptr, "Unable to write compressed text"); +#endif + } + + else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) + { +#ifdef PNG_WRITE_tEXt_SUPPORTED + /* Write uncompressed chunk */ + png_write_tEXt(png_ptr, info_ptr->text[i].key, + info_ptr->text[i].text, + 0); + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; +#else + /* Can't get here */ + png_warning(png_ptr, "Unable to write uncompressed text"); +#endif + } + } +#endif /* tEXt */ + +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED + write_unknown_chunks(png_ptr, info_ptr, PNG_HAVE_PLTE); +#endif +} + +/* Writes the end of the PNG file. If you don't want to write comments or + * time information, you can pass NULL for info. If you already wrote these + * in png_write_info(), do not write them again here. If you have long + * comments, I suggest writing them here, and compressing them. + */ +void PNGAPI +png_write_end(png_structrp png_ptr, png_inforp info_ptr) +{ + png_debug(1, "in png_write_end"); + + if (png_ptr == NULL) + return; + + if ((png_ptr->mode & PNG_HAVE_IDAT) == 0) + png_error(png_ptr, "No IDATs written into file"); + +#ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE && + png_ptr->num_palette_max >= png_ptr->num_palette) + png_benign_error(png_ptr, "Wrote palette index exceeding num_palette"); +#endif + + /* See if user wants us to write information chunks */ + if (info_ptr != NULL) + { +#ifdef PNG_WRITE_TEXT_SUPPORTED + int i; /* local index variable */ +#endif +#ifdef PNG_WRITE_tIME_SUPPORTED + /* Check to see if user has supplied a time chunk */ + if ((info_ptr->valid & PNG_INFO_tIME) != 0 && + (png_ptr->mode & PNG_WROTE_tIME) == 0) + png_write_tIME(png_ptr, &(info_ptr->mod_time)); + +#endif +#ifdef PNG_WRITE_TEXT_SUPPORTED + /* Loop through comment chunks */ + for (i = 0; i < info_ptr->num_text; i++) + { + png_debug2(2, "Writing trailer text chunk %d, type %d", i, + info_ptr->text[i].compression); + /* An internationalized chunk? */ + if (info_ptr->text[i].compression > 0) + { +#ifdef PNG_WRITE_iTXt_SUPPORTED + /* Write international chunk */ + png_write_iTXt(png_ptr, + info_ptr->text[i].compression, + info_ptr->text[i].key, + info_ptr->text[i].lang, + info_ptr->text[i].lang_key, + info_ptr->text[i].text); + /* Mark this chunk as written */ + if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; + else + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; +#else + png_warning(png_ptr, "Unable to write international text"); +#endif + } + + else if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt) + { +#ifdef PNG_WRITE_zTXt_SUPPORTED + /* Write compressed chunk */ + png_write_zTXt(png_ptr, info_ptr->text[i].key, + info_ptr->text[i].text, info_ptr->text[i].compression); + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR; +#else + png_warning(png_ptr, "Unable to write compressed text"); +#endif + } + + else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE) + { +#ifdef PNG_WRITE_tEXt_SUPPORTED + /* Write uncompressed chunk */ + png_write_tEXt(png_ptr, info_ptr->text[i].key, + info_ptr->text[i].text, 0); + /* Mark this chunk as written */ + info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR; +#else + png_warning(png_ptr, "Unable to write uncompressed text"); +#endif + } + } +#endif + +#ifdef PNG_WRITE_eXIf_SUPPORTED + if ((info_ptr->valid & PNG_INFO_eXIf) != 0 && + (png_ptr->mode & PNG_WROTE_eXIf) == 0) + png_write_eXIf(png_ptr, info_ptr->exif, info_ptr->num_exif); +#endif + +#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED + write_unknown_chunks(png_ptr, info_ptr, PNG_AFTER_IDAT); +#endif + } + + png_ptr->mode |= PNG_AFTER_IDAT; + + /* Write end of PNG file */ + png_write_IEND(png_ptr); + + /* This flush, added in libpng-1.0.8, removed from libpng-1.0.9beta03, + * and restored again in libpng-1.2.30, may cause some applications that + * do not set png_ptr->output_flush_fn to crash. If your application + * experiences a problem, please try building libpng with + * PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED defined, and report the event to + * png-mng-implement at lists.sf.net . + */ +#ifdef PNG_WRITE_FLUSH_SUPPORTED +# ifdef PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED + png_flush(png_ptr); +# endif +#endif +} + +#ifdef PNG_CONVERT_tIME_SUPPORTED +void PNGAPI +png_convert_from_struct_tm(png_timep ptime, const struct tm * ttime) +{ + png_debug(1, "in png_convert_from_struct_tm"); + + ptime->year = (png_uint_16)(1900 + ttime->tm_year); + ptime->month = (png_byte)(ttime->tm_mon + 1); + ptime->day = (png_byte)ttime->tm_mday; + ptime->hour = (png_byte)ttime->tm_hour; + ptime->minute = (png_byte)ttime->tm_min; + ptime->second = (png_byte)ttime->tm_sec; +} + +void PNGAPI +png_convert_from_time_t(png_timep ptime, time_t ttime) +{ + struct tm *tbuf; + + png_debug(1, "in png_convert_from_time_t"); + + tbuf = gmtime(&ttime); + if (tbuf == NULL) + { + /* TODO: add a safe function which takes a png_ptr argument and raises + * a png_error if the ttime argument is invalid and the call to gmtime + * fails as a consequence. + */ + memset(ptime, 0, sizeof(*ptime)); + return; + } + + png_convert_from_struct_tm(ptime, tbuf); +} +#endif + +/* Initialize png_ptr structure, and allocate any memory needed */ +PNG_FUNCTION(png_structp,PNGAPI +png_create_write_struct,(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn),PNG_ALLOCATED) +{ +#ifndef PNG_USER_MEM_SUPPORTED + png_structrp png_ptr = png_create_png_struct(user_png_ver, error_ptr, + error_fn, warn_fn, NULL, NULL, NULL); +#else + return png_create_write_struct_2(user_png_ver, error_ptr, error_fn, + warn_fn, NULL, NULL, NULL); +} + +/* Alternate initialize png_ptr structure, and allocate any memory needed */ +PNG_FUNCTION(png_structp,PNGAPI +png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr, + png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, + png_malloc_ptr malloc_fn, png_free_ptr free_fn),PNG_ALLOCATED) +{ + png_structrp png_ptr = png_create_png_struct(user_png_ver, error_ptr, + error_fn, warn_fn, mem_ptr, malloc_fn, free_fn); +#endif /* USER_MEM */ + if (png_ptr != NULL) + { + /* Set the zlib control values to defaults; they can be overridden by the + * application after the struct has been created. + */ + png_ptr->zbuffer_size = PNG_ZBUF_SIZE; + + /* The 'zlib_strategy' setting is irrelevant because png_default_claim in + * pngwutil.c defaults it according to whether or not filters will be + * used, and ignores this setting. + */ + png_ptr->zlib_strategy = PNG_Z_DEFAULT_STRATEGY; + png_ptr->zlib_level = PNG_Z_DEFAULT_COMPRESSION; + png_ptr->zlib_mem_level = 8; + png_ptr->zlib_window_bits = 15; + png_ptr->zlib_method = 8; + +#ifdef PNG_WRITE_COMPRESSED_TEXT_SUPPORTED + png_ptr->zlib_text_strategy = PNG_TEXT_Z_DEFAULT_STRATEGY; + png_ptr->zlib_text_level = PNG_TEXT_Z_DEFAULT_COMPRESSION; + png_ptr->zlib_text_mem_level = 8; + png_ptr->zlib_text_window_bits = 15; + png_ptr->zlib_text_method = 8; +#endif /* WRITE_COMPRESSED_TEXT */ + + /* This is a highly dubious configuration option; by default it is off, + * but it may be appropriate for private builds that are testing + * extensions not conformant to the current specification, or of + * applications that must not fail to write at all costs! + */ +#ifdef PNG_BENIGN_WRITE_ERRORS_SUPPORTED + /* In stable builds only warn if an application error can be completely + * handled. + */ + png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN; +#endif + + /* App warnings are warnings in release (or release candidate) builds but + * are errors during development. + */ +#if PNG_RELEASE_BUILD + png_ptr->flags |= PNG_FLAG_APP_WARNINGS_WARN; +#endif + + /* TODO: delay this, it can be done in png_init_io() (if the app doesn't + * do it itself) avoiding setting the default function if it is not + * required. + */ + png_set_write_fn(png_ptr, NULL, NULL, NULL); + } + + return png_ptr; +} + + +/* Write a few rows of image data. If the image is interlaced, + * either you will have to write the 7 sub images, or, if you + * have called png_set_interlace_handling(), you will have to + * "write" the image seven times. + */ +void PNGAPI +png_write_rows(png_structrp png_ptr, png_bytepp row, + png_uint_32 num_rows) +{ + png_uint_32 i; /* row counter */ + png_bytepp rp; /* row pointer */ + + png_debug(1, "in png_write_rows"); + + if (png_ptr == NULL) + return; + + /* Loop through the rows */ + for (i = 0, rp = row; i < num_rows; i++, rp++) + { + png_write_row(png_ptr, *rp); + } +} + +/* Write the image. You only need to call this function once, even + * if you are writing an interlaced image. + */ +void PNGAPI +png_write_image(png_structrp png_ptr, png_bytepp image) +{ + png_uint_32 i; /* row index */ + int pass, num_pass; /* pass variables */ + png_bytepp rp; /* points to current row */ + + if (png_ptr == NULL) + return; + + png_debug(1, "in png_write_image"); + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* Initialize interlace handling. If image is not interlaced, + * this will set pass to 1 + */ + num_pass = png_set_interlace_handling(png_ptr); +#else + num_pass = 1; +#endif + /* Loop through passes */ + for (pass = 0; pass < num_pass; pass++) + { + /* Loop through image */ + for (i = 0, rp = image; i < png_ptr->height; i++, rp++) + { + png_write_row(png_ptr, *rp); + } + } +} + +#ifdef PNG_MNG_FEATURES_SUPPORTED +/* Performs intrapixel differencing */ +static void +png_do_write_intrapixel(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_write_intrapixel"); + + if ((row_info->color_type & PNG_COLOR_MASK_COLOR) != 0) + { + int bytes_per_pixel; + png_uint_32 row_width = row_info->width; + if (row_info->bit_depth == 8) + { + png_bytep rp; + png_uint_32 i; + + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + bytes_per_pixel = 3; + + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + bytes_per_pixel = 4; + + else + return; + + for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) + { + *(rp) = (png_byte)(*rp - *(rp + 1)); + *(rp + 2) = (png_byte)(*(rp + 2) - *(rp + 1)); + } + } + +#ifdef PNG_WRITE_16BIT_SUPPORTED + else if (row_info->bit_depth == 16) + { + png_bytep rp; + png_uint_32 i; + + if (row_info->color_type == PNG_COLOR_TYPE_RGB) + bytes_per_pixel = 6; + + else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + bytes_per_pixel = 8; + + else + return; + + for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel) + { + png_uint_32 s0 = (png_uint_32)(*(rp ) << 8) | *(rp + 1); + png_uint_32 s1 = (png_uint_32)(*(rp + 2) << 8) | *(rp + 3); + png_uint_32 s2 = (png_uint_32)(*(rp + 4) << 8) | *(rp + 5); + png_uint_32 red = (png_uint_32)((s0 - s1) & 0xffffL); + png_uint_32 blue = (png_uint_32)((s2 - s1) & 0xffffL); + *(rp ) = (png_byte)(red >> 8); + *(rp + 1) = (png_byte)red; + *(rp + 4) = (png_byte)(blue >> 8); + *(rp + 5) = (png_byte)blue; + } + } +#endif /* WRITE_16BIT */ + } +} +#endif /* MNG_FEATURES */ + +/* Called by user to write a row of image data */ +void PNGAPI +png_write_row(png_structrp png_ptr, png_const_bytep row) +{ + /* 1.5.6: moved from png_struct to be a local structure: */ + png_row_info row_info; + + png_debug2(1, "in png_write_row (row %u, pass %d)", + png_ptr->row_number, png_ptr->pass); + + if (png_ptr == NULL) + return; + + /* Initialize transformations and other stuff if first time */ + if (png_ptr->row_number == 0 && png_ptr->pass == 0) + { + /* Make sure we wrote the header info */ + if ((png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE) == 0) + png_error(png_ptr, + "png_write_info was never called before png_write_row"); + + /* Check for transforms that have been set but were defined out */ +#if !defined(PNG_WRITE_INVERT_SUPPORTED) && defined(PNG_READ_INVERT_SUPPORTED) + if ((png_ptr->transformations & PNG_INVERT_MONO) != 0) + png_warning(png_ptr, "PNG_WRITE_INVERT_SUPPORTED is not defined"); +#endif + +#if !defined(PNG_WRITE_FILLER_SUPPORTED) && defined(PNG_READ_FILLER_SUPPORTED) + if ((png_ptr->transformations & PNG_FILLER) != 0) + png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined"); +#endif +#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \ + defined(PNG_READ_PACKSWAP_SUPPORTED) + if ((png_ptr->transformations & PNG_PACKSWAP) != 0) + png_warning(png_ptr, + "PNG_WRITE_PACKSWAP_SUPPORTED is not defined"); +#endif + +#if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED) + if ((png_ptr->transformations & PNG_PACK) != 0) + png_warning(png_ptr, "PNG_WRITE_PACK_SUPPORTED is not defined"); +#endif + +#if !defined(PNG_WRITE_SHIFT_SUPPORTED) && defined(PNG_READ_SHIFT_SUPPORTED) + if ((png_ptr->transformations & PNG_SHIFT) != 0) + png_warning(png_ptr, "PNG_WRITE_SHIFT_SUPPORTED is not defined"); +#endif + +#if !defined(PNG_WRITE_BGR_SUPPORTED) && defined(PNG_READ_BGR_SUPPORTED) + if ((png_ptr->transformations & PNG_BGR) != 0) + png_warning(png_ptr, "PNG_WRITE_BGR_SUPPORTED is not defined"); +#endif + +#if !defined(PNG_WRITE_SWAP_SUPPORTED) && defined(PNG_READ_SWAP_SUPPORTED) + if ((png_ptr->transformations & PNG_SWAP_BYTES) != 0) + png_warning(png_ptr, "PNG_WRITE_SWAP_SUPPORTED is not defined"); +#endif + + png_write_start_row(png_ptr); + } + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* If interlaced and not interested in row, return */ + if (png_ptr->interlaced != 0 && + (png_ptr->transformations & PNG_INTERLACE) != 0) + { + switch (png_ptr->pass) + { + case 0: + if ((png_ptr->row_number & 0x07) != 0) + { + png_write_finish_row(png_ptr); + return; + } + break; + + case 1: + if ((png_ptr->row_number & 0x07) != 0 || png_ptr->width < 5) + { + png_write_finish_row(png_ptr); + return; + } + break; + + case 2: + if ((png_ptr->row_number & 0x07) != 4) + { + png_write_finish_row(png_ptr); + return; + } + break; + + case 3: + if ((png_ptr->row_number & 0x03) != 0 || png_ptr->width < 3) + { + png_write_finish_row(png_ptr); + return; + } + break; + + case 4: + if ((png_ptr->row_number & 0x03) != 2) + { + png_write_finish_row(png_ptr); + return; + } + break; + + case 5: + if ((png_ptr->row_number & 0x01) != 0 || png_ptr->width < 2) + { + png_write_finish_row(png_ptr); + return; + } + break; + + case 6: + if ((png_ptr->row_number & 0x01) == 0) + { + png_write_finish_row(png_ptr); + return; + } + break; + + default: /* error: ignore it */ + break; + } + } +#endif + + /* Set up row info for transformations */ + row_info.color_type = png_ptr->color_type; + row_info.width = png_ptr->usr_width; + row_info.channels = png_ptr->usr_channels; + row_info.bit_depth = png_ptr->usr_bit_depth; + row_info.pixel_depth = (png_byte)(row_info.bit_depth * row_info.channels); + row_info.rowbytes = PNG_ROWBYTES(row_info.pixel_depth, row_info.width); + + png_debug1(3, "row_info->color_type = %d", row_info.color_type); + png_debug1(3, "row_info->width = %u", row_info.width); + png_debug1(3, "row_info->channels = %d", row_info.channels); + png_debug1(3, "row_info->bit_depth = %d", row_info.bit_depth); + png_debug1(3, "row_info->pixel_depth = %d", row_info.pixel_depth); + png_debug1(3, "row_info->rowbytes = %lu", (unsigned long)row_info.rowbytes); + + /* Copy user's row into buffer, leaving room for filter byte. */ + memcpy(png_ptr->row_buf + 1, row, row_info.rowbytes); + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* Handle interlacing */ + if (png_ptr->interlaced && png_ptr->pass < 6 && + (png_ptr->transformations & PNG_INTERLACE) != 0) + { + png_do_write_interlace(&row_info, png_ptr->row_buf + 1, png_ptr->pass); + /* This should always get caught above, but still ... */ + if (row_info.width == 0) + { + png_write_finish_row(png_ptr); + return; + } + } +#endif + +#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED + /* Handle other transformations */ + if (png_ptr->transformations != 0) + png_do_write_transformations(png_ptr, &row_info); +#endif + + /* At this point the row_info pixel depth must match the 'transformed' depth, + * which is also the output depth. + */ + if (row_info.pixel_depth != png_ptr->pixel_depth || + row_info.pixel_depth != png_ptr->transformed_pixel_depth) + png_error(png_ptr, "internal write transform logic error"); + +#ifdef PNG_MNG_FEATURES_SUPPORTED + /* Write filter_method 64 (intrapixel differencing) only if + * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and + * 2. Libpng did not write a PNG signature (this filter_method is only + * used in PNG datastreams that are embedded in MNG datastreams) and + * 3. The application called png_permit_mng_features with a mask that + * included PNG_FLAG_MNG_FILTER_64 and + * 4. The filter_method is 64 and + * 5. The color_type is RGB or RGBA + */ + if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) != 0 && + (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING)) + { + /* Intrapixel differencing */ + png_do_write_intrapixel(&row_info, png_ptr->row_buf + 1); + } +#endif + +/* Added at libpng-1.5.10 */ +#ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED + /* Check for out-of-range palette index */ + if (row_info.color_type == PNG_COLOR_TYPE_PALETTE && + png_ptr->num_palette_max >= 0) + png_do_check_palette_indexes(png_ptr, &row_info); +#endif + + /* Find a filter if necessary, filter the row and write it out. */ + png_write_find_filter(png_ptr, &row_info); + + if (png_ptr->write_row_fn != NULL) + (*(png_ptr->write_row_fn))(png_ptr, png_ptr->row_number, png_ptr->pass); +} + +#ifdef PNG_WRITE_FLUSH_SUPPORTED +/* Set the automatic flush interval or 0 to turn flushing off */ +void PNGAPI +png_set_flush(png_structrp png_ptr, int nrows) +{ + png_debug(1, "in png_set_flush"); + + if (png_ptr == NULL) + return; + + png_ptr->flush_dist = (nrows < 0 ? 0 : (png_uint_32)nrows); +} + +/* Flush the current output buffers now */ +void PNGAPI +png_write_flush(png_structrp png_ptr) +{ + png_debug(1, "in png_write_flush"); + + if (png_ptr == NULL) + return; + + /* We have already written out all of the data */ + if (png_ptr->row_number >= png_ptr->num_rows) + return; + + png_compress_IDAT(png_ptr, NULL, 0, Z_SYNC_FLUSH); + png_ptr->flush_rows = 0; + png_flush(png_ptr); +} +#endif /* WRITE_FLUSH */ + +/* Free any memory used in png_ptr struct without freeing the struct itself. */ +static void +png_write_destroy(png_structrp png_ptr) +{ + png_debug(1, "in png_write_destroy"); + + /* Free any memory zlib uses */ + if ((png_ptr->flags & PNG_FLAG_ZSTREAM_INITIALIZED) != 0) + deflateEnd(&png_ptr->zstream); + + /* Free our memory. png_free checks NULL for us. */ + png_free_buffer_list(png_ptr, &png_ptr->zbuffer_list); + png_free(png_ptr, png_ptr->row_buf); + png_ptr->row_buf = NULL; +#ifdef PNG_WRITE_FILTER_SUPPORTED + png_free(png_ptr, png_ptr->prev_row); + png_free(png_ptr, png_ptr->try_row); + png_free(png_ptr, png_ptr->tst_row); + png_ptr->prev_row = NULL; + png_ptr->try_row = NULL; + png_ptr->tst_row = NULL; +#endif + +#ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED + png_free(png_ptr, png_ptr->chunk_list); + png_ptr->chunk_list = NULL; +#endif + + /* The error handling and memory handling information is left intact at this + * point: the jmp_buf may still have to be freed. See png_destroy_png_struct + * for how this happens. + */ +} + +/* Free all memory used by the write. + * In libpng 1.6.0 this API changed quietly to no longer accept a NULL value for + * *png_ptr_ptr. Prior to 1.6.0 it would accept such a value and it would free + * the passed in info_structs but it would quietly fail to free any of the data + * inside them. In 1.6.0 it quietly does nothing (it has to be quiet because it + * has no png_ptr.) + */ +void PNGAPI +png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr) +{ + png_debug(1, "in png_destroy_write_struct"); + + if (png_ptr_ptr != NULL) + { + png_structrp png_ptr = *png_ptr_ptr; + + if (png_ptr != NULL) /* added in libpng 1.6.0 */ + { + png_destroy_info_struct(png_ptr, info_ptr_ptr); + + *png_ptr_ptr = NULL; + png_write_destroy(png_ptr); + png_destroy_png_struct(png_ptr); + } + } +} + +/* Allow the application to select one or more row filters to use. */ +void PNGAPI +png_set_filter(png_structrp png_ptr, int method, int filters) +{ + png_debug(1, "in png_set_filter"); + + if (png_ptr == NULL) + return; + +#ifdef PNG_MNG_FEATURES_SUPPORTED + if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) != 0 && + (method == PNG_INTRAPIXEL_DIFFERENCING)) + method = PNG_FILTER_TYPE_BASE; + +#endif + if (method == PNG_FILTER_TYPE_BASE) + { + switch (filters & (PNG_ALL_FILTERS | 0x07)) + { +#ifdef PNG_WRITE_FILTER_SUPPORTED + case 5: + case 6: + case 7: png_app_error(png_ptr, "Unknown row filter for method 0"); +#endif /* WRITE_FILTER */ + /* FALLTHROUGH */ + case PNG_FILTER_VALUE_NONE: + png_ptr->do_filter = PNG_FILTER_NONE; break; + +#ifdef PNG_WRITE_FILTER_SUPPORTED + case PNG_FILTER_VALUE_SUB: + png_ptr->do_filter = PNG_FILTER_SUB; break; + + case PNG_FILTER_VALUE_UP: + png_ptr->do_filter = PNG_FILTER_UP; break; + + case PNG_FILTER_VALUE_AVG: + png_ptr->do_filter = PNG_FILTER_AVG; break; + + case PNG_FILTER_VALUE_PAETH: + png_ptr->do_filter = PNG_FILTER_PAETH; break; + + default: + png_ptr->do_filter = (png_byte)filters; break; +#else + default: + png_app_error(png_ptr, "Unknown row filter for method 0"); +#endif /* WRITE_FILTER */ + } + +#ifdef PNG_WRITE_FILTER_SUPPORTED + /* If we have allocated the row_buf, this means we have already started + * with the image and we should have allocated all of the filter buffers + * that have been selected. If prev_row isn't already allocated, then + * it is too late to start using the filters that need it, since we + * will be missing the data in the previous row. If an application + * wants to start and stop using particular filters during compression, + * it should start out with all of the filters, and then remove them + * or add them back after the start of compression. + * + * NOTE: this is a nasty constraint on the code, because it means that the + * prev_row buffer must be maintained even if there are currently no + * 'prev_row' requiring filters active. + */ + if (png_ptr->row_buf != NULL) + { + int num_filters; + png_alloc_size_t buf_size; + + /* Repeat the checks in png_write_start_row; 1 pixel high or wide + * images cannot benefit from certain filters. If this isn't done here + * the check below will fire on 1 pixel high images. + */ + if (png_ptr->height == 1) + filters &= ~(PNG_FILTER_UP|PNG_FILTER_AVG|PNG_FILTER_PAETH); + + if (png_ptr->width == 1) + filters &= ~(PNG_FILTER_SUB|PNG_FILTER_AVG|PNG_FILTER_PAETH); + + if ((filters & (PNG_FILTER_UP|PNG_FILTER_AVG|PNG_FILTER_PAETH)) != 0 + && png_ptr->prev_row == NULL) + { + /* This is the error case, however it is benign - the previous row + * is not available so the filter can't be used. Just warn here. + */ + png_app_warning(png_ptr, + "png_set_filter: UP/AVG/PAETH cannot be added after start"); + filters &= ~(PNG_FILTER_UP|PNG_FILTER_AVG|PNG_FILTER_PAETH); + } + + num_filters = 0; + + if (filters & PNG_FILTER_SUB) + num_filters++; + + if (filters & PNG_FILTER_UP) + num_filters++; + + if (filters & PNG_FILTER_AVG) + num_filters++; + + if (filters & PNG_FILTER_PAETH) + num_filters++; + + /* Allocate needed row buffers if they have not already been + * allocated. + */ + buf_size = PNG_ROWBYTES(png_ptr->usr_channels * png_ptr->usr_bit_depth, + png_ptr->width) + 1; + + if (png_ptr->try_row == NULL) + png_ptr->try_row = png_voidcast(png_bytep, + png_malloc(png_ptr, buf_size)); + + if (num_filters > 1) + { + if (png_ptr->tst_row == NULL) + png_ptr->tst_row = png_voidcast(png_bytep, + png_malloc(png_ptr, buf_size)); + } + } + png_ptr->do_filter = (png_byte)filters; +#endif + } + else + png_error(png_ptr, "Unknown custom filter method"); +} + +#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* DEPRECATED */ +/* Provide floating and fixed point APIs */ +#ifdef PNG_FLOATING_POINT_SUPPORTED +void PNGAPI +png_set_filter_heuristics(png_structrp png_ptr, int heuristic_method, + int num_weights, png_const_doublep filter_weights, + png_const_doublep filter_costs) +{ + PNG_UNUSED(png_ptr) + PNG_UNUSED(heuristic_method) + PNG_UNUSED(num_weights) + PNG_UNUSED(filter_weights) + PNG_UNUSED(filter_costs) +} +#endif /* FLOATING_POINT */ + +#ifdef PNG_FIXED_POINT_SUPPORTED +void PNGAPI +png_set_filter_heuristics_fixed(png_structrp png_ptr, int heuristic_method, + int num_weights, png_const_fixed_point_p filter_weights, + png_const_fixed_point_p filter_costs) +{ + PNG_UNUSED(png_ptr) + PNG_UNUSED(heuristic_method) + PNG_UNUSED(num_weights) + PNG_UNUSED(filter_weights) + PNG_UNUSED(filter_costs) +} +#endif /* FIXED_POINT */ +#endif /* WRITE_WEIGHTED_FILTER */ + +#ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED +void PNGAPI +png_set_compression_level(png_structrp png_ptr, int level) +{ + png_debug(1, "in png_set_compression_level"); + + if (png_ptr == NULL) + return; + + png_ptr->zlib_level = level; +} + +void PNGAPI +png_set_compression_mem_level(png_structrp png_ptr, int mem_level) +{ + png_debug(1, "in png_set_compression_mem_level"); + + if (png_ptr == NULL) + return; + + png_ptr->zlib_mem_level = mem_level; +} + +void PNGAPI +png_set_compression_strategy(png_structrp png_ptr, int strategy) +{ + png_debug(1, "in png_set_compression_strategy"); + + if (png_ptr == NULL) + return; + + /* The flag setting here prevents the libpng dynamic selection of strategy. + */ + png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_STRATEGY; + png_ptr->zlib_strategy = strategy; +} + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +void PNGAPI +png_set_compression_window_bits(png_structrp png_ptr, int window_bits) +{ + png_debug(1, "in png_set_compression_window_bits"); + + if (png_ptr == NULL) + return; + + /* Prior to 1.6.0 this would warn but then set the window_bits value. This + * meant that negative window bits values could be selected that would cause + * libpng to write a non-standard PNG file with raw deflate or gzip + * compressed IDAT or ancillary chunks. Such files can be read and there is + * no warning on read, so this seems like a very bad idea. + */ + if (window_bits > 15) + { + png_warning(png_ptr, "Only compression windows <= 32k supported by PNG"); + window_bits = 15; + } + + else if (window_bits < 8) + { + png_warning(png_ptr, "Only compression windows >= 256 supported by PNG"); + window_bits = 8; + } + + png_ptr->zlib_window_bits = window_bits; +} + +void PNGAPI +png_set_compression_method(png_structrp png_ptr, int method) +{ + png_debug(1, "in png_set_compression_method"); + + if (png_ptr == NULL) + return; + + /* This would produce an invalid PNG file if it worked, but it doesn't and + * deflate will fault it, so it is harmless to just warn here. + */ + if (method != 8) + png_warning(png_ptr, "Only compression method 8 is supported by PNG"); + + png_ptr->zlib_method = method; +} +#endif /* WRITE_CUSTOMIZE_COMPRESSION */ + +/* The following were added to libpng-1.5.4 */ +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED +void PNGAPI +png_set_text_compression_level(png_structrp png_ptr, int level) +{ + png_debug(1, "in png_set_text_compression_level"); + + if (png_ptr == NULL) + return; + + png_ptr->zlib_text_level = level; +} + +void PNGAPI +png_set_text_compression_mem_level(png_structrp png_ptr, int mem_level) +{ + png_debug(1, "in png_set_text_compression_mem_level"); + + if (png_ptr == NULL) + return; + + png_ptr->zlib_text_mem_level = mem_level; +} + +void PNGAPI +png_set_text_compression_strategy(png_structrp png_ptr, int strategy) +{ + png_debug(1, "in png_set_text_compression_strategy"); + + if (png_ptr == NULL) + return; + + png_ptr->zlib_text_strategy = strategy; +} + +/* If PNG_WRITE_OPTIMIZE_CMF_SUPPORTED is defined, libpng will use a + * smaller value of window_bits if it can do so safely. + */ +void PNGAPI +png_set_text_compression_window_bits(png_structrp png_ptr, int window_bits) +{ + png_debug(1, "in png_set_text_compression_window_bits"); + + if (png_ptr == NULL) + return; + + if (window_bits > 15) + { + png_warning(png_ptr, "Only compression windows <= 32k supported by PNG"); + window_bits = 15; + } + + else if (window_bits < 8) + { + png_warning(png_ptr, "Only compression windows >= 256 supported by PNG"); + window_bits = 8; + } + + png_ptr->zlib_text_window_bits = window_bits; +} + +void PNGAPI +png_set_text_compression_method(png_structrp png_ptr, int method) +{ + png_debug(1, "in png_set_text_compression_method"); + + if (png_ptr == NULL) + return; + + if (method != 8) + png_warning(png_ptr, "Only compression method 8 is supported by PNG"); + + png_ptr->zlib_text_method = method; +} +#endif /* WRITE_CUSTOMIZE_ZTXT_COMPRESSION */ +/* end of API added to libpng-1.5.4 */ + +void PNGAPI +png_set_write_status_fn(png_structrp png_ptr, png_write_status_ptr write_row_fn) +{ + png_debug(1, "in png_set_write_status_fn"); + + if (png_ptr == NULL) + return; + + png_ptr->write_row_fn = write_row_fn; +} + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED +void PNGAPI +png_set_write_user_transform_fn(png_structrp png_ptr, png_user_transform_ptr + write_user_transform_fn) +{ + png_debug(1, "in png_set_write_user_transform_fn"); + + if (png_ptr == NULL) + return; + + png_ptr->transformations |= PNG_USER_TRANSFORM; + png_ptr->write_user_transform_fn = write_user_transform_fn; +} +#endif + + +#ifdef PNG_INFO_IMAGE_SUPPORTED +void PNGAPI +png_write_png(png_structrp png_ptr, png_inforp info_ptr, + int transforms, voidp params) +{ + png_debug(1, "in png_write_png"); + + if (png_ptr == NULL || info_ptr == NULL) + return; + + if ((info_ptr->valid & PNG_INFO_IDAT) == 0) + { + png_app_error(png_ptr, "no rows for png_write_image to write"); + return; + } + + /* Write the file header information. */ + png_write_info(png_ptr, info_ptr); + + /* ------ these transformations don't touch the info structure ------- */ + + /* Invert monochrome pixels */ + if ((transforms & PNG_TRANSFORM_INVERT_MONO) != 0) +#ifdef PNG_WRITE_INVERT_SUPPORTED + png_set_invert_mono(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_INVERT_MONO not supported"); +#endif + + /* Shift the pixels up to a legal bit depth and fill in + * as appropriate to correctly scale the image. + */ + if ((transforms & PNG_TRANSFORM_SHIFT) != 0) +#ifdef PNG_WRITE_SHIFT_SUPPORTED + if ((info_ptr->valid & PNG_INFO_sBIT) != 0) + png_set_shift(png_ptr, &info_ptr->sig_bit); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_SHIFT not supported"); +#endif + + /* Pack pixels into bytes */ + if ((transforms & PNG_TRANSFORM_PACKING) != 0) +#ifdef PNG_WRITE_PACK_SUPPORTED + png_set_packing(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_PACKING not supported"); +#endif + + /* Swap location of alpha bytes from ARGB to RGBA */ + if ((transforms & PNG_TRANSFORM_SWAP_ALPHA) != 0) +#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED + png_set_swap_alpha(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_SWAP_ALPHA not supported"); +#endif + + /* Remove a filler (X) from XRGB/RGBX/AG/GA into to convert it into + * RGB, note that the code expects the input color type to be G or RGB; no + * alpha channel. + */ + if ((transforms & (PNG_TRANSFORM_STRIP_FILLER_AFTER| + PNG_TRANSFORM_STRIP_FILLER_BEFORE)) != 0) + { +#ifdef PNG_WRITE_FILLER_SUPPORTED + if ((transforms & PNG_TRANSFORM_STRIP_FILLER_AFTER) != 0) + { + if ((transforms & PNG_TRANSFORM_STRIP_FILLER_BEFORE) != 0) + png_app_error(png_ptr, + "PNG_TRANSFORM_STRIP_FILLER: BEFORE+AFTER not supported"); + + /* Continue if ignored - this is the pre-1.6.10 behavior */ + png_set_filler(png_ptr, 0, PNG_FILLER_AFTER); + } + + else if ((transforms & PNG_TRANSFORM_STRIP_FILLER_BEFORE) != 0) + png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_STRIP_FILLER not supported"); +#endif + } + + /* Flip BGR pixels to RGB */ + if ((transforms & PNG_TRANSFORM_BGR) != 0) +#ifdef PNG_WRITE_BGR_SUPPORTED + png_set_bgr(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_BGR not supported"); +#endif + + /* Swap bytes of 16-bit files to most significant byte first */ + if ((transforms & PNG_TRANSFORM_SWAP_ENDIAN) != 0) +#ifdef PNG_WRITE_SWAP_SUPPORTED + png_set_swap(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_SWAP_ENDIAN not supported"); +#endif + + /* Swap bits of 1-bit, 2-bit, 4-bit packed pixel formats */ + if ((transforms & PNG_TRANSFORM_PACKSWAP) != 0) +#ifdef PNG_WRITE_PACKSWAP_SUPPORTED + png_set_packswap(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_PACKSWAP not supported"); +#endif + + /* Invert the alpha channel from opacity to transparency */ + if ((transforms & PNG_TRANSFORM_INVERT_ALPHA) != 0) +#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED + png_set_invert_alpha(png_ptr); +#else + png_app_error(png_ptr, "PNG_TRANSFORM_INVERT_ALPHA not supported"); +#endif + + /* ----------------------- end of transformations ------------------- */ + + /* Write the bits */ + png_write_image(png_ptr, info_ptr->row_pointers); + + /* It is REQUIRED to call this to finish writing the rest of the file */ + png_write_end(png_ptr, info_ptr); + + PNG_UNUSED(params) +} +#endif + + +#ifdef PNG_SIMPLIFIED_WRITE_SUPPORTED +/* Initialize the write structure - general purpose utility. */ +static int +png_image_write_init(png_imagep image) +{ + png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, image, + png_safe_error, png_safe_warning); + + if (png_ptr != NULL) + { + png_infop info_ptr = png_create_info_struct(png_ptr); + + if (info_ptr != NULL) + { + png_controlp control = png_voidcast(png_controlp, + png_malloc_warn(png_ptr, (sizeof *control))); + + if (control != NULL) + { + memset(control, 0, (sizeof *control)); + + control->png_ptr = png_ptr; + control->info_ptr = info_ptr; + control->for_write = 1; + + image->opaque = control; + return 1; + } + + /* Error clean up */ + png_destroy_info_struct(png_ptr, &info_ptr); + } + + png_destroy_write_struct(&png_ptr, NULL); + } + + return png_image_error(image, "png_image_write_: out of memory"); +} + +/* Arguments to png_image_write_main: */ +typedef struct +{ + /* Arguments: */ + png_imagep image; + png_const_voidp buffer; + png_int_32 row_stride; + png_const_voidp colormap; + int convert_to_8bit; + /* Local variables: */ + png_const_voidp first_row; + ptrdiff_t row_bytes; + png_voidp local_row; + /* Byte count for memory writing */ + png_bytep memory; + png_alloc_size_t memory_bytes; /* not used for STDIO */ + png_alloc_size_t output_bytes; /* running total */ +} png_image_write_control; + +/* Write png_uint_16 input to a 16-bit PNG; the png_ptr has already been set to + * do any necessary byte swapping. The component order is defined by the + * png_image format value. + */ +static int +png_write_image_16bit(png_voidp argument) +{ + png_image_write_control *display = png_voidcast(png_image_write_control*, + argument); + png_imagep image = display->image; + png_structrp png_ptr = image->opaque->png_ptr; + + png_const_uint_16p input_row = png_voidcast(png_const_uint_16p, + display->first_row); + png_uint_16p output_row = png_voidcast(png_uint_16p, display->local_row); + png_uint_16p row_end; + unsigned int channels = (image->format & PNG_FORMAT_FLAG_COLOR) != 0 ? + 3 : 1; + int aindex = 0; + png_uint_32 y = image->height; + + if ((image->format & PNG_FORMAT_FLAG_ALPHA) != 0) + { +# ifdef PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED + if ((image->format & PNG_FORMAT_FLAG_AFIRST) != 0) + { + aindex = -1; + ++input_row; /* To point to the first component */ + ++output_row; + } + else + aindex = (int)channels; +# else + aindex = (int)channels; +# endif + } + + else + png_error(png_ptr, "png_write_image: internal call error"); + + /* Work out the output row end and count over this, note that the increment + * above to 'row' means that row_end can actually be beyond the end of the + * row; this is correct. + */ + row_end = output_row + image->width * (channels+1); + + for (; y > 0; --y) + { + png_const_uint_16p in_ptr = input_row; + png_uint_16p out_ptr = output_row; + + while (out_ptr < row_end) + { + png_uint_16 alpha = in_ptr[aindex]; + png_uint_32 reciprocal = 0; + int c; + + out_ptr[aindex] = alpha; + + /* Calculate a reciprocal. The correct calculation is simply + * component/alpha*65535 << 15. (I.e. 15 bits of precision); this + * allows correct rounding by adding .5 before the shift. 'reciprocal' + * is only initialized when required. + */ + if (alpha > 0 && alpha < 65535) + reciprocal = ((0xffff<<15)+(alpha>>1))/alpha; + + c = (int)channels; + do /* always at least one channel */ + { + png_uint_16 component = *in_ptr++; + + /* The following gives 65535 for an alpha of 0, which is fine, + * otherwise if 0/0 is represented as some other value there is more + * likely to be a discontinuity which will probably damage + * compression when moving from a fully transparent area to a + * nearly transparent one. (The assumption here is that opaque + * areas tend not to be 0 intensity.) + */ + if (component >= alpha) + component = 65535; + + /* component 0 && alpha < 65535) + { + png_uint_32 calc = component * reciprocal; + calc += 16384; /* round to nearest */ + component = (png_uint_16)(calc >> 15); + } + + *out_ptr++ = component; + } + while (--c > 0); + + /* Skip to next component (skip the intervening alpha channel) */ + ++in_ptr; + ++out_ptr; + } + + png_write_row(png_ptr, png_voidcast(png_const_bytep, display->local_row)); + input_row += (png_uint_16)display->row_bytes/(sizeof (png_uint_16)); + } + + return 1; +} + +/* Given 16-bit input (1 to 4 channels) write 8-bit output. If an alpha channel + * is present it must be removed from the components, the components are then + * written in sRGB encoding. No components are added or removed. + * + * Calculate an alpha reciprocal to reverse pre-multiplication. As above the + * calculation can be done to 15 bits of accuracy; however, the output needs to + * be scaled in the range 0..255*65535, so include that scaling here. + */ +# define UNP_RECIPROCAL(alpha) ((((0xffff*0xff)<<7)+((alpha)>>1))/(alpha)) + +static png_byte +png_unpremultiply(png_uint_32 component, png_uint_32 alpha, + png_uint_32 reciprocal/*from the above macro*/) +{ + /* The following gives 1.0 for an alpha of 0, which is fine, otherwise if 0/0 + * is represented as some other value there is more likely to be a + * discontinuity which will probably damage compression when moving from a + * fully transparent area to a nearly transparent one. (The assumption here + * is that opaque areas tend not to be 0 intensity.) + * + * There is a rounding problem here; if alpha is less than 128 it will end up + * as 0 when scaled to 8 bits. To avoid introducing spurious colors into the + * output change for this too. + */ + if (component >= alpha || alpha < 128) + return 255; + + /* component 0) + { + /* The test is that alpha/257 (rounded) is less than 255, the first value + * that becomes 255 is 65407. + * NOTE: this must agree with the PNG_DIV257 macro (which must, therefore, + * be exact!) [Could also test reciprocal != 0] + */ + if (alpha < 65407) + { + component *= reciprocal; + component += 64; /* round to nearest */ + component >>= 7; + } + + else + component *= 255; + + /* Convert the component to sRGB. */ + return (png_byte)PNG_sRGB_FROM_LINEAR(component); + } + + else + return 0; +} + +static int +png_write_image_8bit(png_voidp argument) +{ + png_image_write_control *display = png_voidcast(png_image_write_control*, + argument); + png_imagep image = display->image; + png_structrp png_ptr = image->opaque->png_ptr; + + png_const_uint_16p input_row = png_voidcast(png_const_uint_16p, + display->first_row); + png_bytep output_row = png_voidcast(png_bytep, display->local_row); + png_uint_32 y = image->height; + unsigned int channels = (image->format & PNG_FORMAT_FLAG_COLOR) != 0 ? + 3 : 1; + + if ((image->format & PNG_FORMAT_FLAG_ALPHA) != 0) + { + png_bytep row_end; + int aindex; + +# ifdef PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED + if ((image->format & PNG_FORMAT_FLAG_AFIRST) != 0) + { + aindex = -1; + ++input_row; /* To point to the first component */ + ++output_row; + } + + else +# endif + aindex = (int)channels; + + /* Use row_end in place of a loop counter: */ + row_end = output_row + image->width * (channels+1); + + for (; y > 0; --y) + { + png_const_uint_16p in_ptr = input_row; + png_bytep out_ptr = output_row; + + while (out_ptr < row_end) + { + png_uint_16 alpha = in_ptr[aindex]; + png_byte alphabyte = (png_byte)PNG_DIV257(alpha); + png_uint_32 reciprocal = 0; + int c; + + /* Scale and write the alpha channel. */ + out_ptr[aindex] = alphabyte; + + if (alphabyte > 0 && alphabyte < 255) + reciprocal = UNP_RECIPROCAL(alpha); + + c = (int)channels; + do /* always at least one channel */ + *out_ptr++ = png_unpremultiply(*in_ptr++, alpha, reciprocal); + while (--c > 0); + + /* Skip to next component (skip the intervening alpha channel) */ + ++in_ptr; + ++out_ptr; + } /* while out_ptr < row_end */ + + png_write_row(png_ptr, png_voidcast(png_const_bytep, + display->local_row)); + input_row += (png_uint_16)display->row_bytes/(sizeof (png_uint_16)); + } /* while y */ + } + + else + { + /* No alpha channel, so the row_end really is the end of the row and it + * is sufficient to loop over the components one by one. + */ + png_bytep row_end = output_row + image->width * channels; + + for (; y > 0; --y) + { + png_const_uint_16p in_ptr = input_row; + png_bytep out_ptr = output_row; + + while (out_ptr < row_end) + { + png_uint_32 component = *in_ptr++; + + component *= 255; + *out_ptr++ = (png_byte)PNG_sRGB_FROM_LINEAR(component); + } + + png_write_row(png_ptr, output_row); + input_row += (png_uint_16)display->row_bytes/(sizeof (png_uint_16)); + } + } + + return 1; +} + +static void +png_image_set_PLTE(png_image_write_control *display) +{ + png_imagep image = display->image; + const void *cmap = display->colormap; + int entries = image->colormap_entries > 256 ? 256 : + (int)image->colormap_entries; + + /* NOTE: the caller must check for cmap != NULL and entries != 0 */ + png_uint_32 format = image->format; + unsigned int channels = PNG_IMAGE_SAMPLE_CHANNELS(format); + +# if defined(PNG_FORMAT_BGR_SUPPORTED) &&\ + defined(PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED) + int afirst = (format & PNG_FORMAT_FLAG_AFIRST) != 0 && + (format & PNG_FORMAT_FLAG_ALPHA) != 0; +# else +# define afirst 0 +# endif + +# ifdef PNG_FORMAT_BGR_SUPPORTED + int bgr = (format & PNG_FORMAT_FLAG_BGR) != 0 ? 2 : 0; +# else +# define bgr 0 +# endif + + int i, num_trans; + png_color palette[256]; + png_byte tRNS[256]; + + memset(tRNS, 255, (sizeof tRNS)); + memset(palette, 0, (sizeof palette)); + + for (i=num_trans=0; i= 3) /* RGB */ + { + palette[i].blue = (png_byte)PNG_sRGB_FROM_LINEAR(255 * + entry[(2 ^ bgr)]); + palette[i].green = (png_byte)PNG_sRGB_FROM_LINEAR(255 * + entry[1]); + palette[i].red = (png_byte)PNG_sRGB_FROM_LINEAR(255 * + entry[bgr]); + } + + else /* Gray */ + palette[i].blue = palette[i].red = palette[i].green = + (png_byte)PNG_sRGB_FROM_LINEAR(255 * *entry); + } + + else /* alpha */ + { + png_uint_16 alpha = entry[afirst ? 0 : channels-1]; + png_byte alphabyte = (png_byte)PNG_DIV257(alpha); + png_uint_32 reciprocal = 0; + + /* Calculate a reciprocal, as in the png_write_image_8bit code above + * this is designed to produce a value scaled to 255*65535 when + * divided by 128 (i.e. asr 7). + */ + if (alphabyte > 0 && alphabyte < 255) + reciprocal = (((0xffff*0xff)<<7)+(alpha>>1))/alpha; + + tRNS[i] = alphabyte; + if (alphabyte < 255) + num_trans = i+1; + + if (channels >= 3) /* RGB */ + { + palette[i].blue = png_unpremultiply(entry[afirst + (2 ^ bgr)], + alpha, reciprocal); + palette[i].green = png_unpremultiply(entry[afirst + 1], alpha, + reciprocal); + palette[i].red = png_unpremultiply(entry[afirst + bgr], alpha, + reciprocal); + } + + else /* gray */ + palette[i].blue = palette[i].red = palette[i].green = + png_unpremultiply(entry[afirst], alpha, reciprocal); + } + } + + else /* Color-map has sRGB values */ + { + png_const_bytep entry = png_voidcast(png_const_bytep, cmap); + + entry += (unsigned int)i * channels; + + switch (channels) + { + case 4: + tRNS[i] = entry[afirst ? 0 : 3]; + if (tRNS[i] < 255) + num_trans = i+1; + /* FALLTHROUGH */ + case 3: + palette[i].blue = entry[afirst + (2 ^ bgr)]; + palette[i].green = entry[afirst + 1]; + palette[i].red = entry[afirst + bgr]; + break; + + case 2: + tRNS[i] = entry[1 ^ afirst]; + if (tRNS[i] < 255) + num_trans = i+1; + /* FALLTHROUGH */ + case 1: + palette[i].blue = palette[i].red = palette[i].green = + entry[afirst]; + break; + + default: + break; + } + } + } + +# ifdef afirst +# undef afirst +# endif +# ifdef bgr +# undef bgr +# endif + + png_set_PLTE(image->opaque->png_ptr, image->opaque->info_ptr, palette, + entries); + + if (num_trans > 0) + png_set_tRNS(image->opaque->png_ptr, image->opaque->info_ptr, tRNS, + num_trans, NULL); + + image->colormap_entries = (png_uint_32)entries; +} + +static int +png_image_write_main(png_voidp argument) +{ + png_image_write_control *display = png_voidcast(png_image_write_control*, + argument); + png_imagep image = display->image; + png_structrp png_ptr = image->opaque->png_ptr; + png_inforp info_ptr = image->opaque->info_ptr; + png_uint_32 format = image->format; + + /* The following four ints are actually booleans */ + int colormap = (format & PNG_FORMAT_FLAG_COLORMAP); + int linear = !colormap && (format & PNG_FORMAT_FLAG_LINEAR); /* input */ + int alpha = !colormap && (format & PNG_FORMAT_FLAG_ALPHA); + int write_16bit = linear && (display->convert_to_8bit == 0); + +# ifdef PNG_BENIGN_ERRORS_SUPPORTED + /* Make sure we error out on any bad situation */ + png_set_benign_errors(png_ptr, 0/*error*/); +# endif + + /* Default the 'row_stride' parameter if required, also check the row stride + * and total image size to ensure that they are within the system limits. + */ + { + unsigned int channels = PNG_IMAGE_PIXEL_CHANNELS(image->format); + + if (image->width <= 0x7fffffffU/channels) /* no overflow */ + { + png_uint_32 check; + png_uint_32 png_row_stride = image->width * channels; + + if (display->row_stride == 0) + display->row_stride = (png_int_32)/*SAFE*/png_row_stride; + + if (display->row_stride < 0) + check = (png_uint_32)(-display->row_stride); + + else + check = (png_uint_32)display->row_stride; + + if (check >= png_row_stride) + { + /* Now check for overflow of the image buffer calculation; this + * limits the whole image size to 32 bits for API compatibility with + * the current, 32-bit, PNG_IMAGE_BUFFER_SIZE macro. + */ + if (image->height > 0xffffffffU/png_row_stride) + png_error(image->opaque->png_ptr, "memory image too large"); + } + + else + png_error(image->opaque->png_ptr, "supplied row stride too small"); + } + + else + png_error(image->opaque->png_ptr, "image row stride too large"); + } + + /* Set the required transforms then write the rows in the correct order. */ + if ((format & PNG_FORMAT_FLAG_COLORMAP) != 0) + { + if (display->colormap != NULL && image->colormap_entries > 0) + { + png_uint_32 entries = image->colormap_entries; + + png_set_IHDR(png_ptr, info_ptr, image->width, image->height, + entries > 16 ? 8 : (entries > 4 ? 4 : (entries > 2 ? 2 : 1)), + PNG_COLOR_TYPE_PALETTE, PNG_INTERLACE_NONE, + PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + + png_image_set_PLTE(display); + } + + else + png_error(image->opaque->png_ptr, + "no color-map for color-mapped image"); + } + + else + png_set_IHDR(png_ptr, info_ptr, image->width, image->height, + write_16bit ? 16 : 8, + ((format & PNG_FORMAT_FLAG_COLOR) ? PNG_COLOR_MASK_COLOR : 0) + + ((format & PNG_FORMAT_FLAG_ALPHA) ? PNG_COLOR_MASK_ALPHA : 0), + PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); + + /* Counter-intuitively the data transformations must be called *after* + * png_write_info, not before as in the read code, but the 'set' functions + * must still be called before. Just set the color space information, never + * write an interlaced image. + */ + + if (write_16bit != 0) + { + /* The gamma here is 1.0 (linear) and the cHRM chunk matches sRGB. */ + png_set_gAMA_fixed(png_ptr, info_ptr, PNG_GAMMA_LINEAR); + + if ((image->flags & PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB) == 0) + png_set_cHRM_fixed(png_ptr, info_ptr, + /* color x y */ + /* white */ 31270, 32900, + /* red */ 64000, 33000, + /* green */ 30000, 60000, + /* blue */ 15000, 6000 + ); + } + + else if ((image->flags & PNG_IMAGE_FLAG_COLORSPACE_NOT_sRGB) == 0) + png_set_sRGB(png_ptr, info_ptr, PNG_sRGB_INTENT_PERCEPTUAL); + + /* Else writing an 8-bit file and the *colors* aren't sRGB, but the 8-bit + * space must still be gamma encoded. + */ + else + png_set_gAMA_fixed(png_ptr, info_ptr, PNG_GAMMA_sRGB_INVERSE); + + /* Write the file header. */ + png_write_info(png_ptr, info_ptr); + + /* Now set up the data transformations (*after* the header is written), + * remove the handled transformations from the 'format' flags for checking. + * + * First check for a little endian system if writing 16-bit files. + */ + if (write_16bit != 0) + { + png_uint_16 le = 0x0001; + + if ((*(png_const_bytep) & le) != 0) + png_set_swap(png_ptr); + } + +# ifdef PNG_SIMPLIFIED_WRITE_BGR_SUPPORTED + if ((format & PNG_FORMAT_FLAG_BGR) != 0) + { + if (colormap == 0 && (format & PNG_FORMAT_FLAG_COLOR) != 0) + png_set_bgr(png_ptr); + format &= ~PNG_FORMAT_FLAG_BGR; + } +# endif + +# ifdef PNG_SIMPLIFIED_WRITE_AFIRST_SUPPORTED + if ((format & PNG_FORMAT_FLAG_AFIRST) != 0) + { + if (colormap == 0 && (format & PNG_FORMAT_FLAG_ALPHA) != 0) + png_set_swap_alpha(png_ptr); + format &= ~PNG_FORMAT_FLAG_AFIRST; + } +# endif + + /* If there are 16 or fewer color-map entries we wrote a lower bit depth + * above, but the application data is still byte packed. + */ + if (colormap != 0 && image->colormap_entries <= 16) + png_set_packing(png_ptr); + + /* That should have handled all (both) the transforms. */ + if ((format & ~(png_uint_32)(PNG_FORMAT_FLAG_COLOR | PNG_FORMAT_FLAG_LINEAR | + PNG_FORMAT_FLAG_ALPHA | PNG_FORMAT_FLAG_COLORMAP)) != 0) + png_error(png_ptr, "png_write_image: unsupported transformation"); + + { + png_const_bytep row = png_voidcast(png_const_bytep, display->buffer); + ptrdiff_t row_bytes = display->row_stride; + + if (linear != 0) + row_bytes *= (sizeof (png_uint_16)); + + if (row_bytes < 0) + row += (image->height-1) * (-row_bytes); + + display->first_row = row; + display->row_bytes = row_bytes; + } + + /* Apply 'fast' options if the flag is set. */ + if ((image->flags & PNG_IMAGE_FLAG_FAST) != 0) + { + png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, PNG_NO_FILTERS); + /* NOTE: determined by experiment using pngstest, this reflects some + * balance between the time to write the image once and the time to read + * it about 50 times. The speed-up in pngstest was about 10-20% of the + * total (user) time on a heavily loaded system. + */ +# ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED + png_set_compression_level(png_ptr, 3); +# endif + } + + /* Check for the cases that currently require a pre-transform on the row + * before it is written. This only applies when the input is 16-bit and + * either there is an alpha channel or it is converted to 8-bit. + */ + if ((linear != 0 && alpha != 0 ) || + (colormap == 0 && display->convert_to_8bit != 0)) + { + png_bytep row = png_voidcast(png_bytep, png_malloc(png_ptr, + png_get_rowbytes(png_ptr, info_ptr))); + int result; + + display->local_row = row; + if (write_16bit != 0) + result = png_safe_execute(image, png_write_image_16bit, display); + else + result = png_safe_execute(image, png_write_image_8bit, display); + display->local_row = NULL; + + png_free(png_ptr, row); + + /* Skip the 'write_end' on error: */ + if (result == 0) + return 0; + } + + /* Otherwise this is the case where the input is in a format currently + * supported by the rest of the libpng write code; call it directly. + */ + else + { + png_const_bytep row = png_voidcast(png_const_bytep, display->first_row); + ptrdiff_t row_bytes = display->row_bytes; + png_uint_32 y = image->height; + + for (; y > 0; --y) + { + png_write_row(png_ptr, row); + row += row_bytes; + } + } + + png_write_end(png_ptr, info_ptr); + return 1; +} + + +static void (PNGCBAPI +image_memory_write)(png_structp png_ptr, png_bytep/*const*/ data, size_t size) +{ + png_image_write_control *display = png_voidcast(png_image_write_control*, + png_ptr->io_ptr/*backdoor: png_get_io_ptr(png_ptr)*/); + png_alloc_size_t ob = display->output_bytes; + + /* Check for overflow; this should never happen: */ + if (size <= ((png_alloc_size_t)-1) - ob) + { + /* I don't think libpng ever does this, but just in case: */ + if (size > 0) + { + if (display->memory_bytes >= ob+size) /* writing */ + memcpy(display->memory+ob, data, size); + + /* Always update the size: */ + display->output_bytes = ob+size; + } + } + + else + png_error(png_ptr, "png_image_write_to_memory: PNG too big"); +} + +static void (PNGCBAPI +image_memory_flush)(png_structp png_ptr) +{ + PNG_UNUSED(png_ptr) +} + +static int +png_image_write_memory(png_voidp argument) +{ + png_image_write_control *display = png_voidcast(png_image_write_control*, + argument); + + /* The rest of the memory-specific init and write_main in an error protected + * environment. This case needs to use callbacks for the write operations + * since libpng has no built in support for writing to memory. + */ + png_set_write_fn(display->image->opaque->png_ptr, display/*io_ptr*/, + image_memory_write, image_memory_flush); + + return png_image_write_main(display); +} + +int PNGAPI +png_image_write_to_memory(png_imagep image, void *memory, + png_alloc_size_t * PNG_RESTRICT memory_bytes, int convert_to_8bit, + const void *buffer, png_int_32 row_stride, const void *colormap) +{ + /* Write the image to the given buffer, or count the bytes if it is NULL */ + if (image != NULL && image->version == PNG_IMAGE_VERSION) + { + if (memory_bytes != NULL && buffer != NULL) + { + /* This is to give the caller an easier error detection in the NULL + * case and guard against uninitialized variable problems: + */ + if (memory == NULL) + *memory_bytes = 0; + + if (png_image_write_init(image) != 0) + { + png_image_write_control display; + int result; + + memset(&display, 0, (sizeof display)); + display.image = image; + display.buffer = buffer; + display.row_stride = row_stride; + display.colormap = colormap; + display.convert_to_8bit = convert_to_8bit; + display.memory = png_voidcast(png_bytep, memory); + display.memory_bytes = *memory_bytes; + display.output_bytes = 0; + + result = png_safe_execute(image, png_image_write_memory, &display); + png_image_free(image); + + /* write_memory returns true even if we ran out of buffer. */ + if (result) + { + /* On out-of-buffer this function returns '0' but still updates + * memory_bytes: + */ + if (memory != NULL && display.output_bytes > *memory_bytes) + result = 0; + + *memory_bytes = display.output_bytes; + } + + return result; + } + + else + return 0; + } + + else + return png_image_error(image, + "png_image_write_to_memory: invalid argument"); + } + + else if (image != NULL) + return png_image_error(image, + "png_image_write_to_memory: incorrect PNG_IMAGE_VERSION"); + + else + return 0; +} + +#ifdef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED +int PNGAPI +png_image_write_to_stdio(png_imagep image, FILE *file, int convert_to_8bit, + const void *buffer, png_int_32 row_stride, const void *colormap) +{ + /* Write the image to the given FILE object. */ + if (image != NULL && image->version == PNG_IMAGE_VERSION) + { + if (file != NULL && buffer != NULL) + { + if (png_image_write_init(image) != 0) + { + png_image_write_control display; + int result; + + /* This is slightly evil, but png_init_io doesn't do anything other + * than this and we haven't changed the standard IO functions so + * this saves a 'safe' function. + */ + image->opaque->png_ptr->io_ptr = file; + + memset(&display, 0, (sizeof display)); + display.image = image; + display.buffer = buffer; + display.row_stride = row_stride; + display.colormap = colormap; + display.convert_to_8bit = convert_to_8bit; + + result = png_safe_execute(image, png_image_write_main, &display); + png_image_free(image); + return result; + } + + else + return 0; + } + + else + return png_image_error(image, + "png_image_write_to_stdio: invalid argument"); + } + + else if (image != NULL) + return png_image_error(image, + "png_image_write_to_stdio: incorrect PNG_IMAGE_VERSION"); + + else + return 0; +} + +int PNGAPI +png_image_write_to_file(png_imagep image, const char *file_name, + int convert_to_8bit, const void *buffer, png_int_32 row_stride, + const void *colormap) +{ + /* Write the image to the named file. */ + if (image != NULL && image->version == PNG_IMAGE_VERSION) + { + if (file_name != NULL && buffer != NULL) + { + FILE *fp = fopen(file_name, "wb"); + + if (fp != NULL) + { + if (png_image_write_to_stdio(image, fp, convert_to_8bit, buffer, + row_stride, colormap) != 0) + { + int error; /* from fflush/fclose */ + + /* Make sure the file is flushed correctly. */ + if (fflush(fp) == 0 && ferror(fp) == 0) + { + if (fclose(fp) == 0) + return 1; + + error = errno; /* from fclose */ + } + + else + { + error = errno; /* from fflush or ferror */ + (void)fclose(fp); + } + + (void)remove(file_name); + /* The image has already been cleaned up; this is just used to + * set the error (because the original write succeeded). + */ + return png_image_error(image, strerror(error)); + } + + else + { + /* Clean up: just the opened file. */ + (void)fclose(fp); + (void)remove(file_name); + return 0; + } + } + + else + return png_image_error(image, strerror(errno)); + } + + else + return png_image_error(image, + "png_image_write_to_file: invalid argument"); + } + + else if (image != NULL) + return png_image_error(image, + "png_image_write_to_file: incorrect PNG_IMAGE_VERSION"); + + else + return 0; +} +#endif /* SIMPLIFIED_WRITE_STDIO */ +#endif /* SIMPLIFIED_WRITE */ +#endif /* WRITE */ diff --git a/widget/milsko/milskosrc/external/libpng/src/pngwtran.c b/widget/milsko/milskosrc/external/libpng/src/pngwtran.c new file mode 100644 index 0000000000..a20847023f --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/src/pngwtran.c @@ -0,0 +1,574 @@ +/* pngwtran.c - transforms the data in a row for PNG writers + * + * Copyright (c) 2018 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + */ + +#include "pngpriv.h" + +#ifdef PNG_WRITE_SUPPORTED +#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED + +#ifdef PNG_WRITE_PACK_SUPPORTED +/* Pack pixels into bytes. Pass the true bit depth in bit_depth. The + * row_info bit depth should be 8 (one pixel per byte). The channels + * should be 1 (this only happens on grayscale and paletted images). + */ +static void +png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth) +{ + png_debug(1, "in png_do_pack"); + + if (row_info->bit_depth == 8 && + row_info->channels == 1) + { + switch ((int)bit_depth) + { + case 1: + { + png_bytep sp, dp; + int mask, v; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + sp = row; + dp = row; + mask = 0x80; + v = 0; + + for (i = 0; i < row_width; i++) + { + if (*sp != 0) + v |= mask; + + sp++; + + if (mask > 1) + mask >>= 1; + + else + { + mask = 0x80; + *dp = (png_byte)v; + dp++; + v = 0; + } + } + + if (mask != 0x80) + *dp = (png_byte)v; + + break; + } + + case 2: + { + png_bytep sp, dp; + unsigned int shift; + int v; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + sp = row; + dp = row; + shift = 6; + v = 0; + + for (i = 0; i < row_width; i++) + { + png_byte value; + + value = (png_byte)(*sp & 0x03); + v |= (value << shift); + + if (shift == 0) + { + shift = 6; + *dp = (png_byte)v; + dp++; + v = 0; + } + + else + shift -= 2; + + sp++; + } + + if (shift != 6) + *dp = (png_byte)v; + + break; + } + + case 4: + { + png_bytep sp, dp; + unsigned int shift; + int v; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + sp = row; + dp = row; + shift = 4; + v = 0; + + for (i = 0; i < row_width; i++) + { + png_byte value; + + value = (png_byte)(*sp & 0x0f); + v |= (value << shift); + + if (shift == 0) + { + shift = 4; + *dp = (png_byte)v; + dp++; + v = 0; + } + + else + shift -= 4; + + sp++; + } + + if (shift != 4) + *dp = (png_byte)v; + + break; + } + + default: + break; + } + + row_info->bit_depth = (png_byte)bit_depth; + row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels); + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, + row_info->width); + } +} +#endif + +#ifdef PNG_WRITE_SHIFT_SUPPORTED +/* Shift pixel values to take advantage of whole range. Pass the + * true number of bits in bit_depth. The row should be packed + * according to row_info->bit_depth. Thus, if you had a row of + * bit depth 4, but the pixels only had values from 0 to 7, you + * would pass 3 as bit_depth, and this routine would translate the + * data to 0 to 15. + */ +static void +png_do_shift(png_row_infop row_info, png_bytep row, + png_const_color_8p bit_depth) +{ + png_debug(1, "in png_do_shift"); + + if (row_info->color_type != PNG_COLOR_TYPE_PALETTE) + { + int shift_start[4], shift_dec[4]; + unsigned int channels = 0; + + if ((row_info->color_type & PNG_COLOR_MASK_COLOR) != 0) + { + shift_start[channels] = row_info->bit_depth - bit_depth->red; + shift_dec[channels] = bit_depth->red; + channels++; + + shift_start[channels] = row_info->bit_depth - bit_depth->green; + shift_dec[channels] = bit_depth->green; + channels++; + + shift_start[channels] = row_info->bit_depth - bit_depth->blue; + shift_dec[channels] = bit_depth->blue; + channels++; + } + + else + { + shift_start[channels] = row_info->bit_depth - bit_depth->gray; + shift_dec[channels] = bit_depth->gray; + channels++; + } + + if ((row_info->color_type & PNG_COLOR_MASK_ALPHA) != 0) + { + shift_start[channels] = row_info->bit_depth - bit_depth->alpha; + shift_dec[channels] = bit_depth->alpha; + channels++; + } + + /* With low row depths, could only be grayscale, so one channel */ + if (row_info->bit_depth < 8) + { + png_bytep bp = row; + size_t i; + unsigned int mask; + size_t row_bytes = row_info->rowbytes; + + if (bit_depth->gray == 1 && row_info->bit_depth == 2) + mask = 0x55; + + else if (row_info->bit_depth == 4 && bit_depth->gray == 3) + mask = 0x11; + + else + mask = 0xff; + + for (i = 0; i < row_bytes; i++, bp++) + { + int j; + unsigned int v, out; + + v = *bp; + out = 0; + + for (j = shift_start[0]; j > -shift_dec[0]; j -= shift_dec[0]) + { + if (j > 0) + out |= v << j; + + else + out |= (v >> (-j)) & mask; + } + + *bp = (png_byte)(out & 0xff); + } + } + + else if (row_info->bit_depth == 8) + { + png_bytep bp = row; + png_uint_32 i; + png_uint_32 istop = channels * row_info->width; + + for (i = 0; i < istop; i++, bp++) + { + unsigned int c = i%channels; + int j; + unsigned int v, out; + + v = *bp; + out = 0; + + for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) + { + if (j > 0) + out |= v << j; + + else + out |= v >> (-j); + } + + *bp = (png_byte)(out & 0xff); + } + } + + else + { + png_bytep bp; + png_uint_32 i; + png_uint_32 istop = channels * row_info->width; + + for (bp = row, i = 0; i < istop; i++) + { + unsigned int c = i%channels; + int j; + unsigned int value, v; + + v = png_get_uint_16(bp); + value = 0; + + for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c]) + { + if (j > 0) + value |= v << j; + + else + value |= v >> (-j); + } + *bp++ = (png_byte)((value >> 8) & 0xff); + *bp++ = (png_byte)(value & 0xff); + } + } + } +} +#endif + +#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED +static void +png_do_write_swap_alpha(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_write_swap_alpha"); + + { + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + if (row_info->bit_depth == 8) + { + /* This converts from ARGB to RGBA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + png_byte save = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = save; + } + } + +#ifdef PNG_WRITE_16BIT_SUPPORTED + else + { + /* This converts from AARRGGBB to RRGGBBAA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + png_byte save[2]; + save[0] = *(sp++); + save[1] = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = save[0]; + *(dp++) = save[1]; + } + } +#endif /* WRITE_16BIT */ + } + + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + if (row_info->bit_depth == 8) + { + /* This converts from AG to GA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + png_byte save = *(sp++); + *(dp++) = *(sp++); + *(dp++) = save; + } + } + +#ifdef PNG_WRITE_16BIT_SUPPORTED + else + { + /* This converts from AAGG to GGAA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + png_byte save[2]; + save[0] = *(sp++); + save[1] = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = save[0]; + *(dp++) = save[1]; + } + } +#endif /* WRITE_16BIT */ + } + } +} +#endif + +#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED +static void +png_do_write_invert_alpha(png_row_infop row_info, png_bytep row) +{ + png_debug(1, "in png_do_write_invert_alpha"); + + { + if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA) + { + if (row_info->bit_depth == 8) + { + /* This inverts the alpha channel in RGBA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + /* Does nothing + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + */ + sp+=3; dp = sp; + *dp = (png_byte)(255 - *(sp++)); + } + } + +#ifdef PNG_WRITE_16BIT_SUPPORTED + else + { + /* This inverts the alpha channel in RRGGBBAA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + /* Does nothing + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + *(dp++) = *(sp++); + */ + sp+=6; dp = sp; + *(dp++) = (png_byte)(255 - *(sp++)); + *dp = (png_byte)(255 - *(sp++)); + } + } +#endif /* WRITE_16BIT */ + } + + else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) + { + if (row_info->bit_depth == 8) + { + /* This inverts the alpha channel in GA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + *(dp++) = *(sp++); + *(dp++) = (png_byte)(255 - *(sp++)); + } + } + +#ifdef PNG_WRITE_16BIT_SUPPORTED + else + { + /* This inverts the alpha channel in GGAA */ + png_bytep sp, dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + for (i = 0, sp = dp = row; i < row_width; i++) + { + /* Does nothing + *(dp++) = *(sp++); + *(dp++) = *(sp++); + */ + sp+=2; dp = sp; + *(dp++) = (png_byte)(255 - *(sp++)); + *dp = (png_byte)(255 - *(sp++)); + } + } +#endif /* WRITE_16BIT */ + } + } +} +#endif + +/* Transform the data according to the user's wishes. The order of + * transformations is significant. + */ +void /* PRIVATE */ +png_do_write_transformations(png_structrp png_ptr, png_row_infop row_info) +{ + png_debug(1, "in png_do_write_transformations"); + + if (png_ptr == NULL) + return; + +#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED + if ((png_ptr->transformations & PNG_USER_TRANSFORM) != 0) + if (png_ptr->write_user_transform_fn != NULL) + (*(png_ptr->write_user_transform_fn)) /* User write transform + function */ + (png_ptr, /* png_ptr */ + row_info, /* row_info: */ + /* png_uint_32 width; width of row */ + /* size_t rowbytes; number of bytes in row */ + /* png_byte color_type; color type of pixels */ + /* png_byte bit_depth; bit depth of samples */ + /* png_byte channels; number of channels (1-4) */ + /* png_byte pixel_depth; bits per pixel (depth*channels) */ + png_ptr->row_buf + 1); /* start of pixel data for row */ +#endif + +#ifdef PNG_WRITE_FILLER_SUPPORTED + if ((png_ptr->transformations & PNG_FILLER) != 0) + png_do_strip_channel(row_info, png_ptr->row_buf + 1, + !(png_ptr->flags & PNG_FLAG_FILLER_AFTER)); +#endif + +#ifdef PNG_WRITE_PACKSWAP_SUPPORTED + if ((png_ptr->transformations & PNG_PACKSWAP) != 0) + png_do_packswap(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_WRITE_PACK_SUPPORTED + if ((png_ptr->transformations & PNG_PACK) != 0) + png_do_pack(row_info, png_ptr->row_buf + 1, + (png_uint_32)png_ptr->bit_depth); +#endif + +#ifdef PNG_WRITE_SWAP_SUPPORTED +# ifdef PNG_16BIT_SUPPORTED + if ((png_ptr->transformations & PNG_SWAP_BYTES) != 0) + png_do_swap(row_info, png_ptr->row_buf + 1); +# endif +#endif + +#ifdef PNG_WRITE_SHIFT_SUPPORTED + if ((png_ptr->transformations & PNG_SHIFT) != 0) + png_do_shift(row_info, png_ptr->row_buf + 1, + &(png_ptr->shift)); +#endif + +#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED + if ((png_ptr->transformations & PNG_SWAP_ALPHA) != 0) + png_do_write_swap_alpha(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED + if ((png_ptr->transformations & PNG_INVERT_ALPHA) != 0) + png_do_write_invert_alpha(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_WRITE_BGR_SUPPORTED + if ((png_ptr->transformations & PNG_BGR) != 0) + png_do_bgr(row_info, png_ptr->row_buf + 1); +#endif + +#ifdef PNG_WRITE_INVERT_SUPPORTED + if ((png_ptr->transformations & PNG_INVERT_MONO) != 0) + png_do_invert(row_info, png_ptr->row_buf + 1); +#endif +} +#endif /* WRITE_TRANSFORMS */ +#endif /* WRITE */ diff --git a/widget/milsko/milskosrc/external/libpng/src/pngwutil.c b/widget/milsko/milskosrc/external/libpng/src/pngwutil.c new file mode 100644 index 0000000000..863ffe8c2f --- /dev/null +++ b/widget/milsko/milskosrc/external/libpng/src/pngwutil.c @@ -0,0 +1,2825 @@ +/* pngwutil.c - utilities to write a PNG file + * + * Copyright (c) 2018-2025 Cosmin Truta + * Copyright (c) 1998-2002,2004,2006-2018 Glenn Randers-Pehrson + * Copyright (c) 1996-1997 Andreas Dilger + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + * + * This code is released under the libpng license. + * For conditions of distribution and use, see the disclaimer + * and license in png.h + * + * This file contains routines that are only called from within + * libpng itself during the course of writing an image. + */ + +#include "pngpriv.h" + +#ifdef PNG_WRITE_SUPPORTED + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED +/* Arrays to facilitate interlacing - use pass (0 - 6) as index. */ + +/* Start of interlace block */ +static const png_byte png_pass_start[7] = {0, 4, 0, 2, 0, 1, 0}; +/* Offset to next interlace block */ +static const png_byte png_pass_inc[7] = {8, 8, 4, 4, 2, 2, 1}; +/* Start of interlace block in the y direction */ +static const png_byte png_pass_ystart[7] = {0, 0, 4, 0, 2, 0, 1}; +/* Offset to next interlace block in the y direction */ +static const png_byte png_pass_yinc[7] = {8, 8, 8, 4, 4, 2, 2}; + +/* TODO: Move these arrays to a common utility module to avoid duplication. */ +#endif + +#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED +/* Place a 32-bit number into a buffer in PNG byte order. We work + * with unsigned numbers for convenience, although one supported + * ancillary chunk uses signed (two's complement) numbers. + */ +void PNGAPI +png_save_uint_32(png_bytep buf, png_uint_32 i) +{ + buf[0] = (png_byte)((i >> 24) & 0xffU); + buf[1] = (png_byte)((i >> 16) & 0xffU); + buf[2] = (png_byte)((i >> 8) & 0xffU); + buf[3] = (png_byte)( i & 0xffU); +} + +/* Place a 16-bit number into a buffer in PNG byte order. + * The parameter is declared unsigned int, not png_uint_16, + * just to avoid potential problems on pre-ANSI C compilers. + */ +void PNGAPI +png_save_uint_16(png_bytep buf, unsigned int i) +{ + buf[0] = (png_byte)((i >> 8) & 0xffU); + buf[1] = (png_byte)( i & 0xffU); +} +#endif + +/* Simple function to write the signature. If we have already written + * the magic bytes of the signature, or more likely, the PNG stream is + * being embedded into another stream and doesn't need its own signature, + * we should call png_set_sig_bytes() to tell libpng how many of the + * bytes have already been written. + */ +void PNGAPI +png_write_sig(png_structrp png_ptr) +{ + png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10}; + +#ifdef PNG_IO_STATE_SUPPORTED + /* Inform the I/O callback that the signature is being written */ + png_ptr->io_state = PNG_IO_WRITING | PNG_IO_SIGNATURE; +#endif + + /* Write the rest of the 8 byte signature */ + png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes], + (size_t)(8 - png_ptr->sig_bytes)); + + if (png_ptr->sig_bytes < 3) + png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE; +} + +/* Write the start of a PNG chunk. The type is the chunk type. + * The total_length is the sum of the lengths of all the data you will be + * passing in png_write_chunk_data(). + */ +static void +png_write_chunk_header(png_structrp png_ptr, png_uint_32 chunk_name, + png_uint_32 length) +{ + png_byte buf[8]; + +#if defined(PNG_DEBUG) && (PNG_DEBUG > 0) + PNG_CSTRING_FROM_CHUNK(buf, chunk_name); + png_debug2(0, "Writing %s chunk, length = %lu", buf, (unsigned long)length); +#endif + + if (png_ptr == NULL) + return; + +#ifdef PNG_IO_STATE_SUPPORTED + /* Inform the I/O callback that the chunk header is being written. + * PNG_IO_CHUNK_HDR requires a single I/O call. + */ + png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_HDR; +#endif + + /* Write the length and the chunk name */ + png_save_uint_32(buf, length); + png_save_uint_32(buf + 4, chunk_name); + png_write_data(png_ptr, buf, 8); + + /* Put the chunk name into png_ptr->chunk_name */ + png_ptr->chunk_name = chunk_name; + + /* Reset the crc and run it over the chunk name */ + png_reset_crc(png_ptr); + + png_calculate_crc(png_ptr, buf + 4, 4); + +#ifdef PNG_IO_STATE_SUPPORTED + /* Inform the I/O callback that chunk data will (possibly) be written. + * PNG_IO_CHUNK_DATA does NOT require a specific number of I/O calls. + */ + png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_DATA; +#endif +} + +void PNGAPI +png_write_chunk_start(png_structrp png_ptr, png_const_bytep chunk_string, + png_uint_32 length) +{ + png_write_chunk_header(png_ptr, PNG_CHUNK_FROM_STRING(chunk_string), length); +} + +/* Write the data of a PNG chunk started with png_write_chunk_header(). + * Note that multiple calls to this function are allowed, and that the + * sum of the lengths from these calls *must* add up to the total_length + * given to png_write_chunk_header(). + */ +void PNGAPI +png_write_chunk_data(png_structrp png_ptr, png_const_bytep data, size_t length) +{ + /* Write the data, and run the CRC over it */ + if (png_ptr == NULL) + return; + + if (data != NULL && length > 0) + { + png_write_data(png_ptr, data, length); + + /* Update the CRC after writing the data, + * in case the user I/O routine alters it. + */ + png_calculate_crc(png_ptr, data, length); + } +} + +/* Finish a chunk started with png_write_chunk_header(). */ +void PNGAPI +png_write_chunk_end(png_structrp png_ptr) +{ + png_byte buf[4]; + + if (png_ptr == NULL) return; + +#ifdef PNG_IO_STATE_SUPPORTED + /* Inform the I/O callback that the chunk CRC is being written. + * PNG_IO_CHUNK_CRC requires a single I/O function call. + */ + png_ptr->io_state = PNG_IO_WRITING | PNG_IO_CHUNK_CRC; +#endif + + /* Write the crc in a single operation */ + png_save_uint_32(buf, png_ptr->crc); + + png_write_data(png_ptr, buf, 4); +} + +/* Write a PNG chunk all at once. The type is an array of ASCII characters + * representing the chunk name. The array must be at least 4 bytes in + * length, and does not need to be null terminated. To be safe, pass the + * pre-defined chunk names here, and if you need a new one, define it + * where the others are defined. The length is the length of the data. + * All the data must be present. If that is not possible, use the + * png_write_chunk_start(), png_write_chunk_data(), and png_write_chunk_end() + * functions instead. + */ +static void +png_write_complete_chunk(png_structrp png_ptr, png_uint_32 chunk_name, + png_const_bytep data, size_t length) +{ + if (png_ptr == NULL) + return; + + /* On 64-bit architectures 'length' may not fit in a png_uint_32. */ + if (length > PNG_UINT_31_MAX) + png_error(png_ptr, "length exceeds PNG maximum"); + + png_write_chunk_header(png_ptr, chunk_name, (png_uint_32)length); + png_write_chunk_data(png_ptr, data, length); + png_write_chunk_end(png_ptr); +} + +/* This is the API that calls the internal function above. */ +void PNGAPI +png_write_chunk(png_structrp png_ptr, png_const_bytep chunk_string, + png_const_bytep data, size_t length) +{ + png_write_complete_chunk(png_ptr, PNG_CHUNK_FROM_STRING(chunk_string), data, + length); +} + +/* This is used below to find the size of an image to pass to png_deflate_claim, + * so it only needs to be accurate if the size is less than 16384 bytes (the + * point at which a lower LZ window size can be used.) + */ +static png_alloc_size_t +png_image_size(png_structrp png_ptr) +{ + /* Only return sizes up to the maximum of a png_uint_32; do this by limiting + * the width and height used to 15 bits. + */ + png_uint_32 h = png_ptr->height; + + if (png_ptr->rowbytes < 32768 && h < 32768) + { + if (png_ptr->interlaced != 0) + { + /* Interlacing makes the image larger because of the replication of + * both the filter byte and the padding to a byte boundary. + */ + png_uint_32 w = png_ptr->width; + unsigned int pd = png_ptr->pixel_depth; + png_alloc_size_t cb_base; + int pass; + + for (cb_base=0, pass=0; pass<=6; ++pass) + { + png_uint_32 pw = PNG_PASS_COLS(w, pass); + + if (pw > 0) + cb_base += (PNG_ROWBYTES(pd, pw)+1) * PNG_PASS_ROWS(h, pass); + } + + return cb_base; + } + + else + return (png_ptr->rowbytes+1) * h; + } + + else + return 0xffffffffU; +} + +#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED + /* This is the code to hack the first two bytes of the deflate stream (the + * deflate header) to correct the windowBits value to match the actual data + * size. Note that the second argument is the *uncompressed* size but the + * first argument is the *compressed* data (and it must be deflate + * compressed.) + */ +static void +optimize_cmf(png_bytep data, png_alloc_size_t data_size) +{ + /* Optimize the CMF field in the zlib stream. The resultant zlib stream is + * still compliant to the stream specification. + */ + if (data_size <= 16384) /* else windowBits must be 15 */ + { + unsigned int z_cmf = data[0]; /* zlib compression method and flags */ + + if ((z_cmf & 0x0f) == 8 && (z_cmf & 0xf0) <= 0x70) + { + unsigned int z_cinfo; + unsigned int half_z_window_size; + + z_cinfo = z_cmf >> 4; + half_z_window_size = 1U << (z_cinfo + 7); + + if (data_size <= half_z_window_size) /* else no change */ + { + unsigned int tmp; + + do + { + half_z_window_size >>= 1; + --z_cinfo; + } + while (z_cinfo > 0 && data_size <= half_z_window_size); + + z_cmf = (z_cmf & 0x0f) | (z_cinfo << 4); + + data[0] = (png_byte)z_cmf; + tmp = data[1] & 0xe0; + tmp += 0x1f - ((z_cmf << 8) + tmp) % 0x1f; + data[1] = (png_byte)tmp; + } + } + } +} +#endif /* WRITE_OPTIMIZE_CMF */ + +/* Initialize the compressor for the appropriate type of compression. */ +static int +png_deflate_claim(png_structrp png_ptr, png_uint_32 owner, + png_alloc_size_t data_size) +{ + if (png_ptr->zowner != 0) + { +#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_ERROR_TEXT_SUPPORTED) + char msg[64]; + + PNG_STRING_FROM_CHUNK(msg, owner); + msg[4] = ':'; + msg[5] = ' '; + PNG_STRING_FROM_CHUNK(msg+6, png_ptr->zowner); + /* So the message that results is " using zstream"; this is an + * internal error, but is very useful for debugging. i18n requirements + * are minimal. + */ + (void)png_safecat(msg, (sizeof msg), 10, " using zstream"); +#endif +#if PNG_RELEASE_BUILD + png_warning(png_ptr, msg); + + /* Attempt sane error recovery */ + if (png_ptr->zowner == png_IDAT) /* don't steal from IDAT */ + { + png_ptr->zstream.msg = PNGZ_MSG_CAST("in use by IDAT"); + return Z_STREAM_ERROR; + } + + png_ptr->zowner = 0; +#else + png_error(png_ptr, msg); +#endif + } + + { + int level = png_ptr->zlib_level; + int method = png_ptr->zlib_method; + int windowBits = png_ptr->zlib_window_bits; + int memLevel = png_ptr->zlib_mem_level; + int strategy; /* set below */ + int ret; /* zlib return code */ + + if (owner == png_IDAT) + { + if ((png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_STRATEGY) != 0) + strategy = png_ptr->zlib_strategy; + + else if (png_ptr->do_filter != PNG_FILTER_NONE) + strategy = PNG_Z_DEFAULT_STRATEGY; + + else + strategy = PNG_Z_DEFAULT_NOFILTER_STRATEGY; + } + + else + { +#ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED + level = png_ptr->zlib_text_level; + method = png_ptr->zlib_text_method; + windowBits = png_ptr->zlib_text_window_bits; + memLevel = png_ptr->zlib_text_mem_level; + strategy = png_ptr->zlib_text_strategy; +#else + /* If customization is not supported the values all come from the + * IDAT values except for the strategy, which is fixed to the + * default. (This is the pre-1.6.0 behavior too, although it was + * implemented in a very different way.) + */ + strategy = Z_DEFAULT_STRATEGY; +#endif + } + + /* Adjust 'windowBits' down if larger than 'data_size'; to stop this + * happening just pass 32768 as the data_size parameter. Notice that zlib + * requires an extra 262 bytes in the window in addition to the data to be + * able to see the whole of the data, so if data_size+262 takes us to the + * next windowBits size we need to fix up the value later. (Because even + * though deflate needs the extra window, inflate does not!) + */ + if (data_size <= 16384) + { + /* IMPLEMENTATION NOTE: this 'half_window_size' stuff is only here to + * work round a Microsoft Visual C misbehavior which, contrary to C-90, + * widens the result of the following shift to 64-bits if (and, + * apparently, only if) it is used in a test. + */ + unsigned int half_window_size = 1U << (windowBits-1); + + while (data_size + 262 <= half_window_size) + { + half_window_size >>= 1; + --windowBits; + } + } + + /* Check against the previous initialized values, if any. */ + if ((png_ptr->flags & PNG_FLAG_ZSTREAM_INITIALIZED) != 0 && + (png_ptr->zlib_set_level != level || + png_ptr->zlib_set_method != method || + png_ptr->zlib_set_window_bits != windowBits || + png_ptr->zlib_set_mem_level != memLevel || + png_ptr->zlib_set_strategy != strategy)) + { + if (deflateEnd(&png_ptr->zstream) != Z_OK) + png_warning(png_ptr, "deflateEnd failed (ignored)"); + + png_ptr->flags &= ~PNG_FLAG_ZSTREAM_INITIALIZED; + } + + /* For safety clear out the input and output pointers (currently zlib + * doesn't use them on Init, but it might in the future). + */ + png_ptr->zstream.next_in = NULL; + png_ptr->zstream.avail_in = 0; + png_ptr->zstream.next_out = NULL; + png_ptr->zstream.avail_out = 0; + + /* Now initialize if required, setting the new parameters, otherwise just + * do a simple reset to the previous parameters. + */ + if ((png_ptr->flags & PNG_FLAG_ZSTREAM_INITIALIZED) != 0) + ret = deflateReset(&png_ptr->zstream); + + else + { + ret = deflateInit2(&png_ptr->zstream, level, method, windowBits, + memLevel, strategy); + + if (ret == Z_OK) + png_ptr->flags |= PNG_FLAG_ZSTREAM_INITIALIZED; + } + + /* The return code is from either deflateReset or deflateInit2; they have + * pretty much the same set of error codes. + */ + if (ret == Z_OK) + png_ptr->zowner = owner; + + else + png_zstream_error(png_ptr, ret); + + return ret; + } +} + +/* Clean up (or trim) a linked list of compression buffers. */ +void /* PRIVATE */ +png_free_buffer_list(png_structrp png_ptr, png_compression_bufferp *listp) +{ + png_compression_bufferp list = *listp; + + if (list != NULL) + { + *listp = NULL; + + do + { + png_compression_bufferp next = list->next; + + png_free(png_ptr, list); + list = next; + } + while (list != NULL); + } +} + +#ifdef PNG_WRITE_COMPRESSED_TEXT_SUPPORTED +/* This pair of functions encapsulates the operation of (a) compressing a + * text string, and (b) issuing it later as a series of chunk data writes. + * The compression_state structure is shared context for these functions + * set up by the caller to allow access to the relevant local variables. + * + * compression_buffer (new in 1.6.0) is just a linked list of zbuffer_size + * temporary buffers. From 1.6.0 it is retained in png_struct so that it will + * be correctly freed in the event of a write error (previous implementations + * just leaked memory.) + */ +typedef struct +{ + png_const_bytep input; /* The uncompressed input data */ + png_alloc_size_t input_len; /* Its length */ + png_uint_32 output_len; /* Final compressed length */ + png_byte output[1024]; /* First block of output */ +} compression_state; + +static void +png_text_compress_init(compression_state *comp, png_const_bytep input, + png_alloc_size_t input_len) +{ + comp->input = input; + comp->input_len = input_len; + comp->output_len = 0; +} + +/* Compress the data in the compression state input */ +static int +png_text_compress(png_structrp png_ptr, png_uint_32 chunk_name, + compression_state *comp, png_uint_32 prefix_len) +{ + int ret; + + /* To find the length of the output it is necessary to first compress the + * input. The result is buffered rather than using the two-pass algorithm + * that is used on the inflate side; deflate is assumed to be slower and a + * PNG writer is assumed to have more memory available than a PNG reader. + * + * IMPLEMENTATION NOTE: the zlib API deflateBound() can be used to find an + * upper limit on the output size, but it is always bigger than the input + * size so it is likely to be more efficient to use this linked-list + * approach. + */ + ret = png_deflate_claim(png_ptr, chunk_name, comp->input_len); + + if (ret != Z_OK) + return ret; + + /* Set up the compression buffers, we need a loop here to avoid overflowing a + * uInt. Use ZLIB_IO_MAX to limit the input. The output is always limited + * by the output buffer size, so there is no need to check that. Since this + * is ANSI-C we know that an 'int', hence a uInt, is always at least 16 bits + * in size. + */ + { + png_compression_bufferp *end = &png_ptr->zbuffer_list; + png_alloc_size_t input_len = comp->input_len; /* may be zero! */ + png_uint_32 output_len; + + /* zlib updates these for us: */ + png_ptr->zstream.next_in = PNGZ_INPUT_CAST(comp->input); + png_ptr->zstream.avail_in = 0; /* Set below */ + png_ptr->zstream.next_out = comp->output; + png_ptr->zstream.avail_out = (sizeof comp->output); + + output_len = png_ptr->zstream.avail_out; + + do + { + uInt avail_in = ZLIB_IO_MAX; + + if (avail_in > input_len) + avail_in = (uInt)input_len; + + input_len -= avail_in; + + png_ptr->zstream.avail_in = avail_in; + + if (png_ptr->zstream.avail_out == 0) + { + png_compression_buffer *next; + + /* Chunk data is limited to 2^31 bytes in length, so the prefix + * length must be counted here. + */ + if (output_len + prefix_len > PNG_UINT_31_MAX) + { + ret = Z_MEM_ERROR; + break; + } + + /* Need a new (malloc'ed) buffer, but there may be one present + * already. + */ + next = *end; + if (next == NULL) + { + next = png_voidcast(png_compression_bufferp, png_malloc_base + (png_ptr, PNG_COMPRESSION_BUFFER_SIZE(png_ptr))); + + if (next == NULL) + { + ret = Z_MEM_ERROR; + break; + } + + /* Link in this buffer (so that it will be freed later) */ + next->next = NULL; + *end = next; + } + + png_ptr->zstream.next_out = next->output; + png_ptr->zstream.avail_out = png_ptr->zbuffer_size; + output_len += png_ptr->zstream.avail_out; + + /* Move 'end' to the next buffer pointer. */ + end = &next->next; + } + + /* Compress the data */ + ret = deflate(&png_ptr->zstream, + input_len > 0 ? Z_NO_FLUSH : Z_FINISH); + + /* Claw back input data that was not consumed (because avail_in is + * reset above every time round the loop). + */ + input_len += png_ptr->zstream.avail_in; + png_ptr->zstream.avail_in = 0; /* safety */ + } + while (ret == Z_OK); + + /* There may be some space left in the last output buffer. This needs to + * be subtracted from output_len. + */ + output_len -= png_ptr->zstream.avail_out; + png_ptr->zstream.avail_out = 0; /* safety */ + comp->output_len = output_len; + + /* Now double check the output length, put in a custom message if it is + * too long. Otherwise ensure the z_stream::msg pointer is set to + * something. + */ + if (output_len + prefix_len >= PNG_UINT_31_MAX) + { + png_ptr->zstream.msg = PNGZ_MSG_CAST("compressed data too long"); + ret = Z_MEM_ERROR; + } + + else + png_zstream_error(png_ptr, ret); + + /* Reset zlib for another zTXt/iTXt or image data */ + png_ptr->zowner = 0; + + /* The only success case is Z_STREAM_END, input_len must be 0; if not this + * is an internal error. + */ + if (ret == Z_STREAM_END && input_len == 0) + { +#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED + /* Fix up the deflate header, if required */ + optimize_cmf(comp->output, comp->input_len); +#endif + /* But Z_OK is returned, not Z_STREAM_END; this allows the claim + * function above to return Z_STREAM_END on an error (though it never + * does in the current versions of zlib.) + */ + return Z_OK; + } + + else + return ret; + } +} + +/* Ship the compressed text out via chunk writes */ +static void +png_write_compressed_data_out(png_structrp png_ptr, compression_state *comp) +{ + png_uint_32 output_len = comp->output_len; + png_const_bytep output = comp->output; + png_uint_32 avail = (sizeof comp->output); + png_compression_buffer *next = png_ptr->zbuffer_list; + + for (;;) + { + if (avail > output_len) + avail = output_len; + + png_write_chunk_data(png_ptr, output, avail); + + output_len -= avail; + + if (output_len == 0 || next == NULL) + break; + + avail = png_ptr->zbuffer_size; + output = next->output; + next = next->next; + } + + /* This is an internal error; 'next' must have been NULL! */ + if (output_len > 0) + png_error(png_ptr, "error writing ancillary chunked compressed data"); +} +#endif /* WRITE_COMPRESSED_TEXT */ + +/* Write the IHDR chunk, and update the png_struct with the necessary + * information. Note that the rest of this code depends upon this + * information being correct. + */ +void /* PRIVATE */ +png_write_IHDR(png_structrp png_ptr, png_uint_32 width, png_uint_32 height, + int bit_depth, int color_type, int compression_type, int filter_type, + int interlace_type) +{ + png_byte buf[13]; /* Buffer to store the IHDR info */ + int is_invalid_depth; + + png_debug(1, "in png_write_IHDR"); + + /* Check that we have valid input data from the application info */ + switch (color_type) + { + case PNG_COLOR_TYPE_GRAY: + switch (bit_depth) + { + case 1: + case 2: + case 4: + case 8: +#ifdef PNG_WRITE_16BIT_SUPPORTED + case 16: +#endif + png_ptr->channels = 1; break; + + default: + png_error(png_ptr, + "Invalid bit depth for grayscale image"); + } + break; + + case PNG_COLOR_TYPE_RGB: + is_invalid_depth = (bit_depth != 8); +#ifdef PNG_WRITE_16BIT_SUPPORTED + is_invalid_depth = (is_invalid_depth && bit_depth != 16); +#endif + if (is_invalid_depth) + png_error(png_ptr, "Invalid bit depth for RGB image"); + + png_ptr->channels = 3; + break; + + case PNG_COLOR_TYPE_PALETTE: + switch (bit_depth) + { + case 1: + case 2: + case 4: + case 8: + png_ptr->channels = 1; + break; + + default: + png_error(png_ptr, "Invalid bit depth for paletted image"); + } + break; + + case PNG_COLOR_TYPE_GRAY_ALPHA: + is_invalid_depth = (bit_depth != 8); +#ifdef PNG_WRITE_16BIT_SUPPORTED + is_invalid_depth = (is_invalid_depth && bit_depth != 16); +#endif + if (is_invalid_depth) + png_error(png_ptr, "Invalid bit depth for grayscale+alpha image"); + + png_ptr->channels = 2; + break; + + case PNG_COLOR_TYPE_RGB_ALPHA: + is_invalid_depth = (bit_depth != 8); +#ifdef PNG_WRITE_16BIT_SUPPORTED + is_invalid_depth = (is_invalid_depth && bit_depth != 16); +#endif + if (is_invalid_depth) + png_error(png_ptr, "Invalid bit depth for RGBA image"); + + png_ptr->channels = 4; + break; + + default: + png_error(png_ptr, "Invalid image color type specified"); + } + + if (compression_type != PNG_COMPRESSION_TYPE_BASE) + { + png_warning(png_ptr, "Invalid compression type specified"); + compression_type = PNG_COMPRESSION_TYPE_BASE; + } + + /* Write filter_method 64 (intrapixel differencing) only if + * 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and + * 2. Libpng did not write a PNG signature (this filter_method is only + * used in PNG datastreams that are embedded in MNG datastreams) and + * 3. The application called png_permit_mng_features with a mask that + * included PNG_FLAG_MNG_FILTER_64 and + * 4. The filter_method is 64 and + * 5. The color_type is RGB or RGBA + */ + if ( +#ifdef PNG_MNG_FEATURES_SUPPORTED + !((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) != 0 && + ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) == 0) && + (color_type == PNG_COLOR_TYPE_RGB || + color_type == PNG_COLOR_TYPE_RGB_ALPHA) && + (filter_type == PNG_INTRAPIXEL_DIFFERENCING)) && +#endif + filter_type != PNG_FILTER_TYPE_BASE) + { + png_warning(png_ptr, "Invalid filter type specified"); + filter_type = PNG_FILTER_TYPE_BASE; + } + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + if (interlace_type != PNG_INTERLACE_NONE && + interlace_type != PNG_INTERLACE_ADAM7) + { + png_warning(png_ptr, "Invalid interlace type specified"); + interlace_type = PNG_INTERLACE_ADAM7; + } +#else + interlace_type=PNG_INTERLACE_NONE; +#endif + + /* Save the relevant information */ + png_ptr->bit_depth = (png_byte)bit_depth; + png_ptr->color_type = (png_byte)color_type; + png_ptr->interlaced = (png_byte)interlace_type; +#ifdef PNG_MNG_FEATURES_SUPPORTED + png_ptr->filter_type = (png_byte)filter_type; +#endif + png_ptr->compression_type = (png_byte)compression_type; + png_ptr->width = width; + png_ptr->height = height; + + png_ptr->pixel_depth = (png_byte)(bit_depth * png_ptr->channels); + png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, width); + /* Set the usr info, so any transformations can modify it */ + png_ptr->usr_width = png_ptr->width; + png_ptr->usr_bit_depth = png_ptr->bit_depth; + png_ptr->usr_channels = png_ptr->channels; + + /* Pack the header information into the buffer */ + png_save_uint_32(buf, width); + png_save_uint_32(buf + 4, height); + buf[8] = (png_byte)bit_depth; + buf[9] = (png_byte)color_type; + buf[10] = (png_byte)compression_type; + buf[11] = (png_byte)filter_type; + buf[12] = (png_byte)interlace_type; + + /* Write the chunk */ + png_write_complete_chunk(png_ptr, png_IHDR, buf, 13); + + if ((png_ptr->do_filter) == PNG_NO_FILTERS) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE || + png_ptr->bit_depth < 8) + png_ptr->do_filter = PNG_FILTER_NONE; + + else + png_ptr->do_filter = PNG_ALL_FILTERS; + } + + png_ptr->mode = PNG_HAVE_IHDR; /* not READY_FOR_ZTXT */ +} + +/* Write the palette. We are careful not to trust png_color to be in the + * correct order for PNG, so people can redefine it to any convenient + * structure. + */ +void /* PRIVATE */ +png_write_PLTE(png_structrp png_ptr, png_const_colorp palette, + png_uint_32 num_pal) +{ + png_uint_32 max_palette_length, i; + png_const_colorp pal_ptr; + png_byte buf[3]; + + png_debug(1, "in png_write_PLTE"); + + max_palette_length = (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ? + (1 << png_ptr->bit_depth) : PNG_MAX_PALETTE_LENGTH; + + if (( +#ifdef PNG_MNG_FEATURES_SUPPORTED + (png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) == 0 && +#endif + num_pal == 0) || num_pal > max_palette_length) + { + if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) + { + png_error(png_ptr, "Invalid number of colors in palette"); + } + + else + { + png_warning(png_ptr, "Invalid number of colors in palette"); + return; + } + } + + if ((png_ptr->color_type & PNG_COLOR_MASK_COLOR) == 0) + { + png_warning(png_ptr, + "Ignoring request to write a PLTE chunk in grayscale PNG"); + + return; + } + + png_ptr->num_palette = (png_uint_16)num_pal; + png_debug1(3, "num_palette = %d", png_ptr->num_palette); + + png_write_chunk_header(png_ptr, png_PLTE, (png_uint_32)(num_pal * 3)); +#ifdef PNG_POINTER_INDEXING_SUPPORTED + + for (i = 0, pal_ptr = palette; i < num_pal; i++, pal_ptr++) + { + buf[0] = pal_ptr->red; + buf[1] = pal_ptr->green; + buf[2] = pal_ptr->blue; + png_write_chunk_data(png_ptr, buf, 3); + } + +#else + /* This is a little slower but some buggy compilers need to do this + * instead + */ + pal_ptr=palette; + + for (i = 0; i < num_pal; i++) + { + buf[0] = pal_ptr[i].red; + buf[1] = pal_ptr[i].green; + buf[2] = pal_ptr[i].blue; + png_write_chunk_data(png_ptr, buf, 3); + } + +#endif + png_write_chunk_end(png_ptr); + png_ptr->mode |= PNG_HAVE_PLTE; +} + +/* This is similar to png_text_compress, above, except that it does not require + * all of the data at once and, instead of buffering the compressed result, + * writes it as IDAT chunks. Unlike png_text_compress it *can* png_error out + * because it calls the write interface. As a result it does its own error + * reporting and does not return an error code. In the event of error it will + * just call png_error. The input data length may exceed 32-bits. The 'flush' + * parameter is exactly the same as that to deflate, with the following + * meanings: + * + * Z_NO_FLUSH: normal incremental output of compressed data + * Z_SYNC_FLUSH: do a SYNC_FLUSH, used by png_write_flush + * Z_FINISH: this is the end of the input, do a Z_FINISH and clean up + * + * The routine manages the acquire and release of the png_ptr->zstream by + * checking and (at the end) clearing png_ptr->zowner; it does some sanity + * checks on the 'mode' flags while doing this. + */ +void /* PRIVATE */ +png_compress_IDAT(png_structrp png_ptr, png_const_bytep input, + png_alloc_size_t input_len, int flush) +{ + if (png_ptr->zowner != png_IDAT) + { + /* First time. Ensure we have a temporary buffer for compression and + * trim the buffer list if it has more than one entry to free memory. + * If 'WRITE_COMPRESSED_TEXT' is not set the list will never have been + * created at this point, but the check here is quick and safe. + */ + if (png_ptr->zbuffer_list == NULL) + { + png_ptr->zbuffer_list = png_voidcast(png_compression_bufferp, + png_malloc(png_ptr, PNG_COMPRESSION_BUFFER_SIZE(png_ptr))); + png_ptr->zbuffer_list->next = NULL; + } + + else + png_free_buffer_list(png_ptr, &png_ptr->zbuffer_list->next); + + /* It is a terminal error if we can't claim the zstream. */ + if (png_deflate_claim(png_ptr, png_IDAT, png_image_size(png_ptr)) != Z_OK) + png_error(png_ptr, png_ptr->zstream.msg); + + /* The output state is maintained in png_ptr->zstream, so it must be + * initialized here after the claim. + */ + png_ptr->zstream.next_out = png_ptr->zbuffer_list->output; + png_ptr->zstream.avail_out = png_ptr->zbuffer_size; + } + + /* Now loop reading and writing until all the input is consumed or an error + * terminates the operation. The _out values are maintained across calls to + * this function, but the input must be reset each time. + */ + png_ptr->zstream.next_in = PNGZ_INPUT_CAST(input); + png_ptr->zstream.avail_in = 0; /* set below */ + for (;;) + { + int ret; + + /* INPUT: from the row data */ + uInt avail = ZLIB_IO_MAX; + + if (avail > input_len) + avail = (uInt)input_len; /* safe because of the check */ + + png_ptr->zstream.avail_in = avail; + input_len -= avail; + + ret = deflate(&png_ptr->zstream, input_len > 0 ? Z_NO_FLUSH : flush); + + /* Include as-yet unconsumed input */ + input_len += png_ptr->zstream.avail_in; + png_ptr->zstream.avail_in = 0; + + /* OUTPUT: write complete IDAT chunks when avail_out drops to zero. Note + * that these two zstream fields are preserved across the calls, therefore + * there is no need to set these up on entry to the loop. + */ + if (png_ptr->zstream.avail_out == 0) + { + png_bytep data = png_ptr->zbuffer_list->output; + uInt size = png_ptr->zbuffer_size; + + /* Write an IDAT containing the data then reset the buffer. The + * first IDAT may need deflate header optimization. + */ +#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED + if ((png_ptr->mode & PNG_HAVE_IDAT) == 0 && + png_ptr->compression_type == PNG_COMPRESSION_TYPE_BASE) + optimize_cmf(data, png_image_size(png_ptr)); +#endif + + if (size > 0) + png_write_complete_chunk(png_ptr, png_IDAT, data, size); + png_ptr->mode |= PNG_HAVE_IDAT; + + png_ptr->zstream.next_out = data; + png_ptr->zstream.avail_out = size; + + /* For SYNC_FLUSH or FINISH it is essential to keep calling zlib with + * the same flush parameter until it has finished output, for NO_FLUSH + * it doesn't matter. + */ + if (ret == Z_OK && flush != Z_NO_FLUSH) + continue; + } + + /* The order of these checks doesn't matter much; it just affects which + * possible error might be detected if multiple things go wrong at once. + */ + if (ret == Z_OK) /* most likely return code! */ + { + /* If all the input has been consumed then just return. If Z_FINISH + * was used as the flush parameter something has gone wrong if we get + * here. + */ + if (input_len == 0) + { + if (flush == Z_FINISH) + png_error(png_ptr, "Z_OK on Z_FINISH with output space"); + + return; + } + } + + else if (ret == Z_STREAM_END && flush == Z_FINISH) + { + /* This is the end of the IDAT data; any pending output must be + * flushed. For small PNG files we may still be at the beginning. + */ + png_bytep data = png_ptr->zbuffer_list->output; + uInt size = png_ptr->zbuffer_size - png_ptr->zstream.avail_out; + +#ifdef PNG_WRITE_OPTIMIZE_CMF_SUPPORTED + if ((png_ptr->mode & PNG_HAVE_IDAT) == 0 && + png_ptr->compression_type == PNG_COMPRESSION_TYPE_BASE) + optimize_cmf(data, png_image_size(png_ptr)); +#endif + + if (size > 0) + png_write_complete_chunk(png_ptr, png_IDAT, data, size); + png_ptr->zstream.avail_out = 0; + png_ptr->zstream.next_out = NULL; + png_ptr->mode |= PNG_HAVE_IDAT | PNG_AFTER_IDAT; + + png_ptr->zowner = 0; /* Release the stream */ + return; + } + + else + { + /* This is an error condition. */ + png_zstream_error(png_ptr, ret); + png_error(png_ptr, png_ptr->zstream.msg); + } + } +} + +/* Write an IEND chunk */ +void /* PRIVATE */ +png_write_IEND(png_structrp png_ptr) +{ + png_debug(1, "in png_write_IEND"); + + png_write_complete_chunk(png_ptr, png_IEND, NULL, 0); + png_ptr->mode |= PNG_HAVE_IEND; +} + +#ifdef PNG_WRITE_gAMA_SUPPORTED +/* Write a gAMA chunk */ +void /* PRIVATE */ +png_write_gAMA_fixed(png_structrp png_ptr, png_fixed_point file_gamma) +{ + png_byte buf[4]; + + png_debug(1, "in png_write_gAMA"); + + /* file_gamma is saved in 1/100,000ths */ + png_save_uint_32(buf, (png_uint_32)file_gamma); + png_write_complete_chunk(png_ptr, png_gAMA, buf, 4); +} +#endif + +#ifdef PNG_WRITE_sRGB_SUPPORTED +/* Write a sRGB chunk */ +void /* PRIVATE */ +png_write_sRGB(png_structrp png_ptr, int srgb_intent) +{ + png_byte buf[1]; + + png_debug(1, "in png_write_sRGB"); + + if (srgb_intent >= PNG_sRGB_INTENT_LAST) + png_warning(png_ptr, + "Invalid sRGB rendering intent specified"); + + buf[0]=(png_byte)srgb_intent; + png_write_complete_chunk(png_ptr, png_sRGB, buf, 1); +} +#endif + +#ifdef PNG_WRITE_iCCP_SUPPORTED +/* Write an iCCP chunk */ +void /* PRIVATE */ +png_write_iCCP(png_structrp png_ptr, png_const_charp name, + png_const_bytep profile, png_uint_32 profile_len) +{ + png_uint_32 name_len; + png_byte new_name[81]; /* 1 byte for the compression byte */ + compression_state comp; + png_uint_32 temp; + + png_debug(1, "in png_write_iCCP"); + + /* These are all internal problems: the profile should have been checked + * before when it was stored. + */ + if (profile == NULL) + png_error(png_ptr, "No profile for iCCP chunk"); /* internal error */ + + if (profile_len < 132) + png_error(png_ptr, "ICC profile too short"); + + if (png_get_uint_32(profile) != profile_len) + png_error(png_ptr, "Incorrect data in iCCP"); + + temp = (png_uint_32) (*(profile+8)); + if (temp > 3 && (profile_len & 0x03)) + png_error(png_ptr, "ICC profile length invalid (not a multiple of 4)"); + + { + png_uint_32 embedded_profile_len = png_get_uint_32(profile); + + if (profile_len != embedded_profile_len) + png_error(png_ptr, "Profile length does not match profile"); + } + + name_len = png_check_keyword(png_ptr, name, new_name); + + if (name_len == 0) + png_error(png_ptr, "iCCP: invalid keyword"); + + new_name[++name_len] = PNG_COMPRESSION_TYPE_BASE; + + /* Make sure we include the NULL after the name and the compression type */ + ++name_len; + + png_text_compress_init(&comp, profile, profile_len); + + /* Allow for keyword terminator and compression byte */ + if (png_text_compress(png_ptr, png_iCCP, &comp, name_len) != Z_OK) + png_error(png_ptr, png_ptr->zstream.msg); + + png_write_chunk_header(png_ptr, png_iCCP, name_len + comp.output_len); + + png_write_chunk_data(png_ptr, new_name, name_len); + + png_write_compressed_data_out(png_ptr, &comp); + + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_sPLT_SUPPORTED +/* Write a sPLT chunk */ +void /* PRIVATE */ +png_write_sPLT(png_structrp png_ptr, png_const_sPLT_tp spalette) +{ + png_uint_32 name_len; + png_byte new_name[80]; + png_byte entrybuf[10]; + size_t entry_size = (spalette->depth == 8 ? 6 : 10); + size_t palette_size = entry_size * (size_t)spalette->nentries; + png_sPLT_entryp ep; +#ifndef PNG_POINTER_INDEXING_SUPPORTED + int i; +#endif + + png_debug(1, "in png_write_sPLT"); + + name_len = png_check_keyword(png_ptr, spalette->name, new_name); + + if (name_len == 0) + png_error(png_ptr, "sPLT: invalid keyword"); + + /* Make sure we include the NULL after the name */ + png_write_chunk_header(png_ptr, png_sPLT, + (png_uint_32)(name_len + 2 + palette_size)); + + png_write_chunk_data(png_ptr, (png_bytep)new_name, (size_t)(name_len + 1)); + + png_write_chunk_data(png_ptr, &spalette->depth, 1); + + /* Loop through each palette entry, writing appropriately */ +#ifdef PNG_POINTER_INDEXING_SUPPORTED + for (ep = spalette->entries; epentries + spalette->nentries; ep++) + { + if (spalette->depth == 8) + { + entrybuf[0] = (png_byte)ep->red; + entrybuf[1] = (png_byte)ep->green; + entrybuf[2] = (png_byte)ep->blue; + entrybuf[3] = (png_byte)ep->alpha; + png_save_uint_16(entrybuf + 4, ep->frequency); + } + + else + { + png_save_uint_16(entrybuf + 0, ep->red); + png_save_uint_16(entrybuf + 2, ep->green); + png_save_uint_16(entrybuf + 4, ep->blue); + png_save_uint_16(entrybuf + 6, ep->alpha); + png_save_uint_16(entrybuf + 8, ep->frequency); + } + + png_write_chunk_data(png_ptr, entrybuf, entry_size); + } +#else + ep=spalette->entries; + for (i = 0; i>spalette->nentries; i++) + { + if (spalette->depth == 8) + { + entrybuf[0] = (png_byte)ep[i].red; + entrybuf[1] = (png_byte)ep[i].green; + entrybuf[2] = (png_byte)ep[i].blue; + entrybuf[3] = (png_byte)ep[i].alpha; + png_save_uint_16(entrybuf + 4, ep[i].frequency); + } + + else + { + png_save_uint_16(entrybuf + 0, ep[i].red); + png_save_uint_16(entrybuf + 2, ep[i].green); + png_save_uint_16(entrybuf + 4, ep[i].blue); + png_save_uint_16(entrybuf + 6, ep[i].alpha); + png_save_uint_16(entrybuf + 8, ep[i].frequency); + } + + png_write_chunk_data(png_ptr, entrybuf, entry_size); + } +#endif + + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_sBIT_SUPPORTED +/* Write the sBIT chunk */ +void /* PRIVATE */ +png_write_sBIT(png_structrp png_ptr, png_const_color_8p sbit, int color_type) +{ + png_byte buf[4]; + size_t size; + + png_debug(1, "in png_write_sBIT"); + + /* Make sure we don't depend upon the order of PNG_COLOR_8 */ + if ((color_type & PNG_COLOR_MASK_COLOR) != 0) + { + png_byte maxbits; + + maxbits = (png_byte)(color_type==PNG_COLOR_TYPE_PALETTE ? 8 : + png_ptr->usr_bit_depth); + + if (sbit->red == 0 || sbit->red > maxbits || + sbit->green == 0 || sbit->green > maxbits || + sbit->blue == 0 || sbit->blue > maxbits) + { + png_warning(png_ptr, "Invalid sBIT depth specified"); + return; + } + + buf[0] = sbit->red; + buf[1] = sbit->green; + buf[2] = sbit->blue; + size = 3; + } + + else + { + if (sbit->gray == 0 || sbit->gray > png_ptr->usr_bit_depth) + { + png_warning(png_ptr, "Invalid sBIT depth specified"); + return; + } + + buf[0] = sbit->gray; + size = 1; + } + + if ((color_type & PNG_COLOR_MASK_ALPHA) != 0) + { + if (sbit->alpha == 0 || sbit->alpha > png_ptr->usr_bit_depth) + { + png_warning(png_ptr, "Invalid sBIT depth specified"); + return; + } + + buf[size++] = sbit->alpha; + } + + png_write_complete_chunk(png_ptr, png_sBIT, buf, size); +} +#endif + +#ifdef PNG_WRITE_cHRM_SUPPORTED +/* Write the cHRM chunk */ +void /* PRIVATE */ +png_write_cHRM_fixed(png_structrp png_ptr, const png_xy *xy) +{ + png_byte buf[32]; + + png_debug(1, "in png_write_cHRM"); + + /* Each value is saved in 1/100,000ths */ + png_save_int_32(buf, xy->whitex); + png_save_int_32(buf + 4, xy->whitey); + + png_save_int_32(buf + 8, xy->redx); + png_save_int_32(buf + 12, xy->redy); + + png_save_int_32(buf + 16, xy->greenx); + png_save_int_32(buf + 20, xy->greeny); + + png_save_int_32(buf + 24, xy->bluex); + png_save_int_32(buf + 28, xy->bluey); + + png_write_complete_chunk(png_ptr, png_cHRM, buf, 32); +} +#endif + +#ifdef PNG_WRITE_tRNS_SUPPORTED +/* Write the tRNS chunk */ +void /* PRIVATE */ +png_write_tRNS(png_structrp png_ptr, png_const_bytep trans_alpha, + png_const_color_16p tran, int num_trans, int color_type) +{ + png_byte buf[6]; + + png_debug(1, "in png_write_tRNS"); + + if (color_type == PNG_COLOR_TYPE_PALETTE) + { + if (num_trans <= 0 || num_trans > (int)png_ptr->num_palette) + { + png_app_warning(png_ptr, + "Invalid number of transparent colors specified"); + return; + } + + /* Write the chunk out as it is */ + png_write_complete_chunk(png_ptr, png_tRNS, trans_alpha, + (size_t)num_trans); + } + + else if (color_type == PNG_COLOR_TYPE_GRAY) + { + /* One 16-bit value */ + if (tran->gray >= (1 << png_ptr->bit_depth)) + { + png_app_warning(png_ptr, + "Ignoring attempt to write tRNS chunk out-of-range for bit_depth"); + + return; + } + + png_save_uint_16(buf, tran->gray); + png_write_complete_chunk(png_ptr, png_tRNS, buf, 2); + } + + else if (color_type == PNG_COLOR_TYPE_RGB) + { + /* Three 16-bit values */ + png_save_uint_16(buf, tran->red); + png_save_uint_16(buf + 2, tran->green); + png_save_uint_16(buf + 4, tran->blue); +#ifdef PNG_WRITE_16BIT_SUPPORTED + if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]) != 0) +#else + if ((buf[0] | buf[2] | buf[4]) != 0) +#endif + { + png_app_warning(png_ptr, + "Ignoring attempt to write 16-bit tRNS chunk when bit_depth is 8"); + return; + } + + png_write_complete_chunk(png_ptr, png_tRNS, buf, 6); + } + + else + { + png_app_warning(png_ptr, "Can't write tRNS with an alpha channel"); + } +} +#endif + +#ifdef PNG_WRITE_bKGD_SUPPORTED +/* Write the background chunk */ +void /* PRIVATE */ +png_write_bKGD(png_structrp png_ptr, png_const_color_16p back, int color_type) +{ + png_byte buf[6]; + + png_debug(1, "in png_write_bKGD"); + + if (color_type == PNG_COLOR_TYPE_PALETTE) + { + if ( +#ifdef PNG_MNG_FEATURES_SUPPORTED + (png_ptr->num_palette != 0 || + (png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) == 0) && +#endif + back->index >= png_ptr->num_palette) + { + png_warning(png_ptr, "Invalid background palette index"); + return; + } + + buf[0] = back->index; + png_write_complete_chunk(png_ptr, png_bKGD, buf, 1); + } + + else if ((color_type & PNG_COLOR_MASK_COLOR) != 0) + { + png_save_uint_16(buf, back->red); + png_save_uint_16(buf + 2, back->green); + png_save_uint_16(buf + 4, back->blue); +#ifdef PNG_WRITE_16BIT_SUPPORTED + if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]) != 0) +#else + if ((buf[0] | buf[2] | buf[4]) != 0) +#endif + { + png_warning(png_ptr, + "Ignoring attempt to write 16-bit bKGD chunk " + "when bit_depth is 8"); + + return; + } + + png_write_complete_chunk(png_ptr, png_bKGD, buf, 6); + } + + else + { + if (back->gray >= (1 << png_ptr->bit_depth)) + { + png_warning(png_ptr, + "Ignoring attempt to write bKGD chunk out-of-range for bit_depth"); + + return; + } + + png_save_uint_16(buf, back->gray); + png_write_complete_chunk(png_ptr, png_bKGD, buf, 2); + } +} +#endif + +#ifdef PNG_WRITE_cICP_SUPPORTED +/* Write the cICP data */ +void /* PRIVATE */ +png_write_cICP(png_structrp png_ptr, + png_byte colour_primaries, png_byte transfer_function, + png_byte matrix_coefficients, png_byte video_full_range_flag) +{ + png_byte buf[4]; + + png_debug(1, "in png_write_cICP"); + + png_write_chunk_header(png_ptr, png_cICP, 4); + + buf[0] = colour_primaries; + buf[1] = transfer_function; + buf[2] = matrix_coefficients; + buf[3] = video_full_range_flag; + png_write_chunk_data(png_ptr, buf, 4); + + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_cLLI_SUPPORTED +void /* PRIVATE */ +png_write_cLLI_fixed(png_structrp png_ptr, png_uint_32 maxCLL, + png_uint_32 maxFALL) +{ + png_byte buf[8]; + + png_debug(1, "in png_write_cLLI_fixed"); + + png_save_uint_32(buf, maxCLL); + png_save_uint_32(buf + 4, maxFALL); + + png_write_complete_chunk(png_ptr, png_cLLI, buf, 8); +} +#endif + +#ifdef PNG_WRITE_mDCV_SUPPORTED +void /* PRIVATE */ +png_write_mDCV_fixed(png_structrp png_ptr, + png_uint_16 red_x, png_uint_16 red_y, + png_uint_16 green_x, png_uint_16 green_y, + png_uint_16 blue_x, png_uint_16 blue_y, + png_uint_16 white_x, png_uint_16 white_y, + png_uint_32 maxDL, png_uint_32 minDL) +{ + png_byte buf[24]; + + png_debug(1, "in png_write_mDCV_fixed"); + + png_save_uint_16(buf + 0, red_x); + png_save_uint_16(buf + 2, red_y); + png_save_uint_16(buf + 4, green_x); + png_save_uint_16(buf + 6, green_y); + png_save_uint_16(buf + 8, blue_x); + png_save_uint_16(buf + 10, blue_y); + png_save_uint_16(buf + 12, white_x); + png_save_uint_16(buf + 14, white_y); + png_save_uint_32(buf + 16, maxDL); + png_save_uint_32(buf + 20, minDL); + + png_write_complete_chunk(png_ptr, png_mDCV, buf, 24); +} +#endif + +#ifdef PNG_WRITE_eXIf_SUPPORTED +/* Write the Exif data */ +void /* PRIVATE */ +png_write_eXIf(png_structrp png_ptr, png_bytep exif, int num_exif) +{ + int i; + png_byte buf[1]; + + png_debug(1, "in png_write_eXIf"); + + png_write_chunk_header(png_ptr, png_eXIf, (png_uint_32)(num_exif)); + + for (i = 0; i < num_exif; i++) + { + buf[0] = exif[i]; + png_write_chunk_data(png_ptr, buf, 1); + } + + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_hIST_SUPPORTED +/* Write the histogram */ +void /* PRIVATE */ +png_write_hIST(png_structrp png_ptr, png_const_uint_16p hist, int num_hist) +{ + int i; + png_byte buf[3]; + + png_debug(1, "in png_write_hIST"); + + if (num_hist > (int)png_ptr->num_palette) + { + png_debug2(3, "num_hist = %d, num_palette = %d", num_hist, + png_ptr->num_palette); + + png_warning(png_ptr, "Invalid number of histogram entries specified"); + return; + } + + png_write_chunk_header(png_ptr, png_hIST, (png_uint_32)(num_hist * 2)); + + for (i = 0; i < num_hist; i++) + { + png_save_uint_16(buf, hist[i]); + png_write_chunk_data(png_ptr, buf, 2); + } + + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_tEXt_SUPPORTED +/* Write a tEXt chunk */ +void /* PRIVATE */ +png_write_tEXt(png_structrp png_ptr, png_const_charp key, png_const_charp text, + size_t text_len) +{ + png_uint_32 key_len; + png_byte new_key[80]; + + png_debug(1, "in png_write_tEXt"); + + key_len = png_check_keyword(png_ptr, key, new_key); + + if (key_len == 0) + png_error(png_ptr, "tEXt: invalid keyword"); + + if (text == NULL || *text == '\0') + text_len = 0; + + else + text_len = strlen(text); + + if (text_len > PNG_UINT_31_MAX - (key_len+1)) + png_error(png_ptr, "tEXt: text too long"); + + /* Make sure we include the 0 after the key */ + png_write_chunk_header(png_ptr, png_tEXt, + (png_uint_32)/*checked above*/(key_len + text_len + 1)); + /* + * We leave it to the application to meet PNG-1.0 requirements on the + * contents of the text. PNG-1.0 through PNG-1.2 discourage the use of + * any non-Latin-1 characters except for NEWLINE. ISO PNG will forbid them. + * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG. + */ + png_write_chunk_data(png_ptr, new_key, key_len + 1); + + if (text_len != 0) + png_write_chunk_data(png_ptr, (png_const_bytep)text, text_len); + + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_zTXt_SUPPORTED +/* Write a compressed text chunk */ +void /* PRIVATE */ +png_write_zTXt(png_structrp png_ptr, png_const_charp key, png_const_charp text, + int compression) +{ + png_uint_32 key_len; + png_byte new_key[81]; + compression_state comp; + + png_debug(1, "in png_write_zTXt"); + + if (compression == PNG_TEXT_COMPRESSION_NONE) + { + png_write_tEXt(png_ptr, key, text, 0); + return; + } + + if (compression != PNG_TEXT_COMPRESSION_zTXt) + png_error(png_ptr, "zTXt: invalid compression type"); + + key_len = png_check_keyword(png_ptr, key, new_key); + + if (key_len == 0) + png_error(png_ptr, "zTXt: invalid keyword"); + + /* Add the compression method and 1 for the keyword separator. */ + new_key[++key_len] = PNG_COMPRESSION_TYPE_BASE; + ++key_len; + + /* Compute the compressed data; do it now for the length */ + png_text_compress_init(&comp, (png_const_bytep)text, + text == NULL ? 0 : strlen(text)); + + if (png_text_compress(png_ptr, png_zTXt, &comp, key_len) != Z_OK) + png_error(png_ptr, png_ptr->zstream.msg); + + /* Write start of chunk */ + png_write_chunk_header(png_ptr, png_zTXt, key_len + comp.output_len); + + /* Write key */ + png_write_chunk_data(png_ptr, new_key, key_len); + + /* Write the compressed data */ + png_write_compressed_data_out(png_ptr, &comp); + + /* Close the chunk */ + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_iTXt_SUPPORTED +/* Write an iTXt chunk */ +void /* PRIVATE */ +png_write_iTXt(png_structrp png_ptr, int compression, png_const_charp key, + png_const_charp lang, png_const_charp lang_key, png_const_charp text) +{ + png_uint_32 key_len, prefix_len; + size_t lang_len, lang_key_len; + png_byte new_key[82]; + compression_state comp; + + png_debug(1, "in png_write_iTXt"); + + key_len = png_check_keyword(png_ptr, key, new_key); + + if (key_len == 0) + png_error(png_ptr, "iTXt: invalid keyword"); + + /* Set the compression flag */ + switch (compression) + { + case PNG_ITXT_COMPRESSION_NONE: + case PNG_TEXT_COMPRESSION_NONE: + compression = new_key[++key_len] = 0; /* no compression */ + break; + + case PNG_TEXT_COMPRESSION_zTXt: + case PNG_ITXT_COMPRESSION_zTXt: + compression = new_key[++key_len] = 1; /* compressed */ + break; + + default: + png_error(png_ptr, "iTXt: invalid compression"); + } + + new_key[++key_len] = PNG_COMPRESSION_TYPE_BASE; + ++key_len; /* for the keywod separator */ + + /* We leave it to the application to meet PNG-1.0 requirements on the + * contents of the text. PNG-1.0 through PNG-1.2 discourage the use of + * any non-Latin-1 characters except for NEWLINE. ISO PNG, however, + * specifies that the text is UTF-8 and this really doesn't require any + * checking. + * + * The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG. + * + * TODO: validate the language tag correctly (see the spec.) + */ + if (lang == NULL) lang = ""; /* empty language is valid */ + lang_len = strlen(lang)+1; + if (lang_key == NULL) lang_key = ""; /* may be empty */ + lang_key_len = strlen(lang_key)+1; + if (text == NULL) text = ""; /* may be empty */ + + prefix_len = key_len; + if (lang_len > PNG_UINT_31_MAX-prefix_len) + prefix_len = PNG_UINT_31_MAX; + else + prefix_len = (png_uint_32)(prefix_len + lang_len); + + if (lang_key_len > PNG_UINT_31_MAX-prefix_len) + prefix_len = PNG_UINT_31_MAX; + else + prefix_len = (png_uint_32)(prefix_len + lang_key_len); + + png_text_compress_init(&comp, (png_const_bytep)text, strlen(text)); + + if (compression != 0) + { + if (png_text_compress(png_ptr, png_iTXt, &comp, prefix_len) != Z_OK) + png_error(png_ptr, png_ptr->zstream.msg); + } + + else + { + if (comp.input_len > PNG_UINT_31_MAX-prefix_len) + png_error(png_ptr, "iTXt: uncompressed text too long"); + + /* So the string will fit in a chunk: */ + comp.output_len = (png_uint_32)/*SAFE*/comp.input_len; + } + + png_write_chunk_header(png_ptr, png_iTXt, comp.output_len + prefix_len); + + png_write_chunk_data(png_ptr, new_key, key_len); + + png_write_chunk_data(png_ptr, (png_const_bytep)lang, lang_len); + + png_write_chunk_data(png_ptr, (png_const_bytep)lang_key, lang_key_len); + + if (compression != 0) + png_write_compressed_data_out(png_ptr, &comp); + + else + png_write_chunk_data(png_ptr, (png_const_bytep)text, comp.output_len); + + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_oFFs_SUPPORTED +/* Write the oFFs chunk */ +void /* PRIVATE */ +png_write_oFFs(png_structrp png_ptr, png_int_32 x_offset, png_int_32 y_offset, + int unit_type) +{ + png_byte buf[9]; + + png_debug(1, "in png_write_oFFs"); + + if (unit_type >= PNG_OFFSET_LAST) + png_warning(png_ptr, "Unrecognized unit type for oFFs chunk"); + + png_save_int_32(buf, x_offset); + png_save_int_32(buf + 4, y_offset); + buf[8] = (png_byte)unit_type; + + png_write_complete_chunk(png_ptr, png_oFFs, buf, 9); +} +#endif +#ifdef PNG_WRITE_pCAL_SUPPORTED +/* Write the pCAL chunk (described in the PNG extensions document) */ +void /* PRIVATE */ +png_write_pCAL(png_structrp png_ptr, png_charp purpose, png_int_32 X0, + png_int_32 X1, int type, int nparams, png_const_charp units, + png_charpp params) +{ + png_uint_32 purpose_len; + size_t units_len, total_len; + size_t *params_len; + png_byte buf[10]; + png_byte new_purpose[80]; + int i; + + png_debug1(1, "in png_write_pCAL (%d parameters)", nparams); + + if (type >= PNG_EQUATION_LAST) + png_error(png_ptr, "Unrecognized equation type for pCAL chunk"); + + purpose_len = png_check_keyword(png_ptr, purpose, new_purpose); + + if (purpose_len == 0) + png_error(png_ptr, "pCAL: invalid keyword"); + + ++purpose_len; /* terminator */ + + png_debug1(3, "pCAL purpose length = %d", (int)purpose_len); + units_len = strlen(units) + (nparams == 0 ? 0 : 1); + png_debug1(3, "pCAL units length = %d", (int)units_len); + total_len = purpose_len + units_len + 10; + + params_len = (size_t *)png_malloc(png_ptr, + (png_alloc_size_t)((png_alloc_size_t)nparams * (sizeof (size_t)))); + + /* Find the length of each parameter, making sure we don't count the + * null terminator for the last parameter. + */ + for (i = 0; i < nparams; i++) + { + params_len[i] = strlen(params[i]) + (i == nparams - 1 ? 0 : 1); + png_debug2(3, "pCAL parameter %d length = %lu", i, + (unsigned long)params_len[i]); + total_len += params_len[i]; + } + + png_debug1(3, "pCAL total length = %d", (int)total_len); + png_write_chunk_header(png_ptr, png_pCAL, (png_uint_32)total_len); + png_write_chunk_data(png_ptr, new_purpose, purpose_len); + png_save_int_32(buf, X0); + png_save_int_32(buf + 4, X1); + buf[8] = (png_byte)type; + buf[9] = (png_byte)nparams; + png_write_chunk_data(png_ptr, buf, 10); + png_write_chunk_data(png_ptr, (png_const_bytep)units, (size_t)units_len); + + for (i = 0; i < nparams; i++) + { + png_write_chunk_data(png_ptr, (png_const_bytep)params[i], params_len[i]); + } + + png_free(png_ptr, params_len); + png_write_chunk_end(png_ptr); +} +#endif + +#ifdef PNG_WRITE_sCAL_SUPPORTED +/* Write the sCAL chunk */ +void /* PRIVATE */ +png_write_sCAL_s(png_structrp png_ptr, int unit, png_const_charp width, + png_const_charp height) +{ + png_byte buf[64]; + size_t wlen, hlen, total_len; + + png_debug(1, "in png_write_sCAL_s"); + + wlen = strlen(width); + hlen = strlen(height); + total_len = wlen + hlen + 2; + + if (total_len > 64) + { + png_warning(png_ptr, "Can't write sCAL (buffer too small)"); + return; + } + + buf[0] = (png_byte)unit; + memcpy(buf + 1, width, wlen + 1); /* Append the '\0' here */ + memcpy(buf + wlen + 2, height, hlen); /* Do NOT append the '\0' here */ + + png_debug1(3, "sCAL total length = %u", (unsigned int)total_len); + png_write_complete_chunk(png_ptr, png_sCAL, buf, total_len); +} +#endif + +#ifdef PNG_WRITE_pHYs_SUPPORTED +/* Write the pHYs chunk */ +void /* PRIVATE */ +png_write_pHYs(png_structrp png_ptr, png_uint_32 x_pixels_per_unit, + png_uint_32 y_pixels_per_unit, + int unit_type) +{ + png_byte buf[9]; + + png_debug(1, "in png_write_pHYs"); + + if (unit_type >= PNG_RESOLUTION_LAST) + png_warning(png_ptr, "Unrecognized unit type for pHYs chunk"); + + png_save_uint_32(buf, x_pixels_per_unit); + png_save_uint_32(buf + 4, y_pixels_per_unit); + buf[8] = (png_byte)unit_type; + + png_write_complete_chunk(png_ptr, png_pHYs, buf, 9); +} +#endif + +#ifdef PNG_WRITE_tIME_SUPPORTED +/* Write the tIME chunk. Use either png_convert_from_struct_tm() + * or png_convert_from_time_t(), or fill in the structure yourself. + */ +void /* PRIVATE */ +png_write_tIME(png_structrp png_ptr, png_const_timep mod_time) +{ + png_byte buf[7]; + + png_debug(1, "in png_write_tIME"); + + if (mod_time->month > 12 || mod_time->month < 1 || + mod_time->day > 31 || mod_time->day < 1 || + mod_time->hour > 23 || mod_time->second > 60) + { + png_warning(png_ptr, "Invalid time specified for tIME chunk"); + return; + } + + png_save_uint_16(buf, mod_time->year); + buf[2] = mod_time->month; + buf[3] = mod_time->day; + buf[4] = mod_time->hour; + buf[5] = mod_time->minute; + buf[6] = mod_time->second; + + png_write_complete_chunk(png_ptr, png_tIME, buf, 7); +} +#endif + +/* Initializes the row writing capability of libpng */ +void /* PRIVATE */ +png_write_start_row(png_structrp png_ptr) +{ + png_alloc_size_t buf_size; + int usr_pixel_depth; + +#ifdef PNG_WRITE_FILTER_SUPPORTED + png_byte filters; +#endif + + png_debug(1, "in png_write_start_row"); + + usr_pixel_depth = png_ptr->usr_channels * png_ptr->usr_bit_depth; + buf_size = PNG_ROWBYTES(usr_pixel_depth, png_ptr->width) + 1; + + /* 1.5.6: added to allow checking in the row write code. */ + png_ptr->transformed_pixel_depth = png_ptr->pixel_depth; + png_ptr->maximum_pixel_depth = (png_byte)usr_pixel_depth; + + /* Set up row buffer */ + png_ptr->row_buf = png_voidcast(png_bytep, png_malloc(png_ptr, buf_size)); + + png_ptr->row_buf[0] = PNG_FILTER_VALUE_NONE; + +#ifdef PNG_WRITE_FILTER_SUPPORTED + filters = png_ptr->do_filter; + + if (png_ptr->height == 1) + filters &= 0xff & ~(PNG_FILTER_UP|PNG_FILTER_AVG|PNG_FILTER_PAETH); + + if (png_ptr->width == 1) + filters &= 0xff & ~(PNG_FILTER_SUB|PNG_FILTER_AVG|PNG_FILTER_PAETH); + + if (filters == 0) + filters = PNG_FILTER_NONE; + + png_ptr->do_filter = filters; + + if (((filters & (PNG_FILTER_SUB | PNG_FILTER_UP | PNG_FILTER_AVG | + PNG_FILTER_PAETH)) != 0) && png_ptr->try_row == NULL) + { + int num_filters = 0; + + png_ptr->try_row = png_voidcast(png_bytep, png_malloc(png_ptr, buf_size)); + + if (filters & PNG_FILTER_SUB) + num_filters++; + + if (filters & PNG_FILTER_UP) + num_filters++; + + if (filters & PNG_FILTER_AVG) + num_filters++; + + if (filters & PNG_FILTER_PAETH) + num_filters++; + + if (num_filters > 1) + png_ptr->tst_row = png_voidcast(png_bytep, png_malloc(png_ptr, + buf_size)); + } + + /* We only need to keep the previous row if we are using one of the following + * filters. + */ + if ((filters & (PNG_FILTER_AVG | PNG_FILTER_UP | PNG_FILTER_PAETH)) != 0) + png_ptr->prev_row = png_voidcast(png_bytep, + png_calloc(png_ptr, buf_size)); +#endif /* WRITE_FILTER */ + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* If interlaced, we need to set up width and height of pass */ + if (png_ptr->interlaced != 0) + { + if ((png_ptr->transformations & PNG_INTERLACE) == 0) + { + png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 - + png_pass_ystart[0]) / png_pass_yinc[0]; + + png_ptr->usr_width = (png_ptr->width + png_pass_inc[0] - 1 - + png_pass_start[0]) / png_pass_inc[0]; + } + + else + { + png_ptr->num_rows = png_ptr->height; + png_ptr->usr_width = png_ptr->width; + } + } + + else +#endif + { + png_ptr->num_rows = png_ptr->height; + png_ptr->usr_width = png_ptr->width; + } +} + +/* Internal use only. Called when finished processing a row of data. */ +void /* PRIVATE */ +png_write_finish_row(png_structrp png_ptr) +{ + png_debug(1, "in png_write_finish_row"); + + /* Next row */ + png_ptr->row_number++; + + /* See if we are done */ + if (png_ptr->row_number < png_ptr->num_rows) + return; + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED + /* If interlaced, go to next pass */ + if (png_ptr->interlaced != 0) + { + png_ptr->row_number = 0; + if ((png_ptr->transformations & PNG_INTERLACE) != 0) + { + png_ptr->pass++; + } + + else + { + /* Loop until we find a non-zero width or height pass */ + do + { + png_ptr->pass++; + + if (png_ptr->pass >= 7) + break; + + png_ptr->usr_width = (png_ptr->width + + png_pass_inc[png_ptr->pass] - 1 - + png_pass_start[png_ptr->pass]) / + png_pass_inc[png_ptr->pass]; + + png_ptr->num_rows = (png_ptr->height + + png_pass_yinc[png_ptr->pass] - 1 - + png_pass_ystart[png_ptr->pass]) / + png_pass_yinc[png_ptr->pass]; + + if ((png_ptr->transformations & PNG_INTERLACE) != 0) + break; + + } while (png_ptr->usr_width == 0 || png_ptr->num_rows == 0); + + } + + /* Reset the row above the image for the next pass */ + if (png_ptr->pass < 7) + { + if (png_ptr->prev_row != NULL) + memset(png_ptr->prev_row, 0, + PNG_ROWBYTES(png_ptr->usr_channels * + png_ptr->usr_bit_depth, png_ptr->width) + 1); + + return; + } + } +#endif + + /* If we get here, we've just written the last row, so we need + to flush the compressor */ + png_compress_IDAT(png_ptr, NULL, 0, Z_FINISH); +} + +#ifdef PNG_WRITE_INTERLACING_SUPPORTED +/* Pick out the correct pixels for the interlace pass. + * The basic idea here is to go through the row with a source + * pointer and a destination pointer (sp and dp), and copy the + * correct pixels for the pass. As the row gets compacted, + * sp will always be >= dp, so we should never overwrite anything. + * See the default: case for the easiest code to understand. + */ +void /* PRIVATE */ +png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass) +{ + png_debug(1, "in png_do_write_interlace"); + + /* We don't have to do anything on the last pass (6) */ + if (pass < 6) + { + /* Each pixel depth is handled separately */ + switch (row_info->pixel_depth) + { + case 1: + { + png_bytep sp; + png_bytep dp; + unsigned int shift; + int d; + int value; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + dp = row; + d = 0; + shift = 7; + + for (i = png_pass_start[pass]; i < row_width; + i += png_pass_inc[pass]) + { + sp = row + (size_t)(i >> 3); + value = (int)(*sp >> (7 - (int)(i & 0x07))) & 0x01; + d |= (value << shift); + + if (shift == 0) + { + shift = 7; + *dp++ = (png_byte)d; + d = 0; + } + + else + shift--; + + } + if (shift != 7) + *dp = (png_byte)d; + + break; + } + + case 2: + { + png_bytep sp; + png_bytep dp; + unsigned int shift; + int d; + int value; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + dp = row; + shift = 6; + d = 0; + + for (i = png_pass_start[pass]; i < row_width; + i += png_pass_inc[pass]) + { + sp = row + (size_t)(i >> 2); + value = (*sp >> ((3 - (int)(i & 0x03)) << 1)) & 0x03; + d |= (value << shift); + + if (shift == 0) + { + shift = 6; + *dp++ = (png_byte)d; + d = 0; + } + + else + shift -= 2; + } + if (shift != 6) + *dp = (png_byte)d; + + break; + } + + case 4: + { + png_bytep sp; + png_bytep dp; + unsigned int shift; + int d; + int value; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + + dp = row; + shift = 4; + d = 0; + for (i = png_pass_start[pass]; i < row_width; + i += png_pass_inc[pass]) + { + sp = row + (size_t)(i >> 1); + value = (*sp >> ((1 - (int)(i & 0x01)) << 2)) & 0x0f; + d |= (value << shift); + + if (shift == 0) + { + shift = 4; + *dp++ = (png_byte)d; + d = 0; + } + + else + shift -= 4; + } + if (shift != 4) + *dp = (png_byte)d; + + break; + } + + default: + { + png_bytep sp; + png_bytep dp; + png_uint_32 i; + png_uint_32 row_width = row_info->width; + size_t pixel_bytes; + + /* Start at the beginning */ + dp = row; + + /* Find out how many bytes each pixel takes up */ + pixel_bytes = (row_info->pixel_depth >> 3); + + /* Loop through the row, only looking at the pixels that matter */ + for (i = png_pass_start[pass]; i < row_width; + i += png_pass_inc[pass]) + { + /* Find out where the original pixel is */ + sp = row + (size_t)i * pixel_bytes; + + /* Move the pixel */ + if (dp != sp) + memcpy(dp, sp, pixel_bytes); + + /* Next pixel */ + dp += pixel_bytes; + } + break; + } + } + /* Set new row width */ + row_info->width = (row_info->width + + png_pass_inc[pass] - 1 - + png_pass_start[pass]) / + png_pass_inc[pass]; + + row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, + row_info->width); + } +} +#endif + + +/* This filters the row, chooses which filter to use, if it has not already + * been specified by the application, and then writes the row out with the + * chosen filter. + */ +static void /* PRIVATE */ +png_write_filtered_row(png_structrp png_ptr, png_bytep filtered_row, + size_t row_bytes); + +#ifdef PNG_WRITE_FILTER_SUPPORTED +static size_t /* PRIVATE */ +png_setup_sub_row(png_structrp png_ptr, png_uint_32 bpp, + size_t row_bytes, size_t lmins) +{ + png_bytep rp, dp, lp; + size_t i; + size_t sum = 0; + unsigned int v; + + png_ptr->try_row[0] = PNG_FILTER_VALUE_SUB; + + for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1; i < bpp; + i++, rp++, dp++) + { + v = *dp = *rp; +#ifdef PNG_USE_ABS + sum += 128 - abs((int)v - 128); +#else + sum += (v < 128) ? v : 256 - v; +#endif + } + + for (lp = png_ptr->row_buf + 1; i < row_bytes; + i++, rp++, lp++, dp++) + { + v = *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff); +#ifdef PNG_USE_ABS + sum += 128 - abs((int)v - 128); +#else + sum += (v < 128) ? v : 256 - v; +#endif + + if (sum > lmins) /* We are already worse, don't continue. */ + break; + } + + return sum; +} + +static void /* PRIVATE */ +png_setup_sub_row_only(png_structrp png_ptr, png_uint_32 bpp, + size_t row_bytes) +{ + png_bytep rp, dp, lp; + size_t i; + + png_ptr->try_row[0] = PNG_FILTER_VALUE_SUB; + + for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1; i < bpp; + i++, rp++, dp++) + { + *dp = *rp; + } + + for (lp = png_ptr->row_buf + 1; i < row_bytes; + i++, rp++, lp++, dp++) + { + *dp = (png_byte)(((int)*rp - (int)*lp) & 0xff); + } +} + +static size_t /* PRIVATE */ +png_setup_up_row(png_structrp png_ptr, size_t row_bytes, size_t lmins) +{ + png_bytep rp, dp, pp; + size_t i; + size_t sum = 0; + unsigned int v; + + png_ptr->try_row[0] = PNG_FILTER_VALUE_UP; + + for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1, + pp = png_ptr->prev_row + 1; i < row_bytes; + i++, rp++, pp++, dp++) + { + v = *dp = (png_byte)(((int)*rp - (int)*pp) & 0xff); +#ifdef PNG_USE_ABS + sum += 128 - abs((int)v - 128); +#else + sum += (v < 128) ? v : 256 - v; +#endif + + if (sum > lmins) /* We are already worse, don't continue. */ + break; + } + + return sum; +} +static void /* PRIVATE */ +png_setup_up_row_only(png_structrp png_ptr, size_t row_bytes) +{ + png_bytep rp, dp, pp; + size_t i; + + png_ptr->try_row[0] = PNG_FILTER_VALUE_UP; + + for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1, + pp = png_ptr->prev_row + 1; i < row_bytes; + i++, rp++, pp++, dp++) + { + *dp = (png_byte)(((int)*rp - (int)*pp) & 0xff); + } +} + +static size_t /* PRIVATE */ +png_setup_avg_row(png_structrp png_ptr, png_uint_32 bpp, + size_t row_bytes, size_t lmins) +{ + png_bytep rp, dp, pp, lp; + png_uint_32 i; + size_t sum = 0; + unsigned int v; + + png_ptr->try_row[0] = PNG_FILTER_VALUE_AVG; + + for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1, + pp = png_ptr->prev_row + 1; i < bpp; i++) + { + v = *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff); + +#ifdef PNG_USE_ABS + sum += 128 - abs((int)v - 128); +#else + sum += (v < 128) ? v : 256 - v; +#endif + } + + for (lp = png_ptr->row_buf + 1; i < row_bytes; i++) + { + v = *dp++ = (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) + & 0xff); + +#ifdef PNG_USE_ABS + sum += 128 - abs((int)v - 128); +#else + sum += (v < 128) ? v : 256 - v; +#endif + + if (sum > lmins) /* We are already worse, don't continue. */ + break; + } + + return sum; +} +static void /* PRIVATE */ +png_setup_avg_row_only(png_structrp png_ptr, png_uint_32 bpp, + size_t row_bytes) +{ + png_bytep rp, dp, pp, lp; + png_uint_32 i; + + png_ptr->try_row[0] = PNG_FILTER_VALUE_AVG; + + for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1, + pp = png_ptr->prev_row + 1; i < bpp; i++) + { + *dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff); + } + + for (lp = png_ptr->row_buf + 1; i < row_bytes; i++) + { + *dp++ = (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) + & 0xff); + } +} + +static size_t /* PRIVATE */ +png_setup_paeth_row(png_structrp png_ptr, png_uint_32 bpp, + size_t row_bytes, size_t lmins) +{ + png_bytep rp, dp, pp, cp, lp; + size_t i; + size_t sum = 0; + unsigned int v; + + png_ptr->try_row[0] = PNG_FILTER_VALUE_PAETH; + + for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1, + pp = png_ptr->prev_row + 1; i < bpp; i++) + { + v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); + +#ifdef PNG_USE_ABS + sum += 128 - abs((int)v - 128); +#else + sum += (v < 128) ? v : 256 - v; +#endif + } + + for (lp = png_ptr->row_buf + 1, cp = png_ptr->prev_row + 1; i < row_bytes; + i++) + { + int a, b, c, pa, pb, pc, p; + + b = *pp++; + c = *cp++; + a = *lp++; + + p = b - c; + pc = a - c; + +#ifdef PNG_USE_ABS + pa = abs(p); + pb = abs(pc); + pc = abs(p + pc); +#else + pa = p < 0 ? -p : p; + pb = pc < 0 ? -pc : pc; + pc = (p + pc) < 0 ? -(p + pc) : p + pc; +#endif + + p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c; + + v = *dp++ = (png_byte)(((int)*rp++ - p) & 0xff); + +#ifdef PNG_USE_ABS + sum += 128 - abs((int)v - 128); +#else + sum += (v < 128) ? v : 256 - v; +#endif + + if (sum > lmins) /* We are already worse, don't continue. */ + break; + } + + return sum; +} +static void /* PRIVATE */ +png_setup_paeth_row_only(png_structrp png_ptr, png_uint_32 bpp, + size_t row_bytes) +{ + png_bytep rp, dp, pp, cp, lp; + size_t i; + + png_ptr->try_row[0] = PNG_FILTER_VALUE_PAETH; + + for (i = 0, rp = png_ptr->row_buf + 1, dp = png_ptr->try_row + 1, + pp = png_ptr->prev_row + 1; i < bpp; i++) + { + *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff); + } + + for (lp = png_ptr->row_buf + 1, cp = png_ptr->prev_row + 1; i < row_bytes; + i++) + { + int a, b, c, pa, pb, pc, p; + + b = *pp++; + c = *cp++; + a = *lp++; + + p = b - c; + pc = a - c; + +#ifdef PNG_USE_ABS + pa = abs(p); + pb = abs(pc); + pc = abs(p + pc); +#else + pa = p < 0 ? -p : p; + pb = pc < 0 ? -pc : pc; + pc = (p + pc) < 0 ? -(p + pc) : p + pc; +#endif + + p = (pa <= pb && pa <=pc) ? a : (pb <= pc) ? b : c; + + *dp++ = (png_byte)(((int)*rp++ - p) & 0xff); + } +} +#endif /* WRITE_FILTER */ + +void /* PRIVATE */ +png_write_find_filter(png_structrp png_ptr, png_row_infop row_info) +{ +#ifndef PNG_WRITE_FILTER_SUPPORTED + png_write_filtered_row(png_ptr, png_ptr->row_buf, row_info->rowbytes+1); +#else + unsigned int filter_to_do = png_ptr->do_filter; + png_bytep row_buf; + png_bytep best_row; + png_uint_32 bpp; + size_t mins; + size_t row_bytes = row_info->rowbytes; + + png_debug(1, "in png_write_find_filter"); + + /* Find out how many bytes offset each pixel is */ + bpp = (row_info->pixel_depth + 7) >> 3; + + row_buf = png_ptr->row_buf; + mins = PNG_SIZE_MAX - 256/* so we can detect potential overflow of the + running sum */; + + /* The prediction method we use is to find which method provides the + * smallest value when summing the absolute values of the distances + * from zero, using anything >= 128 as negative numbers. This is known + * as the "minimum sum of absolute differences" heuristic. Other + * heuristics are the "weighted minimum sum of absolute differences" + * (experimental and can in theory improve compression), and the "zlib + * predictive" method (not implemented yet), which does test compressions + * of lines using different filter methods, and then chooses the + * (series of) filter(s) that give minimum compressed data size (VERY + * computationally expensive). + * + * GRR 980525: consider also + * + * (1) minimum sum of absolute differences from running average (i.e., + * keep running sum of non-absolute differences & count of bytes) + * [track dispersion, too? restart average if dispersion too large?] + * + * (1b) minimum sum of absolute differences from sliding average, probably + * with window size <= deflate window (usually 32K) + * + * (2) minimum sum of squared differences from zero or running average + * (i.e., ~ root-mean-square approach) + */ + + + /* We don't need to test the 'no filter' case if this is the only filter + * that has been chosen, as it doesn't actually do anything to the data. + */ + best_row = png_ptr->row_buf; + + if (PNG_SIZE_MAX/128 <= row_bytes) + { + /* Overflow can occur in the calculation, just select the lowest set + * filter. + */ + filter_to_do &= 0U-filter_to_do; + } + else if ((filter_to_do & PNG_FILTER_NONE) != 0 && + filter_to_do != PNG_FILTER_NONE) + { + /* Overflow not possible and multiple filters in the list, including the + * 'none' filter. + */ + png_bytep rp; + size_t sum = 0; + size_t i; + unsigned int v; + + { + for (i = 0, rp = row_buf + 1; i < row_bytes; i++, rp++) + { + v = *rp; +#ifdef PNG_USE_ABS + sum += 128 - abs((int)v - 128); +#else + sum += (v < 128) ? v : 256 - v; +#endif + } + } + + mins = sum; + } + + /* Sub filter */ + if (filter_to_do == PNG_FILTER_SUB) + /* It's the only filter so no testing is needed */ + { + png_setup_sub_row_only(png_ptr, bpp, row_bytes); + best_row = png_ptr->try_row; + } + + else if ((filter_to_do & PNG_FILTER_SUB) != 0) + { + size_t sum; + size_t lmins = mins; + + sum = png_setup_sub_row(png_ptr, bpp, row_bytes, lmins); + + if (sum < mins) + { + mins = sum; + best_row = png_ptr->try_row; + if (png_ptr->tst_row != NULL) + { + png_ptr->try_row = png_ptr->tst_row; + png_ptr->tst_row = best_row; + } + } + } + + /* Up filter */ + if (filter_to_do == PNG_FILTER_UP) + { + png_setup_up_row_only(png_ptr, row_bytes); + best_row = png_ptr->try_row; + } + + else if ((filter_to_do & PNG_FILTER_UP) != 0) + { + size_t sum; + size_t lmins = mins; + + sum = png_setup_up_row(png_ptr, row_bytes, lmins); + + if (sum < mins) + { + mins = sum; + best_row = png_ptr->try_row; + if (png_ptr->tst_row != NULL) + { + png_ptr->try_row = png_ptr->tst_row; + png_ptr->tst_row = best_row; + } + } + } + + /* Avg filter */ + if (filter_to_do == PNG_FILTER_AVG) + { + png_setup_avg_row_only(png_ptr, bpp, row_bytes); + best_row = png_ptr->try_row; + } + + else if ((filter_to_do & PNG_FILTER_AVG) != 0) + { + size_t sum; + size_t lmins = mins; + + sum= png_setup_avg_row(png_ptr, bpp, row_bytes, lmins); + + if (sum < mins) + { + mins = sum; + best_row = png_ptr->try_row; + if (png_ptr->tst_row != NULL) + { + png_ptr->try_row = png_ptr->tst_row; + png_ptr->tst_row = best_row; + } + } + } + + /* Paeth filter */ + if (filter_to_do == PNG_FILTER_PAETH) + { + png_setup_paeth_row_only(png_ptr, bpp, row_bytes); + best_row = png_ptr->try_row; + } + + else if ((filter_to_do & PNG_FILTER_PAETH) != 0) + { + size_t sum; + size_t lmins = mins; + + sum = png_setup_paeth_row(png_ptr, bpp, row_bytes, lmins); + + if (sum < mins) + { + best_row = png_ptr->try_row; + if (png_ptr->tst_row != NULL) + { + png_ptr->try_row = png_ptr->tst_row; + png_ptr->tst_row = best_row; + } + } + } + + /* Do the actual writing of the filtered row data from the chosen filter. */ + png_write_filtered_row(png_ptr, best_row, row_info->rowbytes+1); + +#endif /* WRITE_FILTER */ +} + + +/* Do the actual writing of a previously filtered row. */ +static void +png_write_filtered_row(png_structrp png_ptr, png_bytep filtered_row, + size_t full_row_length/*includes filter byte*/) +{ + png_debug(1, "in png_write_filtered_row"); + + png_debug1(2, "filter = %d", filtered_row[0]); + + png_compress_IDAT(png_ptr, filtered_row, full_row_length, Z_NO_FLUSH); + +#ifdef PNG_WRITE_FILTER_SUPPORTED + /* Swap the current and previous rows */ + if (png_ptr->prev_row != NULL) + { + png_bytep tptr; + + tptr = png_ptr->prev_row; + png_ptr->prev_row = png_ptr->row_buf; + png_ptr->row_buf = tptr; + } +#endif /* WRITE_FILTER */ + + /* Finish row - updates counters and flushes zlib if last row */ + png_write_finish_row(png_ptr); + +#ifdef PNG_WRITE_FLUSH_SUPPORTED + png_ptr->flush_rows++; + + if (png_ptr->flush_dist > 0 && + png_ptr->flush_rows >= png_ptr->flush_dist) + { + png_write_flush(png_ptr); + } +#endif /* WRITE_FLUSH */ +} +#endif /* WRITE */ diff --git a/widget/milsko/milskosrc/external/libz/LICENSE b/widget/milsko/milskosrc/external/libz/LICENSE new file mode 100644 index 0000000000..ab8ee6f714 --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/LICENSE @@ -0,0 +1,22 @@ +Copyright notice: + + (C) 1995-2022 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu diff --git a/widget/milsko/milskosrc/external/libz/README b/widget/milsko/milskosrc/external/libz/README new file mode 100644 index 0000000000..c5f917540b --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/README @@ -0,0 +1,117 @@ +ZLIB DATA COMPRESSION LIBRARY + +zlib 1.3.1 is a general purpose data compression library. All the code is +thread safe. The data format used by the zlib library is described by RFCs +(Request for Comments) 1950 to 1952 in the files +http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and +rfc1952 (gzip format). + +All functions of the compression library are documented in the file zlib.h +(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example +of the library is given in the file test/example.c which also tests that +the library is working correctly. Another example is given in the file +test/minigzip.c. The compression library itself is composed of all source +files in the root directory. + +To compile all files and run the test program, follow the instructions given at +the top of Makefile.in. In short "./configure; make test", and if that goes +well, "make install" should work for most flavors of Unix. For Windows, use +one of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use +make_vms.com. + +Questions about zlib should be sent to , or to Gilles Vollant + for the Windows DLL version. The zlib home page is +http://zlib.net/ . Before reporting a problem, please check this site to +verify that you have the latest version of zlib; otherwise get the latest +version and check whether the problem still exists or not. + +PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help. + +Mark Nelson wrote an article about zlib for the Jan. 1997 +issue of Dr. Dobb's Journal; a copy of the article is available at +https://marknelson.us/posts/1997/01/01/zlib-engine.html . + +The changes made in version 1.3.1 are documented in the file ChangeLog. + +Unsupported third party contributions are provided in directory contrib/ . + +zlib is available in Java using the java.util.zip package. Follow the API +Documentation link at: https://docs.oracle.com/search/?q=java.util.zip . + +A Perl interface to zlib and bzip2 written by Paul Marquess +can be found at https://github.com/pmqs/IO-Compress . + +A Python interface to zlib written by A.M. Kuchling is +available in Python 1.5 and later versions, see +http://docs.python.org/library/zlib.html . + +zlib is built into tcl: http://wiki.tcl.tk/4610 . + +An experimental package to read and write files in .zip format, written on top +of zlib by Gilles Vollant , is available in the +contrib/minizip directory of zlib. + + +Notes for some targets: + +- For Windows DLL versions, please see win32/DLL_FAQ.txt + +- For 64-bit Irix, deflate.c must be compiled without any optimization. With + -O, one libpng test fails. The test works in 32 bit mode (with the -n32 + compiler flag). The compiler bug has been reported to SGI. + +- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works + when compiled with cc. + +- On Digital Unix 4.0D (formerly OSF/1) on AlphaServer, the cc option -std1 is + necessary to get gzprintf working correctly. This is done by configure. + +- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with + other compilers. Use "make test" to check your compiler. + +- gzdopen is not supported on RISCOS or BEOS. + +- For PalmOs, see http://palmzlib.sourceforge.net/ + + +Acknowledgments: + + The deflate format used by zlib was defined by Phil Katz. The deflate and + zlib specifications were written by L. Peter Deutsch. Thanks to all the + people who reported problems and suggested various improvements in zlib; they + are too numerous to cite here. + +Copyright notice: + + (C) 1995-2024 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +If you use the zlib library in a product, we would appreciate *not* receiving +lengthy legal documents to sign. The sources are provided for free but without +warranty of any kind. The library has been entirely written by Jean-loup +Gailly and Mark Adler; it does not include third-party code. We make all +contributions to and distributions of this project solely in our personal +capacity, and are not conveying any rights to any intellectual property of +any third parties. + +If you redistribute modified sources, we would appreciate that you include in +the file ChangeLog history information documenting your changes. Please read +the FAQ for more information on the distribution of modified source versions. diff --git a/widget/milsko/milskosrc/external/libz/include/crc32.h b/widget/milsko/milskosrc/external/libz/include/crc32.h new file mode 100644 index 0000000000..137df68d61 --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/include/crc32.h @@ -0,0 +1,9446 @@ +/* crc32.h -- tables for rapid CRC calculation + * Generated automatically by crc32.c + */ + +local const z_crc_t FAR crc_table[] = { + 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, + 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, + 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, + 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, + 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, + 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, + 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, + 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, + 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, + 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, + 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, + 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, + 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, + 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, + 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, + 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, + 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, + 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, + 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, + 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, + 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, + 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, + 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, + 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, + 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, + 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, + 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, + 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, + 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, + 0x2d02ef8d}; + +#ifdef W + +#if W == 8 + +local const z_word_t FAR crc_big_table[] = { + 0x0000000000000000, 0x9630077700000000, 0x2c610eee00000000, + 0xba51099900000000, 0x19c46d0700000000, 0x8ff46a7000000000, + 0x35a563e900000000, 0xa395649e00000000, 0x3288db0e00000000, + 0xa4b8dc7900000000, 0x1ee9d5e000000000, 0x88d9d29700000000, + 0x2b4cb60900000000, 0xbd7cb17e00000000, 0x072db8e700000000, + 0x911dbf9000000000, 0x6410b71d00000000, 0xf220b06a00000000, + 0x4871b9f300000000, 0xde41be8400000000, 0x7dd4da1a00000000, + 0xebe4dd6d00000000, 0x51b5d4f400000000, 0xc785d38300000000, + 0x56986c1300000000, 0xc0a86b6400000000, 0x7af962fd00000000, + 0xecc9658a00000000, 0x4f5c011400000000, 0xd96c066300000000, + 0x633d0ffa00000000, 0xf50d088d00000000, 0xc8206e3b00000000, + 0x5e10694c00000000, 0xe44160d500000000, 0x727167a200000000, + 0xd1e4033c00000000, 0x47d4044b00000000, 0xfd850dd200000000, + 0x6bb50aa500000000, 0xfaa8b53500000000, 0x6c98b24200000000, + 0xd6c9bbdb00000000, 0x40f9bcac00000000, 0xe36cd83200000000, + 0x755cdf4500000000, 0xcf0dd6dc00000000, 0x593dd1ab00000000, + 0xac30d92600000000, 0x3a00de5100000000, 0x8051d7c800000000, + 0x1661d0bf00000000, 0xb5f4b42100000000, 0x23c4b35600000000, + 0x9995bacf00000000, 0x0fa5bdb800000000, 0x9eb8022800000000, + 0x0888055f00000000, 0xb2d90cc600000000, 0x24e90bb100000000, + 0x877c6f2f00000000, 0x114c685800000000, 0xab1d61c100000000, + 0x3d2d66b600000000, 0x9041dc7600000000, 0x0671db0100000000, + 0xbc20d29800000000, 0x2a10d5ef00000000, 0x8985b17100000000, + 0x1fb5b60600000000, 0xa5e4bf9f00000000, 0x33d4b8e800000000, + 0xa2c9077800000000, 0x34f9000f00000000, 0x8ea8099600000000, + 0x18980ee100000000, 0xbb0d6a7f00000000, 0x2d3d6d0800000000, + 0x976c649100000000, 0x015c63e600000000, 0xf4516b6b00000000, + 0x62616c1c00000000, 0xd830658500000000, 0x4e0062f200000000, + 0xed95066c00000000, 0x7ba5011b00000000, 0xc1f4088200000000, + 0x57c40ff500000000, 0xc6d9b06500000000, 0x50e9b71200000000, + 0xeab8be8b00000000, 0x7c88b9fc00000000, 0xdf1ddd6200000000, + 0x492dda1500000000, 0xf37cd38c00000000, 0x654cd4fb00000000, + 0x5861b24d00000000, 0xce51b53a00000000, 0x7400bca300000000, + 0xe230bbd400000000, 0x41a5df4a00000000, 0xd795d83d00000000, + 0x6dc4d1a400000000, 0xfbf4d6d300000000, 0x6ae9694300000000, + 0xfcd96e3400000000, 0x468867ad00000000, 0xd0b860da00000000, + 0x732d044400000000, 0xe51d033300000000, 0x5f4c0aaa00000000, + 0xc97c0ddd00000000, 0x3c71055000000000, 0xaa41022700000000, + 0x10100bbe00000000, 0x86200cc900000000, 0x25b5685700000000, + 0xb3856f2000000000, 0x09d466b900000000, 0x9fe461ce00000000, + 0x0ef9de5e00000000, 0x98c9d92900000000, 0x2298d0b000000000, + 0xb4a8d7c700000000, 0x173db35900000000, 0x810db42e00000000, + 0x3b5cbdb700000000, 0xad6cbac000000000, 0x2083b8ed00000000, + 0xb6b3bf9a00000000, 0x0ce2b60300000000, 0x9ad2b17400000000, + 0x3947d5ea00000000, 0xaf77d29d00000000, 0x1526db0400000000, + 0x8316dc7300000000, 0x120b63e300000000, 0x843b649400000000, + 0x3e6a6d0d00000000, 0xa85a6a7a00000000, 0x0bcf0ee400000000, + 0x9dff099300000000, 0x27ae000a00000000, 0xb19e077d00000000, + 0x44930ff000000000, 0xd2a3088700000000, 0x68f2011e00000000, + 0xfec2066900000000, 0x5d5762f700000000, 0xcb67658000000000, + 0x71366c1900000000, 0xe7066b6e00000000, 0x761bd4fe00000000, + 0xe02bd38900000000, 0x5a7ada1000000000, 0xcc4add6700000000, + 0x6fdfb9f900000000, 0xf9efbe8e00000000, 0x43beb71700000000, + 0xd58eb06000000000, 0xe8a3d6d600000000, 0x7e93d1a100000000, + 0xc4c2d83800000000, 0x52f2df4f00000000, 0xf167bbd100000000, + 0x6757bca600000000, 0xdd06b53f00000000, 0x4b36b24800000000, + 0xda2b0dd800000000, 0x4c1b0aaf00000000, 0xf64a033600000000, + 0x607a044100000000, 0xc3ef60df00000000, 0x55df67a800000000, + 0xef8e6e3100000000, 0x79be694600000000, 0x8cb361cb00000000, + 0x1a8366bc00000000, 0xa0d26f2500000000, 0x36e2685200000000, + 0x95770ccc00000000, 0x03470bbb00000000, 0xb916022200000000, + 0x2f26055500000000, 0xbe3bbac500000000, 0x280bbdb200000000, + 0x925ab42b00000000, 0x046ab35c00000000, 0xa7ffd7c200000000, + 0x31cfd0b500000000, 0x8b9ed92c00000000, 0x1daede5b00000000, + 0xb0c2649b00000000, 0x26f263ec00000000, 0x9ca36a7500000000, + 0x0a936d0200000000, 0xa906099c00000000, 0x3f360eeb00000000, + 0x8567077200000000, 0x1357000500000000, 0x824abf9500000000, + 0x147ab8e200000000, 0xae2bb17b00000000, 0x381bb60c00000000, + 0x9b8ed29200000000, 0x0dbed5e500000000, 0xb7efdc7c00000000, + 0x21dfdb0b00000000, 0xd4d2d38600000000, 0x42e2d4f100000000, + 0xf8b3dd6800000000, 0x6e83da1f00000000, 0xcd16be8100000000, + 0x5b26b9f600000000, 0xe177b06f00000000, 0x7747b71800000000, + 0xe65a088800000000, 0x706a0fff00000000, 0xca3b066600000000, + 0x5c0b011100000000, 0xff9e658f00000000, 0x69ae62f800000000, + 0xd3ff6b6100000000, 0x45cf6c1600000000, 0x78e20aa000000000, + 0xeed20dd700000000, 0x5483044e00000000, 0xc2b3033900000000, + 0x612667a700000000, 0xf71660d000000000, 0x4d47694900000000, + 0xdb776e3e00000000, 0x4a6ad1ae00000000, 0xdc5ad6d900000000, + 0x660bdf4000000000, 0xf03bd83700000000, 0x53aebca900000000, + 0xc59ebbde00000000, 0x7fcfb24700000000, 0xe9ffb53000000000, + 0x1cf2bdbd00000000, 0x8ac2baca00000000, 0x3093b35300000000, + 0xa6a3b42400000000, 0x0536d0ba00000000, 0x9306d7cd00000000, + 0x2957de5400000000, 0xbf67d92300000000, 0x2e7a66b300000000, + 0xb84a61c400000000, 0x021b685d00000000, 0x942b6f2a00000000, + 0x37be0bb400000000, 0xa18e0cc300000000, 0x1bdf055a00000000, + 0x8def022d00000000}; + +#else /* W == 4 */ + +local const z_word_t FAR crc_big_table[] = { + 0x00000000, 0x96300777, 0x2c610eee, 0xba510999, 0x19c46d07, + 0x8ff46a70, 0x35a563e9, 0xa395649e, 0x3288db0e, 0xa4b8dc79, + 0x1ee9d5e0, 0x88d9d297, 0x2b4cb609, 0xbd7cb17e, 0x072db8e7, + 0x911dbf90, 0x6410b71d, 0xf220b06a, 0x4871b9f3, 0xde41be84, + 0x7dd4da1a, 0xebe4dd6d, 0x51b5d4f4, 0xc785d383, 0x56986c13, + 0xc0a86b64, 0x7af962fd, 0xecc9658a, 0x4f5c0114, 0xd96c0663, + 0x633d0ffa, 0xf50d088d, 0xc8206e3b, 0x5e10694c, 0xe44160d5, + 0x727167a2, 0xd1e4033c, 0x47d4044b, 0xfd850dd2, 0x6bb50aa5, + 0xfaa8b535, 0x6c98b242, 0xd6c9bbdb, 0x40f9bcac, 0xe36cd832, + 0x755cdf45, 0xcf0dd6dc, 0x593dd1ab, 0xac30d926, 0x3a00de51, + 0x8051d7c8, 0x1661d0bf, 0xb5f4b421, 0x23c4b356, 0x9995bacf, + 0x0fa5bdb8, 0x9eb80228, 0x0888055f, 0xb2d90cc6, 0x24e90bb1, + 0x877c6f2f, 0x114c6858, 0xab1d61c1, 0x3d2d66b6, 0x9041dc76, + 0x0671db01, 0xbc20d298, 0x2a10d5ef, 0x8985b171, 0x1fb5b606, + 0xa5e4bf9f, 0x33d4b8e8, 0xa2c90778, 0x34f9000f, 0x8ea80996, + 0x18980ee1, 0xbb0d6a7f, 0x2d3d6d08, 0x976c6491, 0x015c63e6, + 0xf4516b6b, 0x62616c1c, 0xd8306585, 0x4e0062f2, 0xed95066c, + 0x7ba5011b, 0xc1f40882, 0x57c40ff5, 0xc6d9b065, 0x50e9b712, + 0xeab8be8b, 0x7c88b9fc, 0xdf1ddd62, 0x492dda15, 0xf37cd38c, + 0x654cd4fb, 0x5861b24d, 0xce51b53a, 0x7400bca3, 0xe230bbd4, + 0x41a5df4a, 0xd795d83d, 0x6dc4d1a4, 0xfbf4d6d3, 0x6ae96943, + 0xfcd96e34, 0x468867ad, 0xd0b860da, 0x732d0444, 0xe51d0333, + 0x5f4c0aaa, 0xc97c0ddd, 0x3c710550, 0xaa410227, 0x10100bbe, + 0x86200cc9, 0x25b56857, 0xb3856f20, 0x09d466b9, 0x9fe461ce, + 0x0ef9de5e, 0x98c9d929, 0x2298d0b0, 0xb4a8d7c7, 0x173db359, + 0x810db42e, 0x3b5cbdb7, 0xad6cbac0, 0x2083b8ed, 0xb6b3bf9a, + 0x0ce2b603, 0x9ad2b174, 0x3947d5ea, 0xaf77d29d, 0x1526db04, + 0x8316dc73, 0x120b63e3, 0x843b6494, 0x3e6a6d0d, 0xa85a6a7a, + 0x0bcf0ee4, 0x9dff0993, 0x27ae000a, 0xb19e077d, 0x44930ff0, + 0xd2a30887, 0x68f2011e, 0xfec20669, 0x5d5762f7, 0xcb676580, + 0x71366c19, 0xe7066b6e, 0x761bd4fe, 0xe02bd389, 0x5a7ada10, + 0xcc4add67, 0x6fdfb9f9, 0xf9efbe8e, 0x43beb717, 0xd58eb060, + 0xe8a3d6d6, 0x7e93d1a1, 0xc4c2d838, 0x52f2df4f, 0xf167bbd1, + 0x6757bca6, 0xdd06b53f, 0x4b36b248, 0xda2b0dd8, 0x4c1b0aaf, + 0xf64a0336, 0x607a0441, 0xc3ef60df, 0x55df67a8, 0xef8e6e31, + 0x79be6946, 0x8cb361cb, 0x1a8366bc, 0xa0d26f25, 0x36e26852, + 0x95770ccc, 0x03470bbb, 0xb9160222, 0x2f260555, 0xbe3bbac5, + 0x280bbdb2, 0x925ab42b, 0x046ab35c, 0xa7ffd7c2, 0x31cfd0b5, + 0x8b9ed92c, 0x1daede5b, 0xb0c2649b, 0x26f263ec, 0x9ca36a75, + 0x0a936d02, 0xa906099c, 0x3f360eeb, 0x85670772, 0x13570005, + 0x824abf95, 0x147ab8e2, 0xae2bb17b, 0x381bb60c, 0x9b8ed292, + 0x0dbed5e5, 0xb7efdc7c, 0x21dfdb0b, 0xd4d2d386, 0x42e2d4f1, + 0xf8b3dd68, 0x6e83da1f, 0xcd16be81, 0x5b26b9f6, 0xe177b06f, + 0x7747b718, 0xe65a0888, 0x706a0fff, 0xca3b0666, 0x5c0b0111, + 0xff9e658f, 0x69ae62f8, 0xd3ff6b61, 0x45cf6c16, 0x78e20aa0, + 0xeed20dd7, 0x5483044e, 0xc2b30339, 0x612667a7, 0xf71660d0, + 0x4d476949, 0xdb776e3e, 0x4a6ad1ae, 0xdc5ad6d9, 0x660bdf40, + 0xf03bd837, 0x53aebca9, 0xc59ebbde, 0x7fcfb247, 0xe9ffb530, + 0x1cf2bdbd, 0x8ac2baca, 0x3093b353, 0xa6a3b424, 0x0536d0ba, + 0x9306d7cd, 0x2957de54, 0xbf67d923, 0x2e7a66b3, 0xb84a61c4, + 0x021b685d, 0x942b6f2a, 0x37be0bb4, 0xa18e0cc3, 0x1bdf055a, + 0x8def022d}; + +#endif + +#if N == 1 + +#if W == 8 + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0xccaa009e, 0x4225077d, 0x8e8f07e3, 0x844a0efa, + 0x48e00e64, 0xc66f0987, 0x0ac50919, 0xd3e51bb5, 0x1f4f1b2b, + 0x91c01cc8, 0x5d6a1c56, 0x57af154f, 0x9b0515d1, 0x158a1232, + 0xd92012ac, 0x7cbb312b, 0xb01131b5, 0x3e9e3656, 0xf23436c8, + 0xf8f13fd1, 0x345b3f4f, 0xbad438ac, 0x767e3832, 0xaf5e2a9e, + 0x63f42a00, 0xed7b2de3, 0x21d12d7d, 0x2b142464, 0xe7be24fa, + 0x69312319, 0xa59b2387, 0xf9766256, 0x35dc62c8, 0xbb53652b, + 0x77f965b5, 0x7d3c6cac, 0xb1966c32, 0x3f196bd1, 0xf3b36b4f, + 0x2a9379e3, 0xe639797d, 0x68b67e9e, 0xa41c7e00, 0xaed97719, + 0x62737787, 0xecfc7064, 0x205670fa, 0x85cd537d, 0x496753e3, + 0xc7e85400, 0x0b42549e, 0x01875d87, 0xcd2d5d19, 0x43a25afa, + 0x8f085a64, 0x562848c8, 0x9a824856, 0x140d4fb5, 0xd8a74f2b, + 0xd2624632, 0x1ec846ac, 0x9047414f, 0x5ced41d1, 0x299dc2ed, + 0xe537c273, 0x6bb8c590, 0xa712c50e, 0xadd7cc17, 0x617dcc89, + 0xeff2cb6a, 0x2358cbf4, 0xfa78d958, 0x36d2d9c6, 0xb85dde25, + 0x74f7debb, 0x7e32d7a2, 0xb298d73c, 0x3c17d0df, 0xf0bdd041, + 0x5526f3c6, 0x998cf358, 0x1703f4bb, 0xdba9f425, 0xd16cfd3c, + 0x1dc6fda2, 0x9349fa41, 0x5fe3fadf, 0x86c3e873, 0x4a69e8ed, + 0xc4e6ef0e, 0x084cef90, 0x0289e689, 0xce23e617, 0x40ace1f4, + 0x8c06e16a, 0xd0eba0bb, 0x1c41a025, 0x92cea7c6, 0x5e64a758, + 0x54a1ae41, 0x980baedf, 0x1684a93c, 0xda2ea9a2, 0x030ebb0e, + 0xcfa4bb90, 0x412bbc73, 0x8d81bced, 0x8744b5f4, 0x4beeb56a, + 0xc561b289, 0x09cbb217, 0xac509190, 0x60fa910e, 0xee7596ed, + 0x22df9673, 0x281a9f6a, 0xe4b09ff4, 0x6a3f9817, 0xa6959889, + 0x7fb58a25, 0xb31f8abb, 0x3d908d58, 0xf13a8dc6, 0xfbff84df, + 0x37558441, 0xb9da83a2, 0x7570833c, 0x533b85da, 0x9f918544, + 0x111e82a7, 0xddb48239, 0xd7718b20, 0x1bdb8bbe, 0x95548c5d, + 0x59fe8cc3, 0x80de9e6f, 0x4c749ef1, 0xc2fb9912, 0x0e51998c, + 0x04949095, 0xc83e900b, 0x46b197e8, 0x8a1b9776, 0x2f80b4f1, + 0xe32ab46f, 0x6da5b38c, 0xa10fb312, 0xabcaba0b, 0x6760ba95, + 0xe9efbd76, 0x2545bde8, 0xfc65af44, 0x30cfafda, 0xbe40a839, + 0x72eaa8a7, 0x782fa1be, 0xb485a120, 0x3a0aa6c3, 0xf6a0a65d, + 0xaa4de78c, 0x66e7e712, 0xe868e0f1, 0x24c2e06f, 0x2e07e976, + 0xe2ade9e8, 0x6c22ee0b, 0xa088ee95, 0x79a8fc39, 0xb502fca7, + 0x3b8dfb44, 0xf727fbda, 0xfde2f2c3, 0x3148f25d, 0xbfc7f5be, + 0x736df520, 0xd6f6d6a7, 0x1a5cd639, 0x94d3d1da, 0x5879d144, + 0x52bcd85d, 0x9e16d8c3, 0x1099df20, 0xdc33dfbe, 0x0513cd12, + 0xc9b9cd8c, 0x4736ca6f, 0x8b9ccaf1, 0x8159c3e8, 0x4df3c376, + 0xc37cc495, 0x0fd6c40b, 0x7aa64737, 0xb60c47a9, 0x3883404a, + 0xf42940d4, 0xfeec49cd, 0x32464953, 0xbcc94eb0, 0x70634e2e, + 0xa9435c82, 0x65e95c1c, 0xeb665bff, 0x27cc5b61, 0x2d095278, + 0xe1a352e6, 0x6f2c5505, 0xa386559b, 0x061d761c, 0xcab77682, + 0x44387161, 0x889271ff, 0x825778e6, 0x4efd7878, 0xc0727f9b, + 0x0cd87f05, 0xd5f86da9, 0x19526d37, 0x97dd6ad4, 0x5b776a4a, + 0x51b26353, 0x9d1863cd, 0x1397642e, 0xdf3d64b0, 0x83d02561, + 0x4f7a25ff, 0xc1f5221c, 0x0d5f2282, 0x079a2b9b, 0xcb302b05, + 0x45bf2ce6, 0x89152c78, 0x50353ed4, 0x9c9f3e4a, 0x121039a9, + 0xdeba3937, 0xd47f302e, 0x18d530b0, 0x965a3753, 0x5af037cd, + 0xff6b144a, 0x33c114d4, 0xbd4e1337, 0x71e413a9, 0x7b211ab0, + 0xb78b1a2e, 0x39041dcd, 0xf5ae1d53, 0x2c8e0fff, 0xe0240f61, + 0x6eab0882, 0xa201081c, 0xa8c40105, 0x646e019b, 0xeae10678, + 0x264b06e6}, + {0x00000000, 0xa6770bb4, 0x979f1129, 0x31e81a9d, 0xf44f2413, + 0x52382fa7, 0x63d0353a, 0xc5a73e8e, 0x33ef4e67, 0x959845d3, + 0xa4705f4e, 0x020754fa, 0xc7a06a74, 0x61d761c0, 0x503f7b5d, + 0xf64870e9, 0x67de9cce, 0xc1a9977a, 0xf0418de7, 0x56368653, + 0x9391b8dd, 0x35e6b369, 0x040ea9f4, 0xa279a240, 0x5431d2a9, + 0xf246d91d, 0xc3aec380, 0x65d9c834, 0xa07ef6ba, 0x0609fd0e, + 0x37e1e793, 0x9196ec27, 0xcfbd399c, 0x69ca3228, 0x582228b5, + 0xfe552301, 0x3bf21d8f, 0x9d85163b, 0xac6d0ca6, 0x0a1a0712, + 0xfc5277fb, 0x5a257c4f, 0x6bcd66d2, 0xcdba6d66, 0x081d53e8, + 0xae6a585c, 0x9f8242c1, 0x39f54975, 0xa863a552, 0x0e14aee6, + 0x3ffcb47b, 0x998bbfcf, 0x5c2c8141, 0xfa5b8af5, 0xcbb39068, + 0x6dc49bdc, 0x9b8ceb35, 0x3dfbe081, 0x0c13fa1c, 0xaa64f1a8, + 0x6fc3cf26, 0xc9b4c492, 0xf85cde0f, 0x5e2bd5bb, 0x440b7579, + 0xe27c7ecd, 0xd3946450, 0x75e36fe4, 0xb044516a, 0x16335ade, + 0x27db4043, 0x81ac4bf7, 0x77e43b1e, 0xd19330aa, 0xe07b2a37, + 0x460c2183, 0x83ab1f0d, 0x25dc14b9, 0x14340e24, 0xb2430590, + 0x23d5e9b7, 0x85a2e203, 0xb44af89e, 0x123df32a, 0xd79acda4, + 0x71edc610, 0x4005dc8d, 0xe672d739, 0x103aa7d0, 0xb64dac64, + 0x87a5b6f9, 0x21d2bd4d, 0xe47583c3, 0x42028877, 0x73ea92ea, + 0xd59d995e, 0x8bb64ce5, 0x2dc14751, 0x1c295dcc, 0xba5e5678, + 0x7ff968f6, 0xd98e6342, 0xe86679df, 0x4e11726b, 0xb8590282, + 0x1e2e0936, 0x2fc613ab, 0x89b1181f, 0x4c162691, 0xea612d25, + 0xdb8937b8, 0x7dfe3c0c, 0xec68d02b, 0x4a1fdb9f, 0x7bf7c102, + 0xdd80cab6, 0x1827f438, 0xbe50ff8c, 0x8fb8e511, 0x29cfeea5, + 0xdf879e4c, 0x79f095f8, 0x48188f65, 0xee6f84d1, 0x2bc8ba5f, + 0x8dbfb1eb, 0xbc57ab76, 0x1a20a0c2, 0x8816eaf2, 0x2e61e146, + 0x1f89fbdb, 0xb9fef06f, 0x7c59cee1, 0xda2ec555, 0xebc6dfc8, + 0x4db1d47c, 0xbbf9a495, 0x1d8eaf21, 0x2c66b5bc, 0x8a11be08, + 0x4fb68086, 0xe9c18b32, 0xd82991af, 0x7e5e9a1b, 0xefc8763c, + 0x49bf7d88, 0x78576715, 0xde206ca1, 0x1b87522f, 0xbdf0599b, + 0x8c184306, 0x2a6f48b2, 0xdc27385b, 0x7a5033ef, 0x4bb82972, + 0xedcf22c6, 0x28681c48, 0x8e1f17fc, 0xbff70d61, 0x198006d5, + 0x47abd36e, 0xe1dcd8da, 0xd034c247, 0x7643c9f3, 0xb3e4f77d, + 0x1593fcc9, 0x247be654, 0x820cede0, 0x74449d09, 0xd23396bd, + 0xe3db8c20, 0x45ac8794, 0x800bb91a, 0x267cb2ae, 0x1794a833, + 0xb1e3a387, 0x20754fa0, 0x86024414, 0xb7ea5e89, 0x119d553d, + 0xd43a6bb3, 0x724d6007, 0x43a57a9a, 0xe5d2712e, 0x139a01c7, + 0xb5ed0a73, 0x840510ee, 0x22721b5a, 0xe7d525d4, 0x41a22e60, + 0x704a34fd, 0xd63d3f49, 0xcc1d9f8b, 0x6a6a943f, 0x5b828ea2, + 0xfdf58516, 0x3852bb98, 0x9e25b02c, 0xafcdaab1, 0x09baa105, + 0xfff2d1ec, 0x5985da58, 0x686dc0c5, 0xce1acb71, 0x0bbdf5ff, + 0xadcafe4b, 0x9c22e4d6, 0x3a55ef62, 0xabc30345, 0x0db408f1, + 0x3c5c126c, 0x9a2b19d8, 0x5f8c2756, 0xf9fb2ce2, 0xc813367f, + 0x6e643dcb, 0x982c4d22, 0x3e5b4696, 0x0fb35c0b, 0xa9c457bf, + 0x6c636931, 0xca146285, 0xfbfc7818, 0x5d8b73ac, 0x03a0a617, + 0xa5d7ada3, 0x943fb73e, 0x3248bc8a, 0xf7ef8204, 0x519889b0, + 0x6070932d, 0xc6079899, 0x304fe870, 0x9638e3c4, 0xa7d0f959, + 0x01a7f2ed, 0xc400cc63, 0x6277c7d7, 0x539fdd4a, 0xf5e8d6fe, + 0x647e3ad9, 0xc209316d, 0xf3e12bf0, 0x55962044, 0x90311eca, + 0x3646157e, 0x07ae0fe3, 0xa1d90457, 0x579174be, 0xf1e67f0a, + 0xc00e6597, 0x66796e23, 0xa3de50ad, 0x05a95b19, 0x34414184, + 0x92364a30}, + {0x00000000, 0xcb5cd3a5, 0x4dc8a10b, 0x869472ae, 0x9b914216, + 0x50cd91b3, 0xd659e31d, 0x1d0530b8, 0xec53826d, 0x270f51c8, + 0xa19b2366, 0x6ac7f0c3, 0x77c2c07b, 0xbc9e13de, 0x3a0a6170, + 0xf156b2d5, 0x03d6029b, 0xc88ad13e, 0x4e1ea390, 0x85427035, + 0x9847408d, 0x531b9328, 0xd58fe186, 0x1ed33223, 0xef8580f6, + 0x24d95353, 0xa24d21fd, 0x6911f258, 0x7414c2e0, 0xbf481145, + 0x39dc63eb, 0xf280b04e, 0x07ac0536, 0xccf0d693, 0x4a64a43d, + 0x81387798, 0x9c3d4720, 0x57619485, 0xd1f5e62b, 0x1aa9358e, + 0xebff875b, 0x20a354fe, 0xa6372650, 0x6d6bf5f5, 0x706ec54d, + 0xbb3216e8, 0x3da66446, 0xf6fab7e3, 0x047a07ad, 0xcf26d408, + 0x49b2a6a6, 0x82ee7503, 0x9feb45bb, 0x54b7961e, 0xd223e4b0, + 0x197f3715, 0xe82985c0, 0x23755665, 0xa5e124cb, 0x6ebdf76e, + 0x73b8c7d6, 0xb8e41473, 0x3e7066dd, 0xf52cb578, 0x0f580a6c, + 0xc404d9c9, 0x4290ab67, 0x89cc78c2, 0x94c9487a, 0x5f959bdf, + 0xd901e971, 0x125d3ad4, 0xe30b8801, 0x28575ba4, 0xaec3290a, + 0x659ffaaf, 0x789aca17, 0xb3c619b2, 0x35526b1c, 0xfe0eb8b9, + 0x0c8e08f7, 0xc7d2db52, 0x4146a9fc, 0x8a1a7a59, 0x971f4ae1, + 0x5c439944, 0xdad7ebea, 0x118b384f, 0xe0dd8a9a, 0x2b81593f, + 0xad152b91, 0x6649f834, 0x7b4cc88c, 0xb0101b29, 0x36846987, + 0xfdd8ba22, 0x08f40f5a, 0xc3a8dcff, 0x453cae51, 0x8e607df4, + 0x93654d4c, 0x58399ee9, 0xdeadec47, 0x15f13fe2, 0xe4a78d37, + 0x2ffb5e92, 0xa96f2c3c, 0x6233ff99, 0x7f36cf21, 0xb46a1c84, + 0x32fe6e2a, 0xf9a2bd8f, 0x0b220dc1, 0xc07ede64, 0x46eaacca, + 0x8db67f6f, 0x90b34fd7, 0x5bef9c72, 0xdd7beedc, 0x16273d79, + 0xe7718fac, 0x2c2d5c09, 0xaab92ea7, 0x61e5fd02, 0x7ce0cdba, + 0xb7bc1e1f, 0x31286cb1, 0xfa74bf14, 0x1eb014d8, 0xd5ecc77d, + 0x5378b5d3, 0x98246676, 0x852156ce, 0x4e7d856b, 0xc8e9f7c5, + 0x03b52460, 0xf2e396b5, 0x39bf4510, 0xbf2b37be, 0x7477e41b, + 0x6972d4a3, 0xa22e0706, 0x24ba75a8, 0xefe6a60d, 0x1d661643, + 0xd63ac5e6, 0x50aeb748, 0x9bf264ed, 0x86f75455, 0x4dab87f0, + 0xcb3ff55e, 0x006326fb, 0xf135942e, 0x3a69478b, 0xbcfd3525, + 0x77a1e680, 0x6aa4d638, 0xa1f8059d, 0x276c7733, 0xec30a496, + 0x191c11ee, 0xd240c24b, 0x54d4b0e5, 0x9f886340, 0x828d53f8, + 0x49d1805d, 0xcf45f2f3, 0x04192156, 0xf54f9383, 0x3e134026, + 0xb8873288, 0x73dbe12d, 0x6eded195, 0xa5820230, 0x2316709e, + 0xe84aa33b, 0x1aca1375, 0xd196c0d0, 0x5702b27e, 0x9c5e61db, + 0x815b5163, 0x4a0782c6, 0xcc93f068, 0x07cf23cd, 0xf6999118, + 0x3dc542bd, 0xbb513013, 0x700de3b6, 0x6d08d30e, 0xa65400ab, + 0x20c07205, 0xeb9ca1a0, 0x11e81eb4, 0xdab4cd11, 0x5c20bfbf, + 0x977c6c1a, 0x8a795ca2, 0x41258f07, 0xc7b1fda9, 0x0ced2e0c, + 0xfdbb9cd9, 0x36e74f7c, 0xb0733dd2, 0x7b2fee77, 0x662adecf, + 0xad760d6a, 0x2be27fc4, 0xe0beac61, 0x123e1c2f, 0xd962cf8a, + 0x5ff6bd24, 0x94aa6e81, 0x89af5e39, 0x42f38d9c, 0xc467ff32, + 0x0f3b2c97, 0xfe6d9e42, 0x35314de7, 0xb3a53f49, 0x78f9ecec, + 0x65fcdc54, 0xaea00ff1, 0x28347d5f, 0xe368aefa, 0x16441b82, + 0xdd18c827, 0x5b8cba89, 0x90d0692c, 0x8dd55994, 0x46898a31, + 0xc01df89f, 0x0b412b3a, 0xfa1799ef, 0x314b4a4a, 0xb7df38e4, + 0x7c83eb41, 0x6186dbf9, 0xaada085c, 0x2c4e7af2, 0xe712a957, + 0x15921919, 0xdececabc, 0x585ab812, 0x93066bb7, 0x8e035b0f, + 0x455f88aa, 0xc3cbfa04, 0x089729a1, 0xf9c19b74, 0x329d48d1, + 0xb4093a7f, 0x7f55e9da, 0x6250d962, 0xa90c0ac7, 0x2f987869, + 0xe4c4abcc}, + {0x00000000, 0x3d6029b0, 0x7ac05360, 0x47a07ad0, 0xf580a6c0, + 0xc8e08f70, 0x8f40f5a0, 0xb220dc10, 0x30704bc1, 0x0d106271, + 0x4ab018a1, 0x77d03111, 0xc5f0ed01, 0xf890c4b1, 0xbf30be61, + 0x825097d1, 0x60e09782, 0x5d80be32, 0x1a20c4e2, 0x2740ed52, + 0x95603142, 0xa80018f2, 0xefa06222, 0xd2c04b92, 0x5090dc43, + 0x6df0f5f3, 0x2a508f23, 0x1730a693, 0xa5107a83, 0x98705333, + 0xdfd029e3, 0xe2b00053, 0xc1c12f04, 0xfca106b4, 0xbb017c64, + 0x866155d4, 0x344189c4, 0x0921a074, 0x4e81daa4, 0x73e1f314, + 0xf1b164c5, 0xccd14d75, 0x8b7137a5, 0xb6111e15, 0x0431c205, + 0x3951ebb5, 0x7ef19165, 0x4391b8d5, 0xa121b886, 0x9c419136, + 0xdbe1ebe6, 0xe681c256, 0x54a11e46, 0x69c137f6, 0x2e614d26, + 0x13016496, 0x9151f347, 0xac31daf7, 0xeb91a027, 0xd6f18997, + 0x64d15587, 0x59b17c37, 0x1e1106e7, 0x23712f57, 0x58f35849, + 0x659371f9, 0x22330b29, 0x1f532299, 0xad73fe89, 0x9013d739, + 0xd7b3ade9, 0xead38459, 0x68831388, 0x55e33a38, 0x124340e8, + 0x2f236958, 0x9d03b548, 0xa0639cf8, 0xe7c3e628, 0xdaa3cf98, + 0x3813cfcb, 0x0573e67b, 0x42d39cab, 0x7fb3b51b, 0xcd93690b, + 0xf0f340bb, 0xb7533a6b, 0x8a3313db, 0x0863840a, 0x3503adba, + 0x72a3d76a, 0x4fc3feda, 0xfde322ca, 0xc0830b7a, 0x872371aa, + 0xba43581a, 0x9932774d, 0xa4525efd, 0xe3f2242d, 0xde920d9d, + 0x6cb2d18d, 0x51d2f83d, 0x167282ed, 0x2b12ab5d, 0xa9423c8c, + 0x9422153c, 0xd3826fec, 0xeee2465c, 0x5cc29a4c, 0x61a2b3fc, + 0x2602c92c, 0x1b62e09c, 0xf9d2e0cf, 0xc4b2c97f, 0x8312b3af, + 0xbe729a1f, 0x0c52460f, 0x31326fbf, 0x7692156f, 0x4bf23cdf, + 0xc9a2ab0e, 0xf4c282be, 0xb362f86e, 0x8e02d1de, 0x3c220dce, + 0x0142247e, 0x46e25eae, 0x7b82771e, 0xb1e6b092, 0x8c869922, + 0xcb26e3f2, 0xf646ca42, 0x44661652, 0x79063fe2, 0x3ea64532, + 0x03c66c82, 0x8196fb53, 0xbcf6d2e3, 0xfb56a833, 0xc6368183, + 0x74165d93, 0x49767423, 0x0ed60ef3, 0x33b62743, 0xd1062710, + 0xec660ea0, 0xabc67470, 0x96a65dc0, 0x248681d0, 0x19e6a860, + 0x5e46d2b0, 0x6326fb00, 0xe1766cd1, 0xdc164561, 0x9bb63fb1, + 0xa6d61601, 0x14f6ca11, 0x2996e3a1, 0x6e369971, 0x5356b0c1, + 0x70279f96, 0x4d47b626, 0x0ae7ccf6, 0x3787e546, 0x85a73956, + 0xb8c710e6, 0xff676a36, 0xc2074386, 0x4057d457, 0x7d37fde7, + 0x3a978737, 0x07f7ae87, 0xb5d77297, 0x88b75b27, 0xcf1721f7, + 0xf2770847, 0x10c70814, 0x2da721a4, 0x6a075b74, 0x576772c4, + 0xe547aed4, 0xd8278764, 0x9f87fdb4, 0xa2e7d404, 0x20b743d5, + 0x1dd76a65, 0x5a7710b5, 0x67173905, 0xd537e515, 0xe857cca5, + 0xaff7b675, 0x92979fc5, 0xe915e8db, 0xd475c16b, 0x93d5bbbb, + 0xaeb5920b, 0x1c954e1b, 0x21f567ab, 0x66551d7b, 0x5b3534cb, + 0xd965a31a, 0xe4058aaa, 0xa3a5f07a, 0x9ec5d9ca, 0x2ce505da, + 0x11852c6a, 0x562556ba, 0x6b457f0a, 0x89f57f59, 0xb49556e9, + 0xf3352c39, 0xce550589, 0x7c75d999, 0x4115f029, 0x06b58af9, + 0x3bd5a349, 0xb9853498, 0x84e51d28, 0xc34567f8, 0xfe254e48, + 0x4c059258, 0x7165bbe8, 0x36c5c138, 0x0ba5e888, 0x28d4c7df, + 0x15b4ee6f, 0x521494bf, 0x6f74bd0f, 0xdd54611f, 0xe03448af, + 0xa794327f, 0x9af41bcf, 0x18a48c1e, 0x25c4a5ae, 0x6264df7e, + 0x5f04f6ce, 0xed242ade, 0xd044036e, 0x97e479be, 0xaa84500e, + 0x4834505d, 0x755479ed, 0x32f4033d, 0x0f942a8d, 0xbdb4f69d, + 0x80d4df2d, 0xc774a5fd, 0xfa148c4d, 0x78441b9c, 0x4524322c, + 0x028448fc, 0x3fe4614c, 0x8dc4bd5c, 0xb0a494ec, 0xf704ee3c, + 0xca64c78c}, + {0x00000000, 0xb8bc6765, 0xaa09c88b, 0x12b5afee, 0x8f629757, + 0x37def032, 0x256b5fdc, 0x9dd738b9, 0xc5b428ef, 0x7d084f8a, + 0x6fbde064, 0xd7018701, 0x4ad6bfb8, 0xf26ad8dd, 0xe0df7733, + 0x58631056, 0x5019579f, 0xe8a530fa, 0xfa109f14, 0x42acf871, + 0xdf7bc0c8, 0x67c7a7ad, 0x75720843, 0xcdce6f26, 0x95ad7f70, + 0x2d111815, 0x3fa4b7fb, 0x8718d09e, 0x1acfe827, 0xa2738f42, + 0xb0c620ac, 0x087a47c9, 0xa032af3e, 0x188ec85b, 0x0a3b67b5, + 0xb28700d0, 0x2f503869, 0x97ec5f0c, 0x8559f0e2, 0x3de59787, + 0x658687d1, 0xdd3ae0b4, 0xcf8f4f5a, 0x7733283f, 0xeae41086, + 0x525877e3, 0x40edd80d, 0xf851bf68, 0xf02bf8a1, 0x48979fc4, + 0x5a22302a, 0xe29e574f, 0x7f496ff6, 0xc7f50893, 0xd540a77d, + 0x6dfcc018, 0x359fd04e, 0x8d23b72b, 0x9f9618c5, 0x272a7fa0, + 0xbafd4719, 0x0241207c, 0x10f48f92, 0xa848e8f7, 0x9b14583d, + 0x23a83f58, 0x311d90b6, 0x89a1f7d3, 0x1476cf6a, 0xaccaa80f, + 0xbe7f07e1, 0x06c36084, 0x5ea070d2, 0xe61c17b7, 0xf4a9b859, + 0x4c15df3c, 0xd1c2e785, 0x697e80e0, 0x7bcb2f0e, 0xc377486b, + 0xcb0d0fa2, 0x73b168c7, 0x6104c729, 0xd9b8a04c, 0x446f98f5, + 0xfcd3ff90, 0xee66507e, 0x56da371b, 0x0eb9274d, 0xb6054028, + 0xa4b0efc6, 0x1c0c88a3, 0x81dbb01a, 0x3967d77f, 0x2bd27891, + 0x936e1ff4, 0x3b26f703, 0x839a9066, 0x912f3f88, 0x299358ed, + 0xb4446054, 0x0cf80731, 0x1e4da8df, 0xa6f1cfba, 0xfe92dfec, + 0x462eb889, 0x549b1767, 0xec277002, 0x71f048bb, 0xc94c2fde, + 0xdbf98030, 0x6345e755, 0x6b3fa09c, 0xd383c7f9, 0xc1366817, + 0x798a0f72, 0xe45d37cb, 0x5ce150ae, 0x4e54ff40, 0xf6e89825, + 0xae8b8873, 0x1637ef16, 0x048240f8, 0xbc3e279d, 0x21e91f24, + 0x99557841, 0x8be0d7af, 0x335cb0ca, 0xed59b63b, 0x55e5d15e, + 0x47507eb0, 0xffec19d5, 0x623b216c, 0xda874609, 0xc832e9e7, + 0x708e8e82, 0x28ed9ed4, 0x9051f9b1, 0x82e4565f, 0x3a58313a, + 0xa78f0983, 0x1f336ee6, 0x0d86c108, 0xb53aa66d, 0xbd40e1a4, + 0x05fc86c1, 0x1749292f, 0xaff54e4a, 0x322276f3, 0x8a9e1196, + 0x982bbe78, 0x2097d91d, 0x78f4c94b, 0xc048ae2e, 0xd2fd01c0, + 0x6a4166a5, 0xf7965e1c, 0x4f2a3979, 0x5d9f9697, 0xe523f1f2, + 0x4d6b1905, 0xf5d77e60, 0xe762d18e, 0x5fdeb6eb, 0xc2098e52, + 0x7ab5e937, 0x680046d9, 0xd0bc21bc, 0x88df31ea, 0x3063568f, + 0x22d6f961, 0x9a6a9e04, 0x07bda6bd, 0xbf01c1d8, 0xadb46e36, + 0x15080953, 0x1d724e9a, 0xa5ce29ff, 0xb77b8611, 0x0fc7e174, + 0x9210d9cd, 0x2aacbea8, 0x38191146, 0x80a57623, 0xd8c66675, + 0x607a0110, 0x72cfaefe, 0xca73c99b, 0x57a4f122, 0xef189647, + 0xfdad39a9, 0x45115ecc, 0x764dee06, 0xcef18963, 0xdc44268d, + 0x64f841e8, 0xf92f7951, 0x41931e34, 0x5326b1da, 0xeb9ad6bf, + 0xb3f9c6e9, 0x0b45a18c, 0x19f00e62, 0xa14c6907, 0x3c9b51be, + 0x842736db, 0x96929935, 0x2e2efe50, 0x2654b999, 0x9ee8defc, + 0x8c5d7112, 0x34e11677, 0xa9362ece, 0x118a49ab, 0x033fe645, + 0xbb838120, 0xe3e09176, 0x5b5cf613, 0x49e959fd, 0xf1553e98, + 0x6c820621, 0xd43e6144, 0xc68bceaa, 0x7e37a9cf, 0xd67f4138, + 0x6ec3265d, 0x7c7689b3, 0xc4caeed6, 0x591dd66f, 0xe1a1b10a, + 0xf3141ee4, 0x4ba87981, 0x13cb69d7, 0xab770eb2, 0xb9c2a15c, + 0x017ec639, 0x9ca9fe80, 0x241599e5, 0x36a0360b, 0x8e1c516e, + 0x866616a7, 0x3eda71c2, 0x2c6fde2c, 0x94d3b949, 0x090481f0, + 0xb1b8e695, 0xa30d497b, 0x1bb12e1e, 0x43d23e48, 0xfb6e592d, + 0xe9dbf6c3, 0x516791a6, 0xccb0a91f, 0x740cce7a, 0x66b96194, + 0xde0506f1}, + {0x00000000, 0x01c26a37, 0x0384d46e, 0x0246be59, 0x0709a8dc, + 0x06cbc2eb, 0x048d7cb2, 0x054f1685, 0x0e1351b8, 0x0fd13b8f, + 0x0d9785d6, 0x0c55efe1, 0x091af964, 0x08d89353, 0x0a9e2d0a, + 0x0b5c473d, 0x1c26a370, 0x1de4c947, 0x1fa2771e, 0x1e601d29, + 0x1b2f0bac, 0x1aed619b, 0x18abdfc2, 0x1969b5f5, 0x1235f2c8, + 0x13f798ff, 0x11b126a6, 0x10734c91, 0x153c5a14, 0x14fe3023, + 0x16b88e7a, 0x177ae44d, 0x384d46e0, 0x398f2cd7, 0x3bc9928e, + 0x3a0bf8b9, 0x3f44ee3c, 0x3e86840b, 0x3cc03a52, 0x3d025065, + 0x365e1758, 0x379c7d6f, 0x35dac336, 0x3418a901, 0x3157bf84, + 0x3095d5b3, 0x32d36bea, 0x331101dd, 0x246be590, 0x25a98fa7, + 0x27ef31fe, 0x262d5bc9, 0x23624d4c, 0x22a0277b, 0x20e69922, + 0x2124f315, 0x2a78b428, 0x2bbade1f, 0x29fc6046, 0x283e0a71, + 0x2d711cf4, 0x2cb376c3, 0x2ef5c89a, 0x2f37a2ad, 0x709a8dc0, + 0x7158e7f7, 0x731e59ae, 0x72dc3399, 0x7793251c, 0x76514f2b, + 0x7417f172, 0x75d59b45, 0x7e89dc78, 0x7f4bb64f, 0x7d0d0816, + 0x7ccf6221, 0x798074a4, 0x78421e93, 0x7a04a0ca, 0x7bc6cafd, + 0x6cbc2eb0, 0x6d7e4487, 0x6f38fade, 0x6efa90e9, 0x6bb5866c, + 0x6a77ec5b, 0x68315202, 0x69f33835, 0x62af7f08, 0x636d153f, + 0x612bab66, 0x60e9c151, 0x65a6d7d4, 0x6464bde3, 0x662203ba, + 0x67e0698d, 0x48d7cb20, 0x4915a117, 0x4b531f4e, 0x4a917579, + 0x4fde63fc, 0x4e1c09cb, 0x4c5ab792, 0x4d98dda5, 0x46c49a98, + 0x4706f0af, 0x45404ef6, 0x448224c1, 0x41cd3244, 0x400f5873, + 0x4249e62a, 0x438b8c1d, 0x54f16850, 0x55330267, 0x5775bc3e, + 0x56b7d609, 0x53f8c08c, 0x523aaabb, 0x507c14e2, 0x51be7ed5, + 0x5ae239e8, 0x5b2053df, 0x5966ed86, 0x58a487b1, 0x5deb9134, + 0x5c29fb03, 0x5e6f455a, 0x5fad2f6d, 0xe1351b80, 0xe0f771b7, + 0xe2b1cfee, 0xe373a5d9, 0xe63cb35c, 0xe7fed96b, 0xe5b86732, + 0xe47a0d05, 0xef264a38, 0xeee4200f, 0xeca29e56, 0xed60f461, + 0xe82fe2e4, 0xe9ed88d3, 0xebab368a, 0xea695cbd, 0xfd13b8f0, + 0xfcd1d2c7, 0xfe976c9e, 0xff5506a9, 0xfa1a102c, 0xfbd87a1b, + 0xf99ec442, 0xf85cae75, 0xf300e948, 0xf2c2837f, 0xf0843d26, + 0xf1465711, 0xf4094194, 0xf5cb2ba3, 0xf78d95fa, 0xf64fffcd, + 0xd9785d60, 0xd8ba3757, 0xdafc890e, 0xdb3ee339, 0xde71f5bc, + 0xdfb39f8b, 0xddf521d2, 0xdc374be5, 0xd76b0cd8, 0xd6a966ef, + 0xd4efd8b6, 0xd52db281, 0xd062a404, 0xd1a0ce33, 0xd3e6706a, + 0xd2241a5d, 0xc55efe10, 0xc49c9427, 0xc6da2a7e, 0xc7184049, + 0xc25756cc, 0xc3953cfb, 0xc1d382a2, 0xc011e895, 0xcb4dafa8, + 0xca8fc59f, 0xc8c97bc6, 0xc90b11f1, 0xcc440774, 0xcd866d43, + 0xcfc0d31a, 0xce02b92d, 0x91af9640, 0x906dfc77, 0x922b422e, + 0x93e92819, 0x96a63e9c, 0x976454ab, 0x9522eaf2, 0x94e080c5, + 0x9fbcc7f8, 0x9e7eadcf, 0x9c381396, 0x9dfa79a1, 0x98b56f24, + 0x99770513, 0x9b31bb4a, 0x9af3d17d, 0x8d893530, 0x8c4b5f07, + 0x8e0de15e, 0x8fcf8b69, 0x8a809dec, 0x8b42f7db, 0x89044982, + 0x88c623b5, 0x839a6488, 0x82580ebf, 0x801eb0e6, 0x81dcdad1, + 0x8493cc54, 0x8551a663, 0x8717183a, 0x86d5720d, 0xa9e2d0a0, + 0xa820ba97, 0xaa6604ce, 0xaba46ef9, 0xaeeb787c, 0xaf29124b, + 0xad6fac12, 0xacadc625, 0xa7f18118, 0xa633eb2f, 0xa4755576, + 0xa5b73f41, 0xa0f829c4, 0xa13a43f3, 0xa37cfdaa, 0xa2be979d, + 0xb5c473d0, 0xb40619e7, 0xb640a7be, 0xb782cd89, 0xb2cddb0c, + 0xb30fb13b, 0xb1490f62, 0xb08b6555, 0xbbd72268, 0xba15485f, + 0xb853f606, 0xb9919c31, 0xbcde8ab4, 0xbd1ce083, 0xbf5a5eda, + 0xbe9834ed}, + {0x00000000, 0x191b3141, 0x32366282, 0x2b2d53c3, 0x646cc504, + 0x7d77f445, 0x565aa786, 0x4f4196c7, 0xc8d98a08, 0xd1c2bb49, + 0xfaefe88a, 0xe3f4d9cb, 0xacb54f0c, 0xb5ae7e4d, 0x9e832d8e, + 0x87981ccf, 0x4ac21251, 0x53d92310, 0x78f470d3, 0x61ef4192, + 0x2eaed755, 0x37b5e614, 0x1c98b5d7, 0x05838496, 0x821b9859, + 0x9b00a918, 0xb02dfadb, 0xa936cb9a, 0xe6775d5d, 0xff6c6c1c, + 0xd4413fdf, 0xcd5a0e9e, 0x958424a2, 0x8c9f15e3, 0xa7b24620, + 0xbea97761, 0xf1e8e1a6, 0xe8f3d0e7, 0xc3de8324, 0xdac5b265, + 0x5d5daeaa, 0x44469feb, 0x6f6bcc28, 0x7670fd69, 0x39316bae, + 0x202a5aef, 0x0b07092c, 0x121c386d, 0xdf4636f3, 0xc65d07b2, + 0xed705471, 0xf46b6530, 0xbb2af3f7, 0xa231c2b6, 0x891c9175, + 0x9007a034, 0x179fbcfb, 0x0e848dba, 0x25a9de79, 0x3cb2ef38, + 0x73f379ff, 0x6ae848be, 0x41c51b7d, 0x58de2a3c, 0xf0794f05, + 0xe9627e44, 0xc24f2d87, 0xdb541cc6, 0x94158a01, 0x8d0ebb40, + 0xa623e883, 0xbf38d9c2, 0x38a0c50d, 0x21bbf44c, 0x0a96a78f, + 0x138d96ce, 0x5ccc0009, 0x45d73148, 0x6efa628b, 0x77e153ca, + 0xbabb5d54, 0xa3a06c15, 0x888d3fd6, 0x91960e97, 0xded79850, + 0xc7cca911, 0xece1fad2, 0xf5facb93, 0x7262d75c, 0x6b79e61d, + 0x4054b5de, 0x594f849f, 0x160e1258, 0x0f152319, 0x243870da, + 0x3d23419b, 0x65fd6ba7, 0x7ce65ae6, 0x57cb0925, 0x4ed03864, + 0x0191aea3, 0x188a9fe2, 0x33a7cc21, 0x2abcfd60, 0xad24e1af, + 0xb43fd0ee, 0x9f12832d, 0x8609b26c, 0xc94824ab, 0xd05315ea, + 0xfb7e4629, 0xe2657768, 0x2f3f79f6, 0x362448b7, 0x1d091b74, + 0x04122a35, 0x4b53bcf2, 0x52488db3, 0x7965de70, 0x607eef31, + 0xe7e6f3fe, 0xfefdc2bf, 0xd5d0917c, 0xcccba03d, 0x838a36fa, + 0x9a9107bb, 0xb1bc5478, 0xa8a76539, 0x3b83984b, 0x2298a90a, + 0x09b5fac9, 0x10aecb88, 0x5fef5d4f, 0x46f46c0e, 0x6dd93fcd, + 0x74c20e8c, 0xf35a1243, 0xea412302, 0xc16c70c1, 0xd8774180, + 0x9736d747, 0x8e2de606, 0xa500b5c5, 0xbc1b8484, 0x71418a1a, + 0x685abb5b, 0x4377e898, 0x5a6cd9d9, 0x152d4f1e, 0x0c367e5f, + 0x271b2d9c, 0x3e001cdd, 0xb9980012, 0xa0833153, 0x8bae6290, + 0x92b553d1, 0xddf4c516, 0xc4eff457, 0xefc2a794, 0xf6d996d5, + 0xae07bce9, 0xb71c8da8, 0x9c31de6b, 0x852aef2a, 0xca6b79ed, + 0xd37048ac, 0xf85d1b6f, 0xe1462a2e, 0x66de36e1, 0x7fc507a0, + 0x54e85463, 0x4df36522, 0x02b2f3e5, 0x1ba9c2a4, 0x30849167, + 0x299fa026, 0xe4c5aeb8, 0xfdde9ff9, 0xd6f3cc3a, 0xcfe8fd7b, + 0x80a96bbc, 0x99b25afd, 0xb29f093e, 0xab84387f, 0x2c1c24b0, + 0x350715f1, 0x1e2a4632, 0x07317773, 0x4870e1b4, 0x516bd0f5, + 0x7a468336, 0x635db277, 0xcbfad74e, 0xd2e1e60f, 0xf9ccb5cc, + 0xe0d7848d, 0xaf96124a, 0xb68d230b, 0x9da070c8, 0x84bb4189, + 0x03235d46, 0x1a386c07, 0x31153fc4, 0x280e0e85, 0x674f9842, + 0x7e54a903, 0x5579fac0, 0x4c62cb81, 0x8138c51f, 0x9823f45e, + 0xb30ea79d, 0xaa1596dc, 0xe554001b, 0xfc4f315a, 0xd7626299, + 0xce7953d8, 0x49e14f17, 0x50fa7e56, 0x7bd72d95, 0x62cc1cd4, + 0x2d8d8a13, 0x3496bb52, 0x1fbbe891, 0x06a0d9d0, 0x5e7ef3ec, + 0x4765c2ad, 0x6c48916e, 0x7553a02f, 0x3a1236e8, 0x230907a9, + 0x0824546a, 0x113f652b, 0x96a779e4, 0x8fbc48a5, 0xa4911b66, + 0xbd8a2a27, 0xf2cbbce0, 0xebd08da1, 0xc0fdde62, 0xd9e6ef23, + 0x14bce1bd, 0x0da7d0fc, 0x268a833f, 0x3f91b27e, 0x70d024b9, + 0x69cb15f8, 0x42e6463b, 0x5bfd777a, 0xdc656bb5, 0xc57e5af4, + 0xee530937, 0xf7483876, 0xb809aeb1, 0xa1129ff0, 0x8a3fcc33, + 0x9324fd72}, + {0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, + 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, + 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, + 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, + 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, + 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, + 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, + 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, + 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, + 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, + 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, + 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, + 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, + 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, + 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, + 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, + 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, + 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, + 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, + 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, + 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, + 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, + 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, + 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, + 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, + 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, + 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, + 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, + 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, + 0x2d02ef8d}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x0000000000000000, 0x9630077700000000, 0x2c610eee00000000, + 0xba51099900000000, 0x19c46d0700000000, 0x8ff46a7000000000, + 0x35a563e900000000, 0xa395649e00000000, 0x3288db0e00000000, + 0xa4b8dc7900000000, 0x1ee9d5e000000000, 0x88d9d29700000000, + 0x2b4cb60900000000, 0xbd7cb17e00000000, 0x072db8e700000000, + 0x911dbf9000000000, 0x6410b71d00000000, 0xf220b06a00000000, + 0x4871b9f300000000, 0xde41be8400000000, 0x7dd4da1a00000000, + 0xebe4dd6d00000000, 0x51b5d4f400000000, 0xc785d38300000000, + 0x56986c1300000000, 0xc0a86b6400000000, 0x7af962fd00000000, + 0xecc9658a00000000, 0x4f5c011400000000, 0xd96c066300000000, + 0x633d0ffa00000000, 0xf50d088d00000000, 0xc8206e3b00000000, + 0x5e10694c00000000, 0xe44160d500000000, 0x727167a200000000, + 0xd1e4033c00000000, 0x47d4044b00000000, 0xfd850dd200000000, + 0x6bb50aa500000000, 0xfaa8b53500000000, 0x6c98b24200000000, + 0xd6c9bbdb00000000, 0x40f9bcac00000000, 0xe36cd83200000000, + 0x755cdf4500000000, 0xcf0dd6dc00000000, 0x593dd1ab00000000, + 0xac30d92600000000, 0x3a00de5100000000, 0x8051d7c800000000, + 0x1661d0bf00000000, 0xb5f4b42100000000, 0x23c4b35600000000, + 0x9995bacf00000000, 0x0fa5bdb800000000, 0x9eb8022800000000, + 0x0888055f00000000, 0xb2d90cc600000000, 0x24e90bb100000000, + 0x877c6f2f00000000, 0x114c685800000000, 0xab1d61c100000000, + 0x3d2d66b600000000, 0x9041dc7600000000, 0x0671db0100000000, + 0xbc20d29800000000, 0x2a10d5ef00000000, 0x8985b17100000000, + 0x1fb5b60600000000, 0xa5e4bf9f00000000, 0x33d4b8e800000000, + 0xa2c9077800000000, 0x34f9000f00000000, 0x8ea8099600000000, + 0x18980ee100000000, 0xbb0d6a7f00000000, 0x2d3d6d0800000000, + 0x976c649100000000, 0x015c63e600000000, 0xf4516b6b00000000, + 0x62616c1c00000000, 0xd830658500000000, 0x4e0062f200000000, + 0xed95066c00000000, 0x7ba5011b00000000, 0xc1f4088200000000, + 0x57c40ff500000000, 0xc6d9b06500000000, 0x50e9b71200000000, + 0xeab8be8b00000000, 0x7c88b9fc00000000, 0xdf1ddd6200000000, + 0x492dda1500000000, 0xf37cd38c00000000, 0x654cd4fb00000000, + 0x5861b24d00000000, 0xce51b53a00000000, 0x7400bca300000000, + 0xe230bbd400000000, 0x41a5df4a00000000, 0xd795d83d00000000, + 0x6dc4d1a400000000, 0xfbf4d6d300000000, 0x6ae9694300000000, + 0xfcd96e3400000000, 0x468867ad00000000, 0xd0b860da00000000, + 0x732d044400000000, 0xe51d033300000000, 0x5f4c0aaa00000000, + 0xc97c0ddd00000000, 0x3c71055000000000, 0xaa41022700000000, + 0x10100bbe00000000, 0x86200cc900000000, 0x25b5685700000000, + 0xb3856f2000000000, 0x09d466b900000000, 0x9fe461ce00000000, + 0x0ef9de5e00000000, 0x98c9d92900000000, 0x2298d0b000000000, + 0xb4a8d7c700000000, 0x173db35900000000, 0x810db42e00000000, + 0x3b5cbdb700000000, 0xad6cbac000000000, 0x2083b8ed00000000, + 0xb6b3bf9a00000000, 0x0ce2b60300000000, 0x9ad2b17400000000, + 0x3947d5ea00000000, 0xaf77d29d00000000, 0x1526db0400000000, + 0x8316dc7300000000, 0x120b63e300000000, 0x843b649400000000, + 0x3e6a6d0d00000000, 0xa85a6a7a00000000, 0x0bcf0ee400000000, + 0x9dff099300000000, 0x27ae000a00000000, 0xb19e077d00000000, + 0x44930ff000000000, 0xd2a3088700000000, 0x68f2011e00000000, + 0xfec2066900000000, 0x5d5762f700000000, 0xcb67658000000000, + 0x71366c1900000000, 0xe7066b6e00000000, 0x761bd4fe00000000, + 0xe02bd38900000000, 0x5a7ada1000000000, 0xcc4add6700000000, + 0x6fdfb9f900000000, 0xf9efbe8e00000000, 0x43beb71700000000, + 0xd58eb06000000000, 0xe8a3d6d600000000, 0x7e93d1a100000000, + 0xc4c2d83800000000, 0x52f2df4f00000000, 0xf167bbd100000000, + 0x6757bca600000000, 0xdd06b53f00000000, 0x4b36b24800000000, + 0xda2b0dd800000000, 0x4c1b0aaf00000000, 0xf64a033600000000, + 0x607a044100000000, 0xc3ef60df00000000, 0x55df67a800000000, + 0xef8e6e3100000000, 0x79be694600000000, 0x8cb361cb00000000, + 0x1a8366bc00000000, 0xa0d26f2500000000, 0x36e2685200000000, + 0x95770ccc00000000, 0x03470bbb00000000, 0xb916022200000000, + 0x2f26055500000000, 0xbe3bbac500000000, 0x280bbdb200000000, + 0x925ab42b00000000, 0x046ab35c00000000, 0xa7ffd7c200000000, + 0x31cfd0b500000000, 0x8b9ed92c00000000, 0x1daede5b00000000, + 0xb0c2649b00000000, 0x26f263ec00000000, 0x9ca36a7500000000, + 0x0a936d0200000000, 0xa906099c00000000, 0x3f360eeb00000000, + 0x8567077200000000, 0x1357000500000000, 0x824abf9500000000, + 0x147ab8e200000000, 0xae2bb17b00000000, 0x381bb60c00000000, + 0x9b8ed29200000000, 0x0dbed5e500000000, 0xb7efdc7c00000000, + 0x21dfdb0b00000000, 0xd4d2d38600000000, 0x42e2d4f100000000, + 0xf8b3dd6800000000, 0x6e83da1f00000000, 0xcd16be8100000000, + 0x5b26b9f600000000, 0xe177b06f00000000, 0x7747b71800000000, + 0xe65a088800000000, 0x706a0fff00000000, 0xca3b066600000000, + 0x5c0b011100000000, 0xff9e658f00000000, 0x69ae62f800000000, + 0xd3ff6b6100000000, 0x45cf6c1600000000, 0x78e20aa000000000, + 0xeed20dd700000000, 0x5483044e00000000, 0xc2b3033900000000, + 0x612667a700000000, 0xf71660d000000000, 0x4d47694900000000, + 0xdb776e3e00000000, 0x4a6ad1ae00000000, 0xdc5ad6d900000000, + 0x660bdf4000000000, 0xf03bd83700000000, 0x53aebca900000000, + 0xc59ebbde00000000, 0x7fcfb24700000000, 0xe9ffb53000000000, + 0x1cf2bdbd00000000, 0x8ac2baca00000000, 0x3093b35300000000, + 0xa6a3b42400000000, 0x0536d0ba00000000, 0x9306d7cd00000000, + 0x2957de5400000000, 0xbf67d92300000000, 0x2e7a66b300000000, + 0xb84a61c400000000, 0x021b685d00000000, 0x942b6f2a00000000, + 0x37be0bb400000000, 0xa18e0cc300000000, 0x1bdf055a00000000, + 0x8def022d00000000}, + {0x0000000000000000, 0x41311b1900000000, 0x8262363200000000, + 0xc3532d2b00000000, 0x04c56c6400000000, 0x45f4777d00000000, + 0x86a75a5600000000, 0xc796414f00000000, 0x088ad9c800000000, + 0x49bbc2d100000000, 0x8ae8effa00000000, 0xcbd9f4e300000000, + 0x0c4fb5ac00000000, 0x4d7eaeb500000000, 0x8e2d839e00000000, + 0xcf1c988700000000, 0x5112c24a00000000, 0x1023d95300000000, + 0xd370f47800000000, 0x9241ef6100000000, 0x55d7ae2e00000000, + 0x14e6b53700000000, 0xd7b5981c00000000, 0x9684830500000000, + 0x59981b8200000000, 0x18a9009b00000000, 0xdbfa2db000000000, + 0x9acb36a900000000, 0x5d5d77e600000000, 0x1c6c6cff00000000, + 0xdf3f41d400000000, 0x9e0e5acd00000000, 0xa224849500000000, + 0xe3159f8c00000000, 0x2046b2a700000000, 0x6177a9be00000000, + 0xa6e1e8f100000000, 0xe7d0f3e800000000, 0x2483dec300000000, + 0x65b2c5da00000000, 0xaaae5d5d00000000, 0xeb9f464400000000, + 0x28cc6b6f00000000, 0x69fd707600000000, 0xae6b313900000000, + 0xef5a2a2000000000, 0x2c09070b00000000, 0x6d381c1200000000, + 0xf33646df00000000, 0xb2075dc600000000, 0x715470ed00000000, + 0x30656bf400000000, 0xf7f32abb00000000, 0xb6c231a200000000, + 0x75911c8900000000, 0x34a0079000000000, 0xfbbc9f1700000000, + 0xba8d840e00000000, 0x79dea92500000000, 0x38efb23c00000000, + 0xff79f37300000000, 0xbe48e86a00000000, 0x7d1bc54100000000, + 0x3c2ade5800000000, 0x054f79f000000000, 0x447e62e900000000, + 0x872d4fc200000000, 0xc61c54db00000000, 0x018a159400000000, + 0x40bb0e8d00000000, 0x83e823a600000000, 0xc2d938bf00000000, + 0x0dc5a03800000000, 0x4cf4bb2100000000, 0x8fa7960a00000000, + 0xce968d1300000000, 0x0900cc5c00000000, 0x4831d74500000000, + 0x8b62fa6e00000000, 0xca53e17700000000, 0x545dbbba00000000, + 0x156ca0a300000000, 0xd63f8d8800000000, 0x970e969100000000, + 0x5098d7de00000000, 0x11a9ccc700000000, 0xd2fae1ec00000000, + 0x93cbfaf500000000, 0x5cd7627200000000, 0x1de6796b00000000, + 0xdeb5544000000000, 0x9f844f5900000000, 0x58120e1600000000, + 0x1923150f00000000, 0xda70382400000000, 0x9b41233d00000000, + 0xa76bfd6500000000, 0xe65ae67c00000000, 0x2509cb5700000000, + 0x6438d04e00000000, 0xa3ae910100000000, 0xe29f8a1800000000, + 0x21cca73300000000, 0x60fdbc2a00000000, 0xafe124ad00000000, + 0xeed03fb400000000, 0x2d83129f00000000, 0x6cb2098600000000, + 0xab2448c900000000, 0xea1553d000000000, 0x29467efb00000000, + 0x687765e200000000, 0xf6793f2f00000000, 0xb748243600000000, + 0x741b091d00000000, 0x352a120400000000, 0xf2bc534b00000000, + 0xb38d485200000000, 0x70de657900000000, 0x31ef7e6000000000, + 0xfef3e6e700000000, 0xbfc2fdfe00000000, 0x7c91d0d500000000, + 0x3da0cbcc00000000, 0xfa368a8300000000, 0xbb07919a00000000, + 0x7854bcb100000000, 0x3965a7a800000000, 0x4b98833b00000000, + 0x0aa9982200000000, 0xc9fab50900000000, 0x88cbae1000000000, + 0x4f5def5f00000000, 0x0e6cf44600000000, 0xcd3fd96d00000000, + 0x8c0ec27400000000, 0x43125af300000000, 0x022341ea00000000, + 0xc1706cc100000000, 0x804177d800000000, 0x47d7369700000000, + 0x06e62d8e00000000, 0xc5b500a500000000, 0x84841bbc00000000, + 0x1a8a417100000000, 0x5bbb5a6800000000, 0x98e8774300000000, + 0xd9d96c5a00000000, 0x1e4f2d1500000000, 0x5f7e360c00000000, + 0x9c2d1b2700000000, 0xdd1c003e00000000, 0x120098b900000000, + 0x533183a000000000, 0x9062ae8b00000000, 0xd153b59200000000, + 0x16c5f4dd00000000, 0x57f4efc400000000, 0x94a7c2ef00000000, + 0xd596d9f600000000, 0xe9bc07ae00000000, 0xa88d1cb700000000, + 0x6bde319c00000000, 0x2aef2a8500000000, 0xed796bca00000000, + 0xac4870d300000000, 0x6f1b5df800000000, 0x2e2a46e100000000, + 0xe136de6600000000, 0xa007c57f00000000, 0x6354e85400000000, + 0x2265f34d00000000, 0xe5f3b20200000000, 0xa4c2a91b00000000, + 0x6791843000000000, 0x26a09f2900000000, 0xb8aec5e400000000, + 0xf99fdefd00000000, 0x3accf3d600000000, 0x7bfde8cf00000000, + 0xbc6ba98000000000, 0xfd5ab29900000000, 0x3e099fb200000000, + 0x7f3884ab00000000, 0xb0241c2c00000000, 0xf115073500000000, + 0x32462a1e00000000, 0x7377310700000000, 0xb4e1704800000000, + 0xf5d06b5100000000, 0x3683467a00000000, 0x77b25d6300000000, + 0x4ed7facb00000000, 0x0fe6e1d200000000, 0xccb5ccf900000000, + 0x8d84d7e000000000, 0x4a1296af00000000, 0x0b238db600000000, + 0xc870a09d00000000, 0x8941bb8400000000, 0x465d230300000000, + 0x076c381a00000000, 0xc43f153100000000, 0x850e0e2800000000, + 0x42984f6700000000, 0x03a9547e00000000, 0xc0fa795500000000, + 0x81cb624c00000000, 0x1fc5388100000000, 0x5ef4239800000000, + 0x9da70eb300000000, 0xdc9615aa00000000, 0x1b0054e500000000, + 0x5a314ffc00000000, 0x996262d700000000, 0xd85379ce00000000, + 0x174fe14900000000, 0x567efa5000000000, 0x952dd77b00000000, + 0xd41ccc6200000000, 0x138a8d2d00000000, 0x52bb963400000000, + 0x91e8bb1f00000000, 0xd0d9a00600000000, 0xecf37e5e00000000, + 0xadc2654700000000, 0x6e91486c00000000, 0x2fa0537500000000, + 0xe836123a00000000, 0xa907092300000000, 0x6a54240800000000, + 0x2b653f1100000000, 0xe479a79600000000, 0xa548bc8f00000000, + 0x661b91a400000000, 0x272a8abd00000000, 0xe0bccbf200000000, + 0xa18dd0eb00000000, 0x62defdc000000000, 0x23efe6d900000000, + 0xbde1bc1400000000, 0xfcd0a70d00000000, 0x3f838a2600000000, + 0x7eb2913f00000000, 0xb924d07000000000, 0xf815cb6900000000, + 0x3b46e64200000000, 0x7a77fd5b00000000, 0xb56b65dc00000000, + 0xf45a7ec500000000, 0x370953ee00000000, 0x763848f700000000, + 0xb1ae09b800000000, 0xf09f12a100000000, 0x33cc3f8a00000000, + 0x72fd249300000000}, + {0x0000000000000000, 0x376ac20100000000, 0x6ed4840300000000, + 0x59be460200000000, 0xdca8090700000000, 0xebc2cb0600000000, + 0xb27c8d0400000000, 0x85164f0500000000, 0xb851130e00000000, + 0x8f3bd10f00000000, 0xd685970d00000000, 0xe1ef550c00000000, + 0x64f91a0900000000, 0x5393d80800000000, 0x0a2d9e0a00000000, + 0x3d475c0b00000000, 0x70a3261c00000000, 0x47c9e41d00000000, + 0x1e77a21f00000000, 0x291d601e00000000, 0xac0b2f1b00000000, + 0x9b61ed1a00000000, 0xc2dfab1800000000, 0xf5b5691900000000, + 0xc8f2351200000000, 0xff98f71300000000, 0xa626b11100000000, + 0x914c731000000000, 0x145a3c1500000000, 0x2330fe1400000000, + 0x7a8eb81600000000, 0x4de47a1700000000, 0xe0464d3800000000, + 0xd72c8f3900000000, 0x8e92c93b00000000, 0xb9f80b3a00000000, + 0x3cee443f00000000, 0x0b84863e00000000, 0x523ac03c00000000, + 0x6550023d00000000, 0x58175e3600000000, 0x6f7d9c3700000000, + 0x36c3da3500000000, 0x01a9183400000000, 0x84bf573100000000, + 0xb3d5953000000000, 0xea6bd33200000000, 0xdd01113300000000, + 0x90e56b2400000000, 0xa78fa92500000000, 0xfe31ef2700000000, + 0xc95b2d2600000000, 0x4c4d622300000000, 0x7b27a02200000000, + 0x2299e62000000000, 0x15f3242100000000, 0x28b4782a00000000, + 0x1fdeba2b00000000, 0x4660fc2900000000, 0x710a3e2800000000, + 0xf41c712d00000000, 0xc376b32c00000000, 0x9ac8f52e00000000, + 0xada2372f00000000, 0xc08d9a7000000000, 0xf7e7587100000000, + 0xae591e7300000000, 0x9933dc7200000000, 0x1c25937700000000, + 0x2b4f517600000000, 0x72f1177400000000, 0x459bd57500000000, + 0x78dc897e00000000, 0x4fb64b7f00000000, 0x16080d7d00000000, + 0x2162cf7c00000000, 0xa474807900000000, 0x931e427800000000, + 0xcaa0047a00000000, 0xfdcac67b00000000, 0xb02ebc6c00000000, + 0x87447e6d00000000, 0xdefa386f00000000, 0xe990fa6e00000000, + 0x6c86b56b00000000, 0x5bec776a00000000, 0x0252316800000000, + 0x3538f36900000000, 0x087faf6200000000, 0x3f156d6300000000, + 0x66ab2b6100000000, 0x51c1e96000000000, 0xd4d7a66500000000, + 0xe3bd646400000000, 0xba03226600000000, 0x8d69e06700000000, + 0x20cbd74800000000, 0x17a1154900000000, 0x4e1f534b00000000, + 0x7975914a00000000, 0xfc63de4f00000000, 0xcb091c4e00000000, + 0x92b75a4c00000000, 0xa5dd984d00000000, 0x989ac44600000000, + 0xaff0064700000000, 0xf64e404500000000, 0xc124824400000000, + 0x4432cd4100000000, 0x73580f4000000000, 0x2ae6494200000000, + 0x1d8c8b4300000000, 0x5068f15400000000, 0x6702335500000000, + 0x3ebc755700000000, 0x09d6b75600000000, 0x8cc0f85300000000, + 0xbbaa3a5200000000, 0xe2147c5000000000, 0xd57ebe5100000000, + 0xe839e25a00000000, 0xdf53205b00000000, 0x86ed665900000000, + 0xb187a45800000000, 0x3491eb5d00000000, 0x03fb295c00000000, + 0x5a456f5e00000000, 0x6d2fad5f00000000, 0x801b35e100000000, + 0xb771f7e000000000, 0xeecfb1e200000000, 0xd9a573e300000000, + 0x5cb33ce600000000, 0x6bd9fee700000000, 0x3267b8e500000000, + 0x050d7ae400000000, 0x384a26ef00000000, 0x0f20e4ee00000000, + 0x569ea2ec00000000, 0x61f460ed00000000, 0xe4e22fe800000000, + 0xd388ede900000000, 0x8a36abeb00000000, 0xbd5c69ea00000000, + 0xf0b813fd00000000, 0xc7d2d1fc00000000, 0x9e6c97fe00000000, + 0xa90655ff00000000, 0x2c101afa00000000, 0x1b7ad8fb00000000, + 0x42c49ef900000000, 0x75ae5cf800000000, 0x48e900f300000000, + 0x7f83c2f200000000, 0x263d84f000000000, 0x115746f100000000, + 0x944109f400000000, 0xa32bcbf500000000, 0xfa958df700000000, + 0xcdff4ff600000000, 0x605d78d900000000, 0x5737bad800000000, + 0x0e89fcda00000000, 0x39e33edb00000000, 0xbcf571de00000000, + 0x8b9fb3df00000000, 0xd221f5dd00000000, 0xe54b37dc00000000, + 0xd80c6bd700000000, 0xef66a9d600000000, 0xb6d8efd400000000, + 0x81b22dd500000000, 0x04a462d000000000, 0x33cea0d100000000, + 0x6a70e6d300000000, 0x5d1a24d200000000, 0x10fe5ec500000000, + 0x27949cc400000000, 0x7e2adac600000000, 0x494018c700000000, + 0xcc5657c200000000, 0xfb3c95c300000000, 0xa282d3c100000000, + 0x95e811c000000000, 0xa8af4dcb00000000, 0x9fc58fca00000000, + 0xc67bc9c800000000, 0xf1110bc900000000, 0x740744cc00000000, + 0x436d86cd00000000, 0x1ad3c0cf00000000, 0x2db902ce00000000, + 0x4096af9100000000, 0x77fc6d9000000000, 0x2e422b9200000000, + 0x1928e99300000000, 0x9c3ea69600000000, 0xab54649700000000, + 0xf2ea229500000000, 0xc580e09400000000, 0xf8c7bc9f00000000, + 0xcfad7e9e00000000, 0x9613389c00000000, 0xa179fa9d00000000, + 0x246fb59800000000, 0x1305779900000000, 0x4abb319b00000000, + 0x7dd1f39a00000000, 0x3035898d00000000, 0x075f4b8c00000000, + 0x5ee10d8e00000000, 0x698bcf8f00000000, 0xec9d808a00000000, + 0xdbf7428b00000000, 0x8249048900000000, 0xb523c68800000000, + 0x88649a8300000000, 0xbf0e588200000000, 0xe6b01e8000000000, + 0xd1dadc8100000000, 0x54cc938400000000, 0x63a6518500000000, + 0x3a18178700000000, 0x0d72d58600000000, 0xa0d0e2a900000000, + 0x97ba20a800000000, 0xce0466aa00000000, 0xf96ea4ab00000000, + 0x7c78ebae00000000, 0x4b1229af00000000, 0x12ac6fad00000000, + 0x25c6adac00000000, 0x1881f1a700000000, 0x2feb33a600000000, + 0x765575a400000000, 0x413fb7a500000000, 0xc429f8a000000000, + 0xf3433aa100000000, 0xaafd7ca300000000, 0x9d97bea200000000, + 0xd073c4b500000000, 0xe71906b400000000, 0xbea740b600000000, + 0x89cd82b700000000, 0x0cdbcdb200000000, 0x3bb10fb300000000, + 0x620f49b100000000, 0x55658bb000000000, 0x6822d7bb00000000, + 0x5f4815ba00000000, 0x06f653b800000000, 0x319c91b900000000, + 0xb48adebc00000000, 0x83e01cbd00000000, 0xda5e5abf00000000, + 0xed3498be00000000}, + {0x0000000000000000, 0x6567bcb800000000, 0x8bc809aa00000000, + 0xeeafb51200000000, 0x5797628f00000000, 0x32f0de3700000000, + 0xdc5f6b2500000000, 0xb938d79d00000000, 0xef28b4c500000000, + 0x8a4f087d00000000, 0x64e0bd6f00000000, 0x018701d700000000, + 0xb8bfd64a00000000, 0xddd86af200000000, 0x3377dfe000000000, + 0x5610635800000000, 0x9f57195000000000, 0xfa30a5e800000000, + 0x149f10fa00000000, 0x71f8ac4200000000, 0xc8c07bdf00000000, + 0xada7c76700000000, 0x4308727500000000, 0x266fcecd00000000, + 0x707fad9500000000, 0x1518112d00000000, 0xfbb7a43f00000000, + 0x9ed0188700000000, 0x27e8cf1a00000000, 0x428f73a200000000, + 0xac20c6b000000000, 0xc9477a0800000000, 0x3eaf32a000000000, + 0x5bc88e1800000000, 0xb5673b0a00000000, 0xd00087b200000000, + 0x6938502f00000000, 0x0c5fec9700000000, 0xe2f0598500000000, + 0x8797e53d00000000, 0xd187866500000000, 0xb4e03add00000000, + 0x5a4f8fcf00000000, 0x3f28337700000000, 0x8610e4ea00000000, + 0xe377585200000000, 0x0dd8ed4000000000, 0x68bf51f800000000, + 0xa1f82bf000000000, 0xc49f974800000000, 0x2a30225a00000000, + 0x4f579ee200000000, 0xf66f497f00000000, 0x9308f5c700000000, + 0x7da740d500000000, 0x18c0fc6d00000000, 0x4ed09f3500000000, + 0x2bb7238d00000000, 0xc518969f00000000, 0xa07f2a2700000000, + 0x1947fdba00000000, 0x7c20410200000000, 0x928ff41000000000, + 0xf7e848a800000000, 0x3d58149b00000000, 0x583fa82300000000, + 0xb6901d3100000000, 0xd3f7a18900000000, 0x6acf761400000000, + 0x0fa8caac00000000, 0xe1077fbe00000000, 0x8460c30600000000, + 0xd270a05e00000000, 0xb7171ce600000000, 0x59b8a9f400000000, + 0x3cdf154c00000000, 0x85e7c2d100000000, 0xe0807e6900000000, + 0x0e2fcb7b00000000, 0x6b4877c300000000, 0xa20f0dcb00000000, + 0xc768b17300000000, 0x29c7046100000000, 0x4ca0b8d900000000, + 0xf5986f4400000000, 0x90ffd3fc00000000, 0x7e5066ee00000000, + 0x1b37da5600000000, 0x4d27b90e00000000, 0x284005b600000000, + 0xc6efb0a400000000, 0xa3880c1c00000000, 0x1ab0db8100000000, + 0x7fd7673900000000, 0x9178d22b00000000, 0xf41f6e9300000000, + 0x03f7263b00000000, 0x66909a8300000000, 0x883f2f9100000000, + 0xed58932900000000, 0x546044b400000000, 0x3107f80c00000000, + 0xdfa84d1e00000000, 0xbacff1a600000000, 0xecdf92fe00000000, + 0x89b82e4600000000, 0x67179b5400000000, 0x027027ec00000000, + 0xbb48f07100000000, 0xde2f4cc900000000, 0x3080f9db00000000, + 0x55e7456300000000, 0x9ca03f6b00000000, 0xf9c783d300000000, + 0x176836c100000000, 0x720f8a7900000000, 0xcb375de400000000, + 0xae50e15c00000000, 0x40ff544e00000000, 0x2598e8f600000000, + 0x73888bae00000000, 0x16ef371600000000, 0xf840820400000000, + 0x9d273ebc00000000, 0x241fe92100000000, 0x4178559900000000, + 0xafd7e08b00000000, 0xcab05c3300000000, 0x3bb659ed00000000, + 0x5ed1e55500000000, 0xb07e504700000000, 0xd519ecff00000000, + 0x6c213b6200000000, 0x094687da00000000, 0xe7e932c800000000, + 0x828e8e7000000000, 0xd49eed2800000000, 0xb1f9519000000000, + 0x5f56e48200000000, 0x3a31583a00000000, 0x83098fa700000000, + 0xe66e331f00000000, 0x08c1860d00000000, 0x6da63ab500000000, + 0xa4e140bd00000000, 0xc186fc0500000000, 0x2f29491700000000, + 0x4a4ef5af00000000, 0xf376223200000000, 0x96119e8a00000000, + 0x78be2b9800000000, 0x1dd9972000000000, 0x4bc9f47800000000, + 0x2eae48c000000000, 0xc001fdd200000000, 0xa566416a00000000, + 0x1c5e96f700000000, 0x79392a4f00000000, 0x97969f5d00000000, + 0xf2f123e500000000, 0x05196b4d00000000, 0x607ed7f500000000, + 0x8ed162e700000000, 0xebb6de5f00000000, 0x528e09c200000000, + 0x37e9b57a00000000, 0xd946006800000000, 0xbc21bcd000000000, + 0xea31df8800000000, 0x8f56633000000000, 0x61f9d62200000000, + 0x049e6a9a00000000, 0xbda6bd0700000000, 0xd8c101bf00000000, + 0x366eb4ad00000000, 0x5309081500000000, 0x9a4e721d00000000, + 0xff29cea500000000, 0x11867bb700000000, 0x74e1c70f00000000, + 0xcdd9109200000000, 0xa8beac2a00000000, 0x4611193800000000, + 0x2376a58000000000, 0x7566c6d800000000, 0x10017a6000000000, + 0xfeaecf7200000000, 0x9bc973ca00000000, 0x22f1a45700000000, + 0x479618ef00000000, 0xa939adfd00000000, 0xcc5e114500000000, + 0x06ee4d7600000000, 0x6389f1ce00000000, 0x8d2644dc00000000, + 0xe841f86400000000, 0x51792ff900000000, 0x341e934100000000, + 0xdab1265300000000, 0xbfd69aeb00000000, 0xe9c6f9b300000000, + 0x8ca1450b00000000, 0x620ef01900000000, 0x07694ca100000000, + 0xbe519b3c00000000, 0xdb36278400000000, 0x3599929600000000, + 0x50fe2e2e00000000, 0x99b9542600000000, 0xfcdee89e00000000, + 0x12715d8c00000000, 0x7716e13400000000, 0xce2e36a900000000, + 0xab498a1100000000, 0x45e63f0300000000, 0x208183bb00000000, + 0x7691e0e300000000, 0x13f65c5b00000000, 0xfd59e94900000000, + 0x983e55f100000000, 0x2106826c00000000, 0x44613ed400000000, + 0xaace8bc600000000, 0xcfa9377e00000000, 0x38417fd600000000, + 0x5d26c36e00000000, 0xb389767c00000000, 0xd6eecac400000000, + 0x6fd61d5900000000, 0x0ab1a1e100000000, 0xe41e14f300000000, + 0x8179a84b00000000, 0xd769cb1300000000, 0xb20e77ab00000000, + 0x5ca1c2b900000000, 0x39c67e0100000000, 0x80fea99c00000000, + 0xe599152400000000, 0x0b36a03600000000, 0x6e511c8e00000000, + 0xa716668600000000, 0xc271da3e00000000, 0x2cde6f2c00000000, + 0x49b9d39400000000, 0xf081040900000000, 0x95e6b8b100000000, + 0x7b490da300000000, 0x1e2eb11b00000000, 0x483ed24300000000, + 0x2d596efb00000000, 0xc3f6dbe900000000, 0xa691675100000000, + 0x1fa9b0cc00000000, 0x7ace0c7400000000, 0x9461b96600000000, + 0xf10605de00000000}, + {0x0000000000000000, 0xb029603d00000000, 0x6053c07a00000000, + 0xd07aa04700000000, 0xc0a680f500000000, 0x708fe0c800000000, + 0xa0f5408f00000000, 0x10dc20b200000000, 0xc14b703000000000, + 0x7162100d00000000, 0xa118b04a00000000, 0x1131d07700000000, + 0x01edf0c500000000, 0xb1c490f800000000, 0x61be30bf00000000, + 0xd197508200000000, 0x8297e06000000000, 0x32be805d00000000, + 0xe2c4201a00000000, 0x52ed402700000000, 0x4231609500000000, + 0xf21800a800000000, 0x2262a0ef00000000, 0x924bc0d200000000, + 0x43dc905000000000, 0xf3f5f06d00000000, 0x238f502a00000000, + 0x93a6301700000000, 0x837a10a500000000, 0x3353709800000000, + 0xe329d0df00000000, 0x5300b0e200000000, 0x042fc1c100000000, + 0xb406a1fc00000000, 0x647c01bb00000000, 0xd455618600000000, + 0xc489413400000000, 0x74a0210900000000, 0xa4da814e00000000, + 0x14f3e17300000000, 0xc564b1f100000000, 0x754dd1cc00000000, + 0xa537718b00000000, 0x151e11b600000000, 0x05c2310400000000, + 0xb5eb513900000000, 0x6591f17e00000000, 0xd5b8914300000000, + 0x86b821a100000000, 0x3691419c00000000, 0xe6ebe1db00000000, + 0x56c281e600000000, 0x461ea15400000000, 0xf637c16900000000, + 0x264d612e00000000, 0x9664011300000000, 0x47f3519100000000, + 0xf7da31ac00000000, 0x27a091eb00000000, 0x9789f1d600000000, + 0x8755d16400000000, 0x377cb15900000000, 0xe706111e00000000, + 0x572f712300000000, 0x4958f35800000000, 0xf971936500000000, + 0x290b332200000000, 0x9922531f00000000, 0x89fe73ad00000000, + 0x39d7139000000000, 0xe9adb3d700000000, 0x5984d3ea00000000, + 0x8813836800000000, 0x383ae35500000000, 0xe840431200000000, + 0x5869232f00000000, 0x48b5039d00000000, 0xf89c63a000000000, + 0x28e6c3e700000000, 0x98cfa3da00000000, 0xcbcf133800000000, + 0x7be6730500000000, 0xab9cd34200000000, 0x1bb5b37f00000000, + 0x0b6993cd00000000, 0xbb40f3f000000000, 0x6b3a53b700000000, + 0xdb13338a00000000, 0x0a84630800000000, 0xbaad033500000000, + 0x6ad7a37200000000, 0xdafec34f00000000, 0xca22e3fd00000000, + 0x7a0b83c000000000, 0xaa71238700000000, 0x1a5843ba00000000, + 0x4d77329900000000, 0xfd5e52a400000000, 0x2d24f2e300000000, + 0x9d0d92de00000000, 0x8dd1b26c00000000, 0x3df8d25100000000, + 0xed82721600000000, 0x5dab122b00000000, 0x8c3c42a900000000, + 0x3c15229400000000, 0xec6f82d300000000, 0x5c46e2ee00000000, + 0x4c9ac25c00000000, 0xfcb3a26100000000, 0x2cc9022600000000, + 0x9ce0621b00000000, 0xcfe0d2f900000000, 0x7fc9b2c400000000, + 0xafb3128300000000, 0x1f9a72be00000000, 0x0f46520c00000000, + 0xbf6f323100000000, 0x6f15927600000000, 0xdf3cf24b00000000, + 0x0eaba2c900000000, 0xbe82c2f400000000, 0x6ef862b300000000, + 0xded1028e00000000, 0xce0d223c00000000, 0x7e24420100000000, + 0xae5ee24600000000, 0x1e77827b00000000, 0x92b0e6b100000000, + 0x2299868c00000000, 0xf2e326cb00000000, 0x42ca46f600000000, + 0x5216664400000000, 0xe23f067900000000, 0x3245a63e00000000, + 0x826cc60300000000, 0x53fb968100000000, 0xe3d2f6bc00000000, + 0x33a856fb00000000, 0x838136c600000000, 0x935d167400000000, + 0x2374764900000000, 0xf30ed60e00000000, 0x4327b63300000000, + 0x102706d100000000, 0xa00e66ec00000000, 0x7074c6ab00000000, + 0xc05da69600000000, 0xd081862400000000, 0x60a8e61900000000, + 0xb0d2465e00000000, 0x00fb266300000000, 0xd16c76e100000000, + 0x614516dc00000000, 0xb13fb69b00000000, 0x0116d6a600000000, + 0x11caf61400000000, 0xa1e3962900000000, 0x7199366e00000000, + 0xc1b0565300000000, 0x969f277000000000, 0x26b6474d00000000, + 0xf6cce70a00000000, 0x46e5873700000000, 0x5639a78500000000, + 0xe610c7b800000000, 0x366a67ff00000000, 0x864307c200000000, + 0x57d4574000000000, 0xe7fd377d00000000, 0x3787973a00000000, + 0x87aef70700000000, 0x9772d7b500000000, 0x275bb78800000000, + 0xf72117cf00000000, 0x470877f200000000, 0x1408c71000000000, + 0xa421a72d00000000, 0x745b076a00000000, 0xc472675700000000, + 0xd4ae47e500000000, 0x648727d800000000, 0xb4fd879f00000000, + 0x04d4e7a200000000, 0xd543b72000000000, 0x656ad71d00000000, + 0xb510775a00000000, 0x0539176700000000, 0x15e537d500000000, + 0xa5cc57e800000000, 0x75b6f7af00000000, 0xc59f979200000000, + 0xdbe815e900000000, 0x6bc175d400000000, 0xbbbbd59300000000, + 0x0b92b5ae00000000, 0x1b4e951c00000000, 0xab67f52100000000, + 0x7b1d556600000000, 0xcb34355b00000000, 0x1aa365d900000000, + 0xaa8a05e400000000, 0x7af0a5a300000000, 0xcad9c59e00000000, + 0xda05e52c00000000, 0x6a2c851100000000, 0xba56255600000000, + 0x0a7f456b00000000, 0x597ff58900000000, 0xe95695b400000000, + 0x392c35f300000000, 0x890555ce00000000, 0x99d9757c00000000, + 0x29f0154100000000, 0xf98ab50600000000, 0x49a3d53b00000000, + 0x983485b900000000, 0x281de58400000000, 0xf86745c300000000, + 0x484e25fe00000000, 0x5892054c00000000, 0xe8bb657100000000, + 0x38c1c53600000000, 0x88e8a50b00000000, 0xdfc7d42800000000, + 0x6feeb41500000000, 0xbf94145200000000, 0x0fbd746f00000000, + 0x1f6154dd00000000, 0xaf4834e000000000, 0x7f3294a700000000, + 0xcf1bf49a00000000, 0x1e8ca41800000000, 0xaea5c42500000000, + 0x7edf646200000000, 0xcef6045f00000000, 0xde2a24ed00000000, + 0x6e0344d000000000, 0xbe79e49700000000, 0x0e5084aa00000000, + 0x5d50344800000000, 0xed79547500000000, 0x3d03f43200000000, + 0x8d2a940f00000000, 0x9df6b4bd00000000, 0x2ddfd48000000000, + 0xfda574c700000000, 0x4d8c14fa00000000, 0x9c1b447800000000, + 0x2c32244500000000, 0xfc48840200000000, 0x4c61e43f00000000, + 0x5cbdc48d00000000, 0xec94a4b000000000, 0x3cee04f700000000, + 0x8cc764ca00000000}, + {0x0000000000000000, 0xa5d35ccb00000000, 0x0ba1c84d00000000, + 0xae72948600000000, 0x1642919b00000000, 0xb391cd5000000000, + 0x1de359d600000000, 0xb830051d00000000, 0x6d8253ec00000000, + 0xc8510f2700000000, 0x66239ba100000000, 0xc3f0c76a00000000, + 0x7bc0c27700000000, 0xde139ebc00000000, 0x70610a3a00000000, + 0xd5b256f100000000, 0x9b02d60300000000, 0x3ed18ac800000000, + 0x90a31e4e00000000, 0x3570428500000000, 0x8d40479800000000, + 0x28931b5300000000, 0x86e18fd500000000, 0x2332d31e00000000, + 0xf68085ef00000000, 0x5353d92400000000, 0xfd214da200000000, + 0x58f2116900000000, 0xe0c2147400000000, 0x451148bf00000000, + 0xeb63dc3900000000, 0x4eb080f200000000, 0x3605ac0700000000, + 0x93d6f0cc00000000, 0x3da4644a00000000, 0x9877388100000000, + 0x20473d9c00000000, 0x8594615700000000, 0x2be6f5d100000000, + 0x8e35a91a00000000, 0x5b87ffeb00000000, 0xfe54a32000000000, + 0x502637a600000000, 0xf5f56b6d00000000, 0x4dc56e7000000000, + 0xe81632bb00000000, 0x4664a63d00000000, 0xe3b7faf600000000, + 0xad077a0400000000, 0x08d426cf00000000, 0xa6a6b24900000000, + 0x0375ee8200000000, 0xbb45eb9f00000000, 0x1e96b75400000000, + 0xb0e423d200000000, 0x15377f1900000000, 0xc08529e800000000, + 0x6556752300000000, 0xcb24e1a500000000, 0x6ef7bd6e00000000, + 0xd6c7b87300000000, 0x7314e4b800000000, 0xdd66703e00000000, + 0x78b52cf500000000, 0x6c0a580f00000000, 0xc9d904c400000000, + 0x67ab904200000000, 0xc278cc8900000000, 0x7a48c99400000000, + 0xdf9b955f00000000, 0x71e901d900000000, 0xd43a5d1200000000, + 0x01880be300000000, 0xa45b572800000000, 0x0a29c3ae00000000, + 0xaffa9f6500000000, 0x17ca9a7800000000, 0xb219c6b300000000, + 0x1c6b523500000000, 0xb9b80efe00000000, 0xf7088e0c00000000, + 0x52dbd2c700000000, 0xfca9464100000000, 0x597a1a8a00000000, + 0xe14a1f9700000000, 0x4499435c00000000, 0xeaebd7da00000000, + 0x4f388b1100000000, 0x9a8adde000000000, 0x3f59812b00000000, + 0x912b15ad00000000, 0x34f8496600000000, 0x8cc84c7b00000000, + 0x291b10b000000000, 0x8769843600000000, 0x22bad8fd00000000, + 0x5a0ff40800000000, 0xffdca8c300000000, 0x51ae3c4500000000, + 0xf47d608e00000000, 0x4c4d659300000000, 0xe99e395800000000, + 0x47ecadde00000000, 0xe23ff11500000000, 0x378da7e400000000, + 0x925efb2f00000000, 0x3c2c6fa900000000, 0x99ff336200000000, + 0x21cf367f00000000, 0x841c6ab400000000, 0x2a6efe3200000000, + 0x8fbda2f900000000, 0xc10d220b00000000, 0x64de7ec000000000, + 0xcaacea4600000000, 0x6f7fb68d00000000, 0xd74fb39000000000, + 0x729cef5b00000000, 0xdcee7bdd00000000, 0x793d271600000000, + 0xac8f71e700000000, 0x095c2d2c00000000, 0xa72eb9aa00000000, + 0x02fde56100000000, 0xbacde07c00000000, 0x1f1ebcb700000000, + 0xb16c283100000000, 0x14bf74fa00000000, 0xd814b01e00000000, + 0x7dc7ecd500000000, 0xd3b5785300000000, 0x7666249800000000, + 0xce56218500000000, 0x6b857d4e00000000, 0xc5f7e9c800000000, + 0x6024b50300000000, 0xb596e3f200000000, 0x1045bf3900000000, + 0xbe372bbf00000000, 0x1be4777400000000, 0xa3d4726900000000, + 0x06072ea200000000, 0xa875ba2400000000, 0x0da6e6ef00000000, + 0x4316661d00000000, 0xe6c53ad600000000, 0x48b7ae5000000000, + 0xed64f29b00000000, 0x5554f78600000000, 0xf087ab4d00000000, + 0x5ef53fcb00000000, 0xfb26630000000000, 0x2e9435f100000000, + 0x8b47693a00000000, 0x2535fdbc00000000, 0x80e6a17700000000, + 0x38d6a46a00000000, 0x9d05f8a100000000, 0x33776c2700000000, + 0x96a430ec00000000, 0xee111c1900000000, 0x4bc240d200000000, + 0xe5b0d45400000000, 0x4063889f00000000, 0xf8538d8200000000, + 0x5d80d14900000000, 0xf3f245cf00000000, 0x5621190400000000, + 0x83934ff500000000, 0x2640133e00000000, 0x883287b800000000, + 0x2de1db7300000000, 0x95d1de6e00000000, 0x300282a500000000, + 0x9e70162300000000, 0x3ba34ae800000000, 0x7513ca1a00000000, + 0xd0c096d100000000, 0x7eb2025700000000, 0xdb615e9c00000000, + 0x63515b8100000000, 0xc682074a00000000, 0x68f093cc00000000, + 0xcd23cf0700000000, 0x189199f600000000, 0xbd42c53d00000000, + 0x133051bb00000000, 0xb6e30d7000000000, 0x0ed3086d00000000, + 0xab0054a600000000, 0x0572c02000000000, 0xa0a19ceb00000000, + 0xb41ee81100000000, 0x11cdb4da00000000, 0xbfbf205c00000000, + 0x1a6c7c9700000000, 0xa25c798a00000000, 0x078f254100000000, + 0xa9fdb1c700000000, 0x0c2eed0c00000000, 0xd99cbbfd00000000, + 0x7c4fe73600000000, 0xd23d73b000000000, 0x77ee2f7b00000000, + 0xcfde2a6600000000, 0x6a0d76ad00000000, 0xc47fe22b00000000, + 0x61acbee000000000, 0x2f1c3e1200000000, 0x8acf62d900000000, + 0x24bdf65f00000000, 0x816eaa9400000000, 0x395eaf8900000000, + 0x9c8df34200000000, 0x32ff67c400000000, 0x972c3b0f00000000, + 0x429e6dfe00000000, 0xe74d313500000000, 0x493fa5b300000000, + 0xececf97800000000, 0x54dcfc6500000000, 0xf10fa0ae00000000, + 0x5f7d342800000000, 0xfaae68e300000000, 0x821b441600000000, + 0x27c818dd00000000, 0x89ba8c5b00000000, 0x2c69d09000000000, + 0x9459d58d00000000, 0x318a894600000000, 0x9ff81dc000000000, + 0x3a2b410b00000000, 0xef9917fa00000000, 0x4a4a4b3100000000, + 0xe438dfb700000000, 0x41eb837c00000000, 0xf9db866100000000, + 0x5c08daaa00000000, 0xf27a4e2c00000000, 0x57a912e700000000, + 0x1919921500000000, 0xbccacede00000000, 0x12b85a5800000000, + 0xb76b069300000000, 0x0f5b038e00000000, 0xaa885f4500000000, + 0x04facbc300000000, 0xa129970800000000, 0x749bc1f900000000, + 0xd1489d3200000000, 0x7f3a09b400000000, 0xdae9557f00000000, + 0x62d9506200000000, 0xc70a0ca900000000, 0x6978982f00000000, + 0xccabc4e400000000}, + {0x0000000000000000, 0xb40b77a600000000, 0x29119f9700000000, + 0x9d1ae83100000000, 0x13244ff400000000, 0xa72f385200000000, + 0x3a35d06300000000, 0x8e3ea7c500000000, 0x674eef3300000000, + 0xd345989500000000, 0x4e5f70a400000000, 0xfa54070200000000, + 0x746aa0c700000000, 0xc061d76100000000, 0x5d7b3f5000000000, + 0xe97048f600000000, 0xce9cde6700000000, 0x7a97a9c100000000, + 0xe78d41f000000000, 0x5386365600000000, 0xddb8919300000000, + 0x69b3e63500000000, 0xf4a90e0400000000, 0x40a279a200000000, + 0xa9d2315400000000, 0x1dd946f200000000, 0x80c3aec300000000, + 0x34c8d96500000000, 0xbaf67ea000000000, 0x0efd090600000000, + 0x93e7e13700000000, 0x27ec969100000000, 0x9c39bdcf00000000, + 0x2832ca6900000000, 0xb528225800000000, 0x012355fe00000000, + 0x8f1df23b00000000, 0x3b16859d00000000, 0xa60c6dac00000000, + 0x12071a0a00000000, 0xfb7752fc00000000, 0x4f7c255a00000000, + 0xd266cd6b00000000, 0x666dbacd00000000, 0xe8531d0800000000, + 0x5c586aae00000000, 0xc142829f00000000, 0x7549f53900000000, + 0x52a563a800000000, 0xe6ae140e00000000, 0x7bb4fc3f00000000, + 0xcfbf8b9900000000, 0x41812c5c00000000, 0xf58a5bfa00000000, + 0x6890b3cb00000000, 0xdc9bc46d00000000, 0x35eb8c9b00000000, + 0x81e0fb3d00000000, 0x1cfa130c00000000, 0xa8f164aa00000000, + 0x26cfc36f00000000, 0x92c4b4c900000000, 0x0fde5cf800000000, + 0xbbd52b5e00000000, 0x79750b4400000000, 0xcd7e7ce200000000, + 0x506494d300000000, 0xe46fe37500000000, 0x6a5144b000000000, + 0xde5a331600000000, 0x4340db2700000000, 0xf74bac8100000000, + 0x1e3be47700000000, 0xaa3093d100000000, 0x372a7be000000000, + 0x83210c4600000000, 0x0d1fab8300000000, 0xb914dc2500000000, + 0x240e341400000000, 0x900543b200000000, 0xb7e9d52300000000, + 0x03e2a28500000000, 0x9ef84ab400000000, 0x2af33d1200000000, + 0xa4cd9ad700000000, 0x10c6ed7100000000, 0x8ddc054000000000, + 0x39d772e600000000, 0xd0a73a1000000000, 0x64ac4db600000000, + 0xf9b6a58700000000, 0x4dbdd22100000000, 0xc38375e400000000, + 0x7788024200000000, 0xea92ea7300000000, 0x5e999dd500000000, + 0xe54cb68b00000000, 0x5147c12d00000000, 0xcc5d291c00000000, + 0x78565eba00000000, 0xf668f97f00000000, 0x42638ed900000000, + 0xdf7966e800000000, 0x6b72114e00000000, 0x820259b800000000, + 0x36092e1e00000000, 0xab13c62f00000000, 0x1f18b18900000000, + 0x9126164c00000000, 0x252d61ea00000000, 0xb83789db00000000, + 0x0c3cfe7d00000000, 0x2bd068ec00000000, 0x9fdb1f4a00000000, + 0x02c1f77b00000000, 0xb6ca80dd00000000, 0x38f4271800000000, + 0x8cff50be00000000, 0x11e5b88f00000000, 0xa5eecf2900000000, + 0x4c9e87df00000000, 0xf895f07900000000, 0x658f184800000000, + 0xd1846fee00000000, 0x5fbac82b00000000, 0xebb1bf8d00000000, + 0x76ab57bc00000000, 0xc2a0201a00000000, 0xf2ea168800000000, + 0x46e1612e00000000, 0xdbfb891f00000000, 0x6ff0feb900000000, + 0xe1ce597c00000000, 0x55c52eda00000000, 0xc8dfc6eb00000000, + 0x7cd4b14d00000000, 0x95a4f9bb00000000, 0x21af8e1d00000000, + 0xbcb5662c00000000, 0x08be118a00000000, 0x8680b64f00000000, + 0x328bc1e900000000, 0xaf9129d800000000, 0x1b9a5e7e00000000, + 0x3c76c8ef00000000, 0x887dbf4900000000, 0x1567577800000000, + 0xa16c20de00000000, 0x2f52871b00000000, 0x9b59f0bd00000000, + 0x0643188c00000000, 0xb2486f2a00000000, 0x5b3827dc00000000, + 0xef33507a00000000, 0x7229b84b00000000, 0xc622cfed00000000, + 0x481c682800000000, 0xfc171f8e00000000, 0x610df7bf00000000, + 0xd506801900000000, 0x6ed3ab4700000000, 0xdad8dce100000000, + 0x47c234d000000000, 0xf3c9437600000000, 0x7df7e4b300000000, + 0xc9fc931500000000, 0x54e67b2400000000, 0xe0ed0c8200000000, + 0x099d447400000000, 0xbd9633d200000000, 0x208cdbe300000000, + 0x9487ac4500000000, 0x1ab90b8000000000, 0xaeb27c2600000000, + 0x33a8941700000000, 0x87a3e3b100000000, 0xa04f752000000000, + 0x1444028600000000, 0x895eeab700000000, 0x3d559d1100000000, + 0xb36b3ad400000000, 0x07604d7200000000, 0x9a7aa54300000000, + 0x2e71d2e500000000, 0xc7019a1300000000, 0x730aedb500000000, + 0xee10058400000000, 0x5a1b722200000000, 0xd425d5e700000000, + 0x602ea24100000000, 0xfd344a7000000000, 0x493f3dd600000000, + 0x8b9f1dcc00000000, 0x3f946a6a00000000, 0xa28e825b00000000, + 0x1685f5fd00000000, 0x98bb523800000000, 0x2cb0259e00000000, + 0xb1aacdaf00000000, 0x05a1ba0900000000, 0xecd1f2ff00000000, + 0x58da855900000000, 0xc5c06d6800000000, 0x71cb1ace00000000, + 0xfff5bd0b00000000, 0x4bfecaad00000000, 0xd6e4229c00000000, + 0x62ef553a00000000, 0x4503c3ab00000000, 0xf108b40d00000000, + 0x6c125c3c00000000, 0xd8192b9a00000000, 0x56278c5f00000000, + 0xe22cfbf900000000, 0x7f3613c800000000, 0xcb3d646e00000000, + 0x224d2c9800000000, 0x96465b3e00000000, 0x0b5cb30f00000000, + 0xbf57c4a900000000, 0x3169636c00000000, 0x856214ca00000000, + 0x1878fcfb00000000, 0xac738b5d00000000, 0x17a6a00300000000, + 0xa3add7a500000000, 0x3eb73f9400000000, 0x8abc483200000000, + 0x0482eff700000000, 0xb089985100000000, 0x2d93706000000000, + 0x999807c600000000, 0x70e84f3000000000, 0xc4e3389600000000, + 0x59f9d0a700000000, 0xedf2a70100000000, 0x63cc00c400000000, + 0xd7c7776200000000, 0x4add9f5300000000, 0xfed6e8f500000000, + 0xd93a7e6400000000, 0x6d3109c200000000, 0xf02be1f300000000, + 0x4420965500000000, 0xca1e319000000000, 0x7e15463600000000, + 0xe30fae0700000000, 0x5704d9a100000000, 0xbe74915700000000, + 0x0a7fe6f100000000, 0x97650ec000000000, 0x236e796600000000, + 0xad50dea300000000, 0x195ba90500000000, 0x8441413400000000, + 0x304a369200000000}, + {0x0000000000000000, 0x9e00aacc00000000, 0x7d07254200000000, + 0xe3078f8e00000000, 0xfa0e4a8400000000, 0x640ee04800000000, + 0x87096fc600000000, 0x1909c50a00000000, 0xb51be5d300000000, + 0x2b1b4f1f00000000, 0xc81cc09100000000, 0x561c6a5d00000000, + 0x4f15af5700000000, 0xd115059b00000000, 0x32128a1500000000, + 0xac1220d900000000, 0x2b31bb7c00000000, 0xb53111b000000000, + 0x56369e3e00000000, 0xc83634f200000000, 0xd13ff1f800000000, + 0x4f3f5b3400000000, 0xac38d4ba00000000, 0x32387e7600000000, + 0x9e2a5eaf00000000, 0x002af46300000000, 0xe32d7bed00000000, + 0x7d2dd12100000000, 0x6424142b00000000, 0xfa24bee700000000, + 0x1923316900000000, 0x87239ba500000000, 0x566276f900000000, + 0xc862dc3500000000, 0x2b6553bb00000000, 0xb565f97700000000, + 0xac6c3c7d00000000, 0x326c96b100000000, 0xd16b193f00000000, + 0x4f6bb3f300000000, 0xe379932a00000000, 0x7d7939e600000000, + 0x9e7eb66800000000, 0x007e1ca400000000, 0x1977d9ae00000000, + 0x8777736200000000, 0x6470fcec00000000, 0xfa70562000000000, + 0x7d53cd8500000000, 0xe353674900000000, 0x0054e8c700000000, + 0x9e54420b00000000, 0x875d870100000000, 0x195d2dcd00000000, + 0xfa5aa24300000000, 0x645a088f00000000, 0xc848285600000000, + 0x5648829a00000000, 0xb54f0d1400000000, 0x2b4fa7d800000000, + 0x324662d200000000, 0xac46c81e00000000, 0x4f41479000000000, + 0xd141ed5c00000000, 0xedc29d2900000000, 0x73c237e500000000, + 0x90c5b86b00000000, 0x0ec512a700000000, 0x17ccd7ad00000000, + 0x89cc7d6100000000, 0x6acbf2ef00000000, 0xf4cb582300000000, + 0x58d978fa00000000, 0xc6d9d23600000000, 0x25de5db800000000, + 0xbbdef77400000000, 0xa2d7327e00000000, 0x3cd798b200000000, + 0xdfd0173c00000000, 0x41d0bdf000000000, 0xc6f3265500000000, + 0x58f38c9900000000, 0xbbf4031700000000, 0x25f4a9db00000000, + 0x3cfd6cd100000000, 0xa2fdc61d00000000, 0x41fa499300000000, + 0xdffae35f00000000, 0x73e8c38600000000, 0xede8694a00000000, + 0x0eefe6c400000000, 0x90ef4c0800000000, 0x89e6890200000000, + 0x17e623ce00000000, 0xf4e1ac4000000000, 0x6ae1068c00000000, + 0xbba0ebd000000000, 0x25a0411c00000000, 0xc6a7ce9200000000, + 0x58a7645e00000000, 0x41aea15400000000, 0xdfae0b9800000000, + 0x3ca9841600000000, 0xa2a92eda00000000, 0x0ebb0e0300000000, + 0x90bba4cf00000000, 0x73bc2b4100000000, 0xedbc818d00000000, + 0xf4b5448700000000, 0x6ab5ee4b00000000, 0x89b261c500000000, + 0x17b2cb0900000000, 0x909150ac00000000, 0x0e91fa6000000000, + 0xed9675ee00000000, 0x7396df2200000000, 0x6a9f1a2800000000, + 0xf49fb0e400000000, 0x17983f6a00000000, 0x899895a600000000, + 0x258ab57f00000000, 0xbb8a1fb300000000, 0x588d903d00000000, + 0xc68d3af100000000, 0xdf84fffb00000000, 0x4184553700000000, + 0xa283dab900000000, 0x3c83707500000000, 0xda853b5300000000, + 0x4485919f00000000, 0xa7821e1100000000, 0x3982b4dd00000000, + 0x208b71d700000000, 0xbe8bdb1b00000000, 0x5d8c549500000000, + 0xc38cfe5900000000, 0x6f9ede8000000000, 0xf19e744c00000000, + 0x1299fbc200000000, 0x8c99510e00000000, 0x9590940400000000, + 0x0b903ec800000000, 0xe897b14600000000, 0x76971b8a00000000, + 0xf1b4802f00000000, 0x6fb42ae300000000, 0x8cb3a56d00000000, + 0x12b30fa100000000, 0x0bbacaab00000000, 0x95ba606700000000, + 0x76bdefe900000000, 0xe8bd452500000000, 0x44af65fc00000000, + 0xdaafcf3000000000, 0x39a840be00000000, 0xa7a8ea7200000000, + 0xbea12f7800000000, 0x20a185b400000000, 0xc3a60a3a00000000, + 0x5da6a0f600000000, 0x8ce74daa00000000, 0x12e7e76600000000, + 0xf1e068e800000000, 0x6fe0c22400000000, 0x76e9072e00000000, + 0xe8e9ade200000000, 0x0bee226c00000000, 0x95ee88a000000000, + 0x39fca87900000000, 0xa7fc02b500000000, 0x44fb8d3b00000000, + 0xdafb27f700000000, 0xc3f2e2fd00000000, 0x5df2483100000000, + 0xbef5c7bf00000000, 0x20f56d7300000000, 0xa7d6f6d600000000, + 0x39d65c1a00000000, 0xdad1d39400000000, 0x44d1795800000000, + 0x5dd8bc5200000000, 0xc3d8169e00000000, 0x20df991000000000, + 0xbedf33dc00000000, 0x12cd130500000000, 0x8ccdb9c900000000, + 0x6fca364700000000, 0xf1ca9c8b00000000, 0xe8c3598100000000, + 0x76c3f34d00000000, 0x95c47cc300000000, 0x0bc4d60f00000000, + 0x3747a67a00000000, 0xa9470cb600000000, 0x4a40833800000000, + 0xd44029f400000000, 0xcd49ecfe00000000, 0x5349463200000000, + 0xb04ec9bc00000000, 0x2e4e637000000000, 0x825c43a900000000, + 0x1c5ce96500000000, 0xff5b66eb00000000, 0x615bcc2700000000, + 0x7852092d00000000, 0xe652a3e100000000, 0x05552c6f00000000, + 0x9b5586a300000000, 0x1c761d0600000000, 0x8276b7ca00000000, + 0x6171384400000000, 0xff71928800000000, 0xe678578200000000, + 0x7878fd4e00000000, 0x9b7f72c000000000, 0x057fd80c00000000, + 0xa96df8d500000000, 0x376d521900000000, 0xd46add9700000000, + 0x4a6a775b00000000, 0x5363b25100000000, 0xcd63189d00000000, + 0x2e64971300000000, 0xb0643ddf00000000, 0x6125d08300000000, + 0xff257a4f00000000, 0x1c22f5c100000000, 0x82225f0d00000000, + 0x9b2b9a0700000000, 0x052b30cb00000000, 0xe62cbf4500000000, + 0x782c158900000000, 0xd43e355000000000, 0x4a3e9f9c00000000, + 0xa939101200000000, 0x3739bade00000000, 0x2e307fd400000000, + 0xb030d51800000000, 0x53375a9600000000, 0xcd37f05a00000000, + 0x4a146bff00000000, 0xd414c13300000000, 0x37134ebd00000000, + 0xa913e47100000000, 0xb01a217b00000000, 0x2e1a8bb700000000, + 0xcd1d043900000000, 0x531daef500000000, 0xff0f8e2c00000000, + 0x610f24e000000000, 0x8208ab6e00000000, 0x1c0801a200000000, + 0x0501c4a800000000, 0x9b016e6400000000, 0x7806e1ea00000000, + 0xe6064b2600000000}}; + +#else /* W == 4 */ + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0xb8bc6765, 0xaa09c88b, 0x12b5afee, 0x8f629757, + 0x37def032, 0x256b5fdc, 0x9dd738b9, 0xc5b428ef, 0x7d084f8a, + 0x6fbde064, 0xd7018701, 0x4ad6bfb8, 0xf26ad8dd, 0xe0df7733, + 0x58631056, 0x5019579f, 0xe8a530fa, 0xfa109f14, 0x42acf871, + 0xdf7bc0c8, 0x67c7a7ad, 0x75720843, 0xcdce6f26, 0x95ad7f70, + 0x2d111815, 0x3fa4b7fb, 0x8718d09e, 0x1acfe827, 0xa2738f42, + 0xb0c620ac, 0x087a47c9, 0xa032af3e, 0x188ec85b, 0x0a3b67b5, + 0xb28700d0, 0x2f503869, 0x97ec5f0c, 0x8559f0e2, 0x3de59787, + 0x658687d1, 0xdd3ae0b4, 0xcf8f4f5a, 0x7733283f, 0xeae41086, + 0x525877e3, 0x40edd80d, 0xf851bf68, 0xf02bf8a1, 0x48979fc4, + 0x5a22302a, 0xe29e574f, 0x7f496ff6, 0xc7f50893, 0xd540a77d, + 0x6dfcc018, 0x359fd04e, 0x8d23b72b, 0x9f9618c5, 0x272a7fa0, + 0xbafd4719, 0x0241207c, 0x10f48f92, 0xa848e8f7, 0x9b14583d, + 0x23a83f58, 0x311d90b6, 0x89a1f7d3, 0x1476cf6a, 0xaccaa80f, + 0xbe7f07e1, 0x06c36084, 0x5ea070d2, 0xe61c17b7, 0xf4a9b859, + 0x4c15df3c, 0xd1c2e785, 0x697e80e0, 0x7bcb2f0e, 0xc377486b, + 0xcb0d0fa2, 0x73b168c7, 0x6104c729, 0xd9b8a04c, 0x446f98f5, + 0xfcd3ff90, 0xee66507e, 0x56da371b, 0x0eb9274d, 0xb6054028, + 0xa4b0efc6, 0x1c0c88a3, 0x81dbb01a, 0x3967d77f, 0x2bd27891, + 0x936e1ff4, 0x3b26f703, 0x839a9066, 0x912f3f88, 0x299358ed, + 0xb4446054, 0x0cf80731, 0x1e4da8df, 0xa6f1cfba, 0xfe92dfec, + 0x462eb889, 0x549b1767, 0xec277002, 0x71f048bb, 0xc94c2fde, + 0xdbf98030, 0x6345e755, 0x6b3fa09c, 0xd383c7f9, 0xc1366817, + 0x798a0f72, 0xe45d37cb, 0x5ce150ae, 0x4e54ff40, 0xf6e89825, + 0xae8b8873, 0x1637ef16, 0x048240f8, 0xbc3e279d, 0x21e91f24, + 0x99557841, 0x8be0d7af, 0x335cb0ca, 0xed59b63b, 0x55e5d15e, + 0x47507eb0, 0xffec19d5, 0x623b216c, 0xda874609, 0xc832e9e7, + 0x708e8e82, 0x28ed9ed4, 0x9051f9b1, 0x82e4565f, 0x3a58313a, + 0xa78f0983, 0x1f336ee6, 0x0d86c108, 0xb53aa66d, 0xbd40e1a4, + 0x05fc86c1, 0x1749292f, 0xaff54e4a, 0x322276f3, 0x8a9e1196, + 0x982bbe78, 0x2097d91d, 0x78f4c94b, 0xc048ae2e, 0xd2fd01c0, + 0x6a4166a5, 0xf7965e1c, 0x4f2a3979, 0x5d9f9697, 0xe523f1f2, + 0x4d6b1905, 0xf5d77e60, 0xe762d18e, 0x5fdeb6eb, 0xc2098e52, + 0x7ab5e937, 0x680046d9, 0xd0bc21bc, 0x88df31ea, 0x3063568f, + 0x22d6f961, 0x9a6a9e04, 0x07bda6bd, 0xbf01c1d8, 0xadb46e36, + 0x15080953, 0x1d724e9a, 0xa5ce29ff, 0xb77b8611, 0x0fc7e174, + 0x9210d9cd, 0x2aacbea8, 0x38191146, 0x80a57623, 0xd8c66675, + 0x607a0110, 0x72cfaefe, 0xca73c99b, 0x57a4f122, 0xef189647, + 0xfdad39a9, 0x45115ecc, 0x764dee06, 0xcef18963, 0xdc44268d, + 0x64f841e8, 0xf92f7951, 0x41931e34, 0x5326b1da, 0xeb9ad6bf, + 0xb3f9c6e9, 0x0b45a18c, 0x19f00e62, 0xa14c6907, 0x3c9b51be, + 0x842736db, 0x96929935, 0x2e2efe50, 0x2654b999, 0x9ee8defc, + 0x8c5d7112, 0x34e11677, 0xa9362ece, 0x118a49ab, 0x033fe645, + 0xbb838120, 0xe3e09176, 0x5b5cf613, 0x49e959fd, 0xf1553e98, + 0x6c820621, 0xd43e6144, 0xc68bceaa, 0x7e37a9cf, 0xd67f4138, + 0x6ec3265d, 0x7c7689b3, 0xc4caeed6, 0x591dd66f, 0xe1a1b10a, + 0xf3141ee4, 0x4ba87981, 0x13cb69d7, 0xab770eb2, 0xb9c2a15c, + 0x017ec639, 0x9ca9fe80, 0x241599e5, 0x36a0360b, 0x8e1c516e, + 0x866616a7, 0x3eda71c2, 0x2c6fde2c, 0x94d3b949, 0x090481f0, + 0xb1b8e695, 0xa30d497b, 0x1bb12e1e, 0x43d23e48, 0xfb6e592d, + 0xe9dbf6c3, 0x516791a6, 0xccb0a91f, 0x740cce7a, 0x66b96194, + 0xde0506f1}, + {0x00000000, 0x01c26a37, 0x0384d46e, 0x0246be59, 0x0709a8dc, + 0x06cbc2eb, 0x048d7cb2, 0x054f1685, 0x0e1351b8, 0x0fd13b8f, + 0x0d9785d6, 0x0c55efe1, 0x091af964, 0x08d89353, 0x0a9e2d0a, + 0x0b5c473d, 0x1c26a370, 0x1de4c947, 0x1fa2771e, 0x1e601d29, + 0x1b2f0bac, 0x1aed619b, 0x18abdfc2, 0x1969b5f5, 0x1235f2c8, + 0x13f798ff, 0x11b126a6, 0x10734c91, 0x153c5a14, 0x14fe3023, + 0x16b88e7a, 0x177ae44d, 0x384d46e0, 0x398f2cd7, 0x3bc9928e, + 0x3a0bf8b9, 0x3f44ee3c, 0x3e86840b, 0x3cc03a52, 0x3d025065, + 0x365e1758, 0x379c7d6f, 0x35dac336, 0x3418a901, 0x3157bf84, + 0x3095d5b3, 0x32d36bea, 0x331101dd, 0x246be590, 0x25a98fa7, + 0x27ef31fe, 0x262d5bc9, 0x23624d4c, 0x22a0277b, 0x20e69922, + 0x2124f315, 0x2a78b428, 0x2bbade1f, 0x29fc6046, 0x283e0a71, + 0x2d711cf4, 0x2cb376c3, 0x2ef5c89a, 0x2f37a2ad, 0x709a8dc0, + 0x7158e7f7, 0x731e59ae, 0x72dc3399, 0x7793251c, 0x76514f2b, + 0x7417f172, 0x75d59b45, 0x7e89dc78, 0x7f4bb64f, 0x7d0d0816, + 0x7ccf6221, 0x798074a4, 0x78421e93, 0x7a04a0ca, 0x7bc6cafd, + 0x6cbc2eb0, 0x6d7e4487, 0x6f38fade, 0x6efa90e9, 0x6bb5866c, + 0x6a77ec5b, 0x68315202, 0x69f33835, 0x62af7f08, 0x636d153f, + 0x612bab66, 0x60e9c151, 0x65a6d7d4, 0x6464bde3, 0x662203ba, + 0x67e0698d, 0x48d7cb20, 0x4915a117, 0x4b531f4e, 0x4a917579, + 0x4fde63fc, 0x4e1c09cb, 0x4c5ab792, 0x4d98dda5, 0x46c49a98, + 0x4706f0af, 0x45404ef6, 0x448224c1, 0x41cd3244, 0x400f5873, + 0x4249e62a, 0x438b8c1d, 0x54f16850, 0x55330267, 0x5775bc3e, + 0x56b7d609, 0x53f8c08c, 0x523aaabb, 0x507c14e2, 0x51be7ed5, + 0x5ae239e8, 0x5b2053df, 0x5966ed86, 0x58a487b1, 0x5deb9134, + 0x5c29fb03, 0x5e6f455a, 0x5fad2f6d, 0xe1351b80, 0xe0f771b7, + 0xe2b1cfee, 0xe373a5d9, 0xe63cb35c, 0xe7fed96b, 0xe5b86732, + 0xe47a0d05, 0xef264a38, 0xeee4200f, 0xeca29e56, 0xed60f461, + 0xe82fe2e4, 0xe9ed88d3, 0xebab368a, 0xea695cbd, 0xfd13b8f0, + 0xfcd1d2c7, 0xfe976c9e, 0xff5506a9, 0xfa1a102c, 0xfbd87a1b, + 0xf99ec442, 0xf85cae75, 0xf300e948, 0xf2c2837f, 0xf0843d26, + 0xf1465711, 0xf4094194, 0xf5cb2ba3, 0xf78d95fa, 0xf64fffcd, + 0xd9785d60, 0xd8ba3757, 0xdafc890e, 0xdb3ee339, 0xde71f5bc, + 0xdfb39f8b, 0xddf521d2, 0xdc374be5, 0xd76b0cd8, 0xd6a966ef, + 0xd4efd8b6, 0xd52db281, 0xd062a404, 0xd1a0ce33, 0xd3e6706a, + 0xd2241a5d, 0xc55efe10, 0xc49c9427, 0xc6da2a7e, 0xc7184049, + 0xc25756cc, 0xc3953cfb, 0xc1d382a2, 0xc011e895, 0xcb4dafa8, + 0xca8fc59f, 0xc8c97bc6, 0xc90b11f1, 0xcc440774, 0xcd866d43, + 0xcfc0d31a, 0xce02b92d, 0x91af9640, 0x906dfc77, 0x922b422e, + 0x93e92819, 0x96a63e9c, 0x976454ab, 0x9522eaf2, 0x94e080c5, + 0x9fbcc7f8, 0x9e7eadcf, 0x9c381396, 0x9dfa79a1, 0x98b56f24, + 0x99770513, 0x9b31bb4a, 0x9af3d17d, 0x8d893530, 0x8c4b5f07, + 0x8e0de15e, 0x8fcf8b69, 0x8a809dec, 0x8b42f7db, 0x89044982, + 0x88c623b5, 0x839a6488, 0x82580ebf, 0x801eb0e6, 0x81dcdad1, + 0x8493cc54, 0x8551a663, 0x8717183a, 0x86d5720d, 0xa9e2d0a0, + 0xa820ba97, 0xaa6604ce, 0xaba46ef9, 0xaeeb787c, 0xaf29124b, + 0xad6fac12, 0xacadc625, 0xa7f18118, 0xa633eb2f, 0xa4755576, + 0xa5b73f41, 0xa0f829c4, 0xa13a43f3, 0xa37cfdaa, 0xa2be979d, + 0xb5c473d0, 0xb40619e7, 0xb640a7be, 0xb782cd89, 0xb2cddb0c, + 0xb30fb13b, 0xb1490f62, 0xb08b6555, 0xbbd72268, 0xba15485f, + 0xb853f606, 0xb9919c31, 0xbcde8ab4, 0xbd1ce083, 0xbf5a5eda, + 0xbe9834ed}, + {0x00000000, 0x191b3141, 0x32366282, 0x2b2d53c3, 0x646cc504, + 0x7d77f445, 0x565aa786, 0x4f4196c7, 0xc8d98a08, 0xd1c2bb49, + 0xfaefe88a, 0xe3f4d9cb, 0xacb54f0c, 0xb5ae7e4d, 0x9e832d8e, + 0x87981ccf, 0x4ac21251, 0x53d92310, 0x78f470d3, 0x61ef4192, + 0x2eaed755, 0x37b5e614, 0x1c98b5d7, 0x05838496, 0x821b9859, + 0x9b00a918, 0xb02dfadb, 0xa936cb9a, 0xe6775d5d, 0xff6c6c1c, + 0xd4413fdf, 0xcd5a0e9e, 0x958424a2, 0x8c9f15e3, 0xa7b24620, + 0xbea97761, 0xf1e8e1a6, 0xe8f3d0e7, 0xc3de8324, 0xdac5b265, + 0x5d5daeaa, 0x44469feb, 0x6f6bcc28, 0x7670fd69, 0x39316bae, + 0x202a5aef, 0x0b07092c, 0x121c386d, 0xdf4636f3, 0xc65d07b2, + 0xed705471, 0xf46b6530, 0xbb2af3f7, 0xa231c2b6, 0x891c9175, + 0x9007a034, 0x179fbcfb, 0x0e848dba, 0x25a9de79, 0x3cb2ef38, + 0x73f379ff, 0x6ae848be, 0x41c51b7d, 0x58de2a3c, 0xf0794f05, + 0xe9627e44, 0xc24f2d87, 0xdb541cc6, 0x94158a01, 0x8d0ebb40, + 0xa623e883, 0xbf38d9c2, 0x38a0c50d, 0x21bbf44c, 0x0a96a78f, + 0x138d96ce, 0x5ccc0009, 0x45d73148, 0x6efa628b, 0x77e153ca, + 0xbabb5d54, 0xa3a06c15, 0x888d3fd6, 0x91960e97, 0xded79850, + 0xc7cca911, 0xece1fad2, 0xf5facb93, 0x7262d75c, 0x6b79e61d, + 0x4054b5de, 0x594f849f, 0x160e1258, 0x0f152319, 0x243870da, + 0x3d23419b, 0x65fd6ba7, 0x7ce65ae6, 0x57cb0925, 0x4ed03864, + 0x0191aea3, 0x188a9fe2, 0x33a7cc21, 0x2abcfd60, 0xad24e1af, + 0xb43fd0ee, 0x9f12832d, 0x8609b26c, 0xc94824ab, 0xd05315ea, + 0xfb7e4629, 0xe2657768, 0x2f3f79f6, 0x362448b7, 0x1d091b74, + 0x04122a35, 0x4b53bcf2, 0x52488db3, 0x7965de70, 0x607eef31, + 0xe7e6f3fe, 0xfefdc2bf, 0xd5d0917c, 0xcccba03d, 0x838a36fa, + 0x9a9107bb, 0xb1bc5478, 0xa8a76539, 0x3b83984b, 0x2298a90a, + 0x09b5fac9, 0x10aecb88, 0x5fef5d4f, 0x46f46c0e, 0x6dd93fcd, + 0x74c20e8c, 0xf35a1243, 0xea412302, 0xc16c70c1, 0xd8774180, + 0x9736d747, 0x8e2de606, 0xa500b5c5, 0xbc1b8484, 0x71418a1a, + 0x685abb5b, 0x4377e898, 0x5a6cd9d9, 0x152d4f1e, 0x0c367e5f, + 0x271b2d9c, 0x3e001cdd, 0xb9980012, 0xa0833153, 0x8bae6290, + 0x92b553d1, 0xddf4c516, 0xc4eff457, 0xefc2a794, 0xf6d996d5, + 0xae07bce9, 0xb71c8da8, 0x9c31de6b, 0x852aef2a, 0xca6b79ed, + 0xd37048ac, 0xf85d1b6f, 0xe1462a2e, 0x66de36e1, 0x7fc507a0, + 0x54e85463, 0x4df36522, 0x02b2f3e5, 0x1ba9c2a4, 0x30849167, + 0x299fa026, 0xe4c5aeb8, 0xfdde9ff9, 0xd6f3cc3a, 0xcfe8fd7b, + 0x80a96bbc, 0x99b25afd, 0xb29f093e, 0xab84387f, 0x2c1c24b0, + 0x350715f1, 0x1e2a4632, 0x07317773, 0x4870e1b4, 0x516bd0f5, + 0x7a468336, 0x635db277, 0xcbfad74e, 0xd2e1e60f, 0xf9ccb5cc, + 0xe0d7848d, 0xaf96124a, 0xb68d230b, 0x9da070c8, 0x84bb4189, + 0x03235d46, 0x1a386c07, 0x31153fc4, 0x280e0e85, 0x674f9842, + 0x7e54a903, 0x5579fac0, 0x4c62cb81, 0x8138c51f, 0x9823f45e, + 0xb30ea79d, 0xaa1596dc, 0xe554001b, 0xfc4f315a, 0xd7626299, + 0xce7953d8, 0x49e14f17, 0x50fa7e56, 0x7bd72d95, 0x62cc1cd4, + 0x2d8d8a13, 0x3496bb52, 0x1fbbe891, 0x06a0d9d0, 0x5e7ef3ec, + 0x4765c2ad, 0x6c48916e, 0x7553a02f, 0x3a1236e8, 0x230907a9, + 0x0824546a, 0x113f652b, 0x96a779e4, 0x8fbc48a5, 0xa4911b66, + 0xbd8a2a27, 0xf2cbbce0, 0xebd08da1, 0xc0fdde62, 0xd9e6ef23, + 0x14bce1bd, 0x0da7d0fc, 0x268a833f, 0x3f91b27e, 0x70d024b9, + 0x69cb15f8, 0x42e6463b, 0x5bfd777a, 0xdc656bb5, 0xc57e5af4, + 0xee530937, 0xf7483876, 0xb809aeb1, 0xa1129ff0, 0x8a3fcc33, + 0x9324fd72}, + {0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, + 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, + 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, + 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, + 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, + 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, + 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, + 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, + 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, + 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, + 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, + 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, + 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, + 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, + 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, + 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, + 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, + 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, + 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, + 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, + 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, + 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, + 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, + 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, + 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, + 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, + 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, + 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, + 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, + 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, + 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, + 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, + 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, + 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, + 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, + 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, + 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, + 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, + 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, + 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, + 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, + 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, + 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, + 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, + 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, + 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, + 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, + 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, + 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, + 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, + 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, + 0x2d02ef8d}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x00000000, 0x96300777, 0x2c610eee, 0xba510999, 0x19c46d07, + 0x8ff46a70, 0x35a563e9, 0xa395649e, 0x3288db0e, 0xa4b8dc79, + 0x1ee9d5e0, 0x88d9d297, 0x2b4cb609, 0xbd7cb17e, 0x072db8e7, + 0x911dbf90, 0x6410b71d, 0xf220b06a, 0x4871b9f3, 0xde41be84, + 0x7dd4da1a, 0xebe4dd6d, 0x51b5d4f4, 0xc785d383, 0x56986c13, + 0xc0a86b64, 0x7af962fd, 0xecc9658a, 0x4f5c0114, 0xd96c0663, + 0x633d0ffa, 0xf50d088d, 0xc8206e3b, 0x5e10694c, 0xe44160d5, + 0x727167a2, 0xd1e4033c, 0x47d4044b, 0xfd850dd2, 0x6bb50aa5, + 0xfaa8b535, 0x6c98b242, 0xd6c9bbdb, 0x40f9bcac, 0xe36cd832, + 0x755cdf45, 0xcf0dd6dc, 0x593dd1ab, 0xac30d926, 0x3a00de51, + 0x8051d7c8, 0x1661d0bf, 0xb5f4b421, 0x23c4b356, 0x9995bacf, + 0x0fa5bdb8, 0x9eb80228, 0x0888055f, 0xb2d90cc6, 0x24e90bb1, + 0x877c6f2f, 0x114c6858, 0xab1d61c1, 0x3d2d66b6, 0x9041dc76, + 0x0671db01, 0xbc20d298, 0x2a10d5ef, 0x8985b171, 0x1fb5b606, + 0xa5e4bf9f, 0x33d4b8e8, 0xa2c90778, 0x34f9000f, 0x8ea80996, + 0x18980ee1, 0xbb0d6a7f, 0x2d3d6d08, 0x976c6491, 0x015c63e6, + 0xf4516b6b, 0x62616c1c, 0xd8306585, 0x4e0062f2, 0xed95066c, + 0x7ba5011b, 0xc1f40882, 0x57c40ff5, 0xc6d9b065, 0x50e9b712, + 0xeab8be8b, 0x7c88b9fc, 0xdf1ddd62, 0x492dda15, 0xf37cd38c, + 0x654cd4fb, 0x5861b24d, 0xce51b53a, 0x7400bca3, 0xe230bbd4, + 0x41a5df4a, 0xd795d83d, 0x6dc4d1a4, 0xfbf4d6d3, 0x6ae96943, + 0xfcd96e34, 0x468867ad, 0xd0b860da, 0x732d0444, 0xe51d0333, + 0x5f4c0aaa, 0xc97c0ddd, 0x3c710550, 0xaa410227, 0x10100bbe, + 0x86200cc9, 0x25b56857, 0xb3856f20, 0x09d466b9, 0x9fe461ce, + 0x0ef9de5e, 0x98c9d929, 0x2298d0b0, 0xb4a8d7c7, 0x173db359, + 0x810db42e, 0x3b5cbdb7, 0xad6cbac0, 0x2083b8ed, 0xb6b3bf9a, + 0x0ce2b603, 0x9ad2b174, 0x3947d5ea, 0xaf77d29d, 0x1526db04, + 0x8316dc73, 0x120b63e3, 0x843b6494, 0x3e6a6d0d, 0xa85a6a7a, + 0x0bcf0ee4, 0x9dff0993, 0x27ae000a, 0xb19e077d, 0x44930ff0, + 0xd2a30887, 0x68f2011e, 0xfec20669, 0x5d5762f7, 0xcb676580, + 0x71366c19, 0xe7066b6e, 0x761bd4fe, 0xe02bd389, 0x5a7ada10, + 0xcc4add67, 0x6fdfb9f9, 0xf9efbe8e, 0x43beb717, 0xd58eb060, + 0xe8a3d6d6, 0x7e93d1a1, 0xc4c2d838, 0x52f2df4f, 0xf167bbd1, + 0x6757bca6, 0xdd06b53f, 0x4b36b248, 0xda2b0dd8, 0x4c1b0aaf, + 0xf64a0336, 0x607a0441, 0xc3ef60df, 0x55df67a8, 0xef8e6e31, + 0x79be6946, 0x8cb361cb, 0x1a8366bc, 0xa0d26f25, 0x36e26852, + 0x95770ccc, 0x03470bbb, 0xb9160222, 0x2f260555, 0xbe3bbac5, + 0x280bbdb2, 0x925ab42b, 0x046ab35c, 0xa7ffd7c2, 0x31cfd0b5, + 0x8b9ed92c, 0x1daede5b, 0xb0c2649b, 0x26f263ec, 0x9ca36a75, + 0x0a936d02, 0xa906099c, 0x3f360eeb, 0x85670772, 0x13570005, + 0x824abf95, 0x147ab8e2, 0xae2bb17b, 0x381bb60c, 0x9b8ed292, + 0x0dbed5e5, 0xb7efdc7c, 0x21dfdb0b, 0xd4d2d386, 0x42e2d4f1, + 0xf8b3dd68, 0x6e83da1f, 0xcd16be81, 0x5b26b9f6, 0xe177b06f, + 0x7747b718, 0xe65a0888, 0x706a0fff, 0xca3b0666, 0x5c0b0111, + 0xff9e658f, 0x69ae62f8, 0xd3ff6b61, 0x45cf6c16, 0x78e20aa0, + 0xeed20dd7, 0x5483044e, 0xc2b30339, 0x612667a7, 0xf71660d0, + 0x4d476949, 0xdb776e3e, 0x4a6ad1ae, 0xdc5ad6d9, 0x660bdf40, + 0xf03bd837, 0x53aebca9, 0xc59ebbde, 0x7fcfb247, 0xe9ffb530, + 0x1cf2bdbd, 0x8ac2baca, 0x3093b353, 0xa6a3b424, 0x0536d0ba, + 0x9306d7cd, 0x2957de54, 0xbf67d923, 0x2e7a66b3, 0xb84a61c4, + 0x021b685d, 0x942b6f2a, 0x37be0bb4, 0xa18e0cc3, 0x1bdf055a, + 0x8def022d}, + {0x00000000, 0x41311b19, 0x82623632, 0xc3532d2b, 0x04c56c64, + 0x45f4777d, 0x86a75a56, 0xc796414f, 0x088ad9c8, 0x49bbc2d1, + 0x8ae8effa, 0xcbd9f4e3, 0x0c4fb5ac, 0x4d7eaeb5, 0x8e2d839e, + 0xcf1c9887, 0x5112c24a, 0x1023d953, 0xd370f478, 0x9241ef61, + 0x55d7ae2e, 0x14e6b537, 0xd7b5981c, 0x96848305, 0x59981b82, + 0x18a9009b, 0xdbfa2db0, 0x9acb36a9, 0x5d5d77e6, 0x1c6c6cff, + 0xdf3f41d4, 0x9e0e5acd, 0xa2248495, 0xe3159f8c, 0x2046b2a7, + 0x6177a9be, 0xa6e1e8f1, 0xe7d0f3e8, 0x2483dec3, 0x65b2c5da, + 0xaaae5d5d, 0xeb9f4644, 0x28cc6b6f, 0x69fd7076, 0xae6b3139, + 0xef5a2a20, 0x2c09070b, 0x6d381c12, 0xf33646df, 0xb2075dc6, + 0x715470ed, 0x30656bf4, 0xf7f32abb, 0xb6c231a2, 0x75911c89, + 0x34a00790, 0xfbbc9f17, 0xba8d840e, 0x79dea925, 0x38efb23c, + 0xff79f373, 0xbe48e86a, 0x7d1bc541, 0x3c2ade58, 0x054f79f0, + 0x447e62e9, 0x872d4fc2, 0xc61c54db, 0x018a1594, 0x40bb0e8d, + 0x83e823a6, 0xc2d938bf, 0x0dc5a038, 0x4cf4bb21, 0x8fa7960a, + 0xce968d13, 0x0900cc5c, 0x4831d745, 0x8b62fa6e, 0xca53e177, + 0x545dbbba, 0x156ca0a3, 0xd63f8d88, 0x970e9691, 0x5098d7de, + 0x11a9ccc7, 0xd2fae1ec, 0x93cbfaf5, 0x5cd76272, 0x1de6796b, + 0xdeb55440, 0x9f844f59, 0x58120e16, 0x1923150f, 0xda703824, + 0x9b41233d, 0xa76bfd65, 0xe65ae67c, 0x2509cb57, 0x6438d04e, + 0xa3ae9101, 0xe29f8a18, 0x21cca733, 0x60fdbc2a, 0xafe124ad, + 0xeed03fb4, 0x2d83129f, 0x6cb20986, 0xab2448c9, 0xea1553d0, + 0x29467efb, 0x687765e2, 0xf6793f2f, 0xb7482436, 0x741b091d, + 0x352a1204, 0xf2bc534b, 0xb38d4852, 0x70de6579, 0x31ef7e60, + 0xfef3e6e7, 0xbfc2fdfe, 0x7c91d0d5, 0x3da0cbcc, 0xfa368a83, + 0xbb07919a, 0x7854bcb1, 0x3965a7a8, 0x4b98833b, 0x0aa99822, + 0xc9fab509, 0x88cbae10, 0x4f5def5f, 0x0e6cf446, 0xcd3fd96d, + 0x8c0ec274, 0x43125af3, 0x022341ea, 0xc1706cc1, 0x804177d8, + 0x47d73697, 0x06e62d8e, 0xc5b500a5, 0x84841bbc, 0x1a8a4171, + 0x5bbb5a68, 0x98e87743, 0xd9d96c5a, 0x1e4f2d15, 0x5f7e360c, + 0x9c2d1b27, 0xdd1c003e, 0x120098b9, 0x533183a0, 0x9062ae8b, + 0xd153b592, 0x16c5f4dd, 0x57f4efc4, 0x94a7c2ef, 0xd596d9f6, + 0xe9bc07ae, 0xa88d1cb7, 0x6bde319c, 0x2aef2a85, 0xed796bca, + 0xac4870d3, 0x6f1b5df8, 0x2e2a46e1, 0xe136de66, 0xa007c57f, + 0x6354e854, 0x2265f34d, 0xe5f3b202, 0xa4c2a91b, 0x67918430, + 0x26a09f29, 0xb8aec5e4, 0xf99fdefd, 0x3accf3d6, 0x7bfde8cf, + 0xbc6ba980, 0xfd5ab299, 0x3e099fb2, 0x7f3884ab, 0xb0241c2c, + 0xf1150735, 0x32462a1e, 0x73773107, 0xb4e17048, 0xf5d06b51, + 0x3683467a, 0x77b25d63, 0x4ed7facb, 0x0fe6e1d2, 0xccb5ccf9, + 0x8d84d7e0, 0x4a1296af, 0x0b238db6, 0xc870a09d, 0x8941bb84, + 0x465d2303, 0x076c381a, 0xc43f1531, 0x850e0e28, 0x42984f67, + 0x03a9547e, 0xc0fa7955, 0x81cb624c, 0x1fc53881, 0x5ef42398, + 0x9da70eb3, 0xdc9615aa, 0x1b0054e5, 0x5a314ffc, 0x996262d7, + 0xd85379ce, 0x174fe149, 0x567efa50, 0x952dd77b, 0xd41ccc62, + 0x138a8d2d, 0x52bb9634, 0x91e8bb1f, 0xd0d9a006, 0xecf37e5e, + 0xadc26547, 0x6e91486c, 0x2fa05375, 0xe836123a, 0xa9070923, + 0x6a542408, 0x2b653f11, 0xe479a796, 0xa548bc8f, 0x661b91a4, + 0x272a8abd, 0xe0bccbf2, 0xa18dd0eb, 0x62defdc0, 0x23efe6d9, + 0xbde1bc14, 0xfcd0a70d, 0x3f838a26, 0x7eb2913f, 0xb924d070, + 0xf815cb69, 0x3b46e642, 0x7a77fd5b, 0xb56b65dc, 0xf45a7ec5, + 0x370953ee, 0x763848f7, 0xb1ae09b8, 0xf09f12a1, 0x33cc3f8a, + 0x72fd2493}, + {0x00000000, 0x376ac201, 0x6ed48403, 0x59be4602, 0xdca80907, + 0xebc2cb06, 0xb27c8d04, 0x85164f05, 0xb851130e, 0x8f3bd10f, + 0xd685970d, 0xe1ef550c, 0x64f91a09, 0x5393d808, 0x0a2d9e0a, + 0x3d475c0b, 0x70a3261c, 0x47c9e41d, 0x1e77a21f, 0x291d601e, + 0xac0b2f1b, 0x9b61ed1a, 0xc2dfab18, 0xf5b56919, 0xc8f23512, + 0xff98f713, 0xa626b111, 0x914c7310, 0x145a3c15, 0x2330fe14, + 0x7a8eb816, 0x4de47a17, 0xe0464d38, 0xd72c8f39, 0x8e92c93b, + 0xb9f80b3a, 0x3cee443f, 0x0b84863e, 0x523ac03c, 0x6550023d, + 0x58175e36, 0x6f7d9c37, 0x36c3da35, 0x01a91834, 0x84bf5731, + 0xb3d59530, 0xea6bd332, 0xdd011133, 0x90e56b24, 0xa78fa925, + 0xfe31ef27, 0xc95b2d26, 0x4c4d6223, 0x7b27a022, 0x2299e620, + 0x15f32421, 0x28b4782a, 0x1fdeba2b, 0x4660fc29, 0x710a3e28, + 0xf41c712d, 0xc376b32c, 0x9ac8f52e, 0xada2372f, 0xc08d9a70, + 0xf7e75871, 0xae591e73, 0x9933dc72, 0x1c259377, 0x2b4f5176, + 0x72f11774, 0x459bd575, 0x78dc897e, 0x4fb64b7f, 0x16080d7d, + 0x2162cf7c, 0xa4748079, 0x931e4278, 0xcaa0047a, 0xfdcac67b, + 0xb02ebc6c, 0x87447e6d, 0xdefa386f, 0xe990fa6e, 0x6c86b56b, + 0x5bec776a, 0x02523168, 0x3538f369, 0x087faf62, 0x3f156d63, + 0x66ab2b61, 0x51c1e960, 0xd4d7a665, 0xe3bd6464, 0xba032266, + 0x8d69e067, 0x20cbd748, 0x17a11549, 0x4e1f534b, 0x7975914a, + 0xfc63de4f, 0xcb091c4e, 0x92b75a4c, 0xa5dd984d, 0x989ac446, + 0xaff00647, 0xf64e4045, 0xc1248244, 0x4432cd41, 0x73580f40, + 0x2ae64942, 0x1d8c8b43, 0x5068f154, 0x67023355, 0x3ebc7557, + 0x09d6b756, 0x8cc0f853, 0xbbaa3a52, 0xe2147c50, 0xd57ebe51, + 0xe839e25a, 0xdf53205b, 0x86ed6659, 0xb187a458, 0x3491eb5d, + 0x03fb295c, 0x5a456f5e, 0x6d2fad5f, 0x801b35e1, 0xb771f7e0, + 0xeecfb1e2, 0xd9a573e3, 0x5cb33ce6, 0x6bd9fee7, 0x3267b8e5, + 0x050d7ae4, 0x384a26ef, 0x0f20e4ee, 0x569ea2ec, 0x61f460ed, + 0xe4e22fe8, 0xd388ede9, 0x8a36abeb, 0xbd5c69ea, 0xf0b813fd, + 0xc7d2d1fc, 0x9e6c97fe, 0xa90655ff, 0x2c101afa, 0x1b7ad8fb, + 0x42c49ef9, 0x75ae5cf8, 0x48e900f3, 0x7f83c2f2, 0x263d84f0, + 0x115746f1, 0x944109f4, 0xa32bcbf5, 0xfa958df7, 0xcdff4ff6, + 0x605d78d9, 0x5737bad8, 0x0e89fcda, 0x39e33edb, 0xbcf571de, + 0x8b9fb3df, 0xd221f5dd, 0xe54b37dc, 0xd80c6bd7, 0xef66a9d6, + 0xb6d8efd4, 0x81b22dd5, 0x04a462d0, 0x33cea0d1, 0x6a70e6d3, + 0x5d1a24d2, 0x10fe5ec5, 0x27949cc4, 0x7e2adac6, 0x494018c7, + 0xcc5657c2, 0xfb3c95c3, 0xa282d3c1, 0x95e811c0, 0xa8af4dcb, + 0x9fc58fca, 0xc67bc9c8, 0xf1110bc9, 0x740744cc, 0x436d86cd, + 0x1ad3c0cf, 0x2db902ce, 0x4096af91, 0x77fc6d90, 0x2e422b92, + 0x1928e993, 0x9c3ea696, 0xab546497, 0xf2ea2295, 0xc580e094, + 0xf8c7bc9f, 0xcfad7e9e, 0x9613389c, 0xa179fa9d, 0x246fb598, + 0x13057799, 0x4abb319b, 0x7dd1f39a, 0x3035898d, 0x075f4b8c, + 0x5ee10d8e, 0x698bcf8f, 0xec9d808a, 0xdbf7428b, 0x82490489, + 0xb523c688, 0x88649a83, 0xbf0e5882, 0xe6b01e80, 0xd1dadc81, + 0x54cc9384, 0x63a65185, 0x3a181787, 0x0d72d586, 0xa0d0e2a9, + 0x97ba20a8, 0xce0466aa, 0xf96ea4ab, 0x7c78ebae, 0x4b1229af, + 0x12ac6fad, 0x25c6adac, 0x1881f1a7, 0x2feb33a6, 0x765575a4, + 0x413fb7a5, 0xc429f8a0, 0xf3433aa1, 0xaafd7ca3, 0x9d97bea2, + 0xd073c4b5, 0xe71906b4, 0xbea740b6, 0x89cd82b7, 0x0cdbcdb2, + 0x3bb10fb3, 0x620f49b1, 0x55658bb0, 0x6822d7bb, 0x5f4815ba, + 0x06f653b8, 0x319c91b9, 0xb48adebc, 0x83e01cbd, 0xda5e5abf, + 0xed3498be}, + {0x00000000, 0x6567bcb8, 0x8bc809aa, 0xeeafb512, 0x5797628f, + 0x32f0de37, 0xdc5f6b25, 0xb938d79d, 0xef28b4c5, 0x8a4f087d, + 0x64e0bd6f, 0x018701d7, 0xb8bfd64a, 0xddd86af2, 0x3377dfe0, + 0x56106358, 0x9f571950, 0xfa30a5e8, 0x149f10fa, 0x71f8ac42, + 0xc8c07bdf, 0xada7c767, 0x43087275, 0x266fcecd, 0x707fad95, + 0x1518112d, 0xfbb7a43f, 0x9ed01887, 0x27e8cf1a, 0x428f73a2, + 0xac20c6b0, 0xc9477a08, 0x3eaf32a0, 0x5bc88e18, 0xb5673b0a, + 0xd00087b2, 0x6938502f, 0x0c5fec97, 0xe2f05985, 0x8797e53d, + 0xd1878665, 0xb4e03add, 0x5a4f8fcf, 0x3f283377, 0x8610e4ea, + 0xe3775852, 0x0dd8ed40, 0x68bf51f8, 0xa1f82bf0, 0xc49f9748, + 0x2a30225a, 0x4f579ee2, 0xf66f497f, 0x9308f5c7, 0x7da740d5, + 0x18c0fc6d, 0x4ed09f35, 0x2bb7238d, 0xc518969f, 0xa07f2a27, + 0x1947fdba, 0x7c204102, 0x928ff410, 0xf7e848a8, 0x3d58149b, + 0x583fa823, 0xb6901d31, 0xd3f7a189, 0x6acf7614, 0x0fa8caac, + 0xe1077fbe, 0x8460c306, 0xd270a05e, 0xb7171ce6, 0x59b8a9f4, + 0x3cdf154c, 0x85e7c2d1, 0xe0807e69, 0x0e2fcb7b, 0x6b4877c3, + 0xa20f0dcb, 0xc768b173, 0x29c70461, 0x4ca0b8d9, 0xf5986f44, + 0x90ffd3fc, 0x7e5066ee, 0x1b37da56, 0x4d27b90e, 0x284005b6, + 0xc6efb0a4, 0xa3880c1c, 0x1ab0db81, 0x7fd76739, 0x9178d22b, + 0xf41f6e93, 0x03f7263b, 0x66909a83, 0x883f2f91, 0xed589329, + 0x546044b4, 0x3107f80c, 0xdfa84d1e, 0xbacff1a6, 0xecdf92fe, + 0x89b82e46, 0x67179b54, 0x027027ec, 0xbb48f071, 0xde2f4cc9, + 0x3080f9db, 0x55e74563, 0x9ca03f6b, 0xf9c783d3, 0x176836c1, + 0x720f8a79, 0xcb375de4, 0xae50e15c, 0x40ff544e, 0x2598e8f6, + 0x73888bae, 0x16ef3716, 0xf8408204, 0x9d273ebc, 0x241fe921, + 0x41785599, 0xafd7e08b, 0xcab05c33, 0x3bb659ed, 0x5ed1e555, + 0xb07e5047, 0xd519ecff, 0x6c213b62, 0x094687da, 0xe7e932c8, + 0x828e8e70, 0xd49eed28, 0xb1f95190, 0x5f56e482, 0x3a31583a, + 0x83098fa7, 0xe66e331f, 0x08c1860d, 0x6da63ab5, 0xa4e140bd, + 0xc186fc05, 0x2f294917, 0x4a4ef5af, 0xf3762232, 0x96119e8a, + 0x78be2b98, 0x1dd99720, 0x4bc9f478, 0x2eae48c0, 0xc001fdd2, + 0xa566416a, 0x1c5e96f7, 0x79392a4f, 0x97969f5d, 0xf2f123e5, + 0x05196b4d, 0x607ed7f5, 0x8ed162e7, 0xebb6de5f, 0x528e09c2, + 0x37e9b57a, 0xd9460068, 0xbc21bcd0, 0xea31df88, 0x8f566330, + 0x61f9d622, 0x049e6a9a, 0xbda6bd07, 0xd8c101bf, 0x366eb4ad, + 0x53090815, 0x9a4e721d, 0xff29cea5, 0x11867bb7, 0x74e1c70f, + 0xcdd91092, 0xa8beac2a, 0x46111938, 0x2376a580, 0x7566c6d8, + 0x10017a60, 0xfeaecf72, 0x9bc973ca, 0x22f1a457, 0x479618ef, + 0xa939adfd, 0xcc5e1145, 0x06ee4d76, 0x6389f1ce, 0x8d2644dc, + 0xe841f864, 0x51792ff9, 0x341e9341, 0xdab12653, 0xbfd69aeb, + 0xe9c6f9b3, 0x8ca1450b, 0x620ef019, 0x07694ca1, 0xbe519b3c, + 0xdb362784, 0x35999296, 0x50fe2e2e, 0x99b95426, 0xfcdee89e, + 0x12715d8c, 0x7716e134, 0xce2e36a9, 0xab498a11, 0x45e63f03, + 0x208183bb, 0x7691e0e3, 0x13f65c5b, 0xfd59e949, 0x983e55f1, + 0x2106826c, 0x44613ed4, 0xaace8bc6, 0xcfa9377e, 0x38417fd6, + 0x5d26c36e, 0xb389767c, 0xd6eecac4, 0x6fd61d59, 0x0ab1a1e1, + 0xe41e14f3, 0x8179a84b, 0xd769cb13, 0xb20e77ab, 0x5ca1c2b9, + 0x39c67e01, 0x80fea99c, 0xe5991524, 0x0b36a036, 0x6e511c8e, + 0xa7166686, 0xc271da3e, 0x2cde6f2c, 0x49b9d394, 0xf0810409, + 0x95e6b8b1, 0x7b490da3, 0x1e2eb11b, 0x483ed243, 0x2d596efb, + 0xc3f6dbe9, 0xa6916751, 0x1fa9b0cc, 0x7ace0c74, 0x9461b966, + 0xf10605de}}; + +#endif + +#endif + +#if N == 2 + +#if W == 8 + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0xae689191, 0x87a02563, 0x29c8b4f2, 0xd4314c87, + 0x7a59dd16, 0x539169e4, 0xfdf9f875, 0x73139f4f, 0xdd7b0ede, + 0xf4b3ba2c, 0x5adb2bbd, 0xa722d3c8, 0x094a4259, 0x2082f6ab, + 0x8eea673a, 0xe6273e9e, 0x484faf0f, 0x61871bfd, 0xcfef8a6c, + 0x32167219, 0x9c7ee388, 0xb5b6577a, 0x1bdec6eb, 0x9534a1d1, + 0x3b5c3040, 0x129484b2, 0xbcfc1523, 0x4105ed56, 0xef6d7cc7, + 0xc6a5c835, 0x68cd59a4, 0x173f7b7d, 0xb957eaec, 0x909f5e1e, + 0x3ef7cf8f, 0xc30e37fa, 0x6d66a66b, 0x44ae1299, 0xeac68308, + 0x642ce432, 0xca4475a3, 0xe38cc151, 0x4de450c0, 0xb01da8b5, + 0x1e753924, 0x37bd8dd6, 0x99d51c47, 0xf11845e3, 0x5f70d472, + 0x76b86080, 0xd8d0f111, 0x25290964, 0x8b4198f5, 0xa2892c07, + 0x0ce1bd96, 0x820bdaac, 0x2c634b3d, 0x05abffcf, 0xabc36e5e, + 0x563a962b, 0xf85207ba, 0xd19ab348, 0x7ff222d9, 0x2e7ef6fa, + 0x8016676b, 0xa9ded399, 0x07b64208, 0xfa4fba7d, 0x54272bec, + 0x7def9f1e, 0xd3870e8f, 0x5d6d69b5, 0xf305f824, 0xdacd4cd6, + 0x74a5dd47, 0x895c2532, 0x2734b4a3, 0x0efc0051, 0xa09491c0, + 0xc859c864, 0x663159f5, 0x4ff9ed07, 0xe1917c96, 0x1c6884e3, + 0xb2001572, 0x9bc8a180, 0x35a03011, 0xbb4a572b, 0x1522c6ba, + 0x3cea7248, 0x9282e3d9, 0x6f7b1bac, 0xc1138a3d, 0xe8db3ecf, + 0x46b3af5e, 0x39418d87, 0x97291c16, 0xbee1a8e4, 0x10893975, + 0xed70c100, 0x43185091, 0x6ad0e463, 0xc4b875f2, 0x4a5212c8, + 0xe43a8359, 0xcdf237ab, 0x639aa63a, 0x9e635e4f, 0x300bcfde, + 0x19c37b2c, 0xb7abeabd, 0xdf66b319, 0x710e2288, 0x58c6967a, + 0xf6ae07eb, 0x0b57ff9e, 0xa53f6e0f, 0x8cf7dafd, 0x229f4b6c, + 0xac752c56, 0x021dbdc7, 0x2bd50935, 0x85bd98a4, 0x784460d1, + 0xd62cf140, 0xffe445b2, 0x518cd423, 0x5cfdedf4, 0xf2957c65, + 0xdb5dc897, 0x75355906, 0x88cca173, 0x26a430e2, 0x0f6c8410, + 0xa1041581, 0x2fee72bb, 0x8186e32a, 0xa84e57d8, 0x0626c649, + 0xfbdf3e3c, 0x55b7afad, 0x7c7f1b5f, 0xd2178ace, 0xbadad36a, + 0x14b242fb, 0x3d7af609, 0x93126798, 0x6eeb9fed, 0xc0830e7c, + 0xe94bba8e, 0x47232b1f, 0xc9c94c25, 0x67a1ddb4, 0x4e696946, + 0xe001f8d7, 0x1df800a2, 0xb3909133, 0x9a5825c1, 0x3430b450, + 0x4bc29689, 0xe5aa0718, 0xcc62b3ea, 0x620a227b, 0x9ff3da0e, + 0x319b4b9f, 0x1853ff6d, 0xb63b6efc, 0x38d109c6, 0x96b99857, + 0xbf712ca5, 0x1119bd34, 0xece04541, 0x4288d4d0, 0x6b406022, + 0xc528f1b3, 0xade5a817, 0x038d3986, 0x2a458d74, 0x842d1ce5, + 0x79d4e490, 0xd7bc7501, 0xfe74c1f3, 0x501c5062, 0xdef63758, + 0x709ea6c9, 0x5956123b, 0xf73e83aa, 0x0ac77bdf, 0xa4afea4e, + 0x8d675ebc, 0x230fcf2d, 0x72831b0e, 0xdceb8a9f, 0xf5233e6d, + 0x5b4baffc, 0xa6b25789, 0x08dac618, 0x211272ea, 0x8f7ae37b, + 0x01908441, 0xaff815d0, 0x8630a122, 0x285830b3, 0xd5a1c8c6, + 0x7bc95957, 0x5201eda5, 0xfc697c34, 0x94a42590, 0x3accb401, + 0x130400f3, 0xbd6c9162, 0x40956917, 0xeefdf886, 0xc7354c74, + 0x695ddde5, 0xe7b7badf, 0x49df2b4e, 0x60179fbc, 0xce7f0e2d, + 0x3386f658, 0x9dee67c9, 0xb426d33b, 0x1a4e42aa, 0x65bc6073, + 0xcbd4f1e2, 0xe21c4510, 0x4c74d481, 0xb18d2cf4, 0x1fe5bd65, + 0x362d0997, 0x98459806, 0x16afff3c, 0xb8c76ead, 0x910fda5f, + 0x3f674bce, 0xc29eb3bb, 0x6cf6222a, 0x453e96d8, 0xeb560749, + 0x839b5eed, 0x2df3cf7c, 0x043b7b8e, 0xaa53ea1f, 0x57aa126a, + 0xf9c283fb, 0xd00a3709, 0x7e62a698, 0xf088c1a2, 0x5ee05033, + 0x7728e4c1, 0xd9407550, 0x24b98d25, 0x8ad11cb4, 0xa319a846, + 0x0d7139d7}, + {0x00000000, 0xb9fbdbe8, 0xa886b191, 0x117d6a79, 0x8a7c6563, + 0x3387be8b, 0x22fad4f2, 0x9b010f1a, 0xcf89cc87, 0x7672176f, + 0x670f7d16, 0xdef4a6fe, 0x45f5a9e4, 0xfc0e720c, 0xed731875, + 0x5488c39d, 0x44629f4f, 0xfd9944a7, 0xece42ede, 0x551ff536, + 0xce1efa2c, 0x77e521c4, 0x66984bbd, 0xdf639055, 0x8beb53c8, + 0x32108820, 0x236de259, 0x9a9639b1, 0x019736ab, 0xb86ced43, + 0xa911873a, 0x10ea5cd2, 0x88c53e9e, 0x313ee576, 0x20438f0f, + 0x99b854e7, 0x02b95bfd, 0xbb428015, 0xaa3fea6c, 0x13c43184, + 0x474cf219, 0xfeb729f1, 0xefca4388, 0x56319860, 0xcd30977a, + 0x74cb4c92, 0x65b626eb, 0xdc4dfd03, 0xcca7a1d1, 0x755c7a39, + 0x64211040, 0xdddacba8, 0x46dbc4b2, 0xff201f5a, 0xee5d7523, + 0x57a6aecb, 0x032e6d56, 0xbad5b6be, 0xaba8dcc7, 0x1253072f, + 0x89520835, 0x30a9d3dd, 0x21d4b9a4, 0x982f624c, 0xcafb7b7d, + 0x7300a095, 0x627dcaec, 0xdb861104, 0x40871e1e, 0xf97cc5f6, + 0xe801af8f, 0x51fa7467, 0x0572b7fa, 0xbc896c12, 0xadf4066b, + 0x140fdd83, 0x8f0ed299, 0x36f50971, 0x27886308, 0x9e73b8e0, + 0x8e99e432, 0x37623fda, 0x261f55a3, 0x9fe48e4b, 0x04e58151, + 0xbd1e5ab9, 0xac6330c0, 0x1598eb28, 0x411028b5, 0xf8ebf35d, + 0xe9969924, 0x506d42cc, 0xcb6c4dd6, 0x7297963e, 0x63eafc47, + 0xda1127af, 0x423e45e3, 0xfbc59e0b, 0xeab8f472, 0x53432f9a, + 0xc8422080, 0x71b9fb68, 0x60c49111, 0xd93f4af9, 0x8db78964, + 0x344c528c, 0x253138f5, 0x9ccae31d, 0x07cbec07, 0xbe3037ef, + 0xaf4d5d96, 0x16b6867e, 0x065cdaac, 0xbfa70144, 0xaeda6b3d, + 0x1721b0d5, 0x8c20bfcf, 0x35db6427, 0x24a60e5e, 0x9d5dd5b6, + 0xc9d5162b, 0x702ecdc3, 0x6153a7ba, 0xd8a87c52, 0x43a97348, + 0xfa52a8a0, 0xeb2fc2d9, 0x52d41931, 0x4e87f0bb, 0xf77c2b53, + 0xe601412a, 0x5ffa9ac2, 0xc4fb95d8, 0x7d004e30, 0x6c7d2449, + 0xd586ffa1, 0x810e3c3c, 0x38f5e7d4, 0x29888dad, 0x90735645, + 0x0b72595f, 0xb28982b7, 0xa3f4e8ce, 0x1a0f3326, 0x0ae56ff4, + 0xb31eb41c, 0xa263de65, 0x1b98058d, 0x80990a97, 0x3962d17f, + 0x281fbb06, 0x91e460ee, 0xc56ca373, 0x7c97789b, 0x6dea12e2, + 0xd411c90a, 0x4f10c610, 0xf6eb1df8, 0xe7967781, 0x5e6dac69, + 0xc642ce25, 0x7fb915cd, 0x6ec47fb4, 0xd73fa45c, 0x4c3eab46, + 0xf5c570ae, 0xe4b81ad7, 0x5d43c13f, 0x09cb02a2, 0xb030d94a, + 0xa14db333, 0x18b668db, 0x83b767c1, 0x3a4cbc29, 0x2b31d650, + 0x92ca0db8, 0x8220516a, 0x3bdb8a82, 0x2aa6e0fb, 0x935d3b13, + 0x085c3409, 0xb1a7efe1, 0xa0da8598, 0x19215e70, 0x4da99ded, + 0xf4524605, 0xe52f2c7c, 0x5cd4f794, 0xc7d5f88e, 0x7e2e2366, + 0x6f53491f, 0xd6a892f7, 0x847c8bc6, 0x3d87502e, 0x2cfa3a57, + 0x9501e1bf, 0x0e00eea5, 0xb7fb354d, 0xa6865f34, 0x1f7d84dc, + 0x4bf54741, 0xf20e9ca9, 0xe373f6d0, 0x5a882d38, 0xc1892222, + 0x7872f9ca, 0x690f93b3, 0xd0f4485b, 0xc01e1489, 0x79e5cf61, + 0x6898a518, 0xd1637ef0, 0x4a6271ea, 0xf399aa02, 0xe2e4c07b, + 0x5b1f1b93, 0x0f97d80e, 0xb66c03e6, 0xa711699f, 0x1eeab277, + 0x85ebbd6d, 0x3c106685, 0x2d6d0cfc, 0x9496d714, 0x0cb9b558, + 0xb5426eb0, 0xa43f04c9, 0x1dc4df21, 0x86c5d03b, 0x3f3e0bd3, + 0x2e4361aa, 0x97b8ba42, 0xc33079df, 0x7acba237, 0x6bb6c84e, + 0xd24d13a6, 0x494c1cbc, 0xf0b7c754, 0xe1caad2d, 0x583176c5, + 0x48db2a17, 0xf120f1ff, 0xe05d9b86, 0x59a6406e, 0xc2a74f74, + 0x7b5c949c, 0x6a21fee5, 0xd3da250d, 0x8752e690, 0x3ea93d78, + 0x2fd45701, 0x962f8ce9, 0x0d2e83f3, 0xb4d5581b, 0xa5a83262, + 0x1c53e98a}, + {0x00000000, 0x9d0fe176, 0xe16ec4ad, 0x7c6125db, 0x19ac8f1b, + 0x84a36e6d, 0xf8c24bb6, 0x65cdaac0, 0x33591e36, 0xae56ff40, + 0xd237da9b, 0x4f383bed, 0x2af5912d, 0xb7fa705b, 0xcb9b5580, + 0x5694b4f6, 0x66b23c6c, 0xfbbddd1a, 0x87dcf8c1, 0x1ad319b7, + 0x7f1eb377, 0xe2115201, 0x9e7077da, 0x037f96ac, 0x55eb225a, + 0xc8e4c32c, 0xb485e6f7, 0x298a0781, 0x4c47ad41, 0xd1484c37, + 0xad2969ec, 0x3026889a, 0xcd6478d8, 0x506b99ae, 0x2c0abc75, + 0xb1055d03, 0xd4c8f7c3, 0x49c716b5, 0x35a6336e, 0xa8a9d218, + 0xfe3d66ee, 0x63328798, 0x1f53a243, 0x825c4335, 0xe791e9f5, + 0x7a9e0883, 0x06ff2d58, 0x9bf0cc2e, 0xabd644b4, 0x36d9a5c2, + 0x4ab88019, 0xd7b7616f, 0xb27acbaf, 0x2f752ad9, 0x53140f02, + 0xce1bee74, 0x988f5a82, 0x0580bbf4, 0x79e19e2f, 0xe4ee7f59, + 0x8123d599, 0x1c2c34ef, 0x604d1134, 0xfd42f042, 0x41b9f7f1, + 0xdcb61687, 0xa0d7335c, 0x3dd8d22a, 0x581578ea, 0xc51a999c, + 0xb97bbc47, 0x24745d31, 0x72e0e9c7, 0xefef08b1, 0x938e2d6a, + 0x0e81cc1c, 0x6b4c66dc, 0xf64387aa, 0x8a22a271, 0x172d4307, + 0x270bcb9d, 0xba042aeb, 0xc6650f30, 0x5b6aee46, 0x3ea74486, + 0xa3a8a5f0, 0xdfc9802b, 0x42c6615d, 0x1452d5ab, 0x895d34dd, + 0xf53c1106, 0x6833f070, 0x0dfe5ab0, 0x90f1bbc6, 0xec909e1d, + 0x719f7f6b, 0x8cdd8f29, 0x11d26e5f, 0x6db34b84, 0xf0bcaaf2, + 0x95710032, 0x087ee144, 0x741fc49f, 0xe91025e9, 0xbf84911f, + 0x228b7069, 0x5eea55b2, 0xc3e5b4c4, 0xa6281e04, 0x3b27ff72, + 0x4746daa9, 0xda493bdf, 0xea6fb345, 0x77605233, 0x0b0177e8, + 0x960e969e, 0xf3c33c5e, 0x6eccdd28, 0x12adf8f3, 0x8fa21985, + 0xd936ad73, 0x44394c05, 0x385869de, 0xa55788a8, 0xc09a2268, + 0x5d95c31e, 0x21f4e6c5, 0xbcfb07b3, 0x8373efe2, 0x1e7c0e94, + 0x621d2b4f, 0xff12ca39, 0x9adf60f9, 0x07d0818f, 0x7bb1a454, + 0xe6be4522, 0xb02af1d4, 0x2d2510a2, 0x51443579, 0xcc4bd40f, + 0xa9867ecf, 0x34899fb9, 0x48e8ba62, 0xd5e75b14, 0xe5c1d38e, + 0x78ce32f8, 0x04af1723, 0x99a0f655, 0xfc6d5c95, 0x6162bde3, + 0x1d039838, 0x800c794e, 0xd698cdb8, 0x4b972cce, 0x37f60915, + 0xaaf9e863, 0xcf3442a3, 0x523ba3d5, 0x2e5a860e, 0xb3556778, + 0x4e17973a, 0xd318764c, 0xaf795397, 0x3276b2e1, 0x57bb1821, + 0xcab4f957, 0xb6d5dc8c, 0x2bda3dfa, 0x7d4e890c, 0xe041687a, + 0x9c204da1, 0x012facd7, 0x64e20617, 0xf9ede761, 0x858cc2ba, + 0x188323cc, 0x28a5ab56, 0xb5aa4a20, 0xc9cb6ffb, 0x54c48e8d, + 0x3109244d, 0xac06c53b, 0xd067e0e0, 0x4d680196, 0x1bfcb560, + 0x86f35416, 0xfa9271cd, 0x679d90bb, 0x02503a7b, 0x9f5fdb0d, + 0xe33efed6, 0x7e311fa0, 0xc2ca1813, 0x5fc5f965, 0x23a4dcbe, + 0xbeab3dc8, 0xdb669708, 0x4669767e, 0x3a0853a5, 0xa707b2d3, + 0xf1930625, 0x6c9ce753, 0x10fdc288, 0x8df223fe, 0xe83f893e, + 0x75306848, 0x09514d93, 0x945eace5, 0xa478247f, 0x3977c509, + 0x4516e0d2, 0xd81901a4, 0xbdd4ab64, 0x20db4a12, 0x5cba6fc9, + 0xc1b58ebf, 0x97213a49, 0x0a2edb3f, 0x764ffee4, 0xeb401f92, + 0x8e8db552, 0x13825424, 0x6fe371ff, 0xf2ec9089, 0x0fae60cb, + 0x92a181bd, 0xeec0a466, 0x73cf4510, 0x1602efd0, 0x8b0d0ea6, + 0xf76c2b7d, 0x6a63ca0b, 0x3cf77efd, 0xa1f89f8b, 0xdd99ba50, + 0x40965b26, 0x255bf1e6, 0xb8541090, 0xc435354b, 0x593ad43d, + 0x691c5ca7, 0xf413bdd1, 0x8872980a, 0x157d797c, 0x70b0d3bc, + 0xedbf32ca, 0x91de1711, 0x0cd1f667, 0x5a454291, 0xc74aa3e7, + 0xbb2b863c, 0x2624674a, 0x43e9cd8a, 0xdee62cfc, 0xa2870927, + 0x3f88e851}, + {0x00000000, 0xdd96d985, 0x605cb54b, 0xbdca6cce, 0xc0b96a96, + 0x1d2fb313, 0xa0e5dfdd, 0x7d730658, 0x5a03d36d, 0x87950ae8, + 0x3a5f6626, 0xe7c9bfa3, 0x9abab9fb, 0x472c607e, 0xfae60cb0, + 0x2770d535, 0xb407a6da, 0x69917f5f, 0xd45b1391, 0x09cdca14, + 0x74becc4c, 0xa92815c9, 0x14e27907, 0xc974a082, 0xee0475b7, + 0x3392ac32, 0x8e58c0fc, 0x53ce1979, 0x2ebd1f21, 0xf32bc6a4, + 0x4ee1aa6a, 0x937773ef, 0xb37e4bf5, 0x6ee89270, 0xd322febe, + 0x0eb4273b, 0x73c72163, 0xae51f8e6, 0x139b9428, 0xce0d4dad, + 0xe97d9898, 0x34eb411d, 0x89212dd3, 0x54b7f456, 0x29c4f20e, + 0xf4522b8b, 0x49984745, 0x940e9ec0, 0x0779ed2f, 0xdaef34aa, + 0x67255864, 0xbab381e1, 0xc7c087b9, 0x1a565e3c, 0xa79c32f2, + 0x7a0aeb77, 0x5d7a3e42, 0x80ece7c7, 0x3d268b09, 0xe0b0528c, + 0x9dc354d4, 0x40558d51, 0xfd9fe19f, 0x2009381a, 0xbd8d91ab, + 0x601b482e, 0xddd124e0, 0x0047fd65, 0x7d34fb3d, 0xa0a222b8, + 0x1d684e76, 0xc0fe97f3, 0xe78e42c6, 0x3a189b43, 0x87d2f78d, + 0x5a442e08, 0x27372850, 0xfaa1f1d5, 0x476b9d1b, 0x9afd449e, + 0x098a3771, 0xd41ceef4, 0x69d6823a, 0xb4405bbf, 0xc9335de7, + 0x14a58462, 0xa96fe8ac, 0x74f93129, 0x5389e41c, 0x8e1f3d99, + 0x33d55157, 0xee4388d2, 0x93308e8a, 0x4ea6570f, 0xf36c3bc1, + 0x2efae244, 0x0ef3da5e, 0xd36503db, 0x6eaf6f15, 0xb339b690, + 0xce4ab0c8, 0x13dc694d, 0xae160583, 0x7380dc06, 0x54f00933, + 0x8966d0b6, 0x34acbc78, 0xe93a65fd, 0x944963a5, 0x49dfba20, + 0xf415d6ee, 0x29830f6b, 0xbaf47c84, 0x6762a501, 0xdaa8c9cf, + 0x073e104a, 0x7a4d1612, 0xa7dbcf97, 0x1a11a359, 0xc7877adc, + 0xe0f7afe9, 0x3d61766c, 0x80ab1aa2, 0x5d3dc327, 0x204ec57f, + 0xfdd81cfa, 0x40127034, 0x9d84a9b1, 0xa06a2517, 0x7dfcfc92, + 0xc036905c, 0x1da049d9, 0x60d34f81, 0xbd459604, 0x008ffaca, + 0xdd19234f, 0xfa69f67a, 0x27ff2fff, 0x9a354331, 0x47a39ab4, + 0x3ad09cec, 0xe7464569, 0x5a8c29a7, 0x871af022, 0x146d83cd, + 0xc9fb5a48, 0x74313686, 0xa9a7ef03, 0xd4d4e95b, 0x094230de, + 0xb4885c10, 0x691e8595, 0x4e6e50a0, 0x93f88925, 0x2e32e5eb, + 0xf3a43c6e, 0x8ed73a36, 0x5341e3b3, 0xee8b8f7d, 0x331d56f8, + 0x13146ee2, 0xce82b767, 0x7348dba9, 0xaede022c, 0xd3ad0474, + 0x0e3bddf1, 0xb3f1b13f, 0x6e6768ba, 0x4917bd8f, 0x9481640a, + 0x294b08c4, 0xf4ddd141, 0x89aed719, 0x54380e9c, 0xe9f26252, + 0x3464bbd7, 0xa713c838, 0x7a8511bd, 0xc74f7d73, 0x1ad9a4f6, + 0x67aaa2ae, 0xba3c7b2b, 0x07f617e5, 0xda60ce60, 0xfd101b55, + 0x2086c2d0, 0x9d4cae1e, 0x40da779b, 0x3da971c3, 0xe03fa846, + 0x5df5c488, 0x80631d0d, 0x1de7b4bc, 0xc0716d39, 0x7dbb01f7, + 0xa02dd872, 0xdd5ede2a, 0x00c807af, 0xbd026b61, 0x6094b2e4, + 0x47e467d1, 0x9a72be54, 0x27b8d29a, 0xfa2e0b1f, 0x875d0d47, + 0x5acbd4c2, 0xe701b80c, 0x3a976189, 0xa9e01266, 0x7476cbe3, + 0xc9bca72d, 0x142a7ea8, 0x695978f0, 0xb4cfa175, 0x0905cdbb, + 0xd493143e, 0xf3e3c10b, 0x2e75188e, 0x93bf7440, 0x4e29adc5, + 0x335aab9d, 0xeecc7218, 0x53061ed6, 0x8e90c753, 0xae99ff49, + 0x730f26cc, 0xcec54a02, 0x13539387, 0x6e2095df, 0xb3b64c5a, + 0x0e7c2094, 0xd3eaf911, 0xf49a2c24, 0x290cf5a1, 0x94c6996f, + 0x495040ea, 0x342346b2, 0xe9b59f37, 0x547ff3f9, 0x89e92a7c, + 0x1a9e5993, 0xc7088016, 0x7ac2ecd8, 0xa754355d, 0xda273305, + 0x07b1ea80, 0xba7b864e, 0x67ed5fcb, 0x409d8afe, 0x9d0b537b, + 0x20c13fb5, 0xfd57e630, 0x8024e068, 0x5db239ed, 0xe0785523, + 0x3dee8ca6}, + {0x00000000, 0x9ba54c6f, 0xec3b9e9f, 0x779ed2f0, 0x03063b7f, + 0x98a37710, 0xef3da5e0, 0x7498e98f, 0x060c76fe, 0x9da93a91, + 0xea37e861, 0x7192a40e, 0x050a4d81, 0x9eaf01ee, 0xe931d31e, + 0x72949f71, 0x0c18edfc, 0x97bda193, 0xe0237363, 0x7b863f0c, + 0x0f1ed683, 0x94bb9aec, 0xe325481c, 0x78800473, 0x0a149b02, + 0x91b1d76d, 0xe62f059d, 0x7d8a49f2, 0x0912a07d, 0x92b7ec12, + 0xe5293ee2, 0x7e8c728d, 0x1831dbf8, 0x83949797, 0xf40a4567, + 0x6faf0908, 0x1b37e087, 0x8092ace8, 0xf70c7e18, 0x6ca93277, + 0x1e3dad06, 0x8598e169, 0xf2063399, 0x69a37ff6, 0x1d3b9679, + 0x869eda16, 0xf10008e6, 0x6aa54489, 0x14293604, 0x8f8c7a6b, + 0xf812a89b, 0x63b7e4f4, 0x172f0d7b, 0x8c8a4114, 0xfb1493e4, + 0x60b1df8b, 0x122540fa, 0x89800c95, 0xfe1ede65, 0x65bb920a, + 0x11237b85, 0x8a8637ea, 0xfd18e51a, 0x66bda975, 0x3063b7f0, + 0xabc6fb9f, 0xdc58296f, 0x47fd6500, 0x33658c8f, 0xa8c0c0e0, + 0xdf5e1210, 0x44fb5e7f, 0x366fc10e, 0xadca8d61, 0xda545f91, + 0x41f113fe, 0x3569fa71, 0xaeccb61e, 0xd95264ee, 0x42f72881, + 0x3c7b5a0c, 0xa7de1663, 0xd040c493, 0x4be588fc, 0x3f7d6173, + 0xa4d82d1c, 0xd346ffec, 0x48e3b383, 0x3a772cf2, 0xa1d2609d, + 0xd64cb26d, 0x4de9fe02, 0x3971178d, 0xa2d45be2, 0xd54a8912, + 0x4eefc57d, 0x28526c08, 0xb3f72067, 0xc469f297, 0x5fccbef8, + 0x2b545777, 0xb0f11b18, 0xc76fc9e8, 0x5cca8587, 0x2e5e1af6, + 0xb5fb5699, 0xc2658469, 0x59c0c806, 0x2d582189, 0xb6fd6de6, + 0xc163bf16, 0x5ac6f379, 0x244a81f4, 0xbfefcd9b, 0xc8711f6b, + 0x53d45304, 0x274cba8b, 0xbce9f6e4, 0xcb772414, 0x50d2687b, + 0x2246f70a, 0xb9e3bb65, 0xce7d6995, 0x55d825fa, 0x2140cc75, + 0xbae5801a, 0xcd7b52ea, 0x56de1e85, 0x60c76fe0, 0xfb62238f, + 0x8cfcf17f, 0x1759bd10, 0x63c1549f, 0xf86418f0, 0x8ffaca00, + 0x145f866f, 0x66cb191e, 0xfd6e5571, 0x8af08781, 0x1155cbee, + 0x65cd2261, 0xfe686e0e, 0x89f6bcfe, 0x1253f091, 0x6cdf821c, + 0xf77ace73, 0x80e41c83, 0x1b4150ec, 0x6fd9b963, 0xf47cf50c, + 0x83e227fc, 0x18476b93, 0x6ad3f4e2, 0xf176b88d, 0x86e86a7d, + 0x1d4d2612, 0x69d5cf9d, 0xf27083f2, 0x85ee5102, 0x1e4b1d6d, + 0x78f6b418, 0xe353f877, 0x94cd2a87, 0x0f6866e8, 0x7bf08f67, + 0xe055c308, 0x97cb11f8, 0x0c6e5d97, 0x7efac2e6, 0xe55f8e89, + 0x92c15c79, 0x09641016, 0x7dfcf999, 0xe659b5f6, 0x91c76706, + 0x0a622b69, 0x74ee59e4, 0xef4b158b, 0x98d5c77b, 0x03708b14, + 0x77e8629b, 0xec4d2ef4, 0x9bd3fc04, 0x0076b06b, 0x72e22f1a, + 0xe9476375, 0x9ed9b185, 0x057cfdea, 0x71e41465, 0xea41580a, + 0x9ddf8afa, 0x067ac695, 0x50a4d810, 0xcb01947f, 0xbc9f468f, + 0x273a0ae0, 0x53a2e36f, 0xc807af00, 0xbf997df0, 0x243c319f, + 0x56a8aeee, 0xcd0de281, 0xba933071, 0x21367c1e, 0x55ae9591, + 0xce0bd9fe, 0xb9950b0e, 0x22304761, 0x5cbc35ec, 0xc7197983, + 0xb087ab73, 0x2b22e71c, 0x5fba0e93, 0xc41f42fc, 0xb381900c, + 0x2824dc63, 0x5ab04312, 0xc1150f7d, 0xb68bdd8d, 0x2d2e91e2, + 0x59b6786d, 0xc2133402, 0xb58de6f2, 0x2e28aa9d, 0x489503e8, + 0xd3304f87, 0xa4ae9d77, 0x3f0bd118, 0x4b933897, 0xd03674f8, + 0xa7a8a608, 0x3c0dea67, 0x4e997516, 0xd53c3979, 0xa2a2eb89, + 0x3907a7e6, 0x4d9f4e69, 0xd63a0206, 0xa1a4d0f6, 0x3a019c99, + 0x448dee14, 0xdf28a27b, 0xa8b6708b, 0x33133ce4, 0x478bd56b, + 0xdc2e9904, 0xabb04bf4, 0x3015079b, 0x428198ea, 0xd924d485, + 0xaeba0675, 0x351f4a1a, 0x4187a395, 0xda22effa, 0xadbc3d0a, + 0x36197165}, + {0x00000000, 0xc18edfc0, 0x586cb9c1, 0x99e26601, 0xb0d97382, + 0x7157ac42, 0xe8b5ca43, 0x293b1583, 0xbac3e145, 0x7b4d3e85, + 0xe2af5884, 0x23218744, 0x0a1a92c7, 0xcb944d07, 0x52762b06, + 0x93f8f4c6, 0xaef6c4cb, 0x6f781b0b, 0xf69a7d0a, 0x3714a2ca, + 0x1e2fb749, 0xdfa16889, 0x46430e88, 0x87cdd148, 0x1435258e, + 0xd5bbfa4e, 0x4c599c4f, 0x8dd7438f, 0xa4ec560c, 0x656289cc, + 0xfc80efcd, 0x3d0e300d, 0x869c8fd7, 0x47125017, 0xdef03616, + 0x1f7ee9d6, 0x3645fc55, 0xf7cb2395, 0x6e294594, 0xafa79a54, + 0x3c5f6e92, 0xfdd1b152, 0x6433d753, 0xa5bd0893, 0x8c861d10, + 0x4d08c2d0, 0xd4eaa4d1, 0x15647b11, 0x286a4b1c, 0xe9e494dc, + 0x7006f2dd, 0xb1882d1d, 0x98b3389e, 0x593de75e, 0xc0df815f, + 0x01515e9f, 0x92a9aa59, 0x53277599, 0xcac51398, 0x0b4bcc58, + 0x2270d9db, 0xe3fe061b, 0x7a1c601a, 0xbb92bfda, 0xd64819ef, + 0x17c6c62f, 0x8e24a02e, 0x4faa7fee, 0x66916a6d, 0xa71fb5ad, + 0x3efdd3ac, 0xff730c6c, 0x6c8bf8aa, 0xad05276a, 0x34e7416b, + 0xf5699eab, 0xdc528b28, 0x1ddc54e8, 0x843e32e9, 0x45b0ed29, + 0x78bedd24, 0xb93002e4, 0x20d264e5, 0xe15cbb25, 0xc867aea6, + 0x09e97166, 0x900b1767, 0x5185c8a7, 0xc27d3c61, 0x03f3e3a1, + 0x9a1185a0, 0x5b9f5a60, 0x72a44fe3, 0xb32a9023, 0x2ac8f622, + 0xeb4629e2, 0x50d49638, 0x915a49f8, 0x08b82ff9, 0xc936f039, + 0xe00de5ba, 0x21833a7a, 0xb8615c7b, 0x79ef83bb, 0xea17777d, + 0x2b99a8bd, 0xb27bcebc, 0x73f5117c, 0x5ace04ff, 0x9b40db3f, + 0x02a2bd3e, 0xc32c62fe, 0xfe2252f3, 0x3fac8d33, 0xa64eeb32, + 0x67c034f2, 0x4efb2171, 0x8f75feb1, 0x169798b0, 0xd7194770, + 0x44e1b3b6, 0x856f6c76, 0x1c8d0a77, 0xdd03d5b7, 0xf438c034, + 0x35b61ff4, 0xac5479f5, 0x6ddaa635, 0x77e1359f, 0xb66fea5f, + 0x2f8d8c5e, 0xee03539e, 0xc738461d, 0x06b699dd, 0x9f54ffdc, + 0x5eda201c, 0xcd22d4da, 0x0cac0b1a, 0x954e6d1b, 0x54c0b2db, + 0x7dfba758, 0xbc757898, 0x25971e99, 0xe419c159, 0xd917f154, + 0x18992e94, 0x817b4895, 0x40f59755, 0x69ce82d6, 0xa8405d16, + 0x31a23b17, 0xf02ce4d7, 0x63d41011, 0xa25acfd1, 0x3bb8a9d0, + 0xfa367610, 0xd30d6393, 0x1283bc53, 0x8b61da52, 0x4aef0592, + 0xf17dba48, 0x30f36588, 0xa9110389, 0x689fdc49, 0x41a4c9ca, + 0x802a160a, 0x19c8700b, 0xd846afcb, 0x4bbe5b0d, 0x8a3084cd, + 0x13d2e2cc, 0xd25c3d0c, 0xfb67288f, 0x3ae9f74f, 0xa30b914e, + 0x62854e8e, 0x5f8b7e83, 0x9e05a143, 0x07e7c742, 0xc6691882, + 0xef520d01, 0x2edcd2c1, 0xb73eb4c0, 0x76b06b00, 0xe5489fc6, + 0x24c64006, 0xbd242607, 0x7caaf9c7, 0x5591ec44, 0x941f3384, + 0x0dfd5585, 0xcc738a45, 0xa1a92c70, 0x6027f3b0, 0xf9c595b1, + 0x384b4a71, 0x11705ff2, 0xd0fe8032, 0x491ce633, 0x889239f3, + 0x1b6acd35, 0xdae412f5, 0x430674f4, 0x8288ab34, 0xabb3beb7, + 0x6a3d6177, 0xf3df0776, 0x3251d8b6, 0x0f5fe8bb, 0xced1377b, + 0x5733517a, 0x96bd8eba, 0xbf869b39, 0x7e0844f9, 0xe7ea22f8, + 0x2664fd38, 0xb59c09fe, 0x7412d63e, 0xedf0b03f, 0x2c7e6fff, + 0x05457a7c, 0xc4cba5bc, 0x5d29c3bd, 0x9ca71c7d, 0x2735a3a7, + 0xe6bb7c67, 0x7f591a66, 0xbed7c5a6, 0x97ecd025, 0x56620fe5, + 0xcf8069e4, 0x0e0eb624, 0x9df642e2, 0x5c789d22, 0xc59afb23, + 0x041424e3, 0x2d2f3160, 0xeca1eea0, 0x754388a1, 0xb4cd5761, + 0x89c3676c, 0x484db8ac, 0xd1afdead, 0x1021016d, 0x391a14ee, + 0xf894cb2e, 0x6176ad2f, 0xa0f872ef, 0x33008629, 0xf28e59e9, + 0x6b6c3fe8, 0xaae2e028, 0x83d9f5ab, 0x42572a6b, 0xdbb54c6a, + 0x1a3b93aa}, + {0x00000000, 0xefc26b3e, 0x04f5d03d, 0xeb37bb03, 0x09eba07a, + 0xe629cb44, 0x0d1e7047, 0xe2dc1b79, 0x13d740f4, 0xfc152bca, + 0x172290c9, 0xf8e0fbf7, 0x1a3ce08e, 0xf5fe8bb0, 0x1ec930b3, + 0xf10b5b8d, 0x27ae81e8, 0xc86cead6, 0x235b51d5, 0xcc993aeb, + 0x2e452192, 0xc1874aac, 0x2ab0f1af, 0xc5729a91, 0x3479c11c, + 0xdbbbaa22, 0x308c1121, 0xdf4e7a1f, 0x3d926166, 0xd2500a58, + 0x3967b15b, 0xd6a5da65, 0x4f5d03d0, 0xa09f68ee, 0x4ba8d3ed, + 0xa46ab8d3, 0x46b6a3aa, 0xa974c894, 0x42437397, 0xad8118a9, + 0x5c8a4324, 0xb348281a, 0x587f9319, 0xb7bdf827, 0x5561e35e, + 0xbaa38860, 0x51943363, 0xbe56585d, 0x68f38238, 0x8731e906, + 0x6c065205, 0x83c4393b, 0x61182242, 0x8eda497c, 0x65edf27f, + 0x8a2f9941, 0x7b24c2cc, 0x94e6a9f2, 0x7fd112f1, 0x901379cf, + 0x72cf62b6, 0x9d0d0988, 0x763ab28b, 0x99f8d9b5, 0x9eba07a0, + 0x71786c9e, 0x9a4fd79d, 0x758dbca3, 0x9751a7da, 0x7893cce4, + 0x93a477e7, 0x7c661cd9, 0x8d6d4754, 0x62af2c6a, 0x89989769, + 0x665afc57, 0x8486e72e, 0x6b448c10, 0x80733713, 0x6fb15c2d, + 0xb9148648, 0x56d6ed76, 0xbde15675, 0x52233d4b, 0xb0ff2632, + 0x5f3d4d0c, 0xb40af60f, 0x5bc89d31, 0xaac3c6bc, 0x4501ad82, + 0xae361681, 0x41f47dbf, 0xa32866c6, 0x4cea0df8, 0xa7ddb6fb, + 0x481fddc5, 0xd1e70470, 0x3e256f4e, 0xd512d44d, 0x3ad0bf73, + 0xd80ca40a, 0x37cecf34, 0xdcf97437, 0x333b1f09, 0xc2304484, + 0x2df22fba, 0xc6c594b9, 0x2907ff87, 0xcbdbe4fe, 0x24198fc0, + 0xcf2e34c3, 0x20ec5ffd, 0xf6498598, 0x198beea6, 0xf2bc55a5, + 0x1d7e3e9b, 0xffa225e2, 0x10604edc, 0xfb57f5df, 0x14959ee1, + 0xe59ec56c, 0x0a5cae52, 0xe16b1551, 0x0ea97e6f, 0xec756516, + 0x03b70e28, 0xe880b52b, 0x0742de15, 0xe6050901, 0x09c7623f, + 0xe2f0d93c, 0x0d32b202, 0xefeea97b, 0x002cc245, 0xeb1b7946, + 0x04d91278, 0xf5d249f5, 0x1a1022cb, 0xf12799c8, 0x1ee5f2f6, + 0xfc39e98f, 0x13fb82b1, 0xf8cc39b2, 0x170e528c, 0xc1ab88e9, + 0x2e69e3d7, 0xc55e58d4, 0x2a9c33ea, 0xc8402893, 0x278243ad, + 0xccb5f8ae, 0x23779390, 0xd27cc81d, 0x3dbea323, 0xd6891820, + 0x394b731e, 0xdb976867, 0x34550359, 0xdf62b85a, 0x30a0d364, + 0xa9580ad1, 0x469a61ef, 0xadaddaec, 0x426fb1d2, 0xa0b3aaab, + 0x4f71c195, 0xa4467a96, 0x4b8411a8, 0xba8f4a25, 0x554d211b, + 0xbe7a9a18, 0x51b8f126, 0xb364ea5f, 0x5ca68161, 0xb7913a62, + 0x5853515c, 0x8ef68b39, 0x6134e007, 0x8a035b04, 0x65c1303a, + 0x871d2b43, 0x68df407d, 0x83e8fb7e, 0x6c2a9040, 0x9d21cbcd, + 0x72e3a0f3, 0x99d41bf0, 0x761670ce, 0x94ca6bb7, 0x7b080089, + 0x903fbb8a, 0x7ffdd0b4, 0x78bf0ea1, 0x977d659f, 0x7c4ade9c, + 0x9388b5a2, 0x7154aedb, 0x9e96c5e5, 0x75a17ee6, 0x9a6315d8, + 0x6b684e55, 0x84aa256b, 0x6f9d9e68, 0x805ff556, 0x6283ee2f, + 0x8d418511, 0x66763e12, 0x89b4552c, 0x5f118f49, 0xb0d3e477, + 0x5be45f74, 0xb426344a, 0x56fa2f33, 0xb938440d, 0x520fff0e, + 0xbdcd9430, 0x4cc6cfbd, 0xa304a483, 0x48331f80, 0xa7f174be, + 0x452d6fc7, 0xaaef04f9, 0x41d8bffa, 0xae1ad4c4, 0x37e20d71, + 0xd820664f, 0x3317dd4c, 0xdcd5b672, 0x3e09ad0b, 0xd1cbc635, + 0x3afc7d36, 0xd53e1608, 0x24354d85, 0xcbf726bb, 0x20c09db8, + 0xcf02f686, 0x2ddeedff, 0xc21c86c1, 0x292b3dc2, 0xc6e956fc, + 0x104c8c99, 0xff8ee7a7, 0x14b95ca4, 0xfb7b379a, 0x19a72ce3, + 0xf66547dd, 0x1d52fcde, 0xf29097e0, 0x039bcc6d, 0xec59a753, + 0x076e1c50, 0xe8ac776e, 0x0a706c17, 0xe5b20729, 0x0e85bc2a, + 0xe147d714}, + {0x00000000, 0x177b1443, 0x2ef62886, 0x398d3cc5, 0x5dec510c, + 0x4a97454f, 0x731a798a, 0x64616dc9, 0xbbd8a218, 0xaca3b65b, + 0x952e8a9e, 0x82559edd, 0xe634f314, 0xf14fe757, 0xc8c2db92, + 0xdfb9cfd1, 0xacc04271, 0xbbbb5632, 0x82366af7, 0x954d7eb4, + 0xf12c137d, 0xe657073e, 0xdfda3bfb, 0xc8a12fb8, 0x1718e069, + 0x0063f42a, 0x39eec8ef, 0x2e95dcac, 0x4af4b165, 0x5d8fa526, + 0x640299e3, 0x73798da0, 0x82f182a3, 0x958a96e0, 0xac07aa25, + 0xbb7cbe66, 0xdf1dd3af, 0xc866c7ec, 0xf1ebfb29, 0xe690ef6a, + 0x392920bb, 0x2e5234f8, 0x17df083d, 0x00a41c7e, 0x64c571b7, + 0x73be65f4, 0x4a335931, 0x5d484d72, 0x2e31c0d2, 0x394ad491, + 0x00c7e854, 0x17bcfc17, 0x73dd91de, 0x64a6859d, 0x5d2bb958, + 0x4a50ad1b, 0x95e962ca, 0x82927689, 0xbb1f4a4c, 0xac645e0f, + 0xc80533c6, 0xdf7e2785, 0xe6f31b40, 0xf1880f03, 0xde920307, + 0xc9e91744, 0xf0642b81, 0xe71f3fc2, 0x837e520b, 0x94054648, + 0xad887a8d, 0xbaf36ece, 0x654aa11f, 0x7231b55c, 0x4bbc8999, + 0x5cc79dda, 0x38a6f013, 0x2fdde450, 0x1650d895, 0x012bccd6, + 0x72524176, 0x65295535, 0x5ca469f0, 0x4bdf7db3, 0x2fbe107a, + 0x38c50439, 0x014838fc, 0x16332cbf, 0xc98ae36e, 0xdef1f72d, + 0xe77ccbe8, 0xf007dfab, 0x9466b262, 0x831da621, 0xba909ae4, + 0xadeb8ea7, 0x5c6381a4, 0x4b1895e7, 0x7295a922, 0x65eebd61, + 0x018fd0a8, 0x16f4c4eb, 0x2f79f82e, 0x3802ec6d, 0xe7bb23bc, + 0xf0c037ff, 0xc94d0b3a, 0xde361f79, 0xba5772b0, 0xad2c66f3, + 0x94a15a36, 0x83da4e75, 0xf0a3c3d5, 0xe7d8d796, 0xde55eb53, + 0xc92eff10, 0xad4f92d9, 0xba34869a, 0x83b9ba5f, 0x94c2ae1c, + 0x4b7b61cd, 0x5c00758e, 0x658d494b, 0x72f65d08, 0x169730c1, + 0x01ec2482, 0x38611847, 0x2f1a0c04, 0x6655004f, 0x712e140c, + 0x48a328c9, 0x5fd83c8a, 0x3bb95143, 0x2cc24500, 0x154f79c5, + 0x02346d86, 0xdd8da257, 0xcaf6b614, 0xf37b8ad1, 0xe4009e92, + 0x8061f35b, 0x971ae718, 0xae97dbdd, 0xb9eccf9e, 0xca95423e, + 0xddee567d, 0xe4636ab8, 0xf3187efb, 0x97791332, 0x80020771, + 0xb98f3bb4, 0xaef42ff7, 0x714de026, 0x6636f465, 0x5fbbc8a0, + 0x48c0dce3, 0x2ca1b12a, 0x3bdaa569, 0x025799ac, 0x152c8def, + 0xe4a482ec, 0xf3df96af, 0xca52aa6a, 0xdd29be29, 0xb948d3e0, + 0xae33c7a3, 0x97befb66, 0x80c5ef25, 0x5f7c20f4, 0x480734b7, + 0x718a0872, 0x66f11c31, 0x029071f8, 0x15eb65bb, 0x2c66597e, + 0x3b1d4d3d, 0x4864c09d, 0x5f1fd4de, 0x6692e81b, 0x71e9fc58, + 0x15889191, 0x02f385d2, 0x3b7eb917, 0x2c05ad54, 0xf3bc6285, + 0xe4c776c6, 0xdd4a4a03, 0xca315e40, 0xae503389, 0xb92b27ca, + 0x80a61b0f, 0x97dd0f4c, 0xb8c70348, 0xafbc170b, 0x96312bce, + 0x814a3f8d, 0xe52b5244, 0xf2504607, 0xcbdd7ac2, 0xdca66e81, + 0x031fa150, 0x1464b513, 0x2de989d6, 0x3a929d95, 0x5ef3f05c, + 0x4988e41f, 0x7005d8da, 0x677ecc99, 0x14074139, 0x037c557a, + 0x3af169bf, 0x2d8a7dfc, 0x49eb1035, 0x5e900476, 0x671d38b3, + 0x70662cf0, 0xafdfe321, 0xb8a4f762, 0x8129cba7, 0x9652dfe4, + 0xf233b22d, 0xe548a66e, 0xdcc59aab, 0xcbbe8ee8, 0x3a3681eb, + 0x2d4d95a8, 0x14c0a96d, 0x03bbbd2e, 0x67dad0e7, 0x70a1c4a4, + 0x492cf861, 0x5e57ec22, 0x81ee23f3, 0x969537b0, 0xaf180b75, + 0xb8631f36, 0xdc0272ff, 0xcb7966bc, 0xf2f45a79, 0xe58f4e3a, + 0x96f6c39a, 0x818dd7d9, 0xb800eb1c, 0xaf7bff5f, 0xcb1a9296, + 0xdc6186d5, 0xe5ecba10, 0xf297ae53, 0x2d2e6182, 0x3a5575c1, + 0x03d84904, 0x14a35d47, 0x70c2308e, 0x67b924cd, 0x5e341808, + 0x494f0c4b}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x0000000000000000, 0x43147b1700000000, 0x8628f62e00000000, + 0xc53c8d3900000000, 0x0c51ec5d00000000, 0x4f45974a00000000, + 0x8a791a7300000000, 0xc96d616400000000, 0x18a2d8bb00000000, + 0x5bb6a3ac00000000, 0x9e8a2e9500000000, 0xdd9e558200000000, + 0x14f334e600000000, 0x57e74ff100000000, 0x92dbc2c800000000, + 0xd1cfb9df00000000, 0x7142c0ac00000000, 0x3256bbbb00000000, + 0xf76a368200000000, 0xb47e4d9500000000, 0x7d132cf100000000, + 0x3e0757e600000000, 0xfb3bdadf00000000, 0xb82fa1c800000000, + 0x69e0181700000000, 0x2af4630000000000, 0xefc8ee3900000000, + 0xacdc952e00000000, 0x65b1f44a00000000, 0x26a58f5d00000000, + 0xe399026400000000, 0xa08d797300000000, 0xa382f18200000000, + 0xe0968a9500000000, 0x25aa07ac00000000, 0x66be7cbb00000000, + 0xafd31ddf00000000, 0xecc766c800000000, 0x29fbebf100000000, + 0x6aef90e600000000, 0xbb20293900000000, 0xf834522e00000000, + 0x3d08df1700000000, 0x7e1ca40000000000, 0xb771c56400000000, + 0xf465be7300000000, 0x3159334a00000000, 0x724d485d00000000, + 0xd2c0312e00000000, 0x91d44a3900000000, 0x54e8c70000000000, + 0x17fcbc1700000000, 0xde91dd7300000000, 0x9d85a66400000000, + 0x58b92b5d00000000, 0x1bad504a00000000, 0xca62e99500000000, + 0x8976928200000000, 0x4c4a1fbb00000000, 0x0f5e64ac00000000, + 0xc63305c800000000, 0x85277edf00000000, 0x401bf3e600000000, + 0x030f88f100000000, 0x070392de00000000, 0x4417e9c900000000, + 0x812b64f000000000, 0xc23f1fe700000000, 0x0b527e8300000000, + 0x4846059400000000, 0x8d7a88ad00000000, 0xce6ef3ba00000000, + 0x1fa14a6500000000, 0x5cb5317200000000, 0x9989bc4b00000000, + 0xda9dc75c00000000, 0x13f0a63800000000, 0x50e4dd2f00000000, + 0x95d8501600000000, 0xd6cc2b0100000000, 0x7641527200000000, + 0x3555296500000000, 0xf069a45c00000000, 0xb37ddf4b00000000, + 0x7a10be2f00000000, 0x3904c53800000000, 0xfc38480100000000, + 0xbf2c331600000000, 0x6ee38ac900000000, 0x2df7f1de00000000, + 0xe8cb7ce700000000, 0xabdf07f000000000, 0x62b2669400000000, + 0x21a61d8300000000, 0xe49a90ba00000000, 0xa78eebad00000000, + 0xa481635c00000000, 0xe795184b00000000, 0x22a9957200000000, + 0x61bdee6500000000, 0xa8d08f0100000000, 0xebc4f41600000000, + 0x2ef8792f00000000, 0x6dec023800000000, 0xbc23bbe700000000, + 0xff37c0f000000000, 0x3a0b4dc900000000, 0x791f36de00000000, + 0xb07257ba00000000, 0xf3662cad00000000, 0x365aa19400000000, + 0x754eda8300000000, 0xd5c3a3f000000000, 0x96d7d8e700000000, + 0x53eb55de00000000, 0x10ff2ec900000000, 0xd9924fad00000000, + 0x9a8634ba00000000, 0x5fbab98300000000, 0x1caec29400000000, + 0xcd617b4b00000000, 0x8e75005c00000000, 0x4b498d6500000000, + 0x085df67200000000, 0xc130971600000000, 0x8224ec0100000000, + 0x4718613800000000, 0x040c1a2f00000000, 0x4f00556600000000, + 0x0c142e7100000000, 0xc928a34800000000, 0x8a3cd85f00000000, + 0x4351b93b00000000, 0x0045c22c00000000, 0xc5794f1500000000, + 0x866d340200000000, 0x57a28ddd00000000, 0x14b6f6ca00000000, + 0xd18a7bf300000000, 0x929e00e400000000, 0x5bf3618000000000, + 0x18e71a9700000000, 0xdddb97ae00000000, 0x9ecfecb900000000, + 0x3e4295ca00000000, 0x7d56eedd00000000, 0xb86a63e400000000, + 0xfb7e18f300000000, 0x3213799700000000, 0x7107028000000000, + 0xb43b8fb900000000, 0xf72ff4ae00000000, 0x26e04d7100000000, + 0x65f4366600000000, 0xa0c8bb5f00000000, 0xe3dcc04800000000, + 0x2ab1a12c00000000, 0x69a5da3b00000000, 0xac99570200000000, + 0xef8d2c1500000000, 0xec82a4e400000000, 0xaf96dff300000000, + 0x6aaa52ca00000000, 0x29be29dd00000000, 0xe0d348b900000000, + 0xa3c733ae00000000, 0x66fbbe9700000000, 0x25efc58000000000, + 0xf4207c5f00000000, 0xb734074800000000, 0x72088a7100000000, + 0x311cf16600000000, 0xf871900200000000, 0xbb65eb1500000000, + 0x7e59662c00000000, 0x3d4d1d3b00000000, 0x9dc0644800000000, + 0xded41f5f00000000, 0x1be8926600000000, 0x58fce97100000000, + 0x9191881500000000, 0xd285f30200000000, 0x17b97e3b00000000, + 0x54ad052c00000000, 0x8562bcf300000000, 0xc676c7e400000000, + 0x034a4add00000000, 0x405e31ca00000000, 0x893350ae00000000, + 0xca272bb900000000, 0x0f1ba68000000000, 0x4c0fdd9700000000, + 0x4803c7b800000000, 0x0b17bcaf00000000, 0xce2b319600000000, + 0x8d3f4a8100000000, 0x44522be500000000, 0x074650f200000000, + 0xc27addcb00000000, 0x816ea6dc00000000, 0x50a11f0300000000, + 0x13b5641400000000, 0xd689e92d00000000, 0x959d923a00000000, + 0x5cf0f35e00000000, 0x1fe4884900000000, 0xdad8057000000000, + 0x99cc7e6700000000, 0x3941071400000000, 0x7a557c0300000000, + 0xbf69f13a00000000, 0xfc7d8a2d00000000, 0x3510eb4900000000, + 0x7604905e00000000, 0xb3381d6700000000, 0xf02c667000000000, + 0x21e3dfaf00000000, 0x62f7a4b800000000, 0xa7cb298100000000, + 0xe4df529600000000, 0x2db233f200000000, 0x6ea648e500000000, + 0xab9ac5dc00000000, 0xe88ebecb00000000, 0xeb81363a00000000, + 0xa8954d2d00000000, 0x6da9c01400000000, 0x2ebdbb0300000000, + 0xe7d0da6700000000, 0xa4c4a17000000000, 0x61f82c4900000000, + 0x22ec575e00000000, 0xf323ee8100000000, 0xb037959600000000, + 0x750b18af00000000, 0x361f63b800000000, 0xff7202dc00000000, + 0xbc6679cb00000000, 0x795af4f200000000, 0x3a4e8fe500000000, + 0x9ac3f69600000000, 0xd9d78d8100000000, 0x1ceb00b800000000, + 0x5fff7baf00000000, 0x96921acb00000000, 0xd58661dc00000000, + 0x10baece500000000, 0x53ae97f200000000, 0x82612e2d00000000, + 0xc175553a00000000, 0x0449d80300000000, 0x475da31400000000, + 0x8e30c27000000000, 0xcd24b96700000000, 0x0818345e00000000, + 0x4b0c4f4900000000}, + {0x0000000000000000, 0x3e6bc2ef00000000, 0x3dd0f50400000000, + 0x03bb37eb00000000, 0x7aa0eb0900000000, 0x44cb29e600000000, + 0x47701e0d00000000, 0x791bdce200000000, 0xf440d71300000000, + 0xca2b15fc00000000, 0xc990221700000000, 0xf7fbe0f800000000, + 0x8ee03c1a00000000, 0xb08bfef500000000, 0xb330c91e00000000, + 0x8d5b0bf100000000, 0xe881ae2700000000, 0xd6ea6cc800000000, + 0xd5515b2300000000, 0xeb3a99cc00000000, 0x9221452e00000000, + 0xac4a87c100000000, 0xaff1b02a00000000, 0x919a72c500000000, + 0x1cc1793400000000, 0x22aabbdb00000000, 0x21118c3000000000, + 0x1f7a4edf00000000, 0x6661923d00000000, 0x580a50d200000000, + 0x5bb1673900000000, 0x65daa5d600000000, 0xd0035d4f00000000, + 0xee689fa000000000, 0xedd3a84b00000000, 0xd3b86aa400000000, + 0xaaa3b64600000000, 0x94c874a900000000, 0x9773434200000000, + 0xa91881ad00000000, 0x24438a5c00000000, 0x1a2848b300000000, + 0x19937f5800000000, 0x27f8bdb700000000, 0x5ee3615500000000, + 0x6088a3ba00000000, 0x6333945100000000, 0x5d5856be00000000, + 0x3882f36800000000, 0x06e9318700000000, 0x0552066c00000000, + 0x3b39c48300000000, 0x4222186100000000, 0x7c49da8e00000000, + 0x7ff2ed6500000000, 0x41992f8a00000000, 0xccc2247b00000000, + 0xf2a9e69400000000, 0xf112d17f00000000, 0xcf79139000000000, + 0xb662cf7200000000, 0x88090d9d00000000, 0x8bb23a7600000000, + 0xb5d9f89900000000, 0xa007ba9e00000000, 0x9e6c787100000000, + 0x9dd74f9a00000000, 0xa3bc8d7500000000, 0xdaa7519700000000, + 0xe4cc937800000000, 0xe777a49300000000, 0xd91c667c00000000, + 0x54476d8d00000000, 0x6a2caf6200000000, 0x6997988900000000, + 0x57fc5a6600000000, 0x2ee7868400000000, 0x108c446b00000000, + 0x1337738000000000, 0x2d5cb16f00000000, 0x488614b900000000, + 0x76edd65600000000, 0x7556e1bd00000000, 0x4b3d235200000000, + 0x3226ffb000000000, 0x0c4d3d5f00000000, 0x0ff60ab400000000, + 0x319dc85b00000000, 0xbcc6c3aa00000000, 0x82ad014500000000, + 0x811636ae00000000, 0xbf7df44100000000, 0xc66628a300000000, + 0xf80dea4c00000000, 0xfbb6dda700000000, 0xc5dd1f4800000000, + 0x7004e7d100000000, 0x4e6f253e00000000, 0x4dd412d500000000, + 0x73bfd03a00000000, 0x0aa40cd800000000, 0x34cfce3700000000, + 0x3774f9dc00000000, 0x091f3b3300000000, 0x844430c200000000, + 0xba2ff22d00000000, 0xb994c5c600000000, 0x87ff072900000000, + 0xfee4dbcb00000000, 0xc08f192400000000, 0xc3342ecf00000000, + 0xfd5fec2000000000, 0x988549f600000000, 0xa6ee8b1900000000, + 0xa555bcf200000000, 0x9b3e7e1d00000000, 0xe225a2ff00000000, + 0xdc4e601000000000, 0xdff557fb00000000, 0xe19e951400000000, + 0x6cc59ee500000000, 0x52ae5c0a00000000, 0x51156be100000000, + 0x6f7ea90e00000000, 0x166575ec00000000, 0x280eb70300000000, + 0x2bb580e800000000, 0x15de420700000000, 0x010905e600000000, + 0x3f62c70900000000, 0x3cd9f0e200000000, 0x02b2320d00000000, + 0x7ba9eeef00000000, 0x45c22c0000000000, 0x46791beb00000000, + 0x7812d90400000000, 0xf549d2f500000000, 0xcb22101a00000000, + 0xc89927f100000000, 0xf6f2e51e00000000, 0x8fe939fc00000000, + 0xb182fb1300000000, 0xb239ccf800000000, 0x8c520e1700000000, + 0xe988abc100000000, 0xd7e3692e00000000, 0xd4585ec500000000, + 0xea339c2a00000000, 0x932840c800000000, 0xad43822700000000, + 0xaef8b5cc00000000, 0x9093772300000000, 0x1dc87cd200000000, + 0x23a3be3d00000000, 0x201889d600000000, 0x1e734b3900000000, + 0x676897db00000000, 0x5903553400000000, 0x5ab862df00000000, + 0x64d3a03000000000, 0xd10a58a900000000, 0xef619a4600000000, + 0xecdaadad00000000, 0xd2b16f4200000000, 0xabaab3a000000000, + 0x95c1714f00000000, 0x967a46a400000000, 0xa811844b00000000, + 0x254a8fba00000000, 0x1b214d5500000000, 0x189a7abe00000000, + 0x26f1b85100000000, 0x5fea64b300000000, 0x6181a65c00000000, + 0x623a91b700000000, 0x5c51535800000000, 0x398bf68e00000000, + 0x07e0346100000000, 0x045b038a00000000, 0x3a30c16500000000, + 0x432b1d8700000000, 0x7d40df6800000000, 0x7efbe88300000000, + 0x40902a6c00000000, 0xcdcb219d00000000, 0xf3a0e37200000000, + 0xf01bd49900000000, 0xce70167600000000, 0xb76bca9400000000, + 0x8900087b00000000, 0x8abb3f9000000000, 0xb4d0fd7f00000000, + 0xa10ebf7800000000, 0x9f657d9700000000, 0x9cde4a7c00000000, + 0xa2b5889300000000, 0xdbae547100000000, 0xe5c5969e00000000, + 0xe67ea17500000000, 0xd815639a00000000, 0x554e686b00000000, + 0x6b25aa8400000000, 0x689e9d6f00000000, 0x56f55f8000000000, + 0x2fee836200000000, 0x1185418d00000000, 0x123e766600000000, + 0x2c55b48900000000, 0x498f115f00000000, 0x77e4d3b000000000, + 0x745fe45b00000000, 0x4a3426b400000000, 0x332ffa5600000000, + 0x0d4438b900000000, 0x0eff0f5200000000, 0x3094cdbd00000000, + 0xbdcfc64c00000000, 0x83a404a300000000, 0x801f334800000000, + 0xbe74f1a700000000, 0xc76f2d4500000000, 0xf904efaa00000000, + 0xfabfd84100000000, 0xc4d41aae00000000, 0x710de23700000000, + 0x4f6620d800000000, 0x4cdd173300000000, 0x72b6d5dc00000000, + 0x0bad093e00000000, 0x35c6cbd100000000, 0x367dfc3a00000000, + 0x08163ed500000000, 0x854d352400000000, 0xbb26f7cb00000000, + 0xb89dc02000000000, 0x86f602cf00000000, 0xffedde2d00000000, + 0xc1861cc200000000, 0xc23d2b2900000000, 0xfc56e9c600000000, + 0x998c4c1000000000, 0xa7e78eff00000000, 0xa45cb91400000000, + 0x9a377bfb00000000, 0xe32ca71900000000, 0xdd4765f600000000, + 0xdefc521d00000000, 0xe09790f200000000, 0x6dcc9b0300000000, + 0x53a759ec00000000, 0x501c6e0700000000, 0x6e77ace800000000, + 0x176c700a00000000, 0x2907b2e500000000, 0x2abc850e00000000, + 0x14d747e100000000}, + {0x0000000000000000, 0xc0df8ec100000000, 0xc1b96c5800000000, + 0x0166e29900000000, 0x8273d9b000000000, 0x42ac577100000000, + 0x43cab5e800000000, 0x83153b2900000000, 0x45e1c3ba00000000, + 0x853e4d7b00000000, 0x8458afe200000000, 0x4487212300000000, + 0xc7921a0a00000000, 0x074d94cb00000000, 0x062b765200000000, + 0xc6f4f89300000000, 0xcbc4f6ae00000000, 0x0b1b786f00000000, + 0x0a7d9af600000000, 0xcaa2143700000000, 0x49b72f1e00000000, + 0x8968a1df00000000, 0x880e434600000000, 0x48d1cd8700000000, + 0x8e25351400000000, 0x4efabbd500000000, 0x4f9c594c00000000, + 0x8f43d78d00000000, 0x0c56eca400000000, 0xcc89626500000000, + 0xcdef80fc00000000, 0x0d300e3d00000000, 0xd78f9c8600000000, + 0x1750124700000000, 0x1636f0de00000000, 0xd6e97e1f00000000, + 0x55fc453600000000, 0x9523cbf700000000, 0x9445296e00000000, + 0x549aa7af00000000, 0x926e5f3c00000000, 0x52b1d1fd00000000, + 0x53d7336400000000, 0x9308bda500000000, 0x101d868c00000000, + 0xd0c2084d00000000, 0xd1a4ead400000000, 0x117b641500000000, + 0x1c4b6a2800000000, 0xdc94e4e900000000, 0xddf2067000000000, + 0x1d2d88b100000000, 0x9e38b39800000000, 0x5ee73d5900000000, + 0x5f81dfc000000000, 0x9f5e510100000000, 0x59aaa99200000000, + 0x9975275300000000, 0x9813c5ca00000000, 0x58cc4b0b00000000, + 0xdbd9702200000000, 0x1b06fee300000000, 0x1a601c7a00000000, + 0xdabf92bb00000000, 0xef1948d600000000, 0x2fc6c61700000000, + 0x2ea0248e00000000, 0xee7faa4f00000000, 0x6d6a916600000000, + 0xadb51fa700000000, 0xacd3fd3e00000000, 0x6c0c73ff00000000, + 0xaaf88b6c00000000, 0x6a2705ad00000000, 0x6b41e73400000000, + 0xab9e69f500000000, 0x288b52dc00000000, 0xe854dc1d00000000, + 0xe9323e8400000000, 0x29edb04500000000, 0x24ddbe7800000000, + 0xe40230b900000000, 0xe564d22000000000, 0x25bb5ce100000000, + 0xa6ae67c800000000, 0x6671e90900000000, 0x67170b9000000000, + 0xa7c8855100000000, 0x613c7dc200000000, 0xa1e3f30300000000, + 0xa085119a00000000, 0x605a9f5b00000000, 0xe34fa47200000000, + 0x23902ab300000000, 0x22f6c82a00000000, 0xe22946eb00000000, + 0x3896d45000000000, 0xf8495a9100000000, 0xf92fb80800000000, + 0x39f036c900000000, 0xbae50de000000000, 0x7a3a832100000000, + 0x7b5c61b800000000, 0xbb83ef7900000000, 0x7d7717ea00000000, + 0xbda8992b00000000, 0xbcce7bb200000000, 0x7c11f57300000000, + 0xff04ce5a00000000, 0x3fdb409b00000000, 0x3ebda20200000000, + 0xfe622cc300000000, 0xf35222fe00000000, 0x338dac3f00000000, + 0x32eb4ea600000000, 0xf234c06700000000, 0x7121fb4e00000000, + 0xb1fe758f00000000, 0xb098971600000000, 0x704719d700000000, + 0xb6b3e14400000000, 0x766c6f8500000000, 0x770a8d1c00000000, + 0xb7d503dd00000000, 0x34c038f400000000, 0xf41fb63500000000, + 0xf57954ac00000000, 0x35a6da6d00000000, 0x9f35e17700000000, + 0x5fea6fb600000000, 0x5e8c8d2f00000000, 0x9e5303ee00000000, + 0x1d4638c700000000, 0xdd99b60600000000, 0xdcff549f00000000, + 0x1c20da5e00000000, 0xdad422cd00000000, 0x1a0bac0c00000000, + 0x1b6d4e9500000000, 0xdbb2c05400000000, 0x58a7fb7d00000000, + 0x987875bc00000000, 0x991e972500000000, 0x59c119e400000000, + 0x54f117d900000000, 0x942e991800000000, 0x95487b8100000000, + 0x5597f54000000000, 0xd682ce6900000000, 0x165d40a800000000, + 0x173ba23100000000, 0xd7e42cf000000000, 0x1110d46300000000, + 0xd1cf5aa200000000, 0xd0a9b83b00000000, 0x107636fa00000000, + 0x93630dd300000000, 0x53bc831200000000, 0x52da618b00000000, + 0x9205ef4a00000000, 0x48ba7df100000000, 0x8865f33000000000, + 0x890311a900000000, 0x49dc9f6800000000, 0xcac9a44100000000, + 0x0a162a8000000000, 0x0b70c81900000000, 0xcbaf46d800000000, + 0x0d5bbe4b00000000, 0xcd84308a00000000, 0xcce2d21300000000, + 0x0c3d5cd200000000, 0x8f2867fb00000000, 0x4ff7e93a00000000, + 0x4e910ba300000000, 0x8e4e856200000000, 0x837e8b5f00000000, + 0x43a1059e00000000, 0x42c7e70700000000, 0x821869c600000000, + 0x010d52ef00000000, 0xc1d2dc2e00000000, 0xc0b43eb700000000, + 0x006bb07600000000, 0xc69f48e500000000, 0x0640c62400000000, + 0x072624bd00000000, 0xc7f9aa7c00000000, 0x44ec915500000000, + 0x84331f9400000000, 0x8555fd0d00000000, 0x458a73cc00000000, + 0x702ca9a100000000, 0xb0f3276000000000, 0xb195c5f900000000, + 0x714a4b3800000000, 0xf25f701100000000, 0x3280fed000000000, + 0x33e61c4900000000, 0xf339928800000000, 0x35cd6a1b00000000, + 0xf512e4da00000000, 0xf474064300000000, 0x34ab888200000000, + 0xb7beb3ab00000000, 0x77613d6a00000000, 0x7607dff300000000, + 0xb6d8513200000000, 0xbbe85f0f00000000, 0x7b37d1ce00000000, + 0x7a51335700000000, 0xba8ebd9600000000, 0x399b86bf00000000, + 0xf944087e00000000, 0xf822eae700000000, 0x38fd642600000000, + 0xfe099cb500000000, 0x3ed6127400000000, 0x3fb0f0ed00000000, + 0xff6f7e2c00000000, 0x7c7a450500000000, 0xbca5cbc400000000, + 0xbdc3295d00000000, 0x7d1ca79c00000000, 0xa7a3352700000000, + 0x677cbbe600000000, 0x661a597f00000000, 0xa6c5d7be00000000, + 0x25d0ec9700000000, 0xe50f625600000000, 0xe46980cf00000000, + 0x24b60e0e00000000, 0xe242f69d00000000, 0x229d785c00000000, + 0x23fb9ac500000000, 0xe324140400000000, 0x60312f2d00000000, + 0xa0eea1ec00000000, 0xa188437500000000, 0x6157cdb400000000, + 0x6c67c38900000000, 0xacb84d4800000000, 0xaddeafd100000000, + 0x6d01211000000000, 0xee141a3900000000, 0x2ecb94f800000000, + 0x2fad766100000000, 0xef72f8a000000000, 0x2986003300000000, + 0xe9598ef200000000, 0xe83f6c6b00000000, 0x28e0e2aa00000000, + 0xabf5d98300000000, 0x6b2a574200000000, 0x6a4cb5db00000000, + 0xaa933b1a00000000}, + {0x0000000000000000, 0x6f4ca59b00000000, 0x9f9e3bec00000000, + 0xf0d29e7700000000, 0x7f3b060300000000, 0x1077a39800000000, + 0xe0a53def00000000, 0x8fe9987400000000, 0xfe760c0600000000, + 0x913aa99d00000000, 0x61e837ea00000000, 0x0ea4927100000000, + 0x814d0a0500000000, 0xee01af9e00000000, 0x1ed331e900000000, + 0x719f947200000000, 0xfced180c00000000, 0x93a1bd9700000000, + 0x637323e000000000, 0x0c3f867b00000000, 0x83d61e0f00000000, + 0xec9abb9400000000, 0x1c4825e300000000, 0x7304807800000000, + 0x029b140a00000000, 0x6dd7b19100000000, 0x9d052fe600000000, + 0xf2498a7d00000000, 0x7da0120900000000, 0x12ecb79200000000, + 0xe23e29e500000000, 0x8d728c7e00000000, 0xf8db311800000000, + 0x9797948300000000, 0x67450af400000000, 0x0809af6f00000000, + 0x87e0371b00000000, 0xe8ac928000000000, 0x187e0cf700000000, + 0x7732a96c00000000, 0x06ad3d1e00000000, 0x69e1988500000000, + 0x993306f200000000, 0xf67fa36900000000, 0x79963b1d00000000, + 0x16da9e8600000000, 0xe60800f100000000, 0x8944a56a00000000, + 0x0436291400000000, 0x6b7a8c8f00000000, 0x9ba812f800000000, + 0xf4e4b76300000000, 0x7b0d2f1700000000, 0x14418a8c00000000, + 0xe49314fb00000000, 0x8bdfb16000000000, 0xfa40251200000000, + 0x950c808900000000, 0x65de1efe00000000, 0x0a92bb6500000000, + 0x857b231100000000, 0xea37868a00000000, 0x1ae518fd00000000, + 0x75a9bd6600000000, 0xf0b7633000000000, 0x9ffbc6ab00000000, + 0x6f2958dc00000000, 0x0065fd4700000000, 0x8f8c653300000000, + 0xe0c0c0a800000000, 0x10125edf00000000, 0x7f5efb4400000000, + 0x0ec16f3600000000, 0x618dcaad00000000, 0x915f54da00000000, + 0xfe13f14100000000, 0x71fa693500000000, 0x1eb6ccae00000000, + 0xee6452d900000000, 0x8128f74200000000, 0x0c5a7b3c00000000, + 0x6316dea700000000, 0x93c440d000000000, 0xfc88e54b00000000, + 0x73617d3f00000000, 0x1c2dd8a400000000, 0xecff46d300000000, + 0x83b3e34800000000, 0xf22c773a00000000, 0x9d60d2a100000000, + 0x6db24cd600000000, 0x02fee94d00000000, 0x8d17713900000000, + 0xe25bd4a200000000, 0x12894ad500000000, 0x7dc5ef4e00000000, + 0x086c522800000000, 0x6720f7b300000000, 0x97f269c400000000, + 0xf8becc5f00000000, 0x7757542b00000000, 0x181bf1b000000000, + 0xe8c96fc700000000, 0x8785ca5c00000000, 0xf61a5e2e00000000, + 0x9956fbb500000000, 0x698465c200000000, 0x06c8c05900000000, + 0x8921582d00000000, 0xe66dfdb600000000, 0x16bf63c100000000, + 0x79f3c65a00000000, 0xf4814a2400000000, 0x9bcdefbf00000000, + 0x6b1f71c800000000, 0x0453d45300000000, 0x8bba4c2700000000, + 0xe4f6e9bc00000000, 0x142477cb00000000, 0x7b68d25000000000, + 0x0af7462200000000, 0x65bbe3b900000000, 0x95697dce00000000, + 0xfa25d85500000000, 0x75cc402100000000, 0x1a80e5ba00000000, + 0xea527bcd00000000, 0x851ede5600000000, 0xe06fc76000000000, + 0x8f2362fb00000000, 0x7ff1fc8c00000000, 0x10bd591700000000, + 0x9f54c16300000000, 0xf01864f800000000, 0x00cafa8f00000000, + 0x6f865f1400000000, 0x1e19cb6600000000, 0x71556efd00000000, + 0x8187f08a00000000, 0xeecb551100000000, 0x6122cd6500000000, + 0x0e6e68fe00000000, 0xfebcf68900000000, 0x91f0531200000000, + 0x1c82df6c00000000, 0x73ce7af700000000, 0x831ce48000000000, + 0xec50411b00000000, 0x63b9d96f00000000, 0x0cf57cf400000000, + 0xfc27e28300000000, 0x936b471800000000, 0xe2f4d36a00000000, + 0x8db876f100000000, 0x7d6ae88600000000, 0x12264d1d00000000, + 0x9dcfd56900000000, 0xf28370f200000000, 0x0251ee8500000000, + 0x6d1d4b1e00000000, 0x18b4f67800000000, 0x77f853e300000000, + 0x872acd9400000000, 0xe866680f00000000, 0x678ff07b00000000, + 0x08c355e000000000, 0xf811cb9700000000, 0x975d6e0c00000000, + 0xe6c2fa7e00000000, 0x898e5fe500000000, 0x795cc19200000000, + 0x1610640900000000, 0x99f9fc7d00000000, 0xf6b559e600000000, + 0x0667c79100000000, 0x692b620a00000000, 0xe459ee7400000000, + 0x8b154bef00000000, 0x7bc7d59800000000, 0x148b700300000000, + 0x9b62e87700000000, 0xf42e4dec00000000, 0x04fcd39b00000000, + 0x6bb0760000000000, 0x1a2fe27200000000, 0x756347e900000000, + 0x85b1d99e00000000, 0xeafd7c0500000000, 0x6514e47100000000, + 0x0a5841ea00000000, 0xfa8adf9d00000000, 0x95c67a0600000000, + 0x10d8a45000000000, 0x7f9401cb00000000, 0x8f469fbc00000000, + 0xe00a3a2700000000, 0x6fe3a25300000000, 0x00af07c800000000, + 0xf07d99bf00000000, 0x9f313c2400000000, 0xeeaea85600000000, + 0x81e20dcd00000000, 0x713093ba00000000, 0x1e7c362100000000, + 0x9195ae5500000000, 0xfed90bce00000000, 0x0e0b95b900000000, + 0x6147302200000000, 0xec35bc5c00000000, 0x837919c700000000, + 0x73ab87b000000000, 0x1ce7222b00000000, 0x930eba5f00000000, + 0xfc421fc400000000, 0x0c9081b300000000, 0x63dc242800000000, + 0x1243b05a00000000, 0x7d0f15c100000000, 0x8ddd8bb600000000, + 0xe2912e2d00000000, 0x6d78b65900000000, 0x023413c200000000, + 0xf2e68db500000000, 0x9daa282e00000000, 0xe803954800000000, + 0x874f30d300000000, 0x779daea400000000, 0x18d10b3f00000000, + 0x9738934b00000000, 0xf87436d000000000, 0x08a6a8a700000000, + 0x67ea0d3c00000000, 0x1675994e00000000, 0x79393cd500000000, + 0x89eba2a200000000, 0xe6a7073900000000, 0x694e9f4d00000000, + 0x06023ad600000000, 0xf6d0a4a100000000, 0x999c013a00000000, + 0x14ee8d4400000000, 0x7ba228df00000000, 0x8b70b6a800000000, + 0xe43c133300000000, 0x6bd58b4700000000, 0x04992edc00000000, + 0xf44bb0ab00000000, 0x9b07153000000000, 0xea98814200000000, + 0x85d424d900000000, 0x7506baae00000000, 0x1a4a1f3500000000, + 0x95a3874100000000, 0xfaef22da00000000, 0x0a3dbcad00000000, + 0x6571193600000000}, + {0x0000000000000000, 0x85d996dd00000000, 0x4bb55c6000000000, + 0xce6ccabd00000000, 0x966ab9c000000000, 0x13b32f1d00000000, + 0xdddfe5a000000000, 0x5806737d00000000, 0x6dd3035a00000000, + 0xe80a958700000000, 0x26665f3a00000000, 0xa3bfc9e700000000, + 0xfbb9ba9a00000000, 0x7e602c4700000000, 0xb00ce6fa00000000, + 0x35d5702700000000, 0xdaa607b400000000, 0x5f7f916900000000, + 0x91135bd400000000, 0x14cacd0900000000, 0x4cccbe7400000000, + 0xc91528a900000000, 0x0779e21400000000, 0x82a074c900000000, + 0xb77504ee00000000, 0x32ac923300000000, 0xfcc0588e00000000, + 0x7919ce5300000000, 0x211fbd2e00000000, 0xa4c62bf300000000, + 0x6aaae14e00000000, 0xef73779300000000, 0xf54b7eb300000000, + 0x7092e86e00000000, 0xbefe22d300000000, 0x3b27b40e00000000, + 0x6321c77300000000, 0xe6f851ae00000000, 0x28949b1300000000, + 0xad4d0dce00000000, 0x98987de900000000, 0x1d41eb3400000000, + 0xd32d218900000000, 0x56f4b75400000000, 0x0ef2c42900000000, + 0x8b2b52f400000000, 0x4547984900000000, 0xc09e0e9400000000, + 0x2fed790700000000, 0xaa34efda00000000, 0x6458256700000000, + 0xe181b3ba00000000, 0xb987c0c700000000, 0x3c5e561a00000000, + 0xf2329ca700000000, 0x77eb0a7a00000000, 0x423e7a5d00000000, + 0xc7e7ec8000000000, 0x098b263d00000000, 0x8c52b0e000000000, + 0xd454c39d00000000, 0x518d554000000000, 0x9fe19ffd00000000, + 0x1a38092000000000, 0xab918dbd00000000, 0x2e481b6000000000, + 0xe024d1dd00000000, 0x65fd470000000000, 0x3dfb347d00000000, + 0xb822a2a000000000, 0x764e681d00000000, 0xf397fec000000000, + 0xc6428ee700000000, 0x439b183a00000000, 0x8df7d28700000000, + 0x082e445a00000000, 0x5028372700000000, 0xd5f1a1fa00000000, + 0x1b9d6b4700000000, 0x9e44fd9a00000000, 0x71378a0900000000, + 0xf4ee1cd400000000, 0x3a82d66900000000, 0xbf5b40b400000000, + 0xe75d33c900000000, 0x6284a51400000000, 0xace86fa900000000, + 0x2931f97400000000, 0x1ce4895300000000, 0x993d1f8e00000000, + 0x5751d53300000000, 0xd28843ee00000000, 0x8a8e309300000000, + 0x0f57a64e00000000, 0xc13b6cf300000000, 0x44e2fa2e00000000, + 0x5edaf30e00000000, 0xdb0365d300000000, 0x156faf6e00000000, + 0x90b639b300000000, 0xc8b04ace00000000, 0x4d69dc1300000000, + 0x830516ae00000000, 0x06dc807300000000, 0x3309f05400000000, + 0xb6d0668900000000, 0x78bcac3400000000, 0xfd653ae900000000, + 0xa563499400000000, 0x20badf4900000000, 0xeed615f400000000, + 0x6b0f832900000000, 0x847cf4ba00000000, 0x01a5626700000000, + 0xcfc9a8da00000000, 0x4a103e0700000000, 0x12164d7a00000000, + 0x97cfdba700000000, 0x59a3111a00000000, 0xdc7a87c700000000, + 0xe9aff7e000000000, 0x6c76613d00000000, 0xa21aab8000000000, + 0x27c33d5d00000000, 0x7fc54e2000000000, 0xfa1cd8fd00000000, + 0x3470124000000000, 0xb1a9849d00000000, 0x17256aa000000000, + 0x92fcfc7d00000000, 0x5c9036c000000000, 0xd949a01d00000000, + 0x814fd36000000000, 0x049645bd00000000, 0xcafa8f0000000000, + 0x4f2319dd00000000, 0x7af669fa00000000, 0xff2fff2700000000, + 0x3143359a00000000, 0xb49aa34700000000, 0xec9cd03a00000000, + 0x694546e700000000, 0xa7298c5a00000000, 0x22f01a8700000000, + 0xcd836d1400000000, 0x485afbc900000000, 0x8636317400000000, + 0x03efa7a900000000, 0x5be9d4d400000000, 0xde30420900000000, + 0x105c88b400000000, 0x95851e6900000000, 0xa0506e4e00000000, + 0x2589f89300000000, 0xebe5322e00000000, 0x6e3ca4f300000000, + 0x363ad78e00000000, 0xb3e3415300000000, 0x7d8f8bee00000000, + 0xf8561d3300000000, 0xe26e141300000000, 0x67b782ce00000000, + 0xa9db487300000000, 0x2c02deae00000000, 0x7404add300000000, + 0xf1dd3b0e00000000, 0x3fb1f1b300000000, 0xba68676e00000000, + 0x8fbd174900000000, 0x0a64819400000000, 0xc4084b2900000000, + 0x41d1ddf400000000, 0x19d7ae8900000000, 0x9c0e385400000000, + 0x5262f2e900000000, 0xd7bb643400000000, 0x38c813a700000000, + 0xbd11857a00000000, 0x737d4fc700000000, 0xf6a4d91a00000000, + 0xaea2aa6700000000, 0x2b7b3cba00000000, 0xe517f60700000000, + 0x60ce60da00000000, 0x551b10fd00000000, 0xd0c2862000000000, + 0x1eae4c9d00000000, 0x9b77da4000000000, 0xc371a93d00000000, + 0x46a83fe000000000, 0x88c4f55d00000000, 0x0d1d638000000000, + 0xbcb4e71d00000000, 0x396d71c000000000, 0xf701bb7d00000000, + 0x72d82da000000000, 0x2ade5edd00000000, 0xaf07c80000000000, + 0x616b02bd00000000, 0xe4b2946000000000, 0xd167e44700000000, + 0x54be729a00000000, 0x9ad2b82700000000, 0x1f0b2efa00000000, + 0x470d5d8700000000, 0xc2d4cb5a00000000, 0x0cb801e700000000, + 0x8961973a00000000, 0x6612e0a900000000, 0xe3cb767400000000, + 0x2da7bcc900000000, 0xa87e2a1400000000, 0xf078596900000000, + 0x75a1cfb400000000, 0xbbcd050900000000, 0x3e1493d400000000, + 0x0bc1e3f300000000, 0x8e18752e00000000, 0x4074bf9300000000, + 0xc5ad294e00000000, 0x9dab5a3300000000, 0x1872ccee00000000, + 0xd61e065300000000, 0x53c7908e00000000, 0x49ff99ae00000000, + 0xcc260f7300000000, 0x024ac5ce00000000, 0x8793531300000000, + 0xdf95206e00000000, 0x5a4cb6b300000000, 0x94207c0e00000000, + 0x11f9ead300000000, 0x242c9af400000000, 0xa1f50c2900000000, + 0x6f99c69400000000, 0xea40504900000000, 0xb246233400000000, + 0x379fb5e900000000, 0xf9f37f5400000000, 0x7c2ae98900000000, + 0x93599e1a00000000, 0x168008c700000000, 0xd8ecc27a00000000, + 0x5d3554a700000000, 0x053327da00000000, 0x80eab10700000000, + 0x4e867bba00000000, 0xcb5fed6700000000, 0xfe8a9d4000000000, + 0x7b530b9d00000000, 0xb53fc12000000000, 0x30e657fd00000000, + 0x68e0248000000000, 0xed39b25d00000000, 0x235578e000000000, + 0xa68cee3d00000000}, + {0x0000000000000000, 0x76e10f9d00000000, 0xadc46ee100000000, + 0xdb25617c00000000, 0x1b8fac1900000000, 0x6d6ea38400000000, + 0xb64bc2f800000000, 0xc0aacd6500000000, 0x361e593300000000, + 0x40ff56ae00000000, 0x9bda37d200000000, 0xed3b384f00000000, + 0x2d91f52a00000000, 0x5b70fab700000000, 0x80559bcb00000000, + 0xf6b4945600000000, 0x6c3cb26600000000, 0x1addbdfb00000000, + 0xc1f8dc8700000000, 0xb719d31a00000000, 0x77b31e7f00000000, + 0x015211e200000000, 0xda77709e00000000, 0xac967f0300000000, + 0x5a22eb5500000000, 0x2cc3e4c800000000, 0xf7e685b400000000, + 0x81078a2900000000, 0x41ad474c00000000, 0x374c48d100000000, + 0xec6929ad00000000, 0x9a88263000000000, 0xd87864cd00000000, + 0xae996b5000000000, 0x75bc0a2c00000000, 0x035d05b100000000, + 0xc3f7c8d400000000, 0xb516c74900000000, 0x6e33a63500000000, + 0x18d2a9a800000000, 0xee663dfe00000000, 0x9887326300000000, + 0x43a2531f00000000, 0x35435c8200000000, 0xf5e991e700000000, + 0x83089e7a00000000, 0x582dff0600000000, 0x2eccf09b00000000, + 0xb444d6ab00000000, 0xc2a5d93600000000, 0x1980b84a00000000, + 0x6f61b7d700000000, 0xafcb7ab200000000, 0xd92a752f00000000, + 0x020f145300000000, 0x74ee1bce00000000, 0x825a8f9800000000, + 0xf4bb800500000000, 0x2f9ee17900000000, 0x597feee400000000, + 0x99d5238100000000, 0xef342c1c00000000, 0x34114d6000000000, + 0x42f042fd00000000, 0xf1f7b94100000000, 0x8716b6dc00000000, + 0x5c33d7a000000000, 0x2ad2d83d00000000, 0xea78155800000000, + 0x9c991ac500000000, 0x47bc7bb900000000, 0x315d742400000000, + 0xc7e9e07200000000, 0xb108efef00000000, 0x6a2d8e9300000000, + 0x1ccc810e00000000, 0xdc664c6b00000000, 0xaa8743f600000000, + 0x71a2228a00000000, 0x07432d1700000000, 0x9dcb0b2700000000, + 0xeb2a04ba00000000, 0x300f65c600000000, 0x46ee6a5b00000000, + 0x8644a73e00000000, 0xf0a5a8a300000000, 0x2b80c9df00000000, + 0x5d61c64200000000, 0xabd5521400000000, 0xdd345d8900000000, + 0x06113cf500000000, 0x70f0336800000000, 0xb05afe0d00000000, + 0xc6bbf19000000000, 0x1d9e90ec00000000, 0x6b7f9f7100000000, + 0x298fdd8c00000000, 0x5f6ed21100000000, 0x844bb36d00000000, + 0xf2aabcf000000000, 0x3200719500000000, 0x44e17e0800000000, + 0x9fc41f7400000000, 0xe92510e900000000, 0x1f9184bf00000000, + 0x69708b2200000000, 0xb255ea5e00000000, 0xc4b4e5c300000000, + 0x041e28a600000000, 0x72ff273b00000000, 0xa9da464700000000, + 0xdf3b49da00000000, 0x45b36fea00000000, 0x3352607700000000, + 0xe877010b00000000, 0x9e960e9600000000, 0x5e3cc3f300000000, + 0x28ddcc6e00000000, 0xf3f8ad1200000000, 0x8519a28f00000000, + 0x73ad36d900000000, 0x054c394400000000, 0xde69583800000000, + 0xa88857a500000000, 0x68229ac000000000, 0x1ec3955d00000000, + 0xc5e6f42100000000, 0xb307fbbc00000000, 0xe2ef738300000000, + 0x940e7c1e00000000, 0x4f2b1d6200000000, 0x39ca12ff00000000, + 0xf960df9a00000000, 0x8f81d00700000000, 0x54a4b17b00000000, + 0x2245bee600000000, 0xd4f12ab000000000, 0xa210252d00000000, + 0x7935445100000000, 0x0fd44bcc00000000, 0xcf7e86a900000000, + 0xb99f893400000000, 0x62bae84800000000, 0x145be7d500000000, + 0x8ed3c1e500000000, 0xf832ce7800000000, 0x2317af0400000000, + 0x55f6a09900000000, 0x955c6dfc00000000, 0xe3bd626100000000, + 0x3898031d00000000, 0x4e790c8000000000, 0xb8cd98d600000000, + 0xce2c974b00000000, 0x1509f63700000000, 0x63e8f9aa00000000, + 0xa34234cf00000000, 0xd5a33b5200000000, 0x0e865a2e00000000, + 0x786755b300000000, 0x3a97174e00000000, 0x4c7618d300000000, + 0x975379af00000000, 0xe1b2763200000000, 0x2118bb5700000000, + 0x57f9b4ca00000000, 0x8cdcd5b600000000, 0xfa3dda2b00000000, + 0x0c894e7d00000000, 0x7a6841e000000000, 0xa14d209c00000000, + 0xd7ac2f0100000000, 0x1706e26400000000, 0x61e7edf900000000, + 0xbac28c8500000000, 0xcc23831800000000, 0x56aba52800000000, + 0x204aaab500000000, 0xfb6fcbc900000000, 0x8d8ec45400000000, + 0x4d24093100000000, 0x3bc506ac00000000, 0xe0e067d000000000, + 0x9601684d00000000, 0x60b5fc1b00000000, 0x1654f38600000000, + 0xcd7192fa00000000, 0xbb909d6700000000, 0x7b3a500200000000, + 0x0ddb5f9f00000000, 0xd6fe3ee300000000, 0xa01f317e00000000, + 0x1318cac200000000, 0x65f9c55f00000000, 0xbedca42300000000, + 0xc83dabbe00000000, 0x089766db00000000, 0x7e76694600000000, + 0xa553083a00000000, 0xd3b207a700000000, 0x250693f100000000, + 0x53e79c6c00000000, 0x88c2fd1000000000, 0xfe23f28d00000000, + 0x3e893fe800000000, 0x4868307500000000, 0x934d510900000000, + 0xe5ac5e9400000000, 0x7f2478a400000000, 0x09c5773900000000, + 0xd2e0164500000000, 0xa40119d800000000, 0x64abd4bd00000000, + 0x124adb2000000000, 0xc96fba5c00000000, 0xbf8eb5c100000000, + 0x493a219700000000, 0x3fdb2e0a00000000, 0xe4fe4f7600000000, + 0x921f40eb00000000, 0x52b58d8e00000000, 0x2454821300000000, + 0xff71e36f00000000, 0x8990ecf200000000, 0xcb60ae0f00000000, + 0xbd81a19200000000, 0x66a4c0ee00000000, 0x1045cf7300000000, + 0xd0ef021600000000, 0xa60e0d8b00000000, 0x7d2b6cf700000000, + 0x0bca636a00000000, 0xfd7ef73c00000000, 0x8b9ff8a100000000, + 0x50ba99dd00000000, 0x265b964000000000, 0xe6f15b2500000000, + 0x901054b800000000, 0x4b3535c400000000, 0x3dd43a5900000000, + 0xa75c1c6900000000, 0xd1bd13f400000000, 0x0a98728800000000, + 0x7c797d1500000000, 0xbcd3b07000000000, 0xca32bfed00000000, + 0x1117de9100000000, 0x67f6d10c00000000, 0x9142455a00000000, + 0xe7a34ac700000000, 0x3c862bbb00000000, 0x4a67242600000000, + 0x8acde94300000000, 0xfc2ce6de00000000, 0x270987a200000000, + 0x51e8883f00000000}, + {0x0000000000000000, 0xe8dbfbb900000000, 0x91b186a800000000, + 0x796a7d1100000000, 0x63657c8a00000000, 0x8bbe873300000000, + 0xf2d4fa2200000000, 0x1a0f019b00000000, 0x87cc89cf00000000, + 0x6f17727600000000, 0x167d0f6700000000, 0xfea6f4de00000000, + 0xe4a9f54500000000, 0x0c720efc00000000, 0x751873ed00000000, + 0x9dc3885400000000, 0x4f9f624400000000, 0xa74499fd00000000, + 0xde2ee4ec00000000, 0x36f51f5500000000, 0x2cfa1ece00000000, + 0xc421e57700000000, 0xbd4b986600000000, 0x559063df00000000, + 0xc853eb8b00000000, 0x2088103200000000, 0x59e26d2300000000, + 0xb139969a00000000, 0xab36970100000000, 0x43ed6cb800000000, + 0x3a8711a900000000, 0xd25cea1000000000, 0x9e3ec58800000000, + 0x76e53e3100000000, 0x0f8f432000000000, 0xe754b89900000000, + 0xfd5bb90200000000, 0x158042bb00000000, 0x6cea3faa00000000, + 0x8431c41300000000, 0x19f24c4700000000, 0xf129b7fe00000000, + 0x8843caef00000000, 0x6098315600000000, 0x7a9730cd00000000, + 0x924ccb7400000000, 0xeb26b66500000000, 0x03fd4ddc00000000, + 0xd1a1a7cc00000000, 0x397a5c7500000000, 0x4010216400000000, + 0xa8cbdadd00000000, 0xb2c4db4600000000, 0x5a1f20ff00000000, + 0x23755dee00000000, 0xcbaea65700000000, 0x566d2e0300000000, + 0xbeb6d5ba00000000, 0xc7dca8ab00000000, 0x2f07531200000000, + 0x3508528900000000, 0xddd3a93000000000, 0xa4b9d42100000000, + 0x4c622f9800000000, 0x7d7bfbca00000000, 0x95a0007300000000, + 0xecca7d6200000000, 0x041186db00000000, 0x1e1e874000000000, + 0xf6c57cf900000000, 0x8faf01e800000000, 0x6774fa5100000000, + 0xfab7720500000000, 0x126c89bc00000000, 0x6b06f4ad00000000, + 0x83dd0f1400000000, 0x99d20e8f00000000, 0x7109f53600000000, + 0x0863882700000000, 0xe0b8739e00000000, 0x32e4998e00000000, + 0xda3f623700000000, 0xa3551f2600000000, 0x4b8ee49f00000000, + 0x5181e50400000000, 0xb95a1ebd00000000, 0xc03063ac00000000, + 0x28eb981500000000, 0xb528104100000000, 0x5df3ebf800000000, + 0x249996e900000000, 0xcc426d5000000000, 0xd64d6ccb00000000, + 0x3e96977200000000, 0x47fcea6300000000, 0xaf2711da00000000, + 0xe3453e4200000000, 0x0b9ec5fb00000000, 0x72f4b8ea00000000, + 0x9a2f435300000000, 0x802042c800000000, 0x68fbb97100000000, + 0x1191c46000000000, 0xf94a3fd900000000, 0x6489b78d00000000, + 0x8c524c3400000000, 0xf538312500000000, 0x1de3ca9c00000000, + 0x07eccb0700000000, 0xef3730be00000000, 0x965d4daf00000000, + 0x7e86b61600000000, 0xacda5c0600000000, 0x4401a7bf00000000, + 0x3d6bdaae00000000, 0xd5b0211700000000, 0xcfbf208c00000000, + 0x2764db3500000000, 0x5e0ea62400000000, 0xb6d55d9d00000000, + 0x2b16d5c900000000, 0xc3cd2e7000000000, 0xbaa7536100000000, + 0x527ca8d800000000, 0x4873a94300000000, 0xa0a852fa00000000, + 0xd9c22feb00000000, 0x3119d45200000000, 0xbbf0874e00000000, + 0x532b7cf700000000, 0x2a4101e600000000, 0xc29afa5f00000000, + 0xd895fbc400000000, 0x304e007d00000000, 0x49247d6c00000000, + 0xa1ff86d500000000, 0x3c3c0e8100000000, 0xd4e7f53800000000, + 0xad8d882900000000, 0x4556739000000000, 0x5f59720b00000000, + 0xb78289b200000000, 0xcee8f4a300000000, 0x26330f1a00000000, + 0xf46fe50a00000000, 0x1cb41eb300000000, 0x65de63a200000000, + 0x8d05981b00000000, 0x970a998000000000, 0x7fd1623900000000, + 0x06bb1f2800000000, 0xee60e49100000000, 0x73a36cc500000000, + 0x9b78977c00000000, 0xe212ea6d00000000, 0x0ac911d400000000, + 0x10c6104f00000000, 0xf81debf600000000, 0x817796e700000000, + 0x69ac6d5e00000000, 0x25ce42c600000000, 0xcd15b97f00000000, + 0xb47fc46e00000000, 0x5ca43fd700000000, 0x46ab3e4c00000000, + 0xae70c5f500000000, 0xd71ab8e400000000, 0x3fc1435d00000000, + 0xa202cb0900000000, 0x4ad930b000000000, 0x33b34da100000000, + 0xdb68b61800000000, 0xc167b78300000000, 0x29bc4c3a00000000, + 0x50d6312b00000000, 0xb80dca9200000000, 0x6a51208200000000, + 0x828adb3b00000000, 0xfbe0a62a00000000, 0x133b5d9300000000, + 0x09345c0800000000, 0xe1efa7b100000000, 0x9885daa000000000, + 0x705e211900000000, 0xed9da94d00000000, 0x054652f400000000, + 0x7c2c2fe500000000, 0x94f7d45c00000000, 0x8ef8d5c700000000, + 0x66232e7e00000000, 0x1f49536f00000000, 0xf792a8d600000000, + 0xc68b7c8400000000, 0x2e50873d00000000, 0x573afa2c00000000, + 0xbfe1019500000000, 0xa5ee000e00000000, 0x4d35fbb700000000, + 0x345f86a600000000, 0xdc847d1f00000000, 0x4147f54b00000000, + 0xa99c0ef200000000, 0xd0f673e300000000, 0x382d885a00000000, + 0x222289c100000000, 0xcaf9727800000000, 0xb3930f6900000000, + 0x5b48f4d000000000, 0x89141ec000000000, 0x61cfe57900000000, + 0x18a5986800000000, 0xf07e63d100000000, 0xea71624a00000000, + 0x02aa99f300000000, 0x7bc0e4e200000000, 0x931b1f5b00000000, + 0x0ed8970f00000000, 0xe6036cb600000000, 0x9f6911a700000000, + 0x77b2ea1e00000000, 0x6dbdeb8500000000, 0x8566103c00000000, + 0xfc0c6d2d00000000, 0x14d7969400000000, 0x58b5b90c00000000, + 0xb06e42b500000000, 0xc9043fa400000000, 0x21dfc41d00000000, + 0x3bd0c58600000000, 0xd30b3e3f00000000, 0xaa61432e00000000, + 0x42bab89700000000, 0xdf7930c300000000, 0x37a2cb7a00000000, + 0x4ec8b66b00000000, 0xa6134dd200000000, 0xbc1c4c4900000000, + 0x54c7b7f000000000, 0x2dadcae100000000, 0xc576315800000000, + 0x172adb4800000000, 0xfff120f100000000, 0x869b5de000000000, + 0x6e40a65900000000, 0x744fa7c200000000, 0x9c945c7b00000000, + 0xe5fe216a00000000, 0x0d25dad300000000, 0x90e6528700000000, + 0x783da93e00000000, 0x0157d42f00000000, 0xe98c2f9600000000, + 0xf3832e0d00000000, 0x1b58d5b400000000, 0x6232a8a500000000, + 0x8ae9531c00000000}, + {0x0000000000000000, 0x919168ae00000000, 0x6325a08700000000, + 0xf2b4c82900000000, 0x874c31d400000000, 0x16dd597a00000000, + 0xe469915300000000, 0x75f8f9fd00000000, 0x4f9f137300000000, + 0xde0e7bdd00000000, 0x2cbab3f400000000, 0xbd2bdb5a00000000, + 0xc8d322a700000000, 0x59424a0900000000, 0xabf6822000000000, + 0x3a67ea8e00000000, 0x9e3e27e600000000, 0x0faf4f4800000000, + 0xfd1b876100000000, 0x6c8aefcf00000000, 0x1972163200000000, + 0x88e37e9c00000000, 0x7a57b6b500000000, 0xebc6de1b00000000, + 0xd1a1349500000000, 0x40305c3b00000000, 0xb284941200000000, + 0x2315fcbc00000000, 0x56ed054100000000, 0xc77c6def00000000, + 0x35c8a5c600000000, 0xa459cd6800000000, 0x7d7b3f1700000000, + 0xecea57b900000000, 0x1e5e9f9000000000, 0x8fcff73e00000000, + 0xfa370ec300000000, 0x6ba6666d00000000, 0x9912ae4400000000, + 0x0883c6ea00000000, 0x32e42c6400000000, 0xa37544ca00000000, + 0x51c18ce300000000, 0xc050e44d00000000, 0xb5a81db000000000, + 0x2439751e00000000, 0xd68dbd3700000000, 0x471cd59900000000, + 0xe34518f100000000, 0x72d4705f00000000, 0x8060b87600000000, + 0x11f1d0d800000000, 0x6409292500000000, 0xf598418b00000000, + 0x072c89a200000000, 0x96bde10c00000000, 0xacda0b8200000000, + 0x3d4b632c00000000, 0xcfffab0500000000, 0x5e6ec3ab00000000, + 0x2b963a5600000000, 0xba0752f800000000, 0x48b39ad100000000, + 0xd922f27f00000000, 0xfaf67e2e00000000, 0x6b67168000000000, + 0x99d3dea900000000, 0x0842b60700000000, 0x7dba4ffa00000000, + 0xec2b275400000000, 0x1e9fef7d00000000, 0x8f0e87d300000000, + 0xb5696d5d00000000, 0x24f805f300000000, 0xd64ccdda00000000, + 0x47dda57400000000, 0x32255c8900000000, 0xa3b4342700000000, + 0x5100fc0e00000000, 0xc09194a000000000, 0x64c859c800000000, + 0xf559316600000000, 0x07edf94f00000000, 0x967c91e100000000, + 0xe384681c00000000, 0x721500b200000000, 0x80a1c89b00000000, + 0x1130a03500000000, 0x2b574abb00000000, 0xbac6221500000000, + 0x4872ea3c00000000, 0xd9e3829200000000, 0xac1b7b6f00000000, + 0x3d8a13c100000000, 0xcf3edbe800000000, 0x5eafb34600000000, + 0x878d413900000000, 0x161c299700000000, 0xe4a8e1be00000000, + 0x7539891000000000, 0x00c170ed00000000, 0x9150184300000000, + 0x63e4d06a00000000, 0xf275b8c400000000, 0xc812524a00000000, + 0x59833ae400000000, 0xab37f2cd00000000, 0x3aa69a6300000000, + 0x4f5e639e00000000, 0xdecf0b3000000000, 0x2c7bc31900000000, + 0xbdeaabb700000000, 0x19b366df00000000, 0x88220e7100000000, + 0x7a96c65800000000, 0xeb07aef600000000, 0x9eff570b00000000, + 0x0f6e3fa500000000, 0xfddaf78c00000000, 0x6c4b9f2200000000, + 0x562c75ac00000000, 0xc7bd1d0200000000, 0x3509d52b00000000, + 0xa498bd8500000000, 0xd160447800000000, 0x40f12cd600000000, + 0xb245e4ff00000000, 0x23d48c5100000000, 0xf4edfd5c00000000, + 0x657c95f200000000, 0x97c85ddb00000000, 0x0659357500000000, + 0x73a1cc8800000000, 0xe230a42600000000, 0x10846c0f00000000, + 0x811504a100000000, 0xbb72ee2f00000000, 0x2ae3868100000000, + 0xd8574ea800000000, 0x49c6260600000000, 0x3c3edffb00000000, + 0xadafb75500000000, 0x5f1b7f7c00000000, 0xce8a17d200000000, + 0x6ad3daba00000000, 0xfb42b21400000000, 0x09f67a3d00000000, + 0x9867129300000000, 0xed9feb6e00000000, 0x7c0e83c000000000, + 0x8eba4be900000000, 0x1f2b234700000000, 0x254cc9c900000000, + 0xb4dda16700000000, 0x4669694e00000000, 0xd7f801e000000000, + 0xa200f81d00000000, 0x339190b300000000, 0xc125589a00000000, + 0x50b4303400000000, 0x8996c24b00000000, 0x1807aae500000000, + 0xeab362cc00000000, 0x7b220a6200000000, 0x0edaf39f00000000, + 0x9f4b9b3100000000, 0x6dff531800000000, 0xfc6e3bb600000000, + 0xc609d13800000000, 0x5798b99600000000, 0xa52c71bf00000000, + 0x34bd191100000000, 0x4145e0ec00000000, 0xd0d4884200000000, + 0x2260406b00000000, 0xb3f128c500000000, 0x17a8e5ad00000000, + 0x86398d0300000000, 0x748d452a00000000, 0xe51c2d8400000000, + 0x90e4d47900000000, 0x0175bcd700000000, 0xf3c174fe00000000, + 0x62501c5000000000, 0x5837f6de00000000, 0xc9a69e7000000000, + 0x3b12565900000000, 0xaa833ef700000000, 0xdf7bc70a00000000, + 0x4eeaafa400000000, 0xbc5e678d00000000, 0x2dcf0f2300000000, + 0x0e1b837200000000, 0x9f8aebdc00000000, 0x6d3e23f500000000, + 0xfcaf4b5b00000000, 0x8957b2a600000000, 0x18c6da0800000000, + 0xea72122100000000, 0x7be37a8f00000000, 0x4184900100000000, + 0xd015f8af00000000, 0x22a1308600000000, 0xb330582800000000, + 0xc6c8a1d500000000, 0x5759c97b00000000, 0xa5ed015200000000, + 0x347c69fc00000000, 0x9025a49400000000, 0x01b4cc3a00000000, + 0xf300041300000000, 0x62916cbd00000000, 0x1769954000000000, + 0x86f8fdee00000000, 0x744c35c700000000, 0xe5dd5d6900000000, + 0xdfbab7e700000000, 0x4e2bdf4900000000, 0xbc9f176000000000, + 0x2d0e7fce00000000, 0x58f6863300000000, 0xc967ee9d00000000, + 0x3bd326b400000000, 0xaa424e1a00000000, 0x7360bc6500000000, + 0xe2f1d4cb00000000, 0x10451ce200000000, 0x81d4744c00000000, + 0xf42c8db100000000, 0x65bde51f00000000, 0x97092d3600000000, + 0x0698459800000000, 0x3cffaf1600000000, 0xad6ec7b800000000, + 0x5fda0f9100000000, 0xce4b673f00000000, 0xbbb39ec200000000, + 0x2a22f66c00000000, 0xd8963e4500000000, 0x490756eb00000000, + 0xed5e9b8300000000, 0x7ccff32d00000000, 0x8e7b3b0400000000, + 0x1fea53aa00000000, 0x6a12aa5700000000, 0xfb83c2f900000000, + 0x09370ad000000000, 0x98a6627e00000000, 0xa2c188f000000000, + 0x3350e05e00000000, 0xc1e4287700000000, 0x507540d900000000, + 0x258db92400000000, 0xb41cd18a00000000, 0x46a819a300000000, + 0xd739710d00000000}}; + +#else /* W == 4 */ + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0xccaa009e, 0x4225077d, 0x8e8f07e3, 0x844a0efa, + 0x48e00e64, 0xc66f0987, 0x0ac50919, 0xd3e51bb5, 0x1f4f1b2b, + 0x91c01cc8, 0x5d6a1c56, 0x57af154f, 0x9b0515d1, 0x158a1232, + 0xd92012ac, 0x7cbb312b, 0xb01131b5, 0x3e9e3656, 0xf23436c8, + 0xf8f13fd1, 0x345b3f4f, 0xbad438ac, 0x767e3832, 0xaf5e2a9e, + 0x63f42a00, 0xed7b2de3, 0x21d12d7d, 0x2b142464, 0xe7be24fa, + 0x69312319, 0xa59b2387, 0xf9766256, 0x35dc62c8, 0xbb53652b, + 0x77f965b5, 0x7d3c6cac, 0xb1966c32, 0x3f196bd1, 0xf3b36b4f, + 0x2a9379e3, 0xe639797d, 0x68b67e9e, 0xa41c7e00, 0xaed97719, + 0x62737787, 0xecfc7064, 0x205670fa, 0x85cd537d, 0x496753e3, + 0xc7e85400, 0x0b42549e, 0x01875d87, 0xcd2d5d19, 0x43a25afa, + 0x8f085a64, 0x562848c8, 0x9a824856, 0x140d4fb5, 0xd8a74f2b, + 0xd2624632, 0x1ec846ac, 0x9047414f, 0x5ced41d1, 0x299dc2ed, + 0xe537c273, 0x6bb8c590, 0xa712c50e, 0xadd7cc17, 0x617dcc89, + 0xeff2cb6a, 0x2358cbf4, 0xfa78d958, 0x36d2d9c6, 0xb85dde25, + 0x74f7debb, 0x7e32d7a2, 0xb298d73c, 0x3c17d0df, 0xf0bdd041, + 0x5526f3c6, 0x998cf358, 0x1703f4bb, 0xdba9f425, 0xd16cfd3c, + 0x1dc6fda2, 0x9349fa41, 0x5fe3fadf, 0x86c3e873, 0x4a69e8ed, + 0xc4e6ef0e, 0x084cef90, 0x0289e689, 0xce23e617, 0x40ace1f4, + 0x8c06e16a, 0xd0eba0bb, 0x1c41a025, 0x92cea7c6, 0x5e64a758, + 0x54a1ae41, 0x980baedf, 0x1684a93c, 0xda2ea9a2, 0x030ebb0e, + 0xcfa4bb90, 0x412bbc73, 0x8d81bced, 0x8744b5f4, 0x4beeb56a, + 0xc561b289, 0x09cbb217, 0xac509190, 0x60fa910e, 0xee7596ed, + 0x22df9673, 0x281a9f6a, 0xe4b09ff4, 0x6a3f9817, 0xa6959889, + 0x7fb58a25, 0xb31f8abb, 0x3d908d58, 0xf13a8dc6, 0xfbff84df, + 0x37558441, 0xb9da83a2, 0x7570833c, 0x533b85da, 0x9f918544, + 0x111e82a7, 0xddb48239, 0xd7718b20, 0x1bdb8bbe, 0x95548c5d, + 0x59fe8cc3, 0x80de9e6f, 0x4c749ef1, 0xc2fb9912, 0x0e51998c, + 0x04949095, 0xc83e900b, 0x46b197e8, 0x8a1b9776, 0x2f80b4f1, + 0xe32ab46f, 0x6da5b38c, 0xa10fb312, 0xabcaba0b, 0x6760ba95, + 0xe9efbd76, 0x2545bde8, 0xfc65af44, 0x30cfafda, 0xbe40a839, + 0x72eaa8a7, 0x782fa1be, 0xb485a120, 0x3a0aa6c3, 0xf6a0a65d, + 0xaa4de78c, 0x66e7e712, 0xe868e0f1, 0x24c2e06f, 0x2e07e976, + 0xe2ade9e8, 0x6c22ee0b, 0xa088ee95, 0x79a8fc39, 0xb502fca7, + 0x3b8dfb44, 0xf727fbda, 0xfde2f2c3, 0x3148f25d, 0xbfc7f5be, + 0x736df520, 0xd6f6d6a7, 0x1a5cd639, 0x94d3d1da, 0x5879d144, + 0x52bcd85d, 0x9e16d8c3, 0x1099df20, 0xdc33dfbe, 0x0513cd12, + 0xc9b9cd8c, 0x4736ca6f, 0x8b9ccaf1, 0x8159c3e8, 0x4df3c376, + 0xc37cc495, 0x0fd6c40b, 0x7aa64737, 0xb60c47a9, 0x3883404a, + 0xf42940d4, 0xfeec49cd, 0x32464953, 0xbcc94eb0, 0x70634e2e, + 0xa9435c82, 0x65e95c1c, 0xeb665bff, 0x27cc5b61, 0x2d095278, + 0xe1a352e6, 0x6f2c5505, 0xa386559b, 0x061d761c, 0xcab77682, + 0x44387161, 0x889271ff, 0x825778e6, 0x4efd7878, 0xc0727f9b, + 0x0cd87f05, 0xd5f86da9, 0x19526d37, 0x97dd6ad4, 0x5b776a4a, + 0x51b26353, 0x9d1863cd, 0x1397642e, 0xdf3d64b0, 0x83d02561, + 0x4f7a25ff, 0xc1f5221c, 0x0d5f2282, 0x079a2b9b, 0xcb302b05, + 0x45bf2ce6, 0x89152c78, 0x50353ed4, 0x9c9f3e4a, 0x121039a9, + 0xdeba3937, 0xd47f302e, 0x18d530b0, 0x965a3753, 0x5af037cd, + 0xff6b144a, 0x33c114d4, 0xbd4e1337, 0x71e413a9, 0x7b211ab0, + 0xb78b1a2e, 0x39041dcd, 0xf5ae1d53, 0x2c8e0fff, 0xe0240f61, + 0x6eab0882, 0xa201081c, 0xa8c40105, 0x646e019b, 0xeae10678, + 0x264b06e6}, + {0x00000000, 0xa6770bb4, 0x979f1129, 0x31e81a9d, 0xf44f2413, + 0x52382fa7, 0x63d0353a, 0xc5a73e8e, 0x33ef4e67, 0x959845d3, + 0xa4705f4e, 0x020754fa, 0xc7a06a74, 0x61d761c0, 0x503f7b5d, + 0xf64870e9, 0x67de9cce, 0xc1a9977a, 0xf0418de7, 0x56368653, + 0x9391b8dd, 0x35e6b369, 0x040ea9f4, 0xa279a240, 0x5431d2a9, + 0xf246d91d, 0xc3aec380, 0x65d9c834, 0xa07ef6ba, 0x0609fd0e, + 0x37e1e793, 0x9196ec27, 0xcfbd399c, 0x69ca3228, 0x582228b5, + 0xfe552301, 0x3bf21d8f, 0x9d85163b, 0xac6d0ca6, 0x0a1a0712, + 0xfc5277fb, 0x5a257c4f, 0x6bcd66d2, 0xcdba6d66, 0x081d53e8, + 0xae6a585c, 0x9f8242c1, 0x39f54975, 0xa863a552, 0x0e14aee6, + 0x3ffcb47b, 0x998bbfcf, 0x5c2c8141, 0xfa5b8af5, 0xcbb39068, + 0x6dc49bdc, 0x9b8ceb35, 0x3dfbe081, 0x0c13fa1c, 0xaa64f1a8, + 0x6fc3cf26, 0xc9b4c492, 0xf85cde0f, 0x5e2bd5bb, 0x440b7579, + 0xe27c7ecd, 0xd3946450, 0x75e36fe4, 0xb044516a, 0x16335ade, + 0x27db4043, 0x81ac4bf7, 0x77e43b1e, 0xd19330aa, 0xe07b2a37, + 0x460c2183, 0x83ab1f0d, 0x25dc14b9, 0x14340e24, 0xb2430590, + 0x23d5e9b7, 0x85a2e203, 0xb44af89e, 0x123df32a, 0xd79acda4, + 0x71edc610, 0x4005dc8d, 0xe672d739, 0x103aa7d0, 0xb64dac64, + 0x87a5b6f9, 0x21d2bd4d, 0xe47583c3, 0x42028877, 0x73ea92ea, + 0xd59d995e, 0x8bb64ce5, 0x2dc14751, 0x1c295dcc, 0xba5e5678, + 0x7ff968f6, 0xd98e6342, 0xe86679df, 0x4e11726b, 0xb8590282, + 0x1e2e0936, 0x2fc613ab, 0x89b1181f, 0x4c162691, 0xea612d25, + 0xdb8937b8, 0x7dfe3c0c, 0xec68d02b, 0x4a1fdb9f, 0x7bf7c102, + 0xdd80cab6, 0x1827f438, 0xbe50ff8c, 0x8fb8e511, 0x29cfeea5, + 0xdf879e4c, 0x79f095f8, 0x48188f65, 0xee6f84d1, 0x2bc8ba5f, + 0x8dbfb1eb, 0xbc57ab76, 0x1a20a0c2, 0x8816eaf2, 0x2e61e146, + 0x1f89fbdb, 0xb9fef06f, 0x7c59cee1, 0xda2ec555, 0xebc6dfc8, + 0x4db1d47c, 0xbbf9a495, 0x1d8eaf21, 0x2c66b5bc, 0x8a11be08, + 0x4fb68086, 0xe9c18b32, 0xd82991af, 0x7e5e9a1b, 0xefc8763c, + 0x49bf7d88, 0x78576715, 0xde206ca1, 0x1b87522f, 0xbdf0599b, + 0x8c184306, 0x2a6f48b2, 0xdc27385b, 0x7a5033ef, 0x4bb82972, + 0xedcf22c6, 0x28681c48, 0x8e1f17fc, 0xbff70d61, 0x198006d5, + 0x47abd36e, 0xe1dcd8da, 0xd034c247, 0x7643c9f3, 0xb3e4f77d, + 0x1593fcc9, 0x247be654, 0x820cede0, 0x74449d09, 0xd23396bd, + 0xe3db8c20, 0x45ac8794, 0x800bb91a, 0x267cb2ae, 0x1794a833, + 0xb1e3a387, 0x20754fa0, 0x86024414, 0xb7ea5e89, 0x119d553d, + 0xd43a6bb3, 0x724d6007, 0x43a57a9a, 0xe5d2712e, 0x139a01c7, + 0xb5ed0a73, 0x840510ee, 0x22721b5a, 0xe7d525d4, 0x41a22e60, + 0x704a34fd, 0xd63d3f49, 0xcc1d9f8b, 0x6a6a943f, 0x5b828ea2, + 0xfdf58516, 0x3852bb98, 0x9e25b02c, 0xafcdaab1, 0x09baa105, + 0xfff2d1ec, 0x5985da58, 0x686dc0c5, 0xce1acb71, 0x0bbdf5ff, + 0xadcafe4b, 0x9c22e4d6, 0x3a55ef62, 0xabc30345, 0x0db408f1, + 0x3c5c126c, 0x9a2b19d8, 0x5f8c2756, 0xf9fb2ce2, 0xc813367f, + 0x6e643dcb, 0x982c4d22, 0x3e5b4696, 0x0fb35c0b, 0xa9c457bf, + 0x6c636931, 0xca146285, 0xfbfc7818, 0x5d8b73ac, 0x03a0a617, + 0xa5d7ada3, 0x943fb73e, 0x3248bc8a, 0xf7ef8204, 0x519889b0, + 0x6070932d, 0xc6079899, 0x304fe870, 0x9638e3c4, 0xa7d0f959, + 0x01a7f2ed, 0xc400cc63, 0x6277c7d7, 0x539fdd4a, 0xf5e8d6fe, + 0x647e3ad9, 0xc209316d, 0xf3e12bf0, 0x55962044, 0x90311eca, + 0x3646157e, 0x07ae0fe3, 0xa1d90457, 0x579174be, 0xf1e67f0a, + 0xc00e6597, 0x66796e23, 0xa3de50ad, 0x05a95b19, 0x34414184, + 0x92364a30}, + {0x00000000, 0xcb5cd3a5, 0x4dc8a10b, 0x869472ae, 0x9b914216, + 0x50cd91b3, 0xd659e31d, 0x1d0530b8, 0xec53826d, 0x270f51c8, + 0xa19b2366, 0x6ac7f0c3, 0x77c2c07b, 0xbc9e13de, 0x3a0a6170, + 0xf156b2d5, 0x03d6029b, 0xc88ad13e, 0x4e1ea390, 0x85427035, + 0x9847408d, 0x531b9328, 0xd58fe186, 0x1ed33223, 0xef8580f6, + 0x24d95353, 0xa24d21fd, 0x6911f258, 0x7414c2e0, 0xbf481145, + 0x39dc63eb, 0xf280b04e, 0x07ac0536, 0xccf0d693, 0x4a64a43d, + 0x81387798, 0x9c3d4720, 0x57619485, 0xd1f5e62b, 0x1aa9358e, + 0xebff875b, 0x20a354fe, 0xa6372650, 0x6d6bf5f5, 0x706ec54d, + 0xbb3216e8, 0x3da66446, 0xf6fab7e3, 0x047a07ad, 0xcf26d408, + 0x49b2a6a6, 0x82ee7503, 0x9feb45bb, 0x54b7961e, 0xd223e4b0, + 0x197f3715, 0xe82985c0, 0x23755665, 0xa5e124cb, 0x6ebdf76e, + 0x73b8c7d6, 0xb8e41473, 0x3e7066dd, 0xf52cb578, 0x0f580a6c, + 0xc404d9c9, 0x4290ab67, 0x89cc78c2, 0x94c9487a, 0x5f959bdf, + 0xd901e971, 0x125d3ad4, 0xe30b8801, 0x28575ba4, 0xaec3290a, + 0x659ffaaf, 0x789aca17, 0xb3c619b2, 0x35526b1c, 0xfe0eb8b9, + 0x0c8e08f7, 0xc7d2db52, 0x4146a9fc, 0x8a1a7a59, 0x971f4ae1, + 0x5c439944, 0xdad7ebea, 0x118b384f, 0xe0dd8a9a, 0x2b81593f, + 0xad152b91, 0x6649f834, 0x7b4cc88c, 0xb0101b29, 0x36846987, + 0xfdd8ba22, 0x08f40f5a, 0xc3a8dcff, 0x453cae51, 0x8e607df4, + 0x93654d4c, 0x58399ee9, 0xdeadec47, 0x15f13fe2, 0xe4a78d37, + 0x2ffb5e92, 0xa96f2c3c, 0x6233ff99, 0x7f36cf21, 0xb46a1c84, + 0x32fe6e2a, 0xf9a2bd8f, 0x0b220dc1, 0xc07ede64, 0x46eaacca, + 0x8db67f6f, 0x90b34fd7, 0x5bef9c72, 0xdd7beedc, 0x16273d79, + 0xe7718fac, 0x2c2d5c09, 0xaab92ea7, 0x61e5fd02, 0x7ce0cdba, + 0xb7bc1e1f, 0x31286cb1, 0xfa74bf14, 0x1eb014d8, 0xd5ecc77d, + 0x5378b5d3, 0x98246676, 0x852156ce, 0x4e7d856b, 0xc8e9f7c5, + 0x03b52460, 0xf2e396b5, 0x39bf4510, 0xbf2b37be, 0x7477e41b, + 0x6972d4a3, 0xa22e0706, 0x24ba75a8, 0xefe6a60d, 0x1d661643, + 0xd63ac5e6, 0x50aeb748, 0x9bf264ed, 0x86f75455, 0x4dab87f0, + 0xcb3ff55e, 0x006326fb, 0xf135942e, 0x3a69478b, 0xbcfd3525, + 0x77a1e680, 0x6aa4d638, 0xa1f8059d, 0x276c7733, 0xec30a496, + 0x191c11ee, 0xd240c24b, 0x54d4b0e5, 0x9f886340, 0x828d53f8, + 0x49d1805d, 0xcf45f2f3, 0x04192156, 0xf54f9383, 0x3e134026, + 0xb8873288, 0x73dbe12d, 0x6eded195, 0xa5820230, 0x2316709e, + 0xe84aa33b, 0x1aca1375, 0xd196c0d0, 0x5702b27e, 0x9c5e61db, + 0x815b5163, 0x4a0782c6, 0xcc93f068, 0x07cf23cd, 0xf6999118, + 0x3dc542bd, 0xbb513013, 0x700de3b6, 0x6d08d30e, 0xa65400ab, + 0x20c07205, 0xeb9ca1a0, 0x11e81eb4, 0xdab4cd11, 0x5c20bfbf, + 0x977c6c1a, 0x8a795ca2, 0x41258f07, 0xc7b1fda9, 0x0ced2e0c, + 0xfdbb9cd9, 0x36e74f7c, 0xb0733dd2, 0x7b2fee77, 0x662adecf, + 0xad760d6a, 0x2be27fc4, 0xe0beac61, 0x123e1c2f, 0xd962cf8a, + 0x5ff6bd24, 0x94aa6e81, 0x89af5e39, 0x42f38d9c, 0xc467ff32, + 0x0f3b2c97, 0xfe6d9e42, 0x35314de7, 0xb3a53f49, 0x78f9ecec, + 0x65fcdc54, 0xaea00ff1, 0x28347d5f, 0xe368aefa, 0x16441b82, + 0xdd18c827, 0x5b8cba89, 0x90d0692c, 0x8dd55994, 0x46898a31, + 0xc01df89f, 0x0b412b3a, 0xfa1799ef, 0x314b4a4a, 0xb7df38e4, + 0x7c83eb41, 0x6186dbf9, 0xaada085c, 0x2c4e7af2, 0xe712a957, + 0x15921919, 0xdececabc, 0x585ab812, 0x93066bb7, 0x8e035b0f, + 0x455f88aa, 0xc3cbfa04, 0x089729a1, 0xf9c19b74, 0x329d48d1, + 0xb4093a7f, 0x7f55e9da, 0x6250d962, 0xa90c0ac7, 0x2f987869, + 0xe4c4abcc}, + {0x00000000, 0x3d6029b0, 0x7ac05360, 0x47a07ad0, 0xf580a6c0, + 0xc8e08f70, 0x8f40f5a0, 0xb220dc10, 0x30704bc1, 0x0d106271, + 0x4ab018a1, 0x77d03111, 0xc5f0ed01, 0xf890c4b1, 0xbf30be61, + 0x825097d1, 0x60e09782, 0x5d80be32, 0x1a20c4e2, 0x2740ed52, + 0x95603142, 0xa80018f2, 0xefa06222, 0xd2c04b92, 0x5090dc43, + 0x6df0f5f3, 0x2a508f23, 0x1730a693, 0xa5107a83, 0x98705333, + 0xdfd029e3, 0xe2b00053, 0xc1c12f04, 0xfca106b4, 0xbb017c64, + 0x866155d4, 0x344189c4, 0x0921a074, 0x4e81daa4, 0x73e1f314, + 0xf1b164c5, 0xccd14d75, 0x8b7137a5, 0xb6111e15, 0x0431c205, + 0x3951ebb5, 0x7ef19165, 0x4391b8d5, 0xa121b886, 0x9c419136, + 0xdbe1ebe6, 0xe681c256, 0x54a11e46, 0x69c137f6, 0x2e614d26, + 0x13016496, 0x9151f347, 0xac31daf7, 0xeb91a027, 0xd6f18997, + 0x64d15587, 0x59b17c37, 0x1e1106e7, 0x23712f57, 0x58f35849, + 0x659371f9, 0x22330b29, 0x1f532299, 0xad73fe89, 0x9013d739, + 0xd7b3ade9, 0xead38459, 0x68831388, 0x55e33a38, 0x124340e8, + 0x2f236958, 0x9d03b548, 0xa0639cf8, 0xe7c3e628, 0xdaa3cf98, + 0x3813cfcb, 0x0573e67b, 0x42d39cab, 0x7fb3b51b, 0xcd93690b, + 0xf0f340bb, 0xb7533a6b, 0x8a3313db, 0x0863840a, 0x3503adba, + 0x72a3d76a, 0x4fc3feda, 0xfde322ca, 0xc0830b7a, 0x872371aa, + 0xba43581a, 0x9932774d, 0xa4525efd, 0xe3f2242d, 0xde920d9d, + 0x6cb2d18d, 0x51d2f83d, 0x167282ed, 0x2b12ab5d, 0xa9423c8c, + 0x9422153c, 0xd3826fec, 0xeee2465c, 0x5cc29a4c, 0x61a2b3fc, + 0x2602c92c, 0x1b62e09c, 0xf9d2e0cf, 0xc4b2c97f, 0x8312b3af, + 0xbe729a1f, 0x0c52460f, 0x31326fbf, 0x7692156f, 0x4bf23cdf, + 0xc9a2ab0e, 0xf4c282be, 0xb362f86e, 0x8e02d1de, 0x3c220dce, + 0x0142247e, 0x46e25eae, 0x7b82771e, 0xb1e6b092, 0x8c869922, + 0xcb26e3f2, 0xf646ca42, 0x44661652, 0x79063fe2, 0x3ea64532, + 0x03c66c82, 0x8196fb53, 0xbcf6d2e3, 0xfb56a833, 0xc6368183, + 0x74165d93, 0x49767423, 0x0ed60ef3, 0x33b62743, 0xd1062710, + 0xec660ea0, 0xabc67470, 0x96a65dc0, 0x248681d0, 0x19e6a860, + 0x5e46d2b0, 0x6326fb00, 0xe1766cd1, 0xdc164561, 0x9bb63fb1, + 0xa6d61601, 0x14f6ca11, 0x2996e3a1, 0x6e369971, 0x5356b0c1, + 0x70279f96, 0x4d47b626, 0x0ae7ccf6, 0x3787e546, 0x85a73956, + 0xb8c710e6, 0xff676a36, 0xc2074386, 0x4057d457, 0x7d37fde7, + 0x3a978737, 0x07f7ae87, 0xb5d77297, 0x88b75b27, 0xcf1721f7, + 0xf2770847, 0x10c70814, 0x2da721a4, 0x6a075b74, 0x576772c4, + 0xe547aed4, 0xd8278764, 0x9f87fdb4, 0xa2e7d404, 0x20b743d5, + 0x1dd76a65, 0x5a7710b5, 0x67173905, 0xd537e515, 0xe857cca5, + 0xaff7b675, 0x92979fc5, 0xe915e8db, 0xd475c16b, 0x93d5bbbb, + 0xaeb5920b, 0x1c954e1b, 0x21f567ab, 0x66551d7b, 0x5b3534cb, + 0xd965a31a, 0xe4058aaa, 0xa3a5f07a, 0x9ec5d9ca, 0x2ce505da, + 0x11852c6a, 0x562556ba, 0x6b457f0a, 0x89f57f59, 0xb49556e9, + 0xf3352c39, 0xce550589, 0x7c75d999, 0x4115f029, 0x06b58af9, + 0x3bd5a349, 0xb9853498, 0x84e51d28, 0xc34567f8, 0xfe254e48, + 0x4c059258, 0x7165bbe8, 0x36c5c138, 0x0ba5e888, 0x28d4c7df, + 0x15b4ee6f, 0x521494bf, 0x6f74bd0f, 0xdd54611f, 0xe03448af, + 0xa794327f, 0x9af41bcf, 0x18a48c1e, 0x25c4a5ae, 0x6264df7e, + 0x5f04f6ce, 0xed242ade, 0xd044036e, 0x97e479be, 0xaa84500e, + 0x4834505d, 0x755479ed, 0x32f4033d, 0x0f942a8d, 0xbdb4f69d, + 0x80d4df2d, 0xc774a5fd, 0xfa148c4d, 0x78441b9c, 0x4524322c, + 0x028448fc, 0x3fe4614c, 0x8dc4bd5c, 0xb0a494ec, 0xf704ee3c, + 0xca64c78c}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x00000000, 0xb029603d, 0x6053c07a, 0xd07aa047, 0xc0a680f5, + 0x708fe0c8, 0xa0f5408f, 0x10dc20b2, 0xc14b7030, 0x7162100d, + 0xa118b04a, 0x1131d077, 0x01edf0c5, 0xb1c490f8, 0x61be30bf, + 0xd1975082, 0x8297e060, 0x32be805d, 0xe2c4201a, 0x52ed4027, + 0x42316095, 0xf21800a8, 0x2262a0ef, 0x924bc0d2, 0x43dc9050, + 0xf3f5f06d, 0x238f502a, 0x93a63017, 0x837a10a5, 0x33537098, + 0xe329d0df, 0x5300b0e2, 0x042fc1c1, 0xb406a1fc, 0x647c01bb, + 0xd4556186, 0xc4894134, 0x74a02109, 0xa4da814e, 0x14f3e173, + 0xc564b1f1, 0x754dd1cc, 0xa537718b, 0x151e11b6, 0x05c23104, + 0xb5eb5139, 0x6591f17e, 0xd5b89143, 0x86b821a1, 0x3691419c, + 0xe6ebe1db, 0x56c281e6, 0x461ea154, 0xf637c169, 0x264d612e, + 0x96640113, 0x47f35191, 0xf7da31ac, 0x27a091eb, 0x9789f1d6, + 0x8755d164, 0x377cb159, 0xe706111e, 0x572f7123, 0x4958f358, + 0xf9719365, 0x290b3322, 0x9922531f, 0x89fe73ad, 0x39d71390, + 0xe9adb3d7, 0x5984d3ea, 0x88138368, 0x383ae355, 0xe8404312, + 0x5869232f, 0x48b5039d, 0xf89c63a0, 0x28e6c3e7, 0x98cfa3da, + 0xcbcf1338, 0x7be67305, 0xab9cd342, 0x1bb5b37f, 0x0b6993cd, + 0xbb40f3f0, 0x6b3a53b7, 0xdb13338a, 0x0a846308, 0xbaad0335, + 0x6ad7a372, 0xdafec34f, 0xca22e3fd, 0x7a0b83c0, 0xaa712387, + 0x1a5843ba, 0x4d773299, 0xfd5e52a4, 0x2d24f2e3, 0x9d0d92de, + 0x8dd1b26c, 0x3df8d251, 0xed827216, 0x5dab122b, 0x8c3c42a9, + 0x3c152294, 0xec6f82d3, 0x5c46e2ee, 0x4c9ac25c, 0xfcb3a261, + 0x2cc90226, 0x9ce0621b, 0xcfe0d2f9, 0x7fc9b2c4, 0xafb31283, + 0x1f9a72be, 0x0f46520c, 0xbf6f3231, 0x6f159276, 0xdf3cf24b, + 0x0eaba2c9, 0xbe82c2f4, 0x6ef862b3, 0xded1028e, 0xce0d223c, + 0x7e244201, 0xae5ee246, 0x1e77827b, 0x92b0e6b1, 0x2299868c, + 0xf2e326cb, 0x42ca46f6, 0x52166644, 0xe23f0679, 0x3245a63e, + 0x826cc603, 0x53fb9681, 0xe3d2f6bc, 0x33a856fb, 0x838136c6, + 0x935d1674, 0x23747649, 0xf30ed60e, 0x4327b633, 0x102706d1, + 0xa00e66ec, 0x7074c6ab, 0xc05da696, 0xd0818624, 0x60a8e619, + 0xb0d2465e, 0x00fb2663, 0xd16c76e1, 0x614516dc, 0xb13fb69b, + 0x0116d6a6, 0x11caf614, 0xa1e39629, 0x7199366e, 0xc1b05653, + 0x969f2770, 0x26b6474d, 0xf6cce70a, 0x46e58737, 0x5639a785, + 0xe610c7b8, 0x366a67ff, 0x864307c2, 0x57d45740, 0xe7fd377d, + 0x3787973a, 0x87aef707, 0x9772d7b5, 0x275bb788, 0xf72117cf, + 0x470877f2, 0x1408c710, 0xa421a72d, 0x745b076a, 0xc4726757, + 0xd4ae47e5, 0x648727d8, 0xb4fd879f, 0x04d4e7a2, 0xd543b720, + 0x656ad71d, 0xb510775a, 0x05391767, 0x15e537d5, 0xa5cc57e8, + 0x75b6f7af, 0xc59f9792, 0xdbe815e9, 0x6bc175d4, 0xbbbbd593, + 0x0b92b5ae, 0x1b4e951c, 0xab67f521, 0x7b1d5566, 0xcb34355b, + 0x1aa365d9, 0xaa8a05e4, 0x7af0a5a3, 0xcad9c59e, 0xda05e52c, + 0x6a2c8511, 0xba562556, 0x0a7f456b, 0x597ff589, 0xe95695b4, + 0x392c35f3, 0x890555ce, 0x99d9757c, 0x29f01541, 0xf98ab506, + 0x49a3d53b, 0x983485b9, 0x281de584, 0xf86745c3, 0x484e25fe, + 0x5892054c, 0xe8bb6571, 0x38c1c536, 0x88e8a50b, 0xdfc7d428, + 0x6feeb415, 0xbf941452, 0x0fbd746f, 0x1f6154dd, 0xaf4834e0, + 0x7f3294a7, 0xcf1bf49a, 0x1e8ca418, 0xaea5c425, 0x7edf6462, + 0xcef6045f, 0xde2a24ed, 0x6e0344d0, 0xbe79e497, 0x0e5084aa, + 0x5d503448, 0xed795475, 0x3d03f432, 0x8d2a940f, 0x9df6b4bd, + 0x2ddfd480, 0xfda574c7, 0x4d8c14fa, 0x9c1b4478, 0x2c322445, + 0xfc488402, 0x4c61e43f, 0x5cbdc48d, 0xec94a4b0, 0x3cee04f7, + 0x8cc764ca}, + {0x00000000, 0xa5d35ccb, 0x0ba1c84d, 0xae729486, 0x1642919b, + 0xb391cd50, 0x1de359d6, 0xb830051d, 0x6d8253ec, 0xc8510f27, + 0x66239ba1, 0xc3f0c76a, 0x7bc0c277, 0xde139ebc, 0x70610a3a, + 0xd5b256f1, 0x9b02d603, 0x3ed18ac8, 0x90a31e4e, 0x35704285, + 0x8d404798, 0x28931b53, 0x86e18fd5, 0x2332d31e, 0xf68085ef, + 0x5353d924, 0xfd214da2, 0x58f21169, 0xe0c21474, 0x451148bf, + 0xeb63dc39, 0x4eb080f2, 0x3605ac07, 0x93d6f0cc, 0x3da4644a, + 0x98773881, 0x20473d9c, 0x85946157, 0x2be6f5d1, 0x8e35a91a, + 0x5b87ffeb, 0xfe54a320, 0x502637a6, 0xf5f56b6d, 0x4dc56e70, + 0xe81632bb, 0x4664a63d, 0xe3b7faf6, 0xad077a04, 0x08d426cf, + 0xa6a6b249, 0x0375ee82, 0xbb45eb9f, 0x1e96b754, 0xb0e423d2, + 0x15377f19, 0xc08529e8, 0x65567523, 0xcb24e1a5, 0x6ef7bd6e, + 0xd6c7b873, 0x7314e4b8, 0xdd66703e, 0x78b52cf5, 0x6c0a580f, + 0xc9d904c4, 0x67ab9042, 0xc278cc89, 0x7a48c994, 0xdf9b955f, + 0x71e901d9, 0xd43a5d12, 0x01880be3, 0xa45b5728, 0x0a29c3ae, + 0xaffa9f65, 0x17ca9a78, 0xb219c6b3, 0x1c6b5235, 0xb9b80efe, + 0xf7088e0c, 0x52dbd2c7, 0xfca94641, 0x597a1a8a, 0xe14a1f97, + 0x4499435c, 0xeaebd7da, 0x4f388b11, 0x9a8adde0, 0x3f59812b, + 0x912b15ad, 0x34f84966, 0x8cc84c7b, 0x291b10b0, 0x87698436, + 0x22bad8fd, 0x5a0ff408, 0xffdca8c3, 0x51ae3c45, 0xf47d608e, + 0x4c4d6593, 0xe99e3958, 0x47ecadde, 0xe23ff115, 0x378da7e4, + 0x925efb2f, 0x3c2c6fa9, 0x99ff3362, 0x21cf367f, 0x841c6ab4, + 0x2a6efe32, 0x8fbda2f9, 0xc10d220b, 0x64de7ec0, 0xcaacea46, + 0x6f7fb68d, 0xd74fb390, 0x729cef5b, 0xdcee7bdd, 0x793d2716, + 0xac8f71e7, 0x095c2d2c, 0xa72eb9aa, 0x02fde561, 0xbacde07c, + 0x1f1ebcb7, 0xb16c2831, 0x14bf74fa, 0xd814b01e, 0x7dc7ecd5, + 0xd3b57853, 0x76662498, 0xce562185, 0x6b857d4e, 0xc5f7e9c8, + 0x6024b503, 0xb596e3f2, 0x1045bf39, 0xbe372bbf, 0x1be47774, + 0xa3d47269, 0x06072ea2, 0xa875ba24, 0x0da6e6ef, 0x4316661d, + 0xe6c53ad6, 0x48b7ae50, 0xed64f29b, 0x5554f786, 0xf087ab4d, + 0x5ef53fcb, 0xfb266300, 0x2e9435f1, 0x8b47693a, 0x2535fdbc, + 0x80e6a177, 0x38d6a46a, 0x9d05f8a1, 0x33776c27, 0x96a430ec, + 0xee111c19, 0x4bc240d2, 0xe5b0d454, 0x4063889f, 0xf8538d82, + 0x5d80d149, 0xf3f245cf, 0x56211904, 0x83934ff5, 0x2640133e, + 0x883287b8, 0x2de1db73, 0x95d1de6e, 0x300282a5, 0x9e701623, + 0x3ba34ae8, 0x7513ca1a, 0xd0c096d1, 0x7eb20257, 0xdb615e9c, + 0x63515b81, 0xc682074a, 0x68f093cc, 0xcd23cf07, 0x189199f6, + 0xbd42c53d, 0x133051bb, 0xb6e30d70, 0x0ed3086d, 0xab0054a6, + 0x0572c020, 0xa0a19ceb, 0xb41ee811, 0x11cdb4da, 0xbfbf205c, + 0x1a6c7c97, 0xa25c798a, 0x078f2541, 0xa9fdb1c7, 0x0c2eed0c, + 0xd99cbbfd, 0x7c4fe736, 0xd23d73b0, 0x77ee2f7b, 0xcfde2a66, + 0x6a0d76ad, 0xc47fe22b, 0x61acbee0, 0x2f1c3e12, 0x8acf62d9, + 0x24bdf65f, 0x816eaa94, 0x395eaf89, 0x9c8df342, 0x32ff67c4, + 0x972c3b0f, 0x429e6dfe, 0xe74d3135, 0x493fa5b3, 0xececf978, + 0x54dcfc65, 0xf10fa0ae, 0x5f7d3428, 0xfaae68e3, 0x821b4416, + 0x27c818dd, 0x89ba8c5b, 0x2c69d090, 0x9459d58d, 0x318a8946, + 0x9ff81dc0, 0x3a2b410b, 0xef9917fa, 0x4a4a4b31, 0xe438dfb7, + 0x41eb837c, 0xf9db8661, 0x5c08daaa, 0xf27a4e2c, 0x57a912e7, + 0x19199215, 0xbccacede, 0x12b85a58, 0xb76b0693, 0x0f5b038e, + 0xaa885f45, 0x04facbc3, 0xa1299708, 0x749bc1f9, 0xd1489d32, + 0x7f3a09b4, 0xdae9557f, 0x62d95062, 0xc70a0ca9, 0x6978982f, + 0xccabc4e4}, + {0x00000000, 0xb40b77a6, 0x29119f97, 0x9d1ae831, 0x13244ff4, + 0xa72f3852, 0x3a35d063, 0x8e3ea7c5, 0x674eef33, 0xd3459895, + 0x4e5f70a4, 0xfa540702, 0x746aa0c7, 0xc061d761, 0x5d7b3f50, + 0xe97048f6, 0xce9cde67, 0x7a97a9c1, 0xe78d41f0, 0x53863656, + 0xddb89193, 0x69b3e635, 0xf4a90e04, 0x40a279a2, 0xa9d23154, + 0x1dd946f2, 0x80c3aec3, 0x34c8d965, 0xbaf67ea0, 0x0efd0906, + 0x93e7e137, 0x27ec9691, 0x9c39bdcf, 0x2832ca69, 0xb5282258, + 0x012355fe, 0x8f1df23b, 0x3b16859d, 0xa60c6dac, 0x12071a0a, + 0xfb7752fc, 0x4f7c255a, 0xd266cd6b, 0x666dbacd, 0xe8531d08, + 0x5c586aae, 0xc142829f, 0x7549f539, 0x52a563a8, 0xe6ae140e, + 0x7bb4fc3f, 0xcfbf8b99, 0x41812c5c, 0xf58a5bfa, 0x6890b3cb, + 0xdc9bc46d, 0x35eb8c9b, 0x81e0fb3d, 0x1cfa130c, 0xa8f164aa, + 0x26cfc36f, 0x92c4b4c9, 0x0fde5cf8, 0xbbd52b5e, 0x79750b44, + 0xcd7e7ce2, 0x506494d3, 0xe46fe375, 0x6a5144b0, 0xde5a3316, + 0x4340db27, 0xf74bac81, 0x1e3be477, 0xaa3093d1, 0x372a7be0, + 0x83210c46, 0x0d1fab83, 0xb914dc25, 0x240e3414, 0x900543b2, + 0xb7e9d523, 0x03e2a285, 0x9ef84ab4, 0x2af33d12, 0xa4cd9ad7, + 0x10c6ed71, 0x8ddc0540, 0x39d772e6, 0xd0a73a10, 0x64ac4db6, + 0xf9b6a587, 0x4dbdd221, 0xc38375e4, 0x77880242, 0xea92ea73, + 0x5e999dd5, 0xe54cb68b, 0x5147c12d, 0xcc5d291c, 0x78565eba, + 0xf668f97f, 0x42638ed9, 0xdf7966e8, 0x6b72114e, 0x820259b8, + 0x36092e1e, 0xab13c62f, 0x1f18b189, 0x9126164c, 0x252d61ea, + 0xb83789db, 0x0c3cfe7d, 0x2bd068ec, 0x9fdb1f4a, 0x02c1f77b, + 0xb6ca80dd, 0x38f42718, 0x8cff50be, 0x11e5b88f, 0xa5eecf29, + 0x4c9e87df, 0xf895f079, 0x658f1848, 0xd1846fee, 0x5fbac82b, + 0xebb1bf8d, 0x76ab57bc, 0xc2a0201a, 0xf2ea1688, 0x46e1612e, + 0xdbfb891f, 0x6ff0feb9, 0xe1ce597c, 0x55c52eda, 0xc8dfc6eb, + 0x7cd4b14d, 0x95a4f9bb, 0x21af8e1d, 0xbcb5662c, 0x08be118a, + 0x8680b64f, 0x328bc1e9, 0xaf9129d8, 0x1b9a5e7e, 0x3c76c8ef, + 0x887dbf49, 0x15675778, 0xa16c20de, 0x2f52871b, 0x9b59f0bd, + 0x0643188c, 0xb2486f2a, 0x5b3827dc, 0xef33507a, 0x7229b84b, + 0xc622cfed, 0x481c6828, 0xfc171f8e, 0x610df7bf, 0xd5068019, + 0x6ed3ab47, 0xdad8dce1, 0x47c234d0, 0xf3c94376, 0x7df7e4b3, + 0xc9fc9315, 0x54e67b24, 0xe0ed0c82, 0x099d4474, 0xbd9633d2, + 0x208cdbe3, 0x9487ac45, 0x1ab90b80, 0xaeb27c26, 0x33a89417, + 0x87a3e3b1, 0xa04f7520, 0x14440286, 0x895eeab7, 0x3d559d11, + 0xb36b3ad4, 0x07604d72, 0x9a7aa543, 0x2e71d2e5, 0xc7019a13, + 0x730aedb5, 0xee100584, 0x5a1b7222, 0xd425d5e7, 0x602ea241, + 0xfd344a70, 0x493f3dd6, 0x8b9f1dcc, 0x3f946a6a, 0xa28e825b, + 0x1685f5fd, 0x98bb5238, 0x2cb0259e, 0xb1aacdaf, 0x05a1ba09, + 0xecd1f2ff, 0x58da8559, 0xc5c06d68, 0x71cb1ace, 0xfff5bd0b, + 0x4bfecaad, 0xd6e4229c, 0x62ef553a, 0x4503c3ab, 0xf108b40d, + 0x6c125c3c, 0xd8192b9a, 0x56278c5f, 0xe22cfbf9, 0x7f3613c8, + 0xcb3d646e, 0x224d2c98, 0x96465b3e, 0x0b5cb30f, 0xbf57c4a9, + 0x3169636c, 0x856214ca, 0x1878fcfb, 0xac738b5d, 0x17a6a003, + 0xa3add7a5, 0x3eb73f94, 0x8abc4832, 0x0482eff7, 0xb0899851, + 0x2d937060, 0x999807c6, 0x70e84f30, 0xc4e33896, 0x59f9d0a7, + 0xedf2a701, 0x63cc00c4, 0xd7c77762, 0x4add9f53, 0xfed6e8f5, + 0xd93a7e64, 0x6d3109c2, 0xf02be1f3, 0x44209655, 0xca1e3190, + 0x7e154636, 0xe30fae07, 0x5704d9a1, 0xbe749157, 0x0a7fe6f1, + 0x97650ec0, 0x236e7966, 0xad50dea3, 0x195ba905, 0x84414134, + 0x304a3692}, + {0x00000000, 0x9e00aacc, 0x7d072542, 0xe3078f8e, 0xfa0e4a84, + 0x640ee048, 0x87096fc6, 0x1909c50a, 0xb51be5d3, 0x2b1b4f1f, + 0xc81cc091, 0x561c6a5d, 0x4f15af57, 0xd115059b, 0x32128a15, + 0xac1220d9, 0x2b31bb7c, 0xb53111b0, 0x56369e3e, 0xc83634f2, + 0xd13ff1f8, 0x4f3f5b34, 0xac38d4ba, 0x32387e76, 0x9e2a5eaf, + 0x002af463, 0xe32d7bed, 0x7d2dd121, 0x6424142b, 0xfa24bee7, + 0x19233169, 0x87239ba5, 0x566276f9, 0xc862dc35, 0x2b6553bb, + 0xb565f977, 0xac6c3c7d, 0x326c96b1, 0xd16b193f, 0x4f6bb3f3, + 0xe379932a, 0x7d7939e6, 0x9e7eb668, 0x007e1ca4, 0x1977d9ae, + 0x87777362, 0x6470fcec, 0xfa705620, 0x7d53cd85, 0xe3536749, + 0x0054e8c7, 0x9e54420b, 0x875d8701, 0x195d2dcd, 0xfa5aa243, + 0x645a088f, 0xc8482856, 0x5648829a, 0xb54f0d14, 0x2b4fa7d8, + 0x324662d2, 0xac46c81e, 0x4f414790, 0xd141ed5c, 0xedc29d29, + 0x73c237e5, 0x90c5b86b, 0x0ec512a7, 0x17ccd7ad, 0x89cc7d61, + 0x6acbf2ef, 0xf4cb5823, 0x58d978fa, 0xc6d9d236, 0x25de5db8, + 0xbbdef774, 0xa2d7327e, 0x3cd798b2, 0xdfd0173c, 0x41d0bdf0, + 0xc6f32655, 0x58f38c99, 0xbbf40317, 0x25f4a9db, 0x3cfd6cd1, + 0xa2fdc61d, 0x41fa4993, 0xdffae35f, 0x73e8c386, 0xede8694a, + 0x0eefe6c4, 0x90ef4c08, 0x89e68902, 0x17e623ce, 0xf4e1ac40, + 0x6ae1068c, 0xbba0ebd0, 0x25a0411c, 0xc6a7ce92, 0x58a7645e, + 0x41aea154, 0xdfae0b98, 0x3ca98416, 0xa2a92eda, 0x0ebb0e03, + 0x90bba4cf, 0x73bc2b41, 0xedbc818d, 0xf4b54487, 0x6ab5ee4b, + 0x89b261c5, 0x17b2cb09, 0x909150ac, 0x0e91fa60, 0xed9675ee, + 0x7396df22, 0x6a9f1a28, 0xf49fb0e4, 0x17983f6a, 0x899895a6, + 0x258ab57f, 0xbb8a1fb3, 0x588d903d, 0xc68d3af1, 0xdf84fffb, + 0x41845537, 0xa283dab9, 0x3c837075, 0xda853b53, 0x4485919f, + 0xa7821e11, 0x3982b4dd, 0x208b71d7, 0xbe8bdb1b, 0x5d8c5495, + 0xc38cfe59, 0x6f9ede80, 0xf19e744c, 0x1299fbc2, 0x8c99510e, + 0x95909404, 0x0b903ec8, 0xe897b146, 0x76971b8a, 0xf1b4802f, + 0x6fb42ae3, 0x8cb3a56d, 0x12b30fa1, 0x0bbacaab, 0x95ba6067, + 0x76bdefe9, 0xe8bd4525, 0x44af65fc, 0xdaafcf30, 0x39a840be, + 0xa7a8ea72, 0xbea12f78, 0x20a185b4, 0xc3a60a3a, 0x5da6a0f6, + 0x8ce74daa, 0x12e7e766, 0xf1e068e8, 0x6fe0c224, 0x76e9072e, + 0xe8e9ade2, 0x0bee226c, 0x95ee88a0, 0x39fca879, 0xa7fc02b5, + 0x44fb8d3b, 0xdafb27f7, 0xc3f2e2fd, 0x5df24831, 0xbef5c7bf, + 0x20f56d73, 0xa7d6f6d6, 0x39d65c1a, 0xdad1d394, 0x44d17958, + 0x5dd8bc52, 0xc3d8169e, 0x20df9910, 0xbedf33dc, 0x12cd1305, + 0x8ccdb9c9, 0x6fca3647, 0xf1ca9c8b, 0xe8c35981, 0x76c3f34d, + 0x95c47cc3, 0x0bc4d60f, 0x3747a67a, 0xa9470cb6, 0x4a408338, + 0xd44029f4, 0xcd49ecfe, 0x53494632, 0xb04ec9bc, 0x2e4e6370, + 0x825c43a9, 0x1c5ce965, 0xff5b66eb, 0x615bcc27, 0x7852092d, + 0xe652a3e1, 0x05552c6f, 0x9b5586a3, 0x1c761d06, 0x8276b7ca, + 0x61713844, 0xff719288, 0xe6785782, 0x7878fd4e, 0x9b7f72c0, + 0x057fd80c, 0xa96df8d5, 0x376d5219, 0xd46add97, 0x4a6a775b, + 0x5363b251, 0xcd63189d, 0x2e649713, 0xb0643ddf, 0x6125d083, + 0xff257a4f, 0x1c22f5c1, 0x82225f0d, 0x9b2b9a07, 0x052b30cb, + 0xe62cbf45, 0x782c1589, 0xd43e3550, 0x4a3e9f9c, 0xa9391012, + 0x3739bade, 0x2e307fd4, 0xb030d518, 0x53375a96, 0xcd37f05a, + 0x4a146bff, 0xd414c133, 0x37134ebd, 0xa913e471, 0xb01a217b, + 0x2e1a8bb7, 0xcd1d0439, 0x531daef5, 0xff0f8e2c, 0x610f24e0, + 0x8208ab6e, 0x1c0801a2, 0x0501c4a8, 0x9b016e64, 0x7806e1ea, + 0xe6064b26}}; + +#endif + +#endif + +#if N == 3 + +#if W == 8 + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0x81256527, 0xd93bcc0f, 0x581ea928, 0x69069e5f, + 0xe823fb78, 0xb03d5250, 0x31183777, 0xd20d3cbe, 0x53285999, + 0x0b36f0b1, 0x8a139596, 0xbb0ba2e1, 0x3a2ec7c6, 0x62306eee, + 0xe3150bc9, 0x7f6b7f3d, 0xfe4e1a1a, 0xa650b332, 0x2775d615, + 0x166de162, 0x97488445, 0xcf562d6d, 0x4e73484a, 0xad664383, + 0x2c4326a4, 0x745d8f8c, 0xf578eaab, 0xc460dddc, 0x4545b8fb, + 0x1d5b11d3, 0x9c7e74f4, 0xfed6fe7a, 0x7ff39b5d, 0x27ed3275, + 0xa6c85752, 0x97d06025, 0x16f50502, 0x4eebac2a, 0xcfcec90d, + 0x2cdbc2c4, 0xadfea7e3, 0xf5e00ecb, 0x74c56bec, 0x45dd5c9b, + 0xc4f839bc, 0x9ce69094, 0x1dc3f5b3, 0x81bd8147, 0x0098e460, + 0x58864d48, 0xd9a3286f, 0xe8bb1f18, 0x699e7a3f, 0x3180d317, + 0xb0a5b630, 0x53b0bdf9, 0xd295d8de, 0x8a8b71f6, 0x0bae14d1, + 0x3ab623a6, 0xbb934681, 0xe38defa9, 0x62a88a8e, 0x26dcfab5, + 0xa7f99f92, 0xffe736ba, 0x7ec2539d, 0x4fda64ea, 0xceff01cd, + 0x96e1a8e5, 0x17c4cdc2, 0xf4d1c60b, 0x75f4a32c, 0x2dea0a04, + 0xaccf6f23, 0x9dd75854, 0x1cf23d73, 0x44ec945b, 0xc5c9f17c, + 0x59b78588, 0xd892e0af, 0x808c4987, 0x01a92ca0, 0x30b11bd7, + 0xb1947ef0, 0xe98ad7d8, 0x68afb2ff, 0x8bbab936, 0x0a9fdc11, + 0x52817539, 0xd3a4101e, 0xe2bc2769, 0x6399424e, 0x3b87eb66, + 0xbaa28e41, 0xd80a04cf, 0x592f61e8, 0x0131c8c0, 0x8014ade7, + 0xb10c9a90, 0x3029ffb7, 0x6837569f, 0xe91233b8, 0x0a073871, + 0x8b225d56, 0xd33cf47e, 0x52199159, 0x6301a62e, 0xe224c309, + 0xba3a6a21, 0x3b1f0f06, 0xa7617bf2, 0x26441ed5, 0x7e5ab7fd, + 0xff7fd2da, 0xce67e5ad, 0x4f42808a, 0x175c29a2, 0x96794c85, + 0x756c474c, 0xf449226b, 0xac578b43, 0x2d72ee64, 0x1c6ad913, + 0x9d4fbc34, 0xc551151c, 0x4474703b, 0x4db9f56a, 0xcc9c904d, + 0x94823965, 0x15a75c42, 0x24bf6b35, 0xa59a0e12, 0xfd84a73a, + 0x7ca1c21d, 0x9fb4c9d4, 0x1e91acf3, 0x468f05db, 0xc7aa60fc, + 0xf6b2578b, 0x779732ac, 0x2f899b84, 0xaeacfea3, 0x32d28a57, + 0xb3f7ef70, 0xebe94658, 0x6acc237f, 0x5bd41408, 0xdaf1712f, + 0x82efd807, 0x03cabd20, 0xe0dfb6e9, 0x61fad3ce, 0x39e47ae6, + 0xb8c11fc1, 0x89d928b6, 0x08fc4d91, 0x50e2e4b9, 0xd1c7819e, + 0xb36f0b10, 0x324a6e37, 0x6a54c71f, 0xeb71a238, 0xda69954f, + 0x5b4cf068, 0x03525940, 0x82773c67, 0x616237ae, 0xe0475289, + 0xb859fba1, 0x397c9e86, 0x0864a9f1, 0x8941ccd6, 0xd15f65fe, + 0x507a00d9, 0xcc04742d, 0x4d21110a, 0x153fb822, 0x941add05, + 0xa502ea72, 0x24278f55, 0x7c39267d, 0xfd1c435a, 0x1e094893, + 0x9f2c2db4, 0xc732849c, 0x4617e1bb, 0x770fd6cc, 0xf62ab3eb, + 0xae341ac3, 0x2f117fe4, 0x6b650fdf, 0xea406af8, 0xb25ec3d0, + 0x337ba6f7, 0x02639180, 0x8346f4a7, 0xdb585d8f, 0x5a7d38a8, + 0xb9683361, 0x384d5646, 0x6053ff6e, 0xe1769a49, 0xd06ead3e, + 0x514bc819, 0x09556131, 0x88700416, 0x140e70e2, 0x952b15c5, + 0xcd35bced, 0x4c10d9ca, 0x7d08eebd, 0xfc2d8b9a, 0xa43322b2, + 0x25164795, 0xc6034c5c, 0x4726297b, 0x1f388053, 0x9e1de574, + 0xaf05d203, 0x2e20b724, 0x763e1e0c, 0xf71b7b2b, 0x95b3f1a5, + 0x14969482, 0x4c883daa, 0xcdad588d, 0xfcb56ffa, 0x7d900add, + 0x258ea3f5, 0xa4abc6d2, 0x47becd1b, 0xc69ba83c, 0x9e850114, + 0x1fa06433, 0x2eb85344, 0xaf9d3663, 0xf7839f4b, 0x76a6fa6c, + 0xead88e98, 0x6bfdebbf, 0x33e34297, 0xb2c627b0, 0x83de10c7, + 0x02fb75e0, 0x5ae5dcc8, 0xdbc0b9ef, 0x38d5b226, 0xb9f0d701, + 0xe1ee7e29, 0x60cb1b0e, 0x51d32c79, 0xd0f6495e, 0x88e8e076, + 0x09cd8551}, + {0x00000000, 0x9b73ead4, 0xed96d3e9, 0x76e5393d, 0x005ca193, + 0x9b2f4b47, 0xedca727a, 0x76b998ae, 0x00b94326, 0x9bcaa9f2, + 0xed2f90cf, 0x765c7a1b, 0x00e5e2b5, 0x9b960861, 0xed73315c, + 0x7600db88, 0x0172864c, 0x9a016c98, 0xece455a5, 0x7797bf71, + 0x012e27df, 0x9a5dcd0b, 0xecb8f436, 0x77cb1ee2, 0x01cbc56a, + 0x9ab82fbe, 0xec5d1683, 0x772efc57, 0x019764f9, 0x9ae48e2d, + 0xec01b710, 0x77725dc4, 0x02e50c98, 0x9996e64c, 0xef73df71, + 0x740035a5, 0x02b9ad0b, 0x99ca47df, 0xef2f7ee2, 0x745c9436, + 0x025c4fbe, 0x992fa56a, 0xefca9c57, 0x74b97683, 0x0200ee2d, + 0x997304f9, 0xef963dc4, 0x74e5d710, 0x03978ad4, 0x98e46000, + 0xee01593d, 0x7572b3e9, 0x03cb2b47, 0x98b8c193, 0xee5df8ae, + 0x752e127a, 0x032ec9f2, 0x985d2326, 0xeeb81a1b, 0x75cbf0cf, + 0x03726861, 0x980182b5, 0xeee4bb88, 0x7597515c, 0x05ca1930, + 0x9eb9f3e4, 0xe85ccad9, 0x732f200d, 0x0596b8a3, 0x9ee55277, + 0xe8006b4a, 0x7373819e, 0x05735a16, 0x9e00b0c2, 0xe8e589ff, + 0x7396632b, 0x052ffb85, 0x9e5c1151, 0xe8b9286c, 0x73cac2b8, + 0x04b89f7c, 0x9fcb75a8, 0xe92e4c95, 0x725da641, 0x04e43eef, + 0x9f97d43b, 0xe972ed06, 0x720107d2, 0x0401dc5a, 0x9f72368e, + 0xe9970fb3, 0x72e4e567, 0x045d7dc9, 0x9f2e971d, 0xe9cbae20, + 0x72b844f4, 0x072f15a8, 0x9c5cff7c, 0xeab9c641, 0x71ca2c95, + 0x0773b43b, 0x9c005eef, 0xeae567d2, 0x71968d06, 0x0796568e, + 0x9ce5bc5a, 0xea008567, 0x71736fb3, 0x07caf71d, 0x9cb91dc9, + 0xea5c24f4, 0x712fce20, 0x065d93e4, 0x9d2e7930, 0xebcb400d, + 0x70b8aad9, 0x06013277, 0x9d72d8a3, 0xeb97e19e, 0x70e40b4a, + 0x06e4d0c2, 0x9d973a16, 0xeb72032b, 0x7001e9ff, 0x06b87151, + 0x9dcb9b85, 0xeb2ea2b8, 0x705d486c, 0x0b943260, 0x90e7d8b4, + 0xe602e189, 0x7d710b5d, 0x0bc893f3, 0x90bb7927, 0xe65e401a, + 0x7d2daace, 0x0b2d7146, 0x905e9b92, 0xe6bba2af, 0x7dc8487b, + 0x0b71d0d5, 0x90023a01, 0xe6e7033c, 0x7d94e9e8, 0x0ae6b42c, + 0x91955ef8, 0xe77067c5, 0x7c038d11, 0x0aba15bf, 0x91c9ff6b, + 0xe72cc656, 0x7c5f2c82, 0x0a5ff70a, 0x912c1dde, 0xe7c924e3, + 0x7cbace37, 0x0a035699, 0x9170bc4d, 0xe7958570, 0x7ce66fa4, + 0x09713ef8, 0x9202d42c, 0xe4e7ed11, 0x7f9407c5, 0x092d9f6b, + 0x925e75bf, 0xe4bb4c82, 0x7fc8a656, 0x09c87dde, 0x92bb970a, + 0xe45eae37, 0x7f2d44e3, 0x0994dc4d, 0x92e73699, 0xe4020fa4, + 0x7f71e570, 0x0803b8b4, 0x93705260, 0xe5956b5d, 0x7ee68189, + 0x085f1927, 0x932cf3f3, 0xe5c9cace, 0x7eba201a, 0x08bafb92, + 0x93c91146, 0xe52c287b, 0x7e5fc2af, 0x08e65a01, 0x9395b0d5, + 0xe57089e8, 0x7e03633c, 0x0e5e2b50, 0x952dc184, 0xe3c8f8b9, + 0x78bb126d, 0x0e028ac3, 0x95716017, 0xe394592a, 0x78e7b3fe, + 0x0ee76876, 0x959482a2, 0xe371bb9f, 0x7802514b, 0x0ebbc9e5, + 0x95c82331, 0xe32d1a0c, 0x785ef0d8, 0x0f2cad1c, 0x945f47c8, + 0xe2ba7ef5, 0x79c99421, 0x0f700c8f, 0x9403e65b, 0xe2e6df66, + 0x799535b2, 0x0f95ee3a, 0x94e604ee, 0xe2033dd3, 0x7970d707, + 0x0fc94fa9, 0x94baa57d, 0xe25f9c40, 0x792c7694, 0x0cbb27c8, + 0x97c8cd1c, 0xe12df421, 0x7a5e1ef5, 0x0ce7865b, 0x97946c8f, + 0xe17155b2, 0x7a02bf66, 0x0c0264ee, 0x97718e3a, 0xe194b707, + 0x7ae75dd3, 0x0c5ec57d, 0x972d2fa9, 0xe1c81694, 0x7abbfc40, + 0x0dc9a184, 0x96ba4b50, 0xe05f726d, 0x7b2c98b9, 0x0d950017, + 0x96e6eac3, 0xe003d3fe, 0x7b70392a, 0x0d70e2a2, 0x96030876, + 0xe0e6314b, 0x7b95db9f, 0x0d2c4331, 0x965fa9e5, 0xe0ba90d8, + 0x7bc97a0c}, + {0x00000000, 0x172864c0, 0x2e50c980, 0x3978ad40, 0x5ca19300, + 0x4b89f7c0, 0x72f15a80, 0x65d93e40, 0xb9432600, 0xae6b42c0, + 0x9713ef80, 0x803b8b40, 0xe5e2b500, 0xf2cad1c0, 0xcbb27c80, + 0xdc9a1840, 0xa9f74a41, 0xbedf2e81, 0x87a783c1, 0x908fe701, + 0xf556d941, 0xe27ebd81, 0xdb0610c1, 0xcc2e7401, 0x10b46c41, + 0x079c0881, 0x3ee4a5c1, 0x29ccc101, 0x4c15ff41, 0x5b3d9b81, + 0x624536c1, 0x756d5201, 0x889f92c3, 0x9fb7f603, 0xa6cf5b43, + 0xb1e73f83, 0xd43e01c3, 0xc3166503, 0xfa6ec843, 0xed46ac83, + 0x31dcb4c3, 0x26f4d003, 0x1f8c7d43, 0x08a41983, 0x6d7d27c3, + 0x7a554303, 0x432dee43, 0x54058a83, 0x2168d882, 0x3640bc42, + 0x0f381102, 0x181075c2, 0x7dc94b82, 0x6ae12f42, 0x53998202, + 0x44b1e6c2, 0x982bfe82, 0x8f039a42, 0xb67b3702, 0xa15353c2, + 0xc48a6d82, 0xd3a20942, 0xeadaa402, 0xfdf2c0c2, 0xca4e23c7, + 0xdd664707, 0xe41eea47, 0xf3368e87, 0x96efb0c7, 0x81c7d407, + 0xb8bf7947, 0xaf971d87, 0x730d05c7, 0x64256107, 0x5d5dcc47, + 0x4a75a887, 0x2fac96c7, 0x3884f207, 0x01fc5f47, 0x16d43b87, + 0x63b96986, 0x74910d46, 0x4de9a006, 0x5ac1c4c6, 0x3f18fa86, + 0x28309e46, 0x11483306, 0x066057c6, 0xdafa4f86, 0xcdd22b46, + 0xf4aa8606, 0xe382e2c6, 0x865bdc86, 0x9173b846, 0xa80b1506, + 0xbf2371c6, 0x42d1b104, 0x55f9d5c4, 0x6c817884, 0x7ba91c44, + 0x1e702204, 0x095846c4, 0x3020eb84, 0x27088f44, 0xfb929704, + 0xecbaf3c4, 0xd5c25e84, 0xc2ea3a44, 0xa7330404, 0xb01b60c4, + 0x8963cd84, 0x9e4ba944, 0xeb26fb45, 0xfc0e9f85, 0xc57632c5, + 0xd25e5605, 0xb7876845, 0xa0af0c85, 0x99d7a1c5, 0x8effc505, + 0x5265dd45, 0x454db985, 0x7c3514c5, 0x6b1d7005, 0x0ec44e45, + 0x19ec2a85, 0x209487c5, 0x37bce305, 0x4fed41cf, 0x58c5250f, + 0x61bd884f, 0x7695ec8f, 0x134cd2cf, 0x0464b60f, 0x3d1c1b4f, + 0x2a347f8f, 0xf6ae67cf, 0xe186030f, 0xd8feae4f, 0xcfd6ca8f, + 0xaa0ff4cf, 0xbd27900f, 0x845f3d4f, 0x9377598f, 0xe61a0b8e, + 0xf1326f4e, 0xc84ac20e, 0xdf62a6ce, 0xbabb988e, 0xad93fc4e, + 0x94eb510e, 0x83c335ce, 0x5f592d8e, 0x4871494e, 0x7109e40e, + 0x662180ce, 0x03f8be8e, 0x14d0da4e, 0x2da8770e, 0x3a8013ce, + 0xc772d30c, 0xd05ab7cc, 0xe9221a8c, 0xfe0a7e4c, 0x9bd3400c, + 0x8cfb24cc, 0xb583898c, 0xa2abed4c, 0x7e31f50c, 0x691991cc, + 0x50613c8c, 0x4749584c, 0x2290660c, 0x35b802cc, 0x0cc0af8c, + 0x1be8cb4c, 0x6e85994d, 0x79adfd8d, 0x40d550cd, 0x57fd340d, + 0x32240a4d, 0x250c6e8d, 0x1c74c3cd, 0x0b5ca70d, 0xd7c6bf4d, + 0xc0eedb8d, 0xf99676cd, 0xeebe120d, 0x8b672c4d, 0x9c4f488d, + 0xa537e5cd, 0xb21f810d, 0x85a36208, 0x928b06c8, 0xabf3ab88, + 0xbcdbcf48, 0xd902f108, 0xce2a95c8, 0xf7523888, 0xe07a5c48, + 0x3ce04408, 0x2bc820c8, 0x12b08d88, 0x0598e948, 0x6041d708, + 0x7769b3c8, 0x4e111e88, 0x59397a48, 0x2c542849, 0x3b7c4c89, + 0x0204e1c9, 0x152c8509, 0x70f5bb49, 0x67dddf89, 0x5ea572c9, + 0x498d1609, 0x95170e49, 0x823f6a89, 0xbb47c7c9, 0xac6fa309, + 0xc9b69d49, 0xde9ef989, 0xe7e654c9, 0xf0ce3009, 0x0d3cf0cb, + 0x1a14940b, 0x236c394b, 0x34445d8b, 0x519d63cb, 0x46b5070b, + 0x7fcdaa4b, 0x68e5ce8b, 0xb47fd6cb, 0xa357b20b, 0x9a2f1f4b, + 0x8d077b8b, 0xe8de45cb, 0xfff6210b, 0xc68e8c4b, 0xd1a6e88b, + 0xa4cbba8a, 0xb3e3de4a, 0x8a9b730a, 0x9db317ca, 0xf86a298a, + 0xef424d4a, 0xd63ae00a, 0xc11284ca, 0x1d889c8a, 0x0aa0f84a, + 0x33d8550a, 0x24f031ca, 0x41290f8a, 0x56016b4a, 0x6f79c60a, + 0x7851a2ca}, + {0x00000000, 0x9fda839e, 0xe4c4017d, 0x7b1e82e3, 0x12f904bb, + 0x8d238725, 0xf63d05c6, 0x69e78658, 0x25f20976, 0xba288ae8, + 0xc136080b, 0x5eec8b95, 0x370b0dcd, 0xa8d18e53, 0xd3cf0cb0, + 0x4c158f2e, 0x4be412ec, 0xd43e9172, 0xaf201391, 0x30fa900f, + 0x591d1657, 0xc6c795c9, 0xbdd9172a, 0x220394b4, 0x6e161b9a, + 0xf1cc9804, 0x8ad21ae7, 0x15089979, 0x7cef1f21, 0xe3359cbf, + 0x982b1e5c, 0x07f19dc2, 0x97c825d8, 0x0812a646, 0x730c24a5, + 0xecd6a73b, 0x85312163, 0x1aeba2fd, 0x61f5201e, 0xfe2fa380, + 0xb23a2cae, 0x2de0af30, 0x56fe2dd3, 0xc924ae4d, 0xa0c32815, + 0x3f19ab8b, 0x44072968, 0xdbddaaf6, 0xdc2c3734, 0x43f6b4aa, + 0x38e83649, 0xa732b5d7, 0xced5338f, 0x510fb011, 0x2a1132f2, + 0xb5cbb16c, 0xf9de3e42, 0x6604bddc, 0x1d1a3f3f, 0x82c0bca1, + 0xeb273af9, 0x74fdb967, 0x0fe33b84, 0x9039b81a, 0xf4e14df1, + 0x6b3bce6f, 0x10254c8c, 0x8fffcf12, 0xe618494a, 0x79c2cad4, + 0x02dc4837, 0x9d06cba9, 0xd1134487, 0x4ec9c719, 0x35d745fa, + 0xaa0dc664, 0xc3ea403c, 0x5c30c3a2, 0x272e4141, 0xb8f4c2df, + 0xbf055f1d, 0x20dfdc83, 0x5bc15e60, 0xc41bddfe, 0xadfc5ba6, + 0x3226d838, 0x49385adb, 0xd6e2d945, 0x9af7566b, 0x052dd5f5, + 0x7e335716, 0xe1e9d488, 0x880e52d0, 0x17d4d14e, 0x6cca53ad, + 0xf310d033, 0x63296829, 0xfcf3ebb7, 0x87ed6954, 0x1837eaca, + 0x71d06c92, 0xee0aef0c, 0x95146def, 0x0aceee71, 0x46db615f, + 0xd901e2c1, 0xa21f6022, 0x3dc5e3bc, 0x542265e4, 0xcbf8e67a, + 0xb0e66499, 0x2f3ce707, 0x28cd7ac5, 0xb717f95b, 0xcc097bb8, + 0x53d3f826, 0x3a347e7e, 0xa5eefde0, 0xdef07f03, 0x412afc9d, + 0x0d3f73b3, 0x92e5f02d, 0xe9fb72ce, 0x7621f150, 0x1fc67708, + 0x801cf496, 0xfb027675, 0x64d8f5eb, 0x32b39da3, 0xad691e3d, + 0xd6779cde, 0x49ad1f40, 0x204a9918, 0xbf901a86, 0xc48e9865, + 0x5b541bfb, 0x174194d5, 0x889b174b, 0xf38595a8, 0x6c5f1636, + 0x05b8906e, 0x9a6213f0, 0xe17c9113, 0x7ea6128d, 0x79578f4f, + 0xe68d0cd1, 0x9d938e32, 0x02490dac, 0x6bae8bf4, 0xf474086a, + 0x8f6a8a89, 0x10b00917, 0x5ca58639, 0xc37f05a7, 0xb8618744, + 0x27bb04da, 0x4e5c8282, 0xd186011c, 0xaa9883ff, 0x35420061, + 0xa57bb87b, 0x3aa13be5, 0x41bfb906, 0xde653a98, 0xb782bcc0, + 0x28583f5e, 0x5346bdbd, 0xcc9c3e23, 0x8089b10d, 0x1f533293, + 0x644db070, 0xfb9733ee, 0x9270b5b6, 0x0daa3628, 0x76b4b4cb, + 0xe96e3755, 0xee9faa97, 0x71452909, 0x0a5babea, 0x95812874, + 0xfc66ae2c, 0x63bc2db2, 0x18a2af51, 0x87782ccf, 0xcb6da3e1, + 0x54b7207f, 0x2fa9a29c, 0xb0732102, 0xd994a75a, 0x464e24c4, + 0x3d50a627, 0xa28a25b9, 0xc652d052, 0x598853cc, 0x2296d12f, + 0xbd4c52b1, 0xd4abd4e9, 0x4b715777, 0x306fd594, 0xafb5560a, + 0xe3a0d924, 0x7c7a5aba, 0x0764d859, 0x98be5bc7, 0xf159dd9f, + 0x6e835e01, 0x159ddce2, 0x8a475f7c, 0x8db6c2be, 0x126c4120, + 0x6972c3c3, 0xf6a8405d, 0x9f4fc605, 0x0095459b, 0x7b8bc778, + 0xe45144e6, 0xa844cbc8, 0x379e4856, 0x4c80cab5, 0xd35a492b, + 0xbabdcf73, 0x25674ced, 0x5e79ce0e, 0xc1a34d90, 0x519af58a, + 0xce407614, 0xb55ef4f7, 0x2a847769, 0x4363f131, 0xdcb972af, + 0xa7a7f04c, 0x387d73d2, 0x7468fcfc, 0xebb27f62, 0x90acfd81, + 0x0f767e1f, 0x6691f847, 0xf94b7bd9, 0x8255f93a, 0x1d8f7aa4, + 0x1a7ee766, 0x85a464f8, 0xfebae61b, 0x61606585, 0x0887e3dd, + 0x975d6043, 0xec43e2a0, 0x7399613e, 0x3f8cee10, 0xa0566d8e, + 0xdb48ef6d, 0x44926cf3, 0x2d75eaab, 0xb2af6935, 0xc9b1ebd6, + 0x566b6848}, + {0x00000000, 0x65673b46, 0xcace768c, 0xafa94dca, 0x4eedeb59, + 0x2b8ad01f, 0x84239dd5, 0xe144a693, 0x9ddbd6b2, 0xf8bcedf4, + 0x5715a03e, 0x32729b78, 0xd3363deb, 0xb65106ad, 0x19f84b67, + 0x7c9f7021, 0xe0c6ab25, 0x85a19063, 0x2a08dda9, 0x4f6fe6ef, + 0xae2b407c, 0xcb4c7b3a, 0x64e536f0, 0x01820db6, 0x7d1d7d97, + 0x187a46d1, 0xb7d30b1b, 0xd2b4305d, 0x33f096ce, 0x5697ad88, + 0xf93ee042, 0x9c59db04, 0x1afc500b, 0x7f9b6b4d, 0xd0322687, + 0xb5551dc1, 0x5411bb52, 0x31768014, 0x9edfcdde, 0xfbb8f698, + 0x872786b9, 0xe240bdff, 0x4de9f035, 0x288ecb73, 0xc9ca6de0, + 0xacad56a6, 0x03041b6c, 0x6663202a, 0xfa3afb2e, 0x9f5dc068, + 0x30f48da2, 0x5593b6e4, 0xb4d71077, 0xd1b02b31, 0x7e1966fb, + 0x1b7e5dbd, 0x67e12d9c, 0x028616da, 0xad2f5b10, 0xc8486056, + 0x290cc6c5, 0x4c6bfd83, 0xe3c2b049, 0x86a58b0f, 0x35f8a016, + 0x509f9b50, 0xff36d69a, 0x9a51eddc, 0x7b154b4f, 0x1e727009, + 0xb1db3dc3, 0xd4bc0685, 0xa82376a4, 0xcd444de2, 0x62ed0028, + 0x078a3b6e, 0xe6ce9dfd, 0x83a9a6bb, 0x2c00eb71, 0x4967d037, + 0xd53e0b33, 0xb0593075, 0x1ff07dbf, 0x7a9746f9, 0x9bd3e06a, + 0xfeb4db2c, 0x511d96e6, 0x347aada0, 0x48e5dd81, 0x2d82e6c7, + 0x822bab0d, 0xe74c904b, 0x060836d8, 0x636f0d9e, 0xccc64054, + 0xa9a17b12, 0x2f04f01d, 0x4a63cb5b, 0xe5ca8691, 0x80adbdd7, + 0x61e91b44, 0x048e2002, 0xab276dc8, 0xce40568e, 0xb2df26af, + 0xd7b81de9, 0x78115023, 0x1d766b65, 0xfc32cdf6, 0x9955f6b0, + 0x36fcbb7a, 0x539b803c, 0xcfc25b38, 0xaaa5607e, 0x050c2db4, + 0x606b16f2, 0x812fb061, 0xe4488b27, 0x4be1c6ed, 0x2e86fdab, + 0x52198d8a, 0x377eb6cc, 0x98d7fb06, 0xfdb0c040, 0x1cf466d3, + 0x79935d95, 0xd63a105f, 0xb35d2b19, 0x6bf1402c, 0x0e967b6a, + 0xa13f36a0, 0xc4580de6, 0x251cab75, 0x407b9033, 0xefd2ddf9, + 0x8ab5e6bf, 0xf62a969e, 0x934dadd8, 0x3ce4e012, 0x5983db54, + 0xb8c77dc7, 0xdda04681, 0x72090b4b, 0x176e300d, 0x8b37eb09, + 0xee50d04f, 0x41f99d85, 0x249ea6c3, 0xc5da0050, 0xa0bd3b16, + 0x0f1476dc, 0x6a734d9a, 0x16ec3dbb, 0x738b06fd, 0xdc224b37, + 0xb9457071, 0x5801d6e2, 0x3d66eda4, 0x92cfa06e, 0xf7a89b28, + 0x710d1027, 0x146a2b61, 0xbbc366ab, 0xdea45ded, 0x3fe0fb7e, + 0x5a87c038, 0xf52e8df2, 0x9049b6b4, 0xecd6c695, 0x89b1fdd3, + 0x2618b019, 0x437f8b5f, 0xa23b2dcc, 0xc75c168a, 0x68f55b40, + 0x0d926006, 0x91cbbb02, 0xf4ac8044, 0x5b05cd8e, 0x3e62f6c8, + 0xdf26505b, 0xba416b1d, 0x15e826d7, 0x708f1d91, 0x0c106db0, + 0x697756f6, 0xc6de1b3c, 0xa3b9207a, 0x42fd86e9, 0x279abdaf, + 0x8833f065, 0xed54cb23, 0x5e09e03a, 0x3b6edb7c, 0x94c796b6, + 0xf1a0adf0, 0x10e40b63, 0x75833025, 0xda2a7def, 0xbf4d46a9, + 0xc3d23688, 0xa6b50dce, 0x091c4004, 0x6c7b7b42, 0x8d3fddd1, + 0xe858e697, 0x47f1ab5d, 0x2296901b, 0xbecf4b1f, 0xdba87059, + 0x74013d93, 0x116606d5, 0xf022a046, 0x95459b00, 0x3aecd6ca, + 0x5f8bed8c, 0x23149dad, 0x4673a6eb, 0xe9daeb21, 0x8cbdd067, + 0x6df976f4, 0x089e4db2, 0xa7370078, 0xc2503b3e, 0x44f5b031, + 0x21928b77, 0x8e3bc6bd, 0xeb5cfdfb, 0x0a185b68, 0x6f7f602e, + 0xc0d62de4, 0xa5b116a2, 0xd92e6683, 0xbc495dc5, 0x13e0100f, + 0x76872b49, 0x97c38dda, 0xf2a4b69c, 0x5d0dfb56, 0x386ac010, + 0xa4331b14, 0xc1542052, 0x6efd6d98, 0x0b9a56de, 0xeadef04d, + 0x8fb9cb0b, 0x201086c1, 0x4577bd87, 0x39e8cda6, 0x5c8ff6e0, + 0xf326bb2a, 0x9641806c, 0x770526ff, 0x12621db9, 0xbdcb5073, + 0xd8ac6b35}, + {0x00000000, 0xd7e28058, 0x74b406f1, 0xa35686a9, 0xe9680de2, + 0x3e8a8dba, 0x9ddc0b13, 0x4a3e8b4b, 0x09a11d85, 0xde439ddd, + 0x7d151b74, 0xaaf79b2c, 0xe0c91067, 0x372b903f, 0x947d1696, + 0x439f96ce, 0x13423b0a, 0xc4a0bb52, 0x67f63dfb, 0xb014bda3, + 0xfa2a36e8, 0x2dc8b6b0, 0x8e9e3019, 0x597cb041, 0x1ae3268f, + 0xcd01a6d7, 0x6e57207e, 0xb9b5a026, 0xf38b2b6d, 0x2469ab35, + 0x873f2d9c, 0x50ddadc4, 0x26847614, 0xf166f64c, 0x523070e5, + 0x85d2f0bd, 0xcfec7bf6, 0x180efbae, 0xbb587d07, 0x6cbafd5f, + 0x2f256b91, 0xf8c7ebc9, 0x5b916d60, 0x8c73ed38, 0xc64d6673, + 0x11afe62b, 0xb2f96082, 0x651be0da, 0x35c64d1e, 0xe224cd46, + 0x41724bef, 0x9690cbb7, 0xdcae40fc, 0x0b4cc0a4, 0xa81a460d, + 0x7ff8c655, 0x3c67509b, 0xeb85d0c3, 0x48d3566a, 0x9f31d632, + 0xd50f5d79, 0x02eddd21, 0xa1bb5b88, 0x7659dbd0, 0x4d08ec28, + 0x9aea6c70, 0x39bcead9, 0xee5e6a81, 0xa460e1ca, 0x73826192, + 0xd0d4e73b, 0x07366763, 0x44a9f1ad, 0x934b71f5, 0x301df75c, + 0xe7ff7704, 0xadc1fc4f, 0x7a237c17, 0xd975fabe, 0x0e977ae6, + 0x5e4ad722, 0x89a8577a, 0x2afed1d3, 0xfd1c518b, 0xb722dac0, + 0x60c05a98, 0xc396dc31, 0x14745c69, 0x57ebcaa7, 0x80094aff, + 0x235fcc56, 0xf4bd4c0e, 0xbe83c745, 0x6961471d, 0xca37c1b4, + 0x1dd541ec, 0x6b8c9a3c, 0xbc6e1a64, 0x1f389ccd, 0xc8da1c95, + 0x82e497de, 0x55061786, 0xf650912f, 0x21b21177, 0x622d87b9, + 0xb5cf07e1, 0x16998148, 0xc17b0110, 0x8b458a5b, 0x5ca70a03, + 0xfff18caa, 0x28130cf2, 0x78cea136, 0xaf2c216e, 0x0c7aa7c7, + 0xdb98279f, 0x91a6acd4, 0x46442c8c, 0xe512aa25, 0x32f02a7d, + 0x716fbcb3, 0xa68d3ceb, 0x05dbba42, 0xd2393a1a, 0x9807b151, + 0x4fe53109, 0xecb3b7a0, 0x3b5137f8, 0x9a11d850, 0x4df35808, + 0xeea5dea1, 0x39475ef9, 0x7379d5b2, 0xa49b55ea, 0x07cdd343, + 0xd02f531b, 0x93b0c5d5, 0x4452458d, 0xe704c324, 0x30e6437c, + 0x7ad8c837, 0xad3a486f, 0x0e6ccec6, 0xd98e4e9e, 0x8953e35a, + 0x5eb16302, 0xfde7e5ab, 0x2a0565f3, 0x603beeb8, 0xb7d96ee0, + 0x148fe849, 0xc36d6811, 0x80f2fedf, 0x57107e87, 0xf446f82e, + 0x23a47876, 0x699af33d, 0xbe787365, 0x1d2ef5cc, 0xcacc7594, + 0xbc95ae44, 0x6b772e1c, 0xc821a8b5, 0x1fc328ed, 0x55fda3a6, + 0x821f23fe, 0x2149a557, 0xf6ab250f, 0xb534b3c1, 0x62d63399, + 0xc180b530, 0x16623568, 0x5c5cbe23, 0x8bbe3e7b, 0x28e8b8d2, + 0xff0a388a, 0xafd7954e, 0x78351516, 0xdb6393bf, 0x0c8113e7, + 0x46bf98ac, 0x915d18f4, 0x320b9e5d, 0xe5e91e05, 0xa67688cb, + 0x71940893, 0xd2c28e3a, 0x05200e62, 0x4f1e8529, 0x98fc0571, + 0x3baa83d8, 0xec480380, 0xd7193478, 0x00fbb420, 0xa3ad3289, + 0x744fb2d1, 0x3e71399a, 0xe993b9c2, 0x4ac53f6b, 0x9d27bf33, + 0xdeb829fd, 0x095aa9a5, 0xaa0c2f0c, 0x7deeaf54, 0x37d0241f, + 0xe032a447, 0x436422ee, 0x9486a2b6, 0xc45b0f72, 0x13b98f2a, + 0xb0ef0983, 0x670d89db, 0x2d330290, 0xfad182c8, 0x59870461, + 0x8e658439, 0xcdfa12f7, 0x1a1892af, 0xb94e1406, 0x6eac945e, + 0x24921f15, 0xf3709f4d, 0x502619e4, 0x87c499bc, 0xf19d426c, + 0x267fc234, 0x8529449d, 0x52cbc4c5, 0x18f54f8e, 0xcf17cfd6, + 0x6c41497f, 0xbba3c927, 0xf83c5fe9, 0x2fdedfb1, 0x8c885918, + 0x5b6ad940, 0x1154520b, 0xc6b6d253, 0x65e054fa, 0xb202d4a2, + 0xe2df7966, 0x353df93e, 0x966b7f97, 0x4189ffcf, 0x0bb77484, + 0xdc55f4dc, 0x7f037275, 0xa8e1f22d, 0xeb7e64e3, 0x3c9ce4bb, + 0x9fca6212, 0x4828e24a, 0x02166901, 0xd5f4e959, 0x76a26ff0, + 0xa140efa8}, + {0x00000000, 0xef52b6e1, 0x05d46b83, 0xea86dd62, 0x0ba8d706, + 0xe4fa61e7, 0x0e7cbc85, 0xe12e0a64, 0x1751ae0c, 0xf80318ed, + 0x1285c58f, 0xfdd7736e, 0x1cf9790a, 0xf3abcfeb, 0x192d1289, + 0xf67fa468, 0x2ea35c18, 0xc1f1eaf9, 0x2b77379b, 0xc425817a, + 0x250b8b1e, 0xca593dff, 0x20dfe09d, 0xcf8d567c, 0x39f2f214, + 0xd6a044f5, 0x3c269997, 0xd3742f76, 0x325a2512, 0xdd0893f3, + 0x378e4e91, 0xd8dcf870, 0x5d46b830, 0xb2140ed1, 0x5892d3b3, + 0xb7c06552, 0x56ee6f36, 0xb9bcd9d7, 0x533a04b5, 0xbc68b254, + 0x4a17163c, 0xa545a0dd, 0x4fc37dbf, 0xa091cb5e, 0x41bfc13a, + 0xaeed77db, 0x446baab9, 0xab391c58, 0x73e5e428, 0x9cb752c9, + 0x76318fab, 0x9963394a, 0x784d332e, 0x971f85cf, 0x7d9958ad, + 0x92cbee4c, 0x64b44a24, 0x8be6fcc5, 0x616021a7, 0x8e329746, + 0x6f1c9d22, 0x804e2bc3, 0x6ac8f6a1, 0x859a4040, 0xba8d7060, + 0x55dfc681, 0xbf591be3, 0x500bad02, 0xb125a766, 0x5e771187, + 0xb4f1cce5, 0x5ba37a04, 0xaddcde6c, 0x428e688d, 0xa808b5ef, + 0x475a030e, 0xa674096a, 0x4926bf8b, 0xa3a062e9, 0x4cf2d408, + 0x942e2c78, 0x7b7c9a99, 0x91fa47fb, 0x7ea8f11a, 0x9f86fb7e, + 0x70d44d9f, 0x9a5290fd, 0x7500261c, 0x837f8274, 0x6c2d3495, + 0x86abe9f7, 0x69f95f16, 0x88d75572, 0x6785e393, 0x8d033ef1, + 0x62518810, 0xe7cbc850, 0x08997eb1, 0xe21fa3d3, 0x0d4d1532, + 0xec631f56, 0x0331a9b7, 0xe9b774d5, 0x06e5c234, 0xf09a665c, + 0x1fc8d0bd, 0xf54e0ddf, 0x1a1cbb3e, 0xfb32b15a, 0x146007bb, + 0xfee6dad9, 0x11b46c38, 0xc9689448, 0x263a22a9, 0xccbcffcb, + 0x23ee492a, 0xc2c0434e, 0x2d92f5af, 0xc71428cd, 0x28469e2c, + 0xde393a44, 0x316b8ca5, 0xdbed51c7, 0x34bfe726, 0xd591ed42, + 0x3ac35ba3, 0xd04586c1, 0x3f173020, 0xae6be681, 0x41395060, + 0xabbf8d02, 0x44ed3be3, 0xa5c33187, 0x4a918766, 0xa0175a04, + 0x4f45ece5, 0xb93a488d, 0x5668fe6c, 0xbcee230e, 0x53bc95ef, + 0xb2929f8b, 0x5dc0296a, 0xb746f408, 0x581442e9, 0x80c8ba99, + 0x6f9a0c78, 0x851cd11a, 0x6a4e67fb, 0x8b606d9f, 0x6432db7e, + 0x8eb4061c, 0x61e6b0fd, 0x97991495, 0x78cba274, 0x924d7f16, + 0x7d1fc9f7, 0x9c31c393, 0x73637572, 0x99e5a810, 0x76b71ef1, + 0xf32d5eb1, 0x1c7fe850, 0xf6f93532, 0x19ab83d3, 0xf88589b7, + 0x17d73f56, 0xfd51e234, 0x120354d5, 0xe47cf0bd, 0x0b2e465c, + 0xe1a89b3e, 0x0efa2ddf, 0xefd427bb, 0x0086915a, 0xea004c38, + 0x0552fad9, 0xdd8e02a9, 0x32dcb448, 0xd85a692a, 0x3708dfcb, + 0xd626d5af, 0x3974634e, 0xd3f2be2c, 0x3ca008cd, 0xcadfaca5, + 0x258d1a44, 0xcf0bc726, 0x205971c7, 0xc1777ba3, 0x2e25cd42, + 0xc4a31020, 0x2bf1a6c1, 0x14e696e1, 0xfbb42000, 0x1132fd62, + 0xfe604b83, 0x1f4e41e7, 0xf01cf706, 0x1a9a2a64, 0xf5c89c85, + 0x03b738ed, 0xece58e0c, 0x0663536e, 0xe931e58f, 0x081fefeb, + 0xe74d590a, 0x0dcb8468, 0xe2993289, 0x3a45caf9, 0xd5177c18, + 0x3f91a17a, 0xd0c3179b, 0x31ed1dff, 0xdebfab1e, 0x3439767c, + 0xdb6bc09d, 0x2d1464f5, 0xc246d214, 0x28c00f76, 0xc792b997, + 0x26bcb3f3, 0xc9ee0512, 0x2368d870, 0xcc3a6e91, 0x49a02ed1, + 0xa6f29830, 0x4c744552, 0xa326f3b3, 0x4208f9d7, 0xad5a4f36, + 0x47dc9254, 0xa88e24b5, 0x5ef180dd, 0xb1a3363c, 0x5b25eb5e, + 0xb4775dbf, 0x555957db, 0xba0be13a, 0x508d3c58, 0xbfdf8ab9, + 0x670372c9, 0x8851c428, 0x62d7194a, 0x8d85afab, 0x6caba5cf, + 0x83f9132e, 0x697fce4c, 0x862d78ad, 0x7052dcc5, 0x9f006a24, + 0x7586b746, 0x9ad401a7, 0x7bfa0bc3, 0x94a8bd22, 0x7e2e6040, + 0x917cd6a1}, + {0x00000000, 0x87a6cb43, 0xd43c90c7, 0x539a5b84, 0x730827cf, + 0xf4aeec8c, 0xa734b708, 0x20927c4b, 0xe6104f9e, 0x61b684dd, + 0x322cdf59, 0xb58a141a, 0x95186851, 0x12bea312, 0x4124f896, + 0xc68233d5, 0x1751997d, 0x90f7523e, 0xc36d09ba, 0x44cbc2f9, + 0x6459beb2, 0xe3ff75f1, 0xb0652e75, 0x37c3e536, 0xf141d6e3, + 0x76e71da0, 0x257d4624, 0xa2db8d67, 0x8249f12c, 0x05ef3a6f, + 0x567561eb, 0xd1d3aaa8, 0x2ea332fa, 0xa905f9b9, 0xfa9fa23d, + 0x7d39697e, 0x5dab1535, 0xda0dde76, 0x899785f2, 0x0e314eb1, + 0xc8b37d64, 0x4f15b627, 0x1c8feda3, 0x9b2926e0, 0xbbbb5aab, + 0x3c1d91e8, 0x6f87ca6c, 0xe821012f, 0x39f2ab87, 0xbe5460c4, + 0xedce3b40, 0x6a68f003, 0x4afa8c48, 0xcd5c470b, 0x9ec61c8f, + 0x1960d7cc, 0xdfe2e419, 0x58442f5a, 0x0bde74de, 0x8c78bf9d, + 0xaceac3d6, 0x2b4c0895, 0x78d65311, 0xff709852, 0x5d4665f4, + 0xdae0aeb7, 0x897af533, 0x0edc3e70, 0x2e4e423b, 0xa9e88978, + 0xfa72d2fc, 0x7dd419bf, 0xbb562a6a, 0x3cf0e129, 0x6f6abaad, + 0xe8cc71ee, 0xc85e0da5, 0x4ff8c6e6, 0x1c629d62, 0x9bc45621, + 0x4a17fc89, 0xcdb137ca, 0x9e2b6c4e, 0x198da70d, 0x391fdb46, + 0xbeb91005, 0xed234b81, 0x6a8580c2, 0xac07b317, 0x2ba17854, + 0x783b23d0, 0xff9de893, 0xdf0f94d8, 0x58a95f9b, 0x0b33041f, + 0x8c95cf5c, 0x73e5570e, 0xf4439c4d, 0xa7d9c7c9, 0x207f0c8a, + 0x00ed70c1, 0x874bbb82, 0xd4d1e006, 0x53772b45, 0x95f51890, + 0x1253d3d3, 0x41c98857, 0xc66f4314, 0xe6fd3f5f, 0x615bf41c, + 0x32c1af98, 0xb56764db, 0x64b4ce73, 0xe3120530, 0xb0885eb4, + 0x372e95f7, 0x17bce9bc, 0x901a22ff, 0xc380797b, 0x4426b238, + 0x82a481ed, 0x05024aae, 0x5698112a, 0xd13eda69, 0xf1aca622, + 0x760a6d61, 0x259036e5, 0xa236fda6, 0xba8ccbe8, 0x3d2a00ab, + 0x6eb05b2f, 0xe916906c, 0xc984ec27, 0x4e222764, 0x1db87ce0, + 0x9a1eb7a3, 0x5c9c8476, 0xdb3a4f35, 0x88a014b1, 0x0f06dff2, + 0x2f94a3b9, 0xa83268fa, 0xfba8337e, 0x7c0ef83d, 0xaddd5295, + 0x2a7b99d6, 0x79e1c252, 0xfe470911, 0xded5755a, 0x5973be19, + 0x0ae9e59d, 0x8d4f2ede, 0x4bcd1d0b, 0xcc6bd648, 0x9ff18dcc, + 0x1857468f, 0x38c53ac4, 0xbf63f187, 0xecf9aa03, 0x6b5f6140, + 0x942ff912, 0x13893251, 0x401369d5, 0xc7b5a296, 0xe727dedd, + 0x6081159e, 0x331b4e1a, 0xb4bd8559, 0x723fb68c, 0xf5997dcf, + 0xa603264b, 0x21a5ed08, 0x01379143, 0x86915a00, 0xd50b0184, + 0x52adcac7, 0x837e606f, 0x04d8ab2c, 0x5742f0a8, 0xd0e43beb, + 0xf07647a0, 0x77d08ce3, 0x244ad767, 0xa3ec1c24, 0x656e2ff1, + 0xe2c8e4b2, 0xb152bf36, 0x36f47475, 0x1666083e, 0x91c0c37d, + 0xc25a98f9, 0x45fc53ba, 0xe7caae1c, 0x606c655f, 0x33f63edb, + 0xb450f598, 0x94c289d3, 0x13644290, 0x40fe1914, 0xc758d257, + 0x01dae182, 0x867c2ac1, 0xd5e67145, 0x5240ba06, 0x72d2c64d, + 0xf5740d0e, 0xa6ee568a, 0x21489dc9, 0xf09b3761, 0x773dfc22, + 0x24a7a7a6, 0xa3016ce5, 0x839310ae, 0x0435dbed, 0x57af8069, + 0xd0094b2a, 0x168b78ff, 0x912db3bc, 0xc2b7e838, 0x4511237b, + 0x65835f30, 0xe2259473, 0xb1bfcff7, 0x361904b4, 0xc9699ce6, + 0x4ecf57a5, 0x1d550c21, 0x9af3c762, 0xba61bb29, 0x3dc7706a, + 0x6e5d2bee, 0xe9fbe0ad, 0x2f79d378, 0xa8df183b, 0xfb4543bf, + 0x7ce388fc, 0x5c71f4b7, 0xdbd73ff4, 0x884d6470, 0x0febaf33, + 0xde38059b, 0x599eced8, 0x0a04955c, 0x8da25e1f, 0xad302254, + 0x2a96e917, 0x790cb293, 0xfeaa79d0, 0x38284a05, 0xbf8e8146, + 0xec14dac2, 0x6bb21181, 0x4b206dca, 0xcc86a689, 0x9f1cfd0d, + 0x18ba364e}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x0000000000000000, 0x43cba68700000000, 0xc7903cd400000000, + 0x845b9a5300000000, 0xcf27087300000000, 0x8cecaef400000000, + 0x08b734a700000000, 0x4b7c922000000000, 0x9e4f10e600000000, + 0xdd84b66100000000, 0x59df2c3200000000, 0x1a148ab500000000, + 0x5168189500000000, 0x12a3be1200000000, 0x96f8244100000000, + 0xd53382c600000000, 0x7d99511700000000, 0x3e52f79000000000, + 0xba096dc300000000, 0xf9c2cb4400000000, 0xb2be596400000000, + 0xf175ffe300000000, 0x752e65b000000000, 0x36e5c33700000000, + 0xe3d641f100000000, 0xa01de77600000000, 0x24467d2500000000, + 0x678ddba200000000, 0x2cf1498200000000, 0x6f3aef0500000000, + 0xeb61755600000000, 0xa8aad3d100000000, 0xfa32a32e00000000, + 0xb9f905a900000000, 0x3da29ffa00000000, 0x7e69397d00000000, + 0x3515ab5d00000000, 0x76de0dda00000000, 0xf285978900000000, + 0xb14e310e00000000, 0x647db3c800000000, 0x27b6154f00000000, + 0xa3ed8f1c00000000, 0xe026299b00000000, 0xab5abbbb00000000, + 0xe8911d3c00000000, 0x6cca876f00000000, 0x2f0121e800000000, + 0x87abf23900000000, 0xc46054be00000000, 0x403bceed00000000, + 0x03f0686a00000000, 0x488cfa4a00000000, 0x0b475ccd00000000, + 0x8f1cc69e00000000, 0xccd7601900000000, 0x19e4e2df00000000, + 0x5a2f445800000000, 0xde74de0b00000000, 0x9dbf788c00000000, + 0xd6c3eaac00000000, 0x95084c2b00000000, 0x1153d67800000000, + 0x529870ff00000000, 0xf465465d00000000, 0xb7aee0da00000000, + 0x33f57a8900000000, 0x703edc0e00000000, 0x3b424e2e00000000, + 0x7889e8a900000000, 0xfcd272fa00000000, 0xbf19d47d00000000, + 0x6a2a56bb00000000, 0x29e1f03c00000000, 0xadba6a6f00000000, + 0xee71cce800000000, 0xa50d5ec800000000, 0xe6c6f84f00000000, + 0x629d621c00000000, 0x2156c49b00000000, 0x89fc174a00000000, + 0xca37b1cd00000000, 0x4e6c2b9e00000000, 0x0da78d1900000000, + 0x46db1f3900000000, 0x0510b9be00000000, 0x814b23ed00000000, + 0xc280856a00000000, 0x17b307ac00000000, 0x5478a12b00000000, + 0xd0233b7800000000, 0x93e89dff00000000, 0xd8940fdf00000000, + 0x9b5fa95800000000, 0x1f04330b00000000, 0x5ccf958c00000000, + 0x0e57e57300000000, 0x4d9c43f400000000, 0xc9c7d9a700000000, + 0x8a0c7f2000000000, 0xc170ed0000000000, 0x82bb4b8700000000, + 0x06e0d1d400000000, 0x452b775300000000, 0x9018f59500000000, + 0xd3d3531200000000, 0x5788c94100000000, 0x14436fc600000000, + 0x5f3ffde600000000, 0x1cf45b6100000000, 0x98afc13200000000, + 0xdb6467b500000000, 0x73ceb46400000000, 0x300512e300000000, + 0xb45e88b000000000, 0xf7952e3700000000, 0xbce9bc1700000000, + 0xff221a9000000000, 0x7b7980c300000000, 0x38b2264400000000, + 0xed81a48200000000, 0xae4a020500000000, 0x2a11985600000000, + 0x69da3ed100000000, 0x22a6acf100000000, 0x616d0a7600000000, + 0xe536902500000000, 0xa6fd36a200000000, 0xe8cb8cba00000000, + 0xab002a3d00000000, 0x2f5bb06e00000000, 0x6c9016e900000000, + 0x27ec84c900000000, 0x6427224e00000000, 0xe07cb81d00000000, + 0xa3b71e9a00000000, 0x76849c5c00000000, 0x354f3adb00000000, + 0xb114a08800000000, 0xf2df060f00000000, 0xb9a3942f00000000, + 0xfa6832a800000000, 0x7e33a8fb00000000, 0x3df80e7c00000000, + 0x9552ddad00000000, 0xd6997b2a00000000, 0x52c2e17900000000, + 0x110947fe00000000, 0x5a75d5de00000000, 0x19be735900000000, + 0x9de5e90a00000000, 0xde2e4f8d00000000, 0x0b1dcd4b00000000, + 0x48d66bcc00000000, 0xcc8df19f00000000, 0x8f46571800000000, + 0xc43ac53800000000, 0x87f163bf00000000, 0x03aaf9ec00000000, + 0x40615f6b00000000, 0x12f92f9400000000, 0x5132891300000000, + 0xd569134000000000, 0x96a2b5c700000000, 0xddde27e700000000, + 0x9e15816000000000, 0x1a4e1b3300000000, 0x5985bdb400000000, + 0x8cb63f7200000000, 0xcf7d99f500000000, 0x4b2603a600000000, + 0x08eda52100000000, 0x4391370100000000, 0x005a918600000000, + 0x84010bd500000000, 0xc7caad5200000000, 0x6f607e8300000000, + 0x2cabd80400000000, 0xa8f0425700000000, 0xeb3be4d000000000, + 0xa04776f000000000, 0xe38cd07700000000, 0x67d74a2400000000, + 0x241ceca300000000, 0xf12f6e6500000000, 0xb2e4c8e200000000, + 0x36bf52b100000000, 0x7574f43600000000, 0x3e08661600000000, + 0x7dc3c09100000000, 0xf9985ac200000000, 0xba53fc4500000000, + 0x1caecae700000000, 0x5f656c6000000000, 0xdb3ef63300000000, + 0x98f550b400000000, 0xd389c29400000000, 0x9042641300000000, + 0x1419fe4000000000, 0x57d258c700000000, 0x82e1da0100000000, + 0xc12a7c8600000000, 0x4571e6d500000000, 0x06ba405200000000, + 0x4dc6d27200000000, 0x0e0d74f500000000, 0x8a56eea600000000, + 0xc99d482100000000, 0x61379bf000000000, 0x22fc3d7700000000, + 0xa6a7a72400000000, 0xe56c01a300000000, 0xae10938300000000, + 0xeddb350400000000, 0x6980af5700000000, 0x2a4b09d000000000, + 0xff788b1600000000, 0xbcb32d9100000000, 0x38e8b7c200000000, + 0x7b23114500000000, 0x305f836500000000, 0x739425e200000000, + 0xf7cfbfb100000000, 0xb404193600000000, 0xe69c69c900000000, + 0xa557cf4e00000000, 0x210c551d00000000, 0x62c7f39a00000000, + 0x29bb61ba00000000, 0x6a70c73d00000000, 0xee2b5d6e00000000, + 0xade0fbe900000000, 0x78d3792f00000000, 0x3b18dfa800000000, + 0xbf4345fb00000000, 0xfc88e37c00000000, 0xb7f4715c00000000, + 0xf43fd7db00000000, 0x70644d8800000000, 0x33afeb0f00000000, + 0x9b0538de00000000, 0xd8ce9e5900000000, 0x5c95040a00000000, + 0x1f5ea28d00000000, 0x542230ad00000000, 0x17e9962a00000000, + 0x93b20c7900000000, 0xd079aafe00000000, 0x054a283800000000, + 0x46818ebf00000000, 0xc2da14ec00000000, 0x8111b26b00000000, + 0xca6d204b00000000, 0x89a686cc00000000, 0x0dfd1c9f00000000, + 0x4e36ba1800000000}, + {0x0000000000000000, 0xe1b652ef00000000, 0x836bd40500000000, + 0x62dd86ea00000000, 0x06d7a80b00000000, 0xe761fae400000000, + 0x85bc7c0e00000000, 0x640a2ee100000000, 0x0cae511700000000, + 0xed1803f800000000, 0x8fc5851200000000, 0x6e73d7fd00000000, + 0x0a79f91c00000000, 0xebcfabf300000000, 0x89122d1900000000, + 0x68a47ff600000000, 0x185ca32e00000000, 0xf9eaf1c100000000, + 0x9b37772b00000000, 0x7a8125c400000000, 0x1e8b0b2500000000, + 0xff3d59ca00000000, 0x9de0df2000000000, 0x7c568dcf00000000, + 0x14f2f23900000000, 0xf544a0d600000000, 0x9799263c00000000, + 0x762f74d300000000, 0x12255a3200000000, 0xf39308dd00000000, + 0x914e8e3700000000, 0x70f8dcd800000000, 0x30b8465d00000000, + 0xd10e14b200000000, 0xb3d3925800000000, 0x5265c0b700000000, + 0x366fee5600000000, 0xd7d9bcb900000000, 0xb5043a5300000000, + 0x54b268bc00000000, 0x3c16174a00000000, 0xdda045a500000000, + 0xbf7dc34f00000000, 0x5ecb91a000000000, 0x3ac1bf4100000000, + 0xdb77edae00000000, 0xb9aa6b4400000000, 0x581c39ab00000000, + 0x28e4e57300000000, 0xc952b79c00000000, 0xab8f317600000000, + 0x4a39639900000000, 0x2e334d7800000000, 0xcf851f9700000000, + 0xad58997d00000000, 0x4ceecb9200000000, 0x244ab46400000000, + 0xc5fce68b00000000, 0xa721606100000000, 0x4697328e00000000, + 0x229d1c6f00000000, 0xc32b4e8000000000, 0xa1f6c86a00000000, + 0x40409a8500000000, 0x60708dba00000000, 0x81c6df5500000000, + 0xe31b59bf00000000, 0x02ad0b5000000000, 0x66a725b100000000, + 0x8711775e00000000, 0xe5ccf1b400000000, 0x047aa35b00000000, + 0x6cdedcad00000000, 0x8d688e4200000000, 0xefb508a800000000, + 0x0e035a4700000000, 0x6a0974a600000000, 0x8bbf264900000000, + 0xe962a0a300000000, 0x08d4f24c00000000, 0x782c2e9400000000, + 0x999a7c7b00000000, 0xfb47fa9100000000, 0x1af1a87e00000000, + 0x7efb869f00000000, 0x9f4dd47000000000, 0xfd90529a00000000, + 0x1c26007500000000, 0x74827f8300000000, 0x95342d6c00000000, + 0xf7e9ab8600000000, 0x165ff96900000000, 0x7255d78800000000, + 0x93e3856700000000, 0xf13e038d00000000, 0x1088516200000000, + 0x50c8cbe700000000, 0xb17e990800000000, 0xd3a31fe200000000, + 0x32154d0d00000000, 0x561f63ec00000000, 0xb7a9310300000000, + 0xd574b7e900000000, 0x34c2e50600000000, 0x5c669af000000000, + 0xbdd0c81f00000000, 0xdf0d4ef500000000, 0x3ebb1c1a00000000, + 0x5ab132fb00000000, 0xbb07601400000000, 0xd9dae6fe00000000, + 0x386cb41100000000, 0x489468c900000000, 0xa9223a2600000000, + 0xcbffbccc00000000, 0x2a49ee2300000000, 0x4e43c0c200000000, + 0xaff5922d00000000, 0xcd2814c700000000, 0x2c9e462800000000, + 0x443a39de00000000, 0xa58c6b3100000000, 0xc751eddb00000000, + 0x26e7bf3400000000, 0x42ed91d500000000, 0xa35bc33a00000000, + 0xc18645d000000000, 0x2030173f00000000, 0x81e66bae00000000, + 0x6050394100000000, 0x028dbfab00000000, 0xe33bed4400000000, + 0x8731c3a500000000, 0x6687914a00000000, 0x045a17a000000000, + 0xe5ec454f00000000, 0x8d483ab900000000, 0x6cfe685600000000, + 0x0e23eebc00000000, 0xef95bc5300000000, 0x8b9f92b200000000, + 0x6a29c05d00000000, 0x08f446b700000000, 0xe942145800000000, + 0x99bac88000000000, 0x780c9a6f00000000, 0x1ad11c8500000000, + 0xfb674e6a00000000, 0x9f6d608b00000000, 0x7edb326400000000, + 0x1c06b48e00000000, 0xfdb0e66100000000, 0x9514999700000000, + 0x74a2cb7800000000, 0x167f4d9200000000, 0xf7c91f7d00000000, + 0x93c3319c00000000, 0x7275637300000000, 0x10a8e59900000000, + 0xf11eb77600000000, 0xb15e2df300000000, 0x50e87f1c00000000, + 0x3235f9f600000000, 0xd383ab1900000000, 0xb78985f800000000, + 0x563fd71700000000, 0x34e251fd00000000, 0xd554031200000000, + 0xbdf07ce400000000, 0x5c462e0b00000000, 0x3e9ba8e100000000, + 0xdf2dfa0e00000000, 0xbb27d4ef00000000, 0x5a91860000000000, + 0x384c00ea00000000, 0xd9fa520500000000, 0xa9028edd00000000, + 0x48b4dc3200000000, 0x2a695ad800000000, 0xcbdf083700000000, + 0xafd526d600000000, 0x4e63743900000000, 0x2cbef2d300000000, + 0xcd08a03c00000000, 0xa5acdfca00000000, 0x441a8d2500000000, + 0x26c70bcf00000000, 0xc771592000000000, 0xa37b77c100000000, + 0x42cd252e00000000, 0x2010a3c400000000, 0xc1a6f12b00000000, + 0xe196e61400000000, 0x0020b4fb00000000, 0x62fd321100000000, + 0x834b60fe00000000, 0xe7414e1f00000000, 0x06f71cf000000000, + 0x642a9a1a00000000, 0x859cc8f500000000, 0xed38b70300000000, + 0x0c8ee5ec00000000, 0x6e53630600000000, 0x8fe531e900000000, + 0xebef1f0800000000, 0x0a594de700000000, 0x6884cb0d00000000, + 0x893299e200000000, 0xf9ca453a00000000, 0x187c17d500000000, + 0x7aa1913f00000000, 0x9b17c3d000000000, 0xff1ded3100000000, + 0x1eabbfde00000000, 0x7c76393400000000, 0x9dc06bdb00000000, + 0xf564142d00000000, 0x14d246c200000000, 0x760fc02800000000, + 0x97b992c700000000, 0xf3b3bc2600000000, 0x1205eec900000000, + 0x70d8682300000000, 0x916e3acc00000000, 0xd12ea04900000000, + 0x3098f2a600000000, 0x5245744c00000000, 0xb3f326a300000000, + 0xd7f9084200000000, 0x364f5aad00000000, 0x5492dc4700000000, + 0xb5248ea800000000, 0xdd80f15e00000000, 0x3c36a3b100000000, + 0x5eeb255b00000000, 0xbf5d77b400000000, 0xdb57595500000000, + 0x3ae10bba00000000, 0x583c8d5000000000, 0xb98adfbf00000000, + 0xc972036700000000, 0x28c4518800000000, 0x4a19d76200000000, + 0xabaf858d00000000, 0xcfa5ab6c00000000, 0x2e13f98300000000, + 0x4cce7f6900000000, 0xad782d8600000000, 0xc5dc527000000000, + 0x246a009f00000000, 0x46b7867500000000, 0xa701d49a00000000, + 0xc30bfa7b00000000, 0x22bda89400000000, 0x40602e7e00000000, + 0xa1d67c9100000000}, + {0x0000000000000000, 0x5880e2d700000000, 0xf106b47400000000, + 0xa98656a300000000, 0xe20d68e900000000, 0xba8d8a3e00000000, + 0x130bdc9d00000000, 0x4b8b3e4a00000000, 0x851da10900000000, + 0xdd9d43de00000000, 0x741b157d00000000, 0x2c9bf7aa00000000, + 0x6710c9e000000000, 0x3f902b3700000000, 0x96167d9400000000, + 0xce969f4300000000, 0x0a3b421300000000, 0x52bba0c400000000, + 0xfb3df66700000000, 0xa3bd14b000000000, 0xe8362afa00000000, + 0xb0b6c82d00000000, 0x19309e8e00000000, 0x41b07c5900000000, + 0x8f26e31a00000000, 0xd7a601cd00000000, 0x7e20576e00000000, + 0x26a0b5b900000000, 0x6d2b8bf300000000, 0x35ab692400000000, + 0x9c2d3f8700000000, 0xc4addd5000000000, 0x1476842600000000, + 0x4cf666f100000000, 0xe570305200000000, 0xbdf0d28500000000, + 0xf67beccf00000000, 0xaefb0e1800000000, 0x077d58bb00000000, + 0x5ffdba6c00000000, 0x916b252f00000000, 0xc9ebc7f800000000, + 0x606d915b00000000, 0x38ed738c00000000, 0x73664dc600000000, + 0x2be6af1100000000, 0x8260f9b200000000, 0xdae01b6500000000, + 0x1e4dc63500000000, 0x46cd24e200000000, 0xef4b724100000000, + 0xb7cb909600000000, 0xfc40aedc00000000, 0xa4c04c0b00000000, + 0x0d461aa800000000, 0x55c6f87f00000000, 0x9b50673c00000000, + 0xc3d085eb00000000, 0x6a56d34800000000, 0x32d6319f00000000, + 0x795d0fd500000000, 0x21dded0200000000, 0x885bbba100000000, + 0xd0db597600000000, 0x28ec084d00000000, 0x706cea9a00000000, + 0xd9eabc3900000000, 0x816a5eee00000000, 0xcae160a400000000, + 0x9261827300000000, 0x3be7d4d000000000, 0x6367360700000000, + 0xadf1a94400000000, 0xf5714b9300000000, 0x5cf71d3000000000, + 0x0477ffe700000000, 0x4ffcc1ad00000000, 0x177c237a00000000, + 0xbefa75d900000000, 0xe67a970e00000000, 0x22d74a5e00000000, + 0x7a57a88900000000, 0xd3d1fe2a00000000, 0x8b511cfd00000000, + 0xc0da22b700000000, 0x985ac06000000000, 0x31dc96c300000000, + 0x695c741400000000, 0xa7caeb5700000000, 0xff4a098000000000, + 0x56cc5f2300000000, 0x0e4cbdf400000000, 0x45c783be00000000, + 0x1d47616900000000, 0xb4c137ca00000000, 0xec41d51d00000000, + 0x3c9a8c6b00000000, 0x641a6ebc00000000, 0xcd9c381f00000000, + 0x951cdac800000000, 0xde97e48200000000, 0x8617065500000000, + 0x2f9150f600000000, 0x7711b22100000000, 0xb9872d6200000000, + 0xe107cfb500000000, 0x4881991600000000, 0x10017bc100000000, + 0x5b8a458b00000000, 0x030aa75c00000000, 0xaa8cf1ff00000000, + 0xf20c132800000000, 0x36a1ce7800000000, 0x6e212caf00000000, + 0xc7a77a0c00000000, 0x9f2798db00000000, 0xd4aca69100000000, + 0x8c2c444600000000, 0x25aa12e500000000, 0x7d2af03200000000, + 0xb3bc6f7100000000, 0xeb3c8da600000000, 0x42badb0500000000, + 0x1a3a39d200000000, 0x51b1079800000000, 0x0931e54f00000000, + 0xa0b7b3ec00000000, 0xf837513b00000000, 0x50d8119a00000000, + 0x0858f34d00000000, 0xa1dea5ee00000000, 0xf95e473900000000, + 0xb2d5797300000000, 0xea559ba400000000, 0x43d3cd0700000000, + 0x1b532fd000000000, 0xd5c5b09300000000, 0x8d45524400000000, + 0x24c304e700000000, 0x7c43e63000000000, 0x37c8d87a00000000, + 0x6f483aad00000000, 0xc6ce6c0e00000000, 0x9e4e8ed900000000, + 0x5ae3538900000000, 0x0263b15e00000000, 0xabe5e7fd00000000, + 0xf365052a00000000, 0xb8ee3b6000000000, 0xe06ed9b700000000, + 0x49e88f1400000000, 0x11686dc300000000, 0xdffef28000000000, + 0x877e105700000000, 0x2ef846f400000000, 0x7678a42300000000, + 0x3df39a6900000000, 0x657378be00000000, 0xccf52e1d00000000, + 0x9475ccca00000000, 0x44ae95bc00000000, 0x1c2e776b00000000, + 0xb5a821c800000000, 0xed28c31f00000000, 0xa6a3fd5500000000, + 0xfe231f8200000000, 0x57a5492100000000, 0x0f25abf600000000, + 0xc1b334b500000000, 0x9933d66200000000, 0x30b580c100000000, + 0x6835621600000000, 0x23be5c5c00000000, 0x7b3ebe8b00000000, + 0xd2b8e82800000000, 0x8a380aff00000000, 0x4e95d7af00000000, + 0x1615357800000000, 0xbf9363db00000000, 0xe713810c00000000, + 0xac98bf4600000000, 0xf4185d9100000000, 0x5d9e0b3200000000, + 0x051ee9e500000000, 0xcb8876a600000000, 0x9308947100000000, + 0x3a8ec2d200000000, 0x620e200500000000, 0x29851e4f00000000, + 0x7105fc9800000000, 0xd883aa3b00000000, 0x800348ec00000000, + 0x783419d700000000, 0x20b4fb0000000000, 0x8932ada300000000, + 0xd1b24f7400000000, 0x9a39713e00000000, 0xc2b993e900000000, + 0x6b3fc54a00000000, 0x33bf279d00000000, 0xfd29b8de00000000, + 0xa5a95a0900000000, 0x0c2f0caa00000000, 0x54afee7d00000000, + 0x1f24d03700000000, 0x47a432e000000000, 0xee22644300000000, + 0xb6a2869400000000, 0x720f5bc400000000, 0x2a8fb91300000000, + 0x8309efb000000000, 0xdb890d6700000000, 0x9002332d00000000, + 0xc882d1fa00000000, 0x6104875900000000, 0x3984658e00000000, + 0xf712facd00000000, 0xaf92181a00000000, 0x06144eb900000000, + 0x5e94ac6e00000000, 0x151f922400000000, 0x4d9f70f300000000, + 0xe419265000000000, 0xbc99c48700000000, 0x6c429df100000000, + 0x34c27f2600000000, 0x9d44298500000000, 0xc5c4cb5200000000, + 0x8e4ff51800000000, 0xd6cf17cf00000000, 0x7f49416c00000000, + 0x27c9a3bb00000000, 0xe95f3cf800000000, 0xb1dfde2f00000000, + 0x1859888c00000000, 0x40d96a5b00000000, 0x0b52541100000000, + 0x53d2b6c600000000, 0xfa54e06500000000, 0xa2d402b200000000, + 0x6679dfe200000000, 0x3ef93d3500000000, 0x977f6b9600000000, + 0xcfff894100000000, 0x8474b70b00000000, 0xdcf455dc00000000, + 0x7572037f00000000, 0x2df2e1a800000000, 0xe3647eeb00000000, + 0xbbe49c3c00000000, 0x1262ca9f00000000, 0x4ae2284800000000, + 0x0169160200000000, 0x59e9f4d500000000, 0xf06fa27600000000, + 0xa8ef40a100000000}, + {0x0000000000000000, 0x463b676500000000, 0x8c76ceca00000000, + 0xca4da9af00000000, 0x59ebed4e00000000, 0x1fd08a2b00000000, + 0xd59d238400000000, 0x93a644e100000000, 0xb2d6db9d00000000, + 0xf4edbcf800000000, 0x3ea0155700000000, 0x789b723200000000, + 0xeb3d36d300000000, 0xad0651b600000000, 0x674bf81900000000, + 0x21709f7c00000000, 0x25abc6e000000000, 0x6390a18500000000, + 0xa9dd082a00000000, 0xefe66f4f00000000, 0x7c402bae00000000, + 0x3a7b4ccb00000000, 0xf036e56400000000, 0xb60d820100000000, + 0x977d1d7d00000000, 0xd1467a1800000000, 0x1b0bd3b700000000, + 0x5d30b4d200000000, 0xce96f03300000000, 0x88ad975600000000, + 0x42e03ef900000000, 0x04db599c00000000, 0x0b50fc1a00000000, + 0x4d6b9b7f00000000, 0x872632d000000000, 0xc11d55b500000000, + 0x52bb115400000000, 0x1480763100000000, 0xdecddf9e00000000, + 0x98f6b8fb00000000, 0xb986278700000000, 0xffbd40e200000000, + 0x35f0e94d00000000, 0x73cb8e2800000000, 0xe06dcac900000000, + 0xa656adac00000000, 0x6c1b040300000000, 0x2a20636600000000, + 0x2efb3afa00000000, 0x68c05d9f00000000, 0xa28df43000000000, + 0xe4b6935500000000, 0x7710d7b400000000, 0x312bb0d100000000, + 0xfb66197e00000000, 0xbd5d7e1b00000000, 0x9c2de16700000000, + 0xda16860200000000, 0x105b2fad00000000, 0x566048c800000000, + 0xc5c60c2900000000, 0x83fd6b4c00000000, 0x49b0c2e300000000, + 0x0f8ba58600000000, 0x16a0f83500000000, 0x509b9f5000000000, + 0x9ad636ff00000000, 0xdced519a00000000, 0x4f4b157b00000000, + 0x0970721e00000000, 0xc33ddbb100000000, 0x8506bcd400000000, + 0xa47623a800000000, 0xe24d44cd00000000, 0x2800ed6200000000, + 0x6e3b8a0700000000, 0xfd9dcee600000000, 0xbba6a98300000000, + 0x71eb002c00000000, 0x37d0674900000000, 0x330b3ed500000000, + 0x753059b000000000, 0xbf7df01f00000000, 0xf946977a00000000, + 0x6ae0d39b00000000, 0x2cdbb4fe00000000, 0xe6961d5100000000, + 0xa0ad7a3400000000, 0x81dde54800000000, 0xc7e6822d00000000, + 0x0dab2b8200000000, 0x4b904ce700000000, 0xd836080600000000, + 0x9e0d6f6300000000, 0x5440c6cc00000000, 0x127ba1a900000000, + 0x1df0042f00000000, 0x5bcb634a00000000, 0x9186cae500000000, + 0xd7bdad8000000000, 0x441be96100000000, 0x02208e0400000000, + 0xc86d27ab00000000, 0x8e5640ce00000000, 0xaf26dfb200000000, + 0xe91db8d700000000, 0x2350117800000000, 0x656b761d00000000, + 0xf6cd32fc00000000, 0xb0f6559900000000, 0x7abbfc3600000000, + 0x3c809b5300000000, 0x385bc2cf00000000, 0x7e60a5aa00000000, + 0xb42d0c0500000000, 0xf2166b6000000000, 0x61b02f8100000000, + 0x278b48e400000000, 0xedc6e14b00000000, 0xabfd862e00000000, + 0x8a8d195200000000, 0xccb67e3700000000, 0x06fbd79800000000, + 0x40c0b0fd00000000, 0xd366f41c00000000, 0x955d937900000000, + 0x5f103ad600000000, 0x192b5db300000000, 0x2c40f16b00000000, + 0x6a7b960e00000000, 0xa0363fa100000000, 0xe60d58c400000000, + 0x75ab1c2500000000, 0x33907b4000000000, 0xf9ddd2ef00000000, + 0xbfe6b58a00000000, 0x9e962af600000000, 0xd8ad4d9300000000, + 0x12e0e43c00000000, 0x54db835900000000, 0xc77dc7b800000000, + 0x8146a0dd00000000, 0x4b0b097200000000, 0x0d306e1700000000, + 0x09eb378b00000000, 0x4fd050ee00000000, 0x859df94100000000, + 0xc3a69e2400000000, 0x5000dac500000000, 0x163bbda000000000, + 0xdc76140f00000000, 0x9a4d736a00000000, 0xbb3dec1600000000, + 0xfd068b7300000000, 0x374b22dc00000000, 0x717045b900000000, + 0xe2d6015800000000, 0xa4ed663d00000000, 0x6ea0cf9200000000, + 0x289ba8f700000000, 0x27100d7100000000, 0x612b6a1400000000, + 0xab66c3bb00000000, 0xed5da4de00000000, 0x7efbe03f00000000, + 0x38c0875a00000000, 0xf28d2ef500000000, 0xb4b6499000000000, + 0x95c6d6ec00000000, 0xd3fdb18900000000, 0x19b0182600000000, + 0x5f8b7f4300000000, 0xcc2d3ba200000000, 0x8a165cc700000000, + 0x405bf56800000000, 0x0660920d00000000, 0x02bbcb9100000000, + 0x4480acf400000000, 0x8ecd055b00000000, 0xc8f6623e00000000, + 0x5b5026df00000000, 0x1d6b41ba00000000, 0xd726e81500000000, + 0x911d8f7000000000, 0xb06d100c00000000, 0xf656776900000000, + 0x3c1bdec600000000, 0x7a20b9a300000000, 0xe986fd4200000000, + 0xafbd9a2700000000, 0x65f0338800000000, 0x23cb54ed00000000, + 0x3ae0095e00000000, 0x7cdb6e3b00000000, 0xb696c79400000000, + 0xf0ada0f100000000, 0x630be41000000000, 0x2530837500000000, + 0xef7d2ada00000000, 0xa9464dbf00000000, 0x8836d2c300000000, + 0xce0db5a600000000, 0x04401c0900000000, 0x427b7b6c00000000, + 0xd1dd3f8d00000000, 0x97e658e800000000, 0x5dabf14700000000, + 0x1b90962200000000, 0x1f4bcfbe00000000, 0x5970a8db00000000, + 0x933d017400000000, 0xd506661100000000, 0x46a022f000000000, + 0x009b459500000000, 0xcad6ec3a00000000, 0x8ced8b5f00000000, + 0xad9d142300000000, 0xeba6734600000000, 0x21ebdae900000000, + 0x67d0bd8c00000000, 0xf476f96d00000000, 0xb24d9e0800000000, + 0x780037a700000000, 0x3e3b50c200000000, 0x31b0f54400000000, + 0x778b922100000000, 0xbdc63b8e00000000, 0xfbfd5ceb00000000, + 0x685b180a00000000, 0x2e607f6f00000000, 0xe42dd6c000000000, + 0xa216b1a500000000, 0x83662ed900000000, 0xc55d49bc00000000, + 0x0f10e01300000000, 0x492b877600000000, 0xda8dc39700000000, + 0x9cb6a4f200000000, 0x56fb0d5d00000000, 0x10c06a3800000000, + 0x141b33a400000000, 0x522054c100000000, 0x986dfd6e00000000, + 0xde569a0b00000000, 0x4df0deea00000000, 0x0bcbb98f00000000, + 0xc186102000000000, 0x87bd774500000000, 0xa6cde83900000000, + 0xe0f68f5c00000000, 0x2abb26f300000000, 0x6c80419600000000, + 0xff26057700000000, 0xb91d621200000000, 0x7350cbbd00000000, + 0x356bacd800000000}, + {0x0000000000000000, 0x9e83da9f00000000, 0x7d01c4e400000000, + 0xe3821e7b00000000, 0xbb04f91200000000, 0x2587238d00000000, + 0xc6053df600000000, 0x5886e76900000000, 0x7609f22500000000, + 0xe88a28ba00000000, 0x0b0836c100000000, 0x958bec5e00000000, + 0xcd0d0b3700000000, 0x538ed1a800000000, 0xb00ccfd300000000, + 0x2e8f154c00000000, 0xec12e44b00000000, 0x72913ed400000000, + 0x911320af00000000, 0x0f90fa3000000000, 0x57161d5900000000, + 0xc995c7c600000000, 0x2a17d9bd00000000, 0xb494032200000000, + 0x9a1b166e00000000, 0x0498ccf100000000, 0xe71ad28a00000000, + 0x7999081500000000, 0x211fef7c00000000, 0xbf9c35e300000000, + 0x5c1e2b9800000000, 0xc29df10700000000, 0xd825c89700000000, + 0x46a6120800000000, 0xa5240c7300000000, 0x3ba7d6ec00000000, + 0x6321318500000000, 0xfda2eb1a00000000, 0x1e20f56100000000, + 0x80a32ffe00000000, 0xae2c3ab200000000, 0x30afe02d00000000, + 0xd32dfe5600000000, 0x4dae24c900000000, 0x1528c3a000000000, + 0x8bab193f00000000, 0x6829074400000000, 0xf6aadddb00000000, + 0x34372cdc00000000, 0xaab4f64300000000, 0x4936e83800000000, + 0xd7b532a700000000, 0x8f33d5ce00000000, 0x11b00f5100000000, + 0xf232112a00000000, 0x6cb1cbb500000000, 0x423edef900000000, + 0xdcbd046600000000, 0x3f3f1a1d00000000, 0xa1bcc08200000000, + 0xf93a27eb00000000, 0x67b9fd7400000000, 0x843be30f00000000, + 0x1ab8399000000000, 0xf14de1f400000000, 0x6fce3b6b00000000, + 0x8c4c251000000000, 0x12cfff8f00000000, 0x4a4918e600000000, + 0xd4cac27900000000, 0x3748dc0200000000, 0xa9cb069d00000000, + 0x874413d100000000, 0x19c7c94e00000000, 0xfa45d73500000000, + 0x64c60daa00000000, 0x3c40eac300000000, 0xa2c3305c00000000, + 0x41412e2700000000, 0xdfc2f4b800000000, 0x1d5f05bf00000000, + 0x83dcdf2000000000, 0x605ec15b00000000, 0xfedd1bc400000000, + 0xa65bfcad00000000, 0x38d8263200000000, 0xdb5a384900000000, + 0x45d9e2d600000000, 0x6b56f79a00000000, 0xf5d52d0500000000, + 0x1657337e00000000, 0x88d4e9e100000000, 0xd0520e8800000000, + 0x4ed1d41700000000, 0xad53ca6c00000000, 0x33d010f300000000, + 0x2968296300000000, 0xb7ebf3fc00000000, 0x5469ed8700000000, + 0xcaea371800000000, 0x926cd07100000000, 0x0cef0aee00000000, + 0xef6d149500000000, 0x71eece0a00000000, 0x5f61db4600000000, + 0xc1e201d900000000, 0x22601fa200000000, 0xbce3c53d00000000, + 0xe465225400000000, 0x7ae6f8cb00000000, 0x9964e6b000000000, + 0x07e73c2f00000000, 0xc57acd2800000000, 0x5bf917b700000000, + 0xb87b09cc00000000, 0x26f8d35300000000, 0x7e7e343a00000000, + 0xe0fdeea500000000, 0x037ff0de00000000, 0x9dfc2a4100000000, + 0xb3733f0d00000000, 0x2df0e59200000000, 0xce72fbe900000000, + 0x50f1217600000000, 0x0877c61f00000000, 0x96f41c8000000000, + 0x757602fb00000000, 0xebf5d86400000000, 0xa39db33200000000, + 0x3d1e69ad00000000, 0xde9c77d600000000, 0x401fad4900000000, + 0x18994a2000000000, 0x861a90bf00000000, 0x65988ec400000000, + 0xfb1b545b00000000, 0xd594411700000000, 0x4b179b8800000000, + 0xa89585f300000000, 0x36165f6c00000000, 0x6e90b80500000000, + 0xf013629a00000000, 0x13917ce100000000, 0x8d12a67e00000000, + 0x4f8f577900000000, 0xd10c8de600000000, 0x328e939d00000000, + 0xac0d490200000000, 0xf48bae6b00000000, 0x6a0874f400000000, + 0x898a6a8f00000000, 0x1709b01000000000, 0x3986a55c00000000, + 0xa7057fc300000000, 0x448761b800000000, 0xda04bb2700000000, + 0x82825c4e00000000, 0x1c0186d100000000, 0xff8398aa00000000, + 0x6100423500000000, 0x7bb87ba500000000, 0xe53ba13a00000000, + 0x06b9bf4100000000, 0x983a65de00000000, 0xc0bc82b700000000, + 0x5e3f582800000000, 0xbdbd465300000000, 0x233e9ccc00000000, + 0x0db1898000000000, 0x9332531f00000000, 0x70b04d6400000000, + 0xee3397fb00000000, 0xb6b5709200000000, 0x2836aa0d00000000, + 0xcbb4b47600000000, 0x55376ee900000000, 0x97aa9fee00000000, + 0x0929457100000000, 0xeaab5b0a00000000, 0x7428819500000000, + 0x2cae66fc00000000, 0xb22dbc6300000000, 0x51afa21800000000, + 0xcf2c788700000000, 0xe1a36dcb00000000, 0x7f20b75400000000, + 0x9ca2a92f00000000, 0x022173b000000000, 0x5aa794d900000000, + 0xc4244e4600000000, 0x27a6503d00000000, 0xb9258aa200000000, + 0x52d052c600000000, 0xcc53885900000000, 0x2fd1962200000000, + 0xb1524cbd00000000, 0xe9d4abd400000000, 0x7757714b00000000, + 0x94d56f3000000000, 0x0a56b5af00000000, 0x24d9a0e300000000, + 0xba5a7a7c00000000, 0x59d8640700000000, 0xc75bbe9800000000, + 0x9fdd59f100000000, 0x015e836e00000000, 0xe2dc9d1500000000, + 0x7c5f478a00000000, 0xbec2b68d00000000, 0x20416c1200000000, + 0xc3c3726900000000, 0x5d40a8f600000000, 0x05c64f9f00000000, + 0x9b45950000000000, 0x78c78b7b00000000, 0xe64451e400000000, + 0xc8cb44a800000000, 0x56489e3700000000, 0xb5ca804c00000000, + 0x2b495ad300000000, 0x73cfbdba00000000, 0xed4c672500000000, + 0x0ece795e00000000, 0x904da3c100000000, 0x8af59a5100000000, + 0x147640ce00000000, 0xf7f45eb500000000, 0x6977842a00000000, + 0x31f1634300000000, 0xaf72b9dc00000000, 0x4cf0a7a700000000, + 0xd2737d3800000000, 0xfcfc687400000000, 0x627fb2eb00000000, + 0x81fdac9000000000, 0x1f7e760f00000000, 0x47f8916600000000, + 0xd97b4bf900000000, 0x3af9558200000000, 0xa47a8f1d00000000, + 0x66e77e1a00000000, 0xf864a48500000000, 0x1be6bafe00000000, + 0x8565606100000000, 0xdde3870800000000, 0x43605d9700000000, + 0xa0e243ec00000000, 0x3e61997300000000, 0x10ee8c3f00000000, + 0x8e6d56a000000000, 0x6def48db00000000, 0xf36c924400000000, + 0xabea752d00000000, 0x3569afb200000000, 0xd6ebb1c900000000, + 0x48686b5600000000}, + {0x0000000000000000, 0xc064281700000000, 0x80c9502e00000000, + 0x40ad783900000000, 0x0093a15c00000000, 0xc0f7894b00000000, + 0x805af17200000000, 0x403ed96500000000, 0x002643b900000000, + 0xc0426bae00000000, 0x80ef139700000000, 0x408b3b8000000000, + 0x00b5e2e500000000, 0xc0d1caf200000000, 0x807cb2cb00000000, + 0x40189adc00000000, 0x414af7a900000000, 0x812edfbe00000000, + 0xc183a78700000000, 0x01e78f9000000000, 0x41d956f500000000, + 0x81bd7ee200000000, 0xc11006db00000000, 0x01742ecc00000000, + 0x416cb41000000000, 0x81089c0700000000, 0xc1a5e43e00000000, + 0x01c1cc2900000000, 0x41ff154c00000000, 0x819b3d5b00000000, + 0xc136456200000000, 0x01526d7500000000, 0xc3929f8800000000, + 0x03f6b79f00000000, 0x435bcfa600000000, 0x833fe7b100000000, + 0xc3013ed400000000, 0x036516c300000000, 0x43c86efa00000000, + 0x83ac46ed00000000, 0xc3b4dc3100000000, 0x03d0f42600000000, + 0x437d8c1f00000000, 0x8319a40800000000, 0xc3277d6d00000000, + 0x0343557a00000000, 0x43ee2d4300000000, 0x838a055400000000, + 0x82d8682100000000, 0x42bc403600000000, 0x0211380f00000000, + 0xc275101800000000, 0x824bc97d00000000, 0x422fe16a00000000, + 0x0282995300000000, 0xc2e6b14400000000, 0x82fe2b9800000000, + 0x429a038f00000000, 0x02377bb600000000, 0xc25353a100000000, + 0x826d8ac400000000, 0x4209a2d300000000, 0x02a4daea00000000, + 0xc2c0f2fd00000000, 0xc7234eca00000000, 0x074766dd00000000, + 0x47ea1ee400000000, 0x878e36f300000000, 0xc7b0ef9600000000, + 0x07d4c78100000000, 0x4779bfb800000000, 0x871d97af00000000, + 0xc7050d7300000000, 0x0761256400000000, 0x47cc5d5d00000000, + 0x87a8754a00000000, 0xc796ac2f00000000, 0x07f2843800000000, + 0x475ffc0100000000, 0x873bd41600000000, 0x8669b96300000000, + 0x460d917400000000, 0x06a0e94d00000000, 0xc6c4c15a00000000, + 0x86fa183f00000000, 0x469e302800000000, 0x0633481100000000, + 0xc657600600000000, 0x864ffada00000000, 0x462bd2cd00000000, + 0x0686aaf400000000, 0xc6e282e300000000, 0x86dc5b8600000000, + 0x46b8739100000000, 0x06150ba800000000, 0xc67123bf00000000, + 0x04b1d14200000000, 0xc4d5f95500000000, 0x8478816c00000000, + 0x441ca97b00000000, 0x0422701e00000000, 0xc446580900000000, + 0x84eb203000000000, 0x448f082700000000, 0x049792fb00000000, + 0xc4f3baec00000000, 0x845ec2d500000000, 0x443aeac200000000, + 0x040433a700000000, 0xc4601bb000000000, 0x84cd638900000000, + 0x44a94b9e00000000, 0x45fb26eb00000000, 0x859f0efc00000000, + 0xc53276c500000000, 0x05565ed200000000, 0x456887b700000000, + 0x850cafa000000000, 0xc5a1d79900000000, 0x05c5ff8e00000000, + 0x45dd655200000000, 0x85b94d4500000000, 0xc514357c00000000, + 0x05701d6b00000000, 0x454ec40e00000000, 0x852aec1900000000, + 0xc587942000000000, 0x05e3bc3700000000, 0xcf41ed4f00000000, + 0x0f25c55800000000, 0x4f88bd6100000000, 0x8fec957600000000, + 0xcfd24c1300000000, 0x0fb6640400000000, 0x4f1b1c3d00000000, + 0x8f7f342a00000000, 0xcf67aef600000000, 0x0f0386e100000000, + 0x4faefed800000000, 0x8fcad6cf00000000, 0xcff40faa00000000, + 0x0f9027bd00000000, 0x4f3d5f8400000000, 0x8f59779300000000, + 0x8e0b1ae600000000, 0x4e6f32f100000000, 0x0ec24ac800000000, + 0xcea662df00000000, 0x8e98bbba00000000, 0x4efc93ad00000000, + 0x0e51eb9400000000, 0xce35c38300000000, 0x8e2d595f00000000, + 0x4e49714800000000, 0x0ee4097100000000, 0xce80216600000000, + 0x8ebef80300000000, 0x4edad01400000000, 0x0e77a82d00000000, + 0xce13803a00000000, 0x0cd372c700000000, 0xccb75ad000000000, + 0x8c1a22e900000000, 0x4c7e0afe00000000, 0x0c40d39b00000000, + 0xcc24fb8c00000000, 0x8c8983b500000000, 0x4cedaba200000000, + 0x0cf5317e00000000, 0xcc91196900000000, 0x8c3c615000000000, + 0x4c58494700000000, 0x0c66902200000000, 0xcc02b83500000000, + 0x8cafc00c00000000, 0x4ccbe81b00000000, 0x4d99856e00000000, + 0x8dfdad7900000000, 0xcd50d54000000000, 0x0d34fd5700000000, + 0x4d0a243200000000, 0x8d6e0c2500000000, 0xcdc3741c00000000, + 0x0da75c0b00000000, 0x4dbfc6d700000000, 0x8ddbeec000000000, + 0xcd7696f900000000, 0x0d12beee00000000, 0x4d2c678b00000000, + 0x8d484f9c00000000, 0xcde537a500000000, 0x0d811fb200000000, + 0x0862a38500000000, 0xc8068b9200000000, 0x88abf3ab00000000, + 0x48cfdbbc00000000, 0x08f102d900000000, 0xc8952ace00000000, + 0x883852f700000000, 0x485c7ae000000000, 0x0844e03c00000000, + 0xc820c82b00000000, 0x888db01200000000, 0x48e9980500000000, + 0x08d7416000000000, 0xc8b3697700000000, 0x881e114e00000000, + 0x487a395900000000, 0x4928542c00000000, 0x894c7c3b00000000, + 0xc9e1040200000000, 0x09852c1500000000, 0x49bbf57000000000, + 0x89dfdd6700000000, 0xc972a55e00000000, 0x09168d4900000000, + 0x490e179500000000, 0x896a3f8200000000, 0xc9c747bb00000000, + 0x09a36fac00000000, 0x499db6c900000000, 0x89f99ede00000000, + 0xc954e6e700000000, 0x0930cef000000000, 0xcbf03c0d00000000, + 0x0b94141a00000000, 0x4b396c2300000000, 0x8b5d443400000000, + 0xcb639d5100000000, 0x0b07b54600000000, 0x4baacd7f00000000, + 0x8bcee56800000000, 0xcbd67fb400000000, 0x0bb257a300000000, + 0x4b1f2f9a00000000, 0x8b7b078d00000000, 0xcb45dee800000000, + 0x0b21f6ff00000000, 0x4b8c8ec600000000, 0x8be8a6d100000000, + 0x8abacba400000000, 0x4adee3b300000000, 0x0a739b8a00000000, + 0xca17b39d00000000, 0x8a296af800000000, 0x4a4d42ef00000000, + 0x0ae03ad600000000, 0xca8412c100000000, 0x8a9c881d00000000, + 0x4af8a00a00000000, 0x0a55d83300000000, 0xca31f02400000000, + 0x8a0f294100000000, 0x4a6b015600000000, 0x0ac6796f00000000, + 0xcaa2517800000000}, + {0x0000000000000000, 0xd4ea739b00000000, 0xe9d396ed00000000, + 0x3d39e57600000000, 0x93a15c0000000000, 0x474b2f9b00000000, + 0x7a72caed00000000, 0xae98b97600000000, 0x2643b90000000000, + 0xf2a9ca9b00000000, 0xcf902fed00000000, 0x1b7a5c7600000000, + 0xb5e2e50000000000, 0x6108969b00000000, 0x5c3173ed00000000, + 0x88db007600000000, 0x4c86720100000000, 0x986c019a00000000, + 0xa555e4ec00000000, 0x71bf977700000000, 0xdf272e0100000000, + 0x0bcd5d9a00000000, 0x36f4b8ec00000000, 0xe21ecb7700000000, + 0x6ac5cb0100000000, 0xbe2fb89a00000000, 0x83165dec00000000, + 0x57fc2e7700000000, 0xf964970100000000, 0x2d8ee49a00000000, + 0x10b701ec00000000, 0xc45d727700000000, 0x980ce50200000000, + 0x4ce6969900000000, 0x71df73ef00000000, 0xa535007400000000, + 0x0badb90200000000, 0xdf47ca9900000000, 0xe27e2fef00000000, + 0x36945c7400000000, 0xbe4f5c0200000000, 0x6aa52f9900000000, + 0x579ccaef00000000, 0x8376b97400000000, 0x2dee000200000000, + 0xf904739900000000, 0xc43d96ef00000000, 0x10d7e57400000000, + 0xd48a970300000000, 0x0060e49800000000, 0x3d5901ee00000000, + 0xe9b3727500000000, 0x472bcb0300000000, 0x93c1b89800000000, + 0xaef85dee00000000, 0x7a122e7500000000, 0xf2c92e0300000000, + 0x26235d9800000000, 0x1b1ab8ee00000000, 0xcff0cb7500000000, + 0x6168720300000000, 0xb582019800000000, 0x88bbe4ee00000000, + 0x5c51977500000000, 0x3019ca0500000000, 0xe4f3b99e00000000, + 0xd9ca5ce800000000, 0x0d202f7300000000, 0xa3b8960500000000, + 0x7752e59e00000000, 0x4a6b00e800000000, 0x9e81737300000000, + 0x165a730500000000, 0xc2b0009e00000000, 0xff89e5e800000000, + 0x2b63967300000000, 0x85fb2f0500000000, 0x51115c9e00000000, + 0x6c28b9e800000000, 0xb8c2ca7300000000, 0x7c9fb80400000000, + 0xa875cb9f00000000, 0x954c2ee900000000, 0x41a65d7200000000, + 0xef3ee40400000000, 0x3bd4979f00000000, 0x06ed72e900000000, + 0xd207017200000000, 0x5adc010400000000, 0x8e36729f00000000, + 0xb30f97e900000000, 0x67e5e47200000000, 0xc97d5d0400000000, + 0x1d972e9f00000000, 0x20aecbe900000000, 0xf444b87200000000, + 0xa8152f0700000000, 0x7cff5c9c00000000, 0x41c6b9ea00000000, + 0x952cca7100000000, 0x3bb4730700000000, 0xef5e009c00000000, + 0xd267e5ea00000000, 0x068d967100000000, 0x8e56960700000000, + 0x5abce59c00000000, 0x678500ea00000000, 0xb36f737100000000, + 0x1df7ca0700000000, 0xc91db99c00000000, 0xf4245cea00000000, + 0x20ce2f7100000000, 0xe4935d0600000000, 0x30792e9d00000000, + 0x0d40cbeb00000000, 0xd9aab87000000000, 0x7732010600000000, + 0xa3d8729d00000000, 0x9ee197eb00000000, 0x4a0be47000000000, + 0xc2d0e40600000000, 0x163a979d00000000, 0x2b0372eb00000000, + 0xffe9017000000000, 0x5171b80600000000, 0x859bcb9d00000000, + 0xb8a22eeb00000000, 0x6c485d7000000000, 0x6032940b00000000, + 0xb4d8e79000000000, 0x89e102e600000000, 0x5d0b717d00000000, + 0xf393c80b00000000, 0x2779bb9000000000, 0x1a405ee600000000, + 0xceaa2d7d00000000, 0x46712d0b00000000, 0x929b5e9000000000, + 0xafa2bbe600000000, 0x7b48c87d00000000, 0xd5d0710b00000000, + 0x013a029000000000, 0x3c03e7e600000000, 0xe8e9947d00000000, + 0x2cb4e60a00000000, 0xf85e959100000000, 0xc56770e700000000, + 0x118d037c00000000, 0xbf15ba0a00000000, 0x6bffc99100000000, + 0x56c62ce700000000, 0x822c5f7c00000000, 0x0af75f0a00000000, + 0xde1d2c9100000000, 0xe324c9e700000000, 0x37ceba7c00000000, + 0x9956030a00000000, 0x4dbc709100000000, 0x708595e700000000, + 0xa46fe67c00000000, 0xf83e710900000000, 0x2cd4029200000000, + 0x11ede7e400000000, 0xc507947f00000000, 0x6b9f2d0900000000, + 0xbf755e9200000000, 0x824cbbe400000000, 0x56a6c87f00000000, + 0xde7dc80900000000, 0x0a97bb9200000000, 0x37ae5ee400000000, + 0xe3442d7f00000000, 0x4ddc940900000000, 0x9936e79200000000, + 0xa40f02e400000000, 0x70e5717f00000000, 0xb4b8030800000000, + 0x6052709300000000, 0x5d6b95e500000000, 0x8981e67e00000000, + 0x27195f0800000000, 0xf3f32c9300000000, 0xcecac9e500000000, + 0x1a20ba7e00000000, 0x92fbba0800000000, 0x4611c99300000000, + 0x7b282ce500000000, 0xafc25f7e00000000, 0x015ae60800000000, + 0xd5b0959300000000, 0xe88970e500000000, 0x3c63037e00000000, + 0x502b5e0e00000000, 0x84c12d9500000000, 0xb9f8c8e300000000, + 0x6d12bb7800000000, 0xc38a020e00000000, 0x1760719500000000, + 0x2a5994e300000000, 0xfeb3e77800000000, 0x7668e70e00000000, + 0xa282949500000000, 0x9fbb71e300000000, 0x4b51027800000000, + 0xe5c9bb0e00000000, 0x3123c89500000000, 0x0c1a2de300000000, + 0xd8f05e7800000000, 0x1cad2c0f00000000, 0xc8475f9400000000, + 0xf57ebae200000000, 0x2194c97900000000, 0x8f0c700f00000000, + 0x5be6039400000000, 0x66dfe6e200000000, 0xb235957900000000, + 0x3aee950f00000000, 0xee04e69400000000, 0xd33d03e200000000, + 0x07d7707900000000, 0xa94fc90f00000000, 0x7da5ba9400000000, + 0x409c5fe200000000, 0x94762c7900000000, 0xc827bb0c00000000, + 0x1ccdc89700000000, 0x21f42de100000000, 0xf51e5e7a00000000, + 0x5b86e70c00000000, 0x8f6c949700000000, 0xb25571e100000000, + 0x66bf027a00000000, 0xee64020c00000000, 0x3a8e719700000000, + 0x07b794e100000000, 0xd35de77a00000000, 0x7dc55e0c00000000, + 0xa92f2d9700000000, 0x9416c8e100000000, 0x40fcbb7a00000000, + 0x84a1c90d00000000, 0x504bba9600000000, 0x6d725fe000000000, + 0xb9982c7b00000000, 0x1700950d00000000, 0xc3eae69600000000, + 0xfed303e000000000, 0x2a39707b00000000, 0xa2e2700d00000000, + 0x7608039600000000, 0x4b31e6e000000000, 0x9fdb957b00000000, + 0x31432c0d00000000, 0xe5a95f9600000000, 0xd890bae000000000, + 0x0c7ac97b00000000}, + {0x0000000000000000, 0x2765258100000000, 0x0fcc3bd900000000, + 0x28a91e5800000000, 0x5f9e066900000000, 0x78fb23e800000000, + 0x50523db000000000, 0x7737183100000000, 0xbe3c0dd200000000, + 0x9959285300000000, 0xb1f0360b00000000, 0x9695138a00000000, + 0xe1a20bbb00000000, 0xc6c72e3a00000000, 0xee6e306200000000, + 0xc90b15e300000000, 0x3d7f6b7f00000000, 0x1a1a4efe00000000, + 0x32b350a600000000, 0x15d6752700000000, 0x62e16d1600000000, + 0x4584489700000000, 0x6d2d56cf00000000, 0x4a48734e00000000, + 0x834366ad00000000, 0xa426432c00000000, 0x8c8f5d7400000000, + 0xabea78f500000000, 0xdcdd60c400000000, 0xfbb8454500000000, + 0xd3115b1d00000000, 0xf4747e9c00000000, 0x7afed6fe00000000, + 0x5d9bf37f00000000, 0x7532ed2700000000, 0x5257c8a600000000, + 0x2560d09700000000, 0x0205f51600000000, 0x2aaceb4e00000000, + 0x0dc9cecf00000000, 0xc4c2db2c00000000, 0xe3a7fead00000000, + 0xcb0ee0f500000000, 0xec6bc57400000000, 0x9b5cdd4500000000, + 0xbc39f8c400000000, 0x9490e69c00000000, 0xb3f5c31d00000000, + 0x4781bd8100000000, 0x60e4980000000000, 0x484d865800000000, + 0x6f28a3d900000000, 0x181fbbe800000000, 0x3f7a9e6900000000, + 0x17d3803100000000, 0x30b6a5b000000000, 0xf9bdb05300000000, + 0xded895d200000000, 0xf6718b8a00000000, 0xd114ae0b00000000, + 0xa623b63a00000000, 0x814693bb00000000, 0xa9ef8de300000000, + 0x8e8aa86200000000, 0xb5fadc2600000000, 0x929ff9a700000000, + 0xba36e7ff00000000, 0x9d53c27e00000000, 0xea64da4f00000000, + 0xcd01ffce00000000, 0xe5a8e19600000000, 0xc2cdc41700000000, + 0x0bc6d1f400000000, 0x2ca3f47500000000, 0x040aea2d00000000, + 0x236fcfac00000000, 0x5458d79d00000000, 0x733df21c00000000, + 0x5b94ec4400000000, 0x7cf1c9c500000000, 0x8885b75900000000, + 0xafe092d800000000, 0x87498c8000000000, 0xa02ca90100000000, + 0xd71bb13000000000, 0xf07e94b100000000, 0xd8d78ae900000000, + 0xffb2af6800000000, 0x36b9ba8b00000000, 0x11dc9f0a00000000, + 0x3975815200000000, 0x1e10a4d300000000, 0x6927bce200000000, + 0x4e42996300000000, 0x66eb873b00000000, 0x418ea2ba00000000, + 0xcf040ad800000000, 0xe8612f5900000000, 0xc0c8310100000000, + 0xe7ad148000000000, 0x909a0cb100000000, 0xb7ff293000000000, + 0x9f56376800000000, 0xb83312e900000000, 0x7138070a00000000, + 0x565d228b00000000, 0x7ef43cd300000000, 0x5991195200000000, + 0x2ea6016300000000, 0x09c324e200000000, 0x216a3aba00000000, + 0x060f1f3b00000000, 0xf27b61a700000000, 0xd51e442600000000, + 0xfdb75a7e00000000, 0xdad27fff00000000, 0xade567ce00000000, + 0x8a80424f00000000, 0xa2295c1700000000, 0x854c799600000000, + 0x4c476c7500000000, 0x6b2249f400000000, 0x438b57ac00000000, + 0x64ee722d00000000, 0x13d96a1c00000000, 0x34bc4f9d00000000, + 0x1c1551c500000000, 0x3b70744400000000, 0x6af5b94d00000000, + 0x4d909ccc00000000, 0x6539829400000000, 0x425ca71500000000, + 0x356bbf2400000000, 0x120e9aa500000000, 0x3aa784fd00000000, + 0x1dc2a17c00000000, 0xd4c9b49f00000000, 0xf3ac911e00000000, + 0xdb058f4600000000, 0xfc60aac700000000, 0x8b57b2f600000000, + 0xac32977700000000, 0x849b892f00000000, 0xa3feacae00000000, + 0x578ad23200000000, 0x70eff7b300000000, 0x5846e9eb00000000, + 0x7f23cc6a00000000, 0x0814d45b00000000, 0x2f71f1da00000000, + 0x07d8ef8200000000, 0x20bdca0300000000, 0xe9b6dfe000000000, + 0xced3fa6100000000, 0xe67ae43900000000, 0xc11fc1b800000000, + 0xb628d98900000000, 0x914dfc0800000000, 0xb9e4e25000000000, + 0x9e81c7d100000000, 0x100b6fb300000000, 0x376e4a3200000000, + 0x1fc7546a00000000, 0x38a271eb00000000, 0x4f9569da00000000, + 0x68f04c5b00000000, 0x4059520300000000, 0x673c778200000000, + 0xae37626100000000, 0x895247e000000000, 0xa1fb59b800000000, + 0x869e7c3900000000, 0xf1a9640800000000, 0xd6cc418900000000, + 0xfe655fd100000000, 0xd9007a5000000000, 0x2d7404cc00000000, + 0x0a11214d00000000, 0x22b83f1500000000, 0x05dd1a9400000000, + 0x72ea02a500000000, 0x558f272400000000, 0x7d26397c00000000, + 0x5a431cfd00000000, 0x9348091e00000000, 0xb42d2c9f00000000, + 0x9c8432c700000000, 0xbbe1174600000000, 0xccd60f7700000000, + 0xebb32af600000000, 0xc31a34ae00000000, 0xe47f112f00000000, + 0xdf0f656b00000000, 0xf86a40ea00000000, 0xd0c35eb200000000, + 0xf7a67b3300000000, 0x8091630200000000, 0xa7f4468300000000, + 0x8f5d58db00000000, 0xa8387d5a00000000, 0x613368b900000000, + 0x46564d3800000000, 0x6eff536000000000, 0x499a76e100000000, + 0x3ead6ed000000000, 0x19c84b5100000000, 0x3161550900000000, + 0x1604708800000000, 0xe2700e1400000000, 0xc5152b9500000000, + 0xedbc35cd00000000, 0xcad9104c00000000, 0xbdee087d00000000, + 0x9a8b2dfc00000000, 0xb22233a400000000, 0x9547162500000000, + 0x5c4c03c600000000, 0x7b29264700000000, 0x5380381f00000000, + 0x74e51d9e00000000, 0x03d205af00000000, 0x24b7202e00000000, + 0x0c1e3e7600000000, 0x2b7b1bf700000000, 0xa5f1b39500000000, + 0x8294961400000000, 0xaa3d884c00000000, 0x8d58adcd00000000, + 0xfa6fb5fc00000000, 0xdd0a907d00000000, 0xf5a38e2500000000, + 0xd2c6aba400000000, 0x1bcdbe4700000000, 0x3ca89bc600000000, + 0x1401859e00000000, 0x3364a01f00000000, 0x4453b82e00000000, + 0x63369daf00000000, 0x4b9f83f700000000, 0x6cfaa67600000000, + 0x988ed8ea00000000, 0xbfebfd6b00000000, 0x9742e33300000000, + 0xb027c6b200000000, 0xc710de8300000000, 0xe075fb0200000000, + 0xc8dce55a00000000, 0xefb9c0db00000000, 0x26b2d53800000000, + 0x01d7f0b900000000, 0x297eeee100000000, 0x0e1bcb6000000000, + 0x792cd35100000000, 0x5e49f6d000000000, 0x76e0e88800000000, + 0x5185cd0900000000}}; + +#else /* W == 4 */ + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0x9ba54c6f, 0xec3b9e9f, 0x779ed2f0, 0x03063b7f, + 0x98a37710, 0xef3da5e0, 0x7498e98f, 0x060c76fe, 0x9da93a91, + 0xea37e861, 0x7192a40e, 0x050a4d81, 0x9eaf01ee, 0xe931d31e, + 0x72949f71, 0x0c18edfc, 0x97bda193, 0xe0237363, 0x7b863f0c, + 0x0f1ed683, 0x94bb9aec, 0xe325481c, 0x78800473, 0x0a149b02, + 0x91b1d76d, 0xe62f059d, 0x7d8a49f2, 0x0912a07d, 0x92b7ec12, + 0xe5293ee2, 0x7e8c728d, 0x1831dbf8, 0x83949797, 0xf40a4567, + 0x6faf0908, 0x1b37e087, 0x8092ace8, 0xf70c7e18, 0x6ca93277, + 0x1e3dad06, 0x8598e169, 0xf2063399, 0x69a37ff6, 0x1d3b9679, + 0x869eda16, 0xf10008e6, 0x6aa54489, 0x14293604, 0x8f8c7a6b, + 0xf812a89b, 0x63b7e4f4, 0x172f0d7b, 0x8c8a4114, 0xfb1493e4, + 0x60b1df8b, 0x122540fa, 0x89800c95, 0xfe1ede65, 0x65bb920a, + 0x11237b85, 0x8a8637ea, 0xfd18e51a, 0x66bda975, 0x3063b7f0, + 0xabc6fb9f, 0xdc58296f, 0x47fd6500, 0x33658c8f, 0xa8c0c0e0, + 0xdf5e1210, 0x44fb5e7f, 0x366fc10e, 0xadca8d61, 0xda545f91, + 0x41f113fe, 0x3569fa71, 0xaeccb61e, 0xd95264ee, 0x42f72881, + 0x3c7b5a0c, 0xa7de1663, 0xd040c493, 0x4be588fc, 0x3f7d6173, + 0xa4d82d1c, 0xd346ffec, 0x48e3b383, 0x3a772cf2, 0xa1d2609d, + 0xd64cb26d, 0x4de9fe02, 0x3971178d, 0xa2d45be2, 0xd54a8912, + 0x4eefc57d, 0x28526c08, 0xb3f72067, 0xc469f297, 0x5fccbef8, + 0x2b545777, 0xb0f11b18, 0xc76fc9e8, 0x5cca8587, 0x2e5e1af6, + 0xb5fb5699, 0xc2658469, 0x59c0c806, 0x2d582189, 0xb6fd6de6, + 0xc163bf16, 0x5ac6f379, 0x244a81f4, 0xbfefcd9b, 0xc8711f6b, + 0x53d45304, 0x274cba8b, 0xbce9f6e4, 0xcb772414, 0x50d2687b, + 0x2246f70a, 0xb9e3bb65, 0xce7d6995, 0x55d825fa, 0x2140cc75, + 0xbae5801a, 0xcd7b52ea, 0x56de1e85, 0x60c76fe0, 0xfb62238f, + 0x8cfcf17f, 0x1759bd10, 0x63c1549f, 0xf86418f0, 0x8ffaca00, + 0x145f866f, 0x66cb191e, 0xfd6e5571, 0x8af08781, 0x1155cbee, + 0x65cd2261, 0xfe686e0e, 0x89f6bcfe, 0x1253f091, 0x6cdf821c, + 0xf77ace73, 0x80e41c83, 0x1b4150ec, 0x6fd9b963, 0xf47cf50c, + 0x83e227fc, 0x18476b93, 0x6ad3f4e2, 0xf176b88d, 0x86e86a7d, + 0x1d4d2612, 0x69d5cf9d, 0xf27083f2, 0x85ee5102, 0x1e4b1d6d, + 0x78f6b418, 0xe353f877, 0x94cd2a87, 0x0f6866e8, 0x7bf08f67, + 0xe055c308, 0x97cb11f8, 0x0c6e5d97, 0x7efac2e6, 0xe55f8e89, + 0x92c15c79, 0x09641016, 0x7dfcf999, 0xe659b5f6, 0x91c76706, + 0x0a622b69, 0x74ee59e4, 0xef4b158b, 0x98d5c77b, 0x03708b14, + 0x77e8629b, 0xec4d2ef4, 0x9bd3fc04, 0x0076b06b, 0x72e22f1a, + 0xe9476375, 0x9ed9b185, 0x057cfdea, 0x71e41465, 0xea41580a, + 0x9ddf8afa, 0x067ac695, 0x50a4d810, 0xcb01947f, 0xbc9f468f, + 0x273a0ae0, 0x53a2e36f, 0xc807af00, 0xbf997df0, 0x243c319f, + 0x56a8aeee, 0xcd0de281, 0xba933071, 0x21367c1e, 0x55ae9591, + 0xce0bd9fe, 0xb9950b0e, 0x22304761, 0x5cbc35ec, 0xc7197983, + 0xb087ab73, 0x2b22e71c, 0x5fba0e93, 0xc41f42fc, 0xb381900c, + 0x2824dc63, 0x5ab04312, 0xc1150f7d, 0xb68bdd8d, 0x2d2e91e2, + 0x59b6786d, 0xc2133402, 0xb58de6f2, 0x2e28aa9d, 0x489503e8, + 0xd3304f87, 0xa4ae9d77, 0x3f0bd118, 0x4b933897, 0xd03674f8, + 0xa7a8a608, 0x3c0dea67, 0x4e997516, 0xd53c3979, 0xa2a2eb89, + 0x3907a7e6, 0x4d9f4e69, 0xd63a0206, 0xa1a4d0f6, 0x3a019c99, + 0x448dee14, 0xdf28a27b, 0xa8b6708b, 0x33133ce4, 0x478bd56b, + 0xdc2e9904, 0xabb04bf4, 0x3015079b, 0x428198ea, 0xd924d485, + 0xaeba0675, 0x351f4a1a, 0x4187a395, 0xda22effa, 0xadbc3d0a, + 0x36197165}, + {0x00000000, 0xc18edfc0, 0x586cb9c1, 0x99e26601, 0xb0d97382, + 0x7157ac42, 0xe8b5ca43, 0x293b1583, 0xbac3e145, 0x7b4d3e85, + 0xe2af5884, 0x23218744, 0x0a1a92c7, 0xcb944d07, 0x52762b06, + 0x93f8f4c6, 0xaef6c4cb, 0x6f781b0b, 0xf69a7d0a, 0x3714a2ca, + 0x1e2fb749, 0xdfa16889, 0x46430e88, 0x87cdd148, 0x1435258e, + 0xd5bbfa4e, 0x4c599c4f, 0x8dd7438f, 0xa4ec560c, 0x656289cc, + 0xfc80efcd, 0x3d0e300d, 0x869c8fd7, 0x47125017, 0xdef03616, + 0x1f7ee9d6, 0x3645fc55, 0xf7cb2395, 0x6e294594, 0xafa79a54, + 0x3c5f6e92, 0xfdd1b152, 0x6433d753, 0xa5bd0893, 0x8c861d10, + 0x4d08c2d0, 0xd4eaa4d1, 0x15647b11, 0x286a4b1c, 0xe9e494dc, + 0x7006f2dd, 0xb1882d1d, 0x98b3389e, 0x593de75e, 0xc0df815f, + 0x01515e9f, 0x92a9aa59, 0x53277599, 0xcac51398, 0x0b4bcc58, + 0x2270d9db, 0xe3fe061b, 0x7a1c601a, 0xbb92bfda, 0xd64819ef, + 0x17c6c62f, 0x8e24a02e, 0x4faa7fee, 0x66916a6d, 0xa71fb5ad, + 0x3efdd3ac, 0xff730c6c, 0x6c8bf8aa, 0xad05276a, 0x34e7416b, + 0xf5699eab, 0xdc528b28, 0x1ddc54e8, 0x843e32e9, 0x45b0ed29, + 0x78bedd24, 0xb93002e4, 0x20d264e5, 0xe15cbb25, 0xc867aea6, + 0x09e97166, 0x900b1767, 0x5185c8a7, 0xc27d3c61, 0x03f3e3a1, + 0x9a1185a0, 0x5b9f5a60, 0x72a44fe3, 0xb32a9023, 0x2ac8f622, + 0xeb4629e2, 0x50d49638, 0x915a49f8, 0x08b82ff9, 0xc936f039, + 0xe00de5ba, 0x21833a7a, 0xb8615c7b, 0x79ef83bb, 0xea17777d, + 0x2b99a8bd, 0xb27bcebc, 0x73f5117c, 0x5ace04ff, 0x9b40db3f, + 0x02a2bd3e, 0xc32c62fe, 0xfe2252f3, 0x3fac8d33, 0xa64eeb32, + 0x67c034f2, 0x4efb2171, 0x8f75feb1, 0x169798b0, 0xd7194770, + 0x44e1b3b6, 0x856f6c76, 0x1c8d0a77, 0xdd03d5b7, 0xf438c034, + 0x35b61ff4, 0xac5479f5, 0x6ddaa635, 0x77e1359f, 0xb66fea5f, + 0x2f8d8c5e, 0xee03539e, 0xc738461d, 0x06b699dd, 0x9f54ffdc, + 0x5eda201c, 0xcd22d4da, 0x0cac0b1a, 0x954e6d1b, 0x54c0b2db, + 0x7dfba758, 0xbc757898, 0x25971e99, 0xe419c159, 0xd917f154, + 0x18992e94, 0x817b4895, 0x40f59755, 0x69ce82d6, 0xa8405d16, + 0x31a23b17, 0xf02ce4d7, 0x63d41011, 0xa25acfd1, 0x3bb8a9d0, + 0xfa367610, 0xd30d6393, 0x1283bc53, 0x8b61da52, 0x4aef0592, + 0xf17dba48, 0x30f36588, 0xa9110389, 0x689fdc49, 0x41a4c9ca, + 0x802a160a, 0x19c8700b, 0xd846afcb, 0x4bbe5b0d, 0x8a3084cd, + 0x13d2e2cc, 0xd25c3d0c, 0xfb67288f, 0x3ae9f74f, 0xa30b914e, + 0x62854e8e, 0x5f8b7e83, 0x9e05a143, 0x07e7c742, 0xc6691882, + 0xef520d01, 0x2edcd2c1, 0xb73eb4c0, 0x76b06b00, 0xe5489fc6, + 0x24c64006, 0xbd242607, 0x7caaf9c7, 0x5591ec44, 0x941f3384, + 0x0dfd5585, 0xcc738a45, 0xa1a92c70, 0x6027f3b0, 0xf9c595b1, + 0x384b4a71, 0x11705ff2, 0xd0fe8032, 0x491ce633, 0x889239f3, + 0x1b6acd35, 0xdae412f5, 0x430674f4, 0x8288ab34, 0xabb3beb7, + 0x6a3d6177, 0xf3df0776, 0x3251d8b6, 0x0f5fe8bb, 0xced1377b, + 0x5733517a, 0x96bd8eba, 0xbf869b39, 0x7e0844f9, 0xe7ea22f8, + 0x2664fd38, 0xb59c09fe, 0x7412d63e, 0xedf0b03f, 0x2c7e6fff, + 0x05457a7c, 0xc4cba5bc, 0x5d29c3bd, 0x9ca71c7d, 0x2735a3a7, + 0xe6bb7c67, 0x7f591a66, 0xbed7c5a6, 0x97ecd025, 0x56620fe5, + 0xcf8069e4, 0x0e0eb624, 0x9df642e2, 0x5c789d22, 0xc59afb23, + 0x041424e3, 0x2d2f3160, 0xeca1eea0, 0x754388a1, 0xb4cd5761, + 0x89c3676c, 0x484db8ac, 0xd1afdead, 0x1021016d, 0x391a14ee, + 0xf894cb2e, 0x6176ad2f, 0xa0f872ef, 0x33008629, 0xf28e59e9, + 0x6b6c3fe8, 0xaae2e028, 0x83d9f5ab, 0x42572a6b, 0xdbb54c6a, + 0x1a3b93aa}, + {0x00000000, 0xefc26b3e, 0x04f5d03d, 0xeb37bb03, 0x09eba07a, + 0xe629cb44, 0x0d1e7047, 0xe2dc1b79, 0x13d740f4, 0xfc152bca, + 0x172290c9, 0xf8e0fbf7, 0x1a3ce08e, 0xf5fe8bb0, 0x1ec930b3, + 0xf10b5b8d, 0x27ae81e8, 0xc86cead6, 0x235b51d5, 0xcc993aeb, + 0x2e452192, 0xc1874aac, 0x2ab0f1af, 0xc5729a91, 0x3479c11c, + 0xdbbbaa22, 0x308c1121, 0xdf4e7a1f, 0x3d926166, 0xd2500a58, + 0x3967b15b, 0xd6a5da65, 0x4f5d03d0, 0xa09f68ee, 0x4ba8d3ed, + 0xa46ab8d3, 0x46b6a3aa, 0xa974c894, 0x42437397, 0xad8118a9, + 0x5c8a4324, 0xb348281a, 0x587f9319, 0xb7bdf827, 0x5561e35e, + 0xbaa38860, 0x51943363, 0xbe56585d, 0x68f38238, 0x8731e906, + 0x6c065205, 0x83c4393b, 0x61182242, 0x8eda497c, 0x65edf27f, + 0x8a2f9941, 0x7b24c2cc, 0x94e6a9f2, 0x7fd112f1, 0x901379cf, + 0x72cf62b6, 0x9d0d0988, 0x763ab28b, 0x99f8d9b5, 0x9eba07a0, + 0x71786c9e, 0x9a4fd79d, 0x758dbca3, 0x9751a7da, 0x7893cce4, + 0x93a477e7, 0x7c661cd9, 0x8d6d4754, 0x62af2c6a, 0x89989769, + 0x665afc57, 0x8486e72e, 0x6b448c10, 0x80733713, 0x6fb15c2d, + 0xb9148648, 0x56d6ed76, 0xbde15675, 0x52233d4b, 0xb0ff2632, + 0x5f3d4d0c, 0xb40af60f, 0x5bc89d31, 0xaac3c6bc, 0x4501ad82, + 0xae361681, 0x41f47dbf, 0xa32866c6, 0x4cea0df8, 0xa7ddb6fb, + 0x481fddc5, 0xd1e70470, 0x3e256f4e, 0xd512d44d, 0x3ad0bf73, + 0xd80ca40a, 0x37cecf34, 0xdcf97437, 0x333b1f09, 0xc2304484, + 0x2df22fba, 0xc6c594b9, 0x2907ff87, 0xcbdbe4fe, 0x24198fc0, + 0xcf2e34c3, 0x20ec5ffd, 0xf6498598, 0x198beea6, 0xf2bc55a5, + 0x1d7e3e9b, 0xffa225e2, 0x10604edc, 0xfb57f5df, 0x14959ee1, + 0xe59ec56c, 0x0a5cae52, 0xe16b1551, 0x0ea97e6f, 0xec756516, + 0x03b70e28, 0xe880b52b, 0x0742de15, 0xe6050901, 0x09c7623f, + 0xe2f0d93c, 0x0d32b202, 0xefeea97b, 0x002cc245, 0xeb1b7946, + 0x04d91278, 0xf5d249f5, 0x1a1022cb, 0xf12799c8, 0x1ee5f2f6, + 0xfc39e98f, 0x13fb82b1, 0xf8cc39b2, 0x170e528c, 0xc1ab88e9, + 0x2e69e3d7, 0xc55e58d4, 0x2a9c33ea, 0xc8402893, 0x278243ad, + 0xccb5f8ae, 0x23779390, 0xd27cc81d, 0x3dbea323, 0xd6891820, + 0x394b731e, 0xdb976867, 0x34550359, 0xdf62b85a, 0x30a0d364, + 0xa9580ad1, 0x469a61ef, 0xadaddaec, 0x426fb1d2, 0xa0b3aaab, + 0x4f71c195, 0xa4467a96, 0x4b8411a8, 0xba8f4a25, 0x554d211b, + 0xbe7a9a18, 0x51b8f126, 0xb364ea5f, 0x5ca68161, 0xb7913a62, + 0x5853515c, 0x8ef68b39, 0x6134e007, 0x8a035b04, 0x65c1303a, + 0x871d2b43, 0x68df407d, 0x83e8fb7e, 0x6c2a9040, 0x9d21cbcd, + 0x72e3a0f3, 0x99d41bf0, 0x761670ce, 0x94ca6bb7, 0x7b080089, + 0x903fbb8a, 0x7ffdd0b4, 0x78bf0ea1, 0x977d659f, 0x7c4ade9c, + 0x9388b5a2, 0x7154aedb, 0x9e96c5e5, 0x75a17ee6, 0x9a6315d8, + 0x6b684e55, 0x84aa256b, 0x6f9d9e68, 0x805ff556, 0x6283ee2f, + 0x8d418511, 0x66763e12, 0x89b4552c, 0x5f118f49, 0xb0d3e477, + 0x5be45f74, 0xb426344a, 0x56fa2f33, 0xb938440d, 0x520fff0e, + 0xbdcd9430, 0x4cc6cfbd, 0xa304a483, 0x48331f80, 0xa7f174be, + 0x452d6fc7, 0xaaef04f9, 0x41d8bffa, 0xae1ad4c4, 0x37e20d71, + 0xd820664f, 0x3317dd4c, 0xdcd5b672, 0x3e09ad0b, 0xd1cbc635, + 0x3afc7d36, 0xd53e1608, 0x24354d85, 0xcbf726bb, 0x20c09db8, + 0xcf02f686, 0x2ddeedff, 0xc21c86c1, 0x292b3dc2, 0xc6e956fc, + 0x104c8c99, 0xff8ee7a7, 0x14b95ca4, 0xfb7b379a, 0x19a72ce3, + 0xf66547dd, 0x1d52fcde, 0xf29097e0, 0x039bcc6d, 0xec59a753, + 0x076e1c50, 0xe8ac776e, 0x0a706c17, 0xe5b20729, 0x0e85bc2a, + 0xe147d714}, + {0x00000000, 0x177b1443, 0x2ef62886, 0x398d3cc5, 0x5dec510c, + 0x4a97454f, 0x731a798a, 0x64616dc9, 0xbbd8a218, 0xaca3b65b, + 0x952e8a9e, 0x82559edd, 0xe634f314, 0xf14fe757, 0xc8c2db92, + 0xdfb9cfd1, 0xacc04271, 0xbbbb5632, 0x82366af7, 0x954d7eb4, + 0xf12c137d, 0xe657073e, 0xdfda3bfb, 0xc8a12fb8, 0x1718e069, + 0x0063f42a, 0x39eec8ef, 0x2e95dcac, 0x4af4b165, 0x5d8fa526, + 0x640299e3, 0x73798da0, 0x82f182a3, 0x958a96e0, 0xac07aa25, + 0xbb7cbe66, 0xdf1dd3af, 0xc866c7ec, 0xf1ebfb29, 0xe690ef6a, + 0x392920bb, 0x2e5234f8, 0x17df083d, 0x00a41c7e, 0x64c571b7, + 0x73be65f4, 0x4a335931, 0x5d484d72, 0x2e31c0d2, 0x394ad491, + 0x00c7e854, 0x17bcfc17, 0x73dd91de, 0x64a6859d, 0x5d2bb958, + 0x4a50ad1b, 0x95e962ca, 0x82927689, 0xbb1f4a4c, 0xac645e0f, + 0xc80533c6, 0xdf7e2785, 0xe6f31b40, 0xf1880f03, 0xde920307, + 0xc9e91744, 0xf0642b81, 0xe71f3fc2, 0x837e520b, 0x94054648, + 0xad887a8d, 0xbaf36ece, 0x654aa11f, 0x7231b55c, 0x4bbc8999, + 0x5cc79dda, 0x38a6f013, 0x2fdde450, 0x1650d895, 0x012bccd6, + 0x72524176, 0x65295535, 0x5ca469f0, 0x4bdf7db3, 0x2fbe107a, + 0x38c50439, 0x014838fc, 0x16332cbf, 0xc98ae36e, 0xdef1f72d, + 0xe77ccbe8, 0xf007dfab, 0x9466b262, 0x831da621, 0xba909ae4, + 0xadeb8ea7, 0x5c6381a4, 0x4b1895e7, 0x7295a922, 0x65eebd61, + 0x018fd0a8, 0x16f4c4eb, 0x2f79f82e, 0x3802ec6d, 0xe7bb23bc, + 0xf0c037ff, 0xc94d0b3a, 0xde361f79, 0xba5772b0, 0xad2c66f3, + 0x94a15a36, 0x83da4e75, 0xf0a3c3d5, 0xe7d8d796, 0xde55eb53, + 0xc92eff10, 0xad4f92d9, 0xba34869a, 0x83b9ba5f, 0x94c2ae1c, + 0x4b7b61cd, 0x5c00758e, 0x658d494b, 0x72f65d08, 0x169730c1, + 0x01ec2482, 0x38611847, 0x2f1a0c04, 0x6655004f, 0x712e140c, + 0x48a328c9, 0x5fd83c8a, 0x3bb95143, 0x2cc24500, 0x154f79c5, + 0x02346d86, 0xdd8da257, 0xcaf6b614, 0xf37b8ad1, 0xe4009e92, + 0x8061f35b, 0x971ae718, 0xae97dbdd, 0xb9eccf9e, 0xca95423e, + 0xddee567d, 0xe4636ab8, 0xf3187efb, 0x97791332, 0x80020771, + 0xb98f3bb4, 0xaef42ff7, 0x714de026, 0x6636f465, 0x5fbbc8a0, + 0x48c0dce3, 0x2ca1b12a, 0x3bdaa569, 0x025799ac, 0x152c8def, + 0xe4a482ec, 0xf3df96af, 0xca52aa6a, 0xdd29be29, 0xb948d3e0, + 0xae33c7a3, 0x97befb66, 0x80c5ef25, 0x5f7c20f4, 0x480734b7, + 0x718a0872, 0x66f11c31, 0x029071f8, 0x15eb65bb, 0x2c66597e, + 0x3b1d4d3d, 0x4864c09d, 0x5f1fd4de, 0x6692e81b, 0x71e9fc58, + 0x15889191, 0x02f385d2, 0x3b7eb917, 0x2c05ad54, 0xf3bc6285, + 0xe4c776c6, 0xdd4a4a03, 0xca315e40, 0xae503389, 0xb92b27ca, + 0x80a61b0f, 0x97dd0f4c, 0xb8c70348, 0xafbc170b, 0x96312bce, + 0x814a3f8d, 0xe52b5244, 0xf2504607, 0xcbdd7ac2, 0xdca66e81, + 0x031fa150, 0x1464b513, 0x2de989d6, 0x3a929d95, 0x5ef3f05c, + 0x4988e41f, 0x7005d8da, 0x677ecc99, 0x14074139, 0x037c557a, + 0x3af169bf, 0x2d8a7dfc, 0x49eb1035, 0x5e900476, 0x671d38b3, + 0x70662cf0, 0xafdfe321, 0xb8a4f762, 0x8129cba7, 0x9652dfe4, + 0xf233b22d, 0xe548a66e, 0xdcc59aab, 0xcbbe8ee8, 0x3a3681eb, + 0x2d4d95a8, 0x14c0a96d, 0x03bbbd2e, 0x67dad0e7, 0x70a1c4a4, + 0x492cf861, 0x5e57ec22, 0x81ee23f3, 0x969537b0, 0xaf180b75, + 0xb8631f36, 0xdc0272ff, 0xcb7966bc, 0xf2f45a79, 0xe58f4e3a, + 0x96f6c39a, 0x818dd7d9, 0xb800eb1c, 0xaf7bff5f, 0xcb1a9296, + 0xdc6186d5, 0xe5ecba10, 0xf297ae53, 0x2d2e6182, 0x3a5575c1, + 0x03d84904, 0x14a35d47, 0x70c2308e, 0x67b924cd, 0x5e341808, + 0x494f0c4b}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x00000000, 0x43147b17, 0x8628f62e, 0xc53c8d39, 0x0c51ec5d, + 0x4f45974a, 0x8a791a73, 0xc96d6164, 0x18a2d8bb, 0x5bb6a3ac, + 0x9e8a2e95, 0xdd9e5582, 0x14f334e6, 0x57e74ff1, 0x92dbc2c8, + 0xd1cfb9df, 0x7142c0ac, 0x3256bbbb, 0xf76a3682, 0xb47e4d95, + 0x7d132cf1, 0x3e0757e6, 0xfb3bdadf, 0xb82fa1c8, 0x69e01817, + 0x2af46300, 0xefc8ee39, 0xacdc952e, 0x65b1f44a, 0x26a58f5d, + 0xe3990264, 0xa08d7973, 0xa382f182, 0xe0968a95, 0x25aa07ac, + 0x66be7cbb, 0xafd31ddf, 0xecc766c8, 0x29fbebf1, 0x6aef90e6, + 0xbb202939, 0xf834522e, 0x3d08df17, 0x7e1ca400, 0xb771c564, + 0xf465be73, 0x3159334a, 0x724d485d, 0xd2c0312e, 0x91d44a39, + 0x54e8c700, 0x17fcbc17, 0xde91dd73, 0x9d85a664, 0x58b92b5d, + 0x1bad504a, 0xca62e995, 0x89769282, 0x4c4a1fbb, 0x0f5e64ac, + 0xc63305c8, 0x85277edf, 0x401bf3e6, 0x030f88f1, 0x070392de, + 0x4417e9c9, 0x812b64f0, 0xc23f1fe7, 0x0b527e83, 0x48460594, + 0x8d7a88ad, 0xce6ef3ba, 0x1fa14a65, 0x5cb53172, 0x9989bc4b, + 0xda9dc75c, 0x13f0a638, 0x50e4dd2f, 0x95d85016, 0xd6cc2b01, + 0x76415272, 0x35552965, 0xf069a45c, 0xb37ddf4b, 0x7a10be2f, + 0x3904c538, 0xfc384801, 0xbf2c3316, 0x6ee38ac9, 0x2df7f1de, + 0xe8cb7ce7, 0xabdf07f0, 0x62b26694, 0x21a61d83, 0xe49a90ba, + 0xa78eebad, 0xa481635c, 0xe795184b, 0x22a99572, 0x61bdee65, + 0xa8d08f01, 0xebc4f416, 0x2ef8792f, 0x6dec0238, 0xbc23bbe7, + 0xff37c0f0, 0x3a0b4dc9, 0x791f36de, 0xb07257ba, 0xf3662cad, + 0x365aa194, 0x754eda83, 0xd5c3a3f0, 0x96d7d8e7, 0x53eb55de, + 0x10ff2ec9, 0xd9924fad, 0x9a8634ba, 0x5fbab983, 0x1caec294, + 0xcd617b4b, 0x8e75005c, 0x4b498d65, 0x085df672, 0xc1309716, + 0x8224ec01, 0x47186138, 0x040c1a2f, 0x4f005566, 0x0c142e71, + 0xc928a348, 0x8a3cd85f, 0x4351b93b, 0x0045c22c, 0xc5794f15, + 0x866d3402, 0x57a28ddd, 0x14b6f6ca, 0xd18a7bf3, 0x929e00e4, + 0x5bf36180, 0x18e71a97, 0xdddb97ae, 0x9ecfecb9, 0x3e4295ca, + 0x7d56eedd, 0xb86a63e4, 0xfb7e18f3, 0x32137997, 0x71070280, + 0xb43b8fb9, 0xf72ff4ae, 0x26e04d71, 0x65f43666, 0xa0c8bb5f, + 0xe3dcc048, 0x2ab1a12c, 0x69a5da3b, 0xac995702, 0xef8d2c15, + 0xec82a4e4, 0xaf96dff3, 0x6aaa52ca, 0x29be29dd, 0xe0d348b9, + 0xa3c733ae, 0x66fbbe97, 0x25efc580, 0xf4207c5f, 0xb7340748, + 0x72088a71, 0x311cf166, 0xf8719002, 0xbb65eb15, 0x7e59662c, + 0x3d4d1d3b, 0x9dc06448, 0xded41f5f, 0x1be89266, 0x58fce971, + 0x91918815, 0xd285f302, 0x17b97e3b, 0x54ad052c, 0x8562bcf3, + 0xc676c7e4, 0x034a4add, 0x405e31ca, 0x893350ae, 0xca272bb9, + 0x0f1ba680, 0x4c0fdd97, 0x4803c7b8, 0x0b17bcaf, 0xce2b3196, + 0x8d3f4a81, 0x44522be5, 0x074650f2, 0xc27addcb, 0x816ea6dc, + 0x50a11f03, 0x13b56414, 0xd689e92d, 0x959d923a, 0x5cf0f35e, + 0x1fe48849, 0xdad80570, 0x99cc7e67, 0x39410714, 0x7a557c03, + 0xbf69f13a, 0xfc7d8a2d, 0x3510eb49, 0x7604905e, 0xb3381d67, + 0xf02c6670, 0x21e3dfaf, 0x62f7a4b8, 0xa7cb2981, 0xe4df5296, + 0x2db233f2, 0x6ea648e5, 0xab9ac5dc, 0xe88ebecb, 0xeb81363a, + 0xa8954d2d, 0x6da9c014, 0x2ebdbb03, 0xe7d0da67, 0xa4c4a170, + 0x61f82c49, 0x22ec575e, 0xf323ee81, 0xb0379596, 0x750b18af, + 0x361f63b8, 0xff7202dc, 0xbc6679cb, 0x795af4f2, 0x3a4e8fe5, + 0x9ac3f696, 0xd9d78d81, 0x1ceb00b8, 0x5fff7baf, 0x96921acb, + 0xd58661dc, 0x10baece5, 0x53ae97f2, 0x82612e2d, 0xc175553a, + 0x0449d803, 0x475da314, 0x8e30c270, 0xcd24b967, 0x0818345e, + 0x4b0c4f49}, + {0x00000000, 0x3e6bc2ef, 0x3dd0f504, 0x03bb37eb, 0x7aa0eb09, + 0x44cb29e6, 0x47701e0d, 0x791bdce2, 0xf440d713, 0xca2b15fc, + 0xc9902217, 0xf7fbe0f8, 0x8ee03c1a, 0xb08bfef5, 0xb330c91e, + 0x8d5b0bf1, 0xe881ae27, 0xd6ea6cc8, 0xd5515b23, 0xeb3a99cc, + 0x9221452e, 0xac4a87c1, 0xaff1b02a, 0x919a72c5, 0x1cc17934, + 0x22aabbdb, 0x21118c30, 0x1f7a4edf, 0x6661923d, 0x580a50d2, + 0x5bb16739, 0x65daa5d6, 0xd0035d4f, 0xee689fa0, 0xedd3a84b, + 0xd3b86aa4, 0xaaa3b646, 0x94c874a9, 0x97734342, 0xa91881ad, + 0x24438a5c, 0x1a2848b3, 0x19937f58, 0x27f8bdb7, 0x5ee36155, + 0x6088a3ba, 0x63339451, 0x5d5856be, 0x3882f368, 0x06e93187, + 0x0552066c, 0x3b39c483, 0x42221861, 0x7c49da8e, 0x7ff2ed65, + 0x41992f8a, 0xccc2247b, 0xf2a9e694, 0xf112d17f, 0xcf791390, + 0xb662cf72, 0x88090d9d, 0x8bb23a76, 0xb5d9f899, 0xa007ba9e, + 0x9e6c7871, 0x9dd74f9a, 0xa3bc8d75, 0xdaa75197, 0xe4cc9378, + 0xe777a493, 0xd91c667c, 0x54476d8d, 0x6a2caf62, 0x69979889, + 0x57fc5a66, 0x2ee78684, 0x108c446b, 0x13377380, 0x2d5cb16f, + 0x488614b9, 0x76edd656, 0x7556e1bd, 0x4b3d2352, 0x3226ffb0, + 0x0c4d3d5f, 0x0ff60ab4, 0x319dc85b, 0xbcc6c3aa, 0x82ad0145, + 0x811636ae, 0xbf7df441, 0xc66628a3, 0xf80dea4c, 0xfbb6dda7, + 0xc5dd1f48, 0x7004e7d1, 0x4e6f253e, 0x4dd412d5, 0x73bfd03a, + 0x0aa40cd8, 0x34cfce37, 0x3774f9dc, 0x091f3b33, 0x844430c2, + 0xba2ff22d, 0xb994c5c6, 0x87ff0729, 0xfee4dbcb, 0xc08f1924, + 0xc3342ecf, 0xfd5fec20, 0x988549f6, 0xa6ee8b19, 0xa555bcf2, + 0x9b3e7e1d, 0xe225a2ff, 0xdc4e6010, 0xdff557fb, 0xe19e9514, + 0x6cc59ee5, 0x52ae5c0a, 0x51156be1, 0x6f7ea90e, 0x166575ec, + 0x280eb703, 0x2bb580e8, 0x15de4207, 0x010905e6, 0x3f62c709, + 0x3cd9f0e2, 0x02b2320d, 0x7ba9eeef, 0x45c22c00, 0x46791beb, + 0x7812d904, 0xf549d2f5, 0xcb22101a, 0xc89927f1, 0xf6f2e51e, + 0x8fe939fc, 0xb182fb13, 0xb239ccf8, 0x8c520e17, 0xe988abc1, + 0xd7e3692e, 0xd4585ec5, 0xea339c2a, 0x932840c8, 0xad438227, + 0xaef8b5cc, 0x90937723, 0x1dc87cd2, 0x23a3be3d, 0x201889d6, + 0x1e734b39, 0x676897db, 0x59035534, 0x5ab862df, 0x64d3a030, + 0xd10a58a9, 0xef619a46, 0xecdaadad, 0xd2b16f42, 0xabaab3a0, + 0x95c1714f, 0x967a46a4, 0xa811844b, 0x254a8fba, 0x1b214d55, + 0x189a7abe, 0x26f1b851, 0x5fea64b3, 0x6181a65c, 0x623a91b7, + 0x5c515358, 0x398bf68e, 0x07e03461, 0x045b038a, 0x3a30c165, + 0x432b1d87, 0x7d40df68, 0x7efbe883, 0x40902a6c, 0xcdcb219d, + 0xf3a0e372, 0xf01bd499, 0xce701676, 0xb76bca94, 0x8900087b, + 0x8abb3f90, 0xb4d0fd7f, 0xa10ebf78, 0x9f657d97, 0x9cde4a7c, + 0xa2b58893, 0xdbae5471, 0xe5c5969e, 0xe67ea175, 0xd815639a, + 0x554e686b, 0x6b25aa84, 0x689e9d6f, 0x56f55f80, 0x2fee8362, + 0x1185418d, 0x123e7666, 0x2c55b489, 0x498f115f, 0x77e4d3b0, + 0x745fe45b, 0x4a3426b4, 0x332ffa56, 0x0d4438b9, 0x0eff0f52, + 0x3094cdbd, 0xbdcfc64c, 0x83a404a3, 0x801f3348, 0xbe74f1a7, + 0xc76f2d45, 0xf904efaa, 0xfabfd841, 0xc4d41aae, 0x710de237, + 0x4f6620d8, 0x4cdd1733, 0x72b6d5dc, 0x0bad093e, 0x35c6cbd1, + 0x367dfc3a, 0x08163ed5, 0x854d3524, 0xbb26f7cb, 0xb89dc020, + 0x86f602cf, 0xffedde2d, 0xc1861cc2, 0xc23d2b29, 0xfc56e9c6, + 0x998c4c10, 0xa7e78eff, 0xa45cb914, 0x9a377bfb, 0xe32ca719, + 0xdd4765f6, 0xdefc521d, 0xe09790f2, 0x6dcc9b03, 0x53a759ec, + 0x501c6e07, 0x6e77ace8, 0x176c700a, 0x2907b2e5, 0x2abc850e, + 0x14d747e1}, + {0x00000000, 0xc0df8ec1, 0xc1b96c58, 0x0166e299, 0x8273d9b0, + 0x42ac5771, 0x43cab5e8, 0x83153b29, 0x45e1c3ba, 0x853e4d7b, + 0x8458afe2, 0x44872123, 0xc7921a0a, 0x074d94cb, 0x062b7652, + 0xc6f4f893, 0xcbc4f6ae, 0x0b1b786f, 0x0a7d9af6, 0xcaa21437, + 0x49b72f1e, 0x8968a1df, 0x880e4346, 0x48d1cd87, 0x8e253514, + 0x4efabbd5, 0x4f9c594c, 0x8f43d78d, 0x0c56eca4, 0xcc896265, + 0xcdef80fc, 0x0d300e3d, 0xd78f9c86, 0x17501247, 0x1636f0de, + 0xd6e97e1f, 0x55fc4536, 0x9523cbf7, 0x9445296e, 0x549aa7af, + 0x926e5f3c, 0x52b1d1fd, 0x53d73364, 0x9308bda5, 0x101d868c, + 0xd0c2084d, 0xd1a4ead4, 0x117b6415, 0x1c4b6a28, 0xdc94e4e9, + 0xddf20670, 0x1d2d88b1, 0x9e38b398, 0x5ee73d59, 0x5f81dfc0, + 0x9f5e5101, 0x59aaa992, 0x99752753, 0x9813c5ca, 0x58cc4b0b, + 0xdbd97022, 0x1b06fee3, 0x1a601c7a, 0xdabf92bb, 0xef1948d6, + 0x2fc6c617, 0x2ea0248e, 0xee7faa4f, 0x6d6a9166, 0xadb51fa7, + 0xacd3fd3e, 0x6c0c73ff, 0xaaf88b6c, 0x6a2705ad, 0x6b41e734, + 0xab9e69f5, 0x288b52dc, 0xe854dc1d, 0xe9323e84, 0x29edb045, + 0x24ddbe78, 0xe40230b9, 0xe564d220, 0x25bb5ce1, 0xa6ae67c8, + 0x6671e909, 0x67170b90, 0xa7c88551, 0x613c7dc2, 0xa1e3f303, + 0xa085119a, 0x605a9f5b, 0xe34fa472, 0x23902ab3, 0x22f6c82a, + 0xe22946eb, 0x3896d450, 0xf8495a91, 0xf92fb808, 0x39f036c9, + 0xbae50de0, 0x7a3a8321, 0x7b5c61b8, 0xbb83ef79, 0x7d7717ea, + 0xbda8992b, 0xbcce7bb2, 0x7c11f573, 0xff04ce5a, 0x3fdb409b, + 0x3ebda202, 0xfe622cc3, 0xf35222fe, 0x338dac3f, 0x32eb4ea6, + 0xf234c067, 0x7121fb4e, 0xb1fe758f, 0xb0989716, 0x704719d7, + 0xb6b3e144, 0x766c6f85, 0x770a8d1c, 0xb7d503dd, 0x34c038f4, + 0xf41fb635, 0xf57954ac, 0x35a6da6d, 0x9f35e177, 0x5fea6fb6, + 0x5e8c8d2f, 0x9e5303ee, 0x1d4638c7, 0xdd99b606, 0xdcff549f, + 0x1c20da5e, 0xdad422cd, 0x1a0bac0c, 0x1b6d4e95, 0xdbb2c054, + 0x58a7fb7d, 0x987875bc, 0x991e9725, 0x59c119e4, 0x54f117d9, + 0x942e9918, 0x95487b81, 0x5597f540, 0xd682ce69, 0x165d40a8, + 0x173ba231, 0xd7e42cf0, 0x1110d463, 0xd1cf5aa2, 0xd0a9b83b, + 0x107636fa, 0x93630dd3, 0x53bc8312, 0x52da618b, 0x9205ef4a, + 0x48ba7df1, 0x8865f330, 0x890311a9, 0x49dc9f68, 0xcac9a441, + 0x0a162a80, 0x0b70c819, 0xcbaf46d8, 0x0d5bbe4b, 0xcd84308a, + 0xcce2d213, 0x0c3d5cd2, 0x8f2867fb, 0x4ff7e93a, 0x4e910ba3, + 0x8e4e8562, 0x837e8b5f, 0x43a1059e, 0x42c7e707, 0x821869c6, + 0x010d52ef, 0xc1d2dc2e, 0xc0b43eb7, 0x006bb076, 0xc69f48e5, + 0x0640c624, 0x072624bd, 0xc7f9aa7c, 0x44ec9155, 0x84331f94, + 0x8555fd0d, 0x458a73cc, 0x702ca9a1, 0xb0f32760, 0xb195c5f9, + 0x714a4b38, 0xf25f7011, 0x3280fed0, 0x33e61c49, 0xf3399288, + 0x35cd6a1b, 0xf512e4da, 0xf4740643, 0x34ab8882, 0xb7beb3ab, + 0x77613d6a, 0x7607dff3, 0xb6d85132, 0xbbe85f0f, 0x7b37d1ce, + 0x7a513357, 0xba8ebd96, 0x399b86bf, 0xf944087e, 0xf822eae7, + 0x38fd6426, 0xfe099cb5, 0x3ed61274, 0x3fb0f0ed, 0xff6f7e2c, + 0x7c7a4505, 0xbca5cbc4, 0xbdc3295d, 0x7d1ca79c, 0xa7a33527, + 0x677cbbe6, 0x661a597f, 0xa6c5d7be, 0x25d0ec97, 0xe50f6256, + 0xe46980cf, 0x24b60e0e, 0xe242f69d, 0x229d785c, 0x23fb9ac5, + 0xe3241404, 0x60312f2d, 0xa0eea1ec, 0xa1884375, 0x6157cdb4, + 0x6c67c389, 0xacb84d48, 0xaddeafd1, 0x6d012110, 0xee141a39, + 0x2ecb94f8, 0x2fad7661, 0xef72f8a0, 0x29860033, 0xe9598ef2, + 0xe83f6c6b, 0x28e0e2aa, 0xabf5d983, 0x6b2a5742, 0x6a4cb5db, + 0xaa933b1a}, + {0x00000000, 0x6f4ca59b, 0x9f9e3bec, 0xf0d29e77, 0x7f3b0603, + 0x1077a398, 0xe0a53def, 0x8fe99874, 0xfe760c06, 0x913aa99d, + 0x61e837ea, 0x0ea49271, 0x814d0a05, 0xee01af9e, 0x1ed331e9, + 0x719f9472, 0xfced180c, 0x93a1bd97, 0x637323e0, 0x0c3f867b, + 0x83d61e0f, 0xec9abb94, 0x1c4825e3, 0x73048078, 0x029b140a, + 0x6dd7b191, 0x9d052fe6, 0xf2498a7d, 0x7da01209, 0x12ecb792, + 0xe23e29e5, 0x8d728c7e, 0xf8db3118, 0x97979483, 0x67450af4, + 0x0809af6f, 0x87e0371b, 0xe8ac9280, 0x187e0cf7, 0x7732a96c, + 0x06ad3d1e, 0x69e19885, 0x993306f2, 0xf67fa369, 0x79963b1d, + 0x16da9e86, 0xe60800f1, 0x8944a56a, 0x04362914, 0x6b7a8c8f, + 0x9ba812f8, 0xf4e4b763, 0x7b0d2f17, 0x14418a8c, 0xe49314fb, + 0x8bdfb160, 0xfa402512, 0x950c8089, 0x65de1efe, 0x0a92bb65, + 0x857b2311, 0xea37868a, 0x1ae518fd, 0x75a9bd66, 0xf0b76330, + 0x9ffbc6ab, 0x6f2958dc, 0x0065fd47, 0x8f8c6533, 0xe0c0c0a8, + 0x10125edf, 0x7f5efb44, 0x0ec16f36, 0x618dcaad, 0x915f54da, + 0xfe13f141, 0x71fa6935, 0x1eb6ccae, 0xee6452d9, 0x8128f742, + 0x0c5a7b3c, 0x6316dea7, 0x93c440d0, 0xfc88e54b, 0x73617d3f, + 0x1c2dd8a4, 0xecff46d3, 0x83b3e348, 0xf22c773a, 0x9d60d2a1, + 0x6db24cd6, 0x02fee94d, 0x8d177139, 0xe25bd4a2, 0x12894ad5, + 0x7dc5ef4e, 0x086c5228, 0x6720f7b3, 0x97f269c4, 0xf8becc5f, + 0x7757542b, 0x181bf1b0, 0xe8c96fc7, 0x8785ca5c, 0xf61a5e2e, + 0x9956fbb5, 0x698465c2, 0x06c8c059, 0x8921582d, 0xe66dfdb6, + 0x16bf63c1, 0x79f3c65a, 0xf4814a24, 0x9bcdefbf, 0x6b1f71c8, + 0x0453d453, 0x8bba4c27, 0xe4f6e9bc, 0x142477cb, 0x7b68d250, + 0x0af74622, 0x65bbe3b9, 0x95697dce, 0xfa25d855, 0x75cc4021, + 0x1a80e5ba, 0xea527bcd, 0x851ede56, 0xe06fc760, 0x8f2362fb, + 0x7ff1fc8c, 0x10bd5917, 0x9f54c163, 0xf01864f8, 0x00cafa8f, + 0x6f865f14, 0x1e19cb66, 0x71556efd, 0x8187f08a, 0xeecb5511, + 0x6122cd65, 0x0e6e68fe, 0xfebcf689, 0x91f05312, 0x1c82df6c, + 0x73ce7af7, 0x831ce480, 0xec50411b, 0x63b9d96f, 0x0cf57cf4, + 0xfc27e283, 0x936b4718, 0xe2f4d36a, 0x8db876f1, 0x7d6ae886, + 0x12264d1d, 0x9dcfd569, 0xf28370f2, 0x0251ee85, 0x6d1d4b1e, + 0x18b4f678, 0x77f853e3, 0x872acd94, 0xe866680f, 0x678ff07b, + 0x08c355e0, 0xf811cb97, 0x975d6e0c, 0xe6c2fa7e, 0x898e5fe5, + 0x795cc192, 0x16106409, 0x99f9fc7d, 0xf6b559e6, 0x0667c791, + 0x692b620a, 0xe459ee74, 0x8b154bef, 0x7bc7d598, 0x148b7003, + 0x9b62e877, 0xf42e4dec, 0x04fcd39b, 0x6bb07600, 0x1a2fe272, + 0x756347e9, 0x85b1d99e, 0xeafd7c05, 0x6514e471, 0x0a5841ea, + 0xfa8adf9d, 0x95c67a06, 0x10d8a450, 0x7f9401cb, 0x8f469fbc, + 0xe00a3a27, 0x6fe3a253, 0x00af07c8, 0xf07d99bf, 0x9f313c24, + 0xeeaea856, 0x81e20dcd, 0x713093ba, 0x1e7c3621, 0x9195ae55, + 0xfed90bce, 0x0e0b95b9, 0x61473022, 0xec35bc5c, 0x837919c7, + 0x73ab87b0, 0x1ce7222b, 0x930eba5f, 0xfc421fc4, 0x0c9081b3, + 0x63dc2428, 0x1243b05a, 0x7d0f15c1, 0x8ddd8bb6, 0xe2912e2d, + 0x6d78b659, 0x023413c2, 0xf2e68db5, 0x9daa282e, 0xe8039548, + 0x874f30d3, 0x779daea4, 0x18d10b3f, 0x9738934b, 0xf87436d0, + 0x08a6a8a7, 0x67ea0d3c, 0x1675994e, 0x79393cd5, 0x89eba2a2, + 0xe6a70739, 0x694e9f4d, 0x06023ad6, 0xf6d0a4a1, 0x999c013a, + 0x14ee8d44, 0x7ba228df, 0x8b70b6a8, 0xe43c1333, 0x6bd58b47, + 0x04992edc, 0xf44bb0ab, 0x9b071530, 0xea988142, 0x85d424d9, + 0x7506baae, 0x1a4a1f35, 0x95a38741, 0xfaef22da, 0x0a3dbcad, + 0x65711936}}; + +#endif + +#endif + +#if N == 4 + +#if W == 8 + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0xf1da05aa, 0x38c50d15, 0xc91f08bf, 0x718a1a2a, + 0x80501f80, 0x494f173f, 0xb8951295, 0xe3143454, 0x12ce31fe, + 0xdbd13941, 0x2a0b3ceb, 0x929e2e7e, 0x63442bd4, 0xaa5b236b, + 0x5b8126c1, 0x1d596ee9, 0xec836b43, 0x259c63fc, 0xd4466656, + 0x6cd374c3, 0x9d097169, 0x541679d6, 0xa5cc7c7c, 0xfe4d5abd, + 0x0f975f17, 0xc68857a8, 0x37525202, 0x8fc74097, 0x7e1d453d, + 0xb7024d82, 0x46d84828, 0x3ab2ddd2, 0xcb68d878, 0x0277d0c7, + 0xf3add56d, 0x4b38c7f8, 0xbae2c252, 0x73fdcaed, 0x8227cf47, + 0xd9a6e986, 0x287cec2c, 0xe163e493, 0x10b9e139, 0xa82cf3ac, + 0x59f6f606, 0x90e9feb9, 0x6133fb13, 0x27ebb33b, 0xd631b691, + 0x1f2ebe2e, 0xeef4bb84, 0x5661a911, 0xa7bbacbb, 0x6ea4a404, + 0x9f7ea1ae, 0xc4ff876f, 0x352582c5, 0xfc3a8a7a, 0x0de08fd0, + 0xb5759d45, 0x44af98ef, 0x8db09050, 0x7c6a95fa, 0x7565bba4, + 0x84bfbe0e, 0x4da0b6b1, 0xbc7ab31b, 0x04efa18e, 0xf535a424, + 0x3c2aac9b, 0xcdf0a931, 0x96718ff0, 0x67ab8a5a, 0xaeb482e5, + 0x5f6e874f, 0xe7fb95da, 0x16219070, 0xdf3e98cf, 0x2ee49d65, + 0x683cd54d, 0x99e6d0e7, 0x50f9d858, 0xa123ddf2, 0x19b6cf67, + 0xe86ccacd, 0x2173c272, 0xd0a9c7d8, 0x8b28e119, 0x7af2e4b3, + 0xb3edec0c, 0x4237e9a6, 0xfaa2fb33, 0x0b78fe99, 0xc267f626, + 0x33bdf38c, 0x4fd76676, 0xbe0d63dc, 0x77126b63, 0x86c86ec9, + 0x3e5d7c5c, 0xcf8779f6, 0x06987149, 0xf74274e3, 0xacc35222, + 0x5d195788, 0x94065f37, 0x65dc5a9d, 0xdd494808, 0x2c934da2, + 0xe58c451d, 0x145640b7, 0x528e089f, 0xa3540d35, 0x6a4b058a, + 0x9b910020, 0x230412b5, 0xd2de171f, 0x1bc11fa0, 0xea1b1a0a, + 0xb19a3ccb, 0x40403961, 0x895f31de, 0x78853474, 0xc01026e1, + 0x31ca234b, 0xf8d52bf4, 0x090f2e5e, 0xeacb7748, 0x1b1172e2, + 0xd20e7a5d, 0x23d47ff7, 0x9b416d62, 0x6a9b68c8, 0xa3846077, + 0x525e65dd, 0x09df431c, 0xf80546b6, 0x311a4e09, 0xc0c04ba3, + 0x78555936, 0x898f5c9c, 0x40905423, 0xb14a5189, 0xf79219a1, + 0x06481c0b, 0xcf5714b4, 0x3e8d111e, 0x8618038b, 0x77c20621, + 0xbedd0e9e, 0x4f070b34, 0x14862df5, 0xe55c285f, 0x2c4320e0, + 0xdd99254a, 0x650c37df, 0x94d63275, 0x5dc93aca, 0xac133f60, + 0xd079aa9a, 0x21a3af30, 0xe8bca78f, 0x1966a225, 0xa1f3b0b0, + 0x5029b51a, 0x9936bda5, 0x68ecb80f, 0x336d9ece, 0xc2b79b64, + 0x0ba893db, 0xfa729671, 0x42e784e4, 0xb33d814e, 0x7a2289f1, + 0x8bf88c5b, 0xcd20c473, 0x3cfac1d9, 0xf5e5c966, 0x043fcccc, + 0xbcaade59, 0x4d70dbf3, 0x846fd34c, 0x75b5d6e6, 0x2e34f027, + 0xdfeef58d, 0x16f1fd32, 0xe72bf898, 0x5fbeea0d, 0xae64efa7, + 0x677be718, 0x96a1e2b2, 0x9faeccec, 0x6e74c946, 0xa76bc1f9, + 0x56b1c453, 0xee24d6c6, 0x1ffed36c, 0xd6e1dbd3, 0x273bde79, + 0x7cbaf8b8, 0x8d60fd12, 0x447ff5ad, 0xb5a5f007, 0x0d30e292, + 0xfceae738, 0x35f5ef87, 0xc42fea2d, 0x82f7a205, 0x732da7af, + 0xba32af10, 0x4be8aaba, 0xf37db82f, 0x02a7bd85, 0xcbb8b53a, + 0x3a62b090, 0x61e39651, 0x903993fb, 0x59269b44, 0xa8fc9eee, + 0x10698c7b, 0xe1b389d1, 0x28ac816e, 0xd97684c4, 0xa51c113e, + 0x54c61494, 0x9dd91c2b, 0x6c031981, 0xd4960b14, 0x254c0ebe, + 0xec530601, 0x1d8903ab, 0x4608256a, 0xb7d220c0, 0x7ecd287f, + 0x8f172dd5, 0x37823f40, 0xc6583aea, 0x0f473255, 0xfe9d37ff, + 0xb8457fd7, 0x499f7a7d, 0x808072c2, 0x715a7768, 0xc9cf65fd, + 0x38156057, 0xf10a68e8, 0x00d06d42, 0x5b514b83, 0xaa8b4e29, + 0x63944696, 0x924e433c, 0x2adb51a9, 0xdb015403, 0x121e5cbc, + 0xe3c45916}, + {0x00000000, 0x0ee7e8d1, 0x1dcfd1a2, 0x13283973, 0x3b9fa344, + 0x35784b95, 0x265072e6, 0x28b79a37, 0x773f4688, 0x79d8ae59, + 0x6af0972a, 0x64177ffb, 0x4ca0e5cc, 0x42470d1d, 0x516f346e, + 0x5f88dcbf, 0xee7e8d10, 0xe09965c1, 0xf3b15cb2, 0xfd56b463, + 0xd5e12e54, 0xdb06c685, 0xc82efff6, 0xc6c91727, 0x9941cb98, + 0x97a62349, 0x848e1a3a, 0x8a69f2eb, 0xa2de68dc, 0xac39800d, + 0xbf11b97e, 0xb1f651af, 0x078c1c61, 0x096bf4b0, 0x1a43cdc3, + 0x14a42512, 0x3c13bf25, 0x32f457f4, 0x21dc6e87, 0x2f3b8656, + 0x70b35ae9, 0x7e54b238, 0x6d7c8b4b, 0x639b639a, 0x4b2cf9ad, + 0x45cb117c, 0x56e3280f, 0x5804c0de, 0xe9f29171, 0xe71579a0, + 0xf43d40d3, 0xfadaa802, 0xd26d3235, 0xdc8adae4, 0xcfa2e397, + 0xc1450b46, 0x9ecdd7f9, 0x902a3f28, 0x8302065b, 0x8de5ee8a, + 0xa55274bd, 0xabb59c6c, 0xb89da51f, 0xb67a4dce, 0x0f1838c2, + 0x01ffd013, 0x12d7e960, 0x1c3001b1, 0x34879b86, 0x3a607357, + 0x29484a24, 0x27afa2f5, 0x78277e4a, 0x76c0969b, 0x65e8afe8, + 0x6b0f4739, 0x43b8dd0e, 0x4d5f35df, 0x5e770cac, 0x5090e47d, + 0xe166b5d2, 0xef815d03, 0xfca96470, 0xf24e8ca1, 0xdaf91696, + 0xd41efe47, 0xc736c734, 0xc9d12fe5, 0x9659f35a, 0x98be1b8b, + 0x8b9622f8, 0x8571ca29, 0xadc6501e, 0xa321b8cf, 0xb00981bc, + 0xbeee696d, 0x089424a3, 0x0673cc72, 0x155bf501, 0x1bbc1dd0, + 0x330b87e7, 0x3dec6f36, 0x2ec45645, 0x2023be94, 0x7fab622b, + 0x714c8afa, 0x6264b389, 0x6c835b58, 0x4434c16f, 0x4ad329be, + 0x59fb10cd, 0x571cf81c, 0xe6eaa9b3, 0xe80d4162, 0xfb257811, + 0xf5c290c0, 0xdd750af7, 0xd392e226, 0xc0badb55, 0xce5d3384, + 0x91d5ef3b, 0x9f3207ea, 0x8c1a3e99, 0x82fdd648, 0xaa4a4c7f, + 0xa4ada4ae, 0xb7859ddd, 0xb962750c, 0x1e307184, 0x10d79955, + 0x03ffa026, 0x0d1848f7, 0x25afd2c0, 0x2b483a11, 0x38600362, + 0x3687ebb3, 0x690f370c, 0x67e8dfdd, 0x74c0e6ae, 0x7a270e7f, + 0x52909448, 0x5c777c99, 0x4f5f45ea, 0x41b8ad3b, 0xf04efc94, + 0xfea91445, 0xed812d36, 0xe366c5e7, 0xcbd15fd0, 0xc536b701, + 0xd61e8e72, 0xd8f966a3, 0x8771ba1c, 0x899652cd, 0x9abe6bbe, + 0x9459836f, 0xbcee1958, 0xb209f189, 0xa121c8fa, 0xafc6202b, + 0x19bc6de5, 0x175b8534, 0x0473bc47, 0x0a945496, 0x2223cea1, + 0x2cc42670, 0x3fec1f03, 0x310bf7d2, 0x6e832b6d, 0x6064c3bc, + 0x734cfacf, 0x7dab121e, 0x551c8829, 0x5bfb60f8, 0x48d3598b, + 0x4634b15a, 0xf7c2e0f5, 0xf9250824, 0xea0d3157, 0xe4ead986, + 0xcc5d43b1, 0xc2baab60, 0xd1929213, 0xdf757ac2, 0x80fda67d, + 0x8e1a4eac, 0x9d3277df, 0x93d59f0e, 0xbb620539, 0xb585ede8, + 0xa6add49b, 0xa84a3c4a, 0x11284946, 0x1fcfa197, 0x0ce798e4, + 0x02007035, 0x2ab7ea02, 0x245002d3, 0x37783ba0, 0x399fd371, + 0x66170fce, 0x68f0e71f, 0x7bd8de6c, 0x753f36bd, 0x5d88ac8a, + 0x536f445b, 0x40477d28, 0x4ea095f9, 0xff56c456, 0xf1b12c87, + 0xe29915f4, 0xec7efd25, 0xc4c96712, 0xca2e8fc3, 0xd906b6b0, + 0xd7e15e61, 0x886982de, 0x868e6a0f, 0x95a6537c, 0x9b41bbad, + 0xb3f6219a, 0xbd11c94b, 0xae39f038, 0xa0de18e9, 0x16a45527, + 0x1843bdf6, 0x0b6b8485, 0x058c6c54, 0x2d3bf663, 0x23dc1eb2, + 0x30f427c1, 0x3e13cf10, 0x619b13af, 0x6f7cfb7e, 0x7c54c20d, + 0x72b32adc, 0x5a04b0eb, 0x54e3583a, 0x47cb6149, 0x492c8998, + 0xf8dad837, 0xf63d30e6, 0xe5150995, 0xebf2e144, 0xc3457b73, + 0xcda293a2, 0xde8aaad1, 0xd06d4200, 0x8fe59ebf, 0x8102766e, + 0x922a4f1d, 0x9ccda7cc, 0xb47a3dfb, 0xba9dd52a, 0xa9b5ec59, + 0xa7520488}, + {0x00000000, 0x3c60e308, 0x78c1c610, 0x44a12518, 0xf1838c20, + 0xcde36f28, 0x89424a30, 0xb522a938, 0x38761e01, 0x0416fd09, + 0x40b7d811, 0x7cd73b19, 0xc9f59221, 0xf5957129, 0xb1345431, + 0x8d54b739, 0x70ec3c02, 0x4c8cdf0a, 0x082dfa12, 0x344d191a, + 0x816fb022, 0xbd0f532a, 0xf9ae7632, 0xc5ce953a, 0x489a2203, + 0x74fac10b, 0x305be413, 0x0c3b071b, 0xb919ae23, 0x85794d2b, + 0xc1d86833, 0xfdb88b3b, 0xe1d87804, 0xddb89b0c, 0x9919be14, + 0xa5795d1c, 0x105bf424, 0x2c3b172c, 0x689a3234, 0x54fad13c, + 0xd9ae6605, 0xe5ce850d, 0xa16fa015, 0x9d0f431d, 0x282dea25, + 0x144d092d, 0x50ec2c35, 0x6c8ccf3d, 0x91344406, 0xad54a70e, + 0xe9f58216, 0xd595611e, 0x60b7c826, 0x5cd72b2e, 0x18760e36, + 0x2416ed3e, 0xa9425a07, 0x9522b90f, 0xd1839c17, 0xede37f1f, + 0x58c1d627, 0x64a1352f, 0x20001037, 0x1c60f33f, 0x18c1f649, + 0x24a11541, 0x60003059, 0x5c60d351, 0xe9427a69, 0xd5229961, + 0x9183bc79, 0xade35f71, 0x20b7e848, 0x1cd70b40, 0x58762e58, + 0x6416cd50, 0xd1346468, 0xed548760, 0xa9f5a278, 0x95954170, + 0x682dca4b, 0x544d2943, 0x10ec0c5b, 0x2c8cef53, 0x99ae466b, + 0xa5cea563, 0xe16f807b, 0xdd0f6373, 0x505bd44a, 0x6c3b3742, + 0x289a125a, 0x14faf152, 0xa1d8586a, 0x9db8bb62, 0xd9199e7a, + 0xe5797d72, 0xf9198e4d, 0xc5796d45, 0x81d8485d, 0xbdb8ab55, + 0x089a026d, 0x34fae165, 0x705bc47d, 0x4c3b2775, 0xc16f904c, + 0xfd0f7344, 0xb9ae565c, 0x85ceb554, 0x30ec1c6c, 0x0c8cff64, + 0x482dda7c, 0x744d3974, 0x89f5b24f, 0xb5955147, 0xf134745f, + 0xcd549757, 0x78763e6f, 0x4416dd67, 0x00b7f87f, 0x3cd71b77, + 0xb183ac4e, 0x8de34f46, 0xc9426a5e, 0xf5228956, 0x4000206e, + 0x7c60c366, 0x38c1e67e, 0x04a10576, 0x3183ec92, 0x0de30f9a, + 0x49422a82, 0x7522c98a, 0xc00060b2, 0xfc6083ba, 0xb8c1a6a2, + 0x84a145aa, 0x09f5f293, 0x3595119b, 0x71343483, 0x4d54d78b, + 0xf8767eb3, 0xc4169dbb, 0x80b7b8a3, 0xbcd75bab, 0x416fd090, + 0x7d0f3398, 0x39ae1680, 0x05cef588, 0xb0ec5cb0, 0x8c8cbfb8, + 0xc82d9aa0, 0xf44d79a8, 0x7919ce91, 0x45792d99, 0x01d80881, + 0x3db8eb89, 0x889a42b1, 0xb4faa1b9, 0xf05b84a1, 0xcc3b67a9, + 0xd05b9496, 0xec3b779e, 0xa89a5286, 0x94fab18e, 0x21d818b6, + 0x1db8fbbe, 0x5919dea6, 0x65793dae, 0xe82d8a97, 0xd44d699f, + 0x90ec4c87, 0xac8caf8f, 0x19ae06b7, 0x25cee5bf, 0x616fc0a7, + 0x5d0f23af, 0xa0b7a894, 0x9cd74b9c, 0xd8766e84, 0xe4168d8c, + 0x513424b4, 0x6d54c7bc, 0x29f5e2a4, 0x159501ac, 0x98c1b695, + 0xa4a1559d, 0xe0007085, 0xdc60938d, 0x69423ab5, 0x5522d9bd, + 0x1183fca5, 0x2de31fad, 0x29421adb, 0x1522f9d3, 0x5183dccb, + 0x6de33fc3, 0xd8c196fb, 0xe4a175f3, 0xa00050eb, 0x9c60b3e3, + 0x113404da, 0x2d54e7d2, 0x69f5c2ca, 0x559521c2, 0xe0b788fa, + 0xdcd76bf2, 0x98764eea, 0xa416ade2, 0x59ae26d9, 0x65cec5d1, + 0x216fe0c9, 0x1d0f03c1, 0xa82daaf9, 0x944d49f1, 0xd0ec6ce9, + 0xec8c8fe1, 0x61d838d8, 0x5db8dbd0, 0x1919fec8, 0x25791dc0, + 0x905bb4f8, 0xac3b57f0, 0xe89a72e8, 0xd4fa91e0, 0xc89a62df, + 0xf4fa81d7, 0xb05ba4cf, 0x8c3b47c7, 0x3919eeff, 0x05790df7, + 0x41d828ef, 0x7db8cbe7, 0xf0ec7cde, 0xcc8c9fd6, 0x882dbace, + 0xb44d59c6, 0x016ff0fe, 0x3d0f13f6, 0x79ae36ee, 0x45ced5e6, + 0xb8765edd, 0x8416bdd5, 0xc0b798cd, 0xfcd77bc5, 0x49f5d2fd, + 0x759531f5, 0x313414ed, 0x0d54f7e5, 0x800040dc, 0xbc60a3d4, + 0xf8c186cc, 0xc4a165c4, 0x7183ccfc, 0x4de32ff4, 0x09420aec, + 0x3522e9e4}, + {0x00000000, 0x6307d924, 0xc60fb248, 0xa5086b6c, 0x576e62d1, + 0x3469bbf5, 0x9161d099, 0xf26609bd, 0xaedcc5a2, 0xcddb1c86, + 0x68d377ea, 0x0bd4aece, 0xf9b2a773, 0x9ab57e57, 0x3fbd153b, + 0x5cbacc1f, 0x86c88d05, 0xe5cf5421, 0x40c73f4d, 0x23c0e669, + 0xd1a6efd4, 0xb2a136f0, 0x17a95d9c, 0x74ae84b8, 0x281448a7, + 0x4b139183, 0xee1bfaef, 0x8d1c23cb, 0x7f7a2a76, 0x1c7df352, + 0xb975983e, 0xda72411a, 0xd6e01c4b, 0xb5e7c56f, 0x10efae03, + 0x73e87727, 0x818e7e9a, 0xe289a7be, 0x4781ccd2, 0x248615f6, + 0x783cd9e9, 0x1b3b00cd, 0xbe336ba1, 0xdd34b285, 0x2f52bb38, + 0x4c55621c, 0xe95d0970, 0x8a5ad054, 0x5028914e, 0x332f486a, + 0x96272306, 0xf520fa22, 0x0746f39f, 0x64412abb, 0xc14941d7, + 0xa24e98f3, 0xfef454ec, 0x9df38dc8, 0x38fbe6a4, 0x5bfc3f80, + 0xa99a363d, 0xca9def19, 0x6f958475, 0x0c925d51, 0x76b13ed7, + 0x15b6e7f3, 0xb0be8c9f, 0xd3b955bb, 0x21df5c06, 0x42d88522, + 0xe7d0ee4e, 0x84d7376a, 0xd86dfb75, 0xbb6a2251, 0x1e62493d, + 0x7d659019, 0x8f0399a4, 0xec044080, 0x490c2bec, 0x2a0bf2c8, + 0xf079b3d2, 0x937e6af6, 0x3676019a, 0x5571d8be, 0xa717d103, + 0xc4100827, 0x6118634b, 0x021fba6f, 0x5ea57670, 0x3da2af54, + 0x98aac438, 0xfbad1d1c, 0x09cb14a1, 0x6acccd85, 0xcfc4a6e9, + 0xacc37fcd, 0xa051229c, 0xc356fbb8, 0x665e90d4, 0x055949f0, + 0xf73f404d, 0x94389969, 0x3130f205, 0x52372b21, 0x0e8de73e, + 0x6d8a3e1a, 0xc8825576, 0xab858c52, 0x59e385ef, 0x3ae45ccb, + 0x9fec37a7, 0xfcebee83, 0x2699af99, 0x459e76bd, 0xe0961dd1, + 0x8391c4f5, 0x71f7cd48, 0x12f0146c, 0xb7f87f00, 0xd4ffa624, + 0x88456a3b, 0xeb42b31f, 0x4e4ad873, 0x2d4d0157, 0xdf2b08ea, + 0xbc2cd1ce, 0x1924baa2, 0x7a236386, 0xed627dae, 0x8e65a48a, + 0x2b6dcfe6, 0x486a16c2, 0xba0c1f7f, 0xd90bc65b, 0x7c03ad37, + 0x1f047413, 0x43beb80c, 0x20b96128, 0x85b10a44, 0xe6b6d360, + 0x14d0dadd, 0x77d703f9, 0xd2df6895, 0xb1d8b1b1, 0x6baaf0ab, + 0x08ad298f, 0xada542e3, 0xcea29bc7, 0x3cc4927a, 0x5fc34b5e, + 0xfacb2032, 0x99ccf916, 0xc5763509, 0xa671ec2d, 0x03798741, + 0x607e5e65, 0x921857d8, 0xf11f8efc, 0x5417e590, 0x37103cb4, + 0x3b8261e5, 0x5885b8c1, 0xfd8dd3ad, 0x9e8a0a89, 0x6cec0334, + 0x0febda10, 0xaae3b17c, 0xc9e46858, 0x955ea447, 0xf6597d63, + 0x5351160f, 0x3056cf2b, 0xc230c696, 0xa1371fb2, 0x043f74de, + 0x6738adfa, 0xbd4aece0, 0xde4d35c4, 0x7b455ea8, 0x1842878c, + 0xea248e31, 0x89235715, 0x2c2b3c79, 0x4f2ce55d, 0x13962942, + 0x7091f066, 0xd5999b0a, 0xb69e422e, 0x44f84b93, 0x27ff92b7, + 0x82f7f9db, 0xe1f020ff, 0x9bd34379, 0xf8d49a5d, 0x5ddcf131, + 0x3edb2815, 0xccbd21a8, 0xafbaf88c, 0x0ab293e0, 0x69b54ac4, + 0x350f86db, 0x56085fff, 0xf3003493, 0x9007edb7, 0x6261e40a, + 0x01663d2e, 0xa46e5642, 0xc7698f66, 0x1d1bce7c, 0x7e1c1758, + 0xdb147c34, 0xb813a510, 0x4a75acad, 0x29727589, 0x8c7a1ee5, + 0xef7dc7c1, 0xb3c70bde, 0xd0c0d2fa, 0x75c8b996, 0x16cf60b2, + 0xe4a9690f, 0x87aeb02b, 0x22a6db47, 0x41a10263, 0x4d335f32, + 0x2e348616, 0x8b3ced7a, 0xe83b345e, 0x1a5d3de3, 0x795ae4c7, + 0xdc528fab, 0xbf55568f, 0xe3ef9a90, 0x80e843b4, 0x25e028d8, + 0x46e7f1fc, 0xb481f841, 0xd7862165, 0x728e4a09, 0x1189932d, + 0xcbfbd237, 0xa8fc0b13, 0x0df4607f, 0x6ef3b95b, 0x9c95b0e6, + 0xff9269c2, 0x5a9a02ae, 0x399ddb8a, 0x65271795, 0x0620ceb1, + 0xa328a5dd, 0xc02f7cf9, 0x32497544, 0x514eac60, 0xf446c70c, + 0x97411e28}, + {0x00000000, 0x01b5fd1d, 0x036bfa3a, 0x02de0727, 0x06d7f474, + 0x07620969, 0x05bc0e4e, 0x0409f353, 0x0dafe8e8, 0x0c1a15f5, + 0x0ec412d2, 0x0f71efcf, 0x0b781c9c, 0x0acde181, 0x0813e6a6, + 0x09a61bbb, 0x1b5fd1d0, 0x1aea2ccd, 0x18342bea, 0x1981d6f7, + 0x1d8825a4, 0x1c3dd8b9, 0x1ee3df9e, 0x1f562283, 0x16f03938, + 0x1745c425, 0x159bc302, 0x142e3e1f, 0x1027cd4c, 0x11923051, + 0x134c3776, 0x12f9ca6b, 0x36bfa3a0, 0x370a5ebd, 0x35d4599a, + 0x3461a487, 0x306857d4, 0x31ddaac9, 0x3303adee, 0x32b650f3, + 0x3b104b48, 0x3aa5b655, 0x387bb172, 0x39ce4c6f, 0x3dc7bf3c, + 0x3c724221, 0x3eac4506, 0x3f19b81b, 0x2de07270, 0x2c558f6d, + 0x2e8b884a, 0x2f3e7557, 0x2b378604, 0x2a827b19, 0x285c7c3e, + 0x29e98123, 0x204f9a98, 0x21fa6785, 0x232460a2, 0x22919dbf, + 0x26986eec, 0x272d93f1, 0x25f394d6, 0x244669cb, 0x6d7f4740, + 0x6ccaba5d, 0x6e14bd7a, 0x6fa14067, 0x6ba8b334, 0x6a1d4e29, + 0x68c3490e, 0x6976b413, 0x60d0afa8, 0x616552b5, 0x63bb5592, + 0x620ea88f, 0x66075bdc, 0x67b2a6c1, 0x656ca1e6, 0x64d95cfb, + 0x76209690, 0x77956b8d, 0x754b6caa, 0x74fe91b7, 0x70f762e4, + 0x71429ff9, 0x739c98de, 0x722965c3, 0x7b8f7e78, 0x7a3a8365, + 0x78e48442, 0x7951795f, 0x7d588a0c, 0x7ced7711, 0x7e337036, + 0x7f868d2b, 0x5bc0e4e0, 0x5a7519fd, 0x58ab1eda, 0x591ee3c7, + 0x5d171094, 0x5ca2ed89, 0x5e7ceaae, 0x5fc917b3, 0x566f0c08, + 0x57daf115, 0x5504f632, 0x54b10b2f, 0x50b8f87c, 0x510d0561, + 0x53d30246, 0x5266ff5b, 0x409f3530, 0x412ac82d, 0x43f4cf0a, + 0x42413217, 0x4648c144, 0x47fd3c59, 0x45233b7e, 0x4496c663, + 0x4d30ddd8, 0x4c8520c5, 0x4e5b27e2, 0x4feedaff, 0x4be729ac, + 0x4a52d4b1, 0x488cd396, 0x49392e8b, 0xdafe8e80, 0xdb4b739d, + 0xd99574ba, 0xd82089a7, 0xdc297af4, 0xdd9c87e9, 0xdf4280ce, + 0xdef77dd3, 0xd7516668, 0xd6e49b75, 0xd43a9c52, 0xd58f614f, + 0xd186921c, 0xd0336f01, 0xd2ed6826, 0xd358953b, 0xc1a15f50, + 0xc014a24d, 0xc2caa56a, 0xc37f5877, 0xc776ab24, 0xc6c35639, + 0xc41d511e, 0xc5a8ac03, 0xcc0eb7b8, 0xcdbb4aa5, 0xcf654d82, + 0xced0b09f, 0xcad943cc, 0xcb6cbed1, 0xc9b2b9f6, 0xc80744eb, + 0xec412d20, 0xedf4d03d, 0xef2ad71a, 0xee9f2a07, 0xea96d954, + 0xeb232449, 0xe9fd236e, 0xe848de73, 0xe1eec5c8, 0xe05b38d5, + 0xe2853ff2, 0xe330c2ef, 0xe73931bc, 0xe68ccca1, 0xe452cb86, + 0xe5e7369b, 0xf71efcf0, 0xf6ab01ed, 0xf47506ca, 0xf5c0fbd7, + 0xf1c90884, 0xf07cf599, 0xf2a2f2be, 0xf3170fa3, 0xfab11418, + 0xfb04e905, 0xf9daee22, 0xf86f133f, 0xfc66e06c, 0xfdd31d71, + 0xff0d1a56, 0xfeb8e74b, 0xb781c9c0, 0xb63434dd, 0xb4ea33fa, + 0xb55fcee7, 0xb1563db4, 0xb0e3c0a9, 0xb23dc78e, 0xb3883a93, + 0xba2e2128, 0xbb9bdc35, 0xb945db12, 0xb8f0260f, 0xbcf9d55c, + 0xbd4c2841, 0xbf922f66, 0xbe27d27b, 0xacde1810, 0xad6be50d, + 0xafb5e22a, 0xae001f37, 0xaa09ec64, 0xabbc1179, 0xa962165e, + 0xa8d7eb43, 0xa171f0f8, 0xa0c40de5, 0xa21a0ac2, 0xa3aff7df, + 0xa7a6048c, 0xa613f991, 0xa4cdfeb6, 0xa57803ab, 0x813e6a60, + 0x808b977d, 0x8255905a, 0x83e06d47, 0x87e99e14, 0x865c6309, + 0x8482642e, 0x85379933, 0x8c918288, 0x8d247f95, 0x8ffa78b2, + 0x8e4f85af, 0x8a4676fc, 0x8bf38be1, 0x892d8cc6, 0x889871db, + 0x9a61bbb0, 0x9bd446ad, 0x990a418a, 0x98bfbc97, 0x9cb64fc4, + 0x9d03b2d9, 0x9fddb5fe, 0x9e6848e3, 0x97ce5358, 0x967bae45, + 0x94a5a962, 0x9510547f, 0x9119a72c, 0x90ac5a31, 0x92725d16, + 0x93c7a00b}, + {0x00000000, 0x6e8c1b41, 0xdd183682, 0xb3942dc3, 0x61416b45, + 0x0fcd7004, 0xbc595dc7, 0xd2d54686, 0xc282d68a, 0xac0ecdcb, + 0x1f9ae008, 0x7116fb49, 0xa3c3bdcf, 0xcd4fa68e, 0x7edb8b4d, + 0x1057900c, 0x5e74ab55, 0x30f8b014, 0x836c9dd7, 0xede08696, + 0x3f35c010, 0x51b9db51, 0xe22df692, 0x8ca1edd3, 0x9cf67ddf, + 0xf27a669e, 0x41ee4b5d, 0x2f62501c, 0xfdb7169a, 0x933b0ddb, + 0x20af2018, 0x4e233b59, 0xbce956aa, 0xd2654deb, 0x61f16028, + 0x0f7d7b69, 0xdda83def, 0xb32426ae, 0x00b00b6d, 0x6e3c102c, + 0x7e6b8020, 0x10e79b61, 0xa373b6a2, 0xcdffade3, 0x1f2aeb65, + 0x71a6f024, 0xc232dde7, 0xacbec6a6, 0xe29dfdff, 0x8c11e6be, + 0x3f85cb7d, 0x5109d03c, 0x83dc96ba, 0xed508dfb, 0x5ec4a038, + 0x3048bb79, 0x201f2b75, 0x4e933034, 0xfd071df7, 0x938b06b6, + 0x415e4030, 0x2fd25b71, 0x9c4676b2, 0xf2ca6df3, 0xa2a3ab15, + 0xcc2fb054, 0x7fbb9d97, 0x113786d6, 0xc3e2c050, 0xad6edb11, + 0x1efaf6d2, 0x7076ed93, 0x60217d9f, 0x0ead66de, 0xbd394b1d, + 0xd3b5505c, 0x016016da, 0x6fec0d9b, 0xdc782058, 0xb2f43b19, + 0xfcd70040, 0x925b1b01, 0x21cf36c2, 0x4f432d83, 0x9d966b05, + 0xf31a7044, 0x408e5d87, 0x2e0246c6, 0x3e55d6ca, 0x50d9cd8b, + 0xe34de048, 0x8dc1fb09, 0x5f14bd8f, 0x3198a6ce, 0x820c8b0d, + 0xec80904c, 0x1e4afdbf, 0x70c6e6fe, 0xc352cb3d, 0xadded07c, + 0x7f0b96fa, 0x11878dbb, 0xa213a078, 0xcc9fbb39, 0xdcc82b35, + 0xb2443074, 0x01d01db7, 0x6f5c06f6, 0xbd894070, 0xd3055b31, + 0x609176f2, 0x0e1d6db3, 0x403e56ea, 0x2eb24dab, 0x9d266068, + 0xf3aa7b29, 0x217f3daf, 0x4ff326ee, 0xfc670b2d, 0x92eb106c, + 0x82bc8060, 0xec309b21, 0x5fa4b6e2, 0x3128ada3, 0xe3fdeb25, + 0x8d71f064, 0x3ee5dda7, 0x5069c6e6, 0x9e36506b, 0xf0ba4b2a, + 0x432e66e9, 0x2da27da8, 0xff773b2e, 0x91fb206f, 0x226f0dac, + 0x4ce316ed, 0x5cb486e1, 0x32389da0, 0x81acb063, 0xef20ab22, + 0x3df5eda4, 0x5379f6e5, 0xe0eddb26, 0x8e61c067, 0xc042fb3e, + 0xaecee07f, 0x1d5acdbc, 0x73d6d6fd, 0xa103907b, 0xcf8f8b3a, + 0x7c1ba6f9, 0x1297bdb8, 0x02c02db4, 0x6c4c36f5, 0xdfd81b36, + 0xb1540077, 0x638146f1, 0x0d0d5db0, 0xbe997073, 0xd0156b32, + 0x22df06c1, 0x4c531d80, 0xffc73043, 0x914b2b02, 0x439e6d84, + 0x2d1276c5, 0x9e865b06, 0xf00a4047, 0xe05dd04b, 0x8ed1cb0a, + 0x3d45e6c9, 0x53c9fd88, 0x811cbb0e, 0xef90a04f, 0x5c048d8c, + 0x328896cd, 0x7cabad94, 0x1227b6d5, 0xa1b39b16, 0xcf3f8057, + 0x1deac6d1, 0x7366dd90, 0xc0f2f053, 0xae7eeb12, 0xbe297b1e, + 0xd0a5605f, 0x63314d9c, 0x0dbd56dd, 0xdf68105b, 0xb1e40b1a, + 0x027026d9, 0x6cfc3d98, 0x3c95fb7e, 0x5219e03f, 0xe18dcdfc, + 0x8f01d6bd, 0x5dd4903b, 0x33588b7a, 0x80cca6b9, 0xee40bdf8, + 0xfe172df4, 0x909b36b5, 0x230f1b76, 0x4d830037, 0x9f5646b1, + 0xf1da5df0, 0x424e7033, 0x2cc26b72, 0x62e1502b, 0x0c6d4b6a, + 0xbff966a9, 0xd1757de8, 0x03a03b6e, 0x6d2c202f, 0xdeb80dec, + 0xb03416ad, 0xa06386a1, 0xceef9de0, 0x7d7bb023, 0x13f7ab62, + 0xc122ede4, 0xafaef6a5, 0x1c3adb66, 0x72b6c027, 0x807cadd4, + 0xeef0b695, 0x5d649b56, 0x33e88017, 0xe13dc691, 0x8fb1ddd0, + 0x3c25f013, 0x52a9eb52, 0x42fe7b5e, 0x2c72601f, 0x9fe64ddc, + 0xf16a569d, 0x23bf101b, 0x4d330b5a, 0xfea72699, 0x902b3dd8, + 0xde080681, 0xb0841dc0, 0x03103003, 0x6d9c2b42, 0xbf496dc4, + 0xd1c57685, 0x62515b46, 0x0cdd4007, 0x1c8ad00b, 0x7206cb4a, + 0xc192e689, 0xaf1efdc8, 0x7dcbbb4e, 0x1347a00f, 0xa0d38dcc, + 0xce5f968d}, + {0x00000000, 0xe71da697, 0x154a4b6f, 0xf257edf8, 0x2a9496de, + 0xcd893049, 0x3fdeddb1, 0xd8c37b26, 0x55292dbc, 0xb2348b2b, + 0x406366d3, 0xa77ec044, 0x7fbdbb62, 0x98a01df5, 0x6af7f00d, + 0x8dea569a, 0xaa525b78, 0x4d4ffdef, 0xbf181017, 0x5805b680, + 0x80c6cda6, 0x67db6b31, 0x958c86c9, 0x7291205e, 0xff7b76c4, + 0x1866d053, 0xea313dab, 0x0d2c9b3c, 0xd5efe01a, 0x32f2468d, + 0xc0a5ab75, 0x27b80de2, 0x8fd5b0b1, 0x68c81626, 0x9a9ffbde, + 0x7d825d49, 0xa541266f, 0x425c80f8, 0xb00b6d00, 0x5716cb97, + 0xdafc9d0d, 0x3de13b9a, 0xcfb6d662, 0x28ab70f5, 0xf0680bd3, + 0x1775ad44, 0xe52240bc, 0x023fe62b, 0x2587ebc9, 0xc29a4d5e, + 0x30cda0a6, 0xd7d00631, 0x0f137d17, 0xe80edb80, 0x1a593678, + 0xfd4490ef, 0x70aec675, 0x97b360e2, 0x65e48d1a, 0x82f92b8d, + 0x5a3a50ab, 0xbd27f63c, 0x4f701bc4, 0xa86dbd53, 0xc4da6723, + 0x23c7c1b4, 0xd1902c4c, 0x368d8adb, 0xee4ef1fd, 0x0953576a, + 0xfb04ba92, 0x1c191c05, 0x91f34a9f, 0x76eeec08, 0x84b901f0, + 0x63a4a767, 0xbb67dc41, 0x5c7a7ad6, 0xae2d972e, 0x493031b9, + 0x6e883c5b, 0x89959acc, 0x7bc27734, 0x9cdfd1a3, 0x441caa85, + 0xa3010c12, 0x5156e1ea, 0xb64b477d, 0x3ba111e7, 0xdcbcb770, + 0x2eeb5a88, 0xc9f6fc1f, 0x11358739, 0xf62821ae, 0x047fcc56, + 0xe3626ac1, 0x4b0fd792, 0xac127105, 0x5e459cfd, 0xb9583a6a, + 0x619b414c, 0x8686e7db, 0x74d10a23, 0x93ccacb4, 0x1e26fa2e, + 0xf93b5cb9, 0x0b6cb141, 0xec7117d6, 0x34b26cf0, 0xd3afca67, + 0x21f8279f, 0xc6e58108, 0xe15d8cea, 0x06402a7d, 0xf417c785, + 0x130a6112, 0xcbc91a34, 0x2cd4bca3, 0xde83515b, 0x399ef7cc, + 0xb474a156, 0x536907c1, 0xa13eea39, 0x46234cae, 0x9ee03788, + 0x79fd911f, 0x8baa7ce7, 0x6cb7da70, 0x52c5c807, 0xb5d86e90, + 0x478f8368, 0xa09225ff, 0x78515ed9, 0x9f4cf84e, 0x6d1b15b6, + 0x8a06b321, 0x07ece5bb, 0xe0f1432c, 0x12a6aed4, 0xf5bb0843, + 0x2d787365, 0xca65d5f2, 0x3832380a, 0xdf2f9e9d, 0xf897937f, + 0x1f8a35e8, 0xedddd810, 0x0ac07e87, 0xd20305a1, 0x351ea336, + 0xc7494ece, 0x2054e859, 0xadbebec3, 0x4aa31854, 0xb8f4f5ac, + 0x5fe9533b, 0x872a281d, 0x60378e8a, 0x92606372, 0x757dc5e5, + 0xdd1078b6, 0x3a0dde21, 0xc85a33d9, 0x2f47954e, 0xf784ee68, + 0x109948ff, 0xe2cea507, 0x05d30390, 0x8839550a, 0x6f24f39d, + 0x9d731e65, 0x7a6eb8f2, 0xa2adc3d4, 0x45b06543, 0xb7e788bb, + 0x50fa2e2c, 0x774223ce, 0x905f8559, 0x620868a1, 0x8515ce36, + 0x5dd6b510, 0xbacb1387, 0x489cfe7f, 0xaf8158e8, 0x226b0e72, + 0xc576a8e5, 0x3721451d, 0xd03ce38a, 0x08ff98ac, 0xefe23e3b, + 0x1db5d3c3, 0xfaa87554, 0x961faf24, 0x710209b3, 0x8355e44b, + 0x644842dc, 0xbc8b39fa, 0x5b969f6d, 0xa9c17295, 0x4edcd402, + 0xc3368298, 0x242b240f, 0xd67cc9f7, 0x31616f60, 0xe9a21446, + 0x0ebfb2d1, 0xfce85f29, 0x1bf5f9be, 0x3c4df45c, 0xdb5052cb, + 0x2907bf33, 0xce1a19a4, 0x16d96282, 0xf1c4c415, 0x039329ed, + 0xe48e8f7a, 0x6964d9e0, 0x8e797f77, 0x7c2e928f, 0x9b333418, + 0x43f04f3e, 0xa4ede9a9, 0x56ba0451, 0xb1a7a2c6, 0x19ca1f95, + 0xfed7b902, 0x0c8054fa, 0xeb9df26d, 0x335e894b, 0xd4432fdc, + 0x2614c224, 0xc10964b3, 0x4ce33229, 0xabfe94be, 0x59a97946, + 0xbeb4dfd1, 0x6677a4f7, 0x816a0260, 0x733def98, 0x9420490f, + 0xb39844ed, 0x5485e27a, 0xa6d20f82, 0x41cfa915, 0x990cd233, + 0x7e1174a4, 0x8c46995c, 0x6b5b3fcb, 0xe6b16951, 0x01accfc6, + 0xf3fb223e, 0x14e684a9, 0xcc25ff8f, 0x2b385918, 0xd96fb4e0, + 0x3e721277}, + {0x00000000, 0xa58b900e, 0x9066265d, 0x35edb653, 0xfbbd4afb, + 0x5e36daf5, 0x6bdb6ca6, 0xce50fca8, 0x2c0b93b7, 0x898003b9, + 0xbc6db5ea, 0x19e625e4, 0xd7b6d94c, 0x723d4942, 0x47d0ff11, + 0xe25b6f1f, 0x5817276e, 0xfd9cb760, 0xc8710133, 0x6dfa913d, + 0xa3aa6d95, 0x0621fd9b, 0x33cc4bc8, 0x9647dbc6, 0x741cb4d9, + 0xd19724d7, 0xe47a9284, 0x41f1028a, 0x8fa1fe22, 0x2a2a6e2c, + 0x1fc7d87f, 0xba4c4871, 0xb02e4edc, 0x15a5ded2, 0x20486881, + 0x85c3f88f, 0x4b930427, 0xee189429, 0xdbf5227a, 0x7e7eb274, + 0x9c25dd6b, 0x39ae4d65, 0x0c43fb36, 0xa9c86b38, 0x67989790, + 0xc213079e, 0xf7feb1cd, 0x527521c3, 0xe83969b2, 0x4db2f9bc, + 0x785f4fef, 0xddd4dfe1, 0x13842349, 0xb60fb347, 0x83e20514, + 0x2669951a, 0xc432fa05, 0x61b96a0b, 0x5454dc58, 0xf1df4c56, + 0x3f8fb0fe, 0x9a0420f0, 0xafe996a3, 0x0a6206ad, 0xbb2d9bf9, + 0x1ea60bf7, 0x2b4bbda4, 0x8ec02daa, 0x4090d102, 0xe51b410c, + 0xd0f6f75f, 0x757d6751, 0x9726084e, 0x32ad9840, 0x07402e13, + 0xa2cbbe1d, 0x6c9b42b5, 0xc910d2bb, 0xfcfd64e8, 0x5976f4e6, + 0xe33abc97, 0x46b12c99, 0x735c9aca, 0xd6d70ac4, 0x1887f66c, + 0xbd0c6662, 0x88e1d031, 0x2d6a403f, 0xcf312f20, 0x6ababf2e, + 0x5f57097d, 0xfadc9973, 0x348c65db, 0x9107f5d5, 0xa4ea4386, + 0x0161d388, 0x0b03d525, 0xae88452b, 0x9b65f378, 0x3eee6376, + 0xf0be9fde, 0x55350fd0, 0x60d8b983, 0xc553298d, 0x27084692, + 0x8283d69c, 0xb76e60cf, 0x12e5f0c1, 0xdcb50c69, 0x793e9c67, + 0x4cd32a34, 0xe958ba3a, 0x5314f24b, 0xf69f6245, 0xc372d416, + 0x66f94418, 0xa8a9b8b0, 0x0d2228be, 0x38cf9eed, 0x9d440ee3, + 0x7f1f61fc, 0xda94f1f2, 0xef7947a1, 0x4af2d7af, 0x84a22b07, + 0x2129bb09, 0x14c40d5a, 0xb14f9d54, 0xad2a31b3, 0x08a1a1bd, + 0x3d4c17ee, 0x98c787e0, 0x56977b48, 0xf31ceb46, 0xc6f15d15, + 0x637acd1b, 0x8121a204, 0x24aa320a, 0x11478459, 0xb4cc1457, + 0x7a9ce8ff, 0xdf1778f1, 0xeafacea2, 0x4f715eac, 0xf53d16dd, + 0x50b686d3, 0x655b3080, 0xc0d0a08e, 0x0e805c26, 0xab0bcc28, + 0x9ee67a7b, 0x3b6dea75, 0xd936856a, 0x7cbd1564, 0x4950a337, + 0xecdb3339, 0x228bcf91, 0x87005f9f, 0xb2ede9cc, 0x176679c2, + 0x1d047f6f, 0xb88fef61, 0x8d625932, 0x28e9c93c, 0xe6b93594, + 0x4332a59a, 0x76df13c9, 0xd35483c7, 0x310fecd8, 0x94847cd6, + 0xa169ca85, 0x04e25a8b, 0xcab2a623, 0x6f39362d, 0x5ad4807e, + 0xff5f1070, 0x45135801, 0xe098c80f, 0xd5757e5c, 0x70feee52, + 0xbeae12fa, 0x1b2582f4, 0x2ec834a7, 0x8b43a4a9, 0x6918cbb6, + 0xcc935bb8, 0xf97eedeb, 0x5cf57de5, 0x92a5814d, 0x372e1143, + 0x02c3a710, 0xa748371e, 0x1607aa4a, 0xb38c3a44, 0x86618c17, + 0x23ea1c19, 0xedbae0b1, 0x483170bf, 0x7ddcc6ec, 0xd85756e2, + 0x3a0c39fd, 0x9f87a9f3, 0xaa6a1fa0, 0x0fe18fae, 0xc1b17306, + 0x643ae308, 0x51d7555b, 0xf45cc555, 0x4e108d24, 0xeb9b1d2a, + 0xde76ab79, 0x7bfd3b77, 0xb5adc7df, 0x102657d1, 0x25cbe182, + 0x8040718c, 0x621b1e93, 0xc7908e9d, 0xf27d38ce, 0x57f6a8c0, + 0x99a65468, 0x3c2dc466, 0x09c07235, 0xac4be23b, 0xa629e496, + 0x03a27498, 0x364fc2cb, 0x93c452c5, 0x5d94ae6d, 0xf81f3e63, + 0xcdf28830, 0x6879183e, 0x8a227721, 0x2fa9e72f, 0x1a44517c, + 0xbfcfc172, 0x719f3dda, 0xd414add4, 0xe1f91b87, 0x44728b89, + 0xfe3ec3f8, 0x5bb553f6, 0x6e58e5a5, 0xcbd375ab, 0x05838903, + 0xa008190d, 0x95e5af5e, 0x306e3f50, 0xd235504f, 0x77bec041, + 0x42537612, 0xe7d8e61c, 0x29881ab4, 0x8c038aba, 0xb9ee3ce9, + 0x1c65ace7}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x0000000000000000, 0x0e908ba500000000, 0x5d26669000000000, + 0x53b6ed3500000000, 0xfb4abdfb00000000, 0xf5da365e00000000, + 0xa66cdb6b00000000, 0xa8fc50ce00000000, 0xb7930b2c00000000, + 0xb903808900000000, 0xeab56dbc00000000, 0xe425e61900000000, + 0x4cd9b6d700000000, 0x42493d7200000000, 0x11ffd04700000000, + 0x1f6f5be200000000, 0x6e27175800000000, 0x60b79cfd00000000, + 0x330171c800000000, 0x3d91fa6d00000000, 0x956daaa300000000, + 0x9bfd210600000000, 0xc84bcc3300000000, 0xc6db479600000000, + 0xd9b41c7400000000, 0xd72497d100000000, 0x84927ae400000000, + 0x8a02f14100000000, 0x22fea18f00000000, 0x2c6e2a2a00000000, + 0x7fd8c71f00000000, 0x71484cba00000000, 0xdc4e2eb000000000, + 0xd2dea51500000000, 0x8168482000000000, 0x8ff8c38500000000, + 0x2704934b00000000, 0x299418ee00000000, 0x7a22f5db00000000, + 0x74b27e7e00000000, 0x6bdd259c00000000, 0x654dae3900000000, + 0x36fb430c00000000, 0x386bc8a900000000, 0x9097986700000000, + 0x9e0713c200000000, 0xcdb1fef700000000, 0xc321755200000000, + 0xb26939e800000000, 0xbcf9b24d00000000, 0xef4f5f7800000000, + 0xe1dfd4dd00000000, 0x4923841300000000, 0x47b30fb600000000, + 0x1405e28300000000, 0x1a95692600000000, 0x05fa32c400000000, + 0x0b6ab96100000000, 0x58dc545400000000, 0x564cdff100000000, + 0xfeb08f3f00000000, 0xf020049a00000000, 0xa396e9af00000000, + 0xad06620a00000000, 0xf99b2dbb00000000, 0xf70ba61e00000000, + 0xa4bd4b2b00000000, 0xaa2dc08e00000000, 0x02d1904000000000, + 0x0c411be500000000, 0x5ff7f6d000000000, 0x51677d7500000000, + 0x4e08269700000000, 0x4098ad3200000000, 0x132e400700000000, + 0x1dbecba200000000, 0xb5429b6c00000000, 0xbbd210c900000000, + 0xe864fdfc00000000, 0xe6f4765900000000, 0x97bc3ae300000000, + 0x992cb14600000000, 0xca9a5c7300000000, 0xc40ad7d600000000, + 0x6cf6871800000000, 0x62660cbd00000000, 0x31d0e18800000000, + 0x3f406a2d00000000, 0x202f31cf00000000, 0x2ebfba6a00000000, + 0x7d09575f00000000, 0x7399dcfa00000000, 0xdb658c3400000000, + 0xd5f5079100000000, 0x8643eaa400000000, 0x88d3610100000000, + 0x25d5030b00000000, 0x2b4588ae00000000, 0x78f3659b00000000, + 0x7663ee3e00000000, 0xde9fbef000000000, 0xd00f355500000000, + 0x83b9d86000000000, 0x8d2953c500000000, 0x9246082700000000, + 0x9cd6838200000000, 0xcf606eb700000000, 0xc1f0e51200000000, + 0x690cb5dc00000000, 0x679c3e7900000000, 0x342ad34c00000000, + 0x3aba58e900000000, 0x4bf2145300000000, 0x45629ff600000000, + 0x16d472c300000000, 0x1844f96600000000, 0xb0b8a9a800000000, + 0xbe28220d00000000, 0xed9ecf3800000000, 0xe30e449d00000000, + 0xfc611f7f00000000, 0xf2f194da00000000, 0xa14779ef00000000, + 0xafd7f24a00000000, 0x072ba28400000000, 0x09bb292100000000, + 0x5a0dc41400000000, 0x549d4fb100000000, 0xb3312aad00000000, + 0xbda1a10800000000, 0xee174c3d00000000, 0xe087c79800000000, + 0x487b975600000000, 0x46eb1cf300000000, 0x155df1c600000000, + 0x1bcd7a6300000000, 0x04a2218100000000, 0x0a32aa2400000000, + 0x5984471100000000, 0x5714ccb400000000, 0xffe89c7a00000000, + 0xf17817df00000000, 0xa2cefaea00000000, 0xac5e714f00000000, + 0xdd163df500000000, 0xd386b65000000000, 0x80305b6500000000, + 0x8ea0d0c000000000, 0x265c800e00000000, 0x28cc0bab00000000, + 0x7b7ae69e00000000, 0x75ea6d3b00000000, 0x6a8536d900000000, + 0x6415bd7c00000000, 0x37a3504900000000, 0x3933dbec00000000, + 0x91cf8b2200000000, 0x9f5f008700000000, 0xcce9edb200000000, + 0xc279661700000000, 0x6f7f041d00000000, 0x61ef8fb800000000, + 0x3259628d00000000, 0x3cc9e92800000000, 0x9435b9e600000000, + 0x9aa5324300000000, 0xc913df7600000000, 0xc78354d300000000, + 0xd8ec0f3100000000, 0xd67c849400000000, 0x85ca69a100000000, + 0x8b5ae20400000000, 0x23a6b2ca00000000, 0x2d36396f00000000, + 0x7e80d45a00000000, 0x70105fff00000000, 0x0158134500000000, + 0x0fc898e000000000, 0x5c7e75d500000000, 0x52eefe7000000000, + 0xfa12aebe00000000, 0xf482251b00000000, 0xa734c82e00000000, + 0xa9a4438b00000000, 0xb6cb186900000000, 0xb85b93cc00000000, + 0xebed7ef900000000, 0xe57df55c00000000, 0x4d81a59200000000, + 0x43112e3700000000, 0x10a7c30200000000, 0x1e3748a700000000, + 0x4aaa071600000000, 0x443a8cb300000000, 0x178c618600000000, + 0x191cea2300000000, 0xb1e0baed00000000, 0xbf70314800000000, + 0xecc6dc7d00000000, 0xe25657d800000000, 0xfd390c3a00000000, + 0xf3a9879f00000000, 0xa01f6aaa00000000, 0xae8fe10f00000000, + 0x0673b1c100000000, 0x08e33a6400000000, 0x5b55d75100000000, + 0x55c55cf400000000, 0x248d104e00000000, 0x2a1d9beb00000000, + 0x79ab76de00000000, 0x773bfd7b00000000, 0xdfc7adb500000000, + 0xd157261000000000, 0x82e1cb2500000000, 0x8c71408000000000, + 0x931e1b6200000000, 0x9d8e90c700000000, 0xce387df200000000, + 0xc0a8f65700000000, 0x6854a69900000000, 0x66c42d3c00000000, + 0x3572c00900000000, 0x3be24bac00000000, 0x96e429a600000000, + 0x9874a20300000000, 0xcbc24f3600000000, 0xc552c49300000000, + 0x6dae945d00000000, 0x633e1ff800000000, 0x3088f2cd00000000, + 0x3e18796800000000, 0x2177228a00000000, 0x2fe7a92f00000000, + 0x7c51441a00000000, 0x72c1cfbf00000000, 0xda3d9f7100000000, + 0xd4ad14d400000000, 0x871bf9e100000000, 0x898b724400000000, + 0xf8c33efe00000000, 0xf653b55b00000000, 0xa5e5586e00000000, + 0xab75d3cb00000000, 0x0389830500000000, 0x0d1908a000000000, + 0x5eafe59500000000, 0x503f6e3000000000, 0x4f5035d200000000, + 0x41c0be7700000000, 0x1276534200000000, 0x1ce6d8e700000000, + 0xb41a882900000000, 0xba8a038c00000000, 0xe93ceeb900000000, + 0xe7ac651c00000000}, + {0x0000000000000000, 0x97a61de700000000, 0x6f4b4a1500000000, + 0xf8ed57f200000000, 0xde96942a00000000, 0x493089cd00000000, + 0xb1ddde3f00000000, 0x267bc3d800000000, 0xbc2d295500000000, + 0x2b8b34b200000000, 0xd366634000000000, 0x44c07ea700000000, + 0x62bbbd7f00000000, 0xf51da09800000000, 0x0df0f76a00000000, + 0x9a56ea8d00000000, 0x785b52aa00000000, 0xeffd4f4d00000000, + 0x171018bf00000000, 0x80b6055800000000, 0xa6cdc68000000000, + 0x316bdb6700000000, 0xc9868c9500000000, 0x5e20917200000000, + 0xc4767bff00000000, 0x53d0661800000000, 0xab3d31ea00000000, + 0x3c9b2c0d00000000, 0x1ae0efd500000000, 0x8d46f23200000000, + 0x75aba5c000000000, 0xe20db82700000000, 0xb1b0d58f00000000, + 0x2616c86800000000, 0xdefb9f9a00000000, 0x495d827d00000000, + 0x6f2641a500000000, 0xf8805c4200000000, 0x006d0bb000000000, + 0x97cb165700000000, 0x0d9dfcda00000000, 0x9a3be13d00000000, + 0x62d6b6cf00000000, 0xf570ab2800000000, 0xd30b68f000000000, + 0x44ad751700000000, 0xbc4022e500000000, 0x2be63f0200000000, + 0xc9eb872500000000, 0x5e4d9ac200000000, 0xa6a0cd3000000000, + 0x3106d0d700000000, 0x177d130f00000000, 0x80db0ee800000000, + 0x7836591a00000000, 0xef9044fd00000000, 0x75c6ae7000000000, + 0xe260b39700000000, 0x1a8de46500000000, 0x8d2bf98200000000, + 0xab503a5a00000000, 0x3cf627bd00000000, 0xc41b704f00000000, + 0x53bd6da800000000, 0x2367dac400000000, 0xb4c1c72300000000, + 0x4c2c90d100000000, 0xdb8a8d3600000000, 0xfdf14eee00000000, + 0x6a57530900000000, 0x92ba04fb00000000, 0x051c191c00000000, + 0x9f4af39100000000, 0x08ecee7600000000, 0xf001b98400000000, + 0x67a7a46300000000, 0x41dc67bb00000000, 0xd67a7a5c00000000, + 0x2e972dae00000000, 0xb931304900000000, 0x5b3c886e00000000, + 0xcc9a958900000000, 0x3477c27b00000000, 0xa3d1df9c00000000, + 0x85aa1c4400000000, 0x120c01a300000000, 0xeae1565100000000, + 0x7d474bb600000000, 0xe711a13b00000000, 0x70b7bcdc00000000, + 0x885aeb2e00000000, 0x1ffcf6c900000000, 0x3987351100000000, + 0xae2128f600000000, 0x56cc7f0400000000, 0xc16a62e300000000, + 0x92d70f4b00000000, 0x057112ac00000000, 0xfd9c455e00000000, + 0x6a3a58b900000000, 0x4c419b6100000000, 0xdbe7868600000000, + 0x230ad17400000000, 0xb4accc9300000000, 0x2efa261e00000000, + 0xb95c3bf900000000, 0x41b16c0b00000000, 0xd61771ec00000000, + 0xf06cb23400000000, 0x67caafd300000000, 0x9f27f82100000000, + 0x0881e5c600000000, 0xea8c5de100000000, 0x7d2a400600000000, + 0x85c717f400000000, 0x12610a1300000000, 0x341ac9cb00000000, + 0xa3bcd42c00000000, 0x5b5183de00000000, 0xccf79e3900000000, + 0x56a174b400000000, 0xc107695300000000, 0x39ea3ea100000000, + 0xae4c234600000000, 0x8837e09e00000000, 0x1f91fd7900000000, + 0xe77caa8b00000000, 0x70dab76c00000000, 0x07c8c55200000000, + 0x906ed8b500000000, 0x68838f4700000000, 0xff2592a000000000, + 0xd95e517800000000, 0x4ef84c9f00000000, 0xb6151b6d00000000, + 0x21b3068a00000000, 0xbbe5ec0700000000, 0x2c43f1e000000000, + 0xd4aea61200000000, 0x4308bbf500000000, 0x6573782d00000000, + 0xf2d565ca00000000, 0x0a38323800000000, 0x9d9e2fdf00000000, + 0x7f9397f800000000, 0xe8358a1f00000000, 0x10d8dded00000000, + 0x877ec00a00000000, 0xa10503d200000000, 0x36a31e3500000000, + 0xce4e49c700000000, 0x59e8542000000000, 0xc3bebead00000000, + 0x5418a34a00000000, 0xacf5f4b800000000, 0x3b53e95f00000000, + 0x1d282a8700000000, 0x8a8e376000000000, 0x7263609200000000, + 0xe5c57d7500000000, 0xb67810dd00000000, 0x21de0d3a00000000, + 0xd9335ac800000000, 0x4e95472f00000000, 0x68ee84f700000000, + 0xff48991000000000, 0x07a5cee200000000, 0x9003d30500000000, + 0x0a55398800000000, 0x9df3246f00000000, 0x651e739d00000000, + 0xf2b86e7a00000000, 0xd4c3ada200000000, 0x4365b04500000000, + 0xbb88e7b700000000, 0x2c2efa5000000000, 0xce23427700000000, + 0x59855f9000000000, 0xa168086200000000, 0x36ce158500000000, + 0x10b5d65d00000000, 0x8713cbba00000000, 0x7ffe9c4800000000, + 0xe85881af00000000, 0x720e6b2200000000, 0xe5a876c500000000, + 0x1d45213700000000, 0x8ae33cd000000000, 0xac98ff0800000000, + 0x3b3ee2ef00000000, 0xc3d3b51d00000000, 0x5475a8fa00000000, + 0x24af1f9600000000, 0xb309027100000000, 0x4be4558300000000, + 0xdc42486400000000, 0xfa398bbc00000000, 0x6d9f965b00000000, + 0x9572c1a900000000, 0x02d4dc4e00000000, 0x988236c300000000, + 0x0f242b2400000000, 0xf7c97cd600000000, 0x606f613100000000, + 0x4614a2e900000000, 0xd1b2bf0e00000000, 0x295fe8fc00000000, + 0xbef9f51b00000000, 0x5cf44d3c00000000, 0xcb5250db00000000, + 0x33bf072900000000, 0xa4191ace00000000, 0x8262d91600000000, + 0x15c4c4f100000000, 0xed29930300000000, 0x7a8f8ee400000000, + 0xe0d9646900000000, 0x777f798e00000000, 0x8f922e7c00000000, + 0x1834339b00000000, 0x3e4ff04300000000, 0xa9e9eda400000000, + 0x5104ba5600000000, 0xc6a2a7b100000000, 0x951fca1900000000, + 0x02b9d7fe00000000, 0xfa54800c00000000, 0x6df29deb00000000, + 0x4b895e3300000000, 0xdc2f43d400000000, 0x24c2142600000000, + 0xb36409c100000000, 0x2932e34c00000000, 0xbe94feab00000000, + 0x4679a95900000000, 0xd1dfb4be00000000, 0xf7a4776600000000, + 0x60026a8100000000, 0x98ef3d7300000000, 0x0f49209400000000, + 0xed4498b300000000, 0x7ae2855400000000, 0x820fd2a600000000, + 0x15a9cf4100000000, 0x33d20c9900000000, 0xa474117e00000000, + 0x5c99468c00000000, 0xcb3f5b6b00000000, 0x5169b1e600000000, + 0xc6cfac0100000000, 0x3e22fbf300000000, 0xa984e61400000000, + 0x8fff25cc00000000, 0x1859382b00000000, 0xe0b46fd900000000, + 0x7712723e00000000}, + {0x0000000000000000, 0x411b8c6e00000000, 0x823618dd00000000, + 0xc32d94b300000000, 0x456b416100000000, 0x0470cd0f00000000, + 0xc75d59bc00000000, 0x8646d5d200000000, 0x8ad682c200000000, + 0xcbcd0eac00000000, 0x08e09a1f00000000, 0x49fb167100000000, + 0xcfbdc3a300000000, 0x8ea64fcd00000000, 0x4d8bdb7e00000000, + 0x0c90571000000000, 0x55ab745e00000000, 0x14b0f83000000000, + 0xd79d6c8300000000, 0x9686e0ed00000000, 0x10c0353f00000000, + 0x51dbb95100000000, 0x92f62de200000000, 0xd3eda18c00000000, + 0xdf7df69c00000000, 0x9e667af200000000, 0x5d4bee4100000000, + 0x1c50622f00000000, 0x9a16b7fd00000000, 0xdb0d3b9300000000, + 0x1820af2000000000, 0x593b234e00000000, 0xaa56e9bc00000000, + 0xeb4d65d200000000, 0x2860f16100000000, 0x697b7d0f00000000, + 0xef3da8dd00000000, 0xae2624b300000000, 0x6d0bb00000000000, + 0x2c103c6e00000000, 0x20806b7e00000000, 0x619be71000000000, + 0xa2b673a300000000, 0xe3adffcd00000000, 0x65eb2a1f00000000, + 0x24f0a67100000000, 0xe7dd32c200000000, 0xa6c6beac00000000, + 0xfffd9de200000000, 0xbee6118c00000000, 0x7dcb853f00000000, + 0x3cd0095100000000, 0xba96dc8300000000, 0xfb8d50ed00000000, + 0x38a0c45e00000000, 0x79bb483000000000, 0x752b1f2000000000, + 0x3430934e00000000, 0xf71d07fd00000000, 0xb6068b9300000000, + 0x30405e4100000000, 0x715bd22f00000000, 0xb276469c00000000, + 0xf36dcaf200000000, 0x15aba3a200000000, 0x54b02fcc00000000, + 0x979dbb7f00000000, 0xd686371100000000, 0x50c0e2c300000000, + 0x11db6ead00000000, 0xd2f6fa1e00000000, 0x93ed767000000000, + 0x9f7d216000000000, 0xde66ad0e00000000, 0x1d4b39bd00000000, + 0x5c50b5d300000000, 0xda16600100000000, 0x9b0dec6f00000000, + 0x582078dc00000000, 0x193bf4b200000000, 0x4000d7fc00000000, + 0x011b5b9200000000, 0xc236cf2100000000, 0x832d434f00000000, + 0x056b969d00000000, 0x44701af300000000, 0x875d8e4000000000, + 0xc646022e00000000, 0xcad6553e00000000, 0x8bcdd95000000000, + 0x48e04de300000000, 0x09fbc18d00000000, 0x8fbd145f00000000, + 0xcea6983100000000, 0x0d8b0c8200000000, 0x4c9080ec00000000, + 0xbffd4a1e00000000, 0xfee6c67000000000, 0x3dcb52c300000000, + 0x7cd0dead00000000, 0xfa960b7f00000000, 0xbb8d871100000000, + 0x78a013a200000000, 0x39bb9fcc00000000, 0x352bc8dc00000000, + 0x743044b200000000, 0xb71dd00100000000, 0xf6065c6f00000000, + 0x704089bd00000000, 0x315b05d300000000, 0xf276916000000000, + 0xb36d1d0e00000000, 0xea563e4000000000, 0xab4db22e00000000, + 0x6860269d00000000, 0x297baaf300000000, 0xaf3d7f2100000000, + 0xee26f34f00000000, 0x2d0b67fc00000000, 0x6c10eb9200000000, + 0x6080bc8200000000, 0x219b30ec00000000, 0xe2b6a45f00000000, + 0xa3ad283100000000, 0x25ebfde300000000, 0x64f0718d00000000, + 0xa7dde53e00000000, 0xe6c6695000000000, 0x6b50369e00000000, + 0x2a4bbaf000000000, 0xe9662e4300000000, 0xa87da22d00000000, + 0x2e3b77ff00000000, 0x6f20fb9100000000, 0xac0d6f2200000000, + 0xed16e34c00000000, 0xe186b45c00000000, 0xa09d383200000000, + 0x63b0ac8100000000, 0x22ab20ef00000000, 0xa4edf53d00000000, + 0xe5f6795300000000, 0x26dbede000000000, 0x67c0618e00000000, + 0x3efb42c000000000, 0x7fe0ceae00000000, 0xbccd5a1d00000000, + 0xfdd6d67300000000, 0x7b9003a100000000, 0x3a8b8fcf00000000, + 0xf9a61b7c00000000, 0xb8bd971200000000, 0xb42dc00200000000, + 0xf5364c6c00000000, 0x361bd8df00000000, 0x770054b100000000, + 0xf146816300000000, 0xb05d0d0d00000000, 0x737099be00000000, + 0x326b15d000000000, 0xc106df2200000000, 0x801d534c00000000, + 0x4330c7ff00000000, 0x022b4b9100000000, 0x846d9e4300000000, + 0xc576122d00000000, 0x065b869e00000000, 0x47400af000000000, + 0x4bd05de000000000, 0x0acbd18e00000000, 0xc9e6453d00000000, + 0x88fdc95300000000, 0x0ebb1c8100000000, 0x4fa090ef00000000, + 0x8c8d045c00000000, 0xcd96883200000000, 0x94adab7c00000000, + 0xd5b6271200000000, 0x169bb3a100000000, 0x57803fcf00000000, + 0xd1c6ea1d00000000, 0x90dd667300000000, 0x53f0f2c000000000, + 0x12eb7eae00000000, 0x1e7b29be00000000, 0x5f60a5d000000000, + 0x9c4d316300000000, 0xdd56bd0d00000000, 0x5b1068df00000000, + 0x1a0be4b100000000, 0xd926700200000000, 0x983dfc6c00000000, + 0x7efb953c00000000, 0x3fe0195200000000, 0xfccd8de100000000, + 0xbdd6018f00000000, 0x3b90d45d00000000, 0x7a8b583300000000, + 0xb9a6cc8000000000, 0xf8bd40ee00000000, 0xf42d17fe00000000, + 0xb5369b9000000000, 0x761b0f2300000000, 0x3700834d00000000, + 0xb146569f00000000, 0xf05ddaf100000000, 0x33704e4200000000, + 0x726bc22c00000000, 0x2b50e16200000000, 0x6a4b6d0c00000000, + 0xa966f9bf00000000, 0xe87d75d100000000, 0x6e3ba00300000000, + 0x2f202c6d00000000, 0xec0db8de00000000, 0xad1634b000000000, + 0xa18663a000000000, 0xe09defce00000000, 0x23b07b7d00000000, + 0x62abf71300000000, 0xe4ed22c100000000, 0xa5f6aeaf00000000, + 0x66db3a1c00000000, 0x27c0b67200000000, 0xd4ad7c8000000000, + 0x95b6f0ee00000000, 0x569b645d00000000, 0x1780e83300000000, + 0x91c63de100000000, 0xd0ddb18f00000000, 0x13f0253c00000000, + 0x52eba95200000000, 0x5e7bfe4200000000, 0x1f60722c00000000, + 0xdc4de69f00000000, 0x9d566af100000000, 0x1b10bf2300000000, + 0x5a0b334d00000000, 0x9926a7fe00000000, 0xd83d2b9000000000, + 0x810608de00000000, 0xc01d84b000000000, 0x0330100300000000, + 0x422b9c6d00000000, 0xc46d49bf00000000, 0x8576c5d100000000, + 0x465b516200000000, 0x0740dd0c00000000, 0x0bd08a1c00000000, + 0x4acb067200000000, 0x89e692c100000000, 0xc8fd1eaf00000000, + 0x4ebbcb7d00000000, 0x0fa0471300000000, 0xcc8dd3a000000000, + 0x8d965fce00000000}, + {0x0000000000000000, 0x1dfdb50100000000, 0x3afa6b0300000000, + 0x2707de0200000000, 0x74f4d70600000000, 0x6909620700000000, + 0x4e0ebc0500000000, 0x53f3090400000000, 0xe8e8af0d00000000, + 0xf5151a0c00000000, 0xd212c40e00000000, 0xcfef710f00000000, + 0x9c1c780b00000000, 0x81e1cd0a00000000, 0xa6e6130800000000, + 0xbb1ba60900000000, 0xd0d15f1b00000000, 0xcd2cea1a00000000, + 0xea2b341800000000, 0xf7d6811900000000, 0xa425881d00000000, + 0xb9d83d1c00000000, 0x9edfe31e00000000, 0x8322561f00000000, + 0x3839f01600000000, 0x25c4451700000000, 0x02c39b1500000000, + 0x1f3e2e1400000000, 0x4ccd271000000000, 0x5130921100000000, + 0x76374c1300000000, 0x6bcaf91200000000, 0xa0a3bf3600000000, + 0xbd5e0a3700000000, 0x9a59d43500000000, 0x87a4613400000000, + 0xd457683000000000, 0xc9aadd3100000000, 0xeead033300000000, + 0xf350b63200000000, 0x484b103b00000000, 0x55b6a53a00000000, + 0x72b17b3800000000, 0x6f4cce3900000000, 0x3cbfc73d00000000, + 0x2142723c00000000, 0x0645ac3e00000000, 0x1bb8193f00000000, + 0x7072e02d00000000, 0x6d8f552c00000000, 0x4a888b2e00000000, + 0x57753e2f00000000, 0x0486372b00000000, 0x197b822a00000000, + 0x3e7c5c2800000000, 0x2381e92900000000, 0x989a4f2000000000, + 0x8567fa2100000000, 0xa260242300000000, 0xbf9d912200000000, + 0xec6e982600000000, 0xf1932d2700000000, 0xd694f32500000000, + 0xcb69462400000000, 0x40477f6d00000000, 0x5dbaca6c00000000, + 0x7abd146e00000000, 0x6740a16f00000000, 0x34b3a86b00000000, + 0x294e1d6a00000000, 0x0e49c36800000000, 0x13b4766900000000, + 0xa8afd06000000000, 0xb552656100000000, 0x9255bb6300000000, + 0x8fa80e6200000000, 0xdc5b076600000000, 0xc1a6b26700000000, + 0xe6a16c6500000000, 0xfb5cd96400000000, 0x9096207600000000, + 0x8d6b957700000000, 0xaa6c4b7500000000, 0xb791fe7400000000, + 0xe462f77000000000, 0xf99f427100000000, 0xde989c7300000000, + 0xc365297200000000, 0x787e8f7b00000000, 0x65833a7a00000000, + 0x4284e47800000000, 0x5f79517900000000, 0x0c8a587d00000000, + 0x1177ed7c00000000, 0x3670337e00000000, 0x2b8d867f00000000, + 0xe0e4c05b00000000, 0xfd19755a00000000, 0xda1eab5800000000, + 0xc7e31e5900000000, 0x9410175d00000000, 0x89eda25c00000000, + 0xaeea7c5e00000000, 0xb317c95f00000000, 0x080c6f5600000000, + 0x15f1da5700000000, 0x32f6045500000000, 0x2f0bb15400000000, + 0x7cf8b85000000000, 0x61050d5100000000, 0x4602d35300000000, + 0x5bff665200000000, 0x30359f4000000000, 0x2dc82a4100000000, + 0x0acff44300000000, 0x1732414200000000, 0x44c1484600000000, + 0x593cfd4700000000, 0x7e3b234500000000, 0x63c6964400000000, + 0xd8dd304d00000000, 0xc520854c00000000, 0xe2275b4e00000000, + 0xffdaee4f00000000, 0xac29e74b00000000, 0xb1d4524a00000000, + 0x96d38c4800000000, 0x8b2e394900000000, 0x808efeda00000000, + 0x9d734bdb00000000, 0xba7495d900000000, 0xa78920d800000000, + 0xf47a29dc00000000, 0xe9879cdd00000000, 0xce8042df00000000, + 0xd37df7de00000000, 0x686651d700000000, 0x759be4d600000000, + 0x529c3ad400000000, 0x4f618fd500000000, 0x1c9286d100000000, + 0x016f33d000000000, 0x2668edd200000000, 0x3b9558d300000000, + 0x505fa1c100000000, 0x4da214c000000000, 0x6aa5cac200000000, + 0x77587fc300000000, 0x24ab76c700000000, 0x3956c3c600000000, + 0x1e511dc400000000, 0x03aca8c500000000, 0xb8b70ecc00000000, + 0xa54abbcd00000000, 0x824d65cf00000000, 0x9fb0d0ce00000000, + 0xcc43d9ca00000000, 0xd1be6ccb00000000, 0xf6b9b2c900000000, + 0xeb4407c800000000, 0x202d41ec00000000, 0x3dd0f4ed00000000, + 0x1ad72aef00000000, 0x072a9fee00000000, 0x54d996ea00000000, + 0x492423eb00000000, 0x6e23fde900000000, 0x73de48e800000000, + 0xc8c5eee100000000, 0xd5385be000000000, 0xf23f85e200000000, + 0xefc230e300000000, 0xbc3139e700000000, 0xa1cc8ce600000000, + 0x86cb52e400000000, 0x9b36e7e500000000, 0xf0fc1ef700000000, + 0xed01abf600000000, 0xca0675f400000000, 0xd7fbc0f500000000, + 0x8408c9f100000000, 0x99f57cf000000000, 0xbef2a2f200000000, + 0xa30f17f300000000, 0x1814b1fa00000000, 0x05e904fb00000000, + 0x22eedaf900000000, 0x3f136ff800000000, 0x6ce066fc00000000, + 0x711dd3fd00000000, 0x561a0dff00000000, 0x4be7b8fe00000000, + 0xc0c981b700000000, 0xdd3434b600000000, 0xfa33eab400000000, + 0xe7ce5fb500000000, 0xb43d56b100000000, 0xa9c0e3b000000000, + 0x8ec73db200000000, 0x933a88b300000000, 0x28212eba00000000, + 0x35dc9bbb00000000, 0x12db45b900000000, 0x0f26f0b800000000, + 0x5cd5f9bc00000000, 0x41284cbd00000000, 0x662f92bf00000000, + 0x7bd227be00000000, 0x1018deac00000000, 0x0de56bad00000000, + 0x2ae2b5af00000000, 0x371f00ae00000000, 0x64ec09aa00000000, + 0x7911bcab00000000, 0x5e1662a900000000, 0x43ebd7a800000000, + 0xf8f071a100000000, 0xe50dc4a000000000, 0xc20a1aa200000000, + 0xdff7afa300000000, 0x8c04a6a700000000, 0x91f913a600000000, + 0xb6fecda400000000, 0xab0378a500000000, 0x606a3e8100000000, + 0x7d978b8000000000, 0x5a90558200000000, 0x476de08300000000, + 0x149ee98700000000, 0x09635c8600000000, 0x2e64828400000000, + 0x3399378500000000, 0x8882918c00000000, 0x957f248d00000000, + 0xb278fa8f00000000, 0xaf854f8e00000000, 0xfc76468a00000000, + 0xe18bf38b00000000, 0xc68c2d8900000000, 0xdb71988800000000, + 0xb0bb619a00000000, 0xad46d49b00000000, 0x8a410a9900000000, + 0x97bcbf9800000000, 0xc44fb69c00000000, 0xd9b2039d00000000, + 0xfeb5dd9f00000000, 0xe348689e00000000, 0x5853ce9700000000, + 0x45ae7b9600000000, 0x62a9a59400000000, 0x7f54109500000000, + 0x2ca7199100000000, 0x315aac9000000000, 0x165d729200000000, + 0x0ba0c79300000000}, + {0x0000000000000000, 0x24d9076300000000, 0x48b20fc600000000, + 0x6c6b08a500000000, 0xd1626e5700000000, 0xf5bb693400000000, + 0x99d0619100000000, 0xbd0966f200000000, 0xa2c5dcae00000000, + 0x861cdbcd00000000, 0xea77d36800000000, 0xceaed40b00000000, + 0x73a7b2f900000000, 0x577eb59a00000000, 0x3b15bd3f00000000, + 0x1fccba5c00000000, 0x058dc88600000000, 0x2154cfe500000000, + 0x4d3fc74000000000, 0x69e6c02300000000, 0xd4efa6d100000000, + 0xf036a1b200000000, 0x9c5da91700000000, 0xb884ae7400000000, + 0xa748142800000000, 0x8391134b00000000, 0xeffa1bee00000000, + 0xcb231c8d00000000, 0x762a7a7f00000000, 0x52f37d1c00000000, + 0x3e9875b900000000, 0x1a4172da00000000, 0x4b1ce0d600000000, + 0x6fc5e7b500000000, 0x03aeef1000000000, 0x2777e87300000000, + 0x9a7e8e8100000000, 0xbea789e200000000, 0xd2cc814700000000, + 0xf615862400000000, 0xe9d93c7800000000, 0xcd003b1b00000000, + 0xa16b33be00000000, 0x85b234dd00000000, 0x38bb522f00000000, + 0x1c62554c00000000, 0x70095de900000000, 0x54d05a8a00000000, + 0x4e91285000000000, 0x6a482f3300000000, 0x0623279600000000, + 0x22fa20f500000000, 0x9ff3460700000000, 0xbb2a416400000000, + 0xd74149c100000000, 0xf3984ea200000000, 0xec54f4fe00000000, + 0xc88df39d00000000, 0xa4e6fb3800000000, 0x803ffc5b00000000, + 0x3d369aa900000000, 0x19ef9dca00000000, 0x7584956f00000000, + 0x515d920c00000000, 0xd73eb17600000000, 0xf3e7b61500000000, + 0x9f8cbeb000000000, 0xbb55b9d300000000, 0x065cdf2100000000, + 0x2285d84200000000, 0x4eeed0e700000000, 0x6a37d78400000000, + 0x75fb6dd800000000, 0x51226abb00000000, 0x3d49621e00000000, + 0x1990657d00000000, 0xa499038f00000000, 0x804004ec00000000, + 0xec2b0c4900000000, 0xc8f20b2a00000000, 0xd2b379f000000000, + 0xf66a7e9300000000, 0x9a01763600000000, 0xbed8715500000000, + 0x03d117a700000000, 0x270810c400000000, 0x4b63186100000000, + 0x6fba1f0200000000, 0x7076a55e00000000, 0x54afa23d00000000, + 0x38c4aa9800000000, 0x1c1dadfb00000000, 0xa114cb0900000000, + 0x85cdcc6a00000000, 0xe9a6c4cf00000000, 0xcd7fc3ac00000000, + 0x9c2251a000000000, 0xb8fb56c300000000, 0xd4905e6600000000, + 0xf049590500000000, 0x4d403ff700000000, 0x6999389400000000, + 0x05f2303100000000, 0x212b375200000000, 0x3ee78d0e00000000, + 0x1a3e8a6d00000000, 0x765582c800000000, 0x528c85ab00000000, + 0xef85e35900000000, 0xcb5ce43a00000000, 0xa737ec9f00000000, + 0x83eeebfc00000000, 0x99af992600000000, 0xbd769e4500000000, + 0xd11d96e000000000, 0xf5c4918300000000, 0x48cdf77100000000, + 0x6c14f01200000000, 0x007ff8b700000000, 0x24a6ffd400000000, + 0x3b6a458800000000, 0x1fb342eb00000000, 0x73d84a4e00000000, + 0x57014d2d00000000, 0xea082bdf00000000, 0xced12cbc00000000, + 0xa2ba241900000000, 0x8663237a00000000, 0xae7d62ed00000000, + 0x8aa4658e00000000, 0xe6cf6d2b00000000, 0xc2166a4800000000, + 0x7f1f0cba00000000, 0x5bc60bd900000000, 0x37ad037c00000000, + 0x1374041f00000000, 0x0cb8be4300000000, 0x2861b92000000000, + 0x440ab18500000000, 0x60d3b6e600000000, 0xdddad01400000000, + 0xf903d77700000000, 0x9568dfd200000000, 0xb1b1d8b100000000, + 0xabf0aa6b00000000, 0x8f29ad0800000000, 0xe342a5ad00000000, + 0xc79ba2ce00000000, 0x7a92c43c00000000, 0x5e4bc35f00000000, + 0x3220cbfa00000000, 0x16f9cc9900000000, 0x093576c500000000, + 0x2dec71a600000000, 0x4187790300000000, 0x655e7e6000000000, + 0xd857189200000000, 0xfc8e1ff100000000, 0x90e5175400000000, + 0xb43c103700000000, 0xe561823b00000000, 0xc1b8855800000000, + 0xadd38dfd00000000, 0x890a8a9e00000000, 0x3403ec6c00000000, + 0x10daeb0f00000000, 0x7cb1e3aa00000000, 0x5868e4c900000000, + 0x47a45e9500000000, 0x637d59f600000000, 0x0f16515300000000, + 0x2bcf563000000000, 0x96c630c200000000, 0xb21f37a100000000, + 0xde743f0400000000, 0xfaad386700000000, 0xe0ec4abd00000000, + 0xc4354dde00000000, 0xa85e457b00000000, 0x8c87421800000000, + 0x318e24ea00000000, 0x1557238900000000, 0x793c2b2c00000000, + 0x5de52c4f00000000, 0x4229961300000000, 0x66f0917000000000, + 0x0a9b99d500000000, 0x2e429eb600000000, 0x934bf84400000000, + 0xb792ff2700000000, 0xdbf9f78200000000, 0xff20f0e100000000, + 0x7943d39b00000000, 0x5d9ad4f800000000, 0x31f1dc5d00000000, + 0x1528db3e00000000, 0xa821bdcc00000000, 0x8cf8baaf00000000, + 0xe093b20a00000000, 0xc44ab56900000000, 0xdb860f3500000000, + 0xff5f085600000000, 0x933400f300000000, 0xb7ed079000000000, + 0x0ae4616200000000, 0x2e3d660100000000, 0x42566ea400000000, + 0x668f69c700000000, 0x7cce1b1d00000000, 0x58171c7e00000000, + 0x347c14db00000000, 0x10a513b800000000, 0xadac754a00000000, + 0x8975722900000000, 0xe51e7a8c00000000, 0xc1c77def00000000, + 0xde0bc7b300000000, 0xfad2c0d000000000, 0x96b9c87500000000, + 0xb260cf1600000000, 0x0f69a9e400000000, 0x2bb0ae8700000000, + 0x47dba62200000000, 0x6302a14100000000, 0x325f334d00000000, + 0x1686342e00000000, 0x7aed3c8b00000000, 0x5e343be800000000, + 0xe33d5d1a00000000, 0xc7e45a7900000000, 0xab8f52dc00000000, + 0x8f5655bf00000000, 0x909aefe300000000, 0xb443e88000000000, + 0xd828e02500000000, 0xfcf1e74600000000, 0x41f881b400000000, + 0x652186d700000000, 0x094a8e7200000000, 0x2d93891100000000, + 0x37d2fbcb00000000, 0x130bfca800000000, 0x7f60f40d00000000, + 0x5bb9f36e00000000, 0xe6b0959c00000000, 0xc26992ff00000000, + 0xae029a5a00000000, 0x8adb9d3900000000, 0x9517276500000000, + 0xb1ce200600000000, 0xdda528a300000000, 0xf97c2fc000000000, + 0x4475493200000000, 0x60ac4e5100000000, 0x0cc746f400000000, + 0x281e419700000000}, + {0x0000000000000000, 0x08e3603c00000000, 0x10c6c17800000000, + 0x1825a14400000000, 0x208c83f100000000, 0x286fe3cd00000000, + 0x304a428900000000, 0x38a922b500000000, 0x011e763800000000, + 0x09fd160400000000, 0x11d8b74000000000, 0x193bd77c00000000, + 0x2192f5c900000000, 0x297195f500000000, 0x315434b100000000, + 0x39b7548d00000000, 0x023cec7000000000, 0x0adf8c4c00000000, + 0x12fa2d0800000000, 0x1a194d3400000000, 0x22b06f8100000000, + 0x2a530fbd00000000, 0x3276aef900000000, 0x3a95cec500000000, + 0x03229a4800000000, 0x0bc1fa7400000000, 0x13e45b3000000000, + 0x1b073b0c00000000, 0x23ae19b900000000, 0x2b4d798500000000, + 0x3368d8c100000000, 0x3b8bb8fd00000000, 0x0478d8e100000000, + 0x0c9bb8dd00000000, 0x14be199900000000, 0x1c5d79a500000000, + 0x24f45b1000000000, 0x2c173b2c00000000, 0x34329a6800000000, + 0x3cd1fa5400000000, 0x0566aed900000000, 0x0d85cee500000000, + 0x15a06fa100000000, 0x1d430f9d00000000, 0x25ea2d2800000000, + 0x2d094d1400000000, 0x352cec5000000000, 0x3dcf8c6c00000000, + 0x0644349100000000, 0x0ea754ad00000000, 0x1682f5e900000000, + 0x1e6195d500000000, 0x26c8b76000000000, 0x2e2bd75c00000000, + 0x360e761800000000, 0x3eed162400000000, 0x075a42a900000000, + 0x0fb9229500000000, 0x179c83d100000000, 0x1f7fe3ed00000000, + 0x27d6c15800000000, 0x2f35a16400000000, 0x3710002000000000, + 0x3ff3601c00000000, 0x49f6c11800000000, 0x4115a12400000000, + 0x5930006000000000, 0x51d3605c00000000, 0x697a42e900000000, + 0x619922d500000000, 0x79bc839100000000, 0x715fe3ad00000000, + 0x48e8b72000000000, 0x400bd71c00000000, 0x582e765800000000, + 0x50cd166400000000, 0x686434d100000000, 0x608754ed00000000, + 0x78a2f5a900000000, 0x7041959500000000, 0x4bca2d6800000000, + 0x43294d5400000000, 0x5b0cec1000000000, 0x53ef8c2c00000000, + 0x6b46ae9900000000, 0x63a5cea500000000, 0x7b806fe100000000, + 0x73630fdd00000000, 0x4ad45b5000000000, 0x42373b6c00000000, + 0x5a129a2800000000, 0x52f1fa1400000000, 0x6a58d8a100000000, + 0x62bbb89d00000000, 0x7a9e19d900000000, 0x727d79e500000000, + 0x4d8e19f900000000, 0x456d79c500000000, 0x5d48d88100000000, + 0x55abb8bd00000000, 0x6d029a0800000000, 0x65e1fa3400000000, + 0x7dc45b7000000000, 0x75273b4c00000000, 0x4c906fc100000000, + 0x44730ffd00000000, 0x5c56aeb900000000, 0x54b5ce8500000000, + 0x6c1cec3000000000, 0x64ff8c0c00000000, 0x7cda2d4800000000, + 0x74394d7400000000, 0x4fb2f58900000000, 0x475195b500000000, + 0x5f7434f100000000, 0x579754cd00000000, 0x6f3e767800000000, + 0x67dd164400000000, 0x7ff8b70000000000, 0x771bd73c00000000, + 0x4eac83b100000000, 0x464fe38d00000000, 0x5e6a42c900000000, + 0x568922f500000000, 0x6e20004000000000, 0x66c3607c00000000, + 0x7ee6c13800000000, 0x7605a10400000000, 0x92ec833100000000, + 0x9a0fe30d00000000, 0x822a424900000000, 0x8ac9227500000000, + 0xb26000c000000000, 0xba8360fc00000000, 0xa2a6c1b800000000, + 0xaa45a18400000000, 0x93f2f50900000000, 0x9b11953500000000, + 0x8334347100000000, 0x8bd7544d00000000, 0xb37e76f800000000, + 0xbb9d16c400000000, 0xa3b8b78000000000, 0xab5bd7bc00000000, + 0x90d06f4100000000, 0x98330f7d00000000, 0x8016ae3900000000, + 0x88f5ce0500000000, 0xb05cecb000000000, 0xb8bf8c8c00000000, + 0xa09a2dc800000000, 0xa8794df400000000, 0x91ce197900000000, + 0x992d794500000000, 0x8108d80100000000, 0x89ebb83d00000000, + 0xb1429a8800000000, 0xb9a1fab400000000, 0xa1845bf000000000, + 0xa9673bcc00000000, 0x96945bd000000000, 0x9e773bec00000000, + 0x86529aa800000000, 0x8eb1fa9400000000, 0xb618d82100000000, + 0xbefbb81d00000000, 0xa6de195900000000, 0xae3d796500000000, + 0x978a2de800000000, 0x9f694dd400000000, 0x874cec9000000000, + 0x8faf8cac00000000, 0xb706ae1900000000, 0xbfe5ce2500000000, + 0xa7c06f6100000000, 0xaf230f5d00000000, 0x94a8b7a000000000, + 0x9c4bd79c00000000, 0x846e76d800000000, 0x8c8d16e400000000, + 0xb424345100000000, 0xbcc7546d00000000, 0xa4e2f52900000000, + 0xac01951500000000, 0x95b6c19800000000, 0x9d55a1a400000000, + 0x857000e000000000, 0x8d9360dc00000000, 0xb53a426900000000, + 0xbdd9225500000000, 0xa5fc831100000000, 0xad1fe32d00000000, + 0xdb1a422900000000, 0xd3f9221500000000, 0xcbdc835100000000, + 0xc33fe36d00000000, 0xfb96c1d800000000, 0xf375a1e400000000, + 0xeb5000a000000000, 0xe3b3609c00000000, 0xda04341100000000, + 0xd2e7542d00000000, 0xcac2f56900000000, 0xc221955500000000, + 0xfa88b7e000000000, 0xf26bd7dc00000000, 0xea4e769800000000, + 0xe2ad16a400000000, 0xd926ae5900000000, 0xd1c5ce6500000000, + 0xc9e06f2100000000, 0xc1030f1d00000000, 0xf9aa2da800000000, + 0xf1494d9400000000, 0xe96cecd000000000, 0xe18f8cec00000000, + 0xd838d86100000000, 0xd0dbb85d00000000, 0xc8fe191900000000, + 0xc01d792500000000, 0xf8b45b9000000000, 0xf0573bac00000000, + 0xe8729ae800000000, 0xe091fad400000000, 0xdf629ac800000000, + 0xd781faf400000000, 0xcfa45bb000000000, 0xc7473b8c00000000, + 0xffee193900000000, 0xf70d790500000000, 0xef28d84100000000, + 0xe7cbb87d00000000, 0xde7cecf000000000, 0xd69f8ccc00000000, + 0xceba2d8800000000, 0xc6594db400000000, 0xfef06f0100000000, + 0xf6130f3d00000000, 0xee36ae7900000000, 0xe6d5ce4500000000, + 0xdd5e76b800000000, 0xd5bd168400000000, 0xcd98b7c000000000, + 0xc57bd7fc00000000, 0xfdd2f54900000000, 0xf531957500000000, + 0xed14343100000000, 0xe5f7540d00000000, 0xdc40008000000000, + 0xd4a360bc00000000, 0xcc86c1f800000000, 0xc465a1c400000000, + 0xfccc837100000000, 0xf42fe34d00000000, 0xec0a420900000000, + 0xe4e9223500000000}, + {0x0000000000000000, 0xd1e8e70e00000000, 0xa2d1cf1d00000000, + 0x7339281300000000, 0x44a39f3b00000000, 0x954b783500000000, + 0xe672502600000000, 0x379ab72800000000, 0x88463f7700000000, + 0x59aed87900000000, 0x2a97f06a00000000, 0xfb7f176400000000, + 0xcce5a04c00000000, 0x1d0d474200000000, 0x6e346f5100000000, + 0xbfdc885f00000000, 0x108d7eee00000000, 0xc16599e000000000, + 0xb25cb1f300000000, 0x63b456fd00000000, 0x542ee1d500000000, + 0x85c606db00000000, 0xf6ff2ec800000000, 0x2717c9c600000000, + 0x98cb419900000000, 0x4923a69700000000, 0x3a1a8e8400000000, + 0xebf2698a00000000, 0xdc68dea200000000, 0x0d8039ac00000000, + 0x7eb911bf00000000, 0xaf51f6b100000000, 0x611c8c0700000000, + 0xb0f46b0900000000, 0xc3cd431a00000000, 0x1225a41400000000, + 0x25bf133c00000000, 0xf457f43200000000, 0x876edc2100000000, + 0x56863b2f00000000, 0xe95ab37000000000, 0x38b2547e00000000, + 0x4b8b7c6d00000000, 0x9a639b6300000000, 0xadf92c4b00000000, + 0x7c11cb4500000000, 0x0f28e35600000000, 0xdec0045800000000, + 0x7191f2e900000000, 0xa07915e700000000, 0xd3403df400000000, + 0x02a8dafa00000000, 0x35326dd200000000, 0xe4da8adc00000000, + 0x97e3a2cf00000000, 0x460b45c100000000, 0xf9d7cd9e00000000, + 0x283f2a9000000000, 0x5b06028300000000, 0x8aeee58d00000000, + 0xbd7452a500000000, 0x6c9cb5ab00000000, 0x1fa59db800000000, + 0xce4d7ab600000000, 0xc238180f00000000, 0x13d0ff0100000000, + 0x60e9d71200000000, 0xb101301c00000000, 0x869b873400000000, + 0x5773603a00000000, 0x244a482900000000, 0xf5a2af2700000000, + 0x4a7e277800000000, 0x9b96c07600000000, 0xe8afe86500000000, + 0x39470f6b00000000, 0x0eddb84300000000, 0xdf355f4d00000000, + 0xac0c775e00000000, 0x7de4905000000000, 0xd2b566e100000000, + 0x035d81ef00000000, 0x7064a9fc00000000, 0xa18c4ef200000000, + 0x9616f9da00000000, 0x47fe1ed400000000, 0x34c736c700000000, + 0xe52fd1c900000000, 0x5af3599600000000, 0x8b1bbe9800000000, + 0xf822968b00000000, 0x29ca718500000000, 0x1e50c6ad00000000, + 0xcfb821a300000000, 0xbc8109b000000000, 0x6d69eebe00000000, + 0xa324940800000000, 0x72cc730600000000, 0x01f55b1500000000, + 0xd01dbc1b00000000, 0xe7870b3300000000, 0x366fec3d00000000, + 0x4556c42e00000000, 0x94be232000000000, 0x2b62ab7f00000000, + 0xfa8a4c7100000000, 0x89b3646200000000, 0x585b836c00000000, + 0x6fc1344400000000, 0xbe29d34a00000000, 0xcd10fb5900000000, + 0x1cf81c5700000000, 0xb3a9eae600000000, 0x62410de800000000, + 0x117825fb00000000, 0xc090c2f500000000, 0xf70a75dd00000000, + 0x26e292d300000000, 0x55dbbac000000000, 0x84335dce00000000, + 0x3befd59100000000, 0xea07329f00000000, 0x993e1a8c00000000, + 0x48d6fd8200000000, 0x7f4c4aaa00000000, 0xaea4ada400000000, + 0xdd9d85b700000000, 0x0c7562b900000000, 0x8471301e00000000, + 0x5599d71000000000, 0x26a0ff0300000000, 0xf748180d00000000, + 0xc0d2af2500000000, 0x113a482b00000000, 0x6203603800000000, + 0xb3eb873600000000, 0x0c370f6900000000, 0xdddfe86700000000, + 0xaee6c07400000000, 0x7f0e277a00000000, 0x4894905200000000, + 0x997c775c00000000, 0xea455f4f00000000, 0x3badb84100000000, + 0x94fc4ef000000000, 0x4514a9fe00000000, 0x362d81ed00000000, + 0xe7c566e300000000, 0xd05fd1cb00000000, 0x01b736c500000000, + 0x728e1ed600000000, 0xa366f9d800000000, 0x1cba718700000000, + 0xcd52968900000000, 0xbe6bbe9a00000000, 0x6f83599400000000, + 0x5819eebc00000000, 0x89f109b200000000, 0xfac821a100000000, + 0x2b20c6af00000000, 0xe56dbc1900000000, 0x34855b1700000000, + 0x47bc730400000000, 0x9654940a00000000, 0xa1ce232200000000, + 0x7026c42c00000000, 0x031fec3f00000000, 0xd2f70b3100000000, + 0x6d2b836e00000000, 0xbcc3646000000000, 0xcffa4c7300000000, + 0x1e12ab7d00000000, 0x29881c5500000000, 0xf860fb5b00000000, + 0x8b59d34800000000, 0x5ab1344600000000, 0xf5e0c2f700000000, + 0x240825f900000000, 0x57310dea00000000, 0x86d9eae400000000, + 0xb1435dcc00000000, 0x60abbac200000000, 0x139292d100000000, + 0xc27a75df00000000, 0x7da6fd8000000000, 0xac4e1a8e00000000, + 0xdf77329d00000000, 0x0e9fd59300000000, 0x390562bb00000000, + 0xe8ed85b500000000, 0x9bd4ada600000000, 0x4a3c4aa800000000, + 0x4649281100000000, 0x97a1cf1f00000000, 0xe498e70c00000000, + 0x3570000200000000, 0x02eab72a00000000, 0xd302502400000000, + 0xa03b783700000000, 0x71d39f3900000000, 0xce0f176600000000, + 0x1fe7f06800000000, 0x6cded87b00000000, 0xbd363f7500000000, + 0x8aac885d00000000, 0x5b446f5300000000, 0x287d474000000000, + 0xf995a04e00000000, 0x56c456ff00000000, 0x872cb1f100000000, + 0xf41599e200000000, 0x25fd7eec00000000, 0x1267c9c400000000, + 0xc38f2eca00000000, 0xb0b606d900000000, 0x615ee1d700000000, + 0xde82698800000000, 0x0f6a8e8600000000, 0x7c53a69500000000, + 0xadbb419b00000000, 0x9a21f6b300000000, 0x4bc911bd00000000, + 0x38f039ae00000000, 0xe918dea000000000, 0x2755a41600000000, + 0xf6bd431800000000, 0x85846b0b00000000, 0x546c8c0500000000, + 0x63f63b2d00000000, 0xb21edc2300000000, 0xc127f43000000000, + 0x10cf133e00000000, 0xaf139b6100000000, 0x7efb7c6f00000000, + 0x0dc2547c00000000, 0xdc2ab37200000000, 0xebb0045a00000000, + 0x3a58e35400000000, 0x4961cb4700000000, 0x98892c4900000000, + 0x37d8daf800000000, 0xe6303df600000000, 0x950915e500000000, + 0x44e1f2eb00000000, 0x737b45c300000000, 0xa293a2cd00000000, + 0xd1aa8ade00000000, 0x00426dd000000000, 0xbf9ee58f00000000, + 0x6e76028100000000, 0x1d4f2a9200000000, 0xcca7cd9c00000000, + 0xfb3d7ab400000000, 0x2ad59dba00000000, 0x59ecb5a900000000, + 0x880452a700000000}, + {0x0000000000000000, 0xaa05daf100000000, 0x150dc53800000000, + 0xbf081fc900000000, 0x2a1a8a7100000000, 0x801f508000000000, + 0x3f174f4900000000, 0x951295b800000000, 0x543414e300000000, + 0xfe31ce1200000000, 0x4139d1db00000000, 0xeb3c0b2a00000000, + 0x7e2e9e9200000000, 0xd42b446300000000, 0x6b235baa00000000, + 0xc126815b00000000, 0xe96e591d00000000, 0x436b83ec00000000, + 0xfc639c2500000000, 0x566646d400000000, 0xc374d36c00000000, + 0x6971099d00000000, 0xd679165400000000, 0x7c7ccca500000000, + 0xbd5a4dfe00000000, 0x175f970f00000000, 0xa85788c600000000, + 0x0252523700000000, 0x9740c78f00000000, 0x3d451d7e00000000, + 0x824d02b700000000, 0x2848d84600000000, 0xd2ddb23a00000000, + 0x78d868cb00000000, 0xc7d0770200000000, 0x6dd5adf300000000, + 0xf8c7384b00000000, 0x52c2e2ba00000000, 0xedcafd7300000000, + 0x47cf278200000000, 0x86e9a6d900000000, 0x2cec7c2800000000, + 0x93e463e100000000, 0x39e1b91000000000, 0xacf32ca800000000, + 0x06f6f65900000000, 0xb9fee99000000000, 0x13fb336100000000, + 0x3bb3eb2700000000, 0x91b631d600000000, 0x2ebe2e1f00000000, + 0x84bbf4ee00000000, 0x11a9615600000000, 0xbbacbba700000000, + 0x04a4a46e00000000, 0xaea17e9f00000000, 0x6f87ffc400000000, + 0xc582253500000000, 0x7a8a3afc00000000, 0xd08fe00d00000000, + 0x459d75b500000000, 0xef98af4400000000, 0x5090b08d00000000, + 0xfa956a7c00000000, 0xa4bb657500000000, 0x0ebebf8400000000, + 0xb1b6a04d00000000, 0x1bb37abc00000000, 0x8ea1ef0400000000, + 0x24a435f500000000, 0x9bac2a3c00000000, 0x31a9f0cd00000000, + 0xf08f719600000000, 0x5a8aab6700000000, 0xe582b4ae00000000, + 0x4f876e5f00000000, 0xda95fbe700000000, 0x7090211600000000, + 0xcf983edf00000000, 0x659de42e00000000, 0x4dd53c6800000000, + 0xe7d0e69900000000, 0x58d8f95000000000, 0xf2dd23a100000000, + 0x67cfb61900000000, 0xcdca6ce800000000, 0x72c2732100000000, + 0xd8c7a9d000000000, 0x19e1288b00000000, 0xb3e4f27a00000000, + 0x0cecedb300000000, 0xa6e9374200000000, 0x33fba2fa00000000, + 0x99fe780b00000000, 0x26f667c200000000, 0x8cf3bd3300000000, + 0x7666d74f00000000, 0xdc630dbe00000000, 0x636b127700000000, + 0xc96ec88600000000, 0x5c7c5d3e00000000, 0xf67987cf00000000, + 0x4971980600000000, 0xe37442f700000000, 0x2252c3ac00000000, + 0x8857195d00000000, 0x375f069400000000, 0x9d5adc6500000000, + 0x084849dd00000000, 0xa24d932c00000000, 0x1d458ce500000000, + 0xb740561400000000, 0x9f088e5200000000, 0x350d54a300000000, + 0x8a054b6a00000000, 0x2000919b00000000, 0xb512042300000000, + 0x1f17ded200000000, 0xa01fc11b00000000, 0x0a1a1bea00000000, + 0xcb3c9ab100000000, 0x6139404000000000, 0xde315f8900000000, + 0x7434857800000000, 0xe12610c000000000, 0x4b23ca3100000000, + 0xf42bd5f800000000, 0x5e2e0f0900000000, 0x4877cbea00000000, + 0xe272111b00000000, 0x5d7a0ed200000000, 0xf77fd42300000000, + 0x626d419b00000000, 0xc8689b6a00000000, 0x776084a300000000, + 0xdd655e5200000000, 0x1c43df0900000000, 0xb64605f800000000, + 0x094e1a3100000000, 0xa34bc0c000000000, 0x3659557800000000, + 0x9c5c8f8900000000, 0x2354904000000000, 0x89514ab100000000, + 0xa11992f700000000, 0x0b1c480600000000, 0xb41457cf00000000, + 0x1e118d3e00000000, 0x8b03188600000000, 0x2106c27700000000, + 0x9e0eddbe00000000, 0x340b074f00000000, 0xf52d861400000000, + 0x5f285ce500000000, 0xe020432c00000000, 0x4a2599dd00000000, + 0xdf370c6500000000, 0x7532d69400000000, 0xca3ac95d00000000, + 0x603f13ac00000000, 0x9aaa79d000000000, 0x30afa32100000000, + 0x8fa7bce800000000, 0x25a2661900000000, 0xb0b0f3a100000000, + 0x1ab5295000000000, 0xa5bd369900000000, 0x0fb8ec6800000000, + 0xce9e6d3300000000, 0x649bb7c200000000, 0xdb93a80b00000000, + 0x719672fa00000000, 0xe484e74200000000, 0x4e813db300000000, + 0xf189227a00000000, 0x5b8cf88b00000000, 0x73c420cd00000000, + 0xd9c1fa3c00000000, 0x66c9e5f500000000, 0xcccc3f0400000000, + 0x59deaabc00000000, 0xf3db704d00000000, 0x4cd36f8400000000, + 0xe6d6b57500000000, 0x27f0342e00000000, 0x8df5eedf00000000, + 0x32fdf11600000000, 0x98f82be700000000, 0x0deabe5f00000000, + 0xa7ef64ae00000000, 0x18e77b6700000000, 0xb2e2a19600000000, + 0xecccae9f00000000, 0x46c9746e00000000, 0xf9c16ba700000000, + 0x53c4b15600000000, 0xc6d624ee00000000, 0x6cd3fe1f00000000, + 0xd3dbe1d600000000, 0x79de3b2700000000, 0xb8f8ba7c00000000, + 0x12fd608d00000000, 0xadf57f4400000000, 0x07f0a5b500000000, + 0x92e2300d00000000, 0x38e7eafc00000000, 0x87eff53500000000, + 0x2dea2fc400000000, 0x05a2f78200000000, 0xafa72d7300000000, + 0x10af32ba00000000, 0xbaaae84b00000000, 0x2fb87df300000000, + 0x85bda70200000000, 0x3ab5b8cb00000000, 0x90b0623a00000000, + 0x5196e36100000000, 0xfb93399000000000, 0x449b265900000000, + 0xee9efca800000000, 0x7b8c691000000000, 0xd189b3e100000000, + 0x6e81ac2800000000, 0xc48476d900000000, 0x3e111ca500000000, + 0x9414c65400000000, 0x2b1cd99d00000000, 0x8119036c00000000, + 0x140b96d400000000, 0xbe0e4c2500000000, 0x010653ec00000000, + 0xab03891d00000000, 0x6a25084600000000, 0xc020d2b700000000, + 0x7f28cd7e00000000, 0xd52d178f00000000, 0x403f823700000000, + 0xea3a58c600000000, 0x5532470f00000000, 0xff379dfe00000000, + 0xd77f45b800000000, 0x7d7a9f4900000000, 0xc272808000000000, + 0x68775a7100000000, 0xfd65cfc900000000, 0x5760153800000000, + 0xe8680af100000000, 0x426dd00000000000, 0x834b515b00000000, + 0x294e8baa00000000, 0x9646946300000000, 0x3c434e9200000000, + 0xa951db2a00000000, 0x035401db00000000, 0xbc5c1e1200000000, + 0x1659c4e300000000}}; + +#else /* W == 4 */ + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0xae689191, 0x87a02563, 0x29c8b4f2, 0xd4314c87, + 0x7a59dd16, 0x539169e4, 0xfdf9f875, 0x73139f4f, 0xdd7b0ede, + 0xf4b3ba2c, 0x5adb2bbd, 0xa722d3c8, 0x094a4259, 0x2082f6ab, + 0x8eea673a, 0xe6273e9e, 0x484faf0f, 0x61871bfd, 0xcfef8a6c, + 0x32167219, 0x9c7ee388, 0xb5b6577a, 0x1bdec6eb, 0x9534a1d1, + 0x3b5c3040, 0x129484b2, 0xbcfc1523, 0x4105ed56, 0xef6d7cc7, + 0xc6a5c835, 0x68cd59a4, 0x173f7b7d, 0xb957eaec, 0x909f5e1e, + 0x3ef7cf8f, 0xc30e37fa, 0x6d66a66b, 0x44ae1299, 0xeac68308, + 0x642ce432, 0xca4475a3, 0xe38cc151, 0x4de450c0, 0xb01da8b5, + 0x1e753924, 0x37bd8dd6, 0x99d51c47, 0xf11845e3, 0x5f70d472, + 0x76b86080, 0xd8d0f111, 0x25290964, 0x8b4198f5, 0xa2892c07, + 0x0ce1bd96, 0x820bdaac, 0x2c634b3d, 0x05abffcf, 0xabc36e5e, + 0x563a962b, 0xf85207ba, 0xd19ab348, 0x7ff222d9, 0x2e7ef6fa, + 0x8016676b, 0xa9ded399, 0x07b64208, 0xfa4fba7d, 0x54272bec, + 0x7def9f1e, 0xd3870e8f, 0x5d6d69b5, 0xf305f824, 0xdacd4cd6, + 0x74a5dd47, 0x895c2532, 0x2734b4a3, 0x0efc0051, 0xa09491c0, + 0xc859c864, 0x663159f5, 0x4ff9ed07, 0xe1917c96, 0x1c6884e3, + 0xb2001572, 0x9bc8a180, 0x35a03011, 0xbb4a572b, 0x1522c6ba, + 0x3cea7248, 0x9282e3d9, 0x6f7b1bac, 0xc1138a3d, 0xe8db3ecf, + 0x46b3af5e, 0x39418d87, 0x97291c16, 0xbee1a8e4, 0x10893975, + 0xed70c100, 0x43185091, 0x6ad0e463, 0xc4b875f2, 0x4a5212c8, + 0xe43a8359, 0xcdf237ab, 0x639aa63a, 0x9e635e4f, 0x300bcfde, + 0x19c37b2c, 0xb7abeabd, 0xdf66b319, 0x710e2288, 0x58c6967a, + 0xf6ae07eb, 0x0b57ff9e, 0xa53f6e0f, 0x8cf7dafd, 0x229f4b6c, + 0xac752c56, 0x021dbdc7, 0x2bd50935, 0x85bd98a4, 0x784460d1, + 0xd62cf140, 0xffe445b2, 0x518cd423, 0x5cfdedf4, 0xf2957c65, + 0xdb5dc897, 0x75355906, 0x88cca173, 0x26a430e2, 0x0f6c8410, + 0xa1041581, 0x2fee72bb, 0x8186e32a, 0xa84e57d8, 0x0626c649, + 0xfbdf3e3c, 0x55b7afad, 0x7c7f1b5f, 0xd2178ace, 0xbadad36a, + 0x14b242fb, 0x3d7af609, 0x93126798, 0x6eeb9fed, 0xc0830e7c, + 0xe94bba8e, 0x47232b1f, 0xc9c94c25, 0x67a1ddb4, 0x4e696946, + 0xe001f8d7, 0x1df800a2, 0xb3909133, 0x9a5825c1, 0x3430b450, + 0x4bc29689, 0xe5aa0718, 0xcc62b3ea, 0x620a227b, 0x9ff3da0e, + 0x319b4b9f, 0x1853ff6d, 0xb63b6efc, 0x38d109c6, 0x96b99857, + 0xbf712ca5, 0x1119bd34, 0xece04541, 0x4288d4d0, 0x6b406022, + 0xc528f1b3, 0xade5a817, 0x038d3986, 0x2a458d74, 0x842d1ce5, + 0x79d4e490, 0xd7bc7501, 0xfe74c1f3, 0x501c5062, 0xdef63758, + 0x709ea6c9, 0x5956123b, 0xf73e83aa, 0x0ac77bdf, 0xa4afea4e, + 0x8d675ebc, 0x230fcf2d, 0x72831b0e, 0xdceb8a9f, 0xf5233e6d, + 0x5b4baffc, 0xa6b25789, 0x08dac618, 0x211272ea, 0x8f7ae37b, + 0x01908441, 0xaff815d0, 0x8630a122, 0x285830b3, 0xd5a1c8c6, + 0x7bc95957, 0x5201eda5, 0xfc697c34, 0x94a42590, 0x3accb401, + 0x130400f3, 0xbd6c9162, 0x40956917, 0xeefdf886, 0xc7354c74, + 0x695ddde5, 0xe7b7badf, 0x49df2b4e, 0x60179fbc, 0xce7f0e2d, + 0x3386f658, 0x9dee67c9, 0xb426d33b, 0x1a4e42aa, 0x65bc6073, + 0xcbd4f1e2, 0xe21c4510, 0x4c74d481, 0xb18d2cf4, 0x1fe5bd65, + 0x362d0997, 0x98459806, 0x16afff3c, 0xb8c76ead, 0x910fda5f, + 0x3f674bce, 0xc29eb3bb, 0x6cf6222a, 0x453e96d8, 0xeb560749, + 0x839b5eed, 0x2df3cf7c, 0x043b7b8e, 0xaa53ea1f, 0x57aa126a, + 0xf9c283fb, 0xd00a3709, 0x7e62a698, 0xf088c1a2, 0x5ee05033, + 0x7728e4c1, 0xd9407550, 0x24b98d25, 0x8ad11cb4, 0xa319a846, + 0x0d7139d7}, + {0x00000000, 0xb9fbdbe8, 0xa886b191, 0x117d6a79, 0x8a7c6563, + 0x3387be8b, 0x22fad4f2, 0x9b010f1a, 0xcf89cc87, 0x7672176f, + 0x670f7d16, 0xdef4a6fe, 0x45f5a9e4, 0xfc0e720c, 0xed731875, + 0x5488c39d, 0x44629f4f, 0xfd9944a7, 0xece42ede, 0x551ff536, + 0xce1efa2c, 0x77e521c4, 0x66984bbd, 0xdf639055, 0x8beb53c8, + 0x32108820, 0x236de259, 0x9a9639b1, 0x019736ab, 0xb86ced43, + 0xa911873a, 0x10ea5cd2, 0x88c53e9e, 0x313ee576, 0x20438f0f, + 0x99b854e7, 0x02b95bfd, 0xbb428015, 0xaa3fea6c, 0x13c43184, + 0x474cf219, 0xfeb729f1, 0xefca4388, 0x56319860, 0xcd30977a, + 0x74cb4c92, 0x65b626eb, 0xdc4dfd03, 0xcca7a1d1, 0x755c7a39, + 0x64211040, 0xdddacba8, 0x46dbc4b2, 0xff201f5a, 0xee5d7523, + 0x57a6aecb, 0x032e6d56, 0xbad5b6be, 0xaba8dcc7, 0x1253072f, + 0x89520835, 0x30a9d3dd, 0x21d4b9a4, 0x982f624c, 0xcafb7b7d, + 0x7300a095, 0x627dcaec, 0xdb861104, 0x40871e1e, 0xf97cc5f6, + 0xe801af8f, 0x51fa7467, 0x0572b7fa, 0xbc896c12, 0xadf4066b, + 0x140fdd83, 0x8f0ed299, 0x36f50971, 0x27886308, 0x9e73b8e0, + 0x8e99e432, 0x37623fda, 0x261f55a3, 0x9fe48e4b, 0x04e58151, + 0xbd1e5ab9, 0xac6330c0, 0x1598eb28, 0x411028b5, 0xf8ebf35d, + 0xe9969924, 0x506d42cc, 0xcb6c4dd6, 0x7297963e, 0x63eafc47, + 0xda1127af, 0x423e45e3, 0xfbc59e0b, 0xeab8f472, 0x53432f9a, + 0xc8422080, 0x71b9fb68, 0x60c49111, 0xd93f4af9, 0x8db78964, + 0x344c528c, 0x253138f5, 0x9ccae31d, 0x07cbec07, 0xbe3037ef, + 0xaf4d5d96, 0x16b6867e, 0x065cdaac, 0xbfa70144, 0xaeda6b3d, + 0x1721b0d5, 0x8c20bfcf, 0x35db6427, 0x24a60e5e, 0x9d5dd5b6, + 0xc9d5162b, 0x702ecdc3, 0x6153a7ba, 0xd8a87c52, 0x43a97348, + 0xfa52a8a0, 0xeb2fc2d9, 0x52d41931, 0x4e87f0bb, 0xf77c2b53, + 0xe601412a, 0x5ffa9ac2, 0xc4fb95d8, 0x7d004e30, 0x6c7d2449, + 0xd586ffa1, 0x810e3c3c, 0x38f5e7d4, 0x29888dad, 0x90735645, + 0x0b72595f, 0xb28982b7, 0xa3f4e8ce, 0x1a0f3326, 0x0ae56ff4, + 0xb31eb41c, 0xa263de65, 0x1b98058d, 0x80990a97, 0x3962d17f, + 0x281fbb06, 0x91e460ee, 0xc56ca373, 0x7c97789b, 0x6dea12e2, + 0xd411c90a, 0x4f10c610, 0xf6eb1df8, 0xe7967781, 0x5e6dac69, + 0xc642ce25, 0x7fb915cd, 0x6ec47fb4, 0xd73fa45c, 0x4c3eab46, + 0xf5c570ae, 0xe4b81ad7, 0x5d43c13f, 0x09cb02a2, 0xb030d94a, + 0xa14db333, 0x18b668db, 0x83b767c1, 0x3a4cbc29, 0x2b31d650, + 0x92ca0db8, 0x8220516a, 0x3bdb8a82, 0x2aa6e0fb, 0x935d3b13, + 0x085c3409, 0xb1a7efe1, 0xa0da8598, 0x19215e70, 0x4da99ded, + 0xf4524605, 0xe52f2c7c, 0x5cd4f794, 0xc7d5f88e, 0x7e2e2366, + 0x6f53491f, 0xd6a892f7, 0x847c8bc6, 0x3d87502e, 0x2cfa3a57, + 0x9501e1bf, 0x0e00eea5, 0xb7fb354d, 0xa6865f34, 0x1f7d84dc, + 0x4bf54741, 0xf20e9ca9, 0xe373f6d0, 0x5a882d38, 0xc1892222, + 0x7872f9ca, 0x690f93b3, 0xd0f4485b, 0xc01e1489, 0x79e5cf61, + 0x6898a518, 0xd1637ef0, 0x4a6271ea, 0xf399aa02, 0xe2e4c07b, + 0x5b1f1b93, 0x0f97d80e, 0xb66c03e6, 0xa711699f, 0x1eeab277, + 0x85ebbd6d, 0x3c106685, 0x2d6d0cfc, 0x9496d714, 0x0cb9b558, + 0xb5426eb0, 0xa43f04c9, 0x1dc4df21, 0x86c5d03b, 0x3f3e0bd3, + 0x2e4361aa, 0x97b8ba42, 0xc33079df, 0x7acba237, 0x6bb6c84e, + 0xd24d13a6, 0x494c1cbc, 0xf0b7c754, 0xe1caad2d, 0x583176c5, + 0x48db2a17, 0xf120f1ff, 0xe05d9b86, 0x59a6406e, 0xc2a74f74, + 0x7b5c949c, 0x6a21fee5, 0xd3da250d, 0x8752e690, 0x3ea93d78, + 0x2fd45701, 0x962f8ce9, 0x0d2e83f3, 0xb4d5581b, 0xa5a83262, + 0x1c53e98a}, + {0x00000000, 0x9d0fe176, 0xe16ec4ad, 0x7c6125db, 0x19ac8f1b, + 0x84a36e6d, 0xf8c24bb6, 0x65cdaac0, 0x33591e36, 0xae56ff40, + 0xd237da9b, 0x4f383bed, 0x2af5912d, 0xb7fa705b, 0xcb9b5580, + 0x5694b4f6, 0x66b23c6c, 0xfbbddd1a, 0x87dcf8c1, 0x1ad319b7, + 0x7f1eb377, 0xe2115201, 0x9e7077da, 0x037f96ac, 0x55eb225a, + 0xc8e4c32c, 0xb485e6f7, 0x298a0781, 0x4c47ad41, 0xd1484c37, + 0xad2969ec, 0x3026889a, 0xcd6478d8, 0x506b99ae, 0x2c0abc75, + 0xb1055d03, 0xd4c8f7c3, 0x49c716b5, 0x35a6336e, 0xa8a9d218, + 0xfe3d66ee, 0x63328798, 0x1f53a243, 0x825c4335, 0xe791e9f5, + 0x7a9e0883, 0x06ff2d58, 0x9bf0cc2e, 0xabd644b4, 0x36d9a5c2, + 0x4ab88019, 0xd7b7616f, 0xb27acbaf, 0x2f752ad9, 0x53140f02, + 0xce1bee74, 0x988f5a82, 0x0580bbf4, 0x79e19e2f, 0xe4ee7f59, + 0x8123d599, 0x1c2c34ef, 0x604d1134, 0xfd42f042, 0x41b9f7f1, + 0xdcb61687, 0xa0d7335c, 0x3dd8d22a, 0x581578ea, 0xc51a999c, + 0xb97bbc47, 0x24745d31, 0x72e0e9c7, 0xefef08b1, 0x938e2d6a, + 0x0e81cc1c, 0x6b4c66dc, 0xf64387aa, 0x8a22a271, 0x172d4307, + 0x270bcb9d, 0xba042aeb, 0xc6650f30, 0x5b6aee46, 0x3ea74486, + 0xa3a8a5f0, 0xdfc9802b, 0x42c6615d, 0x1452d5ab, 0x895d34dd, + 0xf53c1106, 0x6833f070, 0x0dfe5ab0, 0x90f1bbc6, 0xec909e1d, + 0x719f7f6b, 0x8cdd8f29, 0x11d26e5f, 0x6db34b84, 0xf0bcaaf2, + 0x95710032, 0x087ee144, 0x741fc49f, 0xe91025e9, 0xbf84911f, + 0x228b7069, 0x5eea55b2, 0xc3e5b4c4, 0xa6281e04, 0x3b27ff72, + 0x4746daa9, 0xda493bdf, 0xea6fb345, 0x77605233, 0x0b0177e8, + 0x960e969e, 0xf3c33c5e, 0x6eccdd28, 0x12adf8f3, 0x8fa21985, + 0xd936ad73, 0x44394c05, 0x385869de, 0xa55788a8, 0xc09a2268, + 0x5d95c31e, 0x21f4e6c5, 0xbcfb07b3, 0x8373efe2, 0x1e7c0e94, + 0x621d2b4f, 0xff12ca39, 0x9adf60f9, 0x07d0818f, 0x7bb1a454, + 0xe6be4522, 0xb02af1d4, 0x2d2510a2, 0x51443579, 0xcc4bd40f, + 0xa9867ecf, 0x34899fb9, 0x48e8ba62, 0xd5e75b14, 0xe5c1d38e, + 0x78ce32f8, 0x04af1723, 0x99a0f655, 0xfc6d5c95, 0x6162bde3, + 0x1d039838, 0x800c794e, 0xd698cdb8, 0x4b972cce, 0x37f60915, + 0xaaf9e863, 0xcf3442a3, 0x523ba3d5, 0x2e5a860e, 0xb3556778, + 0x4e17973a, 0xd318764c, 0xaf795397, 0x3276b2e1, 0x57bb1821, + 0xcab4f957, 0xb6d5dc8c, 0x2bda3dfa, 0x7d4e890c, 0xe041687a, + 0x9c204da1, 0x012facd7, 0x64e20617, 0xf9ede761, 0x858cc2ba, + 0x188323cc, 0x28a5ab56, 0xb5aa4a20, 0xc9cb6ffb, 0x54c48e8d, + 0x3109244d, 0xac06c53b, 0xd067e0e0, 0x4d680196, 0x1bfcb560, + 0x86f35416, 0xfa9271cd, 0x679d90bb, 0x02503a7b, 0x9f5fdb0d, + 0xe33efed6, 0x7e311fa0, 0xc2ca1813, 0x5fc5f965, 0x23a4dcbe, + 0xbeab3dc8, 0xdb669708, 0x4669767e, 0x3a0853a5, 0xa707b2d3, + 0xf1930625, 0x6c9ce753, 0x10fdc288, 0x8df223fe, 0xe83f893e, + 0x75306848, 0x09514d93, 0x945eace5, 0xa478247f, 0x3977c509, + 0x4516e0d2, 0xd81901a4, 0xbdd4ab64, 0x20db4a12, 0x5cba6fc9, + 0xc1b58ebf, 0x97213a49, 0x0a2edb3f, 0x764ffee4, 0xeb401f92, + 0x8e8db552, 0x13825424, 0x6fe371ff, 0xf2ec9089, 0x0fae60cb, + 0x92a181bd, 0xeec0a466, 0x73cf4510, 0x1602efd0, 0x8b0d0ea6, + 0xf76c2b7d, 0x6a63ca0b, 0x3cf77efd, 0xa1f89f8b, 0xdd99ba50, + 0x40965b26, 0x255bf1e6, 0xb8541090, 0xc435354b, 0x593ad43d, + 0x691c5ca7, 0xf413bdd1, 0x8872980a, 0x157d797c, 0x70b0d3bc, + 0xedbf32ca, 0x91de1711, 0x0cd1f667, 0x5a454291, 0xc74aa3e7, + 0xbb2b863c, 0x2624674a, 0x43e9cd8a, 0xdee62cfc, 0xa2870927, + 0x3f88e851}, + {0x00000000, 0xdd96d985, 0x605cb54b, 0xbdca6cce, 0xc0b96a96, + 0x1d2fb313, 0xa0e5dfdd, 0x7d730658, 0x5a03d36d, 0x87950ae8, + 0x3a5f6626, 0xe7c9bfa3, 0x9abab9fb, 0x472c607e, 0xfae60cb0, + 0x2770d535, 0xb407a6da, 0x69917f5f, 0xd45b1391, 0x09cdca14, + 0x74becc4c, 0xa92815c9, 0x14e27907, 0xc974a082, 0xee0475b7, + 0x3392ac32, 0x8e58c0fc, 0x53ce1979, 0x2ebd1f21, 0xf32bc6a4, + 0x4ee1aa6a, 0x937773ef, 0xb37e4bf5, 0x6ee89270, 0xd322febe, + 0x0eb4273b, 0x73c72163, 0xae51f8e6, 0x139b9428, 0xce0d4dad, + 0xe97d9898, 0x34eb411d, 0x89212dd3, 0x54b7f456, 0x29c4f20e, + 0xf4522b8b, 0x49984745, 0x940e9ec0, 0x0779ed2f, 0xdaef34aa, + 0x67255864, 0xbab381e1, 0xc7c087b9, 0x1a565e3c, 0xa79c32f2, + 0x7a0aeb77, 0x5d7a3e42, 0x80ece7c7, 0x3d268b09, 0xe0b0528c, + 0x9dc354d4, 0x40558d51, 0xfd9fe19f, 0x2009381a, 0xbd8d91ab, + 0x601b482e, 0xddd124e0, 0x0047fd65, 0x7d34fb3d, 0xa0a222b8, + 0x1d684e76, 0xc0fe97f3, 0xe78e42c6, 0x3a189b43, 0x87d2f78d, + 0x5a442e08, 0x27372850, 0xfaa1f1d5, 0x476b9d1b, 0x9afd449e, + 0x098a3771, 0xd41ceef4, 0x69d6823a, 0xb4405bbf, 0xc9335de7, + 0x14a58462, 0xa96fe8ac, 0x74f93129, 0x5389e41c, 0x8e1f3d99, + 0x33d55157, 0xee4388d2, 0x93308e8a, 0x4ea6570f, 0xf36c3bc1, + 0x2efae244, 0x0ef3da5e, 0xd36503db, 0x6eaf6f15, 0xb339b690, + 0xce4ab0c8, 0x13dc694d, 0xae160583, 0x7380dc06, 0x54f00933, + 0x8966d0b6, 0x34acbc78, 0xe93a65fd, 0x944963a5, 0x49dfba20, + 0xf415d6ee, 0x29830f6b, 0xbaf47c84, 0x6762a501, 0xdaa8c9cf, + 0x073e104a, 0x7a4d1612, 0xa7dbcf97, 0x1a11a359, 0xc7877adc, + 0xe0f7afe9, 0x3d61766c, 0x80ab1aa2, 0x5d3dc327, 0x204ec57f, + 0xfdd81cfa, 0x40127034, 0x9d84a9b1, 0xa06a2517, 0x7dfcfc92, + 0xc036905c, 0x1da049d9, 0x60d34f81, 0xbd459604, 0x008ffaca, + 0xdd19234f, 0xfa69f67a, 0x27ff2fff, 0x9a354331, 0x47a39ab4, + 0x3ad09cec, 0xe7464569, 0x5a8c29a7, 0x871af022, 0x146d83cd, + 0xc9fb5a48, 0x74313686, 0xa9a7ef03, 0xd4d4e95b, 0x094230de, + 0xb4885c10, 0x691e8595, 0x4e6e50a0, 0x93f88925, 0x2e32e5eb, + 0xf3a43c6e, 0x8ed73a36, 0x5341e3b3, 0xee8b8f7d, 0x331d56f8, + 0x13146ee2, 0xce82b767, 0x7348dba9, 0xaede022c, 0xd3ad0474, + 0x0e3bddf1, 0xb3f1b13f, 0x6e6768ba, 0x4917bd8f, 0x9481640a, + 0x294b08c4, 0xf4ddd141, 0x89aed719, 0x54380e9c, 0xe9f26252, + 0x3464bbd7, 0xa713c838, 0x7a8511bd, 0xc74f7d73, 0x1ad9a4f6, + 0x67aaa2ae, 0xba3c7b2b, 0x07f617e5, 0xda60ce60, 0xfd101b55, + 0x2086c2d0, 0x9d4cae1e, 0x40da779b, 0x3da971c3, 0xe03fa846, + 0x5df5c488, 0x80631d0d, 0x1de7b4bc, 0xc0716d39, 0x7dbb01f7, + 0xa02dd872, 0xdd5ede2a, 0x00c807af, 0xbd026b61, 0x6094b2e4, + 0x47e467d1, 0x9a72be54, 0x27b8d29a, 0xfa2e0b1f, 0x875d0d47, + 0x5acbd4c2, 0xe701b80c, 0x3a976189, 0xa9e01266, 0x7476cbe3, + 0xc9bca72d, 0x142a7ea8, 0x695978f0, 0xb4cfa175, 0x0905cdbb, + 0xd493143e, 0xf3e3c10b, 0x2e75188e, 0x93bf7440, 0x4e29adc5, + 0x335aab9d, 0xeecc7218, 0x53061ed6, 0x8e90c753, 0xae99ff49, + 0x730f26cc, 0xcec54a02, 0x13539387, 0x6e2095df, 0xb3b64c5a, + 0x0e7c2094, 0xd3eaf911, 0xf49a2c24, 0x290cf5a1, 0x94c6996f, + 0x495040ea, 0x342346b2, 0xe9b59f37, 0x547ff3f9, 0x89e92a7c, + 0x1a9e5993, 0xc7088016, 0x7ac2ecd8, 0xa754355d, 0xda273305, + 0x07b1ea80, 0xba7b864e, 0x67ed5fcb, 0x409d8afe, 0x9d0b537b, + 0x20c13fb5, 0xfd57e630, 0x8024e068, 0x5db239ed, 0xe0785523, + 0x3dee8ca6}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x00000000, 0x85d996dd, 0x4bb55c60, 0xce6ccabd, 0x966ab9c0, + 0x13b32f1d, 0xdddfe5a0, 0x5806737d, 0x6dd3035a, 0xe80a9587, + 0x26665f3a, 0xa3bfc9e7, 0xfbb9ba9a, 0x7e602c47, 0xb00ce6fa, + 0x35d57027, 0xdaa607b4, 0x5f7f9169, 0x91135bd4, 0x14cacd09, + 0x4cccbe74, 0xc91528a9, 0x0779e214, 0x82a074c9, 0xb77504ee, + 0x32ac9233, 0xfcc0588e, 0x7919ce53, 0x211fbd2e, 0xa4c62bf3, + 0x6aaae14e, 0xef737793, 0xf54b7eb3, 0x7092e86e, 0xbefe22d3, + 0x3b27b40e, 0x6321c773, 0xe6f851ae, 0x28949b13, 0xad4d0dce, + 0x98987de9, 0x1d41eb34, 0xd32d2189, 0x56f4b754, 0x0ef2c429, + 0x8b2b52f4, 0x45479849, 0xc09e0e94, 0x2fed7907, 0xaa34efda, + 0x64582567, 0xe181b3ba, 0xb987c0c7, 0x3c5e561a, 0xf2329ca7, + 0x77eb0a7a, 0x423e7a5d, 0xc7e7ec80, 0x098b263d, 0x8c52b0e0, + 0xd454c39d, 0x518d5540, 0x9fe19ffd, 0x1a380920, 0xab918dbd, + 0x2e481b60, 0xe024d1dd, 0x65fd4700, 0x3dfb347d, 0xb822a2a0, + 0x764e681d, 0xf397fec0, 0xc6428ee7, 0x439b183a, 0x8df7d287, + 0x082e445a, 0x50283727, 0xd5f1a1fa, 0x1b9d6b47, 0x9e44fd9a, + 0x71378a09, 0xf4ee1cd4, 0x3a82d669, 0xbf5b40b4, 0xe75d33c9, + 0x6284a514, 0xace86fa9, 0x2931f974, 0x1ce48953, 0x993d1f8e, + 0x5751d533, 0xd28843ee, 0x8a8e3093, 0x0f57a64e, 0xc13b6cf3, + 0x44e2fa2e, 0x5edaf30e, 0xdb0365d3, 0x156faf6e, 0x90b639b3, + 0xc8b04ace, 0x4d69dc13, 0x830516ae, 0x06dc8073, 0x3309f054, + 0xb6d06689, 0x78bcac34, 0xfd653ae9, 0xa5634994, 0x20badf49, + 0xeed615f4, 0x6b0f8329, 0x847cf4ba, 0x01a56267, 0xcfc9a8da, + 0x4a103e07, 0x12164d7a, 0x97cfdba7, 0x59a3111a, 0xdc7a87c7, + 0xe9aff7e0, 0x6c76613d, 0xa21aab80, 0x27c33d5d, 0x7fc54e20, + 0xfa1cd8fd, 0x34701240, 0xb1a9849d, 0x17256aa0, 0x92fcfc7d, + 0x5c9036c0, 0xd949a01d, 0x814fd360, 0x049645bd, 0xcafa8f00, + 0x4f2319dd, 0x7af669fa, 0xff2fff27, 0x3143359a, 0xb49aa347, + 0xec9cd03a, 0x694546e7, 0xa7298c5a, 0x22f01a87, 0xcd836d14, + 0x485afbc9, 0x86363174, 0x03efa7a9, 0x5be9d4d4, 0xde304209, + 0x105c88b4, 0x95851e69, 0xa0506e4e, 0x2589f893, 0xebe5322e, + 0x6e3ca4f3, 0x363ad78e, 0xb3e34153, 0x7d8f8bee, 0xf8561d33, + 0xe26e1413, 0x67b782ce, 0xa9db4873, 0x2c02deae, 0x7404add3, + 0xf1dd3b0e, 0x3fb1f1b3, 0xba68676e, 0x8fbd1749, 0x0a648194, + 0xc4084b29, 0x41d1ddf4, 0x19d7ae89, 0x9c0e3854, 0x5262f2e9, + 0xd7bb6434, 0x38c813a7, 0xbd11857a, 0x737d4fc7, 0xf6a4d91a, + 0xaea2aa67, 0x2b7b3cba, 0xe517f607, 0x60ce60da, 0x551b10fd, + 0xd0c28620, 0x1eae4c9d, 0x9b77da40, 0xc371a93d, 0x46a83fe0, + 0x88c4f55d, 0x0d1d6380, 0xbcb4e71d, 0x396d71c0, 0xf701bb7d, + 0x72d82da0, 0x2ade5edd, 0xaf07c800, 0x616b02bd, 0xe4b29460, + 0xd167e447, 0x54be729a, 0x9ad2b827, 0x1f0b2efa, 0x470d5d87, + 0xc2d4cb5a, 0x0cb801e7, 0x8961973a, 0x6612e0a9, 0xe3cb7674, + 0x2da7bcc9, 0xa87e2a14, 0xf0785969, 0x75a1cfb4, 0xbbcd0509, + 0x3e1493d4, 0x0bc1e3f3, 0x8e18752e, 0x4074bf93, 0xc5ad294e, + 0x9dab5a33, 0x1872ccee, 0xd61e0653, 0x53c7908e, 0x49ff99ae, + 0xcc260f73, 0x024ac5ce, 0x87935313, 0xdf95206e, 0x5a4cb6b3, + 0x94207c0e, 0x11f9ead3, 0x242c9af4, 0xa1f50c29, 0x6f99c694, + 0xea405049, 0xb2462334, 0x379fb5e9, 0xf9f37f54, 0x7c2ae989, + 0x93599e1a, 0x168008c7, 0xd8ecc27a, 0x5d3554a7, 0x053327da, + 0x80eab107, 0x4e867bba, 0xcb5fed67, 0xfe8a9d40, 0x7b530b9d, + 0xb53fc120, 0x30e657fd, 0x68e02480, 0xed39b25d, 0x235578e0, + 0xa68cee3d}, + {0x00000000, 0x76e10f9d, 0xadc46ee1, 0xdb25617c, 0x1b8fac19, + 0x6d6ea384, 0xb64bc2f8, 0xc0aacd65, 0x361e5933, 0x40ff56ae, + 0x9bda37d2, 0xed3b384f, 0x2d91f52a, 0x5b70fab7, 0x80559bcb, + 0xf6b49456, 0x6c3cb266, 0x1addbdfb, 0xc1f8dc87, 0xb719d31a, + 0x77b31e7f, 0x015211e2, 0xda77709e, 0xac967f03, 0x5a22eb55, + 0x2cc3e4c8, 0xf7e685b4, 0x81078a29, 0x41ad474c, 0x374c48d1, + 0xec6929ad, 0x9a882630, 0xd87864cd, 0xae996b50, 0x75bc0a2c, + 0x035d05b1, 0xc3f7c8d4, 0xb516c749, 0x6e33a635, 0x18d2a9a8, + 0xee663dfe, 0x98873263, 0x43a2531f, 0x35435c82, 0xf5e991e7, + 0x83089e7a, 0x582dff06, 0x2eccf09b, 0xb444d6ab, 0xc2a5d936, + 0x1980b84a, 0x6f61b7d7, 0xafcb7ab2, 0xd92a752f, 0x020f1453, + 0x74ee1bce, 0x825a8f98, 0xf4bb8005, 0x2f9ee179, 0x597feee4, + 0x99d52381, 0xef342c1c, 0x34114d60, 0x42f042fd, 0xf1f7b941, + 0x8716b6dc, 0x5c33d7a0, 0x2ad2d83d, 0xea781558, 0x9c991ac5, + 0x47bc7bb9, 0x315d7424, 0xc7e9e072, 0xb108efef, 0x6a2d8e93, + 0x1ccc810e, 0xdc664c6b, 0xaa8743f6, 0x71a2228a, 0x07432d17, + 0x9dcb0b27, 0xeb2a04ba, 0x300f65c6, 0x46ee6a5b, 0x8644a73e, + 0xf0a5a8a3, 0x2b80c9df, 0x5d61c642, 0xabd55214, 0xdd345d89, + 0x06113cf5, 0x70f03368, 0xb05afe0d, 0xc6bbf190, 0x1d9e90ec, + 0x6b7f9f71, 0x298fdd8c, 0x5f6ed211, 0x844bb36d, 0xf2aabcf0, + 0x32007195, 0x44e17e08, 0x9fc41f74, 0xe92510e9, 0x1f9184bf, + 0x69708b22, 0xb255ea5e, 0xc4b4e5c3, 0x041e28a6, 0x72ff273b, + 0xa9da4647, 0xdf3b49da, 0x45b36fea, 0x33526077, 0xe877010b, + 0x9e960e96, 0x5e3cc3f3, 0x28ddcc6e, 0xf3f8ad12, 0x8519a28f, + 0x73ad36d9, 0x054c3944, 0xde695838, 0xa88857a5, 0x68229ac0, + 0x1ec3955d, 0xc5e6f421, 0xb307fbbc, 0xe2ef7383, 0x940e7c1e, + 0x4f2b1d62, 0x39ca12ff, 0xf960df9a, 0x8f81d007, 0x54a4b17b, + 0x2245bee6, 0xd4f12ab0, 0xa210252d, 0x79354451, 0x0fd44bcc, + 0xcf7e86a9, 0xb99f8934, 0x62bae848, 0x145be7d5, 0x8ed3c1e5, + 0xf832ce78, 0x2317af04, 0x55f6a099, 0x955c6dfc, 0xe3bd6261, + 0x3898031d, 0x4e790c80, 0xb8cd98d6, 0xce2c974b, 0x1509f637, + 0x63e8f9aa, 0xa34234cf, 0xd5a33b52, 0x0e865a2e, 0x786755b3, + 0x3a97174e, 0x4c7618d3, 0x975379af, 0xe1b27632, 0x2118bb57, + 0x57f9b4ca, 0x8cdcd5b6, 0xfa3dda2b, 0x0c894e7d, 0x7a6841e0, + 0xa14d209c, 0xd7ac2f01, 0x1706e264, 0x61e7edf9, 0xbac28c85, + 0xcc238318, 0x56aba528, 0x204aaab5, 0xfb6fcbc9, 0x8d8ec454, + 0x4d240931, 0x3bc506ac, 0xe0e067d0, 0x9601684d, 0x60b5fc1b, + 0x1654f386, 0xcd7192fa, 0xbb909d67, 0x7b3a5002, 0x0ddb5f9f, + 0xd6fe3ee3, 0xa01f317e, 0x1318cac2, 0x65f9c55f, 0xbedca423, + 0xc83dabbe, 0x089766db, 0x7e766946, 0xa553083a, 0xd3b207a7, + 0x250693f1, 0x53e79c6c, 0x88c2fd10, 0xfe23f28d, 0x3e893fe8, + 0x48683075, 0x934d5109, 0xe5ac5e94, 0x7f2478a4, 0x09c57739, + 0xd2e01645, 0xa40119d8, 0x64abd4bd, 0x124adb20, 0xc96fba5c, + 0xbf8eb5c1, 0x493a2197, 0x3fdb2e0a, 0xe4fe4f76, 0x921f40eb, + 0x52b58d8e, 0x24548213, 0xff71e36f, 0x8990ecf2, 0xcb60ae0f, + 0xbd81a192, 0x66a4c0ee, 0x1045cf73, 0xd0ef0216, 0xa60e0d8b, + 0x7d2b6cf7, 0x0bca636a, 0xfd7ef73c, 0x8b9ff8a1, 0x50ba99dd, + 0x265b9640, 0xe6f15b25, 0x901054b8, 0x4b3535c4, 0x3dd43a59, + 0xa75c1c69, 0xd1bd13f4, 0x0a987288, 0x7c797d15, 0xbcd3b070, + 0xca32bfed, 0x1117de91, 0x67f6d10c, 0x9142455a, 0xe7a34ac7, + 0x3c862bbb, 0x4a672426, 0x8acde943, 0xfc2ce6de, 0x270987a2, + 0x51e8883f}, + {0x00000000, 0xe8dbfbb9, 0x91b186a8, 0x796a7d11, 0x63657c8a, + 0x8bbe8733, 0xf2d4fa22, 0x1a0f019b, 0x87cc89cf, 0x6f177276, + 0x167d0f67, 0xfea6f4de, 0xe4a9f545, 0x0c720efc, 0x751873ed, + 0x9dc38854, 0x4f9f6244, 0xa74499fd, 0xde2ee4ec, 0x36f51f55, + 0x2cfa1ece, 0xc421e577, 0xbd4b9866, 0x559063df, 0xc853eb8b, + 0x20881032, 0x59e26d23, 0xb139969a, 0xab369701, 0x43ed6cb8, + 0x3a8711a9, 0xd25cea10, 0x9e3ec588, 0x76e53e31, 0x0f8f4320, + 0xe754b899, 0xfd5bb902, 0x158042bb, 0x6cea3faa, 0x8431c413, + 0x19f24c47, 0xf129b7fe, 0x8843caef, 0x60983156, 0x7a9730cd, + 0x924ccb74, 0xeb26b665, 0x03fd4ddc, 0xd1a1a7cc, 0x397a5c75, + 0x40102164, 0xa8cbdadd, 0xb2c4db46, 0x5a1f20ff, 0x23755dee, + 0xcbaea657, 0x566d2e03, 0xbeb6d5ba, 0xc7dca8ab, 0x2f075312, + 0x35085289, 0xddd3a930, 0xa4b9d421, 0x4c622f98, 0x7d7bfbca, + 0x95a00073, 0xecca7d62, 0x041186db, 0x1e1e8740, 0xf6c57cf9, + 0x8faf01e8, 0x6774fa51, 0xfab77205, 0x126c89bc, 0x6b06f4ad, + 0x83dd0f14, 0x99d20e8f, 0x7109f536, 0x08638827, 0xe0b8739e, + 0x32e4998e, 0xda3f6237, 0xa3551f26, 0x4b8ee49f, 0x5181e504, + 0xb95a1ebd, 0xc03063ac, 0x28eb9815, 0xb5281041, 0x5df3ebf8, + 0x249996e9, 0xcc426d50, 0xd64d6ccb, 0x3e969772, 0x47fcea63, + 0xaf2711da, 0xe3453e42, 0x0b9ec5fb, 0x72f4b8ea, 0x9a2f4353, + 0x802042c8, 0x68fbb971, 0x1191c460, 0xf94a3fd9, 0x6489b78d, + 0x8c524c34, 0xf5383125, 0x1de3ca9c, 0x07eccb07, 0xef3730be, + 0x965d4daf, 0x7e86b616, 0xacda5c06, 0x4401a7bf, 0x3d6bdaae, + 0xd5b02117, 0xcfbf208c, 0x2764db35, 0x5e0ea624, 0xb6d55d9d, + 0x2b16d5c9, 0xc3cd2e70, 0xbaa75361, 0x527ca8d8, 0x4873a943, + 0xa0a852fa, 0xd9c22feb, 0x3119d452, 0xbbf0874e, 0x532b7cf7, + 0x2a4101e6, 0xc29afa5f, 0xd895fbc4, 0x304e007d, 0x49247d6c, + 0xa1ff86d5, 0x3c3c0e81, 0xd4e7f538, 0xad8d8829, 0x45567390, + 0x5f59720b, 0xb78289b2, 0xcee8f4a3, 0x26330f1a, 0xf46fe50a, + 0x1cb41eb3, 0x65de63a2, 0x8d05981b, 0x970a9980, 0x7fd16239, + 0x06bb1f28, 0xee60e491, 0x73a36cc5, 0x9b78977c, 0xe212ea6d, + 0x0ac911d4, 0x10c6104f, 0xf81debf6, 0x817796e7, 0x69ac6d5e, + 0x25ce42c6, 0xcd15b97f, 0xb47fc46e, 0x5ca43fd7, 0x46ab3e4c, + 0xae70c5f5, 0xd71ab8e4, 0x3fc1435d, 0xa202cb09, 0x4ad930b0, + 0x33b34da1, 0xdb68b618, 0xc167b783, 0x29bc4c3a, 0x50d6312b, + 0xb80dca92, 0x6a512082, 0x828adb3b, 0xfbe0a62a, 0x133b5d93, + 0x09345c08, 0xe1efa7b1, 0x9885daa0, 0x705e2119, 0xed9da94d, + 0x054652f4, 0x7c2c2fe5, 0x94f7d45c, 0x8ef8d5c7, 0x66232e7e, + 0x1f49536f, 0xf792a8d6, 0xc68b7c84, 0x2e50873d, 0x573afa2c, + 0xbfe10195, 0xa5ee000e, 0x4d35fbb7, 0x345f86a6, 0xdc847d1f, + 0x4147f54b, 0xa99c0ef2, 0xd0f673e3, 0x382d885a, 0x222289c1, + 0xcaf97278, 0xb3930f69, 0x5b48f4d0, 0x89141ec0, 0x61cfe579, + 0x18a59868, 0xf07e63d1, 0xea71624a, 0x02aa99f3, 0x7bc0e4e2, + 0x931b1f5b, 0x0ed8970f, 0xe6036cb6, 0x9f6911a7, 0x77b2ea1e, + 0x6dbdeb85, 0x8566103c, 0xfc0c6d2d, 0x14d79694, 0x58b5b90c, + 0xb06e42b5, 0xc9043fa4, 0x21dfc41d, 0x3bd0c586, 0xd30b3e3f, + 0xaa61432e, 0x42bab897, 0xdf7930c3, 0x37a2cb7a, 0x4ec8b66b, + 0xa6134dd2, 0xbc1c4c49, 0x54c7b7f0, 0x2dadcae1, 0xc5763158, + 0x172adb48, 0xfff120f1, 0x869b5de0, 0x6e40a659, 0x744fa7c2, + 0x9c945c7b, 0xe5fe216a, 0x0d25dad3, 0x90e65287, 0x783da93e, + 0x0157d42f, 0xe98c2f96, 0xf3832e0d, 0x1b58d5b4, 0x6232a8a5, + 0x8ae9531c}, + {0x00000000, 0x919168ae, 0x6325a087, 0xf2b4c829, 0x874c31d4, + 0x16dd597a, 0xe4699153, 0x75f8f9fd, 0x4f9f1373, 0xde0e7bdd, + 0x2cbab3f4, 0xbd2bdb5a, 0xc8d322a7, 0x59424a09, 0xabf68220, + 0x3a67ea8e, 0x9e3e27e6, 0x0faf4f48, 0xfd1b8761, 0x6c8aefcf, + 0x19721632, 0x88e37e9c, 0x7a57b6b5, 0xebc6de1b, 0xd1a13495, + 0x40305c3b, 0xb2849412, 0x2315fcbc, 0x56ed0541, 0xc77c6def, + 0x35c8a5c6, 0xa459cd68, 0x7d7b3f17, 0xecea57b9, 0x1e5e9f90, + 0x8fcff73e, 0xfa370ec3, 0x6ba6666d, 0x9912ae44, 0x0883c6ea, + 0x32e42c64, 0xa37544ca, 0x51c18ce3, 0xc050e44d, 0xb5a81db0, + 0x2439751e, 0xd68dbd37, 0x471cd599, 0xe34518f1, 0x72d4705f, + 0x8060b876, 0x11f1d0d8, 0x64092925, 0xf598418b, 0x072c89a2, + 0x96bde10c, 0xacda0b82, 0x3d4b632c, 0xcfffab05, 0x5e6ec3ab, + 0x2b963a56, 0xba0752f8, 0x48b39ad1, 0xd922f27f, 0xfaf67e2e, + 0x6b671680, 0x99d3dea9, 0x0842b607, 0x7dba4ffa, 0xec2b2754, + 0x1e9fef7d, 0x8f0e87d3, 0xb5696d5d, 0x24f805f3, 0xd64ccdda, + 0x47dda574, 0x32255c89, 0xa3b43427, 0x5100fc0e, 0xc09194a0, + 0x64c859c8, 0xf5593166, 0x07edf94f, 0x967c91e1, 0xe384681c, + 0x721500b2, 0x80a1c89b, 0x1130a035, 0x2b574abb, 0xbac62215, + 0x4872ea3c, 0xd9e38292, 0xac1b7b6f, 0x3d8a13c1, 0xcf3edbe8, + 0x5eafb346, 0x878d4139, 0x161c2997, 0xe4a8e1be, 0x75398910, + 0x00c170ed, 0x91501843, 0x63e4d06a, 0xf275b8c4, 0xc812524a, + 0x59833ae4, 0xab37f2cd, 0x3aa69a63, 0x4f5e639e, 0xdecf0b30, + 0x2c7bc319, 0xbdeaabb7, 0x19b366df, 0x88220e71, 0x7a96c658, + 0xeb07aef6, 0x9eff570b, 0x0f6e3fa5, 0xfddaf78c, 0x6c4b9f22, + 0x562c75ac, 0xc7bd1d02, 0x3509d52b, 0xa498bd85, 0xd1604478, + 0x40f12cd6, 0xb245e4ff, 0x23d48c51, 0xf4edfd5c, 0x657c95f2, + 0x97c85ddb, 0x06593575, 0x73a1cc88, 0xe230a426, 0x10846c0f, + 0x811504a1, 0xbb72ee2f, 0x2ae38681, 0xd8574ea8, 0x49c62606, + 0x3c3edffb, 0xadafb755, 0x5f1b7f7c, 0xce8a17d2, 0x6ad3daba, + 0xfb42b214, 0x09f67a3d, 0x98671293, 0xed9feb6e, 0x7c0e83c0, + 0x8eba4be9, 0x1f2b2347, 0x254cc9c9, 0xb4dda167, 0x4669694e, + 0xd7f801e0, 0xa200f81d, 0x339190b3, 0xc125589a, 0x50b43034, + 0x8996c24b, 0x1807aae5, 0xeab362cc, 0x7b220a62, 0x0edaf39f, + 0x9f4b9b31, 0x6dff5318, 0xfc6e3bb6, 0xc609d138, 0x5798b996, + 0xa52c71bf, 0x34bd1911, 0x4145e0ec, 0xd0d48842, 0x2260406b, + 0xb3f128c5, 0x17a8e5ad, 0x86398d03, 0x748d452a, 0xe51c2d84, + 0x90e4d479, 0x0175bcd7, 0xf3c174fe, 0x62501c50, 0x5837f6de, + 0xc9a69e70, 0x3b125659, 0xaa833ef7, 0xdf7bc70a, 0x4eeaafa4, + 0xbc5e678d, 0x2dcf0f23, 0x0e1b8372, 0x9f8aebdc, 0x6d3e23f5, + 0xfcaf4b5b, 0x8957b2a6, 0x18c6da08, 0xea721221, 0x7be37a8f, + 0x41849001, 0xd015f8af, 0x22a13086, 0xb3305828, 0xc6c8a1d5, + 0x5759c97b, 0xa5ed0152, 0x347c69fc, 0x9025a494, 0x01b4cc3a, + 0xf3000413, 0x62916cbd, 0x17699540, 0x86f8fdee, 0x744c35c7, + 0xe5dd5d69, 0xdfbab7e7, 0x4e2bdf49, 0xbc9f1760, 0x2d0e7fce, + 0x58f68633, 0xc967ee9d, 0x3bd326b4, 0xaa424e1a, 0x7360bc65, + 0xe2f1d4cb, 0x10451ce2, 0x81d4744c, 0xf42c8db1, 0x65bde51f, + 0x97092d36, 0x06984598, 0x3cffaf16, 0xad6ec7b8, 0x5fda0f91, + 0xce4b673f, 0xbbb39ec2, 0x2a22f66c, 0xd8963e45, 0x490756eb, + 0xed5e9b83, 0x7ccff32d, 0x8e7b3b04, 0x1fea53aa, 0x6a12aa57, + 0xfb83c2f9, 0x09370ad0, 0x98a6627e, 0xa2c188f0, 0x3350e05e, + 0xc1e42877, 0x507540d9, 0x258db924, 0xb41cd18a, 0x46a819a3, + 0xd739710d}}; + +#endif + +#endif + +#if N == 5 + +#if W == 8 + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0xaf449247, 0x85f822cf, 0x2abcb088, 0xd08143df, + 0x7fc5d198, 0x55796110, 0xfa3df357, 0x7a7381ff, 0xd53713b8, + 0xff8ba330, 0x50cf3177, 0xaaf2c220, 0x05b65067, 0x2f0ae0ef, + 0x804e72a8, 0xf4e703fe, 0x5ba391b9, 0x711f2131, 0xde5bb376, + 0x24664021, 0x8b22d266, 0xa19e62ee, 0x0edaf0a9, 0x8e948201, + 0x21d01046, 0x0b6ca0ce, 0xa4283289, 0x5e15c1de, 0xf1515399, + 0xdbede311, 0x74a97156, 0x32bf01bd, 0x9dfb93fa, 0xb7472372, + 0x1803b135, 0xe23e4262, 0x4d7ad025, 0x67c660ad, 0xc882f2ea, + 0x48cc8042, 0xe7881205, 0xcd34a28d, 0x627030ca, 0x984dc39d, + 0x370951da, 0x1db5e152, 0xb2f17315, 0xc6580243, 0x691c9004, + 0x43a0208c, 0xece4b2cb, 0x16d9419c, 0xb99dd3db, 0x93216353, + 0x3c65f114, 0xbc2b83bc, 0x136f11fb, 0x39d3a173, 0x96973334, + 0x6caac063, 0xc3ee5224, 0xe952e2ac, 0x461670eb, 0x657e037a, + 0xca3a913d, 0xe08621b5, 0x4fc2b3f2, 0xb5ff40a5, 0x1abbd2e2, + 0x3007626a, 0x9f43f02d, 0x1f0d8285, 0xb04910c2, 0x9af5a04a, + 0x35b1320d, 0xcf8cc15a, 0x60c8531d, 0x4a74e395, 0xe53071d2, + 0x91990084, 0x3edd92c3, 0x1461224b, 0xbb25b00c, 0x4118435b, + 0xee5cd11c, 0xc4e06194, 0x6ba4f3d3, 0xebea817b, 0x44ae133c, + 0x6e12a3b4, 0xc15631f3, 0x3b6bc2a4, 0x942f50e3, 0xbe93e06b, + 0x11d7722c, 0x57c102c7, 0xf8859080, 0xd2392008, 0x7d7db24f, + 0x87404118, 0x2804d35f, 0x02b863d7, 0xadfcf190, 0x2db28338, + 0x82f6117f, 0xa84aa1f7, 0x070e33b0, 0xfd33c0e7, 0x527752a0, + 0x78cbe228, 0xd78f706f, 0xa3260139, 0x0c62937e, 0x26de23f6, + 0x899ab1b1, 0x73a742e6, 0xdce3d0a1, 0xf65f6029, 0x591bf26e, + 0xd95580c6, 0x76111281, 0x5cada209, 0xf3e9304e, 0x09d4c319, + 0xa690515e, 0x8c2ce1d6, 0x23687391, 0xcafc06f4, 0x65b894b3, + 0x4f04243b, 0xe040b67c, 0x1a7d452b, 0xb539d76c, 0x9f8567e4, + 0x30c1f5a3, 0xb08f870b, 0x1fcb154c, 0x3577a5c4, 0x9a333783, + 0x600ec4d4, 0xcf4a5693, 0xe5f6e61b, 0x4ab2745c, 0x3e1b050a, + 0x915f974d, 0xbbe327c5, 0x14a7b582, 0xee9a46d5, 0x41ded492, + 0x6b62641a, 0xc426f65d, 0x446884f5, 0xeb2c16b2, 0xc190a63a, + 0x6ed4347d, 0x94e9c72a, 0x3bad556d, 0x1111e5e5, 0xbe5577a2, + 0xf8430749, 0x5707950e, 0x7dbb2586, 0xd2ffb7c1, 0x28c24496, + 0x8786d6d1, 0xad3a6659, 0x027ef41e, 0x823086b6, 0x2d7414f1, + 0x07c8a479, 0xa88c363e, 0x52b1c569, 0xfdf5572e, 0xd749e7a6, + 0x780d75e1, 0x0ca404b7, 0xa3e096f0, 0x895c2678, 0x2618b43f, + 0xdc254768, 0x7361d52f, 0x59dd65a7, 0xf699f7e0, 0x76d78548, + 0xd993170f, 0xf32fa787, 0x5c6b35c0, 0xa656c697, 0x091254d0, + 0x23aee458, 0x8cea761f, 0xaf82058e, 0x00c697c9, 0x2a7a2741, + 0x853eb506, 0x7f034651, 0xd047d416, 0xfafb649e, 0x55bff6d9, + 0xd5f18471, 0x7ab51636, 0x5009a6be, 0xff4d34f9, 0x0570c7ae, + 0xaa3455e9, 0x8088e561, 0x2fcc7726, 0x5b650670, 0xf4219437, + 0xde9d24bf, 0x71d9b6f8, 0x8be445af, 0x24a0d7e8, 0x0e1c6760, + 0xa158f527, 0x2116878f, 0x8e5215c8, 0xa4eea540, 0x0baa3707, + 0xf197c450, 0x5ed35617, 0x746fe69f, 0xdb2b74d8, 0x9d3d0433, + 0x32799674, 0x18c526fc, 0xb781b4bb, 0x4dbc47ec, 0xe2f8d5ab, + 0xc8446523, 0x6700f764, 0xe74e85cc, 0x480a178b, 0x62b6a703, + 0xcdf23544, 0x37cfc613, 0x988b5454, 0xb237e4dc, 0x1d73769b, + 0x69da07cd, 0xc69e958a, 0xec222502, 0x4366b745, 0xb95b4412, + 0x161fd655, 0x3ca366dd, 0x93e7f49a, 0x13a98632, 0xbced1475, + 0x9651a4fd, 0x391536ba, 0xc328c5ed, 0x6c6c57aa, 0x46d0e722, + 0xe9947565}, + {0x00000000, 0x4e890ba9, 0x9d121752, 0xd39b1cfb, 0xe15528e5, + 0xafdc234c, 0x7c473fb7, 0x32ce341e, 0x19db578b, 0x57525c22, + 0x84c940d9, 0xca404b70, 0xf88e7f6e, 0xb60774c7, 0x659c683c, + 0x2b156395, 0x33b6af16, 0x7d3fa4bf, 0xaea4b844, 0xe02db3ed, + 0xd2e387f3, 0x9c6a8c5a, 0x4ff190a1, 0x01789b08, 0x2a6df89d, + 0x64e4f334, 0xb77fefcf, 0xf9f6e466, 0xcb38d078, 0x85b1dbd1, + 0x562ac72a, 0x18a3cc83, 0x676d5e2c, 0x29e45585, 0xfa7f497e, + 0xb4f642d7, 0x863876c9, 0xc8b17d60, 0x1b2a619b, 0x55a36a32, + 0x7eb609a7, 0x303f020e, 0xe3a41ef5, 0xad2d155c, 0x9fe32142, + 0xd16a2aeb, 0x02f13610, 0x4c783db9, 0x54dbf13a, 0x1a52fa93, + 0xc9c9e668, 0x8740edc1, 0xb58ed9df, 0xfb07d276, 0x289cce8d, + 0x6615c524, 0x4d00a6b1, 0x0389ad18, 0xd012b1e3, 0x9e9bba4a, + 0xac558e54, 0xe2dc85fd, 0x31479906, 0x7fce92af, 0xcedabc58, + 0x8053b7f1, 0x53c8ab0a, 0x1d41a0a3, 0x2f8f94bd, 0x61069f14, + 0xb29d83ef, 0xfc148846, 0xd701ebd3, 0x9988e07a, 0x4a13fc81, + 0x049af728, 0x3654c336, 0x78ddc89f, 0xab46d464, 0xe5cfdfcd, + 0xfd6c134e, 0xb3e518e7, 0x607e041c, 0x2ef70fb5, 0x1c393bab, + 0x52b03002, 0x812b2cf9, 0xcfa22750, 0xe4b744c5, 0xaa3e4f6c, + 0x79a55397, 0x372c583e, 0x05e26c20, 0x4b6b6789, 0x98f07b72, + 0xd67970db, 0xa9b7e274, 0xe73ee9dd, 0x34a5f526, 0x7a2cfe8f, + 0x48e2ca91, 0x066bc138, 0xd5f0ddc3, 0x9b79d66a, 0xb06cb5ff, + 0xfee5be56, 0x2d7ea2ad, 0x63f7a904, 0x51399d1a, 0x1fb096b3, + 0xcc2b8a48, 0x82a281e1, 0x9a014d62, 0xd48846cb, 0x07135a30, + 0x499a5199, 0x7b546587, 0x35dd6e2e, 0xe64672d5, 0xa8cf797c, + 0x83da1ae9, 0xcd531140, 0x1ec80dbb, 0x50410612, 0x628f320c, + 0x2c0639a5, 0xff9d255e, 0xb1142ef7, 0x46c47ef1, 0x084d7558, + 0xdbd669a3, 0x955f620a, 0xa7915614, 0xe9185dbd, 0x3a834146, + 0x740a4aef, 0x5f1f297a, 0x119622d3, 0xc20d3e28, 0x8c843581, + 0xbe4a019f, 0xf0c30a36, 0x235816cd, 0x6dd11d64, 0x7572d1e7, + 0x3bfbda4e, 0xe860c6b5, 0xa6e9cd1c, 0x9427f902, 0xdaaef2ab, + 0x0935ee50, 0x47bce5f9, 0x6ca9866c, 0x22208dc5, 0xf1bb913e, + 0xbf329a97, 0x8dfcae89, 0xc375a520, 0x10eeb9db, 0x5e67b272, + 0x21a920dd, 0x6f202b74, 0xbcbb378f, 0xf2323c26, 0xc0fc0838, + 0x8e750391, 0x5dee1f6a, 0x136714c3, 0x38727756, 0x76fb7cff, + 0xa5606004, 0xebe96bad, 0xd9275fb3, 0x97ae541a, 0x443548e1, + 0x0abc4348, 0x121f8fcb, 0x5c968462, 0x8f0d9899, 0xc1849330, + 0xf34aa72e, 0xbdc3ac87, 0x6e58b07c, 0x20d1bbd5, 0x0bc4d840, + 0x454dd3e9, 0x96d6cf12, 0xd85fc4bb, 0xea91f0a5, 0xa418fb0c, + 0x7783e7f7, 0x390aec5e, 0x881ec2a9, 0xc697c900, 0x150cd5fb, + 0x5b85de52, 0x694bea4c, 0x27c2e1e5, 0xf459fd1e, 0xbad0f6b7, + 0x91c59522, 0xdf4c9e8b, 0x0cd78270, 0x425e89d9, 0x7090bdc7, + 0x3e19b66e, 0xed82aa95, 0xa30ba13c, 0xbba86dbf, 0xf5216616, + 0x26ba7aed, 0x68337144, 0x5afd455a, 0x14744ef3, 0xc7ef5208, + 0x896659a1, 0xa2733a34, 0xecfa319d, 0x3f612d66, 0x71e826cf, + 0x432612d1, 0x0daf1978, 0xde340583, 0x90bd0e2a, 0xef739c85, + 0xa1fa972c, 0x72618bd7, 0x3ce8807e, 0x0e26b460, 0x40afbfc9, + 0x9334a332, 0xddbda89b, 0xf6a8cb0e, 0xb821c0a7, 0x6bbadc5c, + 0x2533d7f5, 0x17fde3eb, 0x5974e842, 0x8aeff4b9, 0xc466ff10, + 0xdcc53393, 0x924c383a, 0x41d724c1, 0x0f5e2f68, 0x3d901b76, + 0x731910df, 0xa0820c24, 0xee0b078d, 0xc51e6418, 0x8b976fb1, + 0x580c734a, 0x168578e3, 0x244b4cfd, 0x6ac24754, 0xb9595baf, + 0xf7d05006}, + {0x00000000, 0x8d88fde2, 0xc060fd85, 0x4de80067, 0x5bb0fd4b, + 0xd63800a9, 0x9bd000ce, 0x1658fd2c, 0xb761fa96, 0x3ae90774, + 0x77010713, 0xfa89faf1, 0xecd107dd, 0x6159fa3f, 0x2cb1fa58, + 0xa13907ba, 0xb5b2f36d, 0x383a0e8f, 0x75d20ee8, 0xf85af30a, + 0xee020e26, 0x638af3c4, 0x2e62f3a3, 0xa3ea0e41, 0x02d309fb, + 0x8f5bf419, 0xc2b3f47e, 0x4f3b099c, 0x5963f4b0, 0xd4eb0952, + 0x99030935, 0x148bf4d7, 0xb014e09b, 0x3d9c1d79, 0x70741d1e, + 0xfdfce0fc, 0xeba41dd0, 0x662ce032, 0x2bc4e055, 0xa64c1db7, + 0x07751a0d, 0x8afde7ef, 0xc715e788, 0x4a9d1a6a, 0x5cc5e746, + 0xd14d1aa4, 0x9ca51ac3, 0x112de721, 0x05a613f6, 0x882eee14, + 0xc5c6ee73, 0x484e1391, 0x5e16eebd, 0xd39e135f, 0x9e761338, + 0x13feeeda, 0xb2c7e960, 0x3f4f1482, 0x72a714e5, 0xff2fe907, + 0xe977142b, 0x64ffe9c9, 0x2917e9ae, 0xa49f144c, 0xbb58c777, + 0x36d03a95, 0x7b383af2, 0xf6b0c710, 0xe0e83a3c, 0x6d60c7de, + 0x2088c7b9, 0xad003a5b, 0x0c393de1, 0x81b1c003, 0xcc59c064, + 0x41d13d86, 0x5789c0aa, 0xda013d48, 0x97e93d2f, 0x1a61c0cd, + 0x0eea341a, 0x8362c9f8, 0xce8ac99f, 0x4302347d, 0x555ac951, + 0xd8d234b3, 0x953a34d4, 0x18b2c936, 0xb98bce8c, 0x3403336e, + 0x79eb3309, 0xf463ceeb, 0xe23b33c7, 0x6fb3ce25, 0x225bce42, + 0xafd333a0, 0x0b4c27ec, 0x86c4da0e, 0xcb2cda69, 0x46a4278b, + 0x50fcdaa7, 0xdd742745, 0x909c2722, 0x1d14dac0, 0xbc2ddd7a, + 0x31a52098, 0x7c4d20ff, 0xf1c5dd1d, 0xe79d2031, 0x6a15ddd3, + 0x27fdddb4, 0xaa752056, 0xbefed481, 0x33762963, 0x7e9e2904, + 0xf316d4e6, 0xe54e29ca, 0x68c6d428, 0x252ed44f, 0xa8a629ad, + 0x099f2e17, 0x8417d3f5, 0xc9ffd392, 0x44772e70, 0x522fd35c, + 0xdfa72ebe, 0x924f2ed9, 0x1fc7d33b, 0xadc088af, 0x2048754d, + 0x6da0752a, 0xe02888c8, 0xf67075e4, 0x7bf88806, 0x36108861, + 0xbb987583, 0x1aa17239, 0x97298fdb, 0xdac18fbc, 0x5749725e, + 0x41118f72, 0xcc997290, 0x817172f7, 0x0cf98f15, 0x18727bc2, + 0x95fa8620, 0xd8128647, 0x559a7ba5, 0x43c28689, 0xce4a7b6b, + 0x83a27b0c, 0x0e2a86ee, 0xaf138154, 0x229b7cb6, 0x6f737cd1, + 0xe2fb8133, 0xf4a37c1f, 0x792b81fd, 0x34c3819a, 0xb94b7c78, + 0x1dd46834, 0x905c95d6, 0xddb495b1, 0x503c6853, 0x4664957f, + 0xcbec689d, 0x860468fa, 0x0b8c9518, 0xaab592a2, 0x273d6f40, + 0x6ad56f27, 0xe75d92c5, 0xf1056fe9, 0x7c8d920b, 0x3165926c, + 0xbced6f8e, 0xa8669b59, 0x25ee66bb, 0x680666dc, 0xe58e9b3e, + 0xf3d66612, 0x7e5e9bf0, 0x33b69b97, 0xbe3e6675, 0x1f0761cf, + 0x928f9c2d, 0xdf679c4a, 0x52ef61a8, 0x44b79c84, 0xc93f6166, + 0x84d76101, 0x095f9ce3, 0x16984fd8, 0x9b10b23a, 0xd6f8b25d, + 0x5b704fbf, 0x4d28b293, 0xc0a04f71, 0x8d484f16, 0x00c0b2f4, + 0xa1f9b54e, 0x2c7148ac, 0x619948cb, 0xec11b529, 0xfa494805, + 0x77c1b5e7, 0x3a29b580, 0xb7a14862, 0xa32abcb5, 0x2ea24157, + 0x634a4130, 0xeec2bcd2, 0xf89a41fe, 0x7512bc1c, 0x38fabc7b, + 0xb5724199, 0x144b4623, 0x99c3bbc1, 0xd42bbba6, 0x59a34644, + 0x4ffbbb68, 0xc273468a, 0x8f9b46ed, 0x0213bb0f, 0xa68caf43, + 0x2b0452a1, 0x66ec52c6, 0xeb64af24, 0xfd3c5208, 0x70b4afea, + 0x3d5caf8d, 0xb0d4526f, 0x11ed55d5, 0x9c65a837, 0xd18da850, + 0x5c0555b2, 0x4a5da89e, 0xc7d5557c, 0x8a3d551b, 0x07b5a8f9, + 0x133e5c2e, 0x9eb6a1cc, 0xd35ea1ab, 0x5ed65c49, 0x488ea165, + 0xc5065c87, 0x88ee5ce0, 0x0566a102, 0xa45fa6b8, 0x29d75b5a, + 0x643f5b3d, 0xe9b7a6df, 0xffef5bf3, 0x7267a611, 0x3f8fa676, + 0xb2075b94}, + {0x00000000, 0x80f0171f, 0xda91287f, 0x5a613f60, 0x6e5356bf, + 0xeea341a0, 0xb4c27ec0, 0x343269df, 0xdca6ad7e, 0x5c56ba61, + 0x06378501, 0x86c7921e, 0xb2f5fbc1, 0x3205ecde, 0x6864d3be, + 0xe894c4a1, 0x623c5cbd, 0xe2cc4ba2, 0xb8ad74c2, 0x385d63dd, + 0x0c6f0a02, 0x8c9f1d1d, 0xd6fe227d, 0x560e3562, 0xbe9af1c3, + 0x3e6ae6dc, 0x640bd9bc, 0xe4fbcea3, 0xd0c9a77c, 0x5039b063, + 0x0a588f03, 0x8aa8981c, 0xc478b97a, 0x4488ae65, 0x1ee99105, + 0x9e19861a, 0xaa2befc5, 0x2adbf8da, 0x70bac7ba, 0xf04ad0a5, + 0x18de1404, 0x982e031b, 0xc24f3c7b, 0x42bf2b64, 0x768d42bb, + 0xf67d55a4, 0xac1c6ac4, 0x2cec7ddb, 0xa644e5c7, 0x26b4f2d8, + 0x7cd5cdb8, 0xfc25daa7, 0xc817b378, 0x48e7a467, 0x12869b07, + 0x92768c18, 0x7ae248b9, 0xfa125fa6, 0xa07360c6, 0x208377d9, + 0x14b11e06, 0x94410919, 0xce203679, 0x4ed02166, 0x538074b5, + 0xd37063aa, 0x89115cca, 0x09e14bd5, 0x3dd3220a, 0xbd233515, + 0xe7420a75, 0x67b21d6a, 0x8f26d9cb, 0x0fd6ced4, 0x55b7f1b4, + 0xd547e6ab, 0xe1758f74, 0x6185986b, 0x3be4a70b, 0xbb14b014, + 0x31bc2808, 0xb14c3f17, 0xeb2d0077, 0x6bdd1768, 0x5fef7eb7, + 0xdf1f69a8, 0x857e56c8, 0x058e41d7, 0xed1a8576, 0x6dea9269, + 0x378bad09, 0xb77bba16, 0x8349d3c9, 0x03b9c4d6, 0x59d8fbb6, + 0xd928eca9, 0x97f8cdcf, 0x1708dad0, 0x4d69e5b0, 0xcd99f2af, + 0xf9ab9b70, 0x795b8c6f, 0x233ab30f, 0xa3caa410, 0x4b5e60b1, + 0xcbae77ae, 0x91cf48ce, 0x113f5fd1, 0x250d360e, 0xa5fd2111, + 0xff9c1e71, 0x7f6c096e, 0xf5c49172, 0x7534866d, 0x2f55b90d, + 0xafa5ae12, 0x9b97c7cd, 0x1b67d0d2, 0x4106efb2, 0xc1f6f8ad, + 0x29623c0c, 0xa9922b13, 0xf3f31473, 0x7303036c, 0x47316ab3, + 0xc7c17dac, 0x9da042cc, 0x1d5055d3, 0xa700e96a, 0x27f0fe75, + 0x7d91c115, 0xfd61d60a, 0xc953bfd5, 0x49a3a8ca, 0x13c297aa, + 0x933280b5, 0x7ba64414, 0xfb56530b, 0xa1376c6b, 0x21c77b74, + 0x15f512ab, 0x950505b4, 0xcf643ad4, 0x4f942dcb, 0xc53cb5d7, + 0x45cca2c8, 0x1fad9da8, 0x9f5d8ab7, 0xab6fe368, 0x2b9ff477, + 0x71fecb17, 0xf10edc08, 0x199a18a9, 0x996a0fb6, 0xc30b30d6, + 0x43fb27c9, 0x77c94e16, 0xf7395909, 0xad586669, 0x2da87176, + 0x63785010, 0xe388470f, 0xb9e9786f, 0x39196f70, 0x0d2b06af, + 0x8ddb11b0, 0xd7ba2ed0, 0x574a39cf, 0xbfdefd6e, 0x3f2eea71, + 0x654fd511, 0xe5bfc20e, 0xd18dabd1, 0x517dbcce, 0x0b1c83ae, + 0x8bec94b1, 0x01440cad, 0x81b41bb2, 0xdbd524d2, 0x5b2533cd, + 0x6f175a12, 0xefe74d0d, 0xb586726d, 0x35766572, 0xdde2a1d3, + 0x5d12b6cc, 0x077389ac, 0x87839eb3, 0xb3b1f76c, 0x3341e073, + 0x6920df13, 0xe9d0c80c, 0xf4809ddf, 0x74708ac0, 0x2e11b5a0, + 0xaee1a2bf, 0x9ad3cb60, 0x1a23dc7f, 0x4042e31f, 0xc0b2f400, + 0x282630a1, 0xa8d627be, 0xf2b718de, 0x72470fc1, 0x4675661e, + 0xc6857101, 0x9ce44e61, 0x1c14597e, 0x96bcc162, 0x164cd67d, + 0x4c2de91d, 0xccddfe02, 0xf8ef97dd, 0x781f80c2, 0x227ebfa2, + 0xa28ea8bd, 0x4a1a6c1c, 0xcaea7b03, 0x908b4463, 0x107b537c, + 0x24493aa3, 0xa4b92dbc, 0xfed812dc, 0x7e2805c3, 0x30f824a5, + 0xb00833ba, 0xea690cda, 0x6a991bc5, 0x5eab721a, 0xde5b6505, + 0x843a5a65, 0x04ca4d7a, 0xec5e89db, 0x6cae9ec4, 0x36cfa1a4, + 0xb63fb6bb, 0x820ddf64, 0x02fdc87b, 0x589cf71b, 0xd86ce004, + 0x52c47818, 0xd2346f07, 0x88555067, 0x08a54778, 0x3c972ea7, + 0xbc6739b8, 0xe60606d8, 0x66f611c7, 0x8e62d566, 0x0e92c279, + 0x54f3fd19, 0xd403ea06, 0xe03183d9, 0x60c194c6, 0x3aa0aba6, + 0xba50bcb9}, + {0x00000000, 0x9570d495, 0xf190af6b, 0x64e07bfe, 0x38505897, + 0xad208c02, 0xc9c0f7fc, 0x5cb02369, 0x70a0b12e, 0xe5d065bb, + 0x81301e45, 0x1440cad0, 0x48f0e9b9, 0xdd803d2c, 0xb96046d2, + 0x2c109247, 0xe141625c, 0x7431b6c9, 0x10d1cd37, 0x85a119a2, + 0xd9113acb, 0x4c61ee5e, 0x288195a0, 0xbdf14135, 0x91e1d372, + 0x049107e7, 0x60717c19, 0xf501a88c, 0xa9b18be5, 0x3cc15f70, + 0x5821248e, 0xcd51f01b, 0x19f3c2f9, 0x8c83166c, 0xe8636d92, + 0x7d13b907, 0x21a39a6e, 0xb4d34efb, 0xd0333505, 0x4543e190, + 0x695373d7, 0xfc23a742, 0x98c3dcbc, 0x0db30829, 0x51032b40, + 0xc473ffd5, 0xa093842b, 0x35e350be, 0xf8b2a0a5, 0x6dc27430, + 0x09220fce, 0x9c52db5b, 0xc0e2f832, 0x55922ca7, 0x31725759, + 0xa40283cc, 0x8812118b, 0x1d62c51e, 0x7982bee0, 0xecf26a75, + 0xb042491c, 0x25329d89, 0x41d2e677, 0xd4a232e2, 0x33e785f2, + 0xa6975167, 0xc2772a99, 0x5707fe0c, 0x0bb7dd65, 0x9ec709f0, + 0xfa27720e, 0x6f57a69b, 0x434734dc, 0xd637e049, 0xb2d79bb7, + 0x27a74f22, 0x7b176c4b, 0xee67b8de, 0x8a87c320, 0x1ff717b5, + 0xd2a6e7ae, 0x47d6333b, 0x233648c5, 0xb6469c50, 0xeaf6bf39, + 0x7f866bac, 0x1b661052, 0x8e16c4c7, 0xa2065680, 0x37768215, + 0x5396f9eb, 0xc6e62d7e, 0x9a560e17, 0x0f26da82, 0x6bc6a17c, + 0xfeb675e9, 0x2a14470b, 0xbf64939e, 0xdb84e860, 0x4ef43cf5, + 0x12441f9c, 0x8734cb09, 0xe3d4b0f7, 0x76a46462, 0x5ab4f625, + 0xcfc422b0, 0xab24594e, 0x3e548ddb, 0x62e4aeb2, 0xf7947a27, + 0x937401d9, 0x0604d54c, 0xcb552557, 0x5e25f1c2, 0x3ac58a3c, + 0xafb55ea9, 0xf3057dc0, 0x6675a955, 0x0295d2ab, 0x97e5063e, + 0xbbf59479, 0x2e8540ec, 0x4a653b12, 0xdf15ef87, 0x83a5ccee, + 0x16d5187b, 0x72356385, 0xe745b710, 0x67cf0be4, 0xf2bfdf71, + 0x965fa48f, 0x032f701a, 0x5f9f5373, 0xcaef87e6, 0xae0ffc18, + 0x3b7f288d, 0x176fbaca, 0x821f6e5f, 0xe6ff15a1, 0x738fc134, + 0x2f3fe25d, 0xba4f36c8, 0xdeaf4d36, 0x4bdf99a3, 0x868e69b8, + 0x13febd2d, 0x771ec6d3, 0xe26e1246, 0xbede312f, 0x2baee5ba, + 0x4f4e9e44, 0xda3e4ad1, 0xf62ed896, 0x635e0c03, 0x07be77fd, + 0x92cea368, 0xce7e8001, 0x5b0e5494, 0x3fee2f6a, 0xaa9efbff, + 0x7e3cc91d, 0xeb4c1d88, 0x8fac6676, 0x1adcb2e3, 0x466c918a, + 0xd31c451f, 0xb7fc3ee1, 0x228cea74, 0x0e9c7833, 0x9becaca6, + 0xff0cd758, 0x6a7c03cd, 0x36cc20a4, 0xa3bcf431, 0xc75c8fcf, + 0x522c5b5a, 0x9f7dab41, 0x0a0d7fd4, 0x6eed042a, 0xfb9dd0bf, + 0xa72df3d6, 0x325d2743, 0x56bd5cbd, 0xc3cd8828, 0xefdd1a6f, + 0x7aadcefa, 0x1e4db504, 0x8b3d6191, 0xd78d42f8, 0x42fd966d, + 0x261ded93, 0xb36d3906, 0x54288e16, 0xc1585a83, 0xa5b8217d, + 0x30c8f5e8, 0x6c78d681, 0xf9080214, 0x9de879ea, 0x0898ad7f, + 0x24883f38, 0xb1f8ebad, 0xd5189053, 0x406844c6, 0x1cd867af, + 0x89a8b33a, 0xed48c8c4, 0x78381c51, 0xb569ec4a, 0x201938df, + 0x44f94321, 0xd18997b4, 0x8d39b4dd, 0x18496048, 0x7ca91bb6, + 0xe9d9cf23, 0xc5c95d64, 0x50b989f1, 0x3459f20f, 0xa129269a, + 0xfd9905f3, 0x68e9d166, 0x0c09aa98, 0x99797e0d, 0x4ddb4cef, + 0xd8ab987a, 0xbc4be384, 0x293b3711, 0x758b1478, 0xe0fbc0ed, + 0x841bbb13, 0x116b6f86, 0x3d7bfdc1, 0xa80b2954, 0xcceb52aa, + 0x599b863f, 0x052ba556, 0x905b71c3, 0xf4bb0a3d, 0x61cbdea8, + 0xac9a2eb3, 0x39eafa26, 0x5d0a81d8, 0xc87a554d, 0x94ca7624, + 0x01baa2b1, 0x655ad94f, 0xf02a0dda, 0xdc3a9f9d, 0x494a4b08, + 0x2daa30f6, 0xb8dae463, 0xe46ac70a, 0x711a139f, 0x15fa6861, + 0x808abcf4}, + {0x00000000, 0xcf9e17c8, 0x444d29d1, 0x8bd33e19, 0x889a53a2, + 0x4704446a, 0xccd77a73, 0x03496dbb, 0xca45a105, 0x05dbb6cd, + 0x8e0888d4, 0x41969f1c, 0x42dff2a7, 0x8d41e56f, 0x0692db76, + 0xc90cccbe, 0x4ffa444b, 0x80645383, 0x0bb76d9a, 0xc4297a52, + 0xc76017e9, 0x08fe0021, 0x832d3e38, 0x4cb329f0, 0x85bfe54e, + 0x4a21f286, 0xc1f2cc9f, 0x0e6cdb57, 0x0d25b6ec, 0xc2bba124, + 0x49689f3d, 0x86f688f5, 0x9ff48896, 0x506a9f5e, 0xdbb9a147, + 0x1427b68f, 0x176edb34, 0xd8f0ccfc, 0x5323f2e5, 0x9cbde52d, + 0x55b12993, 0x9a2f3e5b, 0x11fc0042, 0xde62178a, 0xdd2b7a31, + 0x12b56df9, 0x996653e0, 0x56f84428, 0xd00eccdd, 0x1f90db15, + 0x9443e50c, 0x5bddf2c4, 0x58949f7f, 0x970a88b7, 0x1cd9b6ae, + 0xd347a166, 0x1a4b6dd8, 0xd5d57a10, 0x5e064409, 0x919853c1, + 0x92d13e7a, 0x5d4f29b2, 0xd69c17ab, 0x19020063, 0xe498176d, + 0x2b0600a5, 0xa0d53ebc, 0x6f4b2974, 0x6c0244cf, 0xa39c5307, + 0x284f6d1e, 0xe7d17ad6, 0x2eddb668, 0xe143a1a0, 0x6a909fb9, + 0xa50e8871, 0xa647e5ca, 0x69d9f202, 0xe20acc1b, 0x2d94dbd3, + 0xab625326, 0x64fc44ee, 0xef2f7af7, 0x20b16d3f, 0x23f80084, + 0xec66174c, 0x67b52955, 0xa82b3e9d, 0x6127f223, 0xaeb9e5eb, + 0x256adbf2, 0xeaf4cc3a, 0xe9bda181, 0x2623b649, 0xadf08850, + 0x626e9f98, 0x7b6c9ffb, 0xb4f28833, 0x3f21b62a, 0xf0bfa1e2, + 0xf3f6cc59, 0x3c68db91, 0xb7bbe588, 0x7825f240, 0xb1293efe, + 0x7eb72936, 0xf564172f, 0x3afa00e7, 0x39b36d5c, 0xf62d7a94, + 0x7dfe448d, 0xb2605345, 0x3496dbb0, 0xfb08cc78, 0x70dbf261, + 0xbf45e5a9, 0xbc0c8812, 0x73929fda, 0xf841a1c3, 0x37dfb60b, + 0xfed37ab5, 0x314d6d7d, 0xba9e5364, 0x750044ac, 0x76492917, + 0xb9d73edf, 0x320400c6, 0xfd9a170e, 0x1241289b, 0xdddf3f53, + 0x560c014a, 0x99921682, 0x9adb7b39, 0x55456cf1, 0xde9652e8, + 0x11084520, 0xd804899e, 0x179a9e56, 0x9c49a04f, 0x53d7b787, + 0x509eda3c, 0x9f00cdf4, 0x14d3f3ed, 0xdb4de425, 0x5dbb6cd0, + 0x92257b18, 0x19f64501, 0xd66852c9, 0xd5213f72, 0x1abf28ba, + 0x916c16a3, 0x5ef2016b, 0x97fecdd5, 0x5860da1d, 0xd3b3e404, + 0x1c2df3cc, 0x1f649e77, 0xd0fa89bf, 0x5b29b7a6, 0x94b7a06e, + 0x8db5a00d, 0x422bb7c5, 0xc9f889dc, 0x06669e14, 0x052ff3af, + 0xcab1e467, 0x4162da7e, 0x8efccdb6, 0x47f00108, 0x886e16c0, + 0x03bd28d9, 0xcc233f11, 0xcf6a52aa, 0x00f44562, 0x8b277b7b, + 0x44b96cb3, 0xc24fe446, 0x0dd1f38e, 0x8602cd97, 0x499cda5f, + 0x4ad5b7e4, 0x854ba02c, 0x0e989e35, 0xc10689fd, 0x080a4543, + 0xc794528b, 0x4c476c92, 0x83d97b5a, 0x809016e1, 0x4f0e0129, + 0xc4dd3f30, 0x0b4328f8, 0xf6d93ff6, 0x3947283e, 0xb2941627, + 0x7d0a01ef, 0x7e436c54, 0xb1dd7b9c, 0x3a0e4585, 0xf590524d, + 0x3c9c9ef3, 0xf302893b, 0x78d1b722, 0xb74fa0ea, 0xb406cd51, + 0x7b98da99, 0xf04be480, 0x3fd5f348, 0xb9237bbd, 0x76bd6c75, + 0xfd6e526c, 0x32f045a4, 0x31b9281f, 0xfe273fd7, 0x75f401ce, + 0xba6a1606, 0x7366dab8, 0xbcf8cd70, 0x372bf369, 0xf8b5e4a1, + 0xfbfc891a, 0x34629ed2, 0xbfb1a0cb, 0x702fb703, 0x692db760, + 0xa6b3a0a8, 0x2d609eb1, 0xe2fe8979, 0xe1b7e4c2, 0x2e29f30a, + 0xa5facd13, 0x6a64dadb, 0xa3681665, 0x6cf601ad, 0xe7253fb4, + 0x28bb287c, 0x2bf245c7, 0xe46c520f, 0x6fbf6c16, 0xa0217bde, + 0x26d7f32b, 0xe949e4e3, 0x629adafa, 0xad04cd32, 0xae4da089, + 0x61d3b741, 0xea008958, 0x259e9e90, 0xec92522e, 0x230c45e6, + 0xa8df7bff, 0x67416c37, 0x6408018c, 0xab961644, 0x2045285d, + 0xefdb3f95}, + {0x00000000, 0x24825136, 0x4904a26c, 0x6d86f35a, 0x920944d8, + 0xb68b15ee, 0xdb0de6b4, 0xff8fb782, 0xff638ff1, 0xdbe1dec7, + 0xb6672d9d, 0x92e57cab, 0x6d6acb29, 0x49e89a1f, 0x246e6945, + 0x00ec3873, 0x25b619a3, 0x01344895, 0x6cb2bbcf, 0x4830eaf9, + 0xb7bf5d7b, 0x933d0c4d, 0xfebbff17, 0xda39ae21, 0xdad59652, + 0xfe57c764, 0x93d1343e, 0xb7536508, 0x48dcd28a, 0x6c5e83bc, + 0x01d870e6, 0x255a21d0, 0x4b6c3346, 0x6fee6270, 0x0268912a, + 0x26eac01c, 0xd965779e, 0xfde726a8, 0x9061d5f2, 0xb4e384c4, + 0xb40fbcb7, 0x908ded81, 0xfd0b1edb, 0xd9894fed, 0x2606f86f, + 0x0284a959, 0x6f025a03, 0x4b800b35, 0x6eda2ae5, 0x4a587bd3, + 0x27de8889, 0x035cd9bf, 0xfcd36e3d, 0xd8513f0b, 0xb5d7cc51, + 0x91559d67, 0x91b9a514, 0xb53bf422, 0xd8bd0778, 0xfc3f564e, + 0x03b0e1cc, 0x2732b0fa, 0x4ab443a0, 0x6e361296, 0x96d8668c, + 0xb25a37ba, 0xdfdcc4e0, 0xfb5e95d6, 0x04d12254, 0x20537362, + 0x4dd58038, 0x6957d10e, 0x69bbe97d, 0x4d39b84b, 0x20bf4b11, + 0x043d1a27, 0xfbb2ada5, 0xdf30fc93, 0xb2b60fc9, 0x96345eff, + 0xb36e7f2f, 0x97ec2e19, 0xfa6add43, 0xdee88c75, 0x21673bf7, + 0x05e56ac1, 0x6863999b, 0x4ce1c8ad, 0x4c0df0de, 0x688fa1e8, + 0x050952b2, 0x218b0384, 0xde04b406, 0xfa86e530, 0x9700166a, + 0xb382475c, 0xddb455ca, 0xf93604fc, 0x94b0f7a6, 0xb032a690, + 0x4fbd1112, 0x6b3f4024, 0x06b9b37e, 0x223be248, 0x22d7da3b, + 0x06558b0d, 0x6bd37857, 0x4f512961, 0xb0de9ee3, 0x945ccfd5, + 0xf9da3c8f, 0xdd586db9, 0xf8024c69, 0xdc801d5f, 0xb106ee05, + 0x9584bf33, 0x6a0b08b1, 0x4e895987, 0x230faadd, 0x078dfbeb, + 0x0761c398, 0x23e392ae, 0x4e6561f4, 0x6ae730c2, 0x95688740, + 0xb1ead676, 0xdc6c252c, 0xf8ee741a, 0xf6c1cb59, 0xd2439a6f, + 0xbfc56935, 0x9b473803, 0x64c88f81, 0x404adeb7, 0x2dcc2ded, + 0x094e7cdb, 0x09a244a8, 0x2d20159e, 0x40a6e6c4, 0x6424b7f2, + 0x9bab0070, 0xbf295146, 0xd2afa21c, 0xf62df32a, 0xd377d2fa, + 0xf7f583cc, 0x9a737096, 0xbef121a0, 0x417e9622, 0x65fcc714, + 0x087a344e, 0x2cf86578, 0x2c145d0b, 0x08960c3d, 0x6510ff67, + 0x4192ae51, 0xbe1d19d3, 0x9a9f48e5, 0xf719bbbf, 0xd39bea89, + 0xbdadf81f, 0x992fa929, 0xf4a95a73, 0xd02b0b45, 0x2fa4bcc7, + 0x0b26edf1, 0x66a01eab, 0x42224f9d, 0x42ce77ee, 0x664c26d8, + 0x0bcad582, 0x2f4884b4, 0xd0c73336, 0xf4456200, 0x99c3915a, + 0xbd41c06c, 0x981be1bc, 0xbc99b08a, 0xd11f43d0, 0xf59d12e6, + 0x0a12a564, 0x2e90f452, 0x43160708, 0x6794563e, 0x67786e4d, + 0x43fa3f7b, 0x2e7ccc21, 0x0afe9d17, 0xf5712a95, 0xd1f37ba3, + 0xbc7588f9, 0x98f7d9cf, 0x6019add5, 0x449bfce3, 0x291d0fb9, + 0x0d9f5e8f, 0xf210e90d, 0xd692b83b, 0xbb144b61, 0x9f961a57, + 0x9f7a2224, 0xbbf87312, 0xd67e8048, 0xf2fcd17e, 0x0d7366fc, + 0x29f137ca, 0x4477c490, 0x60f595a6, 0x45afb476, 0x612de540, + 0x0cab161a, 0x2829472c, 0xd7a6f0ae, 0xf324a198, 0x9ea252c2, + 0xba2003f4, 0xbacc3b87, 0x9e4e6ab1, 0xf3c899eb, 0xd74ac8dd, + 0x28c57f5f, 0x0c472e69, 0x61c1dd33, 0x45438c05, 0x2b759e93, + 0x0ff7cfa5, 0x62713cff, 0x46f36dc9, 0xb97cda4b, 0x9dfe8b7d, + 0xf0787827, 0xd4fa2911, 0xd4161162, 0xf0944054, 0x9d12b30e, + 0xb990e238, 0x461f55ba, 0x629d048c, 0x0f1bf7d6, 0x2b99a6e0, + 0x0ec38730, 0x2a41d606, 0x47c7255c, 0x6345746a, 0x9ccac3e8, + 0xb84892de, 0xd5ce6184, 0xf14c30b2, 0xf1a008c1, 0xd52259f7, + 0xb8a4aaad, 0x9c26fb9b, 0x63a94c19, 0x472b1d2f, 0x2aadee75, + 0x0e2fbf43}, + {0x00000000, 0x36f290f3, 0x6de521e6, 0x5b17b115, 0xdbca43cc, + 0xed38d33f, 0xb62f622a, 0x80ddf2d9, 0x6ce581d9, 0x5a17112a, + 0x0100a03f, 0x37f230cc, 0xb72fc215, 0x81dd52e6, 0xdacae3f3, + 0xec387300, 0xd9cb03b2, 0xef399341, 0xb42e2254, 0x82dcb2a7, + 0x0201407e, 0x34f3d08d, 0x6fe46198, 0x5916f16b, 0xb52e826b, + 0x83dc1298, 0xd8cba38d, 0xee39337e, 0x6ee4c1a7, 0x58165154, + 0x0301e041, 0x35f370b2, 0x68e70125, 0x5e1591d6, 0x050220c3, + 0x33f0b030, 0xb32d42e9, 0x85dfd21a, 0xdec8630f, 0xe83af3fc, + 0x040280fc, 0x32f0100f, 0x69e7a11a, 0x5f1531e9, 0xdfc8c330, + 0xe93a53c3, 0xb22de2d6, 0x84df7225, 0xb12c0297, 0x87de9264, + 0xdcc92371, 0xea3bb382, 0x6ae6415b, 0x5c14d1a8, 0x070360bd, + 0x31f1f04e, 0xddc9834e, 0xeb3b13bd, 0xb02ca2a8, 0x86de325b, + 0x0603c082, 0x30f15071, 0x6be6e164, 0x5d147197, 0xd1ce024a, + 0xe73c92b9, 0xbc2b23ac, 0x8ad9b35f, 0x0a044186, 0x3cf6d175, + 0x67e16060, 0x5113f093, 0xbd2b8393, 0x8bd91360, 0xd0cea275, + 0xe63c3286, 0x66e1c05f, 0x501350ac, 0x0b04e1b9, 0x3df6714a, + 0x080501f8, 0x3ef7910b, 0x65e0201e, 0x5312b0ed, 0xd3cf4234, + 0xe53dd2c7, 0xbe2a63d2, 0x88d8f321, 0x64e08021, 0x521210d2, + 0x0905a1c7, 0x3ff73134, 0xbf2ac3ed, 0x89d8531e, 0xd2cfe20b, + 0xe43d72f8, 0xb929036f, 0x8fdb939c, 0xd4cc2289, 0xe23eb27a, + 0x62e340a3, 0x5411d050, 0x0f066145, 0x39f4f1b6, 0xd5cc82b6, + 0xe33e1245, 0xb829a350, 0x8edb33a3, 0x0e06c17a, 0x38f45189, + 0x63e3e09c, 0x5511706f, 0x60e200dd, 0x5610902e, 0x0d07213b, + 0x3bf5b1c8, 0xbb284311, 0x8ddad3e2, 0xd6cd62f7, 0xe03ff204, + 0x0c078104, 0x3af511f7, 0x61e2a0e2, 0x57103011, 0xd7cdc2c8, + 0xe13f523b, 0xba28e32e, 0x8cda73dd, 0x78ed02d5, 0x4e1f9226, + 0x15082333, 0x23fab3c0, 0xa3274119, 0x95d5d1ea, 0xcec260ff, + 0xf830f00c, 0x1408830c, 0x22fa13ff, 0x79eda2ea, 0x4f1f3219, + 0xcfc2c0c0, 0xf9305033, 0xa227e126, 0x94d571d5, 0xa1260167, + 0x97d49194, 0xccc32081, 0xfa31b072, 0x7aec42ab, 0x4c1ed258, + 0x1709634d, 0x21fbf3be, 0xcdc380be, 0xfb31104d, 0xa026a158, + 0x96d431ab, 0x1609c372, 0x20fb5381, 0x7bece294, 0x4d1e7267, + 0x100a03f0, 0x26f89303, 0x7def2216, 0x4b1db2e5, 0xcbc0403c, + 0xfd32d0cf, 0xa62561da, 0x90d7f129, 0x7cef8229, 0x4a1d12da, + 0x110aa3cf, 0x27f8333c, 0xa725c1e5, 0x91d75116, 0xcac0e003, + 0xfc3270f0, 0xc9c10042, 0xff3390b1, 0xa42421a4, 0x92d6b157, + 0x120b438e, 0x24f9d37d, 0x7fee6268, 0x491cf29b, 0xa524819b, + 0x93d61168, 0xc8c1a07d, 0xfe33308e, 0x7eeec257, 0x481c52a4, + 0x130be3b1, 0x25f97342, 0xa923009f, 0x9fd1906c, 0xc4c62179, + 0xf234b18a, 0x72e94353, 0x441bd3a0, 0x1f0c62b5, 0x29fef246, + 0xc5c68146, 0xf33411b5, 0xa823a0a0, 0x9ed13053, 0x1e0cc28a, + 0x28fe5279, 0x73e9e36c, 0x451b739f, 0x70e8032d, 0x461a93de, + 0x1d0d22cb, 0x2bffb238, 0xab2240e1, 0x9dd0d012, 0xc6c76107, + 0xf035f1f4, 0x1c0d82f4, 0x2aff1207, 0x71e8a312, 0x471a33e1, + 0xc7c7c138, 0xf13551cb, 0xaa22e0de, 0x9cd0702d, 0xc1c401ba, + 0xf7369149, 0xac21205c, 0x9ad3b0af, 0x1a0e4276, 0x2cfcd285, + 0x77eb6390, 0x4119f363, 0xad218063, 0x9bd31090, 0xc0c4a185, + 0xf6363176, 0x76ebc3af, 0x4019535c, 0x1b0ee249, 0x2dfc72ba, + 0x180f0208, 0x2efd92fb, 0x75ea23ee, 0x4318b31d, 0xc3c541c4, + 0xf537d137, 0xae206022, 0x98d2f0d1, 0x74ea83d1, 0x42181322, + 0x190fa237, 0x2ffd32c4, 0xaf20c01d, 0x99d250ee, 0xc2c5e1fb, + 0xf4377108}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x0000000000000000, 0xf390f23600000000, 0xe621e56d00000000, + 0x15b1175b00000000, 0xcc43cadb00000000, 0x3fd338ed00000000, + 0x2a622fb600000000, 0xd9f2dd8000000000, 0xd981e56c00000000, + 0x2a11175a00000000, 0x3fa0000100000000, 0xcc30f23700000000, + 0x15c22fb700000000, 0xe652dd8100000000, 0xf3e3cada00000000, + 0x007338ec00000000, 0xb203cbd900000000, 0x419339ef00000000, + 0x54222eb400000000, 0xa7b2dc8200000000, 0x7e40010200000000, + 0x8dd0f33400000000, 0x9861e46f00000000, 0x6bf1165900000000, + 0x6b822eb500000000, 0x9812dc8300000000, 0x8da3cbd800000000, + 0x7e3339ee00000000, 0xa7c1e46e00000000, 0x5451165800000000, + 0x41e0010300000000, 0xb270f33500000000, 0x2501e76800000000, + 0xd691155e00000000, 0xc320020500000000, 0x30b0f03300000000, + 0xe9422db300000000, 0x1ad2df8500000000, 0x0f63c8de00000000, + 0xfcf33ae800000000, 0xfc80020400000000, 0x0f10f03200000000, + 0x1aa1e76900000000, 0xe931155f00000000, 0x30c3c8df00000000, + 0xc3533ae900000000, 0xd6e22db200000000, 0x2572df8400000000, + 0x97022cb100000000, 0x6492de8700000000, 0x7123c9dc00000000, + 0x82b33bea00000000, 0x5b41e66a00000000, 0xa8d1145c00000000, + 0xbd60030700000000, 0x4ef0f13100000000, 0x4e83c9dd00000000, + 0xbd133beb00000000, 0xa8a22cb000000000, 0x5b32de8600000000, + 0x82c0030600000000, 0x7150f13000000000, 0x64e1e66b00000000, + 0x9771145d00000000, 0x4a02ced100000000, 0xb9923ce700000000, + 0xac232bbc00000000, 0x5fb3d98a00000000, 0x8641040a00000000, + 0x75d1f63c00000000, 0x6060e16700000000, 0x93f0135100000000, + 0x93832bbd00000000, 0x6013d98b00000000, 0x75a2ced000000000, + 0x86323ce600000000, 0x5fc0e16600000000, 0xac50135000000000, + 0xb9e1040b00000000, 0x4a71f63d00000000, 0xf801050800000000, + 0x0b91f73e00000000, 0x1e20e06500000000, 0xedb0125300000000, + 0x3442cfd300000000, 0xc7d23de500000000, 0xd2632abe00000000, + 0x21f3d88800000000, 0x2180e06400000000, 0xd210125200000000, + 0xc7a1050900000000, 0x3431f73f00000000, 0xedc32abf00000000, + 0x1e53d88900000000, 0x0be2cfd200000000, 0xf8723de400000000, + 0x6f0329b900000000, 0x9c93db8f00000000, 0x8922ccd400000000, + 0x7ab23ee200000000, 0xa340e36200000000, 0x50d0115400000000, + 0x4561060f00000000, 0xb6f1f43900000000, 0xb682ccd500000000, + 0x45123ee300000000, 0x50a329b800000000, 0xa333db8e00000000, + 0x7ac1060e00000000, 0x8951f43800000000, 0x9ce0e36300000000, + 0x6f70115500000000, 0xdd00e26000000000, 0x2e90105600000000, + 0x3b21070d00000000, 0xc8b1f53b00000000, 0x114328bb00000000, + 0xe2d3da8d00000000, 0xf762cdd600000000, 0x04f23fe000000000, + 0x0481070c00000000, 0xf711f53a00000000, 0xe2a0e26100000000, + 0x1130105700000000, 0xc8c2cdd700000000, 0x3b523fe100000000, + 0x2ee328ba00000000, 0xdd73da8c00000000, 0xd502ed7800000000, + 0x26921f4e00000000, 0x3323081500000000, 0xc0b3fa2300000000, + 0x194127a300000000, 0xead1d59500000000, 0xff60c2ce00000000, + 0x0cf030f800000000, 0x0c83081400000000, 0xff13fa2200000000, + 0xeaa2ed7900000000, 0x19321f4f00000000, 0xc0c0c2cf00000000, + 0x335030f900000000, 0x26e127a200000000, 0xd571d59400000000, + 0x670126a100000000, 0x9491d49700000000, 0x8120c3cc00000000, + 0x72b031fa00000000, 0xab42ec7a00000000, 0x58d21e4c00000000, + 0x4d63091700000000, 0xbef3fb2100000000, 0xbe80c3cd00000000, + 0x4d1031fb00000000, 0x58a126a000000000, 0xab31d49600000000, + 0x72c3091600000000, 0x8153fb2000000000, 0x94e2ec7b00000000, + 0x67721e4d00000000, 0xf0030a1000000000, 0x0393f82600000000, + 0x1622ef7d00000000, 0xe5b21d4b00000000, 0x3c40c0cb00000000, + 0xcfd032fd00000000, 0xda6125a600000000, 0x29f1d79000000000, + 0x2982ef7c00000000, 0xda121d4a00000000, 0xcfa30a1100000000, + 0x3c33f82700000000, 0xe5c125a700000000, 0x1651d79100000000, + 0x03e0c0ca00000000, 0xf07032fc00000000, 0x4200c1c900000000, + 0xb19033ff00000000, 0xa42124a400000000, 0x57b1d69200000000, + 0x8e430b1200000000, 0x7dd3f92400000000, 0x6862ee7f00000000, + 0x9bf21c4900000000, 0x9b8124a500000000, 0x6811d69300000000, + 0x7da0c1c800000000, 0x8e3033fe00000000, 0x57c2ee7e00000000, + 0xa4521c4800000000, 0xb1e30b1300000000, 0x4273f92500000000, + 0x9f0023a900000000, 0x6c90d19f00000000, 0x7921c6c400000000, + 0x8ab134f200000000, 0x5343e97200000000, 0xa0d31b4400000000, + 0xb5620c1f00000000, 0x46f2fe2900000000, 0x4681c6c500000000, + 0xb51134f300000000, 0xa0a023a800000000, 0x5330d19e00000000, + 0x8ac20c1e00000000, 0x7952fe2800000000, 0x6ce3e97300000000, + 0x9f731b4500000000, 0x2d03e87000000000, 0xde931a4600000000, + 0xcb220d1d00000000, 0x38b2ff2b00000000, 0xe14022ab00000000, + 0x12d0d09d00000000, 0x0761c7c600000000, 0xf4f135f000000000, + 0xf4820d1c00000000, 0x0712ff2a00000000, 0x12a3e87100000000, + 0xe1331a4700000000, 0x38c1c7c700000000, 0xcb5135f100000000, + 0xdee022aa00000000, 0x2d70d09c00000000, 0xba01c4c100000000, + 0x499136f700000000, 0x5c2021ac00000000, 0xafb0d39a00000000, + 0x76420e1a00000000, 0x85d2fc2c00000000, 0x9063eb7700000000, + 0x63f3194100000000, 0x638021ad00000000, 0x9010d39b00000000, + 0x85a1c4c000000000, 0x763136f600000000, 0xafc3eb7600000000, + 0x5c53194000000000, 0x49e20e1b00000000, 0xba72fc2d00000000, + 0x08020f1800000000, 0xfb92fd2e00000000, 0xee23ea7500000000, + 0x1db3184300000000, 0xc441c5c300000000, 0x37d137f500000000, + 0x226020ae00000000, 0xd1f0d29800000000, 0xd183ea7400000000, + 0x2213184200000000, 0x37a20f1900000000, 0xc432fd2f00000000, + 0x1dc020af00000000, 0xee50d29900000000, 0xfbe1c5c200000000, + 0x087137f400000000}, + {0x0000000000000000, 0x3651822400000000, 0x6ca2044900000000, + 0x5af3866d00000000, 0xd844099200000000, 0xee158bb600000000, + 0xb4e60ddb00000000, 0x82b78fff00000000, 0xf18f63ff00000000, + 0xc7dee1db00000000, 0x9d2d67b600000000, 0xab7ce59200000000, + 0x29cb6a6d00000000, 0x1f9ae84900000000, 0x45696e2400000000, + 0x7338ec0000000000, 0xa319b62500000000, 0x9548340100000000, + 0xcfbbb26c00000000, 0xf9ea304800000000, 0x7b5dbfb700000000, + 0x4d0c3d9300000000, 0x17ffbbfe00000000, 0x21ae39da00000000, + 0x5296d5da00000000, 0x64c757fe00000000, 0x3e34d19300000000, + 0x086553b700000000, 0x8ad2dc4800000000, 0xbc835e6c00000000, + 0xe670d80100000000, 0xd0215a2500000000, 0x46336c4b00000000, + 0x7062ee6f00000000, 0x2a91680200000000, 0x1cc0ea2600000000, + 0x9e7765d900000000, 0xa826e7fd00000000, 0xf2d5619000000000, + 0xc484e3b400000000, 0xb7bc0fb400000000, 0x81ed8d9000000000, + 0xdb1e0bfd00000000, 0xed4f89d900000000, 0x6ff8062600000000, + 0x59a9840200000000, 0x035a026f00000000, 0x350b804b00000000, + 0xe52ada6e00000000, 0xd37b584a00000000, 0x8988de2700000000, + 0xbfd95c0300000000, 0x3d6ed3fc00000000, 0x0b3f51d800000000, + 0x51ccd7b500000000, 0x679d559100000000, 0x14a5b99100000000, + 0x22f43bb500000000, 0x7807bdd800000000, 0x4e563ffc00000000, + 0xcce1b00300000000, 0xfab0322700000000, 0xa043b44a00000000, + 0x9612366e00000000, 0x8c66d89600000000, 0xba375ab200000000, + 0xe0c4dcdf00000000, 0xd6955efb00000000, 0x5422d10400000000, + 0x6273532000000000, 0x3880d54d00000000, 0x0ed1576900000000, + 0x7de9bb6900000000, 0x4bb8394d00000000, 0x114bbf2000000000, + 0x271a3d0400000000, 0xa5adb2fb00000000, 0x93fc30df00000000, + 0xc90fb6b200000000, 0xff5e349600000000, 0x2f7f6eb300000000, + 0x192eec9700000000, 0x43dd6afa00000000, 0x758ce8de00000000, + 0xf73b672100000000, 0xc16ae50500000000, 0x9b99636800000000, + 0xadc8e14c00000000, 0xdef00d4c00000000, 0xe8a18f6800000000, + 0xb252090500000000, 0x84038b2100000000, 0x06b404de00000000, + 0x30e586fa00000000, 0x6a16009700000000, 0x5c4782b300000000, + 0xca55b4dd00000000, 0xfc0436f900000000, 0xa6f7b09400000000, + 0x90a632b000000000, 0x1211bd4f00000000, 0x24403f6b00000000, + 0x7eb3b90600000000, 0x48e23b2200000000, 0x3bdad72200000000, + 0x0d8b550600000000, 0x5778d36b00000000, 0x6129514f00000000, + 0xe39edeb000000000, 0xd5cf5c9400000000, 0x8f3cdaf900000000, + 0xb96d58dd00000000, 0x694c02f800000000, 0x5f1d80dc00000000, + 0x05ee06b100000000, 0x33bf849500000000, 0xb1080b6a00000000, + 0x8759894e00000000, 0xddaa0f2300000000, 0xebfb8d0700000000, + 0x98c3610700000000, 0xae92e32300000000, 0xf461654e00000000, + 0xc230e76a00000000, 0x4087689500000000, 0x76d6eab100000000, + 0x2c256cdc00000000, 0x1a74eef800000000, 0x59cbc1f600000000, + 0x6f9a43d200000000, 0x3569c5bf00000000, 0x0338479b00000000, + 0x818fc86400000000, 0xb7de4a4000000000, 0xed2dcc2d00000000, + 0xdb7c4e0900000000, 0xa844a20900000000, 0x9e15202d00000000, + 0xc4e6a64000000000, 0xf2b7246400000000, 0x7000ab9b00000000, + 0x465129bf00000000, 0x1ca2afd200000000, 0x2af32df600000000, + 0xfad277d300000000, 0xcc83f5f700000000, 0x9670739a00000000, + 0xa021f1be00000000, 0x22967e4100000000, 0x14c7fc6500000000, + 0x4e347a0800000000, 0x7865f82c00000000, 0x0b5d142c00000000, + 0x3d0c960800000000, 0x67ff106500000000, 0x51ae924100000000, + 0xd3191dbe00000000, 0xe5489f9a00000000, 0xbfbb19f700000000, + 0x89ea9bd300000000, 0x1ff8adbd00000000, 0x29a92f9900000000, + 0x735aa9f400000000, 0x450b2bd000000000, 0xc7bca42f00000000, + 0xf1ed260b00000000, 0xab1ea06600000000, 0x9d4f224200000000, + 0xee77ce4200000000, 0xd8264c6600000000, 0x82d5ca0b00000000, + 0xb484482f00000000, 0x3633c7d000000000, 0x006245f400000000, + 0x5a91c39900000000, 0x6cc041bd00000000, 0xbce11b9800000000, + 0x8ab099bc00000000, 0xd0431fd100000000, 0xe6129df500000000, + 0x64a5120a00000000, 0x52f4902e00000000, 0x0807164300000000, + 0x3e56946700000000, 0x4d6e786700000000, 0x7b3ffa4300000000, + 0x21cc7c2e00000000, 0x179dfe0a00000000, 0x952a71f500000000, + 0xa37bf3d100000000, 0xf98875bc00000000, 0xcfd9f79800000000, + 0xd5ad196000000000, 0xe3fc9b4400000000, 0xb90f1d2900000000, + 0x8f5e9f0d00000000, 0x0de910f200000000, 0x3bb892d600000000, + 0x614b14bb00000000, 0x571a969f00000000, 0x24227a9f00000000, + 0x1273f8bb00000000, 0x48807ed600000000, 0x7ed1fcf200000000, + 0xfc66730d00000000, 0xca37f12900000000, 0x90c4774400000000, + 0xa695f56000000000, 0x76b4af4500000000, 0x40e52d6100000000, + 0x1a16ab0c00000000, 0x2c47292800000000, 0xaef0a6d700000000, + 0x98a124f300000000, 0xc252a29e00000000, 0xf40320ba00000000, + 0x873bccba00000000, 0xb16a4e9e00000000, 0xeb99c8f300000000, + 0xddc84ad700000000, 0x5f7fc52800000000, 0x692e470c00000000, + 0x33ddc16100000000, 0x058c434500000000, 0x939e752b00000000, + 0xa5cff70f00000000, 0xff3c716200000000, 0xc96df34600000000, + 0x4bda7cb900000000, 0x7d8bfe9d00000000, 0x277878f000000000, + 0x1129fad400000000, 0x621116d400000000, 0x544094f000000000, + 0x0eb3129d00000000, 0x38e290b900000000, 0xba551f4600000000, + 0x8c049d6200000000, 0xd6f71b0f00000000, 0xe0a6992b00000000, + 0x3087c30e00000000, 0x06d6412a00000000, 0x5c25c74700000000, + 0x6a74456300000000, 0xe8c3ca9c00000000, 0xde9248b800000000, + 0x8461ced500000000, 0xb2304cf100000000, 0xc108a0f100000000, + 0xf75922d500000000, 0xadaaa4b800000000, 0x9bfb269c00000000, + 0x194ca96300000000, 0x2f1d2b4700000000, 0x75eead2a00000000, + 0x43bf2f0e00000000}, + {0x0000000000000000, 0xc8179ecf00000000, 0xd1294d4400000000, + 0x193ed38b00000000, 0xa2539a8800000000, 0x6a44044700000000, + 0x737ad7cc00000000, 0xbb6d490300000000, 0x05a145ca00000000, + 0xcdb6db0500000000, 0xd488088e00000000, 0x1c9f964100000000, + 0xa7f2df4200000000, 0x6fe5418d00000000, 0x76db920600000000, + 0xbecc0cc900000000, 0x4b44fa4f00000000, 0x8353648000000000, + 0x9a6db70b00000000, 0x527a29c400000000, 0xe91760c700000000, + 0x2100fe0800000000, 0x383e2d8300000000, 0xf029b34c00000000, + 0x4ee5bf8500000000, 0x86f2214a00000000, 0x9fccf2c100000000, + 0x57db6c0e00000000, 0xecb6250d00000000, 0x24a1bbc200000000, + 0x3d9f684900000000, 0xf588f68600000000, 0x9688f49f00000000, + 0x5e9f6a5000000000, 0x47a1b9db00000000, 0x8fb6271400000000, + 0x34db6e1700000000, 0xfcccf0d800000000, 0xe5f2235300000000, + 0x2de5bd9c00000000, 0x9329b15500000000, 0x5b3e2f9a00000000, + 0x4200fc1100000000, 0x8a1762de00000000, 0x317a2bdd00000000, + 0xf96db51200000000, 0xe053669900000000, 0x2844f85600000000, + 0xddcc0ed000000000, 0x15db901f00000000, 0x0ce5439400000000, + 0xc4f2dd5b00000000, 0x7f9f945800000000, 0xb7880a9700000000, + 0xaeb6d91c00000000, 0x66a147d300000000, 0xd86d4b1a00000000, + 0x107ad5d500000000, 0x0944065e00000000, 0xc153989100000000, + 0x7a3ed19200000000, 0xb2294f5d00000000, 0xab179cd600000000, + 0x6300021900000000, 0x6d1798e400000000, 0xa500062b00000000, + 0xbc3ed5a000000000, 0x74294b6f00000000, 0xcf44026c00000000, + 0x07539ca300000000, 0x1e6d4f2800000000, 0xd67ad1e700000000, + 0x68b6dd2e00000000, 0xa0a143e100000000, 0xb99f906a00000000, + 0x71880ea500000000, 0xcae547a600000000, 0x02f2d96900000000, + 0x1bcc0ae200000000, 0xd3db942d00000000, 0x265362ab00000000, + 0xee44fc6400000000, 0xf77a2fef00000000, 0x3f6db12000000000, + 0x8400f82300000000, 0x4c1766ec00000000, 0x5529b56700000000, + 0x9d3e2ba800000000, 0x23f2276100000000, 0xebe5b9ae00000000, + 0xf2db6a2500000000, 0x3accf4ea00000000, 0x81a1bde900000000, + 0x49b6232600000000, 0x5088f0ad00000000, 0x989f6e6200000000, + 0xfb9f6c7b00000000, 0x3388f2b400000000, 0x2ab6213f00000000, + 0xe2a1bff000000000, 0x59ccf6f300000000, 0x91db683c00000000, + 0x88e5bbb700000000, 0x40f2257800000000, 0xfe3e29b100000000, + 0x3629b77e00000000, 0x2f1764f500000000, 0xe700fa3a00000000, + 0x5c6db33900000000, 0x947a2df600000000, 0x8d44fe7d00000000, + 0x455360b200000000, 0xb0db963400000000, 0x78cc08fb00000000, + 0x61f2db7000000000, 0xa9e545bf00000000, 0x12880cbc00000000, + 0xda9f927300000000, 0xc3a141f800000000, 0x0bb6df3700000000, + 0xb57ad3fe00000000, 0x7d6d4d3100000000, 0x64539eba00000000, + 0xac44007500000000, 0x1729497600000000, 0xdf3ed7b900000000, + 0xc600043200000000, 0x0e179afd00000000, 0x9b28411200000000, + 0x533fdfdd00000000, 0x4a010c5600000000, 0x8216929900000000, + 0x397bdb9a00000000, 0xf16c455500000000, 0xe85296de00000000, + 0x2045081100000000, 0x9e8904d800000000, 0x569e9a1700000000, + 0x4fa0499c00000000, 0x87b7d75300000000, 0x3cda9e5000000000, + 0xf4cd009f00000000, 0xedf3d31400000000, 0x25e44ddb00000000, + 0xd06cbb5d00000000, 0x187b259200000000, 0x0145f61900000000, + 0xc95268d600000000, 0x723f21d500000000, 0xba28bf1a00000000, + 0xa3166c9100000000, 0x6b01f25e00000000, 0xd5cdfe9700000000, + 0x1dda605800000000, 0x04e4b3d300000000, 0xccf32d1c00000000, + 0x779e641f00000000, 0xbf89fad000000000, 0xa6b7295b00000000, + 0x6ea0b79400000000, 0x0da0b58d00000000, 0xc5b72b4200000000, + 0xdc89f8c900000000, 0x149e660600000000, 0xaff32f0500000000, + 0x67e4b1ca00000000, 0x7eda624100000000, 0xb6cdfc8e00000000, + 0x0801f04700000000, 0xc0166e8800000000, 0xd928bd0300000000, + 0x113f23cc00000000, 0xaa526acf00000000, 0x6245f40000000000, + 0x7b7b278b00000000, 0xb36cb94400000000, 0x46e44fc200000000, + 0x8ef3d10d00000000, 0x97cd028600000000, 0x5fda9c4900000000, + 0xe4b7d54a00000000, 0x2ca04b8500000000, 0x359e980e00000000, + 0xfd8906c100000000, 0x43450a0800000000, 0x8b5294c700000000, + 0x926c474c00000000, 0x5a7bd98300000000, 0xe116908000000000, + 0x29010e4f00000000, 0x303fddc400000000, 0xf828430b00000000, + 0xf63fd9f600000000, 0x3e28473900000000, 0x271694b200000000, + 0xef010a7d00000000, 0x546c437e00000000, 0x9c7bddb100000000, + 0x85450e3a00000000, 0x4d5290f500000000, 0xf39e9c3c00000000, + 0x3b8902f300000000, 0x22b7d17800000000, 0xeaa04fb700000000, + 0x51cd06b400000000, 0x99da987b00000000, 0x80e44bf000000000, + 0x48f3d53f00000000, 0xbd7b23b900000000, 0x756cbd7600000000, + 0x6c526efd00000000, 0xa445f03200000000, 0x1f28b93100000000, + 0xd73f27fe00000000, 0xce01f47500000000, 0x06166aba00000000, + 0xb8da667300000000, 0x70cdf8bc00000000, 0x69f32b3700000000, + 0xa1e4b5f800000000, 0x1a89fcfb00000000, 0xd29e623400000000, + 0xcba0b1bf00000000, 0x03b72f7000000000, 0x60b72d6900000000, + 0xa8a0b3a600000000, 0xb19e602d00000000, 0x7989fee200000000, + 0xc2e4b7e100000000, 0x0af3292e00000000, 0x13cdfaa500000000, + 0xdbda646a00000000, 0x651668a300000000, 0xad01f66c00000000, + 0xb43f25e700000000, 0x7c28bb2800000000, 0xc745f22b00000000, + 0x0f526ce400000000, 0x166cbf6f00000000, 0xde7b21a000000000, + 0x2bf3d72600000000, 0xe3e449e900000000, 0xfada9a6200000000, + 0x32cd04ad00000000, 0x89a04dae00000000, 0x41b7d36100000000, + 0x588900ea00000000, 0x909e9e2500000000, 0x2e5292ec00000000, + 0xe6450c2300000000, 0xff7bdfa800000000, 0x376c416700000000, + 0x8c01086400000000, 0x441696ab00000000, 0x5d28452000000000, + 0x953fdbef00000000}, + {0x0000000000000000, 0x95d4709500000000, 0x6baf90f100000000, + 0xfe7be06400000000, 0x9758503800000000, 0x028c20ad00000000, + 0xfcf7c0c900000000, 0x6923b05c00000000, 0x2eb1a07000000000, + 0xbb65d0e500000000, 0x451e308100000000, 0xd0ca401400000000, + 0xb9e9f04800000000, 0x2c3d80dd00000000, 0xd24660b900000000, + 0x4792102c00000000, 0x5c6241e100000000, 0xc9b6317400000000, + 0x37cdd11000000000, 0xa219a18500000000, 0xcb3a11d900000000, + 0x5eee614c00000000, 0xa095812800000000, 0x3541f1bd00000000, + 0x72d3e19100000000, 0xe707910400000000, 0x197c716000000000, + 0x8ca801f500000000, 0xe58bb1a900000000, 0x705fc13c00000000, + 0x8e24215800000000, 0x1bf051cd00000000, 0xf9c2f31900000000, + 0x6c16838c00000000, 0x926d63e800000000, 0x07b9137d00000000, + 0x6e9aa32100000000, 0xfb4ed3b400000000, 0x053533d000000000, + 0x90e1434500000000, 0xd773536900000000, 0x42a723fc00000000, + 0xbcdcc39800000000, 0x2908b30d00000000, 0x402b035100000000, + 0xd5ff73c400000000, 0x2b8493a000000000, 0xbe50e33500000000, + 0xa5a0b2f800000000, 0x3074c26d00000000, 0xce0f220900000000, + 0x5bdb529c00000000, 0x32f8e2c000000000, 0xa72c925500000000, + 0x5957723100000000, 0xcc8302a400000000, 0x8b11128800000000, + 0x1ec5621d00000000, 0xe0be827900000000, 0x756af2ec00000000, + 0x1c4942b000000000, 0x899d322500000000, 0x77e6d24100000000, + 0xe232a2d400000000, 0xf285e73300000000, 0x675197a600000000, + 0x992a77c200000000, 0x0cfe075700000000, 0x65ddb70b00000000, + 0xf009c79e00000000, 0x0e7227fa00000000, 0x9ba6576f00000000, + 0xdc34474300000000, 0x49e037d600000000, 0xb79bd7b200000000, + 0x224fa72700000000, 0x4b6c177b00000000, 0xdeb867ee00000000, + 0x20c3878a00000000, 0xb517f71f00000000, 0xaee7a6d200000000, + 0x3b33d64700000000, 0xc548362300000000, 0x509c46b600000000, + 0x39bff6ea00000000, 0xac6b867f00000000, 0x5210661b00000000, + 0xc7c4168e00000000, 0x805606a200000000, 0x1582763700000000, + 0xebf9965300000000, 0x7e2de6c600000000, 0x170e569a00000000, + 0x82da260f00000000, 0x7ca1c66b00000000, 0xe975b6fe00000000, + 0x0b47142a00000000, 0x9e9364bf00000000, 0x60e884db00000000, + 0xf53cf44e00000000, 0x9c1f441200000000, 0x09cb348700000000, + 0xf7b0d4e300000000, 0x6264a47600000000, 0x25f6b45a00000000, + 0xb022c4cf00000000, 0x4e5924ab00000000, 0xdb8d543e00000000, + 0xb2aee46200000000, 0x277a94f700000000, 0xd901749300000000, + 0x4cd5040600000000, 0x572555cb00000000, 0xc2f1255e00000000, + 0x3c8ac53a00000000, 0xa95eb5af00000000, 0xc07d05f300000000, + 0x55a9756600000000, 0xabd2950200000000, 0x3e06e59700000000, + 0x7994f5bb00000000, 0xec40852e00000000, 0x123b654a00000000, + 0x87ef15df00000000, 0xeecca58300000000, 0x7b18d51600000000, + 0x8563357200000000, 0x10b745e700000000, 0xe40bcf6700000000, + 0x71dfbff200000000, 0x8fa45f9600000000, 0x1a702f0300000000, + 0x73539f5f00000000, 0xe687efca00000000, 0x18fc0fae00000000, + 0x8d287f3b00000000, 0xcaba6f1700000000, 0x5f6e1f8200000000, + 0xa115ffe600000000, 0x34c18f7300000000, 0x5de23f2f00000000, + 0xc8364fba00000000, 0x364dafde00000000, 0xa399df4b00000000, + 0xb8698e8600000000, 0x2dbdfe1300000000, 0xd3c61e7700000000, + 0x46126ee200000000, 0x2f31debe00000000, 0xbae5ae2b00000000, + 0x449e4e4f00000000, 0xd14a3eda00000000, 0x96d82ef600000000, + 0x030c5e6300000000, 0xfd77be0700000000, 0x68a3ce9200000000, + 0x01807ece00000000, 0x94540e5b00000000, 0x6a2fee3f00000000, + 0xfffb9eaa00000000, 0x1dc93c7e00000000, 0x881d4ceb00000000, + 0x7666ac8f00000000, 0xe3b2dc1a00000000, 0x8a916c4600000000, + 0x1f451cd300000000, 0xe13efcb700000000, 0x74ea8c2200000000, + 0x33789c0e00000000, 0xa6acec9b00000000, 0x58d70cff00000000, + 0xcd037c6a00000000, 0xa420cc3600000000, 0x31f4bca300000000, + 0xcf8f5cc700000000, 0x5a5b2c5200000000, 0x41ab7d9f00000000, + 0xd47f0d0a00000000, 0x2a04ed6e00000000, 0xbfd09dfb00000000, + 0xd6f32da700000000, 0x43275d3200000000, 0xbd5cbd5600000000, + 0x2888cdc300000000, 0x6f1addef00000000, 0xfacead7a00000000, + 0x04b54d1e00000000, 0x91613d8b00000000, 0xf8428dd700000000, + 0x6d96fd4200000000, 0x93ed1d2600000000, 0x06396db300000000, + 0x168e285400000000, 0x835a58c100000000, 0x7d21b8a500000000, + 0xe8f5c83000000000, 0x81d6786c00000000, 0x140208f900000000, + 0xea79e89d00000000, 0x7fad980800000000, 0x383f882400000000, + 0xadebf8b100000000, 0x539018d500000000, 0xc644684000000000, + 0xaf67d81c00000000, 0x3ab3a88900000000, 0xc4c848ed00000000, + 0x511c387800000000, 0x4aec69b500000000, 0xdf38192000000000, + 0x2143f94400000000, 0xb49789d100000000, 0xddb4398d00000000, + 0x4860491800000000, 0xb61ba97c00000000, 0x23cfd9e900000000, + 0x645dc9c500000000, 0xf189b95000000000, 0x0ff2593400000000, + 0x9a2629a100000000, 0xf30599fd00000000, 0x66d1e96800000000, + 0x98aa090c00000000, 0x0d7e799900000000, 0xef4cdb4d00000000, + 0x7a98abd800000000, 0x84e34bbc00000000, 0x11373b2900000000, + 0x78148b7500000000, 0xedc0fbe000000000, 0x13bb1b8400000000, + 0x866f6b1100000000, 0xc1fd7b3d00000000, 0x54290ba800000000, + 0xaa52ebcc00000000, 0x3f869b5900000000, 0x56a52b0500000000, + 0xc3715b9000000000, 0x3d0abbf400000000, 0xa8decb6100000000, + 0xb32e9aac00000000, 0x26faea3900000000, 0xd8810a5d00000000, + 0x4d557ac800000000, 0x2476ca9400000000, 0xb1a2ba0100000000, + 0x4fd95a6500000000, 0xda0d2af000000000, 0x9d9f3adc00000000, + 0x084b4a4900000000, 0xf630aa2d00000000, 0x63e4dab800000000, + 0x0ac76ae400000000, 0x9f131a7100000000, 0x6168fa1500000000, + 0xf4bc8a8000000000}, + {0x0000000000000000, 0x1f17f08000000000, 0x7f2891da00000000, + 0x603f615a00000000, 0xbf56536e00000000, 0xa041a3ee00000000, + 0xc07ec2b400000000, 0xdf69323400000000, 0x7eada6dc00000000, + 0x61ba565c00000000, 0x0185370600000000, 0x1e92c78600000000, + 0xc1fbf5b200000000, 0xdeec053200000000, 0xbed3646800000000, + 0xa1c494e800000000, 0xbd5c3c6200000000, 0xa24bcce200000000, + 0xc274adb800000000, 0xdd635d3800000000, 0x020a6f0c00000000, + 0x1d1d9f8c00000000, 0x7d22fed600000000, 0x62350e5600000000, + 0xc3f19abe00000000, 0xdce66a3e00000000, 0xbcd90b6400000000, + 0xa3cefbe400000000, 0x7ca7c9d000000000, 0x63b0395000000000, + 0x038f580a00000000, 0x1c98a88a00000000, 0x7ab978c400000000, + 0x65ae884400000000, 0x0591e91e00000000, 0x1a86199e00000000, + 0xc5ef2baa00000000, 0xdaf8db2a00000000, 0xbac7ba7000000000, + 0xa5d04af000000000, 0x0414de1800000000, 0x1b032e9800000000, + 0x7b3c4fc200000000, 0x642bbf4200000000, 0xbb428d7600000000, + 0xa4557df600000000, 0xc46a1cac00000000, 0xdb7dec2c00000000, + 0xc7e544a600000000, 0xd8f2b42600000000, 0xb8cdd57c00000000, + 0xa7da25fc00000000, 0x78b317c800000000, 0x67a4e74800000000, + 0x079b861200000000, 0x188c769200000000, 0xb948e27a00000000, + 0xa65f12fa00000000, 0xc66073a000000000, 0xd977832000000000, + 0x061eb11400000000, 0x1909419400000000, 0x793620ce00000000, + 0x6621d04e00000000, 0xb574805300000000, 0xaa6370d300000000, + 0xca5c118900000000, 0xd54be10900000000, 0x0a22d33d00000000, + 0x153523bd00000000, 0x750a42e700000000, 0x6a1db26700000000, + 0xcbd9268f00000000, 0xd4ced60f00000000, 0xb4f1b75500000000, + 0xabe647d500000000, 0x748f75e100000000, 0x6b98856100000000, + 0x0ba7e43b00000000, 0x14b014bb00000000, 0x0828bc3100000000, + 0x173f4cb100000000, 0x77002deb00000000, 0x6817dd6b00000000, + 0xb77eef5f00000000, 0xa8691fdf00000000, 0xc8567e8500000000, + 0xd7418e0500000000, 0x76851aed00000000, 0x6992ea6d00000000, + 0x09ad8b3700000000, 0x16ba7bb700000000, 0xc9d3498300000000, + 0xd6c4b90300000000, 0xb6fbd85900000000, 0xa9ec28d900000000, + 0xcfcdf89700000000, 0xd0da081700000000, 0xb0e5694d00000000, + 0xaff299cd00000000, 0x709babf900000000, 0x6f8c5b7900000000, + 0x0fb33a2300000000, 0x10a4caa300000000, 0xb1605e4b00000000, + 0xae77aecb00000000, 0xce48cf9100000000, 0xd15f3f1100000000, + 0x0e360d2500000000, 0x1121fda500000000, 0x711e9cff00000000, + 0x6e096c7f00000000, 0x7291c4f500000000, 0x6d86347500000000, + 0x0db9552f00000000, 0x12aea5af00000000, 0xcdc7979b00000000, + 0xd2d0671b00000000, 0xb2ef064100000000, 0xadf8f6c100000000, + 0x0c3c622900000000, 0x132b92a900000000, 0x7314f3f300000000, + 0x6c03037300000000, 0xb36a314700000000, 0xac7dc1c700000000, + 0xcc42a09d00000000, 0xd355501d00000000, 0x6ae900a700000000, + 0x75fef02700000000, 0x15c1917d00000000, 0x0ad661fd00000000, + 0xd5bf53c900000000, 0xcaa8a34900000000, 0xaa97c21300000000, + 0xb580329300000000, 0x1444a67b00000000, 0x0b5356fb00000000, + 0x6b6c37a100000000, 0x747bc72100000000, 0xab12f51500000000, + 0xb405059500000000, 0xd43a64cf00000000, 0xcb2d944f00000000, + 0xd7b53cc500000000, 0xc8a2cc4500000000, 0xa89dad1f00000000, + 0xb78a5d9f00000000, 0x68e36fab00000000, 0x77f49f2b00000000, + 0x17cbfe7100000000, 0x08dc0ef100000000, 0xa9189a1900000000, + 0xb60f6a9900000000, 0xd6300bc300000000, 0xc927fb4300000000, + 0x164ec97700000000, 0x095939f700000000, 0x696658ad00000000, + 0x7671a82d00000000, 0x1050786300000000, 0x0f4788e300000000, + 0x6f78e9b900000000, 0x706f193900000000, 0xaf062b0d00000000, + 0xb011db8d00000000, 0xd02ebad700000000, 0xcf394a5700000000, + 0x6efddebf00000000, 0x71ea2e3f00000000, 0x11d54f6500000000, + 0x0ec2bfe500000000, 0xd1ab8dd100000000, 0xcebc7d5100000000, + 0xae831c0b00000000, 0xb194ec8b00000000, 0xad0c440100000000, + 0xb21bb48100000000, 0xd224d5db00000000, 0xcd33255b00000000, + 0x125a176f00000000, 0x0d4de7ef00000000, 0x6d7286b500000000, + 0x7265763500000000, 0xd3a1e2dd00000000, 0xccb6125d00000000, + 0xac89730700000000, 0xb39e838700000000, 0x6cf7b1b300000000, + 0x73e0413300000000, 0x13df206900000000, 0x0cc8d0e900000000, + 0xdf9d80f400000000, 0xc08a707400000000, 0xa0b5112e00000000, + 0xbfa2e1ae00000000, 0x60cbd39a00000000, 0x7fdc231a00000000, + 0x1fe3424000000000, 0x00f4b2c000000000, 0xa130262800000000, + 0xbe27d6a800000000, 0xde18b7f200000000, 0xc10f477200000000, + 0x1e66754600000000, 0x017185c600000000, 0x614ee49c00000000, + 0x7e59141c00000000, 0x62c1bc9600000000, 0x7dd64c1600000000, + 0x1de92d4c00000000, 0x02feddcc00000000, 0xdd97eff800000000, + 0xc2801f7800000000, 0xa2bf7e2200000000, 0xbda88ea200000000, + 0x1c6c1a4a00000000, 0x037beaca00000000, 0x63448b9000000000, + 0x7c537b1000000000, 0xa33a492400000000, 0xbc2db9a400000000, + 0xdc12d8fe00000000, 0xc305287e00000000, 0xa524f83000000000, + 0xba3308b000000000, 0xda0c69ea00000000, 0xc51b996a00000000, + 0x1a72ab5e00000000, 0x05655bde00000000, 0x655a3a8400000000, + 0x7a4dca0400000000, 0xdb895eec00000000, 0xc49eae6c00000000, + 0xa4a1cf3600000000, 0xbbb63fb600000000, 0x64df0d8200000000, + 0x7bc8fd0200000000, 0x1bf79c5800000000, 0x04e06cd800000000, + 0x1878c45200000000, 0x076f34d200000000, 0x6750558800000000, + 0x7847a50800000000, 0xa72e973c00000000, 0xb83967bc00000000, + 0xd80606e600000000, 0xc711f66600000000, 0x66d5628e00000000, + 0x79c2920e00000000, 0x19fdf35400000000, 0x06ea03d400000000, + 0xd98331e000000000, 0xc694c16000000000, 0xa6aba03a00000000, + 0xb9bc50ba00000000}, + {0x0000000000000000, 0xe2fd888d00000000, 0x85fd60c000000000, + 0x6700e84d00000000, 0x4bfdb05b00000000, 0xa90038d600000000, + 0xce00d09b00000000, 0x2cfd581600000000, 0x96fa61b700000000, + 0x7407e93a00000000, 0x1307017700000000, 0xf1fa89fa00000000, + 0xdd07d1ec00000000, 0x3ffa596100000000, 0x58fab12c00000000, + 0xba0739a100000000, 0x6df3b2b500000000, 0x8f0e3a3800000000, + 0xe80ed27500000000, 0x0af35af800000000, 0x260e02ee00000000, + 0xc4f38a6300000000, 0xa3f3622e00000000, 0x410eeaa300000000, + 0xfb09d30200000000, 0x19f45b8f00000000, 0x7ef4b3c200000000, + 0x9c093b4f00000000, 0xb0f4635900000000, 0x5209ebd400000000, + 0x3509039900000000, 0xd7f48b1400000000, 0x9be014b000000000, + 0x791d9c3d00000000, 0x1e1d747000000000, 0xfce0fcfd00000000, + 0xd01da4eb00000000, 0x32e02c6600000000, 0x55e0c42b00000000, + 0xb71d4ca600000000, 0x0d1a750700000000, 0xefe7fd8a00000000, + 0x88e715c700000000, 0x6a1a9d4a00000000, 0x46e7c55c00000000, + 0xa41a4dd100000000, 0xc31aa59c00000000, 0x21e72d1100000000, + 0xf613a60500000000, 0x14ee2e8800000000, 0x73eec6c500000000, + 0x91134e4800000000, 0xbdee165e00000000, 0x5f139ed300000000, + 0x3813769e00000000, 0xdaeefe1300000000, 0x60e9c7b200000000, + 0x82144f3f00000000, 0xe514a77200000000, 0x07e92fff00000000, + 0x2b1477e900000000, 0xc9e9ff6400000000, 0xaee9172900000000, + 0x4c149fa400000000, 0x77c758bb00000000, 0x953ad03600000000, + 0xf23a387b00000000, 0x10c7b0f600000000, 0x3c3ae8e000000000, + 0xdec7606d00000000, 0xb9c7882000000000, 0x5b3a00ad00000000, + 0xe13d390c00000000, 0x03c0b18100000000, 0x64c059cc00000000, + 0x863dd14100000000, 0xaac0895700000000, 0x483d01da00000000, + 0x2f3de99700000000, 0xcdc0611a00000000, 0x1a34ea0e00000000, + 0xf8c9628300000000, 0x9fc98ace00000000, 0x7d34024300000000, + 0x51c95a5500000000, 0xb334d2d800000000, 0xd4343a9500000000, + 0x36c9b21800000000, 0x8cce8bb900000000, 0x6e33033400000000, + 0x0933eb7900000000, 0xebce63f400000000, 0xc7333be200000000, + 0x25ceb36f00000000, 0x42ce5b2200000000, 0xa033d3af00000000, + 0xec274c0b00000000, 0x0edac48600000000, 0x69da2ccb00000000, + 0x8b27a44600000000, 0xa7dafc5000000000, 0x452774dd00000000, + 0x22279c9000000000, 0xc0da141d00000000, 0x7add2dbc00000000, + 0x9820a53100000000, 0xff204d7c00000000, 0x1dddc5f100000000, + 0x31209de700000000, 0xd3dd156a00000000, 0xb4ddfd2700000000, + 0x562075aa00000000, 0x81d4febe00000000, 0x6329763300000000, + 0x04299e7e00000000, 0xe6d416f300000000, 0xca294ee500000000, + 0x28d4c66800000000, 0x4fd42e2500000000, 0xad29a6a800000000, + 0x172e9f0900000000, 0xf5d3178400000000, 0x92d3ffc900000000, + 0x702e774400000000, 0x5cd32f5200000000, 0xbe2ea7df00000000, + 0xd92e4f9200000000, 0x3bd3c71f00000000, 0xaf88c0ad00000000, + 0x4d75482000000000, 0x2a75a06d00000000, 0xc88828e000000000, + 0xe47570f600000000, 0x0688f87b00000000, 0x6188103600000000, + 0x837598bb00000000, 0x3972a11a00000000, 0xdb8f299700000000, + 0xbc8fc1da00000000, 0x5e72495700000000, 0x728f114100000000, + 0x907299cc00000000, 0xf772718100000000, 0x158ff90c00000000, + 0xc27b721800000000, 0x2086fa9500000000, 0x478612d800000000, + 0xa57b9a5500000000, 0x8986c24300000000, 0x6b7b4ace00000000, + 0x0c7ba28300000000, 0xee862a0e00000000, 0x548113af00000000, + 0xb67c9b2200000000, 0xd17c736f00000000, 0x3381fbe200000000, + 0x1f7ca3f400000000, 0xfd812b7900000000, 0x9a81c33400000000, + 0x787c4bb900000000, 0x3468d41d00000000, 0xd6955c9000000000, + 0xb195b4dd00000000, 0x53683c5000000000, 0x7f95644600000000, + 0x9d68eccb00000000, 0xfa68048600000000, 0x18958c0b00000000, + 0xa292b5aa00000000, 0x406f3d2700000000, 0x276fd56a00000000, + 0xc5925de700000000, 0xe96f05f100000000, 0x0b928d7c00000000, + 0x6c92653100000000, 0x8e6fedbc00000000, 0x599b66a800000000, + 0xbb66ee2500000000, 0xdc66066800000000, 0x3e9b8ee500000000, + 0x1266d6f300000000, 0xf09b5e7e00000000, 0x979bb63300000000, + 0x75663ebe00000000, 0xcf61071f00000000, 0x2d9c8f9200000000, + 0x4a9c67df00000000, 0xa861ef5200000000, 0x849cb74400000000, + 0x66613fc900000000, 0x0161d78400000000, 0xe39c5f0900000000, + 0xd84f981600000000, 0x3ab2109b00000000, 0x5db2f8d600000000, + 0xbf4f705b00000000, 0x93b2284d00000000, 0x714fa0c000000000, + 0x164f488d00000000, 0xf4b2c00000000000, 0x4eb5f9a100000000, + 0xac48712c00000000, 0xcb48996100000000, 0x29b511ec00000000, + 0x054849fa00000000, 0xe7b5c17700000000, 0x80b5293a00000000, + 0x6248a1b700000000, 0xb5bc2aa300000000, 0x5741a22e00000000, + 0x30414a6300000000, 0xd2bcc2ee00000000, 0xfe419af800000000, + 0x1cbc127500000000, 0x7bbcfa3800000000, 0x994172b500000000, + 0x23464b1400000000, 0xc1bbc39900000000, 0xa6bb2bd400000000, + 0x4446a35900000000, 0x68bbfb4f00000000, 0x8a4673c200000000, + 0xed469b8f00000000, 0x0fbb130200000000, 0x43af8ca600000000, + 0xa152042b00000000, 0xc652ec6600000000, 0x24af64eb00000000, + 0x08523cfd00000000, 0xeaafb47000000000, 0x8daf5c3d00000000, + 0x6f52d4b000000000, 0xd555ed1100000000, 0x37a8659c00000000, + 0x50a88dd100000000, 0xb255055c00000000, 0x9ea85d4a00000000, + 0x7c55d5c700000000, 0x1b553d8a00000000, 0xf9a8b50700000000, + 0x2e5c3e1300000000, 0xcca1b69e00000000, 0xaba15ed300000000, + 0x495cd65e00000000, 0x65a18e4800000000, 0x875c06c500000000, + 0xe05cee8800000000, 0x02a1660500000000, 0xb8a65fa400000000, + 0x5a5bd72900000000, 0x3d5b3f6400000000, 0xdfa6b7e900000000, + 0xf35befff00000000, 0x11a6677200000000, 0x76a68f3f00000000, + 0x945b07b200000000}, + {0x0000000000000000, 0xa90b894e00000000, 0x5217129d00000000, + 0xfb1c9bd300000000, 0xe52855e100000000, 0x4c23dcaf00000000, + 0xb73f477c00000000, 0x1e34ce3200000000, 0x8b57db1900000000, + 0x225c525700000000, 0xd940c98400000000, 0x704b40ca00000000, + 0x6e7f8ef800000000, 0xc77407b600000000, 0x3c689c6500000000, + 0x9563152b00000000, 0x16afb63300000000, 0xbfa43f7d00000000, + 0x44b8a4ae00000000, 0xedb32de000000000, 0xf387e3d200000000, + 0x5a8c6a9c00000000, 0xa190f14f00000000, 0x089b780100000000, + 0x9df86d2a00000000, 0x34f3e46400000000, 0xcfef7fb700000000, + 0x66e4f6f900000000, 0x78d038cb00000000, 0xd1dbb18500000000, + 0x2ac72a5600000000, 0x83cca31800000000, 0x2c5e6d6700000000, + 0x8555e42900000000, 0x7e497ffa00000000, 0xd742f6b400000000, + 0xc976388600000000, 0x607db1c800000000, 0x9b612a1b00000000, + 0x326aa35500000000, 0xa709b67e00000000, 0x0e023f3000000000, + 0xf51ea4e300000000, 0x5c152dad00000000, 0x4221e39f00000000, + 0xeb2a6ad100000000, 0x1036f10200000000, 0xb93d784c00000000, + 0x3af1db5400000000, 0x93fa521a00000000, 0x68e6c9c900000000, + 0xc1ed408700000000, 0xdfd98eb500000000, 0x76d207fb00000000, + 0x8dce9c2800000000, 0x24c5156600000000, 0xb1a6004d00000000, + 0x18ad890300000000, 0xe3b112d000000000, 0x4aba9b9e00000000, + 0x548e55ac00000000, 0xfd85dce200000000, 0x0699473100000000, + 0xaf92ce7f00000000, 0x58bcdace00000000, 0xf1b7538000000000, + 0x0aabc85300000000, 0xa3a0411d00000000, 0xbd948f2f00000000, + 0x149f066100000000, 0xef839db200000000, 0x468814fc00000000, + 0xd3eb01d700000000, 0x7ae0889900000000, 0x81fc134a00000000, + 0x28f79a0400000000, 0x36c3543600000000, 0x9fc8dd7800000000, + 0x64d446ab00000000, 0xcddfcfe500000000, 0x4e136cfd00000000, + 0xe718e5b300000000, 0x1c047e6000000000, 0xb50ff72e00000000, + 0xab3b391c00000000, 0x0230b05200000000, 0xf92c2b8100000000, + 0x5027a2cf00000000, 0xc544b7e400000000, 0x6c4f3eaa00000000, + 0x9753a57900000000, 0x3e582c3700000000, 0x206ce20500000000, + 0x89676b4b00000000, 0x727bf09800000000, 0xdb7079d600000000, + 0x74e2b7a900000000, 0xdde93ee700000000, 0x26f5a53400000000, + 0x8ffe2c7a00000000, 0x91cae24800000000, 0x38c16b0600000000, + 0xc3ddf0d500000000, 0x6ad6799b00000000, 0xffb56cb000000000, + 0x56bee5fe00000000, 0xada27e2d00000000, 0x04a9f76300000000, + 0x1a9d395100000000, 0xb396b01f00000000, 0x488a2bcc00000000, + 0xe181a28200000000, 0x624d019a00000000, 0xcb4688d400000000, + 0x305a130700000000, 0x99519a4900000000, 0x8765547b00000000, + 0x2e6edd3500000000, 0xd57246e600000000, 0x7c79cfa800000000, + 0xe91ada8300000000, 0x401153cd00000000, 0xbb0dc81e00000000, + 0x1206415000000000, 0x0c328f6200000000, 0xa539062c00000000, + 0x5e259dff00000000, 0xf72e14b100000000, 0xf17ec44600000000, + 0x58754d0800000000, 0xa369d6db00000000, 0x0a625f9500000000, + 0x145691a700000000, 0xbd5d18e900000000, 0x4641833a00000000, + 0xef4a0a7400000000, 0x7a291f5f00000000, 0xd322961100000000, + 0x283e0dc200000000, 0x8135848c00000000, 0x9f014abe00000000, + 0x360ac3f000000000, 0xcd16582300000000, 0x641dd16d00000000, + 0xe7d1727500000000, 0x4edafb3b00000000, 0xb5c660e800000000, + 0x1ccde9a600000000, 0x02f9279400000000, 0xabf2aeda00000000, + 0x50ee350900000000, 0xf9e5bc4700000000, 0x6c86a96c00000000, + 0xc58d202200000000, 0x3e91bbf100000000, 0x979a32bf00000000, + 0x89aefc8d00000000, 0x20a575c300000000, 0xdbb9ee1000000000, + 0x72b2675e00000000, 0xdd20a92100000000, 0x742b206f00000000, + 0x8f37bbbc00000000, 0x263c32f200000000, 0x3808fcc000000000, + 0x9103758e00000000, 0x6a1fee5d00000000, 0xc314671300000000, + 0x5677723800000000, 0xff7cfb7600000000, 0x046060a500000000, + 0xad6be9eb00000000, 0xb35f27d900000000, 0x1a54ae9700000000, + 0xe148354400000000, 0x4843bc0a00000000, 0xcb8f1f1200000000, + 0x6284965c00000000, 0x99980d8f00000000, 0x309384c100000000, + 0x2ea74af300000000, 0x87acc3bd00000000, 0x7cb0586e00000000, + 0xd5bbd12000000000, 0x40d8c40b00000000, 0xe9d34d4500000000, + 0x12cfd69600000000, 0xbbc45fd800000000, 0xa5f091ea00000000, + 0x0cfb18a400000000, 0xf7e7837700000000, 0x5eec0a3900000000, + 0xa9c21e8800000000, 0x00c997c600000000, 0xfbd50c1500000000, + 0x52de855b00000000, 0x4cea4b6900000000, 0xe5e1c22700000000, + 0x1efd59f400000000, 0xb7f6d0ba00000000, 0x2295c59100000000, + 0x8b9e4cdf00000000, 0x7082d70c00000000, 0xd9895e4200000000, + 0xc7bd907000000000, 0x6eb6193e00000000, 0x95aa82ed00000000, + 0x3ca10ba300000000, 0xbf6da8bb00000000, 0x166621f500000000, + 0xed7aba2600000000, 0x4471336800000000, 0x5a45fd5a00000000, + 0xf34e741400000000, 0x0852efc700000000, 0xa159668900000000, + 0x343a73a200000000, 0x9d31faec00000000, 0x662d613f00000000, + 0xcf26e87100000000, 0xd112264300000000, 0x7819af0d00000000, + 0x830534de00000000, 0x2a0ebd9000000000, 0x859c73ef00000000, + 0x2c97faa100000000, 0xd78b617200000000, 0x7e80e83c00000000, + 0x60b4260e00000000, 0xc9bfaf4000000000, 0x32a3349300000000, + 0x9ba8bddd00000000, 0x0ecba8f600000000, 0xa7c021b800000000, + 0x5cdcba6b00000000, 0xf5d7332500000000, 0xebe3fd1700000000, + 0x42e8745900000000, 0xb9f4ef8a00000000, 0x10ff66c400000000, + 0x9333c5dc00000000, 0x3a384c9200000000, 0xc124d74100000000, + 0x682f5e0f00000000, 0x761b903d00000000, 0xdf10197300000000, + 0x240c82a000000000, 0x8d070bee00000000, 0x18641ec500000000, + 0xb16f978b00000000, 0x4a730c5800000000, 0xe378851600000000, + 0xfd4c4b2400000000, 0x5447c26a00000000, 0xaf5b59b900000000, + 0x0650d0f700000000}, + {0x0000000000000000, 0x479244af00000000, 0xcf22f88500000000, + 0x88b0bc2a00000000, 0xdf4381d000000000, 0x98d1c57f00000000, + 0x1061795500000000, 0x57f33dfa00000000, 0xff81737a00000000, + 0xb81337d500000000, 0x30a38bff00000000, 0x7731cf5000000000, + 0x20c2f2aa00000000, 0x6750b60500000000, 0xefe00a2f00000000, + 0xa8724e8000000000, 0xfe03e7f400000000, 0xb991a35b00000000, + 0x31211f7100000000, 0x76b35bde00000000, 0x2140662400000000, + 0x66d2228b00000000, 0xee629ea100000000, 0xa9f0da0e00000000, + 0x0182948e00000000, 0x4610d02100000000, 0xcea06c0b00000000, + 0x893228a400000000, 0xdec1155e00000000, 0x995351f100000000, + 0x11e3eddb00000000, 0x5671a97400000000, 0xbd01bf3200000000, + 0xfa93fb9d00000000, 0x722347b700000000, 0x35b1031800000000, + 0x62423ee200000000, 0x25d07a4d00000000, 0xad60c66700000000, + 0xeaf282c800000000, 0x4280cc4800000000, 0x051288e700000000, + 0x8da234cd00000000, 0xca30706200000000, 0x9dc34d9800000000, + 0xda51093700000000, 0x52e1b51d00000000, 0x1573f1b200000000, + 0x430258c600000000, 0x04901c6900000000, 0x8c20a04300000000, + 0xcbb2e4ec00000000, 0x9c41d91600000000, 0xdbd39db900000000, + 0x5363219300000000, 0x14f1653c00000000, 0xbc832bbc00000000, + 0xfb116f1300000000, 0x73a1d33900000000, 0x3433979600000000, + 0x63c0aa6c00000000, 0x2452eec300000000, 0xace252e900000000, + 0xeb70164600000000, 0x7a037e6500000000, 0x3d913aca00000000, + 0xb52186e000000000, 0xf2b3c24f00000000, 0xa540ffb500000000, + 0xe2d2bb1a00000000, 0x6a62073000000000, 0x2df0439f00000000, + 0x85820d1f00000000, 0xc21049b000000000, 0x4aa0f59a00000000, + 0x0d32b13500000000, 0x5ac18ccf00000000, 0x1d53c86000000000, + 0x95e3744a00000000, 0xd27130e500000000, 0x8400999100000000, + 0xc392dd3e00000000, 0x4b22611400000000, 0x0cb025bb00000000, + 0x5b43184100000000, 0x1cd15cee00000000, 0x9461e0c400000000, + 0xd3f3a46b00000000, 0x7b81eaeb00000000, 0x3c13ae4400000000, + 0xb4a3126e00000000, 0xf33156c100000000, 0xa4c26b3b00000000, + 0xe3502f9400000000, 0x6be093be00000000, 0x2c72d71100000000, + 0xc702c15700000000, 0x809085f800000000, 0x082039d200000000, + 0x4fb27d7d00000000, 0x1841408700000000, 0x5fd3042800000000, + 0xd763b80200000000, 0x90f1fcad00000000, 0x3883b22d00000000, + 0x7f11f68200000000, 0xf7a14aa800000000, 0xb0330e0700000000, + 0xe7c033fd00000000, 0xa052775200000000, 0x28e2cb7800000000, + 0x6f708fd700000000, 0x390126a300000000, 0x7e93620c00000000, + 0xf623de2600000000, 0xb1b19a8900000000, 0xe642a77300000000, + 0xa1d0e3dc00000000, 0x29605ff600000000, 0x6ef21b5900000000, + 0xc68055d900000000, 0x8112117600000000, 0x09a2ad5c00000000, + 0x4e30e9f300000000, 0x19c3d40900000000, 0x5e5190a600000000, + 0xd6e12c8c00000000, 0x9173682300000000, 0xf406fcca00000000, + 0xb394b86500000000, 0x3b24044f00000000, 0x7cb640e000000000, + 0x2b457d1a00000000, 0x6cd739b500000000, 0xe467859f00000000, + 0xa3f5c13000000000, 0x0b878fb000000000, 0x4c15cb1f00000000, + 0xc4a5773500000000, 0x8337339a00000000, 0xd4c40e6000000000, + 0x93564acf00000000, 0x1be6f6e500000000, 0x5c74b24a00000000, + 0x0a051b3e00000000, 0x4d975f9100000000, 0xc527e3bb00000000, + 0x82b5a71400000000, 0xd5469aee00000000, 0x92d4de4100000000, + 0x1a64626b00000000, 0x5df626c400000000, 0xf584684400000000, + 0xb2162ceb00000000, 0x3aa690c100000000, 0x7d34d46e00000000, + 0x2ac7e99400000000, 0x6d55ad3b00000000, 0xe5e5111100000000, + 0xa27755be00000000, 0x490743f800000000, 0x0e95075700000000, + 0x8625bb7d00000000, 0xc1b7ffd200000000, 0x9644c22800000000, + 0xd1d6868700000000, 0x59663aad00000000, 0x1ef47e0200000000, + 0xb686308200000000, 0xf114742d00000000, 0x79a4c80700000000, + 0x3e368ca800000000, 0x69c5b15200000000, 0x2e57f5fd00000000, + 0xa6e749d700000000, 0xe1750d7800000000, 0xb704a40c00000000, + 0xf096e0a300000000, 0x78265c8900000000, 0x3fb4182600000000, + 0x684725dc00000000, 0x2fd5617300000000, 0xa765dd5900000000, + 0xe0f799f600000000, 0x4885d77600000000, 0x0f1793d900000000, + 0x87a72ff300000000, 0xc0356b5c00000000, 0x97c656a600000000, + 0xd054120900000000, 0x58e4ae2300000000, 0x1f76ea8c00000000, + 0x8e0582af00000000, 0xc997c60000000000, 0x41277a2a00000000, + 0x06b53e8500000000, 0x5146037f00000000, 0x16d447d000000000, + 0x9e64fbfa00000000, 0xd9f6bf5500000000, 0x7184f1d500000000, + 0x3616b57a00000000, 0xbea6095000000000, 0xf9344dff00000000, + 0xaec7700500000000, 0xe95534aa00000000, 0x61e5888000000000, + 0x2677cc2f00000000, 0x7006655b00000000, 0x379421f400000000, + 0xbf249dde00000000, 0xf8b6d97100000000, 0xaf45e48b00000000, + 0xe8d7a02400000000, 0x60671c0e00000000, 0x27f558a100000000, + 0x8f87162100000000, 0xc815528e00000000, 0x40a5eea400000000, + 0x0737aa0b00000000, 0x50c497f100000000, 0x1756d35e00000000, + 0x9fe66f7400000000, 0xd8742bdb00000000, 0x33043d9d00000000, + 0x7496793200000000, 0xfc26c51800000000, 0xbbb481b700000000, + 0xec47bc4d00000000, 0xabd5f8e200000000, 0x236544c800000000, + 0x64f7006700000000, 0xcc854ee700000000, 0x8b170a4800000000, + 0x03a7b66200000000, 0x4435f2cd00000000, 0x13c6cf3700000000, + 0x54548b9800000000, 0xdce437b200000000, 0x9b76731d00000000, + 0xcd07da6900000000, 0x8a959ec600000000, 0x022522ec00000000, + 0x45b7664300000000, 0x12445bb900000000, 0x55d61f1600000000, + 0xdd66a33c00000000, 0x9af4e79300000000, 0x3286a91300000000, + 0x7514edbc00000000, 0xfda4519600000000, 0xba36153900000000, + 0xedc528c300000000, 0xaa576c6c00000000, 0x22e7d04600000000, + 0x657594e900000000}}; + +#else /* W == 4 */ + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0x65673b46, 0xcace768c, 0xafa94dca, 0x4eedeb59, + 0x2b8ad01f, 0x84239dd5, 0xe144a693, 0x9ddbd6b2, 0xf8bcedf4, + 0x5715a03e, 0x32729b78, 0xd3363deb, 0xb65106ad, 0x19f84b67, + 0x7c9f7021, 0xe0c6ab25, 0x85a19063, 0x2a08dda9, 0x4f6fe6ef, + 0xae2b407c, 0xcb4c7b3a, 0x64e536f0, 0x01820db6, 0x7d1d7d97, + 0x187a46d1, 0xb7d30b1b, 0xd2b4305d, 0x33f096ce, 0x5697ad88, + 0xf93ee042, 0x9c59db04, 0x1afc500b, 0x7f9b6b4d, 0xd0322687, + 0xb5551dc1, 0x5411bb52, 0x31768014, 0x9edfcdde, 0xfbb8f698, + 0x872786b9, 0xe240bdff, 0x4de9f035, 0x288ecb73, 0xc9ca6de0, + 0xacad56a6, 0x03041b6c, 0x6663202a, 0xfa3afb2e, 0x9f5dc068, + 0x30f48da2, 0x5593b6e4, 0xb4d71077, 0xd1b02b31, 0x7e1966fb, + 0x1b7e5dbd, 0x67e12d9c, 0x028616da, 0xad2f5b10, 0xc8486056, + 0x290cc6c5, 0x4c6bfd83, 0xe3c2b049, 0x86a58b0f, 0x35f8a016, + 0x509f9b50, 0xff36d69a, 0x9a51eddc, 0x7b154b4f, 0x1e727009, + 0xb1db3dc3, 0xd4bc0685, 0xa82376a4, 0xcd444de2, 0x62ed0028, + 0x078a3b6e, 0xe6ce9dfd, 0x83a9a6bb, 0x2c00eb71, 0x4967d037, + 0xd53e0b33, 0xb0593075, 0x1ff07dbf, 0x7a9746f9, 0x9bd3e06a, + 0xfeb4db2c, 0x511d96e6, 0x347aada0, 0x48e5dd81, 0x2d82e6c7, + 0x822bab0d, 0xe74c904b, 0x060836d8, 0x636f0d9e, 0xccc64054, + 0xa9a17b12, 0x2f04f01d, 0x4a63cb5b, 0xe5ca8691, 0x80adbdd7, + 0x61e91b44, 0x048e2002, 0xab276dc8, 0xce40568e, 0xb2df26af, + 0xd7b81de9, 0x78115023, 0x1d766b65, 0xfc32cdf6, 0x9955f6b0, + 0x36fcbb7a, 0x539b803c, 0xcfc25b38, 0xaaa5607e, 0x050c2db4, + 0x606b16f2, 0x812fb061, 0xe4488b27, 0x4be1c6ed, 0x2e86fdab, + 0x52198d8a, 0x377eb6cc, 0x98d7fb06, 0xfdb0c040, 0x1cf466d3, + 0x79935d95, 0xd63a105f, 0xb35d2b19, 0x6bf1402c, 0x0e967b6a, + 0xa13f36a0, 0xc4580de6, 0x251cab75, 0x407b9033, 0xefd2ddf9, + 0x8ab5e6bf, 0xf62a969e, 0x934dadd8, 0x3ce4e012, 0x5983db54, + 0xb8c77dc7, 0xdda04681, 0x72090b4b, 0x176e300d, 0x8b37eb09, + 0xee50d04f, 0x41f99d85, 0x249ea6c3, 0xc5da0050, 0xa0bd3b16, + 0x0f1476dc, 0x6a734d9a, 0x16ec3dbb, 0x738b06fd, 0xdc224b37, + 0xb9457071, 0x5801d6e2, 0x3d66eda4, 0x92cfa06e, 0xf7a89b28, + 0x710d1027, 0x146a2b61, 0xbbc366ab, 0xdea45ded, 0x3fe0fb7e, + 0x5a87c038, 0xf52e8df2, 0x9049b6b4, 0xecd6c695, 0x89b1fdd3, + 0x2618b019, 0x437f8b5f, 0xa23b2dcc, 0xc75c168a, 0x68f55b40, + 0x0d926006, 0x91cbbb02, 0xf4ac8044, 0x5b05cd8e, 0x3e62f6c8, + 0xdf26505b, 0xba416b1d, 0x15e826d7, 0x708f1d91, 0x0c106db0, + 0x697756f6, 0xc6de1b3c, 0xa3b9207a, 0x42fd86e9, 0x279abdaf, + 0x8833f065, 0xed54cb23, 0x5e09e03a, 0x3b6edb7c, 0x94c796b6, + 0xf1a0adf0, 0x10e40b63, 0x75833025, 0xda2a7def, 0xbf4d46a9, + 0xc3d23688, 0xa6b50dce, 0x091c4004, 0x6c7b7b42, 0x8d3fddd1, + 0xe858e697, 0x47f1ab5d, 0x2296901b, 0xbecf4b1f, 0xdba87059, + 0x74013d93, 0x116606d5, 0xf022a046, 0x95459b00, 0x3aecd6ca, + 0x5f8bed8c, 0x23149dad, 0x4673a6eb, 0xe9daeb21, 0x8cbdd067, + 0x6df976f4, 0x089e4db2, 0xa7370078, 0xc2503b3e, 0x44f5b031, + 0x21928b77, 0x8e3bc6bd, 0xeb5cfdfb, 0x0a185b68, 0x6f7f602e, + 0xc0d62de4, 0xa5b116a2, 0xd92e6683, 0xbc495dc5, 0x13e0100f, + 0x76872b49, 0x97c38dda, 0xf2a4b69c, 0x5d0dfb56, 0x386ac010, + 0xa4331b14, 0xc1542052, 0x6efd6d98, 0x0b9a56de, 0xeadef04d, + 0x8fb9cb0b, 0x201086c1, 0x4577bd87, 0x39e8cda6, 0x5c8ff6e0, + 0xf326bb2a, 0x9641806c, 0x770526ff, 0x12621db9, 0xbdcb5073, + 0xd8ac6b35}, + {0x00000000, 0xd7e28058, 0x74b406f1, 0xa35686a9, 0xe9680de2, + 0x3e8a8dba, 0x9ddc0b13, 0x4a3e8b4b, 0x09a11d85, 0xde439ddd, + 0x7d151b74, 0xaaf79b2c, 0xe0c91067, 0x372b903f, 0x947d1696, + 0x439f96ce, 0x13423b0a, 0xc4a0bb52, 0x67f63dfb, 0xb014bda3, + 0xfa2a36e8, 0x2dc8b6b0, 0x8e9e3019, 0x597cb041, 0x1ae3268f, + 0xcd01a6d7, 0x6e57207e, 0xb9b5a026, 0xf38b2b6d, 0x2469ab35, + 0x873f2d9c, 0x50ddadc4, 0x26847614, 0xf166f64c, 0x523070e5, + 0x85d2f0bd, 0xcfec7bf6, 0x180efbae, 0xbb587d07, 0x6cbafd5f, + 0x2f256b91, 0xf8c7ebc9, 0x5b916d60, 0x8c73ed38, 0xc64d6673, + 0x11afe62b, 0xb2f96082, 0x651be0da, 0x35c64d1e, 0xe224cd46, + 0x41724bef, 0x9690cbb7, 0xdcae40fc, 0x0b4cc0a4, 0xa81a460d, + 0x7ff8c655, 0x3c67509b, 0xeb85d0c3, 0x48d3566a, 0x9f31d632, + 0xd50f5d79, 0x02eddd21, 0xa1bb5b88, 0x7659dbd0, 0x4d08ec28, + 0x9aea6c70, 0x39bcead9, 0xee5e6a81, 0xa460e1ca, 0x73826192, + 0xd0d4e73b, 0x07366763, 0x44a9f1ad, 0x934b71f5, 0x301df75c, + 0xe7ff7704, 0xadc1fc4f, 0x7a237c17, 0xd975fabe, 0x0e977ae6, + 0x5e4ad722, 0x89a8577a, 0x2afed1d3, 0xfd1c518b, 0xb722dac0, + 0x60c05a98, 0xc396dc31, 0x14745c69, 0x57ebcaa7, 0x80094aff, + 0x235fcc56, 0xf4bd4c0e, 0xbe83c745, 0x6961471d, 0xca37c1b4, + 0x1dd541ec, 0x6b8c9a3c, 0xbc6e1a64, 0x1f389ccd, 0xc8da1c95, + 0x82e497de, 0x55061786, 0xf650912f, 0x21b21177, 0x622d87b9, + 0xb5cf07e1, 0x16998148, 0xc17b0110, 0x8b458a5b, 0x5ca70a03, + 0xfff18caa, 0x28130cf2, 0x78cea136, 0xaf2c216e, 0x0c7aa7c7, + 0xdb98279f, 0x91a6acd4, 0x46442c8c, 0xe512aa25, 0x32f02a7d, + 0x716fbcb3, 0xa68d3ceb, 0x05dbba42, 0xd2393a1a, 0x9807b151, + 0x4fe53109, 0xecb3b7a0, 0x3b5137f8, 0x9a11d850, 0x4df35808, + 0xeea5dea1, 0x39475ef9, 0x7379d5b2, 0xa49b55ea, 0x07cdd343, + 0xd02f531b, 0x93b0c5d5, 0x4452458d, 0xe704c324, 0x30e6437c, + 0x7ad8c837, 0xad3a486f, 0x0e6ccec6, 0xd98e4e9e, 0x8953e35a, + 0x5eb16302, 0xfde7e5ab, 0x2a0565f3, 0x603beeb8, 0xb7d96ee0, + 0x148fe849, 0xc36d6811, 0x80f2fedf, 0x57107e87, 0xf446f82e, + 0x23a47876, 0x699af33d, 0xbe787365, 0x1d2ef5cc, 0xcacc7594, + 0xbc95ae44, 0x6b772e1c, 0xc821a8b5, 0x1fc328ed, 0x55fda3a6, + 0x821f23fe, 0x2149a557, 0xf6ab250f, 0xb534b3c1, 0x62d63399, + 0xc180b530, 0x16623568, 0x5c5cbe23, 0x8bbe3e7b, 0x28e8b8d2, + 0xff0a388a, 0xafd7954e, 0x78351516, 0xdb6393bf, 0x0c8113e7, + 0x46bf98ac, 0x915d18f4, 0x320b9e5d, 0xe5e91e05, 0xa67688cb, + 0x71940893, 0xd2c28e3a, 0x05200e62, 0x4f1e8529, 0x98fc0571, + 0x3baa83d8, 0xec480380, 0xd7193478, 0x00fbb420, 0xa3ad3289, + 0x744fb2d1, 0x3e71399a, 0xe993b9c2, 0x4ac53f6b, 0x9d27bf33, + 0xdeb829fd, 0x095aa9a5, 0xaa0c2f0c, 0x7deeaf54, 0x37d0241f, + 0xe032a447, 0x436422ee, 0x9486a2b6, 0xc45b0f72, 0x13b98f2a, + 0xb0ef0983, 0x670d89db, 0x2d330290, 0xfad182c8, 0x59870461, + 0x8e658439, 0xcdfa12f7, 0x1a1892af, 0xb94e1406, 0x6eac945e, + 0x24921f15, 0xf3709f4d, 0x502619e4, 0x87c499bc, 0xf19d426c, + 0x267fc234, 0x8529449d, 0x52cbc4c5, 0x18f54f8e, 0xcf17cfd6, + 0x6c41497f, 0xbba3c927, 0xf83c5fe9, 0x2fdedfb1, 0x8c885918, + 0x5b6ad940, 0x1154520b, 0xc6b6d253, 0x65e054fa, 0xb202d4a2, + 0xe2df7966, 0x353df93e, 0x966b7f97, 0x4189ffcf, 0x0bb77484, + 0xdc55f4dc, 0x7f037275, 0xa8e1f22d, 0xeb7e64e3, 0x3c9ce4bb, + 0x9fca6212, 0x4828e24a, 0x02166901, 0xd5f4e959, 0x76a26ff0, + 0xa140efa8}, + {0x00000000, 0xef52b6e1, 0x05d46b83, 0xea86dd62, 0x0ba8d706, + 0xe4fa61e7, 0x0e7cbc85, 0xe12e0a64, 0x1751ae0c, 0xf80318ed, + 0x1285c58f, 0xfdd7736e, 0x1cf9790a, 0xf3abcfeb, 0x192d1289, + 0xf67fa468, 0x2ea35c18, 0xc1f1eaf9, 0x2b77379b, 0xc425817a, + 0x250b8b1e, 0xca593dff, 0x20dfe09d, 0xcf8d567c, 0x39f2f214, + 0xd6a044f5, 0x3c269997, 0xd3742f76, 0x325a2512, 0xdd0893f3, + 0x378e4e91, 0xd8dcf870, 0x5d46b830, 0xb2140ed1, 0x5892d3b3, + 0xb7c06552, 0x56ee6f36, 0xb9bcd9d7, 0x533a04b5, 0xbc68b254, + 0x4a17163c, 0xa545a0dd, 0x4fc37dbf, 0xa091cb5e, 0x41bfc13a, + 0xaeed77db, 0x446baab9, 0xab391c58, 0x73e5e428, 0x9cb752c9, + 0x76318fab, 0x9963394a, 0x784d332e, 0x971f85cf, 0x7d9958ad, + 0x92cbee4c, 0x64b44a24, 0x8be6fcc5, 0x616021a7, 0x8e329746, + 0x6f1c9d22, 0x804e2bc3, 0x6ac8f6a1, 0x859a4040, 0xba8d7060, + 0x55dfc681, 0xbf591be3, 0x500bad02, 0xb125a766, 0x5e771187, + 0xb4f1cce5, 0x5ba37a04, 0xaddcde6c, 0x428e688d, 0xa808b5ef, + 0x475a030e, 0xa674096a, 0x4926bf8b, 0xa3a062e9, 0x4cf2d408, + 0x942e2c78, 0x7b7c9a99, 0x91fa47fb, 0x7ea8f11a, 0x9f86fb7e, + 0x70d44d9f, 0x9a5290fd, 0x7500261c, 0x837f8274, 0x6c2d3495, + 0x86abe9f7, 0x69f95f16, 0x88d75572, 0x6785e393, 0x8d033ef1, + 0x62518810, 0xe7cbc850, 0x08997eb1, 0xe21fa3d3, 0x0d4d1532, + 0xec631f56, 0x0331a9b7, 0xe9b774d5, 0x06e5c234, 0xf09a665c, + 0x1fc8d0bd, 0xf54e0ddf, 0x1a1cbb3e, 0xfb32b15a, 0x146007bb, + 0xfee6dad9, 0x11b46c38, 0xc9689448, 0x263a22a9, 0xccbcffcb, + 0x23ee492a, 0xc2c0434e, 0x2d92f5af, 0xc71428cd, 0x28469e2c, + 0xde393a44, 0x316b8ca5, 0xdbed51c7, 0x34bfe726, 0xd591ed42, + 0x3ac35ba3, 0xd04586c1, 0x3f173020, 0xae6be681, 0x41395060, + 0xabbf8d02, 0x44ed3be3, 0xa5c33187, 0x4a918766, 0xa0175a04, + 0x4f45ece5, 0xb93a488d, 0x5668fe6c, 0xbcee230e, 0x53bc95ef, + 0xb2929f8b, 0x5dc0296a, 0xb746f408, 0x581442e9, 0x80c8ba99, + 0x6f9a0c78, 0x851cd11a, 0x6a4e67fb, 0x8b606d9f, 0x6432db7e, + 0x8eb4061c, 0x61e6b0fd, 0x97991495, 0x78cba274, 0x924d7f16, + 0x7d1fc9f7, 0x9c31c393, 0x73637572, 0x99e5a810, 0x76b71ef1, + 0xf32d5eb1, 0x1c7fe850, 0xf6f93532, 0x19ab83d3, 0xf88589b7, + 0x17d73f56, 0xfd51e234, 0x120354d5, 0xe47cf0bd, 0x0b2e465c, + 0xe1a89b3e, 0x0efa2ddf, 0xefd427bb, 0x0086915a, 0xea004c38, + 0x0552fad9, 0xdd8e02a9, 0x32dcb448, 0xd85a692a, 0x3708dfcb, + 0xd626d5af, 0x3974634e, 0xd3f2be2c, 0x3ca008cd, 0xcadfaca5, + 0x258d1a44, 0xcf0bc726, 0x205971c7, 0xc1777ba3, 0x2e25cd42, + 0xc4a31020, 0x2bf1a6c1, 0x14e696e1, 0xfbb42000, 0x1132fd62, + 0xfe604b83, 0x1f4e41e7, 0xf01cf706, 0x1a9a2a64, 0xf5c89c85, + 0x03b738ed, 0xece58e0c, 0x0663536e, 0xe931e58f, 0x081fefeb, + 0xe74d590a, 0x0dcb8468, 0xe2993289, 0x3a45caf9, 0xd5177c18, + 0x3f91a17a, 0xd0c3179b, 0x31ed1dff, 0xdebfab1e, 0x3439767c, + 0xdb6bc09d, 0x2d1464f5, 0xc246d214, 0x28c00f76, 0xc792b997, + 0x26bcb3f3, 0xc9ee0512, 0x2368d870, 0xcc3a6e91, 0x49a02ed1, + 0xa6f29830, 0x4c744552, 0xa326f3b3, 0x4208f9d7, 0xad5a4f36, + 0x47dc9254, 0xa88e24b5, 0x5ef180dd, 0xb1a3363c, 0x5b25eb5e, + 0xb4775dbf, 0x555957db, 0xba0be13a, 0x508d3c58, 0xbfdf8ab9, + 0x670372c9, 0x8851c428, 0x62d7194a, 0x8d85afab, 0x6caba5cf, + 0x83f9132e, 0x697fce4c, 0x862d78ad, 0x7052dcc5, 0x9f006a24, + 0x7586b746, 0x9ad401a7, 0x7bfa0bc3, 0x94a8bd22, 0x7e2e6040, + 0x917cd6a1}, + {0x00000000, 0x87a6cb43, 0xd43c90c7, 0x539a5b84, 0x730827cf, + 0xf4aeec8c, 0xa734b708, 0x20927c4b, 0xe6104f9e, 0x61b684dd, + 0x322cdf59, 0xb58a141a, 0x95186851, 0x12bea312, 0x4124f896, + 0xc68233d5, 0x1751997d, 0x90f7523e, 0xc36d09ba, 0x44cbc2f9, + 0x6459beb2, 0xe3ff75f1, 0xb0652e75, 0x37c3e536, 0xf141d6e3, + 0x76e71da0, 0x257d4624, 0xa2db8d67, 0x8249f12c, 0x05ef3a6f, + 0x567561eb, 0xd1d3aaa8, 0x2ea332fa, 0xa905f9b9, 0xfa9fa23d, + 0x7d39697e, 0x5dab1535, 0xda0dde76, 0x899785f2, 0x0e314eb1, + 0xc8b37d64, 0x4f15b627, 0x1c8feda3, 0x9b2926e0, 0xbbbb5aab, + 0x3c1d91e8, 0x6f87ca6c, 0xe821012f, 0x39f2ab87, 0xbe5460c4, + 0xedce3b40, 0x6a68f003, 0x4afa8c48, 0xcd5c470b, 0x9ec61c8f, + 0x1960d7cc, 0xdfe2e419, 0x58442f5a, 0x0bde74de, 0x8c78bf9d, + 0xaceac3d6, 0x2b4c0895, 0x78d65311, 0xff709852, 0x5d4665f4, + 0xdae0aeb7, 0x897af533, 0x0edc3e70, 0x2e4e423b, 0xa9e88978, + 0xfa72d2fc, 0x7dd419bf, 0xbb562a6a, 0x3cf0e129, 0x6f6abaad, + 0xe8cc71ee, 0xc85e0da5, 0x4ff8c6e6, 0x1c629d62, 0x9bc45621, + 0x4a17fc89, 0xcdb137ca, 0x9e2b6c4e, 0x198da70d, 0x391fdb46, + 0xbeb91005, 0xed234b81, 0x6a8580c2, 0xac07b317, 0x2ba17854, + 0x783b23d0, 0xff9de893, 0xdf0f94d8, 0x58a95f9b, 0x0b33041f, + 0x8c95cf5c, 0x73e5570e, 0xf4439c4d, 0xa7d9c7c9, 0x207f0c8a, + 0x00ed70c1, 0x874bbb82, 0xd4d1e006, 0x53772b45, 0x95f51890, + 0x1253d3d3, 0x41c98857, 0xc66f4314, 0xe6fd3f5f, 0x615bf41c, + 0x32c1af98, 0xb56764db, 0x64b4ce73, 0xe3120530, 0xb0885eb4, + 0x372e95f7, 0x17bce9bc, 0x901a22ff, 0xc380797b, 0x4426b238, + 0x82a481ed, 0x05024aae, 0x5698112a, 0xd13eda69, 0xf1aca622, + 0x760a6d61, 0x259036e5, 0xa236fda6, 0xba8ccbe8, 0x3d2a00ab, + 0x6eb05b2f, 0xe916906c, 0xc984ec27, 0x4e222764, 0x1db87ce0, + 0x9a1eb7a3, 0x5c9c8476, 0xdb3a4f35, 0x88a014b1, 0x0f06dff2, + 0x2f94a3b9, 0xa83268fa, 0xfba8337e, 0x7c0ef83d, 0xaddd5295, + 0x2a7b99d6, 0x79e1c252, 0xfe470911, 0xded5755a, 0x5973be19, + 0x0ae9e59d, 0x8d4f2ede, 0x4bcd1d0b, 0xcc6bd648, 0x9ff18dcc, + 0x1857468f, 0x38c53ac4, 0xbf63f187, 0xecf9aa03, 0x6b5f6140, + 0x942ff912, 0x13893251, 0x401369d5, 0xc7b5a296, 0xe727dedd, + 0x6081159e, 0x331b4e1a, 0xb4bd8559, 0x723fb68c, 0xf5997dcf, + 0xa603264b, 0x21a5ed08, 0x01379143, 0x86915a00, 0xd50b0184, + 0x52adcac7, 0x837e606f, 0x04d8ab2c, 0x5742f0a8, 0xd0e43beb, + 0xf07647a0, 0x77d08ce3, 0x244ad767, 0xa3ec1c24, 0x656e2ff1, + 0xe2c8e4b2, 0xb152bf36, 0x36f47475, 0x1666083e, 0x91c0c37d, + 0xc25a98f9, 0x45fc53ba, 0xe7caae1c, 0x606c655f, 0x33f63edb, + 0xb450f598, 0x94c289d3, 0x13644290, 0x40fe1914, 0xc758d257, + 0x01dae182, 0x867c2ac1, 0xd5e67145, 0x5240ba06, 0x72d2c64d, + 0xf5740d0e, 0xa6ee568a, 0x21489dc9, 0xf09b3761, 0x773dfc22, + 0x24a7a7a6, 0xa3016ce5, 0x839310ae, 0x0435dbed, 0x57af8069, + 0xd0094b2a, 0x168b78ff, 0x912db3bc, 0xc2b7e838, 0x4511237b, + 0x65835f30, 0xe2259473, 0xb1bfcff7, 0x361904b4, 0xc9699ce6, + 0x4ecf57a5, 0x1d550c21, 0x9af3c762, 0xba61bb29, 0x3dc7706a, + 0x6e5d2bee, 0xe9fbe0ad, 0x2f79d378, 0xa8df183b, 0xfb4543bf, + 0x7ce388fc, 0x5c71f4b7, 0xdbd73ff4, 0x884d6470, 0x0febaf33, + 0xde38059b, 0x599eced8, 0x0a04955c, 0x8da25e1f, 0xad302254, + 0x2a96e917, 0x790cb293, 0xfeaa79d0, 0x38284a05, 0xbf8e8146, + 0xec14dac2, 0x6bb21181, 0x4b206dca, 0xcc86a689, 0x9f1cfd0d, + 0x18ba364e}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x00000000, 0x43cba687, 0xc7903cd4, 0x845b9a53, 0xcf270873, + 0x8cecaef4, 0x08b734a7, 0x4b7c9220, 0x9e4f10e6, 0xdd84b661, + 0x59df2c32, 0x1a148ab5, 0x51681895, 0x12a3be12, 0x96f82441, + 0xd53382c6, 0x7d995117, 0x3e52f790, 0xba096dc3, 0xf9c2cb44, + 0xb2be5964, 0xf175ffe3, 0x752e65b0, 0x36e5c337, 0xe3d641f1, + 0xa01de776, 0x24467d25, 0x678ddba2, 0x2cf14982, 0x6f3aef05, + 0xeb617556, 0xa8aad3d1, 0xfa32a32e, 0xb9f905a9, 0x3da29ffa, + 0x7e69397d, 0x3515ab5d, 0x76de0dda, 0xf2859789, 0xb14e310e, + 0x647db3c8, 0x27b6154f, 0xa3ed8f1c, 0xe026299b, 0xab5abbbb, + 0xe8911d3c, 0x6cca876f, 0x2f0121e8, 0x87abf239, 0xc46054be, + 0x403bceed, 0x03f0686a, 0x488cfa4a, 0x0b475ccd, 0x8f1cc69e, + 0xccd76019, 0x19e4e2df, 0x5a2f4458, 0xde74de0b, 0x9dbf788c, + 0xd6c3eaac, 0x95084c2b, 0x1153d678, 0x529870ff, 0xf465465d, + 0xb7aee0da, 0x33f57a89, 0x703edc0e, 0x3b424e2e, 0x7889e8a9, + 0xfcd272fa, 0xbf19d47d, 0x6a2a56bb, 0x29e1f03c, 0xadba6a6f, + 0xee71cce8, 0xa50d5ec8, 0xe6c6f84f, 0x629d621c, 0x2156c49b, + 0x89fc174a, 0xca37b1cd, 0x4e6c2b9e, 0x0da78d19, 0x46db1f39, + 0x0510b9be, 0x814b23ed, 0xc280856a, 0x17b307ac, 0x5478a12b, + 0xd0233b78, 0x93e89dff, 0xd8940fdf, 0x9b5fa958, 0x1f04330b, + 0x5ccf958c, 0x0e57e573, 0x4d9c43f4, 0xc9c7d9a7, 0x8a0c7f20, + 0xc170ed00, 0x82bb4b87, 0x06e0d1d4, 0x452b7753, 0x9018f595, + 0xd3d35312, 0x5788c941, 0x14436fc6, 0x5f3ffde6, 0x1cf45b61, + 0x98afc132, 0xdb6467b5, 0x73ceb464, 0x300512e3, 0xb45e88b0, + 0xf7952e37, 0xbce9bc17, 0xff221a90, 0x7b7980c3, 0x38b22644, + 0xed81a482, 0xae4a0205, 0x2a119856, 0x69da3ed1, 0x22a6acf1, + 0x616d0a76, 0xe5369025, 0xa6fd36a2, 0xe8cb8cba, 0xab002a3d, + 0x2f5bb06e, 0x6c9016e9, 0x27ec84c9, 0x6427224e, 0xe07cb81d, + 0xa3b71e9a, 0x76849c5c, 0x354f3adb, 0xb114a088, 0xf2df060f, + 0xb9a3942f, 0xfa6832a8, 0x7e33a8fb, 0x3df80e7c, 0x9552ddad, + 0xd6997b2a, 0x52c2e179, 0x110947fe, 0x5a75d5de, 0x19be7359, + 0x9de5e90a, 0xde2e4f8d, 0x0b1dcd4b, 0x48d66bcc, 0xcc8df19f, + 0x8f465718, 0xc43ac538, 0x87f163bf, 0x03aaf9ec, 0x40615f6b, + 0x12f92f94, 0x51328913, 0xd5691340, 0x96a2b5c7, 0xddde27e7, + 0x9e158160, 0x1a4e1b33, 0x5985bdb4, 0x8cb63f72, 0xcf7d99f5, + 0x4b2603a6, 0x08eda521, 0x43913701, 0x005a9186, 0x84010bd5, + 0xc7caad52, 0x6f607e83, 0x2cabd804, 0xa8f04257, 0xeb3be4d0, + 0xa04776f0, 0xe38cd077, 0x67d74a24, 0x241ceca3, 0xf12f6e65, + 0xb2e4c8e2, 0x36bf52b1, 0x7574f436, 0x3e086616, 0x7dc3c091, + 0xf9985ac2, 0xba53fc45, 0x1caecae7, 0x5f656c60, 0xdb3ef633, + 0x98f550b4, 0xd389c294, 0x90426413, 0x1419fe40, 0x57d258c7, + 0x82e1da01, 0xc12a7c86, 0x4571e6d5, 0x06ba4052, 0x4dc6d272, + 0x0e0d74f5, 0x8a56eea6, 0xc99d4821, 0x61379bf0, 0x22fc3d77, + 0xa6a7a724, 0xe56c01a3, 0xae109383, 0xeddb3504, 0x6980af57, + 0x2a4b09d0, 0xff788b16, 0xbcb32d91, 0x38e8b7c2, 0x7b231145, + 0x305f8365, 0x739425e2, 0xf7cfbfb1, 0xb4041936, 0xe69c69c9, + 0xa557cf4e, 0x210c551d, 0x62c7f39a, 0x29bb61ba, 0x6a70c73d, + 0xee2b5d6e, 0xade0fbe9, 0x78d3792f, 0x3b18dfa8, 0xbf4345fb, + 0xfc88e37c, 0xb7f4715c, 0xf43fd7db, 0x70644d88, 0x33afeb0f, + 0x9b0538de, 0xd8ce9e59, 0x5c95040a, 0x1f5ea28d, 0x542230ad, + 0x17e9962a, 0x93b20c79, 0xd079aafe, 0x054a2838, 0x46818ebf, + 0xc2da14ec, 0x8111b26b, 0xca6d204b, 0x89a686cc, 0x0dfd1c9f, + 0x4e36ba18}, + {0x00000000, 0xe1b652ef, 0x836bd405, 0x62dd86ea, 0x06d7a80b, + 0xe761fae4, 0x85bc7c0e, 0x640a2ee1, 0x0cae5117, 0xed1803f8, + 0x8fc58512, 0x6e73d7fd, 0x0a79f91c, 0xebcfabf3, 0x89122d19, + 0x68a47ff6, 0x185ca32e, 0xf9eaf1c1, 0x9b37772b, 0x7a8125c4, + 0x1e8b0b25, 0xff3d59ca, 0x9de0df20, 0x7c568dcf, 0x14f2f239, + 0xf544a0d6, 0x9799263c, 0x762f74d3, 0x12255a32, 0xf39308dd, + 0x914e8e37, 0x70f8dcd8, 0x30b8465d, 0xd10e14b2, 0xb3d39258, + 0x5265c0b7, 0x366fee56, 0xd7d9bcb9, 0xb5043a53, 0x54b268bc, + 0x3c16174a, 0xdda045a5, 0xbf7dc34f, 0x5ecb91a0, 0x3ac1bf41, + 0xdb77edae, 0xb9aa6b44, 0x581c39ab, 0x28e4e573, 0xc952b79c, + 0xab8f3176, 0x4a396399, 0x2e334d78, 0xcf851f97, 0xad58997d, + 0x4ceecb92, 0x244ab464, 0xc5fce68b, 0xa7216061, 0x4697328e, + 0x229d1c6f, 0xc32b4e80, 0xa1f6c86a, 0x40409a85, 0x60708dba, + 0x81c6df55, 0xe31b59bf, 0x02ad0b50, 0x66a725b1, 0x8711775e, + 0xe5ccf1b4, 0x047aa35b, 0x6cdedcad, 0x8d688e42, 0xefb508a8, + 0x0e035a47, 0x6a0974a6, 0x8bbf2649, 0xe962a0a3, 0x08d4f24c, + 0x782c2e94, 0x999a7c7b, 0xfb47fa91, 0x1af1a87e, 0x7efb869f, + 0x9f4dd470, 0xfd90529a, 0x1c260075, 0x74827f83, 0x95342d6c, + 0xf7e9ab86, 0x165ff969, 0x7255d788, 0x93e38567, 0xf13e038d, + 0x10885162, 0x50c8cbe7, 0xb17e9908, 0xd3a31fe2, 0x32154d0d, + 0x561f63ec, 0xb7a93103, 0xd574b7e9, 0x34c2e506, 0x5c669af0, + 0xbdd0c81f, 0xdf0d4ef5, 0x3ebb1c1a, 0x5ab132fb, 0xbb076014, + 0xd9dae6fe, 0x386cb411, 0x489468c9, 0xa9223a26, 0xcbffbccc, + 0x2a49ee23, 0x4e43c0c2, 0xaff5922d, 0xcd2814c7, 0x2c9e4628, + 0x443a39de, 0xa58c6b31, 0xc751eddb, 0x26e7bf34, 0x42ed91d5, + 0xa35bc33a, 0xc18645d0, 0x2030173f, 0x81e66bae, 0x60503941, + 0x028dbfab, 0xe33bed44, 0x8731c3a5, 0x6687914a, 0x045a17a0, + 0xe5ec454f, 0x8d483ab9, 0x6cfe6856, 0x0e23eebc, 0xef95bc53, + 0x8b9f92b2, 0x6a29c05d, 0x08f446b7, 0xe9421458, 0x99bac880, + 0x780c9a6f, 0x1ad11c85, 0xfb674e6a, 0x9f6d608b, 0x7edb3264, + 0x1c06b48e, 0xfdb0e661, 0x95149997, 0x74a2cb78, 0x167f4d92, + 0xf7c91f7d, 0x93c3319c, 0x72756373, 0x10a8e599, 0xf11eb776, + 0xb15e2df3, 0x50e87f1c, 0x3235f9f6, 0xd383ab19, 0xb78985f8, + 0x563fd717, 0x34e251fd, 0xd5540312, 0xbdf07ce4, 0x5c462e0b, + 0x3e9ba8e1, 0xdf2dfa0e, 0xbb27d4ef, 0x5a918600, 0x384c00ea, + 0xd9fa5205, 0xa9028edd, 0x48b4dc32, 0x2a695ad8, 0xcbdf0837, + 0xafd526d6, 0x4e637439, 0x2cbef2d3, 0xcd08a03c, 0xa5acdfca, + 0x441a8d25, 0x26c70bcf, 0xc7715920, 0xa37b77c1, 0x42cd252e, + 0x2010a3c4, 0xc1a6f12b, 0xe196e614, 0x0020b4fb, 0x62fd3211, + 0x834b60fe, 0xe7414e1f, 0x06f71cf0, 0x642a9a1a, 0x859cc8f5, + 0xed38b703, 0x0c8ee5ec, 0x6e536306, 0x8fe531e9, 0xebef1f08, + 0x0a594de7, 0x6884cb0d, 0x893299e2, 0xf9ca453a, 0x187c17d5, + 0x7aa1913f, 0x9b17c3d0, 0xff1ded31, 0x1eabbfde, 0x7c763934, + 0x9dc06bdb, 0xf564142d, 0x14d246c2, 0x760fc028, 0x97b992c7, + 0xf3b3bc26, 0x1205eec9, 0x70d86823, 0x916e3acc, 0xd12ea049, + 0x3098f2a6, 0x5245744c, 0xb3f326a3, 0xd7f90842, 0x364f5aad, + 0x5492dc47, 0xb5248ea8, 0xdd80f15e, 0x3c36a3b1, 0x5eeb255b, + 0xbf5d77b4, 0xdb575955, 0x3ae10bba, 0x583c8d50, 0xb98adfbf, + 0xc9720367, 0x28c45188, 0x4a19d762, 0xabaf858d, 0xcfa5ab6c, + 0x2e13f983, 0x4cce7f69, 0xad782d86, 0xc5dc5270, 0x246a009f, + 0x46b78675, 0xa701d49a, 0xc30bfa7b, 0x22bda894, 0x40602e7e, + 0xa1d67c91}, + {0x00000000, 0x5880e2d7, 0xf106b474, 0xa98656a3, 0xe20d68e9, + 0xba8d8a3e, 0x130bdc9d, 0x4b8b3e4a, 0x851da109, 0xdd9d43de, + 0x741b157d, 0x2c9bf7aa, 0x6710c9e0, 0x3f902b37, 0x96167d94, + 0xce969f43, 0x0a3b4213, 0x52bba0c4, 0xfb3df667, 0xa3bd14b0, + 0xe8362afa, 0xb0b6c82d, 0x19309e8e, 0x41b07c59, 0x8f26e31a, + 0xd7a601cd, 0x7e20576e, 0x26a0b5b9, 0x6d2b8bf3, 0x35ab6924, + 0x9c2d3f87, 0xc4addd50, 0x14768426, 0x4cf666f1, 0xe5703052, + 0xbdf0d285, 0xf67beccf, 0xaefb0e18, 0x077d58bb, 0x5ffdba6c, + 0x916b252f, 0xc9ebc7f8, 0x606d915b, 0x38ed738c, 0x73664dc6, + 0x2be6af11, 0x8260f9b2, 0xdae01b65, 0x1e4dc635, 0x46cd24e2, + 0xef4b7241, 0xb7cb9096, 0xfc40aedc, 0xa4c04c0b, 0x0d461aa8, + 0x55c6f87f, 0x9b50673c, 0xc3d085eb, 0x6a56d348, 0x32d6319f, + 0x795d0fd5, 0x21dded02, 0x885bbba1, 0xd0db5976, 0x28ec084d, + 0x706cea9a, 0xd9eabc39, 0x816a5eee, 0xcae160a4, 0x92618273, + 0x3be7d4d0, 0x63673607, 0xadf1a944, 0xf5714b93, 0x5cf71d30, + 0x0477ffe7, 0x4ffcc1ad, 0x177c237a, 0xbefa75d9, 0xe67a970e, + 0x22d74a5e, 0x7a57a889, 0xd3d1fe2a, 0x8b511cfd, 0xc0da22b7, + 0x985ac060, 0x31dc96c3, 0x695c7414, 0xa7caeb57, 0xff4a0980, + 0x56cc5f23, 0x0e4cbdf4, 0x45c783be, 0x1d476169, 0xb4c137ca, + 0xec41d51d, 0x3c9a8c6b, 0x641a6ebc, 0xcd9c381f, 0x951cdac8, + 0xde97e482, 0x86170655, 0x2f9150f6, 0x7711b221, 0xb9872d62, + 0xe107cfb5, 0x48819916, 0x10017bc1, 0x5b8a458b, 0x030aa75c, + 0xaa8cf1ff, 0xf20c1328, 0x36a1ce78, 0x6e212caf, 0xc7a77a0c, + 0x9f2798db, 0xd4aca691, 0x8c2c4446, 0x25aa12e5, 0x7d2af032, + 0xb3bc6f71, 0xeb3c8da6, 0x42badb05, 0x1a3a39d2, 0x51b10798, + 0x0931e54f, 0xa0b7b3ec, 0xf837513b, 0x50d8119a, 0x0858f34d, + 0xa1dea5ee, 0xf95e4739, 0xb2d57973, 0xea559ba4, 0x43d3cd07, + 0x1b532fd0, 0xd5c5b093, 0x8d455244, 0x24c304e7, 0x7c43e630, + 0x37c8d87a, 0x6f483aad, 0xc6ce6c0e, 0x9e4e8ed9, 0x5ae35389, + 0x0263b15e, 0xabe5e7fd, 0xf365052a, 0xb8ee3b60, 0xe06ed9b7, + 0x49e88f14, 0x11686dc3, 0xdffef280, 0x877e1057, 0x2ef846f4, + 0x7678a423, 0x3df39a69, 0x657378be, 0xccf52e1d, 0x9475ccca, + 0x44ae95bc, 0x1c2e776b, 0xb5a821c8, 0xed28c31f, 0xa6a3fd55, + 0xfe231f82, 0x57a54921, 0x0f25abf6, 0xc1b334b5, 0x9933d662, + 0x30b580c1, 0x68356216, 0x23be5c5c, 0x7b3ebe8b, 0xd2b8e828, + 0x8a380aff, 0x4e95d7af, 0x16153578, 0xbf9363db, 0xe713810c, + 0xac98bf46, 0xf4185d91, 0x5d9e0b32, 0x051ee9e5, 0xcb8876a6, + 0x93089471, 0x3a8ec2d2, 0x620e2005, 0x29851e4f, 0x7105fc98, + 0xd883aa3b, 0x800348ec, 0x783419d7, 0x20b4fb00, 0x8932ada3, + 0xd1b24f74, 0x9a39713e, 0xc2b993e9, 0x6b3fc54a, 0x33bf279d, + 0xfd29b8de, 0xa5a95a09, 0x0c2f0caa, 0x54afee7d, 0x1f24d037, + 0x47a432e0, 0xee226443, 0xb6a28694, 0x720f5bc4, 0x2a8fb913, + 0x8309efb0, 0xdb890d67, 0x9002332d, 0xc882d1fa, 0x61048759, + 0x3984658e, 0xf712facd, 0xaf92181a, 0x06144eb9, 0x5e94ac6e, + 0x151f9224, 0x4d9f70f3, 0xe4192650, 0xbc99c487, 0x6c429df1, + 0x34c27f26, 0x9d442985, 0xc5c4cb52, 0x8e4ff518, 0xd6cf17cf, + 0x7f49416c, 0x27c9a3bb, 0xe95f3cf8, 0xb1dfde2f, 0x1859888c, + 0x40d96a5b, 0x0b525411, 0x53d2b6c6, 0xfa54e065, 0xa2d402b2, + 0x6679dfe2, 0x3ef93d35, 0x977f6b96, 0xcfff8941, 0x8474b70b, + 0xdcf455dc, 0x7572037f, 0x2df2e1a8, 0xe3647eeb, 0xbbe49c3c, + 0x1262ca9f, 0x4ae22848, 0x01691602, 0x59e9f4d5, 0xf06fa276, + 0xa8ef40a1}, + {0x00000000, 0x463b6765, 0x8c76ceca, 0xca4da9af, 0x59ebed4e, + 0x1fd08a2b, 0xd59d2384, 0x93a644e1, 0xb2d6db9d, 0xf4edbcf8, + 0x3ea01557, 0x789b7232, 0xeb3d36d3, 0xad0651b6, 0x674bf819, + 0x21709f7c, 0x25abc6e0, 0x6390a185, 0xa9dd082a, 0xefe66f4f, + 0x7c402bae, 0x3a7b4ccb, 0xf036e564, 0xb60d8201, 0x977d1d7d, + 0xd1467a18, 0x1b0bd3b7, 0x5d30b4d2, 0xce96f033, 0x88ad9756, + 0x42e03ef9, 0x04db599c, 0x0b50fc1a, 0x4d6b9b7f, 0x872632d0, + 0xc11d55b5, 0x52bb1154, 0x14807631, 0xdecddf9e, 0x98f6b8fb, + 0xb9862787, 0xffbd40e2, 0x35f0e94d, 0x73cb8e28, 0xe06dcac9, + 0xa656adac, 0x6c1b0403, 0x2a206366, 0x2efb3afa, 0x68c05d9f, + 0xa28df430, 0xe4b69355, 0x7710d7b4, 0x312bb0d1, 0xfb66197e, + 0xbd5d7e1b, 0x9c2de167, 0xda168602, 0x105b2fad, 0x566048c8, + 0xc5c60c29, 0x83fd6b4c, 0x49b0c2e3, 0x0f8ba586, 0x16a0f835, + 0x509b9f50, 0x9ad636ff, 0xdced519a, 0x4f4b157b, 0x0970721e, + 0xc33ddbb1, 0x8506bcd4, 0xa47623a8, 0xe24d44cd, 0x2800ed62, + 0x6e3b8a07, 0xfd9dcee6, 0xbba6a983, 0x71eb002c, 0x37d06749, + 0x330b3ed5, 0x753059b0, 0xbf7df01f, 0xf946977a, 0x6ae0d39b, + 0x2cdbb4fe, 0xe6961d51, 0xa0ad7a34, 0x81dde548, 0xc7e6822d, + 0x0dab2b82, 0x4b904ce7, 0xd8360806, 0x9e0d6f63, 0x5440c6cc, + 0x127ba1a9, 0x1df0042f, 0x5bcb634a, 0x9186cae5, 0xd7bdad80, + 0x441be961, 0x02208e04, 0xc86d27ab, 0x8e5640ce, 0xaf26dfb2, + 0xe91db8d7, 0x23501178, 0x656b761d, 0xf6cd32fc, 0xb0f65599, + 0x7abbfc36, 0x3c809b53, 0x385bc2cf, 0x7e60a5aa, 0xb42d0c05, + 0xf2166b60, 0x61b02f81, 0x278b48e4, 0xedc6e14b, 0xabfd862e, + 0x8a8d1952, 0xccb67e37, 0x06fbd798, 0x40c0b0fd, 0xd366f41c, + 0x955d9379, 0x5f103ad6, 0x192b5db3, 0x2c40f16b, 0x6a7b960e, + 0xa0363fa1, 0xe60d58c4, 0x75ab1c25, 0x33907b40, 0xf9ddd2ef, + 0xbfe6b58a, 0x9e962af6, 0xd8ad4d93, 0x12e0e43c, 0x54db8359, + 0xc77dc7b8, 0x8146a0dd, 0x4b0b0972, 0x0d306e17, 0x09eb378b, + 0x4fd050ee, 0x859df941, 0xc3a69e24, 0x5000dac5, 0x163bbda0, + 0xdc76140f, 0x9a4d736a, 0xbb3dec16, 0xfd068b73, 0x374b22dc, + 0x717045b9, 0xe2d60158, 0xa4ed663d, 0x6ea0cf92, 0x289ba8f7, + 0x27100d71, 0x612b6a14, 0xab66c3bb, 0xed5da4de, 0x7efbe03f, + 0x38c0875a, 0xf28d2ef5, 0xb4b64990, 0x95c6d6ec, 0xd3fdb189, + 0x19b01826, 0x5f8b7f43, 0xcc2d3ba2, 0x8a165cc7, 0x405bf568, + 0x0660920d, 0x02bbcb91, 0x4480acf4, 0x8ecd055b, 0xc8f6623e, + 0x5b5026df, 0x1d6b41ba, 0xd726e815, 0x911d8f70, 0xb06d100c, + 0xf6567769, 0x3c1bdec6, 0x7a20b9a3, 0xe986fd42, 0xafbd9a27, + 0x65f03388, 0x23cb54ed, 0x3ae0095e, 0x7cdb6e3b, 0xb696c794, + 0xf0ada0f1, 0x630be410, 0x25308375, 0xef7d2ada, 0xa9464dbf, + 0x8836d2c3, 0xce0db5a6, 0x04401c09, 0x427b7b6c, 0xd1dd3f8d, + 0x97e658e8, 0x5dabf147, 0x1b909622, 0x1f4bcfbe, 0x5970a8db, + 0x933d0174, 0xd5066611, 0x46a022f0, 0x009b4595, 0xcad6ec3a, + 0x8ced8b5f, 0xad9d1423, 0xeba67346, 0x21ebdae9, 0x67d0bd8c, + 0xf476f96d, 0xb24d9e08, 0x780037a7, 0x3e3b50c2, 0x31b0f544, + 0x778b9221, 0xbdc63b8e, 0xfbfd5ceb, 0x685b180a, 0x2e607f6f, + 0xe42dd6c0, 0xa216b1a5, 0x83662ed9, 0xc55d49bc, 0x0f10e013, + 0x492b8776, 0xda8dc397, 0x9cb6a4f2, 0x56fb0d5d, 0x10c06a38, + 0x141b33a4, 0x522054c1, 0x986dfd6e, 0xde569a0b, 0x4df0deea, + 0x0bcbb98f, 0xc1861020, 0x87bd7745, 0xa6cde839, 0xe0f68f5c, + 0x2abb26f3, 0x6c804196, 0xff260577, 0xb91d6212, 0x7350cbbd, + 0x356bacd8}}; + +#endif + +#endif + +#if N == 6 + +#if W == 8 + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0x3db1ecdc, 0x7b63d9b8, 0x46d23564, 0xf6c7b370, + 0xcb765fac, 0x8da46ac8, 0xb0158614, 0x36fe60a1, 0x0b4f8c7d, + 0x4d9db919, 0x702c55c5, 0xc039d3d1, 0xfd883f0d, 0xbb5a0a69, + 0x86ebe6b5, 0x6dfcc142, 0x504d2d9e, 0x169f18fa, 0x2b2ef426, + 0x9b3b7232, 0xa68a9eee, 0xe058ab8a, 0xdde94756, 0x5b02a1e3, + 0x66b34d3f, 0x2061785b, 0x1dd09487, 0xadc51293, 0x9074fe4f, + 0xd6a6cb2b, 0xeb1727f7, 0xdbf98284, 0xe6486e58, 0xa09a5b3c, + 0x9d2bb7e0, 0x2d3e31f4, 0x108fdd28, 0x565de84c, 0x6bec0490, + 0xed07e225, 0xd0b60ef9, 0x96643b9d, 0xabd5d741, 0x1bc05155, + 0x2671bd89, 0x60a388ed, 0x5d126431, 0xb60543c6, 0x8bb4af1a, + 0xcd669a7e, 0xf0d776a2, 0x40c2f0b6, 0x7d731c6a, 0x3ba1290e, + 0x0610c5d2, 0x80fb2367, 0xbd4acfbb, 0xfb98fadf, 0xc6291603, + 0x763c9017, 0x4b8d7ccb, 0x0d5f49af, 0x30eea573, 0x6c820349, + 0x5133ef95, 0x17e1daf1, 0x2a50362d, 0x9a45b039, 0xa7f45ce5, + 0xe1266981, 0xdc97855d, 0x5a7c63e8, 0x67cd8f34, 0x211fba50, + 0x1cae568c, 0xacbbd098, 0x910a3c44, 0xd7d80920, 0xea69e5fc, + 0x017ec20b, 0x3ccf2ed7, 0x7a1d1bb3, 0x47acf76f, 0xf7b9717b, + 0xca089da7, 0x8cdaa8c3, 0xb16b441f, 0x3780a2aa, 0x0a314e76, + 0x4ce37b12, 0x715297ce, 0xc14711da, 0xfcf6fd06, 0xba24c862, + 0x879524be, 0xb77b81cd, 0x8aca6d11, 0xcc185875, 0xf1a9b4a9, + 0x41bc32bd, 0x7c0dde61, 0x3adfeb05, 0x076e07d9, 0x8185e16c, + 0xbc340db0, 0xfae638d4, 0xc757d408, 0x7742521c, 0x4af3bec0, + 0x0c218ba4, 0x31906778, 0xda87408f, 0xe736ac53, 0xa1e49937, + 0x9c5575eb, 0x2c40f3ff, 0x11f11f23, 0x57232a47, 0x6a92c69b, + 0xec79202e, 0xd1c8ccf2, 0x971af996, 0xaaab154a, 0x1abe935e, + 0x270f7f82, 0x61dd4ae6, 0x5c6ca63a, 0xd9040692, 0xe4b5ea4e, + 0xa267df2a, 0x9fd633f6, 0x2fc3b5e2, 0x1272593e, 0x54a06c5a, + 0x69118086, 0xeffa6633, 0xd24b8aef, 0x9499bf8b, 0xa9285357, + 0x193dd543, 0x248c399f, 0x625e0cfb, 0x5fefe027, 0xb4f8c7d0, + 0x89492b0c, 0xcf9b1e68, 0xf22af2b4, 0x423f74a0, 0x7f8e987c, + 0x395cad18, 0x04ed41c4, 0x8206a771, 0xbfb74bad, 0xf9657ec9, + 0xc4d49215, 0x74c11401, 0x4970f8dd, 0x0fa2cdb9, 0x32132165, + 0x02fd8416, 0x3f4c68ca, 0x799e5dae, 0x442fb172, 0xf43a3766, + 0xc98bdbba, 0x8f59eede, 0xb2e80202, 0x3403e4b7, 0x09b2086b, + 0x4f603d0f, 0x72d1d1d3, 0xc2c457c7, 0xff75bb1b, 0xb9a78e7f, + 0x841662a3, 0x6f014554, 0x52b0a988, 0x14629cec, 0x29d37030, + 0x99c6f624, 0xa4771af8, 0xe2a52f9c, 0xdf14c340, 0x59ff25f5, + 0x644ec929, 0x229cfc4d, 0x1f2d1091, 0xaf389685, 0x92897a59, + 0xd45b4f3d, 0xe9eaa3e1, 0xb58605db, 0x8837e907, 0xcee5dc63, + 0xf35430bf, 0x4341b6ab, 0x7ef05a77, 0x38226f13, 0x059383cf, + 0x8378657a, 0xbec989a6, 0xf81bbcc2, 0xc5aa501e, 0x75bfd60a, + 0x480e3ad6, 0x0edc0fb2, 0x336de36e, 0xd87ac499, 0xe5cb2845, + 0xa3191d21, 0x9ea8f1fd, 0x2ebd77e9, 0x130c9b35, 0x55deae51, + 0x686f428d, 0xee84a438, 0xd33548e4, 0x95e77d80, 0xa856915c, + 0x18431748, 0x25f2fb94, 0x6320cef0, 0x5e91222c, 0x6e7f875f, + 0x53ce6b83, 0x151c5ee7, 0x28adb23b, 0x98b8342f, 0xa509d8f3, + 0xe3dbed97, 0xde6a014b, 0x5881e7fe, 0x65300b22, 0x23e23e46, + 0x1e53d29a, 0xae46548e, 0x93f7b852, 0xd5258d36, 0xe89461ea, + 0x0383461d, 0x3e32aac1, 0x78e09fa5, 0x45517379, 0xf544f56d, + 0xc8f519b1, 0x8e272cd5, 0xb396c009, 0x357d26bc, 0x08ccca60, + 0x4e1eff04, 0x73af13d8, 0xc3ba95cc, 0xfe0b7910, 0xb8d94c74, + 0x8568a0a8}, + {0x00000000, 0x69790b65, 0xd2f216ca, 0xbb8b1daf, 0x7e952bd5, + 0x17ec20b0, 0xac673d1f, 0xc51e367a, 0xfd2a57aa, 0x94535ccf, + 0x2fd84160, 0x46a14a05, 0x83bf7c7f, 0xeac6771a, 0x514d6ab5, + 0x383461d0, 0x2125a915, 0x485ca270, 0xf3d7bfdf, 0x9aaeb4ba, + 0x5fb082c0, 0x36c989a5, 0x8d42940a, 0xe43b9f6f, 0xdc0ffebf, + 0xb576f5da, 0x0efde875, 0x6784e310, 0xa29ad56a, 0xcbe3de0f, + 0x7068c3a0, 0x1911c8c5, 0x424b522a, 0x2b32594f, 0x90b944e0, + 0xf9c04f85, 0x3cde79ff, 0x55a7729a, 0xee2c6f35, 0x87556450, + 0xbf610580, 0xd6180ee5, 0x6d93134a, 0x04ea182f, 0xc1f42e55, + 0xa88d2530, 0x1306389f, 0x7a7f33fa, 0x636efb3f, 0x0a17f05a, + 0xb19cedf5, 0xd8e5e690, 0x1dfbd0ea, 0x7482db8f, 0xcf09c620, + 0xa670cd45, 0x9e44ac95, 0xf73da7f0, 0x4cb6ba5f, 0x25cfb13a, + 0xe0d18740, 0x89a88c25, 0x3223918a, 0x5b5a9aef, 0x8496a454, + 0xedefaf31, 0x5664b29e, 0x3f1db9fb, 0xfa038f81, 0x937a84e4, + 0x28f1994b, 0x4188922e, 0x79bcf3fe, 0x10c5f89b, 0xab4ee534, + 0xc237ee51, 0x0729d82b, 0x6e50d34e, 0xd5dbcee1, 0xbca2c584, + 0xa5b30d41, 0xccca0624, 0x77411b8b, 0x1e3810ee, 0xdb262694, + 0xb25f2df1, 0x09d4305e, 0x60ad3b3b, 0x58995aeb, 0x31e0518e, + 0x8a6b4c21, 0xe3124744, 0x260c713e, 0x4f757a5b, 0xf4fe67f4, + 0x9d876c91, 0xc6ddf67e, 0xafa4fd1b, 0x142fe0b4, 0x7d56ebd1, + 0xb848ddab, 0xd131d6ce, 0x6abacb61, 0x03c3c004, 0x3bf7a1d4, + 0x528eaab1, 0xe905b71e, 0x807cbc7b, 0x45628a01, 0x2c1b8164, + 0x97909ccb, 0xfee997ae, 0xe7f85f6b, 0x8e81540e, 0x350a49a1, + 0x5c7342c4, 0x996d74be, 0xf0147fdb, 0x4b9f6274, 0x22e66911, + 0x1ad208c1, 0x73ab03a4, 0xc8201e0b, 0xa159156e, 0x64472314, + 0x0d3e2871, 0xb6b535de, 0xdfcc3ebb, 0xd25c4ee9, 0xbb25458c, + 0x00ae5823, 0x69d75346, 0xacc9653c, 0xc5b06e59, 0x7e3b73f6, + 0x17427893, 0x2f761943, 0x460f1226, 0xfd840f89, 0x94fd04ec, + 0x51e33296, 0x389a39f3, 0x8311245c, 0xea682f39, 0xf379e7fc, + 0x9a00ec99, 0x218bf136, 0x48f2fa53, 0x8deccc29, 0xe495c74c, + 0x5f1edae3, 0x3667d186, 0x0e53b056, 0x672abb33, 0xdca1a69c, + 0xb5d8adf9, 0x70c69b83, 0x19bf90e6, 0xa2348d49, 0xcb4d862c, + 0x90171cc3, 0xf96e17a6, 0x42e50a09, 0x2b9c016c, 0xee823716, + 0x87fb3c73, 0x3c7021dc, 0x55092ab9, 0x6d3d4b69, 0x0444400c, + 0xbfcf5da3, 0xd6b656c6, 0x13a860bc, 0x7ad16bd9, 0xc15a7676, + 0xa8237d13, 0xb132b5d6, 0xd84bbeb3, 0x63c0a31c, 0x0ab9a879, + 0xcfa79e03, 0xa6de9566, 0x1d5588c9, 0x742c83ac, 0x4c18e27c, + 0x2561e919, 0x9eeaf4b6, 0xf793ffd3, 0x328dc9a9, 0x5bf4c2cc, + 0xe07fdf63, 0x8906d406, 0x56caeabd, 0x3fb3e1d8, 0x8438fc77, + 0xed41f712, 0x285fc168, 0x4126ca0d, 0xfaadd7a2, 0x93d4dcc7, + 0xabe0bd17, 0xc299b672, 0x7912abdd, 0x106ba0b8, 0xd57596c2, + 0xbc0c9da7, 0x07878008, 0x6efe8b6d, 0x77ef43a8, 0x1e9648cd, + 0xa51d5562, 0xcc645e07, 0x097a687d, 0x60036318, 0xdb887eb7, + 0xb2f175d2, 0x8ac51402, 0xe3bc1f67, 0x583702c8, 0x314e09ad, + 0xf4503fd7, 0x9d2934b2, 0x26a2291d, 0x4fdb2278, 0x1481b897, + 0x7df8b3f2, 0xc673ae5d, 0xaf0aa538, 0x6a149342, 0x036d9827, + 0xb8e68588, 0xd19f8eed, 0xe9abef3d, 0x80d2e458, 0x3b59f9f7, + 0x5220f292, 0x973ec4e8, 0xfe47cf8d, 0x45ccd222, 0x2cb5d947, + 0x35a41182, 0x5cdd1ae7, 0xe7560748, 0x8e2f0c2d, 0x4b313a57, + 0x22483132, 0x99c32c9d, 0xf0ba27f8, 0xc88e4628, 0xa1f74d4d, + 0x1a7c50e2, 0x73055b87, 0xb61b6dfd, 0xdf626698, 0x64e97b37, + 0x0d907052}, + {0x00000000, 0x7fc99b93, 0xff933726, 0x805aacb5, 0x2457680d, + 0x5b9ef39e, 0xdbc45f2b, 0xa40dc4b8, 0x48aed01a, 0x37674b89, + 0xb73de73c, 0xc8f47caf, 0x6cf9b817, 0x13302384, 0x936a8f31, + 0xeca314a2, 0x915da034, 0xee943ba7, 0x6ece9712, 0x11070c81, + 0xb50ac839, 0xcac353aa, 0x4a99ff1f, 0x3550648c, 0xd9f3702e, + 0xa63aebbd, 0x26604708, 0x59a9dc9b, 0xfda41823, 0x826d83b0, + 0x02372f05, 0x7dfeb496, 0xf9ca4629, 0x8603ddba, 0x0659710f, + 0x7990ea9c, 0xdd9d2e24, 0xa254b5b7, 0x220e1902, 0x5dc78291, + 0xb1649633, 0xcead0da0, 0x4ef7a115, 0x313e3a86, 0x9533fe3e, + 0xeafa65ad, 0x6aa0c918, 0x1569528b, 0x6897e61d, 0x175e7d8e, + 0x9704d13b, 0xe8cd4aa8, 0x4cc08e10, 0x33091583, 0xb353b936, + 0xcc9a22a5, 0x20393607, 0x5ff0ad94, 0xdfaa0121, 0xa0639ab2, + 0x046e5e0a, 0x7ba7c599, 0xfbfd692c, 0x8434f2bf, 0x28e58a13, + 0x572c1180, 0xd776bd35, 0xa8bf26a6, 0x0cb2e21e, 0x737b798d, + 0xf321d538, 0x8ce84eab, 0x604b5a09, 0x1f82c19a, 0x9fd86d2f, + 0xe011f6bc, 0x441c3204, 0x3bd5a997, 0xbb8f0522, 0xc4469eb1, + 0xb9b82a27, 0xc671b1b4, 0x462b1d01, 0x39e28692, 0x9def422a, + 0xe226d9b9, 0x627c750c, 0x1db5ee9f, 0xf116fa3d, 0x8edf61ae, + 0x0e85cd1b, 0x714c5688, 0xd5419230, 0xaa8809a3, 0x2ad2a516, + 0x551b3e85, 0xd12fcc3a, 0xaee657a9, 0x2ebcfb1c, 0x5175608f, + 0xf578a437, 0x8ab13fa4, 0x0aeb9311, 0x75220882, 0x99811c20, + 0xe64887b3, 0x66122b06, 0x19dbb095, 0xbdd6742d, 0xc21fefbe, + 0x4245430b, 0x3d8cd898, 0x40726c0e, 0x3fbbf79d, 0xbfe15b28, + 0xc028c0bb, 0x64250403, 0x1bec9f90, 0x9bb63325, 0xe47fa8b6, + 0x08dcbc14, 0x77152787, 0xf74f8b32, 0x888610a1, 0x2c8bd419, + 0x53424f8a, 0xd318e33f, 0xacd178ac, 0x51cb1426, 0x2e028fb5, + 0xae582300, 0xd191b893, 0x759c7c2b, 0x0a55e7b8, 0x8a0f4b0d, + 0xf5c6d09e, 0x1965c43c, 0x66ac5faf, 0xe6f6f31a, 0x993f6889, + 0x3d32ac31, 0x42fb37a2, 0xc2a19b17, 0xbd680084, 0xc096b412, + 0xbf5f2f81, 0x3f058334, 0x40cc18a7, 0xe4c1dc1f, 0x9b08478c, + 0x1b52eb39, 0x649b70aa, 0x88386408, 0xf7f1ff9b, 0x77ab532e, + 0x0862c8bd, 0xac6f0c05, 0xd3a69796, 0x53fc3b23, 0x2c35a0b0, + 0xa801520f, 0xd7c8c99c, 0x57926529, 0x285bfeba, 0x8c563a02, + 0xf39fa191, 0x73c50d24, 0x0c0c96b7, 0xe0af8215, 0x9f661986, + 0x1f3cb533, 0x60f52ea0, 0xc4f8ea18, 0xbb31718b, 0x3b6bdd3e, + 0x44a246ad, 0x395cf23b, 0x469569a8, 0xc6cfc51d, 0xb9065e8e, + 0x1d0b9a36, 0x62c201a5, 0xe298ad10, 0x9d513683, 0x71f22221, + 0x0e3bb9b2, 0x8e611507, 0xf1a88e94, 0x55a54a2c, 0x2a6cd1bf, + 0xaa367d0a, 0xd5ffe699, 0x792e9e35, 0x06e705a6, 0x86bda913, + 0xf9743280, 0x5d79f638, 0x22b06dab, 0xa2eac11e, 0xdd235a8d, + 0x31804e2f, 0x4e49d5bc, 0xce137909, 0xb1dae29a, 0x15d72622, + 0x6a1ebdb1, 0xea441104, 0x958d8a97, 0xe8733e01, 0x97baa592, + 0x17e00927, 0x682992b4, 0xcc24560c, 0xb3edcd9f, 0x33b7612a, + 0x4c7efab9, 0xa0ddee1b, 0xdf147588, 0x5f4ed93d, 0x208742ae, + 0x848a8616, 0xfb431d85, 0x7b19b130, 0x04d02aa3, 0x80e4d81c, + 0xff2d438f, 0x7f77ef3a, 0x00be74a9, 0xa4b3b011, 0xdb7a2b82, + 0x5b208737, 0x24e91ca4, 0xc84a0806, 0xb7839395, 0x37d93f20, + 0x4810a4b3, 0xec1d600b, 0x93d4fb98, 0x138e572d, 0x6c47ccbe, + 0x11b97828, 0x6e70e3bb, 0xee2a4f0e, 0x91e3d49d, 0x35ee1025, + 0x4a278bb6, 0xca7d2703, 0xb5b4bc90, 0x5917a832, 0x26de33a1, + 0xa6849f14, 0xd94d0487, 0x7d40c03f, 0x02895bac, 0x82d3f719, + 0xfd1a6c8a}, + {0x00000000, 0xa396284c, 0x9c5d56d9, 0x3fcb7e95, 0xe3cbabf3, + 0x405d83bf, 0x7f96fd2a, 0xdc00d566, 0x1ce651a7, 0xbf7079eb, + 0x80bb077e, 0x232d2f32, 0xff2dfa54, 0x5cbbd218, 0x6370ac8d, + 0xc0e684c1, 0x39cca34e, 0x9a5a8b02, 0xa591f597, 0x0607dddb, + 0xda0708bd, 0x799120f1, 0x465a5e64, 0xe5cc7628, 0x252af2e9, + 0x86bcdaa5, 0xb977a430, 0x1ae18c7c, 0xc6e1591a, 0x65777156, + 0x5abc0fc3, 0xf92a278f, 0x7399469c, 0xd00f6ed0, 0xefc41045, + 0x4c523809, 0x9052ed6f, 0x33c4c523, 0x0c0fbbb6, 0xaf9993fa, + 0x6f7f173b, 0xcce93f77, 0xf32241e2, 0x50b469ae, 0x8cb4bcc8, + 0x2f229484, 0x10e9ea11, 0xb37fc25d, 0x4a55e5d2, 0xe9c3cd9e, + 0xd608b30b, 0x759e9b47, 0xa99e4e21, 0x0a08666d, 0x35c318f8, + 0x965530b4, 0x56b3b475, 0xf5259c39, 0xcaeee2ac, 0x6978cae0, + 0xb5781f86, 0x16ee37ca, 0x2925495f, 0x8ab36113, 0xe7328d38, + 0x44a4a574, 0x7b6fdbe1, 0xd8f9f3ad, 0x04f926cb, 0xa76f0e87, + 0x98a47012, 0x3b32585e, 0xfbd4dc9f, 0x5842f4d3, 0x67898a46, + 0xc41fa20a, 0x181f776c, 0xbb895f20, 0x844221b5, 0x27d409f9, + 0xdefe2e76, 0x7d68063a, 0x42a378af, 0xe13550e3, 0x3d358585, + 0x9ea3adc9, 0xa168d35c, 0x02fefb10, 0xc2187fd1, 0x618e579d, + 0x5e452908, 0xfdd30144, 0x21d3d422, 0x8245fc6e, 0xbd8e82fb, + 0x1e18aab7, 0x94abcba4, 0x373de3e8, 0x08f69d7d, 0xab60b531, + 0x77606057, 0xd4f6481b, 0xeb3d368e, 0x48ab1ec2, 0x884d9a03, + 0x2bdbb24f, 0x1410ccda, 0xb786e496, 0x6b8631f0, 0xc81019bc, + 0xf7db6729, 0x544d4f65, 0xad6768ea, 0x0ef140a6, 0x313a3e33, + 0x92ac167f, 0x4eacc319, 0xed3aeb55, 0xd2f195c0, 0x7167bd8c, + 0xb181394d, 0x12171101, 0x2ddc6f94, 0x8e4a47d8, 0x524a92be, + 0xf1dcbaf2, 0xce17c467, 0x6d81ec2b, 0x15141c31, 0xb682347d, + 0x89494ae8, 0x2adf62a4, 0xf6dfb7c2, 0x55499f8e, 0x6a82e11b, + 0xc914c957, 0x09f24d96, 0xaa6465da, 0x95af1b4f, 0x36393303, + 0xea39e665, 0x49afce29, 0x7664b0bc, 0xd5f298f0, 0x2cd8bf7f, + 0x8f4e9733, 0xb085e9a6, 0x1313c1ea, 0xcf13148c, 0x6c853cc0, + 0x534e4255, 0xf0d86a19, 0x303eeed8, 0x93a8c694, 0xac63b801, + 0x0ff5904d, 0xd3f5452b, 0x70636d67, 0x4fa813f2, 0xec3e3bbe, + 0x668d5aad, 0xc51b72e1, 0xfad00c74, 0x59462438, 0x8546f15e, + 0x26d0d912, 0x191ba787, 0xba8d8fcb, 0x7a6b0b0a, 0xd9fd2346, + 0xe6365dd3, 0x45a0759f, 0x99a0a0f9, 0x3a3688b5, 0x05fdf620, + 0xa66bde6c, 0x5f41f9e3, 0xfcd7d1af, 0xc31caf3a, 0x608a8776, + 0xbc8a5210, 0x1f1c7a5c, 0x20d704c9, 0x83412c85, 0x43a7a844, + 0xe0318008, 0xdffafe9d, 0x7c6cd6d1, 0xa06c03b7, 0x03fa2bfb, + 0x3c31556e, 0x9fa77d22, 0xf2269109, 0x51b0b945, 0x6e7bc7d0, + 0xcdedef9c, 0x11ed3afa, 0xb27b12b6, 0x8db06c23, 0x2e26446f, + 0xeec0c0ae, 0x4d56e8e2, 0x729d9677, 0xd10bbe3b, 0x0d0b6b5d, + 0xae9d4311, 0x91563d84, 0x32c015c8, 0xcbea3247, 0x687c1a0b, + 0x57b7649e, 0xf4214cd2, 0x282199b4, 0x8bb7b1f8, 0xb47ccf6d, + 0x17eae721, 0xd70c63e0, 0x749a4bac, 0x4b513539, 0xe8c71d75, + 0x34c7c813, 0x9751e05f, 0xa89a9eca, 0x0b0cb686, 0x81bfd795, + 0x2229ffd9, 0x1de2814c, 0xbe74a900, 0x62747c66, 0xc1e2542a, + 0xfe292abf, 0x5dbf02f3, 0x9d598632, 0x3ecfae7e, 0x0104d0eb, + 0xa292f8a7, 0x7e922dc1, 0xdd04058d, 0xe2cf7b18, 0x41595354, + 0xb87374db, 0x1be55c97, 0x242e2202, 0x87b80a4e, 0x5bb8df28, + 0xf82ef764, 0xc7e589f1, 0x6473a1bd, 0xa495257c, 0x07030d30, + 0x38c873a5, 0x9b5e5be9, 0x475e8e8f, 0xe4c8a6c3, 0xdb03d856, + 0x7895f01a}, + {0x00000000, 0x2a283862, 0x545070c4, 0x7e7848a6, 0xa8a0e188, + 0x8288d9ea, 0xfcf0914c, 0xd6d8a92e, 0x8a30c551, 0xa018fd33, + 0xde60b595, 0xf4488df7, 0x229024d9, 0x08b81cbb, 0x76c0541d, + 0x5ce86c7f, 0xcf108ce3, 0xe538b481, 0x9b40fc27, 0xb168c445, + 0x67b06d6b, 0x4d985509, 0x33e01daf, 0x19c825cd, 0x452049b2, + 0x6f0871d0, 0x11703976, 0x3b580114, 0xed80a83a, 0xc7a89058, + 0xb9d0d8fe, 0x93f8e09c, 0x45501f87, 0x6f7827e5, 0x11006f43, + 0x3b285721, 0xedf0fe0f, 0xc7d8c66d, 0xb9a08ecb, 0x9388b6a9, + 0xcf60dad6, 0xe548e2b4, 0x9b30aa12, 0xb1189270, 0x67c03b5e, + 0x4de8033c, 0x33904b9a, 0x19b873f8, 0x8a409364, 0xa068ab06, + 0xde10e3a0, 0xf438dbc2, 0x22e072ec, 0x08c84a8e, 0x76b00228, + 0x5c983a4a, 0x00705635, 0x2a586e57, 0x542026f1, 0x7e081e93, + 0xa8d0b7bd, 0x82f88fdf, 0xfc80c779, 0xd6a8ff1b, 0x8aa03f0e, + 0xa088076c, 0xdef04fca, 0xf4d877a8, 0x2200de86, 0x0828e6e4, + 0x7650ae42, 0x5c789620, 0x0090fa5f, 0x2ab8c23d, 0x54c08a9b, + 0x7ee8b2f9, 0xa8301bd7, 0x821823b5, 0xfc606b13, 0xd6485371, + 0x45b0b3ed, 0x6f988b8f, 0x11e0c329, 0x3bc8fb4b, 0xed105265, + 0xc7386a07, 0xb94022a1, 0x93681ac3, 0xcf8076bc, 0xe5a84ede, + 0x9bd00678, 0xb1f83e1a, 0x67209734, 0x4d08af56, 0x3370e7f0, + 0x1958df92, 0xcff02089, 0xe5d818eb, 0x9ba0504d, 0xb188682f, + 0x6750c101, 0x4d78f963, 0x3300b1c5, 0x192889a7, 0x45c0e5d8, + 0x6fe8ddba, 0x1190951c, 0x3bb8ad7e, 0xed600450, 0xc7483c32, + 0xb9307494, 0x93184cf6, 0x00e0ac6a, 0x2ac89408, 0x54b0dcae, + 0x7e98e4cc, 0xa8404de2, 0x82687580, 0xfc103d26, 0xd6380544, + 0x8ad0693b, 0xa0f85159, 0xde8019ff, 0xf4a8219d, 0x227088b3, + 0x0858b0d1, 0x7620f877, 0x5c08c015, 0xce31785d, 0xe419403f, + 0x9a610899, 0xb04930fb, 0x669199d5, 0x4cb9a1b7, 0x32c1e911, + 0x18e9d173, 0x4401bd0c, 0x6e29856e, 0x1051cdc8, 0x3a79f5aa, + 0xeca15c84, 0xc68964e6, 0xb8f12c40, 0x92d91422, 0x0121f4be, + 0x2b09ccdc, 0x5571847a, 0x7f59bc18, 0xa9811536, 0x83a92d54, + 0xfdd165f2, 0xd7f95d90, 0x8b1131ef, 0xa139098d, 0xdf41412b, + 0xf5697949, 0x23b1d067, 0x0999e805, 0x77e1a0a3, 0x5dc998c1, + 0x8b6167da, 0xa1495fb8, 0xdf31171e, 0xf5192f7c, 0x23c18652, + 0x09e9be30, 0x7791f696, 0x5db9cef4, 0x0151a28b, 0x2b799ae9, + 0x5501d24f, 0x7f29ea2d, 0xa9f14303, 0x83d97b61, 0xfda133c7, + 0xd7890ba5, 0x4471eb39, 0x6e59d35b, 0x10219bfd, 0x3a09a39f, + 0xecd10ab1, 0xc6f932d3, 0xb8817a75, 0x92a94217, 0xce412e68, + 0xe469160a, 0x9a115eac, 0xb03966ce, 0x66e1cfe0, 0x4cc9f782, + 0x32b1bf24, 0x18998746, 0x44914753, 0x6eb97f31, 0x10c13797, + 0x3ae90ff5, 0xec31a6db, 0xc6199eb9, 0xb861d61f, 0x9249ee7d, + 0xcea18202, 0xe489ba60, 0x9af1f2c6, 0xb0d9caa4, 0x6601638a, + 0x4c295be8, 0x3251134e, 0x18792b2c, 0x8b81cbb0, 0xa1a9f3d2, + 0xdfd1bb74, 0xf5f98316, 0x23212a38, 0x0909125a, 0x77715afc, + 0x5d59629e, 0x01b10ee1, 0x2b993683, 0x55e17e25, 0x7fc94647, + 0xa911ef69, 0x8339d70b, 0xfd419fad, 0xd769a7cf, 0x01c158d4, + 0x2be960b6, 0x55912810, 0x7fb91072, 0xa961b95c, 0x8349813e, + 0xfd31c998, 0xd719f1fa, 0x8bf19d85, 0xa1d9a5e7, 0xdfa1ed41, + 0xf589d523, 0x23517c0d, 0x0979446f, 0x77010cc9, 0x5d2934ab, + 0xced1d437, 0xe4f9ec55, 0x9a81a4f3, 0xb0a99c91, 0x667135bf, + 0x4c590ddd, 0x3221457b, 0x18097d19, 0x44e11166, 0x6ec92904, + 0x10b161a2, 0x3a9959c0, 0xec41f0ee, 0xc669c88c, 0xb811802a, + 0x9239b848}, + {0x00000000, 0x4713f6fb, 0x8e27edf6, 0xc9341b0d, 0xc73eddad, + 0x802d2b56, 0x4919305b, 0x0e0ac6a0, 0x550cbd1b, 0x121f4be0, + 0xdb2b50ed, 0x9c38a616, 0x923260b6, 0xd521964d, 0x1c158d40, + 0x5b067bbb, 0xaa197a36, 0xed0a8ccd, 0x243e97c0, 0x632d613b, + 0x6d27a79b, 0x2a345160, 0xe3004a6d, 0xa413bc96, 0xff15c72d, + 0xb80631d6, 0x71322adb, 0x3621dc20, 0x382b1a80, 0x7f38ec7b, + 0xb60cf776, 0xf11f018d, 0x8f43f22d, 0xc85004d6, 0x01641fdb, + 0x4677e920, 0x487d2f80, 0x0f6ed97b, 0xc65ac276, 0x8149348d, + 0xda4f4f36, 0x9d5cb9cd, 0x5468a2c0, 0x137b543b, 0x1d71929b, + 0x5a626460, 0x93567f6d, 0xd4458996, 0x255a881b, 0x62497ee0, + 0xab7d65ed, 0xec6e9316, 0xe26455b6, 0xa577a34d, 0x6c43b840, + 0x2b504ebb, 0x70563500, 0x3745c3fb, 0xfe71d8f6, 0xb9622e0d, + 0xb768e8ad, 0xf07b1e56, 0x394f055b, 0x7e5cf3a0, 0xc5f6e21b, + 0x82e514e0, 0x4bd10fed, 0x0cc2f916, 0x02c83fb6, 0x45dbc94d, + 0x8cefd240, 0xcbfc24bb, 0x90fa5f00, 0xd7e9a9fb, 0x1eddb2f6, + 0x59ce440d, 0x57c482ad, 0x10d77456, 0xd9e36f5b, 0x9ef099a0, + 0x6fef982d, 0x28fc6ed6, 0xe1c875db, 0xa6db8320, 0xa8d14580, + 0xefc2b37b, 0x26f6a876, 0x61e55e8d, 0x3ae32536, 0x7df0d3cd, + 0xb4c4c8c0, 0xf3d73e3b, 0xfdddf89b, 0xbace0e60, 0x73fa156d, + 0x34e9e396, 0x4ab51036, 0x0da6e6cd, 0xc492fdc0, 0x83810b3b, + 0x8d8bcd9b, 0xca983b60, 0x03ac206d, 0x44bfd696, 0x1fb9ad2d, + 0x58aa5bd6, 0x919e40db, 0xd68db620, 0xd8877080, 0x9f94867b, + 0x56a09d76, 0x11b36b8d, 0xe0ac6a00, 0xa7bf9cfb, 0x6e8b87f6, + 0x2998710d, 0x2792b7ad, 0x60814156, 0xa9b55a5b, 0xeea6aca0, + 0xb5a0d71b, 0xf2b321e0, 0x3b873aed, 0x7c94cc16, 0x729e0ab6, + 0x358dfc4d, 0xfcb9e740, 0xbbaa11bb, 0x509cc277, 0x178f348c, + 0xdebb2f81, 0x99a8d97a, 0x97a21fda, 0xd0b1e921, 0x1985f22c, + 0x5e9604d7, 0x05907f6c, 0x42838997, 0x8bb7929a, 0xcca46461, + 0xc2aea2c1, 0x85bd543a, 0x4c894f37, 0x0b9ab9cc, 0xfa85b841, + 0xbd964eba, 0x74a255b7, 0x33b1a34c, 0x3dbb65ec, 0x7aa89317, + 0xb39c881a, 0xf48f7ee1, 0xaf89055a, 0xe89af3a1, 0x21aee8ac, + 0x66bd1e57, 0x68b7d8f7, 0x2fa42e0c, 0xe6903501, 0xa183c3fa, + 0xdfdf305a, 0x98ccc6a1, 0x51f8ddac, 0x16eb2b57, 0x18e1edf7, + 0x5ff21b0c, 0x96c60001, 0xd1d5f6fa, 0x8ad38d41, 0xcdc07bba, + 0x04f460b7, 0x43e7964c, 0x4ded50ec, 0x0afea617, 0xc3cabd1a, + 0x84d94be1, 0x75c64a6c, 0x32d5bc97, 0xfbe1a79a, 0xbcf25161, + 0xb2f897c1, 0xf5eb613a, 0x3cdf7a37, 0x7bcc8ccc, 0x20caf777, + 0x67d9018c, 0xaeed1a81, 0xe9feec7a, 0xe7f42ada, 0xa0e7dc21, + 0x69d3c72c, 0x2ec031d7, 0x956a206c, 0xd279d697, 0x1b4dcd9a, + 0x5c5e3b61, 0x5254fdc1, 0x15470b3a, 0xdc731037, 0x9b60e6cc, + 0xc0669d77, 0x87756b8c, 0x4e417081, 0x0952867a, 0x075840da, + 0x404bb621, 0x897fad2c, 0xce6c5bd7, 0x3f735a5a, 0x7860aca1, + 0xb154b7ac, 0xf6474157, 0xf84d87f7, 0xbf5e710c, 0x766a6a01, + 0x31799cfa, 0x6a7fe741, 0x2d6c11ba, 0xe4580ab7, 0xa34bfc4c, + 0xad413aec, 0xea52cc17, 0x2366d71a, 0x647521e1, 0x1a29d241, + 0x5d3a24ba, 0x940e3fb7, 0xd31dc94c, 0xdd170fec, 0x9a04f917, + 0x5330e21a, 0x142314e1, 0x4f256f5a, 0x083699a1, 0xc10282ac, + 0x86117457, 0x881bb2f7, 0xcf08440c, 0x063c5f01, 0x412fa9fa, + 0xb030a877, 0xf7235e8c, 0x3e174581, 0x7904b37a, 0x770e75da, + 0x301d8321, 0xf929982c, 0xbe3a6ed7, 0xe53c156c, 0xa22fe397, + 0x6b1bf89a, 0x2c080e61, 0x2202c8c1, 0x65113e3a, 0xac252537, + 0xeb36d3cc}, + {0x00000000, 0xa13984ee, 0x99020f9d, 0x383b8b73, 0xe975197b, + 0x484c9d95, 0x707716e6, 0xd14e9208, 0x099b34b7, 0xa8a2b059, + 0x90993b2a, 0x31a0bfc4, 0xe0ee2dcc, 0x41d7a922, 0x79ec2251, + 0xd8d5a6bf, 0x1336696e, 0xb20fed80, 0x8a3466f3, 0x2b0de21d, + 0xfa437015, 0x5b7af4fb, 0x63417f88, 0xc278fb66, 0x1aad5dd9, + 0xbb94d937, 0x83af5244, 0x2296d6aa, 0xf3d844a2, 0x52e1c04c, + 0x6ada4b3f, 0xcbe3cfd1, 0x266cd2dc, 0x87555632, 0xbf6edd41, + 0x1e5759af, 0xcf19cba7, 0x6e204f49, 0x561bc43a, 0xf72240d4, + 0x2ff7e66b, 0x8ece6285, 0xb6f5e9f6, 0x17cc6d18, 0xc682ff10, + 0x67bb7bfe, 0x5f80f08d, 0xfeb97463, 0x355abbb2, 0x94633f5c, + 0xac58b42f, 0x0d6130c1, 0xdc2fa2c9, 0x7d162627, 0x452dad54, + 0xe41429ba, 0x3cc18f05, 0x9df80beb, 0xa5c38098, 0x04fa0476, + 0xd5b4967e, 0x748d1290, 0x4cb699e3, 0xed8f1d0d, 0x4cd9a5b8, + 0xede02156, 0xd5dbaa25, 0x74e22ecb, 0xa5acbcc3, 0x0495382d, + 0x3caeb35e, 0x9d9737b0, 0x4542910f, 0xe47b15e1, 0xdc409e92, + 0x7d791a7c, 0xac378874, 0x0d0e0c9a, 0x353587e9, 0x940c0307, + 0x5fefccd6, 0xfed64838, 0xc6edc34b, 0x67d447a5, 0xb69ad5ad, + 0x17a35143, 0x2f98da30, 0x8ea15ede, 0x5674f861, 0xf74d7c8f, + 0xcf76f7fc, 0x6e4f7312, 0xbf01e11a, 0x1e3865f4, 0x2603ee87, + 0x873a6a69, 0x6ab57764, 0xcb8cf38a, 0xf3b778f9, 0x528efc17, + 0x83c06e1f, 0x22f9eaf1, 0x1ac26182, 0xbbfbe56c, 0x632e43d3, + 0xc217c73d, 0xfa2c4c4e, 0x5b15c8a0, 0x8a5b5aa8, 0x2b62de46, + 0x13595535, 0xb260d1db, 0x79831e0a, 0xd8ba9ae4, 0xe0811197, + 0x41b89579, 0x90f60771, 0x31cf839f, 0x09f408ec, 0xa8cd8c02, + 0x70182abd, 0xd121ae53, 0xe91a2520, 0x4823a1ce, 0x996d33c6, + 0x3854b728, 0x006f3c5b, 0xa156b8b5, 0x99b34b70, 0x388acf9e, + 0x00b144ed, 0xa188c003, 0x70c6520b, 0xd1ffd6e5, 0xe9c45d96, + 0x48fdd978, 0x90287fc7, 0x3111fb29, 0x092a705a, 0xa813f4b4, + 0x795d66bc, 0xd864e252, 0xe05f6921, 0x4166edcf, 0x8a85221e, + 0x2bbca6f0, 0x13872d83, 0xb2bea96d, 0x63f03b65, 0xc2c9bf8b, + 0xfaf234f8, 0x5bcbb016, 0x831e16a9, 0x22279247, 0x1a1c1934, + 0xbb259dda, 0x6a6b0fd2, 0xcb528b3c, 0xf369004f, 0x525084a1, + 0xbfdf99ac, 0x1ee61d42, 0x26dd9631, 0x87e412df, 0x56aa80d7, + 0xf7930439, 0xcfa88f4a, 0x6e910ba4, 0xb644ad1b, 0x177d29f5, + 0x2f46a286, 0x8e7f2668, 0x5f31b460, 0xfe08308e, 0xc633bbfd, + 0x670a3f13, 0xace9f0c2, 0x0dd0742c, 0x35ebff5f, 0x94d27bb1, + 0x459ce9b9, 0xe4a56d57, 0xdc9ee624, 0x7da762ca, 0xa572c475, + 0x044b409b, 0x3c70cbe8, 0x9d494f06, 0x4c07dd0e, 0xed3e59e0, + 0xd505d293, 0x743c567d, 0xd56aeec8, 0x74536a26, 0x4c68e155, + 0xed5165bb, 0x3c1ff7b3, 0x9d26735d, 0xa51df82e, 0x04247cc0, + 0xdcf1da7f, 0x7dc85e91, 0x45f3d5e2, 0xe4ca510c, 0x3584c304, + 0x94bd47ea, 0xac86cc99, 0x0dbf4877, 0xc65c87a6, 0x67650348, + 0x5f5e883b, 0xfe670cd5, 0x2f299edd, 0x8e101a33, 0xb62b9140, + 0x171215ae, 0xcfc7b311, 0x6efe37ff, 0x56c5bc8c, 0xf7fc3862, + 0x26b2aa6a, 0x878b2e84, 0xbfb0a5f7, 0x1e892119, 0xf3063c14, + 0x523fb8fa, 0x6a043389, 0xcb3db767, 0x1a73256f, 0xbb4aa181, + 0x83712af2, 0x2248ae1c, 0xfa9d08a3, 0x5ba48c4d, 0x639f073e, + 0xc2a683d0, 0x13e811d8, 0xb2d19536, 0x8aea1e45, 0x2bd39aab, + 0xe030557a, 0x4109d194, 0x79325ae7, 0xd80bde09, 0x09454c01, + 0xa87cc8ef, 0x9047439c, 0x317ec772, 0xe9ab61cd, 0x4892e523, + 0x70a96e50, 0xd190eabe, 0x00de78b6, 0xa1e7fc58, 0x99dc772b, + 0x38e5f3c5}, + {0x00000000, 0xe81790a1, 0x0b5e2703, 0xe349b7a2, 0x16bc4e06, + 0xfeabdea7, 0x1de26905, 0xf5f5f9a4, 0x2d789c0c, 0xc56f0cad, + 0x2626bb0f, 0xce312bae, 0x3bc4d20a, 0xd3d342ab, 0x309af509, + 0xd88d65a8, 0x5af13818, 0xb2e6a8b9, 0x51af1f1b, 0xb9b88fba, + 0x4c4d761e, 0xa45ae6bf, 0x4713511d, 0xaf04c1bc, 0x7789a414, + 0x9f9e34b5, 0x7cd78317, 0x94c013b6, 0x6135ea12, 0x89227ab3, + 0x6a6bcd11, 0x827c5db0, 0xb5e27030, 0x5df5e091, 0xbebc5733, + 0x56abc792, 0xa35e3e36, 0x4b49ae97, 0xa8001935, 0x40178994, + 0x989aec3c, 0x708d7c9d, 0x93c4cb3f, 0x7bd35b9e, 0x8e26a23a, + 0x6631329b, 0x85788539, 0x6d6f1598, 0xef134828, 0x0704d889, + 0xe44d6f2b, 0x0c5aff8a, 0xf9af062e, 0x11b8968f, 0xf2f1212d, + 0x1ae6b18c, 0xc26bd424, 0x2a7c4485, 0xc935f327, 0x21226386, + 0xd4d79a22, 0x3cc00a83, 0xdf89bd21, 0x379e2d80, 0xb0b5e621, + 0x58a27680, 0xbbebc122, 0x53fc5183, 0xa609a827, 0x4e1e3886, + 0xad578f24, 0x45401f85, 0x9dcd7a2d, 0x75daea8c, 0x96935d2e, + 0x7e84cd8f, 0x8b71342b, 0x6366a48a, 0x802f1328, 0x68388389, + 0xea44de39, 0x02534e98, 0xe11af93a, 0x090d699b, 0xfcf8903f, + 0x14ef009e, 0xf7a6b73c, 0x1fb1279d, 0xc73c4235, 0x2f2bd294, + 0xcc626536, 0x2475f597, 0xd1800c33, 0x39979c92, 0xdade2b30, + 0x32c9bb91, 0x05579611, 0xed4006b0, 0x0e09b112, 0xe61e21b3, + 0x13ebd817, 0xfbfc48b6, 0x18b5ff14, 0xf0a26fb5, 0x282f0a1d, + 0xc0389abc, 0x23712d1e, 0xcb66bdbf, 0x3e93441b, 0xd684d4ba, + 0x35cd6318, 0xdddaf3b9, 0x5fa6ae09, 0xb7b13ea8, 0x54f8890a, + 0xbcef19ab, 0x491ae00f, 0xa10d70ae, 0x4244c70c, 0xaa5357ad, + 0x72de3205, 0x9ac9a2a4, 0x79801506, 0x919785a7, 0x64627c03, + 0x8c75eca2, 0x6f3c5b00, 0x872bcba1, 0xba1aca03, 0x520d5aa2, + 0xb144ed00, 0x59537da1, 0xaca68405, 0x44b114a4, 0xa7f8a306, + 0x4fef33a7, 0x9762560f, 0x7f75c6ae, 0x9c3c710c, 0x742be1ad, + 0x81de1809, 0x69c988a8, 0x8a803f0a, 0x6297afab, 0xe0ebf21b, + 0x08fc62ba, 0xebb5d518, 0x03a245b9, 0xf657bc1d, 0x1e402cbc, + 0xfd099b1e, 0x151e0bbf, 0xcd936e17, 0x2584feb6, 0xc6cd4914, + 0x2edad9b5, 0xdb2f2011, 0x3338b0b0, 0xd0710712, 0x386697b3, + 0x0ff8ba33, 0xe7ef2a92, 0x04a69d30, 0xecb10d91, 0x1944f435, + 0xf1536494, 0x121ad336, 0xfa0d4397, 0x2280263f, 0xca97b69e, + 0x29de013c, 0xc1c9919d, 0x343c6839, 0xdc2bf898, 0x3f624f3a, + 0xd775df9b, 0x5509822b, 0xbd1e128a, 0x5e57a528, 0xb6403589, + 0x43b5cc2d, 0xaba25c8c, 0x48ebeb2e, 0xa0fc7b8f, 0x78711e27, + 0x90668e86, 0x732f3924, 0x9b38a985, 0x6ecd5021, 0x86dac080, + 0x65937722, 0x8d84e783, 0x0aaf2c22, 0xe2b8bc83, 0x01f10b21, + 0xe9e69b80, 0x1c136224, 0xf404f285, 0x174d4527, 0xff5ad586, + 0x27d7b02e, 0xcfc0208f, 0x2c89972d, 0xc49e078c, 0x316bfe28, + 0xd97c6e89, 0x3a35d92b, 0xd222498a, 0x505e143a, 0xb849849b, + 0x5b003339, 0xb317a398, 0x46e25a3c, 0xaef5ca9d, 0x4dbc7d3f, + 0xa5abed9e, 0x7d268836, 0x95311897, 0x7678af35, 0x9e6f3f94, + 0x6b9ac630, 0x838d5691, 0x60c4e133, 0x88d37192, 0xbf4d5c12, + 0x575accb3, 0xb4137b11, 0x5c04ebb0, 0xa9f11214, 0x41e682b5, + 0xa2af3517, 0x4ab8a5b6, 0x9235c01e, 0x7a2250bf, 0x996be71d, + 0x717c77bc, 0x84898e18, 0x6c9e1eb9, 0x8fd7a91b, 0x67c039ba, + 0xe5bc640a, 0x0dabf4ab, 0xeee24309, 0x06f5d3a8, 0xf3002a0c, + 0x1b17baad, 0xf85e0d0f, 0x10499dae, 0xc8c4f806, 0x20d368a7, + 0xc39adf05, 0x2b8d4fa4, 0xde78b600, 0x366f26a1, 0xd5269103, + 0x3d3101a2}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x0000000000000000, 0xa19017e800000000, 0x03275e0b00000000, + 0xa2b749e300000000, 0x064ebc1600000000, 0xa7deabfe00000000, + 0x0569e21d00000000, 0xa4f9f5f500000000, 0x0c9c782d00000000, + 0xad0c6fc500000000, 0x0fbb262600000000, 0xae2b31ce00000000, + 0x0ad2c43b00000000, 0xab42d3d300000000, 0x09f59a3000000000, + 0xa8658dd800000000, 0x1838f15a00000000, 0xb9a8e6b200000000, + 0x1b1faf5100000000, 0xba8fb8b900000000, 0x1e764d4c00000000, + 0xbfe65aa400000000, 0x1d51134700000000, 0xbcc104af00000000, + 0x14a4897700000000, 0xb5349e9f00000000, 0x1783d77c00000000, + 0xb613c09400000000, 0x12ea356100000000, 0xb37a228900000000, + 0x11cd6b6a00000000, 0xb05d7c8200000000, 0x3070e2b500000000, + 0x91e0f55d00000000, 0x3357bcbe00000000, 0x92c7ab5600000000, + 0x363e5ea300000000, 0x97ae494b00000000, 0x351900a800000000, + 0x9489174000000000, 0x3cec9a9800000000, 0x9d7c8d7000000000, + 0x3fcbc49300000000, 0x9e5bd37b00000000, 0x3aa2268e00000000, + 0x9b32316600000000, 0x3985788500000000, 0x98156f6d00000000, + 0x284813ef00000000, 0x89d8040700000000, 0x2b6f4de400000000, + 0x8aff5a0c00000000, 0x2e06aff900000000, 0x8f96b81100000000, + 0x2d21f1f200000000, 0x8cb1e61a00000000, 0x24d46bc200000000, + 0x85447c2a00000000, 0x27f335c900000000, 0x8663222100000000, + 0x229ad7d400000000, 0x830ac03c00000000, 0x21bd89df00000000, + 0x802d9e3700000000, 0x21e6b5b000000000, 0x8076a25800000000, + 0x22c1ebbb00000000, 0x8351fc5300000000, 0x27a809a600000000, + 0x86381e4e00000000, 0x248f57ad00000000, 0x851f404500000000, + 0x2d7acd9d00000000, 0x8ceada7500000000, 0x2e5d939600000000, + 0x8fcd847e00000000, 0x2b34718b00000000, 0x8aa4666300000000, + 0x28132f8000000000, 0x8983386800000000, 0x39de44ea00000000, + 0x984e530200000000, 0x3af91ae100000000, 0x9b690d0900000000, + 0x3f90f8fc00000000, 0x9e00ef1400000000, 0x3cb7a6f700000000, + 0x9d27b11f00000000, 0x35423cc700000000, 0x94d22b2f00000000, + 0x366562cc00000000, 0x97f5752400000000, 0x330c80d100000000, + 0x929c973900000000, 0x302bdeda00000000, 0x91bbc93200000000, + 0x1196570500000000, 0xb00640ed00000000, 0x12b1090e00000000, + 0xb3211ee600000000, 0x17d8eb1300000000, 0xb648fcfb00000000, + 0x14ffb51800000000, 0xb56fa2f000000000, 0x1d0a2f2800000000, + 0xbc9a38c000000000, 0x1e2d712300000000, 0xbfbd66cb00000000, + 0x1b44933e00000000, 0xbad484d600000000, 0x1863cd3500000000, + 0xb9f3dadd00000000, 0x09aea65f00000000, 0xa83eb1b700000000, + 0x0a89f85400000000, 0xab19efbc00000000, 0x0fe01a4900000000, + 0xae700da100000000, 0x0cc7444200000000, 0xad5753aa00000000, + 0x0532de7200000000, 0xa4a2c99a00000000, 0x0615807900000000, + 0xa785979100000000, 0x037c626400000000, 0xa2ec758c00000000, + 0x005b3c6f00000000, 0xa1cb2b8700000000, 0x03ca1aba00000000, + 0xa25a0d5200000000, 0x00ed44b100000000, 0xa17d535900000000, + 0x0584a6ac00000000, 0xa414b14400000000, 0x06a3f8a700000000, + 0xa733ef4f00000000, 0x0f56629700000000, 0xaec6757f00000000, + 0x0c713c9c00000000, 0xade12b7400000000, 0x0918de8100000000, + 0xa888c96900000000, 0x0a3f808a00000000, 0xabaf976200000000, + 0x1bf2ebe000000000, 0xba62fc0800000000, 0x18d5b5eb00000000, + 0xb945a20300000000, 0x1dbc57f600000000, 0xbc2c401e00000000, + 0x1e9b09fd00000000, 0xbf0b1e1500000000, 0x176e93cd00000000, + 0xb6fe842500000000, 0x1449cdc600000000, 0xb5d9da2e00000000, + 0x11202fdb00000000, 0xb0b0383300000000, 0x120771d000000000, + 0xb397663800000000, 0x33baf80f00000000, 0x922aefe700000000, + 0x309da60400000000, 0x910db1ec00000000, 0x35f4441900000000, + 0x946453f100000000, 0x36d31a1200000000, 0x97430dfa00000000, + 0x3f26802200000000, 0x9eb697ca00000000, 0x3c01de2900000000, + 0x9d91c9c100000000, 0x39683c3400000000, 0x98f82bdc00000000, + 0x3a4f623f00000000, 0x9bdf75d700000000, 0x2b82095500000000, + 0x8a121ebd00000000, 0x28a5575e00000000, 0x893540b600000000, + 0x2dccb54300000000, 0x8c5ca2ab00000000, 0x2eebeb4800000000, + 0x8f7bfca000000000, 0x271e717800000000, 0x868e669000000000, + 0x24392f7300000000, 0x85a9389b00000000, 0x2150cd6e00000000, + 0x80c0da8600000000, 0x2277936500000000, 0x83e7848d00000000, + 0x222caf0a00000000, 0x83bcb8e200000000, 0x210bf10100000000, + 0x809be6e900000000, 0x2462131c00000000, 0x85f204f400000000, + 0x27454d1700000000, 0x86d55aff00000000, 0x2eb0d72700000000, + 0x8f20c0cf00000000, 0x2d97892c00000000, 0x8c079ec400000000, + 0x28fe6b3100000000, 0x896e7cd900000000, 0x2bd9353a00000000, + 0x8a4922d200000000, 0x3a145e5000000000, 0x9b8449b800000000, + 0x3933005b00000000, 0x98a317b300000000, 0x3c5ae24600000000, + 0x9dcaf5ae00000000, 0x3f7dbc4d00000000, 0x9eedaba500000000, + 0x3688267d00000000, 0x9718319500000000, 0x35af787600000000, + 0x943f6f9e00000000, 0x30c69a6b00000000, 0x91568d8300000000, + 0x33e1c46000000000, 0x9271d38800000000, 0x125c4dbf00000000, + 0xb3cc5a5700000000, 0x117b13b400000000, 0xb0eb045c00000000, + 0x1412f1a900000000, 0xb582e64100000000, 0x1735afa200000000, + 0xb6a5b84a00000000, 0x1ec0359200000000, 0xbf50227a00000000, + 0x1de76b9900000000, 0xbc777c7100000000, 0x188e898400000000, + 0xb91e9e6c00000000, 0x1ba9d78f00000000, 0xba39c06700000000, + 0x0a64bce500000000, 0xabf4ab0d00000000, 0x0943e2ee00000000, + 0xa8d3f50600000000, 0x0c2a00f300000000, 0xadba171b00000000, + 0x0f0d5ef800000000, 0xae9d491000000000, 0x06f8c4c800000000, + 0xa768d32000000000, 0x05df9ac300000000, 0xa44f8d2b00000000, + 0x00b678de00000000, 0xa1266f3600000000, 0x039126d500000000, + 0xa201313d00000000}, + {0x0000000000000000, 0xee8439a100000000, 0x9d0f029900000000, + 0x738b3b3800000000, 0x7b1975e900000000, 0x959d4c4800000000, + 0xe616777000000000, 0x08924ed100000000, 0xb7349b0900000000, + 0x59b0a2a800000000, 0x2a3b999000000000, 0xc4bfa03100000000, + 0xcc2deee000000000, 0x22a9d74100000000, 0x5122ec7900000000, + 0xbfa6d5d800000000, 0x6e69361300000000, 0x80ed0fb200000000, + 0xf366348a00000000, 0x1de20d2b00000000, 0x157043fa00000000, + 0xfbf47a5b00000000, 0x887f416300000000, 0x66fb78c200000000, + 0xd95dad1a00000000, 0x37d994bb00000000, 0x4452af8300000000, + 0xaad6962200000000, 0xa244d8f300000000, 0x4cc0e15200000000, + 0x3f4bda6a00000000, 0xd1cfe3cb00000000, 0xdcd26c2600000000, + 0x3256558700000000, 0x41dd6ebf00000000, 0xaf59571e00000000, + 0xa7cb19cf00000000, 0x494f206e00000000, 0x3ac41b5600000000, + 0xd44022f700000000, 0x6be6f72f00000000, 0x8562ce8e00000000, + 0xf6e9f5b600000000, 0x186dcc1700000000, 0x10ff82c600000000, + 0xfe7bbb6700000000, 0x8df0805f00000000, 0x6374b9fe00000000, + 0xb2bb5a3500000000, 0x5c3f639400000000, 0x2fb458ac00000000, + 0xc130610d00000000, 0xc9a22fdc00000000, 0x2726167d00000000, + 0x54ad2d4500000000, 0xba2914e400000000, 0x058fc13c00000000, + 0xeb0bf89d00000000, 0x9880c3a500000000, 0x7604fa0400000000, + 0x7e96b4d500000000, 0x90128d7400000000, 0xe399b64c00000000, + 0x0d1d8fed00000000, 0xb8a5d94c00000000, 0x5621e0ed00000000, + 0x25aadbd500000000, 0xcb2ee27400000000, 0xc3bcaca500000000, + 0x2d38950400000000, 0x5eb3ae3c00000000, 0xb037979d00000000, + 0x0f91424500000000, 0xe1157be400000000, 0x929e40dc00000000, + 0x7c1a797d00000000, 0x748837ac00000000, 0x9a0c0e0d00000000, + 0xe987353500000000, 0x07030c9400000000, 0xd6ccef5f00000000, + 0x3848d6fe00000000, 0x4bc3edc600000000, 0xa547d46700000000, + 0xadd59ab600000000, 0x4351a31700000000, 0x30da982f00000000, + 0xde5ea18e00000000, 0x61f8745600000000, 0x8f7c4df700000000, + 0xfcf776cf00000000, 0x12734f6e00000000, 0x1ae101bf00000000, + 0xf465381e00000000, 0x87ee032600000000, 0x696a3a8700000000, + 0x6477b56a00000000, 0x8af38ccb00000000, 0xf978b7f300000000, + 0x17fc8e5200000000, 0x1f6ec08300000000, 0xf1eaf92200000000, + 0x8261c21a00000000, 0x6ce5fbbb00000000, 0xd3432e6300000000, + 0x3dc717c200000000, 0x4e4c2cfa00000000, 0xa0c8155b00000000, + 0xa85a5b8a00000000, 0x46de622b00000000, 0x3555591300000000, + 0xdbd160b200000000, 0x0a1e837900000000, 0xe49abad800000000, + 0x971181e000000000, 0x7995b84100000000, 0x7107f69000000000, + 0x9f83cf3100000000, 0xec08f40900000000, 0x028ccda800000000, + 0xbd2a187000000000, 0x53ae21d100000000, 0x20251ae900000000, + 0xcea1234800000000, 0xc6336d9900000000, 0x28b7543800000000, + 0x5b3c6f0000000000, 0xb5b856a100000000, 0x704bb39900000000, + 0x9ecf8a3800000000, 0xed44b10000000000, 0x03c088a100000000, + 0x0b52c67000000000, 0xe5d6ffd100000000, 0x965dc4e900000000, + 0x78d9fd4800000000, 0xc77f289000000000, 0x29fb113100000000, + 0x5a702a0900000000, 0xb4f413a800000000, 0xbc665d7900000000, + 0x52e264d800000000, 0x21695fe000000000, 0xcfed664100000000, + 0x1e22858a00000000, 0xf0a6bc2b00000000, 0x832d871300000000, + 0x6da9beb200000000, 0x653bf06300000000, 0x8bbfc9c200000000, + 0xf834f2fa00000000, 0x16b0cb5b00000000, 0xa9161e8300000000, + 0x4792272200000000, 0x34191c1a00000000, 0xda9d25bb00000000, + 0xd20f6b6a00000000, 0x3c8b52cb00000000, 0x4f0069f300000000, + 0xa184505200000000, 0xac99dfbf00000000, 0x421de61e00000000, + 0x3196dd2600000000, 0xdf12e48700000000, 0xd780aa5600000000, + 0x390493f700000000, 0x4a8fa8cf00000000, 0xa40b916e00000000, + 0x1bad44b600000000, 0xf5297d1700000000, 0x86a2462f00000000, + 0x68267f8e00000000, 0x60b4315f00000000, 0x8e3008fe00000000, + 0xfdbb33c600000000, 0x133f0a6700000000, 0xc2f0e9ac00000000, + 0x2c74d00d00000000, 0x5fffeb3500000000, 0xb17bd29400000000, + 0xb9e99c4500000000, 0x576da5e400000000, 0x24e69edc00000000, + 0xca62a77d00000000, 0x75c472a500000000, 0x9b404b0400000000, + 0xe8cb703c00000000, 0x064f499d00000000, 0x0edd074c00000000, + 0xe0593eed00000000, 0x93d205d500000000, 0x7d563c7400000000, + 0xc8ee6ad500000000, 0x266a537400000000, 0x55e1684c00000000, + 0xbb6551ed00000000, 0xb3f71f3c00000000, 0x5d73269d00000000, + 0x2ef81da500000000, 0xc07c240400000000, 0x7fdaf1dc00000000, + 0x915ec87d00000000, 0xe2d5f34500000000, 0x0c51cae400000000, + 0x04c3843500000000, 0xea47bd9400000000, 0x99cc86ac00000000, + 0x7748bf0d00000000, 0xa6875cc600000000, 0x4803656700000000, + 0x3b885e5f00000000, 0xd50c67fe00000000, 0xdd9e292f00000000, + 0x331a108e00000000, 0x40912bb600000000, 0xae15121700000000, + 0x11b3c7cf00000000, 0xff37fe6e00000000, 0x8cbcc55600000000, + 0x6238fcf700000000, 0x6aaab22600000000, 0x842e8b8700000000, + 0xf7a5b0bf00000000, 0x1921891e00000000, 0x143c06f300000000, + 0xfab83f5200000000, 0x8933046a00000000, 0x67b73dcb00000000, + 0x6f25731a00000000, 0x81a14abb00000000, 0xf22a718300000000, + 0x1cae482200000000, 0xa3089dfa00000000, 0x4d8ca45b00000000, + 0x3e079f6300000000, 0xd083a6c200000000, 0xd811e81300000000, + 0x3695d1b200000000, 0x451eea8a00000000, 0xab9ad32b00000000, + 0x7a5530e000000000, 0x94d1094100000000, 0xe75a327900000000, + 0x09de0bd800000000, 0x014c450900000000, 0xefc87ca800000000, + 0x9c43479000000000, 0x72c77e3100000000, 0xcd61abe900000000, + 0x23e5924800000000, 0x506ea97000000000, 0xbeea90d100000000, + 0xb678de0000000000, 0x58fce7a100000000, 0x2b77dc9900000000, + 0xc5f3e53800000000}, + {0x0000000000000000, 0xfbf6134700000000, 0xf6ed278e00000000, + 0x0d1b34c900000000, 0xaddd3ec700000000, 0x562b2d8000000000, + 0x5b30194900000000, 0xa0c60a0e00000000, 0x1bbd0c5500000000, + 0xe04b1f1200000000, 0xed502bdb00000000, 0x16a6389c00000000, + 0xb660329200000000, 0x4d9621d500000000, 0x408d151c00000000, + 0xbb7b065b00000000, 0x367a19aa00000000, 0xcd8c0aed00000000, + 0xc0973e2400000000, 0x3b612d6300000000, 0x9ba7276d00000000, + 0x6051342a00000000, 0x6d4a00e300000000, 0x96bc13a400000000, + 0x2dc715ff00000000, 0xd63106b800000000, 0xdb2a327100000000, + 0x20dc213600000000, 0x801a2b3800000000, 0x7bec387f00000000, + 0x76f70cb600000000, 0x8d011ff100000000, 0x2df2438f00000000, + 0xd60450c800000000, 0xdb1f640100000000, 0x20e9774600000000, + 0x802f7d4800000000, 0x7bd96e0f00000000, 0x76c25ac600000000, + 0x8d34498100000000, 0x364f4fda00000000, 0xcdb95c9d00000000, + 0xc0a2685400000000, 0x3b547b1300000000, 0x9b92711d00000000, + 0x6064625a00000000, 0x6d7f569300000000, 0x968945d400000000, + 0x1b885a2500000000, 0xe07e496200000000, 0xed657dab00000000, + 0x16936eec00000000, 0xb65564e200000000, 0x4da377a500000000, + 0x40b8436c00000000, 0xbb4e502b00000000, 0x0035567000000000, + 0xfbc3453700000000, 0xf6d871fe00000000, 0x0d2e62b900000000, + 0xade868b700000000, 0x561e7bf000000000, 0x5b054f3900000000, + 0xa0f35c7e00000000, 0x1be2f6c500000000, 0xe014e58200000000, + 0xed0fd14b00000000, 0x16f9c20c00000000, 0xb63fc80200000000, + 0x4dc9db4500000000, 0x40d2ef8c00000000, 0xbb24fccb00000000, + 0x005ffa9000000000, 0xfba9e9d700000000, 0xf6b2dd1e00000000, + 0x0d44ce5900000000, 0xad82c45700000000, 0x5674d71000000000, + 0x5b6fe3d900000000, 0xa099f09e00000000, 0x2d98ef6f00000000, + 0xd66efc2800000000, 0xdb75c8e100000000, 0x2083dba600000000, + 0x8045d1a800000000, 0x7bb3c2ef00000000, 0x76a8f62600000000, + 0x8d5ee56100000000, 0x3625e33a00000000, 0xcdd3f07d00000000, + 0xc0c8c4b400000000, 0x3b3ed7f300000000, 0x9bf8ddfd00000000, + 0x600eceba00000000, 0x6d15fa7300000000, 0x96e3e93400000000, + 0x3610b54a00000000, 0xcde6a60d00000000, 0xc0fd92c400000000, + 0x3b0b818300000000, 0x9bcd8b8d00000000, 0x603b98ca00000000, + 0x6d20ac0300000000, 0x96d6bf4400000000, 0x2dadb91f00000000, + 0xd65baa5800000000, 0xdb409e9100000000, 0x20b68dd600000000, + 0x807087d800000000, 0x7b86949f00000000, 0x769da05600000000, + 0x8d6bb31100000000, 0x006aace000000000, 0xfb9cbfa700000000, + 0xf6878b6e00000000, 0x0d71982900000000, 0xadb7922700000000, + 0x5641816000000000, 0x5b5ab5a900000000, 0xa0aca6ee00000000, + 0x1bd7a0b500000000, 0xe021b3f200000000, 0xed3a873b00000000, + 0x16cc947c00000000, 0xb60a9e7200000000, 0x4dfc8d3500000000, + 0x40e7b9fc00000000, 0xbb11aabb00000000, 0x77c29c5000000000, + 0x8c348f1700000000, 0x812fbbde00000000, 0x7ad9a89900000000, + 0xda1fa29700000000, 0x21e9b1d000000000, 0x2cf2851900000000, + 0xd704965e00000000, 0x6c7f900500000000, 0x9789834200000000, + 0x9a92b78b00000000, 0x6164a4cc00000000, 0xc1a2aec200000000, + 0x3a54bd8500000000, 0x374f894c00000000, 0xccb99a0b00000000, + 0x41b885fa00000000, 0xba4e96bd00000000, 0xb755a27400000000, + 0x4ca3b13300000000, 0xec65bb3d00000000, 0x1793a87a00000000, + 0x1a889cb300000000, 0xe17e8ff400000000, 0x5a0589af00000000, + 0xa1f39ae800000000, 0xace8ae2100000000, 0x571ebd6600000000, + 0xf7d8b76800000000, 0x0c2ea42f00000000, 0x013590e600000000, + 0xfac383a100000000, 0x5a30dfdf00000000, 0xa1c6cc9800000000, + 0xacddf85100000000, 0x572beb1600000000, 0xf7ede11800000000, + 0x0c1bf25f00000000, 0x0100c69600000000, 0xfaf6d5d100000000, + 0x418dd38a00000000, 0xba7bc0cd00000000, 0xb760f40400000000, + 0x4c96e74300000000, 0xec50ed4d00000000, 0x17a6fe0a00000000, + 0x1abdcac300000000, 0xe14bd98400000000, 0x6c4ac67500000000, + 0x97bcd53200000000, 0x9aa7e1fb00000000, 0x6151f2bc00000000, + 0xc197f8b200000000, 0x3a61ebf500000000, 0x377adf3c00000000, + 0xcc8ccc7b00000000, 0x77f7ca2000000000, 0x8c01d96700000000, + 0x811aedae00000000, 0x7aecfee900000000, 0xda2af4e700000000, + 0x21dce7a000000000, 0x2cc7d36900000000, 0xd731c02e00000000, + 0x6c206a9500000000, 0x97d679d200000000, 0x9acd4d1b00000000, + 0x613b5e5c00000000, 0xc1fd545200000000, 0x3a0b471500000000, + 0x371073dc00000000, 0xcce6609b00000000, 0x779d66c000000000, + 0x8c6b758700000000, 0x8170414e00000000, 0x7a86520900000000, + 0xda40580700000000, 0x21b64b4000000000, 0x2cad7f8900000000, + 0xd75b6cce00000000, 0x5a5a733f00000000, 0xa1ac607800000000, + 0xacb754b100000000, 0x574147f600000000, 0xf7874df800000000, + 0x0c715ebf00000000, 0x016a6a7600000000, 0xfa9c793100000000, + 0x41e77f6a00000000, 0xba116c2d00000000, 0xb70a58e400000000, + 0x4cfc4ba300000000, 0xec3a41ad00000000, 0x17cc52ea00000000, + 0x1ad7662300000000, 0xe121756400000000, 0x41d2291a00000000, + 0xba243a5d00000000, 0xb73f0e9400000000, 0x4cc91dd300000000, + 0xec0f17dd00000000, 0x17f9049a00000000, 0x1ae2305300000000, + 0xe114231400000000, 0x5a6f254f00000000, 0xa199360800000000, + 0xac8202c100000000, 0x5774118600000000, 0xf7b21b8800000000, + 0x0c4408cf00000000, 0x015f3c0600000000, 0xfaa92f4100000000, + 0x77a830b000000000, 0x8c5e23f700000000, 0x8145173e00000000, + 0x7ab3047900000000, 0xda750e7700000000, 0x21831d3000000000, + 0x2c9829f900000000, 0xd76e3abe00000000, 0x6c153ce500000000, + 0x97e32fa200000000, 0x9af81b6b00000000, 0x610e082c00000000, + 0xc1c8022200000000, 0x3a3e116500000000, 0x372525ac00000000, + 0xccd336eb00000000}, + {0x0000000000000000, 0x6238282a00000000, 0xc470505400000000, + 0xa648787e00000000, 0x88e1a0a800000000, 0xead9888200000000, + 0x4c91f0fc00000000, 0x2ea9d8d600000000, 0x51c5308a00000000, + 0x33fd18a000000000, 0x95b560de00000000, 0xf78d48f400000000, + 0xd924902200000000, 0xbb1cb80800000000, 0x1d54c07600000000, + 0x7f6ce85c00000000, 0xe38c10cf00000000, 0x81b438e500000000, + 0x27fc409b00000000, 0x45c468b100000000, 0x6b6db06700000000, + 0x0955984d00000000, 0xaf1de03300000000, 0xcd25c81900000000, + 0xb249204500000000, 0xd071086f00000000, 0x7639701100000000, + 0x1401583b00000000, 0x3aa880ed00000000, 0x5890a8c700000000, + 0xfed8d0b900000000, 0x9ce0f89300000000, 0x871f504500000000, + 0xe527786f00000000, 0x436f001100000000, 0x2157283b00000000, + 0x0ffef0ed00000000, 0x6dc6d8c700000000, 0xcb8ea0b900000000, + 0xa9b6889300000000, 0xd6da60cf00000000, 0xb4e248e500000000, + 0x12aa309b00000000, 0x709218b100000000, 0x5e3bc06700000000, + 0x3c03e84d00000000, 0x9a4b903300000000, 0xf873b81900000000, + 0x6493408a00000000, 0x06ab68a000000000, 0xa0e310de00000000, + 0xc2db38f400000000, 0xec72e02200000000, 0x8e4ac80800000000, + 0x2802b07600000000, 0x4a3a985c00000000, 0x3556700000000000, + 0x576e582a00000000, 0xf126205400000000, 0x931e087e00000000, + 0xbdb7d0a800000000, 0xdf8ff88200000000, 0x79c780fc00000000, + 0x1bffa8d600000000, 0x0e3fa08a00000000, 0x6c0788a000000000, + 0xca4ff0de00000000, 0xa877d8f400000000, 0x86de002200000000, + 0xe4e6280800000000, 0x42ae507600000000, 0x2096785c00000000, + 0x5ffa900000000000, 0x3dc2b82a00000000, 0x9b8ac05400000000, + 0xf9b2e87e00000000, 0xd71b30a800000000, 0xb523188200000000, + 0x136b60fc00000000, 0x715348d600000000, 0xedb3b04500000000, + 0x8f8b986f00000000, 0x29c3e01100000000, 0x4bfbc83b00000000, + 0x655210ed00000000, 0x076a38c700000000, 0xa12240b900000000, + 0xc31a689300000000, 0xbc7680cf00000000, 0xde4ea8e500000000, + 0x7806d09b00000000, 0x1a3ef8b100000000, 0x3497206700000000, + 0x56af084d00000000, 0xf0e7703300000000, 0x92df581900000000, + 0x8920f0cf00000000, 0xeb18d8e500000000, 0x4d50a09b00000000, + 0x2f6888b100000000, 0x01c1506700000000, 0x63f9784d00000000, + 0xc5b1003300000000, 0xa789281900000000, 0xd8e5c04500000000, + 0xbadde86f00000000, 0x1c95901100000000, 0x7eadb83b00000000, + 0x500460ed00000000, 0x323c48c700000000, 0x947430b900000000, + 0xf64c189300000000, 0x6aace00000000000, 0x0894c82a00000000, + 0xaedcb05400000000, 0xcce4987e00000000, 0xe24d40a800000000, + 0x8075688200000000, 0x263d10fc00000000, 0x440538d600000000, + 0x3b69d08a00000000, 0x5951f8a000000000, 0xff1980de00000000, + 0x9d21a8f400000000, 0xb388702200000000, 0xd1b0580800000000, + 0x77f8207600000000, 0x15c0085c00000000, 0x5d7831ce00000000, + 0x3f4019e400000000, 0x9908619a00000000, 0xfb3049b000000000, + 0xd599916600000000, 0xb7a1b94c00000000, 0x11e9c13200000000, + 0x73d1e91800000000, 0x0cbd014400000000, 0x6e85296e00000000, + 0xc8cd511000000000, 0xaaf5793a00000000, 0x845ca1ec00000000, + 0xe66489c600000000, 0x402cf1b800000000, 0x2214d99200000000, + 0xbef4210100000000, 0xdccc092b00000000, 0x7a84715500000000, + 0x18bc597f00000000, 0x361581a900000000, 0x542da98300000000, + 0xf265d1fd00000000, 0x905df9d700000000, 0xef31118b00000000, + 0x8d0939a100000000, 0x2b4141df00000000, 0x497969f500000000, + 0x67d0b12300000000, 0x05e8990900000000, 0xa3a0e17700000000, + 0xc198c95d00000000, 0xda67618b00000000, 0xb85f49a100000000, + 0x1e1731df00000000, 0x7c2f19f500000000, 0x5286c12300000000, + 0x30bee90900000000, 0x96f6917700000000, 0xf4ceb95d00000000, + 0x8ba2510100000000, 0xe99a792b00000000, 0x4fd2015500000000, + 0x2dea297f00000000, 0x0343f1a900000000, 0x617bd98300000000, + 0xc733a1fd00000000, 0xa50b89d700000000, 0x39eb714400000000, + 0x5bd3596e00000000, 0xfd9b211000000000, 0x9fa3093a00000000, + 0xb10ad1ec00000000, 0xd332f9c600000000, 0x757a81b800000000, + 0x1742a99200000000, 0x682e41ce00000000, 0x0a1669e400000000, + 0xac5e119a00000000, 0xce6639b000000000, 0xe0cfe16600000000, + 0x82f7c94c00000000, 0x24bfb13200000000, 0x4687991800000000, + 0x5347914400000000, 0x317fb96e00000000, 0x9737c11000000000, + 0xf50fe93a00000000, 0xdba631ec00000000, 0xb99e19c600000000, + 0x1fd661b800000000, 0x7dee499200000000, 0x0282a1ce00000000, + 0x60ba89e400000000, 0xc6f2f19a00000000, 0xa4cad9b000000000, + 0x8a63016600000000, 0xe85b294c00000000, 0x4e13513200000000, + 0x2c2b791800000000, 0xb0cb818b00000000, 0xd2f3a9a100000000, + 0x74bbd1df00000000, 0x1683f9f500000000, 0x382a212300000000, + 0x5a12090900000000, 0xfc5a717700000000, 0x9e62595d00000000, + 0xe10eb10100000000, 0x8336992b00000000, 0x257ee15500000000, + 0x4746c97f00000000, 0x69ef11a900000000, 0x0bd7398300000000, + 0xad9f41fd00000000, 0xcfa769d700000000, 0xd458c10100000000, + 0xb660e92b00000000, 0x1028915500000000, 0x7210b97f00000000, + 0x5cb961a900000000, 0x3e81498300000000, 0x98c931fd00000000, + 0xfaf119d700000000, 0x859df18b00000000, 0xe7a5d9a100000000, + 0x41eda1df00000000, 0x23d589f500000000, 0x0d7c512300000000, + 0x6f44790900000000, 0xc90c017700000000, 0xab34295d00000000, + 0x37d4d1ce00000000, 0x55ecf9e400000000, 0xf3a4819a00000000, + 0x919ca9b000000000, 0xbf35716600000000, 0xdd0d594c00000000, + 0x7b45213200000000, 0x197d091800000000, 0x6611e14400000000, + 0x0429c96e00000000, 0xa261b11000000000, 0xc059993a00000000, + 0xeef041ec00000000, 0x8cc869c600000000, 0x2a8011b800000000, + 0x48b8399200000000}, + {0x0000000000000000, 0x4c2896a300000000, 0xd9565d9c00000000, + 0x957ecb3f00000000, 0xf3abcbe300000000, 0xbf835d4000000000, + 0x2afd967f00000000, 0x66d500dc00000000, 0xa751e61c00000000, + 0xeb7970bf00000000, 0x7e07bb8000000000, 0x322f2d2300000000, + 0x54fa2dff00000000, 0x18d2bb5c00000000, 0x8dac706300000000, + 0xc184e6c000000000, 0x4ea3cc3900000000, 0x028b5a9a00000000, + 0x97f591a500000000, 0xdbdd070600000000, 0xbd0807da00000000, + 0xf120917900000000, 0x645e5a4600000000, 0x2876cce500000000, + 0xe9f22a2500000000, 0xa5dabc8600000000, 0x30a477b900000000, + 0x7c8ce11a00000000, 0x1a59e1c600000000, 0x5671776500000000, + 0xc30fbc5a00000000, 0x8f272af900000000, 0x9c46997300000000, + 0xd06e0fd000000000, 0x4510c4ef00000000, 0x0938524c00000000, + 0x6fed529000000000, 0x23c5c43300000000, 0xb6bb0f0c00000000, + 0xfa9399af00000000, 0x3b177f6f00000000, 0x773fe9cc00000000, + 0xe24122f300000000, 0xae69b45000000000, 0xc8bcb48c00000000, + 0x8494222f00000000, 0x11eae91000000000, 0x5dc27fb300000000, + 0xd2e5554a00000000, 0x9ecdc3e900000000, 0x0bb308d600000000, + 0x479b9e7500000000, 0x214e9ea900000000, 0x6d66080a00000000, + 0xf818c33500000000, 0xb430559600000000, 0x75b4b35600000000, + 0x399c25f500000000, 0xace2eeca00000000, 0xe0ca786900000000, + 0x861f78b500000000, 0xca37ee1600000000, 0x5f49252900000000, + 0x1361b38a00000000, 0x388d32e700000000, 0x74a5a44400000000, + 0xe1db6f7b00000000, 0xadf3f9d800000000, 0xcb26f90400000000, + 0x870e6fa700000000, 0x1270a49800000000, 0x5e58323b00000000, + 0x9fdcd4fb00000000, 0xd3f4425800000000, 0x468a896700000000, + 0x0aa21fc400000000, 0x6c771f1800000000, 0x205f89bb00000000, + 0xb521428400000000, 0xf909d42700000000, 0x762efede00000000, + 0x3a06687d00000000, 0xaf78a34200000000, 0xe35035e100000000, + 0x8585353d00000000, 0xc9ada39e00000000, 0x5cd368a100000000, + 0x10fbfe0200000000, 0xd17f18c200000000, 0x9d578e6100000000, + 0x0829455e00000000, 0x4401d3fd00000000, 0x22d4d32100000000, + 0x6efc458200000000, 0xfb828ebd00000000, 0xb7aa181e00000000, + 0xa4cbab9400000000, 0xe8e33d3700000000, 0x7d9df60800000000, + 0x31b560ab00000000, 0x5760607700000000, 0x1b48f6d400000000, + 0x8e363deb00000000, 0xc21eab4800000000, 0x039a4d8800000000, + 0x4fb2db2b00000000, 0xdacc101400000000, 0x96e486b700000000, + 0xf031866b00000000, 0xbc1910c800000000, 0x2967dbf700000000, + 0x654f4d5400000000, 0xea6867ad00000000, 0xa640f10e00000000, + 0x333e3a3100000000, 0x7f16ac9200000000, 0x19c3ac4e00000000, + 0x55eb3aed00000000, 0xc095f1d200000000, 0x8cbd677100000000, + 0x4d3981b100000000, 0x0111171200000000, 0x946fdc2d00000000, + 0xd8474a8e00000000, 0xbe924a5200000000, 0xf2badcf100000000, + 0x67c417ce00000000, 0x2bec816d00000000, 0x311c141500000000, + 0x7d3482b600000000, 0xe84a498900000000, 0xa462df2a00000000, + 0xc2b7dff600000000, 0x8e9f495500000000, 0x1be1826a00000000, + 0x57c914c900000000, 0x964df20900000000, 0xda6564aa00000000, + 0x4f1baf9500000000, 0x0333393600000000, 0x65e639ea00000000, + 0x29ceaf4900000000, 0xbcb0647600000000, 0xf098f2d500000000, + 0x7fbfd82c00000000, 0x33974e8f00000000, 0xa6e985b000000000, + 0xeac1131300000000, 0x8c1413cf00000000, 0xc03c856c00000000, + 0x55424e5300000000, 0x196ad8f000000000, 0xd8ee3e3000000000, + 0x94c6a89300000000, 0x01b863ac00000000, 0x4d90f50f00000000, + 0x2b45f5d300000000, 0x676d637000000000, 0xf213a84f00000000, + 0xbe3b3eec00000000, 0xad5a8d6600000000, 0xe1721bc500000000, + 0x740cd0fa00000000, 0x3824465900000000, 0x5ef1468500000000, + 0x12d9d02600000000, 0x87a71b1900000000, 0xcb8f8dba00000000, + 0x0a0b6b7a00000000, 0x4623fdd900000000, 0xd35d36e600000000, + 0x9f75a04500000000, 0xf9a0a09900000000, 0xb588363a00000000, + 0x20f6fd0500000000, 0x6cde6ba600000000, 0xe3f9415f00000000, + 0xafd1d7fc00000000, 0x3aaf1cc300000000, 0x76878a6000000000, + 0x10528abc00000000, 0x5c7a1c1f00000000, 0xc904d72000000000, + 0x852c418300000000, 0x44a8a74300000000, 0x088031e000000000, + 0x9dfefadf00000000, 0xd1d66c7c00000000, 0xb7036ca000000000, + 0xfb2bfa0300000000, 0x6e55313c00000000, 0x227da79f00000000, + 0x099126f200000000, 0x45b9b05100000000, 0xd0c77b6e00000000, + 0x9cefedcd00000000, 0xfa3aed1100000000, 0xb6127bb200000000, + 0x236cb08d00000000, 0x6f44262e00000000, 0xaec0c0ee00000000, + 0xe2e8564d00000000, 0x77969d7200000000, 0x3bbe0bd100000000, + 0x5d6b0b0d00000000, 0x11439dae00000000, 0x843d569100000000, + 0xc815c03200000000, 0x4732eacb00000000, 0x0b1a7c6800000000, + 0x9e64b75700000000, 0xd24c21f400000000, 0xb499212800000000, + 0xf8b1b78b00000000, 0x6dcf7cb400000000, 0x21e7ea1700000000, + 0xe0630cd700000000, 0xac4b9a7400000000, 0x3935514b00000000, + 0x751dc7e800000000, 0x13c8c73400000000, 0x5fe0519700000000, + 0xca9e9aa800000000, 0x86b60c0b00000000, 0x95d7bf8100000000, + 0xd9ff292200000000, 0x4c81e21d00000000, 0x00a974be00000000, + 0x667c746200000000, 0x2a54e2c100000000, 0xbf2a29fe00000000, + 0xf302bf5d00000000, 0x3286599d00000000, 0x7eaecf3e00000000, + 0xebd0040100000000, 0xa7f892a200000000, 0xc12d927e00000000, + 0x8d0504dd00000000, 0x187bcfe200000000, 0x5453594100000000, + 0xdb7473b800000000, 0x975ce51b00000000, 0x02222e2400000000, + 0x4e0ab88700000000, 0x28dfb85b00000000, 0x64f72ef800000000, + 0xf189e5c700000000, 0xbda1736400000000, 0x7c2595a400000000, + 0x300d030700000000, 0xa573c83800000000, 0xe95b5e9b00000000, + 0x8f8e5e4700000000, 0xc3a6c8e400000000, 0x56d803db00000000, + 0x1af0957800000000}, + {0x0000000000000000, 0x939bc97f00000000, 0x263793ff00000000, + 0xb5ac5a8000000000, 0x0d68572400000000, 0x9ef39e5b00000000, + 0x2b5fc4db00000000, 0xb8c40da400000000, 0x1ad0ae4800000000, + 0x894b673700000000, 0x3ce73db700000000, 0xaf7cf4c800000000, + 0x17b8f96c00000000, 0x8423301300000000, 0x318f6a9300000000, + 0xa214a3ec00000000, 0x34a05d9100000000, 0xa73b94ee00000000, + 0x1297ce6e00000000, 0x810c071100000000, 0x39c80ab500000000, + 0xaa53c3ca00000000, 0x1fff994a00000000, 0x8c64503500000000, + 0x2e70f3d900000000, 0xbdeb3aa600000000, 0x0847602600000000, + 0x9bdca95900000000, 0x2318a4fd00000000, 0xb0836d8200000000, + 0x052f370200000000, 0x96b4fe7d00000000, 0x2946caf900000000, + 0xbadd038600000000, 0x0f71590600000000, 0x9cea907900000000, + 0x242e9ddd00000000, 0xb7b554a200000000, 0x02190e2200000000, + 0x9182c75d00000000, 0x339664b100000000, 0xa00dadce00000000, + 0x15a1f74e00000000, 0x863a3e3100000000, 0x3efe339500000000, + 0xad65faea00000000, 0x18c9a06a00000000, 0x8b52691500000000, + 0x1de6976800000000, 0x8e7d5e1700000000, 0x3bd1049700000000, + 0xa84acde800000000, 0x108ec04c00000000, 0x8315093300000000, + 0x36b953b300000000, 0xa5229acc00000000, 0x0736392000000000, + 0x94adf05f00000000, 0x2101aadf00000000, 0xb29a63a000000000, + 0x0a5e6e0400000000, 0x99c5a77b00000000, 0x2c69fdfb00000000, + 0xbff2348400000000, 0x138ae52800000000, 0x80112c5700000000, + 0x35bd76d700000000, 0xa626bfa800000000, 0x1ee2b20c00000000, + 0x8d797b7300000000, 0x38d521f300000000, 0xab4ee88c00000000, + 0x095a4b6000000000, 0x9ac1821f00000000, 0x2f6dd89f00000000, + 0xbcf611e000000000, 0x04321c4400000000, 0x97a9d53b00000000, + 0x22058fbb00000000, 0xb19e46c400000000, 0x272ab8b900000000, + 0xb4b171c600000000, 0x011d2b4600000000, 0x9286e23900000000, + 0x2a42ef9d00000000, 0xb9d926e200000000, 0x0c757c6200000000, + 0x9feeb51d00000000, 0x3dfa16f100000000, 0xae61df8e00000000, + 0x1bcd850e00000000, 0x88564c7100000000, 0x309241d500000000, + 0xa30988aa00000000, 0x16a5d22a00000000, 0x853e1b5500000000, + 0x3acc2fd100000000, 0xa957e6ae00000000, 0x1cfbbc2e00000000, + 0x8f60755100000000, 0x37a478f500000000, 0xa43fb18a00000000, + 0x1193eb0a00000000, 0x8208227500000000, 0x201c819900000000, + 0xb38748e600000000, 0x062b126600000000, 0x95b0db1900000000, + 0x2d74d6bd00000000, 0xbeef1fc200000000, 0x0b43454200000000, + 0x98d88c3d00000000, 0x0e6c724000000000, 0x9df7bb3f00000000, + 0x285be1bf00000000, 0xbbc028c000000000, 0x0304256400000000, + 0x909fec1b00000000, 0x2533b69b00000000, 0xb6a87fe400000000, + 0x14bcdc0800000000, 0x8727157700000000, 0x328b4ff700000000, + 0xa110868800000000, 0x19d48b2c00000000, 0x8a4f425300000000, + 0x3fe318d300000000, 0xac78d1ac00000000, 0x2614cb5100000000, + 0xb58f022e00000000, 0x002358ae00000000, 0x93b891d100000000, + 0x2b7c9c7500000000, 0xb8e7550a00000000, 0x0d4b0f8a00000000, + 0x9ed0c6f500000000, 0x3cc4651900000000, 0xaf5fac6600000000, + 0x1af3f6e600000000, 0x89683f9900000000, 0x31ac323d00000000, + 0xa237fb4200000000, 0x179ba1c200000000, 0x840068bd00000000, + 0x12b496c000000000, 0x812f5fbf00000000, 0x3483053f00000000, + 0xa718cc4000000000, 0x1fdcc1e400000000, 0x8c47089b00000000, + 0x39eb521b00000000, 0xaa709b6400000000, 0x0864388800000000, + 0x9bfff1f700000000, 0x2e53ab7700000000, 0xbdc8620800000000, + 0x050c6fac00000000, 0x9697a6d300000000, 0x233bfc5300000000, + 0xb0a0352c00000000, 0x0f5201a800000000, 0x9cc9c8d700000000, + 0x2965925700000000, 0xbafe5b2800000000, 0x023a568c00000000, + 0x91a19ff300000000, 0x240dc57300000000, 0xb7960c0c00000000, + 0x1582afe000000000, 0x8619669f00000000, 0x33b53c1f00000000, + 0xa02ef56000000000, 0x18eaf8c400000000, 0x8b7131bb00000000, + 0x3edd6b3b00000000, 0xad46a24400000000, 0x3bf25c3900000000, + 0xa869954600000000, 0x1dc5cfc600000000, 0x8e5e06b900000000, + 0x369a0b1d00000000, 0xa501c26200000000, 0x10ad98e200000000, + 0x8336519d00000000, 0x2122f27100000000, 0xb2b93b0e00000000, + 0x0715618e00000000, 0x948ea8f100000000, 0x2c4aa55500000000, + 0xbfd16c2a00000000, 0x0a7d36aa00000000, 0x99e6ffd500000000, + 0x359e2e7900000000, 0xa605e70600000000, 0x13a9bd8600000000, + 0x803274f900000000, 0x38f6795d00000000, 0xab6db02200000000, + 0x1ec1eaa200000000, 0x8d5a23dd00000000, 0x2f4e803100000000, + 0xbcd5494e00000000, 0x097913ce00000000, 0x9ae2dab100000000, + 0x2226d71500000000, 0xb1bd1e6a00000000, 0x041144ea00000000, + 0x978a8d9500000000, 0x013e73e800000000, 0x92a5ba9700000000, + 0x2709e01700000000, 0xb492296800000000, 0x0c5624cc00000000, + 0x9fcdedb300000000, 0x2a61b73300000000, 0xb9fa7e4c00000000, + 0x1beedda000000000, 0x887514df00000000, 0x3dd94e5f00000000, + 0xae42872000000000, 0x16868a8400000000, 0x851d43fb00000000, + 0x30b1197b00000000, 0xa32ad00400000000, 0x1cd8e48000000000, + 0x8f432dff00000000, 0x3aef777f00000000, 0xa974be0000000000, + 0x11b0b3a400000000, 0x822b7adb00000000, 0x3787205b00000000, + 0xa41ce92400000000, 0x06084ac800000000, 0x959383b700000000, + 0x203fd93700000000, 0xb3a4104800000000, 0x0b601dec00000000, + 0x98fbd49300000000, 0x2d578e1300000000, 0xbecc476c00000000, + 0x2878b91100000000, 0xbbe3706e00000000, 0x0e4f2aee00000000, + 0x9dd4e39100000000, 0x2510ee3500000000, 0xb68b274a00000000, + 0x03277dca00000000, 0x90bcb4b500000000, 0x32a8175900000000, + 0xa133de2600000000, 0x149f84a600000000, 0x87044dd900000000, + 0x3fc0407d00000000, 0xac5b890200000000, 0x19f7d38200000000, + 0x8a6c1afd00000000}, + {0x0000000000000000, 0x650b796900000000, 0xca16f2d200000000, + 0xaf1d8bbb00000000, 0xd52b957e00000000, 0xb020ec1700000000, + 0x1f3d67ac00000000, 0x7a361ec500000000, 0xaa572afd00000000, + 0xcf5c539400000000, 0x6041d82f00000000, 0x054aa14600000000, + 0x7f7cbf8300000000, 0x1a77c6ea00000000, 0xb56a4d5100000000, + 0xd061343800000000, 0x15a9252100000000, 0x70a25c4800000000, + 0xdfbfd7f300000000, 0xbab4ae9a00000000, 0xc082b05f00000000, + 0xa589c93600000000, 0x0a94428d00000000, 0x6f9f3be400000000, + 0xbffe0fdc00000000, 0xdaf576b500000000, 0x75e8fd0e00000000, + 0x10e3846700000000, 0x6ad59aa200000000, 0x0fdee3cb00000000, + 0xa0c3687000000000, 0xc5c8111900000000, 0x2a524b4200000000, + 0x4f59322b00000000, 0xe044b99000000000, 0x854fc0f900000000, + 0xff79de3c00000000, 0x9a72a75500000000, 0x356f2cee00000000, + 0x5064558700000000, 0x800561bf00000000, 0xe50e18d600000000, + 0x4a13936d00000000, 0x2f18ea0400000000, 0x552ef4c100000000, + 0x30258da800000000, 0x9f38061300000000, 0xfa337f7a00000000, + 0x3ffb6e6300000000, 0x5af0170a00000000, 0xf5ed9cb100000000, + 0x90e6e5d800000000, 0xead0fb1d00000000, 0x8fdb827400000000, + 0x20c609cf00000000, 0x45cd70a600000000, 0x95ac449e00000000, + 0xf0a73df700000000, 0x5fbab64c00000000, 0x3ab1cf2500000000, + 0x4087d1e000000000, 0x258ca88900000000, 0x8a91233200000000, + 0xef9a5a5b00000000, 0x54a4968400000000, 0x31afefed00000000, + 0x9eb2645600000000, 0xfbb91d3f00000000, 0x818f03fa00000000, + 0xe4847a9300000000, 0x4b99f12800000000, 0x2e92884100000000, + 0xfef3bc7900000000, 0x9bf8c51000000000, 0x34e54eab00000000, + 0x51ee37c200000000, 0x2bd8290700000000, 0x4ed3506e00000000, + 0xe1cedbd500000000, 0x84c5a2bc00000000, 0x410db3a500000000, + 0x2406cacc00000000, 0x8b1b417700000000, 0xee10381e00000000, + 0x942626db00000000, 0xf12d5fb200000000, 0x5e30d40900000000, + 0x3b3bad6000000000, 0xeb5a995800000000, 0x8e51e03100000000, + 0x214c6b8a00000000, 0x444712e300000000, 0x3e710c2600000000, + 0x5b7a754f00000000, 0xf467fef400000000, 0x916c879d00000000, + 0x7ef6ddc600000000, 0x1bfda4af00000000, 0xb4e02f1400000000, + 0xd1eb567d00000000, 0xabdd48b800000000, 0xced631d100000000, + 0x61cbba6a00000000, 0x04c0c30300000000, 0xd4a1f73b00000000, + 0xb1aa8e5200000000, 0x1eb705e900000000, 0x7bbc7c8000000000, + 0x018a624500000000, 0x64811b2c00000000, 0xcb9c909700000000, + 0xae97e9fe00000000, 0x6b5ff8e700000000, 0x0e54818e00000000, + 0xa1490a3500000000, 0xc442735c00000000, 0xbe746d9900000000, + 0xdb7f14f000000000, 0x74629f4b00000000, 0x1169e62200000000, + 0xc108d21a00000000, 0xa403ab7300000000, 0x0b1e20c800000000, + 0x6e1559a100000000, 0x1423476400000000, 0x71283e0d00000000, + 0xde35b5b600000000, 0xbb3eccdf00000000, 0xe94e5cd200000000, + 0x8c4525bb00000000, 0x2358ae0000000000, 0x4653d76900000000, + 0x3c65c9ac00000000, 0x596eb0c500000000, 0xf6733b7e00000000, + 0x9378421700000000, 0x4319762f00000000, 0x26120f4600000000, + 0x890f84fd00000000, 0xec04fd9400000000, 0x9632e35100000000, + 0xf3399a3800000000, 0x5c24118300000000, 0x392f68ea00000000, + 0xfce779f300000000, 0x99ec009a00000000, 0x36f18b2100000000, + 0x53faf24800000000, 0x29ccec8d00000000, 0x4cc795e400000000, + 0xe3da1e5f00000000, 0x86d1673600000000, 0x56b0530e00000000, + 0x33bb2a6700000000, 0x9ca6a1dc00000000, 0xf9add8b500000000, + 0x839bc67000000000, 0xe690bf1900000000, 0x498d34a200000000, + 0x2c864dcb00000000, 0xc31c179000000000, 0xa6176ef900000000, + 0x090ae54200000000, 0x6c019c2b00000000, 0x163782ee00000000, + 0x733cfb8700000000, 0xdc21703c00000000, 0xb92a095500000000, + 0x694b3d6d00000000, 0x0c40440400000000, 0xa35dcfbf00000000, + 0xc656b6d600000000, 0xbc60a81300000000, 0xd96bd17a00000000, + 0x76765ac100000000, 0x137d23a800000000, 0xd6b532b100000000, + 0xb3be4bd800000000, 0x1ca3c06300000000, 0x79a8b90a00000000, + 0x039ea7cf00000000, 0x6695dea600000000, 0xc988551d00000000, + 0xac832c7400000000, 0x7ce2184c00000000, 0x19e9612500000000, + 0xb6f4ea9e00000000, 0xd3ff93f700000000, 0xa9c98d3200000000, + 0xccc2f45b00000000, 0x63df7fe000000000, 0x06d4068900000000, + 0xbdeaca5600000000, 0xd8e1b33f00000000, 0x77fc388400000000, + 0x12f741ed00000000, 0x68c15f2800000000, 0x0dca264100000000, + 0xa2d7adfa00000000, 0xc7dcd49300000000, 0x17bde0ab00000000, + 0x72b699c200000000, 0xddab127900000000, 0xb8a06b1000000000, + 0xc29675d500000000, 0xa79d0cbc00000000, 0x0880870700000000, + 0x6d8bfe6e00000000, 0xa843ef7700000000, 0xcd48961e00000000, + 0x62551da500000000, 0x075e64cc00000000, 0x7d687a0900000000, + 0x1863036000000000, 0xb77e88db00000000, 0xd275f1b200000000, + 0x0214c58a00000000, 0x671fbce300000000, 0xc802375800000000, + 0xad094e3100000000, 0xd73f50f400000000, 0xb234299d00000000, + 0x1d29a22600000000, 0x7822db4f00000000, 0x97b8811400000000, + 0xf2b3f87d00000000, 0x5dae73c600000000, 0x38a50aaf00000000, + 0x4293146a00000000, 0x27986d0300000000, 0x8885e6b800000000, + 0xed8e9fd100000000, 0x3defabe900000000, 0x58e4d28000000000, + 0xf7f9593b00000000, 0x92f2205200000000, 0xe8c43e9700000000, + 0x8dcf47fe00000000, 0x22d2cc4500000000, 0x47d9b52c00000000, + 0x8211a43500000000, 0xe71add5c00000000, 0x480756e700000000, + 0x2d0c2f8e00000000, 0x573a314b00000000, 0x3231482200000000, + 0x9d2cc39900000000, 0xf827baf000000000, 0x28468ec800000000, + 0x4d4df7a100000000, 0xe2507c1a00000000, 0x875b057300000000, + 0xfd6d1bb600000000, 0x986662df00000000, 0x377be96400000000, + 0x5270900d00000000}, + {0x0000000000000000, 0xdcecb13d00000000, 0xb8d9637b00000000, + 0x6435d24600000000, 0x70b3c7f600000000, 0xac5f76cb00000000, + 0xc86aa48d00000000, 0x148615b000000000, 0xa160fe3600000000, + 0x7d8c4f0b00000000, 0x19b99d4d00000000, 0xc5552c7000000000, + 0xd1d339c000000000, 0x0d3f88fd00000000, 0x690a5abb00000000, + 0xb5e6eb8600000000, 0x42c1fc6d00000000, 0x9e2d4d5000000000, + 0xfa189f1600000000, 0x26f42e2b00000000, 0x32723b9b00000000, + 0xee9e8aa600000000, 0x8aab58e000000000, 0x5647e9dd00000000, + 0xe3a1025b00000000, 0x3f4db36600000000, 0x5b78612000000000, + 0x8794d01d00000000, 0x9312c5ad00000000, 0x4ffe749000000000, + 0x2bcba6d600000000, 0xf72717eb00000000, 0x8482f9db00000000, + 0x586e48e600000000, 0x3c5b9aa000000000, 0xe0b72b9d00000000, + 0xf4313e2d00000000, 0x28dd8f1000000000, 0x4ce85d5600000000, + 0x9004ec6b00000000, 0x25e207ed00000000, 0xf90eb6d000000000, + 0x9d3b649600000000, 0x41d7d5ab00000000, 0x5551c01b00000000, + 0x89bd712600000000, 0xed88a36000000000, 0x3164125d00000000, + 0xc64305b600000000, 0x1aafb48b00000000, 0x7e9a66cd00000000, + 0xa276d7f000000000, 0xb6f0c24000000000, 0x6a1c737d00000000, + 0x0e29a13b00000000, 0xd2c5100600000000, 0x6723fb8000000000, + 0xbbcf4abd00000000, 0xdffa98fb00000000, 0x031629c600000000, + 0x17903c7600000000, 0xcb7c8d4b00000000, 0xaf495f0d00000000, + 0x73a5ee3000000000, 0x4903826c00000000, 0x95ef335100000000, + 0xf1dae11700000000, 0x2d36502a00000000, 0x39b0459a00000000, + 0xe55cf4a700000000, 0x816926e100000000, 0x5d8597dc00000000, + 0xe8637c5a00000000, 0x348fcd6700000000, 0x50ba1f2100000000, + 0x8c56ae1c00000000, 0x98d0bbac00000000, 0x443c0a9100000000, + 0x2009d8d700000000, 0xfce569ea00000000, 0x0bc27e0100000000, + 0xd72ecf3c00000000, 0xb31b1d7a00000000, 0x6ff7ac4700000000, + 0x7b71b9f700000000, 0xa79d08ca00000000, 0xc3a8da8c00000000, + 0x1f446bb100000000, 0xaaa2803700000000, 0x764e310a00000000, + 0x127be34c00000000, 0xce97527100000000, 0xda1147c100000000, + 0x06fdf6fc00000000, 0x62c824ba00000000, 0xbe24958700000000, + 0xcd817bb700000000, 0x116dca8a00000000, 0x755818cc00000000, + 0xa9b4a9f100000000, 0xbd32bc4100000000, 0x61de0d7c00000000, + 0x05ebdf3a00000000, 0xd9076e0700000000, 0x6ce1858100000000, + 0xb00d34bc00000000, 0xd438e6fa00000000, 0x08d457c700000000, + 0x1c52427700000000, 0xc0bef34a00000000, 0xa48b210c00000000, + 0x7867903100000000, 0x8f4087da00000000, 0x53ac36e700000000, + 0x3799e4a100000000, 0xeb75559c00000000, 0xfff3402c00000000, + 0x231ff11100000000, 0x472a235700000000, 0x9bc6926a00000000, + 0x2e2079ec00000000, 0xf2ccc8d100000000, 0x96f91a9700000000, + 0x4a15abaa00000000, 0x5e93be1a00000000, 0x827f0f2700000000, + 0xe64add6100000000, 0x3aa66c5c00000000, 0x920604d900000000, + 0x4eeab5e400000000, 0x2adf67a200000000, 0xf633d69f00000000, + 0xe2b5c32f00000000, 0x3e59721200000000, 0x5a6ca05400000000, + 0x8680116900000000, 0x3366faef00000000, 0xef8a4bd200000000, + 0x8bbf999400000000, 0x575328a900000000, 0x43d53d1900000000, + 0x9f398c2400000000, 0xfb0c5e6200000000, 0x27e0ef5f00000000, + 0xd0c7f8b400000000, 0x0c2b498900000000, 0x681e9bcf00000000, + 0xb4f22af200000000, 0xa0743f4200000000, 0x7c988e7f00000000, + 0x18ad5c3900000000, 0xc441ed0400000000, 0x71a7068200000000, + 0xad4bb7bf00000000, 0xc97e65f900000000, 0x1592d4c400000000, + 0x0114c17400000000, 0xddf8704900000000, 0xb9cda20f00000000, + 0x6521133200000000, 0x1684fd0200000000, 0xca684c3f00000000, + 0xae5d9e7900000000, 0x72b12f4400000000, 0x66373af400000000, + 0xbadb8bc900000000, 0xdeee598f00000000, 0x0202e8b200000000, + 0xb7e4033400000000, 0x6b08b20900000000, 0x0f3d604f00000000, + 0xd3d1d17200000000, 0xc757c4c200000000, 0x1bbb75ff00000000, + 0x7f8ea7b900000000, 0xa362168400000000, 0x5445016f00000000, + 0x88a9b05200000000, 0xec9c621400000000, 0x3070d32900000000, + 0x24f6c69900000000, 0xf81a77a400000000, 0x9c2fa5e200000000, + 0x40c314df00000000, 0xf525ff5900000000, 0x29c94e6400000000, + 0x4dfc9c2200000000, 0x91102d1f00000000, 0x859638af00000000, + 0x597a899200000000, 0x3d4f5bd400000000, 0xe1a3eae900000000, + 0xdb0586b500000000, 0x07e9378800000000, 0x63dce5ce00000000, + 0xbf3054f300000000, 0xabb6414300000000, 0x775af07e00000000, + 0x136f223800000000, 0xcf83930500000000, 0x7a65788300000000, + 0xa689c9be00000000, 0xc2bc1bf800000000, 0x1e50aac500000000, + 0x0ad6bf7500000000, 0xd63a0e4800000000, 0xb20fdc0e00000000, + 0x6ee36d3300000000, 0x99c47ad800000000, 0x4528cbe500000000, + 0x211d19a300000000, 0xfdf1a89e00000000, 0xe977bd2e00000000, + 0x359b0c1300000000, 0x51aede5500000000, 0x8d426f6800000000, + 0x38a484ee00000000, 0xe44835d300000000, 0x807de79500000000, + 0x5c9156a800000000, 0x4817431800000000, 0x94fbf22500000000, + 0xf0ce206300000000, 0x2c22915e00000000, 0x5f877f6e00000000, + 0x836bce5300000000, 0xe75e1c1500000000, 0x3bb2ad2800000000, + 0x2f34b89800000000, 0xf3d809a500000000, 0x97eddbe300000000, + 0x4b016ade00000000, 0xfee7815800000000, 0x220b306500000000, + 0x463ee22300000000, 0x9ad2531e00000000, 0x8e5446ae00000000, + 0x52b8f79300000000, 0x368d25d500000000, 0xea6194e800000000, + 0x1d46830300000000, 0xc1aa323e00000000, 0xa59fe07800000000, + 0x7973514500000000, 0x6df544f500000000, 0xb119f5c800000000, + 0xd52c278e00000000, 0x09c096b300000000, 0xbc267d3500000000, + 0x60cacc0800000000, 0x04ff1e4e00000000, 0xd813af7300000000, + 0xcc95bac300000000, 0x10790bfe00000000, 0x744cd9b800000000, + 0xa8a0688500000000}}; + +#else /* W == 4 */ + +local const z_crc_t FAR crc_braid_table[][256] = { + {0x00000000, 0x81256527, 0xd93bcc0f, 0x581ea928, 0x69069e5f, + 0xe823fb78, 0xb03d5250, 0x31183777, 0xd20d3cbe, 0x53285999, + 0x0b36f0b1, 0x8a139596, 0xbb0ba2e1, 0x3a2ec7c6, 0x62306eee, + 0xe3150bc9, 0x7f6b7f3d, 0xfe4e1a1a, 0xa650b332, 0x2775d615, + 0x166de162, 0x97488445, 0xcf562d6d, 0x4e73484a, 0xad664383, + 0x2c4326a4, 0x745d8f8c, 0xf578eaab, 0xc460dddc, 0x4545b8fb, + 0x1d5b11d3, 0x9c7e74f4, 0xfed6fe7a, 0x7ff39b5d, 0x27ed3275, + 0xa6c85752, 0x97d06025, 0x16f50502, 0x4eebac2a, 0xcfcec90d, + 0x2cdbc2c4, 0xadfea7e3, 0xf5e00ecb, 0x74c56bec, 0x45dd5c9b, + 0xc4f839bc, 0x9ce69094, 0x1dc3f5b3, 0x81bd8147, 0x0098e460, + 0x58864d48, 0xd9a3286f, 0xe8bb1f18, 0x699e7a3f, 0x3180d317, + 0xb0a5b630, 0x53b0bdf9, 0xd295d8de, 0x8a8b71f6, 0x0bae14d1, + 0x3ab623a6, 0xbb934681, 0xe38defa9, 0x62a88a8e, 0x26dcfab5, + 0xa7f99f92, 0xffe736ba, 0x7ec2539d, 0x4fda64ea, 0xceff01cd, + 0x96e1a8e5, 0x17c4cdc2, 0xf4d1c60b, 0x75f4a32c, 0x2dea0a04, + 0xaccf6f23, 0x9dd75854, 0x1cf23d73, 0x44ec945b, 0xc5c9f17c, + 0x59b78588, 0xd892e0af, 0x808c4987, 0x01a92ca0, 0x30b11bd7, + 0xb1947ef0, 0xe98ad7d8, 0x68afb2ff, 0x8bbab936, 0x0a9fdc11, + 0x52817539, 0xd3a4101e, 0xe2bc2769, 0x6399424e, 0x3b87eb66, + 0xbaa28e41, 0xd80a04cf, 0x592f61e8, 0x0131c8c0, 0x8014ade7, + 0xb10c9a90, 0x3029ffb7, 0x6837569f, 0xe91233b8, 0x0a073871, + 0x8b225d56, 0xd33cf47e, 0x52199159, 0x6301a62e, 0xe224c309, + 0xba3a6a21, 0x3b1f0f06, 0xa7617bf2, 0x26441ed5, 0x7e5ab7fd, + 0xff7fd2da, 0xce67e5ad, 0x4f42808a, 0x175c29a2, 0x96794c85, + 0x756c474c, 0xf449226b, 0xac578b43, 0x2d72ee64, 0x1c6ad913, + 0x9d4fbc34, 0xc551151c, 0x4474703b, 0x4db9f56a, 0xcc9c904d, + 0x94823965, 0x15a75c42, 0x24bf6b35, 0xa59a0e12, 0xfd84a73a, + 0x7ca1c21d, 0x9fb4c9d4, 0x1e91acf3, 0x468f05db, 0xc7aa60fc, + 0xf6b2578b, 0x779732ac, 0x2f899b84, 0xaeacfea3, 0x32d28a57, + 0xb3f7ef70, 0xebe94658, 0x6acc237f, 0x5bd41408, 0xdaf1712f, + 0x82efd807, 0x03cabd20, 0xe0dfb6e9, 0x61fad3ce, 0x39e47ae6, + 0xb8c11fc1, 0x89d928b6, 0x08fc4d91, 0x50e2e4b9, 0xd1c7819e, + 0xb36f0b10, 0x324a6e37, 0x6a54c71f, 0xeb71a238, 0xda69954f, + 0x5b4cf068, 0x03525940, 0x82773c67, 0x616237ae, 0xe0475289, + 0xb859fba1, 0x397c9e86, 0x0864a9f1, 0x8941ccd6, 0xd15f65fe, + 0x507a00d9, 0xcc04742d, 0x4d21110a, 0x153fb822, 0x941add05, + 0xa502ea72, 0x24278f55, 0x7c39267d, 0xfd1c435a, 0x1e094893, + 0x9f2c2db4, 0xc732849c, 0x4617e1bb, 0x770fd6cc, 0xf62ab3eb, + 0xae341ac3, 0x2f117fe4, 0x6b650fdf, 0xea406af8, 0xb25ec3d0, + 0x337ba6f7, 0x02639180, 0x8346f4a7, 0xdb585d8f, 0x5a7d38a8, + 0xb9683361, 0x384d5646, 0x6053ff6e, 0xe1769a49, 0xd06ead3e, + 0x514bc819, 0x09556131, 0x88700416, 0x140e70e2, 0x952b15c5, + 0xcd35bced, 0x4c10d9ca, 0x7d08eebd, 0xfc2d8b9a, 0xa43322b2, + 0x25164795, 0xc6034c5c, 0x4726297b, 0x1f388053, 0x9e1de574, + 0xaf05d203, 0x2e20b724, 0x763e1e0c, 0xf71b7b2b, 0x95b3f1a5, + 0x14969482, 0x4c883daa, 0xcdad588d, 0xfcb56ffa, 0x7d900add, + 0x258ea3f5, 0xa4abc6d2, 0x47becd1b, 0xc69ba83c, 0x9e850114, + 0x1fa06433, 0x2eb85344, 0xaf9d3663, 0xf7839f4b, 0x76a6fa6c, + 0xead88e98, 0x6bfdebbf, 0x33e34297, 0xb2c627b0, 0x83de10c7, + 0x02fb75e0, 0x5ae5dcc8, 0xdbc0b9ef, 0x38d5b226, 0xb9f0d701, + 0xe1ee7e29, 0x60cb1b0e, 0x51d32c79, 0xd0f6495e, 0x88e8e076, + 0x09cd8551}, + {0x00000000, 0x9b73ead4, 0xed96d3e9, 0x76e5393d, 0x005ca193, + 0x9b2f4b47, 0xedca727a, 0x76b998ae, 0x00b94326, 0x9bcaa9f2, + 0xed2f90cf, 0x765c7a1b, 0x00e5e2b5, 0x9b960861, 0xed73315c, + 0x7600db88, 0x0172864c, 0x9a016c98, 0xece455a5, 0x7797bf71, + 0x012e27df, 0x9a5dcd0b, 0xecb8f436, 0x77cb1ee2, 0x01cbc56a, + 0x9ab82fbe, 0xec5d1683, 0x772efc57, 0x019764f9, 0x9ae48e2d, + 0xec01b710, 0x77725dc4, 0x02e50c98, 0x9996e64c, 0xef73df71, + 0x740035a5, 0x02b9ad0b, 0x99ca47df, 0xef2f7ee2, 0x745c9436, + 0x025c4fbe, 0x992fa56a, 0xefca9c57, 0x74b97683, 0x0200ee2d, + 0x997304f9, 0xef963dc4, 0x74e5d710, 0x03978ad4, 0x98e46000, + 0xee01593d, 0x7572b3e9, 0x03cb2b47, 0x98b8c193, 0xee5df8ae, + 0x752e127a, 0x032ec9f2, 0x985d2326, 0xeeb81a1b, 0x75cbf0cf, + 0x03726861, 0x980182b5, 0xeee4bb88, 0x7597515c, 0x05ca1930, + 0x9eb9f3e4, 0xe85ccad9, 0x732f200d, 0x0596b8a3, 0x9ee55277, + 0xe8006b4a, 0x7373819e, 0x05735a16, 0x9e00b0c2, 0xe8e589ff, + 0x7396632b, 0x052ffb85, 0x9e5c1151, 0xe8b9286c, 0x73cac2b8, + 0x04b89f7c, 0x9fcb75a8, 0xe92e4c95, 0x725da641, 0x04e43eef, + 0x9f97d43b, 0xe972ed06, 0x720107d2, 0x0401dc5a, 0x9f72368e, + 0xe9970fb3, 0x72e4e567, 0x045d7dc9, 0x9f2e971d, 0xe9cbae20, + 0x72b844f4, 0x072f15a8, 0x9c5cff7c, 0xeab9c641, 0x71ca2c95, + 0x0773b43b, 0x9c005eef, 0xeae567d2, 0x71968d06, 0x0796568e, + 0x9ce5bc5a, 0xea008567, 0x71736fb3, 0x07caf71d, 0x9cb91dc9, + 0xea5c24f4, 0x712fce20, 0x065d93e4, 0x9d2e7930, 0xebcb400d, + 0x70b8aad9, 0x06013277, 0x9d72d8a3, 0xeb97e19e, 0x70e40b4a, + 0x06e4d0c2, 0x9d973a16, 0xeb72032b, 0x7001e9ff, 0x06b87151, + 0x9dcb9b85, 0xeb2ea2b8, 0x705d486c, 0x0b943260, 0x90e7d8b4, + 0xe602e189, 0x7d710b5d, 0x0bc893f3, 0x90bb7927, 0xe65e401a, + 0x7d2daace, 0x0b2d7146, 0x905e9b92, 0xe6bba2af, 0x7dc8487b, + 0x0b71d0d5, 0x90023a01, 0xe6e7033c, 0x7d94e9e8, 0x0ae6b42c, + 0x91955ef8, 0xe77067c5, 0x7c038d11, 0x0aba15bf, 0x91c9ff6b, + 0xe72cc656, 0x7c5f2c82, 0x0a5ff70a, 0x912c1dde, 0xe7c924e3, + 0x7cbace37, 0x0a035699, 0x9170bc4d, 0xe7958570, 0x7ce66fa4, + 0x09713ef8, 0x9202d42c, 0xe4e7ed11, 0x7f9407c5, 0x092d9f6b, + 0x925e75bf, 0xe4bb4c82, 0x7fc8a656, 0x09c87dde, 0x92bb970a, + 0xe45eae37, 0x7f2d44e3, 0x0994dc4d, 0x92e73699, 0xe4020fa4, + 0x7f71e570, 0x0803b8b4, 0x93705260, 0xe5956b5d, 0x7ee68189, + 0x085f1927, 0x932cf3f3, 0xe5c9cace, 0x7eba201a, 0x08bafb92, + 0x93c91146, 0xe52c287b, 0x7e5fc2af, 0x08e65a01, 0x9395b0d5, + 0xe57089e8, 0x7e03633c, 0x0e5e2b50, 0x952dc184, 0xe3c8f8b9, + 0x78bb126d, 0x0e028ac3, 0x95716017, 0xe394592a, 0x78e7b3fe, + 0x0ee76876, 0x959482a2, 0xe371bb9f, 0x7802514b, 0x0ebbc9e5, + 0x95c82331, 0xe32d1a0c, 0x785ef0d8, 0x0f2cad1c, 0x945f47c8, + 0xe2ba7ef5, 0x79c99421, 0x0f700c8f, 0x9403e65b, 0xe2e6df66, + 0x799535b2, 0x0f95ee3a, 0x94e604ee, 0xe2033dd3, 0x7970d707, + 0x0fc94fa9, 0x94baa57d, 0xe25f9c40, 0x792c7694, 0x0cbb27c8, + 0x97c8cd1c, 0xe12df421, 0x7a5e1ef5, 0x0ce7865b, 0x97946c8f, + 0xe17155b2, 0x7a02bf66, 0x0c0264ee, 0x97718e3a, 0xe194b707, + 0x7ae75dd3, 0x0c5ec57d, 0x972d2fa9, 0xe1c81694, 0x7abbfc40, + 0x0dc9a184, 0x96ba4b50, 0xe05f726d, 0x7b2c98b9, 0x0d950017, + 0x96e6eac3, 0xe003d3fe, 0x7b70392a, 0x0d70e2a2, 0x96030876, + 0xe0e6314b, 0x7b95db9f, 0x0d2c4331, 0x965fa9e5, 0xe0ba90d8, + 0x7bc97a0c}, + {0x00000000, 0x172864c0, 0x2e50c980, 0x3978ad40, 0x5ca19300, + 0x4b89f7c0, 0x72f15a80, 0x65d93e40, 0xb9432600, 0xae6b42c0, + 0x9713ef80, 0x803b8b40, 0xe5e2b500, 0xf2cad1c0, 0xcbb27c80, + 0xdc9a1840, 0xa9f74a41, 0xbedf2e81, 0x87a783c1, 0x908fe701, + 0xf556d941, 0xe27ebd81, 0xdb0610c1, 0xcc2e7401, 0x10b46c41, + 0x079c0881, 0x3ee4a5c1, 0x29ccc101, 0x4c15ff41, 0x5b3d9b81, + 0x624536c1, 0x756d5201, 0x889f92c3, 0x9fb7f603, 0xa6cf5b43, + 0xb1e73f83, 0xd43e01c3, 0xc3166503, 0xfa6ec843, 0xed46ac83, + 0x31dcb4c3, 0x26f4d003, 0x1f8c7d43, 0x08a41983, 0x6d7d27c3, + 0x7a554303, 0x432dee43, 0x54058a83, 0x2168d882, 0x3640bc42, + 0x0f381102, 0x181075c2, 0x7dc94b82, 0x6ae12f42, 0x53998202, + 0x44b1e6c2, 0x982bfe82, 0x8f039a42, 0xb67b3702, 0xa15353c2, + 0xc48a6d82, 0xd3a20942, 0xeadaa402, 0xfdf2c0c2, 0xca4e23c7, + 0xdd664707, 0xe41eea47, 0xf3368e87, 0x96efb0c7, 0x81c7d407, + 0xb8bf7947, 0xaf971d87, 0x730d05c7, 0x64256107, 0x5d5dcc47, + 0x4a75a887, 0x2fac96c7, 0x3884f207, 0x01fc5f47, 0x16d43b87, + 0x63b96986, 0x74910d46, 0x4de9a006, 0x5ac1c4c6, 0x3f18fa86, + 0x28309e46, 0x11483306, 0x066057c6, 0xdafa4f86, 0xcdd22b46, + 0xf4aa8606, 0xe382e2c6, 0x865bdc86, 0x9173b846, 0xa80b1506, + 0xbf2371c6, 0x42d1b104, 0x55f9d5c4, 0x6c817884, 0x7ba91c44, + 0x1e702204, 0x095846c4, 0x3020eb84, 0x27088f44, 0xfb929704, + 0xecbaf3c4, 0xd5c25e84, 0xc2ea3a44, 0xa7330404, 0xb01b60c4, + 0x8963cd84, 0x9e4ba944, 0xeb26fb45, 0xfc0e9f85, 0xc57632c5, + 0xd25e5605, 0xb7876845, 0xa0af0c85, 0x99d7a1c5, 0x8effc505, + 0x5265dd45, 0x454db985, 0x7c3514c5, 0x6b1d7005, 0x0ec44e45, + 0x19ec2a85, 0x209487c5, 0x37bce305, 0x4fed41cf, 0x58c5250f, + 0x61bd884f, 0x7695ec8f, 0x134cd2cf, 0x0464b60f, 0x3d1c1b4f, + 0x2a347f8f, 0xf6ae67cf, 0xe186030f, 0xd8feae4f, 0xcfd6ca8f, + 0xaa0ff4cf, 0xbd27900f, 0x845f3d4f, 0x9377598f, 0xe61a0b8e, + 0xf1326f4e, 0xc84ac20e, 0xdf62a6ce, 0xbabb988e, 0xad93fc4e, + 0x94eb510e, 0x83c335ce, 0x5f592d8e, 0x4871494e, 0x7109e40e, + 0x662180ce, 0x03f8be8e, 0x14d0da4e, 0x2da8770e, 0x3a8013ce, + 0xc772d30c, 0xd05ab7cc, 0xe9221a8c, 0xfe0a7e4c, 0x9bd3400c, + 0x8cfb24cc, 0xb583898c, 0xa2abed4c, 0x7e31f50c, 0x691991cc, + 0x50613c8c, 0x4749584c, 0x2290660c, 0x35b802cc, 0x0cc0af8c, + 0x1be8cb4c, 0x6e85994d, 0x79adfd8d, 0x40d550cd, 0x57fd340d, + 0x32240a4d, 0x250c6e8d, 0x1c74c3cd, 0x0b5ca70d, 0xd7c6bf4d, + 0xc0eedb8d, 0xf99676cd, 0xeebe120d, 0x8b672c4d, 0x9c4f488d, + 0xa537e5cd, 0xb21f810d, 0x85a36208, 0x928b06c8, 0xabf3ab88, + 0xbcdbcf48, 0xd902f108, 0xce2a95c8, 0xf7523888, 0xe07a5c48, + 0x3ce04408, 0x2bc820c8, 0x12b08d88, 0x0598e948, 0x6041d708, + 0x7769b3c8, 0x4e111e88, 0x59397a48, 0x2c542849, 0x3b7c4c89, + 0x0204e1c9, 0x152c8509, 0x70f5bb49, 0x67dddf89, 0x5ea572c9, + 0x498d1609, 0x95170e49, 0x823f6a89, 0xbb47c7c9, 0xac6fa309, + 0xc9b69d49, 0xde9ef989, 0xe7e654c9, 0xf0ce3009, 0x0d3cf0cb, + 0x1a14940b, 0x236c394b, 0x34445d8b, 0x519d63cb, 0x46b5070b, + 0x7fcdaa4b, 0x68e5ce8b, 0xb47fd6cb, 0xa357b20b, 0x9a2f1f4b, + 0x8d077b8b, 0xe8de45cb, 0xfff6210b, 0xc68e8c4b, 0xd1a6e88b, + 0xa4cbba8a, 0xb3e3de4a, 0x8a9b730a, 0x9db317ca, 0xf86a298a, + 0xef424d4a, 0xd63ae00a, 0xc11284ca, 0x1d889c8a, 0x0aa0f84a, + 0x33d8550a, 0x24f031ca, 0x41290f8a, 0x56016b4a, 0x6f79c60a, + 0x7851a2ca}, + {0x00000000, 0x9fda839e, 0xe4c4017d, 0x7b1e82e3, 0x12f904bb, + 0x8d238725, 0xf63d05c6, 0x69e78658, 0x25f20976, 0xba288ae8, + 0xc136080b, 0x5eec8b95, 0x370b0dcd, 0xa8d18e53, 0xd3cf0cb0, + 0x4c158f2e, 0x4be412ec, 0xd43e9172, 0xaf201391, 0x30fa900f, + 0x591d1657, 0xc6c795c9, 0xbdd9172a, 0x220394b4, 0x6e161b9a, + 0xf1cc9804, 0x8ad21ae7, 0x15089979, 0x7cef1f21, 0xe3359cbf, + 0x982b1e5c, 0x07f19dc2, 0x97c825d8, 0x0812a646, 0x730c24a5, + 0xecd6a73b, 0x85312163, 0x1aeba2fd, 0x61f5201e, 0xfe2fa380, + 0xb23a2cae, 0x2de0af30, 0x56fe2dd3, 0xc924ae4d, 0xa0c32815, + 0x3f19ab8b, 0x44072968, 0xdbddaaf6, 0xdc2c3734, 0x43f6b4aa, + 0x38e83649, 0xa732b5d7, 0xced5338f, 0x510fb011, 0x2a1132f2, + 0xb5cbb16c, 0xf9de3e42, 0x6604bddc, 0x1d1a3f3f, 0x82c0bca1, + 0xeb273af9, 0x74fdb967, 0x0fe33b84, 0x9039b81a, 0xf4e14df1, + 0x6b3bce6f, 0x10254c8c, 0x8fffcf12, 0xe618494a, 0x79c2cad4, + 0x02dc4837, 0x9d06cba9, 0xd1134487, 0x4ec9c719, 0x35d745fa, + 0xaa0dc664, 0xc3ea403c, 0x5c30c3a2, 0x272e4141, 0xb8f4c2df, + 0xbf055f1d, 0x20dfdc83, 0x5bc15e60, 0xc41bddfe, 0xadfc5ba6, + 0x3226d838, 0x49385adb, 0xd6e2d945, 0x9af7566b, 0x052dd5f5, + 0x7e335716, 0xe1e9d488, 0x880e52d0, 0x17d4d14e, 0x6cca53ad, + 0xf310d033, 0x63296829, 0xfcf3ebb7, 0x87ed6954, 0x1837eaca, + 0x71d06c92, 0xee0aef0c, 0x95146def, 0x0aceee71, 0x46db615f, + 0xd901e2c1, 0xa21f6022, 0x3dc5e3bc, 0x542265e4, 0xcbf8e67a, + 0xb0e66499, 0x2f3ce707, 0x28cd7ac5, 0xb717f95b, 0xcc097bb8, + 0x53d3f826, 0x3a347e7e, 0xa5eefde0, 0xdef07f03, 0x412afc9d, + 0x0d3f73b3, 0x92e5f02d, 0xe9fb72ce, 0x7621f150, 0x1fc67708, + 0x801cf496, 0xfb027675, 0x64d8f5eb, 0x32b39da3, 0xad691e3d, + 0xd6779cde, 0x49ad1f40, 0x204a9918, 0xbf901a86, 0xc48e9865, + 0x5b541bfb, 0x174194d5, 0x889b174b, 0xf38595a8, 0x6c5f1636, + 0x05b8906e, 0x9a6213f0, 0xe17c9113, 0x7ea6128d, 0x79578f4f, + 0xe68d0cd1, 0x9d938e32, 0x02490dac, 0x6bae8bf4, 0xf474086a, + 0x8f6a8a89, 0x10b00917, 0x5ca58639, 0xc37f05a7, 0xb8618744, + 0x27bb04da, 0x4e5c8282, 0xd186011c, 0xaa9883ff, 0x35420061, + 0xa57bb87b, 0x3aa13be5, 0x41bfb906, 0xde653a98, 0xb782bcc0, + 0x28583f5e, 0x5346bdbd, 0xcc9c3e23, 0x8089b10d, 0x1f533293, + 0x644db070, 0xfb9733ee, 0x9270b5b6, 0x0daa3628, 0x76b4b4cb, + 0xe96e3755, 0xee9faa97, 0x71452909, 0x0a5babea, 0x95812874, + 0xfc66ae2c, 0x63bc2db2, 0x18a2af51, 0x87782ccf, 0xcb6da3e1, + 0x54b7207f, 0x2fa9a29c, 0xb0732102, 0xd994a75a, 0x464e24c4, + 0x3d50a627, 0xa28a25b9, 0xc652d052, 0x598853cc, 0x2296d12f, + 0xbd4c52b1, 0xd4abd4e9, 0x4b715777, 0x306fd594, 0xafb5560a, + 0xe3a0d924, 0x7c7a5aba, 0x0764d859, 0x98be5bc7, 0xf159dd9f, + 0x6e835e01, 0x159ddce2, 0x8a475f7c, 0x8db6c2be, 0x126c4120, + 0x6972c3c3, 0xf6a8405d, 0x9f4fc605, 0x0095459b, 0x7b8bc778, + 0xe45144e6, 0xa844cbc8, 0x379e4856, 0x4c80cab5, 0xd35a492b, + 0xbabdcf73, 0x25674ced, 0x5e79ce0e, 0xc1a34d90, 0x519af58a, + 0xce407614, 0xb55ef4f7, 0x2a847769, 0x4363f131, 0xdcb972af, + 0xa7a7f04c, 0x387d73d2, 0x7468fcfc, 0xebb27f62, 0x90acfd81, + 0x0f767e1f, 0x6691f847, 0xf94b7bd9, 0x8255f93a, 0x1d8f7aa4, + 0x1a7ee766, 0x85a464f8, 0xfebae61b, 0x61606585, 0x0887e3dd, + 0x975d6043, 0xec43e2a0, 0x7399613e, 0x3f8cee10, 0xa0566d8e, + 0xdb48ef6d, 0x44926cf3, 0x2d75eaab, 0xb2af6935, 0xc9b1ebd6, + 0x566b6848}}; + +local const z_word_t FAR crc_braid_big_table[][256] = { + {0x00000000, 0x9e83da9f, 0x7d01c4e4, 0xe3821e7b, 0xbb04f912, + 0x2587238d, 0xc6053df6, 0x5886e769, 0x7609f225, 0xe88a28ba, + 0x0b0836c1, 0x958bec5e, 0xcd0d0b37, 0x538ed1a8, 0xb00ccfd3, + 0x2e8f154c, 0xec12e44b, 0x72913ed4, 0x911320af, 0x0f90fa30, + 0x57161d59, 0xc995c7c6, 0x2a17d9bd, 0xb4940322, 0x9a1b166e, + 0x0498ccf1, 0xe71ad28a, 0x79990815, 0x211fef7c, 0xbf9c35e3, + 0x5c1e2b98, 0xc29df107, 0xd825c897, 0x46a61208, 0xa5240c73, + 0x3ba7d6ec, 0x63213185, 0xfda2eb1a, 0x1e20f561, 0x80a32ffe, + 0xae2c3ab2, 0x30afe02d, 0xd32dfe56, 0x4dae24c9, 0x1528c3a0, + 0x8bab193f, 0x68290744, 0xf6aadddb, 0x34372cdc, 0xaab4f643, + 0x4936e838, 0xd7b532a7, 0x8f33d5ce, 0x11b00f51, 0xf232112a, + 0x6cb1cbb5, 0x423edef9, 0xdcbd0466, 0x3f3f1a1d, 0xa1bcc082, + 0xf93a27eb, 0x67b9fd74, 0x843be30f, 0x1ab83990, 0xf14de1f4, + 0x6fce3b6b, 0x8c4c2510, 0x12cfff8f, 0x4a4918e6, 0xd4cac279, + 0x3748dc02, 0xa9cb069d, 0x874413d1, 0x19c7c94e, 0xfa45d735, + 0x64c60daa, 0x3c40eac3, 0xa2c3305c, 0x41412e27, 0xdfc2f4b8, + 0x1d5f05bf, 0x83dcdf20, 0x605ec15b, 0xfedd1bc4, 0xa65bfcad, + 0x38d82632, 0xdb5a3849, 0x45d9e2d6, 0x6b56f79a, 0xf5d52d05, + 0x1657337e, 0x88d4e9e1, 0xd0520e88, 0x4ed1d417, 0xad53ca6c, + 0x33d010f3, 0x29682963, 0xb7ebf3fc, 0x5469ed87, 0xcaea3718, + 0x926cd071, 0x0cef0aee, 0xef6d1495, 0x71eece0a, 0x5f61db46, + 0xc1e201d9, 0x22601fa2, 0xbce3c53d, 0xe4652254, 0x7ae6f8cb, + 0x9964e6b0, 0x07e73c2f, 0xc57acd28, 0x5bf917b7, 0xb87b09cc, + 0x26f8d353, 0x7e7e343a, 0xe0fdeea5, 0x037ff0de, 0x9dfc2a41, + 0xb3733f0d, 0x2df0e592, 0xce72fbe9, 0x50f12176, 0x0877c61f, + 0x96f41c80, 0x757602fb, 0xebf5d864, 0xa39db332, 0x3d1e69ad, + 0xde9c77d6, 0x401fad49, 0x18994a20, 0x861a90bf, 0x65988ec4, + 0xfb1b545b, 0xd5944117, 0x4b179b88, 0xa89585f3, 0x36165f6c, + 0x6e90b805, 0xf013629a, 0x13917ce1, 0x8d12a67e, 0x4f8f5779, + 0xd10c8de6, 0x328e939d, 0xac0d4902, 0xf48bae6b, 0x6a0874f4, + 0x898a6a8f, 0x1709b010, 0x3986a55c, 0xa7057fc3, 0x448761b8, + 0xda04bb27, 0x82825c4e, 0x1c0186d1, 0xff8398aa, 0x61004235, + 0x7bb87ba5, 0xe53ba13a, 0x06b9bf41, 0x983a65de, 0xc0bc82b7, + 0x5e3f5828, 0xbdbd4653, 0x233e9ccc, 0x0db18980, 0x9332531f, + 0x70b04d64, 0xee3397fb, 0xb6b57092, 0x2836aa0d, 0xcbb4b476, + 0x55376ee9, 0x97aa9fee, 0x09294571, 0xeaab5b0a, 0x74288195, + 0x2cae66fc, 0xb22dbc63, 0x51afa218, 0xcf2c7887, 0xe1a36dcb, + 0x7f20b754, 0x9ca2a92f, 0x022173b0, 0x5aa794d9, 0xc4244e46, + 0x27a6503d, 0xb9258aa2, 0x52d052c6, 0xcc538859, 0x2fd19622, + 0xb1524cbd, 0xe9d4abd4, 0x7757714b, 0x94d56f30, 0x0a56b5af, + 0x24d9a0e3, 0xba5a7a7c, 0x59d86407, 0xc75bbe98, 0x9fdd59f1, + 0x015e836e, 0xe2dc9d15, 0x7c5f478a, 0xbec2b68d, 0x20416c12, + 0xc3c37269, 0x5d40a8f6, 0x05c64f9f, 0x9b459500, 0x78c78b7b, + 0xe64451e4, 0xc8cb44a8, 0x56489e37, 0xb5ca804c, 0x2b495ad3, + 0x73cfbdba, 0xed4c6725, 0x0ece795e, 0x904da3c1, 0x8af59a51, + 0x147640ce, 0xf7f45eb5, 0x6977842a, 0x31f16343, 0xaf72b9dc, + 0x4cf0a7a7, 0xd2737d38, 0xfcfc6874, 0x627fb2eb, 0x81fdac90, + 0x1f7e760f, 0x47f89166, 0xd97b4bf9, 0x3af95582, 0xa47a8f1d, + 0x66e77e1a, 0xf864a485, 0x1be6bafe, 0x85656061, 0xdde38708, + 0x43605d97, 0xa0e243ec, 0x3e619973, 0x10ee8c3f, 0x8e6d56a0, + 0x6def48db, 0xf36c9244, 0xabea752d, 0x3569afb2, 0xd6ebb1c9, + 0x48686b56}, + {0x00000000, 0xc0642817, 0x80c9502e, 0x40ad7839, 0x0093a15c, + 0xc0f7894b, 0x805af172, 0x403ed965, 0x002643b9, 0xc0426bae, + 0x80ef1397, 0x408b3b80, 0x00b5e2e5, 0xc0d1caf2, 0x807cb2cb, + 0x40189adc, 0x414af7a9, 0x812edfbe, 0xc183a787, 0x01e78f90, + 0x41d956f5, 0x81bd7ee2, 0xc11006db, 0x01742ecc, 0x416cb410, + 0x81089c07, 0xc1a5e43e, 0x01c1cc29, 0x41ff154c, 0x819b3d5b, + 0xc1364562, 0x01526d75, 0xc3929f88, 0x03f6b79f, 0x435bcfa6, + 0x833fe7b1, 0xc3013ed4, 0x036516c3, 0x43c86efa, 0x83ac46ed, + 0xc3b4dc31, 0x03d0f426, 0x437d8c1f, 0x8319a408, 0xc3277d6d, + 0x0343557a, 0x43ee2d43, 0x838a0554, 0x82d86821, 0x42bc4036, + 0x0211380f, 0xc2751018, 0x824bc97d, 0x422fe16a, 0x02829953, + 0xc2e6b144, 0x82fe2b98, 0x429a038f, 0x02377bb6, 0xc25353a1, + 0x826d8ac4, 0x4209a2d3, 0x02a4daea, 0xc2c0f2fd, 0xc7234eca, + 0x074766dd, 0x47ea1ee4, 0x878e36f3, 0xc7b0ef96, 0x07d4c781, + 0x4779bfb8, 0x871d97af, 0xc7050d73, 0x07612564, 0x47cc5d5d, + 0x87a8754a, 0xc796ac2f, 0x07f28438, 0x475ffc01, 0x873bd416, + 0x8669b963, 0x460d9174, 0x06a0e94d, 0xc6c4c15a, 0x86fa183f, + 0x469e3028, 0x06334811, 0xc6576006, 0x864ffada, 0x462bd2cd, + 0x0686aaf4, 0xc6e282e3, 0x86dc5b86, 0x46b87391, 0x06150ba8, + 0xc67123bf, 0x04b1d142, 0xc4d5f955, 0x8478816c, 0x441ca97b, + 0x0422701e, 0xc4465809, 0x84eb2030, 0x448f0827, 0x049792fb, + 0xc4f3baec, 0x845ec2d5, 0x443aeac2, 0x040433a7, 0xc4601bb0, + 0x84cd6389, 0x44a94b9e, 0x45fb26eb, 0x859f0efc, 0xc53276c5, + 0x05565ed2, 0x456887b7, 0x850cafa0, 0xc5a1d799, 0x05c5ff8e, + 0x45dd6552, 0x85b94d45, 0xc514357c, 0x05701d6b, 0x454ec40e, + 0x852aec19, 0xc5879420, 0x05e3bc37, 0xcf41ed4f, 0x0f25c558, + 0x4f88bd61, 0x8fec9576, 0xcfd24c13, 0x0fb66404, 0x4f1b1c3d, + 0x8f7f342a, 0xcf67aef6, 0x0f0386e1, 0x4faefed8, 0x8fcad6cf, + 0xcff40faa, 0x0f9027bd, 0x4f3d5f84, 0x8f597793, 0x8e0b1ae6, + 0x4e6f32f1, 0x0ec24ac8, 0xcea662df, 0x8e98bbba, 0x4efc93ad, + 0x0e51eb94, 0xce35c383, 0x8e2d595f, 0x4e497148, 0x0ee40971, + 0xce802166, 0x8ebef803, 0x4edad014, 0x0e77a82d, 0xce13803a, + 0x0cd372c7, 0xccb75ad0, 0x8c1a22e9, 0x4c7e0afe, 0x0c40d39b, + 0xcc24fb8c, 0x8c8983b5, 0x4cedaba2, 0x0cf5317e, 0xcc911969, + 0x8c3c6150, 0x4c584947, 0x0c669022, 0xcc02b835, 0x8cafc00c, + 0x4ccbe81b, 0x4d99856e, 0x8dfdad79, 0xcd50d540, 0x0d34fd57, + 0x4d0a2432, 0x8d6e0c25, 0xcdc3741c, 0x0da75c0b, 0x4dbfc6d7, + 0x8ddbeec0, 0xcd7696f9, 0x0d12beee, 0x4d2c678b, 0x8d484f9c, + 0xcde537a5, 0x0d811fb2, 0x0862a385, 0xc8068b92, 0x88abf3ab, + 0x48cfdbbc, 0x08f102d9, 0xc8952ace, 0x883852f7, 0x485c7ae0, + 0x0844e03c, 0xc820c82b, 0x888db012, 0x48e99805, 0x08d74160, + 0xc8b36977, 0x881e114e, 0x487a3959, 0x4928542c, 0x894c7c3b, + 0xc9e10402, 0x09852c15, 0x49bbf570, 0x89dfdd67, 0xc972a55e, + 0x09168d49, 0x490e1795, 0x896a3f82, 0xc9c747bb, 0x09a36fac, + 0x499db6c9, 0x89f99ede, 0xc954e6e7, 0x0930cef0, 0xcbf03c0d, + 0x0b94141a, 0x4b396c23, 0x8b5d4434, 0xcb639d51, 0x0b07b546, + 0x4baacd7f, 0x8bcee568, 0xcbd67fb4, 0x0bb257a3, 0x4b1f2f9a, + 0x8b7b078d, 0xcb45dee8, 0x0b21f6ff, 0x4b8c8ec6, 0x8be8a6d1, + 0x8abacba4, 0x4adee3b3, 0x0a739b8a, 0xca17b39d, 0x8a296af8, + 0x4a4d42ef, 0x0ae03ad6, 0xca8412c1, 0x8a9c881d, 0x4af8a00a, + 0x0a55d833, 0xca31f024, 0x8a0f2941, 0x4a6b0156, 0x0ac6796f, + 0xcaa25178}, + {0x00000000, 0xd4ea739b, 0xe9d396ed, 0x3d39e576, 0x93a15c00, + 0x474b2f9b, 0x7a72caed, 0xae98b976, 0x2643b900, 0xf2a9ca9b, + 0xcf902fed, 0x1b7a5c76, 0xb5e2e500, 0x6108969b, 0x5c3173ed, + 0x88db0076, 0x4c867201, 0x986c019a, 0xa555e4ec, 0x71bf9777, + 0xdf272e01, 0x0bcd5d9a, 0x36f4b8ec, 0xe21ecb77, 0x6ac5cb01, + 0xbe2fb89a, 0x83165dec, 0x57fc2e77, 0xf9649701, 0x2d8ee49a, + 0x10b701ec, 0xc45d7277, 0x980ce502, 0x4ce69699, 0x71df73ef, + 0xa5350074, 0x0badb902, 0xdf47ca99, 0xe27e2fef, 0x36945c74, + 0xbe4f5c02, 0x6aa52f99, 0x579ccaef, 0x8376b974, 0x2dee0002, + 0xf9047399, 0xc43d96ef, 0x10d7e574, 0xd48a9703, 0x0060e498, + 0x3d5901ee, 0xe9b37275, 0x472bcb03, 0x93c1b898, 0xaef85dee, + 0x7a122e75, 0xf2c92e03, 0x26235d98, 0x1b1ab8ee, 0xcff0cb75, + 0x61687203, 0xb5820198, 0x88bbe4ee, 0x5c519775, 0x3019ca05, + 0xe4f3b99e, 0xd9ca5ce8, 0x0d202f73, 0xa3b89605, 0x7752e59e, + 0x4a6b00e8, 0x9e817373, 0x165a7305, 0xc2b0009e, 0xff89e5e8, + 0x2b639673, 0x85fb2f05, 0x51115c9e, 0x6c28b9e8, 0xb8c2ca73, + 0x7c9fb804, 0xa875cb9f, 0x954c2ee9, 0x41a65d72, 0xef3ee404, + 0x3bd4979f, 0x06ed72e9, 0xd2070172, 0x5adc0104, 0x8e36729f, + 0xb30f97e9, 0x67e5e472, 0xc97d5d04, 0x1d972e9f, 0x20aecbe9, + 0xf444b872, 0xa8152f07, 0x7cff5c9c, 0x41c6b9ea, 0x952cca71, + 0x3bb47307, 0xef5e009c, 0xd267e5ea, 0x068d9671, 0x8e569607, + 0x5abce59c, 0x678500ea, 0xb36f7371, 0x1df7ca07, 0xc91db99c, + 0xf4245cea, 0x20ce2f71, 0xe4935d06, 0x30792e9d, 0x0d40cbeb, + 0xd9aab870, 0x77320106, 0xa3d8729d, 0x9ee197eb, 0x4a0be470, + 0xc2d0e406, 0x163a979d, 0x2b0372eb, 0xffe90170, 0x5171b806, + 0x859bcb9d, 0xb8a22eeb, 0x6c485d70, 0x6032940b, 0xb4d8e790, + 0x89e102e6, 0x5d0b717d, 0xf393c80b, 0x2779bb90, 0x1a405ee6, + 0xceaa2d7d, 0x46712d0b, 0x929b5e90, 0xafa2bbe6, 0x7b48c87d, + 0xd5d0710b, 0x013a0290, 0x3c03e7e6, 0xe8e9947d, 0x2cb4e60a, + 0xf85e9591, 0xc56770e7, 0x118d037c, 0xbf15ba0a, 0x6bffc991, + 0x56c62ce7, 0x822c5f7c, 0x0af75f0a, 0xde1d2c91, 0xe324c9e7, + 0x37ceba7c, 0x9956030a, 0x4dbc7091, 0x708595e7, 0xa46fe67c, + 0xf83e7109, 0x2cd40292, 0x11ede7e4, 0xc507947f, 0x6b9f2d09, + 0xbf755e92, 0x824cbbe4, 0x56a6c87f, 0xde7dc809, 0x0a97bb92, + 0x37ae5ee4, 0xe3442d7f, 0x4ddc9409, 0x9936e792, 0xa40f02e4, + 0x70e5717f, 0xb4b80308, 0x60527093, 0x5d6b95e5, 0x8981e67e, + 0x27195f08, 0xf3f32c93, 0xcecac9e5, 0x1a20ba7e, 0x92fbba08, + 0x4611c993, 0x7b282ce5, 0xafc25f7e, 0x015ae608, 0xd5b09593, + 0xe88970e5, 0x3c63037e, 0x502b5e0e, 0x84c12d95, 0xb9f8c8e3, + 0x6d12bb78, 0xc38a020e, 0x17607195, 0x2a5994e3, 0xfeb3e778, + 0x7668e70e, 0xa2829495, 0x9fbb71e3, 0x4b510278, 0xe5c9bb0e, + 0x3123c895, 0x0c1a2de3, 0xd8f05e78, 0x1cad2c0f, 0xc8475f94, + 0xf57ebae2, 0x2194c979, 0x8f0c700f, 0x5be60394, 0x66dfe6e2, + 0xb2359579, 0x3aee950f, 0xee04e694, 0xd33d03e2, 0x07d77079, + 0xa94fc90f, 0x7da5ba94, 0x409c5fe2, 0x94762c79, 0xc827bb0c, + 0x1ccdc897, 0x21f42de1, 0xf51e5e7a, 0x5b86e70c, 0x8f6c9497, + 0xb25571e1, 0x66bf027a, 0xee64020c, 0x3a8e7197, 0x07b794e1, + 0xd35de77a, 0x7dc55e0c, 0xa92f2d97, 0x9416c8e1, 0x40fcbb7a, + 0x84a1c90d, 0x504bba96, 0x6d725fe0, 0xb9982c7b, 0x1700950d, + 0xc3eae696, 0xfed303e0, 0x2a39707b, 0xa2e2700d, 0x76080396, + 0x4b31e6e0, 0x9fdb957b, 0x31432c0d, 0xe5a95f96, 0xd890bae0, + 0x0c7ac97b}, + {0x00000000, 0x27652581, 0x0fcc3bd9, 0x28a91e58, 0x5f9e0669, + 0x78fb23e8, 0x50523db0, 0x77371831, 0xbe3c0dd2, 0x99592853, + 0xb1f0360b, 0x9695138a, 0xe1a20bbb, 0xc6c72e3a, 0xee6e3062, + 0xc90b15e3, 0x3d7f6b7f, 0x1a1a4efe, 0x32b350a6, 0x15d67527, + 0x62e16d16, 0x45844897, 0x6d2d56cf, 0x4a48734e, 0x834366ad, + 0xa426432c, 0x8c8f5d74, 0xabea78f5, 0xdcdd60c4, 0xfbb84545, + 0xd3115b1d, 0xf4747e9c, 0x7afed6fe, 0x5d9bf37f, 0x7532ed27, + 0x5257c8a6, 0x2560d097, 0x0205f516, 0x2aaceb4e, 0x0dc9cecf, + 0xc4c2db2c, 0xe3a7fead, 0xcb0ee0f5, 0xec6bc574, 0x9b5cdd45, + 0xbc39f8c4, 0x9490e69c, 0xb3f5c31d, 0x4781bd81, 0x60e49800, + 0x484d8658, 0x6f28a3d9, 0x181fbbe8, 0x3f7a9e69, 0x17d38031, + 0x30b6a5b0, 0xf9bdb053, 0xded895d2, 0xf6718b8a, 0xd114ae0b, + 0xa623b63a, 0x814693bb, 0xa9ef8de3, 0x8e8aa862, 0xb5fadc26, + 0x929ff9a7, 0xba36e7ff, 0x9d53c27e, 0xea64da4f, 0xcd01ffce, + 0xe5a8e196, 0xc2cdc417, 0x0bc6d1f4, 0x2ca3f475, 0x040aea2d, + 0x236fcfac, 0x5458d79d, 0x733df21c, 0x5b94ec44, 0x7cf1c9c5, + 0x8885b759, 0xafe092d8, 0x87498c80, 0xa02ca901, 0xd71bb130, + 0xf07e94b1, 0xd8d78ae9, 0xffb2af68, 0x36b9ba8b, 0x11dc9f0a, + 0x39758152, 0x1e10a4d3, 0x6927bce2, 0x4e429963, 0x66eb873b, + 0x418ea2ba, 0xcf040ad8, 0xe8612f59, 0xc0c83101, 0xe7ad1480, + 0x909a0cb1, 0xb7ff2930, 0x9f563768, 0xb83312e9, 0x7138070a, + 0x565d228b, 0x7ef43cd3, 0x59911952, 0x2ea60163, 0x09c324e2, + 0x216a3aba, 0x060f1f3b, 0xf27b61a7, 0xd51e4426, 0xfdb75a7e, + 0xdad27fff, 0xade567ce, 0x8a80424f, 0xa2295c17, 0x854c7996, + 0x4c476c75, 0x6b2249f4, 0x438b57ac, 0x64ee722d, 0x13d96a1c, + 0x34bc4f9d, 0x1c1551c5, 0x3b707444, 0x6af5b94d, 0x4d909ccc, + 0x65398294, 0x425ca715, 0x356bbf24, 0x120e9aa5, 0x3aa784fd, + 0x1dc2a17c, 0xd4c9b49f, 0xf3ac911e, 0xdb058f46, 0xfc60aac7, + 0x8b57b2f6, 0xac329777, 0x849b892f, 0xa3feacae, 0x578ad232, + 0x70eff7b3, 0x5846e9eb, 0x7f23cc6a, 0x0814d45b, 0x2f71f1da, + 0x07d8ef82, 0x20bdca03, 0xe9b6dfe0, 0xced3fa61, 0xe67ae439, + 0xc11fc1b8, 0xb628d989, 0x914dfc08, 0xb9e4e250, 0x9e81c7d1, + 0x100b6fb3, 0x376e4a32, 0x1fc7546a, 0x38a271eb, 0x4f9569da, + 0x68f04c5b, 0x40595203, 0x673c7782, 0xae376261, 0x895247e0, + 0xa1fb59b8, 0x869e7c39, 0xf1a96408, 0xd6cc4189, 0xfe655fd1, + 0xd9007a50, 0x2d7404cc, 0x0a11214d, 0x22b83f15, 0x05dd1a94, + 0x72ea02a5, 0x558f2724, 0x7d26397c, 0x5a431cfd, 0x9348091e, + 0xb42d2c9f, 0x9c8432c7, 0xbbe11746, 0xccd60f77, 0xebb32af6, + 0xc31a34ae, 0xe47f112f, 0xdf0f656b, 0xf86a40ea, 0xd0c35eb2, + 0xf7a67b33, 0x80916302, 0xa7f44683, 0x8f5d58db, 0xa8387d5a, + 0x613368b9, 0x46564d38, 0x6eff5360, 0x499a76e1, 0x3ead6ed0, + 0x19c84b51, 0x31615509, 0x16047088, 0xe2700e14, 0xc5152b95, + 0xedbc35cd, 0xcad9104c, 0xbdee087d, 0x9a8b2dfc, 0xb22233a4, + 0x95471625, 0x5c4c03c6, 0x7b292647, 0x5380381f, 0x74e51d9e, + 0x03d205af, 0x24b7202e, 0x0c1e3e76, 0x2b7b1bf7, 0xa5f1b395, + 0x82949614, 0xaa3d884c, 0x8d58adcd, 0xfa6fb5fc, 0xdd0a907d, + 0xf5a38e25, 0xd2c6aba4, 0x1bcdbe47, 0x3ca89bc6, 0x1401859e, + 0x3364a01f, 0x4453b82e, 0x63369daf, 0x4b9f83f7, 0x6cfaa676, + 0x988ed8ea, 0xbfebfd6b, 0x9742e333, 0xb027c6b2, 0xc710de83, + 0xe075fb02, 0xc8dce55a, 0xefb9c0db, 0x26b2d538, 0x01d7f0b9, + 0x297eeee1, 0x0e1bcb60, 0x792cd351, 0x5e49f6d0, 0x76e0e888, + 0x5185cd09}}; + +#endif + +#endif + +#endif + +local const z_crc_t FAR x2n_table[] = { + 0x40000000, 0x20000000, 0x08000000, 0x00800000, 0x00008000, + 0xedb88320, 0xb1e6b092, 0xa06a2517, 0xed627dae, 0x88d14467, + 0xd7bbfe6a, 0xec447f11, 0x8e7ea170, 0x6427800e, 0x4d47bae0, + 0x09fe548f, 0x83852d0f, 0x30362f1a, 0x7b5a9cc3, 0x31fec169, + 0x9fec022a, 0x6c8dedc4, 0x15d6874d, 0x5fde7a4e, 0xbad90e37, + 0x2e4e5eef, 0x4eaba214, 0xa8a472c0, 0x429a969e, 0x148d302a, + 0xc40ba6d0, 0xc4e22c3c}; diff --git a/widget/milsko/milskosrc/external/libz/include/deflate.h b/widget/milsko/milskosrc/external/libz/include/deflate.h new file mode 100644 index 0000000000..300c6ada62 --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/include/deflate.h @@ -0,0 +1,377 @@ +/* deflate.h -- internal compression state + * Copyright (C) 1995-2024 Jean-loup Gailly + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* @(#) $Id$ */ + +#ifndef DEFLATE_H +#define DEFLATE_H + +#include "zutil.h" + +/* define NO_GZIP when compiling if you want to disable gzip header and + trailer creation by deflate(). NO_GZIP would be used to avoid linking in + the crc code when it is not needed. For shared libraries, gzip encoding + should be left enabled. */ +#ifndef NO_GZIP +# define GZIP +#endif + +/* define LIT_MEM to slightly increase the speed of deflate (order 1% to 2%) at + the cost of a larger memory footprint */ +/* #define LIT_MEM */ + +/* =========================================================================== + * Internal compression state. + */ + +#define LENGTH_CODES 29 +/* number of length codes, not counting the special END_BLOCK code */ + +#define LITERALS 256 +/* number of literal bytes 0..255 */ + +#define L_CODES (LITERALS+1+LENGTH_CODES) +/* number of Literal or Length codes, including the END_BLOCK code */ + +#define D_CODES 30 +/* number of distance codes */ + +#define BL_CODES 19 +/* number of codes used to transfer the bit lengths */ + +#define HEAP_SIZE (2*L_CODES+1) +/* maximum heap size */ + +#define MAX_BITS 15 +/* All codes must not exceed MAX_BITS bits */ + +#define Buf_size 16 +/* size of bit buffer in bi_buf */ + +#define INIT_STATE 42 /* zlib header -> BUSY_STATE */ +#ifdef GZIP +# define GZIP_STATE 57 /* gzip header -> BUSY_STATE | EXTRA_STATE */ +#endif +#define EXTRA_STATE 69 /* gzip extra block -> NAME_STATE */ +#define NAME_STATE 73 /* gzip file name -> COMMENT_STATE */ +#define COMMENT_STATE 91 /* gzip comment -> HCRC_STATE */ +#define HCRC_STATE 103 /* gzip header CRC -> BUSY_STATE */ +#define BUSY_STATE 113 /* deflate -> FINISH_STATE */ +#define FINISH_STATE 666 /* stream complete */ +/* Stream status */ + + +/* Data structure describing a single value and its code string. */ +typedef struct ct_data_s { + union { + ush freq; /* frequency count */ + ush code; /* bit string */ + } fc; + union { + ush dad; /* father node in Huffman tree */ + ush len; /* length of bit string */ + } dl; +} FAR ct_data; + +#define Freq fc.freq +#define Code fc.code +#define Dad dl.dad +#define Len dl.len + +typedef struct static_tree_desc_s static_tree_desc; + +typedef struct tree_desc_s { + ct_data *dyn_tree; /* the dynamic tree */ + int max_code; /* largest code with non zero frequency */ + const static_tree_desc *stat_desc; /* the corresponding static tree */ +} FAR tree_desc; + +typedef ush Pos; +typedef Pos FAR Posf; +typedef unsigned IPos; + +/* A Pos is an index in the character window. We use short instead of int to + * save space in the various tables. IPos is used only for parameter passing. + */ + +typedef struct internal_state { + z_streamp strm; /* pointer back to this zlib stream */ + int status; /* as the name implies */ + Bytef *pending_buf; /* output still pending */ + ulg pending_buf_size; /* size of pending_buf */ + Bytef *pending_out; /* next pending byte to output to the stream */ + ulg pending; /* nb of bytes in the pending buffer */ + int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ + gz_headerp gzhead; /* gzip header information to write */ + ulg gzindex; /* where in extra, name, or comment */ + Byte method; /* can only be DEFLATED */ + int last_flush; /* value of flush param for previous deflate call */ + + /* used by deflate.c: */ + + uInt w_size; /* LZ77 window size (32K by default) */ + uInt w_bits; /* log2(w_size) (8..16) */ + uInt w_mask; /* w_size - 1 */ + + Bytef *window; + /* Sliding window. Input bytes are read into the second half of the window, + * and move to the first half later to keep a dictionary of at least wSize + * bytes. With this organization, matches are limited to a distance of + * wSize-MAX_MATCH bytes, but this ensures that IO is always + * performed with a length multiple of the block size. Also, it limits + * the window size to 64K, which is quite useful on MSDOS. + * To do: use the user input buffer as sliding window. + */ + + ulg window_size; + /* Actual size of window: 2*wSize, except when the user input buffer + * is directly used as sliding window. + */ + + Posf *prev; + /* Link to older string with same hash index. To limit the size of this + * array to 64K, this link is maintained only for the last 32K strings. + * An index in this array is thus a window index modulo 32K. + */ + + Posf *head; /* Heads of the hash chains or NIL. */ + + uInt ins_h; /* hash index of string to be inserted */ + uInt hash_size; /* number of elements in hash table */ + uInt hash_bits; /* log2(hash_size) */ + uInt hash_mask; /* hash_size-1 */ + + uInt hash_shift; + /* Number of bits by which ins_h must be shifted at each input + * step. It must be such that after MIN_MATCH steps, the oldest + * byte no longer takes part in the hash key, that is: + * hash_shift * MIN_MATCH >= hash_bits + */ + + long block_start; + /* Window position at the beginning of the current output block. Gets + * negative when the window is moved backwards. + */ + + uInt match_length; /* length of best match */ + IPos prev_match; /* previous match */ + int match_available; /* set if previous match exists */ + uInt strstart; /* start of string to insert */ + uInt match_start; /* start of matching string */ + uInt lookahead; /* number of valid bytes ahead in window */ + + uInt prev_length; + /* Length of the best match at previous step. Matches not greater than this + * are discarded. This is used in the lazy match evaluation. + */ + + uInt max_chain_length; + /* To speed up deflation, hash chains are never searched beyond this + * length. A higher limit improves compression ratio but degrades the + * speed. + */ + + uInt max_lazy_match; + /* Attempt to find a better match only when the current match is strictly + * smaller than this value. This mechanism is used only for compression + * levels >= 4. + */ +# define max_insert_length max_lazy_match + /* Insert new strings in the hash table only if the match length is not + * greater than this length. This saves time but degrades compression. + * max_insert_length is used only for compression levels <= 3. + */ + + int level; /* compression level (1..9) */ + int strategy; /* favor or force Huffman coding*/ + + uInt good_match; + /* Use a faster search when the previous match is longer than this */ + + int nice_match; /* Stop searching when current match exceeds this */ + + /* used by trees.c: */ + /* Didn't use ct_data typedef below to suppress compiler warning */ + struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ + struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ + struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ + + struct tree_desc_s l_desc; /* desc. for literal tree */ + struct tree_desc_s d_desc; /* desc. for distance tree */ + struct tree_desc_s bl_desc; /* desc. for bit length tree */ + + ush bl_count[MAX_BITS+1]; + /* number of codes at each bit length for an optimal tree */ + + int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ + int heap_len; /* number of elements in the heap */ + int heap_max; /* element of largest frequency */ + /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. + * The same heap array is used to build all trees. + */ + + uch depth[2*L_CODES+1]; + /* Depth of each subtree used as tie breaker for trees of equal frequency + */ + +#ifdef LIT_MEM +# define LIT_BUFS 5 + ushf *d_buf; /* buffer for distances */ + uchf *l_buf; /* buffer for literals/lengths */ +#else +# define LIT_BUFS 4 + uchf *sym_buf; /* buffer for distances and literals/lengths */ +#endif + + uInt lit_bufsize; + /* Size of match buffer for literals/lengths. There are 4 reasons for + * limiting lit_bufsize to 64K: + * - frequencies can be kept in 16 bit counters + * - if compression is not successful for the first block, all input + * data is still in the window so we can still emit a stored block even + * when input comes from standard input. (This can also be done for + * all blocks if lit_bufsize is not greater than 32K.) + * - if compression is not successful for a file smaller than 64K, we can + * even emit a stored file instead of a stored block (saving 5 bytes). + * This is applicable only for zip (not gzip or zlib). + * - creating new Huffman trees less frequently may not provide fast + * adaptation to changes in the input data statistics. (Take for + * example a binary file with poorly compressible code followed by + * a highly compressible string table.) Smaller buffer sizes give + * fast adaptation but have of course the overhead of transmitting + * trees more frequently. + * - I can't count above 4 + */ + + uInt sym_next; /* running index in symbol buffer */ + uInt sym_end; /* symbol table full when sym_next reaches this */ + + ulg opt_len; /* bit length of current block with optimal trees */ + ulg static_len; /* bit length of current block with static trees */ + uInt matches; /* number of string matches in current block */ + uInt insert; /* bytes at end of window left to insert */ + +#ifdef ZLIB_DEBUG + ulg compressed_len; /* total bit length of compressed file mod 2^32 */ + ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ +#endif + + ush bi_buf; + /* Output buffer. bits are inserted starting at the bottom (least + * significant bits). + */ + int bi_valid; + /* Number of valid bits in bi_buf. All bits above the last valid bit + * are always zero. + */ + + ulg high_water; + /* High water mark offset in window for initialized bytes -- bytes above + * this are set to zero in order to avoid memory check warnings when + * longest match routines access bytes past the input. This is then + * updated to the new high water mark. + */ + +} FAR deflate_state; + +/* Output a byte on the stream. + * IN assertion: there is enough room in pending_buf. + */ +#define put_byte(s, c) {s->pending_buf[s->pending++] = (Bytef)(c);} + + +#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) +/* Minimum amount of lookahead, except at the end of the input file. + * See deflate.c for comments about the MIN_MATCH+1. + */ + +#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) +/* In order to simplify the code, particularly on 16 bit machines, match + * distances are limited to MAX_DIST instead of WSIZE. + */ + +#define WIN_INIT MAX_MATCH +/* Number of bytes after end of data in window to initialize in order to avoid + memory checker errors from longest match routines */ + + /* in trees.c */ +void ZLIB_INTERNAL _tr_init(deflate_state *s); +int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc); +void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, + ulg stored_len, int last); +void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s); +void ZLIB_INTERNAL _tr_align(deflate_state *s); +void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf, + ulg stored_len, int last); + +#define d_code(dist) \ + ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) +/* Mapping from a distance to a distance code. dist is the distance - 1 and + * must not have side effects. _dist_code[256] and _dist_code[257] are never + * used. + */ + +#ifndef ZLIB_DEBUG +/* Inline versions of _tr_tally for speed: */ + +#if defined(GEN_TREES_H) || !defined(STDC) + extern uch ZLIB_INTERNAL _length_code[]; + extern uch ZLIB_INTERNAL _dist_code[]; +#else + extern const uch ZLIB_INTERNAL _length_code[]; + extern const uch ZLIB_INTERNAL _dist_code[]; +#endif + +#ifdef LIT_MEM +# define _tr_tally_lit(s, c, flush) \ + { uch cc = (c); \ + s->d_buf[s->sym_next] = 0; \ + s->l_buf[s->sym_next++] = cc; \ + s->dyn_ltree[cc].Freq++; \ + flush = (s->sym_next == s->sym_end); \ + } +# define _tr_tally_dist(s, distance, length, flush) \ + { uch len = (uch)(length); \ + ush dist = (ush)(distance); \ + s->d_buf[s->sym_next] = dist; \ + s->l_buf[s->sym_next++] = len; \ + dist--; \ + s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ + s->dyn_dtree[d_code(dist)].Freq++; \ + flush = (s->sym_next == s->sym_end); \ + } +#else +# define _tr_tally_lit(s, c, flush) \ + { uch cc = (c); \ + s->sym_buf[s->sym_next++] = 0; \ + s->sym_buf[s->sym_next++] = 0; \ + s->sym_buf[s->sym_next++] = cc; \ + s->dyn_ltree[cc].Freq++; \ + flush = (s->sym_next == s->sym_end); \ + } +# define _tr_tally_dist(s, distance, length, flush) \ + { uch len = (uch)(length); \ + ush dist = (ush)(distance); \ + s->sym_buf[s->sym_next++] = (uch)dist; \ + s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \ + s->sym_buf[s->sym_next++] = len; \ + dist--; \ + s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ + s->dyn_dtree[d_code(dist)].Freq++; \ + flush = (s->sym_next == s->sym_end); \ + } +#endif +#else +# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) +# define _tr_tally_dist(s, distance, length, flush) \ + flush = _tr_tally(s, distance, length) +#endif + +#endif /* DEFLATE_H */ diff --git a/widget/milsko/milskosrc/external/libz/include/gzguts.h b/widget/milsko/milskosrc/external/libz/include/gzguts.h new file mode 100644 index 0000000000..eba72085bb --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/include/gzguts.h @@ -0,0 +1,214 @@ +/* gzguts.h -- zlib internal header definitions for gz* operations + * Copyright (C) 2004-2024 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#ifdef _LARGEFILE64_SOURCE +# ifndef _LARGEFILE_SOURCE +# define _LARGEFILE_SOURCE 1 +# endif +# undef _FILE_OFFSET_BITS +# undef _TIME_BITS +#endif + +#ifdef HAVE_HIDDEN +# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) +#else +# define ZLIB_INTERNAL +#endif + +#include +#include "zlib.h" +#ifdef STDC +# include +# include +# include +#endif + +#ifndef _POSIX_SOURCE +# define _POSIX_SOURCE +#endif +#include + +#ifdef _WIN32 +# include +#endif + +#if defined(__TURBOC__) || defined(_MSC_VER) || defined(_WIN32) +# include +#endif + +#if defined(_WIN32) +# define WIDECHAR +#endif + +#ifdef WINAPI_FAMILY +# define open _open +# define read _read +# define write _write +# define close _close +#endif + +#ifdef NO_DEFLATE /* for compatibility with old definition */ +# define NO_GZCOMPRESS +#endif + +#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) +# ifndef HAVE_VSNPRINTF +# define HAVE_VSNPRINTF +# endif +#endif + +#if defined(__CYGWIN__) +# ifndef HAVE_VSNPRINTF +# define HAVE_VSNPRINTF +# endif +#endif + +#if defined(MSDOS) && defined(__BORLANDC__) && (BORLANDC > 0x410) +# ifndef HAVE_VSNPRINTF +# define HAVE_VSNPRINTF +# endif +#endif + +#ifndef HAVE_VSNPRINTF +# ifdef MSDOS +/* vsnprintf may exist on some MS-DOS compilers (DJGPP?), + but for now we just assume it doesn't. */ +# define NO_vsnprintf +# endif +# ifdef __TURBOC__ +# define NO_vsnprintf +# endif +# ifdef WIN32 +/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ +# if !defined(vsnprintf) && !defined(NO_vsnprintf) +# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 ) +# define vsnprintf _vsnprintf +# endif +# endif +# endif +# ifdef __SASC +# define NO_vsnprintf +# endif +# ifdef VMS +# define NO_vsnprintf +# endif +# ifdef __OS400__ +# define NO_vsnprintf +# endif +# ifdef __MVS__ +# define NO_vsnprintf +# endif +#endif + +/* unlike snprintf (which is required in C99), _snprintf does not guarantee + null termination of the result -- however this is only used in gzlib.c where + the result is assured to fit in the space provided */ +#if defined(_MSC_VER) && _MSC_VER < 1900 +# define snprintf _snprintf +#endif + +#ifndef local +# define local static +#endif +/* since "static" is used to mean two completely different things in C, we + define "local" for the non-static meaning of "static", for readability + (compile with -Dlocal if your debugger can't find static symbols) */ + +/* gz* functions always use library allocation functions */ +#ifndef STDC + extern voidp malloc(uInt size); + extern void free(voidpf ptr); +#endif + +/* get errno and strerror definition */ +#if defined UNDER_CE +# include +# define zstrerror() gz_strwinerror((DWORD)GetLastError()) +#else +# ifndef NO_STRERROR +# include +# define zstrerror() strerror(errno) +# else +# define zstrerror() "stdio error (consult errno)" +# endif +#endif + +/* provide prototypes for these when building zlib without LFS */ +#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0 + ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); + ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int); + ZEXTERN z_off64_t ZEXPORT gztell64(gzFile); + ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile); +#endif + +/* default memLevel */ +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif + +/* default i/o buffer size -- double this for output when reading (this and + twice this must be able to fit in an unsigned type) */ +#define GZBUFSIZE 8192 + +/* gzip modes, also provide a little integrity check on the passed structure */ +#define GZ_NONE 0 +#define GZ_READ 7247 +#define GZ_WRITE 31153 +#define GZ_APPEND 1 /* mode set to GZ_WRITE after the file is opened */ + +/* values for gz_state how */ +#define LOOK 0 /* look for a gzip header */ +#define COPY 1 /* copy input directly */ +#define GZIP 2 /* decompress a gzip stream */ + +/* internal gzip file state data structure */ +typedef struct { + /* exposed contents for gzgetc() macro */ + struct gzFile_s x; /* "x" for exposed */ + /* x.have: number of bytes available at x.next */ + /* x.next: next output data to deliver or write */ + /* x.pos: current position in uncompressed data */ + /* used for both reading and writing */ + int mode; /* see gzip modes above */ + int fd; /* file descriptor */ + char *path; /* path or fd for error messages */ + unsigned size; /* buffer size, zero if not allocated yet */ + unsigned want; /* requested buffer size, default is GZBUFSIZE */ + unsigned char *in; /* input buffer (double-sized when writing) */ + unsigned char *out; /* output buffer (double-sized when reading) */ + int direct; /* 0 if processing gzip, 1 if transparent */ + /* just for reading */ + int how; /* 0: get header, 1: copy, 2: decompress */ + z_off64_t start; /* where the gzip data started, for rewinding */ + int eof; /* true if end of input file reached */ + int past; /* true if read requested past end */ + /* just for writing */ + int level; /* compression level */ + int strategy; /* compression strategy */ + int reset; /* true if a reset is pending after a Z_FINISH */ + /* seek request */ + z_off64_t skip; /* amount to skip (already rewound if backwards) */ + int seek; /* true if seek request pending */ + /* error information */ + int err; /* error code */ + char *msg; /* error message */ + /* zlib inflate or deflate stream */ + z_stream strm; /* stream structure in-place (not a pointer) */ +} gz_state; +typedef gz_state FAR *gz_statep; + +/* shared functions */ +void ZLIB_INTERNAL gz_error(gz_statep, int, const char *); +#if defined UNDER_CE +char ZLIB_INTERNAL *gz_strwinerror(DWORD error); +#endif + +/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t + value -- needed when comparing unsigned to z_off64_t, which is signed + (possible z_off64_t types off_t, off64_t, and long are all signed) */ +unsigned ZLIB_INTERNAL gz_intmax(void); +#define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax()) diff --git a/widget/milsko/milskosrc/external/libz/include/inffast.h b/widget/milsko/milskosrc/external/libz/include/inffast.h new file mode 100644 index 0000000000..49c6d156c5 --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/include/inffast.h @@ -0,0 +1,11 @@ +/* inffast.h -- header to use inffast.c + * Copyright (C) 1995-2003, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start); diff --git a/widget/milsko/milskosrc/external/libz/include/inffixed.h b/widget/milsko/milskosrc/external/libz/include/inffixed.h new file mode 100644 index 0000000000..d628327769 --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/include/inffixed.h @@ -0,0 +1,94 @@ + /* inffixed.h -- table for decoding fixed codes + * Generated automatically by makefixed(). + */ + + /* WARNING: this file should *not* be used by applications. + It is part of the implementation of this library and is + subject to change. Applications should only use zlib.h. + */ + + static const code lenfix[512] = { + {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48}, + {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128}, + {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59}, + {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176}, + {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20}, + {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100}, + {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8}, + {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216}, + {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76}, + {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114}, + {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2}, + {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148}, + {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42}, + {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86}, + {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15}, + {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236}, + {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62}, + {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142}, + {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31}, + {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162}, + {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25}, + {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105}, + {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4}, + {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202}, + {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69}, + {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125}, + {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13}, + {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195}, + {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35}, + {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91}, + {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19}, + {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246}, + {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55}, + {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135}, + {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99}, + {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190}, + {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16}, + {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96}, + {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6}, + {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209}, + {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72}, + {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116}, + {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4}, + {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153}, + {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44}, + {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82}, + {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11}, + {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229}, + {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58}, + {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138}, + {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51}, + {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173}, + {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30}, + {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110}, + {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0}, + {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195}, + {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65}, + {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121}, + {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9}, + {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258}, + {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37}, + {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93}, + {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23}, + {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251}, + {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51}, + {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131}, + {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67}, + {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183}, + {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23}, + {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103}, + {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9}, + {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223}, + {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79}, + {0,9,255} + }; + + static const code distfix[32] = { + {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025}, + {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193}, + {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385}, + {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577}, + {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073}, + {22,5,193},{64,5,0} + }; diff --git a/widget/milsko/milskosrc/external/libz/include/inflate.h b/widget/milsko/milskosrc/external/libz/include/inflate.h new file mode 100644 index 0000000000..f127b6b1fa --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/include/inflate.h @@ -0,0 +1,126 @@ +/* inflate.h -- internal inflate state definition + * Copyright (C) 1995-2019 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* define NO_GZIP when compiling if you want to disable gzip header and + trailer decoding by inflate(). NO_GZIP would be used to avoid linking in + the crc code when it is not needed. For shared libraries, gzip decoding + should be left enabled. */ +#ifndef NO_GZIP +# define GUNZIP +#endif + +/* Possible inflate modes between inflate() calls */ +typedef enum { + HEAD = 16180, /* i: waiting for magic header */ + FLAGS, /* i: waiting for method and flags (gzip) */ + TIME, /* i: waiting for modification time (gzip) */ + OS, /* i: waiting for extra flags and operating system (gzip) */ + EXLEN, /* i: waiting for extra length (gzip) */ + EXTRA, /* i: waiting for extra bytes (gzip) */ + NAME, /* i: waiting for end of file name (gzip) */ + COMMENT, /* i: waiting for end of comment (gzip) */ + HCRC, /* i: waiting for header crc (gzip) */ + DICTID, /* i: waiting for dictionary check value */ + DICT, /* waiting for inflateSetDictionary() call */ + TYPE, /* i: waiting for type bits, including last-flag bit */ + TYPEDO, /* i: same, but skip check to exit inflate on new block */ + STORED, /* i: waiting for stored size (length and complement) */ + COPY_, /* i/o: same as COPY below, but only first time in */ + COPY, /* i/o: waiting for input or output to copy stored block */ + TABLE, /* i: waiting for dynamic block table lengths */ + LENLENS, /* i: waiting for code length code lengths */ + CODELENS, /* i: waiting for length/lit and distance code lengths */ + LEN_, /* i: same as LEN below, but only first time in */ + LEN, /* i: waiting for length/lit/eob code */ + LENEXT, /* i: waiting for length extra bits */ + DIST, /* i: waiting for distance code */ + DISTEXT, /* i: waiting for distance extra bits */ + MATCH, /* o: waiting for output space to copy string */ + LIT, /* o: waiting for output space to write literal */ + CHECK, /* i: waiting for 32-bit check value */ + LENGTH, /* i: waiting for 32-bit length (gzip) */ + DONE, /* finished check, done -- remain here until reset */ + BAD, /* got a data error -- remain here until reset */ + MEM, /* got an inflate() memory error -- remain here until reset */ + SYNC /* looking for synchronization bytes to restart inflate() */ +} inflate_mode; + +/* + State transitions between above modes - + + (most modes can go to BAD or MEM on error -- not shown for clarity) + + Process header: + HEAD -> (gzip) or (zlib) or (raw) + (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT -> + HCRC -> TYPE + (zlib) -> DICTID or TYPE + DICTID -> DICT -> TYPE + (raw) -> TYPEDO + Read deflate blocks: + TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK + STORED -> COPY_ -> COPY -> TYPE + TABLE -> LENLENS -> CODELENS -> LEN_ + LEN_ -> LEN + Read deflate codes in fixed or dynamic block: + LEN -> LENEXT or LIT or TYPE + LENEXT -> DIST -> DISTEXT -> MATCH -> LEN + LIT -> LEN + Process trailer: + CHECK -> LENGTH -> DONE + */ + +/* State maintained between inflate() calls -- approximately 7K bytes, not + including the allocated sliding window, which is up to 32K bytes. */ +struct inflate_state { + z_streamp strm; /* pointer back to this zlib stream */ + inflate_mode mode; /* current inflate mode */ + int last; /* true if processing last block */ + int wrap; /* bit 0 true for zlib, bit 1 true for gzip, + bit 2 true to validate check value */ + int havedict; /* true if dictionary provided */ + int flags; /* gzip header method and flags, 0 if zlib, or + -1 if raw or no header yet */ + unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */ + unsigned long check; /* protected copy of check value */ + unsigned long total; /* protected copy of output count */ + gz_headerp head; /* where to save gzip header information */ + /* sliding window */ + unsigned wbits; /* log base 2 of requested window size */ + unsigned wsize; /* window size or zero if not using window */ + unsigned whave; /* valid bytes in the window */ + unsigned wnext; /* window write index */ + unsigned char FAR *window; /* allocated sliding window, if needed */ + /* bit accumulator */ + unsigned long hold; /* input bit accumulator */ + unsigned bits; /* number of bits in "in" */ + /* for string and stored block copying */ + unsigned length; /* literal or length of data to copy */ + unsigned offset; /* distance back to copy string from */ + /* for table and code decoding */ + unsigned extra; /* extra bits needed */ + /* fixed and dynamic code tables */ + code const FAR *lencode; /* starting table for length/literal codes */ + code const FAR *distcode; /* starting table for distance codes */ + unsigned lenbits; /* index bits for lencode */ + unsigned distbits; /* index bits for distcode */ + /* dynamic table building */ + unsigned ncode; /* number of code length code lengths */ + unsigned nlen; /* number of length code lengths */ + unsigned ndist; /* number of distance code lengths */ + unsigned have; /* number of code lengths in lens[] */ + code FAR *next; /* next available space in codes[] */ + unsigned short lens[320]; /* temporary storage for code lengths */ + unsigned short work[288]; /* work area for code table building */ + code codes[ENOUGH]; /* space for code tables */ + int sane; /* if false, allow invalid distance too far */ + int back; /* bits back of last unprocessed length/lit */ + unsigned was; /* initial length of match */ +}; diff --git a/widget/milsko/milskosrc/external/libz/include/inftrees.h b/widget/milsko/milskosrc/external/libz/include/inftrees.h new file mode 100644 index 0000000000..396f74b5da --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/include/inftrees.h @@ -0,0 +1,62 @@ +/* inftrees.h -- header to use inftrees.c + * Copyright (C) 1995-2005, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* Structure for decoding tables. Each entry provides either the + information needed to do the operation requested by the code that + indexed that table entry, or it provides a pointer to another + table that indexes more bits of the code. op indicates whether + the entry is a pointer to another table, a literal, a length or + distance, an end-of-block, or an invalid code. For a table + pointer, the low four bits of op is the number of index bits of + that table. For a length or distance, the low four bits of op + is the number of extra bits to get after the code. bits is + the number of bits in this code or part of the code to drop off + of the bit buffer. val is the actual byte to output in the case + of a literal, the base length or distance, or the offset from + the current table to the next table. Each entry is four bytes. */ +typedef struct { + unsigned char op; /* operation, extra bits, table bits */ + unsigned char bits; /* bits in this part of the code */ + unsigned short val; /* offset in table or code value */ +} code; + +/* op values as set by inflate_table(): + 00000000 - literal + 0000tttt - table link, tttt != 0 is the number of table index bits + 0001eeee - length or distance, eeee is the number of extra bits + 01100000 - end of block + 01000000 - invalid code + */ + +/* Maximum size of the dynamic table. The maximum number of code structures is + 1444, which is the sum of 852 for literal/length codes and 592 for distance + codes. These values were found by exhaustive searches using the program + examples/enough.c found in the zlib distribution. The arguments to that + program are the number of symbols, the initial root table size, and the + maximum bit length of a code. "enough 286 9 15" for literal/length codes + returns 852, and "enough 30 6 15" for distance codes returns 592. The + initial root table size (9 or 6) is found in the fifth argument of the + inflate_table() calls in inflate.c and infback.c. If the root table size is + changed, then these maximum sizes would be need to be recalculated and + updated. */ +#define ENOUGH_LENS 852 +#define ENOUGH_DISTS 592 +#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS) + +/* Type of code to build for inflate_table() */ +typedef enum { + CODES, + LENS, + DISTS +} codetype; + +int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, + unsigned codes, code FAR * FAR *table, + unsigned FAR *bits, unsigned short FAR *work); diff --git a/widget/milsko/milskosrc/external/libz/include/trees.h b/widget/milsko/milskosrc/external/libz/include/trees.h new file mode 100644 index 0000000000..d35639d82a --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/include/trees.h @@ -0,0 +1,128 @@ +/* header created automatically with -DGEN_TREES_H */ + +local const ct_data static_ltree[L_CODES+2] = { +{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}}, +{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}}, +{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}}, +{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}}, +{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}}, +{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}}, +{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}}, +{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}}, +{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}}, +{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}}, +{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}}, +{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}}, +{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}}, +{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}}, +{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}}, +{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}}, +{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}}, +{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}}, +{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}}, +{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}}, +{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}}, +{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}}, +{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}}, +{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}}, +{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}}, +{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}}, +{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}}, +{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}}, +{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}}, +{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}}, +{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}}, +{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}}, +{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}}, +{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}}, +{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}}, +{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}}, +{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}}, +{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}}, +{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}}, +{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}}, +{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}}, +{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}}, +{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}}, +{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}}, +{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}}, +{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}}, +{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}}, +{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}}, +{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}}, +{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}}, +{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}}, +{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}}, +{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}}, +{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}}, +{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}}, +{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}}, +{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}}, +{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}} +}; + +local const ct_data static_dtree[D_CODES] = { +{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}}, +{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}}, +{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}}, +{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}}, +{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}}, +{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} +}; + +const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = { + 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, + 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, +10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, +11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, +12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, +13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, +13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, +14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, +15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17, +18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, +23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, +28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, +29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 +}; + +const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, +13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, +17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, +19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, +21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, +22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, +23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, +25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, +25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, +26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, +27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28 +}; + +local const int base_length[LENGTH_CODES] = { +0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, +64, 80, 96, 112, 128, 160, 192, 224, 0 +}; + +local const int base_dist[D_CODES] = { + 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, + 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, + 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576 +}; + diff --git a/widget/milsko/milskosrc/external/libz/include/zconf.h b/widget/milsko/milskosrc/external/libz/include/zconf.h new file mode 100644 index 0000000000..44a29f213d --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/include/zconf.h @@ -0,0 +1,547 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#ifndef ZCONF_H +#define ZCONF_H + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + * Even better than compiling with -DZ_PREFIX would be to use configure to set + * this permanently in zconf.h using "./configure --zprefix". + */ +#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ +# define Z_PREFIX_SET + +/* all linked symbols and init macros */ +# define _dist_code z__dist_code +# define _length_code z__length_code +# define _tr_align z__tr_align +# define _tr_flush_bits z__tr_flush_bits +# define _tr_flush_block z__tr_flush_block +# define _tr_init z__tr_init +# define _tr_stored_block z__tr_stored_block +# define _tr_tally z__tr_tally +# define adler32 z_adler32 +# define adler32_combine z_adler32_combine +# define adler32_combine64 z_adler32_combine64 +# define adler32_z z_adler32_z +# ifndef Z_SOLO +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# endif +# define crc32 z_crc32 +# define crc32_combine z_crc32_combine +# define crc32_combine64 z_crc32_combine64 +# define crc32_combine_gen z_crc32_combine_gen +# define crc32_combine_gen64 z_crc32_combine_gen64 +# define crc32_combine_op z_crc32_combine_op +# define crc32_z z_crc32_z +# define deflate z_deflate +# define deflateBound z_deflateBound +# define deflateCopy z_deflateCopy +# define deflateEnd z_deflateEnd +# define deflateGetDictionary z_deflateGetDictionary +# define deflateInit z_deflateInit +# define deflateInit2 z_deflateInit2 +# define deflateInit2_ z_deflateInit2_ +# define deflateInit_ z_deflateInit_ +# define deflateParams z_deflateParams +# define deflatePending z_deflatePending +# define deflatePrime z_deflatePrime +# define deflateReset z_deflateReset +# define deflateResetKeep z_deflateResetKeep +# define deflateSetDictionary z_deflateSetDictionary +# define deflateSetHeader z_deflateSetHeader +# define deflateTune z_deflateTune +# define deflate_copyright z_deflate_copyright +# define get_crc_table z_get_crc_table +# ifndef Z_SOLO +# define gz_error z_gz_error +# define gz_intmax z_gz_intmax +# define gz_strwinerror z_gz_strwinerror +# define gzbuffer z_gzbuffer +# define gzclearerr z_gzclearerr +# define gzclose z_gzclose +# define gzclose_r z_gzclose_r +# define gzclose_w z_gzclose_w +# define gzdirect z_gzdirect +# define gzdopen z_gzdopen +# define gzeof z_gzeof +# define gzerror z_gzerror +# define gzflush z_gzflush +# define gzfread z_gzfread +# define gzfwrite z_gzfwrite +# define gzgetc z_gzgetc +# define gzgetc_ z_gzgetc_ +# define gzgets z_gzgets +# define gzoffset z_gzoffset +# define gzoffset64 z_gzoffset64 +# define gzopen z_gzopen +# define gzopen64 z_gzopen64 +# ifdef _WIN32 +# define gzopen_w z_gzopen_w +# endif +# define gzprintf z_gzprintf +# define gzputc z_gzputc +# define gzputs z_gzputs +# define gzread z_gzread +# define gzrewind z_gzrewind +# define gzseek z_gzseek +# define gzseek64 z_gzseek64 +# define gzsetparams z_gzsetparams +# define gztell z_gztell +# define gztell64 z_gztell64 +# define gzungetc z_gzungetc +# define gzvprintf z_gzvprintf +# define gzwrite z_gzwrite +# endif +# define inflate z_inflate +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define inflateBackInit z_inflateBackInit +# define inflateBackInit_ z_inflateBackInit_ +# define inflateCodesUsed z_inflateCodesUsed +# define inflateCopy z_inflateCopy +# define inflateEnd z_inflateEnd +# define inflateGetDictionary z_inflateGetDictionary +# define inflateGetHeader z_inflateGetHeader +# define inflateInit z_inflateInit +# define inflateInit2 z_inflateInit2 +# define inflateInit2_ z_inflateInit2_ +# define inflateInit_ z_inflateInit_ +# define inflateMark z_inflateMark +# define inflatePrime z_inflatePrime +# define inflateReset z_inflateReset +# define inflateReset2 z_inflateReset2 +# define inflateResetKeep z_inflateResetKeep +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateUndermine z_inflateUndermine +# define inflateValidate z_inflateValidate +# define inflate_copyright z_inflate_copyright +# define inflate_fast z_inflate_fast +# define inflate_table z_inflate_table +# ifndef Z_SOLO +# define uncompress z_uncompress +# define uncompress2 z_uncompress2 +# endif +# define zError z_zError +# ifndef Z_SOLO +# define zcalloc z_zcalloc +# define zcfree z_zcfree +# endif +# define zlibCompileFlags z_zlibCompileFlags +# define zlibVersion z_zlibVersion + +/* all zlib typedefs in zlib.h and zconf.h */ +# define Byte z_Byte +# define Bytef z_Bytef +# define alloc_func z_alloc_func +# define charf z_charf +# define free_func z_free_func +# ifndef Z_SOLO +# define gzFile z_gzFile +# endif +# define gz_header z_gz_header +# define gz_headerp z_gz_headerp +# define in_func z_in_func +# define intf z_intf +# define out_func z_out_func +# define uInt z_uInt +# define uIntf z_uIntf +# define uLong z_uLong +# define uLongf z_uLongf +# define voidp z_voidp +# define voidpc z_voidpc +# define voidpf z_voidpf + +/* all zlib structs in zlib.h and zconf.h */ +# define gz_header_s z_gz_header_s +# define internal_state z_internal_state + +#endif + +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) +# define OS2 +#endif +#if defined(_WINDOWS) && !defined(WINDOWS) +# define WINDOWS +#endif +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) +# ifndef WIN32 +# define WIN32 +# endif +#endif +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) +# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) +# ifndef SYS16BIT +# define SYS16BIT +# endif +# endif +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#ifdef SYS16BIT +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) +# define STDC +#endif +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) +# define STDC +#endif +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) +# define STDC +#endif +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) +# define STDC +#endif + +#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ +# define STDC +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const /* note: need a more gentle solution here */ +# endif +#endif + +#if defined(ZLIB_CONST) && !defined(z_const) +# define z_const const +#else +# define z_const +#endif + +#ifdef Z_SOLO +# ifdef _WIN64 + typedef unsigned long long z_size_t; +# else + typedef unsigned long z_size_t; +# endif +#else +# define z_longlong long long +# if defined(NO_SIZE_T) + typedef unsigned NO_SIZE_T z_size_t; +# elif defined(STDC) +# include + typedef size_t z_size_t; +# else + typedef unsigned long z_size_t; +# endif +# undef z_longlong +#endif + +/* Maximum value for memLevel in deflateInit2 */ +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +# define MAX_MEM_LEVEL 8 +# else +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +# define MAX_WBITS 15 /* 32K LZ77 window */ +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus about 7 kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +# define OF(args) args +# else +# define OF(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#ifdef SYS16BIT +# if defined(M_I86SM) || defined(M_I86MM) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +# endif +# if (defined(__SMALL__) || defined(__MEDIUM__)) + /* Turbo C small or medium model */ +# define SMALL_MEDIUM +# ifdef __BORLANDC__ +# define FAR _far +# else +# define FAR far +# endif +# endif +#endif + +#if defined(WINDOWS) || defined(WIN32) + /* If building or using zlib as a DLL, define ZLIB_DLL. + * This is not mandatory, but it offers a little performance increase. + */ +# ifdef ZLIB_DLL +# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) +# ifdef ZLIB_INTERNAL +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +# endif +# endif /* ZLIB_DLL */ + /* If building or using zlib with the WINAPI/WINAPIV calling convention, + * define ZLIB_WINAPI. + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. + */ +# ifdef ZLIB_WINAPI +# ifdef FAR +# undef FAR +# endif +# ifndef WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif +# include + /* No need for _export, use ZLIB.DEF instead. */ + /* For complete Windows compatibility, use WINAPI, not __stdcall. */ +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR CDECL +# endif +# endif +#endif + +#if defined (__BEOS__) +# ifdef ZLIB_DLL +# ifdef ZLIB_INTERNAL +# define ZEXPORT __declspec(dllexport) +# define ZEXPORTVA __declspec(dllexport) +# else +# define ZEXPORT __declspec(dllimport) +# define ZEXPORTVA __declspec(dllimport) +# endif +# endif +#endif + +#ifndef ZEXTERN +# define ZEXTERN extern +#endif +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif + +#ifndef FAR +# define FAR +#endif + +#if !defined(__MACTYPES__) +typedef unsigned char Byte; /* 8 bits */ +#endif +typedef unsigned int uInt; /* 16 bits or more */ +typedef unsigned long uLong; /* 32 bits or more */ + +#ifdef SMALL_MEDIUM + /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + typedef Byte FAR Bytef; +#endif +typedef char FAR charf; +typedef int FAR intf; +typedef uInt FAR uIntf; +typedef uLong FAR uLongf; + +#ifdef STDC + typedef void const *voidpc; + typedef void FAR *voidpf; + typedef void *voidp; +#else + typedef Byte const *voidpc; + typedef Byte FAR *voidpf; + typedef Byte *voidp; +#endif + +#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) +# include +# if (UINT_MAX == 0xffffffffUL) +# define Z_U4 unsigned +# elif (ULONG_MAX == 0xffffffffUL) +# define Z_U4 unsigned long +# elif (USHRT_MAX == 0xffffffffUL) +# define Z_U4 unsigned short +# endif +#endif + +#ifdef Z_U4 + typedef Z_U4 z_crc_t; +#else + typedef unsigned long z_crc_t; +#endif + +#ifndef _WIN32 +#define HAVE_UNISTD_H +#endif + +#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_UNISTD_H +#endif + +#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */ +# define Z_HAVE_STDARG_H +#endif + +#ifdef STDC +# ifndef Z_SOLO +# include /* for off_t */ +# endif +#endif + +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +# include /* for va_list */ +# endif +#endif + +#ifdef _WIN32 +# ifndef Z_SOLO +# include /* for wchar_t */ +# endif +#endif + +/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and + * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even + * though the former does not conform to the LFS document), but considering + * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as + * equivalently requesting no 64-bit operations + */ +#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 +# undef _LARGEFILE64_SOURCE +#endif + +#ifndef Z_HAVE_UNISTD_H +# ifdef __WATCOMC__ +# define Z_HAVE_UNISTD_H +# endif +#endif +#ifndef Z_HAVE_UNISTD_H +# if defined(_LARGEFILE64_SOURCE) && !defined(_WIN32) +# define Z_HAVE_UNISTD_H +# endif +#endif +#ifndef Z_SOLO +# if defined(Z_HAVE_UNISTD_H) +# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ +# ifdef VMS +# include /* for off_t */ +# endif +# ifndef z_off_t +# define z_off_t off_t +# endif +# endif +#endif + +#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 +# define Z_LFS64 +#endif + +#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) +# define Z_LARGE64 +#endif + +#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) +# define Z_WANT64 +#endif + +#if !defined(SEEK_SET) && !defined(Z_SOLO) +# define SEEK_SET 0 /* Seek from beginning of file. */ +# define SEEK_CUR 1 /* Seek from current position. */ +# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ +#endif + +#ifndef z_off_t +# define z_off_t long +#endif + +#if !defined(_WIN32) && defined(Z_LARGE64) +# define z_off64_t off64_t +#else +# if defined(_WIN32) && !defined(__GNUC__) +# define z_off64_t __int64 +# else +# define z_off64_t z_off_t +# endif +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) + #pragma map(deflateInit_,"DEIN") + #pragma map(deflateInit2_,"DEIN2") + #pragma map(deflateEnd,"DEEND") + #pragma map(deflateBound,"DEBND") + #pragma map(inflateInit_,"ININ") + #pragma map(inflateInit2_,"ININ2") + #pragma map(inflateEnd,"INEND") + #pragma map(inflateSync,"INSY") + #pragma map(inflateSetDictionary,"INSEDI") + #pragma map(compressBound,"CMBND") + #pragma map(inflate_table,"INTABL") + #pragma map(inflate_fast,"INFA") + #pragma map(inflate_copyright,"INCOPY") +#endif + +#endif /* ZCONF_H */ diff --git a/widget/milsko/milskosrc/external/libz/include/zlib.h b/widget/milsko/milskosrc/external/libz/include/zlib.h new file mode 100644 index 0000000000..8d4b932eaf --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/include/zlib.h @@ -0,0 +1,1938 @@ +/* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.3.1, January 22nd, 2024 + + Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + + + The data format used by the zlib library is described by RFCs (Request for + Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950 + (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format). +*/ + +#ifndef ZLIB_H +#define ZLIB_H + +#include "zconf.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define ZLIB_VERSION "1.3.1" +#define ZLIB_VERNUM 0x1310 +#define ZLIB_VER_MAJOR 1 +#define ZLIB_VER_MINOR 3 +#define ZLIB_VER_REVISION 1 +#define ZLIB_VER_SUBREVISION 0 + +/* + The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed data. + This version of the library supports only one compression method (deflation) + but other algorithms will be added later and will have the same stream + interface. + + Compression can be done in a single step if the buffers are large enough, + or can be done by repeated calls of the compression function. In the latter + case, the application must provide more input and/or consume the output + (providing more output space) before each call. + + The compressed data format used by default by the in-memory functions is + the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped + around a deflate stream, which is itself documented in RFC 1951. + + The library also supports reading and writing files in gzip (.gz) format + with an interface similar to that of stdio using the functions that start + with "gz". The gzip format is different from the zlib format. gzip is a + gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. + + This library can optionally read and write gzip and raw deflate streams in + memory as well. + + The zlib format was designed to be compact and fast for use in memory + and on communications channels. The gzip format was designed for single- + file compression on file systems, has a larger header than zlib to maintain + directory information, and uses a different, slower check method than zlib. + + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never crash + even in the case of corrupted input. +*/ + +typedef voidpf (*alloc_func)(voidpf opaque, uInt items, uInt size); +typedef void (*free_func)(voidpf opaque, voidpf address); + +struct internal_state; + +typedef struct z_stream_s { + z_const Bytef *next_in; /* next input byte */ + uInt avail_in; /* number of bytes available at next_in */ + uLong total_in; /* total number of input bytes read so far */ + + Bytef *next_out; /* next output byte will go here */ + uInt avail_out; /* remaining free space at next_out */ + uLong total_out; /* total number of bytes output so far */ + + z_const char *msg; /* last error message, NULL if no error */ + struct internal_state FAR *state; /* not visible by applications */ + + alloc_func zalloc; /* used to allocate the internal state */ + free_func zfree; /* used to free the internal state */ + voidpf opaque; /* private data object passed to zalloc and zfree */ + + int data_type; /* best guess about the data type: binary or text + for deflate, or the decoding state for inflate */ + uLong adler; /* Adler-32 or CRC-32 value of the uncompressed data */ + uLong reserved; /* reserved for future use */ +} z_stream; + +typedef z_stream FAR *z_streamp; + +/* + gzip header information passed to and from zlib routines. See RFC 1952 + for more details on the meanings of these fields. +*/ +typedef struct gz_header_s { + int text; /* true if compressed data believed to be text */ + uLong time; /* modification time */ + int xflags; /* extra flags (not used when writing a gzip file) */ + int os; /* operating system */ + Bytef *extra; /* pointer to extra field or Z_NULL if none */ + uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ + uInt extra_max; /* space at extra (only when reading header) */ + Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ + uInt name_max; /* space at name (only when reading header) */ + Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ + uInt comm_max; /* space at comment (only when reading header) */ + int hcrc; /* true if there was or will be a header crc */ + int done; /* true when done reading gzip header (not used + when writing a gzip file) */ +} gz_header; + +typedef gz_header FAR *gz_headerp; + +/* + The application must update next_in and avail_in when avail_in has dropped + to zero. It must update next_out and avail_out when avail_out has dropped + to zero. The application must initialize zalloc, zfree and opaque before + calling the init function. All other fields are set by the compression + library and must not be updated by the application. + + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the + opaque value. + + zalloc must return Z_NULL if there is not enough memory for the object. + If zlib is used in a multi-threaded application, zalloc and zfree must be + thread safe. In that case, zlib is thread-safe. When zalloc and zfree are + Z_NULL on entry to the initialization function, they are set to internal + routines that use the standard library functions malloc() and free(). + + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this if + the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers + returned by zalloc for objects of exactly 65536 bytes *must* have their + offset normalized to zero. The default allocation function provided by this + library ensures this (see zutil.c). To reduce memory requirements and avoid + any allocation of 64K objects, at the expense of compression ratio, compile + the library with -DMAX_WBITS=14 (see zconf.h). + + The fields total_in and total_out can be used for statistics or progress + reports. After compression, total_in holds the total size of the + uncompressed data and may be saved for use by the decompressor (particularly + if the decompressor wants to decompress everything in a single step). +*/ + + /* constants */ + +#define Z_NO_FLUSH 0 +#define Z_PARTIAL_FLUSH 1 +#define Z_SYNC_FLUSH 2 +#define Z_FULL_FLUSH 3 +#define Z_FINISH 4 +#define Z_BLOCK 5 +#define Z_TREES 6 +/* Allowed flush values; see deflate() and inflate() below for details */ + +#define Z_OK 0 +#define Z_STREAM_END 1 +#define Z_NEED_DICT 2 +#define Z_ERRNO (-1) +#define Z_STREAM_ERROR (-2) +#define Z_DATA_ERROR (-3) +#define Z_MEM_ERROR (-4) +#define Z_BUF_ERROR (-5) +#define Z_VERSION_ERROR (-6) +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + +#define Z_NO_COMPRESSION 0 +#define Z_BEST_SPEED 1 +#define Z_BEST_COMPRESSION 9 +#define Z_DEFAULT_COMPRESSION (-1) +/* compression levels */ + +#define Z_FILTERED 1 +#define Z_HUFFMAN_ONLY 2 +#define Z_RLE 3 +#define Z_FIXED 4 +#define Z_DEFAULT_STRATEGY 0 +/* compression strategy; see deflateInit2() below for details */ + +#define Z_BINARY 0 +#define Z_TEXT 1 +#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ +#define Z_UNKNOWN 2 +/* Possible values of the data_type field for deflate() */ + +#define Z_DEFLATED 8 +/* The deflate compression method (the only one supported in this version) */ + +#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ + +#define zlib_version zlibVersion() +/* for compatibility with versions < 1.0.2 */ + + + /* basic functions */ + +ZEXTERN const char * ZEXPORT zlibVersion(void); +/* The application can compare zlibVersion and ZLIB_VERSION for consistency. + If the first character differs, the library code actually used is not + compatible with the zlib.h header file used by the application. This check + is automatically made by deflateInit and inflateInit. + */ + +/* +ZEXTERN int ZEXPORT deflateInit(z_streamp strm, int level); + + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. If + zalloc and zfree are set to Z_NULL, deflateInit updates them to use default + allocation functions. total_in, total_out, adler, and msg are initialized. + + The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: + 1 gives best speed, 9 gives best compression, 0 gives no compression at all + (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION + requests a default compromise between speed and compression (currently + equivalent to level 6). + + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if level is not a valid compression level, or + Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible + with the version assumed by the caller (ZLIB_VERSION). msg is set to null + if there is no error message. deflateInit does not perform any compression: + this will be done by deflate(). +*/ + + +ZEXTERN int ZEXPORT deflate(z_streamp strm, int flush); +/* + deflate compresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. deflate performs one or both of the + following actions: + + - Compress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in and avail_in are updated and + processing will resume at this point for the next call of deflate(). + + - Generate more output starting at next_out and update next_out and avail_out + accordingly. This action is forced if the parameter flush is non zero. + Forcing flush frequently degrades the compression ratio, so this parameter + should be set only when necessary. Some output may be provided even if + flush is zero. + + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating avail_in or avail_out accordingly; avail_out should + never be zero before the call. The application can consume the compressed + output when it wants, for example when the output buffer is full (avail_out + == 0), or after each call of deflate(). If deflate returns Z_OK and with + zero avail_out, it must be called again after making room in the output + buffer because there might be more output pending. See deflatePending(), + which can be used if desired to determine whether or not there is more output + in that case. + + Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to + decide how much data to accumulate before producing output, in order to + maximize compression. + + If the parameter flush is set to Z_SYNC_FLUSH, all pending output is + flushed to the output buffer and the output is aligned on a byte boundary, so + that the decompressor can get all input data available so far. (In + particular avail_in is zero after the call if enough output space has been + provided before the call.) Flushing may degrade compression for some + compression algorithms and so it should be used only when necessary. This + completes the current deflate block and follows it with an empty stored block + that is three bits plus filler bits to the next byte, followed by four bytes + (00 00 ff ff). + + If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the + output buffer, but the output is not aligned to a byte boundary. All of the + input data so far will be available to the decompressor, as for Z_SYNC_FLUSH. + This completes the current deflate block and follows it with an empty fixed + codes block that is 10 bits long. This assures that enough bytes are output + in order for the decompressor to finish the block before the empty fixed + codes block. + + If flush is set to Z_BLOCK, a deflate block is completed and emitted, as + for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to + seven bits of the current block are held to be written as the next byte after + the next deflate block is completed. In this case, the decompressor may not + be provided enough bits at this point in order to complete decompression of + the data provided so far to the compressor. It may need to wait for the next + block to be emitted. This is for advanced applications that need to control + the emission of deflate blocks. + + If flush is set to Z_FULL_FLUSH, all output is flushed as with + Z_SYNC_FLUSH, and the compression state is reset so that decompression can + restart from this point if previous compressed data has been damaged or if + random access is desired. Using Z_FULL_FLUSH too often can seriously degrade + compression. + + If deflate returns with avail_out == 0, this function must be called again + with the same value of the flush parameter and more output space (updated + avail_out), until the flush is complete (deflate returns with non-zero + avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that + avail_out is greater than six when the flush marker begins, in order to avoid + repeated flush markers upon calling deflate() again when avail_out == 0. + + If the parameter flush is set to Z_FINISH, pending input is processed, + pending output is flushed and deflate returns with Z_STREAM_END if there was + enough output space. If deflate returns with Z_OK or Z_BUF_ERROR, this + function must be called again with Z_FINISH and more output space (updated + avail_out) but no more input data, until it returns with Z_STREAM_END or an + error. After deflate has returned Z_STREAM_END, the only possible operations + on the stream are deflateReset or deflateEnd. + + Z_FINISH can be used in the first deflate call after deflateInit if all the + compression is to be done in a single step. In order to complete in one + call, avail_out must be at least the value returned by deflateBound (see + below). Then deflate is guaranteed to return Z_STREAM_END. If not enough + output space is provided, deflate will not return Z_STREAM_END, and it must + be called again as described above. + + deflate() sets strm->adler to the Adler-32 checksum of all input read + so far (that is, total_in bytes). If a gzip stream is being generated, then + strm->adler will be the CRC-32 checksum of the input read so far. (See + deflateInit2 below.) + + deflate() may update strm->data_type if it can make a good guess about + the input data type (Z_BINARY or Z_TEXT). If in doubt, the data is + considered binary. This field is only for information purposes and does not + affect the compression algorithm in any manner. + + deflate() returns Z_OK if some progress has been made (more input + processed or more output produced), Z_STREAM_END if all input has been + consumed and all output has been produced (only when flush is set to + Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example + if next_in or next_out was Z_NULL or the state was inadvertently written over + by the application), or Z_BUF_ERROR if no progress is possible (for example + avail_in or avail_out was zero). Note that Z_BUF_ERROR is not fatal, and + deflate() can be called again with more input and more output space to + continue compressing. +*/ + + +ZEXTERN int ZEXPORT deflateEnd(z_streamp strm); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any pending + output. + + deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the + stream state was inconsistent, Z_DATA_ERROR if the stream was freed + prematurely (some input or output was discarded). In the error case, msg + may be set but then points to a static string (which must not be + deallocated). +*/ + + +/* +ZEXTERN int ZEXPORT inflateInit(z_streamp strm); + + Initializes the internal stream state for decompression. The fields + next_in, avail_in, zalloc, zfree and opaque must be initialized before by + the caller. In the current version of inflate, the provided input is not + read or consumed. The allocation of a sliding window will be deferred to + the first call of inflate (if the decompression does not complete on the + first call). If zalloc and zfree are set to Z_NULL, inflateInit updates + them to use default allocation functions. total_in, total_out, adler, and + msg are initialized. + + inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit does not perform any decompression. + Actual decompression will be done by inflate(). So next_in, and avail_in, + next_out, and avail_out are unused and unchanged. The current + implementation of inflateInit() does not process any header information -- + that is deferred until inflate() is called. +*/ + + +ZEXTERN int ZEXPORT inflate(z_streamp strm, int flush); +/* + inflate decompresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. inflate performs one or both of the + following actions: + + - Decompress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), then next_in and avail_in are updated + accordingly, and processing will resume at this point for the next call of + inflate(). + + - Generate more output starting at next_out and update next_out and avail_out + accordingly. inflate() provides as much output as possible, until there is + no more input data or no more space in the output buffer (see below about + the flush parameter). + + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming more + output, and updating the next_* and avail_* values accordingly. If the + caller of inflate() does not provide both available input and available + output space, it is possible that there will be no progress made. The + application can consume the uncompressed output when it wants, for example + when the output buffer is full (avail_out == 0), or after each call of + inflate(). If inflate returns Z_OK and with zero avail_out, it must be + called again after making room in the output buffer because there might be + more output pending. + + The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH, + Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much + output as possible to the output buffer. Z_BLOCK requests that inflate() + stop if and when it gets to the next deflate block boundary. When decoding + the zlib or gzip format, this will cause inflate() to return immediately + after the header and before the first block. When doing a raw inflate, + inflate() will go ahead and process the first block, and will return when it + gets to the end of that block, or when it runs out of data. + + The Z_BLOCK option assists in appending to or combining deflate streams. + To assist in this, on return inflate() always sets strm->data_type to the + number of unused bits in the last byte taken from strm->next_in, plus 64 if + inflate() is currently decoding the last block in the deflate stream, plus + 128 if inflate() returned immediately after decoding an end-of-block code or + decoding the complete header up to just before the first byte of the deflate + stream. The end-of-block will not be indicated until all of the uncompressed + data from that block has been written to strm->next_out. The number of + unused bits may in general be greater than seven, except when bit 7 of + data_type is set, in which case the number of unused bits will be less than + eight. data_type is set as noted here every time inflate() returns for all + flush options, and so can be used to determine the amount of currently + consumed input in bits. + + The Z_TREES option behaves as Z_BLOCK does, but it also returns when the + end of each deflate block header is reached, before any actual data in that + block is decoded. This allows the caller to determine the length of the + deflate block header for later use in random access within a deflate block. + 256 is added to the value of strm->data_type when inflate() returns + immediately after reaching the end of the deflate block header. + + inflate() should normally be called until it returns Z_STREAM_END or an + error. However if all decompression is to be performed in a single step (a + single call of inflate), the parameter flush should be set to Z_FINISH. In + this case all pending input is processed and all pending output is flushed; + avail_out must be large enough to hold all of the uncompressed data for the + operation to complete. (The size of the uncompressed data may have been + saved by the compressor for this purpose.) The use of Z_FINISH is not + required to perform an inflation in one step. However it may be used to + inform inflate that a faster approach can be used for the single inflate() + call. Z_FINISH also informs inflate to not maintain a sliding window if the + stream completes, which reduces inflate's memory footprint. If the stream + does not complete, either because not all of the stream is provided or not + enough output space is provided, then a sliding window will be allocated and + inflate() can be called again to continue the operation as if Z_NO_FLUSH had + been used. + + In this implementation, inflate() always flushes as much output as + possible to the output buffer, and always uses the faster approach on the + first call. So the effects of the flush parameter in this implementation are + on the return value of inflate() as noted below, when inflate() returns early + when Z_BLOCK or Z_TREES is used, and when inflate() avoids the allocation of + memory for a sliding window when Z_FINISH is used. + + If a preset dictionary is needed after this call (see inflateSetDictionary + below), inflate sets strm->adler to the Adler-32 checksum of the dictionary + chosen by the compressor and returns Z_NEED_DICT; otherwise it sets + strm->adler to the Adler-32 checksum of all output produced so far (that is, + total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described + below. At the end of the stream, inflate() checks that its computed Adler-32 + checksum is equal to that saved by the compressor and returns Z_STREAM_END + only if the checksum is correct. + + inflate() can decompress and check either zlib-wrapped or gzip-wrapped + deflate data. The header type is detected automatically, if requested when + initializing with inflateInit2(). Any information contained in the gzip + header is not retained unless inflateGetHeader() is used. When processing + gzip-wrapped deflate data, strm->adler32 is set to the CRC-32 of the output + produced so far. The CRC-32 is checked against the gzip trailer, as is the + uncompressed length, modulo 2^32. + + inflate() returns Z_OK if some progress has been made (more input processed + or more output produced), Z_STREAM_END if the end of the compressed data has + been reached and all uncompressed output has been produced, Z_NEED_DICT if a + preset dictionary is needed at this point, Z_DATA_ERROR if the input data was + corrupted (input stream not conforming to the zlib format or incorrect check + value, in which case strm->msg points to a string with a more specific + error), Z_STREAM_ERROR if the stream structure was inconsistent (for example + next_in or next_out was Z_NULL, or the state was inadvertently written over + by the application), Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR + if no progress was possible or if there was not enough room in the output + buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and + inflate() can be called again with more input and more output space to + continue decompressing. If Z_DATA_ERROR is returned, the application may + then call inflateSync() to look for a good compression block if a partial + recovery of the data is to be attempted. +*/ + + +ZEXTERN int ZEXPORT inflateEnd(z_streamp strm); +/* + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any pending + output. + + inflateEnd returns Z_OK if success, or Z_STREAM_ERROR if the stream state + was inconsistent. +*/ + + + /* Advanced functions */ + +/* + The following functions are needed only in some special applications. +*/ + +/* +ZEXTERN int ZEXPORT deflateInit2(z_streamp strm, + int level, + int method, + int windowBits, + int memLevel, + int strategy); + + This is another version of deflateInit with more compression options. The + fields zalloc, zfree and opaque must be initialized before by the caller. + + The method parameter is the compression method. It must be Z_DEFLATED in + this version of the library. + + The windowBits parameter is the base two logarithm of the window size + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if + deflateInit is used instead. + + For the current implementation of deflate(), a windowBits value of 8 (a + window size of 256 bytes) is not supported. As a result, a request for 8 + will result in 9 (a 512-byte window). In that case, providing 8 to + inflateInit2() will result in an error when the zlib header with 9 is + checked against the initialization of inflate(). The remedy is to not use 8 + with deflateInit2() with this initialization, or at least in that case use 9 + with inflateInit2(). + + windowBits can also be -8..-15 for raw deflate. In this case, -windowBits + determines the window size. deflate() will then generate raw deflate data + with no zlib header or trailer, and will not compute a check value. + + windowBits can also be greater than 15 for optional gzip encoding. Add + 16 to windowBits to write a simple gzip header and trailer around the + compressed data instead of a zlib wrapper. The gzip header will have no + file name, no extra data, no comment, no modification time (set to zero), no + header crc, and the operating system will be set to the appropriate value, + if the operating system was determined at compile time. If a gzip stream is + being written, strm->adler is a CRC-32 instead of an Adler-32. + + For raw deflate or gzip encoding, a request for a 256-byte window is + rejected as invalid, since only the zlib header provides a means of + transmitting the window size to the decompressor. + + The memLevel parameter specifies how much memory should be allocated + for the internal compression state. memLevel=1 uses minimum memory but is + slow and reduces compression ratio; memLevel=9 uses maximum memory for + optimal speed. The default value is 8. See zconf.h for total memory usage + as a function of windowBits and memLevel. + + The strategy parameter is used to tune the compression algorithm. Use the + value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a + filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no + string match), or Z_RLE to limit match distances to one (run-length + encoding). Filtered data consists mostly of small values with a somewhat + random distribution. In this case, the compression algorithm is tuned to + compress them better. The effect of Z_FILTERED is to force more Huffman + coding and less string matching; it is somewhat intermediate between + Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as + fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The + strategy parameter only affects the compression ratio but not the + correctness of the compressed output even if it is not set appropriately. + Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler + decoder for special applications. + + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid + method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is + incompatible with the version assumed by the caller (ZLIB_VERSION). msg is + set to null if there is no error message. deflateInit2 does not perform any + compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateSetDictionary(z_streamp strm, + const Bytef *dictionary, + uInt dictLength); +/* + Initializes the compression dictionary from the given byte sequence + without producing any compressed output. When using the zlib format, this + function must be called immediately after deflateInit, deflateInit2 or + deflateReset, and before any call of deflate. When doing raw deflate, this + function must be called either before any call of deflate, or immediately + after the completion of a deflate block, i.e. after all input has been + consumed and all output has been delivered when using any of the flush + options Z_BLOCK, Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The + compressor and decompressor must use exactly the same dictionary (see + inflateSetDictionary). + + The dictionary should consist of strings (byte sequences) that are likely + to be encountered later in the data to be compressed, with the most commonly + used strings preferably put towards the end of the dictionary. Using a + dictionary is most useful when the data to be compressed is short and can be + predicted with good accuracy; the data can then be compressed better than + with the default empty dictionary. + + Depending on the size of the compression data structures selected by + deflateInit or deflateInit2, a part of the dictionary may in effect be + discarded, for example if the dictionary is larger than the window size + provided in deflateInit or deflateInit2. Thus the strings most likely to be + useful should be put at the end of the dictionary, not at the front. In + addition, the current implementation of deflate will use at most the window + size minus 262 bytes of the provided dictionary. + + Upon return of this function, strm->adler is set to the Adler-32 value + of the dictionary; the decompressor may later use this value to determine + which dictionary has been used by the compressor. (The Adler-32 value + applies to the whole dictionary even if only a subset of the dictionary is + actually used by the compressor.) If a raw deflate was requested, then the + Adler-32 value is not computed and strm->adler is not set. + + deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is + inconsistent (for example if deflate has already been called for this stream + or if not at a block boundary for raw deflate). deflateSetDictionary does + not perform any compression: this will be done by deflate(). +*/ + +ZEXTERN int ZEXPORT deflateGetDictionary(z_streamp strm, + Bytef *dictionary, + uInt *dictLength); +/* + Returns the sliding dictionary being maintained by deflate. dictLength is + set to the number of bytes in the dictionary, and that many bytes are copied + to dictionary. dictionary must have enough space, where 32768 bytes is + always enough. If deflateGetDictionary() is called with dictionary equal to + Z_NULL, then only the dictionary length is returned, and nothing is copied. + Similarly, if dictLength is Z_NULL, then it is not set. + + deflateGetDictionary() may return a length less than the window size, even + when more than the window size in input has been provided. It may return up + to 258 bytes less in that case, due to how zlib's implementation of deflate + manages the sliding window and lookahead for matches, where matches can be + up to 258 bytes long. If the application needs the last window-size bytes of + input, then that would need to be saved by the application outside of zlib. + + deflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the + stream state is inconsistent. +*/ + +ZEXTERN int ZEXPORT deflateCopy(z_streamp dest, + z_streamp source); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when several compression strategies will be + tried, for example when there are several ways of pre-processing the input + data with a filter. The streams that will be discarded should then be freed + by calling deflateEnd. Note that deflateCopy duplicates the internal + compression state which can be quite large, so this strategy is slow and can + consume lots of memory. + + deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being Z_NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT deflateReset(z_streamp strm); +/* + This function is equivalent to deflateEnd followed by deflateInit, but + does not free and reallocate the internal compression state. The stream + will leave the compression level and any other attributes that may have been + set unchanged. total_in, total_out, adler, and msg are initialized. + + deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). +*/ + +ZEXTERN int ZEXPORT deflateParams(z_streamp strm, + int level, + int strategy); +/* + Dynamically update the compression level and compression strategy. The + interpretation of level and strategy is as in deflateInit2(). This can be + used to switch between compression and straight copy of the input data, or + to switch to a different kind of input data requiring a different strategy. + If the compression approach (which is a function of the level) or the + strategy is changed, and if there have been any deflate() calls since the + state was initialized or reset, then the input available so far is + compressed with the old level and strategy using deflate(strm, Z_BLOCK). + There are three approaches for the compression levels 0, 1..3, and 4..9 + respectively. The new level and strategy will take effect at the next call + of deflate(). + + If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does + not have enough output space to complete, then the parameter change will not + take effect. In this case, deflateParams() can be called again with the + same parameters and more output space to try again. + + In order to assure a change in the parameters on the first try, the + deflate stream should be flushed using deflate() with Z_BLOCK or other flush + request until strm.avail_out is not zero, before calling deflateParams(). + Then no more input data should be provided before the deflateParams() call. + If this is done, the old level and strategy will be applied to the data + compressed before deflateParams(), and the new level and strategy will be + applied to the data compressed after deflateParams(). + + deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream + state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if + there was not enough output space to complete the compression of the + available input data before a change in the strategy or approach. Note that + in the case of a Z_BUF_ERROR, the parameters are not changed. A return + value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be + retried with more output space. +*/ + +ZEXTERN int ZEXPORT deflateTune(z_streamp strm, + int good_length, + int max_lazy, + int nice_length, + int max_chain); +/* + Fine tune deflate's internal compression parameters. This should only be + used by someone who understands the algorithm used by zlib's deflate for + searching for the best matching string, and even then only by the most + fanatic optimizer trying to squeeze out the last compressed bit for their + specific input data. Read the deflate.c source code for the meaning of the + max_lazy, good_length, nice_length, and max_chain parameters. + + deflateTune() can be called after deflateInit() or deflateInit2(), and + returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. + */ + +ZEXTERN uLong ZEXPORT deflateBound(z_streamp strm, + uLong sourceLen); +/* + deflateBound() returns an upper bound on the compressed size after + deflation of sourceLen bytes. It must be called after deflateInit() or + deflateInit2(), and after deflateSetHeader(), if used. This would be used + to allocate an output buffer for deflation in a single pass, and so would be + called before deflate(). If that first deflate() call is provided the + sourceLen input bytes, an output buffer allocated to the size returned by + deflateBound(), and the flush value Z_FINISH, then deflate() is guaranteed + to return Z_STREAM_END. Note that it is possible for the compressed size to + be larger than the value returned by deflateBound() if flush options other + than Z_FINISH or Z_NO_FLUSH are used. +*/ + +ZEXTERN int ZEXPORT deflatePending(z_streamp strm, + unsigned *pending, + int *bits); +/* + deflatePending() returns the number of bytes and bits of output that have + been generated, but not yet provided in the available output. The bytes not + provided would be due to the available output space having being consumed. + The number of bits of output not provided are between 0 and 7, where they + await more bits to join them in order to fill out a full byte. If pending + or bits are Z_NULL, then those values are not set. + + deflatePending returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. + */ + +ZEXTERN int ZEXPORT deflatePrime(z_streamp strm, + int bits, + int value); +/* + deflatePrime() inserts bits in the deflate output stream. The intent + is that this function is used to start off the deflate output with the bits + leftover from a previous deflate stream when appending to it. As such, this + function can only be used for raw deflate, and must be used before the first + deflate() call after a deflateInit2() or deflateReset(). bits must be less + than or equal to 16, and that many of the least significant bits of value + will be inserted in the output. + + deflatePrime returns Z_OK if success, Z_BUF_ERROR if there was not enough + room in the internal buffer to insert the bits, or Z_STREAM_ERROR if the + source stream state was inconsistent. +*/ + +ZEXTERN int ZEXPORT deflateSetHeader(z_streamp strm, + gz_headerp head); +/* + deflateSetHeader() provides gzip header information for when a gzip + stream is requested by deflateInit2(). deflateSetHeader() may be called + after deflateInit2() or deflateReset() and before the first call of + deflate(). The text, time, os, extra field, name, and comment information + in the provided gz_header structure are written to the gzip header (xflag is + ignored -- the extra flags are set according to the compression level). The + caller must assure that, if not Z_NULL, name and comment are terminated with + a zero byte, and that if extra is not Z_NULL, that extra_len bytes are + available there. If hcrc is true, a gzip header crc is included. Note that + the current versions of the command-line version of gzip (up through version + 1.3.x) do not support header crc's, and will report that it is a "multi-part + gzip file" and give up. + + If deflateSetHeader is not used, the default gzip header has text false, + the time set to zero, and os set to the current operating system, with no + extra, name, or comment fields. The gzip header is returned to the default + state by deflateReset(). + + deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +/* +ZEXTERN int ZEXPORT inflateInit2(z_streamp strm, + int windowBits); + + This is another version of inflateInit with an extra parameter. The + fields next_in, avail_in, zalloc, zfree and opaque must be initialized + before by the caller. + + The windowBits parameter is the base two logarithm of the maximum window + size (the size of the history buffer). It should be in the range 8..15 for + this version of the library. The default value is 15 if inflateInit is used + instead. windowBits must be greater than or equal to the windowBits value + provided to deflateInit2() while compressing, or it must be equal to 15 if + deflateInit2() was not used. If a compressed stream with a larger window + size is given as input, inflate() will return with the error code + Z_DATA_ERROR instead of trying to allocate a larger window. + + windowBits can also be zero to request that inflate use the window size in + the zlib header of the compressed stream. + + windowBits can also be -8..-15 for raw inflate. In this case, -windowBits + determines the window size. inflate() will then process raw deflate data, + not looking for a zlib or gzip header, not generating a check value, and not + looking for any check values for comparison at the end of the stream. This + is for use with other formats that use the deflate compressed data format + such as zip. Those formats provide their own check values. If a custom + format is developed using the raw deflate format for compressed data, it is + recommended that a check value such as an Adler-32 or a CRC-32 be applied to + the uncompressed data as is done in the zlib, gzip, and zip formats. For + most applications, the zlib format should be used as is. Note that comments + above on the use in deflateInit2() applies to the magnitude of windowBits. + + windowBits can also be greater than 15 for optional gzip decoding. Add + 32 to windowBits to enable zlib and gzip decoding with automatic header + detection, or add 16 to decode only the gzip format (the zlib format will + return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a + CRC-32 instead of an Adler-32. Unlike the gunzip utility and gzread() (see + below), inflate() will *not* automatically decode concatenated gzip members. + inflate() will return Z_STREAM_END at the end of the gzip member. The state + would need to be reset to continue decoding a subsequent gzip member. This + *must* be done if there is more data after a gzip member, in order for the + decompression to be compliant with the gzip standard (RFC 1952). + + inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller, or Z_STREAM_ERROR if the parameters are + invalid, such as a null pointer to the structure. msg is set to null if + there is no error message. inflateInit2 does not perform any decompression + apart from possibly reading the zlib header if present: actual decompression + will be done by inflate(). (So next_in and avail_in may be modified, but + next_out and avail_out are unused and unchanged.) The current implementation + of inflateInit2() does not process any header information -- that is + deferred until inflate() is called. +*/ + +ZEXTERN int ZEXPORT inflateSetDictionary(z_streamp strm, + const Bytef *dictionary, + uInt dictLength); +/* + Initializes the decompression dictionary from the given uncompressed byte + sequence. This function must be called immediately after a call of inflate, + if that call returned Z_NEED_DICT. The dictionary chosen by the compressor + can be determined from the Adler-32 value returned by that call of inflate. + The compressor and decompressor must use exactly the same dictionary (see + deflateSetDictionary). For raw inflate, this function can be called at any + time to set the dictionary. If the provided dictionary is smaller than the + window and there is already data in the window, then the provided dictionary + will amend what's there. The application must insure that the dictionary + that was used for compression is provided. + + inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a + parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is + inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the + expected one (incorrect Adler-32 value). inflateSetDictionary does not + perform any decompression: this will be done by subsequent calls of + inflate(). +*/ + +ZEXTERN int ZEXPORT inflateGetDictionary(z_streamp strm, + Bytef *dictionary, + uInt *dictLength); +/* + Returns the sliding dictionary being maintained by inflate. dictLength is + set to the number of bytes in the dictionary, and that many bytes are copied + to dictionary. dictionary must have enough space, where 32768 bytes is + always enough. If inflateGetDictionary() is called with dictionary equal to + Z_NULL, then only the dictionary length is returned, and nothing is copied. + Similarly, if dictLength is Z_NULL, then it is not set. + + inflateGetDictionary returns Z_OK on success, or Z_STREAM_ERROR if the + stream state is inconsistent. +*/ + +ZEXTERN int ZEXPORT inflateSync(z_streamp strm); +/* + Skips invalid compressed data until a possible full flush point (see above + for the description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided. + + inflateSync searches for a 00 00 FF FF pattern in the compressed data. + All full flush points have this pattern, but not all occurrences of this + pattern are full flush points. + + inflateSync returns Z_OK if a possible full flush point has been found, + Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no flush point + has been found, or Z_STREAM_ERROR if the stream structure was inconsistent. + In the success case, the application may save the current value of total_in + which indicates where valid compressed data was found. In the error case, + the application may repeatedly call inflateSync, providing more input each + time, until success or end of the input data. +*/ + +ZEXTERN int ZEXPORT inflateCopy(z_streamp dest, + z_streamp source); +/* + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when randomly accessing a large stream. The + first pass through the stream can periodically record the inflate state, + allowing restarting inflate at those points when randomly accessing the + stream. + + inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being Z_NULL). msg is left unchanged in both source and + destination. +*/ + +ZEXTERN int ZEXPORT inflateReset(z_streamp strm); +/* + This function is equivalent to inflateEnd followed by inflateInit, + but does not free and reallocate the internal decompression state. The + stream will keep attributes that may have been set by inflateInit2. + total_in, total_out, adler, and msg are initialized. + + inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL). +*/ + +ZEXTERN int ZEXPORT inflateReset2(z_streamp strm, + int windowBits); +/* + This function is the same as inflateReset, but it also permits changing + the wrap and window size requests. The windowBits parameter is interpreted + the same as it is for inflateInit2. If the window size is changed, then the + memory allocated for the window is freed, and the window will be reallocated + by inflate() if needed. + + inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being Z_NULL), or if + the windowBits parameter is invalid. +*/ + +ZEXTERN int ZEXPORT inflatePrime(z_streamp strm, + int bits, + int value); +/* + This function inserts bits in the inflate input stream. The intent is + that this function is used to start inflating at a bit position in the + middle of a byte. The provided bits will be used before any bytes are used + from next_in. This function should only be used with raw inflate, and + should be used before the first inflate() call after inflateInit2() or + inflateReset(). bits must be less than or equal to 16, and that many of the + least significant bits of value will be inserted in the input. + + If bits is negative, then the input stream bit buffer is emptied. Then + inflatePrime() can be called again to put bits in the buffer. This is used + to clear out bits leftover after feeding inflate a block description prior + to feeding inflate codes. + + inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +ZEXTERN long ZEXPORT inflateMark(z_streamp strm); +/* + This function returns two values, one in the lower 16 bits of the return + value, and the other in the remaining upper bits, obtained by shifting the + return value down 16 bits. If the upper value is -1 and the lower value is + zero, then inflate() is currently decoding information outside of a block. + If the upper value is -1 and the lower value is non-zero, then inflate is in + the middle of a stored block, with the lower value equaling the number of + bytes from the input remaining to copy. If the upper value is not -1, then + it is the number of bits back from the current bit position in the input of + the code (literal or length/distance pair) currently being processed. In + that case the lower value is the number of bytes already emitted for that + code. + + A code is being processed if inflate is waiting for more input to complete + decoding of the code, or if it has completed decoding but is waiting for + more output space to write the literal or match data. + + inflateMark() is used to mark locations in the input data for random + access, which may be at bit positions, and to note those cases where the + output of a code may span boundaries of random access blocks. The current + location in the input stream can be determined from avail_in and data_type + as noted in the description for the Z_BLOCK flush parameter for inflate. + + inflateMark returns the value noted above, or -65536 if the provided + source stream state was inconsistent. +*/ + +ZEXTERN int ZEXPORT inflateGetHeader(z_streamp strm, + gz_headerp head); +/* + inflateGetHeader() requests that gzip header information be stored in the + provided gz_header structure. inflateGetHeader() may be called after + inflateInit2() or inflateReset(), and before the first call of inflate(). + As inflate() processes the gzip stream, head->done is zero until the header + is completed, at which time head->done is set to one. If a zlib stream is + being decoded, then head->done is set to -1 to indicate that there will be + no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be + used to force inflate() to return immediately after header processing is + complete and before any actual data is decompressed. + + The text, time, xflags, and os fields are filled in with the gzip header + contents. hcrc is set to true if there is a header CRC. (The header CRC + was valid if done is set to one.) If extra is not Z_NULL, then extra_max + contains the maximum number of bytes to write to extra. Once done is true, + extra_len contains the actual extra field length, and extra contains the + extra field, or that field truncated if extra_max is less than extra_len. + If name is not Z_NULL, then up to name_max characters are written there, + terminated with a zero unless the length is greater than name_max. If + comment is not Z_NULL, then up to comm_max characters are written there, + terminated with a zero unless the length is greater than comm_max. When any + of extra, name, or comment are not Z_NULL and the respective field is not + present in the header, then that field is set to Z_NULL to signal its + absence. This allows the use of deflateSetHeader() with the returned + structure to duplicate the header. However if those fields are set to + allocated memory, then the application will need to save those pointers + elsewhere so that they can be eventually freed. + + If inflateGetHeader is not used, then the header information is simply + discarded. The header is always checked for validity, including the header + CRC if present. inflateReset() will reset the process to discard the header + information. The application would need to call inflateGetHeader() again to + retrieve the header from the next gzip stream. + + inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ + +/* +ZEXTERN int ZEXPORT inflateBackInit(z_streamp strm, int windowBits, + unsigned char FAR *window); + + Initialize the internal stream state for decompression using inflateBack() + calls. The fields zalloc, zfree and opaque in strm must be initialized + before the call. If zalloc and zfree are Z_NULL, then the default library- + derived memory allocation routines are used. windowBits is the base two + logarithm of the window size, in the range 8..15. window is a caller + supplied buffer of that size. Except for special applications where it is + assured that deflate was used with small window sizes, windowBits must be 15 + and a 32K byte window must be supplied to be able to decompress general + deflate streams. + + See inflateBack() for the usage of these routines. + + inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of + the parameters are invalid, Z_MEM_ERROR if the internal state could not be + allocated, or Z_VERSION_ERROR if the version of the library does not match + the version of the header file. +*/ + +typedef unsigned (*in_func)(void FAR *, + z_const unsigned char FAR * FAR *); +typedef int (*out_func)(void FAR *, unsigned char FAR *, unsigned); + +ZEXTERN int ZEXPORT inflateBack(z_streamp strm, + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc); +/* + inflateBack() does a raw inflate with a single call using a call-back + interface for input and output. This is potentially more efficient than + inflate() for file i/o applications, in that it avoids copying between the + output and the sliding window by simply making the window itself the output + buffer. inflate() can be faster on modern CPUs when used with large + buffers. inflateBack() trusts the application to not change the output + buffer passed by the output function, at least until inflateBack() returns. + + inflateBackInit() must be called first to allocate the internal state + and to initialize the state with the user-provided window buffer. + inflateBack() may then be used multiple times to inflate a complete, raw + deflate stream with each call. inflateBackEnd() is then called to free the + allocated state. + + A raw deflate stream is one with no zlib or gzip header or trailer. + This routine would normally be used in a utility that reads zip or gzip + files and writes out uncompressed files. The utility would decode the + header and process the trailer on its own, hence this routine expects only + the raw deflate stream to decompress. This is different from the default + behavior of inflate(), which expects a zlib header and trailer around the + deflate stream. + + inflateBack() uses two subroutines supplied by the caller that are then + called by inflateBack() for input and output. inflateBack() calls those + routines until it reads a complete deflate stream and writes out all of the + uncompressed data, or until it encounters an error. The function's + parameters and return types are defined above in the in_func and out_func + typedefs. inflateBack() will call in(in_desc, &buf) which should return the + number of bytes of provided input, and a pointer to that input in buf. If + there is no input available, in() must return zero -- buf is ignored in that + case -- and inflateBack() will return a buffer error. inflateBack() will + call out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. + out() should return zero on success, or non-zero on failure. If out() + returns non-zero, inflateBack() will return with an error. Neither in() nor + out() are permitted to change the contents of the window provided to + inflateBackInit(), which is also the buffer that out() uses to write from. + The length written by out() will be at most the window size. Any non-zero + amount of input may be provided by in(). + + For convenience, inflateBack() can be provided input on the first call by + setting strm->next_in and strm->avail_in. If that input is exhausted, then + in() will be called. Therefore strm->next_in must be initialized before + calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called + immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in + must also be initialized, and then if strm->avail_in is not zero, input will + initially be taken from strm->next_in[0 .. strm->avail_in - 1]. + + The in_desc and out_desc parameters of inflateBack() is passed as the + first parameter of in() and out() respectively when they are called. These + descriptors can be optionally used to pass any information that the caller- + supplied in() and out() functions need to do their job. + + On return, inflateBack() will set strm->next_in and strm->avail_in to + pass back any unused input that was provided by the last in() call. The + return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR + if in() or out() returned an error, Z_DATA_ERROR if there was a format error + in the deflate stream (in which case strm->msg is set to indicate the nature + of the error), or Z_STREAM_ERROR if the stream was not properly initialized. + In the case of Z_BUF_ERROR, an input or output error can be distinguished + using strm->next_in which will be Z_NULL only if in() returned an error. If + strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning + non-zero. (in() will always be called before out(), so strm->next_in is + assured to be defined if out() returns non-zero.) Note that inflateBack() + cannot return Z_OK. +*/ + +ZEXTERN int ZEXPORT inflateBackEnd(z_streamp strm); +/* + All memory allocated by inflateBackInit() is freed. + + inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream + state was inconsistent. +*/ + +ZEXTERN uLong ZEXPORT zlibCompileFlags(void); +/* Return flags indicating compile-time options. + + Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: + 1.0: size of uInt + 3.2: size of uLong + 5.4: size of voidpf (pointer) + 7.6: size of z_off_t + + Compiler, assembler, and debug options: + 8: ZLIB_DEBUG + 9: ASMV or ASMINF -- use ASM code + 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention + 11: 0 (reserved) + + One-time table building (smaller code, but not thread-safe if true): + 12: BUILDFIXED -- build static block decoding tables when needed + 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed + 14,15: 0 (reserved) + + Library content (indicates missing functionality): + 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking + deflate code when not needed) + 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect + and decode gzip streams (to avoid linking crc code) + 18-19: 0 (reserved) + + Operation variations (changes in library functionality): + 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate + 21: FASTEST -- deflate algorithm with only one, lowest compression level + 22,23: 0 (reserved) + + The sprintf variant used by gzprintf (zero is best): + 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format + 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! + 26: 0 = returns value, 1 = void -- 1 means inferred string length returned + + Remainder: + 27-31: 0 (reserved) + */ + +#ifndef Z_SOLO + + /* utility functions */ + +/* + The following utility functions are implemented on top of the basic + stream-oriented functions. To simplify the interface, some default options + are assumed (compression level and memory usage, standard memory allocation + functions). The source code of these utility functions can be modified if + you need special options. +*/ + +ZEXTERN int ZEXPORT compress(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen); +/* + Compresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed data. compress() is equivalent to compress2() with a level + parameter of Z_DEFAULT_COMPRESSION. + + compress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer. +*/ + +ZEXTERN int ZEXPORT compress2(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen, + int level); +/* + Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed data. + + compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +*/ + +ZEXTERN uLong ZEXPORT compressBound(uLong sourceLen); +/* + compressBound() returns an upper bound on the compressed size after + compress() or compress2() on sourceLen bytes. It would be used before a + compress() or compress2() call to allocate the destination buffer. +*/ + +ZEXTERN int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen); +/* + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total size + of the destination buffer, which must be large enough to hold the entire + uncompressed data. (The size of the uncompressed data must have been saved + previously by the compressor and transmitted to the decompressor by some + mechanism outside the scope of this compression library.) Upon exit, destLen + is the actual size of the uncompressed data. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. In + the case where there is not enough room, uncompress() will fill the output + buffer with the uncompressed data up to that point. +*/ + +ZEXTERN int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen, + const Bytef *source, uLong *sourceLen); +/* + Same as uncompress, except that sourceLen is a pointer, where the + length of the source is *sourceLen. On return, *sourceLen is the number of + source bytes consumed. +*/ + + /* gzip file access functions */ + +/* + This library supports reading and writing files in gzip (.gz) format with + an interface similar to that of stdio, using the functions that start with + "gz". The gzip format is different from the zlib format. gzip is a gzip + wrapper, documented in RFC 1952, wrapped around a deflate stream. +*/ + +typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */ + +/* +ZEXTERN gzFile ZEXPORT gzopen(const char *path, const char *mode); + + Open the gzip (.gz) file at path for reading and decompressing, or + compressing and writing. The mode parameter is as in fopen ("rb" or "wb") + but can also include a compression level ("wb9") or a strategy: 'f' for + filtered data as in "wb6f", 'h' for Huffman-only compression as in "wb1h", + 'R' for run-length encoding as in "wb1R", or 'F' for fixed code compression + as in "wb9F". (See the description of deflateInit2 for more information + about the strategy parameter.) 'T' will request transparent writing or + appending with no compression and not using the gzip format. + + "a" can be used instead of "w" to request that the gzip stream that will + be written be appended to the file. "+" will result in an error, since + reading and writing to the same gzip file is not supported. The addition of + "x" when writing will create the file exclusively, which fails if the file + already exists. On systems that support it, the addition of "e" when + reading or writing will set the flag to close the file on an execve() call. + + These functions, as well as gzip, will read and decode a sequence of gzip + streams in a file. The append function of gzopen() can be used to create + such a file. (Also see gzflush() for another way to do this.) When + appending, gzopen does not test whether the file begins with a gzip stream, + nor does it look for the end of the gzip streams to begin appending. gzopen + will simply append a gzip stream to the existing file. + + gzopen can be used to read a file which is not in gzip format; in this + case gzread will directly read from the file without decompression. When + reading, this will be detected automatically by looking for the magic two- + byte gzip header. + + gzopen returns NULL if the file could not be opened, if there was + insufficient memory to allocate the gzFile state, or if an invalid mode was + specified (an 'r', 'w', or 'a' was not provided, or '+' was provided). + errno can be checked to determine if the reason gzopen failed was that the + file could not be opened. +*/ + +ZEXTERN gzFile ZEXPORT gzdopen(int fd, const char *mode); +/* + Associate a gzFile with the file descriptor fd. File descriptors are + obtained from calls like open, dup, creat, pipe or fileno (if the file has + been previously opened with fopen). The mode parameter is as in gzopen. + + The next call of gzclose on the returned gzFile will also close the file + descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor + fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd, + mode);. The duplicated descriptor should be saved to avoid a leak, since + gzdopen does not close fd if it fails. If you are using fileno() to get the + file descriptor from a FILE *, then you will have to use dup() to avoid + double-close()ing the file descriptor. Both gzclose() and fclose() will + close the associated file descriptor, so they need to have different file + descriptors. + + gzdopen returns NULL if there was insufficient memory to allocate the + gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not + provided, or '+' was provided), or if fd is -1. The file descriptor is not + used until the next gz* read, write, seek, or close operation, so gzdopen + will not detect if fd is invalid (unless fd is -1). +*/ + +ZEXTERN int ZEXPORT gzbuffer(gzFile file, unsigned size); +/* + Set the internal buffer size used by this library's functions for file to + size. The default buffer size is 8192 bytes. This function must be called + after gzopen() or gzdopen(), and before any other calls that read or write + the file. The buffer memory allocation is always deferred to the first read + or write. Three times that size in buffer space is allocated. A larger + buffer size of, for example, 64K or 128K bytes will noticeably increase the + speed of decompression (reading). + + The new buffer size also affects the maximum length for gzprintf(). + + gzbuffer() returns 0 on success, or -1 on failure, such as being called + too late. +*/ + +ZEXTERN int ZEXPORT gzsetparams(gzFile file, int level, int strategy); +/* + Dynamically update the compression level and strategy for file. See the + description of deflateInit2 for the meaning of these parameters. Previously + provided data is flushed before applying the parameter changes. + + gzsetparams returns Z_OK if success, Z_STREAM_ERROR if the file was not + opened for writing, Z_ERRNO if there is an error writing the flushed data, + or Z_MEM_ERROR if there is a memory allocation error. +*/ + +ZEXTERN int ZEXPORT gzread(gzFile file, voidp buf, unsigned len); +/* + Read and decompress up to len uncompressed bytes from file into buf. If + the input file is not in gzip format, gzread copies the given number of + bytes into the buffer directly from the file. + + After reaching the end of a gzip stream in the input, gzread will continue + to read, looking for another gzip stream. Any number of gzip streams may be + concatenated in the input file, and will all be decompressed by gzread(). + If something other than a gzip stream is encountered after a gzip stream, + that remaining trailing garbage is ignored (and no error is returned). + + gzread can be used to read a gzip file that is being concurrently written. + Upon reaching the end of the input, gzread will return with the available + data. If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then + gzclearerr can be used to clear the end of file indicator in order to permit + gzread to be tried again. Z_OK indicates that a gzip stream was completed + on the last gzread. Z_BUF_ERROR indicates that the input file ended in the + middle of a gzip stream. Note that gzread does not return -1 in the event + of an incomplete gzip stream. This error is deferred until gzclose(), which + will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip + stream. Alternatively, gzerror can be used before gzclose to detect this + case. + + gzread returns the number of uncompressed bytes actually read, less than + len for end of file, or -1 for error. If len is too large to fit in an int, + then nothing is read, -1 is returned, and the error state is set to + Z_STREAM_ERROR. +*/ + +ZEXTERN z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems, + gzFile file); +/* + Read and decompress up to nitems items of size size from file into buf, + otherwise operating as gzread() does. This duplicates the interface of + stdio's fread(), with size_t request and return types. If the library + defines size_t, then z_size_t is identical to size_t. If not, then z_size_t + is an unsigned integer type that can contain a pointer. + + gzfread() returns the number of full items read of size size, or zero if + the end of the file was reached and a full item could not be read, or if + there was an error. gzerror() must be consulted if zero is returned in + order to determine if there was an error. If the multiplication of size and + nitems overflows, i.e. the product does not fit in a z_size_t, then nothing + is read, zero is returned, and the error state is set to Z_STREAM_ERROR. + + In the event that the end of file is reached and only a partial item is + available at the end, i.e. the remaining uncompressed data length is not a + multiple of size, then the final partial item is nevertheless read into buf + and the end-of-file flag is set. The length of the partial item read is not + provided, but could be inferred from the result of gztell(). This behavior + is the same as the behavior of fread() implementations in common libraries, + but it prevents the direct use of gzfread() to read a concurrently written + file, resetting and retrying on end-of-file, when size is not 1. +*/ + +ZEXTERN int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len); +/* + Compress and write the len uncompressed bytes at buf to file. gzwrite + returns the number of uncompressed bytes written or 0 in case of error. +*/ + +ZEXTERN z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size, + z_size_t nitems, gzFile file); +/* + Compress and write nitems items of size size from buf to file, duplicating + the interface of stdio's fwrite(), with size_t request and return types. If + the library defines size_t, then z_size_t is identical to size_t. If not, + then z_size_t is an unsigned integer type that can contain a pointer. + + gzfwrite() returns the number of full items written of size size, or zero + if there was an error. If the multiplication of size and nitems overflows, + i.e. the product does not fit in a z_size_t, then nothing is written, zero + is returned, and the error state is set to Z_STREAM_ERROR. +*/ + +ZEXTERN int ZEXPORTVA gzprintf(gzFile file, const char *format, ...); +/* + Convert, format, compress, and write the arguments (...) to file under + control of the string format, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written, or a negative zlib error code in case + of error. The number of uncompressed bytes written is limited to 8191, or + one less than the buffer size given to gzbuffer(). The caller should assure + that this limit is not exceeded. If it is exceeded, then gzprintf() will + return an error (0) with nothing written. In this case, there may also be a + buffer overflow with unpredictable consequences, which is possible only if + zlib was compiled with the insecure functions sprintf() or vsprintf(), + because the secure snprintf() or vsnprintf() functions were not available. + This can be determined using zlibCompileFlags(). +*/ + +ZEXTERN int ZEXPORT gzputs(gzFile file, const char *s); +/* + Compress and write the given null-terminated string s to file, excluding + the terminating null character. + + gzputs returns the number of characters written, or -1 in case of error. +*/ + +ZEXTERN char * ZEXPORT gzgets(gzFile file, char *buf, int len); +/* + Read and decompress bytes from file into buf, until len-1 characters are + read, or until a newline character is read and transferred to buf, or an + end-of-file condition is encountered. If any characters are read or if len + is one, the string is terminated with a null character. If no characters + are read due to an end-of-file or len is less than one, then the buffer is + left untouched. + + gzgets returns buf which is a null-terminated string, or it returns NULL + for end-of-file or in case of error. If there was an error, the contents at + buf are indeterminate. +*/ + +ZEXTERN int ZEXPORT gzputc(gzFile file, int c); +/* + Compress and write c, converted to an unsigned char, into file. gzputc + returns the value that was written, or -1 in case of error. +*/ + +ZEXTERN int ZEXPORT gzgetc(gzFile file); +/* + Read and decompress one byte from file. gzgetc returns this byte or -1 + in case of end of file or error. This is implemented as a macro for speed. + As such, it does not do all of the checking the other functions do. I.e. + it does not check to see if file is NULL, nor whether the structure file + points to has been clobbered or not. +*/ + +ZEXTERN int ZEXPORT gzungetc(int c, gzFile file); +/* + Push c back onto the stream for file to be read as the first character on + the next read. At least one character of push-back is always allowed. + gzungetc() returns the character pushed, or -1 on failure. gzungetc() will + fail if c is -1, and may fail if a character has been pushed but not read + yet. If gzungetc is used immediately after gzopen or gzdopen, at least the + output buffer size of pushed characters is allowed. (See gzbuffer above.) + The pushed character will be discarded if the stream is repositioned with + gzseek() or gzrewind(). +*/ + +ZEXTERN int ZEXPORT gzflush(gzFile file, int flush); +/* + Flush all pending output to file. The parameter flush is as in the + deflate() function. The return value is the zlib error number (see function + gzerror below). gzflush is only permitted when writing. + + If the flush parameter is Z_FINISH, the remaining data is written and the + gzip stream is completed in the output. If gzwrite() is called again, a new + gzip stream will be started in the output. gzread() is able to read such + concatenated gzip streams. + + gzflush should be called only when strictly necessary because it will + degrade compression if called too often. +*/ + +/* +ZEXTERN z_off_t ZEXPORT gzseek(gzFile file, + z_off_t offset, int whence); + + Set the starting position to offset relative to whence for the next gzread + or gzwrite on file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); + the value SEEK_END is not supported. + + If the file is opened for reading, this function is emulated but can be + extremely slow. If the file is opened for writing, only forward seeks are + supported; gzseek then compresses a sequence of zeroes up to the new + starting position. + + gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error, in + particular if the file is opened for writing and the new starting position + would be before the current position. +*/ + +ZEXTERN int ZEXPORT gzrewind(gzFile file); +/* + Rewind file. This function is supported only for reading. + + gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET). +*/ + +/* +ZEXTERN z_off_t ZEXPORT gztell(gzFile file); + + Return the starting position for the next gzread or gzwrite on file. + This position represents a number of bytes in the uncompressed data stream, + and is zero when starting, even if appending or reading a gzip stream from + the middle of a file using gzdopen(). + + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) +*/ + +/* +ZEXTERN z_off_t ZEXPORT gzoffset(gzFile file); + + Return the current compressed (actual) read or write offset of file. This + offset includes the count of bytes that precede the gzip stream, for example + when appending or when using gzdopen() for reading. When reading, the + offset does not include as yet unused buffered input. This information can + be used for a progress indicator. On error, gzoffset() returns -1. +*/ + +ZEXTERN int ZEXPORT gzeof(gzFile file); +/* + Return true (1) if the end-of-file indicator for file has been set while + reading, false (0) otherwise. Note that the end-of-file indicator is set + only if the read tried to go past the end of the input, but came up short. + Therefore, just like feof(), gzeof() may return false even if there is no + more data to read, in the event that the last read request was for the exact + number of bytes remaining in the input file. This will happen if the input + file size is an exact multiple of the buffer size. + + If gzeof() returns true, then the read functions will return no more data, + unless the end-of-file indicator is reset by gzclearerr() and the input file + has grown since the previous end of file was detected. +*/ + +ZEXTERN int ZEXPORT gzdirect(gzFile file); +/* + Return true (1) if file is being copied directly while reading, or false + (0) if file is a gzip stream being decompressed. + + If the input file is empty, gzdirect() will return true, since the input + does not contain a gzip stream. + + If gzdirect() is used immediately after gzopen() or gzdopen() it will + cause buffers to be allocated to allow reading the file to determine if it + is a gzip file. Therefore if gzbuffer() is used, it should be called before + gzdirect(). + + When writing, gzdirect() returns true (1) if transparent writing was + requested ("wT" for the gzopen() mode), or false (0) otherwise. (Note: + gzdirect() is not needed when writing. Transparent writing must be + explicitly requested, so the application already knows the answer. When + linking statically, using gzdirect() will include all of the zlib code for + gzip file reading and decompression, which may not be desired.) +*/ + +ZEXTERN int ZEXPORT gzclose(gzFile file); +/* + Flush all pending output for file, if necessary, close file and + deallocate the (de)compression state. Note that once file is closed, you + cannot call gzerror with file, since its structures have been deallocated. + gzclose must not be called more than once on the same file, just as free + must not be called more than once on the same allocation. + + gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a + file operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the + last read ended in the middle of a gzip stream, or Z_OK on success. +*/ + +ZEXTERN int ZEXPORT gzclose_r(gzFile file); +ZEXTERN int ZEXPORT gzclose_w(gzFile file); +/* + Same as gzclose(), but gzclose_r() is only for use when reading, and + gzclose_w() is only for use when writing or appending. The advantage to + using these instead of gzclose() is that they avoid linking in zlib + compression or decompression code that is not used when only reading or only + writing respectively. If gzclose() is used, then both compression and + decompression code will be included the application when linking to a static + zlib library. +*/ + +ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum); +/* + Return the error message for the last error which occurred on file. + errnum is set to zlib error number. If an error occurred in the file system + and not in the compression library, errnum is set to Z_ERRNO and the + application may consult errno to get the exact error code. + + The application must not modify the returned string. Future calls to + this function may invalidate the previously returned string. If file is + closed, then the string previously returned by gzerror will no longer be + available. + + gzerror() should be used to distinguish errors from end-of-file for those + functions above that do not distinguish those cases in their return values. +*/ + +ZEXTERN void ZEXPORT gzclearerr(gzFile file); +/* + Clear the error and end-of-file flags for file. This is analogous to the + clearerr() function in stdio. This is useful for continuing to read a gzip + file that is being written concurrently. +*/ + +#endif /* !Z_SOLO */ + + /* checksum functions */ + +/* + These functions are not related to compression but are exported + anyway because they might be useful in applications using the compression + library. +*/ + +ZEXTERN uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len); +/* + Update a running Adler-32 checksum with the bytes buf[0..len-1] and + return the updated checksum. An Adler-32 value is in the range of a 32-bit + unsigned integer. If buf is Z_NULL, this function returns the required + initial value for the checksum. + + An Adler-32 checksum is almost as reliable as a CRC-32 but can be computed + much faster. + + Usage example: + + uLong adler = adler32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + adler = adler32(adler, buffer, length); + } + if (adler != original_adler) error(); +*/ + +ZEXTERN uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, + z_size_t len); +/* + Same as adler32(), but with a size_t length. +*/ + +/* +ZEXTERN uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, + z_off_t len2); + + Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 + and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for + each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of + seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. Note + that the z_off_t type (like off_t) is a signed integer. If len2 is + negative, the result has no meaning or utility. +*/ + +ZEXTERN uLong ZEXPORT crc32(uLong crc, const Bytef *buf, uInt len); +/* + Update a running CRC-32 with the bytes buf[0..len-1] and return the + updated CRC-32. A CRC-32 value is in the range of a 32-bit unsigned integer. + If buf is Z_NULL, this function returns the required initial value for the + crc. Pre- and post-conditioning (one's complement) is performed within this + function so it shouldn't be done by the application. + + Usage example: + + uLong crc = crc32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + crc = crc32(crc, buffer, length); + } + if (crc != original_crc) error(); +*/ + +ZEXTERN uLong ZEXPORT crc32_z(uLong crc, const Bytef *buf, + z_size_t len); +/* + Same as crc32(), but with a size_t length. +*/ + +/* +ZEXTERN uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2); + + Combine two CRC-32 check values into one. For two sequences of bytes, + seq1 and seq2 with lengths len1 and len2, CRC-32 check values were + calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 + check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and + len2. len2 must be non-negative. +*/ + +/* +ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t len2); + + Return the operator corresponding to length len2, to be used with + crc32_combine_op(). len2 must be non-negative. +*/ + +ZEXTERN uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op); +/* + Give the same result as crc32_combine(), using op in place of len2. op is + is generated from len2 by crc32_combine_gen(). This will be faster than + crc32_combine() if the generated op is used more than once. +*/ + + + /* various hacks, don't look :) */ + +/* deflateInit and inflateInit are macros to allow checking the zlib version + * and the compiler's view of z_stream: + */ +ZEXTERN int ZEXPORT deflateInit_(z_streamp strm, int level, + const char *version, int stream_size); +ZEXTERN int ZEXPORT inflateInit_(z_streamp strm, + const char *version, int stream_size); +ZEXTERN int ZEXPORT deflateInit2_(z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size); +ZEXTERN int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, + const char *version, int stream_size); +ZEXTERN int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits, + unsigned char FAR *window, + const char *version, + int stream_size); +#ifdef Z_PREFIX_SET +# define z_deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +# define z_inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) +# define z_inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, (int)sizeof(z_stream)) +#else +# define deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, (int)sizeof(z_stream)) +# define inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, (int)sizeof(z_stream)) +# define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, (int)sizeof(z_stream)) +# define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, \ + (int)sizeof(z_stream)) +# define inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, (int)sizeof(z_stream)) +#endif + +#ifndef Z_SOLO + +/* gzgetc() macro and its supporting function and exposed data structure. Note + * that the real internal state is much larger than the exposed structure. + * This abbreviated structure exposes just enough for the gzgetc() macro. The + * user should not mess with these exposed elements, since their names or + * behavior could change in the future, perhaps even capriciously. They can + * only be used by the gzgetc() macro. You have been warned. + */ +struct gzFile_s { + unsigned have; + unsigned char *next; + z_off64_t pos; +}; +ZEXTERN int ZEXPORT gzgetc_(gzFile file); /* backward compatibility */ +#ifdef Z_PREFIX_SET +# undef z_gzgetc +# define z_gzgetc(g) \ + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) +#else +# define gzgetc(g) \ + ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g)) +#endif + +/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or + * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if + * both are true, the application gets the *64 functions, and the regular + * functions are changed to 64 bits) -- in case these are set on systems + * without large file support, _LFS64_LARGEFILE must also be true + */ +#ifdef Z_LARGE64 + ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); + ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int); + ZEXTERN z_off64_t ZEXPORT gztell64(gzFile); + ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile); + ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off64_t); + ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off64_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off64_t); +#endif + +#if !defined(ZLIB_INTERNAL) && defined(Z_WANT64) +# ifdef Z_PREFIX_SET +# define z_gzopen z_gzopen64 +# define z_gzseek z_gzseek64 +# define z_gztell z_gztell64 +# define z_gzoffset z_gzoffset64 +# define z_adler32_combine z_adler32_combine64 +# define z_crc32_combine z_crc32_combine64 +# define z_crc32_combine_gen z_crc32_combine_gen64 +# else +# define gzopen gzopen64 +# define gzseek gzseek64 +# define gztell gztell64 +# define gzoffset gzoffset64 +# define adler32_combine adler32_combine64 +# define crc32_combine crc32_combine64 +# define crc32_combine_gen crc32_combine_gen64 +# endif +# ifndef Z_LARGE64 + ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *); + ZEXTERN z_off_t ZEXPORT gzseek64(gzFile, z_off_t, int); + ZEXTERN z_off_t ZEXPORT gztell64(gzFile); + ZEXTERN z_off_t ZEXPORT gzoffset64(gzFile); + ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t); +# endif +#else + ZEXTERN gzFile ZEXPORT gzopen(const char *, const char *); + ZEXTERN z_off_t ZEXPORT gzseek(gzFile, z_off_t, int); + ZEXTERN z_off_t ZEXPORT gztell(gzFile); + ZEXTERN z_off_t ZEXPORT gzoffset(gzFile); + ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t); +#endif + +#else /* Z_SOLO */ + + ZEXTERN uLong ZEXPORT adler32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen(z_off_t); + +#endif /* !Z_SOLO */ + +/* undocumented functions */ +ZEXTERN const char * ZEXPORT zError(int); +ZEXTERN int ZEXPORT inflateSyncPoint(z_streamp); +ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table(void); +ZEXTERN int ZEXPORT inflateUndermine(z_streamp, int); +ZEXTERN int ZEXPORT inflateValidate(z_streamp, int); +ZEXTERN unsigned long ZEXPORT inflateCodesUsed(z_streamp); +ZEXTERN int ZEXPORT inflateResetKeep(z_streamp); +ZEXTERN int ZEXPORT deflateResetKeep(z_streamp); +#if defined(_WIN32) && !defined(Z_SOLO) +ZEXTERN gzFile ZEXPORT gzopen_w(const wchar_t *path, + const char *mode); +#endif +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifndef Z_SOLO +ZEXTERN int ZEXPORTVA gzvprintf(gzFile file, + const char *format, + va_list va); +# endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* ZLIB_H */ diff --git a/widget/milsko/milskosrc/external/libz/include/zutil.h b/widget/milsko/milskosrc/external/libz/include/zutil.h new file mode 100644 index 0000000000..48dd7febae --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/include/zutil.h @@ -0,0 +1,254 @@ +/* zutil.h -- internal interface and configuration of the compression library + * Copyright (C) 1995-2024 Jean-loup Gailly, Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* WARNING: this file should *not* be used by applications. It is + part of the implementation of the compression library and is + subject to change. Applications should only use zlib.h. + */ + +/* @(#) $Id$ */ + +#ifndef ZUTIL_H +#define ZUTIL_H + +#ifdef HAVE_HIDDEN +# define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) +#else +# define ZLIB_INTERNAL +#endif + +#include "zlib.h" + +#if defined(STDC) && !defined(Z_SOLO) +# if !(defined(_WIN32_WCE) && defined(_MSC_VER)) +# include +# endif +# include +# include +#endif + +#ifndef local +# define local static +#endif +/* since "static" is used to mean two completely different things in C, we + define "local" for the non-static meaning of "static", for readability + (compile with -Dlocal if your debugger can't find static symbols) */ + +typedef unsigned char uch; +typedef uch FAR uchf; +typedef unsigned short ush; +typedef ush FAR ushf; +typedef unsigned long ulg; + +#if !defined(Z_U8) && !defined(Z_SOLO) && defined(STDC) +# include +# if (ULONG_MAX == 0xffffffffffffffff) +# define Z_U8 unsigned long +# elif (ULLONG_MAX == 0xffffffffffffffff) +# define Z_U8 unsigned long long +# elif (UINT_MAX == 0xffffffffffffffff) +# define Z_U8 unsigned +# endif +#endif + +extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ +/* (size given to avoid silly warnings with Visual C++) */ + +#define ERR_MSG(err) z_errmsg[(err) < -6 || (err) > 2 ? 9 : 2 - (err)] + +#define ERR_RETURN(strm,err) \ + return (strm->msg = ERR_MSG(err), (err)) +/* To be used only when the state is known to be valid */ + + /* common constants */ + +#ifndef DEF_WBITS +# define DEF_WBITS MAX_WBITS +#endif +/* default windowBits for decompression. MAX_WBITS is for compression only */ + +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif +/* default memLevel */ + +#define STORED_BLOCK 0 +#define STATIC_TREES 1 +#define DYN_TREES 2 +/* The three kinds of block type */ + +#define MIN_MATCH 3 +#define MAX_MATCH 258 +/* The minimum and maximum match lengths */ + +#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ + + /* target dependencies */ + +#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32)) +# define OS_CODE 0x00 +# ifndef Z_SOLO +# if defined(__TURBOC__) || defined(__BORLANDC__) +# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) + /* Allow compilation with ANSI keywords only enabled */ + void _Cdecl farfree( void *block ); + void *_Cdecl farmalloc( unsigned long nbytes ); +# else +# include +# endif +# else /* MSC or DJGPP */ +# include +# endif +# endif +#endif + +#ifdef AMIGA +# define OS_CODE 1 +#endif + +#if defined(VAXC) || defined(VMS) +# define OS_CODE 2 +# define F_OPEN(name, mode) \ + fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") +#endif + +#ifdef __370__ +# if __TARGET_LIB__ < 0x20000000 +# define OS_CODE 4 +# elif __TARGET_LIB__ < 0x40000000 +# define OS_CODE 11 +# else +# define OS_CODE 8 +# endif +#endif + +#if defined(ATARI) || defined(atarist) +# define OS_CODE 5 +#endif + +#ifdef OS2 +# define OS_CODE 6 +# if defined(M_I86) && !defined(Z_SOLO) +# include +# endif +#endif + +#if defined(MACOS) +# define OS_CODE 7 +#endif + +#ifdef __acorn +# define OS_CODE 13 +#endif + +#if defined(WIN32) && !defined(__CYGWIN__) +# define OS_CODE 10 +#endif + +#ifdef _BEOS_ +# define OS_CODE 16 +#endif + +#ifdef __TOS_OS400__ +# define OS_CODE 18 +#endif + +#ifdef __APPLE__ +# define OS_CODE 19 +#endif + +#if defined(__BORLANDC__) && !defined(MSDOS) + #pragma warn -8004 + #pragma warn -8008 + #pragma warn -8066 +#endif + +/* provide prototypes for these when building zlib without LFS */ +#if !defined(_WIN32) && \ + (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) + ZEXTERN uLong ZEXPORT adler32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine64(uLong, uLong, z_off_t); + ZEXTERN uLong ZEXPORT crc32_combine_gen64(z_off_t); +#endif + + /* common defaults */ + +#ifndef OS_CODE +# define OS_CODE 3 /* assume Unix */ +#endif + +#ifndef F_OPEN +# define F_OPEN(name, mode) fopen((name), (mode)) +#endif + + /* functions */ + +#if defined(pyr) || defined(Z_SOLO) +# define NO_MEMCPY +#endif +#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) + /* Use our own functions for small and medium model with MSC <= 5.0. + * You may have to use the same strategy for Borland C (untested). + * The __SC__ check is for Symantec. + */ +# define NO_MEMCPY +#endif +#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) +# define HAVE_MEMCPY +#endif +#ifdef HAVE_MEMCPY +# ifdef SMALL_MEDIUM /* MSDOS small or medium model */ +# define zmemcpy _fmemcpy +# define zmemcmp _fmemcmp +# define zmemzero(dest, len) _fmemset(dest, 0, len) +# else +# define zmemcpy memcpy +# define zmemcmp memcmp +# define zmemzero(dest, len) memset(dest, 0, len) +# endif +#else + void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len); + int ZLIB_INTERNAL zmemcmp(const Bytef* s1, const Bytef* s2, uInt len); + void ZLIB_INTERNAL zmemzero(Bytef* dest, uInt len); +#endif + +/* Diagnostic functions */ +#ifdef ZLIB_DEBUG +# include + extern int ZLIB_INTERNAL z_verbose; + extern void ZLIB_INTERNAL z_error(char *m); +# define Assert(cond,msg) {if(!(cond)) z_error(msg);} +# define Trace(x) {if (z_verbose>=0) fprintf x ;} +# define Tracev(x) {if (z_verbose>0) fprintf x ;} +# define Tracevv(x) {if (z_verbose>1) fprintf x ;} +# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} +# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} +#else +# define Assert(cond,msg) +# define Trace(x) +# define Tracev(x) +# define Tracevv(x) +# define Tracec(c,x) +# define Tracecv(c,x) +#endif + +#ifndef Z_SOLO + voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, + unsigned size); + void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr); +#endif + +#define ZALLOC(strm, items, size) \ + (*((strm)->zalloc))((strm)->opaque, (items), (size)) +#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) +#define TRY_FREE(s, p) {if (p) ZFREE(s, p);} + +/* Reverse the bytes in a 32-bit value */ +#define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \ + (((q) & 0xff00) << 8) + (((q) & 0xff) << 24)) + +#endif /* ZUTIL_H */ diff --git a/widget/milsko/milskosrc/external/libz/src/adler32.c b/widget/milsko/milskosrc/external/libz/src/adler32.c new file mode 100644 index 0000000000..04b81d29ba --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/src/adler32.c @@ -0,0 +1,164 @@ +/* adler32.c -- compute the Adler-32 checksum of a data stream + * Copyright (C) 1995-2011, 2016 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zutil.h" + +#define BASE 65521U /* largest prime smaller than 65536 */ +#define NMAX 5552 +/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */ + +#define DO1(buf,i) {adler += (buf)[i]; sum2 += adler;} +#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); +#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); +#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); +#define DO16(buf) DO8(buf,0); DO8(buf,8); + +/* use NO_DIVIDE if your processor does not do division in hardware -- + try it both ways to see which is faster */ +#ifdef NO_DIVIDE +/* note that this assumes BASE is 65521, where 65536 % 65521 == 15 + (thank you to John Reiser for pointing this out) */ +# define CHOP(a) \ + do { \ + unsigned long tmp = a >> 16; \ + a &= 0xffffUL; \ + a += (tmp << 4) - tmp; \ + } while (0) +# define MOD28(a) \ + do { \ + CHOP(a); \ + if (a >= BASE) a -= BASE; \ + } while (0) +# define MOD(a) \ + do { \ + CHOP(a); \ + MOD28(a); \ + } while (0) +# define MOD63(a) \ + do { /* this assumes a is not negative */ \ + z_off64_t tmp = a >> 32; \ + a &= 0xffffffffL; \ + a += (tmp << 8) - (tmp << 5) + tmp; \ + tmp = a >> 16; \ + a &= 0xffffL; \ + a += (tmp << 4) - tmp; \ + tmp = a >> 16; \ + a &= 0xffffL; \ + a += (tmp << 4) - tmp; \ + if (a >= BASE) a -= BASE; \ + } while (0) +#else +# define MOD(a) a %= BASE +# define MOD28(a) a %= BASE +# define MOD63(a) a %= BASE +#endif + +/* ========================================================================= */ +uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) { + unsigned long sum2; + unsigned n; + + /* split Adler-32 into component sums */ + sum2 = (adler >> 16) & 0xffff; + adler &= 0xffff; + + /* in case user likes doing a byte at a time, keep it fast */ + if (len == 1) { + adler += buf[0]; + if (adler >= BASE) + adler -= BASE; + sum2 += adler; + if (sum2 >= BASE) + sum2 -= BASE; + return adler | (sum2 << 16); + } + + /* initial Adler-32 value (deferred check for len == 1 speed) */ + if (buf == Z_NULL) + return 1L; + + /* in case short lengths are provided, keep it somewhat fast */ + if (len < 16) { + while (len--) { + adler += *buf++; + sum2 += adler; + } + if (adler >= BASE) + adler -= BASE; + MOD28(sum2); /* only added so many BASE's */ + return adler | (sum2 << 16); + } + + /* do length NMAX blocks -- requires just one modulo operation */ + while (len >= NMAX) { + len -= NMAX; + n = NMAX / 16; /* NMAX is divisible by 16 */ + do { + DO16(buf); /* 16 sums unrolled */ + buf += 16; + } while (--n); + MOD(adler); + MOD(sum2); + } + + /* do remaining bytes (less than NMAX, still just one modulo) */ + if (len) { /* avoid modulos if none remaining */ + while (len >= 16) { + len -= 16; + DO16(buf); + buf += 16; + } + while (len--) { + adler += *buf++; + sum2 += adler; + } + MOD(adler); + MOD(sum2); + } + + /* return recombined sums */ + return adler | (sum2 << 16); +} + +/* ========================================================================= */ +uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) { + return adler32_z(adler, buf, len); +} + +/* ========================================================================= */ +local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) { + unsigned long sum1; + unsigned long sum2; + unsigned rem; + + /* for negative len, return invalid adler32 as a clue for debugging */ + if (len2 < 0) + return 0xffffffffUL; + + /* the derivation of this formula is left as an exercise for the reader */ + MOD63(len2); /* assumes len2 >= 0 */ + rem = (unsigned)len2; + sum1 = adler1 & 0xffff; + sum2 = rem * sum1; + MOD(sum2); + sum1 += (adler2 & 0xffff) + BASE - 1; + sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem; + if (sum1 >= BASE) sum1 -= BASE; + if (sum1 >= BASE) sum1 -= BASE; + if (sum2 >= ((unsigned long)BASE << 1)) sum2 -= ((unsigned long)BASE << 1); + if (sum2 >= BASE) sum2 -= BASE; + return sum1 | (sum2 << 16); +} + +/* ========================================================================= */ +uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) { + return adler32_combine_(adler1, adler2, len2); +} + +uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) { + return adler32_combine_(adler1, adler2, len2); +} diff --git a/widget/milsko/milskosrc/external/libz/src/compress.c b/widget/milsko/milskosrc/external/libz/src/compress.c new file mode 100644 index 0000000000..f43bacf7ab --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/src/compress.c @@ -0,0 +1,75 @@ +/* compress.c -- compress a memory buffer + * Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#define ZLIB_INTERNAL +#include "zlib.h" + +/* =========================================================================== + Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least 0.1% larger than sourceLen plus + 12 bytes. Upon exit, destLen is the actual size of the compressed buffer. + + compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +*/ +int ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source, + uLong sourceLen, int level) { + z_stream stream; + int err; + const uInt max = (uInt)-1; + uLong left; + + left = *destLen; + *destLen = 0; + + stream.zalloc = (alloc_func)0; + stream.zfree = (free_func)0; + stream.opaque = (voidpf)0; + + err = deflateInit(&stream, level); + if (err != Z_OK) return err; + + stream.next_out = dest; + stream.avail_out = 0; + stream.next_in = (z_const Bytef *)source; + stream.avail_in = 0; + + do { + if (stream.avail_out == 0) { + stream.avail_out = left > (uLong)max ? max : (uInt)left; + left -= stream.avail_out; + } + if (stream.avail_in == 0) { + stream.avail_in = sourceLen > (uLong)max ? max : (uInt)sourceLen; + sourceLen -= stream.avail_in; + } + err = deflate(&stream, sourceLen ? Z_NO_FLUSH : Z_FINISH); + } while (err == Z_OK); + + *destLen = stream.total_out; + deflateEnd(&stream); + return err == Z_STREAM_END ? Z_OK : err; +} + +/* =========================================================================== + */ +int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source, + uLong sourceLen) { + return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION); +} + +/* =========================================================================== + If the default memLevel or windowBits for deflateInit() is changed, then + this function needs to be updated. + */ +uLong ZEXPORT compressBound(uLong sourceLen) { + return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + + (sourceLen >> 25) + 13; +} diff --git a/widget/milsko/milskosrc/external/libz/src/crc32.c b/widget/milsko/milskosrc/external/libz/src/crc32.c new file mode 100644 index 0000000000..6c38f5c04c --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/src/crc32.c @@ -0,0 +1,1049 @@ +/* crc32.c -- compute the CRC-32 of a data stream + * Copyright (C) 1995-2022 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + * + * This interleaved implementation of a CRC makes use of pipelined multiple + * arithmetic-logic units, commonly found in modern CPU cores. It is due to + * Kadatch and Jenkins (2010). See doc/crc-doc.1.0.pdf in this distribution. + */ + +/* @(#) $Id$ */ + +/* + Note on the use of DYNAMIC_CRC_TABLE: there is no mutex or semaphore + protection on the static variables used to control the first-use generation + of the crc tables. Therefore, if you #define DYNAMIC_CRC_TABLE, you should + first call get_crc_table() to initialize the tables before allowing more than + one thread to use crc32(). + + MAKECRCH can be #defined to write out crc32.h. A main() routine is also + produced, so that this one source file can be compiled to an executable. + */ + +#ifdef MAKECRCH +# include +# ifndef DYNAMIC_CRC_TABLE +# define DYNAMIC_CRC_TABLE +# endif /* !DYNAMIC_CRC_TABLE */ +#endif /* MAKECRCH */ + +#include "zutil.h" /* for Z_U4, Z_U8, z_crc_t, and FAR definitions */ + + /* + A CRC of a message is computed on N braids of words in the message, where + each word consists of W bytes (4 or 8). If N is 3, for example, then three + running sparse CRCs are calculated respectively on each braid, at these + indices in the array of words: 0, 3, 6, ..., 1, 4, 7, ..., and 2, 5, 8, ... + This is done starting at a word boundary, and continues until as many blocks + of N * W bytes as are available have been processed. The results are combined + into a single CRC at the end. For this code, N must be in the range 1..6 and + W must be 4 or 8. The upper limit on N can be increased if desired by adding + more #if blocks, extending the patterns apparent in the code. In addition, + crc32.h would need to be regenerated, if the maximum N value is increased. + + N and W are chosen empirically by benchmarking the execution time on a given + processor. The choices for N and W below were based on testing on Intel Kaby + Lake i7, AMD Ryzen 7, ARM Cortex-A57, Sparc64-VII, PowerPC POWER9, and MIPS64 + Octeon II processors. The Intel, AMD, and ARM processors were all fastest + with N=5, W=8. The Sparc, PowerPC, and MIPS64 were all fastest at N=5, W=4. + They were all tested with either gcc or clang, all using the -O3 optimization + level. Your mileage may vary. + */ + +/* Define N */ +#ifdef Z_TESTN +# define N Z_TESTN +#else +# define N 5 +#endif +#if N < 1 || N > 6 +# error N must be in 1..6 +#endif + +/* + z_crc_t must be at least 32 bits. z_word_t must be at least as long as + z_crc_t. It is assumed here that z_word_t is either 32 bits or 64 bits, and + that bytes are eight bits. + */ + +/* + Define W and the associated z_word_t type. If W is not defined, then a + braided calculation is not used, and the associated tables and code are not + compiled. + */ +#ifdef Z_TESTW +# if Z_TESTW-1 != -1 +# define W Z_TESTW +# endif +#else +# ifdef MAKECRCH +# define W 8 /* required for MAKECRCH */ +# else +# if defined(__x86_64__) || defined(__aarch64__) +# define W 8 +# else +# define W 4 +# endif +# endif +#endif +#ifdef W +# if W == 8 && defined(Z_U8) + typedef Z_U8 z_word_t; +# elif defined(Z_U4) +# undef W +# define W 4 + typedef Z_U4 z_word_t; +# else +# undef W +# endif +#endif + +/* If available, use the ARM processor CRC32 instruction. */ +#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8 +# define ARMCRC32 +#endif + +#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) +/* + Swap the bytes in a z_word_t to convert between little and big endian. Any + self-respecting compiler will optimize this to a single machine byte-swap + instruction, if one is available. This assumes that word_t is either 32 bits + or 64 bits. + */ +local z_word_t byte_swap(z_word_t word) { +# if W == 8 + return + (word & 0xff00000000000000) >> 56 | + (word & 0xff000000000000) >> 40 | + (word & 0xff0000000000) >> 24 | + (word & 0xff00000000) >> 8 | + (word & 0xff000000) << 8 | + (word & 0xff0000) << 24 | + (word & 0xff00) << 40 | + (word & 0xff) << 56; +# else /* W == 4 */ + return + (word & 0xff000000) >> 24 | + (word & 0xff0000) >> 8 | + (word & 0xff00) << 8 | + (word & 0xff) << 24; +# endif +} +#endif + +#ifdef DYNAMIC_CRC_TABLE +/* ========================================================================= + * Table of powers of x for combining CRC-32s, filled in by make_crc_table() + * below. + */ + local z_crc_t FAR x2n_table[32]; +#else +/* ========================================================================= + * Tables for byte-wise and braided CRC-32 calculations, and a table of powers + * of x for combining CRC-32s, all made by make_crc_table(). + */ +# include "crc32.h" +#endif + +/* CRC polynomial. */ +#define POLY 0xedb88320 /* p(x) reflected, with x^32 implied */ + +/* + Return a(x) multiplied by b(x) modulo p(x), where p(x) is the CRC polynomial, + reflected. For speed, this requires that a not be zero. + */ +local z_crc_t multmodp(z_crc_t a, z_crc_t b) { + z_crc_t m, p; + + m = (z_crc_t)1 << 31; + p = 0; + for (;;) { + if (a & m) { + p ^= b; + if ((a & (m - 1)) == 0) + break; + } + m >>= 1; + b = b & 1 ? (b >> 1) ^ POLY : b >> 1; + } + return p; +} + +/* + Return x^(n * 2^k) modulo p(x). Requires that x2n_table[] has been + initialized. + */ +local z_crc_t x2nmodp(z_off64_t n, unsigned k) { + z_crc_t p; + + p = (z_crc_t)1 << 31; /* x^0 == 1 */ + while (n) { + if (n & 1) + p = multmodp(x2n_table[k & 31], p); + n >>= 1; + k++; + } + return p; +} + +#ifdef DYNAMIC_CRC_TABLE +/* ========================================================================= + * Build the tables for byte-wise and braided CRC-32 calculations, and a table + * of powers of x for combining CRC-32s. + */ +local z_crc_t FAR crc_table[256]; +#ifdef W + local z_word_t FAR crc_big_table[256]; + local z_crc_t FAR crc_braid_table[W][256]; + local z_word_t FAR crc_braid_big_table[W][256]; + local void braid(z_crc_t [][256], z_word_t [][256], int, int); +#endif +#ifdef MAKECRCH + local void write_table(FILE *, const z_crc_t FAR *, int); + local void write_table32hi(FILE *, const z_word_t FAR *, int); + local void write_table64(FILE *, const z_word_t FAR *, int); +#endif /* MAKECRCH */ + +/* + Define a once() function depending on the availability of atomics. If this is + compiled with DYNAMIC_CRC_TABLE defined, and if CRCs will be computed in + multiple threads, and if atomics are not available, then get_crc_table() must + be called to initialize the tables and must return before any threads are + allowed to compute or combine CRCs. + */ + +/* Definition of once functionality. */ +typedef struct once_s once_t; + +/* Check for the availability of atomics. */ +#if defined(__STDC__) && __STDC_VERSION__ >= 201112L && \ + !defined(__STDC_NO_ATOMICS__) + +#include + +/* Structure for once(), which must be initialized with ONCE_INIT. */ +struct once_s { + atomic_flag begun; + atomic_int done; +}; +#define ONCE_INIT {ATOMIC_FLAG_INIT, 0} + +/* + Run the provided init() function exactly once, even if multiple threads + invoke once() at the same time. The state must be a once_t initialized with + ONCE_INIT. + */ +local void once(once_t *state, void (*init)(void)) { + if (!atomic_load(&state->done)) { + if (atomic_flag_test_and_set(&state->begun)) + while (!atomic_load(&state->done)) + ; + else { + init(); + atomic_store(&state->done, 1); + } + } +} + +#else /* no atomics */ + +/* Structure for once(), which must be initialized with ONCE_INIT. */ +struct once_s { + volatile int begun; + volatile int done; +}; +#define ONCE_INIT {0, 0} + +/* Test and set. Alas, not atomic, but tries to minimize the period of + vulnerability. */ +local int test_and_set(int volatile *flag) { + int was; + + was = *flag; + *flag = 1; + return was; +} + +/* Run the provided init() function once. This is not thread-safe. */ +local void once(once_t *state, void (*init)(void)) { + if (!state->done) { + if (test_and_set(&state->begun)) + while (!state->done) + ; + else { + init(); + state->done = 1; + } + } +} + +#endif + +/* State for once(). */ +local once_t made = ONCE_INIT; + +/* + Generate tables for a byte-wise 32-bit CRC calculation on the polynomial: + x^32+x^26+x^23+x^22+x^16+x^12+x^11+x^10+x^8+x^7+x^5+x^4+x^2+x+1. + + Polynomials over GF(2) are represented in binary, one bit per coefficient, + with the lowest powers in the most significant bit. Then adding polynomials + is just exclusive-or, and multiplying a polynomial by x is a right shift by + one. If we call the above polynomial p, and represent a byte as the + polynomial q, also with the lowest power in the most significant bit (so the + byte 0xb1 is the polynomial x^7+x^3+x^2+1), then the CRC is (q*x^32) mod p, + where a mod b means the remainder after dividing a by b. + + This calculation is done using the shift-register method of multiplying and + taking the remainder. The register is initialized to zero, and for each + incoming bit, x^32 is added mod p to the register if the bit is a one (where + x^32 mod p is p+x^32 = x^26+...+1), and the register is multiplied mod p by x + (which is shifting right by one and adding x^32 mod p if the bit shifted out + is a one). We start with the highest power (least significant bit) of q and + repeat for all eight bits of q. + + The table is simply the CRC of all possible eight bit values. This is all the + information needed to generate CRCs on data a byte at a time for all + combinations of CRC register values and incoming bytes. + */ + +local void make_crc_table(void) { + unsigned i, j, n; + z_crc_t p; + + /* initialize the CRC of bytes tables */ + for (i = 0; i < 256; i++) { + p = i; + for (j = 0; j < 8; j++) + p = p & 1 ? (p >> 1) ^ POLY : p >> 1; + crc_table[i] = p; +#ifdef W + crc_big_table[i] = byte_swap(p); +#endif + } + + /* initialize the x^2^n mod p(x) table */ + p = (z_crc_t)1 << 30; /* x^1 */ + x2n_table[0] = p; + for (n = 1; n < 32; n++) + x2n_table[n] = p = multmodp(p, p); + +#ifdef W + /* initialize the braiding tables -- needs x2n_table[] */ + braid(crc_braid_table, crc_braid_big_table, N, W); +#endif + +#ifdef MAKECRCH + { + /* + The crc32.h header file contains tables for both 32-bit and 64-bit + z_word_t's, and so requires a 64-bit type be available. In that case, + z_word_t must be defined to be 64-bits. This code then also generates + and writes out the tables for the case that z_word_t is 32 bits. + */ +#if !defined(W) || W != 8 +# error Need a 64-bit integer type in order to generate crc32.h. +#endif + FILE *out; + int k, n; + z_crc_t ltl[8][256]; + z_word_t big[8][256]; + + out = fopen("crc32.h", "w"); + if (out == NULL) return; + + /* write out little-endian CRC table to crc32.h */ + fprintf(out, + "/* crc32.h -- tables for rapid CRC calculation\n" + " * Generated automatically by crc32.c\n */\n" + "\n" + "local const z_crc_t FAR crc_table[] = {\n" + " "); + write_table(out, crc_table, 256); + fprintf(out, + "};\n"); + + /* write out big-endian CRC table for 64-bit z_word_t to crc32.h */ + fprintf(out, + "\n" + "#ifdef W\n" + "\n" + "#if W == 8\n" + "\n" + "local const z_word_t FAR crc_big_table[] = {\n" + " "); + write_table64(out, crc_big_table, 256); + fprintf(out, + "};\n"); + + /* write out big-endian CRC table for 32-bit z_word_t to crc32.h */ + fprintf(out, + "\n" + "#else /* W == 4 */\n" + "\n" + "local const z_word_t FAR crc_big_table[] = {\n" + " "); + write_table32hi(out, crc_big_table, 256); + fprintf(out, + "};\n" + "\n" + "#endif\n"); + + /* write out braid tables for each value of N */ + for (n = 1; n <= 6; n++) { + fprintf(out, + "\n" + "#if N == %d\n", n); + + /* compute braid tables for this N and 64-bit word_t */ + braid(ltl, big, n, 8); + + /* write out braid tables for 64-bit z_word_t to crc32.h */ + fprintf(out, + "\n" + "#if W == 8\n" + "\n" + "local const z_crc_t FAR crc_braid_table[][256] = {\n"); + for (k = 0; k < 8; k++) { + fprintf(out, " {"); + write_table(out, ltl[k], 256); + fprintf(out, "}%s", k < 7 ? ",\n" : ""); + } + fprintf(out, + "};\n" + "\n" + "local const z_word_t FAR crc_braid_big_table[][256] = {\n"); + for (k = 0; k < 8; k++) { + fprintf(out, " {"); + write_table64(out, big[k], 256); + fprintf(out, "}%s", k < 7 ? ",\n" : ""); + } + fprintf(out, + "};\n"); + + /* compute braid tables for this N and 32-bit word_t */ + braid(ltl, big, n, 4); + + /* write out braid tables for 32-bit z_word_t to crc32.h */ + fprintf(out, + "\n" + "#else /* W == 4 */\n" + "\n" + "local const z_crc_t FAR crc_braid_table[][256] = {\n"); + for (k = 0; k < 4; k++) { + fprintf(out, " {"); + write_table(out, ltl[k], 256); + fprintf(out, "}%s", k < 3 ? ",\n" : ""); + } + fprintf(out, + "};\n" + "\n" + "local const z_word_t FAR crc_braid_big_table[][256] = {\n"); + for (k = 0; k < 4; k++) { + fprintf(out, " {"); + write_table32hi(out, big[k], 256); + fprintf(out, "}%s", k < 3 ? ",\n" : ""); + } + fprintf(out, + "};\n" + "\n" + "#endif\n" + "\n" + "#endif\n"); + } + fprintf(out, + "\n" + "#endif\n"); + + /* write out zeros operator table to crc32.h */ + fprintf(out, + "\n" + "local const z_crc_t FAR x2n_table[] = {\n" + " "); + write_table(out, x2n_table, 32); + fprintf(out, + "};\n"); + fclose(out); + } +#endif /* MAKECRCH */ +} + +#ifdef MAKECRCH + +/* + Write the 32-bit values in table[0..k-1] to out, five per line in + hexadecimal separated by commas. + */ +local void write_table(FILE *out, const z_crc_t FAR *table, int k) { + int n; + + for (n = 0; n < k; n++) + fprintf(out, "%s0x%08lx%s", n == 0 || n % 5 ? "" : " ", + (unsigned long)(table[n]), + n == k - 1 ? "" : (n % 5 == 4 ? ",\n" : ", ")); +} + +/* + Write the high 32-bits of each value in table[0..k-1] to out, five per line + in hexadecimal separated by commas. + */ +local void write_table32hi(FILE *out, const z_word_t FAR *table, int k) { + int n; + + for (n = 0; n < k; n++) + fprintf(out, "%s0x%08lx%s", n == 0 || n % 5 ? "" : " ", + (unsigned long)(table[n] >> 32), + n == k - 1 ? "" : (n % 5 == 4 ? ",\n" : ", ")); +} + +/* + Write the 64-bit values in table[0..k-1] to out, three per line in + hexadecimal separated by commas. This assumes that if there is a 64-bit + type, then there is also a long long integer type, and it is at least 64 + bits. If not, then the type cast and format string can be adjusted + accordingly. + */ +local void write_table64(FILE *out, const z_word_t FAR *table, int k) { + int n; + + for (n = 0; n < k; n++) + fprintf(out, "%s0x%016llx%s", n == 0 || n % 3 ? "" : " ", + (unsigned long long)(table[n]), + n == k - 1 ? "" : (n % 3 == 2 ? ",\n" : ", ")); +} + +/* Actually do the deed. */ +int main(void) { + make_crc_table(); + return 0; +} + +#endif /* MAKECRCH */ + +#ifdef W +/* + Generate the little and big-endian braid tables for the given n and z_word_t + size w. Each array must have room for w blocks of 256 elements. + */ +local void braid(z_crc_t ltl[][256], z_word_t big[][256], int n, int w) { + int k; + z_crc_t i, p, q; + for (k = 0; k < w; k++) { + p = x2nmodp((n * w + 3 - k) << 3, 0); + ltl[k][0] = 0; + big[w - 1 - k][0] = 0; + for (i = 1; i < 256; i++) { + ltl[k][i] = q = multmodp(i << 24, p); + big[w - 1 - k][i] = byte_swap(q); + } + } +} +#endif + +#endif /* DYNAMIC_CRC_TABLE */ + +/* ========================================================================= + * This function can be used by asm versions of crc32(), and to force the + * generation of the CRC tables in a threaded application. + */ +const z_crc_t FAR * ZEXPORT get_crc_table(void) { +#ifdef DYNAMIC_CRC_TABLE + once(&made, make_crc_table); +#endif /* DYNAMIC_CRC_TABLE */ + return (const z_crc_t FAR *)crc_table; +} + +/* ========================================================================= + * Use ARM machine instructions if available. This will compute the CRC about + * ten times faster than the braided calculation. This code does not check for + * the presence of the CRC instruction at run time. __ARM_FEATURE_CRC32 will + * only be defined if the compilation specifies an ARM processor architecture + * that has the instructions. For example, compiling with -march=armv8.1-a or + * -march=armv8-a+crc, or -march=native if the compile machine has the crc32 + * instructions. + */ +#ifdef ARMCRC32 + +/* + Constants empirically determined to maximize speed. These values are from + measurements on a Cortex-A57. Your mileage may vary. + */ +#define Z_BATCH 3990 /* number of words in a batch */ +#define Z_BATCH_ZEROS 0xa10d3d0c /* computed from Z_BATCH = 3990 */ +#define Z_BATCH_MIN 800 /* fewest words in a final batch */ + +unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf, + z_size_t len) { + z_crc_t val; + z_word_t crc1, crc2; + const z_word_t *word; + z_word_t val0, val1, val2; + z_size_t last, last2, i; + z_size_t num; + + /* Return initial CRC, if requested. */ + if (buf == Z_NULL) return 0; + +#ifdef DYNAMIC_CRC_TABLE + once(&made, make_crc_table); +#endif /* DYNAMIC_CRC_TABLE */ + + /* Pre-condition the CRC */ + crc = (~crc) & 0xffffffff; + + /* Compute the CRC up to a word boundary. */ + while (len && ((z_size_t)buf & 7) != 0) { + len--; + val = *buf++; + __asm__ volatile("crc32b %w0, %w0, %w1" : "+r"(crc) : "r"(val)); + } + + /* Prepare to compute the CRC on full 64-bit words word[0..num-1]. */ + word = (z_word_t const *)buf; + num = len >> 3; + len &= 7; + + /* Do three interleaved CRCs to realize the throughput of one crc32x + instruction per cycle. Each CRC is calculated on Z_BATCH words. The + three CRCs are combined into a single CRC after each set of batches. */ + while (num >= 3 * Z_BATCH) { + crc1 = 0; + crc2 = 0; + for (i = 0; i < Z_BATCH; i++) { + val0 = word[i]; + val1 = word[i + Z_BATCH]; + val2 = word[i + 2 * Z_BATCH]; + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0)); + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc1) : "r"(val1)); + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc2) : "r"(val2)); + } + word += 3 * Z_BATCH; + num -= 3 * Z_BATCH; + crc = multmodp(Z_BATCH_ZEROS, crc) ^ crc1; + crc = multmodp(Z_BATCH_ZEROS, crc) ^ crc2; + } + + /* Do one last smaller batch with the remaining words, if there are enough + to pay for the combination of CRCs. */ + last = num / 3; + if (last >= Z_BATCH_MIN) { + last2 = last << 1; + crc1 = 0; + crc2 = 0; + for (i = 0; i < last; i++) { + val0 = word[i]; + val1 = word[i + last]; + val2 = word[i + last2]; + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0)); + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc1) : "r"(val1)); + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc2) : "r"(val2)); + } + word += 3 * last; + num -= 3 * last; + val = x2nmodp(last, 6); + crc = multmodp(val, crc) ^ crc1; + crc = multmodp(val, crc) ^ crc2; + } + + /* Compute the CRC on any remaining words. */ + for (i = 0; i < num; i++) { + val0 = word[i]; + __asm__ volatile("crc32x %w0, %w0, %x1" : "+r"(crc) : "r"(val0)); + } + word += num; + + /* Complete the CRC on any remaining bytes. */ + buf = (const unsigned char FAR *)word; + while (len) { + len--; + val = *buf++; + __asm__ volatile("crc32b %w0, %w0, %w1" : "+r"(crc) : "r"(val)); + } + + /* Return the CRC, post-conditioned. */ + return crc ^ 0xffffffff; +} + +#else + +#ifdef W + +/* + Return the CRC of the W bytes in the word_t data, taking the + least-significant byte of the word as the first byte of data, without any pre + or post conditioning. This is used to combine the CRCs of each braid. + */ +local z_crc_t crc_word(z_word_t data) { + int k; + for (k = 0; k < W; k++) + data = (data >> 8) ^ crc_table[data & 0xff]; + return (z_crc_t)data; +} + +local z_word_t crc_word_big(z_word_t data) { + int k; + for (k = 0; k < W; k++) + data = (data << 8) ^ + crc_big_table[(data >> ((W - 1) << 3)) & 0xff]; + return data; +} + +#endif + +/* ========================================================================= */ +unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf, + z_size_t len) { + /* Return initial CRC, if requested. */ + if (buf == Z_NULL) return 0; + +#ifdef DYNAMIC_CRC_TABLE + once(&made, make_crc_table); +#endif /* DYNAMIC_CRC_TABLE */ + + /* Pre-condition the CRC */ + crc = (~crc) & 0xffffffff; + +#ifdef W + + /* If provided enough bytes, do a braided CRC calculation. */ + if (len >= N * W + W - 1) { + z_size_t blks; + z_word_t const *words; + unsigned endian; + int k; + + /* Compute the CRC up to a z_word_t boundary. */ + while (len && ((z_size_t)buf & (W - 1)) != 0) { + len--; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + } + + /* Compute the CRC on as many N z_word_t blocks as are available. */ + blks = len / (N * W); + len -= blks * N * W; + words = (z_word_t const *)buf; + + /* Do endian check at execution time instead of compile time, since ARM + processors can change the endianness at execution time. If the + compiler knows what the endianness will be, it can optimize out the + check and the unused branch. */ + endian = 1; + if (*(unsigned char *)&endian) { + /* Little endian. */ + + z_crc_t crc0; + z_word_t word0; +#if N > 1 + z_crc_t crc1; + z_word_t word1; +#if N > 2 + z_crc_t crc2; + z_word_t word2; +#if N > 3 + z_crc_t crc3; + z_word_t word3; +#if N > 4 + z_crc_t crc4; + z_word_t word4; +#if N > 5 + z_crc_t crc5; + z_word_t word5; +#endif +#endif +#endif +#endif +#endif + + /* Initialize the CRC for each braid. */ + crc0 = crc; +#if N > 1 + crc1 = 0; +#if N > 2 + crc2 = 0; +#if N > 3 + crc3 = 0; +#if N > 4 + crc4 = 0; +#if N > 5 + crc5 = 0; +#endif +#endif +#endif +#endif +#endif + + /* + Process the first blks-1 blocks, computing the CRCs on each braid + independently. + */ + while (--blks) { + /* Load the word for each braid into registers. */ + word0 = crc0 ^ words[0]; +#if N > 1 + word1 = crc1 ^ words[1]; +#if N > 2 + word2 = crc2 ^ words[2]; +#if N > 3 + word3 = crc3 ^ words[3]; +#if N > 4 + word4 = crc4 ^ words[4]; +#if N > 5 + word5 = crc5 ^ words[5]; +#endif +#endif +#endif +#endif +#endif + words += N; + + /* Compute and update the CRC for each word. The loop should + get unrolled. */ + crc0 = crc_braid_table[0][word0 & 0xff]; +#if N > 1 + crc1 = crc_braid_table[0][word1 & 0xff]; +#if N > 2 + crc2 = crc_braid_table[0][word2 & 0xff]; +#if N > 3 + crc3 = crc_braid_table[0][word3 & 0xff]; +#if N > 4 + crc4 = crc_braid_table[0][word4 & 0xff]; +#if N > 5 + crc5 = crc_braid_table[0][word5 & 0xff]; +#endif +#endif +#endif +#endif +#endif + for (k = 1; k < W; k++) { + crc0 ^= crc_braid_table[k][(word0 >> (k << 3)) & 0xff]; +#if N > 1 + crc1 ^= crc_braid_table[k][(word1 >> (k << 3)) & 0xff]; +#if N > 2 + crc2 ^= crc_braid_table[k][(word2 >> (k << 3)) & 0xff]; +#if N > 3 + crc3 ^= crc_braid_table[k][(word3 >> (k << 3)) & 0xff]; +#if N > 4 + crc4 ^= crc_braid_table[k][(word4 >> (k << 3)) & 0xff]; +#if N > 5 + crc5 ^= crc_braid_table[k][(word5 >> (k << 3)) & 0xff]; +#endif +#endif +#endif +#endif +#endif + } + } + + /* + Process the last block, combining the CRCs of the N braids at the + same time. + */ + crc = crc_word(crc0 ^ words[0]); +#if N > 1 + crc = crc_word(crc1 ^ words[1] ^ crc); +#if N > 2 + crc = crc_word(crc2 ^ words[2] ^ crc); +#if N > 3 + crc = crc_word(crc3 ^ words[3] ^ crc); +#if N > 4 + crc = crc_word(crc4 ^ words[4] ^ crc); +#if N > 5 + crc = crc_word(crc5 ^ words[5] ^ crc); +#endif +#endif +#endif +#endif +#endif + words += N; + } + else { + /* Big endian. */ + + z_word_t crc0, word0, comb; +#if N > 1 + z_word_t crc1, word1; +#if N > 2 + z_word_t crc2, word2; +#if N > 3 + z_word_t crc3, word3; +#if N > 4 + z_word_t crc4, word4; +#if N > 5 + z_word_t crc5, word5; +#endif +#endif +#endif +#endif +#endif + + /* Initialize the CRC for each braid. */ + crc0 = byte_swap(crc); +#if N > 1 + crc1 = 0; +#if N > 2 + crc2 = 0; +#if N > 3 + crc3 = 0; +#if N > 4 + crc4 = 0; +#if N > 5 + crc5 = 0; +#endif +#endif +#endif +#endif +#endif + + /* + Process the first blks-1 blocks, computing the CRCs on each braid + independently. + */ + while (--blks) { + /* Load the word for each braid into registers. */ + word0 = crc0 ^ words[0]; +#if N > 1 + word1 = crc1 ^ words[1]; +#if N > 2 + word2 = crc2 ^ words[2]; +#if N > 3 + word3 = crc3 ^ words[3]; +#if N > 4 + word4 = crc4 ^ words[4]; +#if N > 5 + word5 = crc5 ^ words[5]; +#endif +#endif +#endif +#endif +#endif + words += N; + + /* Compute and update the CRC for each word. The loop should + get unrolled. */ + crc0 = crc_braid_big_table[0][word0 & 0xff]; +#if N > 1 + crc1 = crc_braid_big_table[0][word1 & 0xff]; +#if N > 2 + crc2 = crc_braid_big_table[0][word2 & 0xff]; +#if N > 3 + crc3 = crc_braid_big_table[0][word3 & 0xff]; +#if N > 4 + crc4 = crc_braid_big_table[0][word4 & 0xff]; +#if N > 5 + crc5 = crc_braid_big_table[0][word5 & 0xff]; +#endif +#endif +#endif +#endif +#endif + for (k = 1; k < W; k++) { + crc0 ^= crc_braid_big_table[k][(word0 >> (k << 3)) & 0xff]; +#if N > 1 + crc1 ^= crc_braid_big_table[k][(word1 >> (k << 3)) & 0xff]; +#if N > 2 + crc2 ^= crc_braid_big_table[k][(word2 >> (k << 3)) & 0xff]; +#if N > 3 + crc3 ^= crc_braid_big_table[k][(word3 >> (k << 3)) & 0xff]; +#if N > 4 + crc4 ^= crc_braid_big_table[k][(word4 >> (k << 3)) & 0xff]; +#if N > 5 + crc5 ^= crc_braid_big_table[k][(word5 >> (k << 3)) & 0xff]; +#endif +#endif +#endif +#endif +#endif + } + } + + /* + Process the last block, combining the CRCs of the N braids at the + same time. + */ + comb = crc_word_big(crc0 ^ words[0]); +#if N > 1 + comb = crc_word_big(crc1 ^ words[1] ^ comb); +#if N > 2 + comb = crc_word_big(crc2 ^ words[2] ^ comb); +#if N > 3 + comb = crc_word_big(crc3 ^ words[3] ^ comb); +#if N > 4 + comb = crc_word_big(crc4 ^ words[4] ^ comb); +#if N > 5 + comb = crc_word_big(crc5 ^ words[5] ^ comb); +#endif +#endif +#endif +#endif +#endif + words += N; + crc = byte_swap(comb); + } + + /* + Update the pointer to the remaining bytes to process. + */ + buf = (unsigned char const *)words; + } + +#endif /* W */ + + /* Complete the computation of the CRC on any remaining bytes. */ + while (len >= 8) { + len -= 8; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + } + while (len) { + len--; + crc = (crc >> 8) ^ crc_table[(crc ^ *buf++) & 0xff]; + } + + /* Return the CRC, post-conditioned. */ + return crc ^ 0xffffffff; +} + +#endif + +/* ========================================================================= */ +unsigned long ZEXPORT crc32(unsigned long crc, const unsigned char FAR *buf, + uInt len) { + return crc32_z(crc, buf, len); +} + +/* ========================================================================= */ +uLong ZEXPORT crc32_combine64(uLong crc1, uLong crc2, z_off64_t len2) { +#ifdef DYNAMIC_CRC_TABLE + once(&made, make_crc_table); +#endif /* DYNAMIC_CRC_TABLE */ + return multmodp(x2nmodp(len2, 3), crc1) ^ (crc2 & 0xffffffff); +} + +/* ========================================================================= */ +uLong ZEXPORT crc32_combine(uLong crc1, uLong crc2, z_off_t len2) { + return crc32_combine64(crc1, crc2, (z_off64_t)len2); +} + +/* ========================================================================= */ +uLong ZEXPORT crc32_combine_gen64(z_off64_t len2) { +#ifdef DYNAMIC_CRC_TABLE + once(&made, make_crc_table); +#endif /* DYNAMIC_CRC_TABLE */ + return x2nmodp(len2, 3); +} + +/* ========================================================================= */ +uLong ZEXPORT crc32_combine_gen(z_off_t len2) { + return crc32_combine_gen64((z_off64_t)len2); +} + +/* ========================================================================= */ +uLong ZEXPORT crc32_combine_op(uLong crc1, uLong crc2, uLong op) { + return multmodp(op, crc1) ^ (crc2 & 0xffffffff); +} diff --git a/widget/milsko/milskosrc/external/libz/src/deflate.c b/widget/milsko/milskosrc/external/libz/src/deflate.c new file mode 100644 index 0000000000..012ea8148e --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/src/deflate.c @@ -0,0 +1,2139 @@ +/* deflate.c -- compress data using the deflation algorithm + * Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * ALGORITHM + * + * The "deflation" process depends on being able to identify portions + * of the input text which are identical to earlier input (within a + * sliding window trailing behind the input currently being processed). + * + * The most straightforward technique turns out to be the fastest for + * most input files: try all possible matches and select the longest. + * The key feature of this algorithm is that insertions into the string + * dictionary are very simple and thus fast, and deletions are avoided + * completely. Insertions are performed at each input character, whereas + * string matches are performed only when the previous match ends. So it + * is preferable to spend more time in matches to allow very fast string + * insertions and avoid deletions. The matching algorithm for small + * strings is inspired from that of Rabin & Karp. A brute force approach + * is used to find longer strings when a small match has been found. + * A similar algorithm is used in comic (by Jan-Mark Wams) and freeze + * (by Leonid Broukhis). + * A previous version of this file used a more sophisticated algorithm + * (by Fiala and Greene) which is guaranteed to run in linear amortized + * time, but has a larger average cost, uses more memory and is patented. + * However the F&G algorithm may be faster for some highly redundant + * files if the parameter max_chain_length (described below) is too large. + * + * ACKNOWLEDGEMENTS + * + * The idea of lazy evaluation of matches is due to Jan-Mark Wams, and + * I found it in 'freeze' written by Leonid Broukhis. + * Thanks to many people for bug reports and testing. + * + * REFERENCES + * + * Deutsch, L.P.,"DEFLATE Compressed Data Format Specification". + * Available in http://tools.ietf.org/html/rfc1951 + * + * A description of the Rabin and Karp algorithm is given in the book + * "Algorithms" by R. Sedgewick, Addison-Wesley, p252. + * + * Fiala,E.R., and Greene,D.H. + * Data Compression with Finite Windows, Comm.ACM, 32,4 (1989) 490-595 + * + */ + +/* @(#) $Id$ */ + +#include "deflate.h" + +const char deflate_copyright[] = + " deflate 1.3.1 Copyright 1995-2024 Jean-loup Gailly and Mark Adler "; +/* + If you use the zlib library in a product, an acknowledgment is welcome + in the documentation of your product. If for some reason you cannot + include such an acknowledgment, I would appreciate that you keep this + copyright string in the executable of your product. + */ + +typedef enum { + need_more, /* block not completed, need more input or more output */ + block_done, /* block flush performed */ + finish_started, /* finish started, need only more output at next deflate */ + finish_done /* finish done, accept no more input or output */ +} block_state; + +typedef block_state (*compress_func)(deflate_state *s, int flush); +/* Compression function. Returns the block state after the call. */ + +local block_state deflate_stored(deflate_state *s, int flush); +local block_state deflate_fast(deflate_state *s, int flush); +#ifndef FASTEST +local block_state deflate_slow(deflate_state *s, int flush); +#endif +local block_state deflate_rle(deflate_state *s, int flush); +local block_state deflate_huff(deflate_state *s, int flush); + +/* =========================================================================== + * Local data + */ + +#define NIL 0 +/* Tail of hash chains */ + +#ifndef TOO_FAR +# define TOO_FAR 4096 +#endif +/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */ + +/* Values for max_lazy_match, good_match and max_chain_length, depending on + * the desired pack level (0..9). The values given below have been tuned to + * exclude worst case performance for pathological files. Better values may be + * found for specific files. + */ +typedef struct config_s { + ush good_length; /* reduce lazy search above this match length */ + ush max_lazy; /* do not perform lazy search above this match length */ + ush nice_length; /* quit search above this match length */ + ush max_chain; + compress_func func; +} config; + +#ifdef FASTEST +local const config configuration_table[2] = { +/* good lazy nice chain */ +/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ +/* 1 */ {4, 4, 8, 4, deflate_fast}}; /* max speed, no lazy matches */ +#else +local const config configuration_table[10] = { +/* good lazy nice chain */ +/* 0 */ {0, 0, 0, 0, deflate_stored}, /* store only */ +/* 1 */ {4, 4, 8, 4, deflate_fast}, /* max speed, no lazy matches */ +/* 2 */ {4, 5, 16, 8, deflate_fast}, +/* 3 */ {4, 6, 32, 32, deflate_fast}, + +/* 4 */ {4, 4, 16, 16, deflate_slow}, /* lazy matches */ +/* 5 */ {8, 16, 32, 32, deflate_slow}, +/* 6 */ {8, 16, 128, 128, deflate_slow}, +/* 7 */ {8, 32, 128, 256, deflate_slow}, +/* 8 */ {32, 128, 258, 1024, deflate_slow}, +/* 9 */ {32, 258, 258, 4096, deflate_slow}}; /* max compression */ +#endif + +/* Note: the deflate() code requires max_lazy >= MIN_MATCH and max_chain >= 4 + * For deflate_fast() (levels <= 3) good is ignored and lazy has a different + * meaning. + */ + +/* rank Z_BLOCK between Z_NO_FLUSH and Z_PARTIAL_FLUSH */ +#define RANK(f) (((f) * 2) - ((f) > 4 ? 9 : 0)) + +/* =========================================================================== + * Update a hash value with the given input byte + * IN assertion: all calls to UPDATE_HASH are made with consecutive input + * characters, so that a running hash key can be computed from the previous + * key instead of complete recalculation each time. + */ +#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask) + + +/* =========================================================================== + * Insert string str in the dictionary and set match_head to the previous head + * of the hash chain (the most recent string with same hash key). Return + * the previous length of the hash chain. + * If this file is compiled with -DFASTEST, the compression level is forced + * to 1, and no hash chains are maintained. + * IN assertion: all calls to INSERT_STRING are made with consecutive input + * characters and the first MIN_MATCH bytes of str are valid (except for + * the last MIN_MATCH-1 bytes of the input file). + */ +#ifdef FASTEST +#define INSERT_STRING(s, str, match_head) \ + (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ + match_head = s->head[s->ins_h], \ + s->head[s->ins_h] = (Pos)(str)) +#else +#define INSERT_STRING(s, str, match_head) \ + (UPDATE_HASH(s, s->ins_h, s->window[(str) + (MIN_MATCH-1)]), \ + match_head = s->prev[(str) & s->w_mask] = s->head[s->ins_h], \ + s->head[s->ins_h] = (Pos)(str)) +#endif + +/* =========================================================================== + * Initialize the hash table (avoiding 64K overflow for 16 bit systems). + * prev[] will be initialized on the fly. + */ +#define CLEAR_HASH(s) \ + do { \ + s->head[s->hash_size - 1] = NIL; \ + zmemzero((Bytef *)s->head, \ + (unsigned)(s->hash_size - 1)*sizeof(*s->head)); \ + } while (0) + +/* =========================================================================== + * Slide the hash table when sliding the window down (could be avoided with 32 + * bit values at the expense of memory usage). We slide even when level == 0 to + * keep the hash table consistent if we switch back to level > 0 later. + */ +#if defined(__has_feature) +# if __has_feature(memory_sanitizer) + __attribute__((no_sanitize("memory"))) +# endif +#endif +local void slide_hash(deflate_state *s) { + unsigned n, m; + Posf *p; + uInt wsize = s->w_size; + + n = s->hash_size; + p = &s->head[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m - wsize : NIL); + } while (--n); + n = wsize; +#ifndef FASTEST + p = &s->prev[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m - wsize : NIL); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); +#endif +} + +/* =========================================================================== + * Read a new buffer from the current input stream, update the adler32 + * and total number of bytes read. All deflate() input goes through + * this function so some applications may wish to modify it to avoid + * allocating a large strm->next_in buffer and copying from it. + * (See also flush_pending()). + */ +local unsigned read_buf(z_streamp strm, Bytef *buf, unsigned size) { + unsigned len = strm->avail_in; + + if (len > size) len = size; + if (len == 0) return 0; + + strm->avail_in -= len; + + zmemcpy(buf, strm->next_in, len); + if (strm->state->wrap == 1) { + strm->adler = adler32(strm->adler, buf, len); + } +#ifdef GZIP + else if (strm->state->wrap == 2) { + strm->adler = crc32(strm->adler, buf, len); + } +#endif + strm->next_in += len; + strm->total_in += len; + + return len; +} + +/* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead. + * + * IN assertion: lookahead < MIN_LOOKAHEAD + * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD + * At least one byte has been read, or avail_in == 0; reads are + * performed for at least two bytes (required for the zip translate_eol + * option -- not supported here). + */ +local void fill_window(deflate_state *s) { + unsigned n; + unsigned more; /* Amount of free space at the end of the window. */ + uInt wsize = s->w_size; + + Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); + + do { + more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); + + /* Deal with !@#$% 64K limit: */ + if (sizeof(int) <= 2) { + if (more == 0 && s->strstart == 0 && s->lookahead == 0) { + more = wsize; + + } else if (more == (unsigned)(-1)) { + /* Very unlikely, but possible on 16 bit machine if + * strstart == 0 && lookahead == 1 (input done a byte at time) + */ + more--; + } + } + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + if (s->strstart >= wsize + MAX_DIST(s)) { + + zmemcpy(s->window, s->window + wsize, (unsigned)wsize - more); + s->match_start -= wsize; + s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ + s->block_start -= (long) wsize; + if (s->insert > s->strstart) + s->insert = s->strstart; + slide_hash(s); + more += wsize; + } + if (s->strm->avail_in == 0) break; + + /* If there was no sliding: + * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && + * more == window_size - lookahead - strstart + * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) + * => more >= window_size - 2*WSIZE + 2 + * In the BIG_MEM or MMAP case (not yet supported), + * window_size == input_size + MIN_LOOKAHEAD && + * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. + * Otherwise, window_size == 2*WSIZE so more >= 2. + * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + */ + Assert(more >= 2, "more < 2"); + + n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); + s->lookahead += n; + + /* Initialize the hash value now that we have some input: */ + if (s->lookahead + s->insert >= MIN_MATCH) { + uInt str = s->strstart - s->insert; + s->ins_h = s->window[str]; + UPDATE_HASH(s, s->ins_h, s->window[str + 1]); +#if MIN_MATCH != 3 + Call UPDATE_HASH() MIN_MATCH-3 more times +#endif + while (s->insert) { + UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); +#ifndef FASTEST + s->prev[str & s->w_mask] = s->head[s->ins_h]; +#endif + s->head[s->ins_h] = (Pos)str; + str++; + s->insert--; + if (s->lookahead + s->insert < MIN_MATCH) + break; + } + } + /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, + * but this is not important since only literal bytes will be emitted. + */ + + } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); + + /* If the WIN_INIT bytes after the end of the current data have never been + * written, then zero those bytes in order to avoid memory check reports of + * the use of uninitialized (or uninitialised as Julian writes) bytes by + * the longest match routines. Update the high water mark for the next + * time through here. WIN_INIT is set to MAX_MATCH since the longest match + * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. + */ + if (s->high_water < s->window_size) { + ulg curr = s->strstart + (ulg)(s->lookahead); + ulg init; + + if (s->high_water < curr) { + /* Previous high water mark below current data -- zero WIN_INIT + * bytes or up to end of window, whichever is less. + */ + init = s->window_size - curr; + if (init > WIN_INIT) + init = WIN_INIT; + zmemzero(s->window + curr, (unsigned)init); + s->high_water = curr + init; + } + else if (s->high_water < (ulg)curr + WIN_INIT) { + /* High water mark at or above current data, but below current data + * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up + * to end of window, whichever is less. + */ + init = (ulg)curr + WIN_INIT - s->high_water; + if (init > s->window_size - s->high_water) + init = s->window_size - s->high_water; + zmemzero(s->window + s->high_water, (unsigned)init); + s->high_water += init; + } + } + + Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, + "not enough room for search"); +} + +/* ========================================================================= */ +int ZEXPORT deflateInit_(z_streamp strm, int level, const char *version, + int stream_size) { + return deflateInit2_(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, + Z_DEFAULT_STRATEGY, version, stream_size); + /* To do: ignore strm->next_in if we use it as window */ +} + +/* ========================================================================= */ +int ZEXPORT deflateInit2_(z_streamp strm, int level, int method, + int windowBits, int memLevel, int strategy, + const char *version, int stream_size) { + deflate_state *s; + int wrap = 1; + static const char my_version[] = ZLIB_VERSION; + + if (version == Z_NULL || version[0] != my_version[0] || + stream_size != sizeof(z_stream)) { + return Z_VERSION_ERROR; + } + if (strm == Z_NULL) return Z_STREAM_ERROR; + + strm->msg = Z_NULL; + if (strm->zalloc == (alloc_func)0) { +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; +#endif + } + if (strm->zfree == (free_func)0) +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zfree = zcfree; +#endif + +#ifdef FASTEST + if (level != 0) level = 1; +#else + if (level == Z_DEFAULT_COMPRESSION) level = 6; +#endif + + if (windowBits < 0) { /* suppress zlib wrapper */ + wrap = 0; + if (windowBits < -15) + return Z_STREAM_ERROR; + windowBits = -windowBits; + } +#ifdef GZIP + else if (windowBits > 15) { + wrap = 2; /* write gzip wrapper instead */ + windowBits -= 16; + } +#endif + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || + windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || + strategy < 0 || strategy > Z_FIXED || (windowBits == 8 && wrap != 1)) { + return Z_STREAM_ERROR; + } + if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */ + s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); + if (s == Z_NULL) return Z_MEM_ERROR; + strm->state = (struct internal_state FAR *)s; + s->strm = strm; + s->status = INIT_STATE; /* to pass state test in deflateReset() */ + + s->wrap = wrap; + s->gzhead = Z_NULL; + s->w_bits = (uInt)windowBits; + s->w_size = 1 << s->w_bits; + s->w_mask = s->w_size - 1; + + s->hash_bits = (uInt)memLevel + 7; + s->hash_size = 1 << s->hash_bits; + s->hash_mask = s->hash_size - 1; + s->hash_shift = ((s->hash_bits + MIN_MATCH-1) / MIN_MATCH); + + s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); + s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); + s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); + + s->high_water = 0; /* nothing written to s->window yet */ + + s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ + + /* We overlay pending_buf and sym_buf. This works since the average size + * for length/distance pairs over any compressed block is assured to be 31 + * bits or less. + * + * Analysis: The longest fixed codes are a length code of 8 bits plus 5 + * extra bits, for lengths 131 to 257. The longest fixed distance codes are + * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest + * possible fixed-codes length/distance pair is then 31 bits total. + * + * sym_buf starts one-fourth of the way into pending_buf. So there are + * three bytes in sym_buf for every four bytes in pending_buf. Each symbol + * in sym_buf is three bytes -- two for the distance and one for the + * literal/length. As each symbol is consumed, the pointer to the next + * sym_buf value to read moves forward three bytes. From that symbol, up to + * 31 bits are written to pending_buf. The closest the written pending_buf + * bits gets to the next sym_buf symbol to read is just before the last + * code is written. At that time, 31*(n - 2) bits have been written, just + * after 24*(n - 2) bits have been consumed from sym_buf. sym_buf starts at + * 8*n bits into pending_buf. (Note that the symbol buffer fills when n - 1 + * symbols are written.) The closest the writing gets to what is unread is + * then n + 14 bits. Here n is lit_bufsize, which is 16384 by default, and + * can range from 128 to 32768. + * + * Therefore, at a minimum, there are 142 bits of space between what is + * written and what is read in the overlain buffers, so the symbols cannot + * be overwritten by the compressed data. That space is actually 139 bits, + * due to the three-bit fixed-code block header. + * + * That covers the case where either Z_FIXED is specified, forcing fixed + * codes, or when the use of fixed codes is chosen, because that choice + * results in a smaller compressed block than dynamic codes. That latter + * condition then assures that the above analysis also covers all dynamic + * blocks. A dynamic-code block will only be chosen to be emitted if it has + * fewer bits than a fixed-code block would for the same set of symbols. + * Therefore its average symbol length is assured to be less than 31. So + * the compressed data for a dynamic block also cannot overwrite the + * symbols from which it is being constructed. + */ + + s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, LIT_BUFS); + s->pending_buf_size = (ulg)s->lit_bufsize * 4; + + if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || + s->pending_buf == Z_NULL) { + s->status = FINISH_STATE; + strm->msg = ERR_MSG(Z_MEM_ERROR); + deflateEnd (strm); + return Z_MEM_ERROR; + } +#ifdef LIT_MEM + s->d_buf = (ushf *)(s->pending_buf + (s->lit_bufsize << 1)); + s->l_buf = s->pending_buf + (s->lit_bufsize << 2); + s->sym_end = s->lit_bufsize - 1; +#else + s->sym_buf = s->pending_buf + s->lit_bufsize; + s->sym_end = (s->lit_bufsize - 1) * 3; +#endif + /* We avoid equality with lit_bufsize*3 because of wraparound at 64K + * on 16 bit machines and because stored blocks are restricted to + * 64K-1 bytes. + */ + + s->level = level; + s->strategy = strategy; + s->method = (Byte)method; + + return deflateReset(strm); +} + +/* ========================================================================= + * Check for a valid deflate stream state. Return 0 if ok, 1 if not. + */ +local int deflateStateCheck(z_streamp strm) { + deflate_state *s; + if (strm == Z_NULL || + strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) + return 1; + s = strm->state; + if (s == Z_NULL || s->strm != strm || (s->status != INIT_STATE && +#ifdef GZIP + s->status != GZIP_STATE && +#endif + s->status != EXTRA_STATE && + s->status != NAME_STATE && + s->status != COMMENT_STATE && + s->status != HCRC_STATE && + s->status != BUSY_STATE && + s->status != FINISH_STATE)) + return 1; + return 0; +} + +/* ========================================================================= */ +int ZEXPORT deflateSetDictionary(z_streamp strm, const Bytef *dictionary, + uInt dictLength) { + deflate_state *s; + uInt str, n; + int wrap; + unsigned avail; + z_const unsigned char *next; + + if (deflateStateCheck(strm) || dictionary == Z_NULL) + return Z_STREAM_ERROR; + s = strm->state; + wrap = s->wrap; + if (wrap == 2 || (wrap == 1 && s->status != INIT_STATE) || s->lookahead) + return Z_STREAM_ERROR; + + /* when using zlib wrappers, compute Adler-32 for provided dictionary */ + if (wrap == 1) + strm->adler = adler32(strm->adler, dictionary, dictLength); + s->wrap = 0; /* avoid computing Adler-32 in read_buf */ + + /* if dictionary would fill window, just replace the history */ + if (dictLength >= s->w_size) { + if (wrap == 0) { /* already empty otherwise */ + CLEAR_HASH(s); + s->strstart = 0; + s->block_start = 0L; + s->insert = 0; + } + dictionary += dictLength - s->w_size; /* use the tail */ + dictLength = s->w_size; + } + + /* insert dictionary into window and hash */ + avail = strm->avail_in; + next = strm->next_in; + strm->avail_in = dictLength; + strm->next_in = (z_const Bytef *)dictionary; + fill_window(s); + while (s->lookahead >= MIN_MATCH) { + str = s->strstart; + n = s->lookahead - (MIN_MATCH-1); + do { + UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); +#ifndef FASTEST + s->prev[str & s->w_mask] = s->head[s->ins_h]; +#endif + s->head[s->ins_h] = (Pos)str; + str++; + } while (--n); + s->strstart = str; + s->lookahead = MIN_MATCH-1; + fill_window(s); + } + s->strstart += s->lookahead; + s->block_start = (long)s->strstart; + s->insert = s->lookahead; + s->lookahead = 0; + s->match_length = s->prev_length = MIN_MATCH-1; + s->match_available = 0; + strm->next_in = next; + strm->avail_in = avail; + s->wrap = wrap; + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateGetDictionary(z_streamp strm, Bytef *dictionary, + uInt *dictLength) { + deflate_state *s; + uInt len; + + if (deflateStateCheck(strm)) + return Z_STREAM_ERROR; + s = strm->state; + len = s->strstart + s->lookahead; + if (len > s->w_size) + len = s->w_size; + if (dictionary != Z_NULL && len) + zmemcpy(dictionary, s->window + s->strstart + s->lookahead - len, len); + if (dictLength != Z_NULL) + *dictLength = len; + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateResetKeep(z_streamp strm) { + deflate_state *s; + + if (deflateStateCheck(strm)) { + return Z_STREAM_ERROR; + } + + strm->total_in = strm->total_out = 0; + strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */ + strm->data_type = Z_UNKNOWN; + + s = (deflate_state *)strm->state; + s->pending = 0; + s->pending_out = s->pending_buf; + + if (s->wrap < 0) { + s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */ + } + s->status = +#ifdef GZIP + s->wrap == 2 ? GZIP_STATE : +#endif + INIT_STATE; + strm->adler = +#ifdef GZIP + s->wrap == 2 ? crc32(0L, Z_NULL, 0) : +#endif + adler32(0L, Z_NULL, 0); + s->last_flush = -2; + + _tr_init(s); + + return Z_OK; +} + +/* =========================================================================== + * Initialize the "longest match" routines for a new zlib stream + */ +local void lm_init(deflate_state *s) { + s->window_size = (ulg)2L*s->w_size; + + CLEAR_HASH(s); + + /* Set the default configuration parameters: + */ + s->max_lazy_match = configuration_table[s->level].max_lazy; + s->good_match = configuration_table[s->level].good_length; + s->nice_match = configuration_table[s->level].nice_length; + s->max_chain_length = configuration_table[s->level].max_chain; + + s->strstart = 0; + s->block_start = 0L; + s->lookahead = 0; + s->insert = 0; + s->match_length = s->prev_length = MIN_MATCH-1; + s->match_available = 0; + s->ins_h = 0; +} + +/* ========================================================================= */ +int ZEXPORT deflateReset(z_streamp strm) { + int ret; + + ret = deflateResetKeep(strm); + if (ret == Z_OK) + lm_init(strm->state); + return ret; +} + +/* ========================================================================= */ +int ZEXPORT deflateSetHeader(z_streamp strm, gz_headerp head) { + if (deflateStateCheck(strm) || strm->state->wrap != 2) + return Z_STREAM_ERROR; + strm->state->gzhead = head; + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflatePending(z_streamp strm, unsigned *pending, int *bits) { + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; + if (pending != Z_NULL) + *pending = strm->state->pending; + if (bits != Z_NULL) + *bits = strm->state->bi_valid; + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflatePrime(z_streamp strm, int bits, int value) { + deflate_state *s; + int put; + + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; + s = strm->state; +#ifdef LIT_MEM + if (bits < 0 || bits > 16 || + (uchf *)s->d_buf < s->pending_out + ((Buf_size + 7) >> 3)) + return Z_BUF_ERROR; +#else + if (bits < 0 || bits > 16 || + s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3)) + return Z_BUF_ERROR; +#endif + do { + put = Buf_size - s->bi_valid; + if (put > bits) + put = bits; + s->bi_buf |= (ush)((value & ((1 << put) - 1)) << s->bi_valid); + s->bi_valid += put; + _tr_flush_bits(s); + value >>= put; + bits -= put; + } while (bits); + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateParams(z_streamp strm, int level, int strategy) { + deflate_state *s; + compress_func func; + + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; + s = strm->state; + +#ifdef FASTEST + if (level != 0) level = 1; +#else + if (level == Z_DEFAULT_COMPRESSION) level = 6; +#endif + if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { + return Z_STREAM_ERROR; + } + func = configuration_table[s->level].func; + + if ((strategy != s->strategy || func != configuration_table[level].func) && + s->last_flush != -2) { + /* Flush the last buffer: */ + int err = deflate(strm, Z_BLOCK); + if (err == Z_STREAM_ERROR) + return err; + if (strm->avail_in || (s->strstart - s->block_start) + s->lookahead) + return Z_BUF_ERROR; + } + if (s->level != level) { + if (s->level == 0 && s->matches != 0) { + if (s->matches == 1) + slide_hash(s); + else + CLEAR_HASH(s); + s->matches = 0; + } + s->level = level; + s->max_lazy_match = configuration_table[level].max_lazy; + s->good_match = configuration_table[level].good_length; + s->nice_match = configuration_table[level].nice_length; + s->max_chain_length = configuration_table[level].max_chain; + } + s->strategy = strategy; + return Z_OK; +} + +/* ========================================================================= */ +int ZEXPORT deflateTune(z_streamp strm, int good_length, int max_lazy, + int nice_length, int max_chain) { + deflate_state *s; + + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; + s = strm->state; + s->good_match = (uInt)good_length; + s->max_lazy_match = (uInt)max_lazy; + s->nice_match = nice_length; + s->max_chain_length = (uInt)max_chain; + return Z_OK; +} + +/* ========================================================================= + * For the default windowBits of 15 and memLevel of 8, this function returns a + * close to exact, as well as small, upper bound on the compressed size. This + * is an expansion of ~0.03%, plus a small constant. + * + * For any setting other than those defaults for windowBits and memLevel, one + * of two worst case bounds is returned. This is at most an expansion of ~4% or + * ~13%, plus a small constant. + * + * Both the 0.03% and 4% derive from the overhead of stored blocks. The first + * one is for stored blocks of 16383 bytes (memLevel == 8), whereas the second + * is for stored blocks of 127 bytes (the worst case memLevel == 1). The + * expansion results from five bytes of header for each stored block. + * + * The larger expansion of 13% results from a window size less than or equal to + * the symbols buffer size (windowBits <= memLevel + 7). In that case some of + * the data being compressed may have slid out of the sliding window, impeding + * a stored block from being emitted. Then the only choice is a fixed or + * dynamic block, where a fixed block limits the maximum expansion to 9 bits + * per 8-bit byte, plus 10 bits for every block. The smallest block size for + * which this can occur is 255 (memLevel == 2). + * + * Shifts are used to approximate divisions, for speed. + */ +uLong ZEXPORT deflateBound(z_streamp strm, uLong sourceLen) { + deflate_state *s; + uLong fixedlen, storelen, wraplen; + + /* upper bound for fixed blocks with 9-bit literals and length 255 + (memLevel == 2, which is the lowest that may not use stored blocks) -- + ~13% overhead plus a small constant */ + fixedlen = sourceLen + (sourceLen >> 3) + (sourceLen >> 8) + + (sourceLen >> 9) + 4; + + /* upper bound for stored blocks with length 127 (memLevel == 1) -- + ~4% overhead plus a small constant */ + storelen = sourceLen + (sourceLen >> 5) + (sourceLen >> 7) + + (sourceLen >> 11) + 7; + + /* if can't get parameters, return larger bound plus a zlib wrapper */ + if (deflateStateCheck(strm)) + return (fixedlen > storelen ? fixedlen : storelen) + 6; + + /* compute wrapper length */ + s = strm->state; + switch (s->wrap) { + case 0: /* raw deflate */ + wraplen = 0; + break; + case 1: /* zlib wrapper */ + wraplen = 6 + (s->strstart ? 4 : 0); + break; +#ifdef GZIP + case 2: /* gzip wrapper */ + wraplen = 18; + if (s->gzhead != Z_NULL) { /* user-supplied gzip header */ + Bytef *str; + if (s->gzhead->extra != Z_NULL) + wraplen += 2 + s->gzhead->extra_len; + str = s->gzhead->name; + if (str != Z_NULL) + do { + wraplen++; + } while (*str++); + str = s->gzhead->comment; + if (str != Z_NULL) + do { + wraplen++; + } while (*str++); + if (s->gzhead->hcrc) + wraplen += 2; + } + break; +#endif + default: /* for compiler happiness */ + wraplen = 6; + } + + /* if not default parameters, return one of the conservative bounds */ + if (s->w_bits != 15 || s->hash_bits != 8 + 7) + return (s->w_bits <= s->hash_bits && s->level ? fixedlen : storelen) + + wraplen; + + /* default settings: return tight bound for that case -- ~0.03% overhead + plus a small constant */ + return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + + (sourceLen >> 25) + 13 - 6 + wraplen; +} + +/* ========================================================================= + * Put a short in the pending buffer. The 16-bit value is put in MSB order. + * IN assertion: the stream state is correct and there is enough room in + * pending_buf. + */ +local void putShortMSB(deflate_state *s, uInt b) { + put_byte(s, (Byte)(b >> 8)); + put_byte(s, (Byte)(b & 0xff)); +} + +/* ========================================================================= + * Flush as much pending output as possible. All deflate() output, except for + * some deflate_stored() output, goes through this function so some + * applications may wish to modify it to avoid allocating a large + * strm->next_out buffer and copying into it. (See also read_buf()). + */ +local void flush_pending(z_streamp strm) { + unsigned len; + deflate_state *s = strm->state; + + _tr_flush_bits(s); + len = s->pending; + if (len > strm->avail_out) len = strm->avail_out; + if (len == 0) return; + + zmemcpy(strm->next_out, s->pending_out, len); + strm->next_out += len; + s->pending_out += len; + strm->total_out += len; + strm->avail_out -= len; + s->pending -= len; + if (s->pending == 0) { + s->pending_out = s->pending_buf; + } +} + +/* =========================================================================== + * Update the header CRC with the bytes s->pending_buf[beg..s->pending - 1]. + */ +#define HCRC_UPDATE(beg) \ + do { \ + if (s->gzhead->hcrc && s->pending > (beg)) \ + strm->adler = crc32(strm->adler, s->pending_buf + (beg), \ + s->pending - (beg)); \ + } while (0) + +/* ========================================================================= */ +int ZEXPORT deflate(z_streamp strm, int flush) { + int old_flush; /* value of flush param for previous deflate call */ + deflate_state *s; + + if (deflateStateCheck(strm) || flush > Z_BLOCK || flush < 0) { + return Z_STREAM_ERROR; + } + s = strm->state; + + if (strm->next_out == Z_NULL || + (strm->avail_in != 0 && strm->next_in == Z_NULL) || + (s->status == FINISH_STATE && flush != Z_FINISH)) { + ERR_RETURN(strm, Z_STREAM_ERROR); + } + if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR); + + old_flush = s->last_flush; + s->last_flush = flush; + + /* Flush as much pending output as possible */ + if (s->pending != 0) { + flush_pending(strm); + if (strm->avail_out == 0) { + /* Since avail_out is 0, deflate will be called again with + * more output space, but possibly with both pending and + * avail_in equal to zero. There won't be anything to do, + * but this is not an error situation so make sure we + * return OK instead of BUF_ERROR at next call of deflate: + */ + s->last_flush = -1; + return Z_OK; + } + + /* Make sure there is something to do and avoid duplicate consecutive + * flushes. For repeated and useless calls with Z_FINISH, we keep + * returning Z_STREAM_END instead of Z_BUF_ERROR. + */ + } else if (strm->avail_in == 0 && RANK(flush) <= RANK(old_flush) && + flush != Z_FINISH) { + ERR_RETURN(strm, Z_BUF_ERROR); + } + + /* User must not provide more input after the first FINISH: */ + if (s->status == FINISH_STATE && strm->avail_in != 0) { + ERR_RETURN(strm, Z_BUF_ERROR); + } + + /* Write the header */ + if (s->status == INIT_STATE && s->wrap == 0) + s->status = BUSY_STATE; + if (s->status == INIT_STATE) { + /* zlib header */ + uInt header = (Z_DEFLATED + ((s->w_bits - 8) << 4)) << 8; + uInt level_flags; + + if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2) + level_flags = 0; + else if (s->level < 6) + level_flags = 1; + else if (s->level == 6) + level_flags = 2; + else + level_flags = 3; + header |= (level_flags << 6); + if (s->strstart != 0) header |= PRESET_DICT; + header += 31 - (header % 31); + + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s->strstart != 0) { + putShortMSB(s, (uInt)(strm->adler >> 16)); + putShortMSB(s, (uInt)(strm->adler & 0xffff)); + } + strm->adler = adler32(0L, Z_NULL, 0); + s->status = BUSY_STATE; + + /* Compression must start with an empty pending buffer */ + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + } +#ifdef GZIP + if (s->status == GZIP_STATE) { + /* gzip header */ + strm->adler = crc32(0L, Z_NULL, 0); + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (s->gzhead == Z_NULL) { + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s->level == 9 ? 2 : + (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? + 4 : 0)); + put_byte(s, OS_CODE); + s->status = BUSY_STATE; + + /* Compression must start with an empty pending buffer */ + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + } + else { + put_byte(s, (s->gzhead->text ? 1 : 0) + + (s->gzhead->hcrc ? 2 : 0) + + (s->gzhead->extra == Z_NULL ? 0 : 4) + + (s->gzhead->name == Z_NULL ? 0 : 8) + + (s->gzhead->comment == Z_NULL ? 0 : 16) + ); + put_byte(s, (Byte)(s->gzhead->time & 0xff)); + put_byte(s, (Byte)((s->gzhead->time >> 8) & 0xff)); + put_byte(s, (Byte)((s->gzhead->time >> 16) & 0xff)); + put_byte(s, (Byte)((s->gzhead->time >> 24) & 0xff)); + put_byte(s, s->level == 9 ? 2 : + (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ? + 4 : 0)); + put_byte(s, s->gzhead->os & 0xff); + if (s->gzhead->extra != Z_NULL) { + put_byte(s, s->gzhead->extra_len & 0xff); + put_byte(s, (s->gzhead->extra_len >> 8) & 0xff); + } + if (s->gzhead->hcrc) + strm->adler = crc32(strm->adler, s->pending_buf, + s->pending); + s->gzindex = 0; + s->status = EXTRA_STATE; + } + } + if (s->status == EXTRA_STATE) { + if (s->gzhead->extra != Z_NULL) { + ulg beg = s->pending; /* start of bytes to update crc */ + uInt left = (s->gzhead->extra_len & 0xffff) - s->gzindex; + while (s->pending + left > s->pending_buf_size) { + uInt copy = s->pending_buf_size - s->pending; + zmemcpy(s->pending_buf + s->pending, + s->gzhead->extra + s->gzindex, copy); + s->pending = s->pending_buf_size; + HCRC_UPDATE(beg); + s->gzindex += copy; + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + beg = 0; + left -= copy; + } + zmemcpy(s->pending_buf + s->pending, + s->gzhead->extra + s->gzindex, left); + s->pending += left; + HCRC_UPDATE(beg); + s->gzindex = 0; + } + s->status = NAME_STATE; + } + if (s->status == NAME_STATE) { + if (s->gzhead->name != Z_NULL) { + ulg beg = s->pending; /* start of bytes to update crc */ + int val; + do { + if (s->pending == s->pending_buf_size) { + HCRC_UPDATE(beg); + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + beg = 0; + } + val = s->gzhead->name[s->gzindex++]; + put_byte(s, val); + } while (val != 0); + HCRC_UPDATE(beg); + s->gzindex = 0; + } + s->status = COMMENT_STATE; + } + if (s->status == COMMENT_STATE) { + if (s->gzhead->comment != Z_NULL) { + ulg beg = s->pending; /* start of bytes to update crc */ + int val; + do { + if (s->pending == s->pending_buf_size) { + HCRC_UPDATE(beg); + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + beg = 0; + } + val = s->gzhead->comment[s->gzindex++]; + put_byte(s, val); + } while (val != 0); + HCRC_UPDATE(beg); + } + s->status = HCRC_STATE; + } + if (s->status == HCRC_STATE) { + if (s->gzhead->hcrc) { + if (s->pending + 2 > s->pending_buf_size) { + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + } + put_byte(s, (Byte)(strm->adler & 0xff)); + put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); + strm->adler = crc32(0L, Z_NULL, 0); + } + s->status = BUSY_STATE; + + /* Compression must start with an empty pending buffer */ + flush_pending(strm); + if (s->pending != 0) { + s->last_flush = -1; + return Z_OK; + } + } +#endif + + /* Start a new block or continue the current one. + */ + if (strm->avail_in != 0 || s->lookahead != 0 || + (flush != Z_NO_FLUSH && s->status != FINISH_STATE)) { + block_state bstate; + + bstate = s->level == 0 ? deflate_stored(s, flush) : + s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : + s->strategy == Z_RLE ? deflate_rle(s, flush) : + (*(configuration_table[s->level].func))(s, flush); + + if (bstate == finish_started || bstate == finish_done) { + s->status = FINISH_STATE; + } + if (bstate == need_more || bstate == finish_started) { + if (strm->avail_out == 0) { + s->last_flush = -1; /* avoid BUF_ERROR next call, see above */ + } + return Z_OK; + /* If flush != Z_NO_FLUSH && avail_out == 0, the next call + * of deflate should use the same flush parameter to make sure + * that the flush is complete. So we don't have to output an + * empty block here, this will be done at next call. This also + * ensures that for a very small output buffer, we emit at most + * one empty block. + */ + } + if (bstate == block_done) { + if (flush == Z_PARTIAL_FLUSH) { + _tr_align(s); + } else if (flush != Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ + _tr_stored_block(s, (char*)0, 0L, 0); + /* For a full flush, this empty block will be recognized + * as a special marker by inflate_sync(). + */ + if (flush == Z_FULL_FLUSH) { + CLEAR_HASH(s); /* forget history */ + if (s->lookahead == 0) { + s->strstart = 0; + s->block_start = 0L; + s->insert = 0; + } + } + } + flush_pending(strm); + if (strm->avail_out == 0) { + s->last_flush = -1; /* avoid BUF_ERROR at next call, see above */ + return Z_OK; + } + } + } + + if (flush != Z_FINISH) return Z_OK; + if (s->wrap <= 0) return Z_STREAM_END; + + /* Write the trailer */ +#ifdef GZIP + if (s->wrap == 2) { + put_byte(s, (Byte)(strm->adler & 0xff)); + put_byte(s, (Byte)((strm->adler >> 8) & 0xff)); + put_byte(s, (Byte)((strm->adler >> 16) & 0xff)); + put_byte(s, (Byte)((strm->adler >> 24) & 0xff)); + put_byte(s, (Byte)(strm->total_in & 0xff)); + put_byte(s, (Byte)((strm->total_in >> 8) & 0xff)); + put_byte(s, (Byte)((strm->total_in >> 16) & 0xff)); + put_byte(s, (Byte)((strm->total_in >> 24) & 0xff)); + } + else +#endif + { + putShortMSB(s, (uInt)(strm->adler >> 16)); + putShortMSB(s, (uInt)(strm->adler & 0xffff)); + } + flush_pending(strm); + /* If avail_out is zero, the application will call deflate again + * to flush the rest. + */ + if (s->wrap > 0) s->wrap = -s->wrap; /* write the trailer only once! */ + return s->pending != 0 ? Z_OK : Z_STREAM_END; +} + +/* ========================================================================= */ +int ZEXPORT deflateEnd(z_streamp strm) { + int status; + + if (deflateStateCheck(strm)) return Z_STREAM_ERROR; + + status = strm->state->status; + + /* Deallocate in reverse order of allocations: */ + TRY_FREE(strm, strm->state->pending_buf); + TRY_FREE(strm, strm->state->head); + TRY_FREE(strm, strm->state->prev); + TRY_FREE(strm, strm->state->window); + + ZFREE(strm, strm->state); + strm->state = Z_NULL; + + return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK; +} + +/* ========================================================================= + * Copy the source state to the destination state. + * To simplify the source, this is not supported for 16-bit MSDOS (which + * doesn't have enough memory anyway to duplicate compression states). + */ +int ZEXPORT deflateCopy(z_streamp dest, z_streamp source) { +#ifdef MAXSEG_64K + (void)dest; + (void)source; + return Z_STREAM_ERROR; +#else + deflate_state *ds; + deflate_state *ss; + + + if (deflateStateCheck(source) || dest == Z_NULL) { + return Z_STREAM_ERROR; + } + + ss = source->state; + + zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); + + ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state)); + if (ds == Z_NULL) return Z_MEM_ERROR; + dest->state = (struct internal_state FAR *) ds; + zmemcpy((voidpf)ds, (voidpf)ss, sizeof(deflate_state)); + ds->strm = dest; + + ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); + ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos)); + ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos)); + ds->pending_buf = (uchf *) ZALLOC(dest, ds->lit_bufsize, LIT_BUFS); + + if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL || + ds->pending_buf == Z_NULL) { + deflateEnd (dest); + return Z_MEM_ERROR; + } + /* following zmemcpy do not work for 16-bit MSDOS */ + zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte)); + zmemcpy((voidpf)ds->prev, (voidpf)ss->prev, ds->w_size * sizeof(Pos)); + zmemcpy((voidpf)ds->head, (voidpf)ss->head, ds->hash_size * sizeof(Pos)); + zmemcpy(ds->pending_buf, ss->pending_buf, ds->lit_bufsize * LIT_BUFS); + + ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); +#ifdef LIT_MEM + ds->d_buf = (ushf *)(ds->pending_buf + (ds->lit_bufsize << 1)); + ds->l_buf = ds->pending_buf + (ds->lit_bufsize << 2); +#else + ds->sym_buf = ds->pending_buf + ds->lit_bufsize; +#endif + + ds->l_desc.dyn_tree = ds->dyn_ltree; + ds->d_desc.dyn_tree = ds->dyn_dtree; + ds->bl_desc.dyn_tree = ds->bl_tree; + + return Z_OK; +#endif /* MAXSEG_64K */ +} + +#ifndef FASTEST +/* =========================================================================== + * Set match_start to the longest match starting at the given string and + * return its length. Matches shorter or equal to prev_length are discarded, + * in which case the result is equal to prev_length and match_start is + * garbage. + * IN assertions: cur_match is the head of the hash chain for the current + * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 + * OUT assertion: the match length is not greater than s->lookahead. + */ +local uInt longest_match(deflate_state *s, IPos cur_match) { + unsigned chain_length = s->max_chain_length;/* max hash chain length */ + register Bytef *scan = s->window + s->strstart; /* current string */ + register Bytef *match; /* matched string */ + register int len; /* length of current match */ + int best_len = (int)s->prev_length; /* best match length so far */ + int nice_match = s->nice_match; /* stop if match long enough */ + IPos limit = s->strstart > (IPos)MAX_DIST(s) ? + s->strstart - (IPos)MAX_DIST(s) : NIL; + /* Stop when cur_match becomes <= limit. To simplify the code, + * we prevent matches with the string of window index 0. + */ + Posf *prev = s->prev; + uInt wmask = s->w_mask; + +#ifdef UNALIGNED_OK + /* Compare two bytes at a time. Note: this is not always beneficial. + * Try with and without -DUNALIGNED_OK to check. + */ + register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; + register ush scan_start = *(ushf*)scan; + register ush scan_end = *(ushf*)(scan + best_len - 1); +#else + register Bytef *strend = s->window + s->strstart + MAX_MATCH; + register Byte scan_end1 = scan[best_len - 1]; + register Byte scan_end = scan[best_len]; +#endif + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + /* Do not waste too much time if we already have a good match: */ + if (s->prev_length >= s->good_match) { + chain_length >>= 2; + } + /* Do not look for matches beyond the end of the input. This is necessary + * to make deflate deterministic. + */ + if ((uInt)nice_match > s->lookahead) nice_match = (int)s->lookahead; + + Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, + "need lookahead"); + + do { + Assert(cur_match < s->strstart, "no future"); + match = s->window + cur_match; + + /* Skip to next match if the match length cannot increase + * or if the match length is less than 2. Note that the checks below + * for insufficient lookahead only occur occasionally for performance + * reasons. Therefore uninitialized memory will be accessed, and + * conditional jumps will be made that depend on those values. + * However the length of the match is limited to the lookahead, so + * the output of deflate is not affected by the uninitialized values. + */ +#if (defined(UNALIGNED_OK) && MAX_MATCH == 258) + /* This code assumes sizeof(unsigned short) == 2. Do not use + * UNALIGNED_OK if your compiler uses a different size. + */ + if (*(ushf*)(match + best_len - 1) != scan_end || + *(ushf*)match != scan_start) continue; + + /* It is not necessary to compare scan[2] and match[2] since they are + * always equal when the other bytes match, given that the hash keys + * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at + * strstart + 3, + 5, up to strstart + 257. We check for insufficient + * lookahead only every 4th comparison; the 128th check will be made + * at strstart + 257. If MAX_MATCH-2 is not a multiple of 8, it is + * necessary to put more guard bytes at the end of the window, or + * to check more often for insufficient lookahead. + */ + Assert(scan[2] == match[2], "scan[2]?"); + scan++, match++; + do { + } while (*(ushf*)(scan += 2) == *(ushf*)(match += 2) && + *(ushf*)(scan += 2) == *(ushf*)(match += 2) && + *(ushf*)(scan += 2) == *(ushf*)(match += 2) && + *(ushf*)(scan += 2) == *(ushf*)(match += 2) && + scan < strend); + /* The funny "do {}" generates better code on most compilers */ + + /* Here, scan <= window + strstart + 257 */ + Assert(scan <= s->window + (unsigned)(s->window_size - 1), + "wild scan"); + if (*scan == *match) scan++; + + len = (MAX_MATCH - 1) - (int)(strend - scan); + scan = strend - (MAX_MATCH-1); + +#else /* UNALIGNED_OK */ + + if (match[best_len] != scan_end || + match[best_len - 1] != scan_end1 || + *match != *scan || + *++match != scan[1]) continue; + + /* The check at best_len - 1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2, match++; + Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart + 258. + */ + do { + } while (*++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + scan < strend); + + Assert(scan <= s->window + (unsigned)(s->window_size - 1), + "wild scan"); + + len = MAX_MATCH - (int)(strend - scan); + scan = strend - MAX_MATCH; + +#endif /* UNALIGNED_OK */ + + if (len > best_len) { + s->match_start = cur_match; + best_len = len; + if (len >= nice_match) break; +#ifdef UNALIGNED_OK + scan_end = *(ushf*)(scan + best_len - 1); +#else + scan_end1 = scan[best_len - 1]; + scan_end = scan[best_len]; +#endif + } + } while ((cur_match = prev[cur_match & wmask]) > limit + && --chain_length != 0); + + if ((uInt)best_len <= s->lookahead) return (uInt)best_len; + return s->lookahead; +} + +#else /* FASTEST */ + +/* --------------------------------------------------------------------------- + * Optimized version for FASTEST only + */ +local uInt longest_match(deflate_state *s, IPos cur_match) { + register Bytef *scan = s->window + s->strstart; /* current string */ + register Bytef *match; /* matched string */ + register int len; /* length of current match */ + register Bytef *strend = s->window + s->strstart + MAX_MATCH; + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, + "need lookahead"); + + Assert(cur_match < s->strstart, "no future"); + + match = s->window + cur_match; + + /* Return failure if the match length is less than 2: + */ + if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1; + + /* The check at best_len - 1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2, match += 2; + Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart + 258. + */ + do { + } while (*++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + *++scan == *++match && *++scan == *++match && + scan < strend); + + Assert(scan <= s->window + (unsigned)(s->window_size - 1), "wild scan"); + + len = MAX_MATCH - (int)(strend - scan); + + if (len < MIN_MATCH) return MIN_MATCH - 1; + + s->match_start = cur_match; + return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead; +} + +#endif /* FASTEST */ + +#ifdef ZLIB_DEBUG + +#define EQUAL 0 +/* result of memcmp for equal strings */ + +/* =========================================================================== + * Check that the match at match_start is indeed a match. + */ +local void check_match(deflate_state *s, IPos start, IPos match, int length) { + /* check that the match is indeed a match */ + Bytef *back = s->window + (int)match, *here = s->window + start; + IPos len = length; + if (match == (IPos)-1) { + /* match starts one byte before the current window -- just compare the + subsequent length-1 bytes */ + back++; + here++; + len--; + } + if (zmemcmp(back, here, len) != EQUAL) { + fprintf(stderr, " start %u, match %d, length %d\n", + start, (int)match, length); + do { + fprintf(stderr, "(%02x %02x)", *back++, *here++); + } while (--len != 0); + z_error("invalid match"); + } + if (z_verbose > 1) { + fprintf(stderr,"\\[%d,%d]", start - match, length); + do { putc(s->window[start++], stderr); } while (--length != 0); + } +} +#else +# define check_match(s, start, match, length) +#endif /* ZLIB_DEBUG */ + +/* =========================================================================== + * Flush the current block, with given end-of-file flag. + * IN assertion: strstart is set to the end of the current match. + */ +#define FLUSH_BLOCK_ONLY(s, last) { \ + _tr_flush_block(s, (s->block_start >= 0L ? \ + (charf *)&s->window[(unsigned)s->block_start] : \ + (charf *)Z_NULL), \ + (ulg)((long)s->strstart - s->block_start), \ + (last)); \ + s->block_start = s->strstart; \ + flush_pending(s->strm); \ + Tracev((stderr,"[FLUSH]")); \ +} + +/* Same but force premature exit if necessary. */ +#define FLUSH_BLOCK(s, last) { \ + FLUSH_BLOCK_ONLY(s, last); \ + if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \ +} + +/* Maximum stored block length in deflate format (not including header). */ +#define MAX_STORED 65535 + +/* Minimum of a and b. */ +#define MIN(a, b) ((a) > (b) ? (b) : (a)) + +/* =========================================================================== + * Copy without compression as much as possible from the input stream, return + * the current block state. + * + * In case deflateParams() is used to later switch to a non-zero compression + * level, s->matches (otherwise unused when storing) keeps track of the number + * of hash table slides to perform. If s->matches is 1, then one hash table + * slide will be done when switching. If s->matches is 2, the maximum value + * allowed here, then the hash table will be cleared, since two or more slides + * is the same as a clear. + * + * deflate_stored() is written to minimize the number of times an input byte is + * copied. It is most efficient with large input and output buffers, which + * maximizes the opportunities to have a single copy from next_in to next_out. + */ +local block_state deflate_stored(deflate_state *s, int flush) { + /* Smallest worthy block size when not flushing or finishing. By default + * this is 32K. This can be as small as 507 bytes for memLevel == 1. For + * large input and output buffers, the stored block size will be larger. + */ + unsigned min_block = MIN(s->pending_buf_size - 5, s->w_size); + + /* Copy as many min_block or larger stored blocks directly to next_out as + * possible. If flushing, copy the remaining available input to next_out as + * stored blocks, if there is enough space. + */ + unsigned len, left, have, last = 0; + unsigned used = s->strm->avail_in; + do { + /* Set len to the maximum size block that we can copy directly with the + * available input data and output space. Set left to how much of that + * would be copied from what's left in the window. + */ + len = MAX_STORED; /* maximum deflate stored block length */ + have = (s->bi_valid + 42) >> 3; /* number of header bytes */ + if (s->strm->avail_out < have) /* need room for header */ + break; + /* maximum stored block length that will fit in avail_out: */ + have = s->strm->avail_out - have; + left = s->strstart - s->block_start; /* bytes left in window */ + if (len > (ulg)left + s->strm->avail_in) + len = left + s->strm->avail_in; /* limit len to the input */ + if (len > have) + len = have; /* limit len to the output */ + + /* If the stored block would be less than min_block in length, or if + * unable to copy all of the available input when flushing, then try + * copying to the window and the pending buffer instead. Also don't + * write an empty block when flushing -- deflate() does that. + */ + if (len < min_block && ((len == 0 && flush != Z_FINISH) || + flush == Z_NO_FLUSH || + len != left + s->strm->avail_in)) + break; + + /* Make a dummy stored block in pending to get the header bytes, + * including any pending bits. This also updates the debugging counts. + */ + last = flush == Z_FINISH && len == left + s->strm->avail_in ? 1 : 0; + _tr_stored_block(s, (char *)0, 0L, last); + + /* Replace the lengths in the dummy stored block with len. */ + s->pending_buf[s->pending - 4] = len; + s->pending_buf[s->pending - 3] = len >> 8; + s->pending_buf[s->pending - 2] = ~len; + s->pending_buf[s->pending - 1] = ~len >> 8; + + /* Write the stored block header bytes. */ + flush_pending(s->strm); + +#ifdef ZLIB_DEBUG + /* Update debugging counts for the data about to be copied. */ + s->compressed_len += len << 3; + s->bits_sent += len << 3; +#endif + + /* Copy uncompressed bytes from the window to next_out. */ + if (left) { + if (left > len) + left = len; + zmemcpy(s->strm->next_out, s->window + s->block_start, left); + s->strm->next_out += left; + s->strm->avail_out -= left; + s->strm->total_out += left; + s->block_start += left; + len -= left; + } + + /* Copy uncompressed bytes directly from next_in to next_out, updating + * the check value. + */ + if (len) { + read_buf(s->strm, s->strm->next_out, len); + s->strm->next_out += len; + s->strm->avail_out -= len; + s->strm->total_out += len; + } + } while (last == 0); + + /* Update the sliding window with the last s->w_size bytes of the copied + * data, or append all of the copied data to the existing window if less + * than s->w_size bytes were copied. Also update the number of bytes to + * insert in the hash tables, in the event that deflateParams() switches to + * a non-zero compression level. + */ + used -= s->strm->avail_in; /* number of input bytes directly copied */ + if (used) { + /* If any input was used, then no unused input remains in the window, + * therefore s->block_start == s->strstart. + */ + if (used >= s->w_size) { /* supplant the previous history */ + s->matches = 2; /* clear hash */ + zmemcpy(s->window, s->strm->next_in - s->w_size, s->w_size); + s->strstart = s->w_size; + s->insert = s->strstart; + } + else { + if (s->window_size - s->strstart <= used) { + /* Slide the window down. */ + s->strstart -= s->w_size; + zmemcpy(s->window, s->window + s->w_size, s->strstart); + if (s->matches < 2) + s->matches++; /* add a pending slide_hash() */ + if (s->insert > s->strstart) + s->insert = s->strstart; + } + zmemcpy(s->window + s->strstart, s->strm->next_in - used, used); + s->strstart += used; + s->insert += MIN(used, s->w_size - s->insert); + } + s->block_start = s->strstart; + } + if (s->high_water < s->strstart) + s->high_water = s->strstart; + + /* If the last block was written to next_out, then done. */ + if (last) + return finish_done; + + /* If flushing and all input has been consumed, then done. */ + if (flush != Z_NO_FLUSH && flush != Z_FINISH && + s->strm->avail_in == 0 && (long)s->strstart == s->block_start) + return block_done; + + /* Fill the window with any remaining input. */ + have = s->window_size - s->strstart; + if (s->strm->avail_in > have && s->block_start >= (long)s->w_size) { + /* Slide the window down. */ + s->block_start -= s->w_size; + s->strstart -= s->w_size; + zmemcpy(s->window, s->window + s->w_size, s->strstart); + if (s->matches < 2) + s->matches++; /* add a pending slide_hash() */ + have += s->w_size; /* more space now */ + if (s->insert > s->strstart) + s->insert = s->strstart; + } + if (have > s->strm->avail_in) + have = s->strm->avail_in; + if (have) { + read_buf(s->strm, s->window + s->strstart, have); + s->strstart += have; + s->insert += MIN(have, s->w_size - s->insert); + } + if (s->high_water < s->strstart) + s->high_water = s->strstart; + + /* There was not enough avail_out to write a complete worthy or flushed + * stored block to next_out. Write a stored block to pending instead, if we + * have enough input for a worthy block, or if flushing and there is enough + * room for the remaining input as a stored block in the pending buffer. + */ + have = (s->bi_valid + 42) >> 3; /* number of header bytes */ + /* maximum stored block length that will fit in pending: */ + have = MIN(s->pending_buf_size - have, MAX_STORED); + min_block = MIN(have, s->w_size); + left = s->strstart - s->block_start; + if (left >= min_block || + ((left || flush == Z_FINISH) && flush != Z_NO_FLUSH && + s->strm->avail_in == 0 && left <= have)) { + len = MIN(left, have); + last = flush == Z_FINISH && s->strm->avail_in == 0 && + len == left ? 1 : 0; + _tr_stored_block(s, (charf *)s->window + s->block_start, len, last); + s->block_start += len; + flush_pending(s->strm); + } + + /* We've done all we can with the available input and output. */ + return last ? finish_started : need_more; +} + +/* =========================================================================== + * Compress as much as possible from the input stream, return the current + * block state. + * This function does not perform lazy evaluation of matches and inserts + * new strings in the dictionary only for unmatched strings or for short + * matches. It is used only for the fast compression options. + */ +local block_state deflate_fast(deflate_state *s, int flush) { + IPos hash_head; /* head of the hash chain */ + int bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s->lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + return need_more; + } + if (s->lookahead == 0) break; /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart + 2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = NIL; + if (s->lookahead >= MIN_MATCH) { + INSERT_STRING(s, s->strstart, hash_head); + } + + /* Find the longest match, discarding those <= prev_length. + * At this point we have always match_length < MIN_MATCH + */ + if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s->match_length = longest_match (s, hash_head); + /* longest_match() sets match_start */ + } + if (s->match_length >= MIN_MATCH) { + check_match(s, s->strstart, s->match_start, s->match_length); + + _tr_tally_dist(s, s->strstart - s->match_start, + s->match_length - MIN_MATCH, bflush); + + s->lookahead -= s->match_length; + + /* Insert new strings in the hash table only if the match length + * is not too large. This saves time but degrades compression. + */ +#ifndef FASTEST + if (s->match_length <= s->max_insert_length && + s->lookahead >= MIN_MATCH) { + s->match_length--; /* string at strstart already in table */ + do { + s->strstart++; + INSERT_STRING(s, s->strstart, hash_head); + /* strstart never exceeds WSIZE-MAX_MATCH, so there are + * always MIN_MATCH bytes ahead. + */ + } while (--s->match_length != 0); + s->strstart++; + } else +#endif + { + s->strstart += s->match_length; + s->match_length = 0; + s->ins_h = s->window[s->strstart]; + UPDATE_HASH(s, s->ins_h, s->window[s->strstart + 1]); +#if MIN_MATCH != 3 + Call UPDATE_HASH() MIN_MATCH-3 more times +#endif + /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not + * matter since it will be recomputed at next deflate call. + */ + } + } else { + /* No match, output a literal byte */ + Tracevv((stderr,"%c", s->window[s->strstart])); + _tr_tally_lit(s, s->window[s->strstart], bflush); + s->lookahead--; + s->strstart++; + } + if (bflush) FLUSH_BLOCK(s, 0); + } + s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1; + if (flush == Z_FINISH) { + FLUSH_BLOCK(s, 1); + return finish_done; + } + if (s->sym_next) + FLUSH_BLOCK(s, 0); + return block_done; +} + +#ifndef FASTEST +/* =========================================================================== + * Same as above, but achieves better compression. We use a lazy + * evaluation for matches: a match is finally adopted only if there is + * no better match at the next window position. + */ +local block_state deflate_slow(deflate_state *s, int flush) { + IPos hash_head; /* head of hash chain */ + int bflush; /* set if current block must be flushed */ + + /* Process the input block. */ + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s->lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + return need_more; + } + if (s->lookahead == 0) break; /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart + 2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = NIL; + if (s->lookahead >= MIN_MATCH) { + INSERT_STRING(s, s->strstart, hash_head); + } + + /* Find the longest match, discarding those <= prev_length. + */ + s->prev_length = s->match_length, s->prev_match = s->match_start; + s->match_length = MIN_MATCH-1; + + if (hash_head != NIL && s->prev_length < s->max_lazy_match && + s->strstart - hash_head <= MAX_DIST(s)) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s->match_length = longest_match (s, hash_head); + /* longest_match() sets match_start */ + + if (s->match_length <= 5 && (s->strategy == Z_FILTERED +#if TOO_FAR <= 32767 + || (s->match_length == MIN_MATCH && + s->strstart - s->match_start > TOO_FAR) +#endif + )) { + + /* If prev_match is also MIN_MATCH, match_start is garbage + * but we will ignore the current match anyway. + */ + s->match_length = MIN_MATCH-1; + } + } + /* If there was a match at the previous step and the current + * match is not better, output the previous match: + */ + if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) { + uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; + /* Do not insert strings in hash table beyond this. */ + + check_match(s, s->strstart - 1, s->prev_match, s->prev_length); + + _tr_tally_dist(s, s->strstart - 1 - s->prev_match, + s->prev_length - MIN_MATCH, bflush); + + /* Insert in hash table all strings up to the end of the match. + * strstart - 1 and strstart are already inserted. If there is not + * enough lookahead, the last two strings are not inserted in + * the hash table. + */ + s->lookahead -= s->prev_length - 1; + s->prev_length -= 2; + do { + if (++s->strstart <= max_insert) { + INSERT_STRING(s, s->strstart, hash_head); + } + } while (--s->prev_length != 0); + s->match_available = 0; + s->match_length = MIN_MATCH-1; + s->strstart++; + + if (bflush) FLUSH_BLOCK(s, 0); + + } else if (s->match_available) { + /* If there was no match at the previous position, output a + * single literal. If there was a match but the current match + * is longer, truncate the previous match to a single literal. + */ + Tracevv((stderr,"%c", s->window[s->strstart - 1])); + _tr_tally_lit(s, s->window[s->strstart - 1], bflush); + if (bflush) { + FLUSH_BLOCK_ONLY(s, 0); + } + s->strstart++; + s->lookahead--; + if (s->strm->avail_out == 0) return need_more; + } else { + /* There is no previous match to compare with, wait for + * the next step to decide. + */ + s->match_available = 1; + s->strstart++; + s->lookahead--; + } + } + Assert (flush != Z_NO_FLUSH, "no flush?"); + if (s->match_available) { + Tracevv((stderr,"%c", s->window[s->strstart - 1])); + _tr_tally_lit(s, s->window[s->strstart - 1], bflush); + s->match_available = 0; + } + s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1; + if (flush == Z_FINISH) { + FLUSH_BLOCK(s, 1); + return finish_done; + } + if (s->sym_next) + FLUSH_BLOCK(s, 0); + return block_done; +} +#endif /* FASTEST */ + +/* =========================================================================== + * For Z_RLE, simply look for runs of bytes, generate matches only of distance + * one. Do not maintain a hash table. (It will be regenerated if this run of + * deflate switches away from Z_RLE.) + */ +local block_state deflate_rle(deflate_state *s, int flush) { + int bflush; /* set if current block must be flushed */ + uInt prev; /* byte at distance one to match */ + Bytef *scan, *strend; /* scan goes up to strend for length of run */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the longest run, plus one for the unrolled loop. + */ + if (s->lookahead <= MAX_MATCH) { + fill_window(s); + if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) { + return need_more; + } + if (s->lookahead == 0) break; /* flush the current block */ + } + + /* See how many times the previous byte repeats */ + s->match_length = 0; + if (s->lookahead >= MIN_MATCH && s->strstart > 0) { + scan = s->window + s->strstart - 1; + prev = *scan; + if (prev == *++scan && prev == *++scan && prev == *++scan) { + strend = s->window + s->strstart + MAX_MATCH; + do { + } while (prev == *++scan && prev == *++scan && + prev == *++scan && prev == *++scan && + prev == *++scan && prev == *++scan && + prev == *++scan && prev == *++scan && + scan < strend); + s->match_length = MAX_MATCH - (uInt)(strend - scan); + if (s->match_length > s->lookahead) + s->match_length = s->lookahead; + } + Assert(scan <= s->window + (uInt)(s->window_size - 1), + "wild scan"); + } + + /* Emit match if have run of MIN_MATCH or longer, else emit literal */ + if (s->match_length >= MIN_MATCH) { + check_match(s, s->strstart, s->strstart - 1, s->match_length); + + _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush); + + s->lookahead -= s->match_length; + s->strstart += s->match_length; + s->match_length = 0; + } else { + /* No match, output a literal byte */ + Tracevv((stderr,"%c", s->window[s->strstart])); + _tr_tally_lit(s, s->window[s->strstart], bflush); + s->lookahead--; + s->strstart++; + } + if (bflush) FLUSH_BLOCK(s, 0); + } + s->insert = 0; + if (flush == Z_FINISH) { + FLUSH_BLOCK(s, 1); + return finish_done; + } + if (s->sym_next) + FLUSH_BLOCK(s, 0); + return block_done; +} + +/* =========================================================================== + * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. + * (It will be regenerated if this run of deflate switches away from Huffman.) + */ +local block_state deflate_huff(deflate_state *s, int flush) { + int bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we have a literal to write. */ + if (s->lookahead == 0) { + fill_window(s); + if (s->lookahead == 0) { + if (flush == Z_NO_FLUSH) + return need_more; + break; /* flush the current block */ + } + } + + /* Output a literal byte */ + s->match_length = 0; + Tracevv((stderr,"%c", s->window[s->strstart])); + _tr_tally_lit(s, s->window[s->strstart], bflush); + s->lookahead--; + s->strstart++; + if (bflush) FLUSH_BLOCK(s, 0); + } + s->insert = 0; + if (flush == Z_FINISH) { + FLUSH_BLOCK(s, 1); + return finish_done; + } + if (s->sym_next) + FLUSH_BLOCK(s, 0); + return block_done; +} diff --git a/widget/milsko/milskosrc/external/libz/src/gzclose.c b/widget/milsko/milskosrc/external/libz/src/gzclose.c new file mode 100644 index 0000000000..48d6a86f04 --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/src/gzclose.c @@ -0,0 +1,23 @@ +/* gzclose.c -- zlib gzclose() function + * Copyright (C) 2004, 2010 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* gzclose() is in a separate file so that it is linked in only if it is used. + That way the other gzclose functions can be used instead to avoid linking in + unneeded compression or decompression routines. */ +int ZEXPORT gzclose(gzFile file) { +#ifndef NO_GZCOMPRESS + gz_statep state; + + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); +#else + return gzclose_r(file); +#endif +} diff --git a/widget/milsko/milskosrc/external/libz/src/gzlib.c b/widget/milsko/milskosrc/external/libz/src/gzlib.c new file mode 100644 index 0000000000..983153cc8e --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/src/gzlib.c @@ -0,0 +1,582 @@ +/* gzlib.c -- zlib functions common to reading and writing gzip files + * Copyright (C) 2004-2024 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +#if defined(_WIN32) && !defined(__BORLANDC__) +# define LSEEK _lseeki64 +#else +#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 +# define LSEEK lseek64 +#else +# define LSEEK lseek +#endif +#endif + +#if defined UNDER_CE + +/* Map the Windows error number in ERROR to a locale-dependent error message + string and return a pointer to it. Typically, the values for ERROR come + from GetLastError. + + The string pointed to shall not be modified by the application, but may be + overwritten by a subsequent call to gz_strwinerror + + The gz_strwinerror function does not change the current setting of + GetLastError. */ +char ZLIB_INTERNAL *gz_strwinerror(DWORD error) { + static char buf[1024]; + + wchar_t *msgbuf; + DWORD lasterr = GetLastError(); + DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM + | FORMAT_MESSAGE_ALLOCATE_BUFFER, + NULL, + error, + 0, /* Default language */ + (LPVOID)&msgbuf, + 0, + NULL); + if (chars != 0) { + /* If there is an \r\n appended, zap it. */ + if (chars >= 2 + && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') { + chars -= 2; + msgbuf[chars] = 0; + } + + if (chars > sizeof (buf) - 1) { + chars = sizeof (buf) - 1; + msgbuf[chars] = 0; + } + + wcstombs(buf, msgbuf, chars + 1); + LocalFree(msgbuf); + } + else { + sprintf(buf, "unknown win32 error (%ld)", error); + } + + SetLastError(lasterr); + return buf; +} + +#endif /* UNDER_CE */ + +/* Reset gzip file state */ +local void gz_reset(gz_statep state) { + state->x.have = 0; /* no output data available */ + if (state->mode == GZ_READ) { /* for reading ... */ + state->eof = 0; /* not at end of file */ + state->past = 0; /* have not read past end yet */ + state->how = LOOK; /* look for gzip header */ + } + else /* for writing ... */ + state->reset = 0; /* no deflateReset pending */ + state->seek = 0; /* no seek request pending */ + gz_error(state, Z_OK, NULL); /* clear error */ + state->x.pos = 0; /* no uncompressed data yet */ + state->strm.avail_in = 0; /* no input data yet */ +} + +/* Open a gzip file either by name or file descriptor. */ +local gzFile gz_open(const void *path, int fd, const char *mode) { + gz_statep state; + z_size_t len; + int oflag; +#ifdef O_CLOEXEC + int cloexec = 0; +#endif +#ifdef O_EXCL + int exclusive = 0; +#endif + + /* check input */ + if (path == NULL) + return NULL; + + /* allocate gzFile structure to return */ + state = (gz_statep)malloc(sizeof(gz_state)); + if (state == NULL) + return NULL; + state->size = 0; /* no buffers allocated yet */ + state->want = GZBUFSIZE; /* requested buffer size */ + state->msg = NULL; /* no error message yet */ + + /* interpret mode */ + state->mode = GZ_NONE; + state->level = Z_DEFAULT_COMPRESSION; + state->strategy = Z_DEFAULT_STRATEGY; + state->direct = 0; + while (*mode) { + if (*mode >= '0' && *mode <= '9') + state->level = *mode - '0'; + else + switch (*mode) { + case 'r': + state->mode = GZ_READ; + break; +#ifndef NO_GZCOMPRESS + case 'w': + state->mode = GZ_WRITE; + break; + case 'a': + state->mode = GZ_APPEND; + break; +#endif + case '+': /* can't read and write at the same time */ + free(state); + return NULL; + case 'b': /* ignore -- will request binary anyway */ + break; +#ifdef O_CLOEXEC + case 'e': + cloexec = 1; + break; +#endif +#ifdef O_EXCL + case 'x': + exclusive = 1; + break; +#endif + case 'f': + state->strategy = Z_FILTERED; + break; + case 'h': + state->strategy = Z_HUFFMAN_ONLY; + break; + case 'R': + state->strategy = Z_RLE; + break; + case 'F': + state->strategy = Z_FIXED; + break; + case 'T': + state->direct = 1; + break; + default: /* could consider as an error, but just ignore */ + ; + } + mode++; + } + + /* must provide an "r", "w", or "a" */ + if (state->mode == GZ_NONE) { + free(state); + return NULL; + } + + /* can't force transparent read */ + if (state->mode == GZ_READ) { + if (state->direct) { + free(state); + return NULL; + } + state->direct = 1; /* for empty file */ + } + + /* save the path name for error messages */ +#ifdef WIDECHAR + if (fd == -2) { + len = wcstombs(NULL, path, 0); + if (len == (z_size_t)-1) + len = 0; + } + else +#endif + len = strlen((const char *)path); + state->path = (char *)malloc(len + 1); + if (state->path == NULL) { + free(state); + return NULL; + } +#ifdef WIDECHAR + if (fd == -2) + if (len) + wcstombs(state->path, path, len + 1); + else + *(state->path) = 0; + else +#endif +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + (void)snprintf(state->path, len + 1, "%s", (const char *)path); +#else + strcpy(state->path, path); +#endif + + /* compute the flags for open() */ + oflag = +#ifdef O_LARGEFILE + O_LARGEFILE | +#endif +#ifdef O_BINARY + O_BINARY | +#endif +#ifdef O_CLOEXEC + (cloexec ? O_CLOEXEC : 0) | +#endif + (state->mode == GZ_READ ? + O_RDONLY : + (O_WRONLY | O_CREAT | +#ifdef O_EXCL + (exclusive ? O_EXCL : 0) | +#endif + (state->mode == GZ_WRITE ? + O_TRUNC : + O_APPEND))); + + /* open the file with the appropriate flags (or just use fd) */ + state->fd = fd > -1 ? fd : ( +#ifdef WIDECHAR + fd == -2 ? _wopen(path, oflag, 0666) : +#endif + open((const char *)path, oflag, 0666)); + if (state->fd == -1) { + free(state->path); + free(state); + return NULL; + } + if (state->mode == GZ_APPEND) { + LSEEK(state->fd, 0, SEEK_END); /* so gzoffset() is correct */ + state->mode = GZ_WRITE; /* simplify later checks */ + } + + /* save the current position for rewinding (only if reading) */ + if (state->mode == GZ_READ) { + state->start = LSEEK(state->fd, 0, SEEK_CUR); + if (state->start == -1) state->start = 0; + } + + /* initialize stream */ + gz_reset(state); + + /* return stream */ + return (gzFile)state; +} + +/* -- see zlib.h -- */ +gzFile ZEXPORT gzopen(const char *path, const char *mode) { + return gz_open(path, -1, mode); +} + +/* -- see zlib.h -- */ +gzFile ZEXPORT gzopen64(const char *path, const char *mode) { + return gz_open(path, -1, mode); +} + +/* -- see zlib.h -- */ +gzFile ZEXPORT gzdopen(int fd, const char *mode) { + char *path; /* identifier for error messages */ + gzFile gz; + + if (fd == -1 || (path = (char *)malloc(7 + 3 * sizeof(int))) == NULL) + return NULL; +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + (void)snprintf(path, 7 + 3 * sizeof(int), "", fd); +#else + sprintf(path, "", fd); /* for debugging */ +#endif + gz = gz_open(path, fd, mode); + free(path); + return gz; +} + +/* -- see zlib.h -- */ +#ifdef WIDECHAR +gzFile ZEXPORT gzopen_w(const wchar_t *path, const char *mode) { + return gz_open(path, -2, mode); +} +#endif + +/* -- see zlib.h -- */ +int ZEXPORT gzbuffer(gzFile file, unsigned size) { + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* make sure we haven't already allocated memory */ + if (state->size != 0) + return -1; + + /* check and set requested size */ + if ((size << 1) < size) + return -1; /* need to be able to double it */ + if (size < 8) + size = 8; /* needed to behave well with flushing */ + state->want = size; + return 0; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzrewind(gzFile file) { + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return -1; + + /* back up and start over */ + if (LSEEK(state->fd, state->start, SEEK_SET) == -1) + return -1; + gz_reset(state); + return 0; +} + +/* -- see zlib.h -- */ +z_off64_t ZEXPORT gzseek64(gzFile file, z_off64_t offset, int whence) { + unsigned n; + z_off64_t ret; + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* check that there's no error */ + if (state->err != Z_OK && state->err != Z_BUF_ERROR) + return -1; + + /* can only seek from start or relative to current position */ + if (whence != SEEK_SET && whence != SEEK_CUR) + return -1; + + /* normalize offset to a SEEK_CUR specification */ + if (whence == SEEK_SET) + offset -= state->x.pos; + else if (state->seek) + offset += state->skip; + state->seek = 0; + + /* if within raw area while reading, just go there */ + if (state->mode == GZ_READ && state->how == COPY && + state->x.pos + offset >= 0) { + ret = LSEEK(state->fd, offset - (z_off64_t)state->x.have, SEEK_CUR); + if (ret == -1) + return -1; + state->x.have = 0; + state->eof = 0; + state->past = 0; + state->seek = 0; + gz_error(state, Z_OK, NULL); + state->strm.avail_in = 0; + state->x.pos += offset; + return state->x.pos; + } + + /* calculate skip amount, rewinding if needed for back seek when reading */ + if (offset < 0) { + if (state->mode != GZ_READ) /* writing -- can't go backwards */ + return -1; + offset += state->x.pos; + if (offset < 0) /* before start of file! */ + return -1; + if (gzrewind(file) == -1) /* rewind, then skip to offset */ + return -1; + } + + /* if reading, skip what's in output buffer (one less gzgetc() check) */ + if (state->mode == GZ_READ) { + n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > offset ? + (unsigned)offset : state->x.have; + state->x.have -= n; + state->x.next += n; + state->x.pos += n; + offset -= n; + } + + /* request skip (if not zero) */ + if (offset) { + state->seek = 1; + state->skip = offset; + } + return state->x.pos + offset; +} + +/* -- see zlib.h -- */ +z_off_t ZEXPORT gzseek(gzFile file, z_off_t offset, int whence) { + z_off64_t ret; + + ret = gzseek64(file, (z_off64_t)offset, whence); + return ret == (z_off_t)ret ? (z_off_t)ret : -1; +} + +/* -- see zlib.h -- */ +z_off64_t ZEXPORT gztell64(gzFile file) { + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* return position */ + return state->x.pos + (state->seek ? state->skip : 0); +} + +/* -- see zlib.h -- */ +z_off_t ZEXPORT gztell(gzFile file) { + z_off64_t ret; + + ret = gztell64(file); + return ret == (z_off_t)ret ? (z_off_t)ret : -1; +} + +/* -- see zlib.h -- */ +z_off64_t ZEXPORT gzoffset64(gzFile file) { + z_off64_t offset; + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return -1; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return -1; + + /* compute and return effective offset in file */ + offset = LSEEK(state->fd, 0, SEEK_CUR); + if (offset == -1) + return -1; + if (state->mode == GZ_READ) /* reading */ + offset -= state->strm.avail_in; /* don't count buffered input */ + return offset; +} + +/* -- see zlib.h -- */ +z_off_t ZEXPORT gzoffset(gzFile file) { + z_off64_t ret; + + ret = gzoffset64(file); + return ret == (z_off_t)ret ? (z_off_t)ret : -1; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzeof(gzFile file) { + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return 0; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return 0; + + /* return end-of-file state */ + return state->mode == GZ_READ ? state->past : 0; +} + +/* -- see zlib.h -- */ +const char * ZEXPORT gzerror(gzFile file, int *errnum) { + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return NULL; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return NULL; + + /* return error information */ + if (errnum != NULL) + *errnum = state->err; + return state->err == Z_MEM_ERROR ? "out of memory" : + (state->msg == NULL ? "" : state->msg); +} + +/* -- see zlib.h -- */ +void ZEXPORT gzclearerr(gzFile file) { + gz_statep state; + + /* get internal structure and check integrity */ + if (file == NULL) + return; + state = (gz_statep)file; + if (state->mode != GZ_READ && state->mode != GZ_WRITE) + return; + + /* clear error and end-of-file */ + if (state->mode == GZ_READ) { + state->eof = 0; + state->past = 0; + } + gz_error(state, Z_OK, NULL); +} + +/* Create an error message in allocated memory and set state->err and + state->msg accordingly. Free any previous error message already there. Do + not try to free or allocate space if the error is Z_MEM_ERROR (out of + memory). Simply save the error message as a static string. If there is an + allocation failure constructing the error message, then convert the error to + out of memory. */ +void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg) { + /* free previously allocated message and clear */ + if (state->msg != NULL) { + if (state->err != Z_MEM_ERROR) + free(state->msg); + state->msg = NULL; + } + + /* if fatal, set state->x.have to 0 so that the gzgetc() macro fails */ + if (err != Z_OK && err != Z_BUF_ERROR) + state->x.have = 0; + + /* set error code, and if no message, then done */ + state->err = err; + if (msg == NULL) + return; + + /* for an out of memory error, return literal string when requested */ + if (err == Z_MEM_ERROR) + return; + + /* construct error message with path */ + if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == + NULL) { + state->err = Z_MEM_ERROR; + return; + } +#if !defined(NO_snprintf) && !defined(NO_vsnprintf) + (void)snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, + "%s%s%s", state->path, ": ", msg); +#else + strcpy(state->msg, state->path); + strcat(state->msg, ": "); + strcat(state->msg, msg); +#endif +} + +/* portably return maximum value for an int (when limits.h presumed not + available) -- we need to do this to cover cases where 2's complement not + used, since C standard permits 1's complement and sign-bit representations, + otherwise we could just use ((unsigned)-1) >> 1 */ +unsigned ZLIB_INTERNAL gz_intmax(void) { +#ifdef INT_MAX + return INT_MAX; +#else + unsigned p = 1, q; + do { + q = p; + p <<= 1; + p++; + } while (p > q); + return q >> 1; +#endif +} diff --git a/widget/milsko/milskosrc/external/libz/src/gzread.c b/widget/milsko/milskosrc/external/libz/src/gzread.c new file mode 100644 index 0000000000..4168cbc887 --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/src/gzread.c @@ -0,0 +1,602 @@ +/* gzread.c -- zlib functions for reading gzip files + * Copyright (C) 2004-2017 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from + state->fd, and update state->eof, state->err, and state->msg as appropriate. + This function needs to loop on read(), since read() is not guaranteed to + read the number of bytes requested, depending on the type of descriptor. */ +local int gz_load(gz_statep state, unsigned char *buf, unsigned len, + unsigned *have) { + int ret; + unsigned get, max = ((unsigned)-1 >> 2) + 1; + + *have = 0; + do { + get = len - *have; + if (get > max) + get = max; + ret = read(state->fd, buf + *have, get); + if (ret <= 0) + break; + *have += (unsigned)ret; + } while (*have < len); + if (ret < 0) { + gz_error(state, Z_ERRNO, zstrerror()); + return -1; + } + if (ret == 0) + state->eof = 1; + return 0; +} + +/* Load up input buffer and set eof flag if last data loaded -- return -1 on + error, 0 otherwise. Note that the eof flag is set when the end of the input + file is reached, even though there may be unused data in the buffer. Once + that data has been used, no more attempts will be made to read the file. + If strm->avail_in != 0, then the current data is moved to the beginning of + the input buffer, and then the remainder of the buffer is loaded with the + available data from the input file. */ +local int gz_avail(gz_statep state) { + unsigned got; + z_streamp strm = &(state->strm); + + if (state->err != Z_OK && state->err != Z_BUF_ERROR) + return -1; + if (state->eof == 0) { + if (strm->avail_in) { /* copy what's there to the start */ + unsigned char *p = state->in; + unsigned const char *q = strm->next_in; + unsigned n = strm->avail_in; + do { + *p++ = *q++; + } while (--n); + } + if (gz_load(state, state->in + strm->avail_in, + state->size - strm->avail_in, &got) == -1) + return -1; + strm->avail_in += got; + strm->next_in = state->in; + } + return 0; +} + +/* Look for gzip header, set up for inflate or copy. state->x.have must be 0. + If this is the first time in, allocate required memory. state->how will be + left unchanged if there is no more input data available, will be set to COPY + if there is no gzip header and direct copying will be performed, or it will + be set to GZIP for decompression. If direct copying, then leftover input + data from the input buffer will be copied to the output buffer. In that + case, all further file reads will be directly to either the output buffer or + a user buffer. If decompressing, the inflate state will be initialized. + gz_look() will return 0 on success or -1 on failure. */ +local int gz_look(gz_statep state) { + z_streamp strm = &(state->strm); + + /* allocate read buffers and inflate memory */ + if (state->size == 0) { + /* allocate buffers */ + state->in = (unsigned char *)malloc(state->want); + state->out = (unsigned char *)malloc(state->want << 1); + if (state->in == NULL || state->out == NULL) { + free(state->out); + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + state->size = state->want; + + /* allocate inflate memory */ + state->strm.zalloc = Z_NULL; + state->strm.zfree = Z_NULL; + state->strm.opaque = Z_NULL; + state->strm.avail_in = 0; + state->strm.next_in = Z_NULL; + if (inflateInit2(&(state->strm), 15 + 16) != Z_OK) { /* gunzip */ + free(state->out); + free(state->in); + state->size = 0; + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + } + + /* get at least the magic bytes in the input buffer */ + if (strm->avail_in < 2) { + if (gz_avail(state) == -1) + return -1; + if (strm->avail_in == 0) + return 0; + } + + /* look for gzip magic bytes -- if there, do gzip decoding (note: there is + a logical dilemma here when considering the case of a partially written + gzip file, to wit, if a single 31 byte is written, then we cannot tell + whether this is a single-byte file, or just a partially written gzip + file -- for here we assume that if a gzip file is being written, then + the header will be written in a single operation, so that reading a + single byte is sufficient indication that it is not a gzip file) */ + if (strm->avail_in > 1 && + strm->next_in[0] == 31 && strm->next_in[1] == 139) { + inflateReset(strm); + state->how = GZIP; + state->direct = 0; + return 0; + } + + /* no gzip header -- if we were decoding gzip before, then this is trailing + garbage. Ignore the trailing garbage and finish. */ + if (state->direct == 0) { + strm->avail_in = 0; + state->eof = 1; + state->x.have = 0; + return 0; + } + + /* doing raw i/o, copy any leftover input to output -- this assumes that + the output buffer is larger than the input buffer, which also assures + space for gzungetc() */ + state->x.next = state->out; + memcpy(state->x.next, strm->next_in, strm->avail_in); + state->x.have = strm->avail_in; + strm->avail_in = 0; + state->how = COPY; + state->direct = 1; + return 0; +} + +/* Decompress from input to the provided next_out and avail_out in the state. + On return, state->x.have and state->x.next point to the just decompressed + data. If the gzip stream completes, state->how is reset to LOOK to look for + the next gzip stream or raw data, once state->x.have is depleted. Returns 0 + on success, -1 on failure. */ +local int gz_decomp(gz_statep state) { + int ret = Z_OK; + unsigned had; + z_streamp strm = &(state->strm); + + /* fill output buffer up to end of deflate stream */ + had = strm->avail_out; + do { + /* get more input for inflate() */ + if (strm->avail_in == 0 && gz_avail(state) == -1) + return -1; + if (strm->avail_in == 0) { + gz_error(state, Z_BUF_ERROR, "unexpected end of file"); + break; + } + + /* decompress and handle errors */ + ret = inflate(strm, Z_NO_FLUSH); + if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) { + gz_error(state, Z_STREAM_ERROR, + "internal error: inflate stream corrupt"); + return -1; + } + if (ret == Z_MEM_ERROR) { + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + if (ret == Z_DATA_ERROR) { /* deflate stream invalid */ + gz_error(state, Z_DATA_ERROR, + strm->msg == NULL ? "compressed data error" : strm->msg); + return -1; + } + } while (strm->avail_out && ret != Z_STREAM_END); + + /* update available output */ + state->x.have = had - strm->avail_out; + state->x.next = strm->next_out - state->x.have; + + /* if the gzip stream completed successfully, look for another */ + if (ret == Z_STREAM_END) + state->how = LOOK; + + /* good decompression */ + return 0; +} + +/* Fetch data and put it in the output buffer. Assumes state->x.have is 0. + Data is either copied from the input file or decompressed from the input + file depending on state->how. If state->how is LOOK, then a gzip header is + looked for to determine whether to copy or decompress. Returns -1 on error, + otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the + end of the input file has been reached and all data has been processed. */ +local int gz_fetch(gz_statep state) { + z_streamp strm = &(state->strm); + + do { + switch(state->how) { + case LOOK: /* -> LOOK, COPY (only if never GZIP), or GZIP */ + if (gz_look(state) == -1) + return -1; + if (state->how == LOOK) + return 0; + break; + case COPY: /* -> COPY */ + if (gz_load(state, state->out, state->size << 1, &(state->x.have)) + == -1) + return -1; + state->x.next = state->out; + return 0; + case GZIP: /* -> GZIP or LOOK (if end of gzip stream) */ + strm->avail_out = state->size << 1; + strm->next_out = state->out; + if (gz_decomp(state) == -1) + return -1; + } + } while (state->x.have == 0 && (!state->eof || strm->avail_in)); + return 0; +} + +/* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */ +local int gz_skip(gz_statep state, z_off64_t len) { + unsigned n; + + /* skip over len bytes or reach end-of-file, whichever comes first */ + while (len) + /* skip over whatever is in output buffer */ + if (state->x.have) { + n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > len ? + (unsigned)len : state->x.have; + state->x.have -= n; + state->x.next += n; + state->x.pos += n; + len -= n; + } + + /* output buffer empty -- return if we're at the end of the input */ + else if (state->eof && state->strm.avail_in == 0) + break; + + /* need more data to skip -- load up output buffer */ + else { + /* get more output, looking for header if required */ + if (gz_fetch(state) == -1) + return -1; + } + return 0; +} + +/* Read len bytes into buf from file, or less than len up to the end of the + input. Return the number of bytes read. If zero is returned, either the + end of file was reached, or there was an error. state->err must be + consulted in that case to determine which. */ +local z_size_t gz_read(gz_statep state, voidp buf, z_size_t len) { + z_size_t got; + unsigned n; + + /* if len is zero, avoid unnecessary operations */ + if (len == 0) + return 0; + + /* process a skip request */ + if (state->seek) { + state->seek = 0; + if (gz_skip(state, state->skip) == -1) + return 0; + } + + /* get len bytes to buf, or less than len if at the end */ + got = 0; + do { + /* set n to the maximum amount of len that fits in an unsigned int */ + n = (unsigned)-1; + if (n > len) + n = (unsigned)len; + + /* first just try copying data from the output buffer */ + if (state->x.have) { + if (state->x.have < n) + n = state->x.have; + memcpy(buf, state->x.next, n); + state->x.next += n; + state->x.have -= n; + } + + /* output buffer empty -- return if we're at the end of the input */ + else if (state->eof && state->strm.avail_in == 0) { + state->past = 1; /* tried to read past end */ + break; + } + + /* need output data -- for small len or new stream load up our output + buffer */ + else if (state->how == LOOK || n < (state->size << 1)) { + /* get more output, looking for header if required */ + if (gz_fetch(state) == -1) + return 0; + continue; /* no progress yet -- go back to copy above */ + /* the copy above assures that we will leave with space in the + output buffer, allowing at least one gzungetc() to succeed */ + } + + /* large len -- read directly into user buffer */ + else if (state->how == COPY) { /* read directly */ + if (gz_load(state, (unsigned char *)buf, n, &n) == -1) + return 0; + } + + /* large len -- decompress directly into user buffer */ + else { /* state->how == GZIP */ + state->strm.avail_out = n; + state->strm.next_out = (unsigned char *)buf; + if (gz_decomp(state) == -1) + return 0; + n = state->x.have; + state->x.have = 0; + } + + /* update progress */ + len -= n; + buf = (char *)buf + n; + got += n; + state->x.pos += n; + } while (len); + + /* return number of bytes read into user buffer */ + return got; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzread(gzFile file, voidp buf, unsigned len) { + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no (serious) error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return -1; + + /* since an int is returned, make sure len fits in one, otherwise return + with an error (this avoids a flaw in the interface) */ + if ((int)len < 0) { + gz_error(state, Z_STREAM_ERROR, "request does not fit in an int"); + return -1; + } + + /* read len or fewer bytes to buf */ + len = (unsigned)gz_read(state, buf, len); + + /* check for an error */ + if (len == 0 && state->err != Z_OK && state->err != Z_BUF_ERROR) + return -1; + + /* return the number of bytes read (this is assured to fit in an int) */ + return (int)len; +} + +/* -- see zlib.h -- */ +z_size_t ZEXPORT gzfread(voidp buf, z_size_t size, z_size_t nitems, gzFile file) { + z_size_t len; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + + /* check that we're reading and that there's no (serious) error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return 0; + + /* compute bytes to read -- error on overflow */ + len = nitems * size; + if (size && len / size != nitems) { + gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t"); + return 0; + } + + /* read len or fewer bytes to buf, return the number of full items read */ + return len ? gz_read(state, buf, len) / size : 0; +} + +/* -- see zlib.h -- */ +#ifdef Z_PREFIX_SET +# undef z_gzgetc +#else +# undef gzgetc +#endif +int ZEXPORT gzgetc(gzFile file) { + unsigned char buf[1]; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're reading and that there's no (serious) error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return -1; + + /* try output buffer (no need to check for skip request) */ + if (state->x.have) { + state->x.have--; + state->x.pos++; + return *(state->x.next)++; + } + + /* nothing there -- try gz_read() */ + return gz_read(state, buf, 1) < 1 ? -1 : buf[0]; +} + +int ZEXPORT gzgetc_(gzFile file) { + return gzgetc(file); +} + +/* -- see zlib.h -- */ +int ZEXPORT gzungetc(int c, gzFile file) { + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* in case this was just opened, set up the input buffer */ + if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0) + (void)gz_look(state); + + /* check that we're reading and that there's no (serious) error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return -1; + + /* process a skip request */ + if (state->seek) { + state->seek = 0; + if (gz_skip(state, state->skip) == -1) + return -1; + } + + /* can't push EOF */ + if (c < 0) + return -1; + + /* if output buffer empty, put byte at end (allows more pushing) */ + if (state->x.have == 0) { + state->x.have = 1; + state->x.next = state->out + (state->size << 1) - 1; + state->x.next[0] = (unsigned char)c; + state->x.pos--; + state->past = 0; + return c; + } + + /* if no room, give up (must have already done a gzungetc()) */ + if (state->x.have == (state->size << 1)) { + gz_error(state, Z_DATA_ERROR, "out of room to push characters"); + return -1; + } + + /* slide output data if needed and insert byte before existing data */ + if (state->x.next == state->out) { + unsigned char *src = state->out + state->x.have; + unsigned char *dest = state->out + (state->size << 1); + while (src > state->out) + *--dest = *--src; + state->x.next = dest; + } + state->x.have++; + state->x.next--; + state->x.next[0] = (unsigned char)c; + state->x.pos--; + state->past = 0; + return c; +} + +/* -- see zlib.h -- */ +char * ZEXPORT gzgets(gzFile file, char *buf, int len) { + unsigned left, n; + char *str; + unsigned char *eol; + gz_statep state; + + /* check parameters and get internal structure */ + if (file == NULL || buf == NULL || len < 1) + return NULL; + state = (gz_statep)file; + + /* check that we're reading and that there's no (serious) error */ + if (state->mode != GZ_READ || + (state->err != Z_OK && state->err != Z_BUF_ERROR)) + return NULL; + + /* process a skip request */ + if (state->seek) { + state->seek = 0; + if (gz_skip(state, state->skip) == -1) + return NULL; + } + + /* copy output bytes up to new line or len - 1, whichever comes first -- + append a terminating zero to the string (we don't check for a zero in + the contents, let the user worry about that) */ + str = buf; + left = (unsigned)len - 1; + if (left) do { + /* assure that something is in the output buffer */ + if (state->x.have == 0 && gz_fetch(state) == -1) + return NULL; /* error */ + if (state->x.have == 0) { /* end of file */ + state->past = 1; /* read past end */ + break; /* return what we have */ + } + + /* look for end-of-line in current output buffer */ + n = state->x.have > left ? left : state->x.have; + eol = (unsigned char *)memchr(state->x.next, '\n', n); + if (eol != NULL) + n = (unsigned)(eol - state->x.next) + 1; + + /* copy through end-of-line, or remainder if not found */ + memcpy(buf, state->x.next, n); + state->x.have -= n; + state->x.next += n; + state->x.pos += n; + left -= n; + buf += n; + } while (left && eol == NULL); + + /* return terminated string, or if nothing, end of file */ + if (buf == str) + return NULL; + buf[0] = 0; + return str; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzdirect(gzFile file) { + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + + /* if the state is not known, but we can find out, then do so (this is + mainly for right after a gzopen() or gzdopen()) */ + if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0) + (void)gz_look(state); + + /* return 1 if transparent, 0 if processing a gzip stream */ + return state->direct; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzclose_r(gzFile file) { + int ret, err; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + /* check that we're reading */ + if (state->mode != GZ_READ) + return Z_STREAM_ERROR; + + /* free memory and close file */ + if (state->size) { + inflateEnd(&(state->strm)); + free(state->out); + free(state->in); + } + err = state->err == Z_BUF_ERROR ? Z_BUF_ERROR : Z_OK; + gz_error(state, Z_OK, NULL); + free(state->path); + ret = close(state->fd); + free(state); + return ret ? Z_ERRNO : err; +} diff --git a/widget/milsko/milskosrc/external/libz/src/gzwrite.c b/widget/milsko/milskosrc/external/libz/src/gzwrite.c new file mode 100644 index 0000000000..435b4621b5 --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/src/gzwrite.c @@ -0,0 +1,631 @@ +/* gzwrite.c -- zlib functions for writing gzip files + * Copyright (C) 2004-2019 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "gzguts.h" + +/* Initialize state for writing a gzip file. Mark initialization by setting + state->size to non-zero. Return -1 on a memory allocation failure, or 0 on + success. */ +local int gz_init(gz_statep state) { + int ret; + z_streamp strm = &(state->strm); + + /* allocate input buffer (double size for gzprintf) */ + state->in = (unsigned char *)malloc(state->want << 1); + if (state->in == NULL) { + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + + /* only need output buffer and deflate state if compressing */ + if (!state->direct) { + /* allocate output buffer */ + state->out = (unsigned char *)malloc(state->want); + if (state->out == NULL) { + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + + /* allocate deflate memory, set up for gzip compression */ + strm->zalloc = Z_NULL; + strm->zfree = Z_NULL; + strm->opaque = Z_NULL; + ret = deflateInit2(strm, state->level, Z_DEFLATED, + MAX_WBITS + 16, DEF_MEM_LEVEL, state->strategy); + if (ret != Z_OK) { + free(state->out); + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } + strm->next_in = NULL; + } + + /* mark state as initialized */ + state->size = state->want; + + /* initialize write buffer if compressing */ + if (!state->direct) { + strm->avail_out = state->size; + strm->next_out = state->out; + state->x.next = strm->next_out; + } + return 0; +} + +/* Compress whatever is at avail_in and next_in and write to the output file. + Return -1 if there is an error writing to the output file or if gz_init() + fails to allocate memory, otherwise 0. flush is assumed to be a valid + deflate() flush value. If flush is Z_FINISH, then the deflate() state is + reset to start a new gzip stream. If gz->direct is true, then simply write + to the output file without compressing, and ignore flush. */ +local int gz_comp(gz_statep state, int flush) { + int ret, writ; + unsigned have, put, max = ((unsigned)-1 >> 2) + 1; + z_streamp strm = &(state->strm); + + /* allocate memory if this is the first time through */ + if (state->size == 0 && gz_init(state) == -1) + return -1; + + /* write directly if requested */ + if (state->direct) { + while (strm->avail_in) { + put = strm->avail_in > max ? max : strm->avail_in; + writ = write(state->fd, strm->next_in, put); + if (writ < 0) { + gz_error(state, Z_ERRNO, zstrerror()); + return -1; + } + strm->avail_in -= (unsigned)writ; + strm->next_in += writ; + } + return 0; + } + + /* check for a pending reset */ + if (state->reset) { + /* don't start a new gzip member unless there is data to write */ + if (strm->avail_in == 0) + return 0; + deflateReset(strm); + state->reset = 0; + } + + /* run deflate() on provided input until it produces no more output */ + ret = Z_OK; + do { + /* write out current buffer contents if full, or if flushing, but if + doing Z_FINISH then don't write until we get to Z_STREAM_END */ + if (strm->avail_out == 0 || (flush != Z_NO_FLUSH && + (flush != Z_FINISH || ret == Z_STREAM_END))) { + while (strm->next_out > state->x.next) { + put = strm->next_out - state->x.next > (int)max ? max : + (unsigned)(strm->next_out - state->x.next); + writ = write(state->fd, state->x.next, put); + if (writ < 0) { + gz_error(state, Z_ERRNO, zstrerror()); + return -1; + } + state->x.next += writ; + } + if (strm->avail_out == 0) { + strm->avail_out = state->size; + strm->next_out = state->out; + state->x.next = state->out; + } + } + + /* compress */ + have = strm->avail_out; + ret = deflate(strm, flush); + if (ret == Z_STREAM_ERROR) { + gz_error(state, Z_STREAM_ERROR, + "internal error: deflate stream corrupt"); + return -1; + } + have -= strm->avail_out; + } while (have); + + /* if that completed a deflate stream, allow another to start */ + if (flush == Z_FINISH) + state->reset = 1; + + /* all done, no errors */ + return 0; +} + +/* Compress len zeros to output. Return -1 on a write error or memory + allocation failure by gz_comp(), or 0 on success. */ +local int gz_zero(gz_statep state, z_off64_t len) { + int first; + unsigned n; + z_streamp strm = &(state->strm); + + /* consume whatever's left in the input buffer */ + if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return -1; + + /* compress len zeros (len guaranteed > 0) */ + first = 1; + while (len) { + n = GT_OFF(state->size) || (z_off64_t)state->size > len ? + (unsigned)len : state->size; + if (first) { + memset(state->in, 0, n); + first = 0; + } + strm->avail_in = n; + strm->next_in = state->in; + state->x.pos += n; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return -1; + len -= n; + } + return 0; +} + +/* Write len bytes from buf to file. Return the number of bytes written. If + the returned value is less than len, then there was an error. */ +local z_size_t gz_write(gz_statep state, voidpc buf, z_size_t len) { + z_size_t put = len; + + /* if len is zero, avoid unnecessary operations */ + if (len == 0) + return 0; + + /* allocate memory if this is the first time through */ + if (state->size == 0 && gz_init(state) == -1) + return 0; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return 0; + } + + /* for small len, copy to input buffer, otherwise compress directly */ + if (len < state->size) { + /* copy to input buffer, compress when full */ + do { + unsigned have, copy; + + if (state->strm.avail_in == 0) + state->strm.next_in = state->in; + have = (unsigned)((state->strm.next_in + state->strm.avail_in) - + state->in); + copy = state->size - have; + if (copy > len) + copy = (unsigned)len; + memcpy(state->in + have, buf, copy); + state->strm.avail_in += copy; + state->x.pos += copy; + buf = (const char *)buf + copy; + len -= copy; + if (len && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + } while (len); + } + else { + /* consume whatever's left in the input buffer */ + if (state->strm.avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + + /* directly compress user buffer to file */ + state->strm.next_in = (z_const Bytef *)buf; + do { + unsigned n = (unsigned)-1; + if (n > len) + n = (unsigned)len; + state->strm.avail_in = n; + state->x.pos += n; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + len -= n; + } while (len); + } + + /* input was all buffered or compressed */ + return put; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzwrite(gzFile file, voidpc buf, unsigned len) { + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return 0; + + /* since an int is returned, make sure len fits in one, otherwise return + with an error (this avoids a flaw in the interface) */ + if ((int)len < 0) { + gz_error(state, Z_DATA_ERROR, "requested length does not fit in int"); + return 0; + } + + /* write len bytes from buf (the return value will fit in an int) */ + return (int)gz_write(state, buf, len); +} + +/* -- see zlib.h -- */ +z_size_t ZEXPORT gzfwrite(voidpc buf, z_size_t size, z_size_t nitems, + gzFile file) { + z_size_t len; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return 0; + state = (gz_statep)file; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return 0; + + /* compute bytes to read -- error on overflow */ + len = nitems * size; + if (size && len / size != nitems) { + gz_error(state, Z_STREAM_ERROR, "request does not fit in a size_t"); + return 0; + } + + /* write len bytes to buf, return the number of full items written */ + return len ? gz_write(state, buf, len) / size : 0; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzputc(gzFile file, int c) { + unsigned have; + unsigned char buf[1]; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return -1; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return -1; + } + + /* try writing to input buffer for speed (state->size == 0 if buffer not + initialized) */ + if (state->size) { + if (strm->avail_in == 0) + strm->next_in = state->in; + have = (unsigned)((strm->next_in + strm->avail_in) - state->in); + if (have < state->size) { + state->in[have] = (unsigned char)c; + strm->avail_in++; + state->x.pos++; + return c & 0xff; + } + } + + /* no room in buffer or not initialized, use gz_write() */ + buf[0] = (unsigned char)c; + if (gz_write(state, buf, 1) != 1) + return -1; + return c & 0xff; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzputs(gzFile file, const char *s) { + z_size_t len, put; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return -1; + + /* write string */ + len = strlen(s); + if ((int)len < 0 || (unsigned)len != len) { + gz_error(state, Z_STREAM_ERROR, "string length does not fit in int"); + return -1; + } + put = gz_write(state, s, len); + return put < len ? -1 : (int)len; +} + +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +#include + +/* -- see zlib.h -- */ +int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) { + int len; + unsigned left; + char *next; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; + + /* make sure we have some buffer space */ + if (state->size == 0 && gz_init(state) == -1) + return state->err; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return state->err; + } + + /* do the printf() into the input buffer, put length in len -- the input + buffer is double-sized just for this function, so there is guaranteed to + be state->size bytes available after the current contents */ + if (strm->avail_in == 0) + strm->next_in = state->in; + next = (char *)(state->in + (strm->next_in - state->in) + strm->avail_in); + next[state->size - 1] = 0; +#ifdef NO_vsnprintf +# ifdef HAS_vsprintf_void + (void)vsprintf(next, format, va); + for (len = 0; len < state->size; len++) + if (next[len] == 0) break; +# else + len = vsprintf(next, format, va); +# endif +#else +# ifdef HAS_vsnprintf_void + (void)vsnprintf(next, state->size, format, va); + len = strlen(next); +# else + len = vsnprintf(next, state->size, format, va); +# endif +#endif + + /* check that printf() results fit in buffer */ + if (len == 0 || (unsigned)len >= state->size || next[state->size - 1] != 0) + return 0; + + /* update buffer and position, compress first half if past that */ + strm->avail_in += (unsigned)len; + state->x.pos += len; + if (strm->avail_in >= state->size) { + left = strm->avail_in - state->size; + strm->avail_in = state->size; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return state->err; + memmove(state->in, state->in + state->size, left); + strm->next_in = state->in; + strm->avail_in = left; + } + return len; +} + +int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) { + va_list va; + int ret; + + va_start(va, format); + ret = gzvprintf(file, format, va); + va_end(va); + return ret; +} + +#else /* !STDC && !Z_HAVE_STDARG_H */ + +/* -- see zlib.h -- */ +int ZEXPORTVA gzprintf(gzFile file, const char *format, int a1, int a2, int a3, + int a4, int a5, int a6, int a7, int a8, int a9, int a10, + int a11, int a12, int a13, int a14, int a15, int a16, + int a17, int a18, int a19, int a20) { + unsigned len, left; + char *next; + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that can really pass pointer in ints */ + if (sizeof(int) != sizeof(void *)) + return Z_STREAM_ERROR; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; + + /* make sure we have some buffer space */ + if (state->size == 0 && gz_init(state) == -1) + return state->error; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return state->error; + } + + /* do the printf() into the input buffer, put length in len -- the input + buffer is double-sized just for this function, so there is guaranteed to + be state->size bytes available after the current contents */ + if (strm->avail_in == 0) + strm->next_in = state->in; + next = (char *)(strm->next_in + strm->avail_in); + next[state->size - 1] = 0; +#ifdef NO_snprintf +# ifdef HAS_sprintf_void + sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, + a13, a14, a15, a16, a17, a18, a19, a20); + for (len = 0; len < size; len++) + if (next[len] == 0) + break; +# else + len = sprintf(next, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, + a12, a13, a14, a15, a16, a17, a18, a19, a20); +# endif +#else +# ifdef HAS_snprintf_void + snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, + a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); + len = strlen(next); +# else + len = snprintf(next, state->size, format, a1, a2, a3, a4, a5, a6, a7, a8, + a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); +# endif +#endif + + /* check that printf() results fit in buffer */ + if (len == 0 || len >= state->size || next[state->size - 1] != 0) + return 0; + + /* update buffer and position, compress first half if past that */ + strm->avail_in += len; + state->x.pos += len; + if (strm->avail_in >= state->size) { + left = strm->avail_in - state->size; + strm->avail_in = state->size; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return state->err; + memmove(state->in, state->in + state->size, left); + strm->next_in = state->in; + strm->avail_in = left; + } + return (int)len; +} + +#endif + +/* -- see zlib.h -- */ +int ZEXPORT gzflush(gzFile file, int flush) { + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; + + /* check flush parameter */ + if (flush < 0 || flush > Z_FINISH) + return Z_STREAM_ERROR; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return state->err; + } + + /* compress remaining data with requested flush */ + (void)gz_comp(state, flush); + return state->err; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzsetparams(gzFile file, int level, int strategy) { + gz_statep state; + z_streamp strm; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + strm = &(state->strm); + + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK || state->direct) + return Z_STREAM_ERROR; + + /* if no change is requested, then do nothing */ + if (level == state->level && strategy == state->strategy) + return Z_OK; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return state->err; + } + + /* change compression parameters for subsequent input */ + if (state->size) { + /* flush previous input with previous parameters before changing */ + if (strm->avail_in && gz_comp(state, Z_BLOCK) == -1) + return state->err; + deflateParams(strm, level, strategy); + } + state->level = level; + state->strategy = strategy; + return Z_OK; +} + +/* -- see zlib.h -- */ +int ZEXPORT gzclose_w(gzFile file) { + int ret = Z_OK; + gz_statep state; + + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + + /* check that we're writing */ + if (state->mode != GZ_WRITE) + return Z_STREAM_ERROR; + + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + ret = state->err; + } + + /* flush, free memory, and close file */ + if (gz_comp(state, Z_FINISH) == -1) + ret = state->err; + if (state->size) { + if (!state->direct) { + (void)deflateEnd(&(state->strm)); + free(state->out); + } + free(state->in); + } + gz_error(state, Z_OK, NULL); + free(state->path); + if (close(state->fd) == -1) + ret = Z_ERRNO; + free(state); + return ret; +} diff --git a/widget/milsko/milskosrc/external/libz/src/infback.c b/widget/milsko/milskosrc/external/libz/src/infback.c new file mode 100644 index 0000000000..e7b25b307a --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/src/infback.c @@ -0,0 +1,628 @@ +/* infback.c -- inflate using a call-back interface + * Copyright (C) 1995-2022 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + This code is largely copied from inflate.c. Normally either infback.o or + inflate.o would be linked into an application--not both. The interface + with inffast.c is retained so that optimized assembler-coded versions of + inflate_fast() can be used with either inflate.c or infback.c. + */ + +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +/* + strm provides memory allocation functions in zalloc and zfree, or + Z_NULL to use the library memory allocation functions. + + windowBits is in the range 8..15, and window is a user-supplied + window and output buffer that is 2**windowBits bytes. + */ +int ZEXPORT inflateBackInit_(z_streamp strm, int windowBits, + unsigned char FAR *window, const char *version, + int stream_size) { + struct inflate_state FAR *state; + + if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || + stream_size != (int)(sizeof(z_stream))) + return Z_VERSION_ERROR; + if (strm == Z_NULL || window == Z_NULL || + windowBits < 8 || windowBits > 15) + return Z_STREAM_ERROR; + strm->msg = Z_NULL; /* in case we return an error */ + if (strm->zalloc == (alloc_func)0) { +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; +#endif + } + if (strm->zfree == (free_func)0) +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zfree = zcfree; +#endif + state = (struct inflate_state FAR *)ZALLOC(strm, 1, + sizeof(struct inflate_state)); + if (state == Z_NULL) return Z_MEM_ERROR; + Tracev((stderr, "inflate: allocated\n")); + strm->state = (struct internal_state FAR *)state; + state->dmax = 32768U; + state->wbits = (uInt)windowBits; + state->wsize = 1U << windowBits; + state->window = window; + state->wnext = 0; + state->whave = 0; + state->sane = 1; + return Z_OK; +} + +/* + Return state with length and distance decoding tables and index sizes set to + fixed code decoding. Normally this returns fixed tables from inffixed.h. + If BUILDFIXED is defined, then instead this routine builds the tables the + first time it's called, and returns those tables the first time and + thereafter. This reduces the size of the code by about 2K bytes, in + exchange for a little execution time. However, BUILDFIXED should not be + used for threaded applications, since the rewriting of the tables and virgin + may not be thread-safe. + */ +local void fixedtables(struct inflate_state FAR *state) { +#ifdef BUILDFIXED + static int virgin = 1; + static code *lenfix, *distfix; + static code fixed[544]; + + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + unsigned sym, bits; + static code *next; + + /* literal/length table */ + sym = 0; + while (sym < 144) state->lens[sym++] = 8; + while (sym < 256) state->lens[sym++] = 9; + while (sym < 280) state->lens[sym++] = 7; + while (sym < 288) state->lens[sym++] = 8; + next = fixed; + lenfix = next; + bits = 9; + inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); + + /* distance table */ + sym = 0; + while (sym < 32) state->lens[sym++] = 5; + distfix = next; + bits = 5; + inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); + + /* do this just once */ + virgin = 0; + } +#else /* !BUILDFIXED */ +# include "inffixed.h" +#endif /* BUILDFIXED */ + state->lencode = lenfix; + state->lenbits = 9; + state->distcode = distfix; + state->distbits = 5; +} + +/* Macros for inflateBack(): */ + +/* Load returned state from inflate_fast() */ +#define LOAD() \ + do { \ + put = strm->next_out; \ + left = strm->avail_out; \ + next = strm->next_in; \ + have = strm->avail_in; \ + hold = state->hold; \ + bits = state->bits; \ + } while (0) + +/* Set state from registers for inflate_fast() */ +#define RESTORE() \ + do { \ + strm->next_out = put; \ + strm->avail_out = left; \ + strm->next_in = next; \ + strm->avail_in = have; \ + state->hold = hold; \ + state->bits = bits; \ + } while (0) + +/* Clear the input bit accumulator */ +#define INITBITS() \ + do { \ + hold = 0; \ + bits = 0; \ + } while (0) + +/* Assure that some input is available. If input is requested, but denied, + then return a Z_BUF_ERROR from inflateBack(). */ +#define PULL() \ + do { \ + if (have == 0) { \ + have = in(in_desc, &next); \ + if (have == 0) { \ + next = Z_NULL; \ + ret = Z_BUF_ERROR; \ + goto inf_leave; \ + } \ + } \ + } while (0) + +/* Get a byte of input into the bit accumulator, or return from inflateBack() + with an error if there is no input available. */ +#define PULLBYTE() \ + do { \ + PULL(); \ + have--; \ + hold += (unsigned long)(*next++) << bits; \ + bits += 8; \ + } while (0) + +/* Assure that there are at least n bits in the bit accumulator. If there is + not enough available input to do that, then return from inflateBack() with + an error. */ +#define NEEDBITS(n) \ + do { \ + while (bits < (unsigned)(n)) \ + PULLBYTE(); \ + } while (0) + +/* Return the low n bits of the bit accumulator (n < 16) */ +#define BITS(n) \ + ((unsigned)hold & ((1U << (n)) - 1)) + +/* Remove n bits from the bit accumulator */ +#define DROPBITS(n) \ + do { \ + hold >>= (n); \ + bits -= (unsigned)(n); \ + } while (0) + +/* Remove zero to seven bits as needed to go to a byte boundary */ +#define BYTEBITS() \ + do { \ + hold >>= bits & 7; \ + bits -= bits & 7; \ + } while (0) + +/* Assure that some output space is available, by writing out the window + if it's full. If the write fails, return from inflateBack() with a + Z_BUF_ERROR. */ +#define ROOM() \ + do { \ + if (left == 0) { \ + put = state->window; \ + left = state->wsize; \ + state->whave = left; \ + if (out(out_desc, put, left)) { \ + ret = Z_BUF_ERROR; \ + goto inf_leave; \ + } \ + } \ + } while (0) + +/* + strm provides the memory allocation functions and window buffer on input, + and provides information on the unused input on return. For Z_DATA_ERROR + returns, strm will also provide an error message. + + in() and out() are the call-back input and output functions. When + inflateBack() needs more input, it calls in(). When inflateBack() has + filled the window with output, or when it completes with data in the + window, it calls out() to write out the data. The application must not + change the provided input until in() is called again or inflateBack() + returns. The application must not change the window/output buffer until + inflateBack() returns. + + in() and out() are called with a descriptor parameter provided in the + inflateBack() call. This parameter can be a structure that provides the + information required to do the read or write, as well as accumulated + information on the input and output such as totals and check values. + + in() should return zero on failure. out() should return non-zero on + failure. If either in() or out() fails, than inflateBack() returns a + Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it + was in() or out() that caused in the error. Otherwise, inflateBack() + returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format + error, or Z_MEM_ERROR if it could not allocate memory for the state. + inflateBack() can also return Z_STREAM_ERROR if the input parameters + are not correct, i.e. strm is Z_NULL or the state was not initialized. + */ +int ZEXPORT inflateBack(z_streamp strm, in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc) { + struct inflate_state FAR *state; + z_const unsigned char FAR *next; /* next input */ + unsigned char FAR *put; /* next output */ + unsigned have, left; /* available input and output */ + unsigned long hold; /* bit buffer */ + unsigned bits; /* bits in bit buffer */ + unsigned copy; /* number of stored or match bytes to copy */ + unsigned char FAR *from; /* where to copy match bytes from */ + code here; /* current decoding table entry */ + code last; /* parent table entry */ + unsigned len; /* length to copy for repeats, bits to drop */ + int ret; /* return code */ + static const unsigned short order[19] = /* permutation of code lengths */ + {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + + /* Check that the strm exists and that the state was initialized */ + if (strm == Z_NULL || strm->state == Z_NULL) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + + /* Reset the state */ + strm->msg = Z_NULL; + state->mode = TYPE; + state->last = 0; + state->whave = 0; + next = strm->next_in; + have = next != Z_NULL ? strm->avail_in : 0; + hold = 0; + bits = 0; + put = state->window; + left = state->wsize; + + /* Inflate until end of block marked as last */ + for (;;) + switch (state->mode) { + case TYPE: + /* determine and dispatch block type */ + if (state->last) { + BYTEBITS(); + state->mode = DONE; + break; + } + NEEDBITS(3); + state->last = BITS(1); + DROPBITS(1); + switch (BITS(2)) { + case 0: /* stored block */ + Tracev((stderr, "inflate: stored block%s\n", + state->last ? " (last)" : "")); + state->mode = STORED; + break; + case 1: /* fixed block */ + fixedtables(state); + Tracev((stderr, "inflate: fixed codes block%s\n", + state->last ? " (last)" : "")); + state->mode = LEN; /* decode codes */ + break; + case 2: /* dynamic block */ + Tracev((stderr, "inflate: dynamic codes block%s\n", + state->last ? " (last)" : "")); + state->mode = TABLE; + break; + case 3: + strm->msg = (char *)"invalid block type"; + state->mode = BAD; + } + DROPBITS(2); + break; + + case STORED: + /* get and verify stored block length */ + BYTEBITS(); /* go to byte boundary */ + NEEDBITS(32); + if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { + strm->msg = (char *)"invalid stored block lengths"; + state->mode = BAD; + break; + } + state->length = (unsigned)hold & 0xffff; + Tracev((stderr, "inflate: stored length %u\n", + state->length)); + INITBITS(); + + /* copy stored block from input to output */ + while (state->length != 0) { + copy = state->length; + PULL(); + ROOM(); + if (copy > have) copy = have; + if (copy > left) copy = left; + zmemcpy(put, next, copy); + have -= copy; + next += copy; + left -= copy; + put += copy; + state->length -= copy; + } + Tracev((stderr, "inflate: stored end\n")); + state->mode = TYPE; + break; + + case TABLE: + /* get dynamic table entries descriptor */ + NEEDBITS(14); + state->nlen = BITS(5) + 257; + DROPBITS(5); + state->ndist = BITS(5) + 1; + DROPBITS(5); + state->ncode = BITS(4) + 4; + DROPBITS(4); +#ifndef PKZIP_BUG_WORKAROUND + if (state->nlen > 286 || state->ndist > 30) { + strm->msg = (char *)"too many length or distance symbols"; + state->mode = BAD; + break; + } +#endif + Tracev((stderr, "inflate: table sizes ok\n")); + + /* get code length code lengths (not a typo) */ + state->have = 0; + while (state->have < state->ncode) { + NEEDBITS(3); + state->lens[order[state->have++]] = (unsigned short)BITS(3); + DROPBITS(3); + } + while (state->have < 19) + state->lens[order[state->have++]] = 0; + state->next = state->codes; + state->lencode = (code const FAR *)(state->next); + state->lenbits = 7; + ret = inflate_table(CODES, state->lens, 19, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid code lengths set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: code lengths ok\n")); + + /* get length and distance code code lengths */ + state->have = 0; + while (state->have < state->nlen + state->ndist) { + for (;;) { + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if (here.val < 16) { + DROPBITS(here.bits); + state->lens[state->have++] = here.val; + } + else { + if (here.val == 16) { + NEEDBITS(here.bits + 2); + DROPBITS(here.bits); + if (state->have == 0) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + len = (unsigned)(state->lens[state->have - 1]); + copy = 3 + BITS(2); + DROPBITS(2); + } + else if (here.val == 17) { + NEEDBITS(here.bits + 3); + DROPBITS(here.bits); + len = 0; + copy = 3 + BITS(3); + DROPBITS(3); + } + else { + NEEDBITS(here.bits + 7); + DROPBITS(here.bits); + len = 0; + copy = 11 + BITS(7); + DROPBITS(7); + } + if (state->have + copy > state->nlen + state->ndist) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + while (copy--) + state->lens[state->have++] = (unsigned short)len; + } + } + + /* handle error breaks in while */ + if (state->mode == BAD) break; + + /* check for end-of-block code (better have one) */ + if (state->lens[256] == 0) { + strm->msg = (char *)"invalid code -- missing end-of-block"; + state->mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ + state->next = state->codes; + state->lencode = (code const FAR *)(state->next); + state->lenbits = 9; + ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid literal/lengths set"; + state->mode = BAD; + break; + } + state->distcode = (code const FAR *)(state->next); + state->distbits = 6; + ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, + &(state->next), &(state->distbits), state->work); + if (ret) { + strm->msg = (char *)"invalid distances set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: codes ok\n")); + state->mode = LEN; + /* fallthrough */ + + case LEN: + /* use inflate_fast() if we have enough input and output */ + if (have >= 6 && left >= 258) { + RESTORE(); + if (state->whave < state->wsize) + state->whave = state->wsize - left; + inflate_fast(strm, state->wsize); + LOAD(); + break; + } + + /* get a literal, length, or end-of-block code */ + for (;;) { + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if (here.op && (here.op & 0xf0) == 0) { + last = here; + for (;;) { + here = state->lencode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + here.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + } + DROPBITS(here.bits); + state->length = (unsigned)here.val; + + /* process literal */ + if (here.op == 0) { + Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", here.val)); + ROOM(); + *put++ = (unsigned char)(state->length); + left--; + state->mode = LEN; + break; + } + + /* process end of block */ + if (here.op & 32) { + Tracevv((stderr, "inflate: end of block\n")); + state->mode = TYPE; + break; + } + + /* invalid code */ + if (here.op & 64) { + strm->msg = (char *)"invalid literal/length code"; + state->mode = BAD; + break; + } + + /* length code -- get extra bits, if any */ + state->extra = (unsigned)(here.op) & 15; + if (state->extra != 0) { + NEEDBITS(state->extra); + state->length += BITS(state->extra); + DROPBITS(state->extra); + } + Tracevv((stderr, "inflate: length %u\n", state->length)); + + /* get distance code */ + for (;;) { + here = state->distcode[BITS(state->distbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if ((here.op & 0xf0) == 0) { + last = here; + for (;;) { + here = state->distcode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + here.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + } + DROPBITS(here.bits); + if (here.op & 64) { + strm->msg = (char *)"invalid distance code"; + state->mode = BAD; + break; + } + state->offset = (unsigned)here.val; + + /* get distance extra bits, if any */ + state->extra = (unsigned)(here.op) & 15; + if (state->extra != 0) { + NEEDBITS(state->extra); + state->offset += BITS(state->extra); + DROPBITS(state->extra); + } + if (state->offset > state->wsize - (state->whave < state->wsize ? + left : 0)) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } + Tracevv((stderr, "inflate: distance %u\n", state->offset)); + + /* copy match from window to output */ + do { + ROOM(); + copy = state->wsize - state->offset; + if (copy < left) { + from = put + copy; + copy = left - copy; + } + else { + from = put - state->offset; + copy = left; + } + if (copy > state->length) copy = state->length; + state->length -= copy; + left -= copy; + do { + *put++ = *from++; + } while (--copy); + } while (state->length != 0); + break; + + case DONE: + /* inflate stream terminated properly */ + ret = Z_STREAM_END; + goto inf_leave; + + case BAD: + ret = Z_DATA_ERROR; + goto inf_leave; + + default: + /* can't happen, but makes compilers happy */ + ret = Z_STREAM_ERROR; + goto inf_leave; + } + + /* Write leftover output and return unused input */ + inf_leave: + if (left < state->wsize) { + if (out(out_desc, state->window, state->wsize - left) && + ret == Z_STREAM_END) + ret = Z_BUF_ERROR; + } + strm->next_in = next; + strm->avail_in = have; + return ret; +} + +int ZEXPORT inflateBackEnd(z_streamp strm) { + if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0) + return Z_STREAM_ERROR; + ZFREE(strm, strm->state); + strm->state = Z_NULL; + Tracev((stderr, "inflate: end\n")); + return Z_OK; +} diff --git a/widget/milsko/milskosrc/external/libz/src/inffast.c b/widget/milsko/milskosrc/external/libz/src/inffast.c new file mode 100644 index 0000000000..9354676e78 --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/src/inffast.c @@ -0,0 +1,320 @@ +/* inffast.c -- fast decoding + * Copyright (C) 1995-2017 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +#ifdef ASMINF +# pragma message("Assembler code may have bugs -- use at your own risk") +#else + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state->mode == LEN + strm->avail_in >= 6 + strm->avail_out >= 258 + start >= strm->avail_out + state->bits < 8 + + On return, state->mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm->avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm->avail_out >= 258 for each loop to avoid checking for + output space. + */ +void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) { + struct inflate_state FAR *state; + z_const unsigned char FAR *in; /* local strm->next_in */ + z_const unsigned char FAR *last; /* have enough input while in < last */ + unsigned char FAR *out; /* local strm->next_out */ + unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ + unsigned char FAR *end; /* while out < end, enough space available */ +#ifdef INFLATE_STRICT + unsigned dmax; /* maximum distance from zlib header */ +#endif + unsigned wsize; /* window size or zero if not using window */ + unsigned whave; /* valid bytes in the window */ + unsigned wnext; /* window write index */ + unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */ + unsigned long hold; /* local strm->hold */ + unsigned bits; /* local strm->bits */ + code const FAR *lcode; /* local strm->lencode */ + code const FAR *dcode; /* local strm->distcode */ + unsigned lmask; /* mask for first level of length codes */ + unsigned dmask; /* mask for first level of distance codes */ + code const *here; /* retrieved table entry */ + unsigned op; /* code bits, operation, extra bits, or */ + /* window position, window bytes to copy */ + unsigned len; /* match length, unused bytes */ + unsigned dist; /* match distance */ + unsigned char FAR *from; /* where to copy match from */ + + /* copy state to local variables */ + state = (struct inflate_state FAR *)strm->state; + in = strm->next_in; + last = in + (strm->avail_in - 5); + out = strm->next_out; + beg = out - (start - strm->avail_out); + end = out + (strm->avail_out - 257); +#ifdef INFLATE_STRICT + dmax = state->dmax; +#endif + wsize = state->wsize; + whave = state->whave; + wnext = state->wnext; + window = state->window; + hold = state->hold; + bits = state->bits; + lcode = state->lencode; + dcode = state->distcode; + lmask = (1U << state->lenbits) - 1; + dmask = (1U << state->distbits) - 1; + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + do { + if (bits < 15) { + hold += (unsigned long)(*in++) << bits; + bits += 8; + hold += (unsigned long)(*in++) << bits; + bits += 8; + } + here = lcode + (hold & lmask); + dolen: + op = (unsigned)(here->bits); + hold >>= op; + bits -= op; + op = (unsigned)(here->op); + if (op == 0) { /* literal */ + Tracevv((stderr, here->val >= 0x20 && here->val < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", here->val)); + *out++ = (unsigned char)(here->val); + } + else if (op & 16) { /* length base */ + len = (unsigned)(here->val); + op &= 15; /* number of extra bits */ + if (op) { + if (bits < op) { + hold += (unsigned long)(*in++) << bits; + bits += 8; + } + len += (unsigned)hold & ((1U << op) - 1); + hold >>= op; + bits -= op; + } + Tracevv((stderr, "inflate: length %u\n", len)); + if (bits < 15) { + hold += (unsigned long)(*in++) << bits; + bits += 8; + hold += (unsigned long)(*in++) << bits; + bits += 8; + } + here = dcode + (hold & dmask); + dodist: + op = (unsigned)(here->bits); + hold >>= op; + bits -= op; + op = (unsigned)(here->op); + if (op & 16) { /* distance base */ + dist = (unsigned)(here->val); + op &= 15; /* number of extra bits */ + if (bits < op) { + hold += (unsigned long)(*in++) << bits; + bits += 8; + if (bits < op) { + hold += (unsigned long)(*in++) << bits; + bits += 8; + } + } + dist += (unsigned)hold & ((1U << op) - 1); +#ifdef INFLATE_STRICT + if (dist > dmax) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#endif + hold >>= op; + bits -= op; + Tracevv((stderr, "inflate: distance %u\n", dist)); + op = (unsigned)(out - beg); /* max distance in output */ + if (dist > op) { /* see if copy from window */ + op = dist - op; /* distance back in window */ + if (op > whave) { + if (state->sane) { + strm->msg = + (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + if (len <= op - whave) { + do { + *out++ = 0; + } while (--len); + continue; + } + len -= op - whave; + do { + *out++ = 0; + } while (--op > whave); + if (op == 0) { + from = out - dist; + do { + *out++ = *from++; + } while (--len); + continue; + } +#endif + } + from = window; + if (wnext == 0) { /* very common case */ + from += wsize - op; + if (op < len) { /* some from window */ + len -= op; + do { + *out++ = *from++; + } while (--op); + from = out - dist; /* rest from output */ + } + } + else if (wnext < op) { /* wrap around window */ + from += wsize + wnext - op; + op -= wnext; + if (op < len) { /* some from end of window */ + len -= op; + do { + *out++ = *from++; + } while (--op); + from = window; + if (wnext < len) { /* some from start of window */ + op = wnext; + len -= op; + do { + *out++ = *from++; + } while (--op); + from = out - dist; /* rest from output */ + } + } + } + else { /* contiguous in window */ + from += wnext - op; + if (op < len) { /* some from window */ + len -= op; + do { + *out++ = *from++; + } while (--op); + from = out - dist; /* rest from output */ + } + } + while (len > 2) { + *out++ = *from++; + *out++ = *from++; + *out++ = *from++; + len -= 3; + } + if (len) { + *out++ = *from++; + if (len > 1) + *out++ = *from++; + } + } + else { + from = out - dist; /* copy direct from output */ + do { /* minimum length is three */ + *out++ = *from++; + *out++ = *from++; + *out++ = *from++; + len -= 3; + } while (len > 2); + if (len) { + *out++ = *from++; + if (len > 1) + *out++ = *from++; + } + } + } + else if ((op & 64) == 0) { /* 2nd level distance code */ + here = dcode + here->val + (hold & ((1U << op) - 1)); + goto dodist; + } + else { + strm->msg = (char *)"invalid distance code"; + state->mode = BAD; + break; + } + } + else if ((op & 64) == 0) { /* 2nd level length code */ + here = lcode + here->val + (hold & ((1U << op) - 1)); + goto dolen; + } + else if (op & 32) { /* end-of-block */ + Tracevv((stderr, "inflate: end of block\n")); + state->mode = TYPE; + break; + } + else { + strm->msg = (char *)"invalid literal/length code"; + state->mode = BAD; + break; + } + } while (in < last && out < end); + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + len = bits >> 3; + in -= len; + bits -= len << 3; + hold &= (1U << bits) - 1; + + /* update state and return */ + strm->next_in = in; + strm->next_out = out; + strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last)); + strm->avail_out = (unsigned)(out < end ? + 257 + (end - out) : 257 - (out - end)); + state->hold = hold; + state->bits = bits; + return; +} + +/* + inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe): + - Using bit fields for code structure + - Different op definition to avoid & for extra bits (do & for table bits) + - Three separate decoding do-loops for direct, window, and wnext == 0 + - Special case for distance > 1 copies to do overlapped load and store copy + - Explicit branch predictions (based on measured branch probabilities) + - Deferring match copy and interspersed it with decoding subsequent codes + - Swapping literal/length else + - Swapping window/direct else + - Larger unrolled copy loops (three is about right) + - Moving len -= 3 statement into middle of loop + */ + +#endif /* !ASMINF */ diff --git a/widget/milsko/milskosrc/external/libz/src/inflate.c b/widget/milsko/milskosrc/external/libz/src/inflate.c new file mode 100644 index 0000000000..94ecff015a --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/src/inflate.c @@ -0,0 +1,1526 @@ +/* inflate.c -- zlib decompression + * Copyright (C) 1995-2022 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * Change history: + * + * 1.2.beta0 24 Nov 2002 + * - First version -- complete rewrite of inflate to simplify code, avoid + * creation of window when not needed, minimize use of window when it is + * needed, make inffast.c even faster, implement gzip decoding, and to + * improve code readability and style over the previous zlib inflate code + * + * 1.2.beta1 25 Nov 2002 + * - Use pointers for available input and output checking in inffast.c + * - Remove input and output counters in inffast.c + * - Change inffast.c entry and loop from avail_in >= 7 to >= 6 + * - Remove unnecessary second byte pull from length extra in inffast.c + * - Unroll direct copy to three copies per loop in inffast.c + * + * 1.2.beta2 4 Dec 2002 + * - Change external routine names to reduce potential conflicts + * - Correct filename to inffixed.h for fixed tables in inflate.c + * - Make hbuf[] unsigned char to match parameter type in inflate.c + * - Change strm->next_out[-state->offset] to *(strm->next_out - state->offset) + * to avoid negation problem on Alphas (64 bit) in inflate.c + * + * 1.2.beta3 22 Dec 2002 + * - Add comments on state->bits assertion in inffast.c + * - Add comments on op field in inftrees.h + * - Fix bug in reuse of allocated window after inflateReset() + * - Remove bit fields--back to byte structure for speed + * - Remove distance extra == 0 check in inflate_fast()--only helps for lengths + * - Change post-increments to pre-increments in inflate_fast(), PPC biased? + * - Add compile time option, POSTINC, to use post-increments instead (Intel?) + * - Make MATCH copy in inflate() much faster for when inflate_fast() not used + * - Use local copies of stream next and avail values, as well as local bit + * buffer and bit count in inflate()--for speed when inflate_fast() not used + * + * 1.2.beta4 1 Jan 2003 + * - Split ptr - 257 statements in inflate_table() to avoid compiler warnings + * - Move a comment on output buffer sizes from inffast.c to inflate.c + * - Add comments in inffast.c to introduce the inflate_fast() routine + * - Rearrange window copies in inflate_fast() for speed and simplification + * - Unroll last copy for window match in inflate_fast() + * - Use local copies of window variables in inflate_fast() for speed + * - Pull out common wnext == 0 case for speed in inflate_fast() + * - Make op and len in inflate_fast() unsigned for consistency + * - Add FAR to lcode and dcode declarations in inflate_fast() + * - Simplified bad distance check in inflate_fast() + * - Added inflateBackInit(), inflateBack(), and inflateBackEnd() in new + * source file infback.c to provide a call-back interface to inflate for + * programs like gzip and unzip -- uses window as output buffer to avoid + * window copying + * + * 1.2.beta5 1 Jan 2003 + * - Improved inflateBack() interface to allow the caller to provide initial + * input in strm. + * - Fixed stored blocks bug in inflateBack() + * + * 1.2.beta6 4 Jan 2003 + * - Added comments in inffast.c on effectiveness of POSTINC + * - Typecasting all around to reduce compiler warnings + * - Changed loops from while (1) or do {} while (1) to for (;;), again to + * make compilers happy + * - Changed type of window in inflateBackInit() to unsigned char * + * + * 1.2.beta7 27 Jan 2003 + * - Changed many types to unsigned or unsigned short to avoid warnings + * - Added inflateCopy() function + * + * 1.2.0 9 Mar 2003 + * - Changed inflateBack() interface to provide separate opaque descriptors + * for the in() and out() functions + * - Changed inflateBack() argument and in_func typedef to swap the length + * and buffer address return values for the input function + * - Check next_in and next_out for Z_NULL on entry to inflate() + * + * The history for versions after 1.2.0 are in ChangeLog in zlib distribution. + */ + +#include "zutil.h" +#include "inftrees.h" +#include "inflate.h" +#include "inffast.h" + +#ifdef MAKEFIXED +# ifndef BUILDFIXED +# define BUILDFIXED +# endif +#endif + +local int inflateStateCheck(z_streamp strm) { + struct inflate_state FAR *state; + if (strm == Z_NULL || + strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) + return 1; + state = (struct inflate_state FAR *)strm->state; + if (state == Z_NULL || state->strm != strm || + state->mode < HEAD || state->mode > SYNC) + return 1; + return 0; +} + +int ZEXPORT inflateResetKeep(z_streamp strm) { + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + strm->total_in = strm->total_out = state->total = 0; + strm->msg = Z_NULL; + if (state->wrap) /* to support ill-conceived Java test suite */ + strm->adler = state->wrap & 1; + state->mode = HEAD; + state->last = 0; + state->havedict = 0; + state->flags = -1; + state->dmax = 32768U; + state->head = Z_NULL; + state->hold = 0; + state->bits = 0; + state->lencode = state->distcode = state->next = state->codes; + state->sane = 1; + state->back = -1; + Tracev((stderr, "inflate: reset\n")); + return Z_OK; +} + +int ZEXPORT inflateReset(z_streamp strm) { + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + state->wsize = 0; + state->whave = 0; + state->wnext = 0; + return inflateResetKeep(strm); +} + +int ZEXPORT inflateReset2(z_streamp strm, int windowBits) { + int wrap; + struct inflate_state FAR *state; + + /* get the state */ + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + + /* extract wrap request from windowBits parameter */ + if (windowBits < 0) { + if (windowBits < -15) + return Z_STREAM_ERROR; + wrap = 0; + windowBits = -windowBits; + } + else { + wrap = (windowBits >> 4) + 5; +#ifdef GUNZIP + if (windowBits < 48) + windowBits &= 15; +#endif + } + + /* set number of window bits, free window if different */ + if (windowBits && (windowBits < 8 || windowBits > 15)) + return Z_STREAM_ERROR; + if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) { + ZFREE(strm, state->window); + state->window = Z_NULL; + } + + /* update state and reset the rest of it */ + state->wrap = wrap; + state->wbits = (unsigned)windowBits; + return inflateReset(strm); +} + +int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, + const char *version, int stream_size) { + int ret; + struct inflate_state FAR *state; + + if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || + stream_size != (int)(sizeof(z_stream))) + return Z_VERSION_ERROR; + if (strm == Z_NULL) return Z_STREAM_ERROR; + strm->msg = Z_NULL; /* in case we return an error */ + if (strm->zalloc == (alloc_func)0) { +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; +#endif + } + if (strm->zfree == (free_func)0) +#ifdef Z_SOLO + return Z_STREAM_ERROR; +#else + strm->zfree = zcfree; +#endif + state = (struct inflate_state FAR *) + ZALLOC(strm, 1, sizeof(struct inflate_state)); + if (state == Z_NULL) return Z_MEM_ERROR; + Tracev((stderr, "inflate: allocated\n")); + strm->state = (struct internal_state FAR *)state; + state->strm = strm; + state->window = Z_NULL; + state->mode = HEAD; /* to pass state test in inflateReset2() */ + ret = inflateReset2(strm, windowBits); + if (ret != Z_OK) { + ZFREE(strm, state); + strm->state = Z_NULL; + } + return ret; +} + +int ZEXPORT inflateInit_(z_streamp strm, const char *version, + int stream_size) { + return inflateInit2_(strm, DEF_WBITS, version, stream_size); +} + +int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) { + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + if (bits == 0) + return Z_OK; + state = (struct inflate_state FAR *)strm->state; + if (bits < 0) { + state->hold = 0; + state->bits = 0; + return Z_OK; + } + if (bits > 16 || state->bits + (uInt)bits > 32) return Z_STREAM_ERROR; + value &= (1L << bits) - 1; + state->hold += (unsigned)value << state->bits; + state->bits += (uInt)bits; + return Z_OK; +} + +/* + Return state with length and distance decoding tables and index sizes set to + fixed code decoding. Normally this returns fixed tables from inffixed.h. + If BUILDFIXED is defined, then instead this routine builds the tables the + first time it's called, and returns those tables the first time and + thereafter. This reduces the size of the code by about 2K bytes, in + exchange for a little execution time. However, BUILDFIXED should not be + used for threaded applications, since the rewriting of the tables and virgin + may not be thread-safe. + */ +local void fixedtables(struct inflate_state FAR *state) { +#ifdef BUILDFIXED + static int virgin = 1; + static code *lenfix, *distfix; + static code fixed[544]; + + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + unsigned sym, bits; + static code *next; + + /* literal/length table */ + sym = 0; + while (sym < 144) state->lens[sym++] = 8; + while (sym < 256) state->lens[sym++] = 9; + while (sym < 280) state->lens[sym++] = 7; + while (sym < 288) state->lens[sym++] = 8; + next = fixed; + lenfix = next; + bits = 9; + inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); + + /* distance table */ + sym = 0; + while (sym < 32) state->lens[sym++] = 5; + distfix = next; + bits = 5; + inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); + + /* do this just once */ + virgin = 0; + } +#else /* !BUILDFIXED */ +# include "inffixed.h" +#endif /* BUILDFIXED */ + state->lencode = lenfix; + state->lenbits = 9; + state->distcode = distfix; + state->distbits = 5; +} + +#ifdef MAKEFIXED +#include + +/* + Write out the inffixed.h that is #include'd above. Defining MAKEFIXED also + defines BUILDFIXED, so the tables are built on the fly. makefixed() writes + those tables to stdout, which would be piped to inffixed.h. A small program + can simply call makefixed to do this: + + void makefixed(void); + + int main(void) + { + makefixed(); + return 0; + } + + Then that can be linked with zlib built with MAKEFIXED defined and run: + + a.out > inffixed.h + */ +void makefixed(void) +{ + unsigned low, size; + struct inflate_state state; + + fixedtables(&state); + puts(" /* inffixed.h -- table for decoding fixed codes"); + puts(" * Generated automatically by makefixed()."); + puts(" */"); + puts(""); + puts(" /* WARNING: this file should *not* be used by applications."); + puts(" It is part of the implementation of this library and is"); + puts(" subject to change. Applications should only use zlib.h."); + puts(" */"); + puts(""); + size = 1U << 9; + printf(" static const code lenfix[%u] = {", size); + low = 0; + for (;;) { + if ((low % 7) == 0) printf("\n "); + printf("{%u,%u,%d}", (low & 127) == 99 ? 64 : state.lencode[low].op, + state.lencode[low].bits, state.lencode[low].val); + if (++low == size) break; + putchar(','); + } + puts("\n };"); + size = 1U << 5; + printf("\n static const code distfix[%u] = {", size); + low = 0; + for (;;) { + if ((low % 6) == 0) printf("\n "); + printf("{%u,%u,%d}", state.distcode[low].op, state.distcode[low].bits, + state.distcode[low].val); + if (++low == size) break; + putchar(','); + } + puts("\n };"); +} +#endif /* MAKEFIXED */ + +/* + Update the window with the last wsize (normally 32K) bytes written before + returning. If window does not exist yet, create it. This is only called + when a window is already in use, or when output has been written during this + inflate call, but the end of the deflate stream has not been reached yet. + It is also called to create a window for dictionary data when a dictionary + is loaded. + + Providing output buffers larger than 32K to inflate() should provide a speed + advantage, since only the last 32K of output is copied to the sliding window + upon return from inflate(), and since all distances after the first 32K of + output will fall in the output data, making match copies simpler and faster. + The advantage may be dependent on the size of the processor's data caches. + */ +local int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) { + struct inflate_state FAR *state; + unsigned dist; + + state = (struct inflate_state FAR *)strm->state; + + /* if it hasn't been done already, allocate space for the window */ + if (state->window == Z_NULL) { + state->window = (unsigned char FAR *) + ZALLOC(strm, 1U << state->wbits, + sizeof(unsigned char)); + if (state->window == Z_NULL) return 1; + } + + /* if window not in use yet, initialize */ + if (state->wsize == 0) { + state->wsize = 1U << state->wbits; + state->wnext = 0; + state->whave = 0; + } + + /* copy state->wsize or less output bytes into the circular window */ + if (copy >= state->wsize) { + zmemcpy(state->window, end - state->wsize, state->wsize); + state->wnext = 0; + state->whave = state->wsize; + } + else { + dist = state->wsize - state->wnext; + if (dist > copy) dist = copy; + zmemcpy(state->window + state->wnext, end - copy, dist); + copy -= dist; + if (copy) { + zmemcpy(state->window, end - copy, copy); + state->wnext = copy; + state->whave = state->wsize; + } + else { + state->wnext += dist; + if (state->wnext == state->wsize) state->wnext = 0; + if (state->whave < state->wsize) state->whave += dist; + } + } + return 0; +} + +/* Macros for inflate(): */ + +/* check function to use adler32() for zlib or crc32() for gzip */ +#ifdef GUNZIP +# define UPDATE_CHECK(check, buf, len) \ + (state->flags ? crc32(check, buf, len) : adler32(check, buf, len)) +#else +# define UPDATE_CHECK(check, buf, len) adler32(check, buf, len) +#endif + +/* check macros for header crc */ +#ifdef GUNZIP +# define CRC2(check, word) \ + do { \ + hbuf[0] = (unsigned char)(word); \ + hbuf[1] = (unsigned char)((word) >> 8); \ + check = crc32(check, hbuf, 2); \ + } while (0) + +# define CRC4(check, word) \ + do { \ + hbuf[0] = (unsigned char)(word); \ + hbuf[1] = (unsigned char)((word) >> 8); \ + hbuf[2] = (unsigned char)((word) >> 16); \ + hbuf[3] = (unsigned char)((word) >> 24); \ + check = crc32(check, hbuf, 4); \ + } while (0) +#endif + +/* Load registers with state in inflate() for speed */ +#define LOAD() \ + do { \ + put = strm->next_out; \ + left = strm->avail_out; \ + next = strm->next_in; \ + have = strm->avail_in; \ + hold = state->hold; \ + bits = state->bits; \ + } while (0) + +/* Restore state from registers in inflate() */ +#define RESTORE() \ + do { \ + strm->next_out = put; \ + strm->avail_out = left; \ + strm->next_in = next; \ + strm->avail_in = have; \ + state->hold = hold; \ + state->bits = bits; \ + } while (0) + +/* Clear the input bit accumulator */ +#define INITBITS() \ + do { \ + hold = 0; \ + bits = 0; \ + } while (0) + +/* Get a byte of input into the bit accumulator, or return from inflate() + if there is no input available. */ +#define PULLBYTE() \ + do { \ + if (have == 0) goto inf_leave; \ + have--; \ + hold += (unsigned long)(*next++) << bits; \ + bits += 8; \ + } while (0) + +/* Assure that there are at least n bits in the bit accumulator. If there is + not enough available input to do that, then return from inflate(). */ +#define NEEDBITS(n) \ + do { \ + while (bits < (unsigned)(n)) \ + PULLBYTE(); \ + } while (0) + +/* Return the low n bits of the bit accumulator (n < 16) */ +#define BITS(n) \ + ((unsigned)hold & ((1U << (n)) - 1)) + +/* Remove n bits from the bit accumulator */ +#define DROPBITS(n) \ + do { \ + hold >>= (n); \ + bits -= (unsigned)(n); \ + } while (0) + +/* Remove zero to seven bits as needed to go to a byte boundary */ +#define BYTEBITS() \ + do { \ + hold >>= bits & 7; \ + bits -= bits & 7; \ + } while (0) + +/* + inflate() uses a state machine to process as much input data and generate as + much output data as possible before returning. The state machine is + structured roughly as follows: + + for (;;) switch (state) { + ... + case STATEn: + if (not enough input data or output space to make progress) + return; + ... make progress ... + state = STATEm; + break; + ... + } + + so when inflate() is called again, the same case is attempted again, and + if the appropriate resources are provided, the machine proceeds to the + next state. The NEEDBITS() macro is usually the way the state evaluates + whether it can proceed or should return. NEEDBITS() does the return if + the requested bits are not available. The typical use of the BITS macros + is: + + NEEDBITS(n); + ... do something with BITS(n) ... + DROPBITS(n); + + where NEEDBITS(n) either returns from inflate() if there isn't enough + input left to load n bits into the accumulator, or it continues. BITS(n) + gives the low n bits in the accumulator. When done, DROPBITS(n) drops + the low n bits off the accumulator. INITBITS() clears the accumulator + and sets the number of available bits to zero. BYTEBITS() discards just + enough bits to put the accumulator on a byte boundary. After BYTEBITS() + and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. + + NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return + if there is no input available. The decoding of variable length codes uses + PULLBYTE() directly in order to pull just enough bytes to decode the next + code, and no more. + + Some states loop until they get enough input, making sure that enough + state information is maintained to continue the loop where it left off + if NEEDBITS() returns in the loop. For example, want, need, and keep + would all have to actually be part of the saved state in case NEEDBITS() + returns: + + case STATEw: + while (want < need) { + NEEDBITS(n); + keep[want++] = BITS(n); + DROPBITS(n); + } + state = STATEx; + case STATEx: + + As shown above, if the next state is also the next case, then the break + is omitted. + + A state may also return if there is not enough output space available to + complete that state. Those states are copying stored data, writing a + literal byte, and copying a matching string. + + When returning, a "goto inf_leave" is used to update the total counters, + update the check value, and determine whether any progress has been made + during that inflate() call in order to return the proper return code. + Progress is defined as a change in either strm->avail_in or strm->avail_out. + When there is a window, goto inf_leave will update the window with the last + output written. If a goto inf_leave occurs in the middle of decompression + and there is no window currently, goto inf_leave will create one and copy + output to the window for the next call of inflate(). + + In this implementation, the flush parameter of inflate() only affects the + return code (per zlib.h). inflate() always writes as much as possible to + strm->next_out, given the space available and the provided input--the effect + documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers + the allocation of and copying into a sliding window until necessary, which + provides the effect documented in zlib.h for Z_FINISH when the entire input + stream available. So the only thing the flush parameter actually does is: + when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it + will return Z_BUF_ERROR if it has not reached the end of the stream. + */ + +int ZEXPORT inflate(z_streamp strm, int flush) { + struct inflate_state FAR *state; + z_const unsigned char FAR *next; /* next input */ + unsigned char FAR *put; /* next output */ + unsigned have, left; /* available input and output */ + unsigned long hold; /* bit buffer */ + unsigned bits; /* bits in bit buffer */ + unsigned in, out; /* save starting available input and output */ + unsigned copy; /* number of stored or match bytes to copy */ + unsigned char FAR *from; /* where to copy match bytes from */ + code here; /* current decoding table entry */ + code last; /* parent table entry */ + unsigned len; /* length to copy for repeats, bits to drop */ + int ret; /* return code */ +#ifdef GUNZIP + unsigned char hbuf[4]; /* buffer for gzip header crc calculation */ +#endif + static const unsigned short order[19] = /* permutation of code lengths */ + {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + + if (inflateStateCheck(strm) || strm->next_out == Z_NULL || + (strm->next_in == Z_NULL && strm->avail_in != 0)) + return Z_STREAM_ERROR; + + state = (struct inflate_state FAR *)strm->state; + if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */ + LOAD(); + in = have; + out = left; + ret = Z_OK; + for (;;) + switch (state->mode) { + case HEAD: + if (state->wrap == 0) { + state->mode = TYPEDO; + break; + } + NEEDBITS(16); +#ifdef GUNZIP + if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */ + if (state->wbits == 0) + state->wbits = 15; + state->check = crc32(0L, Z_NULL, 0); + CRC2(state->check, hold); + INITBITS(); + state->mode = FLAGS; + break; + } + if (state->head != Z_NULL) + state->head->done = -1; + if (!(state->wrap & 1) || /* check if zlib header allowed */ +#else + if ( +#endif + ((BITS(8) << 8) + (hold >> 8)) % 31) { + strm->msg = (char *)"incorrect header check"; + state->mode = BAD; + break; + } + if (BITS(4) != Z_DEFLATED) { + strm->msg = (char *)"unknown compression method"; + state->mode = BAD; + break; + } + DROPBITS(4); + len = BITS(4) + 8; + if (state->wbits == 0) + state->wbits = len; + if (len > 15 || len > state->wbits) { + strm->msg = (char *)"invalid window size"; + state->mode = BAD; + break; + } + state->dmax = 1U << len; + state->flags = 0; /* indicate zlib header */ + Tracev((stderr, "inflate: zlib header ok\n")); + strm->adler = state->check = adler32(0L, Z_NULL, 0); + state->mode = hold & 0x200 ? DICTID : TYPE; + INITBITS(); + break; +#ifdef GUNZIP + case FLAGS: + NEEDBITS(16); + state->flags = (int)(hold); + if ((state->flags & 0xff) != Z_DEFLATED) { + strm->msg = (char *)"unknown compression method"; + state->mode = BAD; + break; + } + if (state->flags & 0xe000) { + strm->msg = (char *)"unknown header flags set"; + state->mode = BAD; + break; + } + if (state->head != Z_NULL) + state->head->text = (int)((hold >> 8) & 1); + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC2(state->check, hold); + INITBITS(); + state->mode = TIME; + /* fallthrough */ + case TIME: + NEEDBITS(32); + if (state->head != Z_NULL) + state->head->time = hold; + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC4(state->check, hold); + INITBITS(); + state->mode = OS; + /* fallthrough */ + case OS: + NEEDBITS(16); + if (state->head != Z_NULL) { + state->head->xflags = (int)(hold & 0xff); + state->head->os = (int)(hold >> 8); + } + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC2(state->check, hold); + INITBITS(); + state->mode = EXLEN; + /* fallthrough */ + case EXLEN: + if (state->flags & 0x0400) { + NEEDBITS(16); + state->length = (unsigned)(hold); + if (state->head != Z_NULL) + state->head->extra_len = (unsigned)hold; + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC2(state->check, hold); + INITBITS(); + } + else if (state->head != Z_NULL) + state->head->extra = Z_NULL; + state->mode = EXTRA; + /* fallthrough */ + case EXTRA: + if (state->flags & 0x0400) { + copy = state->length; + if (copy > have) copy = have; + if (copy) { + if (state->head != Z_NULL && + state->head->extra != Z_NULL && + (len = state->head->extra_len - state->length) < + state->head->extra_max) { + zmemcpy(state->head->extra + len, next, + len + copy > state->head->extra_max ? + state->head->extra_max - len : copy); + } + if ((state->flags & 0x0200) && (state->wrap & 4)) + state->check = crc32(state->check, next, copy); + have -= copy; + next += copy; + state->length -= copy; + } + if (state->length) goto inf_leave; + } + state->length = 0; + state->mode = NAME; + /* fallthrough */ + case NAME: + if (state->flags & 0x0800) { + if (have == 0) goto inf_leave; + copy = 0; + do { + len = (unsigned)(next[copy++]); + if (state->head != Z_NULL && + state->head->name != Z_NULL && + state->length < state->head->name_max) + state->head->name[state->length++] = (Bytef)len; + } while (len && copy < have); + if ((state->flags & 0x0200) && (state->wrap & 4)) + state->check = crc32(state->check, next, copy); + have -= copy; + next += copy; + if (len) goto inf_leave; + } + else if (state->head != Z_NULL) + state->head->name = Z_NULL; + state->length = 0; + state->mode = COMMENT; + /* fallthrough */ + case COMMENT: + if (state->flags & 0x1000) { + if (have == 0) goto inf_leave; + copy = 0; + do { + len = (unsigned)(next[copy++]); + if (state->head != Z_NULL && + state->head->comment != Z_NULL && + state->length < state->head->comm_max) + state->head->comment[state->length++] = (Bytef)len; + } while (len && copy < have); + if ((state->flags & 0x0200) && (state->wrap & 4)) + state->check = crc32(state->check, next, copy); + have -= copy; + next += copy; + if (len) goto inf_leave; + } + else if (state->head != Z_NULL) + state->head->comment = Z_NULL; + state->mode = HCRC; + /* fallthrough */ + case HCRC: + if (state->flags & 0x0200) { + NEEDBITS(16); + if ((state->wrap & 4) && hold != (state->check & 0xffff)) { + strm->msg = (char *)"header crc mismatch"; + state->mode = BAD; + break; + } + INITBITS(); + } + if (state->head != Z_NULL) { + state->head->hcrc = (int)((state->flags >> 9) & 1); + state->head->done = 1; + } + strm->adler = state->check = crc32(0L, Z_NULL, 0); + state->mode = TYPE; + break; +#endif + case DICTID: + NEEDBITS(32); + strm->adler = state->check = ZSWAP32(hold); + INITBITS(); + state->mode = DICT; + /* fallthrough */ + case DICT: + if (state->havedict == 0) { + RESTORE(); + return Z_NEED_DICT; + } + strm->adler = state->check = adler32(0L, Z_NULL, 0); + state->mode = TYPE; + /* fallthrough */ + case TYPE: + if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave; + /* fallthrough */ + case TYPEDO: + if (state->last) { + BYTEBITS(); + state->mode = CHECK; + break; + } + NEEDBITS(3); + state->last = BITS(1); + DROPBITS(1); + switch (BITS(2)) { + case 0: /* stored block */ + Tracev((stderr, "inflate: stored block%s\n", + state->last ? " (last)" : "")); + state->mode = STORED; + break; + case 1: /* fixed block */ + fixedtables(state); + Tracev((stderr, "inflate: fixed codes block%s\n", + state->last ? " (last)" : "")); + state->mode = LEN_; /* decode codes */ + if (flush == Z_TREES) { + DROPBITS(2); + goto inf_leave; + } + break; + case 2: /* dynamic block */ + Tracev((stderr, "inflate: dynamic codes block%s\n", + state->last ? " (last)" : "")); + state->mode = TABLE; + break; + case 3: + strm->msg = (char *)"invalid block type"; + state->mode = BAD; + } + DROPBITS(2); + break; + case STORED: + BYTEBITS(); /* go to byte boundary */ + NEEDBITS(32); + if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) { + strm->msg = (char *)"invalid stored block lengths"; + state->mode = BAD; + break; + } + state->length = (unsigned)hold & 0xffff; + Tracev((stderr, "inflate: stored length %u\n", + state->length)); + INITBITS(); + state->mode = COPY_; + if (flush == Z_TREES) goto inf_leave; + /* fallthrough */ + case COPY_: + state->mode = COPY; + /* fallthrough */ + case COPY: + copy = state->length; + if (copy) { + if (copy > have) copy = have; + if (copy > left) copy = left; + if (copy == 0) goto inf_leave; + zmemcpy(put, next, copy); + have -= copy; + next += copy; + left -= copy; + put += copy; + state->length -= copy; + break; + } + Tracev((stderr, "inflate: stored end\n")); + state->mode = TYPE; + break; + case TABLE: + NEEDBITS(14); + state->nlen = BITS(5) + 257; + DROPBITS(5); + state->ndist = BITS(5) + 1; + DROPBITS(5); + state->ncode = BITS(4) + 4; + DROPBITS(4); +#ifndef PKZIP_BUG_WORKAROUND + if (state->nlen > 286 || state->ndist > 30) { + strm->msg = (char *)"too many length or distance symbols"; + state->mode = BAD; + break; + } +#endif + Tracev((stderr, "inflate: table sizes ok\n")); + state->have = 0; + state->mode = LENLENS; + /* fallthrough */ + case LENLENS: + while (state->have < state->ncode) { + NEEDBITS(3); + state->lens[order[state->have++]] = (unsigned short)BITS(3); + DROPBITS(3); + } + while (state->have < 19) + state->lens[order[state->have++]] = 0; + state->next = state->codes; + state->lencode = (const code FAR *)(state->next); + state->lenbits = 7; + ret = inflate_table(CODES, state->lens, 19, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid code lengths set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: code lengths ok\n")); + state->have = 0; + state->mode = CODELENS; + /* fallthrough */ + case CODELENS: + while (state->have < state->nlen + state->ndist) { + for (;;) { + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if (here.val < 16) { + DROPBITS(here.bits); + state->lens[state->have++] = here.val; + } + else { + if (here.val == 16) { + NEEDBITS(here.bits + 2); + DROPBITS(here.bits); + if (state->have == 0) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + len = state->lens[state->have - 1]; + copy = 3 + BITS(2); + DROPBITS(2); + } + else if (here.val == 17) { + NEEDBITS(here.bits + 3); + DROPBITS(here.bits); + len = 0; + copy = 3 + BITS(3); + DROPBITS(3); + } + else { + NEEDBITS(here.bits + 7); + DROPBITS(here.bits); + len = 0; + copy = 11 + BITS(7); + DROPBITS(7); + } + if (state->have + copy > state->nlen + state->ndist) { + strm->msg = (char *)"invalid bit length repeat"; + state->mode = BAD; + break; + } + while (copy--) + state->lens[state->have++] = (unsigned short)len; + } + } + + /* handle error breaks in while */ + if (state->mode == BAD) break; + + /* check for end-of-block code (better have one) */ + if (state->lens[256] == 0) { + strm->msg = (char *)"invalid code -- missing end-of-block"; + state->mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ + state->next = state->codes; + state->lencode = (const code FAR *)(state->next); + state->lenbits = 9; + ret = inflate_table(LENS, state->lens, state->nlen, &(state->next), + &(state->lenbits), state->work); + if (ret) { + strm->msg = (char *)"invalid literal/lengths set"; + state->mode = BAD; + break; + } + state->distcode = (const code FAR *)(state->next); + state->distbits = 6; + ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist, + &(state->next), &(state->distbits), state->work); + if (ret) { + strm->msg = (char *)"invalid distances set"; + state->mode = BAD; + break; + } + Tracev((stderr, "inflate: codes ok\n")); + state->mode = LEN_; + if (flush == Z_TREES) goto inf_leave; + /* fallthrough */ + case LEN_: + state->mode = LEN; + /* fallthrough */ + case LEN: + if (have >= 6 && left >= 258) { + RESTORE(); + inflate_fast(strm, out); + LOAD(); + if (state->mode == TYPE) + state->back = -1; + break; + } + state->back = 0; + for (;;) { + here = state->lencode[BITS(state->lenbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if (here.op && (here.op & 0xf0) == 0) { + last = here; + for (;;) { + here = state->lencode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + here.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + state->back += last.bits; + } + DROPBITS(here.bits); + state->back += here.bits; + state->length = (unsigned)here.val; + if ((int)(here.op) == 0) { + Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + "inflate: literal '%c'\n" : + "inflate: literal 0x%02x\n", here.val)); + state->mode = LIT; + break; + } + if (here.op & 32) { + Tracevv((stderr, "inflate: end of block\n")); + state->back = -1; + state->mode = TYPE; + break; + } + if (here.op & 64) { + strm->msg = (char *)"invalid literal/length code"; + state->mode = BAD; + break; + } + state->extra = (unsigned)(here.op) & 15; + state->mode = LENEXT; + /* fallthrough */ + case LENEXT: + if (state->extra) { + NEEDBITS(state->extra); + state->length += BITS(state->extra); + DROPBITS(state->extra); + state->back += state->extra; + } + Tracevv((stderr, "inflate: length %u\n", state->length)); + state->was = state->length; + state->mode = DIST; + /* fallthrough */ + case DIST: + for (;;) { + here = state->distcode[BITS(state->distbits)]; + if ((unsigned)(here.bits) <= bits) break; + PULLBYTE(); + } + if ((here.op & 0xf0) == 0) { + last = here; + for (;;) { + here = state->distcode[last.val + + (BITS(last.bits + last.op) >> last.bits)]; + if ((unsigned)(last.bits + here.bits) <= bits) break; + PULLBYTE(); + } + DROPBITS(last.bits); + state->back += last.bits; + } + DROPBITS(here.bits); + state->back += here.bits; + if (here.op & 64) { + strm->msg = (char *)"invalid distance code"; + state->mode = BAD; + break; + } + state->offset = (unsigned)here.val; + state->extra = (unsigned)(here.op) & 15; + state->mode = DISTEXT; + /* fallthrough */ + case DISTEXT: + if (state->extra) { + NEEDBITS(state->extra); + state->offset += BITS(state->extra); + DROPBITS(state->extra); + state->back += state->extra; + } +#ifdef INFLATE_STRICT + if (state->offset > state->dmax) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#endif + Tracevv((stderr, "inflate: distance %u\n", state->offset)); + state->mode = MATCH; + /* fallthrough */ + case MATCH: + if (left == 0) goto inf_leave; + copy = out - left; + if (state->offset > copy) { /* copy from window */ + copy = state->offset - copy; + if (copy > state->whave) { + if (state->sane) { + strm->msg = (char *)"invalid distance too far back"; + state->mode = BAD; + break; + } +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + Trace((stderr, "inflate.c too far\n")); + copy -= state->whave; + if (copy > state->length) copy = state->length; + if (copy > left) copy = left; + left -= copy; + state->length -= copy; + do { + *put++ = 0; + } while (--copy); + if (state->length == 0) state->mode = LEN; + break; +#endif + } + if (copy > state->wnext) { + copy -= state->wnext; + from = state->window + (state->wsize - copy); + } + else + from = state->window + (state->wnext - copy); + if (copy > state->length) copy = state->length; + } + else { /* copy from output */ + from = put - state->offset; + copy = state->length; + } + if (copy > left) copy = left; + left -= copy; + state->length -= copy; + do { + *put++ = *from++; + } while (--copy); + if (state->length == 0) state->mode = LEN; + break; + case LIT: + if (left == 0) goto inf_leave; + *put++ = (unsigned char)(state->length); + left--; + state->mode = LEN; + break; + case CHECK: + if (state->wrap) { + NEEDBITS(32); + out -= left; + strm->total_out += out; + state->total += out; + if ((state->wrap & 4) && out) + strm->adler = state->check = + UPDATE_CHECK(state->check, put - out, out); + out = left; + if ((state->wrap & 4) && ( +#ifdef GUNZIP + state->flags ? hold : +#endif + ZSWAP32(hold)) != state->check) { + strm->msg = (char *)"incorrect data check"; + state->mode = BAD; + break; + } + INITBITS(); + Tracev((stderr, "inflate: check matches trailer\n")); + } +#ifdef GUNZIP + state->mode = LENGTH; + /* fallthrough */ + case LENGTH: + if (state->wrap && state->flags) { + NEEDBITS(32); + if ((state->wrap & 4) && hold != (state->total & 0xffffffff)) { + strm->msg = (char *)"incorrect length check"; + state->mode = BAD; + break; + } + INITBITS(); + Tracev((stderr, "inflate: length matches trailer\n")); + } +#endif + state->mode = DONE; + /* fallthrough */ + case DONE: + ret = Z_STREAM_END; + goto inf_leave; + case BAD: + ret = Z_DATA_ERROR; + goto inf_leave; + case MEM: + return Z_MEM_ERROR; + case SYNC: + /* fallthrough */ + default: + return Z_STREAM_ERROR; + } + + /* + Return from inflate(), updating the total counts and the check value. + If there was no progress during the inflate() call, return a buffer + error. Call updatewindow() to create and/or update the window state. + Note: a memory error from inflate() is non-recoverable. + */ + inf_leave: + RESTORE(); + if (state->wsize || (out != strm->avail_out && state->mode < BAD && + (state->mode < CHECK || flush != Z_FINISH))) + if (updatewindow(strm, strm->next_out, out - strm->avail_out)) { + state->mode = MEM; + return Z_MEM_ERROR; + } + in -= strm->avail_in; + out -= strm->avail_out; + strm->total_in += in; + strm->total_out += out; + state->total += out; + if ((state->wrap & 4) && out) + strm->adler = state->check = + UPDATE_CHECK(state->check, strm->next_out - out, out); + strm->data_type = (int)state->bits + (state->last ? 64 : 0) + + (state->mode == TYPE ? 128 : 0) + + (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0); + if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK) + ret = Z_BUF_ERROR; + return ret; +} + +int ZEXPORT inflateEnd(z_streamp strm) { + struct inflate_state FAR *state; + if (inflateStateCheck(strm)) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (state->window != Z_NULL) ZFREE(strm, state->window); + ZFREE(strm, strm->state); + strm->state = Z_NULL; + Tracev((stderr, "inflate: end\n")); + return Z_OK; +} + +int ZEXPORT inflateGetDictionary(z_streamp strm, Bytef *dictionary, + uInt *dictLength) { + struct inflate_state FAR *state; + + /* check state */ + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + + /* copy dictionary */ + if (state->whave && dictionary != Z_NULL) { + zmemcpy(dictionary, state->window + state->wnext, + state->whave - state->wnext); + zmemcpy(dictionary + state->whave - state->wnext, + state->window, state->wnext); + } + if (dictLength != Z_NULL) + *dictLength = state->whave; + return Z_OK; +} + +int ZEXPORT inflateSetDictionary(z_streamp strm, const Bytef *dictionary, + uInt dictLength) { + struct inflate_state FAR *state; + unsigned long dictid; + int ret; + + /* check state */ + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (state->wrap != 0 && state->mode != DICT) + return Z_STREAM_ERROR; + + /* check for correct dictionary identifier */ + if (state->mode == DICT) { + dictid = adler32(0L, Z_NULL, 0); + dictid = adler32(dictid, dictionary, dictLength); + if (dictid != state->check) + return Z_DATA_ERROR; + } + + /* copy dictionary to window using updatewindow(), which will amend the + existing dictionary if appropriate */ + ret = updatewindow(strm, dictionary + dictLength, dictLength); + if (ret) { + state->mode = MEM; + return Z_MEM_ERROR; + } + state->havedict = 1; + Tracev((stderr, "inflate: dictionary set\n")); + return Z_OK; +} + +int ZEXPORT inflateGetHeader(z_streamp strm, gz_headerp head) { + struct inflate_state FAR *state; + + /* check state */ + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if ((state->wrap & 2) == 0) return Z_STREAM_ERROR; + + /* save header structure */ + state->head = head; + head->done = 0; + return Z_OK; +} + +/* + Search buf[0..len-1] for the pattern: 0, 0, 0xff, 0xff. Return when found + or when out of input. When called, *have is the number of pattern bytes + found in order so far, in 0..3. On return *have is updated to the new + state. If on return *have equals four, then the pattern was found and the + return value is how many bytes were read including the last byte of the + pattern. If *have is less than four, then the pattern has not been found + yet and the return value is len. In the latter case, syncsearch() can be + called again with more data and the *have state. *have is initialized to + zero for the first call. + */ +local unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf, + unsigned len) { + unsigned got; + unsigned next; + + got = *have; + next = 0; + while (next < len && got < 4) { + if ((int)(buf[next]) == (got < 2 ? 0 : 0xff)) + got++; + else if (buf[next]) + got = 0; + else + got = 4 - got; + next++; + } + *have = got; + return next; +} + +int ZEXPORT inflateSync(z_streamp strm) { + unsigned len; /* number of bytes to look at or looked at */ + int flags; /* temporary to save header status */ + unsigned long in, out; /* temporary to save total_in and total_out */ + unsigned char buf[4]; /* to restore bit buffer to byte string */ + struct inflate_state FAR *state; + + /* check parameters */ + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR; + + /* if first time, start search in bit buffer */ + if (state->mode != SYNC) { + state->mode = SYNC; + state->hold >>= state->bits & 7; + state->bits -= state->bits & 7; + len = 0; + while (state->bits >= 8) { + buf[len++] = (unsigned char)(state->hold); + state->hold >>= 8; + state->bits -= 8; + } + state->have = 0; + syncsearch(&(state->have), buf, len); + } + + /* search available input */ + len = syncsearch(&(state->have), strm->next_in, strm->avail_in); + strm->avail_in -= len; + strm->next_in += len; + strm->total_in += len; + + /* return no joy or set up to restart inflate() on a new block */ + if (state->have != 4) return Z_DATA_ERROR; + if (state->flags == -1) + state->wrap = 0; /* if no header yet, treat as raw */ + else + state->wrap &= ~4; /* no point in computing a check value now */ + flags = state->flags; + in = strm->total_in; out = strm->total_out; + inflateReset(strm); + strm->total_in = in; strm->total_out = out; + state->flags = flags; + state->mode = TYPE; + return Z_OK; +} + +/* + Returns true if inflate is currently at the end of a block generated by + Z_SYNC_FLUSH or Z_FULL_FLUSH. This function is used by one PPP + implementation to provide an additional safety check. PPP uses + Z_SYNC_FLUSH but removes the length bytes of the resulting empty stored + block. When decompressing, PPP checks that at the end of input packet, + inflate is waiting for these length bytes. + */ +int ZEXPORT inflateSyncPoint(z_streamp strm) { + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + return state->mode == STORED && state->bits == 0; +} + +int ZEXPORT inflateCopy(z_streamp dest, z_streamp source) { + struct inflate_state FAR *state; + struct inflate_state FAR *copy; + unsigned char FAR *window; + unsigned wsize; + + /* check input */ + if (inflateStateCheck(source) || dest == Z_NULL) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)source->state; + + /* allocate space */ + copy = (struct inflate_state FAR *) + ZALLOC(source, 1, sizeof(struct inflate_state)); + if (copy == Z_NULL) return Z_MEM_ERROR; + window = Z_NULL; + if (state->window != Z_NULL) { + window = (unsigned char FAR *) + ZALLOC(source, 1U << state->wbits, sizeof(unsigned char)); + if (window == Z_NULL) { + ZFREE(source, copy); + return Z_MEM_ERROR; + } + } + + /* copy state */ + zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); + zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state)); + copy->strm = dest; + if (state->lencode >= state->codes && + state->lencode <= state->codes + ENOUGH - 1) { + copy->lencode = copy->codes + (state->lencode - state->codes); + copy->distcode = copy->codes + (state->distcode - state->codes); + } + copy->next = copy->codes + (state->next - state->codes); + if (window != Z_NULL) { + wsize = 1U << state->wbits; + zmemcpy(window, state->window, wsize); + } + copy->window = window; + dest->state = (struct internal_state FAR *)copy; + return Z_OK; +} + +int ZEXPORT inflateUndermine(z_streamp strm, int subvert) { + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; +#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR + state->sane = !subvert; + return Z_OK; +#else + (void)subvert; + state->sane = 1; + return Z_DATA_ERROR; +#endif +} + +int ZEXPORT inflateValidate(z_streamp strm, int check) { + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (check && state->wrap) + state->wrap |= 4; + else + state->wrap &= ~4; + return Z_OK; +} + +long ZEXPORT inflateMark(z_streamp strm) { + struct inflate_state FAR *state; + + if (inflateStateCheck(strm)) + return -(1L << 16); + state = (struct inflate_state FAR *)strm->state; + return (long)(((unsigned long)((long)state->back)) << 16) + + (state->mode == COPY ? state->length : + (state->mode == MATCH ? state->was - state->length : 0)); +} + +unsigned long ZEXPORT inflateCodesUsed(z_streamp strm) { + struct inflate_state FAR *state; + if (inflateStateCheck(strm)) return (unsigned long)-1; + state = (struct inflate_state FAR *)strm->state; + return (unsigned long)(state->next - state->codes); +} diff --git a/widget/milsko/milskosrc/external/libz/src/inftrees.c b/widget/milsko/milskosrc/external/libz/src/inftrees.c new file mode 100644 index 0000000000..98cfe16445 --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/src/inftrees.c @@ -0,0 +1,299 @@ +/* inftrees.c -- generate Huffman trees for efficient decoding + * Copyright (C) 1995-2024 Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +#include "zutil.h" +#include "inftrees.h" + +#define MAXBITS 15 + +const char inflate_copyright[] = + " inflate 1.3.1 Copyright 1995-2024 Mark Adler "; +/* + If you use the zlib library in a product, an acknowledgment is welcome + in the documentation of your product. If for some reason you cannot + include such an acknowledgment, I would appreciate that you keep this + copyright string in the executable of your product. + */ + +/* + Build a set of tables to decode the provided canonical Huffman code. + The code lengths are lens[0..codes-1]. The result starts at *table, + whose indices are 0..2^bits-1. work is a writable array of at least + lens shorts, which is used as a work area. type is the type of code + to be generated, CODES, LENS, or DISTS. On return, zero is success, + -1 is an invalid code, and +1 means that ENOUGH isn't enough. table + on return points to the next available entry's address. bits is the + requested root table index bits, and on return it is the actual root + table index bits. It will differ if the request is greater than the + longest code or if it is less than the shortest code. + */ +int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, + unsigned codes, code FAR * FAR *table, + unsigned FAR *bits, unsigned short FAR *work) { + unsigned len; /* a code's length in bits */ + unsigned sym; /* index of code symbols */ + unsigned min, max; /* minimum and maximum code lengths */ + unsigned root; /* number of index bits for root table */ + unsigned curr; /* number of index bits for current table */ + unsigned drop; /* code bits to drop for sub-table */ + int left; /* number of prefix codes available */ + unsigned used; /* code entries in table used */ + unsigned huff; /* Huffman code */ + unsigned incr; /* for incrementing code, index */ + unsigned fill; /* index for replicating entries */ + unsigned low; /* low bits for current root entry */ + unsigned mask; /* mask for low root bits */ + code here; /* table entry for duplication */ + code FAR *next; /* next available space in table */ + const unsigned short FAR *base; /* base value table to use */ + const unsigned short FAR *extra; /* extra bits table to use */ + unsigned match; /* use base and extra for symbol >= match */ + unsigned short count[MAXBITS+1]; /* number of codes of each length */ + unsigned short offs[MAXBITS+1]; /* offsets in table for each length */ + static const unsigned short lbase[31] = { /* Length codes 257..285 base */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; + static const unsigned short lext[31] = { /* Length codes 257..285 extra */ + 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 203, 77}; + static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577, 0, 0}; + static const unsigned short dext[32] = { /* Distance codes 0..29 extra */ + 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, + 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, + 28, 28, 29, 29, 64, 64}; + + /* + Process a set of code lengths to create a canonical Huffman code. The + code lengths are lens[0..codes-1]. Each length corresponds to the + symbols 0..codes-1. The Huffman code is generated by first sorting the + symbols by length from short to long, and retaining the symbol order + for codes with equal lengths. Then the code starts with all zero bits + for the first code of the shortest length, and the codes are integer + increments for the same length, and zeros are appended as the length + increases. For the deflate format, these bits are stored backwards + from their more natural integer increment ordering, and so when the + decoding tables are built in the large loop below, the integer codes + are incremented backwards. + + This routine assumes, but does not check, that all of the entries in + lens[] are in the range 0..MAXBITS. The caller must assure this. + 1..MAXBITS is interpreted as that code length. zero means that that + symbol does not occur in this code. + + The codes are sorted by computing a count of codes for each length, + creating from that a table of starting indices for each length in the + sorted table, and then entering the symbols in order in the sorted + table. The sorted table is work[], with that space being provided by + the caller. + + The length counts are used for other purposes as well, i.e. finding + the minimum and maximum length codes, determining if there are any + codes at all, checking for a valid set of lengths, and looking ahead + at length counts to determine sub-table sizes when building the + decoding tables. + */ + + /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ + for (len = 0; len <= MAXBITS; len++) + count[len] = 0; + for (sym = 0; sym < codes; sym++) + count[lens[sym]]++; + + /* bound code lengths, force root to be within code lengths */ + root = *bits; + for (max = MAXBITS; max >= 1; max--) + if (count[max] != 0) break; + if (root > max) root = max; + if (max == 0) { /* no symbols to code at all */ + here.op = (unsigned char)64; /* invalid code marker */ + here.bits = (unsigned char)1; + here.val = (unsigned short)0; + *(*table)++ = here; /* make a table to force an error */ + *(*table)++ = here; + *bits = 1; + return 0; /* no symbols, but wait for decoding to report error */ + } + for (min = 1; min < max; min++) + if (count[min] != 0) break; + if (root < min) root = min; + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) return -1; /* over-subscribed */ + } + if (left > 0 && (type == CODES || max != 1)) + return -1; /* incomplete set */ + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) + offs[len + 1] = offs[len] + count[len]; + + /* sort symbols by length, by symbol order within each length */ + for (sym = 0; sym < codes; sym++) + if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym; + + /* + Create and fill in decoding tables. In this loop, the table being + filled is at next and has curr index bits. The code being used is huff + with length len. That code is converted to an index by dropping drop + bits off of the bottom. For codes where len is less than drop + curr, + those top drop + curr - len bits are incremented through all values to + fill the table with replicated entries. + + root is the number of index bits for the root table. When len exceeds + root, sub-tables are created pointed to by the root entry with an index + of the low root bits of huff. This is saved in low to check for when a + new sub-table should be started. drop is zero when the root table is + being filled, and drop is root when sub-tables are being filled. + + When a new sub-table is needed, it is necessary to look ahead in the + code lengths to determine what size sub-table is needed. The length + counts are used for this, and so count[] is decremented as codes are + entered in the tables. + + used keeps track of how many table entries have been allocated from the + provided *table space. It is checked for LENS and DIST tables against + the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in + the initial root table size constants. See the comments in inftrees.h + for more information. + + sym increments through all symbols, and the loop terminates when + all codes of length max, i.e. all codes, have been processed. This + routine permits incomplete codes, so another loop after this one fills + in the rest of the decoding tables with invalid code markers. + */ + + /* set up for code type */ + switch (type) { + case CODES: + base = extra = work; /* dummy value--not used */ + match = 20; + break; + case LENS: + base = lbase; + extra = lext; + match = 257; + break; + default: /* DISTS */ + base = dbase; + extra = dext; + match = 0; + } + + /* initialize state for loop */ + huff = 0; /* starting code */ + sym = 0; /* starting code symbol */ + len = min; /* starting code length */ + next = *table; /* current table to fill in */ + curr = root; /* current table index bits */ + drop = 0; /* current bits to drop from code for index */ + low = (unsigned)(-1); /* trigger new sub-table when len > root */ + used = 1U << root; /* use root table entries */ + mask = used - 1; /* mask for comparing low */ + + /* check available table space */ + if ((type == LENS && used > ENOUGH_LENS) || + (type == DISTS && used > ENOUGH_DISTS)) + return 1; + + /* process all codes and make table entries */ + for (;;) { + /* create table entry */ + here.bits = (unsigned char)(len - drop); + if (work[sym] + 1U < match) { + here.op = (unsigned char)0; + here.val = work[sym]; + } + else if (work[sym] >= match) { + here.op = (unsigned char)(extra[work[sym] - match]); + here.val = base[work[sym] - match]; + } + else { + here.op = (unsigned char)(32 + 64); /* end of block */ + here.val = 0; + } + + /* replicate for those indices with low len bits equal to huff */ + incr = 1U << (len - drop); + fill = 1U << curr; + min = fill; /* save offset to next table */ + do { + fill -= incr; + next[(huff >> drop) + fill] = here; + } while (fill != 0); + + /* backwards increment the len-bit code huff */ + incr = 1U << (len - 1); + while (huff & incr) + incr >>= 1; + if (incr != 0) { + huff &= incr - 1; + huff += incr; + } + else + huff = 0; + + /* go to next symbol, update count, len */ + sym++; + if (--(count[len]) == 0) { + if (len == max) break; + len = lens[work[sym]]; + } + + /* create new sub-table if needed */ + if (len > root && (huff & mask) != low) { + /* if first time, transition to sub-tables */ + if (drop == 0) + drop = root; + + /* increment past last table */ + next += min; /* here min is 1 << curr */ + + /* determine length of next table */ + curr = len - drop; + left = (int)(1 << curr); + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) break; + curr++; + left <<= 1; + } + + /* check for enough space */ + used += 1U << curr; + if ((type == LENS && used > ENOUGH_LENS) || + (type == DISTS && used > ENOUGH_DISTS)) + return 1; + + /* point entry in root table to sub-table */ + low = huff & mask; + (*table)[low].op = (unsigned char)curr; + (*table)[low].bits = (unsigned char)root; + (*table)[low].val = (unsigned short)(next - *table); + } + } + + /* fill in remaining table entry if code is incomplete (guaranteed to have + at most one remaining entry, since if the code is incomplete, the + maximum code length that was allowed to get this far is one bit) */ + if (huff != 0) { + here.op = (unsigned char)64; /* invalid code marker */ + here.bits = (unsigned char)(len - drop); + here.val = (unsigned short)0; + next[huff] = here; + } + + /* set return parameters */ + *table += used; + *bits = root; + return 0; +} diff --git a/widget/milsko/milskosrc/external/libz/src/trees.c b/widget/milsko/milskosrc/external/libz/src/trees.c new file mode 100644 index 0000000000..6a523ef34e --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/src/trees.c @@ -0,0 +1,1117 @@ +/* trees.c -- output deflated data using Huffman coding + * Copyright (C) 1995-2024 Jean-loup Gailly + * detect_data_type() function provided freely by Cosmin Truta, 2006 + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* + * ALGORITHM + * + * The "deflation" process uses several Huffman trees. The more + * common source values are represented by shorter bit sequences. + * + * Each code tree is stored in a compressed form which is itself + * a Huffman encoding of the lengths of all the code strings (in + * ascending order by source values). The actual code strings are + * reconstructed from the lengths in the inflate process, as described + * in the deflate specification. + * + * REFERENCES + * + * Deutsch, L.P.,"'Deflate' Compressed Data Format Specification". + * Available in ftp.uu.net:/pub/archiving/zip/doc/deflate-1.1.doc + * + * Storer, James A. + * Data Compression: Methods and Theory, pp. 49-50. + * Computer Science Press, 1988. ISBN 0-7167-8156-5. + * + * Sedgewick, R. + * Algorithms, p290. + * Addison-Wesley, 1983. ISBN 0-201-06672-6. + */ + +/* @(#) $Id$ */ + +/* #define GEN_TREES_H */ + +#include "deflate.h" + +#ifdef ZLIB_DEBUG +# include +#endif + +/* =========================================================================== + * Constants + */ + +#define MAX_BL_BITS 7 +/* Bit length codes must not exceed MAX_BL_BITS bits */ + +#define END_BLOCK 256 +/* end of block literal code */ + +#define REP_3_6 16 +/* repeat previous bit length 3-6 times (2 bits of repeat count) */ + +#define REPZ_3_10 17 +/* repeat a zero length 3-10 times (3 bits of repeat count) */ + +#define REPZ_11_138 18 +/* repeat a zero length 11-138 times (7 bits of repeat count) */ + +local const int extra_lbits[LENGTH_CODES] /* extra bits for each length code */ + = {0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0}; + +local const int extra_dbits[D_CODES] /* extra bits for each distance code */ + = {0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; + +local const int extra_blbits[BL_CODES]/* extra bits for each bit length code */ + = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7}; + +local const uch bl_order[BL_CODES] + = {16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15}; +/* The lengths of the bit length codes are sent in order of decreasing + * probability, to avoid transmitting the lengths for unused bit length codes. + */ + +/* =========================================================================== + * Local data. These are initialized only once. + */ + +#define DIST_CODE_LEN 512 /* see definition of array dist_code below */ + +#if defined(GEN_TREES_H) || !defined(STDC) +/* non ANSI compilers may not accept trees.h */ + +local ct_data static_ltree[L_CODES+2]; +/* The static literal tree. Since the bit lengths are imposed, there is no + * need for the L_CODES extra codes used during heap construction. However + * The codes 286 and 287 are needed to build a canonical tree (see _tr_init + * below). + */ + +local ct_data static_dtree[D_CODES]; +/* The static distance tree. (Actually a trivial tree since all codes use + * 5 bits.) + */ + +uch _dist_code[DIST_CODE_LEN]; +/* Distance codes. The first 256 values correspond to the distances + * 3 .. 258, the last 256 values correspond to the top 8 bits of + * the 15 bit distances. + */ + +uch _length_code[MAX_MATCH-MIN_MATCH+1]; +/* length code for each normalized match length (0 == MIN_MATCH) */ + +local int base_length[LENGTH_CODES]; +/* First normalized length for each code (0 = MIN_MATCH) */ + +local int base_dist[D_CODES]; +/* First normalized distance for each code (0 = distance of 1) */ + +#else +# include "trees.h" +#endif /* GEN_TREES_H */ + +struct static_tree_desc_s { + const ct_data *static_tree; /* static tree or NULL */ + const intf *extra_bits; /* extra bits for each code or NULL */ + int extra_base; /* base index for extra_bits */ + int elems; /* max number of elements in the tree */ + int max_length; /* max bit length for the codes */ +}; + +#ifdef NO_INIT_GLOBAL_POINTERS +# define TCONST +#else +# define TCONST const +#endif + +local TCONST static_tree_desc static_l_desc = +{static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS}; + +local TCONST static_tree_desc static_d_desc = +{static_dtree, extra_dbits, 0, D_CODES, MAX_BITS}; + +local TCONST static_tree_desc static_bl_desc = +{(const ct_data *)0, extra_blbits, 0, BL_CODES, MAX_BL_BITS}; + +/* =========================================================================== + * Output a short LSB first on the stream. + * IN assertion: there is enough room in pendingBuf. + */ +#define put_short(s, w) { \ + put_byte(s, (uch)((w) & 0xff)); \ + put_byte(s, (uch)((ush)(w) >> 8)); \ +} + +/* =========================================================================== + * Reverse the first len bits of a code, using straightforward code (a faster + * method would use a table) + * IN assertion: 1 <= len <= 15 + */ +local unsigned bi_reverse(unsigned code, int len) { + register unsigned res = 0; + do { + res |= code & 1; + code >>= 1, res <<= 1; + } while (--len > 0); + return res >> 1; +} + +/* =========================================================================== + * Flush the bit buffer, keeping at most 7 bits in it. + */ +local void bi_flush(deflate_state *s) { + if (s->bi_valid == 16) { + put_short(s, s->bi_buf); + s->bi_buf = 0; + s->bi_valid = 0; + } else if (s->bi_valid >= 8) { + put_byte(s, (Byte)s->bi_buf); + s->bi_buf >>= 8; + s->bi_valid -= 8; + } +} + +/* =========================================================================== + * Flush the bit buffer and align the output on a byte boundary + */ +local void bi_windup(deflate_state *s) { + if (s->bi_valid > 8) { + put_short(s, s->bi_buf); + } else if (s->bi_valid > 0) { + put_byte(s, (Byte)s->bi_buf); + } + s->bi_buf = 0; + s->bi_valid = 0; +#ifdef ZLIB_DEBUG + s->bits_sent = (s->bits_sent + 7) & ~7; +#endif +} + +/* =========================================================================== + * Generate the codes for a given tree and bit counts (which need not be + * optimal). + * IN assertion: the array bl_count contains the bit length statistics for + * the given tree and the field len is set for all tree elements. + * OUT assertion: the field code is set for all tree elements of non + * zero code length. + */ +local void gen_codes(ct_data *tree, int max_code, ushf *bl_count) { + ush next_code[MAX_BITS+1]; /* next code value for each bit length */ + unsigned code = 0; /* running code value */ + int bits; /* bit index */ + int n; /* code index */ + + /* The distribution counts are first used to generate the code values + * without bit reversal. + */ + for (bits = 1; bits <= MAX_BITS; bits++) { + code = (code + bl_count[bits - 1]) << 1; + next_code[bits] = (ush)code; + } + /* Check that the bit counts in bl_count are consistent. The last code + * must be all ones. + */ + Assert (code + bl_count[MAX_BITS] - 1 == (1 << MAX_BITS) - 1, + "inconsistent bit counts"); + Tracev((stderr,"\ngen_codes: max_code %d ", max_code)); + + for (n = 0; n <= max_code; n++) { + int len = tree[n].Len; + if (len == 0) continue; + /* Now reverse the bits */ + tree[n].Code = (ush)bi_reverse(next_code[len]++, len); + + Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ", + n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len] - 1)); + } +} + +#ifdef GEN_TREES_H +local void gen_trees_header(void); +#endif + +#ifndef ZLIB_DEBUG +# define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) + /* Send a code of the given tree. c and tree must not have side effects */ + +#else /* !ZLIB_DEBUG */ +# define send_code(s, c, tree) \ + { if (z_verbose>2) fprintf(stderr,"\ncd %3d ",(c)); \ + send_bits(s, tree[c].Code, tree[c].Len); } +#endif + +/* =========================================================================== + * Send a value on a given number of bits. + * IN assertion: length <= 16 and value fits in length bits. + */ +#ifdef ZLIB_DEBUG +local void send_bits(deflate_state *s, int value, int length) { + Tracevv((stderr," l %2d v %4x ", length, value)); + Assert(length > 0 && length <= 15, "invalid length"); + s->bits_sent += (ulg)length; + + /* If not enough room in bi_buf, use (valid) bits from bi_buf and + * (16 - bi_valid) bits from value, leaving (width - (16 - bi_valid)) + * unused bits in value. + */ + if (s->bi_valid > (int)Buf_size - length) { + s->bi_buf |= (ush)value << s->bi_valid; + put_short(s, s->bi_buf); + s->bi_buf = (ush)value >> (Buf_size - s->bi_valid); + s->bi_valid += length - Buf_size; + } else { + s->bi_buf |= (ush)value << s->bi_valid; + s->bi_valid += length; + } +} +#else /* !ZLIB_DEBUG */ + +#define send_bits(s, value, length) \ +{ int len = length;\ + if (s->bi_valid > (int)Buf_size - len) {\ + int val = (int)value;\ + s->bi_buf |= (ush)val << s->bi_valid;\ + put_short(s, s->bi_buf);\ + s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\ + s->bi_valid += len - Buf_size;\ + } else {\ + s->bi_buf |= (ush)(value) << s->bi_valid;\ + s->bi_valid += len;\ + }\ +} +#endif /* ZLIB_DEBUG */ + + +/* the arguments must not have side effects */ + +/* =========================================================================== + * Initialize the various 'constant' tables. + */ +local void tr_static_init(void) { +#if defined(GEN_TREES_H) || !defined(STDC) + static int static_init_done = 0; + int n; /* iterates over tree elements */ + int bits; /* bit counter */ + int length; /* length value */ + int code; /* code value */ + int dist; /* distance index */ + ush bl_count[MAX_BITS+1]; + /* number of codes at each bit length for an optimal tree */ + + if (static_init_done) return; + + /* For some embedded targets, global variables are not initialized: */ +#ifdef NO_INIT_GLOBAL_POINTERS + static_l_desc.static_tree = static_ltree; + static_l_desc.extra_bits = extra_lbits; + static_d_desc.static_tree = static_dtree; + static_d_desc.extra_bits = extra_dbits; + static_bl_desc.extra_bits = extra_blbits; +#endif + + /* Initialize the mapping length (0..255) -> length code (0..28) */ + length = 0; + for (code = 0; code < LENGTH_CODES-1; code++) { + base_length[code] = length; + for (n = 0; n < (1 << extra_lbits[code]); n++) { + _length_code[length++] = (uch)code; + } + } + Assert (length == 256, "tr_static_init: length != 256"); + /* Note that the length 255 (match length 258) can be represented + * in two different ways: code 284 + 5 bits or code 285, so we + * overwrite length_code[255] to use the best encoding: + */ + _length_code[length - 1] = (uch)code; + + /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ + dist = 0; + for (code = 0 ; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < (1 << extra_dbits[code]); n++) { + _dist_code[dist++] = (uch)code; + } + } + Assert (dist == 256, "tr_static_init: dist != 256"); + dist >>= 7; /* from now on, all distances are divided by 128 */ + for ( ; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { + _dist_code[256 + dist++] = (uch)code; + } + } + Assert (dist == 256, "tr_static_init: 256 + dist != 512"); + + /* Construct the codes of the static literal tree */ + for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; + n = 0; + while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++; + while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++; + while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++; + while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++; + /* Codes 286 and 287 do not exist, but we must include them in the + * tree construction to get a canonical Huffman tree (longest code + * all ones) + */ + gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count); + + /* The static distance tree is trivial: */ + for (n = 0; n < D_CODES; n++) { + static_dtree[n].Len = 5; + static_dtree[n].Code = bi_reverse((unsigned)n, 5); + } + static_init_done = 1; + +# ifdef GEN_TREES_H + gen_trees_header(); +# endif +#endif /* defined(GEN_TREES_H) || !defined(STDC) */ +} + +/* =========================================================================== + * Generate the file trees.h describing the static trees. + */ +#ifdef GEN_TREES_H +# ifndef ZLIB_DEBUG +# include +# endif + +# define SEPARATOR(i, last, width) \ + ((i) == (last)? "\n};\n\n" : \ + ((i) % (width) == (width) - 1 ? ",\n" : ", ")) + +void gen_trees_header(void) { + FILE *header = fopen("trees.h", "w"); + int i; + + Assert (header != NULL, "Can't open trees.h"); + fprintf(header, + "/* header created automatically with -DGEN_TREES_H */\n\n"); + + fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n"); + for (i = 0; i < L_CODES+2; i++) { + fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code, + static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5)); + } + + fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n"); + for (i = 0; i < D_CODES; i++) { + fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code, + static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5)); + } + + fprintf(header, "const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {\n"); + for (i = 0; i < DIST_CODE_LEN; i++) { + fprintf(header, "%2u%s", _dist_code[i], + SEPARATOR(i, DIST_CODE_LEN-1, 20)); + } + + fprintf(header, + "const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); + for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) { + fprintf(header, "%2u%s", _length_code[i], + SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20)); + } + + fprintf(header, "local const int base_length[LENGTH_CODES] = {\n"); + for (i = 0; i < LENGTH_CODES; i++) { + fprintf(header, "%1u%s", base_length[i], + SEPARATOR(i, LENGTH_CODES-1, 20)); + } + + fprintf(header, "local const int base_dist[D_CODES] = {\n"); + for (i = 0; i < D_CODES; i++) { + fprintf(header, "%5u%s", base_dist[i], + SEPARATOR(i, D_CODES-1, 10)); + } + + fclose(header); +} +#endif /* GEN_TREES_H */ + +/* =========================================================================== + * Initialize a new block. + */ +local void init_block(deflate_state *s) { + int n; /* iterates over tree elements */ + + /* Initialize the trees. */ + for (n = 0; n < L_CODES; n++) s->dyn_ltree[n].Freq = 0; + for (n = 0; n < D_CODES; n++) s->dyn_dtree[n].Freq = 0; + for (n = 0; n < BL_CODES; n++) s->bl_tree[n].Freq = 0; + + s->dyn_ltree[END_BLOCK].Freq = 1; + s->opt_len = s->static_len = 0L; + s->sym_next = s->matches = 0; +} + +/* =========================================================================== + * Initialize the tree data structures for a new zlib stream. + */ +void ZLIB_INTERNAL _tr_init(deflate_state *s) { + tr_static_init(); + + s->l_desc.dyn_tree = s->dyn_ltree; + s->l_desc.stat_desc = &static_l_desc; + + s->d_desc.dyn_tree = s->dyn_dtree; + s->d_desc.stat_desc = &static_d_desc; + + s->bl_desc.dyn_tree = s->bl_tree; + s->bl_desc.stat_desc = &static_bl_desc; + + s->bi_buf = 0; + s->bi_valid = 0; +#ifdef ZLIB_DEBUG + s->compressed_len = 0L; + s->bits_sent = 0L; +#endif + + /* Initialize the first block of the first file: */ + init_block(s); +} + +#define SMALLEST 1 +/* Index within the heap array of least frequent node in the Huffman tree */ + + +/* =========================================================================== + * Remove the smallest element from the heap and recreate the heap with + * one less element. Updates heap and heap_len. + */ +#define pqremove(s, tree, top) \ +{\ + top = s->heap[SMALLEST]; \ + s->heap[SMALLEST] = s->heap[s->heap_len--]; \ + pqdownheap(s, tree, SMALLEST); \ +} + +/* =========================================================================== + * Compares to subtrees, using the tree depth as tie breaker when + * the subtrees have equal frequency. This minimizes the worst case length. + */ +#define smaller(tree, n, m, depth) \ + (tree[n].Freq < tree[m].Freq || \ + (tree[n].Freq == tree[m].Freq && depth[n] <= depth[m])) + +/* =========================================================================== + * Restore the heap property by moving down the tree starting at node k, + * exchanging a node with the smallest of its two sons if necessary, stopping + * when the heap property is re-established (each father smaller than its + * two sons). + */ +local void pqdownheap(deflate_state *s, ct_data *tree, int k) { + int v = s->heap[k]; + int j = k << 1; /* left son of k */ + while (j <= s->heap_len) { + /* Set j to the smallest of the two sons: */ + if (j < s->heap_len && + smaller(tree, s->heap[j + 1], s->heap[j], s->depth)) { + j++; + } + /* Exit if v is smaller than both sons */ + if (smaller(tree, v, s->heap[j], s->depth)) break; + + /* Exchange v with the smallest son */ + s->heap[k] = s->heap[j]; k = j; + + /* And continue down the tree, setting j to the left son of k */ + j <<= 1; + } + s->heap[k] = v; +} + +/* =========================================================================== + * Compute the optimal bit lengths for a tree and update the total bit length + * for the current block. + * IN assertion: the fields freq and dad are set, heap[heap_max] and + * above are the tree nodes sorted by increasing frequency. + * OUT assertions: the field len is set to the optimal bit length, the + * array bl_count contains the frequencies for each bit length. + * The length opt_len is updated; static_len is also updated if stree is + * not null. + */ +local void gen_bitlen(deflate_state *s, tree_desc *desc) { + ct_data *tree = desc->dyn_tree; + int max_code = desc->max_code; + const ct_data *stree = desc->stat_desc->static_tree; + const intf *extra = desc->stat_desc->extra_bits; + int base = desc->stat_desc->extra_base; + int max_length = desc->stat_desc->max_length; + int h; /* heap index */ + int n, m; /* iterate over the tree elements */ + int bits; /* bit length */ + int xbits; /* extra bits */ + ush f; /* frequency */ + int overflow = 0; /* number of elements with bit length too large */ + + for (bits = 0; bits <= MAX_BITS; bits++) s->bl_count[bits] = 0; + + /* In a first pass, compute the optimal bit lengths (which may + * overflow in the case of the bit length tree). + */ + tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ + + for (h = s->heap_max + 1; h < HEAP_SIZE; h++) { + n = s->heap[h]; + bits = tree[tree[n].Dad].Len + 1; + if (bits > max_length) bits = max_length, overflow++; + tree[n].Len = (ush)bits; + /* We overwrite tree[n].Dad which is no longer needed */ + + if (n > max_code) continue; /* not a leaf node */ + + s->bl_count[bits]++; + xbits = 0; + if (n >= base) xbits = extra[n - base]; + f = tree[n].Freq; + s->opt_len += (ulg)f * (unsigned)(bits + xbits); + if (stree) s->static_len += (ulg)f * (unsigned)(stree[n].Len + xbits); + } + if (overflow == 0) return; + + Tracev((stderr,"\nbit length overflow\n")); + /* This happens for example on obj2 and pic of the Calgary corpus */ + + /* Find the first bit length which could increase: */ + do { + bits = max_length - 1; + while (s->bl_count[bits] == 0) bits--; + s->bl_count[bits]--; /* move one leaf down the tree */ + s->bl_count[bits + 1] += 2; /* move one overflow item as its brother */ + s->bl_count[max_length]--; + /* The brother of the overflow item also moves one step up, + * but this does not affect bl_count[max_length] + */ + overflow -= 2; + } while (overflow > 0); + + /* Now recompute all bit lengths, scanning in increasing frequency. + * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all + * lengths instead of fixing only the wrong ones. This idea is taken + * from 'ar' written by Haruhiko Okumura.) + */ + for (bits = max_length; bits != 0; bits--) { + n = s->bl_count[bits]; + while (n != 0) { + m = s->heap[--h]; + if (m > max_code) continue; + if ((unsigned) tree[m].Len != (unsigned) bits) { + Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq; + tree[m].Len = (ush)bits; + } + n--; + } + } +} + +#ifdef DUMP_BL_TREE +# include +#endif + +/* =========================================================================== + * Construct one Huffman tree and assigns the code bit strings and lengths. + * Update the total bit length for the current block. + * IN assertion: the field freq is set for all tree elements. + * OUT assertions: the fields len and code are set to the optimal bit length + * and corresponding code. The length opt_len is updated; static_len is + * also updated if stree is not null. The field max_code is set. + */ +local void build_tree(deflate_state *s, tree_desc *desc) { + ct_data *tree = desc->dyn_tree; + const ct_data *stree = desc->stat_desc->static_tree; + int elems = desc->stat_desc->elems; + int n, m; /* iterate over heap elements */ + int max_code = -1; /* largest code with non zero frequency */ + int node; /* new node being created */ + + /* Construct the initial heap, with least frequent element in + * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n + 1]. + * heap[0] is not used. + */ + s->heap_len = 0, s->heap_max = HEAP_SIZE; + + for (n = 0; n < elems; n++) { + if (tree[n].Freq != 0) { + s->heap[++(s->heap_len)] = max_code = n; + s->depth[n] = 0; + } else { + tree[n].Len = 0; + } + } + + /* The pkzip format requires that at least one distance code exists, + * and that at least one bit should be sent even if there is only one + * possible code. So to avoid special checks later on we force at least + * two codes of non zero frequency. + */ + while (s->heap_len < 2) { + node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0); + tree[node].Freq = 1; + s->depth[node] = 0; + s->opt_len--; if (stree) s->static_len -= stree[node].Len; + /* node is 0 or 1 so it does not have extra bits */ + } + desc->max_code = max_code; + + /* The elements heap[heap_len/2 + 1 .. heap_len] are leaves of the tree, + * establish sub-heaps of increasing lengths: + */ + for (n = s->heap_len/2; n >= 1; n--) pqdownheap(s, tree, n); + + /* Construct the Huffman tree by repeatedly combining the least two + * frequent nodes. + */ + node = elems; /* next internal node of the tree */ + do { + pqremove(s, tree, n); /* n = node of least frequency */ + m = s->heap[SMALLEST]; /* m = node of next least frequency */ + + s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */ + s->heap[--(s->heap_max)] = m; + + /* Create a new node father of n and m */ + tree[node].Freq = tree[n].Freq + tree[m].Freq; + s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ? + s->depth[n] : s->depth[m]) + 1); + tree[n].Dad = tree[m].Dad = (ush)node; +#ifdef DUMP_BL_TREE + if (tree == s->bl_tree) { + fprintf(stderr,"\nnode %d(%d), sons %d(%d) %d(%d)", + node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq); + } +#endif + /* and insert the new node in the heap */ + s->heap[SMALLEST] = node++; + pqdownheap(s, tree, SMALLEST); + + } while (s->heap_len >= 2); + + s->heap[--(s->heap_max)] = s->heap[SMALLEST]; + + /* At this point, the fields freq and dad are set. We can now + * generate the bit lengths. + */ + gen_bitlen(s, (tree_desc *)desc); + + /* The field len is now set, we can generate the bit codes */ + gen_codes ((ct_data *)tree, max_code, s->bl_count); +} + +/* =========================================================================== + * Scan a literal or distance tree to determine the frequencies of the codes + * in the bit length tree. + */ +local void scan_tree(deflate_state *s, ct_data *tree, int max_code) { + int n; /* iterates over all tree elements */ + int prevlen = -1; /* last emitted length */ + int curlen; /* length of current code */ + int nextlen = tree[0].Len; /* length of next code */ + int count = 0; /* repeat count of the current code */ + int max_count = 7; /* max repeat count */ + int min_count = 4; /* min repeat count */ + + if (nextlen == 0) max_count = 138, min_count = 3; + tree[max_code + 1].Len = (ush)0xffff; /* guard */ + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; nextlen = tree[n + 1].Len; + if (++count < max_count && curlen == nextlen) { + continue; + } else if (count < min_count) { + s->bl_tree[curlen].Freq += count; + } else if (curlen != 0) { + if (curlen != prevlen) s->bl_tree[curlen].Freq++; + s->bl_tree[REP_3_6].Freq++; + } else if (count <= 10) { + s->bl_tree[REPZ_3_10].Freq++; + } else { + s->bl_tree[REPZ_11_138].Freq++; + } + count = 0; prevlen = curlen; + if (nextlen == 0) { + max_count = 138, min_count = 3; + } else if (curlen == nextlen) { + max_count = 6, min_count = 3; + } else { + max_count = 7, min_count = 4; + } + } +} + +/* =========================================================================== + * Send a literal or distance tree in compressed form, using the codes in + * bl_tree. + */ +local void send_tree(deflate_state *s, ct_data *tree, int max_code) { + int n; /* iterates over all tree elements */ + int prevlen = -1; /* last emitted length */ + int curlen; /* length of current code */ + int nextlen = tree[0].Len; /* length of next code */ + int count = 0; /* repeat count of the current code */ + int max_count = 7; /* max repeat count */ + int min_count = 4; /* min repeat count */ + + /* tree[max_code + 1].Len = -1; */ /* guard already set */ + if (nextlen == 0) max_count = 138, min_count = 3; + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; nextlen = tree[n + 1].Len; + if (++count < max_count && curlen == nextlen) { + continue; + } else if (count < min_count) { + do { send_code(s, curlen, s->bl_tree); } while (--count != 0); + + } else if (curlen != 0) { + if (curlen != prevlen) { + send_code(s, curlen, s->bl_tree); count--; + } + Assert(count >= 3 && count <= 6, " 3_6?"); + send_code(s, REP_3_6, s->bl_tree); send_bits(s, count - 3, 2); + + } else if (count <= 10) { + send_code(s, REPZ_3_10, s->bl_tree); send_bits(s, count - 3, 3); + + } else { + send_code(s, REPZ_11_138, s->bl_tree); send_bits(s, count - 11, 7); + } + count = 0; prevlen = curlen; + if (nextlen == 0) { + max_count = 138, min_count = 3; + } else if (curlen == nextlen) { + max_count = 6, min_count = 3; + } else { + max_count = 7, min_count = 4; + } + } +} + +/* =========================================================================== + * Construct the Huffman tree for the bit lengths and return the index in + * bl_order of the last bit length code to send. + */ +local int build_bl_tree(deflate_state *s) { + int max_blindex; /* index of last bit length code of non zero freq */ + + /* Determine the bit length frequencies for literal and distance trees */ + scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code); + scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc.max_code); + + /* Build the bit length tree: */ + build_tree(s, (tree_desc *)(&(s->bl_desc))); + /* opt_len now includes the length of the tree representations, except the + * lengths of the bit lengths codes and the 5 + 5 + 4 bits for the counts. + */ + + /* Determine the number of bit length codes to send. The pkzip format + * requires that at least 4 bit length codes be sent. (appnote.txt says + * 3 but the actual value used is 4.) + */ + for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { + if (s->bl_tree[bl_order[max_blindex]].Len != 0) break; + } + /* Update opt_len to include the bit length tree and counts */ + s->opt_len += 3*((ulg)max_blindex + 1) + 5 + 5 + 4; + Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", + s->opt_len, s->static_len)); + + return max_blindex; +} + +/* =========================================================================== + * Send the header for a block using dynamic Huffman trees: the counts, the + * lengths of the bit length codes, the literal tree and the distance tree. + * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + */ +local void send_all_trees(deflate_state *s, int lcodes, int dcodes, + int blcodes) { + int rank; /* index in bl_order */ + + Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); + Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, + "too many codes"); + Tracev((stderr, "\nbl counts: ")); + send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ + send_bits(s, dcodes - 1, 5); + send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ + for (rank = 0; rank < blcodes; rank++) { + Tracev((stderr, "\nbl code %2d ", bl_order[rank])); + send_bits(s, s->bl_tree[bl_order[rank]].Len, 3); + } + Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); + + send_tree(s, (ct_data *)s->dyn_ltree, lcodes - 1); /* literal tree */ + Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); + + send_tree(s, (ct_data *)s->dyn_dtree, dcodes - 1); /* distance tree */ + Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); +} + +/* =========================================================================== + * Send a stored block + */ +void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf, + ulg stored_len, int last) { + send_bits(s, (STORED_BLOCK<<1) + last, 3); /* send block type */ + bi_windup(s); /* align on byte boundary */ + put_short(s, (ush)stored_len); + put_short(s, (ush)~stored_len); + if (stored_len) + zmemcpy(s->pending_buf + s->pending, (Bytef *)buf, stored_len); + s->pending += stored_len; +#ifdef ZLIB_DEBUG + s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; + s->compressed_len += (stored_len + 4) << 3; + s->bits_sent += 2*16; + s->bits_sent += stored_len << 3; +#endif +} + +/* =========================================================================== + * Flush the bits in the bit buffer to pending output (leaves at most 7 bits) + */ +void ZLIB_INTERNAL _tr_flush_bits(deflate_state *s) { + bi_flush(s); +} + +/* =========================================================================== + * Send one empty static block to give enough lookahead for inflate. + * This takes 10 bits, of which 7 may remain in the bit buffer. + */ +void ZLIB_INTERNAL _tr_align(deflate_state *s) { + send_bits(s, STATIC_TREES<<1, 3); + send_code(s, END_BLOCK, static_ltree); +#ifdef ZLIB_DEBUG + s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ +#endif + bi_flush(s); +} + +/* =========================================================================== + * Send the block data compressed using the given Huffman trees + */ +local void compress_block(deflate_state *s, const ct_data *ltree, + const ct_data *dtree) { + unsigned dist; /* distance of matched string */ + int lc; /* match length or unmatched char (if dist == 0) */ + unsigned sx = 0; /* running index in symbol buffers */ + unsigned code; /* the code to send */ + int extra; /* number of extra bits to send */ + + if (s->sym_next != 0) do { +#ifdef LIT_MEM + dist = s->d_buf[sx]; + lc = s->l_buf[sx++]; +#else + dist = s->sym_buf[sx++] & 0xff; + dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8; + lc = s->sym_buf[sx++]; +#endif + if (dist == 0) { + send_code(s, lc, ltree); /* send a literal byte */ + Tracecv(isgraph(lc), (stderr," '%c' ", lc)); + } else { + /* Here, lc is the match length - MIN_MATCH */ + code = _length_code[lc]; + send_code(s, code + LITERALS + 1, ltree); /* send length code */ + extra = extra_lbits[code]; + if (extra != 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); /* send the extra length bits */ + } + dist--; /* dist is now the match distance - 1 */ + code = d_code(dist); + Assert (code < D_CODES, "bad d_code"); + + send_code(s, code, dtree); /* send the distance code */ + extra = extra_dbits[code]; + if (extra != 0) { + dist -= (unsigned)base_dist[code]; + send_bits(s, dist, extra); /* send the extra distance bits */ + } + } /* literal or match pair ? */ + + /* Check for no overlay of pending_buf on needed symbols */ +#ifdef LIT_MEM + Assert(s->pending < 2 * (s->lit_bufsize + sx), "pendingBuf overflow"); +#else + Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow"); +#endif + + } while (sx < s->sym_next); + + send_code(s, END_BLOCK, ltree); +} + +/* =========================================================================== + * Check if the data type is TEXT or BINARY, using the following algorithm: + * - TEXT if the two conditions below are satisfied: + * a) There are no non-portable control characters belonging to the + * "block list" (0..6, 14..25, 28..31). + * b) There is at least one printable character belonging to the + * "allow list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). + * - BINARY otherwise. + * - The following partially-portable control characters form a + * "gray list" that is ignored in this detection algorithm: + * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). + * IN assertion: the fields Freq of dyn_ltree are set. + */ +local int detect_data_type(deflate_state *s) { + /* block_mask is the bit mask of block-listed bytes + * set bits 0..6, 14..25, and 28..31 + * 0xf3ffc07f = binary 11110011111111111100000001111111 + */ + unsigned long block_mask = 0xf3ffc07fUL; + int n; + + /* Check for non-textual ("block-listed") bytes. */ + for (n = 0; n <= 31; n++, block_mask >>= 1) + if ((block_mask & 1) && (s->dyn_ltree[n].Freq != 0)) + return Z_BINARY; + + /* Check for textual ("allow-listed") bytes. */ + if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0 + || s->dyn_ltree[13].Freq != 0) + return Z_TEXT; + for (n = 32; n < LITERALS; n++) + if (s->dyn_ltree[n].Freq != 0) + return Z_TEXT; + + /* There are no "block-listed" or "allow-listed" bytes: + * this stream either is empty or has tolerated ("gray-listed") bytes only. + */ + return Z_BINARY; +} + +/* =========================================================================== + * Determine the best encoding for the current block: dynamic trees, static + * trees or store, and write out the encoded block. + */ +void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, + ulg stored_len, int last) { + ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */ + int max_blindex = 0; /* index of last bit length code of non zero freq */ + + /* Build the Huffman trees unless a stored block is forced */ + if (s->level > 0) { + + /* Check if the file is binary or text */ + if (s->strm->data_type == Z_UNKNOWN) + s->strm->data_type = detect_data_type(s); + + /* Construct the literal and distance trees */ + build_tree(s, (tree_desc *)(&(s->l_desc))); + Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, + s->static_len)); + + build_tree(s, (tree_desc *)(&(s->d_desc))); + Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, + s->static_len)); + /* At this point, opt_len and static_len are the total bit lengths of + * the compressed block data, excluding the tree representations. + */ + + /* Build the bit length tree for the above two trees, and get the index + * in bl_order of the last bit length code to send. + */ + max_blindex = build_bl_tree(s); + + /* Determine the best encoding. Compute the block lengths in bytes. */ + opt_lenb = (s->opt_len + 3 + 7) >> 3; + static_lenb = (s->static_len + 3 + 7) >> 3; + + Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", + opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, + s->sym_next / 3)); + +#ifndef FORCE_STATIC + if (static_lenb <= opt_lenb || s->strategy == Z_FIXED) +#endif + opt_lenb = static_lenb; + + } else { + Assert(buf != (char*)0, "lost buf"); + opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ + } + +#ifdef FORCE_STORED + if (buf != (char*)0) { /* force stored block */ +#else + if (stored_len + 4 <= opt_lenb && buf != (char*)0) { + /* 4: two words for the lengths */ +#endif + /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. + * Otherwise we can't have processed more than WSIZE input bytes since + * the last block flush, because compression would have been + * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to + * transform a block into a stored block. + */ + _tr_stored_block(s, buf, stored_len, last); + + } else if (static_lenb == opt_lenb) { + send_bits(s, (STATIC_TREES<<1) + last, 3); + compress_block(s, (const ct_data *)static_ltree, + (const ct_data *)static_dtree); +#ifdef ZLIB_DEBUG + s->compressed_len += 3 + s->static_len; +#endif + } else { + send_bits(s, (DYN_TREES<<1) + last, 3); + send_all_trees(s, s->l_desc.max_code + 1, s->d_desc.max_code + 1, + max_blindex + 1); + compress_block(s, (const ct_data *)s->dyn_ltree, + (const ct_data *)s->dyn_dtree); +#ifdef ZLIB_DEBUG + s->compressed_len += 3 + s->opt_len; +#endif + } + Assert (s->compressed_len == s->bits_sent, "bad compressed size"); + /* The above check is made mod 2^32, for files larger than 512 MB + * and uLong implemented on 32 bits. + */ + init_block(s); + + if (last) { + bi_windup(s); +#ifdef ZLIB_DEBUG + s->compressed_len += 7; /* align on byte boundary */ +#endif + } + Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len >> 3, + s->compressed_len - 7*last)); +} + +/* =========================================================================== + * Save the match info and tally the frequency counts. Return true if + * the current block must be flushed. + */ +int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc) { +#ifdef LIT_MEM + s->d_buf[s->sym_next] = (ush)dist; + s->l_buf[s->sym_next++] = (uch)lc; +#else + s->sym_buf[s->sym_next++] = (uch)dist; + s->sym_buf[s->sym_next++] = (uch)(dist >> 8); + s->sym_buf[s->sym_next++] = (uch)lc; +#endif + if (dist == 0) { + /* lc is the unmatched char */ + s->dyn_ltree[lc].Freq++; + } else { + s->matches++; + /* Here, lc is the match length - MIN_MATCH */ + dist--; /* dist = match distance - 1 */ + Assert((ush)dist < (ush)MAX_DIST(s) && + (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && + (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); + + s->dyn_ltree[_length_code[lc] + LITERALS + 1].Freq++; + s->dyn_dtree[d_code(dist)].Freq++; + } + return (s->sym_next == s->sym_end); +} diff --git a/widget/milsko/milskosrc/external/libz/src/uncompr.c b/widget/milsko/milskosrc/external/libz/src/uncompr.c new file mode 100644 index 0000000000..5e256663b4 --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/src/uncompr.c @@ -0,0 +1,85 @@ +/* uncompr.c -- decompress a memory buffer + * Copyright (C) 1995-2003, 2010, 2014, 2016 Jean-loup Gailly, Mark Adler + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#define ZLIB_INTERNAL +#include "zlib.h" + +/* =========================================================================== + Decompresses the source buffer into the destination buffer. *sourceLen is + the byte length of the source buffer. Upon entry, *destLen is the total size + of the destination buffer, which must be large enough to hold the entire + uncompressed data. (The size of the uncompressed data must have been saved + previously by the compressor and transmitted to the decompressor by some + mechanism outside the scope of this compression library.) Upon exit, + *destLen is the size of the decompressed data and *sourceLen is the number + of source bytes consumed. Upon return, source + *sourceLen points to the + first unused input byte. + + uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, or + Z_DATA_ERROR if the input data was corrupted, including if the input data is + an incomplete zlib stream. +*/ +int ZEXPORT uncompress2(Bytef *dest, uLongf *destLen, const Bytef *source, + uLong *sourceLen) { + z_stream stream; + int err; + const uInt max = (uInt)-1; + uLong len, left; + Byte buf[1]; /* for detection of incomplete stream when *destLen == 0 */ + + len = *sourceLen; + if (*destLen) { + left = *destLen; + *destLen = 0; + } + else { + left = 1; + dest = buf; + } + + stream.next_in = (z_const Bytef *)source; + stream.avail_in = 0; + stream.zalloc = (alloc_func)0; + stream.zfree = (free_func)0; + stream.opaque = (voidpf)0; + + err = inflateInit(&stream); + if (err != Z_OK) return err; + + stream.next_out = dest; + stream.avail_out = 0; + + do { + if (stream.avail_out == 0) { + stream.avail_out = left > (uLong)max ? max : (uInt)left; + left -= stream.avail_out; + } + if (stream.avail_in == 0) { + stream.avail_in = len > (uLong)max ? max : (uInt)len; + len -= stream.avail_in; + } + err = inflate(&stream, Z_NO_FLUSH); + } while (err == Z_OK); + + *sourceLen -= len + stream.avail_in; + if (dest != buf) + *destLen = stream.total_out; + else if (stream.total_out && err == Z_BUF_ERROR) + left = 1; + + inflateEnd(&stream); + return err == Z_STREAM_END ? Z_OK : + err == Z_NEED_DICT ? Z_DATA_ERROR : + err == Z_BUF_ERROR && left + stream.avail_out ? Z_DATA_ERROR : + err; +} + +int ZEXPORT uncompress(Bytef *dest, uLongf *destLen, const Bytef *source, + uLong sourceLen) { + return uncompress2(dest, destLen, source, &sourceLen); +} diff --git a/widget/milsko/milskosrc/external/libz/src/zutil.c b/widget/milsko/milskosrc/external/libz/src/zutil.c new file mode 100644 index 0000000000..b1c5d2d3c6 --- /dev/null +++ b/widget/milsko/milskosrc/external/libz/src/zutil.c @@ -0,0 +1,299 @@ +/* zutil.c -- target dependent utility functions for the compression library + * Copyright (C) 1995-2017 Jean-loup Gailly + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id$ */ + +#include "zutil.h" +#ifndef Z_SOLO +# include "gzguts.h" +#endif + +z_const char * const z_errmsg[10] = { + (z_const char *)"need dictionary", /* Z_NEED_DICT 2 */ + (z_const char *)"stream end", /* Z_STREAM_END 1 */ + (z_const char *)"", /* Z_OK 0 */ + (z_const char *)"file error", /* Z_ERRNO (-1) */ + (z_const char *)"stream error", /* Z_STREAM_ERROR (-2) */ + (z_const char *)"data error", /* Z_DATA_ERROR (-3) */ + (z_const char *)"insufficient memory", /* Z_MEM_ERROR (-4) */ + (z_const char *)"buffer error", /* Z_BUF_ERROR (-5) */ + (z_const char *)"incompatible version",/* Z_VERSION_ERROR (-6) */ + (z_const char *)"" +}; + + +const char * ZEXPORT zlibVersion(void) { + return ZLIB_VERSION; +} + +uLong ZEXPORT zlibCompileFlags(void) { + uLong flags; + + flags = 0; + switch ((int)(sizeof(uInt))) { + case 2: break; + case 4: flags += 1; break; + case 8: flags += 2; break; + default: flags += 3; + } + switch ((int)(sizeof(uLong))) { + case 2: break; + case 4: flags += 1 << 2; break; + case 8: flags += 2 << 2; break; + default: flags += 3 << 2; + } + switch ((int)(sizeof(voidpf))) { + case 2: break; + case 4: flags += 1 << 4; break; + case 8: flags += 2 << 4; break; + default: flags += 3 << 4; + } + switch ((int)(sizeof(z_off_t))) { + case 2: break; + case 4: flags += 1 << 6; break; + case 8: flags += 2 << 6; break; + default: flags += 3 << 6; + } +#ifdef ZLIB_DEBUG + flags += 1 << 8; +#endif + /* +#if defined(ASMV) || defined(ASMINF) + flags += 1 << 9; +#endif + */ +#ifdef ZLIB_WINAPI + flags += 1 << 10; +#endif +#ifdef BUILDFIXED + flags += 1 << 12; +#endif +#ifdef DYNAMIC_CRC_TABLE + flags += 1 << 13; +#endif +#ifdef NO_GZCOMPRESS + flags += 1L << 16; +#endif +#ifdef NO_GZIP + flags += 1L << 17; +#endif +#ifdef PKZIP_BUG_WORKAROUND + flags += 1L << 20; +#endif +#ifdef FASTEST + flags += 1L << 21; +#endif +#if defined(STDC) || defined(Z_HAVE_STDARG_H) +# ifdef NO_vsnprintf + flags += 1L << 25; +# ifdef HAS_vsprintf_void + flags += 1L << 26; +# endif +# else +# ifdef HAS_vsnprintf_void + flags += 1L << 26; +# endif +# endif +#else + flags += 1L << 24; +# ifdef NO_snprintf + flags += 1L << 25; +# ifdef HAS_sprintf_void + flags += 1L << 26; +# endif +# else +# ifdef HAS_snprintf_void + flags += 1L << 26; +# endif +# endif +#endif + return flags; +} + +#ifdef ZLIB_DEBUG +#include +# ifndef verbose +# define verbose 0 +# endif +int ZLIB_INTERNAL z_verbose = verbose; + +void ZLIB_INTERNAL z_error(char *m) { + fprintf(stderr, "%s\n", m); + exit(1); +} +#endif + +/* exported to allow conversion of error code to string for compress() and + * uncompress() + */ +const char * ZEXPORT zError(int err) { + return ERR_MSG(err); +} + +#if defined(_WIN32_WCE) && _WIN32_WCE < 0x800 + /* The older Microsoft C Run-Time Library for Windows CE doesn't have + * errno. We define it as a global variable to simplify porting. + * Its value is always 0 and should not be used. + */ + int errno = 0; +#endif + +#ifndef HAVE_MEMCPY + +void ZLIB_INTERNAL zmemcpy(Bytef* dest, const Bytef* source, uInt len) { + if (len == 0) return; + do { + *dest++ = *source++; /* ??? to be unrolled */ + } while (--len != 0); +} + +int ZLIB_INTERNAL zmemcmp(const Bytef* s1, const Bytef* s2, uInt len) { + uInt j; + + for (j = 0; j < len; j++) { + if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1; + } + return 0; +} + +void ZLIB_INTERNAL zmemzero(Bytef* dest, uInt len) { + if (len == 0) return; + do { + *dest++ = 0; /* ??? to be unrolled */ + } while (--len != 0); +} +#endif + +#ifndef Z_SOLO + +#ifdef SYS16BIT + +#ifdef __TURBOC__ +/* Turbo C in 16-bit mode */ + +# define MY_ZCALLOC + +/* Turbo C malloc() does not allow dynamic allocation of 64K bytes + * and farmalloc(64K) returns a pointer with an offset of 8, so we + * must fix the pointer. Warning: the pointer must be put back to its + * original form in order to free it, use zcfree(). + */ + +#define MAX_PTR 10 +/* 10*64K = 640K */ + +local int next_ptr = 0; + +typedef struct ptr_table_s { + voidpf org_ptr; + voidpf new_ptr; +} ptr_table; + +local ptr_table table[MAX_PTR]; +/* This table is used to remember the original form of pointers + * to large buffers (64K). Such pointers are normalized with a zero offset. + * Since MSDOS is not a preemptive multitasking OS, this table is not + * protected from concurrent access. This hack doesn't work anyway on + * a protected system like OS/2. Use Microsoft C instead. + */ + +voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) { + voidpf buf; + ulg bsize = (ulg)items*size; + + (void)opaque; + + /* If we allocate less than 65520 bytes, we assume that farmalloc + * will return a usable pointer which doesn't have to be normalized. + */ + if (bsize < 65520L) { + buf = farmalloc(bsize); + if (*(ush*)&buf != 0) return buf; + } else { + buf = farmalloc(bsize + 16L); + } + if (buf == NULL || next_ptr >= MAX_PTR) return NULL; + table[next_ptr].org_ptr = buf; + + /* Normalize the pointer to seg:0 */ + *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4; + *(ush*)&buf = 0; + table[next_ptr++].new_ptr = buf; + return buf; +} + +void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) { + int n; + + (void)opaque; + + if (*(ush*)&ptr != 0) { /* object < 64K */ + farfree(ptr); + return; + } + /* Find the original pointer */ + for (n = 0; n < next_ptr; n++) { + if (ptr != table[n].new_ptr) continue; + + farfree(table[n].org_ptr); + while (++n < next_ptr) { + table[n-1] = table[n]; + } + next_ptr--; + return; + } + Assert(0, "zcfree: ptr not found"); +} + +#endif /* __TURBOC__ */ + + +#ifdef M_I86 +/* Microsoft C in 16-bit mode */ + +# define MY_ZCALLOC + +#if (!defined(_MSC_VER) || (_MSC_VER <= 600)) +# define _halloc halloc +# define _hfree hfree +#endif + +voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, uInt items, uInt size) { + (void)opaque; + return _halloc((long)items, size); +} + +void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) { + (void)opaque; + _hfree(ptr); +} + +#endif /* M_I86 */ + +#endif /* SYS16BIT */ + + +#ifndef MY_ZCALLOC /* Any system without a special alloc function */ + +#ifndef STDC +extern voidp malloc(uInt size); +extern voidp calloc(uInt items, uInt size); +extern void free(voidpf ptr); +#endif + +voidpf ZLIB_INTERNAL zcalloc(voidpf opaque, unsigned items, unsigned size) { + (void)opaque; + return sizeof(uInt) > 2 ? (voidpf)malloc(items * size) : + (voidpf)calloc(items, size); +} + +void ZLIB_INTERNAL zcfree(voidpf opaque, voidpf ptr) { + (void)opaque; + free(ptr); +} + +#endif /* MY_ZCALLOC */ + +#endif /* !Z_SOLO */ diff --git a/widget/milsko/milskosrc/external/stb_ds.c b/widget/milsko/milskosrc/external/stb_ds.c new file mode 100644 index 0000000000..9df32fd7b7 --- /dev/null +++ b/widget/milsko/milskosrc/external/stb_ds.c @@ -0,0 +1,2 @@ +#define STB_DS_IMPLEMENTATION +#include "stb_ds.h" diff --git a/widget/milsko/milskosrc/external/stb_ds.h b/widget/milsko/milskosrc/external/stb_ds.h new file mode 100644 index 0000000000..e84c82d1d5 --- /dev/null +++ b/widget/milsko/milskosrc/external/stb_ds.h @@ -0,0 +1,1895 @@ +/* stb_ds.h - v0.67 - public domain data structures - Sean Barrett 2019 + + This is a single-header-file library that provides easy-to-use + dynamic arrays and hash tables for C (also works in C++). + + For a gentle introduction: + http://nothings.org/stb_ds + + To use this library, do this in *one* C or C++ file: + #define STB_DS_IMPLEMENTATION + #include "stb_ds.h" + +TABLE OF CONTENTS + + Table of Contents + Compile-time options + License + Documentation + Notes + Notes - Dynamic arrays + Notes - Hash maps + Credits + +COMPILE-TIME OPTIONS + + #define STBDS_NO_SHORT_NAMES + + This flag needs to be set globally. + + By default stb_ds exposes shorter function names that are not qualified + with the "stbds_" prefix. If these names conflict with the names in your + code, define this flag. + + #define STBDS_SIPHASH_2_4 + + This flag only needs to be set in the file containing #define STB_DS_IMPLEMENTATION. + + By default stb_ds.h hashes using a weaker variant of SipHash and a custom hash for + 4- and 8-byte keys. On 64-bit platforms, you can define the above flag to force + stb_ds.h to use specification-compliant SipHash-2-4 for all keys. Doing so makes + hash table insertion about 20% slower on 4- and 8-byte keys, 5% slower on + 64-byte keys, and 10% slower on 256-byte keys on my test computer. + + #define STBDS_REALLOC(context,ptr,size) better_realloc + #define STBDS_FREE(context,ptr) better_free + + These defines only need to be set in the file containing #define STB_DS_IMPLEMENTATION. + + By default stb_ds uses stdlib realloc() and free() for memory management. You can + substitute your own functions instead by defining these symbols. You must either + define both, or neither. Note that at the moment, 'context' will always be NULL. + @TODO add an array/hash initialization function that takes a memory context pointer. + + #define STBDS_UNIT_TESTS + + Defines a function stbds_unit_tests() that checks the functioning of the data structures. + + Note that on older versions of gcc (e.g. 5.x.x) you may need to build with '-std=c++0x' + (or equivalentally '-std=c++11') when using anonymous structures as seen on the web + page or in STBDS_UNIT_TESTS. + +LICENSE + + Placed in the public domain and also MIT licensed. + See end of file for detailed license information. + +DOCUMENTATION + + Dynamic Arrays + + Non-function interface: + + Declare an empty dynamic array of type T + T* foo = NULL; + + Access the i'th item of a dynamic array 'foo' of type T, T* foo: + foo[i] + + Functions (actually macros) + + arrfree: + void arrfree(T*); + Frees the array. + + arrlen: + ptrdiff_t arrlen(T*); + Returns the number of elements in the array. + + arrlenu: + size_t arrlenu(T*); + Returns the number of elements in the array as an unsigned type. + + arrpop: + T arrpop(T* a) + Removes the final element of the array and returns it. + + arrput: + T arrput(T* a, T b); + Appends the item b to the end of array a. Returns b. + + arrins: + T arrins(T* a, int p, T b); + Inserts the item b into the middle of array a, into a[p], + moving the rest of the array over. Returns b. + + arrinsn: + void arrinsn(T* a, int p, int n); + Inserts n uninitialized items into array a starting at a[p], + moving the rest of the array over. + + arraddnptr: + T* arraddnptr(T* a, int n) + Appends n uninitialized items onto array at the end. + Returns a pointer to the first uninitialized item added. + + arraddnindex: + size_t arraddnindex(T* a, int n) + Appends n uninitialized items onto array at the end. + Returns the index of the first uninitialized item added. + + arrdel: + void arrdel(T* a, int p); + Deletes the element at a[p], moving the rest of the array over. + + arrdeln: + void arrdeln(T* a, int p, int n); + Deletes n elements starting at a[p], moving the rest of the array over. + + arrdelswap: + void arrdelswap(T* a, int p); + Deletes the element at a[p], replacing it with the element from + the end of the array. O(1) performance. + + arrsetlen: + void arrsetlen(T* a, int n); + Changes the length of the array to n. Allocates uninitialized + slots at the end if necessary. + + arrsetcap: + size_t arrsetcap(T* a, int n); + Sets the length of allocated storage to at least n. It will not + change the length of the array. + + arrcap: + size_t arrcap(T* a); + Returns the number of total elements the array can contain without + needing to be reallocated. + + Hash maps & String hash maps + + Given T is a structure type: struct { TK key; TV value; }. Note that some + functions do not require TV value and can have other fields. For string + hash maps, TK must be 'char *'. + + Special interface: + + stbds_rand_seed: + void stbds_rand_seed(size_t seed); + For security against adversarially chosen data, you should seed the + library with a strong random number. Or at least seed it with time(). + + stbds_hash_string: + size_t stbds_hash_string(char *str, size_t seed); + Returns a hash value for a string. + + stbds_hash_bytes: + size_t stbds_hash_bytes(void *p, size_t len, size_t seed); + These functions hash an arbitrary number of bytes. The function + uses a custom hash for 4- and 8-byte data, and a weakened version + of SipHash for everything else. On 64-bit platforms you can get + specification-compliant SipHash-2-4 on all data by defining + STBDS_SIPHASH_2_4, at a significant cost in speed. + + Non-function interface: + + Declare an empty hash map of type T + T* foo = NULL; + + Access the i'th entry in a hash table T* foo: + foo[i] + + Function interface (actually macros): + + hmfree + shfree + void hmfree(T*); + void shfree(T*); + Frees the hashmap and sets the pointer to NULL. + + hmlen + shlen + ptrdiff_t hmlen(T*) + ptrdiff_t shlen(T*) + Returns the number of elements in the hashmap. + + hmlenu + shlenu + size_t hmlenu(T*) + size_t shlenu(T*) + Returns the number of elements in the hashmap. + + hmgeti + shgeti + hmgeti_ts + ptrdiff_t hmgeti(T*, TK key) + ptrdiff_t shgeti(T*, char* key) + ptrdiff_t hmgeti_ts(T*, TK key, ptrdiff_t tempvar) + Returns the index in the hashmap which has the key 'key', or -1 + if the key is not present. + + hmget + hmget_ts + shget + TV hmget(T*, TK key) + TV shget(T*, char* key) + TV hmget_ts(T*, TK key, ptrdiff_t tempvar) + Returns the value corresponding to 'key' in the hashmap. + The structure must have a 'value' field + + hmgets + shgets + T hmgets(T*, TK key) + T shgets(T*, char* key) + Returns the structure corresponding to 'key' in the hashmap. + + hmgetp + shgetp + hmgetp_ts + hmgetp_null + shgetp_null + T* hmgetp(T*, TK key) + T* shgetp(T*, char* key) + T* hmgetp_ts(T*, TK key, ptrdiff_t tempvar) + T* hmgetp_null(T*, TK key) + T* shgetp_null(T*, char *key) + Returns a pointer to the structure corresponding to 'key' in + the hashmap. Functions ending in "_null" return NULL if the key + is not present in the hashmap; the others return a pointer to a + structure holding the default value (but not the searched-for key). + + hmdefault + shdefault + TV hmdefault(T*, TV value) + TV shdefault(T*, TV value) + Sets the default value for the hashmap, the value which will be + returned by hmget/shget if the key is not present. + + hmdefaults + shdefaults + TV hmdefaults(T*, T item) + TV shdefaults(T*, T item) + Sets the default struct for the hashmap, the contents which will be + returned by hmgets/shgets if the key is not present. + + hmput + shput + TV hmput(T*, TK key, TV value) + TV shput(T*, char* key, TV value) + Inserts a pair into the hashmap. If the key is already + present in the hashmap, updates its value. + + hmputs + shputs + T hmputs(T*, T item) + T shputs(T*, T item) + Inserts a struct with T.key into the hashmap. If the struct is already + present in the hashmap, updates it. + + hmdel + shdel + int hmdel(T*, TK key) + int shdel(T*, char* key) + If 'key' is in the hashmap, deletes its entry and returns 1. + Otherwise returns 0. + + Function interface (actually macros) for strings only: + + sh_new_strdup + void sh_new_strdup(T*); + Overwrites the existing pointer with a newly allocated + string hashmap which will automatically allocate and free + each string key using realloc/free + + sh_new_arena + void sh_new_arena(T*); + Overwrites the existing pointer with a newly allocated + string hashmap which will automatically allocate each string + key to a string arena. Every string key ever used by this + hash table remains in the arena until the arena is freed. + Additionally, any key which is deleted and reinserted will + be allocated multiple times in the string arena. + +NOTES + + * These data structures are realloc'd when they grow, and the macro + "functions" write to the provided pointer. This means: (a) the pointer + must be an lvalue, and (b) the pointer to the data structure is not + stable, and you must maintain it the same as you would a realloc'd + pointer. For example, if you pass a pointer to a dynamic array to a + function which updates it, the function must return back the new + pointer to the caller. This is the price of trying to do this in C. + + * The following are the only functions that are thread-safe on a single data + structure, i.e. can be run in multiple threads simultaneously on the same + data structure + hmlen shlen + hmlenu shlenu + hmget_ts shget_ts + hmgeti_ts shgeti_ts + hmgets_ts shgets_ts + + * You iterate over the contents of a dynamic array and a hashmap in exactly + the same way, using arrlen/hmlen/shlen: + + for (i=0; i < arrlen(foo); ++i) + ... foo[i] ... + + * All operations except arrins/arrdel are O(1) amortized, but individual + operations can be slow, so these data structures may not be suitable + for real time use. Dynamic arrays double in capacity as needed, so + elements are copied an average of once. Hash tables double/halve + their size as needed, with appropriate hysteresis to maintain O(1) + performance. + +NOTES - DYNAMIC ARRAY + + * If you know how long a dynamic array is going to be in advance, you can avoid + extra memory allocations by using arrsetlen to allocate it to that length in + advance and use foo[n] while filling it out, or arrsetcap to allocate the memory + for that length and use arrput/arrpush as normal. + + * Unlike some other versions of the dynamic array, this version should + be safe to use with strict-aliasing optimizations. + +NOTES - HASH MAP + + * For compilers other than GCC and clang (e.g. Visual Studio), for hmput/hmget/hmdel + and variants, the key must be an lvalue (so the macro can take the address of it). + Extensions are used that eliminate this requirement if you're using C99 and later + in GCC or clang, or if you're using C++ in GCC. But note that this can make your + code less portable. + + * To test for presence of a key in a hashmap, just do 'hmgeti(foo,key) >= 0'. + + * The iteration order of your data in the hashmap is determined solely by the + order of insertions and deletions. In particular, if you never delete, new + keys are always added at the end of the array. This will be consistent + across all platforms and versions of the library. However, you should not + attempt to serialize the internal hash table, as the hash is not consistent + between different platforms, and may change with future versions of the library. + + * Use sh_new_arena() for string hashmaps that you never delete from. Initialize + with NULL if you're managing the memory for your strings, or your strings are + never freed (at least until the hashmap is freed). Otherwise, use sh_new_strdup(). + @TODO: make an arena variant that garbage collects the strings with a trivial + copy collector into a new arena whenever the table shrinks / rebuilds. Since + current arena recommendation is to only use arena if it never deletes, then + this can just replace current arena implementation. + + * If adversarial input is a serious concern and you're on a 64-bit platform, + enable STBDS_SIPHASH_2_4 (see the 'Compile-time options' section), and pass + a strong random number to stbds_rand_seed. + + * The default value for the hash table is stored in foo[-1], so if you + use code like 'hmget(T,k)->value = 5' you can accidentally overwrite + the value stored by hmdefault if 'k' is not present. + +CREDITS + + Sean Barrett -- library, idea for dynamic array API/implementation + Per Vognsen -- idea for hash table API/implementation + Rafael Sachetto -- arrpop() + github:HeroicKatora -- arraddn() reworking + + Bugfixes: + Andy Durdin + Shane Liesegang + Vinh Truong + Andreas Molzer + github:hashitaku + github:srdjanstipic + Macoy Madson + Andreas Vennstrom + Tobias Mansfield-Williams +*/ + +#ifdef STBDS_UNIT_TESTS +#define _CRT_SECURE_NO_WARNINGS +#endif + +#ifndef INCLUDE_STB_DS_H +#define INCLUDE_STB_DS_H + +#include +#include + +#ifndef STBDS_NO_SHORT_NAMES +#define arrlen stbds_arrlen +#define arrlenu stbds_arrlenu +#define arrput stbds_arrput +#define arrpush stbds_arrput +#define arrpop stbds_arrpop +#define arrfree stbds_arrfree +#define arraddn stbds_arraddn // deprecated, use one of the following instead: +#define arraddnptr stbds_arraddnptr +#define arraddnindex stbds_arraddnindex +#define arrsetlen stbds_arrsetlen +#define arrlast stbds_arrlast +#define arrins stbds_arrins +#define arrinsn stbds_arrinsn +#define arrdel stbds_arrdel +#define arrdeln stbds_arrdeln +#define arrdelswap stbds_arrdelswap +#define arrcap stbds_arrcap +#define arrsetcap stbds_arrsetcap + +#define hmput stbds_hmput +#define hmputs stbds_hmputs +#define hmget stbds_hmget +#define hmget_ts stbds_hmget_ts +#define hmgets stbds_hmgets +#define hmgetp stbds_hmgetp +#define hmgetp_ts stbds_hmgetp_ts +#define hmgetp_null stbds_hmgetp_null +#define hmgeti stbds_hmgeti +#define hmgeti_ts stbds_hmgeti_ts +#define hmdel stbds_hmdel +#define hmlen stbds_hmlen +#define hmlenu stbds_hmlenu +#define hmfree stbds_hmfree +#define hmdefault stbds_hmdefault +#define hmdefaults stbds_hmdefaults + +#define shput stbds_shput +#define shputi stbds_shputi +#define shputs stbds_shputs +#define shget stbds_shget +#define shgeti stbds_shgeti +#define shgets stbds_shgets +#define shgetp stbds_shgetp +#define shgetp_null stbds_shgetp_null +#define shdel stbds_shdel +#define shlen stbds_shlen +#define shlenu stbds_shlenu +#define shfree stbds_shfree +#define shdefault stbds_shdefault +#define shdefaults stbds_shdefaults +#define sh_new_arena stbds_sh_new_arena +#define sh_new_strdup stbds_sh_new_strdup + +#define stralloc stbds_stralloc +#define strreset stbds_strreset +#endif + +#if defined(STBDS_REALLOC) && !defined(STBDS_FREE) || !defined(STBDS_REALLOC) && defined(STBDS_FREE) +#error "You must define both STBDS_REALLOC and STBDS_FREE, or neither." +#endif +#if !defined(STBDS_REALLOC) && !defined(STBDS_FREE) +#include +#define STBDS_REALLOC(c,p,s) realloc(p,s) +#define STBDS_FREE(c,p) free(p) +#endif + +#ifdef _MSC_VER +#define STBDS_NOTUSED(v) (void)(v) +#else +#define STBDS_NOTUSED(v) (void)sizeof(v) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +// for security against attackers, seed the library with a random number, at least time() but stronger is better +extern void stbds_rand_seed(size_t seed); + +// these are the hash functions used internally if you want to test them or use them for other purposes +extern size_t stbds_hash_bytes(void *p, size_t len, size_t seed); +extern size_t stbds_hash_string(char *str, size_t seed); + +// this is a simple string arena allocator, initialize with e.g. 'stbds_string_arena my_arena={0}'. +typedef struct stbds_string_arena stbds_string_arena; +extern char * stbds_stralloc(stbds_string_arena *a, char *str); +extern void stbds_strreset(stbds_string_arena *a); + +// have to #define STBDS_UNIT_TESTS to call this +extern void stbds_unit_tests(void); + +/////////////// +// +// Everything below here is implementation details +// + +extern void * stbds_arrgrowf(void *a, size_t elemsize, size_t addlen, size_t min_cap); +extern void stbds_arrfreef(void *a); +extern void stbds_hmfree_func(void *p, size_t elemsize); +extern void * stbds_hmget_key(void *a, size_t elemsize, void *key, size_t keysize, int mode); +extern void * stbds_hmget_key_ts(void *a, size_t elemsize, void *key, size_t keysize, ptrdiff_t *temp, int mode); +extern void * stbds_hmput_default(void *a, size_t elemsize); +extern void * stbds_hmput_key(void *a, size_t elemsize, void *key, size_t keysize, int mode); +extern void * stbds_hmdel_key(void *a, size_t elemsize, void *key, size_t keysize, size_t keyoffset, int mode); +extern void * stbds_shmode_func(size_t elemsize, int mode); + +#ifdef __cplusplus +} +#endif + +#if defined(__GNUC__) || defined(__clang__) +#define STBDS_HAS_TYPEOF +#ifdef __cplusplus +//#define STBDS_HAS_LITERAL_ARRAY // this is currently broken for clang +#endif +#endif + +#if !defined(__cplusplus) +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#define STBDS_HAS_LITERAL_ARRAY +#endif +#endif + +// this macro takes the address of the argument, but on gcc/clang can accept rvalues +#if defined(STBDS_HAS_LITERAL_ARRAY) && defined(STBDS_HAS_TYPEOF) + #if __clang__ + #define STBDS_ADDRESSOF(typevar, value) ((__typeof__(typevar)[1]){value}) // literal array decays to pointer to value + #else + #define STBDS_ADDRESSOF(typevar, value) ((typeof(typevar)[1]){value}) // literal array decays to pointer to value + #endif +#else +#define STBDS_ADDRESSOF(typevar, value) &(value) +#endif + +#define STBDS_OFFSETOF(var,field) ((char *) &(var)->field - (char *) (var)) + +#define stbds_header(t) ((stbds_array_header *) (t) - 1) +#define stbds_temp(t) stbds_header(t)->temp +#define stbds_temp_key(t) (*(char **) stbds_header(t)->hash_table) + +#define stbds_arrsetcap(a,n) (stbds_arrgrow(a,0,n)) +#define stbds_arrsetlen(a,n) ((stbds_arrcap(a) < (size_t) (n) ? stbds_arrsetcap((a),(size_t)(n)),0 : 0), (a) ? stbds_header(a)->length = (size_t) (n) : 0) +#define stbds_arrcap(a) ((a) ? stbds_header(a)->capacity : 0) +#define stbds_arrlen(a) ((a) ? (ptrdiff_t) stbds_header(a)->length : 0) +#define stbds_arrlenu(a) ((a) ? stbds_header(a)->length : 0) +#define stbds_arrput(a,v) (stbds_arrmaybegrow(a,1), (a)[stbds_header(a)->length++] = (v)) +#define stbds_arrpush stbds_arrput // synonym +#define stbds_arrpop(a) (stbds_header(a)->length--, (a)[stbds_header(a)->length]) +#define stbds_arraddn(a,n) ((void)(stbds_arraddnindex(a, n))) // deprecated, use one of the following instead: +#define stbds_arraddnptr(a,n) (stbds_arrmaybegrow(a,n), (n) ? (stbds_header(a)->length += (n), &(a)[stbds_header(a)->length-(n)]) : (a)) +#define stbds_arraddnindex(a,n)(stbds_arrmaybegrow(a,n), (n) ? (stbds_header(a)->length += (n), stbds_header(a)->length-(n)) : stbds_arrlen(a)) +#define stbds_arraddnoff stbds_arraddnindex +#define stbds_arrlast(a) ((a)[stbds_header(a)->length-1]) +#define stbds_arrfree(a) ((void) ((a) ? STBDS_FREE(NULL,stbds_header(a)) : (void)0), (a)=NULL) +#define stbds_arrdel(a,i) stbds_arrdeln(a,i,1) +#define stbds_arrdeln(a,i,n) (memmove(&(a)[i], &(a)[(i)+(n)], sizeof *(a) * (stbds_header(a)->length-(n)-(i))), stbds_header(a)->length -= (n)) +#define stbds_arrdelswap(a,i) ((a)[i] = stbds_arrlast(a), stbds_header(a)->length -= 1) +#define stbds_arrinsn(a,i,n) (stbds_arraddn((a),(n)), memmove(&(a)[(i)+(n)], &(a)[i], sizeof *(a) * (stbds_header(a)->length-(n)-(i)))) +#define stbds_arrins(a,i,v) (stbds_arrinsn((a),(i),1), (a)[i]=(v)) + +#define stbds_arrmaybegrow(a,n) ((!(a) || stbds_header(a)->length + (n) > stbds_header(a)->capacity) \ + ? (stbds_arrgrow(a,n,0),0) : 0) + +#define stbds_arrgrow(a,b,c) ((a) = stbds_arrgrowf_wrapper((a), sizeof *(a), (b), (c))) + +#define stbds_hmput(t, k, v) \ + ((t) = stbds_hmput_key_wrapper((t), sizeof *(t), (void*) STBDS_ADDRESSOF((t)->key, (k)), sizeof (t)->key, 0), \ + (t)[stbds_temp((t)-1)].key = (k), \ + (t)[stbds_temp((t)-1)].value = (v)) + +#define stbds_hmputs(t, s) \ + ((t) = stbds_hmput_key_wrapper((t), sizeof *(t), &(s).key, sizeof (s).key, STBDS_HM_BINARY), \ + (t)[stbds_temp((t)-1)] = (s)) + +#define stbds_hmgeti(t,k) \ + ((t) = stbds_hmget_key_wrapper((t), sizeof *(t), (void*) STBDS_ADDRESSOF((t)->key, (k)), sizeof (t)->key, STBDS_HM_BINARY), \ + stbds_temp((t)-1)) + +#define stbds_hmgeti_ts(t,k,temp) \ + ((t) = stbds_hmget_key_ts_wrapper((t), sizeof *(t), (void*) STBDS_ADDRESSOF((t)->key, (k)), sizeof (t)->key, &(temp), STBDS_HM_BINARY), \ + (temp)) + +#define stbds_hmgetp(t, k) \ + ((void) stbds_hmgeti(t,k), &(t)[stbds_temp((t)-1)]) + +#define stbds_hmgetp_ts(t, k, temp) \ + ((void) stbds_hmgeti_ts(t,k,temp), &(t)[temp]) + +#define stbds_hmdel(t,k) \ + (((t) = stbds_hmdel_key_wrapper((t),sizeof *(t), (void*) STBDS_ADDRESSOF((t)->key, (k)), sizeof (t)->key, STBDS_OFFSETOF((t),key), STBDS_HM_BINARY)),(t)?stbds_temp((t)-1):0) + +#define stbds_hmdefault(t, v) \ + ((t) = stbds_hmput_default_wrapper((t), sizeof *(t)), (t)[-1].value = (v)) + +#define stbds_hmdefaults(t, s) \ + ((t) = stbds_hmput_default_wrapper((t), sizeof *(t)), (t)[-1] = (s)) + +#define stbds_hmfree(p) \ + ((void) ((p) != NULL ? stbds_hmfree_func((p)-1,sizeof*(p)),0 : 0),(p)=NULL) + +#define stbds_hmgets(t, k) (*stbds_hmgetp(t,k)) +#define stbds_hmget(t, k) (stbds_hmgetp(t,k)->value) +#define stbds_hmget_ts(t, k, temp) (stbds_hmgetp_ts(t,k,temp)->value) +#define stbds_hmlen(t) ((t) ? (ptrdiff_t) stbds_header((t)-1)->length-1 : 0) +#define stbds_hmlenu(t) ((t) ? stbds_header((t)-1)->length-1 : 0) +#define stbds_hmgetp_null(t,k) (stbds_hmgeti(t,k) == -1 ? NULL : &(t)[stbds_temp((t)-1)]) + +#define stbds_shput(t, k, v) \ + ((t) = stbds_hmput_key_wrapper((t), sizeof *(t), (void*) (k), sizeof (t)->key, STBDS_HM_STRING), \ + (t)[stbds_temp((t)-1)].value = (v)) + +#define stbds_shputi(t, k, v) \ + ((t) = stbds_hmput_key_wrapper((t), sizeof *(t), (void*) (k), sizeof (t)->key, STBDS_HM_STRING), \ + (t)[stbds_temp((t)-1)].value = (v), stbds_temp((t)-1)) + +#define stbds_shputs(t, s) \ + ((t) = stbds_hmput_key_wrapper((t), sizeof *(t), (void*) (s).key, sizeof (s).key, STBDS_HM_STRING), \ + (t)[stbds_temp((t)-1)] = (s), \ + (t)[stbds_temp((t)-1)].key = stbds_temp_key((t)-1)) // above line overwrites whole structure, so must rewrite key here if it was allocated internally + +#define stbds_pshput(t, p) \ + ((t) = stbds_hmput_key_wrapper((t), sizeof *(t), (void*) (p)->key, sizeof (p)->key, STBDS_HM_PTR_TO_STRING), \ + (t)[stbds_temp((t)-1)] = (p)) + +#define stbds_shgeti(t,k) \ + ((t) = stbds_hmget_key_wrapper((t), sizeof *(t), (void*) (k), sizeof (t)->key, STBDS_HM_STRING), \ + stbds_temp((t)-1)) + +#define stbds_pshgeti(t,k) \ + ((t) = stbds_hmget_key_wrapper((t), sizeof *(t), (void*) (k), sizeof (*(t))->key, STBDS_HM_PTR_TO_STRING), \ + stbds_temp((t)-1)) + +#define stbds_shgetp(t, k) \ + ((void) stbds_shgeti(t,k), &(t)[stbds_temp((t)-1)]) + +#define stbds_pshget(t, k) \ + ((void) stbds_pshgeti(t,k), (t)[stbds_temp((t)-1)]) + +#define stbds_shdel(t,k) \ + (((t) = stbds_hmdel_key_wrapper((t),sizeof *(t), (void*) (k), sizeof (t)->key, STBDS_OFFSETOF((t),key), STBDS_HM_STRING)),(t)?stbds_temp((t)-1):0) +#define stbds_pshdel(t,k) \ + (((t) = stbds_hmdel_key_wrapper((t),sizeof *(t), (void*) (k), sizeof (*(t))->key, STBDS_OFFSETOF(*(t),key), STBDS_HM_PTR_TO_STRING)),(t)?stbds_temp((t)-1):0) + +#define stbds_sh_new_arena(t) \ + ((t) = stbds_shmode_func_wrapper(t, sizeof *(t), STBDS_SH_ARENA)) +#define stbds_sh_new_strdup(t) \ + ((t) = stbds_shmode_func_wrapper(t, sizeof *(t), STBDS_SH_STRDUP)) + +#define stbds_shdefault(t, v) stbds_hmdefault(t,v) +#define stbds_shdefaults(t, s) stbds_hmdefaults(t,s) + +#define stbds_shfree stbds_hmfree +#define stbds_shlenu stbds_hmlenu + +#define stbds_shgets(t, k) (*stbds_shgetp(t,k)) +#define stbds_shget(t, k) (stbds_shgetp(t,k)->value) +#define stbds_shgetp_null(t,k) (stbds_shgeti(t,k) == -1 ? NULL : &(t)[stbds_temp((t)-1)]) +#define stbds_shlen stbds_hmlen + +typedef struct +{ + size_t length; + size_t capacity; + void * hash_table; + ptrdiff_t temp; +} stbds_array_header; + +typedef struct stbds_string_block +{ + struct stbds_string_block *next; + char storage[8]; +} stbds_string_block; + +struct stbds_string_arena +{ + stbds_string_block *storage; + size_t remaining; + unsigned char block; + unsigned char mode; // this isn't used by the string arena itself +}; + +#define STBDS_HM_BINARY 0 +#define STBDS_HM_STRING 1 + +enum +{ + STBDS_SH_NONE, + STBDS_SH_DEFAULT, + STBDS_SH_STRDUP, + STBDS_SH_ARENA +}; + +#ifdef __cplusplus +// in C we use implicit assignment from these void*-returning functions to T*. +// in C++ these templates make the same code work +template static T * stbds_arrgrowf_wrapper(T *a, size_t elemsize, size_t addlen, size_t min_cap) { + return (T*)stbds_arrgrowf((void *)a, elemsize, addlen, min_cap); +} +template static T * stbds_hmget_key_wrapper(T *a, size_t elemsize, void *key, size_t keysize, int mode) { + return (T*)stbds_hmget_key((void*)a, elemsize, key, keysize, mode); +} +template static T * stbds_hmget_key_ts_wrapper(T *a, size_t elemsize, void *key, size_t keysize, ptrdiff_t *temp, int mode) { + return (T*)stbds_hmget_key_ts((void*)a, elemsize, key, keysize, temp, mode); +} +template static T * stbds_hmput_default_wrapper(T *a, size_t elemsize) { + return (T*)stbds_hmput_default((void *)a, elemsize); +} +template static T * stbds_hmput_key_wrapper(T *a, size_t elemsize, void *key, size_t keysize, int mode) { + return (T*)stbds_hmput_key((void*)a, elemsize, key, keysize, mode); +} +template static T * stbds_hmdel_key_wrapper(T *a, size_t elemsize, void *key, size_t keysize, size_t keyoffset, int mode){ + return (T*)stbds_hmdel_key((void*)a, elemsize, key, keysize, keyoffset, mode); +} +template static T * stbds_shmode_func_wrapper(T *, size_t elemsize, int mode) { + return (T*)stbds_shmode_func(elemsize, mode); +} +#else +#define stbds_arrgrowf_wrapper stbds_arrgrowf +#define stbds_hmget_key_wrapper stbds_hmget_key +#define stbds_hmget_key_ts_wrapper stbds_hmget_key_ts +#define stbds_hmput_default_wrapper stbds_hmput_default +#define stbds_hmput_key_wrapper stbds_hmput_key +#define stbds_hmdel_key_wrapper stbds_hmdel_key +#define stbds_shmode_func_wrapper(t,e,m) stbds_shmode_func(e,m) +#endif + +#endif // INCLUDE_STB_DS_H + + +////////////////////////////////////////////////////////////////////////////// +// +// IMPLEMENTATION +// + +#ifdef STB_DS_IMPLEMENTATION +#include +#include + +#ifndef STBDS_ASSERT +#define STBDS_ASSERT_WAS_UNDEFINED +#define STBDS_ASSERT(x) ((void) 0) +#endif + +#ifdef STBDS_STATISTICS +#define STBDS_STATS(x) x +size_t stbds_array_grow; +size_t stbds_hash_grow; +size_t stbds_hash_shrink; +size_t stbds_hash_rebuild; +size_t stbds_hash_probes; +size_t stbds_hash_alloc; +size_t stbds_rehash_probes; +size_t stbds_rehash_items; +#else +#define STBDS_STATS(x) +#endif + +// +// stbds_arr implementation +// + +//int *prev_allocs[65536]; +//int num_prev; + +void *stbds_arrgrowf(void *a, size_t elemsize, size_t addlen, size_t min_cap) +{ + stbds_array_header temp={0}; // force debugging + void *b; + size_t min_len = stbds_arrlen(a) + addlen; + (void) sizeof(temp); + + // compute the minimum capacity needed + if (min_len > min_cap) + min_cap = min_len; + + if (min_cap <= stbds_arrcap(a)) + return a; + + // increase needed capacity to guarantee O(1) amortized + if (min_cap < 2 * stbds_arrcap(a)) + min_cap = 2 * stbds_arrcap(a); + else if (min_cap < 4) + min_cap = 4; + + //if (num_prev < 65536) if (a) prev_allocs[num_prev++] = (int *) ((char *) a+1); + //if (num_prev == 2201) + // num_prev = num_prev; + b = STBDS_REALLOC(NULL, (a) ? stbds_header(a) : 0, elemsize * min_cap + sizeof(stbds_array_header)); + //if (num_prev < 65536) prev_allocs[num_prev++] = (int *) (char *) b; + b = (char *) b + sizeof(stbds_array_header); + if (a == NULL) { + stbds_header(b)->length = 0; + stbds_header(b)->hash_table = 0; + stbds_header(b)->temp = 0; + } else { + STBDS_STATS(++stbds_array_grow); + } + stbds_header(b)->capacity = min_cap; + + return b; +} + +void stbds_arrfreef(void *a) +{ + STBDS_FREE(NULL, stbds_header(a)); +} + +// +// stbds_hm hash table implementation +// + +#ifdef STBDS_INTERNAL_SMALL_BUCKET +#define STBDS_BUCKET_LENGTH 4 +#else +#define STBDS_BUCKET_LENGTH 8 +#endif + +#define STBDS_BUCKET_SHIFT (STBDS_BUCKET_LENGTH == 8 ? 3 : 2) +#define STBDS_BUCKET_MASK (STBDS_BUCKET_LENGTH-1) +#define STBDS_CACHE_LINE_SIZE 64 + +#define STBDS_ALIGN_FWD(n,a) (((n) + (a) - 1) & ~((a)-1)) + +typedef struct +{ + size_t hash [STBDS_BUCKET_LENGTH]; + ptrdiff_t index[STBDS_BUCKET_LENGTH]; +} stbds_hash_bucket; // in 32-bit, this is one 64-byte cache line; in 64-bit, each array is one 64-byte cache line + +typedef struct +{ + char * temp_key; // this MUST be the first field of the hash table + size_t slot_count; + size_t used_count; + size_t used_count_threshold; + size_t used_count_shrink_threshold; + size_t tombstone_count; + size_t tombstone_count_threshold; + size_t seed; + size_t slot_count_log2; + stbds_string_arena string; + stbds_hash_bucket *storage; // not a separate allocation, just 64-byte aligned storage after this struct +} stbds_hash_index; + +#define STBDS_INDEX_EMPTY -1 +#define STBDS_INDEX_DELETED -2 +#define STBDS_INDEX_IN_USE(x) ((x) >= 0) + +#define STBDS_HASH_EMPTY 0 +#define STBDS_HASH_DELETED 1 + +static size_t stbds_hash_seed=0x31415926; + +void stbds_rand_seed(size_t seed) +{ + stbds_hash_seed = seed; +} + +#define stbds_load_32_or_64(var, temp, v32, v64_hi, v64_lo) \ + temp = v64_lo ^ v32, temp <<= 16, temp <<= 16, temp >>= 16, temp >>= 16, /* discard if 32-bit */ \ + var = v64_hi, var <<= 16, var <<= 16, /* discard if 32-bit */ \ + var ^= temp ^ v32 + +#define STBDS_SIZE_T_BITS ((sizeof (size_t)) * 8) + +static size_t stbds_probe_position(size_t hash, size_t slot_count, size_t slot_log2) +{ + size_t pos; + STBDS_NOTUSED(slot_log2); + pos = hash & (slot_count-1); + #ifdef STBDS_INTERNAL_BUCKET_START + pos &= ~STBDS_BUCKET_MASK; + #endif + return pos; +} + +static size_t stbds_log2(size_t slot_count) +{ + size_t n=0; + while (slot_count > 1) { + slot_count >>= 1; + ++n; + } + return n; +} + +static stbds_hash_index *stbds_make_hash_index(size_t slot_count, stbds_hash_index *ot) +{ + stbds_hash_index *t; + t = (stbds_hash_index *) STBDS_REALLOC(NULL,0,(slot_count >> STBDS_BUCKET_SHIFT) * sizeof(stbds_hash_bucket) + sizeof(stbds_hash_index) + STBDS_CACHE_LINE_SIZE-1); + t->storage = (stbds_hash_bucket *) STBDS_ALIGN_FWD((size_t) (t+1), STBDS_CACHE_LINE_SIZE); + t->slot_count = slot_count; + t->slot_count_log2 = stbds_log2(slot_count); + t->tombstone_count = 0; + t->used_count = 0; + + #if 0 // A1 + t->used_count_threshold = slot_count*12/16; // if 12/16th of table is occupied, grow + t->tombstone_count_threshold = slot_count* 2/16; // if tombstones are 2/16th of table, rebuild + t->used_count_shrink_threshold = slot_count* 4/16; // if table is only 4/16th full, shrink + #elif 1 // A2 + //t->used_count_threshold = slot_count*12/16; // if 12/16th of table is occupied, grow + //t->tombstone_count_threshold = slot_count* 3/16; // if tombstones are 3/16th of table, rebuild + //t->used_count_shrink_threshold = slot_count* 4/16; // if table is only 4/16th full, shrink + + // compute without overflowing + t->used_count_threshold = slot_count - (slot_count>>2); + t->tombstone_count_threshold = (slot_count>>3) + (slot_count>>4); + t->used_count_shrink_threshold = slot_count >> 2; + + #elif 0 // B1 + t->used_count_threshold = slot_count*13/16; // if 13/16th of table is occupied, grow + t->tombstone_count_threshold = slot_count* 2/16; // if tombstones are 2/16th of table, rebuild + t->used_count_shrink_threshold = slot_count* 5/16; // if table is only 5/16th full, shrink + #else // C1 + t->used_count_threshold = slot_count*14/16; // if 14/16th of table is occupied, grow + t->tombstone_count_threshold = slot_count* 2/16; // if tombstones are 2/16th of table, rebuild + t->used_count_shrink_threshold = slot_count* 6/16; // if table is only 6/16th full, shrink + #endif + // Following statistics were measured on a Core i7-6700 @ 4.00Ghz, compiled with clang 7.0.1 -O2 + // Note that the larger tables have high variance as they were run fewer times + // A1 A2 B1 C1 + // 0.10ms : 0.10ms : 0.10ms : 0.11ms : 2,000 inserts creating 2K table + // 0.96ms : 0.95ms : 0.97ms : 1.04ms : 20,000 inserts creating 20K table + // 14.48ms : 14.46ms : 10.63ms : 11.00ms : 200,000 inserts creating 200K table + // 195.74ms : 196.35ms : 203.69ms : 214.92ms : 2,000,000 inserts creating 2M table + // 2193.88ms : 2209.22ms : 2285.54ms : 2437.17ms : 20,000,000 inserts creating 20M table + // 65.27ms : 53.77ms : 65.33ms : 65.47ms : 500,000 inserts & deletes in 2K table + // 72.78ms : 62.45ms : 71.95ms : 72.85ms : 500,000 inserts & deletes in 20K table + // 89.47ms : 77.72ms : 96.49ms : 96.75ms : 500,000 inserts & deletes in 200K table + // 97.58ms : 98.14ms : 97.18ms : 97.53ms : 500,000 inserts & deletes in 2M table + // 118.61ms : 119.62ms : 120.16ms : 118.86ms : 500,000 inserts & deletes in 20M table + // 192.11ms : 194.39ms : 196.38ms : 195.73ms : 500,000 inserts & deletes in 200M table + + if (slot_count <= STBDS_BUCKET_LENGTH) + t->used_count_shrink_threshold = 0; + // to avoid infinite loop, we need to guarantee that at least one slot is empty and will terminate probes + STBDS_ASSERT(t->used_count_threshold + t->tombstone_count_threshold < t->slot_count); + STBDS_STATS(++stbds_hash_alloc); + if (ot) { + t->string = ot->string; + // reuse old seed so we can reuse old hashes so below "copy out old data" doesn't do any hashing + t->seed = ot->seed; + } else { + size_t a,b,temp; + memset(&t->string, 0, sizeof(t->string)); + t->seed = stbds_hash_seed; + // LCG + // in 32-bit, a = 2147001325 b = 715136305 + // in 64-bit, a = 2862933555777941757 b = 3037000493 + stbds_load_32_or_64(a,temp, 2147001325, 0x27bb2ee6, 0x87b0b0fd); + stbds_load_32_or_64(b,temp, 715136305, 0, 0xb504f32d); + stbds_hash_seed = stbds_hash_seed * a + b; + } + + { + size_t i,j; + for (i=0; i < slot_count >> STBDS_BUCKET_SHIFT; ++i) { + stbds_hash_bucket *b = &t->storage[i]; + for (j=0; j < STBDS_BUCKET_LENGTH; ++j) + b->hash[j] = STBDS_HASH_EMPTY; + for (j=0; j < STBDS_BUCKET_LENGTH; ++j) + b->index[j] = STBDS_INDEX_EMPTY; + } + } + + // copy out the old data, if any + if (ot) { + size_t i,j; + t->used_count = ot->used_count; + for (i=0; i < ot->slot_count >> STBDS_BUCKET_SHIFT; ++i) { + stbds_hash_bucket *ob = &ot->storage[i]; + for (j=0; j < STBDS_BUCKET_LENGTH; ++j) { + if (STBDS_INDEX_IN_USE(ob->index[j])) { + size_t hash = ob->hash[j]; + size_t pos = stbds_probe_position(hash, t->slot_count, t->slot_count_log2); + size_t step = STBDS_BUCKET_LENGTH; + STBDS_STATS(++stbds_rehash_items); + for (;;) { + size_t limit,z; + stbds_hash_bucket *bucket; + bucket = &t->storage[pos >> STBDS_BUCKET_SHIFT]; + STBDS_STATS(++stbds_rehash_probes); + + for (z=pos & STBDS_BUCKET_MASK; z < STBDS_BUCKET_LENGTH; ++z) { + if (bucket->hash[z] == 0) { + bucket->hash[z] = hash; + bucket->index[z] = ob->index[j]; + goto done; + } + } + + limit = pos & STBDS_BUCKET_MASK; + for (z = 0; z < limit; ++z) { + if (bucket->hash[z] == 0) { + bucket->hash[z] = hash; + bucket->index[z] = ob->index[j]; + goto done; + } + } + + pos += step; // quadratic probing + step += STBDS_BUCKET_LENGTH; + pos &= (t->slot_count-1); + } + } + done: + ; + } + } + } + + return t; +} + +#define STBDS_ROTATE_LEFT(val, n) (((val) << (n)) | ((val) >> (STBDS_SIZE_T_BITS - (n)))) +#define STBDS_ROTATE_RIGHT(val, n) (((val) >> (n)) | ((val) << (STBDS_SIZE_T_BITS - (n)))) + +size_t stbds_hash_string(char *str, size_t seed) +{ + size_t hash = seed; + while (*str) + hash = STBDS_ROTATE_LEFT(hash, 9) + (unsigned char) *str++; + + // Thomas Wang 64-to-32 bit mix function, hopefully also works in 32 bits + hash ^= seed; + hash = (~hash) + (hash << 18); + hash ^= hash ^ STBDS_ROTATE_RIGHT(hash,31); + hash = hash * 21; + hash ^= hash ^ STBDS_ROTATE_RIGHT(hash,11); + hash += (hash << 6); + hash ^= STBDS_ROTATE_RIGHT(hash,22); + return hash+seed; +} + +#ifdef STBDS_SIPHASH_2_4 +#define STBDS_SIPHASH_C_ROUNDS 2 +#define STBDS_SIPHASH_D_ROUNDS 4 +typedef int STBDS_SIPHASH_2_4_can_only_be_used_in_64_bit_builds[sizeof(size_t) == 8 ? 1 : -1]; +#endif + +#ifndef STBDS_SIPHASH_C_ROUNDS +#define STBDS_SIPHASH_C_ROUNDS 1 +#endif +#ifndef STBDS_SIPHASH_D_ROUNDS +#define STBDS_SIPHASH_D_ROUNDS 1 +#endif + +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable:4127) // conditional expression is constant, for do..while(0) and sizeof()== +#endif + +static size_t stbds_siphash_bytes(void *p, size_t len, size_t seed) +{ + unsigned char *d = (unsigned char *) p; + size_t i,j; + size_t v0,v1,v2,v3, data; + + // hash that works on 32- or 64-bit registers without knowing which we have + // (computes different results on 32-bit and 64-bit platform) + // derived from siphash, but on 32-bit platforms very different as it uses 4 32-bit state not 4 64-bit + v0 = ((((size_t) 0x736f6d65 << 16) << 16) + 0x70736575) ^ seed; + v1 = ((((size_t) 0x646f7261 << 16) << 16) + 0x6e646f6d) ^ ~seed; + v2 = ((((size_t) 0x6c796765 << 16) << 16) + 0x6e657261) ^ seed; + v3 = ((((size_t) 0x74656462 << 16) << 16) + 0x79746573) ^ ~seed; + + #ifdef STBDS_TEST_SIPHASH_2_4 + // hardcoded with key material in the siphash test vectors + v0 ^= 0x0706050403020100ull ^ seed; + v1 ^= 0x0f0e0d0c0b0a0908ull ^ ~seed; + v2 ^= 0x0706050403020100ull ^ seed; + v3 ^= 0x0f0e0d0c0b0a0908ull ^ ~seed; + #endif + + #define STBDS_SIPROUND() \ + do { \ + v0 += v1; v1 = STBDS_ROTATE_LEFT(v1, 13); v1 ^= v0; v0 = STBDS_ROTATE_LEFT(v0,STBDS_SIZE_T_BITS/2); \ + v2 += v3; v3 = STBDS_ROTATE_LEFT(v3, 16); v3 ^= v2; \ + v2 += v1; v1 = STBDS_ROTATE_LEFT(v1, 17); v1 ^= v2; v2 = STBDS_ROTATE_LEFT(v2,STBDS_SIZE_T_BITS/2); \ + v0 += v3; v3 = STBDS_ROTATE_LEFT(v3, 21); v3 ^= v0; \ + } while (0) + + for (i=0; i+sizeof(size_t) <= len; i += sizeof(size_t), d += sizeof(size_t)) { + data = d[0] | (d[1] << 8) | (d[2] << 16) | (d[3] << 24); + data |= (size_t) (d[4] | (d[5] << 8) | (d[6] << 16) | (d[7] << 24)) << 16 << 16; // discarded if size_t == 4 + + v3 ^= data; + for (j=0; j < STBDS_SIPHASH_C_ROUNDS; ++j) + STBDS_SIPROUND(); + v0 ^= data; + } + data = len << (STBDS_SIZE_T_BITS-8); + switch (len - i) { + case 7: data |= ((size_t) d[6] << 24) << 24; // fall through + case 6: data |= ((size_t) d[5] << 20) << 20; // fall through + case 5: data |= ((size_t) d[4] << 16) << 16; // fall through + case 4: data |= (d[3] << 24); // fall through + case 3: data |= (d[2] << 16); // fall through + case 2: data |= (d[1] << 8); // fall through + case 1: data |= d[0]; // fall through + case 0: break; + } + v3 ^= data; + for (j=0; j < STBDS_SIPHASH_C_ROUNDS; ++j) + STBDS_SIPROUND(); + v0 ^= data; + v2 ^= 0xff; + for (j=0; j < STBDS_SIPHASH_D_ROUNDS; ++j) + STBDS_SIPROUND(); + +#ifdef STBDS_SIPHASH_2_4 + return v0^v1^v2^v3; +#else + return v1^v2^v3; // slightly stronger since v0^v3 in above cancels out final round operation? I tweeted at the authors of SipHash about this but they didn't reply +#endif +} + +size_t stbds_hash_bytes(void *p, size_t len, size_t seed) +{ +#ifdef STBDS_SIPHASH_2_4 + return stbds_siphash_bytes(p,len,seed); +#else + unsigned char *d = (unsigned char *) p; + + if (len == 4) { + unsigned int hash = d[0] | (d[1] << 8) | (d[2] << 16) | (d[3] << 24); + #if 0 + // HASH32-A Bob Jenkin's hash function w/o large constants + hash ^= seed; + hash -= (hash<<6); + hash ^= (hash>>17); + hash -= (hash<<9); + hash ^= seed; + hash ^= (hash<<4); + hash -= (hash<<3); + hash ^= (hash<<10); + hash ^= (hash>>15); + #elif 1 + // HASH32-BB Bob Jenkin's presumably-accidental version of Thomas Wang hash with rotates turned into shifts. + // Note that converting these back to rotates makes it run a lot slower, presumably due to collisions, so I'm + // not really sure what's going on. + hash ^= seed; + hash = (hash ^ 61) ^ (hash >> 16); + hash = hash + (hash << 3); + hash = hash ^ (hash >> 4); + hash = hash * 0x27d4eb2d; + hash ^= seed; + hash = hash ^ (hash >> 15); + #else // HASH32-C - Murmur3 + hash ^= seed; + hash *= 0xcc9e2d51; + hash = (hash << 17) | (hash >> 15); + hash *= 0x1b873593; + hash ^= seed; + hash = (hash << 19) | (hash >> 13); + hash = hash*5 + 0xe6546b64; + hash ^= hash >> 16; + hash *= 0x85ebca6b; + hash ^= seed; + hash ^= hash >> 13; + hash *= 0xc2b2ae35; + hash ^= hash >> 16; + #endif + // Following statistics were measured on a Core i7-6700 @ 4.00Ghz, compiled with clang 7.0.1 -O2 + // Note that the larger tables have high variance as they were run fewer times + // HASH32-A // HASH32-BB // HASH32-C + // 0.10ms // 0.10ms // 0.10ms : 2,000 inserts creating 2K table + // 0.96ms // 0.95ms // 0.99ms : 20,000 inserts creating 20K table + // 14.69ms // 14.43ms // 14.97ms : 200,000 inserts creating 200K table + // 199.99ms // 195.36ms // 202.05ms : 2,000,000 inserts creating 2M table + // 2234.84ms // 2187.74ms // 2240.38ms : 20,000,000 inserts creating 20M table + // 55.68ms // 53.72ms // 57.31ms : 500,000 inserts & deletes in 2K table + // 63.43ms // 61.99ms // 65.73ms : 500,000 inserts & deletes in 20K table + // 80.04ms // 77.96ms // 81.83ms : 500,000 inserts & deletes in 200K table + // 100.42ms // 97.40ms // 102.39ms : 500,000 inserts & deletes in 2M table + // 119.71ms // 120.59ms // 121.63ms : 500,000 inserts & deletes in 20M table + // 185.28ms // 195.15ms // 187.74ms : 500,000 inserts & deletes in 200M table + // 15.58ms // 14.79ms // 15.52ms : 200,000 inserts creating 200K table with varying key spacing + + return (((size_t) hash << 16 << 16) | hash) ^ seed; + } else if (len == 8 && sizeof(size_t) == 8) { + size_t hash = d[0] | (d[1] << 8) | (d[2] << 16) | (d[3] << 24); + hash |= (size_t) (d[4] | (d[5] << 8) | (d[6] << 16) | (d[7] << 24)) << 16 << 16; // avoid warning if size_t == 4 + hash ^= seed; + hash = (~hash) + (hash << 21); + hash ^= STBDS_ROTATE_RIGHT(hash,24); + hash *= 265; + hash ^= STBDS_ROTATE_RIGHT(hash,14); + hash ^= seed; + hash *= 21; + hash ^= STBDS_ROTATE_RIGHT(hash,28); + hash += (hash << 31); + hash = (~hash) + (hash << 18); + return hash; + } else { + return stbds_siphash_bytes(p,len,seed); + } +#endif +} +#ifdef _MSC_VER +#pragma warning(pop) +#endif + + +static int stbds_is_key_equal(void *a, size_t elemsize, void *key, size_t keysize, size_t keyoffset, int mode, size_t i) +{ + if (mode >= STBDS_HM_STRING) + return 0==strcmp((char *) key, * (char **) ((char *) a + elemsize*i + keyoffset)); + else + return 0==memcmp(key, (char *) a + elemsize*i + keyoffset, keysize); +} + +#define STBDS_HASH_TO_ARR(x,elemsize) ((char*) (x) - (elemsize)) +#define STBDS_ARR_TO_HASH(x,elemsize) ((char*) (x) + (elemsize)) + +#define stbds_hash_table(a) ((stbds_hash_index *) stbds_header(a)->hash_table) + +void stbds_hmfree_func(void *a, size_t elemsize) +{ + if (a == NULL) return; + if (stbds_hash_table(a) != NULL) { + if (stbds_hash_table(a)->string.mode == STBDS_SH_STRDUP) { + size_t i; + // skip 0th element, which is default + for (i=1; i < stbds_header(a)->length; ++i) + STBDS_FREE(NULL, *(char**) ((char *) a + elemsize*i)); + } + stbds_strreset(&stbds_hash_table(a)->string); + } + STBDS_FREE(NULL, stbds_header(a)->hash_table); + STBDS_FREE(NULL, stbds_header(a)); +} + +static ptrdiff_t stbds_hm_find_slot(void *a, size_t elemsize, void *key, size_t keysize, size_t keyoffset, int mode) +{ + void *raw_a = STBDS_HASH_TO_ARR(a,elemsize); + stbds_hash_index *table = stbds_hash_table(raw_a); + size_t hash = mode >= STBDS_HM_STRING ? stbds_hash_string((char*)key,table->seed) : stbds_hash_bytes(key, keysize,table->seed); + size_t step = STBDS_BUCKET_LENGTH; + size_t limit,i; + size_t pos; + stbds_hash_bucket *bucket; + + if (hash < 2) hash += 2; // stored hash values are forbidden from being 0, so we can detect empty slots + + pos = stbds_probe_position(hash, table->slot_count, table->slot_count_log2); + + for (;;) { + STBDS_STATS(++stbds_hash_probes); + bucket = &table->storage[pos >> STBDS_BUCKET_SHIFT]; + + // start searching from pos to end of bucket, this should help performance on small hash tables that fit in cache + for (i=pos & STBDS_BUCKET_MASK; i < STBDS_BUCKET_LENGTH; ++i) { + if (bucket->hash[i] == hash) { + if (stbds_is_key_equal(a, elemsize, key, keysize, keyoffset, mode, bucket->index[i])) { + return (pos & ~STBDS_BUCKET_MASK)+i; + } + } else if (bucket->hash[i] == STBDS_HASH_EMPTY) { + return -1; + } + } + + // search from beginning of bucket to pos + limit = pos & STBDS_BUCKET_MASK; + for (i = 0; i < limit; ++i) { + if (bucket->hash[i] == hash) { + if (stbds_is_key_equal(a, elemsize, key, keysize, keyoffset, mode, bucket->index[i])) { + return (pos & ~STBDS_BUCKET_MASK)+i; + } + } else if (bucket->hash[i] == STBDS_HASH_EMPTY) { + return -1; + } + } + + // quadratic probing + pos += step; + step += STBDS_BUCKET_LENGTH; + pos &= (table->slot_count-1); + } + /* NOTREACHED */ +} + +void * stbds_hmget_key_ts(void *a, size_t elemsize, void *key, size_t keysize, ptrdiff_t *temp, int mode) +{ + size_t keyoffset = 0; + if (a == NULL) { + // make it non-empty so we can return a temp + a = stbds_arrgrowf(0, elemsize, 0, 1); + stbds_header(a)->length += 1; + memset(a, 0, elemsize); + *temp = STBDS_INDEX_EMPTY; + // adjust a to point after the default element + return STBDS_ARR_TO_HASH(a,elemsize); + } else { + stbds_hash_index *table; + void *raw_a = STBDS_HASH_TO_ARR(a,elemsize); + // adjust a to point to the default element + table = (stbds_hash_index *) stbds_header(raw_a)->hash_table; + if (table == 0) { + *temp = -1; + } else { + ptrdiff_t slot = stbds_hm_find_slot(a, elemsize, key, keysize, keyoffset, mode); + if (slot < 0) { + *temp = STBDS_INDEX_EMPTY; + } else { + stbds_hash_bucket *b = &table->storage[slot >> STBDS_BUCKET_SHIFT]; + *temp = b->index[slot & STBDS_BUCKET_MASK]; + } + } + return a; + } +} + +void * stbds_hmget_key(void *a, size_t elemsize, void *key, size_t keysize, int mode) +{ + ptrdiff_t temp; + void *p = stbds_hmget_key_ts(a, elemsize, key, keysize, &temp, mode); + stbds_temp(STBDS_HASH_TO_ARR(p,elemsize)) = temp; + return p; +} + +void * stbds_hmput_default(void *a, size_t elemsize) +{ + // three cases: + // a is NULL <- allocate + // a has a hash table but no entries, because of shmode <- grow + // a has entries <- do nothing + if (a == NULL || stbds_header(STBDS_HASH_TO_ARR(a,elemsize))->length == 0) { + a = stbds_arrgrowf(a ? STBDS_HASH_TO_ARR(a,elemsize) : NULL, elemsize, 0, 1); + stbds_header(a)->length += 1; + memset(a, 0, elemsize); + a=STBDS_ARR_TO_HASH(a,elemsize); + } + return a; +} + +static char *stbds_strdup(char *str); + +void *stbds_hmput_key(void *a, size_t elemsize, void *key, size_t keysize, int mode) +{ + size_t keyoffset=0; + void *raw_a; + stbds_hash_index *table; + + if (a == NULL) { + a = stbds_arrgrowf(0, elemsize, 0, 1); + memset(a, 0, elemsize); + stbds_header(a)->length += 1; + // adjust a to point AFTER the default element + a = STBDS_ARR_TO_HASH(a,elemsize); + } + + // adjust a to point to the default element + raw_a = a; + a = STBDS_HASH_TO_ARR(a,elemsize); + + table = (stbds_hash_index *) stbds_header(a)->hash_table; + + if (table == NULL || table->used_count >= table->used_count_threshold) { + stbds_hash_index *nt; + size_t slot_count; + + slot_count = (table == NULL) ? STBDS_BUCKET_LENGTH : table->slot_count*2; + nt = stbds_make_hash_index(slot_count, table); + if (table) + STBDS_FREE(NULL, table); + else + nt->string.mode = mode >= STBDS_HM_STRING ? STBDS_SH_DEFAULT : 0; + stbds_header(a)->hash_table = table = nt; + STBDS_STATS(++stbds_hash_grow); + } + + // we iterate hash table explicitly because we want to track if we saw a tombstone + { + size_t hash = mode >= STBDS_HM_STRING ? stbds_hash_string((char*)key,table->seed) : stbds_hash_bytes(key, keysize,table->seed); + size_t step = STBDS_BUCKET_LENGTH; + size_t pos; + ptrdiff_t tombstone = -1; + stbds_hash_bucket *bucket; + + // stored hash values are forbidden from being 0, so we can detect empty slots to early out quickly + if (hash < 2) hash += 2; + + pos = stbds_probe_position(hash, table->slot_count, table->slot_count_log2); + + for (;;) { + size_t limit, i; + STBDS_STATS(++stbds_hash_probes); + bucket = &table->storage[pos >> STBDS_BUCKET_SHIFT]; + + // start searching from pos to end of bucket + for (i=pos & STBDS_BUCKET_MASK; i < STBDS_BUCKET_LENGTH; ++i) { + if (bucket->hash[i] == hash) { + if (stbds_is_key_equal(raw_a, elemsize, key, keysize, keyoffset, mode, bucket->index[i])) { + stbds_temp(a) = bucket->index[i]; + if (mode >= STBDS_HM_STRING) + stbds_temp_key(a) = * (char **) ((char *) raw_a + elemsize*bucket->index[i] + keyoffset); + return STBDS_ARR_TO_HASH(a,elemsize); + } + } else if (bucket->hash[i] == 0) { + pos = (pos & ~STBDS_BUCKET_MASK) + i; + goto found_empty_slot; + } else if (tombstone < 0) { + if (bucket->index[i] == STBDS_INDEX_DELETED) + tombstone = (ptrdiff_t) ((pos & ~STBDS_BUCKET_MASK) + i); + } + } + + // search from beginning of bucket to pos + limit = pos & STBDS_BUCKET_MASK; + for (i = 0; i < limit; ++i) { + if (bucket->hash[i] == hash) { + if (stbds_is_key_equal(raw_a, elemsize, key, keysize, keyoffset, mode, bucket->index[i])) { + stbds_temp(a) = bucket->index[i]; + return STBDS_ARR_TO_HASH(a,elemsize); + } + } else if (bucket->hash[i] == 0) { + pos = (pos & ~STBDS_BUCKET_MASK) + i; + goto found_empty_slot; + } else if (tombstone < 0) { + if (bucket->index[i] == STBDS_INDEX_DELETED) + tombstone = (ptrdiff_t) ((pos & ~STBDS_BUCKET_MASK) + i); + } + } + + // quadratic probing + pos += step; + step += STBDS_BUCKET_LENGTH; + pos &= (table->slot_count-1); + } + found_empty_slot: + if (tombstone >= 0) { + pos = tombstone; + --table->tombstone_count; + } + ++table->used_count; + + { + ptrdiff_t i = (ptrdiff_t) stbds_arrlen(a); + // we want to do stbds_arraddn(1), but we can't use the macros since we don't have something of the right type + if ((size_t) i+1 > stbds_arrcap(a)) + *(void **) &a = stbds_arrgrowf(a, elemsize, 1, 0); + raw_a = STBDS_ARR_TO_HASH(a,elemsize); + + STBDS_ASSERT((size_t) i+1 <= stbds_arrcap(a)); + stbds_header(a)->length = i+1; + bucket = &table->storage[pos >> STBDS_BUCKET_SHIFT]; + bucket->hash[pos & STBDS_BUCKET_MASK] = hash; + bucket->index[pos & STBDS_BUCKET_MASK] = i-1; + stbds_temp(a) = i-1; + + switch (table->string.mode) { + case STBDS_SH_STRDUP: stbds_temp_key(a) = *(char **) ((char *) a + elemsize*i) = stbds_strdup((char*) key); break; + case STBDS_SH_ARENA: stbds_temp_key(a) = *(char **) ((char *) a + elemsize*i) = stbds_stralloc(&table->string, (char*)key); break; + case STBDS_SH_DEFAULT: stbds_temp_key(a) = *(char **) ((char *) a + elemsize*i) = (char *) key; break; + default: memcpy((char *) a + elemsize*i, key, keysize); break; + } + } + return STBDS_ARR_TO_HASH(a,elemsize); + } +} + +void * stbds_shmode_func(size_t elemsize, int mode) +{ + void *a = stbds_arrgrowf(0, elemsize, 0, 1); + stbds_hash_index *h; + memset(a, 0, elemsize); + stbds_header(a)->length = 1; + stbds_header(a)->hash_table = h = (stbds_hash_index *) stbds_make_hash_index(STBDS_BUCKET_LENGTH, NULL); + h->string.mode = (unsigned char) mode; + return STBDS_ARR_TO_HASH(a,elemsize); +} + +void * stbds_hmdel_key(void *a, size_t elemsize, void *key, size_t keysize, size_t keyoffset, int mode) +{ + if (a == NULL) { + return 0; + } else { + stbds_hash_index *table; + void *raw_a = STBDS_HASH_TO_ARR(a,elemsize); + table = (stbds_hash_index *) stbds_header(raw_a)->hash_table; + stbds_temp(raw_a) = 0; + if (table == 0) { + return a; + } else { + ptrdiff_t slot; + slot = stbds_hm_find_slot(a, elemsize, key, keysize, keyoffset, mode); + if (slot < 0) + return a; + else { + stbds_hash_bucket *b = &table->storage[slot >> STBDS_BUCKET_SHIFT]; + int i = slot & STBDS_BUCKET_MASK; + ptrdiff_t old_index = b->index[i]; + ptrdiff_t final_index = (ptrdiff_t) stbds_arrlen(raw_a)-1-1; // minus one for the raw_a vs a, and minus one for 'last' + STBDS_ASSERT(slot < (ptrdiff_t) table->slot_count); + --table->used_count; + ++table->tombstone_count; + stbds_temp(raw_a) = 1; + STBDS_ASSERT(table->used_count >= 0); + //STBDS_ASSERT(table->tombstone_count < table->slot_count/4); + b->hash[i] = STBDS_HASH_DELETED; + b->index[i] = STBDS_INDEX_DELETED; + + if (mode == STBDS_HM_STRING && table->string.mode == STBDS_SH_STRDUP) + STBDS_FREE(NULL, *(char**) ((char *) a+elemsize*old_index)); + + // if indices are the same, memcpy is a no-op, but back-pointer-fixup will fail, so skip + if (old_index != final_index) { + // swap delete + memmove((char*) a + elemsize*old_index, (char*) a + elemsize*final_index, elemsize); + + // now find the slot for the last element + if (mode == STBDS_HM_STRING) + slot = stbds_hm_find_slot(a, elemsize, *(char**) ((char *) a+elemsize*old_index + keyoffset), keysize, keyoffset, mode); + else + slot = stbds_hm_find_slot(a, elemsize, (char* ) a+elemsize*old_index + keyoffset, keysize, keyoffset, mode); + STBDS_ASSERT(slot >= 0); + b = &table->storage[slot >> STBDS_BUCKET_SHIFT]; + i = slot & STBDS_BUCKET_MASK; + STBDS_ASSERT(b->index[i] == final_index); + b->index[i] = old_index; + } + stbds_header(raw_a)->length -= 1; + + if (table->used_count < table->used_count_shrink_threshold && table->slot_count > STBDS_BUCKET_LENGTH) { + stbds_header(raw_a)->hash_table = stbds_make_hash_index(table->slot_count>>1, table); + STBDS_FREE(NULL, table); + STBDS_STATS(++stbds_hash_shrink); + } else if (table->tombstone_count > table->tombstone_count_threshold) { + stbds_header(raw_a)->hash_table = stbds_make_hash_index(table->slot_count , table); + STBDS_FREE(NULL, table); + STBDS_STATS(++stbds_hash_rebuild); + } + + return a; + } + } + } + /* NOTREACHED */ +} + +static char *stbds_strdup(char *str) +{ + // to keep replaceable allocator simple, we don't want to use strdup. + // rolling our own also avoids problem of strdup vs _strdup + size_t len = strlen(str)+1; + char *p = (char*) STBDS_REALLOC(NULL, 0, len); + memmove(p, str, len); + return p; +} + +#ifndef STBDS_STRING_ARENA_BLOCKSIZE_MIN +#define STBDS_STRING_ARENA_BLOCKSIZE_MIN 512u +#endif +#ifndef STBDS_STRING_ARENA_BLOCKSIZE_MAX +#define STBDS_STRING_ARENA_BLOCKSIZE_MAX (1u<<20) +#endif + +char *stbds_stralloc(stbds_string_arena *a, char *str) +{ + char *p; + size_t len = strlen(str)+1; + if (len > a->remaining) { + // compute the next blocksize + size_t blocksize = a->block; + + // size is 512, 512, 1024, 1024, 2048, 2048, 4096, 4096, etc., so that + // there are log(SIZE) allocations to free when we destroy the table + blocksize = (size_t) (STBDS_STRING_ARENA_BLOCKSIZE_MIN) << (blocksize>>1); + + // if size is under 1M, advance to next blocktype + if (blocksize < (size_t)(STBDS_STRING_ARENA_BLOCKSIZE_MAX)) + ++a->block; + + if (len > blocksize) { + // if string is larger than blocksize, then just allocate the full size. + // note that we still advance string_block so block size will continue + // increasing, so e.g. if somebody only calls this with 1000-long strings, + // eventually the arena will start doubling and handling those as well + stbds_string_block *sb = (stbds_string_block *) STBDS_REALLOC(NULL, 0, sizeof(*sb)-8 + len); + memmove(sb->storage, str, len); + if (a->storage) { + // insert it after the first element, so that we don't waste the space there + sb->next = a->storage->next; + a->storage->next = sb; + } else { + sb->next = 0; + a->storage = sb; + a->remaining = 0; // this is redundant, but good for clarity + } + return sb->storage; + } else { + stbds_string_block *sb = (stbds_string_block *) STBDS_REALLOC(NULL, 0, sizeof(*sb)-8 + blocksize); + sb->next = a->storage; + a->storage = sb; + a->remaining = blocksize; + } + } + + STBDS_ASSERT(len <= a->remaining); + p = a->storage->storage + a->remaining - len; + a->remaining -= len; + memmove(p, str, len); + return p; +} + +void stbds_strreset(stbds_string_arena *a) +{ + stbds_string_block *x,*y; + x = a->storage; + while (x) { + y = x->next; + STBDS_FREE(NULL, x); + x = y; + } + memset(a, 0, sizeof(*a)); +} + +#endif + +////////////////////////////////////////////////////////////////////////////// +// +// UNIT TESTS +// + +#ifdef STBDS_UNIT_TESTS +#include +#ifdef STBDS_ASSERT_WAS_UNDEFINED +#undef STBDS_ASSERT +#endif +#ifndef STBDS_ASSERT +#define STBDS_ASSERT assert +#include +#endif + +typedef struct { int key,b,c,d; } stbds_struct; +typedef struct { int key[2],b,c,d; } stbds_struct2; + +static char buffer[256]; +char *strkey(int n) +{ +#if defined(_WIN32) && defined(__STDC_WANT_SECURE_LIB__) + sprintf_s(buffer, sizeof(buffer), "test_%d", n); +#else + sprintf(buffer, "test_%d", n); +#endif + return buffer; +} + +void stbds_unit_tests(void) +{ +#if defined(_MSC_VER) && _MSC_VER <= 1200 && defined(__cplusplus) + // VC6 C++ doesn't like the template<> trick on unnamed structures, so do nothing! + STBDS_ASSERT(0); +#else + const int testsize = 100000; + const int testsize2 = testsize/20; + int *arr=NULL; + struct { int key; int value; } *intmap = NULL; + struct { char *key; int value; } *strmap = NULL, s; + struct { stbds_struct key; int value; } *map = NULL; + stbds_struct *map2 = NULL; + stbds_struct2 *map3 = NULL; + stbds_string_arena sa = { 0 }; + int key3[2] = { 1,2 }; + ptrdiff_t temp; + + int i,j; + + STBDS_ASSERT(arrlen(arr)==0); + for (i=0; i < 20000; i += 50) { + for (j=0; j < i; ++j) + arrpush(arr,j); + arrfree(arr); + } + + for (i=0; i < 4; ++i) { + arrpush(arr,1); arrpush(arr,2); arrpush(arr,3); arrpush(arr,4); + arrdel(arr,i); + arrfree(arr); + arrpush(arr,1); arrpush(arr,2); arrpush(arr,3); arrpush(arr,4); + arrdelswap(arr,i); + arrfree(arr); + } + + for (i=0; i < 5; ++i) { + arrpush(arr,1); arrpush(arr,2); arrpush(arr,3); arrpush(arr,4); + stbds_arrins(arr,i,5); + STBDS_ASSERT(arr[i] == 5); + if (i < 4) + STBDS_ASSERT(arr[4] == 4); + arrfree(arr); + } + + i = 1; + STBDS_ASSERT(hmgeti(intmap,i) == -1); + hmdefault(intmap, -2); + STBDS_ASSERT(hmgeti(intmap, i) == -1); + STBDS_ASSERT(hmget (intmap, i) == -2); + for (i=0; i < testsize; i+=2) + hmput(intmap, i, i*5); + for (i=0; i < testsize; i+=1) { + if (i & 1) STBDS_ASSERT(hmget(intmap, i) == -2 ); + else STBDS_ASSERT(hmget(intmap, i) == i*5); + if (i & 1) STBDS_ASSERT(hmget_ts(intmap, i, temp) == -2 ); + else STBDS_ASSERT(hmget_ts(intmap, i, temp) == i*5); + } + for (i=0; i < testsize; i+=2) + hmput(intmap, i, i*3); + for (i=0; i < testsize; i+=1) + if (i & 1) STBDS_ASSERT(hmget(intmap, i) == -2 ); + else STBDS_ASSERT(hmget(intmap, i) == i*3); + for (i=2; i < testsize; i+=4) + hmdel(intmap, i); // delete half the entries + for (i=0; i < testsize; i+=1) + if (i & 3) STBDS_ASSERT(hmget(intmap, i) == -2 ); + else STBDS_ASSERT(hmget(intmap, i) == i*3); + for (i=0; i < testsize; i+=1) + hmdel(intmap, i); // delete the rest of the entries + for (i=0; i < testsize; i+=1) + STBDS_ASSERT(hmget(intmap, i) == -2 ); + hmfree(intmap); + for (i=0; i < testsize; i+=2) + hmput(intmap, i, i*3); + hmfree(intmap); + + #if defined(__clang__) || defined(__GNUC__) + #ifndef __cplusplus + intmap = NULL; + hmput(intmap, 15, 7); + hmput(intmap, 11, 3); + hmput(intmap, 9, 5); + STBDS_ASSERT(hmget(intmap, 9) == 5); + STBDS_ASSERT(hmget(intmap, 11) == 3); + STBDS_ASSERT(hmget(intmap, 15) == 7); + #endif + #endif + + for (i=0; i < testsize; ++i) + stralloc(&sa, strkey(i)); + strreset(&sa); + + { + s.key = "a", s.value = 1; + shputs(strmap, s); + STBDS_ASSERT(*strmap[0].key == 'a'); + STBDS_ASSERT(strmap[0].key == s.key); + STBDS_ASSERT(strmap[0].value == s.value); + shfree(strmap); + } + + { + s.key = "a", s.value = 1; + sh_new_strdup(strmap); + shputs(strmap, s); + STBDS_ASSERT(*strmap[0].key == 'a'); + STBDS_ASSERT(strmap[0].key != s.key); + STBDS_ASSERT(strmap[0].value == s.value); + shfree(strmap); + } + + { + s.key = "a", s.value = 1; + sh_new_arena(strmap); + shputs(strmap, s); + STBDS_ASSERT(*strmap[0].key == 'a'); + STBDS_ASSERT(strmap[0].key != s.key); + STBDS_ASSERT(strmap[0].value == s.value); + shfree(strmap); + } + + for (j=0; j < 2; ++j) { + STBDS_ASSERT(shgeti(strmap,"foo") == -1); + if (j == 0) + sh_new_strdup(strmap); + else + sh_new_arena(strmap); + STBDS_ASSERT(shgeti(strmap,"foo") == -1); + shdefault(strmap, -2); + STBDS_ASSERT(shgeti(strmap,"foo") == -1); + for (i=0; i < testsize; i+=2) + shput(strmap, strkey(i), i*3); + for (i=0; i < testsize; i+=1) + if (i & 1) STBDS_ASSERT(shget(strmap, strkey(i)) == -2 ); + else STBDS_ASSERT(shget(strmap, strkey(i)) == i*3); + for (i=2; i < testsize; i+=4) + shdel(strmap, strkey(i)); // delete half the entries + for (i=0; i < testsize; i+=1) + if (i & 3) STBDS_ASSERT(shget(strmap, strkey(i)) == -2 ); + else STBDS_ASSERT(shget(strmap, strkey(i)) == i*3); + for (i=0; i < testsize; i+=1) + shdel(strmap, strkey(i)); // delete the rest of the entries + for (i=0; i < testsize; i+=1) + STBDS_ASSERT(shget(strmap, strkey(i)) == -2 ); + shfree(strmap); + } + + { + struct { char *key; char value; } *hash = NULL; + char name[4] = "jen"; + shput(hash, "bob" , 'h'); + shput(hash, "sally" , 'e'); + shput(hash, "fred" , 'l'); + shput(hash, "jen" , 'x'); + shput(hash, "doug" , 'o'); + + shput(hash, name , 'l'); + shfree(hash); + } + + for (i=0; i < testsize; i += 2) { + stbds_struct s = { i,i*2,i*3,i*4 }; + hmput(map, s, i*5); + } + + for (i=0; i < testsize; i += 1) { + stbds_struct s = { i,i*2,i*3 ,i*4 }; + stbds_struct t = { i,i*2,i*3+1,i*4 }; + if (i & 1) STBDS_ASSERT(hmget(map, s) == 0); + else STBDS_ASSERT(hmget(map, s) == i*5); + if (i & 1) STBDS_ASSERT(hmget_ts(map, s, temp) == 0); + else STBDS_ASSERT(hmget_ts(map, s, temp) == i*5); + //STBDS_ASSERT(hmget(map, t.key) == 0); + } + + for (i=0; i < testsize; i += 2) { + stbds_struct s = { i,i*2,i*3,i*4 }; + hmputs(map2, s); + } + hmfree(map); + + for (i=0; i < testsize; i += 1) { + stbds_struct s = { i,i*2,i*3,i*4 }; + stbds_struct t = { i,i*2,i*3+1,i*4 }; + if (i & 1) STBDS_ASSERT(hmgets(map2, s.key).d == 0); + else STBDS_ASSERT(hmgets(map2, s.key).d == i*4); + //STBDS_ASSERT(hmgetp(map2, t.key) == 0); + } + hmfree(map2); + + for (i=0; i < testsize; i += 2) { + stbds_struct2 s = { { i,i*2 }, i*3,i*4, i*5 }; + hmputs(map3, s); + } + for (i=0; i < testsize; i += 1) { + stbds_struct2 s = { { i,i*2}, i*3, i*4, i*5 }; + stbds_struct2 t = { { i,i*2}, i*3+1, i*4, i*5 }; + if (i & 1) STBDS_ASSERT(hmgets(map3, s.key).d == 0); + else STBDS_ASSERT(hmgets(map3, s.key).d == i*5); + //STBDS_ASSERT(hmgetp(map3, t.key) == 0); + } +#endif +} +#endif + + +/* +------------------------------------------------------------------------------ +This software is available under 2 licenses -- choose whichever you prefer. +------------------------------------------------------------------------------ +ALTERNATIVE A - MIT License +Copyright (c) 2019 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 +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. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +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 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/widget/milsko/milskosrc/external/stb_image.c b/widget/milsko/milskosrc/external/stb_image.c new file mode 100644 index 0000000000..cd4c8b0441 --- /dev/null +++ b/widget/milsko/milskosrc/external/stb_image.c @@ -0,0 +1,4 @@ +#ifdef USE_STB_IMAGE +#define STB_IMAGE_IMPLEMENTATION +#include "stb_image.h" +#endif diff --git a/widget/milsko/milskosrc/external/stb_image.h b/widget/milsko/milskosrc/external/stb_image.h new file mode 100644 index 0000000000..6eac58c8d8 --- /dev/null +++ b/widget/milsko/milskosrc/external/stb_image.h @@ -0,0 +1,7988 @@ +/* stb_image - v2.30 - public domain image loader - http://nothings.org/stb + no warranty implied; use at your own risk + + Do this: + #define STB_IMAGE_IMPLEMENTATION + before you include this file in *one* C or C++ file to create the implementation. + + // i.e. it should look like this: + #include ... + #include ... + #include ... + #define STB_IMAGE_IMPLEMENTATION + #include "stb_image.h" + + You can #define STBI_ASSERT(x) before the #include to avoid using assert.h. + And #define STBI_MALLOC, STBI_REALLOC, and STBI_FREE to avoid using malloc,realloc,free + + + QUICK NOTES: + Primarily of interest to game developers and other people who can + avoid problematic images and only need the trivial interface + + JPEG baseline & progressive (12 bpc/arithmetic not supported, same as stock IJG lib) + PNG 1/2/4/8/16-bit-per-channel + + TGA (not sure what subset, if a subset) + BMP non-1bpp, non-RLE + PSD (composited view only, no extra channels, 8/16 bit-per-channel) + + GIF (*comp always reports as 4-channel) + HDR (radiance rgbE format) + PIC (Softimage PIC) + PNM (PPM and PGM binary only) + + Animated GIF still needs a proper API, but here's one way to do it: + http://gist.github.com/urraka/685d9a6340b26b830d49 + + - decode from memory or through FILE (define STBI_NO_STDIO to remove code) + - decode from arbitrary I/O callbacks + - SIMD acceleration on x86/x64 (SSE2) and ARM (NEON) + + Full documentation under "DOCUMENTATION" below. + + +LICENSE + + See end of file for license information. + +RECENT REVISION HISTORY: + + 2.30 (2024-05-31) avoid erroneous gcc warning + 2.29 (2023-05-xx) optimizations + 2.28 (2023-01-29) many error fixes, security errors, just tons of stuff + 2.27 (2021-07-11) document stbi_info better, 16-bit PNM support, bug fixes + 2.26 (2020-07-13) many minor fixes + 2.25 (2020-02-02) fix warnings + 2.24 (2020-02-02) fix warnings; thread-local failure_reason and flip_vertically + 2.23 (2019-08-11) fix clang static analysis warning + 2.22 (2019-03-04) gif fixes, fix warnings + 2.21 (2019-02-25) fix typo in comment + 2.20 (2019-02-07) support utf8 filenames in Windows; fix warnings and platform ifdefs + 2.19 (2018-02-11) fix warning + 2.18 (2018-01-30) fix warnings + 2.17 (2018-01-29) bugfix, 1-bit BMP, 16-bitness query, fix warnings + 2.16 (2017-07-23) all functions have 16-bit variants; optimizations; bugfixes + 2.15 (2017-03-18) fix png-1,2,4; all Imagenet JPGs; no runtime SSE detection on GCC + 2.14 (2017-03-03) remove deprecated STBI_JPEG_OLD; fixes for Imagenet JPGs + 2.13 (2016-12-04) experimental 16-bit API, only for PNG so far; fixes + 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes + 2.11 (2016-04-02) 16-bit PNGS; enable SSE2 in non-gcc x64 + RGB-format JPEG; remove white matting in PSD; + allocate large structures on the stack; + correct channel count for PNG & BMP + 2.10 (2016-01-22) avoid warning introduced in 2.09 + 2.09 (2016-01-16) 16-bit TGA; comments in PNM files; STBI_REALLOC_SIZED + + See end of file for full revision history. + + + ============================ Contributors ========================= + + Image formats Extensions, features + Sean Barrett (jpeg, png, bmp) Jetro Lauha (stbi_info) + Nicolas Schulz (hdr, psd) Martin "SpartanJ" Golini (stbi_info) + Jonathan Dummer (tga) James "moose2000" Brown (iPhone PNG) + Jean-Marc Lienher (gif) Ben "Disch" Wenger (io callbacks) + Tom Seddon (pic) Omar Cornut (1/2/4-bit PNG) + Thatcher Ulrich (psd) Nicolas Guillemot (vertical flip) + Ken Miller (pgm, ppm) Richard Mitton (16-bit PSD) + github:urraka (animated gif) Junggon Kim (PNM comments) + Christopher Forseth (animated gif) Daniel Gibson (16-bit TGA) + socks-the-fox (16-bit PNG) + Jeremy Sawicki (handle all ImageNet JPGs) + Optimizations & bugfixes Mikhail Morozov (1-bit BMP) + Fabian "ryg" Giesen Anael Seghezzi (is-16-bit query) + Arseny Kapoulkine Simon Breuss (16-bit PNM) + John-Mark Allen + Carmelo J Fdez-Aguera + + Bug & warning fixes + Marc LeBlanc David Woo Guillaume George Martins Mozeiko + Christpher Lloyd Jerry Jansson Joseph Thomson Blazej Dariusz Roszkowski + Phil Jordan Dave Moore Roy Eltham + Hayaki Saito Nathan Reed Won Chun + Luke Graham Johan Duparc Nick Verigakis the Horde3D community + Thomas Ruf Ronny Chevalier github:rlyeh + Janez Zemva John Bartholomew Michal Cichon github:romigrou + Jonathan Blow Ken Hamada Tero Hanninen github:svdijk + Eugene Golushkov Laurent Gomila Cort Stratton github:snagar + Aruelien Pocheville Sergio Gonzalez Thibault Reuille github:Zelex + Cass Everitt Ryamond Barbiero github:grim210 + Paul Du Bois Engin Manap Aldo Culquicondor github:sammyhw + Philipp Wiesemann Dale Weiler Oriol Ferrer Mesia github:phprus + Josh Tobin Neil Bickford Matthew Gregan github:poppolopoppo + Julian Raschke Gregory Mullen Christian Floisand github:darealshinji + Baldur Karlsson Kevin Schmidt JR Smith github:Michaelangel007 + Brad Weinberger Matvey Cherevko github:mosra + Luca Sas Alexander Veselov Zack Middleton [reserved] + Ryan C. Gordon [reserved] [reserved] + DO NOT ADD YOUR NAME HERE + + Jacko Dirks + + To add your name to the credits, pick a random blank space in the middle and fill it. + 80% of merge conflicts on stb PRs are due to people adding their name at the end + of the credits. +*/ + +#ifndef STBI_INCLUDE_STB_IMAGE_H +#define STBI_INCLUDE_STB_IMAGE_H + +// DOCUMENTATION +// +// Limitations: +// - no 12-bit-per-channel JPEG +// - no JPEGs with arithmetic coding +// - GIF always returns *comp=4 +// +// Basic usage (see HDR discussion below for HDR usage): +// int x,y,n; +// unsigned char *data = stbi_load(filename, &x, &y, &n, 0); +// // ... process data if not NULL ... +// // ... x = width, y = height, n = # 8-bit components per pixel ... +// // ... replace '0' with '1'..'4' to force that many components per pixel +// // ... but 'n' will always be the number that it would have been if you said 0 +// stbi_image_free(data); +// +// Standard parameters: +// int *x -- outputs image width in pixels +// int *y -- outputs image height in pixels +// int *channels_in_file -- outputs # of image components in image file +// int desired_channels -- if non-zero, # of image components requested in result +// +// The return value from an image loader is an 'unsigned char *' which points +// to the pixel data, or NULL on an allocation failure or if the image is +// corrupt or invalid. The pixel data consists of *y scanlines of *x pixels, +// with each pixel consisting of N interleaved 8-bit components; the first +// pixel pointed to is top-left-most in the image. There is no padding between +// image scanlines or between pixels, regardless of format. The number of +// components N is 'desired_channels' if desired_channels is non-zero, or +// *channels_in_file otherwise. If desired_channels is non-zero, +// *channels_in_file has the number of components that _would_ have been +// output otherwise. E.g. if you set desired_channels to 4, you will always +// get RGBA output, but you can check *channels_in_file to see if it's trivially +// opaque because e.g. there were only 3 channels in the source image. +// +// An output image with N components has the following components interleaved +// in this order in each pixel: +// +// N=#comp components +// 1 grey +// 2 grey, alpha +// 3 red, green, blue +// 4 red, green, blue, alpha +// +// If image loading fails for any reason, the return value will be NULL, +// and *x, *y, *channels_in_file will be unchanged. The function +// stbi_failure_reason() can be queried for an extremely brief, end-user +// unfriendly explanation of why the load failed. Define STBI_NO_FAILURE_STRINGS +// to avoid compiling these strings at all, and STBI_FAILURE_USERMSG to get slightly +// more user-friendly ones. +// +// Paletted PNG, BMP, GIF, and PIC images are automatically depalettized. +// +// To query the width, height and component count of an image without having to +// decode the full file, you can use the stbi_info family of functions: +// +// int x,y,n,ok; +// ok = stbi_info(filename, &x, &y, &n); +// // returns ok=1 and sets x, y, n if image is a supported format, +// // 0 otherwise. +// +// Note that stb_image pervasively uses ints in its public API for sizes, +// including sizes of memory buffers. This is now part of the API and thus +// hard to change without causing breakage. As a result, the various image +// loaders all have certain limits on image size; these differ somewhat +// by format but generally boil down to either just under 2GB or just under +// 1GB. When the decoded image would be larger than this, stb_image decoding +// will fail. +// +// Additionally, stb_image will reject image files that have any of their +// dimensions set to a larger value than the configurable STBI_MAX_DIMENSIONS, +// which defaults to 2**24 = 16777216 pixels. Due to the above memory limit, +// the only way to have an image with such dimensions load correctly +// is for it to have a rather extreme aspect ratio. Either way, the +// assumption here is that such larger images are likely to be malformed +// or malicious. If you do need to load an image with individual dimensions +// larger than that, and it still fits in the overall size limit, you can +// #define STBI_MAX_DIMENSIONS on your own to be something larger. +// +// =========================================================================== +// +// UNICODE: +// +// If compiling for Windows and you wish to use Unicode filenames, compile +// with +// #define STBI_WINDOWS_UTF8 +// and pass utf8-encoded filenames. Call stbi_convert_wchar_to_utf8 to convert +// Windows wchar_t filenames to utf8. +// +// =========================================================================== +// +// Philosophy +// +// stb libraries are designed with the following priorities: +// +// 1. easy to use +// 2. easy to maintain +// 3. good performance +// +// Sometimes I let "good performance" creep up in priority over "easy to maintain", +// and for best performance I may provide less-easy-to-use APIs that give higher +// performance, in addition to the easy-to-use ones. Nevertheless, it's important +// to keep in mind that from the standpoint of you, a client of this library, +// all you care about is #1 and #3, and stb libraries DO NOT emphasize #3 above all. +// +// Some secondary priorities arise directly from the first two, some of which +// provide more explicit reasons why performance can't be emphasized. +// +// - Portable ("ease of use") +// - Small source code footprint ("easy to maintain") +// - No dependencies ("ease of use") +// +// =========================================================================== +// +// I/O callbacks +// +// I/O callbacks allow you to read from arbitrary sources, like packaged +// files or some other source. Data read from callbacks are processed +// through a small internal buffer (currently 128 bytes) to try to reduce +// overhead. +// +// The three functions you must define are "read" (reads some bytes of data), +// "skip" (skips some bytes of data), "eof" (reports if the stream is at the end). +// +// =========================================================================== +// +// SIMD support +// +// The JPEG decoder will try to automatically use SIMD kernels on x86 when +// supported by the compiler. For ARM Neon support, you must explicitly +// request it. +// +// (The old do-it-yourself SIMD API is no longer supported in the current +// code.) +// +// On x86, SSE2 will automatically be used when available based on a run-time +// test; if not, the generic C versions are used as a fall-back. On ARM targets, +// the typical path is to have separate builds for NEON and non-NEON devices +// (at least this is true for iOS and Android). Therefore, the NEON support is +// toggled by a build flag: define STBI_NEON to get NEON loops. +// +// If for some reason you do not want to use any of SIMD code, or if +// you have issues compiling it, you can disable it entirely by +// defining STBI_NO_SIMD. +// +// =========================================================================== +// +// HDR image support (disable by defining STBI_NO_HDR) +// +// stb_image supports loading HDR images in general, and currently the Radiance +// .HDR file format specifically. You can still load any file through the existing +// interface; if you attempt to load an HDR file, it will be automatically remapped +// to LDR, assuming gamma 2.2 and an arbitrary scale factor defaulting to 1; +// both of these constants can be reconfigured through this interface: +// +// stbi_hdr_to_ldr_gamma(2.2f); +// stbi_hdr_to_ldr_scale(1.0f); +// +// (note, do not use _inverse_ constants; stbi_image will invert them +// appropriately). +// +// Additionally, there is a new, parallel interface for loading files as +// (linear) floats to preserve the full dynamic range: +// +// float *data = stbi_loadf(filename, &x, &y, &n, 0); +// +// If you load LDR images through this interface, those images will +// be promoted to floating point values, run through the inverse of +// constants corresponding to the above: +// +// stbi_ldr_to_hdr_scale(1.0f); +// stbi_ldr_to_hdr_gamma(2.2f); +// +// Finally, given a filename (or an open file or memory block--see header +// file for details) containing image data, you can query for the "most +// appropriate" interface to use (that is, whether the image is HDR or +// not), using: +// +// stbi_is_hdr(char *filename); +// +// =========================================================================== +// +// iPhone PNG support: +// +// We optionally support converting iPhone-formatted PNGs (which store +// premultiplied BGRA) back to RGB, even though they're internally encoded +// differently. To enable this conversion, call +// stbi_convert_iphone_png_to_rgb(1). +// +// Call stbi_set_unpremultiply_on_load(1) as well to force a divide per +// pixel to remove any premultiplied alpha *only* if the image file explicitly +// says there's premultiplied data (currently only happens in iPhone images, +// and only if iPhone convert-to-rgb processing is on). +// +// =========================================================================== +// +// ADDITIONAL CONFIGURATION +// +// - You can suppress implementation of any of the decoders to reduce +// your code footprint by #defining one or more of the following +// symbols before creating the implementation. +// +// STBI_NO_JPEG +// STBI_NO_PNG +// STBI_NO_BMP +// STBI_NO_PSD +// STBI_NO_TGA +// STBI_NO_GIF +// STBI_NO_HDR +// STBI_NO_PIC +// STBI_NO_PNM (.ppm and .pgm) +// +// - You can request *only* certain decoders and suppress all other ones +// (this will be more forward-compatible, as addition of new decoders +// doesn't require you to disable them explicitly): +// +// STBI_ONLY_JPEG +// STBI_ONLY_PNG +// STBI_ONLY_BMP +// STBI_ONLY_PSD +// STBI_ONLY_TGA +// STBI_ONLY_GIF +// STBI_ONLY_HDR +// STBI_ONLY_PIC +// STBI_ONLY_PNM (.ppm and .pgm) +// +// - If you use STBI_NO_PNG (or _ONLY_ without PNG), and you still +// want the zlib decoder to be available, #define STBI_SUPPORT_ZLIB +// +// - If you define STBI_MAX_DIMENSIONS, stb_image will reject images greater +// than that size (in either width or height) without further processing. +// This is to let programs in the wild set an upper bound to prevent +// denial-of-service attacks on untrusted data, as one could generate a +// valid image of gigantic dimensions and force stb_image to allocate a +// huge block of memory and spend disproportionate time decoding it. By +// default this is set to (1 << 24), which is 16777216, but that's still +// very big. + +#ifndef STBI_NO_STDIO +#include +#endif // STBI_NO_STDIO + +#define STBI_VERSION 1 + +enum +{ + STBI_default = 0, // only used for desired_channels + + STBI_grey = 1, + STBI_grey_alpha = 2, + STBI_rgb = 3, + STBI_rgb_alpha = 4 +}; + +#include +typedef unsigned char stbi_uc; +typedef unsigned short stbi_us; + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef STBIDEF +#ifdef STB_IMAGE_STATIC +#define STBIDEF static +#else +#define STBIDEF extern +#endif +#endif + +////////////////////////////////////////////////////////////////////////////// +// +// PRIMARY API - works on images of any type +// + +// +// load image by filename, open file, or memory buffer +// + +typedef struct +{ + int (*read) (void *user,char *data,int size); // fill 'data' with 'size' bytes. return number of bytes actually read + void (*skip) (void *user,int n); // skip the next 'n' bytes, or 'unget' the last -n bytes if negative + int (*eof) (void *user); // returns nonzero if we are at end of file/data +} stbi_io_callbacks; + +//////////////////////////////////// +// +// 8-bits-per-channel interface +// + +STBIDEF stbi_uc *stbi_load_from_memory (stbi_uc const *buffer, int len , int *x, int *y, int *channels_in_file, int desired_channels); +STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk , void *user, int *x, int *y, int *channels_in_file, int desired_channels); + +#ifndef STBI_NO_STDIO +STBIDEF stbi_uc *stbi_load (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels); +STBIDEF stbi_uc *stbi_load_from_file (FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); +// for stbi_load_from_file, file pointer is left pointing immediately after image +#endif + +#ifndef STBI_NO_GIF +STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp); +#endif + +#ifdef STBI_WINDOWS_UTF8 +STBIDEF int stbi_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input); +#endif + +//////////////////////////////////// +// +// 16-bits-per-channel interface +// + +STBIDEF stbi_us *stbi_load_16_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels); +STBIDEF stbi_us *stbi_load_16_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels); + +#ifndef STBI_NO_STDIO +STBIDEF stbi_us *stbi_load_16 (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels); +STBIDEF stbi_us *stbi_load_from_file_16(FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); +#endif + +//////////////////////////////////// +// +// float-per-channel interface +// +#ifndef STBI_NO_LINEAR + STBIDEF float *stbi_loadf_from_memory (stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels); + STBIDEF float *stbi_loadf_from_callbacks (stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels); + + #ifndef STBI_NO_STDIO + STBIDEF float *stbi_loadf (char const *filename, int *x, int *y, int *channels_in_file, int desired_channels); + STBIDEF float *stbi_loadf_from_file (FILE *f, int *x, int *y, int *channels_in_file, int desired_channels); + #endif +#endif + +#ifndef STBI_NO_HDR + STBIDEF void stbi_hdr_to_ldr_gamma(float gamma); + STBIDEF void stbi_hdr_to_ldr_scale(float scale); +#endif // STBI_NO_HDR + +#ifndef STBI_NO_LINEAR + STBIDEF void stbi_ldr_to_hdr_gamma(float gamma); + STBIDEF void stbi_ldr_to_hdr_scale(float scale); +#endif // STBI_NO_LINEAR + +// stbi_is_hdr is always defined, but always returns false if STBI_NO_HDR +STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user); +STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len); +#ifndef STBI_NO_STDIO +STBIDEF int stbi_is_hdr (char const *filename); +STBIDEF int stbi_is_hdr_from_file(FILE *f); +#endif // STBI_NO_STDIO + + +// get a VERY brief reason for failure +// on most compilers (and ALL modern mainstream compilers) this is threadsafe +STBIDEF const char *stbi_failure_reason (void); + +// free the loaded image -- this is just free() +STBIDEF void stbi_image_free (void *retval_from_stbi_load); + +// get image dimensions & components without fully decoding +STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp); +STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp); +STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len); +STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const *clbk, void *user); + +#ifndef STBI_NO_STDIO +STBIDEF int stbi_info (char const *filename, int *x, int *y, int *comp); +STBIDEF int stbi_info_from_file (FILE *f, int *x, int *y, int *comp); +STBIDEF int stbi_is_16_bit (char const *filename); +STBIDEF int stbi_is_16_bit_from_file(FILE *f); +#endif + + + +// for image formats that explicitly notate that they have premultiplied alpha, +// we just return the colors as stored in the file. set this flag to force +// unpremultiplication. results are undefined if the unpremultiply overflow. +STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply); + +// indicate whether we should process iphone images back to canonical format, +// or just pass them through "as-is" +STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert); + +// flip the image vertically, so the first pixel in the output array is the bottom left +STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip); + +// as above, but only applies to images loaded on the thread that calls the function +// this function is only available if your compiler supports thread-local variables; +// calling it will fail to link if your compiler doesn't +STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply); +STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert); +STBIDEF void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_flip); + +// ZLIB client - used by PNG, available for other purposes + +STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen); +STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header); +STBIDEF char *stbi_zlib_decode_malloc(const char *buffer, int len, int *outlen); +STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, const char *ibuffer, int ilen); + +STBIDEF char *stbi_zlib_decode_noheader_malloc(const char *buffer, int len, int *outlen); +STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen); + + +#ifdef __cplusplus +} +#endif + +// +// +//// end header file ///////////////////////////////////////////////////// +#endif // STBI_INCLUDE_STB_IMAGE_H + +#ifdef STB_IMAGE_IMPLEMENTATION + +#if defined(STBI_ONLY_JPEG) || defined(STBI_ONLY_PNG) || defined(STBI_ONLY_BMP) \ + || defined(STBI_ONLY_TGA) || defined(STBI_ONLY_GIF) || defined(STBI_ONLY_PSD) \ + || defined(STBI_ONLY_HDR) || defined(STBI_ONLY_PIC) || defined(STBI_ONLY_PNM) \ + || defined(STBI_ONLY_ZLIB) + #ifndef STBI_ONLY_JPEG + #define STBI_NO_JPEG + #endif + #ifndef STBI_ONLY_PNG + #define STBI_NO_PNG + #endif + #ifndef STBI_ONLY_BMP + #define STBI_NO_BMP + #endif + #ifndef STBI_ONLY_PSD + #define STBI_NO_PSD + #endif + #ifndef STBI_ONLY_TGA + #define STBI_NO_TGA + #endif + #ifndef STBI_ONLY_GIF + #define STBI_NO_GIF + #endif + #ifndef STBI_ONLY_HDR + #define STBI_NO_HDR + #endif + #ifndef STBI_ONLY_PIC + #define STBI_NO_PIC + #endif + #ifndef STBI_ONLY_PNM + #define STBI_NO_PNM + #endif +#endif + +#if defined(STBI_NO_PNG) && !defined(STBI_SUPPORT_ZLIB) && !defined(STBI_NO_ZLIB) +#define STBI_NO_ZLIB +#endif + + +#include +#include // ptrdiff_t on osx +#include +#include +#include + +#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) +#include // ldexp, pow +#endif + +#ifndef STBI_NO_STDIO +#include +#endif + +#ifndef STBI_ASSERT +#include +#define STBI_ASSERT(x) assert(x) +#endif + +#ifdef __cplusplus +#define STBI_EXTERN extern "C" +#else +#define STBI_EXTERN extern +#endif + + +#ifndef _MSC_VER + #ifdef __cplusplus + #define stbi_inline inline + #else + #define stbi_inline + #endif +#else + #define stbi_inline __forceinline +#endif + +#ifndef STBI_NO_THREAD_LOCALS + #if defined(__cplusplus) && __cplusplus >= 201103L + #define STBI_THREAD_LOCAL thread_local + #elif defined(__GNUC__) && __GNUC__ < 5 + #define STBI_THREAD_LOCAL __thread + #elif defined(_MSC_VER) + #define STBI_THREAD_LOCAL __declspec(thread) + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__STDC_NO_THREADS__) + #define STBI_THREAD_LOCAL _Thread_local + #endif + + #ifndef STBI_THREAD_LOCAL + #if defined(__GNUC__) + #define STBI_THREAD_LOCAL __thread + #endif + #endif +#endif + +#if defined(_MSC_VER) || defined(__SYMBIAN32__) || defined(__BORLANDC__) +typedef unsigned short stbi__uint16; +typedef signed short stbi__int16; +typedef unsigned int stbi__uint32; +typedef signed int stbi__int32; +#else +#include +typedef uint16_t stbi__uint16; +typedef int16_t stbi__int16; +typedef uint32_t stbi__uint32; +typedef int32_t stbi__int32; +#endif + +// should produce compiler error if size is wrong +typedef unsigned char validate_uint32[sizeof(stbi__uint32)==4 ? 1 : -1]; + +#ifdef _MSC_VER +#define STBI_NOTUSED(v) (void)(v) +#else +#define STBI_NOTUSED(v) (void)sizeof(v) +#endif + +#ifdef _MSC_VER +#define STBI_HAS_LROTL +#endif + +#ifdef STBI_HAS_LROTL + #define stbi_lrot(x,y) _lrotl(x,y) +#else + #define stbi_lrot(x,y) (((x) << (y)) | ((x) >> (-(y) & 31))) +#endif + +#if defined(STBI_MALLOC) && defined(STBI_FREE) && (defined(STBI_REALLOC) || defined(STBI_REALLOC_SIZED)) +// ok +#elif !defined(STBI_MALLOC) && !defined(STBI_FREE) && !defined(STBI_REALLOC) && !defined(STBI_REALLOC_SIZED) +// ok +#else +#error "Must define all or none of STBI_MALLOC, STBI_FREE, and STBI_REALLOC (or STBI_REALLOC_SIZED)." +#endif + +#ifndef STBI_MALLOC +#define STBI_MALLOC(sz) malloc(sz) +#define STBI_REALLOC(p,newsz) realloc(p,newsz) +#define STBI_FREE(p) free(p) +#endif + +#ifndef STBI_REALLOC_SIZED +#define STBI_REALLOC_SIZED(p,oldsz,newsz) STBI_REALLOC(p,newsz) +#endif + +// x86/x64 detection +#if defined(__x86_64__) || defined(_M_X64) +#define STBI__X64_TARGET +#elif defined(__i386) || defined(_M_IX86) +#define STBI__X86_TARGET +#endif + +#if defined(__GNUC__) && defined(STBI__X86_TARGET) && !defined(__SSE2__) && !defined(STBI_NO_SIMD) +// gcc doesn't support sse2 intrinsics unless you compile with -msse2, +// which in turn means it gets to use SSE2 everywhere. This is unfortunate, +// but previous attempts to provide the SSE2 functions with runtime +// detection caused numerous issues. The way architecture extensions are +// exposed in GCC/Clang is, sadly, not really suited for one-file libs. +// New behavior: if compiled with -msse2, we use SSE2 without any +// detection; if not, we don't use it at all. +#define STBI_NO_SIMD +#endif + +#if defined(__MINGW32__) && defined(STBI__X86_TARGET) && !defined(STBI_MINGW_ENABLE_SSE2) && !defined(STBI_NO_SIMD) +// Note that __MINGW32__ doesn't actually mean 32-bit, so we have to avoid STBI__X64_TARGET +// +// 32-bit MinGW wants ESP to be 16-byte aligned, but this is not in the +// Windows ABI and VC++ as well as Windows DLLs don't maintain that invariant. +// As a result, enabling SSE2 on 32-bit MinGW is dangerous when not +// simultaneously enabling "-mstackrealign". +// +// See https://github.com/nothings/stb/issues/81 for more information. +// +// So default to no SSE2 on 32-bit MinGW. If you've read this far and added +// -mstackrealign to your build settings, feel free to #define STBI_MINGW_ENABLE_SSE2. +#define STBI_NO_SIMD +#endif + +#if !defined(STBI_NO_SIMD) && (defined(STBI__X86_TARGET) || defined(STBI__X64_TARGET)) +#define STBI_SSE2 +#include + +#ifdef _MSC_VER + +#if _MSC_VER >= 1400 // not VC6 +#include // __cpuid +static int stbi__cpuid3(void) +{ + int info[4]; + __cpuid(info,1); + return info[3]; +} +#else +static int stbi__cpuid3(void) +{ + int res; + __asm { + mov eax,1 + cpuid + mov res,edx + } + return res; +} +#endif + +#define STBI_SIMD_ALIGN(type, name) __declspec(align(16)) type name + +#if !defined(STBI_NO_JPEG) && defined(STBI_SSE2) +static int stbi__sse2_available(void) +{ + int info3 = stbi__cpuid3(); + return ((info3 >> 26) & 1) != 0; +} +#endif + +#else // assume GCC-style if not VC++ +#define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16))) + +#if !defined(STBI_NO_JPEG) && defined(STBI_SSE2) +static int stbi__sse2_available(void) +{ + // If we're even attempting to compile this on GCC/Clang, that means + // -msse2 is on, which means the compiler is allowed to use SSE2 + // instructions at will, and so are we. + return 1; +} +#endif + +#endif +#endif + +// ARM NEON +#if defined(STBI_NO_SIMD) && defined(STBI_NEON) +#undef STBI_NEON +#endif + +#ifdef STBI_NEON +#include +#ifdef _MSC_VER +#define STBI_SIMD_ALIGN(type, name) __declspec(align(16)) type name +#else +#define STBI_SIMD_ALIGN(type, name) type name __attribute__((aligned(16))) +#endif +#endif + +#ifndef STBI_SIMD_ALIGN +#define STBI_SIMD_ALIGN(type, name) type name +#endif + +#ifndef STBI_MAX_DIMENSIONS +#define STBI_MAX_DIMENSIONS (1 << 24) +#endif + +/////////////////////////////////////////////// +// +// stbi__context struct and start_xxx functions + +// stbi__context structure is our basic context used by all images, so it +// contains all the IO context, plus some basic image information +typedef struct +{ + stbi__uint32 img_x, img_y; + int img_n, img_out_n; + + stbi_io_callbacks io; + void *io_user_data; + + int read_from_callbacks; + int buflen; + stbi_uc buffer_start[128]; + int callback_already_read; + + stbi_uc *img_buffer, *img_buffer_end; + stbi_uc *img_buffer_original, *img_buffer_original_end; +} stbi__context; + + +static void stbi__refill_buffer(stbi__context *s); + +// initialize a memory-decode context +static void stbi__start_mem(stbi__context *s, stbi_uc const *buffer, int len) +{ + s->io.read = NULL; + s->read_from_callbacks = 0; + s->callback_already_read = 0; + s->img_buffer = s->img_buffer_original = (stbi_uc *) buffer; + s->img_buffer_end = s->img_buffer_original_end = (stbi_uc *) buffer+len; +} + +// initialize a callback-based context +static void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user) +{ + s->io = *c; + s->io_user_data = user; + s->buflen = sizeof(s->buffer_start); + s->read_from_callbacks = 1; + s->callback_already_read = 0; + s->img_buffer = s->img_buffer_original = s->buffer_start; + stbi__refill_buffer(s); + s->img_buffer_original_end = s->img_buffer_end; +} + +#ifndef STBI_NO_STDIO + +static int stbi__stdio_read(void *user, char *data, int size) +{ + return (int) fread(data,1,size,(FILE*) user); +} + +static void stbi__stdio_skip(void *user, int n) +{ + int ch; + fseek((FILE*) user, n, SEEK_CUR); + ch = fgetc((FILE*) user); /* have to read a byte to reset feof()'s flag */ + if (ch != EOF) { + ungetc(ch, (FILE *) user); /* push byte back onto stream if valid. */ + } +} + +static int stbi__stdio_eof(void *user) +{ + return feof((FILE*) user) || ferror((FILE *) user); +} + +static stbi_io_callbacks stbi__stdio_callbacks = +{ + stbi__stdio_read, + stbi__stdio_skip, + stbi__stdio_eof, +}; + +static void stbi__start_file(stbi__context *s, FILE *f) +{ + stbi__start_callbacks(s, &stbi__stdio_callbacks, (void *) f); +} + +//static void stop_file(stbi__context *s) { } + +#endif // !STBI_NO_STDIO + +static void stbi__rewind(stbi__context *s) +{ + // conceptually rewind SHOULD rewind to the beginning of the stream, + // but we just rewind to the beginning of the initial buffer, because + // we only use it after doing 'test', which only ever looks at at most 92 bytes + s->img_buffer = s->img_buffer_original; + s->img_buffer_end = s->img_buffer_original_end; +} + +enum +{ + STBI_ORDER_RGB, + STBI_ORDER_BGR +}; + +typedef struct +{ + int bits_per_channel; + int num_channels; + int channel_order; +} stbi__result_info; + +#ifndef STBI_NO_JPEG +static int stbi__jpeg_test(stbi__context *s); +static void *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp); +#endif + +#ifndef STBI_NO_PNG +static int stbi__png_test(stbi__context *s); +static void *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp); +static int stbi__png_is16(stbi__context *s); +#endif + +#ifndef STBI_NO_BMP +static int stbi__bmp_test(stbi__context *s); +static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp); +#endif + +#ifndef STBI_NO_TGA +static int stbi__tga_test(stbi__context *s); +static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp); +#endif + +#ifndef STBI_NO_PSD +static int stbi__psd_test(stbi__context *s); +static void *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc); +static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp); +static int stbi__psd_is16(stbi__context *s); +#endif + +#ifndef STBI_NO_HDR +static int stbi__hdr_test(stbi__context *s); +static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp); +#endif + +#ifndef STBI_NO_PIC +static int stbi__pic_test(stbi__context *s); +static void *stbi__pic_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp); +#endif + +#ifndef STBI_NO_GIF +static int stbi__gif_test(stbi__context *s); +static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, int *z, int *comp, int req_comp); +static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp); +#endif + +#ifndef STBI_NO_PNM +static int stbi__pnm_test(stbi__context *s); +static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri); +static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp); +static int stbi__pnm_is16(stbi__context *s); +#endif + +static +#ifdef STBI_THREAD_LOCAL +STBI_THREAD_LOCAL +#endif +const char *stbi__g_failure_reason; + +STBIDEF const char *stbi_failure_reason(void) +{ + return stbi__g_failure_reason; +} + +#ifndef STBI_NO_FAILURE_STRINGS +static int stbi__err(const char *str) +{ + stbi__g_failure_reason = str; + return 0; +} +#endif + +static void *stbi__malloc(size_t size) +{ + return STBI_MALLOC(size); +} + +// stb_image uses ints pervasively, including for offset calculations. +// therefore the largest decoded image size we can support with the +// current code, even on 64-bit targets, is INT_MAX. this is not a +// significant limitation for the intended use case. +// +// we do, however, need to make sure our size calculations don't +// overflow. hence a few helper functions for size calculations that +// multiply integers together, making sure that they're non-negative +// and no overflow occurs. + +// return 1 if the sum is valid, 0 on overflow. +// negative terms are considered invalid. +static int stbi__addsizes_valid(int a, int b) +{ + if (b < 0) return 0; + // now 0 <= b <= INT_MAX, hence also + // 0 <= INT_MAX - b <= INTMAX. + // And "a + b <= INT_MAX" (which might overflow) is the + // same as a <= INT_MAX - b (no overflow) + return a <= INT_MAX - b; +} + +// returns 1 if the product is valid, 0 on overflow. +// negative factors are considered invalid. +static int stbi__mul2sizes_valid(int a, int b) +{ + if (a < 0 || b < 0) return 0; + if (b == 0) return 1; // mul-by-0 is always safe + // portable way to check for no overflows in a*b + return a <= INT_MAX/b; +} + +#if !defined(STBI_NO_JPEG) || !defined(STBI_NO_PNG) || !defined(STBI_NO_TGA) || !defined(STBI_NO_HDR) +// returns 1 if "a*b + add" has no negative terms/factors and doesn't overflow +static int stbi__mad2sizes_valid(int a, int b, int add) +{ + return stbi__mul2sizes_valid(a, b) && stbi__addsizes_valid(a*b, add); +} +#endif + +// returns 1 if "a*b*c + add" has no negative terms/factors and doesn't overflow +static int stbi__mad3sizes_valid(int a, int b, int c, int add) +{ + return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) && + stbi__addsizes_valid(a*b*c, add); +} + +// returns 1 if "a*b*c*d + add" has no negative terms/factors and doesn't overflow +#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) || !defined(STBI_NO_PNM) +static int stbi__mad4sizes_valid(int a, int b, int c, int d, int add) +{ + return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) && + stbi__mul2sizes_valid(a*b*c, d) && stbi__addsizes_valid(a*b*c*d, add); +} +#endif + +#if !defined(STBI_NO_JPEG) || !defined(STBI_NO_PNG) || !defined(STBI_NO_TGA) || !defined(STBI_NO_HDR) +// mallocs with size overflow checking +static void *stbi__malloc_mad2(int a, int b, int add) +{ + if (!stbi__mad2sizes_valid(a, b, add)) return NULL; + return stbi__malloc(a*b + add); +} +#endif + +static void *stbi__malloc_mad3(int a, int b, int c, int add) +{ + if (!stbi__mad3sizes_valid(a, b, c, add)) return NULL; + return stbi__malloc(a*b*c + add); +} + +#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) || !defined(STBI_NO_PNM) +static void *stbi__malloc_mad4(int a, int b, int c, int d, int add) +{ + if (!stbi__mad4sizes_valid(a, b, c, d, add)) return NULL; + return stbi__malloc(a*b*c*d + add); +} +#endif + +// returns 1 if the sum of two signed ints is valid (between -2^31 and 2^31-1 inclusive), 0 on overflow. +static int stbi__addints_valid(int a, int b) +{ + if ((a >= 0) != (b >= 0)) return 1; // a and b have different signs, so no overflow + if (a < 0 && b < 0) return a >= INT_MIN - b; // same as a + b >= INT_MIN; INT_MIN - b cannot overflow since b < 0. + return a <= INT_MAX - b; +} + +// returns 1 if the product of two ints fits in a signed short, 0 on overflow. +static int stbi__mul2shorts_valid(int a, int b) +{ + if (b == 0 || b == -1) return 1; // multiplication by 0 is always 0; check for -1 so SHRT_MIN/b doesn't overflow + if ((a >= 0) == (b >= 0)) return a <= SHRT_MAX/b; // product is positive, so similar to mul2sizes_valid + if (b < 0) return a <= SHRT_MIN / b; // same as a * b >= SHRT_MIN + return a >= SHRT_MIN / b; +} + +// stbi__err - error +// stbi__errpf - error returning pointer to float +// stbi__errpuc - error returning pointer to unsigned char + +#ifdef STBI_NO_FAILURE_STRINGS + #define stbi__err(x,y) 0 +#elif defined(STBI_FAILURE_USERMSG) + #define stbi__err(x,y) stbi__err(y) +#else + #define stbi__err(x,y) stbi__err(x) +#endif + +#define stbi__errpf(x,y) ((float *)(size_t) (stbi__err(x,y)?NULL:NULL)) +#define stbi__errpuc(x,y) ((unsigned char *)(size_t) (stbi__err(x,y)?NULL:NULL)) + +STBIDEF void stbi_image_free(void *retval_from_stbi_load) +{ + STBI_FREE(retval_from_stbi_load); +} + +#ifndef STBI_NO_LINEAR +static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp); +#endif + +#ifndef STBI_NO_HDR +static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp); +#endif + +static int stbi__vertically_flip_on_load_global = 0; + +STBIDEF void stbi_set_flip_vertically_on_load(int flag_true_if_should_flip) +{ + stbi__vertically_flip_on_load_global = flag_true_if_should_flip; +} + +#ifndef STBI_THREAD_LOCAL +#define stbi__vertically_flip_on_load stbi__vertically_flip_on_load_global +#else +static STBI_THREAD_LOCAL int stbi__vertically_flip_on_load_local, stbi__vertically_flip_on_load_set; + +STBIDEF void stbi_set_flip_vertically_on_load_thread(int flag_true_if_should_flip) +{ + stbi__vertically_flip_on_load_local = flag_true_if_should_flip; + stbi__vertically_flip_on_load_set = 1; +} + +#define stbi__vertically_flip_on_load (stbi__vertically_flip_on_load_set \ + ? stbi__vertically_flip_on_load_local \ + : stbi__vertically_flip_on_load_global) +#endif // STBI_THREAD_LOCAL + +static void *stbi__load_main(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc) +{ + memset(ri, 0, sizeof(*ri)); // make sure it's initialized if we add new fields + ri->bits_per_channel = 8; // default is 8 so most paths don't have to be changed + ri->channel_order = STBI_ORDER_RGB; // all current input & output are this, but this is here so we can add BGR order + ri->num_channels = 0; + + // test the formats with a very explicit header first (at least a FOURCC + // or distinctive magic number first) + #ifndef STBI_NO_PNG + if (stbi__png_test(s)) return stbi__png_load(s,x,y,comp,req_comp, ri); + #endif + #ifndef STBI_NO_BMP + if (stbi__bmp_test(s)) return stbi__bmp_load(s,x,y,comp,req_comp, ri); + #endif + #ifndef STBI_NO_GIF + if (stbi__gif_test(s)) return stbi__gif_load(s,x,y,comp,req_comp, ri); + #endif + #ifndef STBI_NO_PSD + if (stbi__psd_test(s)) return stbi__psd_load(s,x,y,comp,req_comp, ri, bpc); + #else + STBI_NOTUSED(bpc); + #endif + #ifndef STBI_NO_PIC + if (stbi__pic_test(s)) return stbi__pic_load(s,x,y,comp,req_comp, ri); + #endif + + // then the formats that can end up attempting to load with just 1 or 2 + // bytes matching expectations; these are prone to false positives, so + // try them later + #ifndef STBI_NO_JPEG + if (stbi__jpeg_test(s)) return stbi__jpeg_load(s,x,y,comp,req_comp, ri); + #endif + #ifndef STBI_NO_PNM + if (stbi__pnm_test(s)) return stbi__pnm_load(s,x,y,comp,req_comp, ri); + #endif + + #ifndef STBI_NO_HDR + if (stbi__hdr_test(s)) { + float *hdr = stbi__hdr_load(s, x,y,comp,req_comp, ri); + return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp); + } + #endif + + #ifndef STBI_NO_TGA + // test tga last because it's a crappy test! + if (stbi__tga_test(s)) + return stbi__tga_load(s,x,y,comp,req_comp, ri); + #endif + + return stbi__errpuc("unknown image type", "Image not of any known type, or corrupt"); +} + +static stbi_uc *stbi__convert_16_to_8(stbi__uint16 *orig, int w, int h, int channels) +{ + int i; + int img_len = w * h * channels; + stbi_uc *reduced; + + reduced = (stbi_uc *) stbi__malloc(img_len); + if (reduced == NULL) return stbi__errpuc("outofmem", "Out of memory"); + + for (i = 0; i < img_len; ++i) + reduced[i] = (stbi_uc)((orig[i] >> 8) & 0xFF); // top half of each byte is sufficient approx of 16->8 bit scaling + + STBI_FREE(orig); + return reduced; +} + +static stbi__uint16 *stbi__convert_8_to_16(stbi_uc *orig, int w, int h, int channels) +{ + int i; + int img_len = w * h * channels; + stbi__uint16 *enlarged; + + enlarged = (stbi__uint16 *) stbi__malloc(img_len*2); + if (enlarged == NULL) return (stbi__uint16 *) stbi__errpuc("outofmem", "Out of memory"); + + for (i = 0; i < img_len; ++i) + enlarged[i] = (stbi__uint16)((orig[i] << 8) + orig[i]); // replicate to high and low byte, maps 0->0, 255->0xffff + + STBI_FREE(orig); + return enlarged; +} + +static void stbi__vertical_flip(void *image, int w, int h, int bytes_per_pixel) +{ + int row; + size_t bytes_per_row = (size_t)w * bytes_per_pixel; + stbi_uc temp[2048]; + stbi_uc *bytes = (stbi_uc *)image; + + for (row = 0; row < (h>>1); row++) { + stbi_uc *row0 = bytes + row*bytes_per_row; + stbi_uc *row1 = bytes + (h - row - 1)*bytes_per_row; + // swap row0 with row1 + size_t bytes_left = bytes_per_row; + while (bytes_left) { + size_t bytes_copy = (bytes_left < sizeof(temp)) ? bytes_left : sizeof(temp); + memcpy(temp, row0, bytes_copy); + memcpy(row0, row1, bytes_copy); + memcpy(row1, temp, bytes_copy); + row0 += bytes_copy; + row1 += bytes_copy; + bytes_left -= bytes_copy; + } + } +} + +#ifndef STBI_NO_GIF +static void stbi__vertical_flip_slices(void *image, int w, int h, int z, int bytes_per_pixel) +{ + int slice; + int slice_size = w * h * bytes_per_pixel; + + stbi_uc *bytes = (stbi_uc *)image; + for (slice = 0; slice < z; ++slice) { + stbi__vertical_flip(bytes, w, h, bytes_per_pixel); + bytes += slice_size; + } +} +#endif + +static unsigned char *stbi__load_and_postprocess_8bit(stbi__context *s, int *x, int *y, int *comp, int req_comp) +{ + stbi__result_info ri; + void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 8); + + if (result == NULL) + return NULL; + + // it is the responsibility of the loaders to make sure we get either 8 or 16 bit. + STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16); + + if (ri.bits_per_channel != 8) { + result = stbi__convert_16_to_8((stbi__uint16 *) result, *x, *y, req_comp == 0 ? *comp : req_comp); + ri.bits_per_channel = 8; + } + + // @TODO: move stbi__convert_format to here + + if (stbi__vertically_flip_on_load) { + int channels = req_comp ? req_comp : *comp; + stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi_uc)); + } + + return (unsigned char *) result; +} + +static stbi__uint16 *stbi__load_and_postprocess_16bit(stbi__context *s, int *x, int *y, int *comp, int req_comp) +{ + stbi__result_info ri; + void *result = stbi__load_main(s, x, y, comp, req_comp, &ri, 16); + + if (result == NULL) + return NULL; + + // it is the responsibility of the loaders to make sure we get either 8 or 16 bit. + STBI_ASSERT(ri.bits_per_channel == 8 || ri.bits_per_channel == 16); + + if (ri.bits_per_channel != 16) { + result = stbi__convert_8_to_16((stbi_uc *) result, *x, *y, req_comp == 0 ? *comp : req_comp); + ri.bits_per_channel = 16; + } + + // @TODO: move stbi__convert_format16 to here + // @TODO: special case RGB-to-Y (and RGBA-to-YA) for 8-bit-to-16-bit case to keep more precision + + if (stbi__vertically_flip_on_load) { + int channels = req_comp ? req_comp : *comp; + stbi__vertical_flip(result, *x, *y, channels * sizeof(stbi__uint16)); + } + + return (stbi__uint16 *) result; +} + +#if !defined(STBI_NO_HDR) && !defined(STBI_NO_LINEAR) +static void stbi__float_postprocess(float *result, int *x, int *y, int *comp, int req_comp) +{ + if (stbi__vertically_flip_on_load && result != NULL) { + int channels = req_comp ? req_comp : *comp; + stbi__vertical_flip(result, *x, *y, channels * sizeof(float)); + } +} +#endif + +#ifndef STBI_NO_STDIO + +#if defined(_WIN32) && defined(STBI_WINDOWS_UTF8) +STBI_EXTERN __declspec(dllimport) int __stdcall MultiByteToWideChar(unsigned int cp, unsigned long flags, const char *str, int cbmb, wchar_t *widestr, int cchwide); +STBI_EXTERN __declspec(dllimport) int __stdcall WideCharToMultiByte(unsigned int cp, unsigned long flags, const wchar_t *widestr, int cchwide, char *str, int cbmb, const char *defchar, int *used_default); +#endif + +#if defined(_WIN32) && defined(STBI_WINDOWS_UTF8) +STBIDEF int stbi_convert_wchar_to_utf8(char *buffer, size_t bufferlen, const wchar_t* input) +{ + return WideCharToMultiByte(65001 /* UTF8 */, 0, input, -1, buffer, (int) bufferlen, NULL, NULL); +} +#endif + +static FILE *stbi__fopen(char const *filename, char const *mode) +{ + FILE *f; +#if defined(_WIN32) && defined(STBI_WINDOWS_UTF8) + wchar_t wMode[64]; + wchar_t wFilename[1024]; + if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, filename, -1, wFilename, sizeof(wFilename)/sizeof(*wFilename))) + return 0; + + if (0 == MultiByteToWideChar(65001 /* UTF8 */, 0, mode, -1, wMode, sizeof(wMode)/sizeof(*wMode))) + return 0; + +#if defined(_MSC_VER) && _MSC_VER >= 1400 + if (0 != _wfopen_s(&f, wFilename, wMode)) + f = 0; +#else + f = _wfopen(wFilename, wMode); +#endif + +#elif defined(_MSC_VER) && _MSC_VER >= 1400 + if (0 != fopen_s(&f, filename, mode)) + f=0; +#else + f = fopen(filename, mode); +#endif + return f; +} + + +STBIDEF stbi_uc *stbi_load(char const *filename, int *x, int *y, int *comp, int req_comp) +{ + FILE *f = stbi__fopen(filename, "rb"); + unsigned char *result; + if (!f) return stbi__errpuc("can't fopen", "Unable to open file"); + result = stbi_load_from_file(f,x,y,comp,req_comp); + fclose(f); + return result; +} + +STBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *comp, int req_comp) +{ + unsigned char *result; + stbi__context s; + stbi__start_file(&s,f); + result = stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); + if (result) { + // need to 'unget' all the characters in the IO buffer + fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR); + } + return result; +} + +STBIDEF stbi__uint16 *stbi_load_from_file_16(FILE *f, int *x, int *y, int *comp, int req_comp) +{ + stbi__uint16 *result; + stbi__context s; + stbi__start_file(&s,f); + result = stbi__load_and_postprocess_16bit(&s,x,y,comp,req_comp); + if (result) { + // need to 'unget' all the characters in the IO buffer + fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR); + } + return result; +} + +STBIDEF stbi_us *stbi_load_16(char const *filename, int *x, int *y, int *comp, int req_comp) +{ + FILE *f = stbi__fopen(filename, "rb"); + stbi__uint16 *result; + if (!f) return (stbi_us *) stbi__errpuc("can't fopen", "Unable to open file"); + result = stbi_load_from_file_16(f,x,y,comp,req_comp); + fclose(f); + return result; +} + + +#endif //!STBI_NO_STDIO + +STBIDEF stbi_us *stbi_load_16_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *channels_in_file, int desired_channels) +{ + stbi__context s; + stbi__start_mem(&s,buffer,len); + return stbi__load_and_postprocess_16bit(&s,x,y,channels_in_file,desired_channels); +} + +STBIDEF stbi_us *stbi_load_16_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *channels_in_file, int desired_channels) +{ + stbi__context s; + stbi__start_callbacks(&s, (stbi_io_callbacks *)clbk, user); + return stbi__load_and_postprocess_16bit(&s,x,y,channels_in_file,desired_channels); +} + +STBIDEF stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp) +{ + stbi__context s; + stbi__start_mem(&s,buffer,len); + return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); +} + +STBIDEF stbi_uc *stbi_load_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp) +{ + stbi__context s; + stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); + return stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); +} + +#ifndef STBI_NO_GIF +STBIDEF stbi_uc *stbi_load_gif_from_memory(stbi_uc const *buffer, int len, int **delays, int *x, int *y, int *z, int *comp, int req_comp) +{ + unsigned char *result; + stbi__context s; + stbi__start_mem(&s,buffer,len); + + result = (unsigned char*) stbi__load_gif_main(&s, delays, x, y, z, comp, req_comp); + if (stbi__vertically_flip_on_load) { + stbi__vertical_flip_slices( result, *x, *y, *z, *comp ); + } + + return result; +} +#endif + +#ifndef STBI_NO_LINEAR +static float *stbi__loadf_main(stbi__context *s, int *x, int *y, int *comp, int req_comp) +{ + unsigned char *data; + #ifndef STBI_NO_HDR + if (stbi__hdr_test(s)) { + stbi__result_info ri; + float *hdr_data = stbi__hdr_load(s,x,y,comp,req_comp, &ri); + if (hdr_data) + stbi__float_postprocess(hdr_data,x,y,comp,req_comp); + return hdr_data; + } + #endif + data = stbi__load_and_postprocess_8bit(s, x, y, comp, req_comp); + if (data) + return stbi__ldr_to_hdr(data, *x, *y, req_comp ? req_comp : *comp); + return stbi__errpf("unknown image type", "Image not of any known type, or corrupt"); +} + +STBIDEF float *stbi_loadf_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp) +{ + stbi__context s; + stbi__start_mem(&s,buffer,len); + return stbi__loadf_main(&s,x,y,comp,req_comp); +} + +STBIDEF float *stbi_loadf_from_callbacks(stbi_io_callbacks const *clbk, void *user, int *x, int *y, int *comp, int req_comp) +{ + stbi__context s; + stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); + return stbi__loadf_main(&s,x,y,comp,req_comp); +} + +#ifndef STBI_NO_STDIO +STBIDEF float *stbi_loadf(char const *filename, int *x, int *y, int *comp, int req_comp) +{ + float *result; + FILE *f = stbi__fopen(filename, "rb"); + if (!f) return stbi__errpf("can't fopen", "Unable to open file"); + result = stbi_loadf_from_file(f,x,y,comp,req_comp); + fclose(f); + return result; +} + +STBIDEF float *stbi_loadf_from_file(FILE *f, int *x, int *y, int *comp, int req_comp) +{ + stbi__context s; + stbi__start_file(&s,f); + return stbi__loadf_main(&s,x,y,comp,req_comp); +} +#endif // !STBI_NO_STDIO + +#endif // !STBI_NO_LINEAR + +// these is-hdr-or-not is defined independent of whether STBI_NO_LINEAR is +// defined, for API simplicity; if STBI_NO_LINEAR is defined, it always +// reports false! + +STBIDEF int stbi_is_hdr_from_memory(stbi_uc const *buffer, int len) +{ + #ifndef STBI_NO_HDR + stbi__context s; + stbi__start_mem(&s,buffer,len); + return stbi__hdr_test(&s); + #else + STBI_NOTUSED(buffer); + STBI_NOTUSED(len); + return 0; + #endif +} + +#ifndef STBI_NO_STDIO +STBIDEF int stbi_is_hdr (char const *filename) +{ + FILE *f = stbi__fopen(filename, "rb"); + int result=0; + if (f) { + result = stbi_is_hdr_from_file(f); + fclose(f); + } + return result; +} + +STBIDEF int stbi_is_hdr_from_file(FILE *f) +{ + #ifndef STBI_NO_HDR + long pos = ftell(f); + int res; + stbi__context s; + stbi__start_file(&s,f); + res = stbi__hdr_test(&s); + fseek(f, pos, SEEK_SET); + return res; + #else + STBI_NOTUSED(f); + return 0; + #endif +} +#endif // !STBI_NO_STDIO + +STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user) +{ + #ifndef STBI_NO_HDR + stbi__context s; + stbi__start_callbacks(&s, (stbi_io_callbacks *) clbk, user); + return stbi__hdr_test(&s); + #else + STBI_NOTUSED(clbk); + STBI_NOTUSED(user); + return 0; + #endif +} + +#ifndef STBI_NO_LINEAR +static float stbi__l2h_gamma=2.2f, stbi__l2h_scale=1.0f; + +STBIDEF void stbi_ldr_to_hdr_gamma(float gamma) { stbi__l2h_gamma = gamma; } +STBIDEF void stbi_ldr_to_hdr_scale(float scale) { stbi__l2h_scale = scale; } +#endif + +static float stbi__h2l_gamma_i=1.0f/2.2f, stbi__h2l_scale_i=1.0f; + +STBIDEF void stbi_hdr_to_ldr_gamma(float gamma) { stbi__h2l_gamma_i = 1/gamma; } +STBIDEF void stbi_hdr_to_ldr_scale(float scale) { stbi__h2l_scale_i = 1/scale; } + + +////////////////////////////////////////////////////////////////////////////// +// +// Common code used by all image loaders +// + +enum +{ + STBI__SCAN_load=0, + STBI__SCAN_type, + STBI__SCAN_header +}; + +static void stbi__refill_buffer(stbi__context *s) +{ + int n = (s->io.read)(s->io_user_data,(char*)s->buffer_start,s->buflen); + s->callback_already_read += (int) (s->img_buffer - s->img_buffer_original); + if (n == 0) { + // at end of file, treat same as if from memory, but need to handle case + // where s->img_buffer isn't pointing to safe memory, e.g. 0-byte file + s->read_from_callbacks = 0; + s->img_buffer = s->buffer_start; + s->img_buffer_end = s->buffer_start+1; + *s->img_buffer = 0; + } else { + s->img_buffer = s->buffer_start; + s->img_buffer_end = s->buffer_start + n; + } +} + +stbi_inline static stbi_uc stbi__get8(stbi__context *s) +{ + if (s->img_buffer < s->img_buffer_end) + return *s->img_buffer++; + if (s->read_from_callbacks) { + stbi__refill_buffer(s); + return *s->img_buffer++; + } + return 0; +} + +#if defined(STBI_NO_JPEG) && defined(STBI_NO_HDR) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) +// nothing +#else +stbi_inline static int stbi__at_eof(stbi__context *s) +{ + if (s->io.read) { + if (!(s->io.eof)(s->io_user_data)) return 0; + // if feof() is true, check if buffer = end + // special case: we've only got the special 0 character at the end + if (s->read_from_callbacks == 0) return 1; + } + + return s->img_buffer >= s->img_buffer_end; +} +#endif + +#if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) +// nothing +#else +static void stbi__skip(stbi__context *s, int n) +{ + if (n == 0) return; // already there! + if (n < 0) { + s->img_buffer = s->img_buffer_end; + return; + } + if (s->io.read) { + int blen = (int) (s->img_buffer_end - s->img_buffer); + if (blen < n) { + s->img_buffer = s->img_buffer_end; + (s->io.skip)(s->io_user_data, n - blen); + return; + } + } + s->img_buffer += n; +} +#endif + +#if defined(STBI_NO_PNG) && defined(STBI_NO_TGA) && defined(STBI_NO_HDR) && defined(STBI_NO_PNM) +// nothing +#else +static int stbi__getn(stbi__context *s, stbi_uc *buffer, int n) +{ + if (s->io.read) { + int blen = (int) (s->img_buffer_end - s->img_buffer); + if (blen < n) { + int res, count; + + memcpy(buffer, s->img_buffer, blen); + + count = (s->io.read)(s->io_user_data, (char*) buffer + blen, n - blen); + res = (count == (n-blen)); + s->img_buffer = s->img_buffer_end; + return res; + } + } + + if (s->img_buffer+n <= s->img_buffer_end) { + memcpy(buffer, s->img_buffer, n); + s->img_buffer += n; + return 1; + } else + return 0; +} +#endif + +#if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) +// nothing +#else +static int stbi__get16be(stbi__context *s) +{ + int z = stbi__get8(s); + return (z << 8) + stbi__get8(s); +} +#endif + +#if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) && defined(STBI_NO_PIC) +// nothing +#else +static stbi__uint32 stbi__get32be(stbi__context *s) +{ + stbi__uint32 z = stbi__get16be(s); + return (z << 16) + stbi__get16be(s); +} +#endif + +#if defined(STBI_NO_BMP) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) +// nothing +#else +static int stbi__get16le(stbi__context *s) +{ + int z = stbi__get8(s); + return z + (stbi__get8(s) << 8); +} +#endif + +#ifndef STBI_NO_BMP +static stbi__uint32 stbi__get32le(stbi__context *s) +{ + stbi__uint32 z = stbi__get16le(s); + z += (stbi__uint32)stbi__get16le(s) << 16; + return z; +} +#endif + +#define STBI__BYTECAST(x) ((stbi_uc) ((x) & 255)) // truncate int to byte without warnings + +#if defined(STBI_NO_JPEG) && defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) +// nothing +#else +////////////////////////////////////////////////////////////////////////////// +// +// generic converter from built-in img_n to req_comp +// individual types do this automatically as much as possible (e.g. jpeg +// does all cases internally since it needs to colorspace convert anyway, +// and it never has alpha, so very few cases ). png can automatically +// interleave an alpha=255 channel, but falls back to this for other cases +// +// assume data buffer is malloced, so malloc a new one and free that one +// only failure mode is malloc failing + +static stbi_uc stbi__compute_y(int r, int g, int b) +{ + return (stbi_uc) (((r*77) + (g*150) + (29*b)) >> 8); +} +#endif + +#if defined(STBI_NO_PNG) && defined(STBI_NO_BMP) && defined(STBI_NO_PSD) && defined(STBI_NO_TGA) && defined(STBI_NO_GIF) && defined(STBI_NO_PIC) && defined(STBI_NO_PNM) +// nothing +#else +static unsigned char *stbi__convert_format(unsigned char *data, int img_n, int req_comp, unsigned int x, unsigned int y) +{ + int i,j; + unsigned char *good; + + if (req_comp == img_n) return data; + STBI_ASSERT(req_comp >= 1 && req_comp <= 4); + + good = (unsigned char *) stbi__malloc_mad3(req_comp, x, y, 0); + if (good == NULL) { + STBI_FREE(data); + return stbi__errpuc("outofmem", "Out of memory"); + } + + for (j=0; j < (int) y; ++j) { + unsigned char *src = data + j * x * img_n ; + unsigned char *dest = good + j * x * req_comp; + + #define STBI__COMBO(a,b) ((a)*8+(b)) + #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) + // convert source image with img_n components to one with req_comp components; + // avoid switch per pixel, so use switch per scanline and massive macros + switch (STBI__COMBO(img_n, req_comp)) { + STBI__CASE(1,2) { dest[0]=src[0]; dest[1]=255; } break; + STBI__CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; + STBI__CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=255; } break; + STBI__CASE(2,1) { dest[0]=src[0]; } break; + STBI__CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; + STBI__CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1]; } break; + STBI__CASE(3,4) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];dest[3]=255; } break; + STBI__CASE(3,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break; + STBI__CASE(3,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = 255; } break; + STBI__CASE(4,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break; + STBI__CASE(4,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = src[3]; } break; + STBI__CASE(4,3) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2]; } break; + default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return stbi__errpuc("unsupported", "Unsupported format conversion"); + } + #undef STBI__CASE + } + + STBI_FREE(data); + return good; +} +#endif + +#if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) +// nothing +#else +static stbi__uint16 stbi__compute_y_16(int r, int g, int b) +{ + return (stbi__uint16) (((r*77) + (g*150) + (29*b)) >> 8); +} +#endif + +#if defined(STBI_NO_PNG) && defined(STBI_NO_PSD) +// nothing +#else +static stbi__uint16 *stbi__convert_format16(stbi__uint16 *data, int img_n, int req_comp, unsigned int x, unsigned int y) +{ + int i,j; + stbi__uint16 *good; + + if (req_comp == img_n) return data; + STBI_ASSERT(req_comp >= 1 && req_comp <= 4); + + good = (stbi__uint16 *) stbi__malloc(req_comp * x * y * 2); + if (good == NULL) { + STBI_FREE(data); + return (stbi__uint16 *) stbi__errpuc("outofmem", "Out of memory"); + } + + for (j=0; j < (int) y; ++j) { + stbi__uint16 *src = data + j * x * img_n ; + stbi__uint16 *dest = good + j * x * req_comp; + + #define STBI__COMBO(a,b) ((a)*8+(b)) + #define STBI__CASE(a,b) case STBI__COMBO(a,b): for(i=x-1; i >= 0; --i, src += a, dest += b) + // convert source image with img_n components to one with req_comp components; + // avoid switch per pixel, so use switch per scanline and massive macros + switch (STBI__COMBO(img_n, req_comp)) { + STBI__CASE(1,2) { dest[0]=src[0]; dest[1]=0xffff; } break; + STBI__CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; + STBI__CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=0xffff; } break; + STBI__CASE(2,1) { dest[0]=src[0]; } break; + STBI__CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0]; } break; + STBI__CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1]; } break; + STBI__CASE(3,4) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2];dest[3]=0xffff; } break; + STBI__CASE(3,1) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); } break; + STBI__CASE(3,2) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); dest[1] = 0xffff; } break; + STBI__CASE(4,1) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); } break; + STBI__CASE(4,2) { dest[0]=stbi__compute_y_16(src[0],src[1],src[2]); dest[1] = src[3]; } break; + STBI__CASE(4,3) { dest[0]=src[0];dest[1]=src[1];dest[2]=src[2]; } break; + default: STBI_ASSERT(0); STBI_FREE(data); STBI_FREE(good); return (stbi__uint16*) stbi__errpuc("unsupported", "Unsupported format conversion"); + } + #undef STBI__CASE + } + + STBI_FREE(data); + return good; +} +#endif + +#ifndef STBI_NO_LINEAR +static float *stbi__ldr_to_hdr(stbi_uc *data, int x, int y, int comp) +{ + int i,k,n; + float *output; + if (!data) return NULL; + output = (float *) stbi__malloc_mad4(x, y, comp, sizeof(float), 0); + if (output == NULL) { STBI_FREE(data); return stbi__errpf("outofmem", "Out of memory"); } + // compute number of non-alpha components + if (comp & 1) n = comp; else n = comp-1; + for (i=0; i < x*y; ++i) { + for (k=0; k < n; ++k) { + output[i*comp + k] = (float) (pow(data[i*comp+k]/255.0f, stbi__l2h_gamma) * stbi__l2h_scale); + } + } + if (n < comp) { + for (i=0; i < x*y; ++i) { + output[i*comp + n] = data[i*comp + n]/255.0f; + } + } + STBI_FREE(data); + return output; +} +#endif + +#ifndef STBI_NO_HDR +#define stbi__float2int(x) ((int) (x)) +static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp) +{ + int i,k,n; + stbi_uc *output; + if (!data) return NULL; + output = (stbi_uc *) stbi__malloc_mad3(x, y, comp, 0); + if (output == NULL) { STBI_FREE(data); return stbi__errpuc("outofmem", "Out of memory"); } + // compute number of non-alpha components + if (comp & 1) n = comp; else n = comp-1; + for (i=0; i < x*y; ++i) { + for (k=0; k < n; ++k) { + float z = (float) pow(data[i*comp+k]*stbi__h2l_scale_i, stbi__h2l_gamma_i) * 255 + 0.5f; + if (z < 0) z = 0; + if (z > 255) z = 255; + output[i*comp + k] = (stbi_uc) stbi__float2int(z); + } + if (k < comp) { + float z = data[i*comp+k] * 255 + 0.5f; + if (z < 0) z = 0; + if (z > 255) z = 255; + output[i*comp + k] = (stbi_uc) stbi__float2int(z); + } + } + STBI_FREE(data); + return output; +} +#endif + +////////////////////////////////////////////////////////////////////////////// +// +// "baseline" JPEG/JFIF decoder +// +// simple implementation +// - doesn't support delayed output of y-dimension +// - simple interface (only one output format: 8-bit interleaved RGB) +// - doesn't try to recover corrupt jpegs +// - doesn't allow partial loading, loading multiple at once +// - still fast on x86 (copying globals into locals doesn't help x86) +// - allocates lots of intermediate memory (full size of all components) +// - non-interleaved case requires this anyway +// - allows good upsampling (see next) +// high-quality +// - upsampled channels are bilinearly interpolated, even across blocks +// - quality integer IDCT derived from IJG's 'slow' +// performance +// - fast huffman; reasonable integer IDCT +// - some SIMD kernels for common paths on targets with SSE2/NEON +// - uses a lot of intermediate memory, could cache poorly + +#ifndef STBI_NO_JPEG + +// huffman decoding acceleration +#define FAST_BITS 9 // larger handles more cases; smaller stomps less cache + +typedef struct +{ + stbi_uc fast[1 << FAST_BITS]; + // weirdly, repacking this into AoS is a 10% speed loss, instead of a win + stbi__uint16 code[256]; + stbi_uc values[256]; + stbi_uc size[257]; + unsigned int maxcode[18]; + int delta[17]; // old 'firstsymbol' - old 'firstcode' +} stbi__huffman; + +typedef struct +{ + stbi__context *s; + stbi__huffman huff_dc[4]; + stbi__huffman huff_ac[4]; + stbi__uint16 dequant[4][64]; + stbi__int16 fast_ac[4][1 << FAST_BITS]; + +// sizes for components, interleaved MCUs + int img_h_max, img_v_max; + int img_mcu_x, img_mcu_y; + int img_mcu_w, img_mcu_h; + +// definition of jpeg image component + struct + { + int id; + int h,v; + int tq; + int hd,ha; + int dc_pred; + + int x,y,w2,h2; + stbi_uc *data; + void *raw_data, *raw_coeff; + stbi_uc *linebuf; + short *coeff; // progressive only + int coeff_w, coeff_h; // number of 8x8 coefficient blocks + } img_comp[4]; + + stbi__uint32 code_buffer; // jpeg entropy-coded buffer + int code_bits; // number of valid bits + unsigned char marker; // marker seen while filling entropy buffer + int nomore; // flag if we saw a marker so must stop + + int progressive; + int spec_start; + int spec_end; + int succ_high; + int succ_low; + int eob_run; + int jfif; + int app14_color_transform; // Adobe APP14 tag + int rgb; + + int scan_n, order[4]; + int restart_interval, todo; + +// kernels + void (*idct_block_kernel)(stbi_uc *out, int out_stride, short data[64]); + void (*YCbCr_to_RGB_kernel)(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step); + stbi_uc *(*resample_row_hv_2_kernel)(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs); +} stbi__jpeg; + +static int stbi__build_huffman(stbi__huffman *h, int *count) +{ + int i,j,k=0; + unsigned int code; + // build size list for each symbol (from JPEG spec) + for (i=0; i < 16; ++i) { + for (j=0; j < count[i]; ++j) { + h->size[k++] = (stbi_uc) (i+1); + if(k >= 257) return stbi__err("bad size list","Corrupt JPEG"); + } + } + h->size[k] = 0; + + // compute actual symbols (from jpeg spec) + code = 0; + k = 0; + for(j=1; j <= 16; ++j) { + // compute delta to add to code to compute symbol id + h->delta[j] = k - code; + if (h->size[k] == j) { + while (h->size[k] == j) + h->code[k++] = (stbi__uint16) (code++); + if (code-1 >= (1u << j)) return stbi__err("bad code lengths","Corrupt JPEG"); + } + // compute largest code + 1 for this size, preshifted as needed later + h->maxcode[j] = code << (16-j); + code <<= 1; + } + h->maxcode[j] = 0xffffffff; + + // build non-spec acceleration table; 255 is flag for not-accelerated + memset(h->fast, 255, 1 << FAST_BITS); + for (i=0; i < k; ++i) { + int s = h->size[i]; + if (s <= FAST_BITS) { + int c = h->code[i] << (FAST_BITS-s); + int m = 1 << (FAST_BITS-s); + for (j=0; j < m; ++j) { + h->fast[c+j] = (stbi_uc) i; + } + } + } + return 1; +} + +// build a table that decodes both magnitude and value of small ACs in +// one go. +static void stbi__build_fast_ac(stbi__int16 *fast_ac, stbi__huffman *h) +{ + int i; + for (i=0; i < (1 << FAST_BITS); ++i) { + stbi_uc fast = h->fast[i]; + fast_ac[i] = 0; + if (fast < 255) { + int rs = h->values[fast]; + int run = (rs >> 4) & 15; + int magbits = rs & 15; + int len = h->size[fast]; + + if (magbits && len + magbits <= FAST_BITS) { + // magnitude code followed by receive_extend code + int k = ((i << len) & ((1 << FAST_BITS) - 1)) >> (FAST_BITS - magbits); + int m = 1 << (magbits - 1); + if (k < m) k += (~0U << magbits) + 1; + // if the result is small enough, we can fit it in fast_ac table + if (k >= -128 && k <= 127) + fast_ac[i] = (stbi__int16) ((k * 256) + (run * 16) + (len + magbits)); + } + } + } +} + +static void stbi__grow_buffer_unsafe(stbi__jpeg *j) +{ + do { + unsigned int b = j->nomore ? 0 : stbi__get8(j->s); + if (b == 0xff) { + int c = stbi__get8(j->s); + while (c == 0xff) c = stbi__get8(j->s); // consume fill bytes + if (c != 0) { + j->marker = (unsigned char) c; + j->nomore = 1; + return; + } + } + j->code_buffer |= b << (24 - j->code_bits); + j->code_bits += 8; + } while (j->code_bits <= 24); +} + +// (1 << n) - 1 +static const stbi__uint32 stbi__bmask[17]={0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535}; + +// decode a jpeg huffman value from the bitstream +stbi_inline static int stbi__jpeg_huff_decode(stbi__jpeg *j, stbi__huffman *h) +{ + unsigned int temp; + int c,k; + + if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); + + // look at the top FAST_BITS and determine what symbol ID it is, + // if the code is <= FAST_BITS + c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); + k = h->fast[c]; + if (k < 255) { + int s = h->size[k]; + if (s > j->code_bits) + return -1; + j->code_buffer <<= s; + j->code_bits -= s; + return h->values[k]; + } + + // naive test is to shift the code_buffer down so k bits are + // valid, then test against maxcode. To speed this up, we've + // preshifted maxcode left so that it has (16-k) 0s at the + // end; in other words, regardless of the number of bits, it + // wants to be compared against something shifted to have 16; + // that way we don't need to shift inside the loop. + temp = j->code_buffer >> 16; + for (k=FAST_BITS+1 ; ; ++k) + if (temp < h->maxcode[k]) + break; + if (k == 17) { + // error! code not found + j->code_bits -= 16; + return -1; + } + + if (k > j->code_bits) + return -1; + + // convert the huffman code to the symbol id + c = ((j->code_buffer >> (32 - k)) & stbi__bmask[k]) + h->delta[k]; + if(c < 0 || c >= 256) // symbol id out of bounds! + return -1; + STBI_ASSERT((((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]); + + // convert the id to a symbol + j->code_bits -= k; + j->code_buffer <<= k; + return h->values[c]; +} + +// bias[n] = (-1<code_bits < n) stbi__grow_buffer_unsafe(j); + if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing + + sgn = j->code_buffer >> 31; // sign bit always in MSB; 0 if MSB clear (positive), 1 if MSB set (negative) + k = stbi_lrot(j->code_buffer, n); + j->code_buffer = k & ~stbi__bmask[n]; + k &= stbi__bmask[n]; + j->code_bits -= n; + return k + (stbi__jbias[n] & (sgn - 1)); +} + +// get some unsigned bits +stbi_inline static int stbi__jpeg_get_bits(stbi__jpeg *j, int n) +{ + unsigned int k; + if (j->code_bits < n) stbi__grow_buffer_unsafe(j); + if (j->code_bits < n) return 0; // ran out of bits from stream, return 0s intead of continuing + k = stbi_lrot(j->code_buffer, n); + j->code_buffer = k & ~stbi__bmask[n]; + k &= stbi__bmask[n]; + j->code_bits -= n; + return k; +} + +stbi_inline static int stbi__jpeg_get_bit(stbi__jpeg *j) +{ + unsigned int k; + if (j->code_bits < 1) stbi__grow_buffer_unsafe(j); + if (j->code_bits < 1) return 0; // ran out of bits from stream, return 0s intead of continuing + k = j->code_buffer; + j->code_buffer <<= 1; + --j->code_bits; + return k & 0x80000000; +} + +// given a value that's at position X in the zigzag stream, +// where does it appear in the 8x8 matrix coded as row-major? +static const stbi_uc stbi__jpeg_dezigzag[64+15] = +{ + 0, 1, 8, 16, 9, 2, 3, 10, + 17, 24, 32, 25, 18, 11, 4, 5, + 12, 19, 26, 33, 40, 48, 41, 34, + 27, 20, 13, 6, 7, 14, 21, 28, + 35, 42, 49, 56, 57, 50, 43, 36, + 29, 22, 15, 23, 30, 37, 44, 51, + 58, 59, 52, 45, 38, 31, 39, 46, + 53, 60, 61, 54, 47, 55, 62, 63, + // let corrupt input sample past end + 63, 63, 63, 63, 63, 63, 63, 63, + 63, 63, 63, 63, 63, 63, 63 +}; + +// decode one 64-entry block-- +static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman *hdc, stbi__huffman *hac, stbi__int16 *fac, int b, stbi__uint16 *dequant) +{ + int diff,dc,k; + int t; + + if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); + t = stbi__jpeg_huff_decode(j, hdc); + if (t < 0 || t > 15) return stbi__err("bad huffman code","Corrupt JPEG"); + + // 0 all the ac values now so we can do it 32-bits at a time + memset(data,0,64*sizeof(data[0])); + + diff = t ? stbi__extend_receive(j, t) : 0; + if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta","Corrupt JPEG"); + dc = j->img_comp[b].dc_pred + diff; + j->img_comp[b].dc_pred = dc; + if (!stbi__mul2shorts_valid(dc, dequant[0])) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); + data[0] = (short) (dc * dequant[0]); + + // decode AC components, see JPEG spec + k = 1; + do { + unsigned int zig; + int c,r,s; + if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); + c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); + r = fac[c]; + if (r) { // fast-AC path + k += (r >> 4) & 15; // run + s = r & 15; // combined length + if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); + j->code_buffer <<= s; + j->code_bits -= s; + // decode into unzigzag'd location + zig = stbi__jpeg_dezigzag[k++]; + data[zig] = (short) ((r >> 8) * dequant[zig]); + } else { + int rs = stbi__jpeg_huff_decode(j, hac); + if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); + s = rs & 15; + r = rs >> 4; + if (s == 0) { + if (rs != 0xf0) break; // end block + k += 16; + } else { + k += r; + // decode into unzigzag'd location + zig = stbi__jpeg_dezigzag[k++]; + data[zig] = (short) (stbi__extend_receive(j,s) * dequant[zig]); + } + } + } while (k < 64); + return 1; +} + +static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg *j, short data[64], stbi__huffman *hdc, int b) +{ + int diff,dc; + int t; + if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); + + if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); + + if (j->succ_high == 0) { + // first scan for DC coefficient, must be first + memset(data,0,64*sizeof(data[0])); // 0 all the ac values now + t = stbi__jpeg_huff_decode(j, hdc); + if (t < 0 || t > 15) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); + diff = t ? stbi__extend_receive(j, t) : 0; + + if (!stbi__addints_valid(j->img_comp[b].dc_pred, diff)) return stbi__err("bad delta", "Corrupt JPEG"); + dc = j->img_comp[b].dc_pred + diff; + j->img_comp[b].dc_pred = dc; + if (!stbi__mul2shorts_valid(dc, 1 << j->succ_low)) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); + data[0] = (short) (dc * (1 << j->succ_low)); + } else { + // refinement scan for DC coefficient + if (stbi__jpeg_get_bit(j)) + data[0] += (short) (1 << j->succ_low); + } + return 1; +} + +// @OPTIMIZE: store non-zigzagged during the decode passes, +// and only de-zigzag when dequantizing +static int stbi__jpeg_decode_block_prog_ac(stbi__jpeg *j, short data[64], stbi__huffman *hac, stbi__int16 *fac) +{ + int k; + if (j->spec_start == 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG"); + + if (j->succ_high == 0) { + int shift = j->succ_low; + + if (j->eob_run) { + --j->eob_run; + return 1; + } + + k = j->spec_start; + do { + unsigned int zig; + int c,r,s; + if (j->code_bits < 16) stbi__grow_buffer_unsafe(j); + c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1); + r = fac[c]; + if (r) { // fast-AC path + k += (r >> 4) & 15; // run + s = r & 15; // combined length + if (s > j->code_bits) return stbi__err("bad huffman code", "Combined length longer than code bits available"); + j->code_buffer <<= s; + j->code_bits -= s; + zig = stbi__jpeg_dezigzag[k++]; + data[zig] = (short) ((r >> 8) * (1 << shift)); + } else { + int rs = stbi__jpeg_huff_decode(j, hac); + if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); + s = rs & 15; + r = rs >> 4; + if (s == 0) { + if (r < 15) { + j->eob_run = (1 << r); + if (r) + j->eob_run += stbi__jpeg_get_bits(j, r); + --j->eob_run; + break; + } + k += 16; + } else { + k += r; + zig = stbi__jpeg_dezigzag[k++]; + data[zig] = (short) (stbi__extend_receive(j,s) * (1 << shift)); + } + } + } while (k <= j->spec_end); + } else { + // refinement scan for these AC coefficients + + short bit = (short) (1 << j->succ_low); + + if (j->eob_run) { + --j->eob_run; + for (k = j->spec_start; k <= j->spec_end; ++k) { + short *p = &data[stbi__jpeg_dezigzag[k]]; + if (*p != 0) + if (stbi__jpeg_get_bit(j)) + if ((*p & bit)==0) { + if (*p > 0) + *p += bit; + else + *p -= bit; + } + } + } else { + k = j->spec_start; + do { + int r,s; + int rs = stbi__jpeg_huff_decode(j, hac); // @OPTIMIZE see if we can use the fast path here, advance-by-r is so slow, eh + if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG"); + s = rs & 15; + r = rs >> 4; + if (s == 0) { + if (r < 15) { + j->eob_run = (1 << r) - 1; + if (r) + j->eob_run += stbi__jpeg_get_bits(j, r); + r = 64; // force end of block + } else { + // r=15 s=0 should write 16 0s, so we just do + // a run of 15 0s and then write s (which is 0), + // so we don't have to do anything special here + } + } else { + if (s != 1) return stbi__err("bad huffman code", "Corrupt JPEG"); + // sign bit + if (stbi__jpeg_get_bit(j)) + s = bit; + else + s = -bit; + } + + // advance by r + while (k <= j->spec_end) { + short *p = &data[stbi__jpeg_dezigzag[k++]]; + if (*p != 0) { + if (stbi__jpeg_get_bit(j)) + if ((*p & bit)==0) { + if (*p > 0) + *p += bit; + else + *p -= bit; + } + } else { + if (r == 0) { + *p = (short) s; + break; + } + --r; + } + } + } while (k <= j->spec_end); + } + } + return 1; +} + +// take a -128..127 value and stbi__clamp it and convert to 0..255 +stbi_inline static stbi_uc stbi__clamp(int x) +{ + // trick to use a single test to catch both cases + if ((unsigned int) x > 255) { + if (x < 0) return 0; + if (x > 255) return 255; + } + return (stbi_uc) x; +} + +#define stbi__f2f(x) ((int) (((x) * 4096 + 0.5))) +#define stbi__fsh(x) ((x) * 4096) + +// derived from jidctint -- DCT_ISLOW +#define STBI__IDCT_1D(s0,s1,s2,s3,s4,s5,s6,s7) \ + int t0,t1,t2,t3,p1,p2,p3,p4,p5,x0,x1,x2,x3; \ + p2 = s2; \ + p3 = s6; \ + p1 = (p2+p3) * stbi__f2f(0.5411961f); \ + t2 = p1 + p3*stbi__f2f(-1.847759065f); \ + t3 = p1 + p2*stbi__f2f( 0.765366865f); \ + p2 = s0; \ + p3 = s4; \ + t0 = stbi__fsh(p2+p3); \ + t1 = stbi__fsh(p2-p3); \ + x0 = t0+t3; \ + x3 = t0-t3; \ + x1 = t1+t2; \ + x2 = t1-t2; \ + t0 = s7; \ + t1 = s5; \ + t2 = s3; \ + t3 = s1; \ + p3 = t0+t2; \ + p4 = t1+t3; \ + p1 = t0+t3; \ + p2 = t1+t2; \ + p5 = (p3+p4)*stbi__f2f( 1.175875602f); \ + t0 = t0*stbi__f2f( 0.298631336f); \ + t1 = t1*stbi__f2f( 2.053119869f); \ + t2 = t2*stbi__f2f( 3.072711026f); \ + t3 = t3*stbi__f2f( 1.501321110f); \ + p1 = p5 + p1*stbi__f2f(-0.899976223f); \ + p2 = p5 + p2*stbi__f2f(-2.562915447f); \ + p3 = p3*stbi__f2f(-1.961570560f); \ + p4 = p4*stbi__f2f(-0.390180644f); \ + t3 += p1+p4; \ + t2 += p2+p3; \ + t1 += p2+p4; \ + t0 += p1+p3; + +static void stbi__idct_block(stbi_uc *out, int out_stride, short data[64]) +{ + int i,val[64],*v=val; + stbi_uc *o; + short *d = data; + + // columns + for (i=0; i < 8; ++i,++d, ++v) { + // if all zeroes, shortcut -- this avoids dequantizing 0s and IDCTing + if (d[ 8]==0 && d[16]==0 && d[24]==0 && d[32]==0 + && d[40]==0 && d[48]==0 && d[56]==0) { + // no shortcut 0 seconds + // (1|2|3|4|5|6|7)==0 0 seconds + // all separate -0.047 seconds + // 1 && 2|3 && 4|5 && 6|7: -0.047 seconds + int dcterm = d[0]*4; + v[0] = v[8] = v[16] = v[24] = v[32] = v[40] = v[48] = v[56] = dcterm; + } else { + STBI__IDCT_1D(d[ 0],d[ 8],d[16],d[24],d[32],d[40],d[48],d[56]) + // constants scaled things up by 1<<12; let's bring them back + // down, but keep 2 extra bits of precision + x0 += 512; x1 += 512; x2 += 512; x3 += 512; + v[ 0] = (x0+t3) >> 10; + v[56] = (x0-t3) >> 10; + v[ 8] = (x1+t2) >> 10; + v[48] = (x1-t2) >> 10; + v[16] = (x2+t1) >> 10; + v[40] = (x2-t1) >> 10; + v[24] = (x3+t0) >> 10; + v[32] = (x3-t0) >> 10; + } + } + + for (i=0, v=val, o=out; i < 8; ++i,v+=8,o+=out_stride) { + // no fast case since the first 1D IDCT spread components out + STBI__IDCT_1D(v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7]) + // constants scaled things up by 1<<12, plus we had 1<<2 from first + // loop, plus horizontal and vertical each scale by sqrt(8) so together + // we've got an extra 1<<3, so 1<<17 total we need to remove. + // so we want to round that, which means adding 0.5 * 1<<17, + // aka 65536. Also, we'll end up with -128 to 127 that we want + // to encode as 0..255 by adding 128, so we'll add that before the shift + x0 += 65536 + (128<<17); + x1 += 65536 + (128<<17); + x2 += 65536 + (128<<17); + x3 += 65536 + (128<<17); + // tried computing the shifts into temps, or'ing the temps to see + // if any were out of range, but that was slower + o[0] = stbi__clamp((x0+t3) >> 17); + o[7] = stbi__clamp((x0-t3) >> 17); + o[1] = stbi__clamp((x1+t2) >> 17); + o[6] = stbi__clamp((x1-t2) >> 17); + o[2] = stbi__clamp((x2+t1) >> 17); + o[5] = stbi__clamp((x2-t1) >> 17); + o[3] = stbi__clamp((x3+t0) >> 17); + o[4] = stbi__clamp((x3-t0) >> 17); + } +} + +#ifdef STBI_SSE2 +// sse2 integer IDCT. not the fastest possible implementation but it +// produces bit-identical results to the generic C version so it's +// fully "transparent". +static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64]) +{ + // This is constructed to match our regular (generic) integer IDCT exactly. + __m128i row0, row1, row2, row3, row4, row5, row6, row7; + __m128i tmp; + + // dot product constant: even elems=x, odd elems=y + #define dct_const(x,y) _mm_setr_epi16((x),(y),(x),(y),(x),(y),(x),(y)) + + // out(0) = c0[even]*x + c0[odd]*y (c0, x, y 16-bit, out 32-bit) + // out(1) = c1[even]*x + c1[odd]*y + #define dct_rot(out0,out1, x,y,c0,c1) \ + __m128i c0##lo = _mm_unpacklo_epi16((x),(y)); \ + __m128i c0##hi = _mm_unpackhi_epi16((x),(y)); \ + __m128i out0##_l = _mm_madd_epi16(c0##lo, c0); \ + __m128i out0##_h = _mm_madd_epi16(c0##hi, c0); \ + __m128i out1##_l = _mm_madd_epi16(c0##lo, c1); \ + __m128i out1##_h = _mm_madd_epi16(c0##hi, c1) + + // out = in << 12 (in 16-bit, out 32-bit) + #define dct_widen(out, in) \ + __m128i out##_l = _mm_srai_epi32(_mm_unpacklo_epi16(_mm_setzero_si128(), (in)), 4); \ + __m128i out##_h = _mm_srai_epi32(_mm_unpackhi_epi16(_mm_setzero_si128(), (in)), 4) + + // wide add + #define dct_wadd(out, a, b) \ + __m128i out##_l = _mm_add_epi32(a##_l, b##_l); \ + __m128i out##_h = _mm_add_epi32(a##_h, b##_h) + + // wide sub + #define dct_wsub(out, a, b) \ + __m128i out##_l = _mm_sub_epi32(a##_l, b##_l); \ + __m128i out##_h = _mm_sub_epi32(a##_h, b##_h) + + // butterfly a/b, add bias, then shift by "s" and pack + #define dct_bfly32o(out0, out1, a,b,bias,s) \ + { \ + __m128i abiased_l = _mm_add_epi32(a##_l, bias); \ + __m128i abiased_h = _mm_add_epi32(a##_h, bias); \ + dct_wadd(sum, abiased, b); \ + dct_wsub(dif, abiased, b); \ + out0 = _mm_packs_epi32(_mm_srai_epi32(sum_l, s), _mm_srai_epi32(sum_h, s)); \ + out1 = _mm_packs_epi32(_mm_srai_epi32(dif_l, s), _mm_srai_epi32(dif_h, s)); \ + } + + // 8-bit interleave step (for transposes) + #define dct_interleave8(a, b) \ + tmp = a; \ + a = _mm_unpacklo_epi8(a, b); \ + b = _mm_unpackhi_epi8(tmp, b) + + // 16-bit interleave step (for transposes) + #define dct_interleave16(a, b) \ + tmp = a; \ + a = _mm_unpacklo_epi16(a, b); \ + b = _mm_unpackhi_epi16(tmp, b) + + #define dct_pass(bias,shift) \ + { \ + /* even part */ \ + dct_rot(t2e,t3e, row2,row6, rot0_0,rot0_1); \ + __m128i sum04 = _mm_add_epi16(row0, row4); \ + __m128i dif04 = _mm_sub_epi16(row0, row4); \ + dct_widen(t0e, sum04); \ + dct_widen(t1e, dif04); \ + dct_wadd(x0, t0e, t3e); \ + dct_wsub(x3, t0e, t3e); \ + dct_wadd(x1, t1e, t2e); \ + dct_wsub(x2, t1e, t2e); \ + /* odd part */ \ + dct_rot(y0o,y2o, row7,row3, rot2_0,rot2_1); \ + dct_rot(y1o,y3o, row5,row1, rot3_0,rot3_1); \ + __m128i sum17 = _mm_add_epi16(row1, row7); \ + __m128i sum35 = _mm_add_epi16(row3, row5); \ + dct_rot(y4o,y5o, sum17,sum35, rot1_0,rot1_1); \ + dct_wadd(x4, y0o, y4o); \ + dct_wadd(x5, y1o, y5o); \ + dct_wadd(x6, y2o, y5o); \ + dct_wadd(x7, y3o, y4o); \ + dct_bfly32o(row0,row7, x0,x7,bias,shift); \ + dct_bfly32o(row1,row6, x1,x6,bias,shift); \ + dct_bfly32o(row2,row5, x2,x5,bias,shift); \ + dct_bfly32o(row3,row4, x3,x4,bias,shift); \ + } + + __m128i rot0_0 = dct_const(stbi__f2f(0.5411961f), stbi__f2f(0.5411961f) + stbi__f2f(-1.847759065f)); + __m128i rot0_1 = dct_const(stbi__f2f(0.5411961f) + stbi__f2f( 0.765366865f), stbi__f2f(0.5411961f)); + __m128i rot1_0 = dct_const(stbi__f2f(1.175875602f) + stbi__f2f(-0.899976223f), stbi__f2f(1.175875602f)); + __m128i rot1_1 = dct_const(stbi__f2f(1.175875602f), stbi__f2f(1.175875602f) + stbi__f2f(-2.562915447f)); + __m128i rot2_0 = dct_const(stbi__f2f(-1.961570560f) + stbi__f2f( 0.298631336f), stbi__f2f(-1.961570560f)); + __m128i rot2_1 = dct_const(stbi__f2f(-1.961570560f), stbi__f2f(-1.961570560f) + stbi__f2f( 3.072711026f)); + __m128i rot3_0 = dct_const(stbi__f2f(-0.390180644f) + stbi__f2f( 2.053119869f), stbi__f2f(-0.390180644f)); + __m128i rot3_1 = dct_const(stbi__f2f(-0.390180644f), stbi__f2f(-0.390180644f) + stbi__f2f( 1.501321110f)); + + // rounding biases in column/row passes, see stbi__idct_block for explanation. + __m128i bias_0 = _mm_set1_epi32(512); + __m128i bias_1 = _mm_set1_epi32(65536 + (128<<17)); + + // load + row0 = _mm_load_si128((const __m128i *) (data + 0*8)); + row1 = _mm_load_si128((const __m128i *) (data + 1*8)); + row2 = _mm_load_si128((const __m128i *) (data + 2*8)); + row3 = _mm_load_si128((const __m128i *) (data + 3*8)); + row4 = _mm_load_si128((const __m128i *) (data + 4*8)); + row5 = _mm_load_si128((const __m128i *) (data + 5*8)); + row6 = _mm_load_si128((const __m128i *) (data + 6*8)); + row7 = _mm_load_si128((const __m128i *) (data + 7*8)); + + // column pass + dct_pass(bias_0, 10); + + { + // 16bit 8x8 transpose pass 1 + dct_interleave16(row0, row4); + dct_interleave16(row1, row5); + dct_interleave16(row2, row6); + dct_interleave16(row3, row7); + + // transpose pass 2 + dct_interleave16(row0, row2); + dct_interleave16(row1, row3); + dct_interleave16(row4, row6); + dct_interleave16(row5, row7); + + // transpose pass 3 + dct_interleave16(row0, row1); + dct_interleave16(row2, row3); + dct_interleave16(row4, row5); + dct_interleave16(row6, row7); + } + + // row pass + dct_pass(bias_1, 17); + + { + // pack + __m128i p0 = _mm_packus_epi16(row0, row1); // a0a1a2a3...a7b0b1b2b3...b7 + __m128i p1 = _mm_packus_epi16(row2, row3); + __m128i p2 = _mm_packus_epi16(row4, row5); + __m128i p3 = _mm_packus_epi16(row6, row7); + + // 8bit 8x8 transpose pass 1 + dct_interleave8(p0, p2); // a0e0a1e1... + dct_interleave8(p1, p3); // c0g0c1g1... + + // transpose pass 2 + dct_interleave8(p0, p1); // a0c0e0g0... + dct_interleave8(p2, p3); // b0d0f0h0... + + // transpose pass 3 + dct_interleave8(p0, p2); // a0b0c0d0... + dct_interleave8(p1, p3); // a4b4c4d4... + + // store + _mm_storel_epi64((__m128i *) out, p0); out += out_stride; + _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p0, 0x4e)); out += out_stride; + _mm_storel_epi64((__m128i *) out, p2); out += out_stride; + _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p2, 0x4e)); out += out_stride; + _mm_storel_epi64((__m128i *) out, p1); out += out_stride; + _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p1, 0x4e)); out += out_stride; + _mm_storel_epi64((__m128i *) out, p3); out += out_stride; + _mm_storel_epi64((__m128i *) out, _mm_shuffle_epi32(p3, 0x4e)); + } + +#undef dct_const +#undef dct_rot +#undef dct_widen +#undef dct_wadd +#undef dct_wsub +#undef dct_bfly32o +#undef dct_interleave8 +#undef dct_interleave16 +#undef dct_pass +} + +#endif // STBI_SSE2 + +#ifdef STBI_NEON + +// NEON integer IDCT. should produce bit-identical +// results to the generic C version. +static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64]) +{ + int16x8_t row0, row1, row2, row3, row4, row5, row6, row7; + + int16x4_t rot0_0 = vdup_n_s16(stbi__f2f(0.5411961f)); + int16x4_t rot0_1 = vdup_n_s16(stbi__f2f(-1.847759065f)); + int16x4_t rot0_2 = vdup_n_s16(stbi__f2f( 0.765366865f)); + int16x4_t rot1_0 = vdup_n_s16(stbi__f2f( 1.175875602f)); + int16x4_t rot1_1 = vdup_n_s16(stbi__f2f(-0.899976223f)); + int16x4_t rot1_2 = vdup_n_s16(stbi__f2f(-2.562915447f)); + int16x4_t rot2_0 = vdup_n_s16(stbi__f2f(-1.961570560f)); + int16x4_t rot2_1 = vdup_n_s16(stbi__f2f(-0.390180644f)); + int16x4_t rot3_0 = vdup_n_s16(stbi__f2f( 0.298631336f)); + int16x4_t rot3_1 = vdup_n_s16(stbi__f2f( 2.053119869f)); + int16x4_t rot3_2 = vdup_n_s16(stbi__f2f( 3.072711026f)); + int16x4_t rot3_3 = vdup_n_s16(stbi__f2f( 1.501321110f)); + +#define dct_long_mul(out, inq, coeff) \ + int32x4_t out##_l = vmull_s16(vget_low_s16(inq), coeff); \ + int32x4_t out##_h = vmull_s16(vget_high_s16(inq), coeff) + +#define dct_long_mac(out, acc, inq, coeff) \ + int32x4_t out##_l = vmlal_s16(acc##_l, vget_low_s16(inq), coeff); \ + int32x4_t out##_h = vmlal_s16(acc##_h, vget_high_s16(inq), coeff) + +#define dct_widen(out, inq) \ + int32x4_t out##_l = vshll_n_s16(vget_low_s16(inq), 12); \ + int32x4_t out##_h = vshll_n_s16(vget_high_s16(inq), 12) + +// wide add +#define dct_wadd(out, a, b) \ + int32x4_t out##_l = vaddq_s32(a##_l, b##_l); \ + int32x4_t out##_h = vaddq_s32(a##_h, b##_h) + +// wide sub +#define dct_wsub(out, a, b) \ + int32x4_t out##_l = vsubq_s32(a##_l, b##_l); \ + int32x4_t out##_h = vsubq_s32(a##_h, b##_h) + +// butterfly a/b, then shift using "shiftop" by "s" and pack +#define dct_bfly32o(out0,out1, a,b,shiftop,s) \ + { \ + dct_wadd(sum, a, b); \ + dct_wsub(dif, a, b); \ + out0 = vcombine_s16(shiftop(sum_l, s), shiftop(sum_h, s)); \ + out1 = vcombine_s16(shiftop(dif_l, s), shiftop(dif_h, s)); \ + } + +#define dct_pass(shiftop, shift) \ + { \ + /* even part */ \ + int16x8_t sum26 = vaddq_s16(row2, row6); \ + dct_long_mul(p1e, sum26, rot0_0); \ + dct_long_mac(t2e, p1e, row6, rot0_1); \ + dct_long_mac(t3e, p1e, row2, rot0_2); \ + int16x8_t sum04 = vaddq_s16(row0, row4); \ + int16x8_t dif04 = vsubq_s16(row0, row4); \ + dct_widen(t0e, sum04); \ + dct_widen(t1e, dif04); \ + dct_wadd(x0, t0e, t3e); \ + dct_wsub(x3, t0e, t3e); \ + dct_wadd(x1, t1e, t2e); \ + dct_wsub(x2, t1e, t2e); \ + /* odd part */ \ + int16x8_t sum15 = vaddq_s16(row1, row5); \ + int16x8_t sum17 = vaddq_s16(row1, row7); \ + int16x8_t sum35 = vaddq_s16(row3, row5); \ + int16x8_t sum37 = vaddq_s16(row3, row7); \ + int16x8_t sumodd = vaddq_s16(sum17, sum35); \ + dct_long_mul(p5o, sumodd, rot1_0); \ + dct_long_mac(p1o, p5o, sum17, rot1_1); \ + dct_long_mac(p2o, p5o, sum35, rot1_2); \ + dct_long_mul(p3o, sum37, rot2_0); \ + dct_long_mul(p4o, sum15, rot2_1); \ + dct_wadd(sump13o, p1o, p3o); \ + dct_wadd(sump24o, p2o, p4o); \ + dct_wadd(sump23o, p2o, p3o); \ + dct_wadd(sump14o, p1o, p4o); \ + dct_long_mac(x4, sump13o, row7, rot3_0); \ + dct_long_mac(x5, sump24o, row5, rot3_1); \ + dct_long_mac(x6, sump23o, row3, rot3_2); \ + dct_long_mac(x7, sump14o, row1, rot3_3); \ + dct_bfly32o(row0,row7, x0,x7,shiftop,shift); \ + dct_bfly32o(row1,row6, x1,x6,shiftop,shift); \ + dct_bfly32o(row2,row5, x2,x5,shiftop,shift); \ + dct_bfly32o(row3,row4, x3,x4,shiftop,shift); \ + } + + // load + row0 = vld1q_s16(data + 0*8); + row1 = vld1q_s16(data + 1*8); + row2 = vld1q_s16(data + 2*8); + row3 = vld1q_s16(data + 3*8); + row4 = vld1q_s16(data + 4*8); + row5 = vld1q_s16(data + 5*8); + row6 = vld1q_s16(data + 6*8); + row7 = vld1q_s16(data + 7*8); + + // add DC bias + row0 = vaddq_s16(row0, vsetq_lane_s16(1024, vdupq_n_s16(0), 0)); + + // column pass + dct_pass(vrshrn_n_s32, 10); + + // 16bit 8x8 transpose + { +// these three map to a single VTRN.16, VTRN.32, and VSWP, respectively. +// whether compilers actually get this is another story, sadly. +#define dct_trn16(x, y) { int16x8x2_t t = vtrnq_s16(x, y); x = t.val[0]; y = t.val[1]; } +#define dct_trn32(x, y) { int32x4x2_t t = vtrnq_s32(vreinterpretq_s32_s16(x), vreinterpretq_s32_s16(y)); x = vreinterpretq_s16_s32(t.val[0]); y = vreinterpretq_s16_s32(t.val[1]); } +#define dct_trn64(x, y) { int16x8_t x0 = x; int16x8_t y0 = y; x = vcombine_s16(vget_low_s16(x0), vget_low_s16(y0)); y = vcombine_s16(vget_high_s16(x0), vget_high_s16(y0)); } + + // pass 1 + dct_trn16(row0, row1); // a0b0a2b2a4b4a6b6 + dct_trn16(row2, row3); + dct_trn16(row4, row5); + dct_trn16(row6, row7); + + // pass 2 + dct_trn32(row0, row2); // a0b0c0d0a4b4c4d4 + dct_trn32(row1, row3); + dct_trn32(row4, row6); + dct_trn32(row5, row7); + + // pass 3 + dct_trn64(row0, row4); // a0b0c0d0e0f0g0h0 + dct_trn64(row1, row5); + dct_trn64(row2, row6); + dct_trn64(row3, row7); + +#undef dct_trn16 +#undef dct_trn32 +#undef dct_trn64 + } + + // row pass + // vrshrn_n_s32 only supports shifts up to 16, we need + // 17. so do a non-rounding shift of 16 first then follow + // up with a rounding shift by 1. + dct_pass(vshrn_n_s32, 16); + + { + // pack and round + uint8x8_t p0 = vqrshrun_n_s16(row0, 1); + uint8x8_t p1 = vqrshrun_n_s16(row1, 1); + uint8x8_t p2 = vqrshrun_n_s16(row2, 1); + uint8x8_t p3 = vqrshrun_n_s16(row3, 1); + uint8x8_t p4 = vqrshrun_n_s16(row4, 1); + uint8x8_t p5 = vqrshrun_n_s16(row5, 1); + uint8x8_t p6 = vqrshrun_n_s16(row6, 1); + uint8x8_t p7 = vqrshrun_n_s16(row7, 1); + + // again, these can translate into one instruction, but often don't. +#define dct_trn8_8(x, y) { uint8x8x2_t t = vtrn_u8(x, y); x = t.val[0]; y = t.val[1]; } +#define dct_trn8_16(x, y) { uint16x4x2_t t = vtrn_u16(vreinterpret_u16_u8(x), vreinterpret_u16_u8(y)); x = vreinterpret_u8_u16(t.val[0]); y = vreinterpret_u8_u16(t.val[1]); } +#define dct_trn8_32(x, y) { uint32x2x2_t t = vtrn_u32(vreinterpret_u32_u8(x), vreinterpret_u32_u8(y)); x = vreinterpret_u8_u32(t.val[0]); y = vreinterpret_u8_u32(t.val[1]); } + + // sadly can't use interleaved stores here since we only write + // 8 bytes to each scan line! + + // 8x8 8-bit transpose pass 1 + dct_trn8_8(p0, p1); + dct_trn8_8(p2, p3); + dct_trn8_8(p4, p5); + dct_trn8_8(p6, p7); + + // pass 2 + dct_trn8_16(p0, p2); + dct_trn8_16(p1, p3); + dct_trn8_16(p4, p6); + dct_trn8_16(p5, p7); + + // pass 3 + dct_trn8_32(p0, p4); + dct_trn8_32(p1, p5); + dct_trn8_32(p2, p6); + dct_trn8_32(p3, p7); + + // store + vst1_u8(out, p0); out += out_stride; + vst1_u8(out, p1); out += out_stride; + vst1_u8(out, p2); out += out_stride; + vst1_u8(out, p3); out += out_stride; + vst1_u8(out, p4); out += out_stride; + vst1_u8(out, p5); out += out_stride; + vst1_u8(out, p6); out += out_stride; + vst1_u8(out, p7); + +#undef dct_trn8_8 +#undef dct_trn8_16 +#undef dct_trn8_32 + } + +#undef dct_long_mul +#undef dct_long_mac +#undef dct_widen +#undef dct_wadd +#undef dct_wsub +#undef dct_bfly32o +#undef dct_pass +} + +#endif // STBI_NEON + +#define STBI__MARKER_none 0xff +// if there's a pending marker from the entropy stream, return that +// otherwise, fetch from the stream and get a marker. if there's no +// marker, return 0xff, which is never a valid marker value +static stbi_uc stbi__get_marker(stbi__jpeg *j) +{ + stbi_uc x; + if (j->marker != STBI__MARKER_none) { x = j->marker; j->marker = STBI__MARKER_none; return x; } + x = stbi__get8(j->s); + if (x != 0xff) return STBI__MARKER_none; + while (x == 0xff) + x = stbi__get8(j->s); // consume repeated 0xff fill bytes + return x; +} + +// in each scan, we'll have scan_n components, and the order +// of the components is specified by order[] +#define STBI__RESTART(x) ((x) >= 0xd0 && (x) <= 0xd7) + +// after a restart interval, stbi__jpeg_reset the entropy decoder and +// the dc prediction +static void stbi__jpeg_reset(stbi__jpeg *j) +{ + j->code_bits = 0; + j->code_buffer = 0; + j->nomore = 0; + j->img_comp[0].dc_pred = j->img_comp[1].dc_pred = j->img_comp[2].dc_pred = j->img_comp[3].dc_pred = 0; + j->marker = STBI__MARKER_none; + j->todo = j->restart_interval ? j->restart_interval : 0x7fffffff; + j->eob_run = 0; + // no more than 1<<31 MCUs if no restart_interal? that's plenty safe, + // since we don't even allow 1<<30 pixels +} + +static int stbi__parse_entropy_coded_data(stbi__jpeg *z) +{ + stbi__jpeg_reset(z); + if (!z->progressive) { + if (z->scan_n == 1) { + int i,j; + STBI_SIMD_ALIGN(short, data[64]); + int n = z->order[0]; + // non-interleaved data, we just need to process one block at a time, + // in trivial scanline order + // number of blocks to do just depends on how many actual "pixels" this + // component has, independent of interleaved MCU blocking and such + int w = (z->img_comp[n].x+7) >> 3; + int h = (z->img_comp[n].y+7) >> 3; + for (j=0; j < h; ++j) { + for (i=0; i < w; ++i) { + int ha = z->img_comp[n].ha; + if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; + z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data); + // every data block is an MCU, so countdown the restart interval + if (--z->todo <= 0) { + if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); + // if it's NOT a restart, then just bail, so we get corrupt data + // rather than no data + if (!STBI__RESTART(z->marker)) return 1; + stbi__jpeg_reset(z); + } + } + } + return 1; + } else { // interleaved + int i,j,k,x,y; + STBI_SIMD_ALIGN(short, data[64]); + for (j=0; j < z->img_mcu_y; ++j) { + for (i=0; i < z->img_mcu_x; ++i) { + // scan an interleaved mcu... process scan_n components in order + for (k=0; k < z->scan_n; ++k) { + int n = z->order[k]; + // scan out an mcu's worth of this component; that's just determined + // by the basic H and V specified for the component + for (y=0; y < z->img_comp[n].v; ++y) { + for (x=0; x < z->img_comp[n].h; ++x) { + int x2 = (i*z->img_comp[n].h + x)*8; + int y2 = (j*z->img_comp[n].v + y)*8; + int ha = z->img_comp[n].ha; + if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+ha, z->fast_ac[ha], n, z->dequant[z->img_comp[n].tq])) return 0; + z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*y2+x2, z->img_comp[n].w2, data); + } + } + } + // after all interleaved components, that's an interleaved MCU, + // so now count down the restart interval + if (--z->todo <= 0) { + if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); + if (!STBI__RESTART(z->marker)) return 1; + stbi__jpeg_reset(z); + } + } + } + return 1; + } + } else { + if (z->scan_n == 1) { + int i,j; + int n = z->order[0]; + // non-interleaved data, we just need to process one block at a time, + // in trivial scanline order + // number of blocks to do just depends on how many actual "pixels" this + // component has, independent of interleaved MCU blocking and such + int w = (z->img_comp[n].x+7) >> 3; + int h = (z->img_comp[n].y+7) >> 3; + for (j=0; j < h; ++j) { + for (i=0; i < w; ++i) { + short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); + if (z->spec_start == 0) { + if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) + return 0; + } else { + int ha = z->img_comp[n].ha; + if (!stbi__jpeg_decode_block_prog_ac(z, data, &z->huff_ac[ha], z->fast_ac[ha])) + return 0; + } + // every data block is an MCU, so countdown the restart interval + if (--z->todo <= 0) { + if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); + if (!STBI__RESTART(z->marker)) return 1; + stbi__jpeg_reset(z); + } + } + } + return 1; + } else { // interleaved + int i,j,k,x,y; + for (j=0; j < z->img_mcu_y; ++j) { + for (i=0; i < z->img_mcu_x; ++i) { + // scan an interleaved mcu... process scan_n components in order + for (k=0; k < z->scan_n; ++k) { + int n = z->order[k]; + // scan out an mcu's worth of this component; that's just determined + // by the basic H and V specified for the component + for (y=0; y < z->img_comp[n].v; ++y) { + for (x=0; x < z->img_comp[n].h; ++x) { + int x2 = (i*z->img_comp[n].h + x); + int y2 = (j*z->img_comp[n].v + y); + short *data = z->img_comp[n].coeff + 64 * (x2 + y2 * z->img_comp[n].coeff_w); + if (!stbi__jpeg_decode_block_prog_dc(z, data, &z->huff_dc[z->img_comp[n].hd], n)) + return 0; + } + } + } + // after all interleaved components, that's an interleaved MCU, + // so now count down the restart interval + if (--z->todo <= 0) { + if (z->code_bits < 24) stbi__grow_buffer_unsafe(z); + if (!STBI__RESTART(z->marker)) return 1; + stbi__jpeg_reset(z); + } + } + } + return 1; + } + } +} + +static void stbi__jpeg_dequantize(short *data, stbi__uint16 *dequant) +{ + int i; + for (i=0; i < 64; ++i) + data[i] *= dequant[i]; +} + +static void stbi__jpeg_finish(stbi__jpeg *z) +{ + if (z->progressive) { + // dequantize and idct the data + int i,j,n; + for (n=0; n < z->s->img_n; ++n) { + int w = (z->img_comp[n].x+7) >> 3; + int h = (z->img_comp[n].y+7) >> 3; + for (j=0; j < h; ++j) { + for (i=0; i < w; ++i) { + short *data = z->img_comp[n].coeff + 64 * (i + j * z->img_comp[n].coeff_w); + stbi__jpeg_dequantize(data, z->dequant[z->img_comp[n].tq]); + z->idct_block_kernel(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data); + } + } + } + } +} + +static int stbi__process_marker(stbi__jpeg *z, int m) +{ + int L; + switch (m) { + case STBI__MARKER_none: // no marker found + return stbi__err("expected marker","Corrupt JPEG"); + + case 0xDD: // DRI - specify restart interval + if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len","Corrupt JPEG"); + z->restart_interval = stbi__get16be(z->s); + return 1; + + case 0xDB: // DQT - define quantization table + L = stbi__get16be(z->s)-2; + while (L > 0) { + int q = stbi__get8(z->s); + int p = q >> 4, sixteen = (p != 0); + int t = q & 15,i; + if (p != 0 && p != 1) return stbi__err("bad DQT type","Corrupt JPEG"); + if (t > 3) return stbi__err("bad DQT table","Corrupt JPEG"); + + for (i=0; i < 64; ++i) + z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s)); + L -= (sixteen ? 129 : 65); + } + return L==0; + + case 0xC4: // DHT - define huffman table + L = stbi__get16be(z->s)-2; + while (L > 0) { + stbi_uc *v; + int sizes[16],i,n=0; + int q = stbi__get8(z->s); + int tc = q >> 4; + int th = q & 15; + if (tc > 1 || th > 3) return stbi__err("bad DHT header","Corrupt JPEG"); + for (i=0; i < 16; ++i) { + sizes[i] = stbi__get8(z->s); + n += sizes[i]; + } + if(n > 256) return stbi__err("bad DHT header","Corrupt JPEG"); // Loop over i < n would write past end of values! + L -= 17; + if (tc == 0) { + if (!stbi__build_huffman(z->huff_dc+th, sizes)) return 0; + v = z->huff_dc[th].values; + } else { + if (!stbi__build_huffman(z->huff_ac+th, sizes)) return 0; + v = z->huff_ac[th].values; + } + for (i=0; i < n; ++i) + v[i] = stbi__get8(z->s); + if (tc != 0) + stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th); + L -= n; + } + return L==0; + } + + // check for comment block or APP blocks + if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) { + L = stbi__get16be(z->s); + if (L < 2) { + if (m == 0xFE) + return stbi__err("bad COM len","Corrupt JPEG"); + else + return stbi__err("bad APP len","Corrupt JPEG"); + } + L -= 2; + + if (m == 0xE0 && L >= 5) { // JFIF APP0 segment + static const unsigned char tag[5] = {'J','F','I','F','\0'}; + int ok = 1; + int i; + for (i=0; i < 5; ++i) + if (stbi__get8(z->s) != tag[i]) + ok = 0; + L -= 5; + if (ok) + z->jfif = 1; + } else if (m == 0xEE && L >= 12) { // Adobe APP14 segment + static const unsigned char tag[6] = {'A','d','o','b','e','\0'}; + int ok = 1; + int i; + for (i=0; i < 6; ++i) + if (stbi__get8(z->s) != tag[i]) + ok = 0; + L -= 6; + if (ok) { + stbi__get8(z->s); // version + stbi__get16be(z->s); // flags0 + stbi__get16be(z->s); // flags1 + z->app14_color_transform = stbi__get8(z->s); // color transform + L -= 6; + } + } + + stbi__skip(z->s, L); + return 1; + } + + return stbi__err("unknown marker","Corrupt JPEG"); +} + +// after we see SOS +static int stbi__process_scan_header(stbi__jpeg *z) +{ + int i; + int Ls = stbi__get16be(z->s); + z->scan_n = stbi__get8(z->s); + if (z->scan_n < 1 || z->scan_n > 4 || z->scan_n > (int) z->s->img_n) return stbi__err("bad SOS component count","Corrupt JPEG"); + if (Ls != 6+2*z->scan_n) return stbi__err("bad SOS len","Corrupt JPEG"); + for (i=0; i < z->scan_n; ++i) { + int id = stbi__get8(z->s), which; + int q = stbi__get8(z->s); + for (which = 0; which < z->s->img_n; ++which) + if (z->img_comp[which].id == id) + break; + if (which == z->s->img_n) return 0; // no match + z->img_comp[which].hd = q >> 4; if (z->img_comp[which].hd > 3) return stbi__err("bad DC huff","Corrupt JPEG"); + z->img_comp[which].ha = q & 15; if (z->img_comp[which].ha > 3) return stbi__err("bad AC huff","Corrupt JPEG"); + z->order[i] = which; + } + + { + int aa; + z->spec_start = stbi__get8(z->s); + z->spec_end = stbi__get8(z->s); // should be 63, but might be 0 + aa = stbi__get8(z->s); + z->succ_high = (aa >> 4); + z->succ_low = (aa & 15); + if (z->progressive) { + if (z->spec_start > 63 || z->spec_end > 63 || z->spec_start > z->spec_end || z->succ_high > 13 || z->succ_low > 13) + return stbi__err("bad SOS", "Corrupt JPEG"); + } else { + if (z->spec_start != 0) return stbi__err("bad SOS","Corrupt JPEG"); + if (z->succ_high != 0 || z->succ_low != 0) return stbi__err("bad SOS","Corrupt JPEG"); + z->spec_end = 63; + } + } + + return 1; +} + +static int stbi__free_jpeg_components(stbi__jpeg *z, int ncomp, int why) +{ + int i; + for (i=0; i < ncomp; ++i) { + if (z->img_comp[i].raw_data) { + STBI_FREE(z->img_comp[i].raw_data); + z->img_comp[i].raw_data = NULL; + z->img_comp[i].data = NULL; + } + if (z->img_comp[i].raw_coeff) { + STBI_FREE(z->img_comp[i].raw_coeff); + z->img_comp[i].raw_coeff = 0; + z->img_comp[i].coeff = 0; + } + if (z->img_comp[i].linebuf) { + STBI_FREE(z->img_comp[i].linebuf); + z->img_comp[i].linebuf = NULL; + } + } + return why; +} + +static int stbi__process_frame_header(stbi__jpeg *z, int scan) +{ + stbi__context *s = z->s; + int Lf,p,i,q, h_max=1,v_max=1,c; + Lf = stbi__get16be(s); if (Lf < 11) return stbi__err("bad SOF len","Corrupt JPEG"); // JPEG + p = stbi__get8(s); if (p != 8) return stbi__err("only 8-bit","JPEG format not supported: 8-bit only"); // JPEG baseline + s->img_y = stbi__get16be(s); if (s->img_y == 0) return stbi__err("no header height", "JPEG format not supported: delayed height"); // Legal, but we don't handle it--but neither does IJG + s->img_x = stbi__get16be(s); if (s->img_x == 0) return stbi__err("0 width","Corrupt JPEG"); // JPEG requires + if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); + if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); + c = stbi__get8(s); + if (c != 3 && c != 1 && c != 4) return stbi__err("bad component count","Corrupt JPEG"); + s->img_n = c; + for (i=0; i < c; ++i) { + z->img_comp[i].data = NULL; + z->img_comp[i].linebuf = NULL; + } + + if (Lf != 8+3*s->img_n) return stbi__err("bad SOF len","Corrupt JPEG"); + + z->rgb = 0; + for (i=0; i < s->img_n; ++i) { + static const unsigned char rgb[3] = { 'R', 'G', 'B' }; + z->img_comp[i].id = stbi__get8(s); + if (s->img_n == 3 && z->img_comp[i].id == rgb[i]) + ++z->rgb; + q = stbi__get8(s); + z->img_comp[i].h = (q >> 4); if (!z->img_comp[i].h || z->img_comp[i].h > 4) return stbi__err("bad H","Corrupt JPEG"); + z->img_comp[i].v = q & 15; if (!z->img_comp[i].v || z->img_comp[i].v > 4) return stbi__err("bad V","Corrupt JPEG"); + z->img_comp[i].tq = stbi__get8(s); if (z->img_comp[i].tq > 3) return stbi__err("bad TQ","Corrupt JPEG"); + } + + if (scan != STBI__SCAN_load) return 1; + + if (!stbi__mad3sizes_valid(s->img_x, s->img_y, s->img_n, 0)) return stbi__err("too large", "Image too large to decode"); + + for (i=0; i < s->img_n; ++i) { + if (z->img_comp[i].h > h_max) h_max = z->img_comp[i].h; + if (z->img_comp[i].v > v_max) v_max = z->img_comp[i].v; + } + + // check that plane subsampling factors are integer ratios; our resamplers can't deal with fractional ratios + // and I've never seen a non-corrupted JPEG file actually use them + for (i=0; i < s->img_n; ++i) { + if (h_max % z->img_comp[i].h != 0) return stbi__err("bad H","Corrupt JPEG"); + if (v_max % z->img_comp[i].v != 0) return stbi__err("bad V","Corrupt JPEG"); + } + + // compute interleaved mcu info + z->img_h_max = h_max; + z->img_v_max = v_max; + z->img_mcu_w = h_max * 8; + z->img_mcu_h = v_max * 8; + // these sizes can't be more than 17 bits + z->img_mcu_x = (s->img_x + z->img_mcu_w-1) / z->img_mcu_w; + z->img_mcu_y = (s->img_y + z->img_mcu_h-1) / z->img_mcu_h; + + for (i=0; i < s->img_n; ++i) { + // number of effective pixels (e.g. for non-interleaved MCU) + z->img_comp[i].x = (s->img_x * z->img_comp[i].h + h_max-1) / h_max; + z->img_comp[i].y = (s->img_y * z->img_comp[i].v + v_max-1) / v_max; + // to simplify generation, we'll allocate enough memory to decode + // the bogus oversized data from using interleaved MCUs and their + // big blocks (e.g. a 16x16 iMCU on an image of width 33); we won't + // discard the extra data until colorspace conversion + // + // img_mcu_x, img_mcu_y: <=17 bits; comp[i].h and .v are <=4 (checked earlier) + // so these muls can't overflow with 32-bit ints (which we require) + z->img_comp[i].w2 = z->img_mcu_x * z->img_comp[i].h * 8; + z->img_comp[i].h2 = z->img_mcu_y * z->img_comp[i].v * 8; + z->img_comp[i].coeff = 0; + z->img_comp[i].raw_coeff = 0; + z->img_comp[i].linebuf = NULL; + z->img_comp[i].raw_data = stbi__malloc_mad2(z->img_comp[i].w2, z->img_comp[i].h2, 15); + if (z->img_comp[i].raw_data == NULL) + return stbi__free_jpeg_components(z, i+1, stbi__err("outofmem", "Out of memory")); + // align blocks for idct using mmx/sse + z->img_comp[i].data = (stbi_uc*) (((size_t) z->img_comp[i].raw_data + 15) & ~15); + if (z->progressive) { + // w2, h2 are multiples of 8 (see above) + z->img_comp[i].coeff_w = z->img_comp[i].w2 / 8; + z->img_comp[i].coeff_h = z->img_comp[i].h2 / 8; + z->img_comp[i].raw_coeff = stbi__malloc_mad3(z->img_comp[i].w2, z->img_comp[i].h2, sizeof(short), 15); + if (z->img_comp[i].raw_coeff == NULL) + return stbi__free_jpeg_components(z, i+1, stbi__err("outofmem", "Out of memory")); + z->img_comp[i].coeff = (short*) (((size_t) z->img_comp[i].raw_coeff + 15) & ~15); + } + } + + return 1; +} + +// use comparisons since in some cases we handle more than one case (e.g. SOF) +#define stbi__DNL(x) ((x) == 0xdc) +#define stbi__SOI(x) ((x) == 0xd8) +#define stbi__EOI(x) ((x) == 0xd9) +#define stbi__SOF(x) ((x) == 0xc0 || (x) == 0xc1 || (x) == 0xc2) +#define stbi__SOS(x) ((x) == 0xda) + +#define stbi__SOF_progressive(x) ((x) == 0xc2) + +static int stbi__decode_jpeg_header(stbi__jpeg *z, int scan) +{ + int m; + z->jfif = 0; + z->app14_color_transform = -1; // valid values are 0,1,2 + z->marker = STBI__MARKER_none; // initialize cached marker to empty + m = stbi__get_marker(z); + if (!stbi__SOI(m)) return stbi__err("no SOI","Corrupt JPEG"); + if (scan == STBI__SCAN_type) return 1; + m = stbi__get_marker(z); + while (!stbi__SOF(m)) { + if (!stbi__process_marker(z,m)) return 0; + m = stbi__get_marker(z); + while (m == STBI__MARKER_none) { + // some files have extra padding after their blocks, so ok, we'll scan + if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); + m = stbi__get_marker(z); + } + } + z->progressive = stbi__SOF_progressive(m); + if (!stbi__process_frame_header(z, scan)) return 0; + return 1; +} + +static stbi_uc stbi__skip_jpeg_junk_at_end(stbi__jpeg *j) +{ + // some JPEGs have junk at end, skip over it but if we find what looks + // like a valid marker, resume there + while (!stbi__at_eof(j->s)) { + stbi_uc x = stbi__get8(j->s); + while (x == 0xff) { // might be a marker + if (stbi__at_eof(j->s)) return STBI__MARKER_none; + x = stbi__get8(j->s); + if (x != 0x00 && x != 0xff) { + // not a stuffed zero or lead-in to another marker, looks + // like an actual marker, return it + return x; + } + // stuffed zero has x=0 now which ends the loop, meaning we go + // back to regular scan loop. + // repeated 0xff keeps trying to read the next byte of the marker. + } + } + return STBI__MARKER_none; +} + +// decode image to YCbCr format +static int stbi__decode_jpeg_image(stbi__jpeg *j) +{ + int m; + for (m = 0; m < 4; m++) { + j->img_comp[m].raw_data = NULL; + j->img_comp[m].raw_coeff = NULL; + } + j->restart_interval = 0; + if (!stbi__decode_jpeg_header(j, STBI__SCAN_load)) return 0; + m = stbi__get_marker(j); + while (!stbi__EOI(m)) { + if (stbi__SOS(m)) { + if (!stbi__process_scan_header(j)) return 0; + if (!stbi__parse_entropy_coded_data(j)) return 0; + if (j->marker == STBI__MARKER_none ) { + j->marker = stbi__skip_jpeg_junk_at_end(j); + // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0 + } + m = stbi__get_marker(j); + if (STBI__RESTART(m)) + m = stbi__get_marker(j); + } else if (stbi__DNL(m)) { + int Ld = stbi__get16be(j->s); + stbi__uint32 NL = stbi__get16be(j->s); + if (Ld != 4) return stbi__err("bad DNL len", "Corrupt JPEG"); + if (NL != j->s->img_y) return stbi__err("bad DNL height", "Corrupt JPEG"); + m = stbi__get_marker(j); + } else { + if (!stbi__process_marker(j, m)) return 1; + m = stbi__get_marker(j); + } + } + if (j->progressive) + stbi__jpeg_finish(j); + return 1; +} + +// static jfif-centered resampling (across block boundaries) + +typedef stbi_uc *(*resample_row_func)(stbi_uc *out, stbi_uc *in0, stbi_uc *in1, + int w, int hs); + +#define stbi__div4(x) ((stbi_uc) ((x) >> 2)) + +static stbi_uc *resample_row_1(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) +{ + STBI_NOTUSED(out); + STBI_NOTUSED(in_far); + STBI_NOTUSED(w); + STBI_NOTUSED(hs); + return in_near; +} + +static stbi_uc* stbi__resample_row_v_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) +{ + // need to generate two samples vertically for every one in input + int i; + STBI_NOTUSED(hs); + for (i=0; i < w; ++i) + out[i] = stbi__div4(3*in_near[i] + in_far[i] + 2); + return out; +} + +static stbi_uc* stbi__resample_row_h_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) +{ + // need to generate two samples horizontally for every one in input + int i; + stbi_uc *input = in_near; + + if (w == 1) { + // if only one sample, can't do any interpolation + out[0] = out[1] = input[0]; + return out; + } + + out[0] = input[0]; + out[1] = stbi__div4(input[0]*3 + input[1] + 2); + for (i=1; i < w-1; ++i) { + int n = 3*input[i]+2; + out[i*2+0] = stbi__div4(n+input[i-1]); + out[i*2+1] = stbi__div4(n+input[i+1]); + } + out[i*2+0] = stbi__div4(input[w-2]*3 + input[w-1] + 2); + out[i*2+1] = input[w-1]; + + STBI_NOTUSED(in_far); + STBI_NOTUSED(hs); + + return out; +} + +#define stbi__div16(x) ((stbi_uc) ((x) >> 4)) + +static stbi_uc *stbi__resample_row_hv_2(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) +{ + // need to generate 2x2 samples for every one in input + int i,t0,t1; + if (w == 1) { + out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2); + return out; + } + + t1 = 3*in_near[0] + in_far[0]; + out[0] = stbi__div4(t1+2); + for (i=1; i < w; ++i) { + t0 = t1; + t1 = 3*in_near[i]+in_far[i]; + out[i*2-1] = stbi__div16(3*t0 + t1 + 8); + out[i*2 ] = stbi__div16(3*t1 + t0 + 8); + } + out[w*2-1] = stbi__div4(t1+2); + + STBI_NOTUSED(hs); + + return out; +} + +#if defined(STBI_SSE2) || defined(STBI_NEON) +static stbi_uc *stbi__resample_row_hv_2_simd(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) +{ + // need to generate 2x2 samples for every one in input + int i=0,t0,t1; + + if (w == 1) { + out[0] = out[1] = stbi__div4(3*in_near[0] + in_far[0] + 2); + return out; + } + + t1 = 3*in_near[0] + in_far[0]; + // process groups of 8 pixels for as long as we can. + // note we can't handle the last pixel in a row in this loop + // because we need to handle the filter boundary conditions. + for (; i < ((w-1) & ~7); i += 8) { +#if defined(STBI_SSE2) + // load and perform the vertical filtering pass + // this uses 3*x + y = 4*x + (y - x) + __m128i zero = _mm_setzero_si128(); + __m128i farb = _mm_loadl_epi64((__m128i *) (in_far + i)); + __m128i nearb = _mm_loadl_epi64((__m128i *) (in_near + i)); + __m128i farw = _mm_unpacklo_epi8(farb, zero); + __m128i nearw = _mm_unpacklo_epi8(nearb, zero); + __m128i diff = _mm_sub_epi16(farw, nearw); + __m128i nears = _mm_slli_epi16(nearw, 2); + __m128i curr = _mm_add_epi16(nears, diff); // current row + + // horizontal filter works the same based on shifted vers of current + // row. "prev" is current row shifted right by 1 pixel; we need to + // insert the previous pixel value (from t1). + // "next" is current row shifted left by 1 pixel, with first pixel + // of next block of 8 pixels added in. + __m128i prv0 = _mm_slli_si128(curr, 2); + __m128i nxt0 = _mm_srli_si128(curr, 2); + __m128i prev = _mm_insert_epi16(prv0, t1, 0); + __m128i next = _mm_insert_epi16(nxt0, 3*in_near[i+8] + in_far[i+8], 7); + + // horizontal filter, polyphase implementation since it's convenient: + // even pixels = 3*cur + prev = cur*4 + (prev - cur) + // odd pixels = 3*cur + next = cur*4 + (next - cur) + // note the shared term. + __m128i bias = _mm_set1_epi16(8); + __m128i curs = _mm_slli_epi16(curr, 2); + __m128i prvd = _mm_sub_epi16(prev, curr); + __m128i nxtd = _mm_sub_epi16(next, curr); + __m128i curb = _mm_add_epi16(curs, bias); + __m128i even = _mm_add_epi16(prvd, curb); + __m128i odd = _mm_add_epi16(nxtd, curb); + + // interleave even and odd pixels, then undo scaling. + __m128i int0 = _mm_unpacklo_epi16(even, odd); + __m128i int1 = _mm_unpackhi_epi16(even, odd); + __m128i de0 = _mm_srli_epi16(int0, 4); + __m128i de1 = _mm_srli_epi16(int1, 4); + + // pack and write output + __m128i outv = _mm_packus_epi16(de0, de1); + _mm_storeu_si128((__m128i *) (out + i*2), outv); +#elif defined(STBI_NEON) + // load and perform the vertical filtering pass + // this uses 3*x + y = 4*x + (y - x) + uint8x8_t farb = vld1_u8(in_far + i); + uint8x8_t nearb = vld1_u8(in_near + i); + int16x8_t diff = vreinterpretq_s16_u16(vsubl_u8(farb, nearb)); + int16x8_t nears = vreinterpretq_s16_u16(vshll_n_u8(nearb, 2)); + int16x8_t curr = vaddq_s16(nears, diff); // current row + + // horizontal filter works the same based on shifted vers of current + // row. "prev" is current row shifted right by 1 pixel; we need to + // insert the previous pixel value (from t1). + // "next" is current row shifted left by 1 pixel, with first pixel + // of next block of 8 pixels added in. + int16x8_t prv0 = vextq_s16(curr, curr, 7); + int16x8_t nxt0 = vextq_s16(curr, curr, 1); + int16x8_t prev = vsetq_lane_s16(t1, prv0, 0); + int16x8_t next = vsetq_lane_s16(3*in_near[i+8] + in_far[i+8], nxt0, 7); + + // horizontal filter, polyphase implementation since it's convenient: + // even pixels = 3*cur + prev = cur*4 + (prev - cur) + // odd pixels = 3*cur + next = cur*4 + (next - cur) + // note the shared term. + int16x8_t curs = vshlq_n_s16(curr, 2); + int16x8_t prvd = vsubq_s16(prev, curr); + int16x8_t nxtd = vsubq_s16(next, curr); + int16x8_t even = vaddq_s16(curs, prvd); + int16x8_t odd = vaddq_s16(curs, nxtd); + + // undo scaling and round, then store with even/odd phases interleaved + uint8x8x2_t o; + o.val[0] = vqrshrun_n_s16(even, 4); + o.val[1] = vqrshrun_n_s16(odd, 4); + vst2_u8(out + i*2, o); +#endif + + // "previous" value for next iter + t1 = 3*in_near[i+7] + in_far[i+7]; + } + + t0 = t1; + t1 = 3*in_near[i] + in_far[i]; + out[i*2] = stbi__div16(3*t1 + t0 + 8); + + for (++i; i < w; ++i) { + t0 = t1; + t1 = 3*in_near[i]+in_far[i]; + out[i*2-1] = stbi__div16(3*t0 + t1 + 8); + out[i*2 ] = stbi__div16(3*t1 + t0 + 8); + } + out[w*2-1] = stbi__div4(t1+2); + + STBI_NOTUSED(hs); + + return out; +} +#endif + +static stbi_uc *stbi__resample_row_generic(stbi_uc *out, stbi_uc *in_near, stbi_uc *in_far, int w, int hs) +{ + // resample with nearest-neighbor + int i,j; + STBI_NOTUSED(in_far); + for (i=0; i < w; ++i) + for (j=0; j < hs; ++j) + out[i*hs+j] = in_near[i]; + return out; +} + +// this is a reduced-precision calculation of YCbCr-to-RGB introduced +// to make sure the code produces the same results in both SIMD and scalar +#define stbi__float2fixed(x) (((int) ((x) * 4096.0f + 0.5f)) << 8) +static void stbi__YCbCr_to_RGB_row(stbi_uc *out, const stbi_uc *y, const stbi_uc *pcb, const stbi_uc *pcr, int count, int step) +{ + int i; + for (i=0; i < count; ++i) { + int y_fixed = (y[i] << 20) + (1<<19); // rounding + int r,g,b; + int cr = pcr[i] - 128; + int cb = pcb[i] - 128; + r = y_fixed + cr* stbi__float2fixed(1.40200f); + g = y_fixed + (cr*-stbi__float2fixed(0.71414f)) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000); + b = y_fixed + cb* stbi__float2fixed(1.77200f); + r >>= 20; + g >>= 20; + b >>= 20; + if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; } + if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; } + if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; } + out[0] = (stbi_uc)r; + out[1] = (stbi_uc)g; + out[2] = (stbi_uc)b; + out[3] = 255; + out += step; + } +} + +#if defined(STBI_SSE2) || defined(STBI_NEON) +static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc const *pcb, stbi_uc const *pcr, int count, int step) +{ + int i = 0; + +#ifdef STBI_SSE2 + // step == 3 is pretty ugly on the final interleave, and i'm not convinced + // it's useful in practice (you wouldn't use it for textures, for example). + // so just accelerate step == 4 case. + if (step == 4) { + // this is a fairly straightforward implementation and not super-optimized. + __m128i signflip = _mm_set1_epi8(-0x80); + __m128i cr_const0 = _mm_set1_epi16( (short) ( 1.40200f*4096.0f+0.5f)); + __m128i cr_const1 = _mm_set1_epi16( - (short) ( 0.71414f*4096.0f+0.5f)); + __m128i cb_const0 = _mm_set1_epi16( - (short) ( 0.34414f*4096.0f+0.5f)); + __m128i cb_const1 = _mm_set1_epi16( (short) ( 1.77200f*4096.0f+0.5f)); + __m128i y_bias = _mm_set1_epi8((char) (unsigned char) 128); + __m128i xw = _mm_set1_epi16(255); // alpha channel + + for (; i+7 < count; i += 8) { + // load + __m128i y_bytes = _mm_loadl_epi64((__m128i *) (y+i)); + __m128i cr_bytes = _mm_loadl_epi64((__m128i *) (pcr+i)); + __m128i cb_bytes = _mm_loadl_epi64((__m128i *) (pcb+i)); + __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 + __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 + + // unpack to short (and left-shift cr, cb by 8) + __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); + __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); + __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); + + // color transform + __m128i yws = _mm_srli_epi16(yw, 4); + __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); + __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); + __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); + __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); + __m128i rws = _mm_add_epi16(cr0, yws); + __m128i gwt = _mm_add_epi16(cb0, yws); + __m128i bws = _mm_add_epi16(yws, cb1); + __m128i gws = _mm_add_epi16(gwt, cr1); + + // descale + __m128i rw = _mm_srai_epi16(rws, 4); + __m128i bw = _mm_srai_epi16(bws, 4); + __m128i gw = _mm_srai_epi16(gws, 4); + + // back to byte, set up for transpose + __m128i brb = _mm_packus_epi16(rw, bw); + __m128i gxb = _mm_packus_epi16(gw, xw); + + // transpose to interleave channels + __m128i t0 = _mm_unpacklo_epi8(brb, gxb); + __m128i t1 = _mm_unpackhi_epi8(brb, gxb); + __m128i o0 = _mm_unpacklo_epi16(t0, t1); + __m128i o1 = _mm_unpackhi_epi16(t0, t1); + + // store + _mm_storeu_si128((__m128i *) (out + 0), o0); + _mm_storeu_si128((__m128i *) (out + 16), o1); + out += 32; + } + } +#endif + +#ifdef STBI_NEON + // in this version, step=3 support would be easy to add. but is there demand? + if (step == 4) { + // this is a fairly straightforward implementation and not super-optimized. + uint8x8_t signflip = vdup_n_u8(0x80); + int16x8_t cr_const0 = vdupq_n_s16( (short) ( 1.40200f*4096.0f+0.5f)); + int16x8_t cr_const1 = vdupq_n_s16( - (short) ( 0.71414f*4096.0f+0.5f)); + int16x8_t cb_const0 = vdupq_n_s16( - (short) ( 0.34414f*4096.0f+0.5f)); + int16x8_t cb_const1 = vdupq_n_s16( (short) ( 1.77200f*4096.0f+0.5f)); + + for (; i+7 < count; i += 8) { + // load + uint8x8_t y_bytes = vld1_u8(y + i); + uint8x8_t cr_bytes = vld1_u8(pcr + i); + uint8x8_t cb_bytes = vld1_u8(pcb + i); + int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); + int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); + + // expand to s16 + int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); + int16x8_t crw = vshll_n_s8(cr_biased, 7); + int16x8_t cbw = vshll_n_s8(cb_biased, 7); + + // color transform + int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); + int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); + int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); + int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); + int16x8_t rws = vaddq_s16(yws, cr0); + int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); + int16x8_t bws = vaddq_s16(yws, cb1); + + // undo scaling, round, convert to byte + uint8x8x4_t o; + o.val[0] = vqrshrun_n_s16(rws, 4); + o.val[1] = vqrshrun_n_s16(gws, 4); + o.val[2] = vqrshrun_n_s16(bws, 4); + o.val[3] = vdup_n_u8(255); + + // store, interleaving r/g/b/a + vst4_u8(out, o); + out += 8*4; + } + } +#endif + + for (; i < count; ++i) { + int y_fixed = (y[i] << 20) + (1<<19); // rounding + int r,g,b; + int cr = pcr[i] - 128; + int cb = pcb[i] - 128; + r = y_fixed + cr* stbi__float2fixed(1.40200f); + g = y_fixed + cr*-stbi__float2fixed(0.71414f) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000); + b = y_fixed + cb* stbi__float2fixed(1.77200f); + r >>= 20; + g >>= 20; + b >>= 20; + if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; } + if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; } + if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; } + out[0] = (stbi_uc)r; + out[1] = (stbi_uc)g; + out[2] = (stbi_uc)b; + out[3] = 255; + out += step; + } +} +#endif + +// set up the kernels +static void stbi__setup_jpeg(stbi__jpeg *j) +{ + j->idct_block_kernel = stbi__idct_block; + j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_row; + j->resample_row_hv_2_kernel = stbi__resample_row_hv_2; + +#ifdef STBI_SSE2 + if (stbi__sse2_available()) { + j->idct_block_kernel = stbi__idct_simd; + j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; + j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; + } +#endif + +#ifdef STBI_NEON + j->idct_block_kernel = stbi__idct_simd; + j->YCbCr_to_RGB_kernel = stbi__YCbCr_to_RGB_simd; + j->resample_row_hv_2_kernel = stbi__resample_row_hv_2_simd; +#endif +} + +// clean up the temporary component buffers +static void stbi__cleanup_jpeg(stbi__jpeg *j) +{ + stbi__free_jpeg_components(j, j->s->img_n, 0); +} + +typedef struct +{ + resample_row_func resample; + stbi_uc *line0,*line1; + int hs,vs; // expansion factor in each axis + int w_lores; // horizontal pixels pre-expansion + int ystep; // how far through vertical expansion we are + int ypos; // which pre-expansion row we're on +} stbi__resample; + +// fast 0..255 * 0..255 => 0..255 rounded multiplication +static stbi_uc stbi__blinn_8x8(stbi_uc x, stbi_uc y) +{ + unsigned int t = x*y + 128; + return (stbi_uc) ((t + (t >>8)) >> 8); +} + +static stbi_uc *load_jpeg_image(stbi__jpeg *z, int *out_x, int *out_y, int *comp, int req_comp) +{ + int n, decode_n, is_rgb; + z->s->img_n = 0; // make stbi__cleanup_jpeg safe + + // validate req_comp + if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); + + // load a jpeg image from whichever source, but leave in YCbCr format + if (!stbi__decode_jpeg_image(z)) { stbi__cleanup_jpeg(z); return NULL; } + + // determine actual number of components to generate + n = req_comp ? req_comp : z->s->img_n >= 3 ? 3 : 1; + + is_rgb = z->s->img_n == 3 && (z->rgb == 3 || (z->app14_color_transform == 0 && !z->jfif)); + + if (z->s->img_n == 3 && n < 3 && !is_rgb) + decode_n = 1; + else + decode_n = z->s->img_n; + + // nothing to do if no components requested; check this now to avoid + // accessing uninitialized coutput[0] later + if (decode_n <= 0) { stbi__cleanup_jpeg(z); return NULL; } + + // resample and color-convert + { + int k; + unsigned int i,j; + stbi_uc *output; + stbi_uc *coutput[4] = { NULL, NULL, NULL, NULL }; + + stbi__resample res_comp[4]; + + for (k=0; k < decode_n; ++k) { + stbi__resample *r = &res_comp[k]; + + // allocate line buffer big enough for upsampling off the edges + // with upsample factor of 4 + z->img_comp[k].linebuf = (stbi_uc *) stbi__malloc(z->s->img_x + 3); + if (!z->img_comp[k].linebuf) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } + + r->hs = z->img_h_max / z->img_comp[k].h; + r->vs = z->img_v_max / z->img_comp[k].v; + r->ystep = r->vs >> 1; + r->w_lores = (z->s->img_x + r->hs-1) / r->hs; + r->ypos = 0; + r->line0 = r->line1 = z->img_comp[k].data; + + if (r->hs == 1 && r->vs == 1) r->resample = resample_row_1; + else if (r->hs == 1 && r->vs == 2) r->resample = stbi__resample_row_v_2; + else if (r->hs == 2 && r->vs == 1) r->resample = stbi__resample_row_h_2; + else if (r->hs == 2 && r->vs == 2) r->resample = z->resample_row_hv_2_kernel; + else r->resample = stbi__resample_row_generic; + } + + // can't error after this so, this is safe + output = (stbi_uc *) stbi__malloc_mad3(n, z->s->img_x, z->s->img_y, 1); + if (!output) { stbi__cleanup_jpeg(z); return stbi__errpuc("outofmem", "Out of memory"); } + + // now go ahead and resample + for (j=0; j < z->s->img_y; ++j) { + stbi_uc *out = output + n * z->s->img_x * j; + for (k=0; k < decode_n; ++k) { + stbi__resample *r = &res_comp[k]; + int y_bot = r->ystep >= (r->vs >> 1); + coutput[k] = r->resample(z->img_comp[k].linebuf, + y_bot ? r->line1 : r->line0, + y_bot ? r->line0 : r->line1, + r->w_lores, r->hs); + if (++r->ystep >= r->vs) { + r->ystep = 0; + r->line0 = r->line1; + if (++r->ypos < z->img_comp[k].y) + r->line1 += z->img_comp[k].w2; + } + } + if (n >= 3) { + stbi_uc *y = coutput[0]; + if (z->s->img_n == 3) { + if (is_rgb) { + for (i=0; i < z->s->img_x; ++i) { + out[0] = y[i]; + out[1] = coutput[1][i]; + out[2] = coutput[2][i]; + out[3] = 255; + out += n; + } + } else { + z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); + } + } else if (z->s->img_n == 4) { + if (z->app14_color_transform == 0) { // CMYK + for (i=0; i < z->s->img_x; ++i) { + stbi_uc m = coutput[3][i]; + out[0] = stbi__blinn_8x8(coutput[0][i], m); + out[1] = stbi__blinn_8x8(coutput[1][i], m); + out[2] = stbi__blinn_8x8(coutput[2][i], m); + out[3] = 255; + out += n; + } + } else if (z->app14_color_transform == 2) { // YCCK + z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); + for (i=0; i < z->s->img_x; ++i) { + stbi_uc m = coutput[3][i]; + out[0] = stbi__blinn_8x8(255 - out[0], m); + out[1] = stbi__blinn_8x8(255 - out[1], m); + out[2] = stbi__blinn_8x8(255 - out[2], m); + out += n; + } + } else { // YCbCr + alpha? Ignore the fourth channel for now + z->YCbCr_to_RGB_kernel(out, y, coutput[1], coutput[2], z->s->img_x, n); + } + } else + for (i=0; i < z->s->img_x; ++i) { + out[0] = out[1] = out[2] = y[i]; + out[3] = 255; // not used if n==3 + out += n; + } + } else { + if (is_rgb) { + if (n == 1) + for (i=0; i < z->s->img_x; ++i) + *out++ = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); + else { + for (i=0; i < z->s->img_x; ++i, out += 2) { + out[0] = stbi__compute_y(coutput[0][i], coutput[1][i], coutput[2][i]); + out[1] = 255; + } + } + } else if (z->s->img_n == 4 && z->app14_color_transform == 0) { + for (i=0; i < z->s->img_x; ++i) { + stbi_uc m = coutput[3][i]; + stbi_uc r = stbi__blinn_8x8(coutput[0][i], m); + stbi_uc g = stbi__blinn_8x8(coutput[1][i], m); + stbi_uc b = stbi__blinn_8x8(coutput[2][i], m); + out[0] = stbi__compute_y(r, g, b); + out[1] = 255; + out += n; + } + } else if (z->s->img_n == 4 && z->app14_color_transform == 2) { + for (i=0; i < z->s->img_x; ++i) { + out[0] = stbi__blinn_8x8(255 - coutput[0][i], coutput[3][i]); + out[1] = 255; + out += n; + } + } else { + stbi_uc *y = coutput[0]; + if (n == 1) + for (i=0; i < z->s->img_x; ++i) out[i] = y[i]; + else + for (i=0; i < z->s->img_x; ++i) { *out++ = y[i]; *out++ = 255; } + } + } + } + stbi__cleanup_jpeg(z); + *out_x = z->s->img_x; + *out_y = z->s->img_y; + if (comp) *comp = z->s->img_n >= 3 ? 3 : 1; // report original components, not output + return output; + } +} + +static void *stbi__jpeg_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) +{ + unsigned char* result; + stbi__jpeg* j = (stbi__jpeg*) stbi__malloc(sizeof(stbi__jpeg)); + if (!j) return stbi__errpuc("outofmem", "Out of memory"); + memset(j, 0, sizeof(stbi__jpeg)); + STBI_NOTUSED(ri); + j->s = s; + stbi__setup_jpeg(j); + result = load_jpeg_image(j, x,y,comp,req_comp); + STBI_FREE(j); + return result; +} + +static int stbi__jpeg_test(stbi__context *s) +{ + int r; + stbi__jpeg* j = (stbi__jpeg*)stbi__malloc(sizeof(stbi__jpeg)); + if (!j) return stbi__err("outofmem", "Out of memory"); + memset(j, 0, sizeof(stbi__jpeg)); + j->s = s; + stbi__setup_jpeg(j); + r = stbi__decode_jpeg_header(j, STBI__SCAN_type); + stbi__rewind(s); + STBI_FREE(j); + return r; +} + +static int stbi__jpeg_info_raw(stbi__jpeg *j, int *x, int *y, int *comp) +{ + if (!stbi__decode_jpeg_header(j, STBI__SCAN_header)) { + stbi__rewind( j->s ); + return 0; + } + if (x) *x = j->s->img_x; + if (y) *y = j->s->img_y; + if (comp) *comp = j->s->img_n >= 3 ? 3 : 1; + return 1; +} + +static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp) +{ + int result; + stbi__jpeg* j = (stbi__jpeg*) (stbi__malloc(sizeof(stbi__jpeg))); + if (!j) return stbi__err("outofmem", "Out of memory"); + memset(j, 0, sizeof(stbi__jpeg)); + j->s = s; + result = stbi__jpeg_info_raw(j, x, y, comp); + STBI_FREE(j); + return result; +} +#endif + +// public domain zlib decode v0.2 Sean Barrett 2006-11-18 +// simple implementation +// - all input must be provided in an upfront buffer +// - all output is written to a single output buffer (can malloc/realloc) +// performance +// - fast huffman + +#ifndef STBI_NO_ZLIB + +// fast-way is faster to check than jpeg huffman, but slow way is slower +#define STBI__ZFAST_BITS 9 // accelerate all cases in default tables +#define STBI__ZFAST_MASK ((1 << STBI__ZFAST_BITS) - 1) +#define STBI__ZNSYMS 288 // number of symbols in literal/length alphabet + +// zlib-style huffman encoding +// (jpegs packs from left, zlib from right, so can't share code) +typedef struct +{ + stbi__uint16 fast[1 << STBI__ZFAST_BITS]; + stbi__uint16 firstcode[16]; + int maxcode[17]; + stbi__uint16 firstsymbol[16]; + stbi_uc size[STBI__ZNSYMS]; + stbi__uint16 value[STBI__ZNSYMS]; +} stbi__zhuffman; + +stbi_inline static int stbi__bitreverse16(int n) +{ + n = ((n & 0xAAAA) >> 1) | ((n & 0x5555) << 1); + n = ((n & 0xCCCC) >> 2) | ((n & 0x3333) << 2); + n = ((n & 0xF0F0) >> 4) | ((n & 0x0F0F) << 4); + n = ((n & 0xFF00) >> 8) | ((n & 0x00FF) << 8); + return n; +} + +stbi_inline static int stbi__bit_reverse(int v, int bits) +{ + STBI_ASSERT(bits <= 16); + // to bit reverse n bits, reverse 16 and shift + // e.g. 11 bits, bit reverse and shift away 5 + return stbi__bitreverse16(v) >> (16-bits); +} + +static int stbi__zbuild_huffman(stbi__zhuffman *z, const stbi_uc *sizelist, int num) +{ + int i,k=0; + int code, next_code[16], sizes[17]; + + // DEFLATE spec for generating codes + memset(sizes, 0, sizeof(sizes)); + memset(z->fast, 0, sizeof(z->fast)); + for (i=0; i < num; ++i) + ++sizes[sizelist[i]]; + sizes[0] = 0; + for (i=1; i < 16; ++i) + if (sizes[i] > (1 << i)) + return stbi__err("bad sizes", "Corrupt PNG"); + code = 0; + for (i=1; i < 16; ++i) { + next_code[i] = code; + z->firstcode[i] = (stbi__uint16) code; + z->firstsymbol[i] = (stbi__uint16) k; + code = (code + sizes[i]); + if (sizes[i]) + if (code-1 >= (1 << i)) return stbi__err("bad codelengths","Corrupt PNG"); + z->maxcode[i] = code << (16-i); // preshift for inner loop + code <<= 1; + k += sizes[i]; + } + z->maxcode[16] = 0x10000; // sentinel + for (i=0; i < num; ++i) { + int s = sizelist[i]; + if (s) { + int c = next_code[s] - z->firstcode[s] + z->firstsymbol[s]; + stbi__uint16 fastv = (stbi__uint16) ((s << 9) | i); + z->size [c] = (stbi_uc ) s; + z->value[c] = (stbi__uint16) i; + if (s <= STBI__ZFAST_BITS) { + int j = stbi__bit_reverse(next_code[s],s); + while (j < (1 << STBI__ZFAST_BITS)) { + z->fast[j] = fastv; + j += (1 << s); + } + } + ++next_code[s]; + } + } + return 1; +} + +// zlib-from-memory implementation for PNG reading +// because PNG allows splitting the zlib stream arbitrarily, +// and it's annoying structurally to have PNG call ZLIB call PNG, +// we require PNG read all the IDATs and combine them into a single +// memory buffer + +typedef struct +{ + stbi_uc *zbuffer, *zbuffer_end; + int num_bits; + int hit_zeof_once; + stbi__uint32 code_buffer; + + char *zout; + char *zout_start; + char *zout_end; + int z_expandable; + + stbi__zhuffman z_length, z_distance; +} stbi__zbuf; + +stbi_inline static int stbi__zeof(stbi__zbuf *z) +{ + return (z->zbuffer >= z->zbuffer_end); +} + +stbi_inline static stbi_uc stbi__zget8(stbi__zbuf *z) +{ + return stbi__zeof(z) ? 0 : *z->zbuffer++; +} + +static void stbi__fill_bits(stbi__zbuf *z) +{ + do { + if (z->code_buffer >= (1U << z->num_bits)) { + z->zbuffer = z->zbuffer_end; /* treat this as EOF so we fail. */ + return; + } + z->code_buffer |= (unsigned int) stbi__zget8(z) << z->num_bits; + z->num_bits += 8; + } while (z->num_bits <= 24); +} + +stbi_inline static unsigned int stbi__zreceive(stbi__zbuf *z, int n) +{ + unsigned int k; + if (z->num_bits < n) stbi__fill_bits(z); + k = z->code_buffer & ((1 << n) - 1); + z->code_buffer >>= n; + z->num_bits -= n; + return k; +} + +static int stbi__zhuffman_decode_slowpath(stbi__zbuf *a, stbi__zhuffman *z) +{ + int b,s,k; + // not resolved by fast table, so compute it the slow way + // use jpeg approach, which requires MSbits at top + k = stbi__bit_reverse(a->code_buffer, 16); + for (s=STBI__ZFAST_BITS+1; ; ++s) + if (k < z->maxcode[s]) + break; + if (s >= 16) return -1; // invalid code! + // code size is s, so: + b = (k >> (16-s)) - z->firstcode[s] + z->firstsymbol[s]; + if (b >= STBI__ZNSYMS) return -1; // some data was corrupt somewhere! + if (z->size[b] != s) return -1; // was originally an assert, but report failure instead. + a->code_buffer >>= s; + a->num_bits -= s; + return z->value[b]; +} + +stbi_inline static int stbi__zhuffman_decode(stbi__zbuf *a, stbi__zhuffman *z) +{ + int b,s; + if (a->num_bits < 16) { + if (stbi__zeof(a)) { + if (!a->hit_zeof_once) { + // This is the first time we hit eof, insert 16 extra padding btis + // to allow us to keep going; if we actually consume any of them + // though, that is invalid data. This is caught later. + a->hit_zeof_once = 1; + a->num_bits += 16; // add 16 implicit zero bits + } else { + // We already inserted our extra 16 padding bits and are again + // out, this stream is actually prematurely terminated. + return -1; + } + } else { + stbi__fill_bits(a); + } + } + b = z->fast[a->code_buffer & STBI__ZFAST_MASK]; + if (b) { + s = b >> 9; + a->code_buffer >>= s; + a->num_bits -= s; + return b & 511; + } + return stbi__zhuffman_decode_slowpath(a, z); +} + +static int stbi__zexpand(stbi__zbuf *z, char *zout, int n) // need to make room for n bytes +{ + char *q; + unsigned int cur, limit, old_limit; + z->zout = zout; + if (!z->z_expandable) return stbi__err("output buffer limit","Corrupt PNG"); + cur = (unsigned int) (z->zout - z->zout_start); + limit = old_limit = (unsigned) (z->zout_end - z->zout_start); + if (UINT_MAX - cur < (unsigned) n) return stbi__err("outofmem", "Out of memory"); + while (cur + n > limit) { + if(limit > UINT_MAX / 2) return stbi__err("outofmem", "Out of memory"); + limit *= 2; + } + q = (char *) STBI_REALLOC_SIZED(z->zout_start, old_limit, limit); + STBI_NOTUSED(old_limit); + if (q == NULL) return stbi__err("outofmem", "Out of memory"); + z->zout_start = q; + z->zout = q + cur; + z->zout_end = q + limit; + return 1; +} + +static const int stbi__zlength_base[31] = { + 3,4,5,6,7,8,9,10,11,13, + 15,17,19,23,27,31,35,43,51,59, + 67,83,99,115,131,163,195,227,258,0,0 }; + +static const int stbi__zlength_extra[31]= +{ 0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0 }; + +static const int stbi__zdist_base[32] = { 1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193, +257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0}; + +static const int stbi__zdist_extra[32] = +{ 0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13}; + +static int stbi__parse_huffman_block(stbi__zbuf *a) +{ + char *zout = a->zout; + for(;;) { + int z = stbi__zhuffman_decode(a, &a->z_length); + if (z < 256) { + if (z < 0) return stbi__err("bad huffman code","Corrupt PNG"); // error in huffman codes + if (zout >= a->zout_end) { + if (!stbi__zexpand(a, zout, 1)) return 0; + zout = a->zout; + } + *zout++ = (char) z; + } else { + stbi_uc *p; + int len,dist; + if (z == 256) { + a->zout = zout; + if (a->hit_zeof_once && a->num_bits < 16) { + // The first time we hit zeof, we inserted 16 extra zero bits into our bit + // buffer so the decoder can just do its speculative decoding. But if we + // actually consumed any of those bits (which is the case when num_bits < 16), + // the stream actually read past the end so it is malformed. + return stbi__err("unexpected end","Corrupt PNG"); + } + return 1; + } + if (z >= 286) return stbi__err("bad huffman code","Corrupt PNG"); // per DEFLATE, length codes 286 and 287 must not appear in compressed data + z -= 257; + len = stbi__zlength_base[z]; + if (stbi__zlength_extra[z]) len += stbi__zreceive(a, stbi__zlength_extra[z]); + z = stbi__zhuffman_decode(a, &a->z_distance); + if (z < 0 || z >= 30) return stbi__err("bad huffman code","Corrupt PNG"); // per DEFLATE, distance codes 30 and 31 must not appear in compressed data + dist = stbi__zdist_base[z]; + if (stbi__zdist_extra[z]) dist += stbi__zreceive(a, stbi__zdist_extra[z]); + if (zout - a->zout_start < dist) return stbi__err("bad dist","Corrupt PNG"); + if (len > a->zout_end - zout) { + if (!stbi__zexpand(a, zout, len)) return 0; + zout = a->zout; + } + p = (stbi_uc *) (zout - dist); + if (dist == 1) { // run of one byte; common in images. + stbi_uc v = *p; + if (len) { do *zout++ = v; while (--len); } + } else { + if (len) { do *zout++ = *p++; while (--len); } + } + } + } +} + +static int stbi__compute_huffman_codes(stbi__zbuf *a) +{ + static const stbi_uc length_dezigzag[19] = { 16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15 }; + stbi__zhuffman z_codelength; + stbi_uc lencodes[286+32+137];//padding for maximum single op + stbi_uc codelength_sizes[19]; + int i,n; + + int hlit = stbi__zreceive(a,5) + 257; + int hdist = stbi__zreceive(a,5) + 1; + int hclen = stbi__zreceive(a,4) + 4; + int ntot = hlit + hdist; + + memset(codelength_sizes, 0, sizeof(codelength_sizes)); + for (i=0; i < hclen; ++i) { + int s = stbi__zreceive(a,3); + codelength_sizes[length_dezigzag[i]] = (stbi_uc) s; + } + if (!stbi__zbuild_huffman(&z_codelength, codelength_sizes, 19)) return 0; + + n = 0; + while (n < ntot) { + int c = stbi__zhuffman_decode(a, &z_codelength); + if (c < 0 || c >= 19) return stbi__err("bad codelengths", "Corrupt PNG"); + if (c < 16) + lencodes[n++] = (stbi_uc) c; + else { + stbi_uc fill = 0; + if (c == 16) { + c = stbi__zreceive(a,2)+3; + if (n == 0) return stbi__err("bad codelengths", "Corrupt PNG"); + fill = lencodes[n-1]; + } else if (c == 17) { + c = stbi__zreceive(a,3)+3; + } else if (c == 18) { + c = stbi__zreceive(a,7)+11; + } else { + return stbi__err("bad codelengths", "Corrupt PNG"); + } + if (ntot - n < c) return stbi__err("bad codelengths", "Corrupt PNG"); + memset(lencodes+n, fill, c); + n += c; + } + } + if (n != ntot) return stbi__err("bad codelengths","Corrupt PNG"); + if (!stbi__zbuild_huffman(&a->z_length, lencodes, hlit)) return 0; + if (!stbi__zbuild_huffman(&a->z_distance, lencodes+hlit, hdist)) return 0; + return 1; +} + +static int stbi__parse_uncompressed_block(stbi__zbuf *a) +{ + stbi_uc header[4]; + int len,nlen,k; + if (a->num_bits & 7) + stbi__zreceive(a, a->num_bits & 7); // discard + // drain the bit-packed data into header + k = 0; + while (a->num_bits > 0) { + header[k++] = (stbi_uc) (a->code_buffer & 255); // suppress MSVC run-time check + a->code_buffer >>= 8; + a->num_bits -= 8; + } + if (a->num_bits < 0) return stbi__err("zlib corrupt","Corrupt PNG"); + // now fill header the normal way + while (k < 4) + header[k++] = stbi__zget8(a); + len = header[1] * 256 + header[0]; + nlen = header[3] * 256 + header[2]; + if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt","Corrupt PNG"); + if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer","Corrupt PNG"); + if (a->zout + len > a->zout_end) + if (!stbi__zexpand(a, a->zout, len)) return 0; + memcpy(a->zout, a->zbuffer, len); + a->zbuffer += len; + a->zout += len; + return 1; +} + +static int stbi__parse_zlib_header(stbi__zbuf *a) +{ + int cmf = stbi__zget8(a); + int cm = cmf & 15; + /* int cinfo = cmf >> 4; */ + int flg = stbi__zget8(a); + if (stbi__zeof(a)) return stbi__err("bad zlib header","Corrupt PNG"); // zlib spec + if ((cmf*256+flg) % 31 != 0) return stbi__err("bad zlib header","Corrupt PNG"); // zlib spec + if (flg & 32) return stbi__err("no preset dict","Corrupt PNG"); // preset dictionary not allowed in png + if (cm != 8) return stbi__err("bad compression","Corrupt PNG"); // DEFLATE required for png + // window = 1 << (8 + cinfo)... but who cares, we fully buffer output + return 1; +} + +static const stbi_uc stbi__zdefault_length[STBI__ZNSYMS] = +{ + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, + 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, 7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8 +}; +static const stbi_uc stbi__zdefault_distance[32] = +{ + 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5 +}; +/* +Init algorithm: +{ + int i; // use <= to match clearly with spec + for (i=0; i <= 143; ++i) stbi__zdefault_length[i] = 8; + for ( ; i <= 255; ++i) stbi__zdefault_length[i] = 9; + for ( ; i <= 279; ++i) stbi__zdefault_length[i] = 7; + for ( ; i <= 287; ++i) stbi__zdefault_length[i] = 8; + + for (i=0; i <= 31; ++i) stbi__zdefault_distance[i] = 5; +} +*/ + +static int stbi__parse_zlib(stbi__zbuf *a, int parse_header) +{ + int final, type; + if (parse_header) + if (!stbi__parse_zlib_header(a)) return 0; + a->num_bits = 0; + a->code_buffer = 0; + a->hit_zeof_once = 0; + do { + final = stbi__zreceive(a,1); + type = stbi__zreceive(a,2); + if (type == 0) { + if (!stbi__parse_uncompressed_block(a)) return 0; + } else if (type == 3) { + return 0; + } else { + if (type == 1) { + // use fixed code lengths + if (!stbi__zbuild_huffman(&a->z_length , stbi__zdefault_length , STBI__ZNSYMS)) return 0; + if (!stbi__zbuild_huffman(&a->z_distance, stbi__zdefault_distance, 32)) return 0; + } else { + if (!stbi__compute_huffman_codes(a)) return 0; + } + if (!stbi__parse_huffman_block(a)) return 0; + } + } while (!final); + return 1; +} + +static int stbi__do_zlib(stbi__zbuf *a, char *obuf, int olen, int exp, int parse_header) +{ + a->zout_start = obuf; + a->zout = obuf; + a->zout_end = obuf + olen; + a->z_expandable = exp; + + return stbi__parse_zlib(a, parse_header); +} + +STBIDEF char *stbi_zlib_decode_malloc_guesssize(const char *buffer, int len, int initial_size, int *outlen) +{ + stbi__zbuf a; + char *p = (char *) stbi__malloc(initial_size); + if (p == NULL) return NULL; + a.zbuffer = (stbi_uc *) buffer; + a.zbuffer_end = (stbi_uc *) buffer + len; + if (stbi__do_zlib(&a, p, initial_size, 1, 1)) { + if (outlen) *outlen = (int) (a.zout - a.zout_start); + return a.zout_start; + } else { + STBI_FREE(a.zout_start); + return NULL; + } +} + +STBIDEF char *stbi_zlib_decode_malloc(char const *buffer, int len, int *outlen) +{ + return stbi_zlib_decode_malloc_guesssize(buffer, len, 16384, outlen); +} + +STBIDEF char *stbi_zlib_decode_malloc_guesssize_headerflag(const char *buffer, int len, int initial_size, int *outlen, int parse_header) +{ + stbi__zbuf a; + char *p = (char *) stbi__malloc(initial_size); + if (p == NULL) return NULL; + a.zbuffer = (stbi_uc *) buffer; + a.zbuffer_end = (stbi_uc *) buffer + len; + if (stbi__do_zlib(&a, p, initial_size, 1, parse_header)) { + if (outlen) *outlen = (int) (a.zout - a.zout_start); + return a.zout_start; + } else { + STBI_FREE(a.zout_start); + return NULL; + } +} + +STBIDEF int stbi_zlib_decode_buffer(char *obuffer, int olen, char const *ibuffer, int ilen) +{ + stbi__zbuf a; + a.zbuffer = (stbi_uc *) ibuffer; + a.zbuffer_end = (stbi_uc *) ibuffer + ilen; + if (stbi__do_zlib(&a, obuffer, olen, 0, 1)) + return (int) (a.zout - a.zout_start); + else + return -1; +} + +STBIDEF char *stbi_zlib_decode_noheader_malloc(char const *buffer, int len, int *outlen) +{ + stbi__zbuf a; + char *p = (char *) stbi__malloc(16384); + if (p == NULL) return NULL; + a.zbuffer = (stbi_uc *) buffer; + a.zbuffer_end = (stbi_uc *) buffer+len; + if (stbi__do_zlib(&a, p, 16384, 1, 0)) { + if (outlen) *outlen = (int) (a.zout - a.zout_start); + return a.zout_start; + } else { + STBI_FREE(a.zout_start); + return NULL; + } +} + +STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen) +{ + stbi__zbuf a; + a.zbuffer = (stbi_uc *) ibuffer; + a.zbuffer_end = (stbi_uc *) ibuffer + ilen; + if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) + return (int) (a.zout - a.zout_start); + else + return -1; +} +#endif + +// public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 +// simple implementation +// - only 8-bit samples +// - no CRC checking +// - allocates lots of intermediate memory +// - avoids problem of streaming data between subsystems +// - avoids explicit window management +// performance +// - uses stb_zlib, a PD zlib implementation with fast huffman decoding + +#ifndef STBI_NO_PNG +typedef struct +{ + stbi__uint32 length; + stbi__uint32 type; +} stbi__pngchunk; + +static stbi__pngchunk stbi__get_chunk_header(stbi__context *s) +{ + stbi__pngchunk c; + c.length = stbi__get32be(s); + c.type = stbi__get32be(s); + return c; +} + +static int stbi__check_png_header(stbi__context *s) +{ + static const stbi_uc png_sig[8] = { 137,80,78,71,13,10,26,10 }; + int i; + for (i=0; i < 8; ++i) + if (stbi__get8(s) != png_sig[i]) return stbi__err("bad png sig","Not a PNG"); + return 1; +} + +typedef struct +{ + stbi__context *s; + stbi_uc *idata, *expanded, *out; + int depth; +} stbi__png; + + +enum { + STBI__F_none=0, + STBI__F_sub=1, + STBI__F_up=2, + STBI__F_avg=3, + STBI__F_paeth=4, + // synthetic filter used for first scanline to avoid needing a dummy row of 0s + STBI__F_avg_first +}; + +static stbi_uc first_row_filter[5] = +{ + STBI__F_none, + STBI__F_sub, + STBI__F_none, + STBI__F_avg_first, + STBI__F_sub // Paeth with b=c=0 turns out to be equivalent to sub +}; + +static int stbi__paeth(int a, int b, int c) +{ + // This formulation looks very different from the reference in the PNG spec, but is + // actually equivalent and has favorable data dependencies and admits straightforward + // generation of branch-free code, which helps performance significantly. + int thresh = c*3 - (a + b); + int lo = a < b ? a : b; + int hi = a < b ? b : a; + int t0 = (hi <= thresh) ? lo : c; + int t1 = (thresh <= lo) ? hi : t0; + return t1; +} + +static const stbi_uc stbi__depth_scale_table[9] = { 0, 0xff, 0x55, 0, 0x11, 0,0,0, 0x01 }; + +// adds an extra all-255 alpha channel +// dest == src is legal +// img_n must be 1 or 3 +static void stbi__create_png_alpha_expand8(stbi_uc *dest, stbi_uc *src, stbi__uint32 x, int img_n) +{ + int i; + // must process data backwards since we allow dest==src + if (img_n == 1) { + for (i=x-1; i >= 0; --i) { + dest[i*2+1] = 255; + dest[i*2+0] = src[i]; + } + } else { + STBI_ASSERT(img_n == 3); + for (i=x-1; i >= 0; --i) { + dest[i*4+3] = 255; + dest[i*4+2] = src[i*3+2]; + dest[i*4+1] = src[i*3+1]; + dest[i*4+0] = src[i*3+0]; + } + } +} + +// create the png data from post-deflated data +static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color) +{ + int bytes = (depth == 16 ? 2 : 1); + stbi__context *s = a->s; + stbi__uint32 i,j,stride = x*out_n*bytes; + stbi__uint32 img_len, img_width_bytes; + stbi_uc *filter_buf; + int all_ok = 1; + int k; + int img_n = s->img_n; // copy it into a local for later + + int output_bytes = out_n*bytes; + int filter_bytes = img_n*bytes; + int width = x; + + STBI_ASSERT(out_n == s->img_n || out_n == s->img_n+1); + a->out = (stbi_uc *) stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into + if (!a->out) return stbi__err("outofmem", "Out of memory"); + + // note: error exits here don't need to clean up a->out individually, + // stbi__do_png always does on error. + if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG"); + img_width_bytes = (((img_n * x * depth) + 7) >> 3); + if (!stbi__mad2sizes_valid(img_width_bytes, y, img_width_bytes)) return stbi__err("too large", "Corrupt PNG"); + img_len = (img_width_bytes + 1) * y; + + // we used to check for exact match between raw_len and img_len on non-interlaced PNGs, + // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros), + // so just check for raw_len < img_len always. + if (raw_len < img_len) return stbi__err("not enough pixels","Corrupt PNG"); + + // Allocate two scan lines worth of filter workspace buffer. + filter_buf = (stbi_uc *) stbi__malloc_mad2(img_width_bytes, 2, 0); + if (!filter_buf) return stbi__err("outofmem", "Out of memory"); + + // Filtering for low-bit-depth images + if (depth < 8) { + filter_bytes = 1; + width = img_width_bytes; + } + + for (j=0; j < y; ++j) { + // cur/prior filter buffers alternate + stbi_uc *cur = filter_buf + (j & 1)*img_width_bytes; + stbi_uc *prior = filter_buf + (~j & 1)*img_width_bytes; + stbi_uc *dest = a->out + stride*j; + int nk = width * filter_bytes; + int filter = *raw++; + + // check filter type + if (filter > 4) { + all_ok = stbi__err("invalid filter","Corrupt PNG"); + break; + } + + // if first row, use special filter that doesn't sample previous row + if (j == 0) filter = first_row_filter[filter]; + + // perform actual filtering + switch (filter) { + case STBI__F_none: + memcpy(cur, raw, nk); + break; + case STBI__F_sub: + memcpy(cur, raw, filter_bytes); + for (k = filter_bytes; k < nk; ++k) + cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); + break; + case STBI__F_up: + for (k = 0; k < nk; ++k) + cur[k] = STBI__BYTECAST(raw[k] + prior[k]); + break; + case STBI__F_avg: + for (k = 0; k < filter_bytes; ++k) + cur[k] = STBI__BYTECAST(raw[k] + (prior[k]>>1)); + for (k = filter_bytes; k < nk; ++k) + cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); + break; + case STBI__F_paeth: + for (k = 0; k < filter_bytes; ++k) + cur[k] = STBI__BYTECAST(raw[k] + prior[k]); // prior[k] == stbi__paeth(0,prior[k],0) + for (k = filter_bytes; k < nk; ++k) + cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes], prior[k], prior[k-filter_bytes])); + break; + case STBI__F_avg_first: + memcpy(cur, raw, filter_bytes); + for (k = filter_bytes; k < nk; ++k) + cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); + break; + } + + raw += nk; + + // expand decoded bits in cur to dest, also adding an extra alpha channel if desired + if (depth < 8) { + stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range + stbi_uc *in = cur; + stbi_uc *out = dest; + stbi_uc inb = 0; + stbi__uint32 nsmp = x*img_n; + + // expand bits to bytes first + if (depth == 4) { + for (i=0; i < nsmp; ++i) { + if ((i & 1) == 0) inb = *in++; + *out++ = scale * (inb >> 4); + inb <<= 4; + } + } else if (depth == 2) { + for (i=0; i < nsmp; ++i) { + if ((i & 3) == 0) inb = *in++; + *out++ = scale * (inb >> 6); + inb <<= 2; + } + } else { + STBI_ASSERT(depth == 1); + for (i=0; i < nsmp; ++i) { + if ((i & 7) == 0) inb = *in++; + *out++ = scale * (inb >> 7); + inb <<= 1; + } + } + + // insert alpha=255 values if desired + if (img_n != out_n) + stbi__create_png_alpha_expand8(dest, dest, x, img_n); + } else if (depth == 8) { + if (img_n == out_n) + memcpy(dest, cur, x*img_n); + else + stbi__create_png_alpha_expand8(dest, cur, x, img_n); + } else if (depth == 16) { + // convert the image data from big-endian to platform-native + stbi__uint16 *dest16 = (stbi__uint16*)dest; + stbi__uint32 nsmp = x*img_n; + + if (img_n == out_n) { + for (i = 0; i < nsmp; ++i, ++dest16, cur += 2) + *dest16 = (cur[0] << 8) | cur[1]; + } else { + STBI_ASSERT(img_n+1 == out_n); + if (img_n == 1) { + for (i = 0; i < x; ++i, dest16 += 2, cur += 2) { + dest16[0] = (cur[0] << 8) | cur[1]; + dest16[1] = 0xffff; + } + } else { + STBI_ASSERT(img_n == 3); + for (i = 0; i < x; ++i, dest16 += 4, cur += 6) { + dest16[0] = (cur[0] << 8) | cur[1]; + dest16[1] = (cur[2] << 8) | cur[3]; + dest16[2] = (cur[4] << 8) | cur[5]; + dest16[3] = 0xffff; + } + } + } + } + } + + STBI_FREE(filter_buf); + if (!all_ok) return 0; + + return 1; +} + +static int stbi__create_png_image(stbi__png *a, stbi_uc *image_data, stbi__uint32 image_data_len, int out_n, int depth, int color, int interlaced) +{ + int bytes = (depth == 16 ? 2 : 1); + int out_bytes = out_n * bytes; + stbi_uc *final; + int p; + if (!interlaced) + return stbi__create_png_image_raw(a, image_data, image_data_len, out_n, a->s->img_x, a->s->img_y, depth, color); + + // de-interlacing + final = (stbi_uc *) stbi__malloc_mad3(a->s->img_x, a->s->img_y, out_bytes, 0); + if (!final) return stbi__err("outofmem", "Out of memory"); + for (p=0; p < 7; ++p) { + int xorig[] = { 0,4,0,2,0,1,0 }; + int yorig[] = { 0,0,4,0,2,0,1 }; + int xspc[] = { 8,8,4,4,2,2,1 }; + int yspc[] = { 8,8,8,4,4,2,2 }; + int i,j,x,y; + // pass1_x[4] = 0, pass1_x[5] = 1, pass1_x[12] = 1 + x = (a->s->img_x - xorig[p] + xspc[p]-1) / xspc[p]; + y = (a->s->img_y - yorig[p] + yspc[p]-1) / yspc[p]; + if (x && y) { + stbi__uint32 img_len = ((((a->s->img_n * x * depth) + 7) >> 3) + 1) * y; + if (!stbi__create_png_image_raw(a, image_data, image_data_len, out_n, x, y, depth, color)) { + STBI_FREE(final); + return 0; + } + for (j=0; j < y; ++j) { + for (i=0; i < x; ++i) { + int out_y = j*yspc[p]+yorig[p]; + int out_x = i*xspc[p]+xorig[p]; + memcpy(final + out_y*a->s->img_x*out_bytes + out_x*out_bytes, + a->out + (j*x+i)*out_bytes, out_bytes); + } + } + STBI_FREE(a->out); + image_data += img_len; + image_data_len -= img_len; + } + } + a->out = final; + + return 1; +} + +static int stbi__compute_transparency(stbi__png *z, stbi_uc tc[3], int out_n) +{ + stbi__context *s = z->s; + stbi__uint32 i, pixel_count = s->img_x * s->img_y; + stbi_uc *p = z->out; + + // compute color-based transparency, assuming we've + // already got 255 as the alpha value in the output + STBI_ASSERT(out_n == 2 || out_n == 4); + + if (out_n == 2) { + for (i=0; i < pixel_count; ++i) { + p[1] = (p[0] == tc[0] ? 0 : 255); + p += 2; + } + } else { + for (i=0; i < pixel_count; ++i) { + if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) + p[3] = 0; + p += 4; + } + } + return 1; +} + +static int stbi__compute_transparency16(stbi__png *z, stbi__uint16 tc[3], int out_n) +{ + stbi__context *s = z->s; + stbi__uint32 i, pixel_count = s->img_x * s->img_y; + stbi__uint16 *p = (stbi__uint16*) z->out; + + // compute color-based transparency, assuming we've + // already got 65535 as the alpha value in the output + STBI_ASSERT(out_n == 2 || out_n == 4); + + if (out_n == 2) { + for (i = 0; i < pixel_count; ++i) { + p[1] = (p[0] == tc[0] ? 0 : 65535); + p += 2; + } + } else { + for (i = 0; i < pixel_count; ++i) { + if (p[0] == tc[0] && p[1] == tc[1] && p[2] == tc[2]) + p[3] = 0; + p += 4; + } + } + return 1; +} + +static int stbi__expand_png_palette(stbi__png *a, stbi_uc *palette, int len, int pal_img_n) +{ + stbi__uint32 i, pixel_count = a->s->img_x * a->s->img_y; + stbi_uc *p, *temp_out, *orig = a->out; + + p = (stbi_uc *) stbi__malloc_mad2(pixel_count, pal_img_n, 0); + if (p == NULL) return stbi__err("outofmem", "Out of memory"); + + // between here and free(out) below, exitting would leak + temp_out = p; + + if (pal_img_n == 3) { + for (i=0; i < pixel_count; ++i) { + int n = orig[i]*4; + p[0] = palette[n ]; + p[1] = palette[n+1]; + p[2] = palette[n+2]; + p += 3; + } + } else { + for (i=0; i < pixel_count; ++i) { + int n = orig[i]*4; + p[0] = palette[n ]; + p[1] = palette[n+1]; + p[2] = palette[n+2]; + p[3] = palette[n+3]; + p += 4; + } + } + STBI_FREE(a->out); + a->out = temp_out; + + STBI_NOTUSED(len); + + return 1; +} + +static int stbi__unpremultiply_on_load_global = 0; +static int stbi__de_iphone_flag_global = 0; + +STBIDEF void stbi_set_unpremultiply_on_load(int flag_true_if_should_unpremultiply) +{ + stbi__unpremultiply_on_load_global = flag_true_if_should_unpremultiply; +} + +STBIDEF void stbi_convert_iphone_png_to_rgb(int flag_true_if_should_convert) +{ + stbi__de_iphone_flag_global = flag_true_if_should_convert; +} + +#ifndef STBI_THREAD_LOCAL +#define stbi__unpremultiply_on_load stbi__unpremultiply_on_load_global +#define stbi__de_iphone_flag stbi__de_iphone_flag_global +#else +static STBI_THREAD_LOCAL int stbi__unpremultiply_on_load_local, stbi__unpremultiply_on_load_set; +static STBI_THREAD_LOCAL int stbi__de_iphone_flag_local, stbi__de_iphone_flag_set; + +STBIDEF void stbi_set_unpremultiply_on_load_thread(int flag_true_if_should_unpremultiply) +{ + stbi__unpremultiply_on_load_local = flag_true_if_should_unpremultiply; + stbi__unpremultiply_on_load_set = 1; +} + +STBIDEF void stbi_convert_iphone_png_to_rgb_thread(int flag_true_if_should_convert) +{ + stbi__de_iphone_flag_local = flag_true_if_should_convert; + stbi__de_iphone_flag_set = 1; +} + +#define stbi__unpremultiply_on_load (stbi__unpremultiply_on_load_set \ + ? stbi__unpremultiply_on_load_local \ + : stbi__unpremultiply_on_load_global) +#define stbi__de_iphone_flag (stbi__de_iphone_flag_set \ + ? stbi__de_iphone_flag_local \ + : stbi__de_iphone_flag_global) +#endif // STBI_THREAD_LOCAL + +static void stbi__de_iphone(stbi__png *z) +{ + stbi__context *s = z->s; + stbi__uint32 i, pixel_count = s->img_x * s->img_y; + stbi_uc *p = z->out; + + if (s->img_out_n == 3) { // convert bgr to rgb + for (i=0; i < pixel_count; ++i) { + stbi_uc t = p[0]; + p[0] = p[2]; + p[2] = t; + p += 3; + } + } else { + STBI_ASSERT(s->img_out_n == 4); + if (stbi__unpremultiply_on_load) { + // convert bgr to rgb and unpremultiply + for (i=0; i < pixel_count; ++i) { + stbi_uc a = p[3]; + stbi_uc t = p[0]; + if (a) { + stbi_uc half = a / 2; + p[0] = (p[2] * 255 + half) / a; + p[1] = (p[1] * 255 + half) / a; + p[2] = ( t * 255 + half) / a; + } else { + p[0] = p[2]; + p[2] = t; + } + p += 4; + } + } else { + // convert bgr to rgb + for (i=0; i < pixel_count; ++i) { + stbi_uc t = p[0]; + p[0] = p[2]; + p[2] = t; + p += 4; + } + } + } +} + +#define STBI__PNG_TYPE(a,b,c,d) (((unsigned) (a) << 24) + ((unsigned) (b) << 16) + ((unsigned) (c) << 8) + (unsigned) (d)) + +static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp) +{ + stbi_uc palette[1024], pal_img_n=0; + stbi_uc has_trans=0, tc[3]={0}; + stbi__uint16 tc16[3]; + stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0; + int first=1,k,interlace=0, color=0, is_iphone=0; + stbi__context *s = z->s; + + z->expanded = NULL; + z->idata = NULL; + z->out = NULL; + + if (!stbi__check_png_header(s)) return 0; + + if (scan == STBI__SCAN_type) return 1; + + for (;;) { + stbi__pngchunk c = stbi__get_chunk_header(s); + switch (c.type) { + case STBI__PNG_TYPE('C','g','B','I'): + is_iphone = 1; + stbi__skip(s, c.length); + break; + case STBI__PNG_TYPE('I','H','D','R'): { + int comp,filter; + if (!first) return stbi__err("multiple IHDR","Corrupt PNG"); + first = 0; + if (c.length != 13) return stbi__err("bad IHDR len","Corrupt PNG"); + s->img_x = stbi__get32be(s); + s->img_y = stbi__get32be(s); + if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); + if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); + z->depth = stbi__get8(s); if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16) return stbi__err("1/2/4/8/16-bit only","PNG not supported: 1/2/4/8/16-bit only"); + color = stbi__get8(s); if (color > 6) return stbi__err("bad ctype","Corrupt PNG"); + if (color == 3 && z->depth == 16) return stbi__err("bad ctype","Corrupt PNG"); + if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype","Corrupt PNG"); + comp = stbi__get8(s); if (comp) return stbi__err("bad comp method","Corrupt PNG"); + filter= stbi__get8(s); if (filter) return stbi__err("bad filter method","Corrupt PNG"); + interlace = stbi__get8(s); if (interlace>1) return stbi__err("bad interlace method","Corrupt PNG"); + if (!s->img_x || !s->img_y) return stbi__err("0-pixel image","Corrupt PNG"); + if (!pal_img_n) { + s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0); + if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode"); + } else { + // if paletted, then pal_n is our final components, and + // img_n is # components to decompress/filter. + s->img_n = 1; + if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large","Corrupt PNG"); + } + // even with SCAN_header, have to scan to see if we have a tRNS + break; + } + + case STBI__PNG_TYPE('P','L','T','E'): { + if (first) return stbi__err("first not IHDR", "Corrupt PNG"); + if (c.length > 256*3) return stbi__err("invalid PLTE","Corrupt PNG"); + pal_len = c.length / 3; + if (pal_len * 3 != c.length) return stbi__err("invalid PLTE","Corrupt PNG"); + for (i=0; i < pal_len; ++i) { + palette[i*4+0] = stbi__get8(s); + palette[i*4+1] = stbi__get8(s); + palette[i*4+2] = stbi__get8(s); + palette[i*4+3] = 255; + } + break; + } + + case STBI__PNG_TYPE('t','R','N','S'): { + if (first) return stbi__err("first not IHDR", "Corrupt PNG"); + if (z->idata) return stbi__err("tRNS after IDAT","Corrupt PNG"); + if (pal_img_n) { + if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; } + if (pal_len == 0) return stbi__err("tRNS before PLTE","Corrupt PNG"); + if (c.length > pal_len) return stbi__err("bad tRNS len","Corrupt PNG"); + pal_img_n = 4; + for (i=0; i < c.length; ++i) + palette[i*4+3] = stbi__get8(s); + } else { + if (!(s->img_n & 1)) return stbi__err("tRNS with alpha","Corrupt PNG"); + if (c.length != (stbi__uint32) s->img_n*2) return stbi__err("bad tRNS len","Corrupt PNG"); + has_trans = 1; + // non-paletted with tRNS = constant alpha. if header-scanning, we can stop now. + if (scan == STBI__SCAN_header) { ++s->img_n; return 1; } + if (z->depth == 16) { + for (k = 0; k < s->img_n && k < 3; ++k) // extra loop test to suppress false GCC warning + tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is + } else { + for (k = 0; k < s->img_n && k < 3; ++k) + tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->depth]; // non 8-bit images will be larger + } + } + break; + } + + case STBI__PNG_TYPE('I','D','A','T'): { + if (first) return stbi__err("first not IHDR", "Corrupt PNG"); + if (pal_img_n && !pal_len) return stbi__err("no PLTE","Corrupt PNG"); + if (scan == STBI__SCAN_header) { + // header scan definitely stops at first IDAT + if (pal_img_n) + s->img_n = pal_img_n; + return 1; + } + if (c.length > (1u << 30)) return stbi__err("IDAT size limit", "IDAT section larger than 2^30 bytes"); + if ((int)(ioff + c.length) < (int)ioff) return 0; + if (ioff + c.length > idata_limit) { + stbi__uint32 idata_limit_old = idata_limit; + stbi_uc *p; + if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096; + while (ioff + c.length > idata_limit) + idata_limit *= 2; + STBI_NOTUSED(idata_limit_old); + p = (stbi_uc *) STBI_REALLOC_SIZED(z->idata, idata_limit_old, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory"); + z->idata = p; + } + if (!stbi__getn(s, z->idata+ioff,c.length)) return stbi__err("outofdata","Corrupt PNG"); + ioff += c.length; + break; + } + + case STBI__PNG_TYPE('I','E','N','D'): { + stbi__uint32 raw_len, bpl; + if (first) return stbi__err("first not IHDR", "Corrupt PNG"); + if (scan != STBI__SCAN_load) return 1; + if (z->idata == NULL) return stbi__err("no IDAT","Corrupt PNG"); + // initial guess for decoded data size to avoid unnecessary reallocs + bpl = (s->img_x * z->depth + 7) / 8; // bytes per line, per component + raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */; + z->expanded = (stbi_uc *) stbi_zlib_decode_malloc_guesssize_headerflag((char *) z->idata, ioff, raw_len, (int *) &raw_len, !is_iphone); + if (z->expanded == NULL) return 0; // zlib should set error + STBI_FREE(z->idata); z->idata = NULL; + if ((req_comp == s->img_n+1 && req_comp != 3 && !pal_img_n) || has_trans) + s->img_out_n = s->img_n+1; + else + s->img_out_n = s->img_n; + if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, z->depth, color, interlace)) return 0; + if (has_trans) { + if (z->depth == 16) { + if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0; + } else { + if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0; + } + } + if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2) + stbi__de_iphone(z); + if (pal_img_n) { + // pal_img_n == 3 or 4 + s->img_n = pal_img_n; // record the actual colors we had + s->img_out_n = pal_img_n; + if (req_comp >= 3) s->img_out_n = req_comp; + if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n)) + return 0; + } else if (has_trans) { + // non-paletted image with tRNS -> source image has (constant) alpha + ++s->img_n; + } + STBI_FREE(z->expanded); z->expanded = NULL; + // end of PNG chunk, read and skip CRC + stbi__get32be(s); + return 1; + } + + default: + // if critical, fail + if (first) return stbi__err("first not IHDR", "Corrupt PNG"); + if ((c.type & (1 << 29)) == 0) { + #ifndef STBI_NO_FAILURE_STRINGS + // not threadsafe + static char invalid_chunk[] = "XXXX PNG chunk not known"; + invalid_chunk[0] = STBI__BYTECAST(c.type >> 24); + invalid_chunk[1] = STBI__BYTECAST(c.type >> 16); + invalid_chunk[2] = STBI__BYTECAST(c.type >> 8); + invalid_chunk[3] = STBI__BYTECAST(c.type >> 0); + #endif + return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type"); + } + stbi__skip(s, c.length); + break; + } + // end of PNG chunk, read and skip CRC + stbi__get32be(s); + } +} + +static void *stbi__do_png(stbi__png *p, int *x, int *y, int *n, int req_comp, stbi__result_info *ri) +{ + void *result=NULL; + if (req_comp < 0 || req_comp > 4) return stbi__errpuc("bad req_comp", "Internal error"); + if (stbi__parse_png_file(p, STBI__SCAN_load, req_comp)) { + if (p->depth <= 8) + ri->bits_per_channel = 8; + else if (p->depth == 16) + ri->bits_per_channel = 16; + else + return stbi__errpuc("bad bits_per_channel", "PNG not supported: unsupported color depth"); + result = p->out; + p->out = NULL; + if (req_comp && req_comp != p->s->img_out_n) { + if (ri->bits_per_channel == 8) + result = stbi__convert_format((unsigned char *) result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); + else + result = stbi__convert_format16((stbi__uint16 *) result, p->s->img_out_n, req_comp, p->s->img_x, p->s->img_y); + p->s->img_out_n = req_comp; + if (result == NULL) return result; + } + *x = p->s->img_x; + *y = p->s->img_y; + if (n) *n = p->s->img_n; + } + STBI_FREE(p->out); p->out = NULL; + STBI_FREE(p->expanded); p->expanded = NULL; + STBI_FREE(p->idata); p->idata = NULL; + + return result; +} + +static void *stbi__png_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) +{ + stbi__png p; + p.s = s; + return stbi__do_png(&p, x,y,comp,req_comp, ri); +} + +static int stbi__png_test(stbi__context *s) +{ + int r; + r = stbi__check_png_header(s); + stbi__rewind(s); + return r; +} + +static int stbi__png_info_raw(stbi__png *p, int *x, int *y, int *comp) +{ + if (!stbi__parse_png_file(p, STBI__SCAN_header, 0)) { + stbi__rewind( p->s ); + return 0; + } + if (x) *x = p->s->img_x; + if (y) *y = p->s->img_y; + if (comp) *comp = p->s->img_n; + return 1; +} + +static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp) +{ + stbi__png p; + p.s = s; + return stbi__png_info_raw(&p, x, y, comp); +} + +static int stbi__png_is16(stbi__context *s) +{ + stbi__png p; + p.s = s; + if (!stbi__png_info_raw(&p, NULL, NULL, NULL)) + return 0; + if (p.depth != 16) { + stbi__rewind(p.s); + return 0; + } + return 1; +} +#endif + +// Microsoft/Windows BMP image + +#ifndef STBI_NO_BMP +static int stbi__bmp_test_raw(stbi__context *s) +{ + int r; + int sz; + if (stbi__get8(s) != 'B') return 0; + if (stbi__get8(s) != 'M') return 0; + stbi__get32le(s); // discard filesize + stbi__get16le(s); // discard reserved + stbi__get16le(s); // discard reserved + stbi__get32le(s); // discard data offset + sz = stbi__get32le(s); + r = (sz == 12 || sz == 40 || sz == 56 || sz == 108 || sz == 124); + return r; +} + +static int stbi__bmp_test(stbi__context *s) +{ + int r = stbi__bmp_test_raw(s); + stbi__rewind(s); + return r; +} + + +// returns 0..31 for the highest set bit +static int stbi__high_bit(unsigned int z) +{ + int n=0; + if (z == 0) return -1; + if (z >= 0x10000) { n += 16; z >>= 16; } + if (z >= 0x00100) { n += 8; z >>= 8; } + if (z >= 0x00010) { n += 4; z >>= 4; } + if (z >= 0x00004) { n += 2; z >>= 2; } + if (z >= 0x00002) { n += 1;/* >>= 1;*/ } + return n; +} + +static int stbi__bitcount(unsigned int a) +{ + a = (a & 0x55555555) + ((a >> 1) & 0x55555555); // max 2 + a = (a & 0x33333333) + ((a >> 2) & 0x33333333); // max 4 + a = (a + (a >> 4)) & 0x0f0f0f0f; // max 8 per 4, now 8 bits + a = (a + (a >> 8)); // max 16 per 8 bits + a = (a + (a >> 16)); // max 32 per 8 bits + return a & 0xff; +} + +// extract an arbitrarily-aligned N-bit value (N=bits) +// from v, and then make it 8-bits long and fractionally +// extend it to full full range. +static int stbi__shiftsigned(unsigned int v, int shift, int bits) +{ + static unsigned int mul_table[9] = { + 0, + 0xff/*0b11111111*/, 0x55/*0b01010101*/, 0x49/*0b01001001*/, 0x11/*0b00010001*/, + 0x21/*0b00100001*/, 0x41/*0b01000001*/, 0x81/*0b10000001*/, 0x01/*0b00000001*/, + }; + static unsigned int shift_table[9] = { + 0, 0,0,1,0,2,4,6,0, + }; + if (shift < 0) + v <<= -shift; + else + v >>= shift; + STBI_ASSERT(v < 256); + v >>= (8-bits); + STBI_ASSERT(bits >= 0 && bits <= 8); + return (int) ((unsigned) v * mul_table[bits]) >> shift_table[bits]; +} + +typedef struct +{ + int bpp, offset, hsz; + unsigned int mr,mg,mb,ma, all_a; + int extra_read; +} stbi__bmp_data; + +static int stbi__bmp_set_mask_defaults(stbi__bmp_data *info, int compress) +{ + // BI_BITFIELDS specifies masks explicitly, don't override + if (compress == 3) + return 1; + + if (compress == 0) { + if (info->bpp == 16) { + info->mr = 31u << 10; + info->mg = 31u << 5; + info->mb = 31u << 0; + } else if (info->bpp == 32) { + info->mr = 0xffu << 16; + info->mg = 0xffu << 8; + info->mb = 0xffu << 0; + info->ma = 0xffu << 24; + info->all_a = 0; // if all_a is 0 at end, then we loaded alpha channel but it was all 0 + } else { + // otherwise, use defaults, which is all-0 + info->mr = info->mg = info->mb = info->ma = 0; + } + return 1; + } + return 0; // error +} + +static void *stbi__bmp_parse_header(stbi__context *s, stbi__bmp_data *info) +{ + int hsz; + if (stbi__get8(s) != 'B' || stbi__get8(s) != 'M') return stbi__errpuc("not BMP", "Corrupt BMP"); + stbi__get32le(s); // discard filesize + stbi__get16le(s); // discard reserved + stbi__get16le(s); // discard reserved + info->offset = stbi__get32le(s); + info->hsz = hsz = stbi__get32le(s); + info->mr = info->mg = info->mb = info->ma = 0; + info->extra_read = 14; + + if (info->offset < 0) return stbi__errpuc("bad BMP", "bad BMP"); + + if (hsz != 12 && hsz != 40 && hsz != 56 && hsz != 108 && hsz != 124) return stbi__errpuc("unknown BMP", "BMP type not supported: unknown"); + if (hsz == 12) { + s->img_x = stbi__get16le(s); + s->img_y = stbi__get16le(s); + } else { + s->img_x = stbi__get32le(s); + s->img_y = stbi__get32le(s); + } + if (stbi__get16le(s) != 1) return stbi__errpuc("bad BMP", "bad BMP"); + info->bpp = stbi__get16le(s); + if (hsz != 12) { + int compress = stbi__get32le(s); + if (compress == 1 || compress == 2) return stbi__errpuc("BMP RLE", "BMP type not supported: RLE"); + if (compress >= 4) return stbi__errpuc("BMP JPEG/PNG", "BMP type not supported: unsupported compression"); // this includes PNG/JPEG modes + if (compress == 3 && info->bpp != 16 && info->bpp != 32) return stbi__errpuc("bad BMP", "bad BMP"); // bitfields requires 16 or 32 bits/pixel + stbi__get32le(s); // discard sizeof + stbi__get32le(s); // discard hres + stbi__get32le(s); // discard vres + stbi__get32le(s); // discard colorsused + stbi__get32le(s); // discard max important + if (hsz == 40 || hsz == 56) { + if (hsz == 56) { + stbi__get32le(s); + stbi__get32le(s); + stbi__get32le(s); + stbi__get32le(s); + } + if (info->bpp == 16 || info->bpp == 32) { + if (compress == 0) { + stbi__bmp_set_mask_defaults(info, compress); + } else if (compress == 3) { + info->mr = stbi__get32le(s); + info->mg = stbi__get32le(s); + info->mb = stbi__get32le(s); + info->extra_read += 12; + // not documented, but generated by photoshop and handled by mspaint + if (info->mr == info->mg && info->mg == info->mb) { + // ?!?!? + return stbi__errpuc("bad BMP", "bad BMP"); + } + } else + return stbi__errpuc("bad BMP", "bad BMP"); + } + } else { + // V4/V5 header + int i; + if (hsz != 108 && hsz != 124) + return stbi__errpuc("bad BMP", "bad BMP"); + info->mr = stbi__get32le(s); + info->mg = stbi__get32le(s); + info->mb = stbi__get32le(s); + info->ma = stbi__get32le(s); + if (compress != 3) // override mr/mg/mb unless in BI_BITFIELDS mode, as per docs + stbi__bmp_set_mask_defaults(info, compress); + stbi__get32le(s); // discard color space + for (i=0; i < 12; ++i) + stbi__get32le(s); // discard color space parameters + if (hsz == 124) { + stbi__get32le(s); // discard rendering intent + stbi__get32le(s); // discard offset of profile data + stbi__get32le(s); // discard size of profile data + stbi__get32le(s); // discard reserved + } + } + } + return (void *) 1; +} + + +static void *stbi__bmp_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) +{ + stbi_uc *out; + unsigned int mr=0,mg=0,mb=0,ma=0, all_a; + stbi_uc pal[256][4]; + int psize=0,i,j,width; + int flip_vertically, pad, target; + stbi__bmp_data info; + STBI_NOTUSED(ri); + + info.all_a = 255; + if (stbi__bmp_parse_header(s, &info) == NULL) + return NULL; // error code already set + + flip_vertically = ((int) s->img_y) > 0; + s->img_y = abs((int) s->img_y); + + if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); + if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); + + mr = info.mr; + mg = info.mg; + mb = info.mb; + ma = info.ma; + all_a = info.all_a; + + if (info.hsz == 12) { + if (info.bpp < 24) + psize = (info.offset - info.extra_read - 24) / 3; + } else { + if (info.bpp < 16) + psize = (info.offset - info.extra_read - info.hsz) >> 2; + } + if (psize == 0) { + // accept some number of extra bytes after the header, but if the offset points either to before + // the header ends or implies a large amount of extra data, reject the file as malformed + int bytes_read_so_far = s->callback_already_read + (int)(s->img_buffer - s->img_buffer_original); + int header_limit = 1024; // max we actually read is below 256 bytes currently. + int extra_data_limit = 256*4; // what ordinarily goes here is a palette; 256 entries*4 bytes is its max size. + if (bytes_read_so_far <= 0 || bytes_read_so_far > header_limit) { + return stbi__errpuc("bad header", "Corrupt BMP"); + } + // we established that bytes_read_so_far is positive and sensible. + // the first half of this test rejects offsets that are either too small positives, or + // negative, and guarantees that info.offset >= bytes_read_so_far > 0. this in turn + // ensures the number computed in the second half of the test can't overflow. + if (info.offset < bytes_read_so_far || info.offset - bytes_read_so_far > extra_data_limit) { + return stbi__errpuc("bad offset", "Corrupt BMP"); + } else { + stbi__skip(s, info.offset - bytes_read_so_far); + } + } + + if (info.bpp == 24 && ma == 0xff000000) + s->img_n = 3; + else + s->img_n = ma ? 4 : 3; + if (req_comp && req_comp >= 3) // we can directly decode 3 or 4 + target = req_comp; + else + target = s->img_n; // if they want monochrome, we'll post-convert + + // sanity-check size + if (!stbi__mad3sizes_valid(target, s->img_x, s->img_y, 0)) + return stbi__errpuc("too large", "Corrupt BMP"); + + out = (stbi_uc *) stbi__malloc_mad3(target, s->img_x, s->img_y, 0); + if (!out) return stbi__errpuc("outofmem", "Out of memory"); + if (info.bpp < 16) { + int z=0; + if (psize == 0 || psize > 256) { STBI_FREE(out); return stbi__errpuc("invalid", "Corrupt BMP"); } + for (i=0; i < psize; ++i) { + pal[i][2] = stbi__get8(s); + pal[i][1] = stbi__get8(s); + pal[i][0] = stbi__get8(s); + if (info.hsz != 12) stbi__get8(s); + pal[i][3] = 255; + } + stbi__skip(s, info.offset - info.extra_read - info.hsz - psize * (info.hsz == 12 ? 3 : 4)); + if (info.bpp == 1) width = (s->img_x + 7) >> 3; + else if (info.bpp == 4) width = (s->img_x + 1) >> 1; + else if (info.bpp == 8) width = s->img_x; + else { STBI_FREE(out); return stbi__errpuc("bad bpp", "Corrupt BMP"); } + pad = (-width)&3; + if (info.bpp == 1) { + for (j=0; j < (int) s->img_y; ++j) { + int bit_offset = 7, v = stbi__get8(s); + for (i=0; i < (int) s->img_x; ++i) { + int color = (v>>bit_offset)&0x1; + out[z++] = pal[color][0]; + out[z++] = pal[color][1]; + out[z++] = pal[color][2]; + if (target == 4) out[z++] = 255; + if (i+1 == (int) s->img_x) break; + if((--bit_offset) < 0) { + bit_offset = 7; + v = stbi__get8(s); + } + } + stbi__skip(s, pad); + } + } else { + for (j=0; j < (int) s->img_y; ++j) { + for (i=0; i < (int) s->img_x; i += 2) { + int v=stbi__get8(s),v2=0; + if (info.bpp == 4) { + v2 = v & 15; + v >>= 4; + } + out[z++] = pal[v][0]; + out[z++] = pal[v][1]; + out[z++] = pal[v][2]; + if (target == 4) out[z++] = 255; + if (i+1 == (int) s->img_x) break; + v = (info.bpp == 8) ? stbi__get8(s) : v2; + out[z++] = pal[v][0]; + out[z++] = pal[v][1]; + out[z++] = pal[v][2]; + if (target == 4) out[z++] = 255; + } + stbi__skip(s, pad); + } + } + } else { + int rshift=0,gshift=0,bshift=0,ashift=0,rcount=0,gcount=0,bcount=0,acount=0; + int z = 0; + int easy=0; + stbi__skip(s, info.offset - info.extra_read - info.hsz); + if (info.bpp == 24) width = 3 * s->img_x; + else if (info.bpp == 16) width = 2*s->img_x; + else /* bpp = 32 and pad = 0 */ width=0; + pad = (-width) & 3; + if (info.bpp == 24) { + easy = 1; + } else if (info.bpp == 32) { + if (mb == 0xff && mg == 0xff00 && mr == 0x00ff0000 && ma == 0xff000000) + easy = 2; + } + if (!easy) { + if (!mr || !mg || !mb) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } + // right shift amt to put high bit in position #7 + rshift = stbi__high_bit(mr)-7; rcount = stbi__bitcount(mr); + gshift = stbi__high_bit(mg)-7; gcount = stbi__bitcount(mg); + bshift = stbi__high_bit(mb)-7; bcount = stbi__bitcount(mb); + ashift = stbi__high_bit(ma)-7; acount = stbi__bitcount(ma); + if (rcount > 8 || gcount > 8 || bcount > 8 || acount > 8) { STBI_FREE(out); return stbi__errpuc("bad masks", "Corrupt BMP"); } + } + for (j=0; j < (int) s->img_y; ++j) { + if (easy) { + for (i=0; i < (int) s->img_x; ++i) { + unsigned char a; + out[z+2] = stbi__get8(s); + out[z+1] = stbi__get8(s); + out[z+0] = stbi__get8(s); + z += 3; + a = (easy == 2 ? stbi__get8(s) : 255); + all_a |= a; + if (target == 4) out[z++] = a; + } + } else { + int bpp = info.bpp; + for (i=0; i < (int) s->img_x; ++i) { + stbi__uint32 v = (bpp == 16 ? (stbi__uint32) stbi__get16le(s) : stbi__get32le(s)); + unsigned int a; + out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mr, rshift, rcount)); + out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mg, gshift, gcount)); + out[z++] = STBI__BYTECAST(stbi__shiftsigned(v & mb, bshift, bcount)); + a = (ma ? stbi__shiftsigned(v & ma, ashift, acount) : 255); + all_a |= a; + if (target == 4) out[z++] = STBI__BYTECAST(a); + } + } + stbi__skip(s, pad); + } + } + + // if alpha channel is all 0s, replace with all 255s + if (target == 4 && all_a == 0) + for (i=4*s->img_x*s->img_y-1; i >= 0; i -= 4) + out[i] = 255; + + if (flip_vertically) { + stbi_uc t; + for (j=0; j < (int) s->img_y>>1; ++j) { + stbi_uc *p1 = out + j *s->img_x*target; + stbi_uc *p2 = out + (s->img_y-1-j)*s->img_x*target; + for (i=0; i < (int) s->img_x*target; ++i) { + t = p1[i]; p1[i] = p2[i]; p2[i] = t; + } + } + } + + if (req_comp && req_comp != target) { + out = stbi__convert_format(out, target, req_comp, s->img_x, s->img_y); + if (out == NULL) return out; // stbi__convert_format frees input on failure + } + + *x = s->img_x; + *y = s->img_y; + if (comp) *comp = s->img_n; + return out; +} +#endif + +// Targa Truevision - TGA +// by Jonathan Dummer +#ifndef STBI_NO_TGA +// returns STBI_rgb or whatever, 0 on error +static int stbi__tga_get_comp(int bits_per_pixel, int is_grey, int* is_rgb16) +{ + // only RGB or RGBA (incl. 16bit) or grey allowed + if (is_rgb16) *is_rgb16 = 0; + switch(bits_per_pixel) { + case 8: return STBI_grey; + case 16: if(is_grey) return STBI_grey_alpha; + // fallthrough + case 15: if(is_rgb16) *is_rgb16 = 1; + return STBI_rgb; + case 24: // fallthrough + case 32: return bits_per_pixel/8; + default: return 0; + } +} + +static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp) +{ + int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp; + int sz, tga_colormap_type; + stbi__get8(s); // discard Offset + tga_colormap_type = stbi__get8(s); // colormap type + if( tga_colormap_type > 1 ) { + stbi__rewind(s); + return 0; // only RGB or indexed allowed + } + tga_image_type = stbi__get8(s); // image type + if ( tga_colormap_type == 1 ) { // colormapped (paletted) image + if (tga_image_type != 1 && tga_image_type != 9) { + stbi__rewind(s); + return 0; + } + stbi__skip(s,4); // skip index of first colormap entry and number of entries + sz = stbi__get8(s); // check bits per palette color entry + if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) { + stbi__rewind(s); + return 0; + } + stbi__skip(s,4); // skip image x and y origin + tga_colormap_bpp = sz; + } else { // "normal" image w/o colormap - only RGB or grey allowed, +/- RLE + if ( (tga_image_type != 2) && (tga_image_type != 3) && (tga_image_type != 10) && (tga_image_type != 11) ) { + stbi__rewind(s); + return 0; // only RGB or grey allowed, +/- RLE + } + stbi__skip(s,9); // skip colormap specification and image x/y origin + tga_colormap_bpp = 0; + } + tga_w = stbi__get16le(s); + if( tga_w < 1 ) { + stbi__rewind(s); + return 0; // test width + } + tga_h = stbi__get16le(s); + if( tga_h < 1 ) { + stbi__rewind(s); + return 0; // test height + } + tga_bits_per_pixel = stbi__get8(s); // bits per pixel + stbi__get8(s); // ignore alpha bits + if (tga_colormap_bpp != 0) { + if((tga_bits_per_pixel != 8) && (tga_bits_per_pixel != 16)) { + // when using a colormap, tga_bits_per_pixel is the size of the indexes + // I don't think anything but 8 or 16bit indexes makes sense + stbi__rewind(s); + return 0; + } + tga_comp = stbi__tga_get_comp(tga_colormap_bpp, 0, NULL); + } else { + tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3) || (tga_image_type == 11), NULL); + } + if(!tga_comp) { + stbi__rewind(s); + return 0; + } + if (x) *x = tga_w; + if (y) *y = tga_h; + if (comp) *comp = tga_comp; + return 1; // seems to have passed everything +} + +static int stbi__tga_test(stbi__context *s) +{ + int res = 0; + int sz, tga_color_type; + stbi__get8(s); // discard Offset + tga_color_type = stbi__get8(s); // color type + if ( tga_color_type > 1 ) goto errorEnd; // only RGB or indexed allowed + sz = stbi__get8(s); // image type + if ( tga_color_type == 1 ) { // colormapped (paletted) image + if (sz != 1 && sz != 9) goto errorEnd; // colortype 1 demands image type 1 or 9 + stbi__skip(s,4); // skip index of first colormap entry and number of entries + sz = stbi__get8(s); // check bits per palette color entry + if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; + stbi__skip(s,4); // skip image x and y origin + } else { // "normal" image w/o colormap + if ( (sz != 2) && (sz != 3) && (sz != 10) && (sz != 11) ) goto errorEnd; // only RGB or grey allowed, +/- RLE + stbi__skip(s,9); // skip colormap specification and image x/y origin + } + if ( stbi__get16le(s) < 1 ) goto errorEnd; // test width + if ( stbi__get16le(s) < 1 ) goto errorEnd; // test height + sz = stbi__get8(s); // bits per pixel + if ( (tga_color_type == 1) && (sz != 8) && (sz != 16) ) goto errorEnd; // for colormapped images, bpp is size of an index + if ( (sz != 8) && (sz != 15) && (sz != 16) && (sz != 24) && (sz != 32) ) goto errorEnd; + + res = 1; // if we got this far, everything's good and we can return 1 instead of 0 + +errorEnd: + stbi__rewind(s); + return res; +} + +// read 16bit value and convert to 24bit RGB +static void stbi__tga_read_rgb16(stbi__context *s, stbi_uc* out) +{ + stbi__uint16 px = (stbi__uint16)stbi__get16le(s); + stbi__uint16 fiveBitMask = 31; + // we have 3 channels with 5bits each + int r = (px >> 10) & fiveBitMask; + int g = (px >> 5) & fiveBitMask; + int b = px & fiveBitMask; + // Note that this saves the data in RGB(A) order, so it doesn't need to be swapped later + out[0] = (stbi_uc)((r * 255)/31); + out[1] = (stbi_uc)((g * 255)/31); + out[2] = (stbi_uc)((b * 255)/31); + + // some people claim that the most significant bit might be used for alpha + // (possibly if an alpha-bit is set in the "image descriptor byte") + // but that only made 16bit test images completely translucent.. + // so let's treat all 15 and 16bit TGAs as RGB with no alpha. +} + +static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) +{ + // read in the TGA header stuff + int tga_offset = stbi__get8(s); + int tga_indexed = stbi__get8(s); + int tga_image_type = stbi__get8(s); + int tga_is_RLE = 0; + int tga_palette_start = stbi__get16le(s); + int tga_palette_len = stbi__get16le(s); + int tga_palette_bits = stbi__get8(s); + int tga_x_origin = stbi__get16le(s); + int tga_y_origin = stbi__get16le(s); + int tga_width = stbi__get16le(s); + int tga_height = stbi__get16le(s); + int tga_bits_per_pixel = stbi__get8(s); + int tga_comp, tga_rgb16=0; + int tga_inverted = stbi__get8(s); + // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?) + // image data + unsigned char *tga_data; + unsigned char *tga_palette = NULL; + int i, j; + unsigned char raw_data[4] = {0}; + int RLE_count = 0; + int RLE_repeating = 0; + int read_next_pixel = 1; + STBI_NOTUSED(ri); + STBI_NOTUSED(tga_x_origin); // @TODO + STBI_NOTUSED(tga_y_origin); // @TODO + + if (tga_height > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); + if (tga_width > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); + + // do a tiny bit of precessing + if ( tga_image_type >= 8 ) + { + tga_image_type -= 8; + tga_is_RLE = 1; + } + tga_inverted = 1 - ((tga_inverted >> 5) & 1); + + // If I'm paletted, then I'll use the number of bits from the palette + if ( tga_indexed ) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16); + else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16); + + if(!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency + return stbi__errpuc("bad format", "Can't find out TGA pixelformat"); + + // tga info + *x = tga_width; + *y = tga_height; + if (comp) *comp = tga_comp; + + if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0)) + return stbi__errpuc("too large", "Corrupt TGA"); + + tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0); + if (!tga_data) return stbi__errpuc("outofmem", "Out of memory"); + + // skip to the data's starting position (offset usually = 0) + stbi__skip(s, tga_offset ); + + if ( !tga_indexed && !tga_is_RLE && !tga_rgb16 ) { + for (i=0; i < tga_height; ++i) { + int row = tga_inverted ? tga_height -i - 1 : i; + stbi_uc *tga_row = tga_data + row*tga_width*tga_comp; + stbi__getn(s, tga_row, tga_width * tga_comp); + } + } else { + // do I need to load a palette? + if ( tga_indexed) + { + if (tga_palette_len == 0) { /* you have to have at least one entry! */ + STBI_FREE(tga_data); + return stbi__errpuc("bad palette", "Corrupt TGA"); + } + + // any data to skip? (offset usually = 0) + stbi__skip(s, tga_palette_start ); + // load the palette + tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0); + if (!tga_palette) { + STBI_FREE(tga_data); + return stbi__errpuc("outofmem", "Out of memory"); + } + if (tga_rgb16) { + stbi_uc *pal_entry = tga_palette; + STBI_ASSERT(tga_comp == STBI_rgb); + for (i=0; i < tga_palette_len; ++i) { + stbi__tga_read_rgb16(s, pal_entry); + pal_entry += tga_comp; + } + } else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) { + STBI_FREE(tga_data); + STBI_FREE(tga_palette); + return stbi__errpuc("bad palette", "Corrupt TGA"); + } + } + // load the data + for (i=0; i < tga_width * tga_height; ++i) + { + // if I'm in RLE mode, do I need to get a RLE stbi__pngchunk? + if ( tga_is_RLE ) + { + if ( RLE_count == 0 ) + { + // yep, get the next byte as a RLE command + int RLE_cmd = stbi__get8(s); + RLE_count = 1 + (RLE_cmd & 127); + RLE_repeating = RLE_cmd >> 7; + read_next_pixel = 1; + } else if ( !RLE_repeating ) + { + read_next_pixel = 1; + } + } else + { + read_next_pixel = 1; + } + // OK, if I need to read a pixel, do it now + if ( read_next_pixel ) + { + // load however much data we did have + if ( tga_indexed ) + { + // read in index, then perform the lookup + int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s); + if ( pal_idx >= tga_palette_len ) { + // invalid index + pal_idx = 0; + } + pal_idx *= tga_comp; + for (j = 0; j < tga_comp; ++j) { + raw_data[j] = tga_palette[pal_idx+j]; + } + } else if(tga_rgb16) { + STBI_ASSERT(tga_comp == STBI_rgb); + stbi__tga_read_rgb16(s, raw_data); + } else { + // read in the data raw + for (j = 0; j < tga_comp; ++j) { + raw_data[j] = stbi__get8(s); + } + } + // clear the reading flag for the next pixel + read_next_pixel = 0; + } // end of reading a pixel + + // copy data + for (j = 0; j < tga_comp; ++j) + tga_data[i*tga_comp+j] = raw_data[j]; + + // in case we're in RLE mode, keep counting down + --RLE_count; + } + // do I need to invert the image? + if ( tga_inverted ) + { + for (j = 0; j*2 < tga_height; ++j) + { + int index1 = j * tga_width * tga_comp; + int index2 = (tga_height - 1 - j) * tga_width * tga_comp; + for (i = tga_width * tga_comp; i > 0; --i) + { + unsigned char temp = tga_data[index1]; + tga_data[index1] = tga_data[index2]; + tga_data[index2] = temp; + ++index1; + ++index2; + } + } + } + // clear my palette, if I had one + if ( tga_palette != NULL ) + { + STBI_FREE( tga_palette ); + } + } + + // swap RGB - if the source data was RGB16, it already is in the right order + if (tga_comp >= 3 && !tga_rgb16) + { + unsigned char* tga_pixel = tga_data; + for (i=0; i < tga_width * tga_height; ++i) + { + unsigned char temp = tga_pixel[0]; + tga_pixel[0] = tga_pixel[2]; + tga_pixel[2] = temp; + tga_pixel += tga_comp; + } + } + + // convert to target component count + if (req_comp && req_comp != tga_comp) + tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height); + + // the things I do to get rid of an error message, and yet keep + // Microsoft's C compilers happy... [8^( + tga_palette_start = tga_palette_len = tga_palette_bits = + tga_x_origin = tga_y_origin = 0; + STBI_NOTUSED(tga_palette_start); + // OK, done + return tga_data; +} +#endif + +// ************************************************************************************************* +// Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas Schulz, tweaked by STB + +#ifndef STBI_NO_PSD +static int stbi__psd_test(stbi__context *s) +{ + int r = (stbi__get32be(s) == 0x38425053); + stbi__rewind(s); + return r; +} + +static int stbi__psd_decode_rle(stbi__context *s, stbi_uc *p, int pixelCount) +{ + int count, nleft, len; + + count = 0; + while ((nleft = pixelCount - count) > 0) { + len = stbi__get8(s); + if (len == 128) { + // No-op. + } else if (len < 128) { + // Copy next len+1 bytes literally. + len++; + if (len > nleft) return 0; // corrupt data + count += len; + while (len) { + *p = stbi__get8(s); + p += 4; + len--; + } + } else if (len > 128) { + stbi_uc val; + // Next -len+1 bytes in the dest are replicated from next source byte. + // (Interpret len as a negative 8-bit int.) + len = 257 - len; + if (len > nleft) return 0; // corrupt data + val = stbi__get8(s); + count += len; + while (len) { + *p = val; + p += 4; + len--; + } + } + } + + return 1; +} + +static void *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc) +{ + int pixelCount; + int channelCount, compression; + int channel, i; + int bitdepth; + int w,h; + stbi_uc *out; + STBI_NOTUSED(ri); + + // Check identifier + if (stbi__get32be(s) != 0x38425053) // "8BPS" + return stbi__errpuc("not PSD", "Corrupt PSD image"); + + // Check file type version. + if (stbi__get16be(s) != 1) + return stbi__errpuc("wrong version", "Unsupported version of PSD image"); + + // Skip 6 reserved bytes. + stbi__skip(s, 6 ); + + // Read the number of channels (R, G, B, A, etc). + channelCount = stbi__get16be(s); + if (channelCount < 0 || channelCount > 16) + return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image"); + + // Read the rows and columns of the image. + h = stbi__get32be(s); + w = stbi__get32be(s); + + if (h > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); + if (w > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); + + // Make sure the depth is 8 bits. + bitdepth = stbi__get16be(s); + if (bitdepth != 8 && bitdepth != 16) + return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 or 16 bit"); + + // Make sure the color mode is RGB. + // Valid options are: + // 0: Bitmap + // 1: Grayscale + // 2: Indexed color + // 3: RGB color + // 4: CMYK color + // 7: Multichannel + // 8: Duotone + // 9: Lab color + if (stbi__get16be(s) != 3) + return stbi__errpuc("wrong color format", "PSD is not in RGB color format"); + + // Skip the Mode Data. (It's the palette for indexed color; other info for other modes.) + stbi__skip(s,stbi__get32be(s) ); + + // Skip the image resources. (resolution, pen tool paths, etc) + stbi__skip(s, stbi__get32be(s) ); + + // Skip the reserved data. + stbi__skip(s, stbi__get32be(s) ); + + // Find out if the data is compressed. + // Known values: + // 0: no compression + // 1: RLE compressed + compression = stbi__get16be(s); + if (compression > 1) + return stbi__errpuc("bad compression", "PSD has an unknown compression format"); + + // Check size + if (!stbi__mad3sizes_valid(4, w, h, 0)) + return stbi__errpuc("too large", "Corrupt PSD"); + + // Create the destination image. + + if (!compression && bitdepth == 16 && bpc == 16) { + out = (stbi_uc *) stbi__malloc_mad3(8, w, h, 0); + ri->bits_per_channel = 16; + } else + out = (stbi_uc *) stbi__malloc(4 * w*h); + + if (!out) return stbi__errpuc("outofmem", "Out of memory"); + pixelCount = w*h; + + // Initialize the data to zero. + //memset( out, 0, pixelCount * 4 ); + + // Finally, the image data. + if (compression) { + // RLE as used by .PSD and .TIFF + // Loop until you get the number of unpacked bytes you are expecting: + // Read the next source byte into n. + // If n is between 0 and 127 inclusive, copy the next n+1 bytes literally. + // Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times. + // Else if n is 128, noop. + // Endloop + + // The RLE-compressed data is preceded by a 2-byte data count for each row in the data, + // which we're going to just skip. + stbi__skip(s, h * channelCount * 2 ); + + // Read the RLE data by channel. + for (channel = 0; channel < 4; channel++) { + stbi_uc *p; + + p = out+channel; + if (channel >= channelCount) { + // Fill this channel with default data. + for (i = 0; i < pixelCount; i++, p += 4) + *p = (channel == 3 ? 255 : 0); + } else { + // Read the RLE data. + if (!stbi__psd_decode_rle(s, p, pixelCount)) { + STBI_FREE(out); + return stbi__errpuc("corrupt", "bad RLE data"); + } + } + } + + } else { + // We're at the raw image data. It's each channel in order (Red, Green, Blue, Alpha, ...) + // where each channel consists of an 8-bit (or 16-bit) value for each pixel in the image. + + // Read the data by channel. + for (channel = 0; channel < 4; channel++) { + if (channel >= channelCount) { + // Fill this channel with default data. + if (bitdepth == 16 && bpc == 16) { + stbi__uint16 *q = ((stbi__uint16 *) out) + channel; + stbi__uint16 val = channel == 3 ? 65535 : 0; + for (i = 0; i < pixelCount; i++, q += 4) + *q = val; + } else { + stbi_uc *p = out+channel; + stbi_uc val = channel == 3 ? 255 : 0; + for (i = 0; i < pixelCount; i++, p += 4) + *p = val; + } + } else { + if (ri->bits_per_channel == 16) { // output bpc + stbi__uint16 *q = ((stbi__uint16 *) out) + channel; + for (i = 0; i < pixelCount; i++, q += 4) + *q = (stbi__uint16) stbi__get16be(s); + } else { + stbi_uc *p = out+channel; + if (bitdepth == 16) { // input bpc + for (i = 0; i < pixelCount; i++, p += 4) + *p = (stbi_uc) (stbi__get16be(s) >> 8); + } else { + for (i = 0; i < pixelCount; i++, p += 4) + *p = stbi__get8(s); + } + } + } + } + } + + // remove weird white matte from PSD + if (channelCount >= 4) { + if (ri->bits_per_channel == 16) { + for (i=0; i < w*h; ++i) { + stbi__uint16 *pixel = (stbi__uint16 *) out + 4*i; + if (pixel[3] != 0 && pixel[3] != 65535) { + float a = pixel[3] / 65535.0f; + float ra = 1.0f / a; + float inv_a = 65535.0f * (1 - ra); + pixel[0] = (stbi__uint16) (pixel[0]*ra + inv_a); + pixel[1] = (stbi__uint16) (pixel[1]*ra + inv_a); + pixel[2] = (stbi__uint16) (pixel[2]*ra + inv_a); + } + } + } else { + for (i=0; i < w*h; ++i) { + unsigned char *pixel = out + 4*i; + if (pixel[3] != 0 && pixel[3] != 255) { + float a = pixel[3] / 255.0f; + float ra = 1.0f / a; + float inv_a = 255.0f * (1 - ra); + pixel[0] = (unsigned char) (pixel[0]*ra + inv_a); + pixel[1] = (unsigned char) (pixel[1]*ra + inv_a); + pixel[2] = (unsigned char) (pixel[2]*ra + inv_a); + } + } + } + } + + // convert to desired output format + if (req_comp && req_comp != 4) { + if (ri->bits_per_channel == 16) + out = (stbi_uc *) stbi__convert_format16((stbi__uint16 *) out, 4, req_comp, w, h); + else + out = stbi__convert_format(out, 4, req_comp, w, h); + if (out == NULL) return out; // stbi__convert_format frees input on failure + } + + if (comp) *comp = 4; + *y = h; + *x = w; + + return out; +} +#endif + +// ************************************************************************************************* +// Softimage PIC loader +// by Tom Seddon +// +// See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format +// See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ + +#ifndef STBI_NO_PIC +static int stbi__pic_is4(stbi__context *s,const char *str) +{ + int i; + for (i=0; i<4; ++i) + if (stbi__get8(s) != (stbi_uc)str[i]) + return 0; + + return 1; +} + +static int stbi__pic_test_core(stbi__context *s) +{ + int i; + + if (!stbi__pic_is4(s,"\x53\x80\xF6\x34")) + return 0; + + for(i=0;i<84;++i) + stbi__get8(s); + + if (!stbi__pic_is4(s,"PICT")) + return 0; + + return 1; +} + +typedef struct +{ + stbi_uc size,type,channel; +} stbi__pic_packet; + +static stbi_uc *stbi__readval(stbi__context *s, int channel, stbi_uc *dest) +{ + int mask=0x80, i; + + for (i=0; i<4; ++i, mask>>=1) { + if (channel & mask) { + if (stbi__at_eof(s)) return stbi__errpuc("bad file","PIC file too short"); + dest[i]=stbi__get8(s); + } + } + + return dest; +} + +static void stbi__copyval(int channel,stbi_uc *dest,const stbi_uc *src) +{ + int mask=0x80,i; + + for (i=0;i<4; ++i, mask>>=1) + if (channel&mask) + dest[i]=src[i]; +} + +static stbi_uc *stbi__pic_load_core(stbi__context *s,int width,int height,int *comp, stbi_uc *result) +{ + int act_comp=0,num_packets=0,y,chained; + stbi__pic_packet packets[10]; + + // this will (should...) cater for even some bizarre stuff like having data + // for the same channel in multiple packets. + do { + stbi__pic_packet *packet; + + if (num_packets==sizeof(packets)/sizeof(packets[0])) + return stbi__errpuc("bad format","too many packets"); + + packet = &packets[num_packets++]; + + chained = stbi__get8(s); + packet->size = stbi__get8(s); + packet->type = stbi__get8(s); + packet->channel = stbi__get8(s); + + act_comp |= packet->channel; + + if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (reading packets)"); + if (packet->size != 8) return stbi__errpuc("bad format","packet isn't 8bpp"); + } while (chained); + + *comp = (act_comp & 0x10 ? 4 : 3); // has alpha channel? + + for(y=0; ytype) { + default: + return stbi__errpuc("bad format","packet has bad compression type"); + + case 0: {//uncompressed + int x; + + for(x=0;xchannel,dest)) + return 0; + break; + } + + case 1://Pure RLE + { + int left=width, i; + + while (left>0) { + stbi_uc count,value[4]; + + count=stbi__get8(s); + if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (pure read count)"); + + if (count > left) + count = (stbi_uc) left; + + if (!stbi__readval(s,packet->channel,value)) return 0; + + for(i=0; ichannel,dest,value); + left -= count; + } + } + break; + + case 2: {//Mixed RLE + int left=width; + while (left>0) { + int count = stbi__get8(s), i; + if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (mixed read count)"); + + if (count >= 128) { // Repeated + stbi_uc value[4]; + + if (count==128) + count = stbi__get16be(s); + else + count -= 127; + if (count > left) + return stbi__errpuc("bad file","scanline overrun"); + + if (!stbi__readval(s,packet->channel,value)) + return 0; + + for(i=0;ichannel,dest,value); + } else { // Raw + ++count; + if (count>left) return stbi__errpuc("bad file","scanline overrun"); + + for(i=0;ichannel,dest)) + return 0; + } + left-=count; + } + break; + } + } + } + } + + return result; +} + +static void *stbi__pic_load(stbi__context *s,int *px,int *py,int *comp,int req_comp, stbi__result_info *ri) +{ + stbi_uc *result; + int i, x,y, internal_comp; + STBI_NOTUSED(ri); + + if (!comp) comp = &internal_comp; + + for (i=0; i<92; ++i) + stbi__get8(s); + + x = stbi__get16be(s); + y = stbi__get16be(s); + + if (y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); + if (x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); + + if (stbi__at_eof(s)) return stbi__errpuc("bad file","file too short (pic header)"); + if (!stbi__mad3sizes_valid(x, y, 4, 0)) return stbi__errpuc("too large", "PIC image too large to decode"); + + stbi__get32be(s); //skip `ratio' + stbi__get16be(s); //skip `fields' + stbi__get16be(s); //skip `pad' + + // intermediate buffer is RGBA + result = (stbi_uc *) stbi__malloc_mad3(x, y, 4, 0); + if (!result) return stbi__errpuc("outofmem", "Out of memory"); + memset(result, 0xff, x*y*4); + + if (!stbi__pic_load_core(s,x,y,comp, result)) { + STBI_FREE(result); + result=0; + } + *px = x; + *py = y; + if (req_comp == 0) req_comp = *comp; + result=stbi__convert_format(result,4,req_comp,x,y); + + return result; +} + +static int stbi__pic_test(stbi__context *s) +{ + int r = stbi__pic_test_core(s); + stbi__rewind(s); + return r; +} +#endif + +// ************************************************************************************************* +// GIF loader -- public domain by Jean-Marc Lienher -- simplified/shrunk by stb + +#ifndef STBI_NO_GIF +typedef struct +{ + stbi__int16 prefix; + stbi_uc first; + stbi_uc suffix; +} stbi__gif_lzw; + +typedef struct +{ + int w,h; + stbi_uc *out; // output buffer (always 4 components) + stbi_uc *background; // The current "background" as far as a gif is concerned + stbi_uc *history; + int flags, bgindex, ratio, transparent, eflags; + stbi_uc pal[256][4]; + stbi_uc lpal[256][4]; + stbi__gif_lzw codes[8192]; + stbi_uc *color_table; + int parse, step; + int lflags; + int start_x, start_y; + int max_x, max_y; + int cur_x, cur_y; + int line_size; + int delay; +} stbi__gif; + +static int stbi__gif_test_raw(stbi__context *s) +{ + int sz; + if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') return 0; + sz = stbi__get8(s); + if (sz != '9' && sz != '7') return 0; + if (stbi__get8(s) != 'a') return 0; + return 1; +} + +static int stbi__gif_test(stbi__context *s) +{ + int r = stbi__gif_test_raw(s); + stbi__rewind(s); + return r; +} + +static void stbi__gif_parse_colortable(stbi__context *s, stbi_uc pal[256][4], int num_entries, int transp) +{ + int i; + for (i=0; i < num_entries; ++i) { + pal[i][2] = stbi__get8(s); + pal[i][1] = stbi__get8(s); + pal[i][0] = stbi__get8(s); + pal[i][3] = transp == i ? 0 : 255; + } +} + +static int stbi__gif_header(stbi__context *s, stbi__gif *g, int *comp, int is_info) +{ + stbi_uc version; + if (stbi__get8(s) != 'G' || stbi__get8(s) != 'I' || stbi__get8(s) != 'F' || stbi__get8(s) != '8') + return stbi__err("not GIF", "Corrupt GIF"); + + version = stbi__get8(s); + if (version != '7' && version != '9') return stbi__err("not GIF", "Corrupt GIF"); + if (stbi__get8(s) != 'a') return stbi__err("not GIF", "Corrupt GIF"); + + stbi__g_failure_reason = ""; + g->w = stbi__get16le(s); + g->h = stbi__get16le(s); + g->flags = stbi__get8(s); + g->bgindex = stbi__get8(s); + g->ratio = stbi__get8(s); + g->transparent = -1; + + if (g->w > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); + if (g->h > STBI_MAX_DIMENSIONS) return stbi__err("too large","Very large image (corrupt?)"); + + if (comp != 0) *comp = 4; // can't actually tell whether it's 3 or 4 until we parse the comments + + if (is_info) return 1; + + if (g->flags & 0x80) + stbi__gif_parse_colortable(s,g->pal, 2 << (g->flags & 7), -1); + + return 1; +} + +static int stbi__gif_info_raw(stbi__context *s, int *x, int *y, int *comp) +{ + stbi__gif* g = (stbi__gif*) stbi__malloc(sizeof(stbi__gif)); + if (!g) return stbi__err("outofmem", "Out of memory"); + if (!stbi__gif_header(s, g, comp, 1)) { + STBI_FREE(g); + stbi__rewind( s ); + return 0; + } + if (x) *x = g->w; + if (y) *y = g->h; + STBI_FREE(g); + return 1; +} + +static void stbi__out_gif_code(stbi__gif *g, stbi__uint16 code) +{ + stbi_uc *p, *c; + int idx; + + // recurse to decode the prefixes, since the linked-list is backwards, + // and working backwards through an interleaved image would be nasty + if (g->codes[code].prefix >= 0) + stbi__out_gif_code(g, g->codes[code].prefix); + + if (g->cur_y >= g->max_y) return; + + idx = g->cur_x + g->cur_y; + p = &g->out[idx]; + g->history[idx / 4] = 1; + + c = &g->color_table[g->codes[code].suffix * 4]; + if (c[3] > 128) { // don't render transparent pixels; + p[0] = c[2]; + p[1] = c[1]; + p[2] = c[0]; + p[3] = c[3]; + } + g->cur_x += 4; + + if (g->cur_x >= g->max_x) { + g->cur_x = g->start_x; + g->cur_y += g->step; + + while (g->cur_y >= g->max_y && g->parse > 0) { + g->step = (1 << g->parse) * g->line_size; + g->cur_y = g->start_y + (g->step >> 1); + --g->parse; + } + } +} + +static stbi_uc *stbi__process_gif_raster(stbi__context *s, stbi__gif *g) +{ + stbi_uc lzw_cs; + stbi__int32 len, init_code; + stbi__uint32 first; + stbi__int32 codesize, codemask, avail, oldcode, bits, valid_bits, clear; + stbi__gif_lzw *p; + + lzw_cs = stbi__get8(s); + if (lzw_cs > 12) return NULL; + clear = 1 << lzw_cs; + first = 1; + codesize = lzw_cs + 1; + codemask = (1 << codesize) - 1; + bits = 0; + valid_bits = 0; + for (init_code = 0; init_code < clear; init_code++) { + g->codes[init_code].prefix = -1; + g->codes[init_code].first = (stbi_uc) init_code; + g->codes[init_code].suffix = (stbi_uc) init_code; + } + + // support no starting clear code + avail = clear+2; + oldcode = -1; + + len = 0; + for(;;) { + if (valid_bits < codesize) { + if (len == 0) { + len = stbi__get8(s); // start new block + if (len == 0) + return g->out; + } + --len; + bits |= (stbi__int32) stbi__get8(s) << valid_bits; + valid_bits += 8; + } else { + stbi__int32 code = bits & codemask; + bits >>= codesize; + valid_bits -= codesize; + // @OPTIMIZE: is there some way we can accelerate the non-clear path? + if (code == clear) { // clear code + codesize = lzw_cs + 1; + codemask = (1 << codesize) - 1; + avail = clear + 2; + oldcode = -1; + first = 0; + } else if (code == clear + 1) { // end of stream code + stbi__skip(s, len); + while ((len = stbi__get8(s)) > 0) + stbi__skip(s,len); + return g->out; + } else if (code <= avail) { + if (first) { + return stbi__errpuc("no clear code", "Corrupt GIF"); + } + + if (oldcode >= 0) { + p = &g->codes[avail++]; + if (avail > 8192) { + return stbi__errpuc("too many codes", "Corrupt GIF"); + } + + p->prefix = (stbi__int16) oldcode; + p->first = g->codes[oldcode].first; + p->suffix = (code == avail) ? p->first : g->codes[code].first; + } else if (code == avail) + return stbi__errpuc("illegal code in raster", "Corrupt GIF"); + + stbi__out_gif_code(g, (stbi__uint16) code); + + if ((avail & codemask) == 0 && avail <= 0x0FFF) { + codesize++; + codemask = (1 << codesize) - 1; + } + + oldcode = code; + } else { + return stbi__errpuc("illegal code in raster", "Corrupt GIF"); + } + } + } +} + +// this function is designed to support animated gifs, although stb_image doesn't support it +// two back is the image from two frames ago, used for a very specific disposal format +static stbi_uc *stbi__gif_load_next(stbi__context *s, stbi__gif *g, int *comp, int req_comp, stbi_uc *two_back) +{ + int dispose; + int first_frame; + int pi; + int pcount; + STBI_NOTUSED(req_comp); + + // on first frame, any non-written pixels get the background colour (non-transparent) + first_frame = 0; + if (g->out == 0) { + if (!stbi__gif_header(s, g, comp,0)) return 0; // stbi__g_failure_reason set by stbi__gif_header + if (!stbi__mad3sizes_valid(4, g->w, g->h, 0)) + return stbi__errpuc("too large", "GIF image is too large"); + pcount = g->w * g->h; + g->out = (stbi_uc *) stbi__malloc(4 * pcount); + g->background = (stbi_uc *) stbi__malloc(4 * pcount); + g->history = (stbi_uc *) stbi__malloc(pcount); + if (!g->out || !g->background || !g->history) + return stbi__errpuc("outofmem", "Out of memory"); + + // image is treated as "transparent" at the start - ie, nothing overwrites the current background; + // background colour is only used for pixels that are not rendered first frame, after that "background" + // color refers to the color that was there the previous frame. + memset(g->out, 0x00, 4 * pcount); + memset(g->background, 0x00, 4 * pcount); // state of the background (starts transparent) + memset(g->history, 0x00, pcount); // pixels that were affected previous frame + first_frame = 1; + } else { + // second frame - how do we dispose of the previous one? + dispose = (g->eflags & 0x1C) >> 2; + pcount = g->w * g->h; + + if ((dispose == 3) && (two_back == 0)) { + dispose = 2; // if I don't have an image to revert back to, default to the old background + } + + if (dispose == 3) { // use previous graphic + for (pi = 0; pi < pcount; ++pi) { + if (g->history[pi]) { + memcpy( &g->out[pi * 4], &two_back[pi * 4], 4 ); + } + } + } else if (dispose == 2) { + // restore what was changed last frame to background before that frame; + for (pi = 0; pi < pcount; ++pi) { + if (g->history[pi]) { + memcpy( &g->out[pi * 4], &g->background[pi * 4], 4 ); + } + } + } else { + // This is a non-disposal case eithe way, so just + // leave the pixels as is, and they will become the new background + // 1: do not dispose + // 0: not specified. + } + + // background is what out is after the undoing of the previou frame; + memcpy( g->background, g->out, 4 * g->w * g->h ); + } + + // clear my history; + memset( g->history, 0x00, g->w * g->h ); // pixels that were affected previous frame + + for (;;) { + int tag = stbi__get8(s); + switch (tag) { + case 0x2C: /* Image Descriptor */ + { + stbi__int32 x, y, w, h; + stbi_uc *o; + + x = stbi__get16le(s); + y = stbi__get16le(s); + w = stbi__get16le(s); + h = stbi__get16le(s); + if (((x + w) > (g->w)) || ((y + h) > (g->h))) + return stbi__errpuc("bad Image Descriptor", "Corrupt GIF"); + + g->line_size = g->w * 4; + g->start_x = x * 4; + g->start_y = y * g->line_size; + g->max_x = g->start_x + w * 4; + g->max_y = g->start_y + h * g->line_size; + g->cur_x = g->start_x; + g->cur_y = g->start_y; + + // if the width of the specified rectangle is 0, that means + // we may not see *any* pixels or the image is malformed; + // to make sure this is caught, move the current y down to + // max_y (which is what out_gif_code checks). + if (w == 0) + g->cur_y = g->max_y; + + g->lflags = stbi__get8(s); + + if (g->lflags & 0x40) { + g->step = 8 * g->line_size; // first interlaced spacing + g->parse = 3; + } else { + g->step = g->line_size; + g->parse = 0; + } + + if (g->lflags & 0x80) { + stbi__gif_parse_colortable(s,g->lpal, 2 << (g->lflags & 7), g->eflags & 0x01 ? g->transparent : -1); + g->color_table = (stbi_uc *) g->lpal; + } else if (g->flags & 0x80) { + g->color_table = (stbi_uc *) g->pal; + } else + return stbi__errpuc("missing color table", "Corrupt GIF"); + + o = stbi__process_gif_raster(s, g); + if (!o) return NULL; + + // if this was the first frame, + pcount = g->w * g->h; + if (first_frame && (g->bgindex > 0)) { + // if first frame, any pixel not drawn to gets the background color + for (pi = 0; pi < pcount; ++pi) { + if (g->history[pi] == 0) { + g->pal[g->bgindex][3] = 255; // just in case it was made transparent, undo that; It will be reset next frame if need be; + memcpy( &g->out[pi * 4], &g->pal[g->bgindex], 4 ); + } + } + } + + return o; + } + + case 0x21: // Comment Extension. + { + int len; + int ext = stbi__get8(s); + if (ext == 0xF9) { // Graphic Control Extension. + len = stbi__get8(s); + if (len == 4) { + g->eflags = stbi__get8(s); + g->delay = 10 * stbi__get16le(s); // delay - 1/100th of a second, saving as 1/1000ths. + + // unset old transparent + if (g->transparent >= 0) { + g->pal[g->transparent][3] = 255; + } + if (g->eflags & 0x01) { + g->transparent = stbi__get8(s); + if (g->transparent >= 0) { + g->pal[g->transparent][3] = 0; + } + } else { + // don't need transparent + stbi__skip(s, 1); + g->transparent = -1; + } + } else { + stbi__skip(s, len); + break; + } + } + while ((len = stbi__get8(s)) != 0) { + stbi__skip(s, len); + } + break; + } + + case 0x3B: // gif stream termination code + return (stbi_uc *) s; // using '1' causes warning on some compilers + + default: + return stbi__errpuc("unknown code", "Corrupt GIF"); + } + } +} + +static void *stbi__load_gif_main_outofmem(stbi__gif *g, stbi_uc *out, int **delays) +{ + STBI_FREE(g->out); + STBI_FREE(g->history); + STBI_FREE(g->background); + + if (out) STBI_FREE(out); + if (delays && *delays) STBI_FREE(*delays); + return stbi__errpuc("outofmem", "Out of memory"); +} + +static void *stbi__load_gif_main(stbi__context *s, int **delays, int *x, int *y, int *z, int *comp, int req_comp) +{ + if (stbi__gif_test(s)) { + int layers = 0; + stbi_uc *u = 0; + stbi_uc *out = 0; + stbi_uc *two_back = 0; + stbi__gif g; + int stride; + int out_size = 0; + int delays_size = 0; + + STBI_NOTUSED(out_size); + STBI_NOTUSED(delays_size); + + memset(&g, 0, sizeof(g)); + if (delays) { + *delays = 0; + } + + do { + u = stbi__gif_load_next(s, &g, comp, req_comp, two_back); + if (u == (stbi_uc *) s) u = 0; // end of animated gif marker + + if (u) { + *x = g.w; + *y = g.h; + ++layers; + stride = g.w * g.h * 4; + + if (out) { + void *tmp = (stbi_uc*) STBI_REALLOC_SIZED( out, out_size, layers * stride ); + if (!tmp) + return stbi__load_gif_main_outofmem(&g, out, delays); + else { + out = (stbi_uc*) tmp; + out_size = layers * stride; + } + + if (delays) { + int *new_delays = (int*) STBI_REALLOC_SIZED( *delays, delays_size, sizeof(int) * layers ); + if (!new_delays) + return stbi__load_gif_main_outofmem(&g, out, delays); + *delays = new_delays; + delays_size = layers * sizeof(int); + } + } else { + out = (stbi_uc*)stbi__malloc( layers * stride ); + if (!out) + return stbi__load_gif_main_outofmem(&g, out, delays); + out_size = layers * stride; + if (delays) { + *delays = (int*) stbi__malloc( layers * sizeof(int) ); + if (!*delays) + return stbi__load_gif_main_outofmem(&g, out, delays); + delays_size = layers * sizeof(int); + } + } + memcpy( out + ((layers - 1) * stride), u, stride ); + if (layers >= 2) { + two_back = out - 2 * stride; + } + + if (delays) { + (*delays)[layers - 1U] = g.delay; + } + } + } while (u != 0); + + // free temp buffer; + STBI_FREE(g.out); + STBI_FREE(g.history); + STBI_FREE(g.background); + + // do the final conversion after loading everything; + if (req_comp && req_comp != 4) + out = stbi__convert_format(out, 4, req_comp, layers * g.w, g.h); + + *z = layers; + return out; + } else { + return stbi__errpuc("not GIF", "Image was not as a gif type."); + } +} + +static void *stbi__gif_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) +{ + stbi_uc *u = 0; + stbi__gif g; + memset(&g, 0, sizeof(g)); + STBI_NOTUSED(ri); + + u = stbi__gif_load_next(s, &g, comp, req_comp, 0); + if (u == (stbi_uc *) s) u = 0; // end of animated gif marker + if (u) { + *x = g.w; + *y = g.h; + + // moved conversion to after successful load so that the same + // can be done for multiple frames. + if (req_comp && req_comp != 4) + u = stbi__convert_format(u, 4, req_comp, g.w, g.h); + } else if (g.out) { + // if there was an error and we allocated an image buffer, free it! + STBI_FREE(g.out); + } + + // free buffers needed for multiple frame loading; + STBI_FREE(g.history); + STBI_FREE(g.background); + + return u; +} + +static int stbi__gif_info(stbi__context *s, int *x, int *y, int *comp) +{ + return stbi__gif_info_raw(s,x,y,comp); +} +#endif + +// ************************************************************************************************* +// Radiance RGBE HDR loader +// originally by Nicolas Schulz +#ifndef STBI_NO_HDR +static int stbi__hdr_test_core(stbi__context *s, const char *signature) +{ + int i; + for (i=0; signature[i]; ++i) + if (stbi__get8(s) != signature[i]) + return 0; + stbi__rewind(s); + return 1; +} + +static int stbi__hdr_test(stbi__context* s) +{ + int r = stbi__hdr_test_core(s, "#?RADIANCE\n"); + stbi__rewind(s); + if(!r) { + r = stbi__hdr_test_core(s, "#?RGBE\n"); + stbi__rewind(s); + } + return r; +} + +#define STBI__HDR_BUFLEN 1024 +static char *stbi__hdr_gettoken(stbi__context *z, char *buffer) +{ + int len=0; + char c = '\0'; + + c = (char) stbi__get8(z); + + while (!stbi__at_eof(z) && c != '\n') { + buffer[len++] = c; + if (len == STBI__HDR_BUFLEN-1) { + // flush to end of line + while (!stbi__at_eof(z) && stbi__get8(z) != '\n') + ; + break; + } + c = (char) stbi__get8(z); + } + + buffer[len] = 0; + return buffer; +} + +static void stbi__hdr_convert(float *output, stbi_uc *input, int req_comp) +{ + if ( input[3] != 0 ) { + float f1; + // Exponent + f1 = (float) ldexp(1.0f, input[3] - (int)(128 + 8)); + if (req_comp <= 2) + output[0] = (input[0] + input[1] + input[2]) * f1 / 3; + else { + output[0] = input[0] * f1; + output[1] = input[1] * f1; + output[2] = input[2] * f1; + } + if (req_comp == 2) output[1] = 1; + if (req_comp == 4) output[3] = 1; + } else { + switch (req_comp) { + case 4: output[3] = 1; /* fallthrough */ + case 3: output[0] = output[1] = output[2] = 0; + break; + case 2: output[1] = 1; /* fallthrough */ + case 1: output[0] = 0; + break; + } + } +} + +static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) +{ + char buffer[STBI__HDR_BUFLEN]; + char *token; + int valid = 0; + int width, height; + stbi_uc *scanline; + float *hdr_data; + int len; + unsigned char count, value; + int i, j, k, c1,c2, z; + const char *headerToken; + STBI_NOTUSED(ri); + + // Check identifier + headerToken = stbi__hdr_gettoken(s,buffer); + if (strcmp(headerToken, "#?RADIANCE") != 0 && strcmp(headerToken, "#?RGBE") != 0) + return stbi__errpf("not HDR", "Corrupt HDR image"); + + // Parse header + for(;;) { + token = stbi__hdr_gettoken(s,buffer); + if (token[0] == 0) break; + if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; + } + + if (!valid) return stbi__errpf("unsupported format", "Unsupported HDR format"); + + // Parse width and height + // can't use sscanf() if we're not using stdio! + token = stbi__hdr_gettoken(s,buffer); + if (strncmp(token, "-Y ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); + token += 3; + height = (int) strtol(token, &token, 10); + while (*token == ' ') ++token; + if (strncmp(token, "+X ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); + token += 3; + width = (int) strtol(token, NULL, 10); + + if (height > STBI_MAX_DIMENSIONS) return stbi__errpf("too large","Very large image (corrupt?)"); + if (width > STBI_MAX_DIMENSIONS) return stbi__errpf("too large","Very large image (corrupt?)"); + + *x = width; + *y = height; + + if (comp) *comp = 3; + if (req_comp == 0) req_comp = 3; + + if (!stbi__mad4sizes_valid(width, height, req_comp, sizeof(float), 0)) + return stbi__errpf("too large", "HDR image is too large"); + + // Read data + hdr_data = (float *) stbi__malloc_mad4(width, height, req_comp, sizeof(float), 0); + if (!hdr_data) + return stbi__errpf("outofmem", "Out of memory"); + + // Load image data + // image data is stored as some number of sca + if ( width < 8 || width >= 32768) { + // Read flat data + for (j=0; j < height; ++j) { + for (i=0; i < width; ++i) { + stbi_uc rgbe[4]; + main_decode_loop: + stbi__getn(s, rgbe, 4); + stbi__hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp); + } + } + } else { + // Read RLE-encoded data + scanline = NULL; + + for (j = 0; j < height; ++j) { + c1 = stbi__get8(s); + c2 = stbi__get8(s); + len = stbi__get8(s); + if (c1 != 2 || c2 != 2 || (len & 0x80)) { + // not run-length encoded, so we have to actually use THIS data as a decoded + // pixel (note this can't be a valid pixel--one of RGB must be >= 128) + stbi_uc rgbe[4]; + rgbe[0] = (stbi_uc) c1; + rgbe[1] = (stbi_uc) c2; + rgbe[2] = (stbi_uc) len; + rgbe[3] = (stbi_uc) stbi__get8(s); + stbi__hdr_convert(hdr_data, rgbe, req_comp); + i = 1; + j = 0; + STBI_FREE(scanline); + goto main_decode_loop; // yes, this makes no sense + } + len <<= 8; + len |= stbi__get8(s); + if (len != width) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("invalid decoded scanline length", "corrupt HDR"); } + if (scanline == NULL) { + scanline = (stbi_uc *) stbi__malloc_mad2(width, 4, 0); + if (!scanline) { + STBI_FREE(hdr_data); + return stbi__errpf("outofmem", "Out of memory"); + } + } + + for (k = 0; k < 4; ++k) { + int nleft; + i = 0; + while ((nleft = width - i) > 0) { + count = stbi__get8(s); + if (count > 128) { + // Run + value = stbi__get8(s); + count -= 128; + if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } + for (z = 0; z < count; ++z) + scanline[i++ * 4 + k] = value; + } else { + // Dump + if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } + for (z = 0; z < count; ++z) + scanline[i++ * 4 + k] = stbi__get8(s); + } + } + } + for (i=0; i < width; ++i) + stbi__hdr_convert(hdr_data+(j*width + i)*req_comp, scanline + i*4, req_comp); + } + if (scanline) + STBI_FREE(scanline); + } + + return hdr_data; +} + +static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp) +{ + char buffer[STBI__HDR_BUFLEN]; + char *token; + int valid = 0; + int dummy; + + if (!x) x = &dummy; + if (!y) y = &dummy; + if (!comp) comp = &dummy; + + if (stbi__hdr_test(s) == 0) { + stbi__rewind( s ); + return 0; + } + + for(;;) { + token = stbi__hdr_gettoken(s,buffer); + if (token[0] == 0) break; + if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; + } + + if (!valid) { + stbi__rewind( s ); + return 0; + } + token = stbi__hdr_gettoken(s,buffer); + if (strncmp(token, "-Y ", 3)) { + stbi__rewind( s ); + return 0; + } + token += 3; + *y = (int) strtol(token, &token, 10); + while (*token == ' ') ++token; + if (strncmp(token, "+X ", 3)) { + stbi__rewind( s ); + return 0; + } + token += 3; + *x = (int) strtol(token, NULL, 10); + *comp = 3; + return 1; +} +#endif // STBI_NO_HDR + +#ifndef STBI_NO_BMP +static int stbi__bmp_info(stbi__context *s, int *x, int *y, int *comp) +{ + void *p; + stbi__bmp_data info; + + info.all_a = 255; + p = stbi__bmp_parse_header(s, &info); + if (p == NULL) { + stbi__rewind( s ); + return 0; + } + if (x) *x = s->img_x; + if (y) *y = s->img_y; + if (comp) { + if (info.bpp == 24 && info.ma == 0xff000000) + *comp = 3; + else + *comp = info.ma ? 4 : 3; + } + return 1; +} +#endif + +#ifndef STBI_NO_PSD +static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp) +{ + int channelCount, dummy, depth; + if (!x) x = &dummy; + if (!y) y = &dummy; + if (!comp) comp = &dummy; + if (stbi__get32be(s) != 0x38425053) { + stbi__rewind( s ); + return 0; + } + if (stbi__get16be(s) != 1) { + stbi__rewind( s ); + return 0; + } + stbi__skip(s, 6); + channelCount = stbi__get16be(s); + if (channelCount < 0 || channelCount > 16) { + stbi__rewind( s ); + return 0; + } + *y = stbi__get32be(s); + *x = stbi__get32be(s); + depth = stbi__get16be(s); + if (depth != 8 && depth != 16) { + stbi__rewind( s ); + return 0; + } + if (stbi__get16be(s) != 3) { + stbi__rewind( s ); + return 0; + } + *comp = 4; + return 1; +} + +static int stbi__psd_is16(stbi__context *s) +{ + int channelCount, depth; + if (stbi__get32be(s) != 0x38425053) { + stbi__rewind( s ); + return 0; + } + if (stbi__get16be(s) != 1) { + stbi__rewind( s ); + return 0; + } + stbi__skip(s, 6); + channelCount = stbi__get16be(s); + if (channelCount < 0 || channelCount > 16) { + stbi__rewind( s ); + return 0; + } + STBI_NOTUSED(stbi__get32be(s)); + STBI_NOTUSED(stbi__get32be(s)); + depth = stbi__get16be(s); + if (depth != 16) { + stbi__rewind( s ); + return 0; + } + return 1; +} +#endif + +#ifndef STBI_NO_PIC +static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp) +{ + int act_comp=0,num_packets=0,chained,dummy; + stbi__pic_packet packets[10]; + + if (!x) x = &dummy; + if (!y) y = &dummy; + if (!comp) comp = &dummy; + + if (!stbi__pic_is4(s,"\x53\x80\xF6\x34")) { + stbi__rewind(s); + return 0; + } + + stbi__skip(s, 88); + + *x = stbi__get16be(s); + *y = stbi__get16be(s); + if (stbi__at_eof(s)) { + stbi__rewind( s); + return 0; + } + if ( (*x) != 0 && (1 << 28) / (*x) < (*y)) { + stbi__rewind( s ); + return 0; + } + + stbi__skip(s, 8); + + do { + stbi__pic_packet *packet; + + if (num_packets==sizeof(packets)/sizeof(packets[0])) + return 0; + + packet = &packets[num_packets++]; + chained = stbi__get8(s); + packet->size = stbi__get8(s); + packet->type = stbi__get8(s); + packet->channel = stbi__get8(s); + act_comp |= packet->channel; + + if (stbi__at_eof(s)) { + stbi__rewind( s ); + return 0; + } + if (packet->size != 8) { + stbi__rewind( s ); + return 0; + } + } while (chained); + + *comp = (act_comp & 0x10 ? 4 : 3); + + return 1; +} +#endif + +// ************************************************************************************************* +// Portable Gray Map and Portable Pixel Map loader +// by Ken Miller +// +// PGM: http://netpbm.sourceforge.net/doc/pgm.html +// PPM: http://netpbm.sourceforge.net/doc/ppm.html +// +// Known limitations: +// Does not support comments in the header section +// Does not support ASCII image data (formats P2 and P3) + +#ifndef STBI_NO_PNM + +static int stbi__pnm_test(stbi__context *s) +{ + char p, t; + p = (char) stbi__get8(s); + t = (char) stbi__get8(s); + if (p != 'P' || (t != '5' && t != '6')) { + stbi__rewind( s ); + return 0; + } + return 1; +} + +static void *stbi__pnm_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) +{ + stbi_uc *out; + STBI_NOTUSED(ri); + + ri->bits_per_channel = stbi__pnm_info(s, (int *)&s->img_x, (int *)&s->img_y, (int *)&s->img_n); + if (ri->bits_per_channel == 0) + return 0; + + if (s->img_y > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); + if (s->img_x > STBI_MAX_DIMENSIONS) return stbi__errpuc("too large","Very large image (corrupt?)"); + + *x = s->img_x; + *y = s->img_y; + if (comp) *comp = s->img_n; + + if (!stbi__mad4sizes_valid(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0)) + return stbi__errpuc("too large", "PNM too large"); + + out = (stbi_uc *) stbi__malloc_mad4(s->img_n, s->img_x, s->img_y, ri->bits_per_channel / 8, 0); + if (!out) return stbi__errpuc("outofmem", "Out of memory"); + if (!stbi__getn(s, out, s->img_n * s->img_x * s->img_y * (ri->bits_per_channel / 8))) { + STBI_FREE(out); + return stbi__errpuc("bad PNM", "PNM file truncated"); + } + + if (req_comp && req_comp != s->img_n) { + if (ri->bits_per_channel == 16) { + out = (stbi_uc *) stbi__convert_format16((stbi__uint16 *) out, s->img_n, req_comp, s->img_x, s->img_y); + } else { + out = stbi__convert_format(out, s->img_n, req_comp, s->img_x, s->img_y); + } + if (out == NULL) return out; // stbi__convert_format frees input on failure + } + return out; +} + +static int stbi__pnm_isspace(char c) +{ + return c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\f' || c == '\r'; +} + +static void stbi__pnm_skip_whitespace(stbi__context *s, char *c) +{ + for (;;) { + while (!stbi__at_eof(s) && stbi__pnm_isspace(*c)) + *c = (char) stbi__get8(s); + + if (stbi__at_eof(s) || *c != '#') + break; + + while (!stbi__at_eof(s) && *c != '\n' && *c != '\r' ) + *c = (char) stbi__get8(s); + } +} + +static int stbi__pnm_isdigit(char c) +{ + return c >= '0' && c <= '9'; +} + +static int stbi__pnm_getinteger(stbi__context *s, char *c) +{ + int value = 0; + + while (!stbi__at_eof(s) && stbi__pnm_isdigit(*c)) { + value = value*10 + (*c - '0'); + *c = (char) stbi__get8(s); + if((value > 214748364) || (value == 214748364 && *c > '7')) + return stbi__err("integer parse overflow", "Parsing an integer in the PPM header overflowed a 32-bit int"); + } + + return value; +} + +static int stbi__pnm_info(stbi__context *s, int *x, int *y, int *comp) +{ + int maxv, dummy; + char c, p, t; + + if (!x) x = &dummy; + if (!y) y = &dummy; + if (!comp) comp = &dummy; + + stbi__rewind(s); + + // Get identifier + p = (char) stbi__get8(s); + t = (char) stbi__get8(s); + if (p != 'P' || (t != '5' && t != '6')) { + stbi__rewind(s); + return 0; + } + + *comp = (t == '6') ? 3 : 1; // '5' is 1-component .pgm; '6' is 3-component .ppm + + c = (char) stbi__get8(s); + stbi__pnm_skip_whitespace(s, &c); + + *x = stbi__pnm_getinteger(s, &c); // read width + if(*x == 0) + return stbi__err("invalid width", "PPM image header had zero or overflowing width"); + stbi__pnm_skip_whitespace(s, &c); + + *y = stbi__pnm_getinteger(s, &c); // read height + if (*y == 0) + return stbi__err("invalid width", "PPM image header had zero or overflowing width"); + stbi__pnm_skip_whitespace(s, &c); + + maxv = stbi__pnm_getinteger(s, &c); // read max value + if (maxv > 65535) + return stbi__err("max value > 65535", "PPM image supports only 8-bit and 16-bit images"); + else if (maxv > 255) + return 16; + else + return 8; +} + +static int stbi__pnm_is16(stbi__context *s) +{ + if (stbi__pnm_info(s, NULL, NULL, NULL) == 16) + return 1; + return 0; +} +#endif + +static int stbi__info_main(stbi__context *s, int *x, int *y, int *comp) +{ + #ifndef STBI_NO_JPEG + if (stbi__jpeg_info(s, x, y, comp)) return 1; + #endif + + #ifndef STBI_NO_PNG + if (stbi__png_info(s, x, y, comp)) return 1; + #endif + + #ifndef STBI_NO_GIF + if (stbi__gif_info(s, x, y, comp)) return 1; + #endif + + #ifndef STBI_NO_BMP + if (stbi__bmp_info(s, x, y, comp)) return 1; + #endif + + #ifndef STBI_NO_PSD + if (stbi__psd_info(s, x, y, comp)) return 1; + #endif + + #ifndef STBI_NO_PIC + if (stbi__pic_info(s, x, y, comp)) return 1; + #endif + + #ifndef STBI_NO_PNM + if (stbi__pnm_info(s, x, y, comp)) return 1; + #endif + + #ifndef STBI_NO_HDR + if (stbi__hdr_info(s, x, y, comp)) return 1; + #endif + + // test tga last because it's a crappy test! + #ifndef STBI_NO_TGA + if (stbi__tga_info(s, x, y, comp)) + return 1; + #endif + return stbi__err("unknown image type", "Image not of any known type, or corrupt"); +} + +static int stbi__is_16_main(stbi__context *s) +{ + #ifndef STBI_NO_PNG + if (stbi__png_is16(s)) return 1; + #endif + + #ifndef STBI_NO_PSD + if (stbi__psd_is16(s)) return 1; + #endif + + #ifndef STBI_NO_PNM + if (stbi__pnm_is16(s)) return 1; + #endif + return 0; +} + +#ifndef STBI_NO_STDIO +STBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp) +{ + FILE *f = stbi__fopen(filename, "rb"); + int result; + if (!f) return stbi__err("can't fopen", "Unable to open file"); + result = stbi_info_from_file(f, x, y, comp); + fclose(f); + return result; +} + +STBIDEF int stbi_info_from_file(FILE *f, int *x, int *y, int *comp) +{ + int r; + stbi__context s; + long pos = ftell(f); + stbi__start_file(&s, f); + r = stbi__info_main(&s,x,y,comp); + fseek(f,pos,SEEK_SET); + return r; +} + +STBIDEF int stbi_is_16_bit(char const *filename) +{ + FILE *f = stbi__fopen(filename, "rb"); + int result; + if (!f) return stbi__err("can't fopen", "Unable to open file"); + result = stbi_is_16_bit_from_file(f); + fclose(f); + return result; +} + +STBIDEF int stbi_is_16_bit_from_file(FILE *f) +{ + int r; + stbi__context s; + long pos = ftell(f); + stbi__start_file(&s, f); + r = stbi__is_16_main(&s); + fseek(f,pos,SEEK_SET); + return r; +} +#endif // !STBI_NO_STDIO + +STBIDEF int stbi_info_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp) +{ + stbi__context s; + stbi__start_mem(&s,buffer,len); + return stbi__info_main(&s,x,y,comp); +} + +STBIDEF int stbi_info_from_callbacks(stbi_io_callbacks const *c, void *user, int *x, int *y, int *comp) +{ + stbi__context s; + stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user); + return stbi__info_main(&s,x,y,comp); +} + +STBIDEF int stbi_is_16_bit_from_memory(stbi_uc const *buffer, int len) +{ + stbi__context s; + stbi__start_mem(&s,buffer,len); + return stbi__is_16_main(&s); +} + +STBIDEF int stbi_is_16_bit_from_callbacks(stbi_io_callbacks const *c, void *user) +{ + stbi__context s; + stbi__start_callbacks(&s, (stbi_io_callbacks *) c, user); + return stbi__is_16_main(&s); +} + +#endif // STB_IMAGE_IMPLEMENTATION + +/* + revision history: + 2.20 (2019-02-07) support utf8 filenames in Windows; fix warnings and platform ifdefs + 2.19 (2018-02-11) fix warning + 2.18 (2018-01-30) fix warnings + 2.17 (2018-01-29) change sbti__shiftsigned to avoid clang -O2 bug + 1-bit BMP + *_is_16_bit api + avoid warnings + 2.16 (2017-07-23) all functions have 16-bit variants; + STBI_NO_STDIO works again; + compilation fixes; + fix rounding in unpremultiply; + optimize vertical flip; + disable raw_len validation; + documentation fixes + 2.15 (2017-03-18) fix png-1,2,4 bug; now all Imagenet JPGs decode; + warning fixes; disable run-time SSE detection on gcc; + uniform handling of optional "return" values; + thread-safe initialization of zlib tables + 2.14 (2017-03-03) remove deprecated STBI_JPEG_OLD; fixes for Imagenet JPGs + 2.13 (2016-11-29) add 16-bit API, only supported for PNG right now + 2.12 (2016-04-02) fix typo in 2.11 PSD fix that caused crashes + 2.11 (2016-04-02) allocate large structures on the stack + remove white matting for transparent PSD + fix reported channel count for PNG & BMP + re-enable SSE2 in non-gcc 64-bit + support RGB-formatted JPEG + read 16-bit PNGs (only as 8-bit) + 2.10 (2016-01-22) avoid warning introduced in 2.09 by STBI_REALLOC_SIZED + 2.09 (2016-01-16) allow comments in PNM files + 16-bit-per-pixel TGA (not bit-per-component) + info() for TGA could break due to .hdr handling + info() for BMP to shares code instead of sloppy parse + can use STBI_REALLOC_SIZED if allocator doesn't support realloc + code cleanup + 2.08 (2015-09-13) fix to 2.07 cleanup, reading RGB PSD as RGBA + 2.07 (2015-09-13) fix compiler warnings + partial animated GIF support + limited 16-bpc PSD support + #ifdef unused functions + bug with < 92 byte PIC,PNM,HDR,TGA + 2.06 (2015-04-19) fix bug where PSD returns wrong '*comp' value + 2.05 (2015-04-19) fix bug in progressive JPEG handling, fix warning + 2.04 (2015-04-15) try to re-enable SIMD on MinGW 64-bit + 2.03 (2015-04-12) extra corruption checking (mmozeiko) + stbi_set_flip_vertically_on_load (nguillemot) + fix NEON support; fix mingw support + 2.02 (2015-01-19) fix incorrect assert, fix warning + 2.01 (2015-01-17) fix various warnings; suppress SIMD on gcc 32-bit without -msse2 + 2.00b (2014-12-25) fix STBI_MALLOC in progressive JPEG + 2.00 (2014-12-25) optimize JPG, including x86 SSE2 & NEON SIMD (ryg) + progressive JPEG (stb) + PGM/PPM support (Ken Miller) + STBI_MALLOC,STBI_REALLOC,STBI_FREE + GIF bugfix -- seemingly never worked + STBI_NO_*, STBI_ONLY_* + 1.48 (2014-12-14) fix incorrectly-named assert() + 1.47 (2014-12-14) 1/2/4-bit PNG support, both direct and paletted (Omar Cornut & stb) + optimize PNG (ryg) + fix bug in interlaced PNG with user-specified channel count (stb) + 1.46 (2014-08-26) + fix broken tRNS chunk (colorkey-style transparency) in non-paletted PNG + 1.45 (2014-08-16) + fix MSVC-ARM internal compiler error by wrapping malloc + 1.44 (2014-08-07) + various warning fixes from Ronny Chevalier + 1.43 (2014-07-15) + fix MSVC-only compiler problem in code changed in 1.42 + 1.42 (2014-07-09) + don't define _CRT_SECURE_NO_WARNINGS (affects user code) + fixes to stbi__cleanup_jpeg path + added STBI_ASSERT to avoid requiring assert.h + 1.41 (2014-06-25) + fix search&replace from 1.36 that messed up comments/error messages + 1.40 (2014-06-22) + fix gcc struct-initialization warning + 1.39 (2014-06-15) + fix to TGA optimization when req_comp != number of components in TGA; + fix to GIF loading because BMP wasn't rewinding (whoops, no GIFs in my test suite) + add support for BMP version 5 (more ignored fields) + 1.38 (2014-06-06) + suppress MSVC warnings on integer casts truncating values + fix accidental rename of 'skip' field of I/O + 1.37 (2014-06-04) + remove duplicate typedef + 1.36 (2014-06-03) + convert to header file single-file library + if de-iphone isn't set, load iphone images color-swapped instead of returning NULL + 1.35 (2014-05-27) + various warnings + fix broken STBI_SIMD path + fix bug where stbi_load_from_file no longer left file pointer in correct place + fix broken non-easy path for 32-bit BMP (possibly never used) + TGA optimization by Arseny Kapoulkine + 1.34 (unknown) + use STBI_NOTUSED in stbi__resample_row_generic(), fix one more leak in tga failure case + 1.33 (2011-07-14) + make stbi_is_hdr work in STBI_NO_HDR (as specified), minor compiler-friendly improvements + 1.32 (2011-07-13) + support for "info" function for all supported filetypes (SpartanJ) + 1.31 (2011-06-20) + a few more leak fixes, bug in PNG handling (SpartanJ) + 1.30 (2011-06-11) + added ability to load files via callbacks to accomidate custom input streams (Ben Wenger) + removed deprecated format-specific test/load functions + removed support for installable file formats (stbi_loader) -- would have been broken for IO callbacks anyway + error cases in bmp and tga give messages and don't leak (Raymond Barbiero, grisha) + fix inefficiency in decoding 32-bit BMP (David Woo) + 1.29 (2010-08-16) + various warning fixes from Aurelien Pocheville + 1.28 (2010-08-01) + fix bug in GIF palette transparency (SpartanJ) + 1.27 (2010-08-01) + cast-to-stbi_uc to fix warnings + 1.26 (2010-07-24) + fix bug in file buffering for PNG reported by SpartanJ + 1.25 (2010-07-17) + refix trans_data warning (Won Chun) + 1.24 (2010-07-12) + perf improvements reading from files on platforms with lock-heavy fgetc() + minor perf improvements for jpeg + deprecated type-specific functions so we'll get feedback if they're needed + attempt to fix trans_data warning (Won Chun) + 1.23 fixed bug in iPhone support + 1.22 (2010-07-10) + removed image *writing* support + stbi_info support from Jetro Lauha + GIF support from Jean-Marc Lienher + iPhone PNG-extensions from James Brown + warning-fixes from Nicolas Schulz and Janez Zemva (i.stbi__err. Janez (U+017D)emva) + 1.21 fix use of 'stbi_uc' in header (reported by jon blow) + 1.20 added support for Softimage PIC, by Tom Seddon + 1.19 bug in interlaced PNG corruption check (found by ryg) + 1.18 (2008-08-02) + fix a threading bug (local mutable static) + 1.17 support interlaced PNG + 1.16 major bugfix - stbi__convert_format converted one too many pixels + 1.15 initialize some fields for thread safety + 1.14 fix threadsafe conversion bug + header-file-only version (#define STBI_HEADER_FILE_ONLY before including) + 1.13 threadsafe + 1.12 const qualifiers in the API + 1.11 Support installable IDCT, colorspace conversion routines + 1.10 Fixes for 64-bit (don't use "unsigned long") + optimized upsampling by Fabian "ryg" Giesen + 1.09 Fix format-conversion for PSD code (bad global variables!) + 1.08 Thatcher Ulrich's PSD code integrated by Nicolas Schulz + 1.07 attempt to fix C++ warning/errors again + 1.06 attempt to fix C++ warning/errors again + 1.05 fix TGA loading to return correct *comp and use good luminance calc + 1.04 default float alpha is 1, not 255; use 'void *' for stbi_image_free + 1.03 bugfixes to STBI_NO_STDIO, STBI_NO_HDR + 1.02 support for (subset of) HDR files, float interface for preferred access to them + 1.01 fix bug: possible bug in handling right-side up bmps... not sure + fix bug: the stbi__bmp_load() and stbi__tga_load() functions didn't work at all + 1.00 interface to zlib that skips zlib header + 0.99 correct handling of alpha in palette + 0.98 TGA loader by lonesock; dynamically add loaders (untested) + 0.97 jpeg errors on too large a file; also catch another malloc failure + 0.96 fix detection of invalid v value - particleman@mollyrocket forum + 0.95 during header scan, seek to markers in case of padding + 0.94 STBI_NO_STDIO to disable stdio usage; rename all #defines the same + 0.93 handle jpegtran output; verbose errors + 0.92 read 4,8,16,24,32-bit BMP files of several formats + 0.91 output 24-bit Windows 3.0 BMP files + 0.90 fix a few more warnings; bump version number to approach 1.0 + 0.61 bugfixes due to Marc LeBlanc, Christopher Lloyd + 0.60 fix compiling as c++ + 0.59 fix warnings: merge Dave Moore's -Wall fixes + 0.58 fix bug: zlib uncompressed mode len/nlen was wrong endian + 0.57 fix bug: jpg last huffman symbol before marker was >9 bits but less than 16 available + 0.56 fix bug: zlib uncompressed mode len vs. nlen + 0.55 fix bug: restart_interval not initialized to 0 + 0.54 allow NULL for 'int *comp' + 0.53 fix bug in png 3->4; speedup png decoding + 0.52 png handles req_comp=3,4 directly; minor cleanup; jpeg comments + 0.51 obey req_comp requests, 1-component jpegs return as 1-component, + on 'test' only check type, not whether we support this variant + 0.50 (2006-11-19) + first released version +*/ + + +/* +------------------------------------------------------------------------------ +This software is available under 2 licenses -- choose whichever you prefer. +------------------------------------------------------------------------------ +ALTERNATIVE A - 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 +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. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +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 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/widget/milsko/milskosrc/external/stb_truetype.c b/widget/milsko/milskosrc/external/stb_truetype.c new file mode 100644 index 0000000000..fc4efcbacf --- /dev/null +++ b/widget/milsko/milskosrc/external/stb_truetype.c @@ -0,0 +1,4 @@ +#ifdef USE_STB_TRUETYPE +#define STB_TRUETYPE_IMPLEMENTATION +#include "stb_truetype.h" +#endif diff --git a/widget/milsko/milskosrc/external/stb_truetype.h b/widget/milsko/milskosrc/external/stb_truetype.h new file mode 100644 index 0000000000..90a5c2e2b3 --- /dev/null +++ b/widget/milsko/milskosrc/external/stb_truetype.h @@ -0,0 +1,5079 @@ +// stb_truetype.h - v1.26 - public domain +// authored from 2009-2021 by Sean Barrett / RAD Game Tools +// +// ======================================================================= +// +// NO SECURITY GUARANTEE -- DO NOT USE THIS ON UNTRUSTED FONT FILES +// +// This library does no range checking of the offsets found in the file, +// meaning an attacker can use it to read arbitrary memory. +// +// ======================================================================= +// +// This library processes TrueType files: +// parse files +// extract glyph metrics +// extract glyph shapes +// render glyphs to one-channel bitmaps with antialiasing (box filter) +// render glyphs to one-channel SDF bitmaps (signed-distance field/function) +// +// Todo: +// non-MS cmaps +// crashproof on bad data +// hinting? (no longer patented) +// cleartype-style AA? +// optimize: use simple memory allocator for intermediates +// optimize: build edge-list directly from curves +// optimize: rasterize directly from curves? +// +// ADDITIONAL CONTRIBUTORS +// +// Mikko Mononen: compound shape support, more cmap formats +// Tor Andersson: kerning, subpixel rendering +// Dougall Johnson: OpenType / Type 2 font handling +// Daniel Ribeiro Maciel: basic GPOS-based kerning +// +// Misc other: +// Ryan Gordon +// Simon Glass +// github:IntellectualKitty +// Imanol Celaya +// Daniel Ribeiro Maciel +// +// Bug/warning reports/fixes: +// "Zer" on mollyrocket Fabian "ryg" Giesen github:NiLuJe +// Cass Everitt Martins Mozeiko github:aloucks +// stoiko (Haemimont Games) Cap Petschulat github:oyvindjam +// Brian Hook Omar Cornut github:vassvik +// Walter van Niftrik Ryan Griege +// David Gow Peter LaValle +// David Given Sergey Popov +// Ivan-Assen Ivanov Giumo X. Clanjor +// Anthony Pesch Higor Euripedes +// Johan Duparc Thomas Fields +// Hou Qiming Derek Vinyard +// Rob Loach Cort Stratton +// Kenney Phillis Jr. Brian Costabile +// Ken Voskuil (kaesve) Yakov Galka +// +// VERSION HISTORY +// +// 1.26 (2021-08-28) fix broken rasterizer +// 1.25 (2021-07-11) many fixes +// 1.24 (2020-02-05) fix warning +// 1.23 (2020-02-02) query SVG data for glyphs; query whole kerning table (but only kern not GPOS) +// 1.22 (2019-08-11) minimize missing-glyph duplication; fix kerning if both 'GPOS' and 'kern' are defined +// 1.21 (2019-02-25) fix warning +// 1.20 (2019-02-07) PackFontRange skips missing codepoints; GetScaleFontVMetrics() +// 1.19 (2018-02-11) GPOS kerning, STBTT_fmod +// 1.18 (2018-01-29) add missing function +// 1.17 (2017-07-23) make more arguments const; doc fix +// 1.16 (2017-07-12) SDF support +// 1.15 (2017-03-03) make more arguments const +// 1.14 (2017-01-16) num-fonts-in-TTC function +// 1.13 (2017-01-02) support OpenType fonts, certain Apple fonts +// 1.12 (2016-10-25) suppress warnings about casting away const with -Wcast-qual +// 1.11 (2016-04-02) fix unused-variable warning +// 1.10 (2016-04-02) user-defined fabs(); rare memory leak; remove duplicate typedef +// 1.09 (2016-01-16) warning fix; avoid crash on outofmem; use allocation userdata properly +// 1.08 (2015-09-13) document stbtt_Rasterize(); fixes for vertical & horizontal edges +// 1.07 (2015-08-01) allow PackFontRanges to accept arrays of sparse codepoints; +// variant PackFontRanges to pack and render in separate phases; +// fix stbtt_GetFontOFfsetForIndex (never worked for non-0 input?); +// fixed an assert() bug in the new rasterizer +// replace assert() with STBTT_assert() in new rasterizer +// +// Full history can be found at the end of this file. +// +// LICENSE +// +// See end of file for license information. +// +// USAGE +// +// Include this file in whatever places need to refer to it. In ONE C/C++ +// file, write: +// #define STB_TRUETYPE_IMPLEMENTATION +// before the #include of this file. This expands out the actual +// implementation into that C/C++ file. +// +// To make the implementation private to the file that generates the implementation, +// #define STBTT_STATIC +// +// Simple 3D API (don't ship this, but it's fine for tools and quick start) +// stbtt_BakeFontBitmap() -- bake a font to a bitmap for use as texture +// stbtt_GetBakedQuad() -- compute quad to draw for a given char +// +// Improved 3D API (more shippable): +// #include "stb_rect_pack.h" -- optional, but you really want it +// stbtt_PackBegin() +// stbtt_PackSetOversampling() -- for improved quality on small fonts +// stbtt_PackFontRanges() -- pack and renders +// stbtt_PackEnd() +// stbtt_GetPackedQuad() +// +// "Load" a font file from a memory buffer (you have to keep the buffer loaded) +// stbtt_InitFont() +// stbtt_GetFontOffsetForIndex() -- indexing for TTC font collections +// stbtt_GetNumberOfFonts() -- number of fonts for TTC font collections +// +// Render a unicode codepoint to a bitmap +// stbtt_GetCodepointBitmap() -- allocates and returns a bitmap +// stbtt_MakeCodepointBitmap() -- renders into bitmap you provide +// stbtt_GetCodepointBitmapBox() -- how big the bitmap must be +// +// Character advance/positioning +// stbtt_GetCodepointHMetrics() +// stbtt_GetFontVMetrics() +// stbtt_GetFontVMetricsOS2() +// stbtt_GetCodepointKernAdvance() +// +// Starting with version 1.06, the rasterizer was replaced with a new, +// faster and generally-more-precise rasterizer. The new rasterizer more +// accurately measures pixel coverage for anti-aliasing, except in the case +// where multiple shapes overlap, in which case it overestimates the AA pixel +// coverage. Thus, anti-aliasing of intersecting shapes may look wrong. If +// this turns out to be a problem, you can re-enable the old rasterizer with +// #define STBTT_RASTERIZER_VERSION 1 +// which will incur about a 15% speed hit. +// +// ADDITIONAL DOCUMENTATION +// +// Immediately after this block comment are a series of sample programs. +// +// After the sample programs is the "header file" section. This section +// includes documentation for each API function. +// +// Some important concepts to understand to use this library: +// +// Codepoint +// Characters are defined by unicode codepoints, e.g. 65 is +// uppercase A, 231 is lowercase c with a cedilla, 0x7e30 is +// the hiragana for "ma". +// +// Glyph +// A visual character shape (every codepoint is rendered as +// some glyph) +// +// Glyph index +// A font-specific integer ID representing a glyph +// +// Baseline +// Glyph shapes are defined relative to a baseline, which is the +// bottom of uppercase characters. Characters extend both above +// and below the baseline. +// +// Current Point +// As you draw text to the screen, you keep track of a "current point" +// which is the origin of each character. The current point's vertical +// position is the baseline. Even "baked fonts" use this model. +// +// Vertical Font Metrics +// The vertical qualities of the font, used to vertically position +// and space the characters. See docs for stbtt_GetFontVMetrics. +// +// Font Size in Pixels or Points +// The preferred interface for specifying font sizes in stb_truetype +// is to specify how tall the font's vertical extent should be in pixels. +// If that sounds good enough, skip the next paragraph. +// +// Most font APIs instead use "points", which are a common typographic +// measurement for describing font size, defined as 72 points per inch. +// stb_truetype provides a point API for compatibility. However, true +// "per inch" conventions don't make much sense on computer displays +// since different monitors have different number of pixels per +// inch. For example, Windows traditionally uses a convention that +// there are 96 pixels per inch, thus making 'inch' measurements have +// nothing to do with inches, and thus effectively defining a point to +// be 1.333 pixels. Additionally, the TrueType font data provides +// an explicit scale factor to scale a given font's glyphs to points, +// but the author has observed that this scale factor is often wrong +// for non-commercial fonts, thus making fonts scaled in points +// according to the TrueType spec incoherently sized in practice. +// +// DETAILED USAGE: +// +// Scale: +// Select how high you want the font to be, in points or pixels. +// Call ScaleForPixelHeight or ScaleForMappingEmToPixels to compute +// a scale factor SF that will be used by all other functions. +// +// Baseline: +// You need to select a y-coordinate that is the baseline of where +// your text will appear. Call GetFontBoundingBox to get the baseline-relative +// bounding box for all characters. SF*-y0 will be the distance in pixels +// that the worst-case character could extend above the baseline, so if +// you want the top edge of characters to appear at the top of the +// screen where y=0, then you would set the baseline to SF*-y0. +// +// Current point: +// Set the current point where the first character will appear. The +// first character could extend left of the current point; this is font +// dependent. You can either choose a current point that is the leftmost +// point and hope, or add some padding, or check the bounding box or +// left-side-bearing of the first character to be displayed and set +// the current point based on that. +// +// Displaying a character: +// Compute the bounding box of the character. It will contain signed values +// relative to . I.e. if it returns x0,y0,x1,y1, +// then the character should be displayed in the rectangle from +// to = 32 && *text < 128) { + stbtt_aligned_quad q; + stbtt_GetBakedQuad(cdata, 512,512, *text-32, &x,&y,&q,1);//1=opengl & d3d10+,0=d3d9 + glTexCoord2f(q.s0,q.t0); glVertex2f(q.x0,q.y0); + glTexCoord2f(q.s1,q.t0); glVertex2f(q.x1,q.y0); + glTexCoord2f(q.s1,q.t1); glVertex2f(q.x1,q.y1); + glTexCoord2f(q.s0,q.t1); glVertex2f(q.x0,q.y1); + } + ++text; + } + glEnd(); +} +#endif +// +// +////////////////////////////////////////////////////////////////////////////// +// +// Complete program (this compiles): get a single bitmap, print as ASCII art +// +#if 0 +#include +#define STB_TRUETYPE_IMPLEMENTATION // force following include to generate implementation +#include "stb_truetype.h" + +char ttf_buffer[1<<25]; + +int main(int argc, char **argv) +{ + stbtt_fontinfo font; + unsigned char *bitmap; + int w,h,i,j,c = (argc > 1 ? atoi(argv[1]) : 'a'), s = (argc > 2 ? atoi(argv[2]) : 20); + + fread(ttf_buffer, 1, 1<<25, fopen(argc > 3 ? argv[3] : "c:/windows/fonts/arialbd.ttf", "rb")); + + stbtt_InitFont(&font, ttf_buffer, stbtt_GetFontOffsetForIndex(ttf_buffer,0)); + bitmap = stbtt_GetCodepointBitmap(&font, 0,stbtt_ScaleForPixelHeight(&font, s), c, &w, &h, 0,0); + + for (j=0; j < h; ++j) { + for (i=0; i < w; ++i) + putchar(" .:ioVM@"[bitmap[j*w+i]>>5]); + putchar('\n'); + } + return 0; +} +#endif +// +// Output: +// +// .ii. +// @@@@@@. +// V@Mio@@o +// :i. V@V +// :oM@@M +// :@@@MM@M +// @@o o@M +// :@@. M@M +// @@@o@@@@ +// :M@@V:@@. +// +////////////////////////////////////////////////////////////////////////////// +// +// Complete program: print "Hello World!" banner, with bugs +// +#if 0 +char buffer[24<<20]; +unsigned char screen[20][79]; + +int main(int arg, char **argv) +{ + stbtt_fontinfo font; + int i,j,ascent,baseline,ch=0; + float scale, xpos=2; // leave a little padding in case the character extends left + char *text = "Heljo World!"; // intentionally misspelled to show 'lj' brokenness + + fread(buffer, 1, 1000000, fopen("c:/windows/fonts/arialbd.ttf", "rb")); + stbtt_InitFont(&font, buffer, 0); + + scale = stbtt_ScaleForPixelHeight(&font, 15); + stbtt_GetFontVMetrics(&font, &ascent,0,0); + baseline = (int) (ascent*scale); + + while (text[ch]) { + int advance,lsb,x0,y0,x1,y1; + float x_shift = xpos - (float) floor(xpos); + stbtt_GetCodepointHMetrics(&font, text[ch], &advance, &lsb); + stbtt_GetCodepointBitmapBoxSubpixel(&font, text[ch], scale,scale,x_shift,0, &x0,&y0,&x1,&y1); + stbtt_MakeCodepointBitmapSubpixel(&font, &screen[baseline + y0][(int) xpos + x0], x1-x0,y1-y0, 79, scale,scale,x_shift,0, text[ch]); + // note that this stomps the old data, so where character boxes overlap (e.g. 'lj') it's wrong + // because this API is really for baking character bitmaps into textures. if you want to render + // a sequence of characters, you really need to render each bitmap to a temp buffer, then + // "alpha blend" that into the working buffer + xpos += (advance * scale); + if (text[ch+1]) + xpos += scale*stbtt_GetCodepointKernAdvance(&font, text[ch],text[ch+1]); + ++ch; + } + + for (j=0; j < 20; ++j) { + for (i=0; i < 78; ++i) + putchar(" .:ioVM@"[screen[j][i]>>5]); + putchar('\n'); + } + + return 0; +} +#endif + + +////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// +//// +//// INTEGRATION WITH YOUR CODEBASE +//// +//// The following sections allow you to supply alternate definitions +//// of C library functions used by stb_truetype, e.g. if you don't +//// link with the C runtime library. + +#ifdef STB_TRUETYPE_IMPLEMENTATION + // #define your own (u)stbtt_int8/16/32 before including to override this + #ifndef stbtt_uint8 + typedef unsigned char stbtt_uint8; + typedef signed char stbtt_int8; + typedef unsigned short stbtt_uint16; + typedef signed short stbtt_int16; + typedef unsigned int stbtt_uint32; + typedef signed int stbtt_int32; + #endif + + typedef char stbtt__check_size32[sizeof(stbtt_int32)==4 ? 1 : -1]; + typedef char stbtt__check_size16[sizeof(stbtt_int16)==2 ? 1 : -1]; + + // e.g. #define your own STBTT_ifloor/STBTT_iceil() to avoid math.h + #ifndef STBTT_ifloor + #include + #define STBTT_ifloor(x) ((int) floor(x)) + #define STBTT_iceil(x) ((int) ceil(x)) + #endif + + #ifndef STBTT_sqrt + #include + #define STBTT_sqrt(x) sqrt(x) + #define STBTT_pow(x,y) pow(x,y) + #endif + + #ifndef STBTT_fmod + #include + #define STBTT_fmod(x,y) fmod(x,y) + #endif + + #ifndef STBTT_cos + #include + #define STBTT_cos(x) cos(x) + #define STBTT_acos(x) acos(x) + #endif + + #ifndef STBTT_fabs + #include + #define STBTT_fabs(x) fabs(x) + #endif + + // #define your own functions "STBTT_malloc" / "STBTT_free" to avoid malloc.h + #ifndef STBTT_malloc + #include + #define STBTT_malloc(x,u) ((void)(u),malloc(x)) + #define STBTT_free(x,u) ((void)(u),free(x)) + #endif + + #ifndef STBTT_assert + #include + #define STBTT_assert(x) assert(x) + #endif + + #ifndef STBTT_strlen + #include + #define STBTT_strlen(x) strlen(x) + #endif + + #ifndef STBTT_memcpy + #include + #define STBTT_memcpy memcpy + #define STBTT_memset memset + #endif +#endif + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +//// +//// INTERFACE +//// +//// + +#ifndef __STB_INCLUDE_STB_TRUETYPE_H__ +#define __STB_INCLUDE_STB_TRUETYPE_H__ + +#ifdef STBTT_STATIC +#define STBTT_DEF static +#else +#define STBTT_DEF extern +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +// private structure +typedef struct +{ + unsigned char *data; + int cursor; + int size; +} stbtt__buf; + +////////////////////////////////////////////////////////////////////////////// +// +// TEXTURE BAKING API +// +// If you use this API, you only have to call two functions ever. +// + +typedef struct +{ + unsigned short x0,y0,x1,y1; // coordinates of bbox in bitmap + float xoff,yoff,xadvance; +} stbtt_bakedchar; + +STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset, // font location (use offset=0 for plain .ttf) + float pixel_height, // height of font in pixels + unsigned char *pixels, int pw, int ph, // bitmap to be filled in + int first_char, int num_chars, // characters to bake + stbtt_bakedchar *chardata); // you allocate this, it's num_chars long +// if return is positive, the first unused row of the bitmap +// if return is negative, returns the negative of the number of characters that fit +// if return is 0, no characters fit and no rows were used +// This uses a very crappy packing. + +typedef struct +{ + float x0,y0,s0,t0; // top-left + float x1,y1,s1,t1; // bottom-right +} stbtt_aligned_quad; + +STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int pw, int ph, // same data as above + int char_index, // character to display + float *xpos, float *ypos, // pointers to current position in screen pixel space + stbtt_aligned_quad *q, // output: quad to draw + int opengl_fillrule); // true if opengl fill rule; false if DX9 or earlier +// Call GetBakedQuad with char_index = 'character - first_char', and it +// creates the quad you need to draw and advances the current position. +// +// The coordinate system used assumes y increases downwards. +// +// Characters will extend both above and below the current position; +// see discussion of "BASELINE" above. +// +// It's inefficient; you might want to c&p it and optimize it. + +STBTT_DEF void stbtt_GetScaledFontVMetrics(const unsigned char *fontdata, int index, float size, float *ascent, float *descent, float *lineGap); +// Query the font vertical metrics without having to create a font first. + + +////////////////////////////////////////////////////////////////////////////// +// +// NEW TEXTURE BAKING API +// +// This provides options for packing multiple fonts into one atlas, not +// perfectly but better than nothing. + +typedef struct +{ + unsigned short x0,y0,x1,y1; // coordinates of bbox in bitmap + float xoff,yoff,xadvance; + float xoff2,yoff2; +} stbtt_packedchar; + +typedef struct stbtt_pack_context stbtt_pack_context; +typedef struct stbtt_fontinfo stbtt_fontinfo; +#ifndef STB_RECT_PACK_VERSION +typedef struct stbrp_rect stbrp_rect; +#endif + +STBTT_DEF int stbtt_PackBegin(stbtt_pack_context *spc, unsigned char *pixels, int width, int height, int stride_in_bytes, int padding, void *alloc_context); +// Initializes a packing context stored in the passed-in stbtt_pack_context. +// Future calls using this context will pack characters into the bitmap passed +// in here: a 1-channel bitmap that is width * height. stride_in_bytes is +// the distance from one row to the next (or 0 to mean they are packed tightly +// together). "padding" is the amount of padding to leave between each +// character (normally you want '1' for bitmaps you'll use as textures with +// bilinear filtering). +// +// Returns 0 on failure, 1 on success. + +STBTT_DEF void stbtt_PackEnd (stbtt_pack_context *spc); +// Cleans up the packing context and frees all memory. + +#define STBTT_POINT_SIZE(x) (-(x)) + +STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, float font_size, + int first_unicode_char_in_range, int num_chars_in_range, stbtt_packedchar *chardata_for_range); +// Creates character bitmaps from the font_index'th font found in fontdata (use +// font_index=0 if you don't know what that is). It creates num_chars_in_range +// bitmaps for characters with unicode values starting at first_unicode_char_in_range +// and increasing. Data for how to render them is stored in chardata_for_range; +// pass these to stbtt_GetPackedQuad to get back renderable quads. +// +// font_size is the full height of the character from ascender to descender, +// as computed by stbtt_ScaleForPixelHeight. To use a point size as computed +// by stbtt_ScaleForMappingEmToPixels, wrap the point size in STBTT_POINT_SIZE() +// and pass that result as 'font_size': +// ..., 20 , ... // font max minus min y is 20 pixels tall +// ..., STBTT_POINT_SIZE(20), ... // 'M' is 20 pixels tall + +typedef struct +{ + float font_size; + int first_unicode_codepoint_in_range; // if non-zero, then the chars are continuous, and this is the first codepoint + int *array_of_unicode_codepoints; // if non-zero, then this is an array of unicode codepoints + int num_chars; + stbtt_packedchar *chardata_for_range; // output + unsigned char h_oversample, v_oversample; // don't set these, they're used internally +} stbtt_pack_range; + +STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, stbtt_pack_range *ranges, int num_ranges); +// Creates character bitmaps from multiple ranges of characters stored in +// ranges. This will usually create a better-packed bitmap than multiple +// calls to stbtt_PackFontRange. Note that you can call this multiple +// times within a single PackBegin/PackEnd. + +STBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context *spc, unsigned int h_oversample, unsigned int v_oversample); +// Oversampling a font increases the quality by allowing higher-quality subpixel +// positioning, and is especially valuable at smaller text sizes. +// +// This function sets the amount of oversampling for all following calls to +// stbtt_PackFontRange(s) or stbtt_PackFontRangesGatherRects for a given +// pack context. The default (no oversampling) is achieved by h_oversample=1 +// and v_oversample=1. The total number of pixels required is +// h_oversample*v_oversample larger than the default; for example, 2x2 +// oversampling requires 4x the storage of 1x1. For best results, render +// oversampled textures with bilinear filtering. Look at the readme in +// stb/tests/oversample for information about oversampled fonts +// +// To use with PackFontRangesGather etc., you must set it before calls +// call to PackFontRangesGatherRects. + +STBTT_DEF void stbtt_PackSetSkipMissingCodepoints(stbtt_pack_context *spc, int skip); +// If skip != 0, this tells stb_truetype to skip any codepoints for which +// there is no corresponding glyph. If skip=0, which is the default, then +// codepoints without a glyph recived the font's "missing character" glyph, +// typically an empty box by convention. + +STBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int pw, int ph, // same data as above + int char_index, // character to display + float *xpos, float *ypos, // pointers to current position in screen pixel space + stbtt_aligned_quad *q, // output: quad to draw + int align_to_integer); + +STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects); +STBTT_DEF void stbtt_PackFontRangesPackRects(stbtt_pack_context *spc, stbrp_rect *rects, int num_rects); +STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects); +// Calling these functions in sequence is roughly equivalent to calling +// stbtt_PackFontRanges(). If you more control over the packing of multiple +// fonts, or if you want to pack custom data into a font texture, take a look +// at the source to of stbtt_PackFontRanges() and create a custom version +// using these functions, e.g. call GatherRects multiple times, +// building up a single array of rects, then call PackRects once, +// then call RenderIntoRects repeatedly. This may result in a +// better packing than calling PackFontRanges multiple times +// (or it may not). + +// this is an opaque structure that you shouldn't mess with which holds +// all the context needed from PackBegin to PackEnd. +struct stbtt_pack_context { + void *user_allocator_context; + void *pack_info; + int width; + int height; + int stride_in_bytes; + int padding; + int skip_missing; + unsigned int h_oversample, v_oversample; + unsigned char *pixels; + void *nodes; +}; + +////////////////////////////////////////////////////////////////////////////// +// +// FONT LOADING +// +// + +STBTT_DEF int stbtt_GetNumberOfFonts(const unsigned char *data); +// This function will determine the number of fonts in a font file. TrueType +// collection (.ttc) files may contain multiple fonts, while TrueType font +// (.ttf) files only contain one font. The number of fonts can be used for +// indexing with the previous function where the index is between zero and one +// less than the total fonts. If an error occurs, -1 is returned. + +STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *data, int index); +// Each .ttf/.ttc file may have more than one font. Each font has a sequential +// index number starting from 0. Call this function to get the font offset for +// a given index; it returns -1 if the index is out of range. A regular .ttf +// file will only define one font and it always be at offset 0, so it will +// return '0' for index 0, and -1 for all other indices. + +// The following structure is defined publicly so you can declare one on +// the stack or as a global or etc, but you should treat it as opaque. +struct stbtt_fontinfo +{ + void * userdata; + unsigned char * data; // pointer to .ttf file + int fontstart; // offset of start of font + + int numGlyphs; // number of glyphs, needed for range checking + + int loca,head,glyf,hhea,hmtx,kern,gpos,svg; // table locations as offset from start of .ttf + int index_map; // a cmap mapping for our chosen character encoding + int indexToLocFormat; // format needed to map from glyph index to glyph + + stbtt__buf cff; // cff font data + stbtt__buf charstrings; // the charstring index + stbtt__buf gsubrs; // global charstring subroutines index + stbtt__buf subrs; // private charstring subroutines index + stbtt__buf fontdicts; // array of font dicts + stbtt__buf fdselect; // map from glyph to fontdict +}; + +STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data, int offset); +// Given an offset into the file that defines a font, this function builds +// the necessary cached info for the rest of the system. You must allocate +// the stbtt_fontinfo yourself, and stbtt_InitFont will fill it out. You don't +// need to do anything special to free it, because the contents are pure +// value data with no additional data structures. Returns 0 on failure. + + +////////////////////////////////////////////////////////////////////////////// +// +// CHARACTER TO GLYPH-INDEX CONVERSIOn + +STBTT_DEF int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unicode_codepoint); +// If you're going to perform multiple operations on the same character +// and you want a speed-up, call this function with the character you're +// going to process, then use glyph-based functions instead of the +// codepoint-based functions. +// Returns 0 if the character codepoint is not defined in the font. + + +////////////////////////////////////////////////////////////////////////////// +// +// CHARACTER PROPERTIES +// + +STBTT_DEF float stbtt_ScaleForPixelHeight(const stbtt_fontinfo *info, float pixels); +// computes a scale factor to produce a font whose "height" is 'pixels' tall. +// Height is measured as the distance from the highest ascender to the lowest +// descender; in other words, it's equivalent to calling stbtt_GetFontVMetrics +// and computing: +// scale = pixels / (ascent - descent) +// so if you prefer to measure height by the ascent only, use a similar calculation. + +STBTT_DEF float stbtt_ScaleForMappingEmToPixels(const stbtt_fontinfo *info, float pixels); +// computes a scale factor to produce a font whose EM size is mapped to +// 'pixels' tall. This is probably what traditional APIs compute, but +// I'm not positive. + +STBTT_DEF void stbtt_GetFontVMetrics(const stbtt_fontinfo *info, int *ascent, int *descent, int *lineGap); +// ascent is the coordinate above the baseline the font extends; descent +// is the coordinate below the baseline the font extends (i.e. it is typically negative) +// lineGap is the spacing between one row's descent and the next row's ascent... +// so you should advance the vertical position by "*ascent - *descent + *lineGap" +// these are expressed in unscaled coordinates, so you must multiply by +// the scale factor for a given size + +STBTT_DEF int stbtt_GetFontVMetricsOS2(const stbtt_fontinfo *info, int *typoAscent, int *typoDescent, int *typoLineGap); +// analogous to GetFontVMetrics, but returns the "typographic" values from the OS/2 +// table (specific to MS/Windows TTF files). +// +// Returns 1 on success (table present), 0 on failure. + +STBTT_DEF void stbtt_GetFontBoundingBox(const stbtt_fontinfo *info, int *x0, int *y0, int *x1, int *y1); +// the bounding box around all possible characters + +STBTT_DEF void stbtt_GetCodepointHMetrics(const stbtt_fontinfo *info, int codepoint, int *advanceWidth, int *leftSideBearing); +// leftSideBearing is the offset from the current horizontal position to the left edge of the character +// advanceWidth is the offset from the current horizontal position to the next horizontal position +// these are expressed in unscaled coordinates + +STBTT_DEF int stbtt_GetCodepointKernAdvance(const stbtt_fontinfo *info, int ch1, int ch2); +// an additional amount to add to the 'advance' value between ch1 and ch2 + +STBTT_DEF int stbtt_GetCodepointBox(const stbtt_fontinfo *info, int codepoint, int *x0, int *y0, int *x1, int *y1); +// Gets the bounding box of the visible part of the glyph, in unscaled coordinates + +STBTT_DEF void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int glyph_index, int *advanceWidth, int *leftSideBearing); +STBTT_DEF int stbtt_GetGlyphKernAdvance(const stbtt_fontinfo *info, int glyph1, int glyph2); +STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1); +// as above, but takes one or more glyph indices for greater efficiency + +typedef struct stbtt_kerningentry +{ + int glyph1; // use stbtt_FindGlyphIndex + int glyph2; + int advance; +} stbtt_kerningentry; + +STBTT_DEF int stbtt_GetKerningTableLength(const stbtt_fontinfo *info); +STBTT_DEF int stbtt_GetKerningTable(const stbtt_fontinfo *info, stbtt_kerningentry* table, int table_length); +// Retrieves a complete list of all of the kerning pairs provided by the font +// stbtt_GetKerningTable never writes more than table_length entries and returns how many entries it did write. +// The table will be sorted by (a.glyph1 == b.glyph1)?(a.glyph2 < b.glyph2):(a.glyph1 < b.glyph1) + +////////////////////////////////////////////////////////////////////////////// +// +// GLYPH SHAPES (you probably don't need these, but they have to go before +// the bitmaps for C declaration-order reasons) +// + +#ifndef STBTT_vmove // you can predefine these to use different values (but why?) + enum { + STBTT_vmove=1, + STBTT_vline, + STBTT_vcurve, + STBTT_vcubic + }; +#endif + +#ifndef stbtt_vertex // you can predefine this to use different values + // (we share this with other code at RAD) + #define stbtt_vertex_type short // can't use stbtt_int16 because that's not visible in the header file + typedef struct + { + stbtt_vertex_type x,y,cx,cy,cx1,cy1; + unsigned char type,padding; + } stbtt_vertex; +#endif + +STBTT_DEF int stbtt_IsGlyphEmpty(const stbtt_fontinfo *info, int glyph_index); +// returns non-zero if nothing is drawn for this glyph + +STBTT_DEF int stbtt_GetCodepointShape(const stbtt_fontinfo *info, int unicode_codepoint, stbtt_vertex **vertices); +STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **vertices); +// returns # of vertices and fills *vertices with the pointer to them +// these are expressed in "unscaled" coordinates +// +// The shape is a series of contours. Each one starts with +// a STBTT_moveto, then consists of a series of mixed +// STBTT_lineto and STBTT_curveto segments. A lineto +// draws a line from previous endpoint to its x,y; a curveto +// draws a quadratic bezier from previous endpoint to +// its x,y, using cx,cy as the bezier control point. + +STBTT_DEF void stbtt_FreeShape(const stbtt_fontinfo *info, stbtt_vertex *vertices); +// frees the data allocated above + +STBTT_DEF unsigned char *stbtt_FindSVGDoc(const stbtt_fontinfo *info, int gl); +STBTT_DEF int stbtt_GetCodepointSVG(const stbtt_fontinfo *info, int unicode_codepoint, const char **svg); +STBTT_DEF int stbtt_GetGlyphSVG(const stbtt_fontinfo *info, int gl, const char **svg); +// fills svg with the character's SVG data. +// returns data size or 0 if SVG not found. + +////////////////////////////////////////////////////////////////////////////// +// +// BITMAP RENDERING +// + +STBTT_DEF void stbtt_FreeBitmap(unsigned char *bitmap, void *userdata); +// frees the bitmap allocated below + +STBTT_DEF unsigned char *stbtt_GetCodepointBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int codepoint, int *width, int *height, int *xoff, int *yoff); +// allocates a large-enough single-channel 8bpp bitmap and renders the +// specified character/glyph at the specified scale into it, with +// antialiasing. 0 is no coverage (transparent), 255 is fully covered (opaque). +// *width & *height are filled out with the width & height of the bitmap, +// which is stored left-to-right, top-to-bottom. +// +// xoff/yoff are the offset it pixel space from the glyph origin to the top-left of the bitmap + +STBTT_DEF unsigned char *stbtt_GetCodepointBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint, int *width, int *height, int *xoff, int *yoff); +// the same as stbtt_GetCodepoitnBitmap, but you can specify a subpixel +// shift for the character + +STBTT_DEF void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int codepoint); +// the same as stbtt_GetCodepointBitmap, but you pass in storage for the bitmap +// in the form of 'output', with row spacing of 'out_stride' bytes. the bitmap +// is clipped to out_w/out_h bytes. Call stbtt_GetCodepointBitmapBox to get the +// width and height and positioning info for it first. + +STBTT_DEF void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint); +// same as stbtt_MakeCodepointBitmap, but you can specify a subpixel +// shift for the character + +STBTT_DEF void stbtt_MakeCodepointBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float *sub_x, float *sub_y, int codepoint); +// same as stbtt_MakeCodepointBitmapSubpixel, but prefiltering +// is performed (see stbtt_PackSetOversampling) + +STBTT_DEF void stbtt_GetCodepointBitmapBox(const stbtt_fontinfo *font, int codepoint, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1); +// get the bbox of the bitmap centered around the glyph origin; so the +// bitmap width is ix1-ix0, height is iy1-iy0, and location to place +// the bitmap top left is (leftSideBearing*scale,iy0). +// (Note that the bitmap uses y-increases-down, but the shape uses +// y-increases-up, so CodepointBitmapBox and CodepointBox are inverted.) + +STBTT_DEF void stbtt_GetCodepointBitmapBoxSubpixel(const stbtt_fontinfo *font, int codepoint, float scale_x, float scale_y, float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1); +// same as stbtt_GetCodepointBitmapBox, but you can specify a subpixel +// shift for the character + +// the following functions are equivalent to the above functions, but operate +// on glyph indices instead of Unicode codepoints (for efficiency) +STBTT_DEF unsigned char *stbtt_GetGlyphBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int glyph, int *width, int *height, int *xoff, int *yoff); +STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int glyph, int *width, int *height, int *xoff, int *yoff); +STBTT_DEF void stbtt_MakeGlyphBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int glyph); +STBTT_DEF void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int glyph); +STBTT_DEF void stbtt_MakeGlyphBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float *sub_x, float *sub_y, int glyph); +STBTT_DEF void stbtt_GetGlyphBitmapBox(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1); +STBTT_DEF void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y,float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1); + + +// @TODO: don't expose this structure +typedef struct +{ + int w,h,stride; + unsigned char *pixels; +} stbtt__bitmap; + +// rasterize a shape with quadratic beziers into a bitmap +STBTT_DEF void stbtt_Rasterize(stbtt__bitmap *result, // 1-channel bitmap to draw into + float flatness_in_pixels, // allowable error of curve in pixels + stbtt_vertex *vertices, // array of vertices defining shape + int num_verts, // number of vertices in above array + float scale_x, float scale_y, // scale applied to input vertices + float shift_x, float shift_y, // translation applied to input vertices + int x_off, int y_off, // another translation applied to input + int invert, // if non-zero, vertically flip shape + void *userdata); // context for to STBTT_MALLOC + +////////////////////////////////////////////////////////////////////////////// +// +// Signed Distance Function (or Field) rendering + +STBTT_DEF void stbtt_FreeSDF(unsigned char *bitmap, void *userdata); +// frees the SDF bitmap allocated below + +STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float scale, int glyph, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff); +STBTT_DEF unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo *info, float scale, int codepoint, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff); +// These functions compute a discretized SDF field for a single character, suitable for storing +// in a single-channel texture, sampling with bilinear filtering, and testing against +// larger than some threshold to produce scalable fonts. +// info -- the font +// scale -- controls the size of the resulting SDF bitmap, same as it would be creating a regular bitmap +// glyph/codepoint -- the character to generate the SDF for +// padding -- extra "pixels" around the character which are filled with the distance to the character (not 0), +// which allows effects like bit outlines +// onedge_value -- value 0-255 to test the SDF against to reconstruct the character (i.e. the isocontour of the character) +// pixel_dist_scale -- what value the SDF should increase by when moving one SDF "pixel" away from the edge (on the 0..255 scale) +// if positive, > onedge_value is inside; if negative, < onedge_value is inside +// width,height -- output height & width of the SDF bitmap (including padding) +// xoff,yoff -- output origin of the character +// return value -- a 2D array of bytes 0..255, width*height in size +// +// pixel_dist_scale & onedge_value are a scale & bias that allows you to make +// optimal use of the limited 0..255 for your application, trading off precision +// and special effects. SDF values outside the range 0..255 are clamped to 0..255. +// +// Example: +// scale = stbtt_ScaleForPixelHeight(22) +// padding = 5 +// onedge_value = 180 +// pixel_dist_scale = 180/5.0 = 36.0 +// +// This will create an SDF bitmap in which the character is about 22 pixels +// high but the whole bitmap is about 22+5+5=32 pixels high. To produce a filled +// shape, sample the SDF at each pixel and fill the pixel if the SDF value +// is greater than or equal to 180/255. (You'll actually want to antialias, +// which is beyond the scope of this example.) Additionally, you can compute +// offset outlines (e.g. to stroke the character border inside & outside, +// or only outside). For example, to fill outside the character up to 3 SDF +// pixels, you would compare against (180-36.0*3)/255 = 72/255. The above +// choice of variables maps a range from 5 pixels outside the shape to +// 2 pixels inside the shape to 0..255; this is intended primarily for apply +// outside effects only (the interior range is needed to allow proper +// antialiasing of the font at *smaller* sizes) +// +// The function computes the SDF analytically at each SDF pixel, not by e.g. +// building a higher-res bitmap and approximating it. In theory the quality +// should be as high as possible for an SDF of this size & representation, but +// unclear if this is true in practice (perhaps building a higher-res bitmap +// and computing from that can allow drop-out prevention). +// +// The algorithm has not been optimized at all, so expect it to be slow +// if computing lots of characters or very large sizes. + + + +////////////////////////////////////////////////////////////////////////////// +// +// Finding the right font... +// +// You should really just solve this offline, keep your own tables +// of what font is what, and don't try to get it out of the .ttf file. +// That's because getting it out of the .ttf file is really hard, because +// the names in the file can appear in many possible encodings, in many +// possible languages, and e.g. if you need a case-insensitive comparison, +// the details of that depend on the encoding & language in a complex way +// (actually underspecified in truetype, but also gigantic). +// +// But you can use the provided functions in two possible ways: +// stbtt_FindMatchingFont() will use *case-sensitive* comparisons on +// unicode-encoded names to try to find the font you want; +// you can run this before calling stbtt_InitFont() +// +// stbtt_GetFontNameString() lets you get any of the various strings +// from the file yourself and do your own comparisons on them. +// You have to have called stbtt_InitFont() first. + + +STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *fontdata, const char *name, int flags); +// returns the offset (not index) of the font that matches, or -1 if none +// if you use STBTT_MACSTYLE_DONTCARE, use a font name like "Arial Bold". +// if you use any other flag, use a font name like "Arial"; this checks +// the 'macStyle' header field; i don't know if fonts set this consistently +#define STBTT_MACSTYLE_DONTCARE 0 +#define STBTT_MACSTYLE_BOLD 1 +#define STBTT_MACSTYLE_ITALIC 2 +#define STBTT_MACSTYLE_UNDERSCORE 4 +#define STBTT_MACSTYLE_NONE 8 // <= not same as 0, this makes us check the bitfield is 0 + +STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len1, const char *s2, int len2); +// returns 1/0 whether the first string interpreted as utf8 is identical to +// the second string interpreted as big-endian utf16... useful for strings from next func + +STBTT_DEF const char *stbtt_GetFontNameString(const stbtt_fontinfo *font, int *length, int platformID, int encodingID, int languageID, int nameID); +// returns the string (which may be big-endian double byte, e.g. for unicode) +// and puts the length in bytes in *length. +// +// some of the values for the IDs are below; for more see the truetype spec: +// http://developer.apple.com/textfonts/TTRefMan/RM06/Chap6name.html +// http://www.microsoft.com/typography/otspec/name.htm + +enum { // platformID + STBTT_PLATFORM_ID_UNICODE =0, + STBTT_PLATFORM_ID_MAC =1, + STBTT_PLATFORM_ID_ISO =2, + STBTT_PLATFORM_ID_MICROSOFT =3 +}; + +enum { // encodingID for STBTT_PLATFORM_ID_UNICODE + STBTT_UNICODE_EID_UNICODE_1_0 =0, + STBTT_UNICODE_EID_UNICODE_1_1 =1, + STBTT_UNICODE_EID_ISO_10646 =2, + STBTT_UNICODE_EID_UNICODE_2_0_BMP=3, + STBTT_UNICODE_EID_UNICODE_2_0_FULL=4 +}; + +enum { // encodingID for STBTT_PLATFORM_ID_MICROSOFT + STBTT_MS_EID_SYMBOL =0, + STBTT_MS_EID_UNICODE_BMP =1, + STBTT_MS_EID_SHIFTJIS =2, + STBTT_MS_EID_UNICODE_FULL =10 +}; + +enum { // encodingID for STBTT_PLATFORM_ID_MAC; same as Script Manager codes + STBTT_MAC_EID_ROMAN =0, STBTT_MAC_EID_ARABIC =4, + STBTT_MAC_EID_JAPANESE =1, STBTT_MAC_EID_HEBREW =5, + STBTT_MAC_EID_CHINESE_TRAD =2, STBTT_MAC_EID_GREEK =6, + STBTT_MAC_EID_KOREAN =3, STBTT_MAC_EID_RUSSIAN =7 +}; + +enum { // languageID for STBTT_PLATFORM_ID_MICROSOFT; same as LCID... + // problematic because there are e.g. 16 english LCIDs and 16 arabic LCIDs + STBTT_MS_LANG_ENGLISH =0x0409, STBTT_MS_LANG_ITALIAN =0x0410, + STBTT_MS_LANG_CHINESE =0x0804, STBTT_MS_LANG_JAPANESE =0x0411, + STBTT_MS_LANG_DUTCH =0x0413, STBTT_MS_LANG_KOREAN =0x0412, + STBTT_MS_LANG_FRENCH =0x040c, STBTT_MS_LANG_RUSSIAN =0x0419, + STBTT_MS_LANG_GERMAN =0x0407, STBTT_MS_LANG_SPANISH =0x0409, + STBTT_MS_LANG_HEBREW =0x040d, STBTT_MS_LANG_SWEDISH =0x041D +}; + +enum { // languageID for STBTT_PLATFORM_ID_MAC + STBTT_MAC_LANG_ENGLISH =0 , STBTT_MAC_LANG_JAPANESE =11, + STBTT_MAC_LANG_ARABIC =12, STBTT_MAC_LANG_KOREAN =23, + STBTT_MAC_LANG_DUTCH =4 , STBTT_MAC_LANG_RUSSIAN =32, + STBTT_MAC_LANG_FRENCH =1 , STBTT_MAC_LANG_SPANISH =6 , + STBTT_MAC_LANG_GERMAN =2 , STBTT_MAC_LANG_SWEDISH =5 , + STBTT_MAC_LANG_HEBREW =10, STBTT_MAC_LANG_CHINESE_SIMPLIFIED =33, + STBTT_MAC_LANG_ITALIAN =3 , STBTT_MAC_LANG_CHINESE_TRAD =19 +}; + +#ifdef __cplusplus +} +#endif + +#endif // __STB_INCLUDE_STB_TRUETYPE_H__ + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +//// +//// IMPLEMENTATION +//// +//// + +#ifdef STB_TRUETYPE_IMPLEMENTATION + +#ifndef STBTT_MAX_OVERSAMPLE +#define STBTT_MAX_OVERSAMPLE 8 +#endif + +#if STBTT_MAX_OVERSAMPLE > 255 +#error "STBTT_MAX_OVERSAMPLE cannot be > 255" +#endif + +typedef int stbtt__test_oversample_pow2[(STBTT_MAX_OVERSAMPLE & (STBTT_MAX_OVERSAMPLE-1)) == 0 ? 1 : -1]; + +#ifndef STBTT_RASTERIZER_VERSION +#define STBTT_RASTERIZER_VERSION 2 +#endif + +#ifdef _MSC_VER +#define STBTT__NOTUSED(v) (void)(v) +#else +#define STBTT__NOTUSED(v) (void)sizeof(v) +#endif + +////////////////////////////////////////////////////////////////////////// +// +// stbtt__buf helpers to parse data from file +// + +static stbtt_uint8 stbtt__buf_get8(stbtt__buf *b) +{ + if (b->cursor >= b->size) + return 0; + return b->data[b->cursor++]; +} + +static stbtt_uint8 stbtt__buf_peek8(stbtt__buf *b) +{ + if (b->cursor >= b->size) + return 0; + return b->data[b->cursor]; +} + +static void stbtt__buf_seek(stbtt__buf *b, int o) +{ + STBTT_assert(!(o > b->size || o < 0)); + b->cursor = (o > b->size || o < 0) ? b->size : o; +} + +static void stbtt__buf_skip(stbtt__buf *b, int o) +{ + stbtt__buf_seek(b, b->cursor + o); +} + +static stbtt_uint32 stbtt__buf_get(stbtt__buf *b, int n) +{ + stbtt_uint32 v = 0; + int i; + STBTT_assert(n >= 1 && n <= 4); + for (i = 0; i < n; i++) + v = (v << 8) | stbtt__buf_get8(b); + return v; +} + +static stbtt__buf stbtt__new_buf(const void *p, size_t size) +{ + stbtt__buf r; + STBTT_assert(size < 0x40000000); + r.data = (stbtt_uint8*) p; + r.size = (int) size; + r.cursor = 0; + return r; +} + +#define stbtt__buf_get16(b) stbtt__buf_get((b), 2) +#define stbtt__buf_get32(b) stbtt__buf_get((b), 4) + +static stbtt__buf stbtt__buf_range(const stbtt__buf *b, int o, int s) +{ + stbtt__buf r = stbtt__new_buf(NULL, 0); + if (o < 0 || s < 0 || o > b->size || s > b->size - o) return r; + r.data = b->data + o; + r.size = s; + return r; +} + +static stbtt__buf stbtt__cff_get_index(stbtt__buf *b) +{ + int count, start, offsize; + start = b->cursor; + count = stbtt__buf_get16(b); + if (count) { + offsize = stbtt__buf_get8(b); + STBTT_assert(offsize >= 1 && offsize <= 4); + stbtt__buf_skip(b, offsize * count); + stbtt__buf_skip(b, stbtt__buf_get(b, offsize) - 1); + } + return stbtt__buf_range(b, start, b->cursor - start); +} + +static stbtt_uint32 stbtt__cff_int(stbtt__buf *b) +{ + int b0 = stbtt__buf_get8(b); + if (b0 >= 32 && b0 <= 246) return b0 - 139; + else if (b0 >= 247 && b0 <= 250) return (b0 - 247)*256 + stbtt__buf_get8(b) + 108; + else if (b0 >= 251 && b0 <= 254) return -(b0 - 251)*256 - stbtt__buf_get8(b) - 108; + else if (b0 == 28) return stbtt__buf_get16(b); + else if (b0 == 29) return stbtt__buf_get32(b); + STBTT_assert(0); + return 0; +} + +static void stbtt__cff_skip_operand(stbtt__buf *b) { + int v, b0 = stbtt__buf_peek8(b); + STBTT_assert(b0 >= 28); + if (b0 == 30) { + stbtt__buf_skip(b, 1); + while (b->cursor < b->size) { + v = stbtt__buf_get8(b); + if ((v & 0xF) == 0xF || (v >> 4) == 0xF) + break; + } + } else { + stbtt__cff_int(b); + } +} + +static stbtt__buf stbtt__dict_get(stbtt__buf *b, int key) +{ + stbtt__buf_seek(b, 0); + while (b->cursor < b->size) { + int start = b->cursor, end, op; + while (stbtt__buf_peek8(b) >= 28) + stbtt__cff_skip_operand(b); + end = b->cursor; + op = stbtt__buf_get8(b); + if (op == 12) op = stbtt__buf_get8(b) | 0x100; + if (op == key) return stbtt__buf_range(b, start, end-start); + } + return stbtt__buf_range(b, 0, 0); +} + +static void stbtt__dict_get_ints(stbtt__buf *b, int key, int outcount, stbtt_uint32 *out) +{ + int i; + stbtt__buf operands = stbtt__dict_get(b, key); + for (i = 0; i < outcount && operands.cursor < operands.size; i++) + out[i] = stbtt__cff_int(&operands); +} + +static int stbtt__cff_index_count(stbtt__buf *b) +{ + stbtt__buf_seek(b, 0); + return stbtt__buf_get16(b); +} + +static stbtt__buf stbtt__cff_index_get(stbtt__buf b, int i) +{ + int count, offsize, start, end; + stbtt__buf_seek(&b, 0); + count = stbtt__buf_get16(&b); + offsize = stbtt__buf_get8(&b); + STBTT_assert(i >= 0 && i < count); + STBTT_assert(offsize >= 1 && offsize <= 4); + stbtt__buf_skip(&b, i*offsize); + start = stbtt__buf_get(&b, offsize); + end = stbtt__buf_get(&b, offsize); + return stbtt__buf_range(&b, 2+(count+1)*offsize+start, end - start); +} + +////////////////////////////////////////////////////////////////////////// +// +// accessors to parse data from file +// + +// on platforms that don't allow misaligned reads, if we want to allow +// truetype fonts that aren't padded to alignment, define ALLOW_UNALIGNED_TRUETYPE + +#define ttBYTE(p) (* (stbtt_uint8 *) (p)) +#define ttCHAR(p) (* (stbtt_int8 *) (p)) +#define ttFixed(p) ttLONG(p) + +static stbtt_uint16 ttUSHORT(stbtt_uint8 *p) { return p[0]*256 + p[1]; } +static stbtt_int16 ttSHORT(stbtt_uint8 *p) { return p[0]*256 + p[1]; } +static stbtt_uint32 ttULONG(stbtt_uint8 *p) { return (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]; } +static stbtt_int32 ttLONG(stbtt_uint8 *p) { return (p[0]<<24) + (p[1]<<16) + (p[2]<<8) + p[3]; } + +#define stbtt_tag4(p,c0,c1,c2,c3) ((p)[0] == (c0) && (p)[1] == (c1) && (p)[2] == (c2) && (p)[3] == (c3)) +#define stbtt_tag(p,str) stbtt_tag4(p,str[0],str[1],str[2],str[3]) + +static int stbtt__isfont(stbtt_uint8 *font) +{ + // check the version number + if (stbtt_tag4(font, '1',0,0,0)) return 1; // TrueType 1 + if (stbtt_tag(font, "typ1")) return 1; // TrueType with type 1 font -- we don't support this! + if (stbtt_tag(font, "OTTO")) return 1; // OpenType with CFF + if (stbtt_tag4(font, 0,1,0,0)) return 1; // OpenType 1.0 + if (stbtt_tag(font, "true")) return 1; // Apple specification for TrueType fonts + return 0; +} + +// @OPTIMIZE: binary search +static stbtt_uint32 stbtt__find_table(stbtt_uint8 *data, stbtt_uint32 fontstart, const char *tag) +{ + stbtt_int32 num_tables = ttUSHORT(data+fontstart+4); + stbtt_uint32 tabledir = fontstart + 12; + stbtt_int32 i; + for (i=0; i < num_tables; ++i) { + stbtt_uint32 loc = tabledir + 16*i; + if (stbtt_tag(data+loc+0, tag)) + return ttULONG(data+loc+8); + } + return 0; +} + +static int stbtt_GetFontOffsetForIndex_internal(unsigned char *font_collection, int index) +{ + // if it's just a font, there's only one valid index + if (stbtt__isfont(font_collection)) + return index == 0 ? 0 : -1; + + // check if it's a TTC + if (stbtt_tag(font_collection, "ttcf")) { + // version 1? + if (ttULONG(font_collection+4) == 0x00010000 || ttULONG(font_collection+4) == 0x00020000) { + stbtt_int32 n = ttLONG(font_collection+8); + if (index >= n) + return -1; + return ttULONG(font_collection+12+index*4); + } + } + return -1; +} + +static int stbtt_GetNumberOfFonts_internal(unsigned char *font_collection) +{ + // if it's just a font, there's only one valid font + if (stbtt__isfont(font_collection)) + return 1; + + // check if it's a TTC + if (stbtt_tag(font_collection, "ttcf")) { + // version 1? + if (ttULONG(font_collection+4) == 0x00010000 || ttULONG(font_collection+4) == 0x00020000) { + return ttLONG(font_collection+8); + } + } + return 0; +} + +static stbtt__buf stbtt__get_subrs(stbtt__buf cff, stbtt__buf fontdict) +{ + stbtt_uint32 subrsoff = 0, private_loc[2] = { 0, 0 }; + stbtt__buf pdict; + stbtt__dict_get_ints(&fontdict, 18, 2, private_loc); + if (!private_loc[1] || !private_loc[0]) return stbtt__new_buf(NULL, 0); + pdict = stbtt__buf_range(&cff, private_loc[1], private_loc[0]); + stbtt__dict_get_ints(&pdict, 19, 1, &subrsoff); + if (!subrsoff) return stbtt__new_buf(NULL, 0); + stbtt__buf_seek(&cff, private_loc[1]+subrsoff); + return stbtt__cff_get_index(&cff); +} + +// since most people won't use this, find this table the first time it's needed +static int stbtt__get_svg(stbtt_fontinfo *info) +{ + stbtt_uint32 t; + if (info->svg < 0) { + t = stbtt__find_table(info->data, info->fontstart, "SVG "); + if (t) { + stbtt_uint32 offset = ttULONG(info->data + t + 2); + info->svg = t + offset; + } else { + info->svg = 0; + } + } + return info->svg; +} + +static int stbtt_InitFont_internal(stbtt_fontinfo *info, unsigned char *data, int fontstart) +{ + stbtt_uint32 cmap, t; + stbtt_int32 i,numTables; + + info->data = data; + info->fontstart = fontstart; + info->cff = stbtt__new_buf(NULL, 0); + + cmap = stbtt__find_table(data, fontstart, "cmap"); // required + info->loca = stbtt__find_table(data, fontstart, "loca"); // required + info->head = stbtt__find_table(data, fontstart, "head"); // required + info->glyf = stbtt__find_table(data, fontstart, "glyf"); // required + info->hhea = stbtt__find_table(data, fontstart, "hhea"); // required + info->hmtx = stbtt__find_table(data, fontstart, "hmtx"); // required + info->kern = stbtt__find_table(data, fontstart, "kern"); // not required + info->gpos = stbtt__find_table(data, fontstart, "GPOS"); // not required + + if (!cmap || !info->head || !info->hhea || !info->hmtx) + return 0; + if (info->glyf) { + // required for truetype + if (!info->loca) return 0; + } else { + // initialization for CFF / Type2 fonts (OTF) + stbtt__buf b, topdict, topdictidx; + stbtt_uint32 cstype = 2, charstrings = 0, fdarrayoff = 0, fdselectoff = 0; + stbtt_uint32 cff; + + cff = stbtt__find_table(data, fontstart, "CFF "); + if (!cff) return 0; + + info->fontdicts = stbtt__new_buf(NULL, 0); + info->fdselect = stbtt__new_buf(NULL, 0); + + // @TODO this should use size from table (not 512MB) + info->cff = stbtt__new_buf(data+cff, 512*1024*1024); + b = info->cff; + + // read the header + stbtt__buf_skip(&b, 2); + stbtt__buf_seek(&b, stbtt__buf_get8(&b)); // hdrsize + + // @TODO the name INDEX could list multiple fonts, + // but we just use the first one. + stbtt__cff_get_index(&b); // name INDEX + topdictidx = stbtt__cff_get_index(&b); + topdict = stbtt__cff_index_get(topdictidx, 0); + stbtt__cff_get_index(&b); // string INDEX + info->gsubrs = stbtt__cff_get_index(&b); + + stbtt__dict_get_ints(&topdict, 17, 1, &charstrings); + stbtt__dict_get_ints(&topdict, 0x100 | 6, 1, &cstype); + stbtt__dict_get_ints(&topdict, 0x100 | 36, 1, &fdarrayoff); + stbtt__dict_get_ints(&topdict, 0x100 | 37, 1, &fdselectoff); + info->subrs = stbtt__get_subrs(b, topdict); + + // we only support Type 2 charstrings + if (cstype != 2) return 0; + if (charstrings == 0) return 0; + + if (fdarrayoff) { + // looks like a CID font + if (!fdselectoff) return 0; + stbtt__buf_seek(&b, fdarrayoff); + info->fontdicts = stbtt__cff_get_index(&b); + info->fdselect = stbtt__buf_range(&b, fdselectoff, b.size-fdselectoff); + } + + stbtt__buf_seek(&b, charstrings); + info->charstrings = stbtt__cff_get_index(&b); + } + + t = stbtt__find_table(data, fontstart, "maxp"); + if (t) + info->numGlyphs = ttUSHORT(data+t+4); + else + info->numGlyphs = 0xffff; + + info->svg = -1; + + // find a cmap encoding table we understand *now* to avoid searching + // later. (todo: could make this installable) + // the same regardless of glyph. + numTables = ttUSHORT(data + cmap + 2); + info->index_map = 0; + for (i=0; i < numTables; ++i) { + stbtt_uint32 encoding_record = cmap + 4 + 8 * i; + // find an encoding we understand: + switch(ttUSHORT(data+encoding_record)) { + case STBTT_PLATFORM_ID_MICROSOFT: + switch (ttUSHORT(data+encoding_record+2)) { + case STBTT_MS_EID_UNICODE_BMP: + case STBTT_MS_EID_UNICODE_FULL: + // MS/Unicode + info->index_map = cmap + ttULONG(data+encoding_record+4); + break; + } + break; + case STBTT_PLATFORM_ID_UNICODE: + // Mac/iOS has these + // all the encodingIDs are unicode, so we don't bother to check it + info->index_map = cmap + ttULONG(data+encoding_record+4); + break; + } + } + if (info->index_map == 0) + return 0; + + info->indexToLocFormat = ttUSHORT(data+info->head + 50); + return 1; +} + +STBTT_DEF int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unicode_codepoint) +{ + stbtt_uint8 *data = info->data; + stbtt_uint32 index_map = info->index_map; + + stbtt_uint16 format = ttUSHORT(data + index_map + 0); + if (format == 0) { // apple byte encoding + stbtt_int32 bytes = ttUSHORT(data + index_map + 2); + if (unicode_codepoint < bytes-6) + return ttBYTE(data + index_map + 6 + unicode_codepoint); + return 0; + } else if (format == 6) { + stbtt_uint32 first = ttUSHORT(data + index_map + 6); + stbtt_uint32 count = ttUSHORT(data + index_map + 8); + if ((stbtt_uint32) unicode_codepoint >= first && (stbtt_uint32) unicode_codepoint < first+count) + return ttUSHORT(data + index_map + 10 + (unicode_codepoint - first)*2); + return 0; + } else if (format == 2) { + STBTT_assert(0); // @TODO: high-byte mapping for japanese/chinese/korean + return 0; + } else if (format == 4) { // standard mapping for windows fonts: binary search collection of ranges + stbtt_uint16 segcount = ttUSHORT(data+index_map+6) >> 1; + stbtt_uint16 searchRange = ttUSHORT(data+index_map+8) >> 1; + stbtt_uint16 entrySelector = ttUSHORT(data+index_map+10); + stbtt_uint16 rangeShift = ttUSHORT(data+index_map+12) >> 1; + + // do a binary search of the segments + stbtt_uint32 endCount = index_map + 14; + stbtt_uint32 search = endCount; + + if (unicode_codepoint > 0xffff) + return 0; + + // they lie from endCount .. endCount + segCount + // but searchRange is the nearest power of two, so... + if (unicode_codepoint >= ttUSHORT(data + search + rangeShift*2)) + search += rangeShift*2; + + // now decrement to bias correctly to find smallest + search -= 2; + while (entrySelector) { + stbtt_uint16 end; + searchRange >>= 1; + end = ttUSHORT(data + search + searchRange*2); + if (unicode_codepoint > end) + search += searchRange*2; + --entrySelector; + } + search += 2; + + { + stbtt_uint16 offset, start, last; + stbtt_uint16 item = (stbtt_uint16) ((search - endCount) >> 1); + + start = ttUSHORT(data + index_map + 14 + segcount*2 + 2 + 2*item); + last = ttUSHORT(data + endCount + 2*item); + if (unicode_codepoint < start || unicode_codepoint > last) + return 0; + + offset = ttUSHORT(data + index_map + 14 + segcount*6 + 2 + 2*item); + if (offset == 0) + return (stbtt_uint16) (unicode_codepoint + ttSHORT(data + index_map + 14 + segcount*4 + 2 + 2*item)); + + return ttUSHORT(data + offset + (unicode_codepoint-start)*2 + index_map + 14 + segcount*6 + 2 + 2*item); + } + } else if (format == 12 || format == 13) { + stbtt_uint32 ngroups = ttULONG(data+index_map+12); + stbtt_int32 low,high; + low = 0; high = (stbtt_int32)ngroups; + // Binary search the right group. + while (low < high) { + stbtt_int32 mid = low + ((high-low) >> 1); // rounds down, so low <= mid < high + stbtt_uint32 start_char = ttULONG(data+index_map+16+mid*12); + stbtt_uint32 end_char = ttULONG(data+index_map+16+mid*12+4); + if ((stbtt_uint32) unicode_codepoint < start_char) + high = mid; + else if ((stbtt_uint32) unicode_codepoint > end_char) + low = mid+1; + else { + stbtt_uint32 start_glyph = ttULONG(data+index_map+16+mid*12+8); + if (format == 12) + return start_glyph + unicode_codepoint-start_char; + else // format == 13 + return start_glyph; + } + } + return 0; // not found + } + // @TODO + STBTT_assert(0); + return 0; +} + +STBTT_DEF int stbtt_GetCodepointShape(const stbtt_fontinfo *info, int unicode_codepoint, stbtt_vertex **vertices) +{ + return stbtt_GetGlyphShape(info, stbtt_FindGlyphIndex(info, unicode_codepoint), vertices); +} + +static void stbtt_setvertex(stbtt_vertex *v, stbtt_uint8 type, stbtt_int32 x, stbtt_int32 y, stbtt_int32 cx, stbtt_int32 cy) +{ + v->type = type; + v->x = (stbtt_int16) x; + v->y = (stbtt_int16) y; + v->cx = (stbtt_int16) cx; + v->cy = (stbtt_int16) cy; +} + +static int stbtt__GetGlyfOffset(const stbtt_fontinfo *info, int glyph_index) +{ + int g1,g2; + + STBTT_assert(!info->cff.size); + + if (glyph_index >= info->numGlyphs) return -1; // glyph index out of range + if (info->indexToLocFormat >= 2) return -1; // unknown index->glyph map format + + if (info->indexToLocFormat == 0) { + g1 = info->glyf + ttUSHORT(info->data + info->loca + glyph_index * 2) * 2; + g2 = info->glyf + ttUSHORT(info->data + info->loca + glyph_index * 2 + 2) * 2; + } else { + g1 = info->glyf + ttULONG (info->data + info->loca + glyph_index * 4); + g2 = info->glyf + ttULONG (info->data + info->loca + glyph_index * 4 + 4); + } + + return g1==g2 ? -1 : g1; // if length is 0, return -1 +} + +static int stbtt__GetGlyphInfoT2(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1); + +STBTT_DEF int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1) +{ + if (info->cff.size) { + stbtt__GetGlyphInfoT2(info, glyph_index, x0, y0, x1, y1); + } else { + int g = stbtt__GetGlyfOffset(info, glyph_index); + if (g < 0) return 0; + + if (x0) *x0 = ttSHORT(info->data + g + 2); + if (y0) *y0 = ttSHORT(info->data + g + 4); + if (x1) *x1 = ttSHORT(info->data + g + 6); + if (y1) *y1 = ttSHORT(info->data + g + 8); + } + return 1; +} + +STBTT_DEF int stbtt_GetCodepointBox(const stbtt_fontinfo *info, int codepoint, int *x0, int *y0, int *x1, int *y1) +{ + return stbtt_GetGlyphBox(info, stbtt_FindGlyphIndex(info,codepoint), x0,y0,x1,y1); +} + +STBTT_DEF int stbtt_IsGlyphEmpty(const stbtt_fontinfo *info, int glyph_index) +{ + stbtt_int16 numberOfContours; + int g; + if (info->cff.size) + return stbtt__GetGlyphInfoT2(info, glyph_index, NULL, NULL, NULL, NULL) == 0; + g = stbtt__GetGlyfOffset(info, glyph_index); + if (g < 0) return 1; + numberOfContours = ttSHORT(info->data + g); + return numberOfContours == 0; +} + +static int stbtt__close_shape(stbtt_vertex *vertices, int num_vertices, int was_off, int start_off, + stbtt_int32 sx, stbtt_int32 sy, stbtt_int32 scx, stbtt_int32 scy, stbtt_int32 cx, stbtt_int32 cy) +{ + if (start_off) { + if (was_off) + stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, (cx+scx)>>1, (cy+scy)>>1, cx,cy); + stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, sx,sy,scx,scy); + } else { + if (was_off) + stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve,sx,sy,cx,cy); + else + stbtt_setvertex(&vertices[num_vertices++], STBTT_vline,sx,sy,0,0); + } + return num_vertices; +} + +static int stbtt__GetGlyphShapeTT(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices) +{ + stbtt_int16 numberOfContours; + stbtt_uint8 *endPtsOfContours; + stbtt_uint8 *data = info->data; + stbtt_vertex *vertices=0; + int num_vertices=0; + int g = stbtt__GetGlyfOffset(info, glyph_index); + + *pvertices = NULL; + + if (g < 0) return 0; + + numberOfContours = ttSHORT(data + g); + + if (numberOfContours > 0) { + stbtt_uint8 flags=0,flagcount; + stbtt_int32 ins, i,j=0,m,n, next_move, was_off=0, off, start_off=0; + stbtt_int32 x,y,cx,cy,sx,sy, scx,scy; + stbtt_uint8 *points; + endPtsOfContours = (data + g + 10); + ins = ttUSHORT(data + g + 10 + numberOfContours * 2); + points = data + g + 10 + numberOfContours * 2 + 2 + ins; + + n = 1+ttUSHORT(endPtsOfContours + numberOfContours*2-2); + + m = n + 2*numberOfContours; // a loose bound on how many vertices we might need + vertices = (stbtt_vertex *) STBTT_malloc(m * sizeof(vertices[0]), info->userdata); + if (vertices == 0) + return 0; + + next_move = 0; + flagcount=0; + + // in first pass, we load uninterpreted data into the allocated array + // above, shifted to the end of the array so we won't overwrite it when + // we create our final data starting from the front + + off = m - n; // starting offset for uninterpreted data, regardless of how m ends up being calculated + + // first load flags + + for (i=0; i < n; ++i) { + if (flagcount == 0) { + flags = *points++; + if (flags & 8) + flagcount = *points++; + } else + --flagcount; + vertices[off+i].type = flags; + } + + // now load x coordinates + x=0; + for (i=0; i < n; ++i) { + flags = vertices[off+i].type; + if (flags & 2) { + stbtt_int16 dx = *points++; + x += (flags & 16) ? dx : -dx; // ??? + } else { + if (!(flags & 16)) { + x = x + (stbtt_int16) (points[0]*256 + points[1]); + points += 2; + } + } + vertices[off+i].x = (stbtt_int16) x; + } + + // now load y coordinates + y=0; + for (i=0; i < n; ++i) { + flags = vertices[off+i].type; + if (flags & 4) { + stbtt_int16 dy = *points++; + y += (flags & 32) ? dy : -dy; // ??? + } else { + if (!(flags & 32)) { + y = y + (stbtt_int16) (points[0]*256 + points[1]); + points += 2; + } + } + vertices[off+i].y = (stbtt_int16) y; + } + + // now convert them to our format + num_vertices=0; + sx = sy = cx = cy = scx = scy = 0; + for (i=0; i < n; ++i) { + flags = vertices[off+i].type; + x = (stbtt_int16) vertices[off+i].x; + y = (stbtt_int16) vertices[off+i].y; + + if (next_move == i) { + if (i != 0) + num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy); + + // now start the new one + start_off = !(flags & 1); + if (start_off) { + // if we start off with an off-curve point, then when we need to find a point on the curve + // where we can start, and we need to save some state for when we wraparound. + scx = x; + scy = y; + if (!(vertices[off+i+1].type & 1)) { + // next point is also a curve point, so interpolate an on-point curve + sx = (x + (stbtt_int32) vertices[off+i+1].x) >> 1; + sy = (y + (stbtt_int32) vertices[off+i+1].y) >> 1; + } else { + // otherwise just use the next point as our start point + sx = (stbtt_int32) vertices[off+i+1].x; + sy = (stbtt_int32) vertices[off+i+1].y; + ++i; // we're using point i+1 as the starting point, so skip it + } + } else { + sx = x; + sy = y; + } + stbtt_setvertex(&vertices[num_vertices++], STBTT_vmove,sx,sy,0,0); + was_off = 0; + next_move = 1 + ttUSHORT(endPtsOfContours+j*2); + ++j; + } else { + if (!(flags & 1)) { // if it's a curve + if (was_off) // two off-curve control points in a row means interpolate an on-curve midpoint + stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, (cx+x)>>1, (cy+y)>>1, cx, cy); + cx = x; + cy = y; + was_off = 1; + } else { + if (was_off) + stbtt_setvertex(&vertices[num_vertices++], STBTT_vcurve, x,y, cx, cy); + else + stbtt_setvertex(&vertices[num_vertices++], STBTT_vline, x,y,0,0); + was_off = 0; + } + } + } + num_vertices = stbtt__close_shape(vertices, num_vertices, was_off, start_off, sx,sy,scx,scy,cx,cy); + } else if (numberOfContours < 0) { + // Compound shapes. + int more = 1; + stbtt_uint8 *comp = data + g + 10; + num_vertices = 0; + vertices = 0; + while (more) { + stbtt_uint16 flags, gidx; + int comp_num_verts = 0, i; + stbtt_vertex *comp_verts = 0, *tmp = 0; + float mtx[6] = {1,0,0,1,0,0}, m, n; + + flags = ttSHORT(comp); comp+=2; + gidx = ttSHORT(comp); comp+=2; + + if (flags & 2) { // XY values + if (flags & 1) { // shorts + mtx[4] = ttSHORT(comp); comp+=2; + mtx[5] = ttSHORT(comp); comp+=2; + } else { + mtx[4] = ttCHAR(comp); comp+=1; + mtx[5] = ttCHAR(comp); comp+=1; + } + } + else { + // @TODO handle matching point + STBTT_assert(0); + } + if (flags & (1<<3)) { // WE_HAVE_A_SCALE + mtx[0] = mtx[3] = ttSHORT(comp)/16384.0f; comp+=2; + mtx[1] = mtx[2] = 0; + } else if (flags & (1<<6)) { // WE_HAVE_AN_X_AND_YSCALE + mtx[0] = ttSHORT(comp)/16384.0f; comp+=2; + mtx[1] = mtx[2] = 0; + mtx[3] = ttSHORT(comp)/16384.0f; comp+=2; + } else if (flags & (1<<7)) { // WE_HAVE_A_TWO_BY_TWO + mtx[0] = ttSHORT(comp)/16384.0f; comp+=2; + mtx[1] = ttSHORT(comp)/16384.0f; comp+=2; + mtx[2] = ttSHORT(comp)/16384.0f; comp+=2; + mtx[3] = ttSHORT(comp)/16384.0f; comp+=2; + } + + // Find transformation scales. + m = (float) STBTT_sqrt(mtx[0]*mtx[0] + mtx[1]*mtx[1]); + n = (float) STBTT_sqrt(mtx[2]*mtx[2] + mtx[3]*mtx[3]); + + // Get indexed glyph. + comp_num_verts = stbtt_GetGlyphShape(info, gidx, &comp_verts); + if (comp_num_verts > 0) { + // Transform vertices. + for (i = 0; i < comp_num_verts; ++i) { + stbtt_vertex* v = &comp_verts[i]; + stbtt_vertex_type x,y; + x=v->x; y=v->y; + v->x = (stbtt_vertex_type)(m * (mtx[0]*x + mtx[2]*y + mtx[4])); + v->y = (stbtt_vertex_type)(n * (mtx[1]*x + mtx[3]*y + mtx[5])); + x=v->cx; y=v->cy; + v->cx = (stbtt_vertex_type)(m * (mtx[0]*x + mtx[2]*y + mtx[4])); + v->cy = (stbtt_vertex_type)(n * (mtx[1]*x + mtx[3]*y + mtx[5])); + } + // Append vertices. + tmp = (stbtt_vertex*)STBTT_malloc((num_vertices+comp_num_verts)*sizeof(stbtt_vertex), info->userdata); + if (!tmp) { + if (vertices) STBTT_free(vertices, info->userdata); + if (comp_verts) STBTT_free(comp_verts, info->userdata); + return 0; + } + if (num_vertices > 0 && vertices) STBTT_memcpy(tmp, vertices, num_vertices*sizeof(stbtt_vertex)); + STBTT_memcpy(tmp+num_vertices, comp_verts, comp_num_verts*sizeof(stbtt_vertex)); + if (vertices) STBTT_free(vertices, info->userdata); + vertices = tmp; + STBTT_free(comp_verts, info->userdata); + num_vertices += comp_num_verts; + } + // More components ? + more = flags & (1<<5); + } + } else { + // numberOfCounters == 0, do nothing + } + + *pvertices = vertices; + return num_vertices; +} + +typedef struct +{ + int bounds; + int started; + float first_x, first_y; + float x, y; + stbtt_int32 min_x, max_x, min_y, max_y; + + stbtt_vertex *pvertices; + int num_vertices; +} stbtt__csctx; + +#define STBTT__CSCTX_INIT(bounds) {bounds,0, 0,0, 0,0, 0,0,0,0, NULL, 0} + +static void stbtt__track_vertex(stbtt__csctx *c, stbtt_int32 x, stbtt_int32 y) +{ + if (x > c->max_x || !c->started) c->max_x = x; + if (y > c->max_y || !c->started) c->max_y = y; + if (x < c->min_x || !c->started) c->min_x = x; + if (y < c->min_y || !c->started) c->min_y = y; + c->started = 1; +} + +static void stbtt__csctx_v(stbtt__csctx *c, stbtt_uint8 type, stbtt_int32 x, stbtt_int32 y, stbtt_int32 cx, stbtt_int32 cy, stbtt_int32 cx1, stbtt_int32 cy1) +{ + if (c->bounds) { + stbtt__track_vertex(c, x, y); + if (type == STBTT_vcubic) { + stbtt__track_vertex(c, cx, cy); + stbtt__track_vertex(c, cx1, cy1); + } + } else { + stbtt_setvertex(&c->pvertices[c->num_vertices], type, x, y, cx, cy); + c->pvertices[c->num_vertices].cx1 = (stbtt_int16) cx1; + c->pvertices[c->num_vertices].cy1 = (stbtt_int16) cy1; + } + c->num_vertices++; +} + +static void stbtt__csctx_close_shape(stbtt__csctx *ctx) +{ + if (ctx->first_x != ctx->x || ctx->first_y != ctx->y) + stbtt__csctx_v(ctx, STBTT_vline, (int)ctx->first_x, (int)ctx->first_y, 0, 0, 0, 0); +} + +static void stbtt__csctx_rmove_to(stbtt__csctx *ctx, float dx, float dy) +{ + stbtt__csctx_close_shape(ctx); + ctx->first_x = ctx->x = ctx->x + dx; + ctx->first_y = ctx->y = ctx->y + dy; + stbtt__csctx_v(ctx, STBTT_vmove, (int)ctx->x, (int)ctx->y, 0, 0, 0, 0); +} + +static void stbtt__csctx_rline_to(stbtt__csctx *ctx, float dx, float dy) +{ + ctx->x += dx; + ctx->y += dy; + stbtt__csctx_v(ctx, STBTT_vline, (int)ctx->x, (int)ctx->y, 0, 0, 0, 0); +} + +static void stbtt__csctx_rccurve_to(stbtt__csctx *ctx, float dx1, float dy1, float dx2, float dy2, float dx3, float dy3) +{ + float cx1 = ctx->x + dx1; + float cy1 = ctx->y + dy1; + float cx2 = cx1 + dx2; + float cy2 = cy1 + dy2; + ctx->x = cx2 + dx3; + ctx->y = cy2 + dy3; + stbtt__csctx_v(ctx, STBTT_vcubic, (int)ctx->x, (int)ctx->y, (int)cx1, (int)cy1, (int)cx2, (int)cy2); +} + +static stbtt__buf stbtt__get_subr(stbtt__buf idx, int n) +{ + int count = stbtt__cff_index_count(&idx); + int bias = 107; + if (count >= 33900) + bias = 32768; + else if (count >= 1240) + bias = 1131; + n += bias; + if (n < 0 || n >= count) + return stbtt__new_buf(NULL, 0); + return stbtt__cff_index_get(idx, n); +} + +static stbtt__buf stbtt__cid_get_glyph_subrs(const stbtt_fontinfo *info, int glyph_index) +{ + stbtt__buf fdselect = info->fdselect; + int nranges, start, end, v, fmt, fdselector = -1, i; + + stbtt__buf_seek(&fdselect, 0); + fmt = stbtt__buf_get8(&fdselect); + if (fmt == 0) { + // untested + stbtt__buf_skip(&fdselect, glyph_index); + fdselector = stbtt__buf_get8(&fdselect); + } else if (fmt == 3) { + nranges = stbtt__buf_get16(&fdselect); + start = stbtt__buf_get16(&fdselect); + for (i = 0; i < nranges; i++) { + v = stbtt__buf_get8(&fdselect); + end = stbtt__buf_get16(&fdselect); + if (glyph_index >= start && glyph_index < end) { + fdselector = v; + break; + } + start = end; + } + } + if (fdselector == -1) stbtt__new_buf(NULL, 0); + return stbtt__get_subrs(info->cff, stbtt__cff_index_get(info->fontdicts, fdselector)); +} + +static int stbtt__run_charstring(const stbtt_fontinfo *info, int glyph_index, stbtt__csctx *c) +{ + int in_header = 1, maskbits = 0, subr_stack_height = 0, sp = 0, v, i, b0; + int has_subrs = 0, clear_stack; + float s[48]; + stbtt__buf subr_stack[10], subrs = info->subrs, b; + float f; + +#define STBTT__CSERR(s) (0) + + // this currently ignores the initial width value, which isn't needed if we have hmtx + b = stbtt__cff_index_get(info->charstrings, glyph_index); + while (b.cursor < b.size) { + i = 0; + clear_stack = 1; + b0 = stbtt__buf_get8(&b); + switch (b0) { + // @TODO implement hinting + case 0x13: // hintmask + case 0x14: // cntrmask + if (in_header) + maskbits += (sp / 2); // implicit "vstem" + in_header = 0; + stbtt__buf_skip(&b, (maskbits + 7) / 8); + break; + + case 0x01: // hstem + case 0x03: // vstem + case 0x12: // hstemhm + case 0x17: // vstemhm + maskbits += (sp / 2); + break; + + case 0x15: // rmoveto + in_header = 0; + if (sp < 2) return STBTT__CSERR("rmoveto stack"); + stbtt__csctx_rmove_to(c, s[sp-2], s[sp-1]); + break; + case 0x04: // vmoveto + in_header = 0; + if (sp < 1) return STBTT__CSERR("vmoveto stack"); + stbtt__csctx_rmove_to(c, 0, s[sp-1]); + break; + case 0x16: // hmoveto + in_header = 0; + if (sp < 1) return STBTT__CSERR("hmoveto stack"); + stbtt__csctx_rmove_to(c, s[sp-1], 0); + break; + + case 0x05: // rlineto + if (sp < 2) return STBTT__CSERR("rlineto stack"); + for (; i + 1 < sp; i += 2) + stbtt__csctx_rline_to(c, s[i], s[i+1]); + break; + + // hlineto/vlineto and vhcurveto/hvcurveto alternate horizontal and vertical + // starting from a different place. + + case 0x07: // vlineto + if (sp < 1) return STBTT__CSERR("vlineto stack"); + goto vlineto; + case 0x06: // hlineto + if (sp < 1) return STBTT__CSERR("hlineto stack"); + for (;;) { + if (i >= sp) break; + stbtt__csctx_rline_to(c, s[i], 0); + i++; + vlineto: + if (i >= sp) break; + stbtt__csctx_rline_to(c, 0, s[i]); + i++; + } + break; + + case 0x1F: // hvcurveto + if (sp < 4) return STBTT__CSERR("hvcurveto stack"); + goto hvcurveto; + case 0x1E: // vhcurveto + if (sp < 4) return STBTT__CSERR("vhcurveto stack"); + for (;;) { + if (i + 3 >= sp) break; + stbtt__csctx_rccurve_to(c, 0, s[i], s[i+1], s[i+2], s[i+3], (sp - i == 5) ? s[i + 4] : 0.0f); + i += 4; + hvcurveto: + if (i + 3 >= sp) break; + stbtt__csctx_rccurve_to(c, s[i], 0, s[i+1], s[i+2], (sp - i == 5) ? s[i+4] : 0.0f, s[i+3]); + i += 4; + } + break; + + case 0x08: // rrcurveto + if (sp < 6) return STBTT__CSERR("rcurveline stack"); + for (; i + 5 < sp; i += 6) + stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]); + break; + + case 0x18: // rcurveline + if (sp < 8) return STBTT__CSERR("rcurveline stack"); + for (; i + 5 < sp - 2; i += 6) + stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]); + if (i + 1 >= sp) return STBTT__CSERR("rcurveline stack"); + stbtt__csctx_rline_to(c, s[i], s[i+1]); + break; + + case 0x19: // rlinecurve + if (sp < 8) return STBTT__CSERR("rlinecurve stack"); + for (; i + 1 < sp - 6; i += 2) + stbtt__csctx_rline_to(c, s[i], s[i+1]); + if (i + 5 >= sp) return STBTT__CSERR("rlinecurve stack"); + stbtt__csctx_rccurve_to(c, s[i], s[i+1], s[i+2], s[i+3], s[i+4], s[i+5]); + break; + + case 0x1A: // vvcurveto + case 0x1B: // hhcurveto + if (sp < 4) return STBTT__CSERR("(vv|hh)curveto stack"); + f = 0.0; + if (sp & 1) { f = s[i]; i++; } + for (; i + 3 < sp; i += 4) { + if (b0 == 0x1B) + stbtt__csctx_rccurve_to(c, s[i], f, s[i+1], s[i+2], s[i+3], 0.0); + else + stbtt__csctx_rccurve_to(c, f, s[i], s[i+1], s[i+2], 0.0, s[i+3]); + f = 0.0; + } + break; + + case 0x0A: // callsubr + if (!has_subrs) { + if (info->fdselect.size) + subrs = stbtt__cid_get_glyph_subrs(info, glyph_index); + has_subrs = 1; + } + // FALLTHROUGH + case 0x1D: // callgsubr + if (sp < 1) return STBTT__CSERR("call(g|)subr stack"); + v = (int) s[--sp]; + if (subr_stack_height >= 10) return STBTT__CSERR("recursion limit"); + subr_stack[subr_stack_height++] = b; + b = stbtt__get_subr(b0 == 0x0A ? subrs : info->gsubrs, v); + if (b.size == 0) return STBTT__CSERR("subr not found"); + b.cursor = 0; + clear_stack = 0; + break; + + case 0x0B: // return + if (subr_stack_height <= 0) return STBTT__CSERR("return outside subr"); + b = subr_stack[--subr_stack_height]; + clear_stack = 0; + break; + + case 0x0E: // endchar + stbtt__csctx_close_shape(c); + return 1; + + case 0x0C: { // two-byte escape + float dx1, dx2, dx3, dx4, dx5, dx6, dy1, dy2, dy3, dy4, dy5, dy6; + float dx, dy; + int b1 = stbtt__buf_get8(&b); + switch (b1) { + // @TODO These "flex" implementations ignore the flex-depth and resolution, + // and always draw beziers. + case 0x22: // hflex + if (sp < 7) return STBTT__CSERR("hflex stack"); + dx1 = s[0]; + dx2 = s[1]; + dy2 = s[2]; + dx3 = s[3]; + dx4 = s[4]; + dx5 = s[5]; + dx6 = s[6]; + stbtt__csctx_rccurve_to(c, dx1, 0, dx2, dy2, dx3, 0); + stbtt__csctx_rccurve_to(c, dx4, 0, dx5, -dy2, dx6, 0); + break; + + case 0x23: // flex + if (sp < 13) return STBTT__CSERR("flex stack"); + dx1 = s[0]; + dy1 = s[1]; + dx2 = s[2]; + dy2 = s[3]; + dx3 = s[4]; + dy3 = s[5]; + dx4 = s[6]; + dy4 = s[7]; + dx5 = s[8]; + dy5 = s[9]; + dx6 = s[10]; + dy6 = s[11]; + //fd is s[12] + stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3); + stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6); + break; + + case 0x24: // hflex1 + if (sp < 9) return STBTT__CSERR("hflex1 stack"); + dx1 = s[0]; + dy1 = s[1]; + dx2 = s[2]; + dy2 = s[3]; + dx3 = s[4]; + dx4 = s[5]; + dx5 = s[6]; + dy5 = s[7]; + dx6 = s[8]; + stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, 0); + stbtt__csctx_rccurve_to(c, dx4, 0, dx5, dy5, dx6, -(dy1+dy2+dy5)); + break; + + case 0x25: // flex1 + if (sp < 11) return STBTT__CSERR("flex1 stack"); + dx1 = s[0]; + dy1 = s[1]; + dx2 = s[2]; + dy2 = s[3]; + dx3 = s[4]; + dy3 = s[5]; + dx4 = s[6]; + dy4 = s[7]; + dx5 = s[8]; + dy5 = s[9]; + dx6 = dy6 = s[10]; + dx = dx1+dx2+dx3+dx4+dx5; + dy = dy1+dy2+dy3+dy4+dy5; + if (STBTT_fabs(dx) > STBTT_fabs(dy)) + dy6 = -dy; + else + dx6 = -dx; + stbtt__csctx_rccurve_to(c, dx1, dy1, dx2, dy2, dx3, dy3); + stbtt__csctx_rccurve_to(c, dx4, dy4, dx5, dy5, dx6, dy6); + break; + + default: + return STBTT__CSERR("unimplemented"); + } + } break; + + default: + if (b0 != 255 && b0 != 28 && b0 < 32) + return STBTT__CSERR("reserved operator"); + + // push immediate + if (b0 == 255) { + f = (float)(stbtt_int32)stbtt__buf_get32(&b) / 0x10000; + } else { + stbtt__buf_skip(&b, -1); + f = (float)(stbtt_int16)stbtt__cff_int(&b); + } + if (sp >= 48) return STBTT__CSERR("push stack overflow"); + s[sp++] = f; + clear_stack = 0; + break; + } + if (clear_stack) sp = 0; + } + return STBTT__CSERR("no endchar"); + +#undef STBTT__CSERR +} + +static int stbtt__GetGlyphShapeT2(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices) +{ + // runs the charstring twice, once to count and once to output (to avoid realloc) + stbtt__csctx count_ctx = STBTT__CSCTX_INIT(1); + stbtt__csctx output_ctx = STBTT__CSCTX_INIT(0); + if (stbtt__run_charstring(info, glyph_index, &count_ctx)) { + *pvertices = (stbtt_vertex*)STBTT_malloc(count_ctx.num_vertices*sizeof(stbtt_vertex), info->userdata); + output_ctx.pvertices = *pvertices; + if (stbtt__run_charstring(info, glyph_index, &output_ctx)) { + STBTT_assert(output_ctx.num_vertices == count_ctx.num_vertices); + return output_ctx.num_vertices; + } + } + *pvertices = NULL; + return 0; +} + +static int stbtt__GetGlyphInfoT2(const stbtt_fontinfo *info, int glyph_index, int *x0, int *y0, int *x1, int *y1) +{ + stbtt__csctx c = STBTT__CSCTX_INIT(1); + int r = stbtt__run_charstring(info, glyph_index, &c); + if (x0) *x0 = r ? c.min_x : 0; + if (y0) *y0 = r ? c.min_y : 0; + if (x1) *x1 = r ? c.max_x : 0; + if (y1) *y1 = r ? c.max_y : 0; + return r ? c.num_vertices : 0; +} + +STBTT_DEF int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, stbtt_vertex **pvertices) +{ + if (!info->cff.size) + return stbtt__GetGlyphShapeTT(info, glyph_index, pvertices); + else + return stbtt__GetGlyphShapeT2(info, glyph_index, pvertices); +} + +STBTT_DEF void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int glyph_index, int *advanceWidth, int *leftSideBearing) +{ + stbtt_uint16 numOfLongHorMetrics = ttUSHORT(info->data+info->hhea + 34); + if (glyph_index < numOfLongHorMetrics) { + if (advanceWidth) *advanceWidth = ttSHORT(info->data + info->hmtx + 4*glyph_index); + if (leftSideBearing) *leftSideBearing = ttSHORT(info->data + info->hmtx + 4*glyph_index + 2); + } else { + if (advanceWidth) *advanceWidth = ttSHORT(info->data + info->hmtx + 4*(numOfLongHorMetrics-1)); + if (leftSideBearing) *leftSideBearing = ttSHORT(info->data + info->hmtx + 4*numOfLongHorMetrics + 2*(glyph_index - numOfLongHorMetrics)); + } +} + +STBTT_DEF int stbtt_GetKerningTableLength(const stbtt_fontinfo *info) +{ + stbtt_uint8 *data = info->data + info->kern; + + // we only look at the first table. it must be 'horizontal' and format 0. + if (!info->kern) + return 0; + if (ttUSHORT(data+2) < 1) // number of tables, need at least 1 + return 0; + if (ttUSHORT(data+8) != 1) // horizontal flag must be set in format + return 0; + + return ttUSHORT(data+10); +} + +STBTT_DEF int stbtt_GetKerningTable(const stbtt_fontinfo *info, stbtt_kerningentry* table, int table_length) +{ + stbtt_uint8 *data = info->data + info->kern; + int k, length; + + // we only look at the first table. it must be 'horizontal' and format 0. + if (!info->kern) + return 0; + if (ttUSHORT(data+2) < 1) // number of tables, need at least 1 + return 0; + if (ttUSHORT(data+8) != 1) // horizontal flag must be set in format + return 0; + + length = ttUSHORT(data+10); + if (table_length < length) + length = table_length; + + for (k = 0; k < length; k++) + { + table[k].glyph1 = ttUSHORT(data+18+(k*6)); + table[k].glyph2 = ttUSHORT(data+20+(k*6)); + table[k].advance = ttSHORT(data+22+(k*6)); + } + + return length; +} + +static int stbtt__GetGlyphKernInfoAdvance(const stbtt_fontinfo *info, int glyph1, int glyph2) +{ + stbtt_uint8 *data = info->data + info->kern; + stbtt_uint32 needle, straw; + int l, r, m; + + // we only look at the first table. it must be 'horizontal' and format 0. + if (!info->kern) + return 0; + if (ttUSHORT(data+2) < 1) // number of tables, need at least 1 + return 0; + if (ttUSHORT(data+8) != 1) // horizontal flag must be set in format + return 0; + + l = 0; + r = ttUSHORT(data+10) - 1; + needle = glyph1 << 16 | glyph2; + while (l <= r) { + m = (l + r) >> 1; + straw = ttULONG(data+18+(m*6)); // note: unaligned read + if (needle < straw) + r = m - 1; + else if (needle > straw) + l = m + 1; + else + return ttSHORT(data+22+(m*6)); + } + return 0; +} + +static stbtt_int32 stbtt__GetCoverageIndex(stbtt_uint8 *coverageTable, int glyph) +{ + stbtt_uint16 coverageFormat = ttUSHORT(coverageTable); + switch (coverageFormat) { + case 1: { + stbtt_uint16 glyphCount = ttUSHORT(coverageTable + 2); + + // Binary search. + stbtt_int32 l=0, r=glyphCount-1, m; + int straw, needle=glyph; + while (l <= r) { + stbtt_uint8 *glyphArray = coverageTable + 4; + stbtt_uint16 glyphID; + m = (l + r) >> 1; + glyphID = ttUSHORT(glyphArray + 2 * m); + straw = glyphID; + if (needle < straw) + r = m - 1; + else if (needle > straw) + l = m + 1; + else { + return m; + } + } + break; + } + + case 2: { + stbtt_uint16 rangeCount = ttUSHORT(coverageTable + 2); + stbtt_uint8 *rangeArray = coverageTable + 4; + + // Binary search. + stbtt_int32 l=0, r=rangeCount-1, m; + int strawStart, strawEnd, needle=glyph; + while (l <= r) { + stbtt_uint8 *rangeRecord; + m = (l + r) >> 1; + rangeRecord = rangeArray + 6 * m; + strawStart = ttUSHORT(rangeRecord); + strawEnd = ttUSHORT(rangeRecord + 2); + if (needle < strawStart) + r = m - 1; + else if (needle > strawEnd) + l = m + 1; + else { + stbtt_uint16 startCoverageIndex = ttUSHORT(rangeRecord + 4); + return startCoverageIndex + glyph - strawStart; + } + } + break; + } + + default: return -1; // unsupported + } + + return -1; +} + +static stbtt_int32 stbtt__GetGlyphClass(stbtt_uint8 *classDefTable, int glyph) +{ + stbtt_uint16 classDefFormat = ttUSHORT(classDefTable); + switch (classDefFormat) + { + case 1: { + stbtt_uint16 startGlyphID = ttUSHORT(classDefTable + 2); + stbtt_uint16 glyphCount = ttUSHORT(classDefTable + 4); + stbtt_uint8 *classDef1ValueArray = classDefTable + 6; + + if (glyph >= startGlyphID && glyph < startGlyphID + glyphCount) + return (stbtt_int32)ttUSHORT(classDef1ValueArray + 2 * (glyph - startGlyphID)); + break; + } + + case 2: { + stbtt_uint16 classRangeCount = ttUSHORT(classDefTable + 2); + stbtt_uint8 *classRangeRecords = classDefTable + 4; + + // Binary search. + stbtt_int32 l=0, r=classRangeCount-1, m; + int strawStart, strawEnd, needle=glyph; + while (l <= r) { + stbtt_uint8 *classRangeRecord; + m = (l + r) >> 1; + classRangeRecord = classRangeRecords + 6 * m; + strawStart = ttUSHORT(classRangeRecord); + strawEnd = ttUSHORT(classRangeRecord + 2); + if (needle < strawStart) + r = m - 1; + else if (needle > strawEnd) + l = m + 1; + else + return (stbtt_int32)ttUSHORT(classRangeRecord + 4); + } + break; + } + + default: + return -1; // Unsupported definition type, return an error. + } + + // "All glyphs not assigned to a class fall into class 0". (OpenType spec) + return 0; +} + +// Define to STBTT_assert(x) if you want to break on unimplemented formats. +#define STBTT_GPOS_TODO_assert(x) + +static stbtt_int32 stbtt__GetGlyphGPOSInfoAdvance(const stbtt_fontinfo *info, int glyph1, int glyph2) +{ + stbtt_uint16 lookupListOffset; + stbtt_uint8 *lookupList; + stbtt_uint16 lookupCount; + stbtt_uint8 *data; + stbtt_int32 i, sti; + + if (!info->gpos) return 0; + + data = info->data + info->gpos; + + if (ttUSHORT(data+0) != 1) return 0; // Major version 1 + if (ttUSHORT(data+2) != 0) return 0; // Minor version 0 + + lookupListOffset = ttUSHORT(data+8); + lookupList = data + lookupListOffset; + lookupCount = ttUSHORT(lookupList); + + for (i=0; i= pairSetCount) return 0; + + needle=glyph2; + r=pairValueCount-1; + l=0; + + // Binary search. + while (l <= r) { + stbtt_uint16 secondGlyph; + stbtt_uint8 *pairValue; + m = (l + r) >> 1; + pairValue = pairValueArray + (2 + valueRecordPairSizeInBytes) * m; + secondGlyph = ttUSHORT(pairValue); + straw = secondGlyph; + if (needle < straw) + r = m - 1; + else if (needle > straw) + l = m + 1; + else { + stbtt_int16 xAdvance = ttSHORT(pairValue + 2); + return xAdvance; + } + } + } else + return 0; + break; + } + + case 2: { + stbtt_uint16 valueFormat1 = ttUSHORT(table + 4); + stbtt_uint16 valueFormat2 = ttUSHORT(table + 6); + if (valueFormat1 == 4 && valueFormat2 == 0) { // Support more formats? + stbtt_uint16 classDef1Offset = ttUSHORT(table + 8); + stbtt_uint16 classDef2Offset = ttUSHORT(table + 10); + int glyph1class = stbtt__GetGlyphClass(table + classDef1Offset, glyph1); + int glyph2class = stbtt__GetGlyphClass(table + classDef2Offset, glyph2); + + stbtt_uint16 class1Count = ttUSHORT(table + 12); + stbtt_uint16 class2Count = ttUSHORT(table + 14); + stbtt_uint8 *class1Records, *class2Records; + stbtt_int16 xAdvance; + + if (glyph1class < 0 || glyph1class >= class1Count) return 0; // malformed + if (glyph2class < 0 || glyph2class >= class2Count) return 0; // malformed + + class1Records = table + 16; + class2Records = class1Records + 2 * (glyph1class * class2Count); + xAdvance = ttSHORT(class2Records + 2 * glyph2class); + return xAdvance; + } else + return 0; + break; + } + + default: + return 0; // Unsupported position format + } + } + } + + return 0; +} + +STBTT_DEF int stbtt_GetGlyphKernAdvance(const stbtt_fontinfo *info, int g1, int g2) +{ + int xAdvance = 0; + + if (info->gpos) + xAdvance += stbtt__GetGlyphGPOSInfoAdvance(info, g1, g2); + else if (info->kern) + xAdvance += stbtt__GetGlyphKernInfoAdvance(info, g1, g2); + + return xAdvance; +} + +STBTT_DEF int stbtt_GetCodepointKernAdvance(const stbtt_fontinfo *info, int ch1, int ch2) +{ + if (!info->kern && !info->gpos) // if no kerning table, don't waste time looking up both codepoint->glyphs + return 0; + return stbtt_GetGlyphKernAdvance(info, stbtt_FindGlyphIndex(info,ch1), stbtt_FindGlyphIndex(info,ch2)); +} + +STBTT_DEF void stbtt_GetCodepointHMetrics(const stbtt_fontinfo *info, int codepoint, int *advanceWidth, int *leftSideBearing) +{ + stbtt_GetGlyphHMetrics(info, stbtt_FindGlyphIndex(info,codepoint), advanceWidth, leftSideBearing); +} + +STBTT_DEF void stbtt_GetFontVMetrics(const stbtt_fontinfo *info, int *ascent, int *descent, int *lineGap) +{ + if (ascent ) *ascent = ttSHORT(info->data+info->hhea + 4); + if (descent) *descent = ttSHORT(info->data+info->hhea + 6); + if (lineGap) *lineGap = ttSHORT(info->data+info->hhea + 8); +} + +STBTT_DEF int stbtt_GetFontVMetricsOS2(const stbtt_fontinfo *info, int *typoAscent, int *typoDescent, int *typoLineGap) +{ + int tab = stbtt__find_table(info->data, info->fontstart, "OS/2"); + if (!tab) + return 0; + if (typoAscent ) *typoAscent = ttSHORT(info->data+tab + 68); + if (typoDescent) *typoDescent = ttSHORT(info->data+tab + 70); + if (typoLineGap) *typoLineGap = ttSHORT(info->data+tab + 72); + return 1; +} + +STBTT_DEF void stbtt_GetFontBoundingBox(const stbtt_fontinfo *info, int *x0, int *y0, int *x1, int *y1) +{ + *x0 = ttSHORT(info->data + info->head + 36); + *y0 = ttSHORT(info->data + info->head + 38); + *x1 = ttSHORT(info->data + info->head + 40); + *y1 = ttSHORT(info->data + info->head + 42); +} + +STBTT_DEF float stbtt_ScaleForPixelHeight(const stbtt_fontinfo *info, float height) +{ + int fheight = ttSHORT(info->data + info->hhea + 4) - ttSHORT(info->data + info->hhea + 6); + return (float) height / fheight; +} + +STBTT_DEF float stbtt_ScaleForMappingEmToPixels(const stbtt_fontinfo *info, float pixels) +{ + int unitsPerEm = ttUSHORT(info->data + info->head + 18); + return pixels / unitsPerEm; +} + +STBTT_DEF void stbtt_FreeShape(const stbtt_fontinfo *info, stbtt_vertex *v) +{ + STBTT_free(v, info->userdata); +} + +STBTT_DEF stbtt_uint8 *stbtt_FindSVGDoc(const stbtt_fontinfo *info, int gl) +{ + int i; + stbtt_uint8 *data = info->data; + stbtt_uint8 *svg_doc_list = data + stbtt__get_svg((stbtt_fontinfo *) info); + + int numEntries = ttUSHORT(svg_doc_list); + stbtt_uint8 *svg_docs = svg_doc_list + 2; + + for(i=0; i= ttUSHORT(svg_doc)) && (gl <= ttUSHORT(svg_doc + 2))) + return svg_doc; + } + return 0; +} + +STBTT_DEF int stbtt_GetGlyphSVG(const stbtt_fontinfo *info, int gl, const char **svg) +{ + stbtt_uint8 *data = info->data; + stbtt_uint8 *svg_doc; + + if (info->svg == 0) + return 0; + + svg_doc = stbtt_FindSVGDoc(info, gl); + if (svg_doc != NULL) { + *svg = (char *) data + info->svg + ttULONG(svg_doc + 4); + return ttULONG(svg_doc + 8); + } else { + return 0; + } +} + +STBTT_DEF int stbtt_GetCodepointSVG(const stbtt_fontinfo *info, int unicode_codepoint, const char **svg) +{ + return stbtt_GetGlyphSVG(info, stbtt_FindGlyphIndex(info, unicode_codepoint), svg); +} + +////////////////////////////////////////////////////////////////////////////// +// +// antialiasing software rasterizer +// + +STBTT_DEF void stbtt_GetGlyphBitmapBoxSubpixel(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y,float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1) +{ + int x0=0,y0=0,x1,y1; // =0 suppresses compiler warning + if (!stbtt_GetGlyphBox(font, glyph, &x0,&y0,&x1,&y1)) { + // e.g. space character + if (ix0) *ix0 = 0; + if (iy0) *iy0 = 0; + if (ix1) *ix1 = 0; + if (iy1) *iy1 = 0; + } else { + // move to integral bboxes (treating pixels as little squares, what pixels get touched)? + if (ix0) *ix0 = STBTT_ifloor( x0 * scale_x + shift_x); + if (iy0) *iy0 = STBTT_ifloor(-y1 * scale_y + shift_y); + if (ix1) *ix1 = STBTT_iceil ( x1 * scale_x + shift_x); + if (iy1) *iy1 = STBTT_iceil (-y0 * scale_y + shift_y); + } +} + +STBTT_DEF void stbtt_GetGlyphBitmapBox(const stbtt_fontinfo *font, int glyph, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1) +{ + stbtt_GetGlyphBitmapBoxSubpixel(font, glyph, scale_x, scale_y,0.0f,0.0f, ix0, iy0, ix1, iy1); +} + +STBTT_DEF void stbtt_GetCodepointBitmapBoxSubpixel(const stbtt_fontinfo *font, int codepoint, float scale_x, float scale_y, float shift_x, float shift_y, int *ix0, int *iy0, int *ix1, int *iy1) +{ + stbtt_GetGlyphBitmapBoxSubpixel(font, stbtt_FindGlyphIndex(font,codepoint), scale_x, scale_y,shift_x,shift_y, ix0,iy0,ix1,iy1); +} + +STBTT_DEF void stbtt_GetCodepointBitmapBox(const stbtt_fontinfo *font, int codepoint, float scale_x, float scale_y, int *ix0, int *iy0, int *ix1, int *iy1) +{ + stbtt_GetCodepointBitmapBoxSubpixel(font, codepoint, scale_x, scale_y,0.0f,0.0f, ix0,iy0,ix1,iy1); +} + +////////////////////////////////////////////////////////////////////////////// +// +// Rasterizer + +typedef struct stbtt__hheap_chunk +{ + struct stbtt__hheap_chunk *next; +} stbtt__hheap_chunk; + +typedef struct stbtt__hheap +{ + struct stbtt__hheap_chunk *head; + void *first_free; + int num_remaining_in_head_chunk; +} stbtt__hheap; + +static void *stbtt__hheap_alloc(stbtt__hheap *hh, size_t size, void *userdata) +{ + if (hh->first_free) { + void *p = hh->first_free; + hh->first_free = * (void **) p; + return p; + } else { + if (hh->num_remaining_in_head_chunk == 0) { + int count = (size < 32 ? 2000 : size < 128 ? 800 : 100); + stbtt__hheap_chunk *c = (stbtt__hheap_chunk *) STBTT_malloc(sizeof(stbtt__hheap_chunk) + size * count, userdata); + if (c == NULL) + return NULL; + c->next = hh->head; + hh->head = c; + hh->num_remaining_in_head_chunk = count; + } + --hh->num_remaining_in_head_chunk; + return (char *) (hh->head) + sizeof(stbtt__hheap_chunk) + size * hh->num_remaining_in_head_chunk; + } +} + +static void stbtt__hheap_free(stbtt__hheap *hh, void *p) +{ + *(void **) p = hh->first_free; + hh->first_free = p; +} + +static void stbtt__hheap_cleanup(stbtt__hheap *hh, void *userdata) +{ + stbtt__hheap_chunk *c = hh->head; + while (c) { + stbtt__hheap_chunk *n = c->next; + STBTT_free(c, userdata); + c = n; + } +} + +typedef struct stbtt__edge { + float x0,y0, x1,y1; + int invert; +} stbtt__edge; + + +typedef struct stbtt__active_edge +{ + struct stbtt__active_edge *next; + #if STBTT_RASTERIZER_VERSION==1 + int x,dx; + float ey; + int direction; + #elif STBTT_RASTERIZER_VERSION==2 + float fx,fdx,fdy; + float direction; + float sy; + float ey; + #else + #error "Unrecognized value of STBTT_RASTERIZER_VERSION" + #endif +} stbtt__active_edge; + +#if STBTT_RASTERIZER_VERSION == 1 +#define STBTT_FIXSHIFT 10 +#define STBTT_FIX (1 << STBTT_FIXSHIFT) +#define STBTT_FIXMASK (STBTT_FIX-1) + +static stbtt__active_edge *stbtt__new_active(stbtt__hheap *hh, stbtt__edge *e, int off_x, float start_point, void *userdata) +{ + stbtt__active_edge *z = (stbtt__active_edge *) stbtt__hheap_alloc(hh, sizeof(*z), userdata); + float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0); + STBTT_assert(z != NULL); + if (!z) return z; + + // round dx down to avoid overshooting + if (dxdy < 0) + z->dx = -STBTT_ifloor(STBTT_FIX * -dxdy); + else + z->dx = STBTT_ifloor(STBTT_FIX * dxdy); + + z->x = STBTT_ifloor(STBTT_FIX * e->x0 + z->dx * (start_point - e->y0)); // use z->dx so when we offset later it's by the same amount + z->x -= off_x * STBTT_FIX; + + z->ey = e->y1; + z->next = 0; + z->direction = e->invert ? 1 : -1; + return z; +} +#elif STBTT_RASTERIZER_VERSION == 2 +static stbtt__active_edge *stbtt__new_active(stbtt__hheap *hh, stbtt__edge *e, int off_x, float start_point, void *userdata) +{ + stbtt__active_edge *z = (stbtt__active_edge *) stbtt__hheap_alloc(hh, sizeof(*z), userdata); + float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0); + STBTT_assert(z != NULL); + //STBTT_assert(e->y0 <= start_point); + if (!z) return z; + z->fdx = dxdy; + z->fdy = dxdy != 0.0f ? (1.0f/dxdy) : 0.0f; + z->fx = e->x0 + dxdy * (start_point - e->y0); + z->fx -= off_x; + z->direction = e->invert ? 1.0f : -1.0f; + z->sy = e->y0; + z->ey = e->y1; + z->next = 0; + return z; +} +#else +#error "Unrecognized value of STBTT_RASTERIZER_VERSION" +#endif + +#if STBTT_RASTERIZER_VERSION == 1 +// note: this routine clips fills that extend off the edges... ideally this +// wouldn't happen, but it could happen if the truetype glyph bounding boxes +// are wrong, or if the user supplies a too-small bitmap +static void stbtt__fill_active_edges(unsigned char *scanline, int len, stbtt__active_edge *e, int max_weight) +{ + // non-zero winding fill + int x0=0, w=0; + + while (e) { + if (w == 0) { + // if we're currently at zero, we need to record the edge start point + x0 = e->x; w += e->direction; + } else { + int x1 = e->x; w += e->direction; + // if we went to zero, we need to draw + if (w == 0) { + int i = x0 >> STBTT_FIXSHIFT; + int j = x1 >> STBTT_FIXSHIFT; + + if (i < len && j >= 0) { + if (i == j) { + // x0,x1 are the same pixel, so compute combined coverage + scanline[i] = scanline[i] + (stbtt_uint8) ((x1 - x0) * max_weight >> STBTT_FIXSHIFT); + } else { + if (i >= 0) // add antialiasing for x0 + scanline[i] = scanline[i] + (stbtt_uint8) (((STBTT_FIX - (x0 & STBTT_FIXMASK)) * max_weight) >> STBTT_FIXSHIFT); + else + i = -1; // clip + + if (j < len) // add antialiasing for x1 + scanline[j] = scanline[j] + (stbtt_uint8) (((x1 & STBTT_FIXMASK) * max_weight) >> STBTT_FIXSHIFT); + else + j = len; // clip + + for (++i; i < j; ++i) // fill pixels between x0 and x1 + scanline[i] = scanline[i] + (stbtt_uint8) max_weight; + } + } + } + } + + e = e->next; + } +} + +static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e, int n, int vsubsample, int off_x, int off_y, void *userdata) +{ + stbtt__hheap hh = { 0, 0, 0 }; + stbtt__active_edge *active = NULL; + int y,j=0; + int max_weight = (255 / vsubsample); // weight per vertical scanline + int s; // vertical subsample index + unsigned char scanline_data[512], *scanline; + + if (result->w > 512) + scanline = (unsigned char *) STBTT_malloc(result->w, userdata); + else + scanline = scanline_data; + + y = off_y * vsubsample; + e[n].y0 = (off_y + result->h) * (float) vsubsample + 1; + + while (j < result->h) { + STBTT_memset(scanline, 0, result->w); + for (s=0; s < vsubsample; ++s) { + // find center of pixel for this scanline + float scan_y = y + 0.5f; + stbtt__active_edge **step = &active; + + // update all active edges; + // remove all active edges that terminate before the center of this scanline + while (*step) { + stbtt__active_edge * z = *step; + if (z->ey <= scan_y) { + *step = z->next; // delete from list + STBTT_assert(z->direction); + z->direction = 0; + stbtt__hheap_free(&hh, z); + } else { + z->x += z->dx; // advance to position for current scanline + step = &((*step)->next); // advance through list + } + } + + // resort the list if needed + for(;;) { + int changed=0; + step = &active; + while (*step && (*step)->next) { + if ((*step)->x > (*step)->next->x) { + stbtt__active_edge *t = *step; + stbtt__active_edge *q = t->next; + + t->next = q->next; + q->next = t; + *step = q; + changed = 1; + } + step = &(*step)->next; + } + if (!changed) break; + } + + // insert all edges that start before the center of this scanline -- omit ones that also end on this scanline + while (e->y0 <= scan_y) { + if (e->y1 > scan_y) { + stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y, userdata); + if (z != NULL) { + // find insertion point + if (active == NULL) + active = z; + else if (z->x < active->x) { + // insert at front + z->next = active; + active = z; + } else { + // find thing to insert AFTER + stbtt__active_edge *p = active; + while (p->next && p->next->x < z->x) + p = p->next; + // at this point, p->next->x is NOT < z->x + z->next = p->next; + p->next = z; + } + } + } + ++e; + } + + // now process all active edges in XOR fashion + if (active) + stbtt__fill_active_edges(scanline, result->w, active, max_weight); + + ++y; + } + STBTT_memcpy(result->pixels + j * result->stride, scanline, result->w); + ++j; + } + + stbtt__hheap_cleanup(&hh, userdata); + + if (scanline != scanline_data) + STBTT_free(scanline, userdata); +} + +#elif STBTT_RASTERIZER_VERSION == 2 + +// the edge passed in here does not cross the vertical line at x or the vertical line at x+1 +// (i.e. it has already been clipped to those) +static void stbtt__handle_clipped_edge(float *scanline, int x, stbtt__active_edge *e, float x0, float y0, float x1, float y1) +{ + if (y0 == y1) return; + STBTT_assert(y0 < y1); + STBTT_assert(e->sy <= e->ey); + if (y0 > e->ey) return; + if (y1 < e->sy) return; + if (y0 < e->sy) { + x0 += (x1-x0) * (e->sy - y0) / (y1-y0); + y0 = e->sy; + } + if (y1 > e->ey) { + x1 += (x1-x0) * (e->ey - y1) / (y1-y0); + y1 = e->ey; + } + + if (x0 == x) + STBTT_assert(x1 <= x+1); + else if (x0 == x+1) + STBTT_assert(x1 >= x); + else if (x0 <= x) + STBTT_assert(x1 <= x); + else if (x0 >= x+1) + STBTT_assert(x1 >= x+1); + else + STBTT_assert(x1 >= x && x1 <= x+1); + + if (x0 <= x && x1 <= x) + scanline[x] += e->direction * (y1-y0); + else if (x0 >= x+1 && x1 >= x+1) + ; + else { + STBTT_assert(x0 >= x && x0 <= x+1 && x1 >= x && x1 <= x+1); + scanline[x] += e->direction * (y1-y0) * (1-((x0-x)+(x1-x))/2); // coverage = 1 - average x position + } +} + +static float stbtt__sized_trapezoid_area(float height, float top_width, float bottom_width) +{ + STBTT_assert(top_width >= 0); + STBTT_assert(bottom_width >= 0); + return (top_width + bottom_width) / 2.0f * height; +} + +static float stbtt__position_trapezoid_area(float height, float tx0, float tx1, float bx0, float bx1) +{ + return stbtt__sized_trapezoid_area(height, tx1 - tx0, bx1 - bx0); +} + +static float stbtt__sized_triangle_area(float height, float width) +{ + return height * width / 2; +} + +static void stbtt__fill_active_edges_new(float *scanline, float *scanline_fill, int len, stbtt__active_edge *e, float y_top) +{ + float y_bottom = y_top+1; + + while (e) { + // brute force every pixel + + // compute intersection points with top & bottom + STBTT_assert(e->ey >= y_top); + + if (e->fdx == 0) { + float x0 = e->fx; + if (x0 < len) { + if (x0 >= 0) { + stbtt__handle_clipped_edge(scanline,(int) x0,e, x0,y_top, x0,y_bottom); + stbtt__handle_clipped_edge(scanline_fill-1,(int) x0+1,e, x0,y_top, x0,y_bottom); + } else { + stbtt__handle_clipped_edge(scanline_fill-1,0,e, x0,y_top, x0,y_bottom); + } + } + } else { + float x0 = e->fx; + float dx = e->fdx; + float xb = x0 + dx; + float x_top, x_bottom; + float sy0,sy1; + float dy = e->fdy; + STBTT_assert(e->sy <= y_bottom && e->ey >= y_top); + + // compute endpoints of line segment clipped to this scanline (if the + // line segment starts on this scanline. x0 is the intersection of the + // line with y_top, but that may be off the line segment. + if (e->sy > y_top) { + x_top = x0 + dx * (e->sy - y_top); + sy0 = e->sy; + } else { + x_top = x0; + sy0 = y_top; + } + if (e->ey < y_bottom) { + x_bottom = x0 + dx * (e->ey - y_top); + sy1 = e->ey; + } else { + x_bottom = xb; + sy1 = y_bottom; + } + + if (x_top >= 0 && x_bottom >= 0 && x_top < len && x_bottom < len) { + // from here on, we don't have to range check x values + + if ((int) x_top == (int) x_bottom) { + float height; + // simple case, only spans one pixel + int x = (int) x_top; + height = (sy1 - sy0) * e->direction; + STBTT_assert(x >= 0 && x < len); + scanline[x] += stbtt__position_trapezoid_area(height, x_top, x+1.0f, x_bottom, x+1.0f); + scanline_fill[x] += height; // everything right of this pixel is filled + } else { + int x,x1,x2; + float y_crossing, y_final, step, sign, area; + // covers 2+ pixels + if (x_top > x_bottom) { + // flip scanline vertically; signed area is the same + float t; + sy0 = y_bottom - (sy0 - y_top); + sy1 = y_bottom - (sy1 - y_top); + t = sy0, sy0 = sy1, sy1 = t; + t = x_bottom, x_bottom = x_top, x_top = t; + dx = -dx; + dy = -dy; + t = x0, x0 = xb, xb = t; + } + STBTT_assert(dy >= 0); + STBTT_assert(dx >= 0); + + x1 = (int) x_top; + x2 = (int) x_bottom; + // compute intersection with y axis at x1+1 + y_crossing = y_top + dy * (x1+1 - x0); + + // compute intersection with y axis at x2 + y_final = y_top + dy * (x2 - x0); + + // x1 x_top x2 x_bottom + // y_top +------|-----+------------+------------+--------|---+------------+ + // | | | | | | + // | | | | | | + // sy0 | Txxxxx|............|............|............|............| + // y_crossing | *xxxxx.......|............|............|............| + // | | xxxxx..|............|............|............| + // | | /- xx*xxxx........|............|............| + // | | dy < | xxxxxx..|............|............| + // y_final | | \- | xx*xxx.........|............| + // sy1 | | | | xxxxxB...|............| + // | | | | | | + // | | | | | | + // y_bottom +------------+------------+------------+------------+------------+ + // + // goal is to measure the area covered by '.' in each pixel + + // if x2 is right at the right edge of x1, y_crossing can blow up, github #1057 + // @TODO: maybe test against sy1 rather than y_bottom? + if (y_crossing > y_bottom) + y_crossing = y_bottom; + + sign = e->direction; + + // area of the rectangle covered from sy0..y_crossing + area = sign * (y_crossing-sy0); + + // area of the triangle (x_top,sy0), (x1+1,sy0), (x1+1,y_crossing) + scanline[x1] += stbtt__sized_triangle_area(area, x1+1 - x_top); + + // check if final y_crossing is blown up; no test case for this + if (y_final > y_bottom) { + y_final = y_bottom; + dy = (y_final - y_crossing ) / (x2 - (x1+1)); // if denom=0, y_final = y_crossing, so y_final <= y_bottom + } + + // in second pixel, area covered by line segment found in first pixel + // is always a rectangle 1 wide * the height of that line segment; this + // is exactly what the variable 'area' stores. it also gets a contribution + // from the line segment within it. the THIRD pixel will get the first + // pixel's rectangle contribution, the second pixel's rectangle contribution, + // and its own contribution. the 'own contribution' is the same in every pixel except + // the leftmost and rightmost, a trapezoid that slides down in each pixel. + // the second pixel's contribution to the third pixel will be the + // rectangle 1 wide times the height change in the second pixel, which is dy. + + step = sign * dy * 1; // dy is dy/dx, change in y for every 1 change in x, + // which multiplied by 1-pixel-width is how much pixel area changes for each step in x + // so the area advances by 'step' every time + + for (x = x1+1; x < x2; ++x) { + scanline[x] += area + step/2; // area of trapezoid is 1*step/2 + area += step; + } + STBTT_assert(STBTT_fabs(area) <= 1.01f); // accumulated error from area += step unless we round step down + STBTT_assert(sy1 > y_final-0.01f); + + // area covered in the last pixel is the rectangle from all the pixels to the left, + // plus the trapezoid filled by the line segment in this pixel all the way to the right edge + scanline[x2] += area + sign * stbtt__position_trapezoid_area(sy1-y_final, (float) x2, x2+1.0f, x_bottom, x2+1.0f); + + // the rest of the line is filled based on the total height of the line segment in this pixel + scanline_fill[x2] += sign * (sy1-sy0); + } + } else { + // if edge goes outside of box we're drawing, we require + // clipping logic. since this does not match the intended use + // of this library, we use a different, very slow brute + // force implementation + // note though that this does happen some of the time because + // x_top and x_bottom can be extrapolated at the top & bottom of + // the shape and actually lie outside the bounding box + int x; + for (x=0; x < len; ++x) { + // cases: + // + // there can be up to two intersections with the pixel. any intersection + // with left or right edges can be handled by splitting into two (or three) + // regions. intersections with top & bottom do not necessitate case-wise logic. + // + // the old way of doing this found the intersections with the left & right edges, + // then used some simple logic to produce up to three segments in sorted order + // from top-to-bottom. however, this had a problem: if an x edge was epsilon + // across the x border, then the corresponding y position might not be distinct + // from the other y segment, and it might ignored as an empty segment. to avoid + // that, we need to explicitly produce segments based on x positions. + + // rename variables to clearly-defined pairs + float y0 = y_top; + float x1 = (float) (x); + float x2 = (float) (x+1); + float x3 = xb; + float y3 = y_bottom; + + // x = e->x + e->dx * (y-y_top) + // (y-y_top) = (x - e->x) / e->dx + // y = (x - e->x) / e->dx + y_top + float y1 = (x - x0) / dx + y_top; + float y2 = (x+1 - x0) / dx + y_top; + + if (x0 < x1 && x3 > x2) { // three segments descending down-right + stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x1,y1); + stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x2,y2); + stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3); + } else if (x3 < x1 && x0 > x2) { // three segments descending down-left + stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x2,y2); + stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x1,y1); + stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x3,y3); + } else if (x0 < x1 && x3 > x1) { // two segments across x, down-right + stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x1,y1); + stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x3,y3); + } else if (x3 < x1 && x0 > x1) { // two segments across x, down-left + stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x1,y1); + stbtt__handle_clipped_edge(scanline,x,e, x1,y1, x3,y3); + } else if (x0 < x2 && x3 > x2) { // two segments across x+1, down-right + stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x2,y2); + stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3); + } else if (x3 < x2 && x0 > x2) { // two segments across x+1, down-left + stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x2,y2); + stbtt__handle_clipped_edge(scanline,x,e, x2,y2, x3,y3); + } else { // one segment + stbtt__handle_clipped_edge(scanline,x,e, x0,y0, x3,y3); + } + } + } + } + e = e->next; + } +} + +// directly AA rasterize edges w/o supersampling +static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__edge *e, int n, int vsubsample, int off_x, int off_y, void *userdata) +{ + stbtt__hheap hh = { 0, 0, 0 }; + stbtt__active_edge *active = NULL; + int y,j=0, i; + float scanline_data[129], *scanline, *scanline2; + + STBTT__NOTUSED(vsubsample); + + if (result->w > 64) + scanline = (float *) STBTT_malloc((result->w*2+1) * sizeof(float), userdata); + else + scanline = scanline_data; + + scanline2 = scanline + result->w; + + y = off_y; + e[n].y0 = (float) (off_y + result->h) + 1; + + while (j < result->h) { + // find center of pixel for this scanline + float scan_y_top = y + 0.0f; + float scan_y_bottom = y + 1.0f; + stbtt__active_edge **step = &active; + + STBTT_memset(scanline , 0, result->w*sizeof(scanline[0])); + STBTT_memset(scanline2, 0, (result->w+1)*sizeof(scanline[0])); + + // update all active edges; + // remove all active edges that terminate before the top of this scanline + while (*step) { + stbtt__active_edge * z = *step; + if (z->ey <= scan_y_top) { + *step = z->next; // delete from list + STBTT_assert(z->direction); + z->direction = 0; + stbtt__hheap_free(&hh, z); + } else { + step = &((*step)->next); // advance through list + } + } + + // insert all edges that start before the bottom of this scanline + while (e->y0 <= scan_y_bottom) { + if (e->y0 != e->y1) { + stbtt__active_edge *z = stbtt__new_active(&hh, e, off_x, scan_y_top, userdata); + if (z != NULL) { + if (j == 0 && off_y != 0) { + if (z->ey < scan_y_top) { + // this can happen due to subpixel positioning and some kind of fp rounding error i think + z->ey = scan_y_top; + } + } + STBTT_assert(z->ey >= scan_y_top); // if we get really unlucky a tiny bit of an edge can be out of bounds + // insert at front + z->next = active; + active = z; + } + } + ++e; + } + + // now process all active edges + if (active) + stbtt__fill_active_edges_new(scanline, scanline2+1, result->w, active, scan_y_top); + + { + float sum = 0; + for (i=0; i < result->w; ++i) { + float k; + int m; + sum += scanline2[i]; + k = scanline[i] + sum; + k = (float) STBTT_fabs(k)*255 + 0.5f; + m = (int) k; + if (m > 255) m = 255; + result->pixels[j*result->stride + i] = (unsigned char) m; + } + } + // advance all the edges + step = &active; + while (*step) { + stbtt__active_edge *z = *step; + z->fx += z->fdx; // advance to position for current scanline + step = &((*step)->next); // advance through list + } + + ++y; + ++j; + } + + stbtt__hheap_cleanup(&hh, userdata); + + if (scanline != scanline_data) + STBTT_free(scanline, userdata); +} +#else +#error "Unrecognized value of STBTT_RASTERIZER_VERSION" +#endif + +#define STBTT__COMPARE(a,b) ((a)->y0 < (b)->y0) + +static void stbtt__sort_edges_ins_sort(stbtt__edge *p, int n) +{ + int i,j; + for (i=1; i < n; ++i) { + stbtt__edge t = p[i], *a = &t; + j = i; + while (j > 0) { + stbtt__edge *b = &p[j-1]; + int c = STBTT__COMPARE(a,b); + if (!c) break; + p[j] = p[j-1]; + --j; + } + if (i != j) + p[j] = t; + } +} + +static void stbtt__sort_edges_quicksort(stbtt__edge *p, int n) +{ + /* threshold for transitioning to insertion sort */ + while (n > 12) { + stbtt__edge t; + int c01,c12,c,m,i,j; + + /* compute median of three */ + m = n >> 1; + c01 = STBTT__COMPARE(&p[0],&p[m]); + c12 = STBTT__COMPARE(&p[m],&p[n-1]); + /* if 0 >= mid >= end, or 0 < mid < end, then use mid */ + if (c01 != c12) { + /* otherwise, we'll need to swap something else to middle */ + int z; + c = STBTT__COMPARE(&p[0],&p[n-1]); + /* 0>mid && midn => n; 0 0 */ + /* 0n: 0>n => 0; 0 n */ + z = (c == c12) ? 0 : n-1; + t = p[z]; + p[z] = p[m]; + p[m] = t; + } + /* now p[m] is the median-of-three */ + /* swap it to the beginning so it won't move around */ + t = p[0]; + p[0] = p[m]; + p[m] = t; + + /* partition loop */ + i=1; + j=n-1; + for(;;) { + /* handling of equality is crucial here */ + /* for sentinels & efficiency with duplicates */ + for (;;++i) { + if (!STBTT__COMPARE(&p[i], &p[0])) break; + } + for (;;--j) { + if (!STBTT__COMPARE(&p[0], &p[j])) break; + } + /* make sure we haven't crossed */ + if (i >= j) break; + t = p[i]; + p[i] = p[j]; + p[j] = t; + + ++i; + --j; + } + /* recurse on smaller side, iterate on larger */ + if (j < (n-i)) { + stbtt__sort_edges_quicksort(p,j); + p = p+i; + n = n-i; + } else { + stbtt__sort_edges_quicksort(p+i, n-i); + n = j; + } + } +} + +static void stbtt__sort_edges(stbtt__edge *p, int n) +{ + stbtt__sort_edges_quicksort(p, n); + stbtt__sort_edges_ins_sort(p, n); +} + +typedef struct +{ + float x,y; +} stbtt__point; + +static void stbtt__rasterize(stbtt__bitmap *result, stbtt__point *pts, int *wcount, int windings, float scale_x, float scale_y, float shift_x, float shift_y, int off_x, int off_y, int invert, void *userdata) +{ + float y_scale_inv = invert ? -scale_y : scale_y; + stbtt__edge *e; + int n,i,j,k,m; +#if STBTT_RASTERIZER_VERSION == 1 + int vsubsample = result->h < 8 ? 15 : 5; +#elif STBTT_RASTERIZER_VERSION == 2 + int vsubsample = 1; +#else + #error "Unrecognized value of STBTT_RASTERIZER_VERSION" +#endif + // vsubsample should divide 255 evenly; otherwise we won't reach full opacity + + // now we have to blow out the windings into explicit edge lists + n = 0; + for (i=0; i < windings; ++i) + n += wcount[i]; + + e = (stbtt__edge *) STBTT_malloc(sizeof(*e) * (n+1), userdata); // add an extra one as a sentinel + if (e == 0) return; + n = 0; + + m=0; + for (i=0; i < windings; ++i) { + stbtt__point *p = pts + m; + m += wcount[i]; + j = wcount[i]-1; + for (k=0; k < wcount[i]; j=k++) { + int a=k,b=j; + // skip the edge if horizontal + if (p[j].y == p[k].y) + continue; + // add edge from j to k to the list + e[n].invert = 0; + if (invert ? p[j].y > p[k].y : p[j].y < p[k].y) { + e[n].invert = 1; + a=j,b=k; + } + e[n].x0 = p[a].x * scale_x + shift_x; + e[n].y0 = (p[a].y * y_scale_inv + shift_y) * vsubsample; + e[n].x1 = p[b].x * scale_x + shift_x; + e[n].y1 = (p[b].y * y_scale_inv + shift_y) * vsubsample; + ++n; + } + } + + // now sort the edges by their highest point (should snap to integer, and then by x) + //STBTT_sort(e, n, sizeof(e[0]), stbtt__edge_compare); + stbtt__sort_edges(e, n); + + // now, traverse the scanlines and find the intersections on each scanline, use xor winding rule + stbtt__rasterize_sorted_edges(result, e, n, vsubsample, off_x, off_y, userdata); + + STBTT_free(e, userdata); +} + +static void stbtt__add_point(stbtt__point *points, int n, float x, float y) +{ + if (!points) return; // during first pass, it's unallocated + points[n].x = x; + points[n].y = y; +} + +// tessellate until threshold p is happy... @TODO warped to compensate for non-linear stretching +static int stbtt__tesselate_curve(stbtt__point *points, int *num_points, float x0, float y0, float x1, float y1, float x2, float y2, float objspace_flatness_squared, int n) +{ + // midpoint + float mx = (x0 + 2*x1 + x2)/4; + float my = (y0 + 2*y1 + y2)/4; + // versus directly drawn line + float dx = (x0+x2)/2 - mx; + float dy = (y0+y2)/2 - my; + if (n > 16) // 65536 segments on one curve better be enough! + return 1; + if (dx*dx+dy*dy > objspace_flatness_squared) { // half-pixel error allowed... need to be smaller if AA + stbtt__tesselate_curve(points, num_points, x0,y0, (x0+x1)/2.0f,(y0+y1)/2.0f, mx,my, objspace_flatness_squared,n+1); + stbtt__tesselate_curve(points, num_points, mx,my, (x1+x2)/2.0f,(y1+y2)/2.0f, x2,y2, objspace_flatness_squared,n+1); + } else { + stbtt__add_point(points, *num_points,x2,y2); + *num_points = *num_points+1; + } + return 1; +} + +static void stbtt__tesselate_cubic(stbtt__point *points, int *num_points, float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3, float objspace_flatness_squared, int n) +{ + // @TODO this "flatness" calculation is just made-up nonsense that seems to work well enough + float dx0 = x1-x0; + float dy0 = y1-y0; + float dx1 = x2-x1; + float dy1 = y2-y1; + float dx2 = x3-x2; + float dy2 = y3-y2; + float dx = x3-x0; + float dy = y3-y0; + float longlen = (float) (STBTT_sqrt(dx0*dx0+dy0*dy0)+STBTT_sqrt(dx1*dx1+dy1*dy1)+STBTT_sqrt(dx2*dx2+dy2*dy2)); + float shortlen = (float) STBTT_sqrt(dx*dx+dy*dy); + float flatness_squared = longlen*longlen-shortlen*shortlen; + + if (n > 16) // 65536 segments on one curve better be enough! + return; + + if (flatness_squared > objspace_flatness_squared) { + float x01 = (x0+x1)/2; + float y01 = (y0+y1)/2; + float x12 = (x1+x2)/2; + float y12 = (y1+y2)/2; + float x23 = (x2+x3)/2; + float y23 = (y2+y3)/2; + + float xa = (x01+x12)/2; + float ya = (y01+y12)/2; + float xb = (x12+x23)/2; + float yb = (y12+y23)/2; + + float mx = (xa+xb)/2; + float my = (ya+yb)/2; + + stbtt__tesselate_cubic(points, num_points, x0,y0, x01,y01, xa,ya, mx,my, objspace_flatness_squared,n+1); + stbtt__tesselate_cubic(points, num_points, mx,my, xb,yb, x23,y23, x3,y3, objspace_flatness_squared,n+1); + } else { + stbtt__add_point(points, *num_points,x3,y3); + *num_points = *num_points+1; + } +} + +// returns number of contours +static stbtt__point *stbtt_FlattenCurves(stbtt_vertex *vertices, int num_verts, float objspace_flatness, int **contour_lengths, int *num_contours, void *userdata) +{ + stbtt__point *points=0; + int num_points=0; + + float objspace_flatness_squared = objspace_flatness * objspace_flatness; + int i,n=0,start=0, pass; + + // count how many "moves" there are to get the contour count + for (i=0; i < num_verts; ++i) + if (vertices[i].type == STBTT_vmove) + ++n; + + *num_contours = n; + if (n == 0) return 0; + + *contour_lengths = (int *) STBTT_malloc(sizeof(**contour_lengths) * n, userdata); + + if (*contour_lengths == 0) { + *num_contours = 0; + return 0; + } + + // make two passes through the points so we don't need to realloc + for (pass=0; pass < 2; ++pass) { + float x=0,y=0; + if (pass == 1) { + points = (stbtt__point *) STBTT_malloc(num_points * sizeof(points[0]), userdata); + if (points == NULL) goto error; + } + num_points = 0; + n= -1; + for (i=0; i < num_verts; ++i) { + switch (vertices[i].type) { + case STBTT_vmove: + // start the next contour + if (n >= 0) + (*contour_lengths)[n] = num_points - start; + ++n; + start = num_points; + + x = vertices[i].x, y = vertices[i].y; + stbtt__add_point(points, num_points++, x,y); + break; + case STBTT_vline: + x = vertices[i].x, y = vertices[i].y; + stbtt__add_point(points, num_points++, x, y); + break; + case STBTT_vcurve: + stbtt__tesselate_curve(points, &num_points, x,y, + vertices[i].cx, vertices[i].cy, + vertices[i].x, vertices[i].y, + objspace_flatness_squared, 0); + x = vertices[i].x, y = vertices[i].y; + break; + case STBTT_vcubic: + stbtt__tesselate_cubic(points, &num_points, x,y, + vertices[i].cx, vertices[i].cy, + vertices[i].cx1, vertices[i].cy1, + vertices[i].x, vertices[i].y, + objspace_flatness_squared, 0); + x = vertices[i].x, y = vertices[i].y; + break; + } + } + (*contour_lengths)[n] = num_points - start; + } + + return points; +error: + STBTT_free(points, userdata); + STBTT_free(*contour_lengths, userdata); + *contour_lengths = 0; + *num_contours = 0; + return NULL; +} + +STBTT_DEF void stbtt_Rasterize(stbtt__bitmap *result, float flatness_in_pixels, stbtt_vertex *vertices, int num_verts, float scale_x, float scale_y, float shift_x, float shift_y, int x_off, int y_off, int invert, void *userdata) +{ + float scale = scale_x > scale_y ? scale_y : scale_x; + int winding_count = 0; + int *winding_lengths = NULL; + stbtt__point *windings = stbtt_FlattenCurves(vertices, num_verts, flatness_in_pixels / scale, &winding_lengths, &winding_count, userdata); + if (windings) { + stbtt__rasterize(result, windings, winding_lengths, winding_count, scale_x, scale_y, shift_x, shift_y, x_off, y_off, invert, userdata); + STBTT_free(winding_lengths, userdata); + STBTT_free(windings, userdata); + } +} + +STBTT_DEF void stbtt_FreeBitmap(unsigned char *bitmap, void *userdata) +{ + STBTT_free(bitmap, userdata); +} + +STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int glyph, int *width, int *height, int *xoff, int *yoff) +{ + int ix0,iy0,ix1,iy1; + stbtt__bitmap gbm; + stbtt_vertex *vertices; + int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices); + + if (scale_x == 0) scale_x = scale_y; + if (scale_y == 0) { + if (scale_x == 0) { + STBTT_free(vertices, info->userdata); + return NULL; + } + scale_y = scale_x; + } + + stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x, shift_y, &ix0,&iy0,&ix1,&iy1); + + // now we get the size + gbm.w = (ix1 - ix0); + gbm.h = (iy1 - iy0); + gbm.pixels = NULL; // in case we error + + if (width ) *width = gbm.w; + if (height) *height = gbm.h; + if (xoff ) *xoff = ix0; + if (yoff ) *yoff = iy0; + + if (gbm.w && gbm.h) { + gbm.pixels = (unsigned char *) STBTT_malloc(gbm.w * gbm.h, info->userdata); + if (gbm.pixels) { + gbm.stride = gbm.w; + + stbtt_Rasterize(&gbm, 0.35f, vertices, num_verts, scale_x, scale_y, shift_x, shift_y, ix0, iy0, 1, info->userdata); + } + } + STBTT_free(vertices, info->userdata); + return gbm.pixels; +} + +STBTT_DEF unsigned char *stbtt_GetGlyphBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int glyph, int *width, int *height, int *xoff, int *yoff) +{ + return stbtt_GetGlyphBitmapSubpixel(info, scale_x, scale_y, 0.0f, 0.0f, glyph, width, height, xoff, yoff); +} + +STBTT_DEF void stbtt_MakeGlyphBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int glyph) +{ + int ix0,iy0; + stbtt_vertex *vertices; + int num_verts = stbtt_GetGlyphShape(info, glyph, &vertices); + stbtt__bitmap gbm; + + stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale_x, scale_y, shift_x, shift_y, &ix0,&iy0,0,0); + gbm.pixels = output; + gbm.w = out_w; + gbm.h = out_h; + gbm.stride = out_stride; + + if (gbm.w && gbm.h) + stbtt_Rasterize(&gbm, 0.35f, vertices, num_verts, scale_x, scale_y, shift_x, shift_y, ix0,iy0, 1, info->userdata); + + STBTT_free(vertices, info->userdata); +} + +STBTT_DEF void stbtt_MakeGlyphBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int glyph) +{ + stbtt_MakeGlyphBitmapSubpixel(info, output, out_w, out_h, out_stride, scale_x, scale_y, 0.0f,0.0f, glyph); +} + +STBTT_DEF unsigned char *stbtt_GetCodepointBitmapSubpixel(const stbtt_fontinfo *info, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint, int *width, int *height, int *xoff, int *yoff) +{ + return stbtt_GetGlyphBitmapSubpixel(info, scale_x, scale_y,shift_x,shift_y, stbtt_FindGlyphIndex(info,codepoint), width,height,xoff,yoff); +} + +STBTT_DEF void stbtt_MakeCodepointBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int oversample_x, int oversample_y, float *sub_x, float *sub_y, int codepoint) +{ + stbtt_MakeGlyphBitmapSubpixelPrefilter(info, output, out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, oversample_x, oversample_y, sub_x, sub_y, stbtt_FindGlyphIndex(info,codepoint)); +} + +STBTT_DEF void stbtt_MakeCodepointBitmapSubpixel(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int codepoint) +{ + stbtt_MakeGlyphBitmapSubpixel(info, output, out_w, out_h, out_stride, scale_x, scale_y, shift_x, shift_y, stbtt_FindGlyphIndex(info,codepoint)); +} + +STBTT_DEF unsigned char *stbtt_GetCodepointBitmap(const stbtt_fontinfo *info, float scale_x, float scale_y, int codepoint, int *width, int *height, int *xoff, int *yoff) +{ + return stbtt_GetCodepointBitmapSubpixel(info, scale_x, scale_y, 0.0f,0.0f, codepoint, width,height,xoff,yoff); +} + +STBTT_DEF void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, int codepoint) +{ + stbtt_MakeCodepointBitmapSubpixel(info, output, out_w, out_h, out_stride, scale_x, scale_y, 0.0f,0.0f, codepoint); +} + +////////////////////////////////////////////////////////////////////////////// +// +// bitmap baking +// +// This is SUPER-CRAPPY packing to keep source code small + +static int stbtt_BakeFontBitmap_internal(unsigned char *data, int offset, // font location (use offset=0 for plain .ttf) + float pixel_height, // height of font in pixels + unsigned char *pixels, int pw, int ph, // bitmap to be filled in + int first_char, int num_chars, // characters to bake + stbtt_bakedchar *chardata) +{ + float scale; + int x,y,bottom_y, i; + stbtt_fontinfo f; + f.userdata = NULL; + if (!stbtt_InitFont(&f, data, offset)) + return -1; + STBTT_memset(pixels, 0, pw*ph); // background of 0 around pixels + x=y=1; + bottom_y = 1; + + scale = stbtt_ScaleForPixelHeight(&f, pixel_height); + + for (i=0; i < num_chars; ++i) { + int advance, lsb, x0,y0,x1,y1,gw,gh; + int g = stbtt_FindGlyphIndex(&f, first_char + i); + stbtt_GetGlyphHMetrics(&f, g, &advance, &lsb); + stbtt_GetGlyphBitmapBox(&f, g, scale,scale, &x0,&y0,&x1,&y1); + gw = x1-x0; + gh = y1-y0; + if (x + gw + 1 >= pw) + y = bottom_y, x = 1; // advance to next row + if (y + gh + 1 >= ph) // check if it fits vertically AFTER potentially moving to next row + return -i; + STBTT_assert(x+gw < pw); + STBTT_assert(y+gh < ph); + stbtt_MakeGlyphBitmap(&f, pixels+x+y*pw, gw,gh,pw, scale,scale, g); + chardata[i].x0 = (stbtt_int16) x; + chardata[i].y0 = (stbtt_int16) y; + chardata[i].x1 = (stbtt_int16) (x + gw); + chardata[i].y1 = (stbtt_int16) (y + gh); + chardata[i].xadvance = scale * advance; + chardata[i].xoff = (float) x0; + chardata[i].yoff = (float) y0; + x = x + gw + 1; + if (y+gh+1 > bottom_y) + bottom_y = y+gh+1; + } + return bottom_y; +} + +STBTT_DEF void stbtt_GetBakedQuad(const stbtt_bakedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int opengl_fillrule) +{ + float d3d_bias = opengl_fillrule ? 0 : -0.5f; + float ipw = 1.0f / pw, iph = 1.0f / ph; + const stbtt_bakedchar *b = chardata + char_index; + int round_x = STBTT_ifloor((*xpos + b->xoff) + 0.5f); + int round_y = STBTT_ifloor((*ypos + b->yoff) + 0.5f); + + q->x0 = round_x + d3d_bias; + q->y0 = round_y + d3d_bias; + q->x1 = round_x + b->x1 - b->x0 + d3d_bias; + q->y1 = round_y + b->y1 - b->y0 + d3d_bias; + + q->s0 = b->x0 * ipw; + q->t0 = b->y0 * iph; + q->s1 = b->x1 * ipw; + q->t1 = b->y1 * iph; + + *xpos += b->xadvance; +} + +////////////////////////////////////////////////////////////////////////////// +// +// rectangle packing replacement routines if you don't have stb_rect_pack.h +// + +#ifndef STB_RECT_PACK_VERSION + +typedef int stbrp_coord; + +//////////////////////////////////////////////////////////////////////////////////// +// // +// // +// COMPILER WARNING ?!?!? // +// // +// // +// if you get a compile warning due to these symbols being defined more than // +// once, move #include "stb_rect_pack.h" before #include "stb_truetype.h" // +// // +//////////////////////////////////////////////////////////////////////////////////// + +typedef struct +{ + int width,height; + int x,y,bottom_y; +} stbrp_context; + +typedef struct +{ + unsigned char x; +} stbrp_node; + +struct stbrp_rect +{ + stbrp_coord x,y; + int id,w,h,was_packed; +}; + +static void stbrp_init_target(stbrp_context *con, int pw, int ph, stbrp_node *nodes, int num_nodes) +{ + con->width = pw; + con->height = ph; + con->x = 0; + con->y = 0; + con->bottom_y = 0; + STBTT__NOTUSED(nodes); + STBTT__NOTUSED(num_nodes); +} + +static void stbrp_pack_rects(stbrp_context *con, stbrp_rect *rects, int num_rects) +{ + int i; + for (i=0; i < num_rects; ++i) { + if (con->x + rects[i].w > con->width) { + con->x = 0; + con->y = con->bottom_y; + } + if (con->y + rects[i].h > con->height) + break; + rects[i].x = con->x; + rects[i].y = con->y; + rects[i].was_packed = 1; + con->x += rects[i].w; + if (con->y + rects[i].h > con->bottom_y) + con->bottom_y = con->y + rects[i].h; + } + for ( ; i < num_rects; ++i) + rects[i].was_packed = 0; +} +#endif + +////////////////////////////////////////////////////////////////////////////// +// +// bitmap baking +// +// This is SUPER-AWESOME (tm Ryan Gordon) packing using stb_rect_pack.h. If +// stb_rect_pack.h isn't available, it uses the BakeFontBitmap strategy. + +STBTT_DEF int stbtt_PackBegin(stbtt_pack_context *spc, unsigned char *pixels, int pw, int ph, int stride_in_bytes, int padding, void *alloc_context) +{ + stbrp_context *context = (stbrp_context *) STBTT_malloc(sizeof(*context) ,alloc_context); + int num_nodes = pw - padding; + stbrp_node *nodes = (stbrp_node *) STBTT_malloc(sizeof(*nodes ) * num_nodes,alloc_context); + + if (context == NULL || nodes == NULL) { + if (context != NULL) STBTT_free(context, alloc_context); + if (nodes != NULL) STBTT_free(nodes , alloc_context); + return 0; + } + + spc->user_allocator_context = alloc_context; + spc->width = pw; + spc->height = ph; + spc->pixels = pixels; + spc->pack_info = context; + spc->nodes = nodes; + spc->padding = padding; + spc->stride_in_bytes = stride_in_bytes != 0 ? stride_in_bytes : pw; + spc->h_oversample = 1; + spc->v_oversample = 1; + spc->skip_missing = 0; + + stbrp_init_target(context, pw-padding, ph-padding, nodes, num_nodes); + + if (pixels) + STBTT_memset(pixels, 0, pw*ph); // background of 0 around pixels + + return 1; +} + +STBTT_DEF void stbtt_PackEnd (stbtt_pack_context *spc) +{ + STBTT_free(spc->nodes , spc->user_allocator_context); + STBTT_free(spc->pack_info, spc->user_allocator_context); +} + +STBTT_DEF void stbtt_PackSetOversampling(stbtt_pack_context *spc, unsigned int h_oversample, unsigned int v_oversample) +{ + STBTT_assert(h_oversample <= STBTT_MAX_OVERSAMPLE); + STBTT_assert(v_oversample <= STBTT_MAX_OVERSAMPLE); + if (h_oversample <= STBTT_MAX_OVERSAMPLE) + spc->h_oversample = h_oversample; + if (v_oversample <= STBTT_MAX_OVERSAMPLE) + spc->v_oversample = v_oversample; +} + +STBTT_DEF void stbtt_PackSetSkipMissingCodepoints(stbtt_pack_context *spc, int skip) +{ + spc->skip_missing = skip; +} + +#define STBTT__OVER_MASK (STBTT_MAX_OVERSAMPLE-1) + +static void stbtt__h_prefilter(unsigned char *pixels, int w, int h, int stride_in_bytes, unsigned int kernel_width) +{ + unsigned char buffer[STBTT_MAX_OVERSAMPLE]; + int safe_w = w - kernel_width; + int j; + STBTT_memset(buffer, 0, STBTT_MAX_OVERSAMPLE); // suppress bogus warning from VS2013 -analyze + for (j=0; j < h; ++j) { + int i; + unsigned int total; + STBTT_memset(buffer, 0, kernel_width); + + total = 0; + + // make kernel_width a constant in common cases so compiler can optimize out the divide + switch (kernel_width) { + case 2: + for (i=0; i <= safe_w; ++i) { + total += pixels[i] - buffer[i & STBTT__OVER_MASK]; + buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i]; + pixels[i] = (unsigned char) (total / 2); + } + break; + case 3: + for (i=0; i <= safe_w; ++i) { + total += pixels[i] - buffer[i & STBTT__OVER_MASK]; + buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i]; + pixels[i] = (unsigned char) (total / 3); + } + break; + case 4: + for (i=0; i <= safe_w; ++i) { + total += pixels[i] - buffer[i & STBTT__OVER_MASK]; + buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i]; + pixels[i] = (unsigned char) (total / 4); + } + break; + case 5: + for (i=0; i <= safe_w; ++i) { + total += pixels[i] - buffer[i & STBTT__OVER_MASK]; + buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i]; + pixels[i] = (unsigned char) (total / 5); + } + break; + default: + for (i=0; i <= safe_w; ++i) { + total += pixels[i] - buffer[i & STBTT__OVER_MASK]; + buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i]; + pixels[i] = (unsigned char) (total / kernel_width); + } + break; + } + + for (; i < w; ++i) { + STBTT_assert(pixels[i] == 0); + total -= buffer[i & STBTT__OVER_MASK]; + pixels[i] = (unsigned char) (total / kernel_width); + } + + pixels += stride_in_bytes; + } +} + +static void stbtt__v_prefilter(unsigned char *pixels, int w, int h, int stride_in_bytes, unsigned int kernel_width) +{ + unsigned char buffer[STBTT_MAX_OVERSAMPLE]; + int safe_h = h - kernel_width; + int j; + STBTT_memset(buffer, 0, STBTT_MAX_OVERSAMPLE); // suppress bogus warning from VS2013 -analyze + for (j=0; j < w; ++j) { + int i; + unsigned int total; + STBTT_memset(buffer, 0, kernel_width); + + total = 0; + + // make kernel_width a constant in common cases so compiler can optimize out the divide + switch (kernel_width) { + case 2: + for (i=0; i <= safe_h; ++i) { + total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK]; + buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes]; + pixels[i*stride_in_bytes] = (unsigned char) (total / 2); + } + break; + case 3: + for (i=0; i <= safe_h; ++i) { + total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK]; + buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes]; + pixels[i*stride_in_bytes] = (unsigned char) (total / 3); + } + break; + case 4: + for (i=0; i <= safe_h; ++i) { + total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK]; + buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes]; + pixels[i*stride_in_bytes] = (unsigned char) (total / 4); + } + break; + case 5: + for (i=0; i <= safe_h; ++i) { + total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK]; + buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes]; + pixels[i*stride_in_bytes] = (unsigned char) (total / 5); + } + break; + default: + for (i=0; i <= safe_h; ++i) { + total += pixels[i*stride_in_bytes] - buffer[i & STBTT__OVER_MASK]; + buffer[(i+kernel_width) & STBTT__OVER_MASK] = pixels[i*stride_in_bytes]; + pixels[i*stride_in_bytes] = (unsigned char) (total / kernel_width); + } + break; + } + + for (; i < h; ++i) { + STBTT_assert(pixels[i*stride_in_bytes] == 0); + total -= buffer[i & STBTT__OVER_MASK]; + pixels[i*stride_in_bytes] = (unsigned char) (total / kernel_width); + } + + pixels += 1; + } +} + +static float stbtt__oversample_shift(int oversample) +{ + if (!oversample) + return 0.0f; + + // The prefilter is a box filter of width "oversample", + // which shifts phase by (oversample - 1)/2 pixels in + // oversampled space. We want to shift in the opposite + // direction to counter this. + return (float)-(oversample - 1) / (2.0f * (float)oversample); +} + +// rects array must be big enough to accommodate all characters in the given ranges +STBTT_DEF int stbtt_PackFontRangesGatherRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects) +{ + int i,j,k; + int missing_glyph_added = 0; + + k=0; + for (i=0; i < num_ranges; ++i) { + float fh = ranges[i].font_size; + float scale = fh > 0 ? stbtt_ScaleForPixelHeight(info, fh) : stbtt_ScaleForMappingEmToPixels(info, -fh); + ranges[i].h_oversample = (unsigned char) spc->h_oversample; + ranges[i].v_oversample = (unsigned char) spc->v_oversample; + for (j=0; j < ranges[i].num_chars; ++j) { + int x0,y0,x1,y1; + int codepoint = ranges[i].array_of_unicode_codepoints == NULL ? ranges[i].first_unicode_codepoint_in_range + j : ranges[i].array_of_unicode_codepoints[j]; + int glyph = stbtt_FindGlyphIndex(info, codepoint); + if (glyph == 0 && (spc->skip_missing || missing_glyph_added)) { + rects[k].w = rects[k].h = 0; + } else { + stbtt_GetGlyphBitmapBoxSubpixel(info,glyph, + scale * spc->h_oversample, + scale * spc->v_oversample, + 0,0, + &x0,&y0,&x1,&y1); + rects[k].w = (stbrp_coord) (x1-x0 + spc->padding + spc->h_oversample-1); + rects[k].h = (stbrp_coord) (y1-y0 + spc->padding + spc->v_oversample-1); + if (glyph == 0) + missing_glyph_added = 1; + } + ++k; + } + } + + return k; +} + +STBTT_DEF void stbtt_MakeGlyphBitmapSubpixelPrefilter(const stbtt_fontinfo *info, unsigned char *output, int out_w, int out_h, int out_stride, float scale_x, float scale_y, float shift_x, float shift_y, int prefilter_x, int prefilter_y, float *sub_x, float *sub_y, int glyph) +{ + stbtt_MakeGlyphBitmapSubpixel(info, + output, + out_w - (prefilter_x - 1), + out_h - (prefilter_y - 1), + out_stride, + scale_x, + scale_y, + shift_x, + shift_y, + glyph); + + if (prefilter_x > 1) + stbtt__h_prefilter(output, out_w, out_h, out_stride, prefilter_x); + + if (prefilter_y > 1) + stbtt__v_prefilter(output, out_w, out_h, out_stride, prefilter_y); + + *sub_x = stbtt__oversample_shift(prefilter_x); + *sub_y = stbtt__oversample_shift(prefilter_y); +} + +// rects array must be big enough to accommodate all characters in the given ranges +STBTT_DEF int stbtt_PackFontRangesRenderIntoRects(stbtt_pack_context *spc, const stbtt_fontinfo *info, stbtt_pack_range *ranges, int num_ranges, stbrp_rect *rects) +{ + int i,j,k, missing_glyph = -1, return_value = 1; + + // save current values + int old_h_over = spc->h_oversample; + int old_v_over = spc->v_oversample; + + k = 0; + for (i=0; i < num_ranges; ++i) { + float fh = ranges[i].font_size; + float scale = fh > 0 ? stbtt_ScaleForPixelHeight(info, fh) : stbtt_ScaleForMappingEmToPixels(info, -fh); + float recip_h,recip_v,sub_x,sub_y; + spc->h_oversample = ranges[i].h_oversample; + spc->v_oversample = ranges[i].v_oversample; + recip_h = 1.0f / spc->h_oversample; + recip_v = 1.0f / spc->v_oversample; + sub_x = stbtt__oversample_shift(spc->h_oversample); + sub_y = stbtt__oversample_shift(spc->v_oversample); + for (j=0; j < ranges[i].num_chars; ++j) { + stbrp_rect *r = &rects[k]; + if (r->was_packed && r->w != 0 && r->h != 0) { + stbtt_packedchar *bc = &ranges[i].chardata_for_range[j]; + int advance, lsb, x0,y0,x1,y1; + int codepoint = ranges[i].array_of_unicode_codepoints == NULL ? ranges[i].first_unicode_codepoint_in_range + j : ranges[i].array_of_unicode_codepoints[j]; + int glyph = stbtt_FindGlyphIndex(info, codepoint); + stbrp_coord pad = (stbrp_coord) spc->padding; + + // pad on left and top + r->x += pad; + r->y += pad; + r->w -= pad; + r->h -= pad; + stbtt_GetGlyphHMetrics(info, glyph, &advance, &lsb); + stbtt_GetGlyphBitmapBox(info, glyph, + scale * spc->h_oversample, + scale * spc->v_oversample, + &x0,&y0,&x1,&y1); + stbtt_MakeGlyphBitmapSubpixel(info, + spc->pixels + r->x + r->y*spc->stride_in_bytes, + r->w - spc->h_oversample+1, + r->h - spc->v_oversample+1, + spc->stride_in_bytes, + scale * spc->h_oversample, + scale * spc->v_oversample, + 0,0, + glyph); + + if (spc->h_oversample > 1) + stbtt__h_prefilter(spc->pixels + r->x + r->y*spc->stride_in_bytes, + r->w, r->h, spc->stride_in_bytes, + spc->h_oversample); + + if (spc->v_oversample > 1) + stbtt__v_prefilter(spc->pixels + r->x + r->y*spc->stride_in_bytes, + r->w, r->h, spc->stride_in_bytes, + spc->v_oversample); + + bc->x0 = (stbtt_int16) r->x; + bc->y0 = (stbtt_int16) r->y; + bc->x1 = (stbtt_int16) (r->x + r->w); + bc->y1 = (stbtt_int16) (r->y + r->h); + bc->xadvance = scale * advance; + bc->xoff = (float) x0 * recip_h + sub_x; + bc->yoff = (float) y0 * recip_v + sub_y; + bc->xoff2 = (x0 + r->w) * recip_h + sub_x; + bc->yoff2 = (y0 + r->h) * recip_v + sub_y; + + if (glyph == 0) + missing_glyph = j; + } else if (spc->skip_missing) { + return_value = 0; + } else if (r->was_packed && r->w == 0 && r->h == 0 && missing_glyph >= 0) { + ranges[i].chardata_for_range[j] = ranges[i].chardata_for_range[missing_glyph]; + } else { + return_value = 0; // if any fail, report failure + } + + ++k; + } + } + + // restore original values + spc->h_oversample = old_h_over; + spc->v_oversample = old_v_over; + + return return_value; +} + +STBTT_DEF void stbtt_PackFontRangesPackRects(stbtt_pack_context *spc, stbrp_rect *rects, int num_rects) +{ + stbrp_pack_rects((stbrp_context *) spc->pack_info, rects, num_rects); +} + +STBTT_DEF int stbtt_PackFontRanges(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, stbtt_pack_range *ranges, int num_ranges) +{ + stbtt_fontinfo info; + int i,j,n, return_value = 1; + //stbrp_context *context = (stbrp_context *) spc->pack_info; + stbrp_rect *rects; + + // flag all characters as NOT packed + for (i=0; i < num_ranges; ++i) + for (j=0; j < ranges[i].num_chars; ++j) + ranges[i].chardata_for_range[j].x0 = + ranges[i].chardata_for_range[j].y0 = + ranges[i].chardata_for_range[j].x1 = + ranges[i].chardata_for_range[j].y1 = 0; + + n = 0; + for (i=0; i < num_ranges; ++i) + n += ranges[i].num_chars; + + rects = (stbrp_rect *) STBTT_malloc(sizeof(*rects) * n, spc->user_allocator_context); + if (rects == NULL) + return 0; + + info.userdata = spc->user_allocator_context; + stbtt_InitFont(&info, fontdata, stbtt_GetFontOffsetForIndex(fontdata,font_index)); + + n = stbtt_PackFontRangesGatherRects(spc, &info, ranges, num_ranges, rects); + + stbtt_PackFontRangesPackRects(spc, rects, n); + + return_value = stbtt_PackFontRangesRenderIntoRects(spc, &info, ranges, num_ranges, rects); + + STBTT_free(rects, spc->user_allocator_context); + return return_value; +} + +STBTT_DEF int stbtt_PackFontRange(stbtt_pack_context *spc, const unsigned char *fontdata, int font_index, float font_size, + int first_unicode_codepoint_in_range, int num_chars_in_range, stbtt_packedchar *chardata_for_range) +{ + stbtt_pack_range range; + range.first_unicode_codepoint_in_range = first_unicode_codepoint_in_range; + range.array_of_unicode_codepoints = NULL; + range.num_chars = num_chars_in_range; + range.chardata_for_range = chardata_for_range; + range.font_size = font_size; + return stbtt_PackFontRanges(spc, fontdata, font_index, &range, 1); +} + +STBTT_DEF void stbtt_GetScaledFontVMetrics(const unsigned char *fontdata, int index, float size, float *ascent, float *descent, float *lineGap) +{ + int i_ascent, i_descent, i_lineGap; + float scale; + stbtt_fontinfo info; + stbtt_InitFont(&info, fontdata, stbtt_GetFontOffsetForIndex(fontdata, index)); + scale = size > 0 ? stbtt_ScaleForPixelHeight(&info, size) : stbtt_ScaleForMappingEmToPixels(&info, -size); + stbtt_GetFontVMetrics(&info, &i_ascent, &i_descent, &i_lineGap); + *ascent = (float) i_ascent * scale; + *descent = (float) i_descent * scale; + *lineGap = (float) i_lineGap * scale; +} + +STBTT_DEF void stbtt_GetPackedQuad(const stbtt_packedchar *chardata, int pw, int ph, int char_index, float *xpos, float *ypos, stbtt_aligned_quad *q, int align_to_integer) +{ + float ipw = 1.0f / pw, iph = 1.0f / ph; + const stbtt_packedchar *b = chardata + char_index; + + if (align_to_integer) { + float x = (float) STBTT_ifloor((*xpos + b->xoff) + 0.5f); + float y = (float) STBTT_ifloor((*ypos + b->yoff) + 0.5f); + q->x0 = x; + q->y0 = y; + q->x1 = x + b->xoff2 - b->xoff; + q->y1 = y + b->yoff2 - b->yoff; + } else { + q->x0 = *xpos + b->xoff; + q->y0 = *ypos + b->yoff; + q->x1 = *xpos + b->xoff2; + q->y1 = *ypos + b->yoff2; + } + + q->s0 = b->x0 * ipw; + q->t0 = b->y0 * iph; + q->s1 = b->x1 * ipw; + q->t1 = b->y1 * iph; + + *xpos += b->xadvance; +} + +////////////////////////////////////////////////////////////////////////////// +// +// sdf computation +// + +#define STBTT_min(a,b) ((a) < (b) ? (a) : (b)) +#define STBTT_max(a,b) ((a) < (b) ? (b) : (a)) + +static int stbtt__ray_intersect_bezier(float orig[2], float ray[2], float q0[2], float q1[2], float q2[2], float hits[2][2]) +{ + float q0perp = q0[1]*ray[0] - q0[0]*ray[1]; + float q1perp = q1[1]*ray[0] - q1[0]*ray[1]; + float q2perp = q2[1]*ray[0] - q2[0]*ray[1]; + float roperp = orig[1]*ray[0] - orig[0]*ray[1]; + + float a = q0perp - 2*q1perp + q2perp; + float b = q1perp - q0perp; + float c = q0perp - roperp; + + float s0 = 0., s1 = 0.; + int num_s = 0; + + if (a != 0.0) { + float discr = b*b - a*c; + if (discr > 0.0) { + float rcpna = -1 / a; + float d = (float) STBTT_sqrt(discr); + s0 = (b+d) * rcpna; + s1 = (b-d) * rcpna; + if (s0 >= 0.0 && s0 <= 1.0) + num_s = 1; + if (d > 0.0 && s1 >= 0.0 && s1 <= 1.0) { + if (num_s == 0) s0 = s1; + ++num_s; + } + } + } else { + // 2*b*s + c = 0 + // s = -c / (2*b) + s0 = c / (-2 * b); + if (s0 >= 0.0 && s0 <= 1.0) + num_s = 1; + } + + if (num_s == 0) + return 0; + else { + float rcp_len2 = 1 / (ray[0]*ray[0] + ray[1]*ray[1]); + float rayn_x = ray[0] * rcp_len2, rayn_y = ray[1] * rcp_len2; + + float q0d = q0[0]*rayn_x + q0[1]*rayn_y; + float q1d = q1[0]*rayn_x + q1[1]*rayn_y; + float q2d = q2[0]*rayn_x + q2[1]*rayn_y; + float rod = orig[0]*rayn_x + orig[1]*rayn_y; + + float q10d = q1d - q0d; + float q20d = q2d - q0d; + float q0rd = q0d - rod; + + hits[0][0] = q0rd + s0*(2.0f - 2.0f*s0)*q10d + s0*s0*q20d; + hits[0][1] = a*s0+b; + + if (num_s > 1) { + hits[1][0] = q0rd + s1*(2.0f - 2.0f*s1)*q10d + s1*s1*q20d; + hits[1][1] = a*s1+b; + return 2; + } else { + return 1; + } + } +} + +static int equal(float *a, float *b) +{ + return (a[0] == b[0] && a[1] == b[1]); +} + +static int stbtt__compute_crossings_x(float x, float y, int nverts, stbtt_vertex *verts) +{ + int i; + float orig[2], ray[2] = { 1, 0 }; + float y_frac; + int winding = 0; + + // make sure y never passes through a vertex of the shape + y_frac = (float) STBTT_fmod(y, 1.0f); + if (y_frac < 0.01f) + y += 0.01f; + else if (y_frac > 0.99f) + y -= 0.01f; + + orig[0] = x; + orig[1] = y; + + // test a ray from (-infinity,y) to (x,y) + for (i=0; i < nverts; ++i) { + if (verts[i].type == STBTT_vline) { + int x0 = (int) verts[i-1].x, y0 = (int) verts[i-1].y; + int x1 = (int) verts[i ].x, y1 = (int) verts[i ].y; + if (y > STBTT_min(y0,y1) && y < STBTT_max(y0,y1) && x > STBTT_min(x0,x1)) { + float x_inter = (y - y0) / (y1 - y0) * (x1-x0) + x0; + if (x_inter < x) + winding += (y0 < y1) ? 1 : -1; + } + } + if (verts[i].type == STBTT_vcurve) { + int x0 = (int) verts[i-1].x , y0 = (int) verts[i-1].y ; + int x1 = (int) verts[i ].cx, y1 = (int) verts[i ].cy; + int x2 = (int) verts[i ].x , y2 = (int) verts[i ].y ; + int ax = STBTT_min(x0,STBTT_min(x1,x2)), ay = STBTT_min(y0,STBTT_min(y1,y2)); + int by = STBTT_max(y0,STBTT_max(y1,y2)); + if (y > ay && y < by && x > ax) { + float q0[2],q1[2],q2[2]; + float hits[2][2]; + q0[0] = (float)x0; + q0[1] = (float)y0; + q1[0] = (float)x1; + q1[1] = (float)y1; + q2[0] = (float)x2; + q2[1] = (float)y2; + if (equal(q0,q1) || equal(q1,q2)) { + x0 = (int)verts[i-1].x; + y0 = (int)verts[i-1].y; + x1 = (int)verts[i ].x; + y1 = (int)verts[i ].y; + if (y > STBTT_min(y0,y1) && y < STBTT_max(y0,y1) && x > STBTT_min(x0,x1)) { + float x_inter = (y - y0) / (y1 - y0) * (x1-x0) + x0; + if (x_inter < x) + winding += (y0 < y1) ? 1 : -1; + } + } else { + int num_hits = stbtt__ray_intersect_bezier(orig, ray, q0, q1, q2, hits); + if (num_hits >= 1) + if (hits[0][0] < 0) + winding += (hits[0][1] < 0 ? -1 : 1); + if (num_hits >= 2) + if (hits[1][0] < 0) + winding += (hits[1][1] < 0 ? -1 : 1); + } + } + } + } + return winding; +} + +static float stbtt__cuberoot( float x ) +{ + if (x<0) + return -(float) STBTT_pow(-x,1.0f/3.0f); + else + return (float) STBTT_pow( x,1.0f/3.0f); +} + +// x^3 + a*x^2 + b*x + c = 0 +static int stbtt__solve_cubic(float a, float b, float c, float* r) +{ + float s = -a / 3; + float p = b - a*a / 3; + float q = a * (2*a*a - 9*b) / 27 + c; + float p3 = p*p*p; + float d = q*q + 4*p3 / 27; + if (d >= 0) { + float z = (float) STBTT_sqrt(d); + float u = (-q + z) / 2; + float v = (-q - z) / 2; + u = stbtt__cuberoot(u); + v = stbtt__cuberoot(v); + r[0] = s + u + v; + return 1; + } else { + float u = (float) STBTT_sqrt(-p/3); + float v = (float) STBTT_acos(-STBTT_sqrt(-27/p3) * q / 2) / 3; // p3 must be negative, since d is negative + float m = (float) STBTT_cos(v); + float n = (float) STBTT_cos(v-3.141592/2)*1.732050808f; + r[0] = s + u * 2 * m; + r[1] = s - u * (m + n); + r[2] = s - u * (m - n); + + //STBTT_assert( STBTT_fabs(((r[0]+a)*r[0]+b)*r[0]+c) < 0.05f); // these asserts may not be safe at all scales, though they're in bezier t parameter units so maybe? + //STBTT_assert( STBTT_fabs(((r[1]+a)*r[1]+b)*r[1]+c) < 0.05f); + //STBTT_assert( STBTT_fabs(((r[2]+a)*r[2]+b)*r[2]+c) < 0.05f); + return 3; + } +} + +STBTT_DEF unsigned char * stbtt_GetGlyphSDF(const stbtt_fontinfo *info, float scale, int glyph, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff) +{ + float scale_x = scale, scale_y = scale; + int ix0,iy0,ix1,iy1; + int w,h; + unsigned char *data; + + if (scale == 0) return NULL; + + stbtt_GetGlyphBitmapBoxSubpixel(info, glyph, scale, scale, 0.0f,0.0f, &ix0,&iy0,&ix1,&iy1); + + // if empty, return NULL + if (ix0 == ix1 || iy0 == iy1) + return NULL; + + ix0 -= padding; + iy0 -= padding; + ix1 += padding; + iy1 += padding; + + w = (ix1 - ix0); + h = (iy1 - iy0); + + if (width ) *width = w; + if (height) *height = h; + if (xoff ) *xoff = ix0; + if (yoff ) *yoff = iy0; + + // invert for y-downwards bitmaps + scale_y = -scale_y; + + { + // distance from singular values (in the same units as the pixel grid) + const float eps = 1./1024, eps2 = eps*eps; + int x,y,i,j; + float *precompute; + stbtt_vertex *verts; + int num_verts = stbtt_GetGlyphShape(info, glyph, &verts); + data = (unsigned char *) STBTT_malloc(w * h, info->userdata); + precompute = (float *) STBTT_malloc(num_verts * sizeof(float), info->userdata); + + for (i=0,j=num_verts-1; i < num_verts; j=i++) { + if (verts[i].type == STBTT_vline) { + float x0 = verts[i].x*scale_x, y0 = verts[i].y*scale_y; + float x1 = verts[j].x*scale_x, y1 = verts[j].y*scale_y; + float dist = (float) STBTT_sqrt((x1-x0)*(x1-x0) + (y1-y0)*(y1-y0)); + precompute[i] = (dist < eps) ? 0.0f : 1.0f / dist; + } else if (verts[i].type == STBTT_vcurve) { + float x2 = verts[j].x *scale_x, y2 = verts[j].y *scale_y; + float x1 = verts[i].cx*scale_x, y1 = verts[i].cy*scale_y; + float x0 = verts[i].x *scale_x, y0 = verts[i].y *scale_y; + float bx = x0 - 2*x1 + x2, by = y0 - 2*y1 + y2; + float len2 = bx*bx + by*by; + if (len2 >= eps2) + precompute[i] = 1.0f / len2; + else + precompute[i] = 0.0f; + } else + precompute[i] = 0.0f; + } + + for (y=iy0; y < iy1; ++y) { + for (x=ix0; x < ix1; ++x) { + float val; + float min_dist = 999999.0f; + float sx = (float) x + 0.5f; + float sy = (float) y + 0.5f; + float x_gspace = (sx / scale_x); + float y_gspace = (sy / scale_y); + + int winding = stbtt__compute_crossings_x(x_gspace, y_gspace, num_verts, verts); // @OPTIMIZE: this could just be a rasterization, but needs to be line vs. non-tesselated curves so a new path + + for (i=0; i < num_verts; ++i) { + float x0 = verts[i].x*scale_x, y0 = verts[i].y*scale_y; + + if (verts[i].type == STBTT_vline && precompute[i] != 0.0f) { + float x1 = verts[i-1].x*scale_x, y1 = verts[i-1].y*scale_y; + + float dist,dist2 = (x0-sx)*(x0-sx) + (y0-sy)*(y0-sy); + if (dist2 < min_dist*min_dist) + min_dist = (float) STBTT_sqrt(dist2); + + // coarse culling against bbox + //if (sx > STBTT_min(x0,x1)-min_dist && sx < STBTT_max(x0,x1)+min_dist && + // sy > STBTT_min(y0,y1)-min_dist && sy < STBTT_max(y0,y1)+min_dist) + dist = (float) STBTT_fabs((x1-x0)*(y0-sy) - (y1-y0)*(x0-sx)) * precompute[i]; + STBTT_assert(i != 0); + if (dist < min_dist) { + // check position along line + // x' = x0 + t*(x1-x0), y' = y0 + t*(y1-y0) + // minimize (x'-sx)*(x'-sx)+(y'-sy)*(y'-sy) + float dx = x1-x0, dy = y1-y0; + float px = x0-sx, py = y0-sy; + // minimize (px+t*dx)^2 + (py+t*dy)^2 = px*px + 2*px*dx*t + t^2*dx*dx + py*py + 2*py*dy*t + t^2*dy*dy + // derivative: 2*px*dx + 2*py*dy + (2*dx*dx+2*dy*dy)*t, set to 0 and solve + float t = -(px*dx + py*dy) / (dx*dx + dy*dy); + if (t >= 0.0f && t <= 1.0f) + min_dist = dist; + } + } else if (verts[i].type == STBTT_vcurve) { + float x2 = verts[i-1].x *scale_x, y2 = verts[i-1].y *scale_y; + float x1 = verts[i ].cx*scale_x, y1 = verts[i ].cy*scale_y; + float box_x0 = STBTT_min(STBTT_min(x0,x1),x2); + float box_y0 = STBTT_min(STBTT_min(y0,y1),y2); + float box_x1 = STBTT_max(STBTT_max(x0,x1),x2); + float box_y1 = STBTT_max(STBTT_max(y0,y1),y2); + // coarse culling against bbox to avoid computing cubic unnecessarily + if (sx > box_x0-min_dist && sx < box_x1+min_dist && sy > box_y0-min_dist && sy < box_y1+min_dist) { + int num=0; + float ax = x1-x0, ay = y1-y0; + float bx = x0 - 2*x1 + x2, by = y0 - 2*y1 + y2; + float mx = x0 - sx, my = y0 - sy; + float res[3] = {0.f,0.f,0.f}; + float px,py,t,it,dist2; + float a_inv = precompute[i]; + if (a_inv == 0.0) { // if a_inv is 0, it's 2nd degree so use quadratic formula + float a = 3*(ax*bx + ay*by); + float b = 2*(ax*ax + ay*ay) + (mx*bx+my*by); + float c = mx*ax+my*ay; + if (STBTT_fabs(a) < eps2) { // if a is 0, it's linear + if (STBTT_fabs(b) >= eps2) { + res[num++] = -c/b; + } + } else { + float discriminant = b*b - 4*a*c; + if (discriminant < 0) + num = 0; + else { + float root = (float) STBTT_sqrt(discriminant); + res[0] = (-b - root)/(2*a); + res[1] = (-b + root)/(2*a); + num = 2; // don't bother distinguishing 1-solution case, as code below will still work + } + } + } else { + float b = 3*(ax*bx + ay*by) * a_inv; // could precompute this as it doesn't depend on sample point + float c = (2*(ax*ax + ay*ay) + (mx*bx+my*by)) * a_inv; + float d = (mx*ax+my*ay) * a_inv; + num = stbtt__solve_cubic(b, c, d, res); + } + dist2 = (x0-sx)*(x0-sx) + (y0-sy)*(y0-sy); + if (dist2 < min_dist*min_dist) + min_dist = (float) STBTT_sqrt(dist2); + + if (num >= 1 && res[0] >= 0.0f && res[0] <= 1.0f) { + t = res[0], it = 1.0f - t; + px = it*it*x0 + 2*t*it*x1 + t*t*x2; + py = it*it*y0 + 2*t*it*y1 + t*t*y2; + dist2 = (px-sx)*(px-sx) + (py-sy)*(py-sy); + if (dist2 < min_dist * min_dist) + min_dist = (float) STBTT_sqrt(dist2); + } + if (num >= 2 && res[1] >= 0.0f && res[1] <= 1.0f) { + t = res[1], it = 1.0f - t; + px = it*it*x0 + 2*t*it*x1 + t*t*x2; + py = it*it*y0 + 2*t*it*y1 + t*t*y2; + dist2 = (px-sx)*(px-sx) + (py-sy)*(py-sy); + if (dist2 < min_dist * min_dist) + min_dist = (float) STBTT_sqrt(dist2); + } + if (num >= 3 && res[2] >= 0.0f && res[2] <= 1.0f) { + t = res[2], it = 1.0f - t; + px = it*it*x0 + 2*t*it*x1 + t*t*x2; + py = it*it*y0 + 2*t*it*y1 + t*t*y2; + dist2 = (px-sx)*(px-sx) + (py-sy)*(py-sy); + if (dist2 < min_dist * min_dist) + min_dist = (float) STBTT_sqrt(dist2); + } + } + } + } + if (winding == 0) + min_dist = -min_dist; // if outside the shape, value is negative + val = onedge_value + pixel_dist_scale * min_dist; + if (val < 0) + val = 0; + else if (val > 255) + val = 255; + data[(y-iy0)*w+(x-ix0)] = (unsigned char) val; + } + } + STBTT_free(precompute, info->userdata); + STBTT_free(verts, info->userdata); + } + return data; +} + +STBTT_DEF unsigned char * stbtt_GetCodepointSDF(const stbtt_fontinfo *info, float scale, int codepoint, int padding, unsigned char onedge_value, float pixel_dist_scale, int *width, int *height, int *xoff, int *yoff) +{ + return stbtt_GetGlyphSDF(info, scale, stbtt_FindGlyphIndex(info, codepoint), padding, onedge_value, pixel_dist_scale, width, height, xoff, yoff); +} + +STBTT_DEF void stbtt_FreeSDF(unsigned char *bitmap, void *userdata) +{ + STBTT_free(bitmap, userdata); +} + +////////////////////////////////////////////////////////////////////////////// +// +// font name matching -- recommended not to use this +// + +// check if a utf8 string contains a prefix which is the utf16 string; if so return length of matching utf8 string +static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(stbtt_uint8 *s1, stbtt_int32 len1, stbtt_uint8 *s2, stbtt_int32 len2) +{ + stbtt_int32 i=0; + + // convert utf16 to utf8 and compare the results while converting + while (len2) { + stbtt_uint16 ch = s2[0]*256 + s2[1]; + if (ch < 0x80) { + if (i >= len1) return -1; + if (s1[i++] != ch) return -1; + } else if (ch < 0x800) { + if (i+1 >= len1) return -1; + if (s1[i++] != 0xc0 + (ch >> 6)) return -1; + if (s1[i++] != 0x80 + (ch & 0x3f)) return -1; + } else if (ch >= 0xd800 && ch < 0xdc00) { + stbtt_uint32 c; + stbtt_uint16 ch2 = s2[2]*256 + s2[3]; + if (i+3 >= len1) return -1; + c = ((ch - 0xd800) << 10) + (ch2 - 0xdc00) + 0x10000; + if (s1[i++] != 0xf0 + (c >> 18)) return -1; + if (s1[i++] != 0x80 + ((c >> 12) & 0x3f)) return -1; + if (s1[i++] != 0x80 + ((c >> 6) & 0x3f)) return -1; + if (s1[i++] != 0x80 + ((c ) & 0x3f)) return -1; + s2 += 2; // plus another 2 below + len2 -= 2; + } else if (ch >= 0xdc00 && ch < 0xe000) { + return -1; + } else { + if (i+2 >= len1) return -1; + if (s1[i++] != 0xe0 + (ch >> 12)) return -1; + if (s1[i++] != 0x80 + ((ch >> 6) & 0x3f)) return -1; + if (s1[i++] != 0x80 + ((ch ) & 0x3f)) return -1; + } + s2 += 2; + len2 -= 2; + } + return i; +} + +static int stbtt_CompareUTF8toUTF16_bigendian_internal(char *s1, int len1, char *s2, int len2) +{ + return len1 == stbtt__CompareUTF8toUTF16_bigendian_prefix((stbtt_uint8*) s1, len1, (stbtt_uint8*) s2, len2); +} + +// returns results in whatever encoding you request... but note that 2-byte encodings +// will be BIG-ENDIAN... use stbtt_CompareUTF8toUTF16_bigendian() to compare +STBTT_DEF const char *stbtt_GetFontNameString(const stbtt_fontinfo *font, int *length, int platformID, int encodingID, int languageID, int nameID) +{ + stbtt_int32 i,count,stringOffset; + stbtt_uint8 *fc = font->data; + stbtt_uint32 offset = font->fontstart; + stbtt_uint32 nm = stbtt__find_table(fc, offset, "name"); + if (!nm) return NULL; + + count = ttUSHORT(fc+nm+2); + stringOffset = nm + ttUSHORT(fc+nm+4); + for (i=0; i < count; ++i) { + stbtt_uint32 loc = nm + 6 + 12 * i; + if (platformID == ttUSHORT(fc+loc+0) && encodingID == ttUSHORT(fc+loc+2) + && languageID == ttUSHORT(fc+loc+4) && nameID == ttUSHORT(fc+loc+6)) { + *length = ttUSHORT(fc+loc+8); + return (const char *) (fc+stringOffset+ttUSHORT(fc+loc+10)); + } + } + return NULL; +} + +static int stbtt__matchpair(stbtt_uint8 *fc, stbtt_uint32 nm, stbtt_uint8 *name, stbtt_int32 nlen, stbtt_int32 target_id, stbtt_int32 next_id) +{ + stbtt_int32 i; + stbtt_int32 count = ttUSHORT(fc+nm+2); + stbtt_int32 stringOffset = nm + ttUSHORT(fc+nm+4); + + for (i=0; i < count; ++i) { + stbtt_uint32 loc = nm + 6 + 12 * i; + stbtt_int32 id = ttUSHORT(fc+loc+6); + if (id == target_id) { + // find the encoding + stbtt_int32 platform = ttUSHORT(fc+loc+0), encoding = ttUSHORT(fc+loc+2), language = ttUSHORT(fc+loc+4); + + // is this a Unicode encoding? + if (platform == 0 || (platform == 3 && encoding == 1) || (platform == 3 && encoding == 10)) { + stbtt_int32 slen = ttUSHORT(fc+loc+8); + stbtt_int32 off = ttUSHORT(fc+loc+10); + + // check if there's a prefix match + stbtt_int32 matchlen = stbtt__CompareUTF8toUTF16_bigendian_prefix(name, nlen, fc+stringOffset+off,slen); + if (matchlen >= 0) { + // check for target_id+1 immediately following, with same encoding & language + if (i+1 < count && ttUSHORT(fc+loc+12+6) == next_id && ttUSHORT(fc+loc+12) == platform && ttUSHORT(fc+loc+12+2) == encoding && ttUSHORT(fc+loc+12+4) == language) { + slen = ttUSHORT(fc+loc+12+8); + off = ttUSHORT(fc+loc+12+10); + if (slen == 0) { + if (matchlen == nlen) + return 1; + } else if (matchlen < nlen && name[matchlen] == ' ') { + ++matchlen; + if (stbtt_CompareUTF8toUTF16_bigendian_internal((char*) (name+matchlen), nlen-matchlen, (char*)(fc+stringOffset+off),slen)) + return 1; + } + } else { + // if nothing immediately following + if (matchlen == nlen) + return 1; + } + } + } + + // @TODO handle other encodings + } + } + return 0; +} + +static int stbtt__matches(stbtt_uint8 *fc, stbtt_uint32 offset, stbtt_uint8 *name, stbtt_int32 flags) +{ + stbtt_int32 nlen = (stbtt_int32) STBTT_strlen((char *) name); + stbtt_uint32 nm,hd; + if (!stbtt__isfont(fc+offset)) return 0; + + // check italics/bold/underline flags in macStyle... + if (flags) { + hd = stbtt__find_table(fc, offset, "head"); + if ((ttUSHORT(fc+hd+44) & 7) != (flags & 7)) return 0; + } + + nm = stbtt__find_table(fc, offset, "name"); + if (!nm) return 0; + + if (flags) { + // if we checked the macStyle flags, then just check the family and ignore the subfamily + if (stbtt__matchpair(fc, nm, name, nlen, 16, -1)) return 1; + if (stbtt__matchpair(fc, nm, name, nlen, 1, -1)) return 1; + if (stbtt__matchpair(fc, nm, name, nlen, 3, -1)) return 1; + } else { + if (stbtt__matchpair(fc, nm, name, nlen, 16, 17)) return 1; + if (stbtt__matchpair(fc, nm, name, nlen, 1, 2)) return 1; + if (stbtt__matchpair(fc, nm, name, nlen, 3, -1)) return 1; + } + + return 0; +} + +static int stbtt_FindMatchingFont_internal(unsigned char *font_collection, char *name_utf8, stbtt_int32 flags) +{ + stbtt_int32 i; + for (i=0;;++i) { + stbtt_int32 off = stbtt_GetFontOffsetForIndex(font_collection, i); + if (off < 0) return off; + if (stbtt__matches((stbtt_uint8 *) font_collection, off, (stbtt_uint8*) name_utf8, flags)) + return off; + } +} + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcast-qual" +#endif + +STBTT_DEF int stbtt_BakeFontBitmap(const unsigned char *data, int offset, + float pixel_height, unsigned char *pixels, int pw, int ph, + int first_char, int num_chars, stbtt_bakedchar *chardata) +{ + return stbtt_BakeFontBitmap_internal((unsigned char *) data, offset, pixel_height, pixels, pw, ph, first_char, num_chars, chardata); +} + +STBTT_DEF int stbtt_GetFontOffsetForIndex(const unsigned char *data, int index) +{ + return stbtt_GetFontOffsetForIndex_internal((unsigned char *) data, index); +} + +STBTT_DEF int stbtt_GetNumberOfFonts(const unsigned char *data) +{ + return stbtt_GetNumberOfFonts_internal((unsigned char *) data); +} + +STBTT_DEF int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data, int offset) +{ + return stbtt_InitFont_internal(info, (unsigned char *) data, offset); +} + +STBTT_DEF int stbtt_FindMatchingFont(const unsigned char *fontdata, const char *name, int flags) +{ + return stbtt_FindMatchingFont_internal((unsigned char *) fontdata, (char *) name, flags); +} + +STBTT_DEF int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len1, const char *s2, int len2) +{ + return stbtt_CompareUTF8toUTF16_bigendian_internal((char *) s1, len1, (char *) s2, len2); +} + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif + +#endif // STB_TRUETYPE_IMPLEMENTATION + + +// FULL VERSION HISTORY +// +// 1.25 (2021-07-11) many fixes +// 1.24 (2020-02-05) fix warning +// 1.23 (2020-02-02) query SVG data for glyphs; query whole kerning table (but only kern not GPOS) +// 1.22 (2019-08-11) minimize missing-glyph duplication; fix kerning if both 'GPOS' and 'kern' are defined +// 1.21 (2019-02-25) fix warning +// 1.20 (2019-02-07) PackFontRange skips missing codepoints; GetScaleFontVMetrics() +// 1.19 (2018-02-11) OpenType GPOS kerning (horizontal only), STBTT_fmod +// 1.18 (2018-01-29) add missing function +// 1.17 (2017-07-23) make more arguments const; doc fix +// 1.16 (2017-07-12) SDF support +// 1.15 (2017-03-03) make more arguments const +// 1.14 (2017-01-16) num-fonts-in-TTC function +// 1.13 (2017-01-02) support OpenType fonts, certain Apple fonts +// 1.12 (2016-10-25) suppress warnings about casting away const with -Wcast-qual +// 1.11 (2016-04-02) fix unused-variable warning +// 1.10 (2016-04-02) allow user-defined fabs() replacement +// fix memory leak if fontsize=0.0 +// fix warning from duplicate typedef +// 1.09 (2016-01-16) warning fix; avoid crash on outofmem; use alloc userdata for PackFontRanges +// 1.08 (2015-09-13) document stbtt_Rasterize(); fixes for vertical & horizontal edges +// 1.07 (2015-08-01) allow PackFontRanges to accept arrays of sparse codepoints; +// allow PackFontRanges to pack and render in separate phases; +// fix stbtt_GetFontOFfsetForIndex (never worked for non-0 input?); +// fixed an assert() bug in the new rasterizer +// replace assert() with STBTT_assert() in new rasterizer +// 1.06 (2015-07-14) performance improvements (~35% faster on x86 and x64 on test machine) +// also more precise AA rasterizer, except if shapes overlap +// remove need for STBTT_sort +// 1.05 (2015-04-15) fix misplaced definitions for STBTT_STATIC +// 1.04 (2015-04-15) typo in example +// 1.03 (2015-04-12) STBTT_STATIC, fix memory leak in new packing, various fixes +// 1.02 (2014-12-10) fix various warnings & compile issues w/ stb_rect_pack, C++ +// 1.01 (2014-12-08) fix subpixel position when oversampling to exactly match +// non-oversampled; STBTT_POINT_SIZE for packed case only +// 1.00 (2014-12-06) add new PackBegin etc. API, w/ support for oversampling +// 0.99 (2014-09-18) fix multiple bugs with subpixel rendering (ryg) +// 0.9 (2014-08-07) support certain mac/iOS fonts without an MS platformID +// 0.8b (2014-07-07) fix a warning +// 0.8 (2014-05-25) fix a few more warnings +// 0.7 (2013-09-25) bugfix: subpixel glyph bug fixed in 0.5 had come back +// 0.6c (2012-07-24) improve documentation +// 0.6b (2012-07-20) fix a few more warnings +// 0.6 (2012-07-17) fix warnings; added stbtt_ScaleForMappingEmToPixels, +// stbtt_GetFontBoundingBox, stbtt_IsGlyphEmpty +// 0.5 (2011-12-09) bugfixes: +// subpixel glyph renderer computed wrong bounding box +// first vertex of shape can be off-curve (FreeSans) +// 0.4b (2011-12-03) fixed an error in the font baking example +// 0.4 (2011-12-01) kerning, subpixel rendering (tor) +// bugfixes for: +// codepoint-to-glyph conversion using table fmt=12 +// codepoint-to-glyph conversion using table fmt=4 +// stbtt_GetBakedQuad with non-square texture (Zer) +// updated Hello World! sample to use kerning and subpixel +// fixed some warnings +// 0.3 (2009-06-24) cmap fmt=12, compound shapes (MM) +// userdata, malloc-from-userdata, non-zero fill (stb) +// 0.2 (2009-03-11) Fix unsigned/signed char warnings +// 0.1 (2009-03-09) First public release +// + +/* +------------------------------------------------------------------------------ +This software is available under 2 licenses -- choose whichever you prefer. +------------------------------------------------------------------------------ +ALTERNATIVE A - 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 +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. +------------------------------------------------------------------------------ +ALTERNATIVE B - Public Domain (www.unlicense.org) +This is free and unencumbered software released into the public domain. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this +software, either in source code form or as a compiled binary, for any purpose, +commercial or non-commercial, and by any means. +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and to +the detriment of our heirs and successors. We intend this dedication to be an +overt act of relinquishment in perpetuity of all present and future rights to +this software under copyright law. +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 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/widget/milsko/milskosrc/include/Mw/Abstract/CharSet.h b/widget/milsko/milskosrc/include/Mw/Abstract/CharSet.h new file mode 100644 index 0000000000..f0a42f7d03 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Abstract/CharSet.h @@ -0,0 +1,22 @@ +/*! + * @file Mw/Abstract/CharSet.h + * @brief CharSet + */ +#ifndef __MW_ABSTRACT_CHARSET_H__ +#define __MW_ABSTRACT_CHARSET_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +MWDECL char* MWAPI MwACPToUTF8(const char* input); + +MWDECL char* MWAPI MwUTF8ToACP(const char* input); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Abstract/Directory.h b/widget/milsko/milskosrc/include/Mw/Abstract/Directory.h new file mode 100644 index 0000000000..1e1db49cc2 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Abstract/Directory.h @@ -0,0 +1,59 @@ +/*! + * @file Mw/Abstract/Directory.h + * @brief Directory functions + */ +#ifndef __MW_ABSTRACT_DIRECTORY_H__ +#define __MW_ABSTRACT_DIRECTORY_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Opens a directory + * @param path Path + * @return Handle + */ +MWDECL void* MWAPI MwDirectoryOpen(const char* path); + +/*! + * @brief Closes a directory + * @param handle Handle + */ +MWDECL void MWAPI MwDirectoryClose(void* handle); + +/*! + * @brief Reads a directory + * @param handle Handle + * @return Directory entry + */ +MWDECL MwDirectoryEntry* MWAPI MwDirectoryRead(void* handle); + +/*! + * @brief Frees a directory entry + * @param entry Entry + */ +MWDECL void MWAPI MwDirectoryFreeEntry(MwDirectoryEntry* entry); + +/*! + * @brief Gets a current directory + * @param Directory + */ +MWDECL char* MWAPI MwDirectoryCurrent(void); + +/*! + * @brief Joins 2 paths + * @param a Path + * @param b Path + * @return Path + */ +MWDECL char* MWAPI MwDirectoryJoin(char* a, char* b); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Abstract/Dynamic.h b/widget/milsko/milskosrc/include/Mw/Abstract/Dynamic.h new file mode 100644 index 0000000000..ead5070613 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Abstract/Dynamic.h @@ -0,0 +1,38 @@ +/*! + * @file Mw/Abstract/Dynamic.h + * @brief Dynamic library + */ +#ifndef __MW_ABSTRACT_DYNAMIC_H__ +#define __MW_ABSTRACT_DYNAMIC_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Opens a dynamic library + * @param path Path + * @return Handle + */ +MWDECL void* MWAPI MwDynamicOpen(const char* path); + +/*! + * @brief Gets a symbol from the dynamic library + * @param handle Handle + * @param symbol Symbol + */ +MWDECL void* MWAPI MwDynamicSymbol(void* handle, const char* symbol); + +/*! + * @brief Closes a dynamic library + * @param handle Handle + */ +MWDECL void MWAPI MwDynamicClose(void* handle); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Abstract/Time.h b/widget/milsko/milskosrc/include/Mw/Abstract/Time.h new file mode 100644 index 0000000000..c8ffbf6bfd --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Abstract/Time.h @@ -0,0 +1,30 @@ +/*! + * @file Mw/Abstract/Time.h + * @brief Time + */ +#ifndef __MW_ABSTRACT_TIME_H__ +#define __MW_ABSTRACT_TIME_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Sleeps for milliseconds + * @param ms Milliseconds + */ +MWDECL void MWAPI MwTimeSleep(int ms); + +/*! + * @brief Gets a monotonic time + * @return Monotonic time + */ +MWDECL long MWAPI MwTimeGetTick(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/BaseTypes.h b/widget/milsko/milskosrc/include/Mw/BaseTypes.h new file mode 100644 index 0000000000..313215eca1 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/BaseTypes.h @@ -0,0 +1,113 @@ +/*! + * @file Mw/BaseTypes.h + * @brief Base type definitions + */ +#ifndef __MW_BASETYPES_H__ +#define __MW_BASETYPES_H__ + +typedef struct _MwPoint MwPoint; +typedef struct _MwRect MwRect; +typedef struct _MwSizeHints MwSizeHints; +typedef struct _MwFont MwFont; +typedef struct _MwCursor MwCursor; +typedef struct _MwRGB MwRGB; + +typedef unsigned char MwBool; +#define MwTRUE ((MwBool)1) +#define MwFALSE ((MwBool)0) + +#if __STDC_VERSION__ >= 199901L +#include + +typedef int64_t MwI64; +typedef uint64_t MwU64; + +typedef int32_t MwI32; +typedef uint32_t MwU32; + +typedef int16_t MwI16; +typedef uint16_t MwU16; + +typedef int8_t MwI8; +typedef uint8_t MwU8; + +#define MW_OTHER_TYPES_DEFINED +#elif !defined(__STRICT_ANSI__) && (defined(__GNUC__) || defined(__clang__)) +typedef long long MwI64; +typedef unsigned long long MwU64; +#elif defined(_MSC_VER) || defined(__BORLANDC__) || defined(__WATCOMC__) +typedef __int64 MwI64; +typedef unsigned __int64 MwU64; + +typedef __int32 MwI32; +typedef unsigned __int32 MwU32; + +typedef __int16 MwI16; +typedef unsigned __int16 MwU16; + +typedef __int8 MwI8; +typedef unsigned __int8 MwU8; + +#define MW_OTHER_TYPES_DEFINED +#else +/* out of hope */ +typedef long MwI64; +typedef unsigned long MwU64; +#endif + +#ifdef MW_OTHER_TYPES_DEFINED +#undef MW_OTHER_TYPES_DEFINED +#else +typedef int MwI32; +typedef unsigned int MwU32; + +typedef short MwI16; +typedef unsigned short MwU16; + +typedef signed char MwI8; +typedef unsigned char MwU8; +#endif + +typedef MwI64 MwOffset; + +struct _MwPoint { + int x; + int y; +}; + +struct _MwRect { + int x; + int y; + int width; + int height; +}; + +struct _MwSizeHints { + int min_width; + int min_height; + int max_width; + int max_height; +}; + +#define MwCursorDataHeight 16 +struct _MwCursor { + int width; + int height; + int x; + int y; + unsigned int data[MwCursorDataHeight]; +}; + +struct _MwFont { + int left; + int top; + unsigned char data[16]; +}; + +struct _MwRGB { + MwU16 red; + MwU16 green; + MwU16 blue; +}; + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Constants.h b/widget/milsko/milskosrc/include/Mw/Constants.h new file mode 100644 index 0000000000..15853ff7bc --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Constants.h @@ -0,0 +1,142 @@ +/*! + * @file Mw/Constants.h + * @brief Constants + */ +#ifndef __MW_CONSTANTS_H__ +#define __MW_CONSTANTS_H__ + +/*! + * @brief Direction enumeration + */ +enum MwDIRECTION { + MwNORTH = 0, + MwSOUTH, + MwEAST, + MwWEST +}; + +/*! + * @brief Orientation + */ +enum MwORIENTATION { + MwVERTICAL = 0, + MwHORIZONTAL +}; + +/*! + * @brief Alignment + */ +enum MwALIGNMENT { + MwALIGNMENT_CENTER = 0, + MwALIGNMENT_BEGINNING, + MwALIGNMENT_END +}; + +/*! + * @brief Default + */ +#define MwDEFAULT 0x0fffffff + +/*! + * @brief Directory entry type + */ +enum MwDIRECTORY_TYPE { + MwDIRECTORY_FILE = 0, + MwDIRECTORY_DIRECTORY +}; + +/*! + * @brief Icon mask + */ +#define MwMB_ICONMASK 0xf + +enum MwMB_ICON { + MwMB_ICONWARNING = 0x1, + MwMB_ICONINFO, + MwMB_ICONNOTE, + MwMB_ICONNEWS, + MwMB_ICONERROR, + MwMB_ICONCLOCK +}; + +/*! + * @brief Button mask + */ +#define MwMB_BUTTONMASK 0xf0 + +/*! + * @brief OK button + */ +#define MwMB_BUTTONOK 0x10 + +/*! + * @brief Cancel button + */ +#define MwMB_BUTTONCANCEL 0x20 + +/*! + * @brief Yes button + */ +#define MwMB_BUTTONYES 0x40 + +/*! + * @brief No button + */ +#define MwMB_BUTTONNO 0x80 + +/*! + * @brief Ok and Cancel button + */ +#define MwMB_BUTTONOKCANCEL (MwMB_BUTTONCANCEL | MwMB_BUTTONOK) + +/*! + * @brief Yes and No button + */ +#define MwMB_BUTTONYESNO (MwMB_BUTTONYES | MwMB_BUTTONNO) + +/*! + * @brief Yes, No and Cancel button + */ +#define MwMB_BUTTONYESNOCANCEL (MwMB_BUTTONYES | MwMB_BUTTONNO | MwMB_BUTTONCANCEL) + +/* Whether or not GetXY/SetXY works with global or local coordinates */ +enum MwCOORDINATE { + MwCOORDINATE_GLOBAL = 0, + MwCOORDINATE_LOCAL, +}; + +/* The clipboard type that MwGetClipboard should return */ +enum MwCLIPBOARD { + /* the clipboard that is present on every platform that supports it */ + MwCLIPBOARD_MAIN = 0, + /* the "primary" clipboard that Wayland stores to emulate X11's behavior. */ + MwCLIPBOARD_PRIMARY, +}; + +enum MwMOUSE { + MwMOUSE_LEFT = 1, + MwMOUSE_MIDDLE, + MwMOUSE_RIGHT, + MwMOUSE_WHEELUP, + MwMOUSE_WHEELDOWN +}; + +#define MwKEY_FLAG 0x80000000 +#define MwKEY_CONTROL_FLAG MwKEY_FLAG | 0x40000000 +#define MwKEY_ALT_FLAG MwKEY_FLAG | 0x20000000 + +enum MwKEY { + MwKEY_BACKSPACE = MwKEY_FLAG | 1, + MwKEY_LEFT, + MwKEY_RIGHT, + MwKEY_UP, + MwKEY_DOWN, + MwKEY_ENTER, + MwKEY_ESCAPE, + MwKEY_LEFTSHIFT, + MwKEY_RIGHTSHIFT, + MwKEY_ALT, + MwKEY_CONTROL +}; + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Core.h b/widget/milsko/milskosrc/include/Mw/Core.h new file mode 100644 index 0000000000..61cb085505 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Core.h @@ -0,0 +1,405 @@ +/*! + * @file Mw/Core.h + * @brief Core + */ +#ifndef __MW_CORE_H__ +#define __MW_CORE_H__ + +#include +#include + +/*! + * @warning Used internally + * @brief Dispatches the handler of widget class + * @param x Widget + * @param y Handler name + */ +#define MwDispatch(x, y) \ + if(!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x) + +/*! + * @warning Used internally + * @brief Dispatches the handler of widget class + * @param x Widget + * @param y Handler name + * @return `0` for success, otherwise failed + */ +#define MwDispatch2(x, y) \ + ((!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) ? x->widget_class->y(x) : 0) + +/*! + * @warning Used internally + * @brief Dispatches the handler of widget class + * @param x Widget + * @param y Handler name + * @param z Argument + */ +#define MwDispatch3(x, y, z) \ + if(!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x, z) + +/*! + * @warning Used internally + * @brief Dispatches the handler of widget class + * @param x Widget + * @param y Handler name + * @param z Argument + * @param w Argument + */ +#define MwDispatch4(x, y, z, w) \ + if(!x->destroyed && x->widget_class != NULL && x->widget_class->y != NULL) x->widget_class->y(x, z, w) + +#define MwWaitMS 30 + +#define MwDoubleClickTimeout 250 + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Initializes the Milsko Toolkit + * @return `0` if successful + */ +MWDECL int MWAPI MwLibraryInit(void); + +/*! + * @brief Creates a widget + * @param widget_class Widget class + * @param name Widget name + * @param parent Parent widget or `NULL` + * @param x X + * @param y Y + * @param width Width + * @param height Height + * @return Widget + */ +MWDECL MwWidget MWAPI MwCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height); + +/*! + * @brief Creates a widget + * @param widget_class Widget class + * @param name Widget name + * @param parent Parent widget or `NULL` + * @param x X + * @param y Y + * @param width Width + * @param height Height + * @param ... Same with MwVaApply + * @return Widget + */ +MWDECL MwWidget MWAPI MwVaCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height, ...); + +/*! + * @brief Creates a widget + * @param widget_class Widget class + * @param name Widget name + * @param parent Parent widget or `NULL` + * @param x X + * @param y Y + * @param width Width + * @param height Height + * @param va Same with MwVaListApply + * @return Widget + */ +MWDECL MwWidget MWAPI MwVaListCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height, va_list va); + +/*! + * @brief Destroys the widget and its child widgets + * @param handle Widget + */ +MWDECL void MWAPI MwDestroyWidget(MwWidget handle); + +/*! + * @brief Executes a method specific to the widget (varadic version). + * @warning Prefer using corresponding functions for better code clarity and type safety. + * @param handle Widget + * @param ... Widget function arguments. + */ +MWDECL void MWAPI MwVaWidgetExecute(MwWidget handle, const char* func_name, void* out, ...); + +/*! + * @brief Executes a method specific to the widget (va_list version). + * @warning Prefer using corresponding functions for better code clarity and type safety. + * @param handle Widget + * @param va Widget function arguments. + */ +MWDECL void MWAPI MwVaListWidgetExecute(MwWidget handle, const char* func_name, void* out, va_list va); + +/*! + * @brief Runs the main loop + * @param handle Widget + */ +MWDECL void MWAPI MwLoop(MwWidget handle); + +/*! + * @brief Runs the single step + * @param handle Widget + * @return `0` if successful + */ +MWDECL int MWAPI MwStep(MwWidget handle); + +/*! + * @brief Check if any event is pending + * @param handle Widget + * @return `1` if any event is pending + */ +MWDECL int MWAPI MwPending(MwWidget handle); + +/*! + * @brief Sets an integer property + * @param handle Widget + * @param key Key + * @param n Value + */ +MWDECL void MWAPI MwSetInteger(MwWidget handle, const char* key, int n); + +/*! + * @brief Sets a text property + * @param handle Widget + * @param key Key + * @param value Value + */ +MWDECL void MWAPI MwSetText(MwWidget handle, const char* key, const char* value); + +/*! + * @brief Sets a void pointer property + * @param handle Widget + * @param key Key + * @param value Value + */ +MWDECL void MWAPI MwSetVoid(MwWidget handle, const char* key, void* value); + +/*! + * @brief Gets the integer property + * @param handle Widget + * @param key Key + * @return Value + */ +MWDECL int MWAPI MwGetInteger(MwWidget handle, const char* key); + +/*! + * @brief Gets the text property + * @param handle Widget + * @param key Key + * @return Value + */ +MWDECL const char* MWAPI MwGetText(MwWidget handle, const char* key); + +/*! + * @brief Gets the void pointer property + * @param handle Widget + * @param key Key + * @return Value + */ +MWDECL void* MWAPI MwGetVoid(MwWidget handle, const char* key); + +/*! + * @brief Sets the default property + * @param handle Widget + * @warning This is called when widget is created + */ +MWDECL void MWAPI MwSetDefault(MwWidget handle); + +/*! + * @brief Sets the properties + * @param handle Widget + * @param ... Properties + */ +MWDECL void MWAPI MwVaApply(MwWidget handle, ...); + +/*! + * @brief Sets properties + * @param handle Widget + * @param va Properties + */ +MWDECL void MWAPI MwVaListApply(MwWidget handle, va_list va); + +/*! + * @brief Sets a user handler + * @param handle Widget + * @param key Key + * @param handler Handler + * @param user_data User data passed to handler + */ +MWDECL void MWAPI MwAddUserHandler(MwWidget handle, const char* key, MwUserHandler handler, void* user_data); + +/*! + * @brief Dispatches the user handler + * @param handle Widget + * @param key Key + * @param handler_data Handler data passed to handler + */ +MWDECL void MWAPI MwDispatchUserHandler(MwWidget handle, const char* key, void* handler_data); + +/*! + * @brief Sets an error handler + * @param handle Widget + * @param handler Handler + * @param user_data User data passed to handler + */ +MWDECL void MWAPI MwSetErrorHandler(MwErrorHandler handler, void* user_data); + +/*! + * @brief Dispatches the error handler + * @param code Error code + * @param message Error message + */ +MWDECL void MWAPI MwDispatchError(int code, const char* message); + +/*! + * @brief Forcefully makes widget render + * @param handle Widget + */ +MWDECL void MWAPI MwForceRender(MwWidget handle); + +/*! + * @brief Forcefully makes widget render + * @param handle Widget + * @param ptr Ignored + */ +MWDECL void MWAPI MwForceRender2(MwWidget handle, void* ptr); + +/*! + * @brief Adds an widget to tick handler list + * @param handle Widget + */ +MWDECL void MWAPI MwAddTickList(MwWidget handle); + +/*! + * @brief Focus the widget + * @param handle Widget + */ +MWDECL void MWAPI MwFocus(MwWidget handle); + +/*! + * @brief Grabs the pointer + * @param handle Widget + * @param toggle Toggle + */ +MWDECL void MWAPI MwGrabPointer(MwWidget handle, int toggle); + +/*! + * @brief Hides the cursor + * @param handle Widget + */ +MWDECL void MWAPI MwHideCursor(MwWidget handle); + +/*! + * @brief Toggles the dark theme + * @param handle Widget + * @param toggle Toggle + * @deprecated Use MwNdarkTheme instead + */ +MWDECL void MWAPI MwSetDarkTheme(MwWidget handle, int toggle); + +/*! + * @brief Gets the parent widget + * @param handle Widget + * @return Parent widget + */ +MWDECL MwWidget MWAPI MwGetParent(MwWidget handle); + +/*! + * @brief Show widget + * @param handle Widget + * @param toggle Toggle + */ +MWDECL void MWAPI MwShow(MwWidget handle, int toggle); + +/*! + * @brief Reparents widget + * @param handle Widget + * @param new_parent New parent + */ +MWDECL void MWAPI MwReparent(MwWidget handle, MwWidget new_parent); + +/*! + * @brief Gets class of widget + * @param handle Widget + * @return Class + */ +MWDECL MwClass MWAPI MwGetClass(MwWidget handle); + +/*! + * @brief Gets name of widget + * @param handle Widget + * @return Name + */ +MWDECL const char* MWAPI MwGetName(MwWidget handle); + +/*! + * @brief Gets children of widget + * @param handle Widget + * @return Children (NULL-terminated array) + */ +MWDECL MwWidget* MWAPI MwGetChildren(MwWidget handle); + +/*! + * @brief Gets the cursor coordinate + * @param handle Widget + * @param point Point + */ +MWDECL void MWAPI MwGetCursorCoord(MwWidget handle, MwPoint* point); + +/*! + * @brief Gets the screen size + * @param handle Widget + * @param rect Rectangle + */ +MWDECL void MWAPI MwGetScreenSize(MwWidget handle, MwRect* rect); + +/*! + * @brief Reports whether a widget reports global or local coordinates upon GetXY/SetXY. Anything with a parent reports local, and most backends report global coordinates being supported for top level windows, but some (Wayland) do not. + * @param handle Widget + */ +MWDECL int MWAPI MwGetCoordinateType(MwWidget handle); + +/*! + * @brief Queue to get clipboard content + * @param handle Widget + * @param clipboard_type The Clipboard Type to get. See MwClipboardType. This is ignored on backends that aren't X11/Wayland, so if you're unsure, just use MwClipboardMain + */ +MWDECL void MWAPI MwGetClipboard(MwWidget handle, int clipboard_type); + +/*! + * @brief Set user pointer + * @param handle Widget + * @param user User pointer + */ +MWDECL void MWAPI MwSetUser(MwWidget handle, void* user); + +/*! + * @brief Get user pointer + * @param handle Widget + * @return User pointer + */ +MWDECL void* MWAPI MwGetUser(MwWidget handle); + +/*! + * @brief Free the widget + * @param handle Widget + * @warning This is used internally! + * @note You can call this on toplevel widget safely if you're sure no event loops will be ran, e.g. after `MwLoop`. + */ +MWDECL void MWAPI MwFreeWidget(MwWidget handle); + +/*! + * @brief Gets the frame of the widget + * @param handle Widget + * @param rect Frame + */ +MWDECL void MWAPI MwGetFrame(MwWidget handle, MwRect* rect); + +#ifdef _MILSKO +MWDECL void MwForceRender_Internal(MwWidget handle); +MWDECL void MwForceRender2_Internal(MwWidget handle, void* ptr); + +#define MwForceRender MwForceRender_Internal +#define MwForceRender2 MwForceRender2_Internal +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Default.h b/widget/milsko/milskosrc/include/Mw/Default.h new file mode 100644 index 0000000000..322082b281 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Default.h @@ -0,0 +1,96 @@ +/*! + * @file Mw/Default.h + * @brief Default properties + */ +#ifndef __MW_DEFAULT_H__ +#define __MW_DEFAULT_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Default background color + */ +MWDECL const char* MwDefaultBackground; + +/*! + * @brief Default foreground color + */ +MWDECL const char* MwDefaultForeground; + +/*! + * @brief Default sub background color + */ +MWDECL const char* MwDefaultSubBackground; + +/*! + * @brief Default sub foreground color + */ +MWDECL const char* MwDefaultSubForeground; + +/*! + * @brief Default title background color + */ +MWDECL const char* MwDefaultTitleBackground; + +/*! + * @brief Default title foreground color + */ +MWDECL const char* MwDefaultTitleForeground; + +/*! + * @brief Default dark theme background color + */ +MWDECL const char* MwDefaultDarkBackground; + +/*! + * @brief Default dark theme foreground color + */ +MWDECL const char* MwDefaultDarkForeground; + +/*! + * @brief Default dark theme sub background color + */ +MWDECL const char* MwDefaultDarkSubBackground; + +/*! + * @brief Default dark theme sub foreground color + */ +MWDECL const char* MwDefaultDarkSubForeground; + +/*! + * @brief Default dark theme title background color + */ +MWDECL const char* MwDefaultDarkTitleBackground; + +/*! + * @brief Default dark theme title foreground color + */ +MWDECL const char* MwDefaultDarkTitleForeground; + +/*! + * @brief Default shadow difference + */ +MWDECL const int MwDefaultShadow; + +/*! + * @brief Gets default border width + * @param handle Widget + */ +MWDECL int MWAPI MwDefaultBorderWidth(MwWidget handle); + +/*! + * @brief Gets default thin border width + * @param handle Widget + */ +MWDECL int MwDefaultThinBorderWidth(MwWidget handle); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Dialog/ColorPicker.h b/widget/milsko/milskosrc/include/Mw/Dialog/ColorPicker.h new file mode 100644 index 0000000000..b143fdf50d --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Dialog/ColorPicker.h @@ -0,0 +1,27 @@ +/*! + * @file Mw/Dialog/ColorPicker.h + * @brief Color picker + */ +#ifndef __MW_COLORPICKER_H__ +#define __MW_COLORPICKER_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Creates a color picker + * @param handle Widget + * @param title Title text + * @return Widget + */ +MWDECL MwWidget MWAPI MwColorPicker(MwWidget handle, const char* title); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Dialog/DirectoryChooser.h b/widget/milsko/milskosrc/include/Mw/Dialog/DirectoryChooser.h new file mode 100644 index 0000000000..cc6853c309 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Dialog/DirectoryChooser.h @@ -0,0 +1,27 @@ +/*! + * @file Mw/Dialog/DirectoryChooser.h + * @brief Directory chooser + */ +#ifndef __MW_DIRECTORYCHOOSER_H__ +#define __MW_DIRECTORYCHOOSER_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Creates a directory chooser + * @param handle Widget + * @param title Title text + * @return Widget + */ +MWDECL MwWidget MWAPI MwDirectoryChooser(MwWidget handle, const char* title); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Dialog/FileChooser.h b/widget/milsko/milskosrc/include/Mw/Dialog/FileChooser.h new file mode 100644 index 0000000000..f6aa094ed1 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Dialog/FileChooser.h @@ -0,0 +1,36 @@ +/*! + * @file Mw/Dialog/FileChooser.h + * @brief File chooser + */ +#ifndef __MW_FILECHOOSER_H__ +#define __MW_FILECHOOSER_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Creates a file chooser + * @param handle Widget + * @param title Title text + * @return Widget + */ +MWDECL MwWidget MWAPI MwFileChooser(MwWidget handle, const char* title); + +/*! + * @brief Creates a file chooser + * @param handle Widget + * @param title Title text + * @param dir Show directory only or not + * @return Widget + */ +MWDECL MwWidget MWAPI MwFileChooserEx(MwWidget handle, const char* title, int dir); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Dialog/MessageBox.h b/widget/milsko/milskosrc/include/Mw/Dialog/MessageBox.h new file mode 100644 index 0000000000..a8a5a462d9 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Dialog/MessageBox.h @@ -0,0 +1,36 @@ +/*! + * @file Mw/Dialog/MessageBox.h + * @brief Message box + */ +#ifndef __MW_MESSAGEBOX_H__ +#define __MW_MESSAGEBOX_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Creates a message box + * @param handle Widget + * @param text Text + * @param title Title text + * @param flag Flag + * @return Widget + */ +MWDECL MwWidget MWAPI MwMessageBox(MwWidget handle, const char* text, const char* title, unsigned int flag); + +/*! + * @brief Gets a child of the message box + * @param handle Widget + * @param child Child + */ +MWDECL MwWidget MWAPI MwMessageBoxGetChild(MwWidget handle, int child); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Draw.h b/widget/milsko/milskosrc/include/Mw/Draw.h new file mode 100644 index 0000000000..deefe0fce0 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Draw.h @@ -0,0 +1,242 @@ +/*! + * @file Mw/Draw.h + * @brief Common drawing API + */ +#ifndef __MW_DRAW_H__ +#define __MW_DRAW_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Parses a color text + * @param handle Widget + * @param text Color text + * @return Color + */ +MWDECL MwLLColor MWAPI MwParseColor(MwWidget handle, const char* text); + +/*! + * @brief Parses a color text + * @param text Color text + * @param rgb RGB + */ +MWDECL void MWAPI MwParseColorNoAllocate(const char* text, MwRGB* rgb); + +/*! + * @brief Initialize color table + * @warning This is called in MwLibraryInit - you do not have to call this + */ +MWDECL void MWAPI MwColorTableInit(void); + +/*! + * @brief Lighten a color + * @param handle Widget + * @param color Color + * @param r Red + * @param g Green + * @param b Blue + * @return Color + */ +MWDECL MwLLColor MWAPI MwLightenColor(MwWidget handle, MwLLColor color, int r, int g, int b); + +/*! + * @brief Draws a filled rectangle + * @param handle Widget + * @param rect Rectangle area + * @param color Color + */ +MWDECL void MWAPI MwDrawRect(MwWidget handle, MwRect* rect, MwLLColor color); + +/*! + * @brief Draws a filled rectangle that fades to a darker color + * @param handle Widget + * @param rect Rectangle area + * @param color Color + */ +MWDECL void MWAPI MwDrawRectFading(MwWidget handle, MwRect* rect, MwLLColor color); + +/*! + * @brief Draws a frame + * @param handle Widget + * @param rect Rectangle area + * @param color Color + * @param invert Invert the 3D border color or not + * @warning `rect` gets changed to the area of rectangle inside + */ +MWDECL void MWAPI MwDrawFrame(MwWidget handle, MwRect* rect, MwLLColor color, int invert); + +/*! + * @brief Draws a frame + * @param handle Widget + * @param rect Rectangle area + * @param color Color + * @param invert Invert the 3D border color or not + * @param border Border + * @warning `rect` gets changed to the area of rectangle inside + */ +MWDECL void MWAPI MwDrawFrameWithBorder(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border); + +/*! + * @brief Does the DrawFrame/DrawRect combo used for drawing widget. + * @param handle Widget + * @param rect Rectangle area + * @param color Color + * @param invert Invert the 3D border color or not + * @warning `rect` gets changed to the area of rectangle inside + */ +MWDECL void MWAPI MwDrawWidgetBack(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border); + +/*! + * @brief Draws a triangle + * @param handle Widget + * @param rect Rectangle area + * @param color Color + * @param invert Invert the 3D border color or not + */ +MWDECL void MWAPI MwDrawTriangle(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int direction); + +/*! + * @brief Draws a frame with specified border width + * @param handle Widget + * @param rect Rectangle area + * @param color Color + * @param invert Invert the 3D border color or not + * @param border Border width + * @param diff Difference (set this to 0 if you don't know what this does) + * @param same Same as dark color + * @warning `rect` gets changed to the area of rectangle inside + */ +MWDECL void MWAPI MwDrawFrameEx(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border, int diff, int same); + +/*! + * @brief Creates a pixmap from image + * @param handle Widget + * @param path Path + * @return Pixmap + */ +MWDECL MwLLPixmap MWAPI MwLoadImage(MwWidget handle, const char* path); + +/*! + * @brief Get color components + * @param color Color + * @param red Pointer to red color + * @param green Pointer to green color + * @param blue Pointer to blue color + */ +MWDECL void MWAPI MwColorGet(MwLLColor color, int* red, int* green, int* blue); + +/*! + * @brief Creates a pixmap from raw data + * @param handle Widget + * @param rgb RGBA data + * @param width Width + * @param height Height + * @return Pixmap + */ +MWDECL MwLLPixmap MWAPI MwLoadRaw(MwWidget handle, unsigned char* rgb, int width, int height); + +/*! + * @brief Updates a pixmap using raw data + * @param pixmap Pixmap to update + * @param rgb RGBA data + */ +MWDECL void MWAPI MwPixmapReloadRaw(MwLLPixmap pixmap, unsigned char* rgb); + +/*! + * @brief Gets the raw data of pixmap + * @param pixmap Pixmap + * @return RGBA data + */ +MWDECL unsigned char* MWAPI MwPixmapGetRaw(MwLLPixmap pixmap); + +/*! + * @brief Gets the size of pixmap + * @param pixmap Pixmap + * @param rect Size + */ +MWDECL void MWAPI MwPixmapGetSize(MwLLPixmap pixmap, MwRect* rect); + +/*! + * @brief Creates a pixmap from XPM data + * @param handle Widget + * @param data Data + * @return Pixmap + */ +MWDECL MwLLPixmap MWAPI MwLoadXPM(MwWidget handle, char** data); + +/*! + * @brief Creates a pixmap from icon data + * @param handle Widget + * @param data Data + * @return Pixmap + */ +MWDECL MwLLPixmap MWAPI MwLoadIcon(MwWidget handle, MwU32* data); + +/*! + * @brief Draws a diamond + * @param handle Widget + * @param rect Rectangle area + * @param color Color + * @param invert Invert the 3D border color or not + */ +MWDECL void MWAPI MwDrawDiamond(MwWidget handle, MwRect* rect, MwLLColor color, int invert); + +/* text.c */ + +/*! + * @brief Draws a text + * @param handle Widget + * @param ttf TTF, NULLable + * @param point Center point of the text + * @param text Text + * @param align Align + * @param color Color + */ +MWDECL void MWAPI MwDrawText(MwWidget handle, MwFLFont ttf, MwPoint* point, const char* text, int align, MwLLColor color); + +/*! + * @brief Calculates a text width + * @param handle Widget + * @param text Text + * @param font Font, NULLable + * @return Text width + */ +MWDECL int MWAPI MwTextWidth(MwWidget handle, MwFLFont font, const char* text); + +/*! + * @brief Calculates a text height + * @param handle Widget + * @param text Text + * @param font Font, NULLable + * @return Text height + */ +MWDECL int MWAPI MwTextHeight(MwWidget handle, MwFLFont font, const char* text); + +/* color.c */ + +/*! + * @brief Parses a color name + * @param handle Widget + * @param color Color name + * @return Color + */ +MWDECL MwLLColor MWAPI MwParseColorName(MwWidget handle, const char* color); + +/*! + * @brief Parses a color name + * @param color Color name + * @param rgb RGB + */ +MWDECL void MWAPI MwParseColorNameNoAllocate(const char* color, MwRGB* rgb); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Font.h b/widget/milsko/milskosrc/include/Mw/Font.h new file mode 100644 index 0000000000..9902af69e0 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Font.h @@ -0,0 +1,33 @@ +/*! + * @file Mw/Font.h + * @brief Font + */ +#ifndef __MW_FONT_H__ +#define __MW_FONT_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Loads a TTF Font + * @param data Data + * @param size Data size + * @return Font handle + */ +MWDECL void* MWAPI MwFontLoad(unsigned char* data, unsigned int size); + +/*! + * @brief Frees a font handle + * @param handle Handle + */ +MWDECL void MWAPI MwFontFree(void* handle); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/LowLevel.h b/widget/milsko/milskosrc/include/Mw/LowLevel.h new file mode 100644 index 0000000000..a2be271932 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/LowLevel.h @@ -0,0 +1,363 @@ +/*! + * @file Mw/LowLevel.h + * @brief Low-level drawing API + * @warning This is used internally + */ +#ifndef __MW_LOWLEVEL_H__ +#define __MW_LOWLEVEL_H__ + +#include +#include + +typedef struct _MwLLHandler* MwLLHandler; +typedef struct _MwLLCommon* MwLLCommon; +typedef struct _MwLLCommonColor* MwLLCommonColor; +typedef struct _MwLLCommonPixmap* MwLLCommonPixmap; +#ifdef _MILSKO +typedef union _MwLL* MwLL; +typedef union _MwLLColor* MwLLColor; +typedef union _MwLLPixmap* MwLLPixmap; +typedef struct _MwFLFont* MwFLFont; +#else +typedef void* MwLL; +typedef void* MwLLColor; +typedef void* MwLLPixmap; +typedef void* MwFLFont; +#endif + +enum MwLLBackends { + MwLLBackendX11 = 0, + MwLLBackendGDI, + MwLLBackendWayland, + MwLLBackendCocoa, + MwLLBackendHaiku +}; + +struct _MwLLCommon { + void* user; + int copy_buffer; + int type; + int coordinate_type; + MwBool supports_transparency; + + MwLLHandler handler; +}; + +struct _MwLLCommonColor { + MwU8 red; + MwU8 green; + MwU8 blue; +}; + +struct _MwLLCommonPixmap { + int width; + int height; + unsigned char* raw; + void* user; +}; + +#ifdef USE_DBUS +typedef struct _MwLLDBusFuncTable { + void* lib; + + void (*dbus_error_init)(DBusError* error); + DBusConnection* (*dbus_bus_get)(DBusBusType type, DBusError* error); + dbus_bool_t (*dbus_error_is_set)(const DBusError* error); + void (*dbus_error_free)(DBusError* error); + DBusMessage* (*dbus_message_new_method_call)(const char* bus_name, const char* path, const char* iface, const char* method); + void (*dbus_message_iter_init_append)(DBusMessage* message, DBusMessageIter* iter); + dbus_bool_t (*dbus_message_iter_append_basic)(DBusMessageIter* iter, int type, const void* value); + void (*dbus_connection_flush)(DBusConnection* connection); + dbus_bool_t (*dbus_connection_read_write)(DBusConnection* connection, int timeout_milliseconds); + DBusMessage* (*dbus_connection_send_with_reply_and_block)(DBusConnection* connection, DBusMessage* message, int timeout_milliseconds, DBusError* error); + DBusMessage* (*dbus_connection_pop_message)(DBusConnection* connection); + void (*dbus_bus_add_match)(DBusConnection* connection, const char* rule, DBusError* error); + void (*dbus_message_unref)(DBusMessage* message); + dbus_bool_t (*dbus_message_iter_init)(DBusMessage* message, DBusMessageIter* iter); + dbus_bool_t (*dbus_message_is_signal)(DBusMessage* message, const char* iface, const char* signal_name); + int (*dbus_message_iter_get_arg_type)(DBusMessageIter* iter); + void (*dbus_message_iter_recurse)(DBusMessageIter* iter, DBusMessageIter* sub); + void (*dbus_message_iter_next)(DBusMessageIter* iter); + void (*dbus_connection_unref)(DBusConnection* connection); + void (*dbus_message_iter_get_basic)(DBusMessageIter* iter, void* value); +} MwLLDBusFuncTable; + +typedef struct _MwLLDBusContext { + DBusConnection* dbus_conn; + DBusError dbus_err; + DBusMessage* dbus_msg; + DBusMessage* dbus_reply; +} MwLLDBusContext; + +typedef void (*MwLLDBusPortalPollListener)(MwLL handle, MwU32 new_value); + +/* setup the dbus func table. Returns false and prints a warning if dbus couldn't be found. */ +MWDECL MwBool MwLLDBusFuncSetup(MwLLDBusFuncTable* tbl); + +MWDECL MwBool MwLLDBusNewContext(MwLLDBusFuncTable* tbl, MwLLDBusContext* ctx); +MWDECL MwBool MwLLDBusPortalGet(MwLLDBusFuncTable* tbl, MwLLDBusContext* ctx, const char* portal, const char* namespace, const char* key, void* out); +MWDECL MwBool MwLLDBusPortalWatch(MwLLDBusFuncTable* tbl, MwLLDBusContext* ctx, const char* portal); +MWDECL MwBool MwLLDBusPortalPoll(MwLLDBusFuncTable* tbl, MwLLDBusContext* ctx, MwLL handle, const char* portal, const char* namespace, const char* key, MwLLDBusPortalPollListener); +MWDECL void MwLLDBusFreeContext(MwLLDBusFuncTable* tbl, MwLLDBusContext* ctx); + +#endif + +#ifdef _MILSKO +#ifdef USE_X11 +#include +#endif +#ifdef USE_GDI +#include +#endif +#ifdef USE_WAYLAND +#include +#endif +#ifdef USE_COCOA +#include +#endif +#ifdef CLASSIC_MAC_OS +#include +#endif +#ifdef USE_HAIKU +#include +#endif + +union _MwLL { + struct _MwLLCommon common; +#ifdef USE_X11 + struct _MwLLX11 x11; +#endif +#ifdef USE_GDI + struct _MwLLGDI gdi; +#endif +#ifdef USE_WAYLAND + struct _MwLLWayland wayland; + struct _MwLLCairo cairo; +#endif +#ifdef USE_COCOA + struct _MwLLCocoa cocoa; +#endif +#ifdef CLASSIC_MAC_OS + struct _MwLLClassicMacOS cmacos; +#endif +#ifdef USE_HAIKU + struct _MwLLHaiku haiku; +#endif +}; + +union _MwLLColor { + struct _MwLLCommonColor common; +#ifdef USE_X11 + struct _MwLLX11Color x11; +#endif +#ifdef USE_GDI + struct _MwLLGDIColor gdi; +#endif +#ifdef USE_WAYLAND + struct _MwLLCairoColor wayland; +#endif +#ifdef USE_COCOA + struct _MwLLCocoaColor cocoa; +#endif +#ifdef USE_HAIKU + struct _MwLLHaikuColor haiku; +#endif +}; + +union _MwLLPixmap { + struct _MwLLCommonPixmap common; +#ifdef USE_X11 + struct _MwLLX11Pixmap x11; +#endif +#ifdef USE_GDI + struct _MwLLGDIPixmap gdi; +#endif +#ifdef USE_WAYLAND + struct _MwLLWaylandPixmap wayland; + struct _MwLLCairoPixmap cairo; /* same structure but we do this for code clarity */ +#endif +#ifdef USE_COCOA + struct _MwLLCocoaPixmap cocoa; +#endif +#ifdef CLASSIC_MAC_OS + struct _MwLLClassicMacOSPixmap cmacos; +#endif +#ifdef USE_HAIKU + struct _MwLLHaikuPixmap haiku; +#endif +}; +#endif +#include + +#define MwLLDispatch(x, y, z) \ + if(x->common.handler != NULL && x->common.handler->y != NULL) x->common.handler->y(x, z) + +struct _MwLLHandler { + void (*draw)(MwLL handle, void* data); + void (*up)(MwLL handle, void* data); + void (*down)(MwLL handle, void* data); + void (*resize)(MwLL handle, void* data); + void (*close)(MwLL handle, void* data); + void (*move)(MwLL handle, void* data); + void (*key)(MwLL handle, void* data); + void (*key_released)(MwLL handle, void* data); + void (*focus_in)(MwLL handle, void* data); + void (*focus_out)(MwLL handle, void* data); + void (*clipboard)(MwLL handle, void* data); + void (*dark_theme)(MwLL handle, void* data); +}; + +struct _MwLLTextDispatchTable { + int (*drawText)(MwWidget handle, MwPoint* point, const char* text, int bold, int align, MwLLColor color); + int (*textWidth)(MwWidget handle, const char* text); + int (*textHeight)(MwWidget handle, int count); + void* (*fontLoad)(unsigned char* data, unsigned int size); + void (*fontFree)(void* handle); +}; + +#define MwFLFlagMonospace (1 << 0) +#define MwFLFlagBold (1 << 1) +#define MwFLFlagBitmap (1 << 2) +#define MwFLBuildFont(x) ((MwFLFont)(void*)(size_t)(x)) + +#ifdef __cplusplus +extern "C" { +#endif + +/* lowlevel.c, common part */ +MWDECL void MwLLCreateCommon(MwLL handle); +MWDECL void MwLLDestroyCommon(MwLL handle); + +/* driver-specific, these get assigned by backend */ +MWDECL MwLL (*MwLLCreate)(MwLL parent, int x, int y, int width, int height); +MWDECL void (*MwLLDestroy)(MwLL handle); + +MWDECL void (*MwLLPolygon)(MwLL handle, MwPoint* points, int points_count, MwLLColor color); +MWDECL void (*MwLLLine)(MwLL handle, MwPoint* points, MwLLColor color); + +/*! + * @brief Begin drawing sequence + * @param handle Handle + */ +MWDECL void (*MwLLBeginDraw)(MwLL handle); + +/*! + * @brief End drawing sequence + * @param handle Handle + */ +MWDECL void (*MwLLEndDraw)(MwLL handle); + +MWDECL MwLLColor (*MwLLAllocColor)(MwLL handle, int r, int g, int b); +MWDECL void (*MwLLColorUpdate)(MwLL handle, MwLLColor c, int r, int g, int b); +MWDECL void (*MwLLFreeColor)(MwLLColor color); + +MWDECL void (*MwLLGetXYWH)(MwLL handle, int* x, int* y, unsigned int* w, unsigned int* h); +MWDECL void (*MwLLSetXY)(MwLL handle, int x, int y); +MWDECL void (*MwLLSetWH)(MwLL handle, int w, int h); + +MWDECL void (*MwLLSetTitle)(MwLL handle, const char* title); + +MWDECL int (*MwLLPending)(MwLL handle); +MWDECL void (*MwLLNextEvent)(MwLL handle); + +MWDECL MwLLPixmap (*MwLLCreatePixmap)(MwLL handle, unsigned char* data, int width, int height); +MWDECL void (*MwLLPixmapUpdate)(MwLLPixmap pixmap); +MWDECL void (*MwLLDestroyPixmap)(MwLLPixmap pixmap); +MWDECL void (*MwLLDrawPixmap)(MwLL handle, MwRect* rect, MwLLPixmap pixmap); +MWDECL void (*MwLLSetIcon)(MwLL handle, MwLLPixmap pixmap); + +MWDECL void (*MwLLForceRender)(MwLL handle); + +MWDECL void (*MwLLSetCursor)(MwLL handle, MwCursor* image, MwCursor* mask); + +/*! + * @brief Detach handle and make it toplevel window + * @param handle Handle + * @param point Point to be detached at, relative from the parent handle + */ +MWDECL void (*MwLLDetach)(MwLL handle, MwPoint* point); +MWDECL void (*MwLLShow)(MwLL handle, int show); + +MWDECL void (*MwLLSetSizeHints)(MwLL handle, int minx, int miny, int maxx, int maxy); +MWDECL void (*MwLLMakeBorderless)(MwLL handle, int toggle); + +/*! + * @brief Make handle "tool" window, e.g. Submenu, combobox menu, and etc. + * @param handle Handle + */ +MWDECL void (*MwLLMakeToolWindow)(MwLL handle); +MWDECL void (*MwLLMakePopup)(MwLL handle, MwLL parent); + +/*! + * @brief Begin changing state (has to be called before `MwLLSetSizeHints`, `MwLLMakeBorderless`, `MwLLMakeToolWindow`, and `MwLLMakePopup`) + * @param handle Handle + */ +MWDECL void (*MwLLBeginStateChange)(MwLL handle); + +/*! + * @brief End changing state + * @param handle Handle + */ +MWDECL void (*MwLLEndStateChange)(MwLL handle); + +MWDECL void (*MwLLFocus)(MwLL handle); + +/*! + * @brief Grab pointer, and keep moving pointer to center of handle + * @param handle Handle + * @param toggle Toggle + */ +MWDECL void (*MwLLGrabPointer)(MwLL handle, int toggle); + +MWDECL void (*MwLLSetClipboard)(MwLL handle, const char* text, int clipboard_type); +MWDECL void (*MwLLGetClipboard)(MwLL handle, int clipboard_type); + +MWDECL void (*MwLLGetCursorCoord)(MwLL handle, MwPoint* point); +MWDECL void (*MwLLGetScreenSize)(MwLL handle, MwRect* rect); + +/*! + * @brief Set any extra parameters for dark theme + * @param handle Handle + * @param toggle Toggle + * @warning Do not run `handle->common.handler->dark_theme` when this function gets called + * @warning This is for stuff like, i.e. setting the accent color on modern Windows. The user themselves sets dark theme with MwNdarkTheme. + */ +MWDECL void (*MwLLSetDarkTheme)(MwLL handle, int toggle); + +/*! + * @brief Whether or not the platform should default to modern theme. + * @param handle Handle + * @return whether to default. + */ +MWDECL MwBool (*MwLLDoModern)(MwLL handle); + +MWDECL void (*MwLLRaise)(MwLL handle); + +MWDECL void (*MwLLClip)(MwLL handle, MwRect* rect); + +/* font renderer */ +MWDECL void MwFLSetup(void); + +#ifdef USE_FREETYPE2 +MWDECL int MwFL_FT2Setup(void); +#endif +#ifdef USE_STB_TRUETYPE +MWDECL int MwFL_STBTTSetup(void); +#endif + +#ifdef USE_GDI_TEXT +MWDECL int MwFL_GDISetup(void); +#endif + +MWDECL int (*MwFLDrawText)(MwWidget handle, MwFLFont ttf, MwPoint* point, const char* text, MwLLColor color); +MWDECL int (*MwFLTextWidth)(MwFLFont ttf, const char* text); +MWDECL int (*MwFLTextHeight)(MwFLFont ttf, int count); +MWDECL int (*MwFLTextHeightWithText)(MwFLFont ttf, const char* text); +MWDECL void* (*MwFLFontLoad)(unsigned char* data, unsigned int size, int px); +MWDECL void (*MwFLFontFree)(void* handle); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/LowLevel/Cairo.h b/widget/milsko/milskosrc/include/Mw/LowLevel/Cairo.h new file mode 100644 index 0000000000..dd2cfa3226 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/LowLevel/Cairo.h @@ -0,0 +1,229 @@ +/*! + * @file Mw/LowLevel/Cairo.h + * @brief Cairo Backend + * @warning This is used MEGA internally. + */ +#ifndef __MW_LOWLEVEL_CAIRO_H__ +#define __MW_LOWLEVEL_CAIRO_H__ + +#include +#include +#include +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +MWDECL int MwLLCairoCallInit(void); + +#ifdef __cplusplus +} +#endif + +#define CSD_BORDER_FRAME_LEFT 5 +#define CSD_BORDER_FRAME_RIGHT 5 +#define CSD_BORDER_FRAME_TOP 23 +#define CSD_BORDER_FRAME_BOTTOM 4 + +typedef struct cairo_call_table { + void* cairo_lib; + + void (*cairo_set_line_width)(cairo_t* cr, + double width); + void (*cairo_scale)(cairo_t* cr, + double sx, + double sy); + cairo_t* (*cairo_create)(cairo_surface_t* target); + void (*cairo_move_to)(cairo_t* cr, + double x, + double y); + + void (*cairo_rectangle)(cairo_t* cr, + double x, + double y, + double width, + double height); + void (*cairo_new_path)(cairo_t* cr); + void (*cairo_set_line_cap)(cairo_t* cr, + cairo_line_cap_t line_cap); + void (*cairo_set_source_rgba)(cairo_t* cr, + double red, + double green, + double blue, + double alpha); + void (*cairo_set_source_rgb)(cairo_t* cr, + double red, + double green, + double blue); + void (*cairo_reset_clip)(cairo_t* cr); + unsigned char* (*cairo_image_surface_get_data)(cairo_surface_t* surface); + void (*cairo_line_to)(cairo_t* cr, + double x, + double y); + cairo_status_t (*cairo_surface_write_to_png)(cairo_surface_t* surface, const char* filename); + void (*cairo_surface_destroy)(cairo_surface_t* surface); + cairo_surface_t* (*cairo_image_surface_create_for_data)(unsigned char* data, + cairo_format_t format, + int width, + int height, + int stride); + cairo_surface_t* (*cairo_image_surface_create)(cairo_format_t format, + int width, + int height); + void (*cairo_destroy)(cairo_t* cr); + cairo_pattern_t* (*cairo_get_source)(cairo_t* cr); + void (*cairo_close_path)(cairo_t* cr); + void (*cairo_paint)(cairo_t* cr); + void (*cairo_surface_flush)(cairo_surface_t* surface); + void (*cairo_clip)(cairo_t* cr); + void (*cairo_save)(cairo_t* cr); + void (*cairo_restore)(cairo_t* cr); + void (*cairo_surface_mark_dirty)(cairo_surface_t* surface); + void (*cairo_stroke)(cairo_t* cr); + void (*cairo_set_source_surface)(cairo_t* cr, + cairo_surface_t* surface, + double x, + double y); + void (*cairo_fill)(cairo_t* cr); + void (*cairo_pattern_set_filter)(cairo_pattern_t* pattern, + cairo_filter_t filter); + void (*cairo_set_antialias)(cairo_t*, cairo_antialias_t); + void (*cairo_set_operator)(cairo_t* cr, cairo_operator_t op); + +} cairo_call_table_t; + +extern cairo_call_table_t cairo_call_tbl; + +/* defined inline right here so that it doesn't conflict with the other macros */ +MwInline int cairo_load_funcs() { +#ifdef __APPLE__ + cairo_call_tbl.cairo_lib = MwDynamicOpen("libcairo.dylib"); +#else + cairo_call_tbl.cairo_lib = MwDynamicOpen("libcairo.so"); +#endif + if(!cairo_call_tbl.cairo_lib) { + printf("(libcairo not found, cannot use Wayland or Cairo backend.)\n"); + return 1; + } + +#define CAIRO_FUNC(x) \ + cairo_call_tbl.x = MwDynamicSymbol(cairo_call_tbl.cairo_lib, #x); \ + if(!cairo_call_tbl.x) { \ + printf("WARNING: Could use Wayland/Cairo backend if " #x " was not found. Do you have libcairo?\n"); \ + return 1; \ + }; + + CAIRO_FUNC(cairo_set_line_width); + CAIRO_FUNC(cairo_scale); + CAIRO_FUNC(cairo_create); + CAIRO_FUNC(cairo_move_to); + CAIRO_FUNC(cairo_rectangle); + CAIRO_FUNC(cairo_new_path); + CAIRO_FUNC(cairo_set_line_cap); + CAIRO_FUNC(cairo_set_antialias); + CAIRO_FUNC(cairo_set_source_rgba); + CAIRO_FUNC(cairo_set_source_rgb); + CAIRO_FUNC(cairo_reset_clip); + CAIRO_FUNC(cairo_image_surface_get_data); + CAIRO_FUNC(cairo_line_to); + CAIRO_FUNC(cairo_surface_write_to_png); + CAIRO_FUNC(cairo_surface_destroy); + CAIRO_FUNC(cairo_image_surface_create_for_data); + CAIRO_FUNC(cairo_image_surface_create); + CAIRO_FUNC(cairo_destroy); + CAIRO_FUNC(cairo_get_source); + CAIRO_FUNC(cairo_close_path); + CAIRO_FUNC(cairo_paint); + CAIRO_FUNC(cairo_surface_flush); + CAIRO_FUNC(cairo_clip); + CAIRO_FUNC(cairo_save); + CAIRO_FUNC(cairo_restore); + CAIRO_FUNC(cairo_surface_mark_dirty); + CAIRO_FUNC(cairo_stroke); + CAIRO_FUNC(cairo_set_source_surface); + CAIRO_FUNC(cairo_fill); + CAIRO_FUNC(cairo_set_operator); + CAIRO_FUNC(cairo_pattern_set_filter); +#undef CAIRO_FUNC + + return 0; +} + +#define cairo_set_line_width cairo_call_tbl.cairo_set_line_width +#define cairo_scale cairo_call_tbl.cairo_scale +#define cairo_create cairo_call_tbl.cairo_create +#define cairo_move_to cairo_call_tbl.cairo_move_to +#define cairo_rectangle cairo_call_tbl.cairo_rectangle +#define cairo_new_path cairo_call_tbl.cairo_new_path +#define cairo_set_line_cap cairo_call_tbl.cairo_set_line_cap +#define cairo_set_antialias cairo_call_tbl.cairo_set_antialias +#define cairo_set_source_rgba cairo_call_tbl.cairo_set_source_rgba +#define cairo_set_source_rgb cairo_call_tbl.cairo_set_source_rgb +#define cairo_reset_clip cairo_call_tbl.cairo_reset_clip +#define cairo_image_surface_get_data cairo_call_tbl.cairo_image_surface_get_data +#define cairo_line_to cairo_call_tbl.cairo_line_to +#define cairo_surface_write_to_png cairo_call_tbl.cairo_surface_write_to_png +#define cairo_surface_destroy cairo_call_tbl.cairo_surface_destroy +#define cairo_image_surface_create_for_data cairo_call_tbl.cairo_image_surface_create_for_data +#define cairo_image_surface_create cairo_call_tbl.cairo_image_surface_create +#define cairo_destroy cairo_call_tbl.cairo_destroy +#define cairo_get_source cairo_call_tbl.cairo_get_source +#define cairo_close_path cairo_call_tbl.cairo_close_path +#define cairo_paint cairo_call_tbl.cairo_paint +#define cairo_surface_flush cairo_call_tbl.cairo_surface_flush +#define cairo_clip cairo_call_tbl.cairo_clip +#define cairo_save cairo_call_tbl.cairo_save +#define cairo_restore cairo_call_tbl.cairo_restore +#define cairo_surface_mark_dirty cairo_call_tbl.cairo_surface_mark_dirty +#define cairo_stroke cairo_call_tbl.cairo_stroke +#define cairo_set_source_surface cairo_call_tbl.cairo_set_source_surface +#define cairo_fill cairo_call_tbl.cairo_fill +#define cairo_set_operator cairo_call_tbl.cairo_set_operator +#define cairo_pattern_set_filter cairo_call_tbl.cairo_pattern_set_filter + +struct _MwLLCairo { + struct _MwLLCommon common; + + cairo_surface_t* front_cs; + cairo_surface_t* back_cs; + cairo_t* front_cairo; + cairo_t* back_cairo; + /* The cairo to actually use for draw operations. Typically is front_cairo, but wayland's MwLLBeginDraw can change this to the back_cairo so it can be used to draw window decorations. */ + cairo_t* selected_cairo; + + int x; + int y; + int width; + int height; + + MwBool toplevel; + MwLL parent; +}; + +struct _MwLLCairoColor { + struct _MwLLCommonColor common; +}; + +struct _MwLLCairoPixmap { + struct _MwLLCommonPixmap common; + + cairo_surface_t* cs; +}; + +void MwLLCairoFrontSetup(struct _MwLLCairo* cairo, MwU8* data, MwU32 width, MwU32 height); +void MwLLCairoBackSetup(struct _MwLLCairo* cairo, MwU8* data, MwU32 width, MwU32 height); +void MwLLCairoFrontDestroy(struct _MwLLCairo* cairo); +void MwLLCairoBackDestroy(struct _MwLLCairo* cairo); +void MwLLCairoPolygon(struct _MwLLCairo handle, MwPoint* points, int points_count, MwLLColor color); +void MwLLCairoLine(struct _MwLLCairo handle, MwPoint* points, MwLLColor color); +MwLLPixmap MwLLCairoCreatePixmap(struct _MwLLCairo handle, unsigned char* data, int width, int height); +void MwLLCairoPixmapUpdate(MwLLPixmap handle); +void MwLLCairoDestroyPixmap(MwLLPixmap pixmap); +void MwLLCairoDrawPixmap(struct _MwLLCairo handle, MwRect* rect, MwLLPixmap pixmap); + +void MwLLCairoDestroy(struct _MwLLCairo handle); + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/LowLevel/ClassicMacOS.h b/widget/milsko/milskosrc/include/Mw/LowLevel/ClassicMacOS.h new file mode 100644 index 0000000000..9d76e202e8 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/LowLevel/ClassicMacOS.h @@ -0,0 +1,43 @@ +/*! + * @file Mw/LowLevel/ClassicMacOS.h + * @brief ClassicMacOS Backend + * @warning This is used internally + */ +#ifndef __MW_LOWLEVEL_ClassicMacOS_H__ +#define __MW_LOWLEVEL_ClassicMacOS_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct _MwLLClassicMacOS { + struct _MwLLCommon common; + + MwLL parent; + + WindowRef window; + ControlHandle control; + EventRecord event; + Rect winRect; +}; + +struct _MwLLClassicMacOSColor { + struct _MwLLCommonColor common; +}; + +struct _MwLLClassicMacOSPixmap { + struct _MwLLCommonPixmap common; + BitMap bmp; +}; + +MWDECL int MwLLClassicMacOSCallInit(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/LowLevel/Cocoa.h b/widget/milsko/milskosrc/include/Mw/LowLevel/Cocoa.h new file mode 100644 index 0000000000..1f18006f9e --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/LowLevel/Cocoa.h @@ -0,0 +1,189 @@ +/*! + * @file Mw/LowLevel/Cocoa.h + * @brief Work in progress Cocoa Backend + * @warning This is used internally. + */ +#ifndef __MW_LOWLEVEL_COCOA_H__ +#define __MW_LOWLEVEL_COCOA_H__ + +#include +#include +#include + +typedef struct { + enum { + COCOA_DRAW_COMMAND_POLY = 0, + COCOA_DRAW_COMMAND_LINES, + COCOA_DRAW_COMMAND_PIXMAP, + } type; + union { + struct { + MwPoint* points; + int points_count; + struct _MwLLCommonColor color; + } poly; + struct { + MwPoint* points; + struct _MwLLCommonColor color; + } lines; + struct { + MwRect rect; + MwLLPixmap pixmap; + } pixmap; + }; +} draw_command; + +#ifdef __OBJC__ +#import +#import +#import + +@interface MilskoCocoaApplication : NSApplication { + MwBool doPending; +} +- (MwBool)pending; +@end + +// Note: implements NSApplicationDelegate +@interface MilskoCocoaApplicationDelegate : NSObject { + MilskoCocoaApplication* appl; +} +- (MilskoCocoaApplicationDelegate*)initWithAppl:(MilskoCocoaApplication*)appl; +@end + +@interface MilskoCocoaWindow : NSWindow { +} +@end + +// Note: implements NSWindowDelegate +@interface MilskoCocoaWindowDelegate : NSObject { + NSWindow* w; +} +- (MilskoCocoaWindowDelegate*)initWithWin:(NSWindow*)win; +@end + +/* + So we want to associate each NSWindow with its corresponding MwLL handle. The + conventional way of doing this is through "associative pointers", however + this is a feature that Apple added in 10.6 (marketted back then as "Objective + C 2" iirc). For 10.4 compatibility, we have to do a bit of an ugly hack that + might seem like horrifically undefined behavior, but I've tested this on + both 10.4 and modern Mac OS and as long as we're careful there's no + problems: we override NSView, use NSView's "frame" property to store the + pointer, and then override functions appropriately so that this frame is never + actually used. This can then be attached to an NSWindow with addSubview and + retrieved appropriately. + */ +@interface MilskoFakePointer : NSView { + void* ptr; +} + +- (void)setPointer:(void*)ptr; +- (void*)pointer; + +@end + +@interface MilskoCocoaPixmap : NSObject { + @public + MwBool valid; + int width; + int height; + unsigned char* buf; + NSImage* image; + NSBitmapImageRep* rep; +} + ++ (MilskoCocoaPixmap*)newWithWidth:(int)width height:(int)height; +- (void)updateWithData:(unsigned char*)data; +- (void)destroy; + +/* using @property to create instance variables fucks up 10.4 gcc for some + * reason? */ +- (NSImage*)image; + +@end + +@interface MilskoCocoaView : NSView { + MwBool _child; + + @public + draw_command* commands; +} + +- (void)destroy; +- (void)setChild; +@end + +@interface MilskoCocoaSubView : MilskoCocoaView { +} +@end + +@interface MilskoCocoa : NSObject { + @public + MilskoCocoaApplication* application; + MwBool _forceRender; + MwBool _eventsPending; + MwBool isClosing; + NSWindow* window; + NSRect rect; + MilskoCocoaView* view; + MwLL parent; + MilskoFakePointer* handle; + unsigned int strHash; + NSEvent* lastEvent; + + MilskoCocoaPixmap* cursorPixmap; + NSCursor* cursor; + NSModalSession modalSession; + + MwBool pointerLocked; + MwBool mouseMoved; + + MwBool rejectFirstTest; +} +- (void)destroy; +- (void)sendClipboardEvent; + +- (MwLL)getParent; +- (NSView*)getView; +- (NSWindow*)getWindow; +- (void)nudge; + +- (void)pushCursor; +- (void)popCursor; + +- (MilskoFakePointer*)getHandle; + +@end +#define OBJC(x) x +#else +#define OBJC(x) void* +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +struct _MwLLCocoa { + struct _MwLLCommon common; + OBJC(MilskoCocoa*) + real; +}; + +struct _MwLLCocoaColor { + struct _MwLLCommonColor common; +}; + +struct _MwLLCocoaPixmap { + struct _MwLLCommonPixmap common; + OBJC(MilskoCocoaPixmap*) + real; +}; + +MWDECL int MwLLCocoaCallInit(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/LowLevel/GDI.h b/widget/milsko/milskosrc/include/Mw/LowLevel/GDI.h new file mode 100644 index 0000000000..e505b0a407 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/LowLevel/GDI.h @@ -0,0 +1,57 @@ +/*! + * @file Mw/LowLevel/GDI.h + * @brief GDI Backend + * @warning This is used internally + */ +#ifndef __MW_LOWLEVEL_GDI_H__ +#define __MW_LOWLEVEL_GDI_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct _MwLLGDI { + struct _MwLLCommon common; + + HINSTANCE hInstance; + HWND hWnd; + HDC hDC; + HCURSOR cursor; + HICON icon; + + HRGN clip; + + int grabbed; + int force_render; + int get_clipboard; + int get_darktheme; +}; + +struct _MwLLGDIColor { + struct _MwLLCommonColor common; + + COLORREF color; + HBRUSH brush; +}; + +struct _MwLLGDIPixmap { + struct _MwLLCommonPixmap common; + + RGBQUAD* quad; + HBITMAP hBitmap; + HBITMAP hMask; + HBITMAP hMask2; +}; + +MWDECL int MwLLGDICallInit(void); +MWDECL HCURSOR MwLLGDICreateCursor(MwCursor* image, MwCursor* mask); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/LowLevel/Haiku.h b/widget/milsko/milskosrc/include/Mw/LowLevel/Haiku.h new file mode 100644 index 0000000000..32c1c027cf --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/LowLevel/Haiku.h @@ -0,0 +1,173 @@ +/*! + * @file Mw/LowLevel/Haiku.h + * @brief Haiku Backend + * @warning This is used internally + */ +#ifndef __MW_LOWLEVEL_HAIKU_H__ +#define __MW_LOWLEVEL_HAIKU_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __cplusplus +class MwApplication; +class MwView; +class MwWindow; + +class MwApplication : public BApplication { + public: + MwApplication(MwRect rc, MwLL handle); + ~MwApplication(); + + void MessageReceived(BMessage* message); +}; + +class MwView : public BView { + public: + MwLL handle; + BLocker* locker; + uint32 buttons; + BBitmap* bitmap; + + MwView(MwLL handle, BRect rc, uint32 resizingMode, uint32 flags); + ~MwView(); + + void MessageReceived(BMessage* message); + void PostMessage(BMessage* message); + void PostMessage(uint32 command); + status_t SendMessage(BMessage* message); + status_t SendMessage(uint32 command); + void Invalidate(); + + void AttachedToWindow(); + void Draw(BRect updateRect); + void FrameResized(float width, float height); + void MouseDown(BPoint point); + void MouseUp(BPoint point); + void MouseMoved(BPoint point, uint32 transit, const BMessage* message); + + void SetColor(MwLLColor color); +}; + +class MwWindow : public BWindow { + public: + MwWindow(BRect rc, window_type type, uint32 flags); + + void MessageReceived(BMessage* message); + + void FrameMoved(BPoint newLocation); + bool QuitRequested(); +}; + +typedef BBitmap MwBBitmap; +#else +typedef void MwApplication; +typedef void MwView; +typedef void MwWindow; +typedef void MwBBitmap; +#endif + +typedef union _MwLLHaikuEvent MwLLHaikuEvent; + +enum BAPP_MW_WHAT { + BAPP_MW_DESTROY = 0 +}; + +enum BVIEW_MW_WHAT { + BVIEW_MW_DESTROY = 0, + BVIEW_MW_DETACH, + BVIEW_MW_RESIZE, + BVIEW_MW_MOVE, + BVIEW_MW_SHOW, + BVIEW_MW_HIDE, + BVIEW_MW_SET_COLOR, + BVIEW_MW_POLYGON, + BVIEW_MW_LINE, + BVIEW_MW_BITMAP, + BVIEW_MW_RENDER, + BVIEW_MW_RAISE, + BVIEW_MW_GET_MOUSE +}; + +enum BWIN_MW_WHAT { + BWIN_MW_DESTROY = 0, + BWIN_MW_SET_TITLE, + BWIN_MW_SET_TYPE +}; + +enum MwLLHAIKU_EVENT { + MwLLHAIKU_EVENT_DRAW = 0, + MwLLHAIKU_EVENT_CLOSE, + MwLLHAIKU_EVENT_FRAMERESIZED, + MwLLHAIKU_EVENT_FRAMEMOVED, + MwLLHAIKU_EVENT_MOUSEDOWN, + MwLLHAIKU_EVENT_MOUSEUP, + MwLLHAIKU_EVENT_MOUSEMOVED +}; + +struct _MwLLHaikuEventMouse { + int type; + MwPoint point; + int button; +}; + +struct _MwLLHaikuEventFrameResized { + int type; + float width; + float height; +}; + +struct _MwLLHaikuEventFrameMoved { + int type; + MwPoint point; +}; + +union _MwLLHaikuEvent { + int type; + struct _MwLLHaikuEventMouse mouse; + struct _MwLLHaikuEventFrameResized frame_resized; + struct _MwLLHaikuEventFrameMoved frame_moved; +}; + +struct _MwLLHaiku { + struct _MwLLCommon common; + + int type; + + int x; + int y; + int width; + int height; + + MwLL parent; + MwApplication* app; + MwWindow* window; + MwView* view; + thread_id app_thread; + int force_render; + + MwLLHaikuEvent* events; +}; + +struct _MwLLHaikuColor { + struct _MwLLCommonColor common; +}; + +struct _MwLLHaikuPixmap { + struct _MwLLCommonPixmap common; + + MwBBitmap* bitmap; +}; + +MWDECL int MwLLHaikuCallInit(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/LowLevel/Wayland.h b/widget/milsko/milskosrc/include/Mw/LowLevel/Wayland.h new file mode 100644 index 0000000000..ccd1f2f0f2 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/LowLevel/Wayland.h @@ -0,0 +1,517 @@ +/*! + * @file Mw/LowLevel/Wayland.h + * @brief Wayland Backend + * @warning This is used internally. + */ +#ifndef __MW_LOWLEVEL_WAYLAND_H__ +#define __MW_LOWLEVEL_WAYLAND_H__ + +#include +#include +#include +#include + +#include + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +MWDECL int MwLLWaylandCallInit(void); + +#ifdef __cplusplus +} +#endif + +#define CSD_BORDER_FRAME_LEFT 5 +#define CSD_BORDER_FRAME_RIGHT 5 +#define CSD_BORDER_FRAME_TOP 23 +#define CSD_BORDER_FRAME_BOTTOM 4 + +struct _MwLLWayland; + +#include + +#if WAYLAND_LOAD_OPENGL +#include +#include +#endif + +typedef struct wayland_call_table { + void* lib; + void* xkb_lib; +#ifdef USE_DBUS + MwLLDBusFuncTable dbus; + MwBool has_dbus; +#endif + + int (*wl_display_dispatch)(struct wl_display* display); + int (*wl_display_dispatch_pending)(struct wl_display* display); + void (*wl_display_disconnect)(struct wl_display* display); + void (*wl_display_cancel_read)(struct wl_display* display); + int (*wl_display_prepare_read)(struct wl_display* display); + int (*wl_display_read_events)(struct wl_display* display); + int (*wl_display_flush)(struct wl_display* display); + int (*wl_display_get_fd)(struct wl_display* display); + int (*wl_display_roundtrip)(struct wl_display* display); + int (*wl_proxy_add_listener)(struct wl_proxy* proxy, void (**implementation)(void), void* data); + void (*wl_proxy_destroy)(struct wl_proxy* proxy); + void (*wl_log_set_handler_client)(wl_log_func_t handler); + struct wl_proxy* (*wl_proxy_marshal_flags)(struct wl_proxy* proxy, uint32_t opcode, + const struct wl_interface* interface, + uint32_t version, + uint32_t flags, ...); + struct wl_display* (*wl_display_connect)(const char* name); + uint32_t (*wl_proxy_get_version)(struct wl_proxy* proxy); + struct wl_display* (*wl_display_connect_to_fd)(int fd); + int (*wl_display_get_error)(struct wl_display* display); + + struct xkb_context* (*xkb_context_new)(enum xkb_context_flags flags); + void (*xkb_context_unref)(struct xkb_context* context); + struct xkb_state* (*xkb_state_new)(struct xkb_keymap* keymap); + void (*xkb_state_unref)(struct xkb_state* state); + struct xkb_keymap* (*xkb_keymap_new_from_string)(struct xkb_context* context, const char* string, enum xkb_keymap_format format, enum xkb_keymap_compile_flags flags); + xkb_level_index_t (*xkb_keymap_num_levels_for_key)(struct xkb_keymap* keymap, xkb_keycode_t key, xkb_layout_index_t layout); + int (*xkb_keymap_key_get_syms_by_level)(struct xkb_keymap* keymap, xkb_keycode_t key, xkb_layout_index_t layout, xkb_level_index_t level, const xkb_keysym_t** syms_out); + xkb_layout_index_t (*xkb_state_key_get_layout)(struct xkb_state* state, xkb_keycode_t key); + void (*xkb_keymap_unref)(struct xkb_keymap* keymap); + +} wayland_call_table_t; + +extern wayland_call_table_t wl_call_tbl; +#ifdef MW_VULKAN +extern MwBool MwWaylandVulkan; +#else +#define MwWaylandVulkan 0 +#endif + +MWDECL MwBool MwWaylandCairoOnly; + +/* defined inline right here so that it doesn't conflict with the other macros */ +MwInline int wayland_load_funcs() { +#ifdef __APPLE__ + wl_call_tbl.lib = MwDynamicOpen("libwayland-client.dylib"); +#else + wl_call_tbl.lib = MwDynamicOpen("libwayland-client.so"); +#endif + if(!wl_call_tbl.lib) { + printf("(libwayland-client not found, falling back to X11)\n"); + return 1; + } +#ifdef __APPLE__ + wl_call_tbl.xkb_lib = MwDynamicOpen("libxkbcommon.dylib"); +#else + wl_call_tbl.xkb_lib = MwDynamicOpen("libxkbcommon.so"); +#endif + if(!wl_call_tbl.xkb_lib) { + printf("(libxkbcommon not found, cannot use Wayland backend.)\n"); + return 1; + } + +#define WAYLAND_FUNC(x) \ + wl_call_tbl.x = MwDynamicSymbol(wl_call_tbl.lib, #x); \ + if(!wl_call_tbl.x) { \ + printf("WARNING: Could use Wayland backend if " #x " was found.\n"); \ + return 1; \ + }; + + WAYLAND_FUNC(wl_display_dispatch) + WAYLAND_FUNC(wl_display_dispatch_pending) + WAYLAND_FUNC(wl_display_disconnect) + WAYLAND_FUNC(wl_display_cancel_read) + WAYLAND_FUNC(wl_display_prepare_read) + WAYLAND_FUNC(wl_display_read_events) + WAYLAND_FUNC(wl_display_flush) + WAYLAND_FUNC(wl_display_get_fd) + WAYLAND_FUNC(wl_display_roundtrip) + WAYLAND_FUNC(wl_proxy_add_listener) + WAYLAND_FUNC(wl_proxy_destroy) + WAYLAND_FUNC(wl_log_set_handler_client) + WAYLAND_FUNC(wl_proxy_marshal_flags) + WAYLAND_FUNC(wl_display_connect) + WAYLAND_FUNC(wl_proxy_get_version) + WAYLAND_FUNC(wl_display_connect_to_fd) + WAYLAND_FUNC(wl_display_get_error) + +#undef WAYLAND_FUNC + +#define XKB_FUNC(x) \ + wl_call_tbl.x = MwDynamicSymbol(wl_call_tbl.xkb_lib, #x); \ + if(!wl_call_tbl.x) { \ + printf("WARNING: Could use Wayland backend if " #x " was found. Do you have libxkbcommon?\n"); \ + return 1; \ + }; + + XKB_FUNC(xkb_state_unref) + XKB_FUNC(xkb_context_new) + XKB_FUNC(xkb_context_unref) + XKB_FUNC(xkb_state_new) + XKB_FUNC(xkb_keymap_new_from_string) + XKB_FUNC(xkb_keymap_unref) + XKB_FUNC(xkb_keymap_num_levels_for_key) + XKB_FUNC(xkb_keymap_key_get_syms_by_level) + XKB_FUNC(xkb_state_key_get_layout) +#undef XKB_FUNC + + if(cairo_load_funcs() != 0) { + return 1; + } + +#ifdef USE_DBUS + wl_call_tbl.has_dbus = MwLLDBusFuncSetup(&wl_call_tbl.dbus); +#endif + + return 0; +} + +#define wl_display_dispatch wl_call_tbl.wl_display_dispatch +#define wl_display_dispatch_pending wl_call_tbl.wl_display_dispatch_pending +#define wl_display_disconnect wl_call_tbl.wl_display_disconnect +#define wl_display_cancel_read wl_call_tbl.wl_display_cancel_read +#define wl_display_prepare_read wl_call_tbl.wl_display_prepare_read +#define wl_display_read_events wl_call_tbl.wl_display_read_events +#define wl_display_flush wl_call_tbl.wl_display_flush +#define wl_display_get_fd wl_call_tbl.wl_display_get_fd +#define wl_display_roundtrip wl_call_tbl.wl_display_roundtrip +#define wl_proxy_add_listener wl_call_tbl.wl_proxy_add_listener +#define wl_proxy_destroy wl_call_tbl.wl_proxy_destroy +#define wl_log_set_handler_client wl_call_tbl.wl_log_set_handler_client +#define wl_proxy_marshal_flags wl_call_tbl.wl_proxy_marshal_flags +#define wl_display_connect wl_call_tbl.wl_display_connect +#define wl_proxy_get_version wl_call_tbl.wl_proxy_get_version +#define wl_display_connect_to_fd wl_call_tbl.wl_display_connect_to_fd +#define wl_display_get_error wl_call_tbl.wl_display_get_error + +#define xkb_state_unref wl_call_tbl.xkb_state_unref +#define xkb_context_new wl_call_tbl.xkb_context_new +#define xkb_context_unref wl_call_tbl.xkb_context_unref +#define xkb_state_new wl_call_tbl.xkb_state_new +#define xkb_keymap_new_from_string wl_call_tbl.xkb_keymap_new_from_string +#define xkb_keymap_unref wl_call_tbl.xkb_keymap_unref +#define xkb_keymap_num_levels_for_key wl_call_tbl.xkb_keymap_num_levels_for_key +#define xkb_keymap_key_get_syms_by_level wl_call_tbl.xkb_keymap_key_get_syms_by_level +#define xkb_state_key_get_layout wl_call_tbl.xkb_state_key_get_layout + +#ifndef WL_PROTOCOLS_DEFINED +#define WL_PROTOCOLS_DEFINED +#include "Wayland/wayland-core-protocol.h" +#include "Wayland/xdg-shell-client-protocol.h" +#include "Wayland/viewporter-client-protocol.h" +#include "Wayland/xdg-decoration-client-protocol.h" +#include "Wayland/cursor-shape-client-protocol.h" +#include "Wayland/primary-selection-client-protocol.h" +#include "Wayland/pointer-constraints-client-protocol.h" +#include "Wayland/relative-pointer-client-protocol.h" +#include "Wayland/xdg-toplevel-icon-client-protocol.h" +#include "Wayland/wlr-layer-shell-client-protocol.h" +#endif + +typedef struct wayland_protocol { + void* listener; + void* context; +} wayland_protocol_t; + +typedef wayland_protocol_t*(wl_setup_func)(MwU32, struct _MwLLWayland*, MwU32 version); +typedef void(wl_destroy_func)(struct _MwLLWayland* wayland, wayland_protocol_t* data); + +typedef struct wayland_protocol_callback_table { + wl_setup_func* setup; + wl_destroy_func* destroy; +} wayland_protocol_callback_table_t; + +struct _MwLLWaylandTopLevel { + struct xdg_surface* xdg_surface; + struct xdg_toplevel* xdg_top_level; + struct xdg_toplevel_listener xdg_toplevel_listener; + struct xdg_surface_listener xdg_surface_listener; + MwBool maxim_state; + + MwBool compositor_created; + MwBool xdg_wm_base_created; + MwBool xdg_surface_created; + + struct wl_subsurface* ssurface; + struct wl_subcompositor* scompositor; +}; + +struct _MwLLWaylandSublevel { + struct wl_subsurface* subsurface; + struct wl_subcompositor* subcompositor; + + MwLL parent; + + struct xdg_surface* xdg_surface; +}; + +struct _MwLLWaylandPopup { + struct xdg_surface* xdg_surface; + struct xdg_popup* xdg_popup; + struct xdg_positioner* xdg_positioner; + struct xdg_surface_listener xdg_surface_listener; + struct xdg_wm_base* xdg_wm_base; + MwLL topmost_parent; +}; + +struct _MwLLWaylandLayerSurface { + struct zwlr_layer_surface_v1* surface; +}; + +/* Shared set of anything needed for a shm buffer. */ +struct _MwLLWaylandShmBuffer { + struct wl_shm* shm; + struct wl_shm_pool* shm_pool; + struct wl_buffer* shm_buffer; + struct wl_shm_pool* shm_pool_back; + struct wl_buffer* shm_buffer_back; + struct wl_surface* surface; + struct wl_output* output; + + MwU8* buf; + MwU8* buf_back; + MwU64 buf_size; + int fd; + int fd_back; + MwBool setup; +}; + +enum _MwLLWaylandType { + MwLL_WAYLAND_UNKNOWN = 0, + MwLL_WAYLAND_TOPLEVEL, + MwLL_WAYLAND_SUBLEVEL, + MwLL_WAYLAND_POPUP, + MwLL_WAYLAND_LAYER_SURFACE, +}; + +typedef struct wl_clipboard_device_context { + struct { + struct wl_data_device* wl; + struct zwp_primary_selection_device_v1* zwp; + } device; + struct { + struct wl_data_offer* wl; + struct zwp_primary_selection_offer_v1* zwp; + } offer; + + MwLL ll; + // struct wl_seat* seat; +} wl_clipboard_device_context_t; + +struct _MwLLWayland { + struct _MwLLCommon common; + struct _MwLLCairo cairo; + + union { + /* Pointer for data that's only loaded if the widget is a toplevel */ + struct _MwLLWaylandTopLevel* toplevel; + /* Pointer for data that's only loaded if the widget is a sublevel */ + struct _MwLLWaylandSublevel* sublevel; + /* Pointer for data that's only loaded if the widget is a popup */ + struct _MwLLWaylandPopup* popup; + /* Pointer for data that's only loaded if the widget is a layer surface */ + struct _MwLLWaylandLayerSurface* layer_surface; + }; + + enum _MwLLWaylandType type; + enum _MwLLWaylandType type_to_be; + + MwRect clipping_rect; + MwBool no; + + MwBool changing; + MwBool detatching; + MwPoint detach_point; + + MwBool did_initial_resize; + + MwBool is_toplevel; + + MwBool is_clipping; + MwRect clip; + + /* Map of Wayland interfaces to their relevant setup functions. */ + struct { + char* key; + wayland_protocol_callback_table_t* value; + }* wl_protocol_setup_map; + + /* Map of Wayland interfaces to any information we keep about them once we've registered them. */ + struct { + char* key; + wayland_protocol_t* value; + }* wl_protocol_map; + + MwBool do_csd; + MwBool has_decorations; + char title[256]; + + struct xkb_context* xkb_context; + struct xkb_keymap* xkb_keymap; + struct xkb_state* xkb_state; + + struct wl_display* display; + struct wl_registry* registry; + struct wl_compositor* compositor; + struct wl_registry_listener registry_listener; + struct wl_region* o_region; + struct wl_region* region; + struct wl_output* output; + + struct wp_viewport* vp; + + MwBool do_lock_pointer; + struct zwp_pointer_constraints_v1* pointer_constraints; + struct zwp_relative_pointer_manager_v1* relative_pointer_manager; + struct zwp_relative_pointer_v1* relative_pointer; + struct zwp_locked_pointer_v1* locked_pointer; + MwBool pointer_constrained; + MwBool valid; + +#ifdef USE_DBUS + MwLLDBusContext dbus; +#endif + + MwBool dark_theme_detection; + MwU32 dark_theme; + + /* clipboard related stuff. + * Note that unlike most interfaces, we don't keep zwp_primary_selection stuff in a wayland_protocol_t because we use wl_data_device as a fallback and want to have it share memory space.*/ + + struct { + struct wl_data_device_manager* wl; + struct zwp_primary_selection_device_manager_v1* zwp; + } clipboard_manager; + union { + struct wl_data_source* wl; + struct zwp_primary_selection_source_v1* zwp; + } clipboard_source; + char* clipboard_buffer; + MwBool supports_zwp; + MwBool zwp_setup; + + uint32_t clipboard_serial; + wl_clipboard_device_context_t** clipboard_devices_wl; + wl_clipboard_device_context_t** clipboard_devices_zwp; + + struct wl_pointer* pointer; + MwU32 pointer_serial; + struct wl_seat* pointer_seat; + + struct wl_keyboard* keyboard; + MwU32 keyboard_serial; + + MwU64 events_pending; + + MwU32 mod_state; + + MwBool configured; /* Whether or not xdg_toplevel_configure has run once */ + + MwBool held_down; + + MwI32 x, y; + MwI32 ox, oy; + MwU32 ww, wh; /* Window position */ + MwPoint cur_mouse_pos; /* Currently known mouse position */ + MwLL currentlyHeldWidget; + MwLL focusedWidget; + + int resizing; + int setting_wh; + + MwU32 mw, mh; /* Monitor width and height as advertised by wl_output.mode */ + + MwLL parent; + + MwBool force_render; + MwBool did_event_loop_early; + + MwBool dispatching_resize; + + MwBool is_toplevel_menu; + + struct _MwLLWaylandShmBuffer framebuffer; + struct _MwLLWaylandShmBuffer backbuffer; + struct _MwLLWaylandShmBuffer cursor; + struct _MwLLWaylandShmBuffer* icon; + + MwLLPixmap icon_pixmap; + + pthread_mutex_t eventsMutex; + + int cancelEvent; + int numCallbacksRunning; + + uint32_t last_time; + + MwBool moving; + + MwI64 keyboard_rate; + MwI32 keyboard_delay; + int last_pressed_key; + MwBool holding_key; + MwU64 next_elapsed; + long start_time; + long end_time; +}; + +struct _MwLLWaylandColor { + struct _MwLLCommonColor common; +}; + +#define _MwLLWaylandPixmap _MwLLCairoPixmap + +/* Setup the framebuffer with the saved width/height */ +void MwLLWaylandFramebufferSetup(struct _MwLLWayland* wayland); +/* Destroy the framebuffer */ +void MwLLWaylandFramebufferDestroy(struct _MwLLWayland* handle); + +/* Setup the framebuffer with the saved width/height */ +void MwLLWaylandBackbufferSetup(struct _MwLLWayland* wayland); +/* Destroy the backbuffer */ +void MwLLWaylandBackbufferDestroy(struct _MwLLWayland* handle); + +void MwLLWaylandBufferSetup(struct _MwLLWaylandShmBuffer* buffer, MwU32 width, MwU32 height); +void MwLLWaylandBufferUpdate(MwLL self, struct _MwLLWaylandShmBuffer* buffer); +void MwLLWaylandBufferDestroy(struct _MwLLWaylandShmBuffer* buffer); + +void MwLLWaylandRegionSetup(MwLL handle); +void MwLLWaylandRegionInvalidate(MwLL handle); + +void MwLLWaylandHangUntilConfigured(MwLL handle); + +MwBool MwLLWaylandWidgetIsDestroyed(MwLL self); +void MwLLWaylandWidgetUndestroy(MwLL self); + +/* Function for setting up the callbacks/structs that will be registered upon the relevant interfaces being found. */ +void MwLLWaylandSetupCallbacks(struct _MwLLWayland* wayland); + +void MwLLWaylandClipboardRead(wl_clipboard_device_context_t* ctx, int clipboard_type); + +/* Flush Wayland events */ +void MwLLWaylandFlush(MwLL handle); + +/* Standard procedure before event callbacks in Wayland */ +#define WAYLAND_EVENT_OP_START(self) \ + if(MwLLWaylandWidgetIsDestroyed(self)) { \ + return; \ + } + +/* Footer for WAYLAND_EVENT_OP_START */ +#define WAYLAND_EVENT_OP_END(self) + +#define WIDGET_CHECK(handle) \ + if(!handle->wayland.valid) { \ + return; \ + } + +/* the two decoration manager constructs */ +typedef struct zxdg_decoration_manager_v1_context { + struct zxdg_decoration_manager_v1* manager; + struct zxdg_toplevel_decoration_v1* decoration; +} zxdg_decoration_manager_v1_context_t; + +extern struct zwp_relative_pointer_v1_listener MwLLWaylandRelativePointerListener; + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/LowLevel/Wayland/.gitignore b/widget/milsko/milskosrc/include/Mw/LowLevel/Wayland/.gitignore new file mode 100644 index 0000000000..25a4663fa2 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/LowLevel/Wayland/.gitignore @@ -0,0 +1 @@ +*protocol.h diff --git a/widget/milsko/milskosrc/include/Mw/LowLevel/Wayland/README.md b/widget/milsko/milskosrc/include/Mw/LowLevel/Wayland/README.md new file mode 100644 index 0000000000..e0c17e81f2 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/LowLevel/Wayland/README.md @@ -0,0 +1 @@ +Folder for wayland-scanner to place any of its files. diff --git a/widget/milsko/milskosrc/include/Mw/LowLevel/X11.h b/widget/milsko/milskosrc/include/Mw/LowLevel/X11.h new file mode 100644 index 0000000000..e1b74169c5 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/LowLevel/X11.h @@ -0,0 +1,97 @@ +/*! + * @file Mw/LowLevel/X11.h + * @brief X11 Backend + * @warning This is used internally + */ +#ifndef __MW_LOWLEVEL_X11_H__ +#define __MW_LOWLEVEL_X11_H__ + +#include +#include +#include + +#include +#include +#include +#ifdef USE_XRENDER +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +struct _MwLLX11 { + struct _MwLLCommon common; + + unsigned int width; + unsigned int height; + + Display* display; + Window window; + Pixmap pixmap; + GC gc; + Colormap colormap; + Atom wm_delete; + Atom wm_protocols; + Atom utf8_string; + Atom compound_text; + Atom text; + Atom clipboard; + Atom selection; + XIM xim; + XIC xic; + + long clipboard_time; + int clipboard_pending; /* 1 if UTF8_STRING, 2 if COMPOUND_TEXT, 3 if TEXT, 4 if STRING, otherwise 0 */ + + int top; + int toplevel; + int grabbed; + int force_render; + + unsigned long red_mask; + unsigned long red_max; + unsigned long red_shift; + + unsigned long green_mask; + unsigned long green_max; + unsigned long green_shift; + + unsigned long blue_mask; + unsigned long blue_max; + unsigned long blue_shift; + +#ifdef USE_DBUS + MwLLDBusContext dbus; +#endif + + MwBool dark_theme_detection; +}; + +struct _MwLLX11Color { + struct _MwLLCommonColor common; + + unsigned long pixel; +}; + +struct _MwLLX11Pixmap { + struct _MwLLCommonPixmap common; + + int depth; + unsigned char* data; + MwLL handle; + int use_xrender; + Display* display; + XImage* image; + XImage* mask; +}; + +MWDECL int MwLLX11CallInit(void); +MWDECL Cursor MwLLX11CreateCursor(Display* display, MwCursor* image, MwCursor* mask); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/MachDep.h b/widget/milsko/milskosrc/include/Mw/MachDep.h new file mode 100644 index 0000000000..4c98b24da3 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/MachDep.h @@ -0,0 +1,123 @@ +/*! + * @file Mw/MachDep.h + * @brief Machine dependent headers and macros + */ +#ifndef __MW_MACHDEP_H__ +#define __MW_MACHDEP_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199409L +#include +#define MW_HAS_WCHAR +#endif +#ifdef _WIN32 +#include + +#ifdef _MILSKO +#include +#include +#ifndef GWLP_USERDATA +#define GWLP_USERDATA GWL_USERDATA +#define GWLP_WNDPROC GWL_WNDPROC +#define GCLP_HICON GCL_HICON +#define GCLP_HCURSOR GCL_HCURSOR +#define SetWindowLongPtr SetWindowLong +#define GetWindowLongPtr GetWindowLong +#define SetClassLongPtr SetClassLong +#define GetClassLongPtr GetClassLong +#endif +#ifndef WM_MOUSEWHEEL +#define WM_MOUSEWHEEL 0x020a +#define GET_WHEEL_DELTA_WPARAM(x) ((short)HIWORD(x)) +#endif +#endif +#elif defined(CLASSIC_MAC_OS) +#include +#include +#include +#include +#include +#include +#include +#include +#else +#include +#include +#include +#include +#include +#endif + +#if defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__) +#include +#include +#endif + +#ifdef __HAIKU__ +#ifdef __cplusplus +#include +#include +#include +#include +#include +#include +#include +#endif +#include +#endif + +#ifdef __APPLE__ +#include +#include +#endif + +#ifdef USE_DBUS +#include +#endif + +#ifndef M_PI +#define M_PI 3.14159265 +#endif + +/* Windows */ +#if defined(_MILSKO) && defined(_MILSKO_BUILD) && defined(_WIN32) +#define MWDECL extern __declspec(dllexport) +#elif defined(_WIN32) +#define MWDECL extern __declspec(dllimport) +/* GCC/Clang */ +/* First check if we have __has_attribute and can check for the existence of visibility */ +#elif defined(__has_attribute) +#if __has_attribute(visibility) +#define MWDECL extern __attribute__((visibility("default"))) +#else +#define MWDECL extern +#endif +/* It might be that we're on an old version of GCC (like the one Apple ships with older versions of Mac OS). + * If we're on gcc 3 or above, assume it's there + */ +#elif __GNUC__ >= 3 +#define MWDECL extern __attribute__((visibility("default"))) +#else +/* all else fails */ +#define MWDECL extern +#endif + +#if defined(_WIN32) +#define MWAPI __cdecl +#else +#define MWAPI +#endif + +#define MwInline static __inline + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Milsko.h b/widget/milsko/milskosrc/include/Mw/Milsko.h new file mode 100644 index 0000000000..9860990ca4 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Milsko.h @@ -0,0 +1,60 @@ +/*! + * @file Mw/Milsko.h + * @brief Includes all headers + */ +#ifndef __MW_MILSKO_H__ +#define __MW_MILSKO_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Resource/Cursor.h b/widget/milsko/milskosrc/include/Mw/Resource/Cursor.h new file mode 100644 index 0000000000..9a4780286d --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Resource/Cursor.h @@ -0,0 +1,70 @@ +/*! + * @file Mw/Resource/Cursor.h + * @brief Cursor externs + */ + +#ifndef __MW_RESOURCE_CURSOR_H__ +#define __MW_RESOURCE_CURSOR_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Default cursor + */ +MWDECL MwCursor MwCursorDefault; + +/*! + * @brief Default cursor mask + */ +MWDECL MwCursor MwCursorDefaultMask; + +/*! + * @brief Arrow cursor + */ +MWDECL MwCursor MwCursorArrow; + +/*! + * @brief Arrow cursor mask + */ +MWDECL MwCursor MwCursorArrowMask; + +/*! + * @brief Cross cursor + */ +MWDECL MwCursor MwCursorCross; + +/*! + * @brief Cross cursor mask + */ +MWDECL MwCursor MwCursorCrossMask; + +/*! + * @brief Text cursor + */ +MWDECL MwCursor MwCursorText; + +/*! + * @brief Text cursor mask + */ +MWDECL MwCursor MwCursorTextMask; + +/*! + * @brief Hidden cursor + */ +MWDECL MwCursor MwCursorHidden; + +/*! + * @brief Hidden cursor mask + */ +MWDECL MwCursor MwCursorHiddenMask; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Resource/Font.h b/widget/milsko/milskosrc/include/Mw/Resource/Font.h new file mode 100644 index 0000000000..d178a25b95 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Resource/Font.h @@ -0,0 +1,69 @@ +/*! + * @file Mw/Resource/Font.h + * @brief Default font resources + */ +#ifndef __MW_RESOURCE_FONT_H__ +#define __MW_RESOURCE_FONT_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Default font data + */ +MWDECL MwFont MwFontData[]; + +/*! + * @brief Default bold font data + */ +MWDECL MwFont MwBoldFontData[]; + +/*! + * @brief Default TTF font data + */ +MWDECL unsigned char MwTTFData[]; + +/*! + * @brief Default TTF font size + */ +MWDECL unsigned int MwTTFDataSize; + +/*! + * @brief Default bold TTF font data + */ +MWDECL unsigned char MwBoldTTFData[]; + +/*! + * @brief Default bold TTF font size + */ +MWDECL unsigned int MwBoldTTFDataSize; + +/*! + * @brief Default monospace TTF font data + */ +MWDECL unsigned char MwMonospaceTTFData[]; + +/*! + * @brief Default monospace TTF font size + */ +MWDECL unsigned int MwMonospaceTTFDataSize; + +/*! + * @brief Default bold monospace TTF font data + */ +MWDECL unsigned char MwBoldMonospaceTTFData[]; + +/*! + * @brief Default bold monospace TTF font size + */ +MWDECL unsigned int MwBoldMonospaceTTFDataSize; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Resource/Icon.h b/widget/milsko/milskosrc/include/Mw/Resource/Icon.h new file mode 100644 index 0000000000..93eb2c6a0c --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Resource/Icon.h @@ -0,0 +1,98 @@ +/*! + * @file Mw/Resource/Icon.h + * @brief Icon + */ +#ifndef __MW_RESOURCE_ICON_H__ +#define __MW_RESOURCE_ICON_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Back icon + */ +MWDECL MwU32 MwIconBack[]; + +/*! + * @brief Clock icon + */ +MWDECL MwU32 MwIconClock[]; + +/*! + * @brief Computer icon + */ +MWDECL MwU32 MwIconComputer[]; + +/*! + * @brief Directory icon + */ +MWDECL MwU32 MwIconDirectory[]; + +/*! + * @brief Down icon + */ +MWDECL MwU32 MwIconDown[]; + +/*! + * @brief Error icon + */ +MWDECL MwU32 MwIconError[]; + +/*! + * @brief File icon + */ +MWDECL MwU32 MwIconFile[]; + +/*! + * @brief Forward icon + */ +MWDECL MwU32 MwIconForward[]; + +/*! + * @brief Info icon + */ +MWDECL MwU32 MwIconInfo[]; + +/*! + * @brief Left icon + */ +MWDECL MwU32 MwIconLeft[]; + +/*! + * @brief News icon + */ +MWDECL MwU32 MwIconNews[]; + +/*! + * @brief Note icon + */ +MWDECL MwU32 MwIconNote[]; + +/*! + * @brief Right icon + */ +MWDECL MwU32 MwIconRight[]; + +/*! + * @brief Search icon + */ +MWDECL MwU32 MwIconSearch[]; + +/*! + * @brief Up icon + */ +MWDECL MwU32 MwIconUp[]; + +/*! + * @brief Warning icon + */ +MWDECL MwU32 MwIconWarning[]; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/String.h b/widget/milsko/milskosrc/include/Mw/String.h new file mode 100644 index 0000000000..5333d01905 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/String.h @@ -0,0 +1,63 @@ +/*! + * @file Mw/String.h + * @brief String utilities + */ +#ifndef __MW_STRING_H__ +#define __MW_STRING_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Duplicates a string + * @param str String + * @return String + */ +MWDECL char* MWAPI MwStringDuplicate(const char* str); + +/*! + * @brief Concatenates 2 strings + * @param str1 String + * @param str2 String + * @return String + */ +MWDECL char* MWAPI MwStringConcat(const char* str1, const char* str2); + +/*! + * @brief Converts size to string + * @param out Output + * @param size Size + */ +MWDECL void MWAPI MwStringSize(char* out, MwOffset size); + +/*! + * @brief Converts time to string + * @param out Output + * @param t Time + */ +MWDECL void MWAPI MwStringTime(char* out, time_t t); + +/*! + * @brief Prints up to n characters into a bufferMwStringPrintIntoBuffer. + * @note On compilers that support C99, this uses vsnprintf to safely print into a buffer; on compilers that don't, vsprintf is used. + * @param out Buffer + * @param size Max size + */ +MWDECL void MWAPI MwStringPrintIntoBuffer(char* out, MwU32 size, const char* fmt, ...); + +/*! + * @brief Check if the given key is UTF8 + * @param key Input + * @return whether its utf8 + */ +MWDECL MwBool MWAPI MwStringIsKeyUTF8(MwU32 key); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/StringDefs.h b/widget/milsko/milskosrc/include/Mw/StringDefs.h new file mode 100644 index 0000000000..b95fe93033 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/StringDefs.h @@ -0,0 +1,102 @@ +/*! + * @file Mw/StringDefs.h + * @brief String definitions for property + */ +#ifndef __MW_STRINGDEFS_H__ +#define __MW_STRINGDEFS_H__ + +#define MwNx "Ix" +#define MwNy "Iy" +#define MwNwidth "Iwidth" +#define MwNheight "Iheight" +#define MwNorientation "Iorientation" +#define MwNminValue "IminValue" +#define MwNmaxValue "ImaxValue" +#define MwNvalue "Ivalue" +#define MwNchangedBy "IchangedBy" +#define MwNareaShown "IareaShown" +#define MwNchecked "Ichecked" +#define MwNalignment "Ialignment" +#define MwNbold "Ibold" +#define MwNmain "Imain" +#define MwNleftPadding "IleftPadding" +#define MwNhasHeading "IhasHeading" +#define MwNhasBorder "IhasBorder" +#define MwNinverted "Iinverted" +#define MwNmodernLook "ImodernLook" +#define MwNwaitMS "IwaitMS" +#define MwNhideInput "IhideInput" +#define MwNsingleClickSelectable "IsingleClickSelectable" +#define MwNflat "Iflat" +#define MwNshowArrows "IshowArrows" +#define MwNpadding "Ipadding" +#define MwNborderWidth "IborderWidth" +#define MwNfillArea "IfillArea" +#define MwNratio "Iratio" +#define MwNfixedSize "IfixedSize" +#define MwNmargin "Imargin" +#define MwNbitmapFont "IbitmapFont" +#define MwNsevenSegment "IsevenSegment" +#define MwNlength "Ilength" +#define MwNforceInverted "IforceInverted" +#define MwNisRounded "IisRounded" +#define MwNdarkTheme "IdarkTheme" +#define MwNuseMonospace "IuseMonospace" +#define MwNdarkThemeAutomatic "IdarkThemeAutomatic" +#define MwNyear "Iyear" +#define MwNmonth "Imonth" +#define MwNdate "Idate" +#define MwNday "Iday" +#define MwNwaitLayout "IwaitLayout" +#define MwNscale "Iscale" +#define MwNcolumns "Icolumns" +#define MwNcolumnSpan "IcolumnSpan" +#define MwNrowSpan "IrowSpan" +#define MwNdisabled "Idisabled" + +#define MwNtitle "Stitle" +#define MwNtext "Stext" +#define MwNbackground "Sbackground" +#define MwNsubBackground "SsubBackground" +#define MwNtitleBackground "StitleBackground" +#define MwNforeground "Sforeground" +#define MwNsubForeground "SsubForeground" +#define MwNtitleForeground "StitleForeground" + +#define MwNvulkanExtension "SEvulkanExtension" +#define MwNvulkanLayer "SEvulkanLayer" +#define MwNvulkanConfig "VEvulkanConfig" + +#define MwNpixmap "Vpixmap" +#define MwNiconPixmap "ViconPixmap" +#define MwNsizeHints "VsizeHints" +#define MwNfont "Vfont" +#define MwNboldFont "VboldFont" +#define MwNbackgroundPixmap "VbackgroundPixmap" +#define MwNmonospaceFont "VmonospaceFont" +#define MwNboldMonospaceFont "VboldMonospaceFont" + +#define MwNactivateHandler "Cactivate" +#define MwNlistBoxActivateHandler "ClistBoxActivate" +#define MwNtreeViewActivateHandler "CtreeViewActivate" +#define MwNresizeHandler "Cresize" +#define MwNtickHandler "Ctick" +#define MwNmenuHandler "Cmenu" +#define MwNmouseDownHandler "CmouseDown" +#define MwNmouseUpHandler "CmouseUp" +#define MwNmouseMoveHandler "CmouseMove" +#define MwNchangedHandler "Cchanged" +#define MwNcomboBoxChangedHandler "CcomboBoxChanged" +#define MwNkeyHandler "Ckey" +#define MwNkeyReleaseHandler "CkeyRelease" +#define MwNcloseHandler "Cclose" +#define MwNfocusInHandler "CfocusIn" +#define MwNfocusOutHandler "CfocusOut" +#define MwNfileChosenHandler "CfileChosen" +#define MwNdirectoryChosenHandler "CdirectoryChosen" +#define MwNcolorChosenHandler "CcolorChosen" +#define MwNdrawHandler "Cdraw" +#define MwNclipboardHandler "Cclipboard" +#define MwNdarkThemeHandler "CdarkTheme" + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/TrueType.h b/widget/milsko/milskosrc/include/Mw/TrueType.h new file mode 100644 index 0000000000..eea90c95f2 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/TrueType.h @@ -0,0 +1,33 @@ +/*! + * @file Mw/TrueType.h + * @brief TrueType utilities + */ +#ifndef __MW_TRUETYPE_H__ +#define __MW_TRUETYPE_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Get the TrueType font information + * @param data Font data + * @param size Font size + * @return Information + */ +MWDECL MwTTFInfo MwTTFGetInfo(unsigned char* data, int size); + +/*! + * @brief Free the TrueType font information + * @param info Information + */ +MWDECL void MwTTFFreeInfo(MwTTFInfo info); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/TypeDefs.h b/widget/milsko/milskosrc/include/Mw/TypeDefs.h new file mode 100644 index 0000000000..5989e1ba41 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/TypeDefs.h @@ -0,0 +1,282 @@ +/*! + * @file Mw/TypeDefs.h + * @brief Type definitions + */ +#ifndef __MW_TYPEDEFS_H__ +#define __MW_TYPEDEFS_H__ + +#include +#include + +typedef struct _MwClass * MwClass, MwClassRec; +typedef struct _MwIntegerKeyValue MwIntegerKeyValue; +typedef struct _MwTextKeyValue MwTextKeyValue; +typedef struct _MwUserHandlerArray MwUserHandlerArray; +typedef struct _MwUserHandlerKeyValue MwUserHandlerKeyValue; +typedef struct _MwVoidKeyValue MwVoidKeyValue; +typedef struct _MwMenu* MwMenu; +typedef struct _MwEntry* MwEntry; +typedef struct _MwViewport* MwViewport; +typedef struct _MwListBox* MwListBox; +typedef struct _MwComboBox* MwComboBox; +typedef struct _MwTreeView* MwTreeView; +typedef struct _MwScrollBar* MwScrollBar; +typedef struct _MwLabel* MwLabel; +typedef struct _MwLabelSegment MwLabelSegment; +typedef struct _MwListBoxEntry MwListBoxEntry; +typedef struct _MwTreeViewEntry MwTreeViewEntry; +typedef struct _MwDirectoryEntry MwDirectoryEntry; +typedef struct _MwBox* MwBox; +typedef struct _MwSubWindow* MwSubWindow; +typedef struct _MwTab* MwTab; +typedef struct _MwTable* MwTable; +typedef struct _MwMouse MwMouse; +typedef struct _MwTTFInfo* MwTTFInfo; +#ifdef _MILSKO +typedef struct _MwWidget* MwWidget; +#else +typedef void* MwWidget; +#endif +typedef void (*MwHandler)(MwWidget handle); +typedef int (*MwHandlerWithStatus)(MwWidget handle); +typedef void (*MwHandlerProps)(MwWidget handle, char** key); +typedef void (*MwHandlerProp)(MwWidget handle, const char* key); +typedef void (*MwHandlerChildrenUpdate)(MwWidget handle, MwWidget child, int new_child); +typedef void (*MwHandlerChildrenProp)(MwWidget handle, MwWidget child, const char* key); +typedef void (*MwHandlerKey)(MwWidget handle, int key); +typedef void (*MwHandlerMouse)(MwWidget handle, void* ptr); +typedef void (*MwHandlerExecute)(MwWidget handle, const char* name, void* out, va_list args); +typedef void (*MwHandlerClipboardReceived)(MwWidget handle, const char* data); + +typedef void(MWAPI* MwUserHandler)(MwWidget handle, void* user_data, void* call_data); +typedef void(MWAPI* MwErrorHandler)(int code, const char* message, void* user_data); + +struct _MwTextKeyValue { + char* key; + char* value; +}; + +struct _MwIntegerKeyValue { + char* key; + int value; +}; + +struct _MwUserHandlerArray { + void* user_data; + MwUserHandler handler; +}; + +struct _MwUserHandlerKeyValue { + char* key; + MwUserHandlerArray* value; +}; + +struct _MwVoidKeyValue { + char* key; + void* value; +}; + +#include + +#ifdef _MILSKO +struct _MwWidget { + char* name; + MwLLColor bgcolor; + + MwLL lowlevel; + MwWidget parent; + MwWidget* children; + MwClass widget_class; + + int pressed; + MwPoint mouse_point; + int close; + int prop_event; + + void* internal; + void* opaque; + void* user; + void (*draw_inject)(MwWidget handle); + void (*destroy_inject)(MwWidget handle); + + MwIntegerKeyValue* integer; + MwTextKeyValue* text; + MwUserHandlerKeyValue* handler; + MwVoidKeyValue* data; + + MwWidget* destroy_queue; + MwWidget* tick_list; + + int destroyed; + + void* root_font; + void* root_boldfont; + void* root_monofont; + void* root_boldmonofont; + + int top_step; + MwWidget* draw_queue; + MwWidget* resize_queue; + MwWidget* monitored_entries; + + int berserk; + long last_tick; + + MwBool is_menu; +}; +#endif + +struct _MwMenu { + char* name; + int keep; + MwWidget wsub; + MwMenu* sub; + void* opaque; + int cleaned; +}; + +struct _MwEntry { + int cursor; + int right; + int length; + int active; + int cursor_blink_timer; + MwPoint mouse; +}; + +struct _MwViewport { + MwWidget vscroll; + MwWidget hscroll; + MwWidget frame; + MwWidget inframe; + int vchanged; + int hchanged; +}; + +struct _MwListBoxEntry { + char** name; + MwLLPixmap pixmap; +}; + +struct _MwListBox { + MwWidget vscroll; + MwWidget frame; + MwListBoxEntry* list; + unsigned long click_time; + int pressed; + int* width; + int* alignment; + int changed; +}; + +struct _MwComboBox { + char** list; + int opened; + MwWidget listbox; +}; + +struct _MwTreeViewEntry { + char* label; + MwLLPixmap pixmap; + MwTreeViewEntry** tree; + int opened; + int selected; + unsigned long click_time; + MwTreeViewEntry* parent; +}; + +struct _MwTreeView { + MwWidget frame; + MwWidget vscroll; + int changed; + MwTreeViewEntry** tree; + + MwPoint pressed; +}; + +struct _MwScrollBar { + MwPoint point; + int drag; + int pos; +}; + +struct _MwLabel { + MwLabelSegment* segment; + MwHandler draw; +}; + +struct _MwLabelSegment { + int key; + unsigned char value; +}; + +struct _MwDirectoryEntry { + char* name; + int type; + MwOffset size; + time_t mtime; +}; + +struct _MwBox { + int layout; +}; + +struct _MwTable { + int layout; + MwWidget* widgets; +}; + +struct _MwSubWindow { + MwWidget frame; + MwWidget minimize; + MwWidget maximize; + MwWidget close; + int maximized; + int minimized; + int x; + int y; + int width; + int height; + MwPoint cursor_start; + MwPoint base; +}; + +struct _MwTab { + MwWidget* frames; + char** names; +}; + +struct _MwMouse { + MwPoint point; + int button; +}; + +struct _MwTTFInfo { + char* family; + int weight; +}; + +struct _MwClass { + MwHandlerWithStatus create; + MwHandler destroy; + MwHandler draw; + MwHandler click; + MwHandler parent_resize; + MwHandlerProp prop_change; + MwHandler mouse_move; + MwHandlerMouse mouse_up; + MwHandlerMouse mouse_down; + MwHandlerKey key; + MwHandlerExecute execute; + MwHandler tick; + MwHandler resize; + MwHandlerChildrenUpdate children_update; + MwHandlerChildrenProp children_prop_change; + MwHandlerClipboardReceived clipboard; + MwHandlerProps props_change; + void* reserved1; + void* reserved2; + void* reserved3; +}; + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Unicode.h b/widget/milsko/milskosrc/include/Mw/Unicode.h new file mode 100644 index 0000000000..32edeaabcc --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Unicode.h @@ -0,0 +1,53 @@ +/*! + * @file Mw/Unicode.h + * @brief Handles UTF8 stuff + */ +#ifndef __MW_UNICODE_H__ +#define __MW_UNICODE_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Converts UTF-8 to UTF-32 + * @brief input Input + * @brief output Output + * @return Bytes this multibyte takes + */ +MWDECL int MWAPI MwUTF8ToUTF32(const char* input, int* output); + +/*! + * @brief Calculates UTF-8 string length + * @brief input Input + * @return Length + */ +MWDECL int MWAPI MwUTF8Length(const char* input); + +/*! + * @brief Copies UTF-8 string to other string + * @brief src Source + * @brief srcskip Length to be skipped + * @brief dst Destination + * @brief dstskip Length to be skipped + * @brief len Length + * @return Copied length in bytes + */ +MWDECL int MWAPI MwUTF8Copy(const char* src, int srcskip, char* dst, int dstskip, int len); + +/*! + * @brief Converts UTF-32 to UTF-8 + * @brief input Input + * @brief output Output + * @return Bytes this wide byte takes + */ +MWDECL int MWAPI MwUTF32ToUTF8(int input, char* output); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Version.h b/widget/milsko/milskosrc/include/Mw/Version.h new file mode 100644 index 0000000000..9821dc6a4b --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Version.h @@ -0,0 +1,33 @@ +/*! + * @file Mw/Version.h + * @brief Version informations + */ +#ifndef __MW_VERSION_H__ +#define __MW_VERSION_H__ + +/*! + * @brief Major version + */ +#define MwMAJOR 1 + +/*! + * @brief Minor version + */ +#define MwMINOR 3 + +/*! + * @brief Patchlevel of version, if patchlevel_alphabet is a or bigger, this value is calculated by `patchlevel_alphabet - 'a' + 1`. Otherwise 0 + */ +#define MwPATCH 0 + +/*! + * @brief Version in string + */ +#define MwVERSION "1.4" + +/*! + * @brief Version in string + */ +MWDECL const char* MwVersionString; + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/Box.h b/widget/milsko/milskosrc/include/Mw/Widget/Box.h new file mode 100644 index 0000000000..172e5f6e28 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/Box.h @@ -0,0 +1,24 @@ +/*! + * @file Mw/Widget/Box.h + * @brief Box widget + */ +#ifndef __MW_WIDGET_BOX_H__ +#define __MW_WIDGET_BOX_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Box widget class + */ +MWDECL MwClass MwBoxClass; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/Button.h b/widget/milsko/milskosrc/include/Mw/Widget/Button.h new file mode 100644 index 0000000000..a8c6ca8bcc --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/Button.h @@ -0,0 +1,24 @@ +/*! + * @file Mw/Widget/Button.h + * @brief Button widget + */ +#ifndef __MW_WIDGET_BUTTON_H__ +#define __MW_WIDGET_BUTTON_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Button widget class + */ +MWDECL MwClass MwButtonClass; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/Calendar.h b/widget/milsko/milskosrc/include/Mw/Widget/Calendar.h new file mode 100644 index 0000000000..a01968fc68 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/Calendar.h @@ -0,0 +1,24 @@ +/*! + * @file Mw/Widget/Calendar.h + * @brief Calendar widget + */ +#ifndef __MW_WIDGET_CALENDAR_H__ +#define __MW_WIDGET_CALENDAR_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Calendar widget class + */ +MWDECL MwClass MwCalendarClass; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/CheckBox.h b/widget/milsko/milskosrc/include/Mw/Widget/CheckBox.h new file mode 100644 index 0000000000..0b7cb1de52 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/CheckBox.h @@ -0,0 +1,24 @@ +/*! + * @file Mw/Widget/CheckBox.h + * @brief CheckBox widget + */ +#ifndef __MW_WIDGET_CHECKBOX_H__ +#define __MW_WIDGET_CHECKBOX_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief CheckBox widget class + */ +MWDECL MwClass MwCheckBoxClass; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/ComboBox.h b/widget/milsko/milskosrc/include/Mw/Widget/ComboBox.h new file mode 100644 index 0000000000..7b2dc2fca5 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/ComboBox.h @@ -0,0 +1,48 @@ +/*! + * @file Mw/Widget/ComboBox.h + * @brief ComboBox widget + */ +#ifndef __MW_WIDGET_COMBOBOX_H__ +#define __MW_WIDGET_COMBOBOX_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief ComboBox widget class + */ +MWDECL MwClass MwComboBoxClass; + +/*! + * @brief Adds the entry to combobox + * @param handle Widget + * @param index Index + * @param text Text + */ +MwInline void MwComboBoxAdd(MwWidget handle, int index, const char* text) { + MwVaWidgetExecute(handle, "mwComboBoxAdd", NULL, index, text); +} + +/*! + * @brief Gets the entry from combobox + * @param handle Widget + * @param index Index + * @return Text + */ +MwInline const char* MwComboBoxGet(MwWidget handle, int index) { + const char* text; + MwVaWidgetExecute(handle, "mwComboBoxGet", (void*)&text, index); + + return text; +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/Entry.h b/widget/milsko/milskosrc/include/Mw/Widget/Entry.h new file mode 100644 index 0000000000..614b578dbe --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/Entry.h @@ -0,0 +1,24 @@ +/*! + * @file Mw/Widget/Entry.h + * @brief Entry widget + */ +#ifndef __MW_WIDGET_ENTRY_H__ +#define __MW_WIDGET_ENTRY_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Entry widget class + */ +MWDECL MwClass MwEntryClass; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/Frame.h b/widget/milsko/milskosrc/include/Mw/Widget/Frame.h new file mode 100644 index 0000000000..658392e1e4 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/Frame.h @@ -0,0 +1,24 @@ +/*! + * @file Mw/Widget/Frame.h + * @brief Frame widget + */ +#ifndef __MW_WIDGET_FRAME_H__ +#define __MW_WIDGET_FRAME_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Frame widget class + */ +MWDECL MwClass MwFrameClass; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/Image.h b/widget/milsko/milskosrc/include/Mw/Widget/Image.h new file mode 100644 index 0000000000..39834cbd5e --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/Image.h @@ -0,0 +1,24 @@ +/*! + * @file Mw/Widget/Image.h + * @brief Image widget + */ +#ifndef __MW_WIDGET_IMAGE_H__ +#define __MW_WIDGET_IMAGE_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Image widget class + */ +MWDECL MwClass MwImageClass; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/Label.h b/widget/milsko/milskosrc/include/Mw/Widget/Label.h new file mode 100644 index 0000000000..f9338e337e --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/Label.h @@ -0,0 +1,36 @@ +/*! + * @file Mw/Widget/Label.h + * @brief Label widget + */ +#ifndef __MW_WIDGET_LABEL_H__ +#define __MW_WIDGET_LABEL_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Label widget class + */ +MWDECL MwClass MwLabelClass; + +/*! + * @brief Sets the custom data for seven segment + * @param handle Widget + * @param index Index + * @param data Data, `GFEDCBA` as 7-bit value + * @note See https://en.wikipedia.org/wiki/File:7_Segment_Display_with_Labeled_Segments.svg for what alphabets mean here + * */ +MwInline void MwLabelSetSevenSegment(MwWidget handle, int index, int data) { + MwVaWidgetExecute(handle, "mwLabelSetSevenSegment", NULL, index, data); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/ListBox.h b/widget/milsko/milskosrc/include/Mw/Widget/ListBox.h new file mode 100644 index 0000000000..f4fe48f462 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/ListBox.h @@ -0,0 +1,100 @@ +/*! + * @file Mw/Widget/ListBox.h + * @brief ListBox widget + */ +#ifndef __MW_WIDGET_LISTBOX_H__ +#define __MW_WIDGET_LISTBOX_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief ListBox widget class + */ +MWDECL MwClass MwListBoxClass; + +/*! + * @brief Sets item on the listbox + * @param handle Widget + * @param row Row + * @param col Column + * @param text Text + * @return Index + */ +MwInline int MwListBoxSet(MwWidget handle, int row, int col, const char* text) { + int out; + + MwVaWidgetExecute(handle, "mwListBoxSet", (void*)&out, row, col, text); + + return out; +} + +/*! + * @brief Sets the icon of the row + * @param handle Widget + * @param index Index + * @param icon Icon + */ +MwInline void MwListBoxSetIcon(MwWidget handle, int index, MwLLPixmap icon) { + MwVaWidgetExecute(handle, "mwListBoxSetIcon", NULL, index, icon); +} + +/*! + * @brief Deletes item from the listbox + * @param handle Widget + * @param index Index + */ +MwInline void MwListBoxDelete(MwWidget handle, int index) { + MwVaWidgetExecute(handle, "mwListBoxDelete", NULL, index); +} + +/*! + * @brief Gets item from the listbox + * @param handle Widget + * @param index Index + * @return Item + */ +MwInline const char* MwListBoxGet(MwWidget handle, int index) { + const char* out; + MwVaWidgetExecute(handle, "mwListBoxGet", (void*)&out, index); + return out; +} + +/*! + * @brief Sets an item width of the listbox + * @param handle Widget + * @param index Column index + * @param width Width + */ +MwInline void MwListBoxSetWidth(MwWidget handle, int index, int width) { + MwVaWidgetExecute(handle, "mwListBoxSetWidth", NULL, index, width); +} + +/*! + * @brief Sets an item alignment of the listbox + * @param handle Widget + * @param index Column index + * @param alignment Alignment + */ +MwInline void MwListBoxSetAlignment(MwWidget handle, int index, int alignment) { + MwVaWidgetExecute(handle, "mwListBoxSetAlignment", NULL, index, alignment); +} + +/*! + * @brief Resets the listbox + * @param handle Widget + */ +MwInline void MwListBoxReset(MwWidget handle) { + MwVaWidgetExecute(handle, "mwListBoxReset", NULL); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/Menu.h b/widget/milsko/milskosrc/include/Mw/Widget/Menu.h new file mode 100644 index 0000000000..621ba06d93 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/Menu.h @@ -0,0 +1,38 @@ +/*! + * @file Mw/Widget/Menu.h + * @brief Menu widget + */ +#ifndef __MW_WIDGET_MENU_H__ +#define __MW_WIDGET_MENU_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Menu widget class + */ +MWDECL MwClass MwMenuClass; + +/*! + * @brief Adds a menu + * @param handle Widget + * @param menu Menu + * @param name Menu name + * @return Menu + */ +MwInline MwMenu MwMenuAdd(MwWidget handle, MwMenu menu, const char* name) { + MwMenu out; + MwVaWidgetExecute(handle, "mwMenuAdd", &out, menu, name); + return out; +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/NumberEntry.h b/widget/milsko/milskosrc/include/Mw/Widget/NumberEntry.h new file mode 100644 index 0000000000..802018a16a --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/NumberEntry.h @@ -0,0 +1,24 @@ +/*! + * @file Mw/Widget/NumberEntry.h + * @brief NumberEntry widget + */ +#ifndef __MW_WIDGET_NUMBERENTRY_H__ +#define __MW_WIDGET_NUMBERENTRY_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief NumberEntry widget class + */ +MWDECL MwClass MwNumberEntryClass; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/OpenGL.h b/widget/milsko/milskosrc/include/Mw/Widget/OpenGL.h new file mode 100644 index 0000000000..3f7a0c4519 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/OpenGL.h @@ -0,0 +1,73 @@ +/*! + * @file Mw/Widget/OpenGL.h + * @brief OpenGL widget + */ +#ifndef __MW_WIDGET_OPENGL_H__ +#define __MW_WIDGET_OPENGL_H__ + +#include +#include +#include + +#if !defined(MW_OPENGL_NO_INCLUDE) && !defined(__gl_h_) +#ifdef _WIN32 +#include +#elif defined(__APPLE__) +#else +#include +#endif +#if defined(__APPLE__) +#include +#include +#else +#include +#include +#endif + +#ifndef GLAPIENTRY +#define GLAPIENTRY APIENTRY +#endif +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief OpenGL widget class + */ +MWDECL MwClass MwOpenGLClass; + +/*! + * @brief Make a widget current OpenGL context + * @param handle Widget + */ +MwInline void MwOpenGLMakeCurrent(MwWidget handle) { + MwVaWidgetExecute(handle, "mwOpenGLMakeCurrent", NULL); +} + +/*! + * @brief Get a procedure from OpenGL + * @param handle Widget + * @param name Name + * @return Procedure + */ +MwInline void* MwOpenGLGetProcAddress(MwWidget handle, const char* name) { + void* out; + MwVaWidgetExecute(handle, "mwOpenGLGetProcAddress", &out, name); + return out; +} + +/*! + * @brief Swaps the buffer of OpenGL context + * @param handle Widget + */ +MwInline void MwOpenGLSwapBuffer(MwWidget handle) { + MwVaWidgetExecute(handle, "mwOpenGLSwapBuffer", NULL); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/ProgressBar.h b/widget/milsko/milskosrc/include/Mw/Widget/ProgressBar.h new file mode 100644 index 0000000000..96fce26130 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/ProgressBar.h @@ -0,0 +1,24 @@ +/*! + * @file Mw/Widget/ProgressBar.h + * @brief ProgressBar widget + */ +#ifndef __MW_WIDGET_PROGRESSBAR_H__ +#define __MW_WIDGET_PROGRESSBAR_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief ProgressBar widget class + */ +MWDECL MwClass MwProgressBarClass; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/RadioBox.h b/widget/milsko/milskosrc/include/Mw/Widget/RadioBox.h new file mode 100644 index 0000000000..9b4a400a36 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/RadioBox.h @@ -0,0 +1,24 @@ +/*! + * @file Mw/Widget/RadioBox.h + * @brief RadioBox widget + */ +#ifndef __MW_WIDGET_RADIOBOX_H__ +#define __MW_WIDGET_RADIOBOX_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief RadioBox widget class + */ +MWDECL MwClass MwRadioBoxClass; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/ScrollBar.h b/widget/milsko/milskosrc/include/Mw/Widget/ScrollBar.h new file mode 100644 index 0000000000..de0d44780d --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/ScrollBar.h @@ -0,0 +1,36 @@ +/*! + * @file Mw/Widget/ScrollBar.h + * @brief ScrollBar widget + */ +#ifndef __MW_WIDGET_SCROLLBAR_H__ +#define __MW_WIDGET_SCROLLBAR_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief ScrollBar widget class + */ +MWDECL MwClass MwScrollBarClass; + +/*! + * @brief Calculates a visible length of scrollbar + * @param handle Widget + * @return Visible length + */ +MwInline int MwScrollBarGetVisibleLength(MwWidget handle) { + int out; + MwVaWidgetExecute(handle, "mwScrollBarGetVisibleLength", &out, NULL); + return out; +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/Separator.h b/widget/milsko/milskosrc/include/Mw/Widget/Separator.h new file mode 100644 index 0000000000..a8bbc14ca2 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/Separator.h @@ -0,0 +1,24 @@ +/*! + * @file Mw/Widget/Separator.h + * @brief Separator widget + */ +#ifndef __MW_WIDGET_SEPARATOR_H__ +#define __MW_WIDGET_SEPARATOR_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Separator widget class + */ +MWDECL MwClass MwSeparatorClass; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/SubMenu.h b/widget/milsko/milskosrc/include/Mw/Widget/SubMenu.h new file mode 100644 index 0000000000..636f29bc45 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/SubMenu.h @@ -0,0 +1,46 @@ +/*! + * @file Mw/Widget/SubMenu.h + * @brief SubMenu widget + */ +#ifndef __MW_WIDGET_SUBMENU_H__ +#define __MW_WIDGET_SUBMENU_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief SubMenu widget class + */ +MWDECL MwClass MwSubMenuClass; + +/*! + * @brief Makes submenu appear + * @param handle Handle + * @param menu Menu + * @param point Point + * @param diff_calc Toggles different way to calculate positiion + */ +MwInline void MwSubMenuAppear(MwWidget handle, MwMenu menu, MwPoint* point, int diff_calc) { + MwVaWidgetExecute(handle, "mwSubMenuAppear", NULL, menu, point, diff_calc); +} + +/*! + * @brief Calculates the size of submenu + * @param handle Handle + * @param menu Menu + * @param rect Size + */ +MwInline void MwSubMenuGetSize(MwWidget handle, MwMenu menu, MwRect* rect) { + MwVaWidgetExecute(handle, "mwSubMenuGetSize", NULL, menu, rect); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/SubWindow.h b/widget/milsko/milskosrc/include/Mw/Widget/SubWindow.h new file mode 100644 index 0000000000..c7ce2e1f2c --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/SubWindow.h @@ -0,0 +1,36 @@ +/*! + * @file Mw/Widget/SubWindow.h + * @brief SubWindow widget + */ +#ifndef __MW_WIDGET_SUBWINDOW_H__ +#define __MW_WIDGET_SUBWINDOW_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief SubWindow widget class + */ +MWDECL MwClass MwSubWindowClass; + +/*! + * @brief Get parent widget where widgets should be placed + * @param handle Widget + * @return Widget + */ +MwInline MwWidget MwSubWindowGetFrame(MwWidget handle) { + MwWidget out; + MwVaWidgetExecute(handle, "mwSubWindowGetFrame", &out); + return out; +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/Tab.h b/widget/milsko/milskosrc/include/Mw/Widget/Tab.h new file mode 100644 index 0000000000..9f80a0dfb7 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/Tab.h @@ -0,0 +1,59 @@ +/*! + * @file Mw/Widget/Tab.h + * @brief Tab widget + */ +#ifndef __MW_WIDGET_TAB_H__ +#define __MW_WIDGET_TAB_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Tab widget class + */ +MWDECL MwClass MwTabClass; + +/*! + * @brief Adds a tab + * @param handle Widget + * @param name Tab name + * @return Frame + */ +MwInline MwWidget MwTabAdd(MwWidget handle, const char* name) { + MwWidget out; + MwVaWidgetExecute(handle, "mwTabAdd", &out, name); + return out; +} + +/*! + * @brief Gets a tab frame + * @param handle Widget + * @param name Tab name + * @return Frame + */ +MwInline MwWidget MwTabGetFrame(MwWidget handle, const char* name) { + MwWidget out; + MwVaWidgetExecute(handle, "mwTabGetFrame", &out, name); + return out; +} + +/*! + * @brief Focus on a tab frame + * @param handle Widget + * @param name Tab name + * @return Frame + */ +MwInline void MwTabFocus(MwWidget handle, const char* name) { + MwVaWidgetExecute(handle, "mwTabFocus", NULL, name); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/Table.h b/widget/milsko/milskosrc/include/Mw/Widget/Table.h new file mode 100644 index 0000000000..1d39ec3082 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/Table.h @@ -0,0 +1,24 @@ +/*! + * @file Mw/Widget/Table.h + * @brief Table widget + */ +#ifndef __MW_WIDGET_TABLE_H__ +#define __MW_WIDGET_TABLE_H__ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Table widget class + */ +MWDECL MwClass MwTableClass; + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/TreeView.h b/widget/milsko/milskosrc/include/Mw/Widget/TreeView.h new file mode 100644 index 0000000000..f76f6af0a0 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/TreeView.h @@ -0,0 +1,110 @@ +/*! + * @file Mw/Widget/TreeView.h + * @brief TreeView widget + */ +#ifndef __MW_WIDGET_TREEVIEW_H__ +#define __MW_WIDGET_TREEVIEW_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief TreeView widget class + */ +MWDECL MwClass MwTreeViewClass; + +/*! + * @brief Adds item to the treeview + * @param handle Widget + * @parma parent Parent + * @parma pixmap Pixmap + * @param item Item + */ +MwInline void* MwTreeViewAdd(MwWidget handle, void* parent, MwLLPixmap pixmap, const char* item) { + void* out; + MwVaWidgetExecute(handle, "mwTreeViewAdd", &out, parent, pixmap, item); + return out; +} + +/*! + * @brief Deletes item from the treeview + * @param handle Widget + * @param item Item + */ +MwInline void MwTreeViewDelete(MwWidget handle, void* item) { + MwVaWidgetExecute(handle, "mwTreeViewDelete", NULL, item); +} + +/*! + * @brief Resets the treeview + * @param handle Widget + */ +MwInline void MwTreeViewReset(MwWidget handle) { + MwVaWidgetExecute(handle, "mwTreeViewReset", NULL); +} + +/*! + * @brief Gets item from the treeview + * @param handle Widget + * @param item Item + * @return Item + */ +MwInline const char* MwTreeViewGet(MwWidget handle, void* item) { + const char* out; + MwVaWidgetExecute(handle, "mwTreeViewGet", (void*)&out, item); + return out; +} + +/*! + * @brief Sets the label of ithe item + * @param handle Widget + * @param item Item + * @param label Label + */ +MwInline void MwTreeViewSetLabel(MwWidget handle, void* item, const char* label) { + MwVaWidgetExecute(handle, "mwTreeViewSetLabel", NULL, item, label); +} + +/*! + * @brief Sets the pixmap of ithe item + * @param handle Widget + * @param item Item + * @param pixmap Pixmap + */ +MwInline void MwTreeViewSetPixmap(MwWidget handle, void* item, MwLLPixmap pixmap) { + MwVaWidgetExecute(handle, "mwTreeViewSetPixmap", NULL, item, pixmap); +} + +/*! + * @brief Sets the opened state of ithe item + * @param handle Widget + * @param item Item + * @param opened Opened or not + */ +MwInline void MwTreeViewSetOpened(MwWidget handle, void* item, int opened) { + MwVaWidgetExecute(handle, "mwTreeViewSetOpened", NULL, item, opened); +} + +/*! + * @brief Gets the opened state of ithe item + * @param handle Widget + * @param item Item + * @return Opened or not + */ +MwInline int MwTreeViewGetOpened(MwWidget handle, void* item) { + int out; + MwVaWidgetExecute(handle, "mwTreeViewGetOpened", (void*)&out, item); + + return out; +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/Viewport.h b/widget/milsko/milskosrc/include/Mw/Widget/Viewport.h new file mode 100644 index 0000000000..d60848cbb4 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/Viewport.h @@ -0,0 +1,46 @@ +/*! + * @file Mw/Widget/Viewport.h + * @brief Viewport widget + */ +#ifndef __MW_WIDGET_VIEWPORT_H__ +#define __MW_WIDGET_VIEWPORT_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Viewport widget class + */ +MWDECL MwClass MwViewportClass; + +/*! + * @brief Get parent widget where widgets should be placed + * @param handle Widget + * @return Widget + */ +MwInline MwWidget MwViewportGetViewport(MwWidget handle) { + MwWidget out; + MwVaWidgetExecute(handle, "mwViewportGetViewport", &out); + return out; +} + +/*! + * @brief Set viewport size + * @param handle Widget + * @param w Width + * @param h Height + */ +MwInline void MwViewportSetSize(MwWidget handle, int w, int h) { + MwVaWidgetExecute(handle, "mwViewportSetSize", NULL, w, h); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/Vulkan.h b/widget/milsko/milskosrc/include/Mw/Widget/Vulkan.h new file mode 100644 index 0000000000..4c7e0bb132 --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/Vulkan.h @@ -0,0 +1,112 @@ +/*! + * @file Mw/Widget/Vulkan.h + * @brief Vulkan widget + * @warning This header is not documented yet + */ + +/** + * ioixd maintains this file. nishi doesn't know vulkan at all + */ + +#ifndef __MW_WIDGET_VULKAN_H__ +#define __MW_WIDGET_VULKAN_H__ + +#if defined(MW_VULKAN) && !defined(_WIN32) && !defined(__linux__) && !defined(__FreeBSD__) && !defined(__NetBSD__) +#error Vulkan is unsupported on the requested platform. +#endif + +#if !defined(MW_VULKAN_NO_INCLUDE) +#include +#include +#endif + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Vulkan widget class + */ +MWDECL MwClass MwVulkanClass; + +/*! + * @brief Configuration options that can be passed to setup parts of the Vulkan widget. + */ +typedef struct _MwVulkanConfig { + /*! + * @brief Vulkan API version (default: VK_API_VERSION_1_0) + */ + MwU32 api_version; + /*! + * @brief Vulkan version (default: VK_VERSION_1_0) + */ + MwU32 vk_version; + /*! + * @brief Whether or not to enable validation layers (default: false) + */ + int validation_layers; +} MwVulkanConfig; + +/*! + * @brief Field that can be gotten from Vulkan. + */ +enum MwVULKANFIELD { + /*! + * @brief The address of the vulkan widget's vkGetInstanceProcAddr function (PFN_vkGetInstanceProcAddr) + */ + MwVULKANFIELD_GETINSTANCEPROCADDR = 0, + /*! + * @brief The address of the vulkan widget's instance (VkInstance) + */ + MwVULKANFIELD_INSTANCE, + /*! + * @brief The address of the vulkan widget's surface (VkSurfaceKHR) + */ + MwVULKANFIELD_SURFACE, + /*! + * @brief The address of the vulkan widget's physical device (VkPhysicalDevice) + */ + MwVULKANFIELD_PHYSICALDEVICE, + /*! + * @brief The address of the vulkan widget's logical device (VkDevice) + */ + MwVULKANFIELD_LOGICALDEVICE, + /*! + * @brief The address of the index that the vulkan widget uses for the graphics queue (uint32_t *) + */ + MwVULKANFIELD_GRAPHICSQUEUEINDEX, + /*! + * @brief The address of the index that the vulkan widget uses for the present queue (uint32_t *) + */ + MwVULKANFIELD_PRESENTQUEUEINDEX, + MwVULKANFIELD_GRAPHICSQUEUE, + /*! + * @brief The address of the vulkan widget's graphics queue (VkQueue) + */ + MwVULKANFIELD_PRESENTQUEUE, +}; + +/*! + * @brief Function for getting a field from within Vulkan. + * @note Consult the documentation for MwVULKANFIELD to know what type is expected for output. + */ +MwInline void* MwVulkanGetField(MwWidget handle, int field, int* err) { + void* field_out; + MwVaWidgetExecute(handle, "mwVulkanGetField", &field_out, field, err); + return field_out; +} + +/*! + * @brief Return whether Vulkan is installed on the target platform. + */ +MWDECL int MWAPI MwVulkanSupported(void); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/include/Mw/Widget/Window.h b/widget/milsko/milskosrc/include/Mw/Widget/Window.h new file mode 100644 index 0000000000..6a98b68a7d --- /dev/null +++ b/widget/milsko/milskosrc/include/Mw/Widget/Window.h @@ -0,0 +1,45 @@ +/*! + * @file Mw/Widget/Window.h + * @brief Window widget + */ +#ifndef __MW_WIDGET_WINDOW_H__ +#define __MW_WIDGET_WINDOW_H__ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! + * @brief Window widget class + */ +MWDECL MwClass MwWindowClass; + +/*! + * @brief Makes window borderless + * @param handle Widget + * @param toggle Toggle + */ +MwInline void MwWindowMakeBorderless(MwWidget handle, int toggle) { + MwVaWidgetExecute(handle, "mwWindowMakeBorderless", NULL, toggle); +} + +/*! + * @brief Whether the window should close + * @param handle Widget + * @return bool + */ +MwInline MwBool MwWindowShouldClose(MwWidget handle) { + MwBool res = MwFALSE; + MwVaWidgetExecute(handle, "mwWindowShouldClose", NULL, &res); + return res; +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/widget/milsko/milskosrc/milsko.xml b/widget/milsko/milskosrc/milsko.xml new file mode 100644 index 0000000000..a94c847ca9 --- /dev/null +++ b/widget/milsko/milskosrc/milsko.xml @@ -0,0 +1,1002 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + + + + 0 + + + + + 0x1 + + + + + + + + + 0 + + + + 0 + + + + 1 + + + + + + + 0x80000001 + + + + + + + + + + + + + 0 + + + + + + + + + + + + + 0x0fffffff + + 0xf + 0xf0 + 0x10 + 0x20 + 0x40 + 0x80 + + 0x80000000 + 0xc0000000 + 0xa0000000 + + +
+ + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/widget/milsko/milskosrc/pl/ostype/ClassicMacOS.pl b/widget/milsko/milskosrc/pl/ostype/ClassicMacOS.pl new file mode 100644 index 0000000000..1f2e532d61 --- /dev/null +++ b/widget/milsko/milskosrc/pl/ostype/ClassicMacOS.pl @@ -0,0 +1,12 @@ +use_backend("classicmacos"); + +print( +"Compiling for Classic Mac OS via ./configure currently outputs a broken executable and it only supports PowerPC. Help is wanted. In the mean time, use CMake." +); + +$cc = $ENV{RETRO68_TOOLCHAIN_PATH} . "/bin/powerpc-apple-macos-gcc"; +$ar = $ENV{RETRO68_TOOLCHAIN_PATH} . "/bin/powerpc-apple-macos-ar"; +add_cflags("-DCLASSIC_MAC_OS"); +add_cflags("-DSTBI_NO_THREAD_LOCALS"); + +1; diff --git a/widget/milsko/milskosrc/pl/ostype/Darwin.pl b/widget/milsko/milskosrc/pl/ostype/Darwin.pl new file mode 100644 index 0000000000..5d5baabdb0 --- /dev/null +++ b/widget/milsko/milskosrc/pl/ostype/Darwin.pl @@ -0,0 +1,10 @@ +$library_suffix = ".dylib"; +set_shared_flag("-dynamiclib"); + +#use_backend("cocoa"); +new_object("src/backend/nococoa.m"); + +add_cflags("-DSTBI_NO_THREAD_LOCALS"); +add_ldflags("-framework Cocoa -lobjc"); + +1; diff --git a/widget/milsko/milskosrc/pl/ostype/FreeBSD.pl b/widget/milsko/milskosrc/pl/ostype/FreeBSD.pl new file mode 100644 index 0000000000..4d4b17a83d --- /dev/null +++ b/widget/milsko/milskosrc/pl/ostype/FreeBSD.pl @@ -0,0 +1,19 @@ +my @enabled_backends = (); + +add_incdir2("-I/usr/local/include"); +add_libdir("-L/usr/local/lib -Wl,-R/usr/local/lib"); + +if (param_get("wayland") && not(param_get("tiny"))) { + push(@enabled_backends, "wayland"); +} +if (param_get("x11")) { + push(@enabled_backends, "x11"); +} + +use_backend(@enabled_backends); + +add_libs("-lpthread"); + +add_cflags("-DUSE_DBUS"); + +1; diff --git a/widget/milsko/milskosrc/pl/ostype/Haiku.pl b/widget/milsko/milskosrc/pl/ostype/Haiku.pl new file mode 100644 index 0000000000..68322b91b9 --- /dev/null +++ b/widget/milsko/milskosrc/pl/ostype/Haiku.pl @@ -0,0 +1,3 @@ +use_backend("haiku"); + +1; diff --git a/widget/milsko/milskosrc/pl/ostype/Linux.pl b/widget/milsko/milskosrc/pl/ostype/Linux.pl new file mode 100644 index 0000000000..75159d562b --- /dev/null +++ b/widget/milsko/milskosrc/pl/ostype/Linux.pl @@ -0,0 +1,14 @@ +my @enabled_backends = (); + +if (param_get("wayland") && not(param_get("tiny"))) { + push(@enabled_backends, "wayland"); +} +if (param_get("x11")) { + push(@enabled_backends, "x11"); +} + +add_cflags("-DUSE_DBUS"); + +use_backend(@enabled_backends); + +1; diff --git a/widget/milsko/milskosrc/pl/ostype/NetBSD.pl b/widget/milsko/milskosrc/pl/ostype/NetBSD.pl new file mode 100644 index 0000000000..6556cab20e --- /dev/null +++ b/widget/milsko/milskosrc/pl/ostype/NetBSD.pl @@ -0,0 +1,9 @@ +add_incdir2("-I/usr/X11R7/include -I/usr/pkg/include"); +add_libdir( + "-L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib"); +use_backend("x11"); +add_libs("-lpthread"); + +add_cflags("-DUSE_DBUS"); + +1; diff --git a/widget/milsko/milskosrc/pl/ostype/OpenBSD.pl b/widget/milsko/milskosrc/pl/ostype/OpenBSD.pl new file mode 100644 index 0000000000..dbbc3be229 --- /dev/null +++ b/widget/milsko/milskosrc/pl/ostype/OpenBSD.pl @@ -0,0 +1,8 @@ +add_incdir2("-I/usr/local/include"); +add_libdir("-L/usr/local/lib -Wl,-R/usr/local/lib"); +use_backend("x11"); +add_libs("-lpthread"); + +add_cflags("-DUSE_DBUS"); + +1; diff --git a/widget/milsko/milskosrc/pl/ostype/SunOS.pl b/widget/milsko/milskosrc/pl/ostype/SunOS.pl new file mode 100644 index 0000000000..f695e4f7fb --- /dev/null +++ b/widget/milsko/milskosrc/pl/ostype/SunOS.pl @@ -0,0 +1,3 @@ +use_backend("x11"); + +1; diff --git a/widget/milsko/milskosrc/pl/ostype/UnixWare.pl b/widget/milsko/milskosrc/pl/ostype/UnixWare.pl new file mode 100644 index 0000000000..a40592bbca --- /dev/null +++ b/widget/milsko/milskosrc/pl/ostype/UnixWare.pl @@ -0,0 +1,4 @@ +add_libs("-lsocket -lnsl"); +use_backend("x11"); + +1; diff --git a/widget/milsko/milskosrc/pl/ostype/Windows.pl b/widget/milsko/milskosrc/pl/ostype/Windows.pl new file mode 100644 index 0000000000..f79469fc47 --- /dev/null +++ b/widget/milsko/milskosrc/pl/ostype/Windows.pl @@ -0,0 +1,9 @@ +$library_prefix = ""; +$library_suffix = ".dll"; +$executable_suffix = ".exe"; +$math = ""; +add_ldflags("-Wl,--out-implib,src/libMw.dll.a -static-libgcc"); +use_backend("gdi"); +add_libs("-lwinmm"); + +1; diff --git a/widget/milsko/milskosrc/pl/rules.pl b/widget/milsko/milskosrc/pl/rules.pl new file mode 100644 index 0000000000..89f13e93a1 --- /dev/null +++ b/widget/milsko/milskosrc/pl/rules.pl @@ -0,0 +1,227 @@ +new_object("src/*.c"); + +my $gl_libs = ""; +if (param_get("tiny")) { + add_cflags("-Oz"); + if (defined($ENV{CC}) && grep(/^clang$/, $ENV{CC})) { + add_libs("-flto=full"); + add_cflags("-flto=full"); + } + add_cflags("-fdata-sections -ffunction-sections"); + add_libs("-Wl,--gc-sections"); + + # these don't actually disable either, they're here for the final output. + param_set("wayland", 0); + param_set("dbus", 0); +} +if (param_get("classic-theme")) { + add_cflags("-DUSE_CLASSIC_THEME"); +} +if (grep(/^x11$/, @backends)) { + add_cflags("-DUSE_X11"); + new_object("src/backend/x11.c"); + + $gl_libs = "-lGL -lGLU"; + + if (param_get("xrender")) { + add_cflags("-DUSE_XRENDER"); + } +} + +if (grep(/^gdi$/, @backends)) { + add_cflags("-DUSE_GDI"); + new_object("src/backend/gdi.c"); + add_libs("-lgdi32"); + + $gl_libs = "-lopengl32 -lglu32"; +} + +if (grep(/^classicmacos$/, @backends)) { + + #add_cflags("-DCLASSIC_MAC_OS"); + new_object("src/backend/classicmacos.c"); + + $gl_libs = ""; +} + +if (grep(/^wayland$/, @backends)) { + add_cflags("-DUSE_WAYLAND"); + new_object("src/backend/cairo.c"); + new_object("src/backend/wayland/wayland.c"); + new_object("src/backend/wayland/buffer.c"); + new_object("src/backend/wayland/interfaces.c"); + new_object("src/backend/wayland/region.c"); + + if (param_get("opengl")) { + add_cflags("-DWAYLAND_LOAD_OPENGL"); + } + + scan_wayland_protocol_core(); + scan_wayland_protocol("stable", "xdg-shell", ""); + scan_wayland_protocol("stable", "viewporter", ""); + scan_wayland_protocol("stable", "tablet", "-v2"); + scan_wayland_protocol("staging", "xdg-toplevel-icon", "-v1"); + scan_wayland_protocol("staging", "cursor-shape", "-v1"); + scan_wayland_protocol("unstable", "xdg-decoration", "-unstable-v1"); + scan_wayland_protocol("unstable", "primary-selection", "-unstable-v1"); + scan_wayland_protocol("unstable", "pointer-constraints", "-unstable-v1"); + scan_wayland_protocol("unstable", "relative-pointer", "-unstable-v1"); + scan_wayland_protocol_from_file("wlr-layer-shell", + "wlr-layer-shell-unstable-v1.xml"); + + $gl_libs = "-lGL -lGLU"; +} + +if (not(param_get("dbus")) && not(param_get("tiny"))) { + $cflags =~ s/( |^)-DUSE_DBUS( |$)/ /; +} + +if (grep(/( |^)-DUSE_DBUS( |$)/, $cflags)) { + add_cflags(`pkg-config --cflags dbus-1`); +} + +if (grep(/^cocoa$/, @backends) || param_get("gnustep")) { + add_cflags("-DUSE_COCOA"); + new_object("src/backend/cocoa.m"); + + if (param_get("gnustep")) { + add_incdir("-I" . `gnustep-config --variable=GNUSTEP_SYSTEM_HEADERS`); + add_libdir("-L" . `gnustep-config --variable=GNUSTEP_SYSTEM_LIBRARIES`); + add_cflags("-fobjc-runtime=gnustep-2.0 -fblocks"); + add_ldflags("-lobjc -lgnustep-base -lm -lgnustep-gui"); + } + + if (param_get("opengl")) { + new_object("src/widget/opengl_cocoa.m"); + } + +# John Apple my man literally everybody and their mother who knows what opengl is knows its deprecated on macos and i'm not having you spam the console with this + add_cflags("-DGL_SILENCE_DEPRECATION"); + + $gl_libs = "-framework OpenGL"; +} + +if (grep(/^haiku$/, @backends)) { + add_cflags("-DUSE_HAIKU"); + new_object("src/backend/haiku.cc"); + add_libs("-lbe"); +} + +if (param_get("stb-image")) { + add_cflags("-DUSE_STB_IMAGE"); + if (param_get("tiny")) { + add_cflags("-DSTB_IMAGE_STATIC"); + add_cflags("-DSTB_IMAGE_IMPLEMENTATION"); + } +} +else { + new_object("external/libjpeg/src/*.c"); + new_object("external/libpng/src/*.c"); + add_incdir("-Iexternal/libjpeg/include -Iexternal/libpng/include"); +} +if (param_get("stb-truetype")) { + add_cflags("-DUSE_STB_TRUETYPE"); +} +if (param_get("allow-sloppy-focus")) { + add_cflags("-DALLOW_SLOPPY_FOCUS"); +} + +add_incdir("-Iexternal/libz/include"); + +if (param_get("freetype2")) { + add_cflags("-DUSE_FREETYPE2"); + if (!$cross) { + add_cflags(`pkg-config --cflags freetype2`); + } +} + +if (param_get("gdi-text")) { + add_cflags("-DUSE_GDI_TEXT"); +} + +if (param_get("vulkan") && param_get("vulkan-string-helper")) { + add_cflags("-DHAS_VK_ENUM_STRING_HELPER"); +} + +new_object("src/icon/*.c"); +new_object("src/cursor/*.c"); +new_object("src/text/*.c"); +new_object("src/text/font/*.c"); + +new_object("src/widget/box.c"); +new_object("src/widget/button.c"); +new_object("src/widget/calendar.c"); +new_object("src/widget/checkbox.c"); +new_object("src/widget/combobox.c"); +new_object("src/widget/entry.c"); +new_object("src/widget/frame.c"); +new_object("src/widget/image.c"); +new_object("src/widget/label.c"); +new_object("src/widget/listbox.c"); +new_object("src/widget/menu.c"); +new_object("src/widget/numberentry.c"); +new_object("src/widget/progressbar.c"); +new_object("src/widget/radiobox.c"); +new_object("src/widget/scrollbar.c"); +new_object("src/widget/separator.c"); +new_object("src/widget/submenu.c"); +new_object("src/widget/subwindow.c"); +new_object("src/widget/tab.c"); +new_object("src/widget/table.c"); +new_object("src/widget/treeview.c"); +new_object("src/widget/viewport.c"); +new_object("src/widget/window.c"); + +new_object("src/widget/opengl.c"); +new_object("src/widget/vulkan.c"); + +if (param_get("opengl")) { + add_cflags("-DMW_OPENGL"); +} +if (param_get("vulkan")) { + add_cflags("-DMW_VULKAN"); +} + +new_object("src/dialog/*.c"); + +new_object("src/abstract/*.c"); + +new_object("external/*.c"); +new_object("external/libz/src/*.c"); + +new_example("examples/basic/example"); +new_example("examples/basic/rotate"); +new_example("examples/basic/image"); +new_example("examples/basic/scrollbar"); +new_example("examples/basic/checkbox"); +new_example("examples/basic/radiobox"); +new_example("examples/basic/messagebox"); +new_example("examples/basic/viewport"); +new_example("examples/basic/listbox"); +new_example("examples/basic/progressbar"); +new_example("examples/basic/colorpicker"); +new_example("examples/basic/combobox"); +new_example("examples/basic/treeview"); +new_example("examples/basic/box"); +new_example("examples/basic/clipboard"); +new_example("examples/basic/sevensegment"); +new_example("examples/basic/calculator"); +new_example("examples/basic/filechooser"); +new_example("examples/basic/periodic"); +new_example("examples/basic/subwindow"); +new_example("examples/basic/tab"); + +if (param_get("opengl")) { + new_example("examples/gldemos/boing", $gl_libs); + new_example("examples/gldemos/clock", $gl_libs); + new_example("examples/gldemos/cube", $gl_libs); + new_example("examples/gldemos/gears", $gl_libs); + new_example("examples/gldemos/triangle", $gl_libs); + new_example("examples/gldemos/tripaint", $gl_libs); +} + +if (param_get("vulkan")) { + new_example("examples/vkdemos/vulkan"); +} + +1; diff --git a/widget/milsko/milskosrc/pl/utils.pl b/widget/milsko/milskosrc/pl/utils.pl new file mode 100644 index 0000000000..504e8dcbf5 --- /dev/null +++ b/widget/milsko/milskosrc/pl/utils.pl @@ -0,0 +1,176 @@ +sub add_incdir { + my $input = $_[0]; + $input =~ s/\r?\n/ /g; + + $incdir = "${incdir} ${input}"; +} + +sub add_incdir2 { + my $input = $_[0]; + $input =~ s/\r?\n/ /g; + + $incdir2 = "${incdir2} ${input}"; +} + +sub add_cflags { + my $input = $_[0]; + $input =~ s/\r?\n/ /g; + + $cflags = "${cflags} ${input}"; +} + +sub add_libdir { + my $input = $_[0]; + $input =~ s/\r?\n/ /g; + + $libdir = "${libdir} ${input}"; +} + +sub add_ldflags { + my $input = $_[0]; + $input =~ s/\r?\n/ /g; + + $ldflags = "${ldflags} ${input}"; +} + +sub add_libs { + my $input = $_[0]; + $input =~ s/\r?\n/ /g; + + $libs = "${libs} ${input}"; +} + +sub new_example { + if (@_ == 2) { + $examples_libs{"$_[0]${executable_suffix}"} = $_[1]; + } + push(@examples_targets, "${_[0]}${executable_suffix}"); +} + +sub set_shared_flag { + @shared = $_[0]; +} + +sub new_object { + my @l = glob($_[0]); + foreach my $e (@l) { + $e =~ s/\.(cc|c|m)$/$object_suffix/; + push(@library_targets, $e); + } +} + +sub use_backend { + foreach my $l (@_) { + push(@backends, $l); + } +} + +sub scan_wayland_protocol_core { + my $proto_c = "src/backend/wayland/wayland-core-protocol.c"; + + if ( + system( +"wayland-scanner private-code /usr/share/wayland/wayland.xml ${proto_c}" + ) != 0 + ) + { + print( +"^ Error on getting private code for /usr/share/wayland/wayland.xml\n" + ); + } + else { + new_object($proto_c); + } + if ( + system( +"wayland-scanner client-header /usr/share/wayland/wayland.xml include/Mw/LowLevel/Wayland/wayland-core-protocol.h" + ) + ) + { + print( +"^ Error on getting client header for /usr/share/wayland/wayland.xml\n" + ); + } +} + +sub scan_wayland_protocol { + my $tier = $_[0]; + my $proto = $_[1]; + my $ver = $_[2]; + + my $proto_c = "src/backend/wayland/wayland-${proto}-protocol.c"; + + if ( + system( +"wayland-scanner private-code /usr/share/wayland-protocols/${tier}/${proto}/${proto}${ver}.xml ${proto_c}" + ) != 0 + ) + { + print( +"^ Error on getting private code for /usr/share/wayland-protocols/${tier}/${proto}/${proto}${ver}.xml\n" + ); + } + else { + new_object($proto_c); + } + if ( + system( +"wayland-scanner client-header /usr/share/wayland-protocols/${tier}/${proto}/${proto}${ver}.xml include/Mw/LowLevel/Wayland/${proto}-client-protocol.h" + ) + ) + { + print( +"^ Error on getting client header for /usr/share/wayland-protocols/${tier}/${proto}/${proto}${ver}.xml\n" + ); + } +} + +sub scan_wayland_protocol_from_file { + my $proto = $_[0]; + my $file = $_[1]; + my $proto_c = "src/backend/wayland/wayland-${proto}-protocol.c"; + + if ( + system( + "wayland-scanner private-code ./resource/wayland/${file} ${proto_c}" + ) != 0 + ) + { + print( + "^ Error on getting private code for ./resource/wayland/${file}\n"); + } + else { + new_object($proto_c); + } + if ( + system( +"wayland-scanner client-header ./resource/wayland/${file} include/Mw/LowLevel/Wayland/${proto}-client-protocol.h" + ) + ) + { + print( + "^ Error on getting client header for ./resource/wayland/${file}\n" + ); + } +} + +our %params = (); + +sub param_set { + $params{ $_[0] } = $_[1]; +} + +sub param_get { + if (not(defined($params{ $_[0] }))) { + return 0; + } + else { + return $params{ $_[0] }; + } +} + +sub param_list { + return sort(keys(%params)); +} + +1; diff --git a/widget/milsko/milskosrc/resource/doxygen-theme/README b/widget/milsko/milskosrc/resource/doxygen-theme/README new file mode 100644 index 0000000000..fdf47695f1 --- /dev/null +++ b/widget/milsko/milskosrc/resource/doxygen-theme/README @@ -0,0 +1 @@ +https://github.com/jothepro/doxygen-awesome-css diff --git a/widget/milsko/milskosrc/resource/doxygen-theme/doxygen-awesome.css b/widget/milsko/milskosrc/resource/doxygen-theme/doxygen-awesome.css new file mode 100644 index 0000000000..f992c23295 --- /dev/null +++ b/widget/milsko/milskosrc/resource/doxygen-theme/doxygen-awesome.css @@ -0,0 +1,3020 @@ +/* SPDX-License-Identifier: MIT */ +/** + +Doxygen Awesome +https://github.com/jothepro/doxygen-awesome-css + +Copyright (c) 2021 - 2025 jothepro + +*/ + +html { + /* primary theme color. This will affect the entire websites color scheme: links, arrows, labels, ... */ + --primary-color: #1779c4; + --primary-dark-color: #335c80; + --primary-light-color: #70b1e9; + --on-primary-color: #ffffff; + + --link-color: var(--primary-color); + + /* page base colors */ + --page-background-color: #ffffff; + --page-foreground-color: #2f4153; + --page-secondary-foreground-color: #6f7e8e; + + /* color for all separators on the website: hr, borders, ... */ + --separator-color: #dedede; + + /* border radius for all rounded components. Will affect many components, like dropdowns, memitems, codeblocks, ... */ + --border-radius-large: 10px; + --border-radius-small: 5px; + --border-radius-medium: 8px; + + /* default spacings. Most components reference these values for spacing, to provide uniform spacing on the page. */ + --spacing-small: 5px; + --spacing-medium: 10px; + --spacing-large: 16px; + --spacing-xlarge: 20px; + + /* default box shadow used for raising an element above the normal content. Used in dropdowns, search result, ... */ + --box-shadow: 0 2px 8px 0 rgba(0,0,0,.075); + + --odd-color: rgba(0,0,0,.028); + + /* font-families. will affect all text on the website + * font-family: the normal font for text, headlines, menus + * font-family-monospace: used for preformatted text in memtitle, code, fragments + */ + --font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif; + --font-family-monospace: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; + + /* font sizes */ + --page-font-size: 15.6px; + --navigation-font-size: 14.4px; + --toc-font-size: 13.4px; + --code-font-size: 14px; /* affects code, fragment */ + --title-font-size: 22px; + + /* content text properties. These only affect the page content, not the navigation or any other ui elements */ + --content-line-height: 27px; + /* The content is centered and constraint in it's width. To make the content fill the whole page, set the variable to auto.*/ + --content-maxwidth: 1050px; + --table-line-height: 24px; + --toc-sticky-top: var(--spacing-medium); + --toc-width: 200px; + --toc-max-height: calc(100vh - 2 * var(--spacing-medium) - 85px); + + /* colors for various content boxes: @warning, @note, @deprecated @bug */ + --warning-color: #faf3d8; + --warning-color-dark: #f3a600; + --warning-color-darker: #5f4204; + --note-color: #e4f3ff; + --note-color-dark: #1879C4; + --note-color-darker: #274a5c; + --todo-color: #e4dafd; + --todo-color-dark: #5b2bdd; + --todo-color-darker: #2a0d72; + --deprecated-color: #ecf0f3; + --deprecated-color-dark: #5b6269; + --deprecated-color-darker: #43454a; + --bug-color: #f8d1cc; + --bug-color-dark: #b61825; + --bug-color-darker: #75070f; + --invariant-color: #d8f1e3; + --invariant-color-dark: #44b86f; + --invariant-color-darker: #265532; + + /* blockquote colors */ + --blockquote-background: #f8f9fa; + --blockquote-foreground: #636568; + + /* table colors */ + --tablehead-background: #f1f1f1; + --tablehead-foreground: var(--page-foreground-color); + + /* menu-display: block | none + * Visibility of the top navigation on screens >= 768px. On smaller screen the menu is always visible. + * `GENERATE_TREEVIEW` MUST be enabled! + */ + --menu-display: block; + + --menu-focus-foreground: var(--on-primary-color); + --menu-focus-background: var(--primary-color); + --menu-selected-background: rgba(0,0,0,.05); + + + --header-background: var(--page-background-color); + --header-foreground: var(--page-foreground-color); + + /* searchbar colors */ + --searchbar-background: var(--side-nav-background); + --searchbar-foreground: var(--page-foreground-color); + + /* searchbar size + * (`searchbar-width` is only applied on screens >= 768px. + * on smaller screens the searchbar will always fill the entire screen width) */ + --searchbar-height: 33px; + --searchbar-width: 210px; + --searchbar-border-radius: var(--searchbar-height); + + /* code block colors */ + --code-background: #f5f5f5; + --code-foreground: var(--page-foreground-color); + + /* fragment colors */ + --fragment-background: #F8F9FA; + --fragment-foreground: #37474F; + --fragment-keyword: #bb6bb2; + --fragment-keywordtype: #8258b3; + --fragment-keywordflow: #d67c3b; + --fragment-token: #438a59; + --fragment-comment: #969696; + --fragment-link: #5383d6; + --fragment-preprocessor: #46aaa5; + --fragment-linenumber-color: #797979; + --fragment-linenumber-background: #f4f4f5; + --fragment-linenumber-border: #e3e5e7; + --fragment-lineheight: 20px; + + /* sidebar navigation (treeview) colors */ + --side-nav-background: #fbfbfb; + --side-nav-foreground: var(--page-foreground-color); + --side-nav-arrow-opacity: 0; + --side-nav-arrow-hover-opacity: 0.9; + + --toc-background: var(--side-nav-background); + --toc-foreground: var(--side-nav-foreground); + + /* height of an item in any tree / collapsible table */ + --tree-item-height: 30px; + + --memname-font-size: var(--code-font-size); + --memtitle-font-size: 18px; + + --webkit-scrollbar-size: 7px; + --webkit-scrollbar-padding: 4px; + --webkit-scrollbar-color: var(--separator-color); + + --animation-duration: .12s +} + +@media screen and (max-width: 767px) { + html { + --page-font-size: 16px; + --navigation-font-size: 16px; + --toc-font-size: 15px; + --code-font-size: 15px; /* affects code, fragment */ + --title-font-size: 22px; + } +} + +@media (prefers-color-scheme: dark) { + html:not(.light-mode) { + color-scheme: dark; + + --primary-color: #1982d2; + --primary-dark-color: #86a9c4; + --primary-light-color: #4779ac; + + --box-shadow: 0 2px 8px 0 rgba(0,0,0,.35); + + --odd-color: rgba(100,100,100,.06); + + --menu-selected-background: rgba(0,0,0,.4); + + --page-background-color: #1C1D1F; + --page-foreground-color: #d2dbde; + --page-secondary-foreground-color: #859399; + --separator-color: #38393b; + --side-nav-background: #252628; + + --code-background: #2a2c2f; + + --tablehead-background: #2a2c2f; + + --blockquote-background: #222325; + --blockquote-foreground: #7e8c92; + + --warning-color: #3b2e04; + --warning-color-dark: #f1b602; + --warning-color-darker: #ceb670; + --note-color: #163750; + --note-color-dark: #1982D2; + --note-color-darker: #dcf0fa; + --todo-color: #2a2536; + --todo-color-dark: #7661b3; + --todo-color-darker: #ae9ed6; + --deprecated-color: #2e323b; + --deprecated-color-dark: #738396; + --deprecated-color-darker: #abb0bd; + --bug-color: #2e1917; + --bug-color-dark: #ad2617; + --bug-color-darker: #f5b1aa; + --invariant-color: #303a35; + --invariant-color-dark: #76ce96; + --invariant-color-darker: #cceed5; + + --fragment-background: #282c34; + --fragment-foreground: #dbe4eb; + --fragment-keyword: #cc99cd; + --fragment-keywordtype: #ab99cd; + --fragment-keywordflow: #e08000; + --fragment-token: #7ec699; + --fragment-comment: #999999; + --fragment-link: #98c0e3; + --fragment-preprocessor: #65cabe; + --fragment-linenumber-color: #cccccc; + --fragment-linenumber-background: #35393c; + --fragment-linenumber-border: #1f1f1f; + } +} + +/* dark mode variables are defined twice, to support both the dark-mode without and with doxygen-awesome-darkmode-toggle.js */ +html.dark-mode { + color-scheme: dark; + + --primary-color: #1982d2; + --primary-dark-color: #86a9c4; + --primary-light-color: #4779ac; + + --box-shadow: 0 2px 8px 0 rgba(0,0,0,.30); + + --odd-color: rgba(100,100,100,.06); + + --menu-selected-background: rgba(0,0,0,.4); + + --page-background-color: #1C1D1F; + --page-foreground-color: #d2dbde; + --page-secondary-foreground-color: #859399; + --separator-color: #38393b; + --side-nav-background: #252628; + + --code-background: #2a2c2f; + + --tablehead-background: #2a2c2f; + + --blockquote-background: #222325; + --blockquote-foreground: #7e8c92; + + --warning-color: #3b2e04; + --warning-color-dark: #f1b602; + --warning-color-darker: #ceb670; + --note-color: #163750; + --note-color-dark: #1982D2; + --note-color-darker: #dcf0fa; + --todo-color: #2a2536; + --todo-color-dark: #7661b3; + --todo-color-darker: #ae9ed6; + --deprecated-color: #2e323b; + --deprecated-color-dark: #738396; + --deprecated-color-darker: #abb0bd; + --bug-color: #2e1917; + --bug-color-dark: #ad2617; + --bug-color-darker: #f5b1aa; + --invariant-color: #303a35; + --invariant-color-dark: #76ce96; + --invariant-color-darker: #cceed5; + + --fragment-background: #282c34; + --fragment-foreground: #dbe4eb; + --fragment-keyword: #cc99cd; + --fragment-keywordtype: #ab99cd; + --fragment-keywordflow: #e08000; + --fragment-token: #7ec699; + --fragment-comment: #999999; + --fragment-link: #98c0e3; + --fragment-preprocessor: #65cabe; + --fragment-linenumber-color: #cccccc; + --fragment-linenumber-background: #35393c; + --fragment-linenumber-border: #1f1f1f; +} + +body { + color: var(--page-foreground-color); + background-color: var(--page-background-color); + font-size: var(--page-font-size); +} + +body, table, div, p, dl, #nav-tree .label, #nav-tree a, .title, +.sm-dox a, .sm-dox a:hover, .sm-dox a:focus, #projectname, +.SelectItem, #MSearchField, .navpath li.navelem a, +.navpath li.navelem a:hover, p.reference, p.definition, div.toc li, div.toc h3, +#page-nav ul.page-outline li a { + font-family: var(--font-family); +} + +h1, h2, h3, h4, h5 { + margin-top: 1em; + font-weight: 600; + line-height: initial; +} + +p, div, table, dl, p.reference, p.definition { + font-size: var(--page-font-size); +} + +p.reference, p.definition { + color: var(--page-secondary-foreground-color); +} + +a:link, a:visited, a:hover, a:focus, a:active { + color: var(--link-color) !important; + font-weight: 500; + background: none; +} + +a:hover { + text-decoration: underline; +} + +a.anchor { + scroll-margin-top: var(--spacing-large); + display: block; +} + +/* + Title and top navigation + */ + +#top { + background: var(--header-background); + border-bottom: 1px solid var(--separator-color); + position: relative; + z-index: 99; +} + +@media screen and (min-width: 768px) { + #top { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + align-items: center; + } +} + +#main-nav { + flex-grow: 5; + padding: var(--spacing-small) var(--spacing-medium); + border-bottom: 0; +} + +#titlearea { + width: auto; + padding: var(--spacing-medium) var(--spacing-large); + background: none; + color: var(--header-foreground); + border-bottom: none; +} + +@media screen and (max-width: 767px) { + #titlearea { + padding-bottom: var(--spacing-small); + } +} + +#titlearea table tbody tr { + height: auto !important; +} + +#projectname { + font-size: var(--title-font-size); + font-weight: 600; +} + +#projectnumber { + font-family: inherit; + font-size: 60%; +} + +#projectbrief { + font-family: inherit; + font-size: 80%; +} + +#projectlogo { + vertical-align: middle; +} + +#projectlogo img { + max-height: calc(var(--title-font-size) * 2); + margin-right: var(--spacing-small); +} + +.sm-dox, .tabs, .tabs2, .tabs3 { + background: none; + padding: 0; +} + +.tabs, .tabs2, .tabs3 { + border-bottom: 1px solid var(--separator-color); + margin-bottom: -1px; +} + +.main-menu-btn-icon, .main-menu-btn-icon:before, .main-menu-btn-icon:after { + background: var(--page-secondary-foreground-color); +} + +@media screen and (max-width: 767px) { + .sm-dox a span.sub-arrow { + background: var(--code-background); + } + + #main-menu a.has-submenu span.sub-arrow { + color: var(--page-secondary-foreground-color); + border-radius: var(--border-radius-medium); + } + + #main-menu a.has-submenu:hover span.sub-arrow { + color: var(--page-foreground-color); + } +} + +@media screen and (min-width: 768px) { + .sm-dox li, .tablist li { + display: var(--menu-display); + } + + .sm-dox a span.sub-arrow { + top: 15px; + right: 10px; + box-sizing: content-box; + padding: 0; + margin: 0; + display: inline-block; + width: 5px; + height: 5px; + transform: rotate(45deg); + border-width: 0; + border-right: 2px solid var(--header-foreground); + border-bottom: 2px solid var(--header-foreground); + background: none; + } + + .sm-dox a:hover span.sub-arrow { + border-color: var(--menu-focus-foreground); + background: none; + } + + .sm-dox ul a span.sub-arrow { + transform: rotate(-45deg); + border-width: 0; + border-right: 2px solid var(--header-foreground); + border-bottom: 2px solid var(--header-foreground); + } + + .sm-dox ul a:hover span.sub-arrow { + border-color: var(--menu-focus-foreground); + background: none; + } +} + +.sm-dox ul { + background: var(--page-background-color); + box-shadow: var(--box-shadow); + border: 1px solid var(--separator-color); + border-radius: var(--border-radius-medium) !important; + padding: var(--spacing-small); + animation: ease-out 150ms slideInMenu; +} + +@keyframes slideInMenu { + from { + opacity: 0; + transform: translate(0px, -2px); + } + + to { + opacity: 1; + transform: translate(0px, 0px); + } +} + +.sm-dox ul a { + color: var(--page-foreground-color) !important; + background: none; + font-size: var(--navigation-font-size); +} + +.sm-dox>li>ul:after { + border-bottom-color: var(--page-background-color) !important; +} + +.sm-dox>li>ul:before { + border-bottom-color: var(--separator-color) !important; +} + +.sm-dox ul a:hover, .sm-dox ul a:active, .sm-dox ul a:focus { + font-size: var(--navigation-font-size) !important; + color: var(--menu-focus-foreground) !important; + text-shadow: none; + background-color: var(--menu-focus-background); + border-radius: var(--border-radius-small) !important; +} + +.sm-dox a, .sm-dox a:focus, .tablist li, .tablist li a, .tablist li.current a { + text-shadow: none; + background: transparent; + background-image: none !important; + color: var(--header-foreground) !important; + font-weight: normal; + font-size: var(--navigation-font-size); + border-radius: var(--border-radius-small) !important; +} + +.sm-dox a:focus { + outline: auto; +} + +.sm-dox a:hover, .sm-dox a:active, .tablist li a:hover { + text-shadow: none; + font-weight: normal; + background: var(--menu-focus-background); + color: var(--menu-focus-foreground) !important; + border-radius: var(--border-radius-small) !important; + font-size: var(--navigation-font-size); +} + +.tablist li.current { + border-radius: var(--border-radius-small); + background: var(--menu-selected-background); +} + +.tablist li { + margin: var(--spacing-small) 0 var(--spacing-small) var(--spacing-small); +} + +.tablist a { + padding: 0 var(--spacing-large); +} + + +/* + Search box + */ + +#MSearchBox { + height: var(--searchbar-height); + background: var(--searchbar-background); + border-radius: var(--searchbar-border-radius); + border: 1px solid var(--separator-color); + overflow: hidden; + width: var(--searchbar-width); + position: relative; + box-shadow: none; + display: block; + margin-top: 0; + margin-right: 0; +} + +@media (min-width: 768px) { + .sm-dox li { + padding: 0; + } +} + +/* until Doxygen 1.9.4 */ +.left img#MSearchSelect { + left: 0; + user-select: none; + padding-left: 8px; +} + +/* Doxygen 1.9.5 */ +.left span#MSearchSelect { + left: 0; + user-select: none; + margin-left: 8px; + padding: 0; +} + +.left #MSearchSelect[src$=".png"] { + padding-left: 0 +} + +/* Doxygen 1.14.0 */ +.search-icon::before { + background: none; + top: 5px; +} + +.search-icon::after { + background: none; + top: 12px; +} + +.SelectionMark { + user-select: none; +} + +.tabs .left #MSearchSelect { + padding-left: 0; +} + +.tabs #MSearchBox { + position: absolute; + right: var(--spacing-medium); +} + +@media screen and (max-width: 767px) { + .tabs #MSearchBox { + position: relative; + right: 0; + margin-left: var(--spacing-medium); + margin-top: 0; + } +} + +#MSearchSelectWindow, #MSearchResultsWindow { + z-index: 9999; +} + +#MSearchBox.MSearchBoxActive { + border-color: var(--primary-color); + box-shadow: inset 0 0 0 1px var(--primary-color); +} + +#main-menu > li:last-child { + margin-right: 0; +} + +@media screen and (max-width: 767px) { + #main-menu > li:last-child { + height: 50px; + } +} + +#MSearchField { + font-size: var(--navigation-font-size); + height: calc(var(--searchbar-height) - 2px); + background: transparent; + width: calc(var(--searchbar-width) - 64px); +} + +.MSearchBoxActive #MSearchField { + color: var(--searchbar-foreground); +} + +#MSearchSelect { + top: calc(calc(var(--searchbar-height) / 2) - 11px); +} + +#MSearchBox span.left, #MSearchBox span.right { + background: none; + background-image: none; +} + +#MSearchBox span.right { + padding-top: calc(calc(var(--searchbar-height) / 2) - 12px); + position: absolute; + right: var(--spacing-small); +} + +.tabs #MSearchBox span.right { + top: calc(calc(var(--searchbar-height) / 2) - 12px); +} + +@keyframes slideInSearchResults { + from { + opacity: 0; + transform: translate(0, 15px); + } + + to { + opacity: 1; + transform: translate(0, 20px); + } +} + +#MSearchResultsWindow { + left: auto !important; + right: var(--spacing-medium); + border-radius: var(--border-radius-large); + border: 1px solid var(--separator-color); + transform: translate(0, 20px); + box-shadow: var(--box-shadow); + animation: ease-out 280ms slideInSearchResults; + background: var(--page-background-color); +} + +iframe#MSearchResults { + margin: 4px; +} + +iframe { + color-scheme: normal; +} + +@media (prefers-color-scheme: dark) { + html:not(.light-mode) iframe#MSearchResults { + filter: invert() hue-rotate(180deg); + } +} + +html.dark-mode iframe#MSearchResults { + filter: invert() hue-rotate(180deg); +} + +#MSearchResults .SRPage { + background-color: transparent; +} + +#MSearchResults .SRPage .SREntry { + font-size: 10pt; + padding: var(--spacing-small) var(--spacing-medium); +} + +#MSearchSelectWindow { + border: 1px solid var(--separator-color); + border-radius: var(--border-radius-medium); + box-shadow: var(--box-shadow); + background: var(--page-background-color); + padding-top: var(--spacing-small); + padding-bottom: var(--spacing-small); +} + +#MSearchSelectWindow a.SelectItem { + font-size: var(--navigation-font-size); + line-height: var(--content-line-height); + margin: 0 var(--spacing-small); + border-radius: var(--border-radius-small); + color: var(--page-foreground-color) !important; + font-weight: normal; +} + +#MSearchSelectWindow a.SelectItem:hover { + background: var(--menu-focus-background); + color: var(--menu-focus-foreground) !important; +} + +@media screen and (max-width: 767px) { + #MSearchBox { + margin-top: var(--spacing-medium); + margin-bottom: var(--spacing-medium); + width: calc(100vw - 30px); + } + + #main-menu > li:last-child { + float: none !important; + } + + #MSearchField { + width: calc(100vw - 110px); + } + + @keyframes slideInSearchResultsMobile { + from { + opacity: 0; + transform: translate(0, 15px); + } + + to { + opacity: 1; + transform: translate(0, 20px); + } + } + + #MSearchResultsWindow { + left: var(--spacing-medium) !important; + right: var(--spacing-medium); + overflow: auto; + transform: translate(0, 20px); + animation: ease-out 280ms slideInSearchResultsMobile; + width: auto !important; + } + + /* + * Overwrites for fixing the searchbox on mobile in doxygen 1.9.2 + */ + label.main-menu-btn ~ #searchBoxPos1 { + top: 3px !important; + right: 6px !important; + left: 45px; + display: flex; + } + + label.main-menu-btn ~ #searchBoxPos1 > #MSearchBox { + margin-top: 0; + margin-bottom: 0; + flex-grow: 2; + float: left; + } +} + +/* + Tree view + */ + +#side-nav { + min-width: 8px; + max-width: 50vw; +} + + +#nav-tree, #top { + border-right: 1px solid var(--separator-color); +} + +@media screen and (max-width: 767px) { + #side-nav { + display: none; + } + + #doc-content { + margin-left: 0 !important; + } + + #top { + border-right: none; + } +} + +#nav-tree { + background: var(--side-nav-background); + margin-right: -1px; + padding: 0; +} + +#nav-tree .label { + font-size: var(--navigation-font-size); + line-height: var(--tree-item-height); +} + +#nav-tree span.label a:hover { + background: none; +} + +#nav-tree .item { + height: var(--tree-item-height); + line-height: var(--tree-item-height); + overflow: hidden; + text-overflow: ellipsis; + margin: 0; + padding: 0; +} + +#nav-tree-contents { + margin: 0; +} + +#main-menu > li:last-child { + height: auto; +} + +#nav-tree .item > a:focus { + outline: none; +} + +#nav-sync { + bottom: var(--spacing-medium); + right: var(--spacing-medium) !important; + top: auto !important; + user-select: none; +} + +div.nav-sync-icon { + border: 1px solid var(--separator-color); + border-radius: var(--border-radius-medium); + background: var(--page-background-color); + width: 30px; + height: 20px; +} + +div.nav-sync-icon:hover { + background: var(--page-background-color); +} + +span.sync-icon-left, div.nav-sync-icon:hover span.sync-icon-left { + border-left: 2px solid var(--primary-color); + border-top: 2px solid var(--primary-color); + top: 5px; + left: 6px; +} +span.sync-icon-right, div.nav-sync-icon:hover span.sync-icon-right { + border-right: 2px solid var(--primary-color); + border-bottom: 2px solid var(--primary-color); + top: 5px; + left: initial; + right: 6px; +} + +div.nav-sync-icon.active::after, div.nav-sync-icon.active:hover::after { + border-top: 2px solid var(--primary-color); + top: 9px; + left: 6px; + width: 19px; +} + +#nav-tree .selected { + text-shadow: none; + background-image: none; + background-color: transparent; + position: relative; + color: var(--primary-color) !important; + font-weight: 500; +} + +#nav-tree .selected::after { + content: ""; + position: absolute; + top: 1px; + bottom: 1px; + left: 0; + width: 4px; + border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0; + background: var(--primary-color); +} + + +#nav-tree a { + color: var(--side-nav-foreground) !important; + font-weight: normal; +} + +#nav-tree a:focus { + outline-style: auto; +} + +#nav-tree .arrow { + opacity: var(--side-nav-arrow-opacity); + background: none; +} + +#nav-tree span.arrowhead { + margin: 0 0 1px 2px; +} + +span.arrowhead { + border-color: var(--primary-light-color); +} + +.selected span.arrowhead { + border-color: var(--primary-color); +} + +#nav-tree-contents > ul > li:first-child > div > a { + opacity: 0; + pointer-events: none; +} + +.contents .arrow { + color: inherit; + cursor: pointer; + font-size: 45%; + vertical-align: middle; + margin-right: 2px; + font-family: serif; + height: auto; + padding-bottom: 4px; +} + +#nav-tree div.item:hover .arrow, #nav-tree a:focus .arrow { + opacity: var(--side-nav-arrow-hover-opacity); +} + +#nav-tree .selected a { + color: var(--primary-color) !important; + font-weight: bolder; + font-weight: 600; +} + +.ui-resizable-e { + background: none; +} + +.ui-resizable-e:hover { + background: var(--separator-color); +} + +/* + Contents + */ + +div.header { + border-bottom: 1px solid var(--separator-color); + background: none; + background-image: none; +} + +@media screen and (min-width: 1000px) { + #doc-content > div > div.contents, + .PageDoc > div.contents { + display: flex; + flex-direction: row-reverse; + flex-wrap: nowrap; + align-items: flex-start; + } + + div.contents .textblock { + min-width: 200px; + flex-grow: 1; + } +} + +div.contents, div.header .title, div.header .summary { + max-width: var(--content-maxwidth); +} + +div.contents, div.header .title { + line-height: initial; + margin: calc(var(--spacing-medium) + .2em) auto var(--spacing-medium) auto; +} + +div.header .summary { + margin: var(--spacing-medium) auto 0 auto; +} + +div.headertitle { + padding: 0; +} + +div.header .title { + font-weight: 600; + font-size: 225%; + padding: var(--spacing-medium) var(--spacing-xlarge); + word-break: break-word; +} + +div.header .summary { + width: auto; + display: block; + float: none; + padding: 0 var(--spacing-large); +} + +td.memSeparator { + border-color: var(--separator-color); +} + +span.mlabel { + background: var(--primary-color); + color: var(--on-primary-color); + border: none; + padding: 4px 9px; + border-radius: var(--border-radius-large); + margin-right: var(--spacing-medium); +} + +span.mlabel:last-of-type { + margin-right: 2px; +} + +div.contents { + padding: 0 var(--spacing-xlarge); +} + +div.contents p, div.contents li { + line-height: var(--content-line-height); +} + +div.contents div.dyncontent { + margin: var(--spacing-medium) 0; +} + +@media screen and (max-width: 767px) { + div.contents { + padding: 0 var(--spacing-large); + } + + div.header .title { + padding: var(--spacing-medium) var(--spacing-large); + } +} + +@media (prefers-color-scheme: dark) { + html:not(.light-mode) div.contents div.dyncontent img, + html:not(.light-mode) div.contents center img, + html:not(.light-mode) div.contents > table img, + html:not(.light-mode) div.contents div.dyncontent iframe, + html:not(.light-mode) div.contents center iframe, + html:not(.light-mode) div.contents table iframe, + html:not(.light-mode) div.contents .dotgraph iframe { + filter: brightness(89%) hue-rotate(180deg) invert(); + } +} + +html.dark-mode div.contents div.dyncontent img, +html.dark-mode div.contents center img, +html.dark-mode div.contents > table img, +html.dark-mode div.contents div.dyncontent iframe, +html.dark-mode div.contents center iframe, +html.dark-mode div.contents table iframe, +html.dark-mode div.contents .dotgraph iframe + { + filter: brightness(89%) hue-rotate(180deg) invert(); +} + +td h2.groupheader, h2.groupheader { + border-bottom: 0px; + color: var(--page-foreground-color); + box-shadow: + 100px 0 var(--page-background-color), + -100px 0 var(--page-background-color), + 100px 0.75px var(--separator-color), + -100px 0.75px var(--separator-color), + 500px 0 var(--page-background-color), + -500px 0 var(--page-background-color), + 500px 0.75px var(--separator-color), + -500px 0.75px var(--separator-color), + 900px 0 var(--page-background-color), + -900px 0 var(--page-background-color), + 900px 0.75px var(--separator-color), + -900px 0.75px var(--separator-color), + 1400px 0 var(--page-background-color), + -1400px 0 var(--page-background-color), + 1400px 0.75px var(--separator-color), + -1400px 0.75px var(--separator-color), + 1900px 0 var(--page-background-color), + -1900px 0 var(--page-background-color), + 1900px 0.75px var(--separator-color), + -1900px 0.75px var(--separator-color); +} + +blockquote { + margin: 0 var(--spacing-medium) 0 var(--spacing-medium); + padding: var(--spacing-small) var(--spacing-large); + background: var(--blockquote-background); + color: var(--blockquote-foreground); + border-left: 0; + overflow: visible; + border-radius: var(--border-radius-medium); + overflow: visible; + position: relative; +} + +blockquote::before, blockquote::after { + font-weight: bold; + font-family: serif; + font-size: 360%; + opacity: .15; + position: absolute; +} + +blockquote::before { + content: "“"; + left: -10px; + top: 4px; +} + +blockquote::after { + content: "”"; + right: -8px; + bottom: -25px; +} + +blockquote p { + margin: var(--spacing-small) 0 var(--spacing-medium) 0; +} +.paramname, .paramname em { + font-weight: 600; + color: var(--primary-dark-color); +} + +.paramname > code { + border: 0; +} + +table.params .paramname { + font-weight: 600; + font-family: var(--font-family-monospace); + font-size: var(--code-font-size); + padding-right: var(--spacing-small); + line-height: var(--table-line-height); +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px var(--primary-light-color); +} + +.alphachar a { + color: var(--page-foreground-color); +} + +.dotgraph { + max-width: 100%; + overflow-x: scroll; +} + +.dotgraph .caption { + position: sticky; + left: 0; +} + +/* Wrap Graphviz graphs with the `interactive_dotgraph` class if `INTERACTIVE_SVG = YES` */ +.interactive_dotgraph .dotgraph iframe { + max-width: 100%; +} + +/* + Table of Contents + */ + +div.contents .toc { + max-height: var(--toc-max-height); + min-width: var(--toc-width); + border: 0; + border-left: 1px solid var(--separator-color); + border-radius: 0; + background-color: var(--page-background-color); + box-shadow: none; + position: sticky; + top: var(--toc-sticky-top); + padding: 0 var(--spacing-large); + margin: var(--spacing-small) 0 var(--spacing-large) var(--spacing-large); +} + +div.toc h3 { + color: var(--toc-foreground); + font-size: var(--navigation-font-size); + margin: var(--spacing-large) 0 var(--spacing-medium) 0; +} + +div.toc li { + padding: 0; + background: none; + line-height: var(--toc-font-size); + margin: var(--toc-font-size) 0 0 0; +} + +div.toc li::before { + display: none; +} + +div.toc ul { + margin-top: 0 +} + +div.toc li a { + font-size: var(--toc-font-size); + color: var(--page-foreground-color) !important; + text-decoration: none; +} + +div.toc li a:hover, div.toc li a.active { + color: var(--primary-color) !important; +} + +div.toc li a.aboveActive { + color: var(--page-secondary-foreground-color) !important; +} + + +@media screen and (max-width: 999px) { + div.contents .toc { + max-height: 45vh; + float: none; + width: auto; + margin: 0 0 var(--spacing-medium) 0; + position: relative; + top: 0; + position: relative; + border: 1px solid var(--separator-color); + border-radius: var(--border-radius-medium); + background-color: var(--toc-background); + box-shadow: var(--box-shadow); + } + + div.contents .toc.interactive { + max-height: calc(var(--navigation-font-size) + 2 * var(--spacing-large)); + overflow: hidden; + } + + div.contents .toc > h3 { + -webkit-tap-highlight-color: transparent; + cursor: pointer; + position: sticky; + top: 0; + background-color: var(--toc-background); + margin: 0; + padding: var(--spacing-large) 0; + display: block; + } + + div.contents .toc.interactive > h3::before { + content: ""; + width: 0; + height: 0; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 5px solid var(--primary-color); + display: inline-block; + margin-right: var(--spacing-small); + margin-bottom: calc(var(--navigation-font-size) / 4); + transform: rotate(-90deg); + transition: transform var(--animation-duration) ease-out; + } + + div.contents .toc.interactive.open > h3::before { + transform: rotate(0deg); + } + + div.contents .toc.interactive.open { + max-height: 45vh; + overflow: auto; + transition: max-height 0.2s ease-in-out; + } + + div.contents .toc a, div.contents .toc a.active { + color: var(--primary-color) !important; + } + + div.contents .toc a:hover { + text-decoration: underline; + } +} + +/* + Page Outline (Doxygen >= 1.14.0) +*/ + +#page-nav { + background: var(--page-background-color); + border-left: 1px solid var(--separator-color); +} + +#page-nav #page-nav-resize-handle { + background: var(--separator-color); +} + +#page-nav #page-nav-resize-handle::after { + border-left: 1px solid var(--primary-color); + border-right: 1px solid var(--primary-color); +} + +#page-nav #page-nav-tree #page-nav-contents { + top: var(--spacing-large); +} + +#page-nav ul.page-outline { + margin: 0; + padding: 0; +} + +#page-nav ul.page-outline li a { + font-size: var(--toc-font-size) !important; + color: var(--page-secondary-foreground-color) !important; + display: inline-block; + line-height: calc(2 * var(--toc-font-size)); +} + +#page-nav ul.page-outline li a a.anchorlink { + display: none; +} + +#page-nav ul.page-outline li.vis ~ * a { + color: var(--page-foreground-color) !important; +} + +#page-nav ul.page-outline li.vis:not(.vis ~ .vis) a, #page-nav ul.page-outline li a:hover { + color: var(--primary-color) !important; +} + +#page-nav ul.page-outline .vis { + background: var(--page-background-color); + position: relative; +} + +#page-nav ul.page-outline .vis::after { + content: ""; + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 4px; + background: var(--page-secondary-foreground-color); +} + +#page-nav ul.page-outline .vis:not(.vis ~ .vis)::after { + top: 1px; + border-top-right-radius: var(--border-radius-small); +} + +#page-nav ul.page-outline .vis:not(:has(~ .vis))::after { + bottom: 1px; + border-bottom-right-radius: var(--border-radius-small); +} + + +#page-nav ul.page-outline .arrow { + display: inline-block; +} + +#page-nav ul.page-outline .arrow span { + display: none; +} + +@media screen and (max-width: 767px) { + #container { + grid-template-columns: initial !important; + } + + #page-nav { + display: none; + } +} + +/* + Code & Fragments + */ + +code, div.fragment, pre.fragment, span.tt { + border: 1px solid var(--separator-color); + overflow: hidden; +} + +code, span.tt { + display: inline; + background: var(--code-background); + color: var(--code-foreground); + padding: 2px 6px; + border-radius: var(--border-radius-small); +} + +div.fragment, pre.fragment { + border-radius: var(--border-radius-medium); + margin: var(--spacing-medium) 0; + padding: calc(var(--spacing-large) - (var(--spacing-large) / 6)) var(--spacing-large); + background: var(--fragment-background); + color: var(--fragment-foreground); + overflow-x: auto; +} + +@media screen and (max-width: 767px) { + div.fragment, pre.fragment { + border-top-right-radius: 0; + border-bottom-right-radius: 0; + border-right: 0; + } + + .contents > div.fragment, + .textblock > div.fragment, + .textblock > pre.fragment, + .textblock > .tabbed > ul > li > div.fragment, + .textblock > .tabbed > ul > li > pre.fragment, + .contents > .doxygen-awesome-fragment-wrapper > div.fragment, + .textblock > .doxygen-awesome-fragment-wrapper > div.fragment, + .textblock > .doxygen-awesome-fragment-wrapper > pre.fragment, + .textblock > .tabbed > ul > li > .doxygen-awesome-fragment-wrapper > div.fragment, + .textblock > .tabbed > ul > li > .doxygen-awesome-fragment-wrapper > pre.fragment { + margin: var(--spacing-medium) calc(0px - var(--spacing-large)); + border-radius: 0; + border-left: 0; + } + + .textblock li > .fragment, + .textblock li > .doxygen-awesome-fragment-wrapper > .fragment { + margin: var(--spacing-medium) calc(0px - var(--spacing-large)); + } + + .memdoc li > .fragment, + .memdoc li > .doxygen-awesome-fragment-wrapper > .fragment { + margin: var(--spacing-medium) calc(0px - var(--spacing-medium)); + } + + .textblock ul, .memdoc ul { + overflow: initial; + } + + .memdoc > div.fragment, + .memdoc > pre.fragment, + dl dd > div.fragment, + dl dd pre.fragment, + .memdoc > .doxygen-awesome-fragment-wrapper > div.fragment, + .memdoc > .doxygen-awesome-fragment-wrapper > pre.fragment, + dl dd > .doxygen-awesome-fragment-wrapper > div.fragment, + dl dd .doxygen-awesome-fragment-wrapper > pre.fragment { + margin: var(--spacing-medium) calc(0px - var(--spacing-medium)); + border-radius: 0; + border-left: 0; + } +} + +code, code a, pre.fragment, div.fragment, div.fragment .line, div.fragment span, div.fragment .line a, div.fragment .line span, span.tt { + font-family: var(--font-family-monospace); + font-size: var(--code-font-size) !important; +} + +div.line:after { + margin-right: var(--spacing-medium); +} + +div.fragment .line, pre.fragment { + white-space: pre; + word-wrap: initial; + line-height: var(--fragment-lineheight); +} + +div.fragment span.keyword { + color: var(--fragment-keyword); +} + +div.fragment span.keywordtype { + color: var(--fragment-keywordtype); +} + +div.fragment span.keywordflow { + color: var(--fragment-keywordflow); +} + +div.fragment span.stringliteral { + color: var(--fragment-token) +} + +div.fragment span.comment { + color: var(--fragment-comment); +} + +div.fragment a.code { + color: var(--fragment-link) !important; +} + +div.fragment span.preprocessor { + color: var(--fragment-preprocessor); +} + +div.fragment span.lineno { + display: inline-block; + width: 27px; + border-right: none; + background: var(--fragment-linenumber-background); + color: var(--fragment-linenumber-color); +} + +div.fragment span.lineno a { + background: none; + color: var(--fragment-link) !important; +} + +div.fragment > .line:first-child .lineno { + box-shadow: -999999px 0px 0 999999px var(--fragment-linenumber-background), -999998px 0px 0 999999px var(--fragment-linenumber-border); + background-color: var(--fragment-linenumber-background) !important; +} + +div.line { + border-radius: var(--border-radius-small); +} + +div.line.glow { + background-color: var(--primary-light-color); + box-shadow: none; +} + +/* + dl warning, attention, note, deprecated, bug, ... + */ + +dl { + line-height: calc(1.65 * var(--page-font-size)); +} + +dl.bug dt a, dl.deprecated dt a, dl.todo dt a { + font-weight: bold !important; +} + +dl.warning, dl.attention, dl.note, dl.deprecated, dl.bug, dl.invariant, dl.pre, dl.post, dl.todo, dl.remark { + padding: var(--spacing-medium); + margin: var(--spacing-medium) 0; + color: var(--page-background-color); + overflow: hidden; + margin-left: 0; + border-radius: var(--border-radius-small); +} + +dl.section dd { + margin-bottom: 2px; +} + +dl.warning, dl.attention { + background: var(--warning-color); + border-left: 8px solid var(--warning-color-dark); + color: var(--warning-color-darker); +} + +dl.warning dt, dl.attention dt { + color: var(--warning-color-dark); +} + +dl.note, dl.remark { + background: var(--note-color); + border-left: 8px solid var(--note-color-dark); + color: var(--note-color-darker); +} + +dl.note dt, dl.remark dt { + color: var(--note-color-dark); +} + +dl.todo { + background: var(--todo-color); + border-left: 8px solid var(--todo-color-dark); + color: var(--todo-color-darker); +} + +dl.todo dt a { + color: var(--todo-color-dark) !important; +} + +dl.bug dt a { + color: var(--todo-color-dark) !important; +} + +dl.bug { + background: var(--bug-color); + border-left: 8px solid var(--bug-color-dark); + color: var(--bug-color-darker); +} + +dl.bug dt a { + color: var(--bug-color-dark) !important; +} + +dl.deprecated { + background: var(--deprecated-color); + border-left: 8px solid var(--deprecated-color-dark); + color: var(--deprecated-color-darker); +} + +dl.deprecated dt a { + color: var(--deprecated-color-dark) !important; +} + +dl.section dd, dl.bug dd, dl.deprecated dd, dl.todo dd { + margin-inline-start: 0px; +} + +dl.invariant, dl.pre, dl.post { + background: var(--invariant-color); + border-left: 8px solid var(--invariant-color-dark); + color: var(--invariant-color-darker); +} + +dl.invariant dt, dl.pre dt, dl.post dt { + color: var(--invariant-color-dark); +} + +/* + memitem + */ + +div.memdoc, div.memproto, h2.memtitle { + box-shadow: none; + background-image: none; + border: none; +} + +div.memdoc { + padding: 0 var(--spacing-medium); + background: var(--page-background-color); +} + +h2.memtitle, div.memitem { + border: 1px solid var(--separator-color); + box-shadow: var(--box-shadow); +} + +h2.memtitle { + box-shadow: 0px var(--spacing-medium) 0 -1px var(--fragment-background), var(--box-shadow); +} + +div.memitem { + transition: none; +} + +div.memproto, h2.memtitle { + background: var(--fragment-background); +} + +h2.memtitle { + font-weight: 500; + font-size: var(--memtitle-font-size); + font-family: var(--font-family-monospace); + border-bottom: none; + border-top-left-radius: var(--border-radius-medium); + border-top-right-radius: var(--border-radius-medium); + word-break: break-all; + position: relative; +} + +h2.memtitle:after { + content: ""; + display: block; + background: var(--fragment-background); + height: var(--spacing-medium); + bottom: calc(0px - var(--spacing-medium)); + left: 0; + right: -14px; + position: absolute; + border-top-right-radius: var(--border-radius-medium); +} + +h2.memtitle > span.permalink { + font-size: inherit; +} + +h2.memtitle > span.permalink > a { + text-decoration: none; + padding-left: 3px; + margin-right: -4px; + user-select: none; + display: inline-block; + margin-top: -6px; +} + +h2.memtitle > span.permalink > a:hover { + color: var(--primary-dark-color) !important; +} + +a:target + h2.memtitle, a:target + h2.memtitle + div.memitem { + border-color: var(--primary-light-color); +} + +div.memitem { + border-top-right-radius: var(--border-radius-medium); + border-bottom-right-radius: var(--border-radius-medium); + border-bottom-left-radius: var(--border-radius-medium); + border-top-left-radius: 0; + overflow: hidden; + display: block !important; +} + +div.memdoc { + border-radius: 0; +} + +div.memproto { + border-radius: 0 var(--border-radius-small) 0 0; + overflow: auto; + border-bottom: 1px solid var(--separator-color); + padding: var(--spacing-medium); + margin-bottom: -1px; +} + +div.memtitle { + border-top-right-radius: var(--border-radius-medium); + border-top-left-radius: var(--border-radius-medium); +} + +div.memproto table.memname { + font-family: var(--font-family-monospace); + color: var(--page-foreground-color); + font-size: var(--memname-font-size); + text-shadow: none; +} + +div.memproto div.memtemplate { + font-family: var(--font-family-monospace); + color: var(--primary-dark-color); + font-size: var(--memname-font-size); + margin-left: 2px; + text-shadow: none; +} + +table.mlabels, table.mlabels > tbody { + display: block; +} + +td.mlabels-left { + width: auto; +} + +td.mlabels-right { + margin-top: 3px; + position: sticky; + left: 0; +} + +table.mlabels > tbody > tr:first-child { + display: flex; + justify-content: space-between; + flex-wrap: wrap; +} + +.memname, .memitem span.mlabels { + margin: 0 +} + +/* + reflist + */ + +dl.reflist { + box-shadow: var(--box-shadow); + border-radius: var(--border-radius-medium); + border: 1px solid var(--separator-color); + overflow: hidden; + padding: 0; +} + + +dl.reflist dt, dl.reflist dd { + box-shadow: none; + text-shadow: none; + background-image: none; + border: none; + padding: 12px; +} + + +dl.reflist dt { + font-weight: 500; + border-radius: 0; + background: var(--code-background); + border-bottom: 1px solid var(--separator-color); + color: var(--page-foreground-color) +} + + +dl.reflist dd { + background: none; +} + +/* + Table + */ + +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname), +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody { + display: inline-block; + max-width: 100%; +} + +.contents > table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname):not(.classindex) { + margin-left: calc(0px - var(--spacing-large)); + margin-right: calc(0px - var(--spacing-large)); + max-width: calc(100% + 2 * var(--spacing-large)); +} + +table.fieldtable, +table.markdownTable tbody, +table.doxtable tbody { + border: none; + margin: var(--spacing-medium) 0; + box-shadow: 0 0 0 1px var(--separator-color); + border-radius: var(--border-radius-small); +} + +table.markdownTable, table.doxtable, table.fieldtable { + padding: 1px; +} + +table.doxtable caption { + display: block; +} + +table.fieldtable { + border-collapse: collapse; + width: 100%; +} + +th.markdownTableHeadLeft, +th.markdownTableHeadRight, +th.markdownTableHeadCenter, +th.markdownTableHeadNone, +table.doxtable th { + background: var(--tablehead-background); + color: var(--tablehead-foreground); + font-weight: 600; + font-size: var(--page-font-size); +} + +th.markdownTableHeadLeft:first-child, +th.markdownTableHeadRight:first-child, +th.markdownTableHeadCenter:first-child, +th.markdownTableHeadNone:first-child, +table.doxtable tr th:first-child { + border-top-left-radius: var(--border-radius-small); +} + +th.markdownTableHeadLeft:last-child, +th.markdownTableHeadRight:last-child, +th.markdownTableHeadCenter:last-child, +th.markdownTableHeadNone:last-child, +table.doxtable tr th:last-child { + border-top-right-radius: var(--border-radius-small); +} + +table.markdownTable td, +table.markdownTable th, +table.fieldtable td, +table.fieldtable th, +table.doxtable td, +table.doxtable th { + border: 1px solid var(--separator-color); + padding: var(--spacing-small) var(--spacing-medium); +} + +table.markdownTable td:last-child, +table.markdownTable th:last-child, +table.fieldtable td:last-child, +table.fieldtable th:last-child, +table.doxtable td:last-child, +table.doxtable th:last-child { + border-right: none; +} + +table.markdownTable td:first-child, +table.markdownTable th:first-child, +table.fieldtable td:first-child, +table.fieldtable th:first-child, +table.doxtable td:first-child, +table.doxtable th:first-child { + border-left: none; +} + +table.markdownTable tr:first-child td, +table.markdownTable tr:first-child th, +table.fieldtable tr:first-child td, +table.fieldtable tr:first-child th, +table.doxtable tr:first-child td, +table.doxtable tr:first-child th { + border-top: none; +} + +table.markdownTable tr:last-child td, +table.markdownTable tr:last-child th, +table.fieldtable tr:last-child td, +table.fieldtable tr:last-child th, +table.doxtable tr:last-child td, +table.doxtable tr:last-child th { + border-bottom: none; +} + +table.markdownTable tr, table.doxtable tr { + border-bottom: 1px solid var(--separator-color); +} + +table.markdownTable tr:last-child, table.doxtable tr:last-child { + border-bottom: none; +} + +.full_width_table table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) { + display: block; +} + +.full_width_table table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody { + display: table; + width: 100%; +} + +table.fieldtable th { + font-size: var(--page-font-size); + font-weight: 600; + background-image: none; + background-color: var(--tablehead-background); + color: var(--tablehead-foreground); +} + +table.fieldtable td.fieldtype, .fieldtable td.fieldname, .fieldtable td.fieldinit, .fieldtable td.fielddoc, .fieldtable th { + border-bottom: 1px solid var(--separator-color); + border-right: 1px solid var(--separator-color); +} + +table.fieldtable tr:last-child td:first-child { + border-bottom-left-radius: var(--border-radius-small); +} + +table.fieldtable tr:last-child td:last-child { + border-bottom-right-radius: var(--border-radius-small); +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: var(--primary-light-color); + box-shadow: none; +} + +table.memberdecls { + display: block; + -webkit-tap-highlight-color: transparent; +} + +table.memberdecls tr[class^='memitem'] { + font-family: var(--font-family-monospace); + font-size: var(--code-font-size); +} + +table.memberdecls tr[class^='memitem'] .memTemplParams { + font-family: var(--font-family-monospace); + font-size: var(--code-font-size); + color: var(--primary-dark-color); + white-space: normal; +} + +table.memberdecls tr.heading + tr[class^='memitem'] td.memItemLeft, +table.memberdecls tr.heading + tr[class^='memitem'] td.memItemRight, +table.memberdecls td.memItemLeft, +table.memberdecls td.memItemRight, +table.memberdecls .memTemplItemLeft, +table.memberdecls .memTemplItemRight, +table.memberdecls .memTemplParams { + transition: none; + padding-top: var(--spacing-small); + padding-bottom: var(--spacing-small); + border-top: 1px solid var(--separator-color); + border-bottom: 1px solid var(--separator-color); + background-color: var(--fragment-background); +} + +@media screen and (min-width: 768px) { + + tr.heading + tr[class^='memitem'] td.memItemRight, tr.groupHeader + tr[class^='memitem'] td.memItemRight, tr.inherit_header + tr[class^='memitem'] td.memItemRight { + border-top-right-radius: var(--border-radius-small); + } + + table.memberdecls tr:last-child td.memItemRight, table.memberdecls tr:last-child td.mdescRight, table.memberdecls tr[class^='memitem']:has(+ tr.groupHeader) td.memItemRight, table.memberdecls tr[class^='memitem']:has(+ tr.inherit_header) td.memItemRight, table.memberdecls tr[class^='memdesc']:has(+ tr.groupHeader) td.mdescRight, table.memberdecls tr[class^='memdesc']:has(+ tr.inherit_header) td.mdescRight { + border-bottom-right-radius: var(--border-radius-small); + } + + table.memberdecls tr:last-child td.memItemLeft, table.memberdecls tr:last-child td.mdescLeft, table.memberdecls tr[class^='memitem']:has(+ tr.groupHeader) td.memItemLeft, table.memberdecls tr[class^='memitem']:has(+ tr.inherit_header) td.memItemLeft, table.memberdecls tr[class^='memdesc']:has(+ tr.groupHeader) td.mdescLeft, table.memberdecls tr[class^='memdesc']:has(+ tr.inherit_header) td.mdescLeft { + border-bottom-left-radius: var(--border-radius-small); + } + + tr.heading + tr[class^='memitem'] td.memItemLeft, tr.groupHeader + tr[class^='memitem'] td.memItemLeft, tr.inherit_header + tr[class^='memitem'] td.memItemLeft { + border-top-left-radius: var(--border-radius-small); + } + +} + +table.memname td.memname { + font-size: var(--memname-font-size); +} + +table.memberdecls .memTemplItemLeft, +table.memberdecls .template .memItemLeft, +table.memberdecls .memTemplItemRight, +table.memberdecls .template .memItemRight { + padding-top: 2px; +} + +table.memberdecls .memTemplParams { + border-bottom: 0; + border-left: 1px solid var(--separator-color); + border-right: 1px solid var(--separator-color); + border-radius: var(--border-radius-small) var(--border-radius-small) 0 0; + padding-bottom: var(--spacing-small); +} + +table.memberdecls .memTemplItemLeft, table.memberdecls .template .memItemLeft { + border-radius: 0 0 0 var(--border-radius-small); + border-left: 1px solid var(--separator-color); + border-top: 0; +} + +table.memberdecls .memTemplItemRight, table.memberdecls .template .memItemRight { + border-radius: 0 0 var(--border-radius-small) 0; + border-right: 1px solid var(--separator-color); + padding-left: 0; + border-top: 0; +} + +table.memberdecls .memItemLeft { + border-radius: var(--border-radius-small) 0 0 var(--border-radius-small); + border-left: 1px solid var(--separator-color); + padding-left: var(--spacing-medium); + padding-right: 0; +} + +table.memberdecls .memItemRight { + border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0; + border-right: 1px solid var(--separator-color); + padding-right: var(--spacing-medium); + padding-left: 0; + +} + +table.memberdecls .mdescLeft, table.memberdecls .mdescRight { + background: none; + color: var(--page-foreground-color); + padding: var(--spacing-small) 0; + border: 0; +} + +table.memberdecls [class^="memdesc"] { + box-shadow: none; +} + + +table.memberdecls .memItemLeft, +table.memberdecls .memTemplItemLeft { + padding-right: var(--spacing-medium); +} + +table.memberdecls .memSeparator { + background: var(--page-background-color); + height: var(--spacing-large); + border: 0; + transition: none; +} + +table.memberdecls .groupheader { + margin-bottom: var(--spacing-large); +} + +table.memberdecls .inherit_header td { + padding: 0 0 var(--spacing-medium) 0; + text-indent: -12px; + color: var(--page-secondary-foreground-color); +} + +table.memberdecls span.dynarrow { + left: 10px; +} + +table.memberdecls img[src="closed.png"], +table.memberdecls img[src="open.png"], +div.dynheader img[src="open.png"], +div.dynheader img[src="closed.png"] { + width: 0; + height: 0; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 5px solid var(--primary-color); + margin-top: 8px; + display: block; + float: left; + margin-left: -10px; + transition: transform var(--animation-duration) ease-out; +} + +tr.heading + tr[class^='memitem'] td.memItemLeft, tr.groupHeader + tr[class^='memitem'] td.memItemLeft, tr.inherit_header + tr[class^='memitem'] td.memItemLeft, tr.heading + tr[class^='memitem'] td.memItemRight, tr.groupHeader + tr[class^='memitem'] td.memItemRight, tr.inherit_header + tr[class^='memitem'] td.memItemRight { + border-top: 1px solid var(--separator-color); +} + +table.memberdecls img { + margin-right: 10px; +} + +table.memberdecls img[src="closed.png"], +div.dynheader img[src="closed.png"] { + transform: rotate(-90deg); + +} + +.compoundTemplParams { + font-family: var(--font-family-monospace); + color: var(--primary-dark-color); + font-size: var(--code-font-size); +} + +@media screen and (max-width: 767px) { + + table.memberdecls .memItemLeft, + table.memberdecls .memItemRight, + table.memberdecls .mdescLeft, + table.memberdecls .mdescRight, + table.memberdecls .memTemplItemLeft, + table.memberdecls .memTemplItemRight, + table.memberdecls .memTemplParams, + table.memberdecls .template .memItemLeft, + table.memberdecls .template .memItemRight, + table.memberdecls .template .memParams { + display: block; + text-align: left; + padding-left: var(--spacing-large); + margin: 0 calc(0px - var(--spacing-large)) 0 calc(0px - var(--spacing-large)); + border-right: none; + border-left: none; + border-radius: 0; + white-space: normal; + } + + table.memberdecls .memItemLeft, + table.memberdecls .mdescLeft, + table.memberdecls .memTemplItemLeft, + table.memberdecls .template .memItemLeft { + border-bottom: 0 !important; + padding-bottom: 0 !important; + } + + table.memberdecls .memTemplItemLeft, + table.memberdecls .template .memItemLeft { + padding-top: 0; + } + + table.memberdecls .mdescLeft { + margin-bottom: calc(0px - var(--page-font-size)); + } + + table.memberdecls .memItemRight, + table.memberdecls .mdescRight, + table.memberdecls .memTemplItemRight, + table.memberdecls .template .memItemRight { + border-top: 0 !important; + padding-top: 0 !important; + padding-right: var(--spacing-large); + padding-bottom: var(--spacing-medium); + overflow-x: auto; + } + + table.memberdecls tr[class^='memitem']:not(.inherit) { + display: block; + width: calc(100vw - 2 * var(--spacing-large)); + } + + table.memberdecls .mdescRight { + color: var(--page-foreground-color); + } + + table.memberdecls tr.inherit { + visibility: hidden; + } + + table.memberdecls tr[style="display: table-row;"] { + display: block !important; + visibility: visible; + width: calc(100vw - 2 * var(--spacing-large)); + animation: fade .5s; + } + + @keyframes fade { + 0% { + opacity: 0; + max-height: 0; + } + + 100% { + opacity: 1; + max-height: 200px; + } + } + + tr.heading + tr[class^='memitem'] td.memItemRight, tr.groupHeader + tr[class^='memitem'] td.memItemRight, tr.inherit_header + tr[class^='memitem'] td.memItemRight { + border-top-right-radius: 0; + } + + table.memberdecls tr:last-child td.memItemRight, table.memberdecls tr:last-child td.mdescRight, table.memberdecls tr[class^='memitem']:has(+ tr.groupHeader) td.memItemRight, table.memberdecls tr[class^='memitem']:has(+ tr.inherit_header) td.memItemRight, table.memberdecls tr[class^='memdesc']:has(+ tr.groupHeader) td.mdescRight, table.memberdecls tr[class^='memdesc']:has(+ tr.inherit_header) td.mdescRight { + border-bottom-right-radius: 0; + } + + table.memberdecls tr:last-child td.memItemLeft, table.memberdecls tr:last-child td.mdescLeft, table.memberdecls tr[class^='memitem']:has(+ tr.groupHeader) td.memItemLeft, table.memberdecls tr[class^='memitem']:has(+ tr.inherit_header) td.memItemLeft, table.memberdecls tr[class^='memdesc']:has(+ tr.groupHeader) td.mdescLeft, table.memberdecls tr[class^='memdesc']:has(+ tr.inherit_header) td.mdescLeft { + border-bottom-left-radius: 0; + } + + tr.heading + tr[class^='memitem'] td.memItemLeft, tr.groupHeader + tr[class^='memitem'] td.memItemLeft, tr.inherit_header + tr[class^='memitem'] td.memItemLeft { + border-top-left-radius: 0; + } +} + + +/* + Horizontal Rule + */ + +hr { + margin-top: var(--spacing-large); + margin-bottom: var(--spacing-large); + height: 1px; + background-color: var(--separator-color); + border: 0; +} + +.contents hr { + box-shadow: 100px 0 var(--separator-color), + -100px 0 var(--separator-color), + 500px 0 var(--separator-color), + -500px 0 var(--separator-color), + 900px 0 var(--separator-color), + -900px 0 var(--separator-color), + 1400px 0 var(--separator-color), + -1400px 0 var(--separator-color), + 1900px 0 var(--separator-color), + -1900px 0 var(--separator-color); +} + +.contents img, .contents .center, .contents center, .contents div.image object { + max-width: 100%; + overflow: auto; +} + +@media screen and (max-width: 767px) { + .contents .dyncontent > .center, .contents > center { + margin-left: calc(0px - var(--spacing-large)); + margin-right: calc(0px - var(--spacing-large)); + max-width: calc(100% + 2 * var(--spacing-large)); + } +} + +/* + Directories + */ +div.directory { + border-top: 1px solid var(--separator-color); + border-bottom: 1px solid var(--separator-color); + width: auto; +} + +table.directory { + font-family: var(--font-family); + font-size: var(--page-font-size); + font-weight: normal; + width: 100%; +} + +table.directory td.entry, table.directory td.desc { + padding: calc(var(--spacing-small) / 2) var(--spacing-small); + line-height: var(--table-line-height); +} + +table.directory tr.even td:last-child { + border-radius: 0 var(--border-radius-small) var(--border-radius-small) 0; +} + +table.directory tr.even td:first-child { + border-radius: var(--border-radius-small) 0 0 var(--border-radius-small); +} + +table.directory tr.even:last-child td:last-child { + border-radius: 0 var(--border-radius-small) 0 0; +} + +table.directory tr.even:last-child td:first-child { + border-radius: var(--border-radius-small) 0 0 0; +} + +table.directory td.desc { + min-width: 250px; +} + +table.directory tr.even { + background-color: var(--odd-color); +} + +table.directory tr.odd { + background-color: transparent; +} + +.icona { + width: auto; + height: auto; + margin: 0 var(--spacing-small); +} + +.icon { + background: var(--primary-color); + border-radius: var(--border-radius-small); + font-size: var(--page-font-size); + padding: calc(var(--page-font-size) / 5); + line-height: var(--page-font-size); + transform: scale(0.8); + height: auto; + width: var(--page-font-size); + user-select: none; +} + +.iconfopen, .icondoc, .iconfclosed { + background-position: center; + margin-bottom: 0; + height: var(--table-line-height); +} + +.icondoc { + filter: saturate(0.2); +} + +@media screen and (max-width: 767px) { + div.directory { + margin-left: calc(0px - var(--spacing-large)); + margin-right: calc(0px - var(--spacing-large)); + } +} + +@media (prefers-color-scheme: dark) { + html:not(.light-mode) .iconfopen, html:not(.light-mode) .iconfclosed { + filter: hue-rotate(180deg) invert(); + } +} + +html.dark-mode .iconfopen, html.dark-mode .iconfclosed { + filter: hue-rotate(180deg) invert(); +} + +/* + Class list + */ + +.classindex dl.odd { + background: var(--odd-color); + border-radius: var(--border-radius-small); +} + +.classindex dl.even { + background-color: transparent; +} + +/* + Class Index Doxygen 1.8 +*/ + +table.classindex { + margin-left: 0; + margin-right: 0; + width: 100%; +} + +table.classindex table div.ah { + background-image: none; + background-color: initial; + border-color: var(--separator-color); + color: var(--page-foreground-color); + box-shadow: var(--box-shadow); + border-radius: var(--border-radius-large); + padding: var(--spacing-small); +} + +div.qindex { + background-color: var(--odd-color); + border-radius: var(--border-radius-small); + border: 1px solid var(--separator-color); + padding: var(--spacing-small) 0; +} + +/* + Footer and nav-path + */ + +#nav-path { + width: 100%; +} + +#nav-path ul { + background-image: none; + background: var(--page-background-color); + border: none; + border-top: 1px solid var(--separator-color); + border-bottom: 0; + font-size: var(--navigation-font-size); +} + +img.footer { + width: 60px; +} + +.navpath li.footer { + color: var(--page-secondary-foreground-color); +} + +address.footer { + color: var(--page-secondary-foreground-color); + margin-bottom: var(--spacing-large); +} + +#nav-path li.navelem { + background-image: none; + display: flex; + align-items: center; +} + +.navpath li.navelem a { + text-shadow: none; + display: inline-block; + color: var(--primary-color) !important; +} + +.navpath li.navelem a:hover { + text-shadow: none; +} + +.navpath li.navelem b { + color: var(--primary-dark-color); + font-weight: 500; +} + +li.navelem { + padding: 0; + margin-left: -8px; +} + +li.navelem:first-child { + margin-left: var(--spacing-large); +} + +li.navelem:first-child:before { + display: none; +} + +#nav-path ul { + padding-left: 0; +} + +#nav-path li.navelem:has(.el):after { + content: ''; + border: 5px solid var(--page-background-color); + border-bottom-color: transparent; + border-right-color: transparent; + border-top-color: transparent; + transform: translateY(-1px) scaleY(4.2); + z-index: 10; + margin-left: 6px; +} + +#nav-path li.navelem:not(:has(.el)):after { + background: var(--page-background-color); + box-shadow: 1px -1px 0 1px var(--separator-color); + border-radius: 0 var(--border-radius-medium) 0 50px; +} + +#nav-path li.navelem:not(:has(.el)) { + margin-left: 0; +} + +#nav-path li.navelem:not(:has(.el)):hover, #nav-path li.navelem:not(:has(.el)):hover:after { + background-color: var(--separator-color); +} + +#nav-path li.navelem:has(.el):before { + content: ''; + border: 5px solid var(--separator-color); + border-bottom-color: transparent; + border-right-color: transparent; + border-top-color: transparent; + transform: translateY(-1px) scaleY(3.2); + margin-right: var(--spacing-small); +} + +.navpath li.navelem a:hover { + color: var(--primary-color); +} + +/* + Scrollbars for Webkit +*/ + +#nav-tree::-webkit-scrollbar, +div.fragment::-webkit-scrollbar, +pre.fragment::-webkit-scrollbar, +div.memproto::-webkit-scrollbar, +.contents center::-webkit-scrollbar, +.contents .center::-webkit-scrollbar, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody::-webkit-scrollbar, +div.contents .toc::-webkit-scrollbar, +.contents .dotgraph::-webkit-scrollbar, +.contents .tabs-overview-container::-webkit-scrollbar { + background: transparent; + width: calc(var(--webkit-scrollbar-size) + var(--webkit-scrollbar-padding) + var(--webkit-scrollbar-padding)); + height: calc(var(--webkit-scrollbar-size) + var(--webkit-scrollbar-padding) + var(--webkit-scrollbar-padding)); +} + +#nav-tree::-webkit-scrollbar-thumb, +div.fragment::-webkit-scrollbar-thumb, +pre.fragment::-webkit-scrollbar-thumb, +div.memproto::-webkit-scrollbar-thumb, +.contents center::-webkit-scrollbar-thumb, +.contents .center::-webkit-scrollbar-thumb, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody::-webkit-scrollbar-thumb, +div.contents .toc::-webkit-scrollbar-thumb, +.contents .dotgraph::-webkit-scrollbar-thumb, +.contents .tabs-overview-container::-webkit-scrollbar-thumb { + background-color: transparent; + border: var(--webkit-scrollbar-padding) solid transparent; + border-radius: calc(var(--webkit-scrollbar-padding) + var(--webkit-scrollbar-padding)); + background-clip: padding-box; +} + +#nav-tree:hover::-webkit-scrollbar-thumb, +div.fragment:hover::-webkit-scrollbar-thumb, +pre.fragment:hover::-webkit-scrollbar-thumb, +div.memproto:hover::-webkit-scrollbar-thumb, +.contents center:hover::-webkit-scrollbar-thumb, +.contents .center:hover::-webkit-scrollbar-thumb, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody:hover::-webkit-scrollbar-thumb, +div.contents .toc:hover::-webkit-scrollbar-thumb, +.contents .dotgraph:hover::-webkit-scrollbar-thumb, +.contents .tabs-overview-container:hover::-webkit-scrollbar-thumb { + background-color: var(--webkit-scrollbar-color); +} + +#nav-tree::-webkit-scrollbar-track, +div.fragment::-webkit-scrollbar-track, +pre.fragment::-webkit-scrollbar-track, +div.memproto::-webkit-scrollbar-track, +.contents center::-webkit-scrollbar-track, +.contents .center::-webkit-scrollbar-track, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody::-webkit-scrollbar-track, +div.contents .toc::-webkit-scrollbar-track, +.contents .dotgraph::-webkit-scrollbar-track, +.contents .tabs-overview-container::-webkit-scrollbar-track { + background: transparent; +} + +#nav-tree::-webkit-scrollbar-corner { + background-color: var(--side-nav-background); +} + +#nav-tree, +div.fragment, +pre.fragment, +div.memproto, +.contents center, +.contents .center, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody, +div.contents .toc { + overflow-x: auto; + overflow-x: overlay; +} + +#nav-tree { + overflow-x: auto; + overflow-y: auto; + overflow-y: overlay; +} + +/* + Scrollbars for Firefox +*/ + +#nav-tree, +div.fragment, +pre.fragment, +div.memproto, +.contents center, +.contents .center, +.contents table:not(.memberdecls):not(.mlabels):not(.fieldtable):not(.memname) tbody, +div.contents .toc, +.contents .dotgraph, +.contents .tabs-overview-container { + scrollbar-width: thin; +} + +/* + Optional Dark mode toggle button +*/ + +doxygen-awesome-dark-mode-toggle { + display: inline-block; + margin: 0 0 0 var(--spacing-small); + padding: 0; + width: var(--searchbar-height); + height: var(--searchbar-height); + background: none; + border: none; + border-radius: var(--searchbar-border-radius); + vertical-align: middle; + text-align: center; + line-height: var(--searchbar-height); + font-size: 22px; + display: flex; + align-items: center; + justify-content: center; + user-select: none; + cursor: pointer; +} + +doxygen-awesome-dark-mode-toggle > svg { + transition: transform var(--animation-duration) ease-in-out; +} + +doxygen-awesome-dark-mode-toggle:active > svg { + transform: scale(.5); +} + +doxygen-awesome-dark-mode-toggle:hover { + background-color: rgba(0,0,0,.03); +} + +html.dark-mode doxygen-awesome-dark-mode-toggle:hover { + background-color: rgba(0,0,0,.18); +} + +/* + Optional fragment copy button +*/ +.doxygen-awesome-fragment-wrapper { + position: relative; +} + +doxygen-awesome-fragment-copy-button { + opacity: 0; + background: var(--fragment-background); + width: 28px; + height: 28px; + position: absolute; + right: calc(var(--spacing-large) - (var(--spacing-large) / 2.5)); + top: calc(var(--spacing-large) - (var(--spacing-large) / 2.5)); + border: 1px solid var(--fragment-foreground); + cursor: pointer; + border-radius: var(--border-radius-small); + display: flex; + justify-content: center; + align-items: center; +} + +.doxygen-awesome-fragment-wrapper:hover doxygen-awesome-fragment-copy-button, doxygen-awesome-fragment-copy-button.success { + opacity: .28; +} + +doxygen-awesome-fragment-copy-button:hover, doxygen-awesome-fragment-copy-button.success { + opacity: 1 !important; +} + +doxygen-awesome-fragment-copy-button:active:not([class~=success]) svg { + transform: scale(.91); +} + +doxygen-awesome-fragment-copy-button svg { + fill: var(--fragment-foreground); + width: 18px; + height: 18px; +} + +doxygen-awesome-fragment-copy-button.success svg { + fill: rgb(14, 168, 14); +} + +doxygen-awesome-fragment-copy-button.success { + border-color: rgb(14, 168, 14); +} + +@media screen and (max-width: 767px) { + .textblock > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button, + .textblock li > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button, + .memdoc li > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button, + .memdoc > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button, + dl dd > .doxygen-awesome-fragment-wrapper > doxygen-awesome-fragment-copy-button { + right: 0; + } +} + +/* + Optional paragraph link button +*/ + +a.anchorlink { + font-size: 90%; + margin-left: var(--spacing-small); + color: var(--page-foreground-color) !important; + text-decoration: none; + opacity: .15; + display: none; + transition: opacity var(--animation-duration) ease-in-out, color var(--animation-duration) ease-in-out; +} + +a.anchorlink svg { + fill: var(--page-foreground-color); +} + +h3 a.anchorlink svg, h4 a.anchorlink svg { + margin-bottom: -3px; + margin-top: -4px; +} + +a.anchorlink:hover { + opacity: .45; +} + +h2:hover a.anchorlink, h1:hover a.anchorlink, h3:hover a.anchorlink, h4:hover a.anchorlink { + display: inline-block; +} + +/* + Optional tab feature +*/ + +.tabbed > ul { + padding-inline-start: 0px; + margin: 0; + padding: var(--spacing-small) 0; +} + +.tabbed > ul > li { + display: none; +} + +.tabbed > ul > li.selected { + display: block; +} + +.tabs-overview-container { + overflow-x: auto; + display: block; + overflow-y: visible; +} + +.tabs-overview { + border-bottom: 1px solid var(--separator-color); + display: flex; + flex-direction: row; +} + +@media screen and (max-width: 767px) { + .tabs-overview-container { + margin: 0 calc(0px - var(--spacing-large)); + } + .tabs-overview { + padding: 0 var(--spacing-large) + } +} + +.tabs-overview button.tab-button { + color: var(--page-foreground-color); + margin: 0; + border: none; + background: transparent; + padding: calc(var(--spacing-large) / 2) 0; + display: inline-block; + font-size: var(--page-font-size); + cursor: pointer; + box-shadow: 0 1px 0 0 var(--separator-color); + position: relative; + + -webkit-tap-highlight-color: transparent; +} + +.tabs-overview button.tab-button .tab-title::before { + display: block; + content: attr(title); + font-weight: 600; + height: 0; + overflow: hidden; + visibility: hidden; +} + +.tabs-overview button.tab-button .tab-title { + float: left; + white-space: nowrap; + font-weight: normal; + font-family: var(--font-family); + padding: calc(var(--spacing-large) / 2) var(--spacing-large); + border-radius: var(--border-radius-medium); + transition: background-color var(--animation-duration) ease-in-out, font-weight var(--animation-duration) ease-in-out; +} + +.tabs-overview button.tab-button:not(:last-child) .tab-title { + box-shadow: 8px 0 0 -7px var(--separator-color); +} + +.tabs-overview button.tab-button:hover .tab-title { + background: var(--separator-color); + box-shadow: none; +} + +.tabs-overview button.tab-button.active .tab-title { + font-weight: 600; +} + +.tabs-overview button.tab-button::after { + content: ''; + display: block; + position: absolute; + left: 0; + bottom: 0; + right: 0; + height: 0; + width: 0%; + margin: 0 auto; + border-radius: var(--border-radius-small) var(--border-radius-small) 0 0; + background-color: var(--primary-color); + transition: width var(--animation-duration) ease-in-out, height var(--animation-duration) ease-in-out; +} + +.tabs-overview button.tab-button.active::after { + width: 100%; + box-sizing: border-box; + height: 3px; +} + + +/* + Navigation Buttons +*/ + +.section_buttons:not(:empty) { + margin-top: calc(var(--spacing-large) * 3); +} + +.section_buttons table.markdownTable { + display: block; + width: 100%; +} + +.section_buttons table.markdownTable tbody { + display: table !important; + width: 100%; + box-shadow: none; + border-spacing: 10px; +} + +.section_buttons table.markdownTable td { + padding: 0; +} + +.section_buttons table.markdownTable th { + display: none; +} + +.section_buttons table.markdownTable tr.markdownTableHead { + border: none; +} + +.section_buttons tr th, .section_buttons tr td { + background: none; + border: none; + padding: var(--spacing-large) 0 var(--spacing-small); +} + +.section_buttons a { + display: inline-block; + border: 1px solid var(--separator-color); + border-radius: var(--border-radius-medium); + color: var(--page-secondary-foreground-color) !important; + text-decoration: none; + transition: color var(--animation-duration) ease-in-out, background-color var(--animation-duration) ease-in-out; +} + +.section_buttons a:hover { + color: var(--page-foreground-color) !important; + background-color: var(--odd-color); +} + +.section_buttons tr td.markdownTableBodyLeft a { + padding: var(--spacing-medium) var(--spacing-large) var(--spacing-medium) calc(var(--spacing-large) / 2); +} + +.section_buttons tr td.markdownTableBodyRight a { + padding: var(--spacing-medium) calc(var(--spacing-large) / 2) var(--spacing-medium) var(--spacing-large); +} + +.section_buttons tr td.markdownTableBodyLeft a::before, +.section_buttons tr td.markdownTableBodyRight a::after { + color: var(--page-secondary-foreground-color) !important; + display: inline-block; + transition: color .08s ease-in-out, transform .09s ease-in-out; +} + +.section_buttons tr td.markdownTableBodyLeft a::before { + content: '〈'; + padding-right: var(--spacing-large); +} + + +.section_buttons tr td.markdownTableBodyRight a::after { + content: '〉'; + padding-left: var(--spacing-large); +} + + +.section_buttons tr td.markdownTableBodyLeft a:hover::before { + color: var(--page-foreground-color) !important; + transform: translateX(-3px); +} + +.section_buttons tr td.markdownTableBodyRight a:hover::after { + color: var(--page-foreground-color) !important; + transform: translateX(3px); +} + +@media screen and (max-width: 450px) { + .section_buttons a { + width: 100%; + box-sizing: border-box; + } + + .section_buttons tr td:nth-of-type(1).markdownTableBodyLeft a { + border-radius: var(--border-radius-medium) 0 0 var(--border-radius-medium); + border-right: none; + } + + .section_buttons tr td:nth-of-type(2).markdownTableBodyRight a { + border-radius: 0 var(--border-radius-medium) var(--border-radius-medium) 0; + } +} + +/* + Bordered image +*/ + +html.dark-mode .darkmode_inverted_image img, /* < doxygen 1.9.3 */ +html.dark-mode .darkmode_inverted_image object[type="image/svg+xml"] /* doxygen 1.9.3 */ { + filter: brightness(89%) hue-rotate(180deg) invert(); +} + +.bordered_image { + border-radius: var(--border-radius-small); + border: 1px solid var(--separator-color); + display: inline-block; + overflow: hidden; +} + +.bordered_image:empty { + border: none; +} + +html.dark-mode .bordered_image img, /* < doxygen 1.9.3 */ +html.dark-mode .bordered_image object[type="image/svg+xml"] /* doxygen 1.9.3 */ { + border-radius: var(--border-radius-small); +} + +/* + Button +*/ + +.primary-button { + display: inline-block; + cursor: pointer; + background: var(--primary-color); + color: var(--page-background-color) !important; + border-radius: var(--border-radius-medium); + padding: var(--spacing-small) var(--spacing-medium); + text-decoration: none; +} + +.primary-button:hover { + background: var(--primary-dark-color); +} \ No newline at end of file diff --git a/widget/milsko/milskosrc/resource/font/7x14.bdf b/widget/milsko/milskosrc/resource/font/7x14.bdf new file mode 100644 index 0000000000..6e6c13edc2 --- /dev/null +++ b/widget/milsko/milskosrc/resource/font/7x14.bdf @@ -0,0 +1,4420 @@ +STARTFONT 2.1 +COMMENT +COMMENT Donated by H. Kagotani ; public domain +COMMENT font from Japan +COMMENT +FONT -Misc-Fixed-Medium-R-Normal--14-130-75-75-C-70-ISO8859-1 +SIZE 7 75 75 +FONTBOUNDINGBOX 7 14 0 -2 +STARTPROPERTIES 19 +FONTNAME_REGISTRY "" +FOUNDRY "Misc" +FAMILY_NAME "Fixed" +WEIGHT_NAME "Medium" +SLANT "R" +SETWIDTH_NAME "Normal" +ADD_STYLE_NAME "" +PIXEL_SIZE 14 +POINT_SIZE 130 +RESOLUTION_X 75 +RESOLUTION_Y 75 +SPACING "C" +AVERAGE_WIDTH 70 +CHARSET_REGISTRY "ISO8859" +CHARSET_ENCODING "1" +DEFAULT_CHAR 32 +FONT_DESCENT 2 +FONT_ASCENT 12 +COPYRIGHT "Public domain font. Share and enjoy." +ENDPROPERTIES +CHARS 209 +STARTCHAR 0001 +ENCODING 1 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +18 +3C +3C +7E +7E +3C +3C +18 +18 +00 +00 +ENDCHAR +STARTCHAR 0002 +ENCODING 2 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +54 +AA +54 +AA +54 +AA +54 +AA +54 +AA +54 +AA +54 +AA +ENDCHAR +STARTCHAR 000b +ENCODING 11 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +10 +10 +10 +10 +10 +10 +10 +F0 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 000c +ENCODING 12 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +F0 +10 +10 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 000d +ENCODING 13 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +1E +10 +10 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 000e +ENCODING 14 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +10 +10 +10 +10 +10 +10 +10 +1E +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 000f +ENCODING 15 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +10 +10 +10 +10 +10 +10 +10 +FE +10 +10 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 0010 +ENCODING 16 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +FE +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0011 +ENCODING 17 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +FE +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0012 +ENCODING 18 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +FE +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0013 +ENCODING 19 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +FE +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0014 +ENCODING 20 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +FE +ENDCHAR +STARTCHAR 0015 +ENCODING 21 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +10 +10 +10 +10 +10 +10 +10 +1E +10 +10 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 0016 +ENCODING 22 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +10 +10 +10 +10 +10 +10 +10 +F0 +10 +10 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 0017 +ENCODING 23 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +10 +10 +10 +10 +10 +10 +10 +FE +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0018 +ENCODING 24 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +FE +10 +10 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 0019 +ENCODING 25 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 0020 +ENCODING 32 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0021 +ENCODING 33 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +10 +10 +10 +10 +10 +10 +10 +00 +10 +10 +00 +00 +ENDCHAR +STARTCHAR 0022 +ENCODING 34 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +6C +24 +24 +48 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0023 +ENCODING 35 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +0A +0A +0A +7E +14 +14 +7E +28 +28 +28 +00 +00 +ENDCHAR +STARTCHAR 0024 +ENCODING 36 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +08 +3C +4A +4A +28 +1C +0A +4A +4A +3C +08 +00 +ENDCHAR +STARTCHAR 0025 +ENCODING 37 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +32 +4A +4C +38 +08 +10 +1C +32 +52 +4C +00 +00 +ENDCHAR +STARTCHAR 0026 +ENCODING 38 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +24 +24 +24 +18 +32 +4A +44 +4C +32 +00 +00 +ENDCHAR +STARTCHAR 0027 +ENCODING 39 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +30 +10 +10 +20 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0028 +ENCODING 40 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +02 +04 +08 +08 +10 +10 +10 +10 +10 +08 +08 +04 +02 +ENDCHAR +STARTCHAR 0029 +ENCODING 41 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +40 +20 +10 +10 +08 +08 +08 +08 +08 +10 +10 +20 +40 +ENDCHAR +STARTCHAR 002a +ENCODING 42 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +08 +2A +1C +08 +08 +1C +2A +08 +00 +00 +00 +ENDCHAR +STARTCHAR 002b +ENCODING 43 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +10 +10 +10 +7C +10 +10 +10 +00 +00 +00 +ENDCHAR +STARTCHAR 002c +ENCODING 44 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +30 +10 +10 +20 +ENDCHAR +STARTCHAR 002d +ENCODING 45 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +7E +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 002e +ENCODING 46 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +10 +10 +00 +00 +ENDCHAR +STARTCHAR 002f +ENCODING 47 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +02 +02 +04 +04 +08 +08 +08 +10 +10 +20 +20 +40 +40 +ENDCHAR +STARTCHAR 0030 +ENCODING 48 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +24 +42 +42 +42 +42 +42 +42 +24 +18 +00 +00 +ENDCHAR +STARTCHAR 0031 +ENCODING 49 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +08 +18 +28 +08 +08 +08 +08 +08 +08 +3E +00 +00 +ENDCHAR +STARTCHAR 0032 +ENCODING 50 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3C +42 +42 +02 +04 +04 +08 +10 +20 +7E +00 +00 +ENDCHAR +STARTCHAR 0033 +ENCODING 51 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3C +42 +42 +02 +1C +02 +02 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 0034 +ENCODING 52 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +04 +0C +14 +14 +24 +24 +44 +7E +04 +04 +00 +00 +ENDCHAR +STARTCHAR 0035 +ENCODING 53 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7E +40 +40 +7C +42 +02 +02 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 0036 +ENCODING 54 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +1C +22 +42 +40 +5C +62 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 0037 +ENCODING 55 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7E +42 +44 +04 +08 +08 +08 +08 +08 +08 +00 +00 +ENDCHAR +STARTCHAR 0038 +ENCODING 56 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3C +42 +42 +24 +18 +24 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 0039 +ENCODING 57 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3C +42 +42 +42 +46 +3A +02 +42 +44 +38 +00 +00 +ENDCHAR +STARTCHAR 003a +ENCODING 58 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +10 +10 +00 +00 +00 +10 +10 +00 +00 +00 +ENDCHAR +STARTCHAR 003b +ENCODING 59 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +10 +10 +00 +00 +00 +30 +10 +10 +20 +00 +ENDCHAR +STARTCHAR 003c +ENCODING 60 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +04 +08 +10 +20 +40 +20 +10 +08 +04 +00 +00 +ENDCHAR +STARTCHAR 003d +ENCODING 61 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +7E +00 +00 +7E +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 003e +ENCODING 62 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +40 +20 +10 +08 +04 +08 +10 +20 +40 +00 +00 +ENDCHAR +STARTCHAR 003f +ENCODING 63 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3C +42 +42 +04 +08 +08 +08 +00 +08 +08 +00 +00 +ENDCHAR +STARTCHAR 0040 +ENCODING 64 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +1C +22 +4E +52 +52 +52 +52 +4E +20 +1E +00 +00 +ENDCHAR +STARTCHAR 0041 +ENCODING 65 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +10 +18 +28 +24 +44 +42 +7E +42 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 0042 +ENCODING 66 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7C +42 +42 +44 +7C +42 +42 +42 +42 +7C +00 +00 +ENDCHAR +STARTCHAR 0043 +ENCODING 67 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3C +42 +42 +40 +40 +40 +40 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 0044 +ENCODING 68 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +78 +44 +42 +42 +42 +42 +42 +42 +44 +78 +00 +00 +ENDCHAR +STARTCHAR 0045 +ENCODING 69 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7E +40 +40 +40 +7C +40 +40 +40 +40 +7E +00 +00 +ENDCHAR +STARTCHAR 0046 +ENCODING 70 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7E +40 +40 +40 +7C +40 +40 +40 +40 +40 +00 +00 +ENDCHAR +STARTCHAR 0047 +ENCODING 71 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3C +42 +42 +40 +40 +4E +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 0048 +ENCODING 72 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +42 +42 +42 +42 +7E +42 +42 +42 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 0049 +ENCODING 73 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3E +08 +08 +08 +08 +08 +08 +08 +08 +3E +00 +00 +ENDCHAR +STARTCHAR 004a +ENCODING 74 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +02 +02 +02 +02 +02 +02 +02 +42 +44 +38 +00 +00 +ENDCHAR +STARTCHAR 004b +ENCODING 75 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +42 +44 +48 +50 +70 +48 +48 +44 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 004c +ENCODING 76 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +40 +40 +40 +40 +40 +40 +40 +40 +40 +7E +00 +00 +ENDCHAR +STARTCHAR 004d +ENCODING 77 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +42 +46 +66 +6A +5A +52 +52 +42 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 004e +ENCODING 78 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +62 +62 +52 +52 +52 +4A +4A +4A +46 +46 +00 +00 +ENDCHAR +STARTCHAR 004f +ENCODING 79 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3C +42 +42 +42 +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 0050 +ENCODING 80 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7C +42 +42 +42 +42 +7C +40 +40 +40 +40 +00 +00 +ENDCHAR +STARTCHAR 0051 +ENCODING 81 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3C +42 +42 +42 +42 +42 +72 +4A +46 +3C +04 +02 +ENDCHAR +STARTCHAR 0052 +ENCODING 82 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7C +42 +42 +42 +7C +44 +42 +42 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 0053 +ENCODING 83 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3C +42 +42 +20 +10 +08 +04 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 0054 +ENCODING 84 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7E +10 +10 +10 +10 +10 +10 +10 +10 +10 +00 +00 +ENDCHAR +STARTCHAR 0055 +ENCODING 85 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +42 +42 +42 +42 +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 0056 +ENCODING 86 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +42 +42 +42 +44 +24 +24 +28 +18 +10 +10 +00 +00 +ENDCHAR +STARTCHAR 0057 +ENCODING 87 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +4A +4A +4A +4A +4A +7E +24 +24 +24 +24 +00 +00 +ENDCHAR +STARTCHAR 0058 +ENCODING 88 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +42 +42 +24 +24 +18 +18 +24 +24 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 0059 +ENCODING 89 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +42 +42 +44 +24 +28 +18 +10 +10 +10 +10 +00 +00 +ENDCHAR +STARTCHAR 005a +ENCODING 90 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7E +02 +04 +08 +08 +10 +20 +20 +40 +7E +00 +00 +ENDCHAR +STARTCHAR 005b +ENCODING 91 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +1E +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +1E +ENDCHAR +STARTCHAR 005c +ENCODING 92 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +40 +40 +20 +20 +10 +10 +10 +08 +08 +04 +04 +02 +02 +ENDCHAR +STARTCHAR 005d +ENCODING 93 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +78 +08 +08 +08 +08 +08 +08 +08 +08 +08 +08 +08 +78 +ENDCHAR +STARTCHAR 005e +ENCODING 94 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +24 +42 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 005f +ENCODING 95 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +7E +ENDCHAR +STARTCHAR 0060 +ENCODING 96 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +0C +08 +08 +04 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0061 +ENCODING 97 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3C +42 +0E +32 +42 +46 +3A +00 +00 +ENDCHAR +STARTCHAR 0062 +ENCODING 98 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +40 +40 +40 +5C +62 +42 +42 +42 +62 +5C +00 +00 +ENDCHAR +STARTCHAR 0063 +ENCODING 99 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3C +42 +40 +40 +40 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 0064 +ENCODING 100 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +02 +02 +02 +3A +46 +42 +42 +42 +46 +3A +00 +00 +ENDCHAR +STARTCHAR 0065 +ENCODING 101 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3C +42 +42 +7E +40 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 0066 +ENCODING 102 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +0C +12 +10 +10 +7C +10 +10 +10 +10 +10 +00 +00 +ENDCHAR +STARTCHAR 0067 +ENCODING 103 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3A +44 +44 +44 +38 +20 +5C +42 +3C +ENDCHAR +STARTCHAR 0068 +ENCODING 104 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +40 +40 +40 +5C +62 +42 +42 +42 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 0069 +ENCODING 105 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +10 +10 +00 +10 +10 +10 +10 +10 +10 +10 +00 +00 +ENDCHAR +STARTCHAR 006a +ENCODING 106 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +04 +04 +00 +04 +04 +04 +04 +04 +04 +04 +44 +38 +ENDCHAR +STARTCHAR 006b +ENCODING 107 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +40 +40 +40 +44 +48 +50 +70 +48 +44 +42 +00 +00 +ENDCHAR +STARTCHAR 006c +ENCODING 108 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +00 +00 +ENDCHAR +STARTCHAR 006d +ENCODING 109 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +7C +52 +52 +52 +52 +52 +52 +00 +00 +ENDCHAR +STARTCHAR 006e +ENCODING 110 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +5C +62 +42 +42 +42 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 006f +ENCODING 111 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3C +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 0070 +ENCODING 112 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +5C +62 +42 +42 +42 +62 +5C +40 +40 +ENDCHAR +STARTCHAR 0071 +ENCODING 113 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3A +46 +42 +42 +42 +46 +3A +02 +02 +ENDCHAR +STARTCHAR 0072 +ENCODING 114 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +5C +62 +42 +40 +40 +40 +40 +00 +00 +ENDCHAR +STARTCHAR 0073 +ENCODING 115 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3C +42 +20 +18 +04 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 0074 +ENCODING 116 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +10 +10 +10 +7E +10 +10 +10 +10 +10 +0E +00 +00 +ENDCHAR +STARTCHAR 0075 +ENCODING 117 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +42 +42 +42 +42 +42 +46 +3A +00 +00 +ENDCHAR +STARTCHAR 0076 +ENCODING 118 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +42 +42 +22 +24 +14 +18 +08 +00 +00 +ENDCHAR +STARTCHAR 0077 +ENCODING 119 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +4A +4A +4A +7E +24 +24 +24 +00 +00 +ENDCHAR +STARTCHAR 0078 +ENCODING 120 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +42 +42 +24 +18 +24 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 0079 +ENCODING 121 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +42 +42 +22 +24 +14 +1C +08 +48 +30 +ENDCHAR +STARTCHAR 007a +ENCODING 122 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +7E +04 +08 +10 +10 +20 +7E +00 +00 +ENDCHAR +STARTCHAR 007b +ENCODING 123 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +06 +08 +08 +08 +08 +08 +10 +08 +08 +08 +08 +08 +06 +ENDCHAR +STARTCHAR 007c +ENCODING 124 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +10 +ENDCHAR +STARTCHAR 007d +ENCODING 125 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +60 +10 +10 +10 +10 +10 +08 +10 +10 +10 +10 +10 +60 +ENDCHAR +STARTCHAR 007e +ENCODING 126 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +20 +52 +4A +04 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 007f +ENCODING 127 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00a0 +ENCODING 160 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00a1 +ENCODING 161 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +10 +10 +00 +10 +10 +10 +10 +10 +10 +10 +00 +00 +ENDCHAR +STARTCHAR 00a2 +ENCODING 162 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +10 +3e +52 +50 +50 +50 +52 +3e +10 +00 +ENDCHAR +STARTCHAR 00a3 +ENCODING 163 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +18 +24 +20 +20 +78 +20 +20 +78 +24 +00 +00 +ENDCHAR +STARTCHAR 00a4 +ENCODING 164 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +42 +3c +24 +24 +3c +42 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00a5 +ENCODING 165 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +42 +24 +18 +7e +08 +08 +7e +08 +08 +08 +00 +00 +ENDCHAR +STARTCHAR 00a6 +ENCODING 166 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +10 +10 +10 +10 +00 +00 +10 +10 +10 +10 +00 +00 +ENDCHAR +STARTCHAR 00a7 +ENCODING 167 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +3c +42 +20 +18 +24 +42 +24 +18 +04 +42 +3c +00 +00 +ENDCHAR +STARTCHAR 00a8 +ENCODING 168 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +48 +48 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00a9 +ENCODING 169 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +3c +42 +5a +66 +62 +62 +62 +66 +5a +42 +3c +00 +00 +ENDCHAR +STARTCHAR 00aa +ENCODING 170 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +1c +22 +1e +22 +26 +1a +00 +3e +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00ab +ENCODING 171 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +0a +14 +28 +50 +28 +14 +0a +00 +00 +ENDCHAR +STARTCHAR 00ac +ENCODING 172 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +f8 +08 +08 +08 +00 +00 +ENDCHAR +STARTCHAR 00ad +ENCODING 173 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +f0 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00ae +ENCODING 174 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +3c +42 +7a +66 +66 +7a +66 +66 +66 +42 +3c +00 +00 +ENDCHAR +STARTCHAR 00af +ENCODING 175 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +f0 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00b0 +ENCODING 176 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +30 +48 +48 +30 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00b1 +ENCODING 177 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +10 +10 +7c +10 +10 +7c +00 +00 +ENDCHAR +STARTCHAR 00b2 +ENCODING 178 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +30 +48 +08 +10 +20 +40 +78 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00b3 +ENCODING 179 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +30 +48 +08 +30 +08 +48 +30 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00b4 +ENCODING 180 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +08 +10 +20 +40 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00b5 +ENCODING 181 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +44 +44 +44 +44 +6c +54 +40 +40 +ENDCHAR +STARTCHAR 00b6 +ENCODING 182 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3c +54 +54 +54 +54 +34 +14 +14 +14 +14 +14 +1c +ENDCHAR +STARTCHAR 00b7 +ENCODING 183 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +10 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00b8 +ENCODING 184 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +10 +10 +20 +ENDCHAR +STARTCHAR 00b9 +ENCODING 185 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +20 +60 +20 +20 +20 +20 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00ba +ENCODING 186 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +24 +24 +18 +00 +3c +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00bb +ENCODING 187 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +50 +28 +14 +0a +14 +28 +50 +00 +00 +ENDCHAR +STARTCHAR 00bc +ENCODING 188 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +20 +62 +24 +24 +28 +12 +16 +2a +4e +42 +00 +00 +ENDCHAR +STARTCHAR 00bd +ENCODING 189 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +20 +62 +24 +24 +28 +14 +1a +22 +44 +4e +00 +00 +ENDCHAR +STARTCHAR 00be +ENCODING 190 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +62 +12 +24 +18 +68 +12 +26 +2a +4e +02 +00 +00 +ENDCHAR +STARTCHAR 00bf +ENCODING 191 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +08 +08 +00 +08 +08 +08 +08 +04 +42 +42 +3c +ENDCHAR +STARTCHAR 00c0 +ENCODING 192 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +20 +18 +00 +18 +28 +24 +44 +42 +7E +42 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 00c1 +ENCODING 193 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +04 +18 +00 +18 +28 +24 +44 +42 +7E +42 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 00c2 +ENCODING 194 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +24 +00 +18 +28 +24 +44 +42 +7E +42 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 00c3 +ENCODING 195 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +14 +28 +00 +18 +28 +24 +44 +42 +7E +42 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 00c4 +ENCODING 196 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +24 +00 +18 +28 +24 +44 +42 +7E +42 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 00c5 +ENCODING 197 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +10 +00 +10 +18 +28 +24 +44 +42 +7E +42 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 00c6 +ENCODING 198 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3E +50 +50 +50 +9C +f0 +90 +90 +90 +9E +00 +00 +ENDCHAR +STARTCHAR 00c7 +ENCODING 199 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3C +42 +42 +40 +40 +40 +40 +42 +42 +3C +08 +10 +ENDCHAR +STARTCHAR 00c8 +ENCODING 200 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +20 +18 +00 +7e +40 +40 +40 +7c +40 +40 +40 +7E +00 +00 +ENDCHAR +STARTCHAR 00c9 +ENCODING 201 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +04 +18 +00 +7e +40 +40 +40 +7c +40 +40 +40 +7E +00 +00 +ENDCHAR +STARTCHAR 00ca +ENCODING 202 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +24 +00 +7e +40 +40 +40 +7c +40 +40 +40 +7E +00 +00 +ENDCHAR +STARTCHAR 00cb +ENCODING 203 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +24 +00 +7e +40 +40 +40 +7c +40 +40 +40 +7E +00 +00 +ENDCHAR +STARTCHAR 00cc +ENCODING 204 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +10 +0c +00 +3e +08 +08 +08 +08 +08 +08 +08 +3E +00 +00 +ENDCHAR +STARTCHAR 00cd +ENCODING 205 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +04 +18 +00 +3e +08 +08 +08 +08 +08 +08 +08 +3E +00 +00 +ENDCHAR +STARTCHAR 00ce +ENCODING 206 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +08 +14 +00 +3e +08 +08 +08 +08 +08 +08 +08 +3E +00 +00 +ENDCHAR +STARTCHAR 00cf +ENCODING 207 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +14 +00 +3e +08 +08 +08 +08 +08 +08 +08 +3E +00 +00 +ENDCHAR +STARTCHAR 00d0 +ENCODING 208 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +78 +44 +42 +42 +e2 +42 +42 +42 +44 +78 +00 +00 +ENDCHAR +STARTCHAR 00d1 +ENCODING 209 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +14 +28 +00 +62 +52 +52 +52 +4A +4A +4A +46 +46 +00 +00 +ENDCHAR +STARTCHAR 00d2 +ENCODING 210 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +20 +18 +00 +3c +42 +42 +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00d3 +ENCODING 211 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +04 +18 +00 +3c +42 +42 +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00d4 +ENCODING 212 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +24 +00 +3c +42 +42 +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00d5 +ENCODING 213 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +14 +28 +00 +3c +42 +42 +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00d6 +ENCODING 214 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +24 +00 +3c +42 +42 +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00d7 +ENCODING 215 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +82 +44 +28 +10 +28 +44 +82 +00 +00 +ENDCHAR +STARTCHAR 00d8 +ENCODING 216 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +02 +02 +3C +46 +4a +4a +4a +52 +52 +52 +62 +3C +40 +40 +ENDCHAR +STARTCHAR 00d9 +ENCODING 217 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +20 +18 +00 +42 +42 +42 +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00da +ENCODING 218 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +04 +18 +00 +42 +42 +42 +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00db +ENCODING 219 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +24 +00 +42 +42 +42 +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00dc +ENCODING 220 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +24 +00 +42 +42 +42 +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00dd +ENCODING 221 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +04 +18 +42 +42 +44 +24 +28 +18 +10 +10 +10 +10 +00 +00 +ENDCHAR +STARTCHAR 00de +ENCODING 222 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +40 +40 +7c +42 +42 +42 +42 +7c +40 +40 +00 +00 +ENDCHAR +STARTCHAR 00df +ENCODING 223 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +24 +24 +24 +38 +24 +22 +22 +22 +7c +00 +00 +ENDCHAR +STARTCHAR 00e0 +ENCODING 224 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +20 +10 +08 +00 +3C +42 +0E +32 +42 +46 +3A +00 +00 +ENDCHAR +STARTCHAR 00e1 +ENCODING 225 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +04 +08 +10 +00 +3C +42 +0E +32 +42 +46 +3A +00 +00 +ENDCHAR +STARTCHAR 00e2 +ENCODING 226 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +24 +00 +3C +42 +0E +32 +42 +46 +3A +00 +00 +ENDCHAR +STARTCHAR 00e3 +ENCODING 227 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +14 +28 +00 +3C +42 +0E +32 +42 +46 +3A +00 +00 +ENDCHAR +STARTCHAR 00e4 +ENCODING 228 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +24 +00 +3C +42 +0E +32 +42 +46 +3A +00 +00 +ENDCHAR +STARTCHAR 00e5 +ENCODING 229 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +10 +28 +10 +00 +3C +42 +0E +32 +42 +46 +3A +00 +00 +ENDCHAR +STARTCHAR 00e6 +ENCODING 230 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +7C +92 +32 +5E +90 +92 +7C +00 +00 +ENDCHAR +STARTCHAR 00e7 +ENCODING 231 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3C +42 +40 +40 +40 +42 +3C +08 +10 +ENDCHAR +STARTCHAR 00e8 +ENCODING 232 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +20 +10 +08 +00 +3C +42 +42 +7E +40 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00e9 +ENCODING 233 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +04 +08 +10 +00 +3C +42 +42 +7E +40 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00ea +ENCODING 234 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +24 +00 +3C +42 +42 +7E +40 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00eb +ENCODING 235 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +24 +00 +3C +42 +42 +7E +40 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00ec +ENCODING 236 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +20 +10 +08 +00 +10 +10 +10 +10 +10 +10 +10 +00 +00 +ENDCHAR +STARTCHAR 00ed +ENCODING 237 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +08 +10 +20 +00 +10 +10 +10 +10 +10 +10 +10 +00 +00 +ENDCHAR +STARTCHAR 00ee +ENCODING 238 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +10 +28 +00 +10 +10 +10 +10 +10 +10 +10 +00 +00 +ENDCHAR +STARTCHAR 00ef +ENCODING 239 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +28 +00 +10 +10 +10 +10 +10 +10 +10 +00 +00 +ENDCHAR +STARTCHAR 00f0 +ENCODING 240 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +28 +10 +28 +04 +3c +44 +44 +44 +44 +44 +38 +00 +00 +ENDCHAR +STARTCHAR 00f1 +ENCODING 241 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +14 +28 +00 +5C +62 +42 +42 +42 +42 +42 +00 +00 +ENDCHAR +STARTCHAR 00f2 +ENCODING 242 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +20 +10 +08 +00 +3C +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00f3 +ENCODING 243 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +04 +08 +10 +00 +3C +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00f4 +ENCODING 244 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +24 +00 +3C +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00f5 +ENCODING 245 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +14 +28 +00 +3C +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00f6 +ENCODING 246 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +24 +00 +3C +42 +42 +42 +42 +42 +3C +00 +00 +ENDCHAR +STARTCHAR 00f7 +ENCODING 247 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +30 +00 +fc +00 +30 +00 +00 +ENDCHAR +STARTCHAR 00f8 +ENCODING 248 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +02 +04 +3C +4a +4a +52 +52 +62 +3C +40 +40 +ENDCHAR +STARTCHAR 00f9 +ENCODING 249 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +20 +10 +08 +42 +42 +42 +42 +42 +46 +3A +00 +00 +ENDCHAR +STARTCHAR 00fa +ENCODING 250 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +04 +08 +10 +42 +42 +42 +42 +42 +46 +3A +00 +00 +ENDCHAR +STARTCHAR 00fb +ENCODING 251 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +24 +00 +42 +42 +42 +42 +42 +46 +3A +00 +00 +ENDCHAR +STARTCHAR 00fc +ENCODING 252 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +24 +00 +42 +42 +42 +42 +42 +46 +3A +00 +00 +ENDCHAR +STARTCHAR 00fd +ENCODING 253 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +04 +08 +10 +42 +42 +22 +24 +14 +1C +08 +48 +30 +ENDCHAR +STARTCHAR 00fe +ENCODING 254 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +40 +40 +40 +5C +62 +42 +42 +42 +62 +5C +40 +40 +ENDCHAR +STARTCHAR 00ff +ENCODING 255 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +24 +00 +42 +42 +22 +24 +14 +1C +08 +48 +30 +ENDCHAR +ENDFONT diff --git a/widget/milsko/milskosrc/resource/font/7x14B.bdf b/widget/milsko/milskosrc/resource/font/7x14B.bdf new file mode 100644 index 0000000000..a99d925abd --- /dev/null +++ b/widget/milsko/milskosrc/resource/font/7x14B.bdf @@ -0,0 +1,4420 @@ +STARTFONT 2.1 +COMMENT +COMMENT Donated by H. Kagotani ; public domain +COMMENT font from Japan +COMMENT +FONT -Misc-Fixed-Bold-R-Normal--14-130-75-75-C-70-ISO8859-1 +SIZE 7 75 75 +FONTBOUNDINGBOX 7 14 0 -2 +STARTPROPERTIES 19 +FONTNAME_REGISTRY "" +FOUNDRY "Misc" +FAMILY_NAME "Fixed" +WEIGHT_NAME "Bold" +SLANT "R" +SETWIDTH_NAME "Normal" +ADD_STYLE_NAME "" +PIXEL_SIZE 14 +POINT_SIZE 130 +RESOLUTION_X 75 +RESOLUTION_Y 75 +SPACING "C" +AVERAGE_WIDTH 70 +CHARSET_REGISTRY "ISO8859" +CHARSET_ENCODING "1" +DEFAULT_CHAR 32 +FONT_DESCENT 2 +FONT_ASCENT 12 +COPYRIGHT "Public domain font. Share and enjoy." +ENDPROPERTIES +CHARS 209 +STARTCHAR 0001 +ENCODING 1 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +18 +3c +3c +7e +7e +3c +3c +18 +18 +00 +00 +ENDCHAR +STARTCHAR 0002 +ENCODING 2 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +76 +ee +dc +ba +76 +ee +dc +ba +76 +ee +dc +ba +76 +ee +ENDCHAR +STARTCHAR 000b +ENCODING 11 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +18 +18 +18 +18 +18 +f8 +f8 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 000c +ENCODING 12 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +f8 +f8 +18 +18 +18 +18 +18 +18 +ENDCHAR +STARTCHAR 000d +ENCODING 13 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +1e +1e +18 +18 +18 +18 +18 +18 +ENDCHAR +STARTCHAR 000e +ENCODING 14 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +18 +18 +18 +18 +18 +1e +1e +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 000f +ENCODING 15 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +18 +18 +18 +18 +18 +fe +fe +18 +18 +18 +18 +18 +18 +ENDCHAR +STARTCHAR 0010 +ENCODING 16 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +fe +fe +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0011 +ENCODING 17 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +fe +fe +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0012 +ENCODING 18 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +fe +fe +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0013 +ENCODING 19 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +fe +fe +00 +00 +00 +ENDCHAR +STARTCHAR 0014 +ENCODING 20 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +fe +fe +ENDCHAR +STARTCHAR 0015 +ENCODING 21 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +18 +18 +18 +18 +18 +1e +1e +18 +18 +18 +18 +18 +18 +ENDCHAR +STARTCHAR 0016 +ENCODING 22 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +18 +18 +18 +18 +18 +f8 +f8 +18 +18 +18 +18 +18 +18 +ENDCHAR +STARTCHAR 0017 +ENCODING 23 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +18 +18 +18 +18 +18 +fe +fe +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0018 +ENCODING 24 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +fe +fe +18 +18 +18 +18 +18 +18 +ENDCHAR +STARTCHAR 0019 +ENCODING 25 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +ENDCHAR +STARTCHAR 0020 +ENCODING 32 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0021 +ENCODING 33 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +18 +18 +18 +18 +18 +18 +00 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 0022 +ENCODING 34 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +7e +36 +36 +6c +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0023 +ENCODING 35 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +1e +1e +1e +7e +3c +3c +7e +78 +78 +78 +00 +00 +ENDCHAR +STARTCHAR 0024 +ENCODING 36 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +3c +5a +5a +38 +1c +1a +5a +5a +3c +18 +00 +ENDCHAR +STARTCHAR 0025 +ENCODING 37 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +36 +6e +6c +38 +08 +10 +1c +36 +76 +6c +00 +00 +ENDCHAR +STARTCHAR 0026 +ENCODING 38 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +1c +36 +36 +36 +1c +36 +6e +6c +6c +36 +00 +00 +ENDCHAR +STARTCHAR 0027 +ENCODING 39 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +38 +18 +18 +30 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0028 +ENCODING 40 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +06 +0c +18 +18 +30 +30 +30 +30 +30 +18 +18 +0c +06 +ENDCHAR +STARTCHAR 0029 +ENCODING 41 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +60 +30 +18 +18 +0c +0c +0c +0c +0c +18 +18 +30 +60 +ENDCHAR +STARTCHAR 002a +ENCODING 42 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +5a +5a +3c +18 +18 +3c +5a +5a +00 +00 +00 +ENDCHAR +STARTCHAR 002b +ENCODING 43 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +18 +18 +18 +7e +18 +18 +18 +00 +00 +00 +ENDCHAR +STARTCHAR 002c +ENCODING 44 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +38 +18 +18 +30 +ENDCHAR +STARTCHAR 002d +ENCODING 45 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +7e +7e +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 002e +ENCODING 46 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 002f +ENCODING 47 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +06 +06 +06 +0c +0c +18 +18 +18 +30 +30 +60 +60 +60 +ENDCHAR +STARTCHAR 0030 +ENCODING 48 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3c +66 +66 +66 +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 0031 +ENCODING 49 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +38 +78 +18 +18 +18 +18 +18 +18 +7e +00 +00 +ENDCHAR +STARTCHAR 0032 +ENCODING 50 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3c +66 +66 +06 +0c +0c +18 +30 +60 +7e +00 +00 +ENDCHAR +STARTCHAR 0033 +ENCODING 51 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3c +66 +66 +06 +1c +06 +06 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 0034 +ENCODING 52 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +04 +0c +0c +1c +3c +2c +6c +7e +04 +04 +00 +00 +ENDCHAR +STARTCHAR 0035 +ENCODING 53 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7e +60 +60 +7c +66 +06 +06 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 0036 +ENCODING 54 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +1c +36 +66 +60 +7c +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 0037 +ENCODING 55 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7e +66 +6c +0c +18 +18 +18 +18 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 0038 +ENCODING 56 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3c +66 +66 +3c +18 +3c +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 0039 +ENCODING 57 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3c +66 +66 +66 +66 +3e +06 +66 +6c +38 +00 +00 +ENDCHAR +STARTCHAR 003a +ENCODING 58 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +18 +18 +00 +00 +00 +18 +18 +00 +00 +00 +ENDCHAR +STARTCHAR 003b +ENCODING 59 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +18 +18 +00 +00 +00 +38 +18 +18 +30 +00 +ENDCHAR +STARTCHAR 003c +ENCODING 60 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +06 +0c +18 +30 +60 +30 +18 +0c +06 +00 +00 +ENDCHAR +STARTCHAR 003d +ENCODING 61 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +7e +7e +00 +7e +7e +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 003e +ENCODING 62 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +60 +30 +18 +0c +06 +0c +18 +30 +60 +00 +00 +ENDCHAR +STARTCHAR 003f +ENCODING 63 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3c +66 +66 +0c +18 +18 +18 +00 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 0040 +ENCODING 64 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +1c +36 +6e +7a +7a +7a +7a +6e +30 +1e +00 +00 +ENDCHAR +STARTCHAR 0041 +ENCODING 65 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3c +7e +66 +66 +66 +66 +7e +66 +66 +66 +00 +00 +ENDCHAR +STARTCHAR 0042 +ENCODING 66 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7c +66 +66 +64 +7c +66 +66 +66 +66 +7c +00 +00 +ENDCHAR +STARTCHAR 0043 +ENCODING 67 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3c +66 +66 +60 +60 +60 +60 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 0044 +ENCODING 68 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +78 +6c +66 +66 +66 +66 +66 +66 +6c +78 +00 +00 +ENDCHAR +STARTCHAR 0045 +ENCODING 69 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7e +60 +60 +60 +7c +60 +60 +60 +60 +7e +00 +00 +ENDCHAR +STARTCHAR 0046 +ENCODING 70 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7e +60 +60 +60 +7c +60 +60 +60 +60 +60 +00 +00 +ENDCHAR +STARTCHAR 0047 +ENCODING 71 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3c +66 +66 +60 +60 +6e +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 0048 +ENCODING 72 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +66 +66 +66 +66 +7e +66 +66 +66 +66 +66 +00 +00 +ENDCHAR +STARTCHAR 0049 +ENCODING 73 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7e +18 +18 +18 +18 +18 +18 +18 +18 +7e +00 +00 +ENDCHAR +STARTCHAR 004a +ENCODING 74 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +06 +06 +06 +06 +06 +06 +06 +66 +6c +38 +00 +00 +ENDCHAR +STARTCHAR 004b +ENCODING 75 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +66 +6c +78 +70 +70 +78 +78 +6c +66 +66 +00 +00 +ENDCHAR +STARTCHAR 004c +ENCODING 76 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +60 +60 +60 +60 +60 +60 +60 +60 +60 +7e +00 +00 +ENDCHAR +STARTCHAR 004d +ENCODING 77 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +42 +66 +66 +7e +7e +66 +66 +66 +66 +66 +00 +00 +ENDCHAR +STARTCHAR 004e +ENCODING 78 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +66 +66 +76 +76 +76 +6e +6e +6e +66 +66 +00 +00 +ENDCHAR +STARTCHAR 004f +ENCODING 79 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3c +66 +66 +66 +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 0050 +ENCODING 80 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7c +66 +66 +66 +66 +7c +60 +60 +60 +60 +00 +00 +ENDCHAR +STARTCHAR 0051 +ENCODING 81 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3c +66 +66 +66 +66 +66 +76 +6e +66 +3c +06 +02 +ENDCHAR +STARTCHAR 0052 +ENCODING 82 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7c +66 +66 +66 +7c +6c +66 +66 +66 +66 +00 +00 +ENDCHAR +STARTCHAR 0053 +ENCODING 83 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3c +66 +66 +30 +18 +18 +0c +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 0054 +ENCODING 84 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7e +18 +18 +18 +18 +18 +18 +18 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 0055 +ENCODING 85 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +66 +66 +66 +66 +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 0056 +ENCODING 86 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +66 +66 +66 +66 +66 +66 +66 +3c +3c +18 +00 +00 +ENDCHAR +STARTCHAR 0057 +ENCODING 87 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +66 +66 +66 +66 +66 +7e +7e +7e +7e +24 +00 +00 +ENDCHAR +STARTCHAR 0058 +ENCODING 88 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +66 +66 +3c +3c +18 +18 +3c +3c +66 +66 +00 +00 +ENDCHAR +STARTCHAR 0059 +ENCODING 89 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +66 +66 +66 +3c +3c +18 +18 +18 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 005a +ENCODING 90 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7e +06 +0c +0c +18 +18 +30 +30 +60 +7e +00 +00 +ENDCHAR +STARTCHAR 005b +ENCODING 91 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +3e +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +30 +3e +ENDCHAR +STARTCHAR 005c +ENCODING 92 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +60 +60 +60 +30 +30 +18 +18 +18 +0c +0c +06 +06 +06 +ENDCHAR +STARTCHAR 005d +ENCODING 93 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +7c +0c +0c +0c +0c +0c +0c +0c +0c +0c +0c +0c +7c +ENDCHAR +STARTCHAR 005e +ENCODING 94 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +3c +66 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 005f +ENCODING 95 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +7e +7e +ENDCHAR +STARTCHAR 0060 +ENCODING 96 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +1c +18 +18 +0c +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 0061 +ENCODING 97 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3c +66 +0e +36 +66 +66 +3e +00 +00 +ENDCHAR +STARTCHAR 0062 +ENCODING 98 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +60 +60 +60 +7c +66 +66 +66 +66 +66 +7c +00 +00 +ENDCHAR +STARTCHAR 0063 +ENCODING 99 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3c +66 +60 +60 +60 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 0064 +ENCODING 100 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +06 +06 +06 +3e +66 +66 +66 +66 +66 +3e +00 +00 +ENDCHAR +STARTCHAR 0065 +ENCODING 101 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3c +66 +66 +7e +60 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 0066 +ENCODING 102 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +0c +1e +18 +18 +7e +18 +18 +18 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 0067 +ENCODING 103 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3a +6e +6c +6c +38 +20 +7c +66 +3c +ENDCHAR +STARTCHAR 0068 +ENCODING 104 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +60 +60 +60 +7c +66 +66 +66 +66 +66 +66 +00 +00 +ENDCHAR +STARTCHAR 0069 +ENCODING 105 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +18 +00 +18 +18 +18 +18 +18 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 006a +ENCODING 106 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +0c +0c +00 +0c +0c +0c +0c +0c +0c +0c +6c +38 +ENDCHAR +STARTCHAR 006b +ENCODING 107 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +60 +60 +60 +64 +6c +78 +78 +6c +66 +62 +00 +00 +ENDCHAR +STARTCHAR 006c +ENCODING 108 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 006d +ENCODING 109 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +6c +7e +7e +7e +7e +7e +7e +00 +00 +ENDCHAR +STARTCHAR 006e +ENCODING 110 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +7c +66 +66 +66 +66 +66 +66 +00 +00 +ENDCHAR +STARTCHAR 006f +ENCODING 111 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3c +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 0070 +ENCODING 112 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +7c +66 +66 +66 +66 +66 +7c +60 +60 +ENDCHAR +STARTCHAR 0071 +ENCODING 113 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3e +66 +66 +66 +66 +66 +3e +06 +06 +ENDCHAR +STARTCHAR 0072 +ENCODING 114 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +7c +66 +66 +60 +60 +60 +60 +00 +00 +ENDCHAR +STARTCHAR 0073 +ENCODING 115 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3c +66 +30 +18 +0c +66 +3c +00 +00 +ENDCHAR +STARTCHAR 0074 +ENCODING 116 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +18 +18 +7e +18 +18 +18 +18 +18 +0e +00 +00 +ENDCHAR +STARTCHAR 0075 +ENCODING 117 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +66 +66 +66 +66 +66 +66 +3e +00 +00 +ENDCHAR +STARTCHAR 0076 +ENCODING 118 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +66 +66 +66 +3c +3c +18 +18 +00 +00 +ENDCHAR +STARTCHAR 0077 +ENCODING 119 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +66 +66 +7e +7e +7e +7e +24 +00 +00 +ENDCHAR +STARTCHAR 0078 +ENCODING 120 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +66 +66 +3c +18 +3c +66 +66 +00 +00 +ENDCHAR +STARTCHAR 0079 +ENCODING 121 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +66 +66 +36 +36 +1c +1c +0c +6c +38 +ENDCHAR +STARTCHAR 007a +ENCODING 122 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +7e +06 +0c +18 +30 +60 +7e +00 +00 +ENDCHAR +STARTCHAR 007b +ENCODING 123 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +0e +18 +18 +18 +18 +18 +30 +18 +18 +18 +18 +18 +0e +ENDCHAR +STARTCHAR 007c +ENCODING 124 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +18 +ENDCHAR +STARTCHAR 007d +ENCODING 125 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +70 +18 +18 +18 +18 +18 +0c +18 +18 +18 +18 +18 +70 +ENDCHAR +STARTCHAR 007e +ENCODING 126 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +20 +7e +7e +04 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 007f +ENCODING 127 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00a0 +ENCODING 160 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00a1 +ENCODING 161 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +18 +00 +18 +18 +18 +18 +18 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 00a2 +ENCODING 162 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +18 +3e +5a +58 +58 +58 +5a +3e +18 +00 +ENDCHAR +STARTCHAR 00a3 +ENCODING 163 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +1c +36 +30 +30 +78 +30 +30 +7c +36 +00 +00 +ENDCHAR +STARTCHAR 00a4 +ENCODING 164 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +66 +3c +34 +2c +3c +66 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00a5 +ENCODING 165 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +42 +66 +3c +7e +18 +18 +7e +18 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 00a6 +ENCODING 166 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +18 +18 +18 +00 +00 +18 +18 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 00a7 +ENCODING 167 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +3c +66 +30 +18 +3c +66 +3c +18 +0c +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00a8 +ENCODING 168 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +6c +6c +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00a9 +ENCODING 169 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +3c +66 +7e +76 +76 +76 +76 +76 +7e +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00aa +ENCODING 170 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +1c +36 +1e +36 +36 +1e +00 +3e +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00ab +ENCODING 171 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +0e +1e +3c +78 +3c +1e +0e +00 +00 +ENDCHAR +STARTCHAR 00ac +ENCODING 172 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +fc +fc +0c +0c +0c +00 +00 +ENDCHAR +STARTCHAR 00ad +ENCODING 173 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +f0 +f0 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00ae +ENCODING 174 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +3c +66 +7e +76 +76 +7e +76 +76 +76 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00af +ENCODING 175 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +f0 +f0 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00b0 +ENCODING 176 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +38 +6c +6c +38 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00b1 +ENCODING 177 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +18 +18 +7e +18 +18 +7e +00 +00 +ENDCHAR +STARTCHAR 00b2 +ENCODING 178 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +38 +6c +0c +18 +30 +60 +7c +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00b3 +ENCODING 179 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +38 +6c +0c +38 +0c +6c +38 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00b4 +ENCODING 180 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +0c +18 +30 +60 +00 +00 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00b5 +ENCODING 181 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +66 +66 +66 +66 +6e +7e +60 +60 +ENDCHAR +STARTCHAR 00b6 +ENCODING 182 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3e +76 +76 +76 +76 +36 +16 +16 +16 +16 +16 +1e +ENDCHAR +STARTCHAR 00b7 +ENCODING 183 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +18 +18 +00 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00b8 +ENCODING 184 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +00 +18 +18 +30 +ENDCHAR +STARTCHAR 00b9 +ENCODING 185 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +30 +70 +30 +30 +30 +30 +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00ba +ENCODING 186 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +1c +36 +36 +1c +00 +3e +00 +00 +00 +00 +00 +00 +ENDCHAR +STARTCHAR 00bb +ENCODING 187 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +70 +38 +1c +0e +1c +38 +70 +00 +00 +ENDCHAR +STARTCHAR 00bc +ENCODING 188 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +32 +76 +34 +3c +3c +1a +36 +2e +6e +46 +00 +00 +ENDCHAR +STARTCHAR 00bd +ENCODING 189 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +32 +76 +34 +3c +3c +1c +3a +26 +6c +4e +00 +00 +ENDCHAR +STARTCHAR 00be +ENCODING 190 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +62 +36 +74 +3c +78 +1e +36 +6e +4e +06 +00 +00 +ENDCHAR +STARTCHAR 00bf +ENCODING 191 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +0c +0c +00 +0c +0c +0c +0c +0c +66 +66 +3c +ENDCHAR +STARTCHAR 00c0 +ENCODING 192 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +38 +1c +00 +3c +7e +66 +66 +66 +7e +66 +66 +66 +00 +00 +ENDCHAR +STARTCHAR 00c1 +ENCODING 193 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +1c +38 +00 +3c +7e +66 +66 +66 +7e +66 +66 +66 +00 +00 +ENDCHAR +STARTCHAR 00c2 +ENCODING 194 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +3c +00 +3c +7e +66 +66 +66 +7e +66 +66 +66 +00 +00 +ENDCHAR +STARTCHAR 00c3 +ENCODING 195 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +14 +28 +00 +3c +7e +66 +66 +66 +7e +66 +66 +66 +00 +00 +ENDCHAR +STARTCHAR 00c4 +ENCODING 196 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +24 +24 +00 +3c +7e +66 +66 +66 +7e +66 +66 +66 +00 +00 +ENDCHAR +STARTCHAR 00c5 +ENCODING 197 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +18 +00 +3c +7e +66 +66 +66 +7e +66 +66 +66 +00 +00 +ENDCHAR +STARTCHAR 00c6 +ENCODING 198 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +7e +d8 +d8 +d8 +dc +f8 +d8 +d8 +d8 +de +00 +00 +ENDCHAR +STARTCHAR 00c7 +ENCODING 199 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +3c +66 +66 +60 +60 +60 +60 +66 +66 +3c +18 +30 +ENDCHAR +STARTCHAR 00c8 +ENCODING 200 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +38 +1c +00 +7e +60 +60 +60 +7c +60 +60 +60 +7e +00 +00 +ENDCHAR +STARTCHAR 00c9 +ENCODING 201 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +1c +38 +00 +7e +60 +60 +60 +7c +60 +60 +60 +7e +00 +00 +ENDCHAR +STARTCHAR 00ca +ENCODING 202 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +3c +00 +7e +60 +60 +60 +7c +60 +60 +60 +7e +00 +00 +ENDCHAR +STARTCHAR 00cb +ENCODING 203 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +24 +24 +00 +7e +60 +60 +60 +7c +60 +60 +60 +7e +00 +00 +ENDCHAR +STARTCHAR 00cc +ENCODING 204 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +38 +1c +00 +7e +18 +18 +18 +18 +18 +18 +18 +7e +00 +00 +ENDCHAR +STARTCHAR 00cd +ENCODING 205 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +1c +38 +00 +7e +18 +18 +18 +18 +18 +18 +18 +7e +00 +00 +ENDCHAR +STARTCHAR 00ce +ENCODING 206 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +3c +00 +7e +18 +18 +18 +18 +18 +18 +18 +7e +00 +00 +ENDCHAR +STARTCHAR 00cf +ENCODING 207 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +24 +24 +00 +7e +18 +18 +18 +18 +18 +18 +18 +7e +00 +00 +ENDCHAR +STARTCHAR 00d0 +ENCODING 208 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +78 +6c +66 +66 +fe +66 +66 +66 +6c +78 +00 +00 +ENDCHAR +STARTCHAR 00d1 +ENCODING 209 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +14 +28 +00 +66 +76 +76 +76 +6e +6e +6e +66 +66 +00 +00 +ENDCHAR +STARTCHAR 00d2 +ENCODING 210 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +38 +1c +00 +3c +66 +66 +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00d3 +ENCODING 211 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +1c +38 +00 +3c +66 +66 +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00d4 +ENCODING 212 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +3c +00 +3c +66 +66 +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00d5 +ENCODING 213 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +14 +28 +00 +3c +66 +66 +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00d6 +ENCODING 214 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +24 +24 +00 +3c +66 +66 +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00d7 +ENCODING 215 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +c6 +6c +38 +38 +6c +c6 +82 +00 +00 +ENDCHAR +STARTCHAR 00d8 +ENCODING 216 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +02 +02 +3c +6e +6e +6e +6e +76 +76 +76 +76 +3c +40 +40 +ENDCHAR +STARTCHAR 00d9 +ENCODING 217 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +38 +1c +00 +66 +66 +66 +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00da +ENCODING 218 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +1c +38 +00 +66 +66 +66 +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00db +ENCODING 219 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +18 +3c +00 +66 +66 +66 +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00dc +ENCODING 220 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +24 +24 +00 +66 +66 +66 +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00dd +ENCODING 221 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +1c +38 +00 +66 +66 +66 +3c +3c +3c +18 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 00de +ENCODING 222 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +60 +60 +7c +66 +66 +66 +66 +7c +60 +60 +00 +00 +ENDCHAR +STARTCHAR 00df +ENCODING 223 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +1c +36 +36 +36 +3c +36 +36 +36 +36 +7c +00 +00 +ENDCHAR +STARTCHAR 00e0 +ENCODING 224 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +30 +18 +0c +00 +3c +66 +1e +36 +66 +66 +3e +00 +00 +ENDCHAR +STARTCHAR 00e1 +ENCODING 225 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +0c +18 +30 +00 +3c +66 +1e +36 +66 +66 +3e +00 +00 +ENDCHAR +STARTCHAR 00e2 +ENCODING 226 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +3c +00 +3c +66 +1e +36 +66 +66 +3e +00 +00 +ENDCHAR +STARTCHAR 00e3 +ENCODING 227 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +14 +28 +00 +3c +66 +1e +36 +66 +66 +3e +00 +00 +ENDCHAR +STARTCHAR 00e4 +ENCODING 228 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +24 +24 +00 +3c +66 +1e +36 +66 +66 +3e +00 +00 +ENDCHAR +STARTCHAR 00e5 +ENCODING 229 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +18 +3c +18 +00 +3c +66 +1e +36 +66 +66 +3e +00 +00 +ENDCHAR +STARTCHAR 00e6 +ENCODING 230 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +7c +da +3a +5e +d8 +de +7c +00 +00 +ENDCHAR +STARTCHAR 00e7 +ENCODING 231 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +3c +66 +60 +60 +60 +66 +3c +18 +30 +ENDCHAR +STARTCHAR 00e8 +ENCODING 232 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +30 +18 +0c +00 +3c +66 +66 +7e +60 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00e9 +ENCODING 233 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +0c +18 +30 +00 +3c +66 +66 +7e +60 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00ea +ENCODING 234 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +3c +00 +3c +66 +66 +7e +60 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00eb +ENCODING 235 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +24 +24 +00 +3c +66 +66 +7e +60 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00ec +ENCODING 236 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +30 +18 +0c +00 +18 +18 +18 +18 +18 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 00ed +ENCODING 237 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +0c +18 +30 +00 +18 +18 +18 +18 +18 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 00ee +ENCODING 238 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +3c +00 +18 +18 +18 +18 +18 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 00ef +ENCODING 239 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +24 +24 +00 +18 +18 +18 +18 +18 +18 +18 +00 +00 +ENDCHAR +STARTCHAR 00f0 +ENCODING 240 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +28 +10 +2c +0c +3c +6c +6c +6c +6c +6c +38 +00 +00 +ENDCHAR +STARTCHAR 00f1 +ENCODING 241 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +14 +28 +00 +7c +66 +66 +66 +66 +66 +66 +00 +00 +ENDCHAR +STARTCHAR 00f2 +ENCODING 242 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +30 +18 +0c +00 +3c +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00f3 +ENCODING 243 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +0c +18 +30 +00 +3c +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00f4 +ENCODING 244 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +3c +00 +3c +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00f5 +ENCODING 245 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +14 +28 +00 +3c +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00f6 +ENCODING 246 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +24 +24 +00 +3c +66 +66 +66 +66 +66 +3c +00 +00 +ENDCHAR +STARTCHAR 00f7 +ENCODING 247 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +00 +00 +00 +00 +30 +00 +fc +00 +30 +00 +00 +ENDCHAR +STARTCHAR 00f8 +ENCODING 248 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +00 +02 +04 +3c +6e +6e +76 +76 +66 +3c +40 +40 +ENDCHAR +STARTCHAR 00f9 +ENCODING 249 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +20 +30 +18 +08 +66 +66 +66 +66 +66 +66 +3e +00 +00 +ENDCHAR +STARTCHAR 00fa +ENCODING 250 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +04 +0c +18 +10 +66 +66 +66 +66 +66 +66 +3e +00 +00 +ENDCHAR +STARTCHAR 00fb +ENCODING 251 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +18 +3c +00 +66 +66 +66 +66 +66 +66 +3e +00 +00 +ENDCHAR +STARTCHAR 00fc +ENCODING 252 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +24 +24 +00 +66 +66 +66 +66 +66 +66 +3e +00 +00 +ENDCHAR +STARTCHAR 00fd +ENCODING 253 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +04 +0c +18 +10 +66 +66 +66 +3c +1c +1c +18 +78 +30 +ENDCHAR +STARTCHAR 00fe +ENCODING 254 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +60 +60 +60 +7c +66 +66 +66 +66 +66 +7c +60 +60 +ENDCHAR +STARTCHAR 00ff +ENCODING 255 +SWIDTH 480 0 +DWIDTH 7 0 +BBX 7 14 0 -2 +BITMAP +00 +00 +24 +24 +00 +66 +66 +66 +3c +1c +1c +18 +78 +30 +ENDCHAR +ENDFONT diff --git a/widget/milsko/milskosrc/resource/font/IBMPlexMono-Bold.ttf b/widget/milsko/milskosrc/resource/font/IBMPlexMono-Bold.ttf new file mode 100644 index 0000000000000000000000000000000000000000..42f52ea7f5dc6625208bce227ef5a03b3958ed9f GIT binary patch literal 36184 zcmbuo31D1DkvHD`Mw&zCjAo>fG#cs6tz$;VjPCpNDWCEk$F^*bW!btc$#!CM1m_@e zOb8#wNfvSt!jX^!Cz~a<$c3{&0)d!a{w#;XLI?rEwaW&UW$n@TtA6jzj1D{S{Vn&r zo__CjS65e6S65f{FwPjW;3I{Zmn_+^>ha9CdKvpjD@u#j3{-_5dHai#jPZN%eb=7R z!HG2EFHhp(T`1eO=g73Io3*^on5h=`SL}-pPIuO4?qlra5Ac2azKNkx{nk%4FqZlp zo}U^ToSIq}$^7vS#?p<9jW+I&4(=_zx$6?1EyDf!{V331rvp5E z1HOCrk51o^eZ;pF-~Ymxv~Og5&*1O>_`S1e|0a~(Had92g!Dsx8u=UWygWKSd4u%6 zM*;txfKM`x4UR^iu3tUE*bSX%{u>kHQ`7$47r)2Y9cZ7wFfkdOSjMNy7&BDkd5IBj zB(697{FM*y%x?V?E7AQ5CG2O9{-lGhzgSg#-|Xetpmd$?cX-ywBr3%}LMM;?jxpV@ zaQ}*Qov2BM~}%Jeb0{br<9JpoB>&(hM##<4R9Z zg1Xi8Ol}PklFVc3T01}l`+xTf(fYLH$c%{j8PM zCjF)0dszM3!IZyJv|AScYiD-Ur~Fx23u>c(IyDsmBKo%hC6p@y-8bTzCOC(9CzE}E z&CbpuM|qh&ggl@9)9lY@FR1T|TVOD~U^4NI)0-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1!pHQ zty@^D+GiAt2-iN+VD)|{r-gKeO-YU~s<0F$RX!IYGC8aZ8v5{XsFC+lX%MC8*9q^tw+Rfl0qP zZpWXP5bQ;D2X24eH`&V9Sdy*08Wv?`bY}Fxd295B7~Jg)7OnQt$b$O3L=({zAMa+f z@cY(_&3l{Co5@`2jjzMSxz4TbdK!`Iok)qar*2dQme%z^4wpGxN?4FU+y;})`E*pK znUZcK4}!owz$%MAa;+N+!v19+RLCCW%i;*!KQ$xaffBxh;vK#Y^5 zUW1g8m%S0=7nvd~t1a$P)3yt;0JQ-1t*EaCwQdE{802$m(Q7a|9xFr({8aRj*%;`H$o=jlG_{ ziO6X?a(>`hPKl7yL7w6l`=4e-?i|12{|u{h&#Lq6;Ci0@`!BM8|0Uj`US=)x6(n#$ zy~@6=*ErStb@c}8AQxFnd5iv5$hK>7y8aHc<9F42?D~J7z5O4Mtv_Tx?MJ+CT~*h} z;v2k!Tvs2Hk#DG*%r8D+5AA^I-4ce!s^QTdh?p6^({ zF;6t!UAlDXy6^%gXBq!F&a`^K=v)4KA_J~JxaD2&bUY`7f}HRXG_oUKHh9 zMZx2|RK9pA)Q z$og}~)ayg_(vwhcFZskyW*$!>3#G2zN5OL*2b51SX5nRYzt^L^2PUfxz1|rms|%`k gmM1de&A!JQGzD(;_jCX3$@8z@uKpfB>mUF953Z)4Gynhq literal 0 HcmV?d00001 diff --git a/widget/milsko/milskosrc/resource/font/OpenSans-Bold.ttf b/widget/milsko/milskosrc/resource/font/OpenSans-Bold.ttf new file mode 100644 index 0000000000000000000000000000000000000000..e62bd81424ea7e6932a58330d058fcc7e6bb559e GIT binary patch literal 36548 zcmbTf31C#!^*?^^dvErc%s!Kq%w)0<0t7NyOi0KOAjAM62?=H(QkH;#ARwXwQkD=R zDB=Q0(JDnnq=>;%M2j016xUko*IKk{ty@L3mRg16<@dSgO+rBF_xt}(m@{wQa?iQv zoO{l>=bk$-&KPq6C@fG}*)V>~{nO$ZyKN87CQq1{o40HJuO4EIi|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dsw9R5#B|HP90b9BMYU8x+l`J7ESr6L}>+PP_VSMTv{w z^VP_Yi+(}fAqMA*n|Noh+it`w{7FO|I)O_a$Bm?R8RuUfrN7#5v=gW!=h+=bft2AS zsT^-_A0HpjyVgAlaMXMu9M!%5CvAdiSO3pmu9%D-%uK4xh8sb^>{*xSgn29SJ zgNf(EsMKEG%39pscYE*2v;8OAGy~n`vKg4Dgr&%>4EqIh%5#%y@eC4c=J;|Zz3r^^h2u77W-FJmH1lP;gMyFdHpd3t7&$ftH;%oVC(;DQt9rYC*h|!#hNF;W&(! z!eUkizGaUmg%4nE#6cXVUxnEshw#kqb$9~oHF#6R>*O%r`1E=_muWDk=?$3IcNB94 z-iZ6^#}M(|EN{ZGunpa#oyW*7+}C|Go^*H%?lRtrdtAqHPvq@#o4fbK7LN#C-27<)P5Pjb>6$=1DJ(%H=ZN@5N0KPL_R7XlaHgz zF5t}L^SB!J9r=blFJF)cfh+t9JiSHW)BhM9Y`!{rXy63uC{eA9Vd+z%$^k*(Z literal 0 HcmV?d00001 diff --git a/widget/milsko/milskosrc/resource/font/OpenSans-Regular.ttf b/widget/milsko/milskosrc/resource/font/OpenSans-Regular.ttf new file mode 100644 index 0000000000000000000000000000000000000000..d9b361f9765892463f692d9e2eef8060d6102d1e GIT binary patch literal 35264 zcmb5W3qVy>_CLP&Ip;pP+&3=~xR)y+q9R-nL6n;U;u{ehuA2GIEc30InI!@~Ghc}K zz|6?d3=Pf9oZe+G$LV2B(>Oh*rWwbnzD?649R8oZ?ghbe=J!X>y62v=&suA*z4qE` zt-a1=oH1qxP?)Q*uypi}Z7beqZ2ciz?LKyVYWgFY^@|wehw**tjCs=*82(5} zTpKZC*%Fs!bR^nZy5s)A*|VlCd7+!ekLQ=*d%xKWZl8Dmv{N?5w38XrHQzpM@d6gc zJdCZog8SCn?^-c?)(ZbKjM<79E4gdVtZ6gDLhHW=?%ufHe-18Ka`FDCr3ejq1jUq|PpPBSeA9GCt;+_I|+AZUUGF)J7+Bn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0T>)7Ue`694PKnL z{_d`5RpX2kE~<2aVHJ%Ri~QOo4eOHM?9V{wwTUlU??GluL2X0|kv-k$8}=v*GtQC= zpTz8hw77rs?Ae=xr(4qaW;~Rck_xp?D4p6(03_rP<`4yKsMN<|1huM34P`9NT+7zE zu;Vvkd zS?dprvO`?^Ef9)P%Y2iw$dTwEFw_Ja)xc410wY^gG6_uOvyjyV(M@tl%&8GuNkyF0 z>nI&M9!=9Ay&r`SM|m3q>$)O0VA<^#FRJCTUM|7F4z-G;F!JTnuM%z~=`X`AT<#)k zdMDhw+TFk9uiXLz@2c8K-gRBAn%(3@a&1C|Koos+C4_o%2YP9cSdcQ3#tc%c)xS7A zXq>_9>Jtk0_v%4BA=C!bEe!UfuJeWunHWYxikHb3>Zv%9nnTvQQp40jvak*;L|i;> bRO`P1-wwX#Td@@@00000NkvXXu0mjf$x!kG literal 0 HcmV?d00001 diff --git a/widget/milsko/milskosrc/resource/logo/banner.pov b/widget/milsko/milskosrc/resource/logo/banner.pov new file mode 100644 index 0000000000..0f4e3ec7f0 --- /dev/null +++ b/widget/milsko/milskosrc/resource/logo/banner.pov @@ -0,0 +1,54 @@ +#declare BASE = 1; +#include "resource/logo/logo.pov" + +#ifdef(VERSION) +object { + text { + ttf "resource/font/IBMPlexSerif.ttf", + VERSION, + 1, 0 + } + scale 5 + translate <7.5, 0, 1> + pigment { + color Red + } + finish { + phong 1 + reflection 0.3 + } +} +#end + +object { + text { + ttf "resource/font/IBMPlexSerif.ttf", +#ifdef(NODEJS) + "for Node.JS", +#else + "Milsko Toolkit", +#end + 1, 0 + } + scale 2 +#ifdef(NODEJS) + translate <5, -1, -1> +#else + translate <2.5, -1, -1> +#end + pigment { + color White + } + finish { + phong 1 + reflection 0.3 + } +} + +camera { + location <8+5, 2.5, -37.5> + look_at <7, 0.75, 0> + angle 35 + up <0, 1, 0> + right image_width / image_height * x +} diff --git a/widget/milsko/milskosrc/resource/logo/banner_10.pov b/widget/milsko/milskosrc/resource/logo/banner_10.pov new file mode 100644 index 0000000000..a306e9829b --- /dev/null +++ b/widget/milsko/milskosrc/resource/logo/banner_10.pov @@ -0,0 +1,2 @@ +#declare VERSION="1.0"; +#include "resource/logo/banner.pov" diff --git a/widget/milsko/milskosrc/resource/logo/logo.png b/widget/milsko/milskosrc/resource/logo/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2efaaebbb18fd41e4610b6fb3064f481e563a834 GIT binary patch literal 34923 zcmV*rKt#WZP)vL{-=_8&?fgn1w3%ll|mO*@fi3 z3lIqd0Td7s5rGIqLe)hA7+0-TL`3in|0UTt=8LUWr$muE+zCI)bzr-mtsS$DfIE7R zZHv<>o}T>a$xo-KMa#k*E!QDfcUojla3HXmd9G~~I%_jH+}w|28uBuFpT*F5dAWM? zO7$D%@02@{{lQ-Dk=FFb4_g)$5g^?AzWcWMwgsV3BYAc(>)L+)Y(IY3!-K7>n2qg7 z2zu_iC;CNI%~VxIL_|eoUJdrbtsh86t{{i8&+`_ck~YTaE}OQgHtcZ zJt9;GtlfjPc&}O_2jJN9>E!?X6Mz5RduIWev7U$@xCf5jC(ACSr47)WjEDryKrKzK zf@B>5L^a!c9qTvb(9218&sr=)a#wRVi+uyK?-Y0c>n}$-f!r`@P29y@Z`KwwL`3hg z@6KAP(i+U%j7Hig3mr7Ey@yDsswz~KxB;p_xVw89a-UfM;ioF9peM;~8ar6jAax*U zr`?B@l|xv@d-vX>ci(rG6nE@9_C0v@&cTSPn5mhl(icTUsQSZ0@7)RX$#BQjMjxZS zLYDyAxDd2P=?dq$qYSn?sITXI<}SHL=VVA~G)Rw(Sv_hD&$e^X;O9!*seJEjTq5k^ zhInW_N>XoLa^Xu6BwP~D4M5#PgVhzuOM3%v*R zD(5R^g8`~401-{{GI-j)M{{3FQ7}=@3z|5^DCNjLNP#fL)~{BVoButNSMmMZp!yB6 zZGGE109AQ>Y(Iat$H(^gs1FaiEL4dCSxmb#kW8%z!pUh+DUpPmGBXxnEauEE4r_H0 z<1(Tpp`SFW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;n5U+mma50(oTk#tlkQWXF| zo`g!tLEr6IVkt4GZ@GxqFPr*@;a34Ra)X9S(J}o?uu@ji>FxFhk`LsG7>)R-;_&9I z*9(?hVUW?NEe+M2MU5xY`rQN6PX)z|FLC1sN|)X_+`aXs0QIoSR(p2O%G>f-N~eB0 ziZI~?wIyD;dfg?%F#;V`eG(uH>o+4ixVqYndt?)=(T8il$-Zpc%TNr}tbJCI!no*) zqY6gu@j8~W1wR1}@w)N4FrNgd-5r{buF0mFn)ICzDpI zHQVC5bAOAzWS1+6c5*mYmB(T`xP~Rm=?Z@VSt}lKi_1#I00000NkvXXu0mjfJ@UN> literal 0 HcmV?d00001 diff --git a/widget/milsko/milskosrc/resource/logo/logo.pov b/widget/milsko/milskosrc/resource/logo/logo.pov new file mode 100644 index 0000000000..5348056ecd --- /dev/null +++ b/widget/milsko/milskosrc/resource/logo/logo.pov @@ -0,0 +1,97 @@ +#include "shapes.inc" +#include "colors.inc" +#include "textures.inc" +#include "skies.inc" + +object { + O_Cloud1 +} + +sky_sphere { + pigment { + gradient y + color_map { + [0.0 White*0.8] + [0.2 rgb<0.2 0.2 0.7>] + } + } +} + +union { +object { + Cube + translate <-1, 0, 1> + pigment { + color Red + } +} + +object { + Cube + translate <1, 0, 1> + pigment { + color Cyan + } +} + +object { + Cube + translate <-1, 0, -1> + pigment { + color Blue + } +} + +object { + Cube + translate <1, 0, -1> + pigment { + color Green + } +} + +object { + Cube + translate <0, 2, 0> + pigment { + color Red + } +} + +rotate <0, clock * 360, 0> +} + +plane { + y, -1 + pigment { + checker Red Gray + } + finish { + phong 1 + reflection 0.5 + } +} + +light_source { + <-250, 250, -500> + color White*2 + parallel point_at <0, 0, 0> +} + +#ifndef(FAR) +#declare FAR = 1; +#end + +#ifndef(Y) +#declare Y = 0; +#end + +#ifndef(BASE) +camera { + location <1.5 * FAR, 2.5 + Y, -10 * FAR> + look_at <0, 0.75 + Y, 0> + angle 35 + up <0, 1, 0> + right image_width / image_height * x +} +#end diff --git a/widget/milsko/milskosrc/resource/logo/overlay-102x47.png b/widget/milsko/milskosrc/resource/logo/overlay-102x47.png new file mode 100644 index 0000000000000000000000000000000000000000..aa3667af628ad5d48b8a4545d204679458e159da GIT binary patch literal 454 zcmeAS@N?(olHy`uVBq!ia0vp^X+W&c!3HD+JN6#~QjEnx?oNz1PwLbIIV|apzK#qG z8~eHcB(ehe3dtTpz6=aiY77hwEes65fIFdh=lADj0o1t;fn*g8- zxIA4PLn>~)y?u67vw?ua!{95NNoSap?`eZ6G_33 zRqNdr34GpCQ?5CCxvK5_+^r_{{J44i>0Ds z`FYEc*L&;wE`GHuGm)r`y=m)y>g22YzjbueUcb3`Ebrsu$lB*d)#-nyzd3cTY}wfv zc9+*hsGalMbX)GB*y| + + + Copyright © 2017 Drew DeVault + + Permission to use, copy, modify, distribute, and sell this + software and its documentation for any purpose is hereby granted + without fee, provided that the above copyright notice appear in + all copies and that both that copyright notice and this permission + notice appear in supporting documentation, and that the name of + the copyright holders not be used in advertising or publicity + pertaining to distribution of the software without specific, + written prior permission. The copyright holders make no + representations about the suitability of this software for any + purpose. It is provided "as is" without express or implied + warranty. + + THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF + THIS SOFTWARE. + + + + + Clients can use this interface to assign the surface_layer role to + wl_surfaces. Such surfaces are assigned to a "layer" of the output and + rendered with a defined z-depth respective to each other. They may also be + anchored to the edges and corners of a screen and specify input handling + semantics. This interface should be suitable for the implementation of + many desktop shell components, and a broad number of other applications + that interact with the desktop. + + + + + Create a layer surface for an existing surface. This assigns the role of + layer_surface, or raises a protocol error if another role is already + assigned. + + Creating a layer surface from a wl_surface which has a buffer attached + or committed is a client error, and any attempts by a client to attach + or manipulate a buffer prior to the first layer_surface.configure call + must also be treated as errors. + + After creating a layer_surface object and setting it up, the client + must perform an initial commit without any buffer attached. + The compositor will reply with a layer_surface.configure event. + The client must acknowledge it and is then allowed to attach a buffer + to map the surface. + + You may pass NULL for output to allow the compositor to decide which + output to use. Generally this will be the one that the user most + recently interacted with. + + Clients can specify a namespace that defines the purpose of the layer + surface. + + + + + + + + + + + + + + + + + These values indicate which layers a surface can be rendered in. They + are ordered by z depth, bottom-most first. Traditional shell surfaces + will typically be rendered between the bottom and top layers. + Fullscreen shell surfaces are typically rendered at the top layer. + Multiple surfaces can share a single layer, and ordering within a + single layer is undefined. + + + + + + + + + + + + + This request indicates that the client will not use the layer_shell + object any more. Objects that have been created through this instance + are not affected. + + + + + + + An interface that may be implemented by a wl_surface, for surfaces that + are designed to be rendered as a layer of a stacked desktop-like + environment. + + Layer surface state (layer, size, anchor, exclusive zone, + margin, interactivity) is double-buffered, and will be applied at the + time wl_surface.commit of the corresponding wl_surface is called. + + Attaching a null buffer to a layer surface unmaps it. + + Unmapping a layer_surface means that the surface cannot be shown by the + compositor until it is explicitly mapped again. The layer_surface + returns to the state it had right after layer_shell.get_layer_surface. + The client can re-map the surface by performing a commit without any + buffer attached, waiting for a configure event and handling it as usual. + + + + + Sets the size of the surface in surface-local coordinates. The + compositor will display the surface centered with respect to its + anchors. + + If you pass 0 for either value, the compositor will assign it and + inform you of the assignment in the configure event. You must set your + anchor to opposite edges in the dimensions you omit; not doing so is a + protocol error. Both values are 0 by default. + + Size is double-buffered, see wl_surface.commit. + + + + + + + + Requests that the compositor anchor the surface to the specified edges + and corners. If two orthogonal edges are specified (e.g. 'top' and + 'left'), then the anchor point will be the intersection of the edges + (e.g. the top left corner of the output); otherwise the anchor point + will be centered on that edge, or in the center if none is specified. + + Anchor is double-buffered, see wl_surface.commit. + + + + + + + Requests that the compositor avoids occluding an area with other + surfaces. The compositor's use of this information is + implementation-dependent - do not assume that this region will not + actually be occluded. + + A positive value is only meaningful if the surface is anchored to one + edge or an edge and both perpendicular edges. If the surface is not + anchored, anchored to only two perpendicular edges (a corner), anchored + to only two parallel edges or anchored to all edges, a positive value + will be treated the same as zero. + + A positive zone is the distance from the edge in surface-local + coordinates to consider exclusive. + + Surfaces that do not wish to have an exclusive zone may instead specify + how they should interact with surfaces that do. If set to zero, the + surface indicates that it would like to be moved to avoid occluding + surfaces with a positive exclusive zone. If set to -1, the surface + indicates that it would not like to be moved to accommodate for other + surfaces, and the compositor should extend it all the way to the edges + it is anchored to. + + For example, a panel might set its exclusive zone to 10, so that + maximized shell surfaces are not shown on top of it. A notification + might set its exclusive zone to 0, so that it is moved to avoid + occluding the panel, but shell surfaces are shown underneath it. A + wallpaper or lock screen might set their exclusive zone to -1, so that + they stretch below or over the panel. + + The default value is 0. + + Exclusive zone is double-buffered, see wl_surface.commit. + + + + + + + Requests that the surface be placed some distance away from the anchor + point on the output, in surface-local coordinates. Setting this value + for edges you are not anchored to has no effect. + + The exclusive zone includes the margin. + + Margin is double-buffered, see wl_surface.commit. + + + + + + + + + + Types of keyboard interaction possible for layer shell surfaces. The + rationale for this is twofold: (1) some applications are not interested + in keyboard events and not allowing them to be focused can improve the + desktop experience; (2) some applications will want to take exclusive + keyboard focus. + + + + + This value indicates that this surface is not interested in keyboard + events and the compositor should never assign it the keyboard focus. + + This is the default value, set for newly created layer shell surfaces. + + This is useful for e.g. desktop widgets that display information or + only have interaction with non-keyboard input devices. + + + + + Request exclusive keyboard focus if this surface is above the shell surface layer. + + For the top and overlay layers, the seat will always give + exclusive keyboard focus to the top-most layer which has keyboard + interactivity set to exclusive. If this layer contains multiple + surfaces with keyboard interactivity set to exclusive, the compositor + determines the one receiving keyboard events in an implementation- + defined manner. In this case, no guarantee is made when this surface + will receive keyboard focus (if ever). + + For the bottom and background layers, the compositor is allowed to use + normal focus semantics. + + This setting is mainly intended for applications that need to ensure + they receive all keyboard events, such as a lock screen or a password + prompt. + + + + + This requests the compositor to allow this surface to be focused and + unfocused by the user in an implementation-defined manner. The user + should be able to unfocus this surface even regardless of the layer + it is on. + + Typically, the compositor will want to use its normal mechanism to + manage keyboard focus between layer shell surfaces with this setting + and regular toplevels on the desktop layer (e.g. click to focus). + Nevertheless, it is possible for a compositor to require a special + interaction to focus or unfocus layer shell surfaces (e.g. requiring + a click even if focus follows the mouse normally, or providing a + keybinding to switch focus between layers). + + This setting is mainly intended for desktop shell components (e.g. + panels) that allow keyboard interaction. Using this option can allow + implementing a desktop shell that can be fully usable without the + mouse. + + + + + + + Set how keyboard events are delivered to this surface. By default, + layer shell surfaces do not receive keyboard events; this request can + be used to change this. + + This setting is inherited by child surfaces set by the get_popup + request. + + Layer surfaces receive pointer, touch, and tablet events normally. If + you do not want to receive them, set the input region on your surface + to an empty region. + + Keyboard interactivity is double-buffered, see wl_surface.commit. + + + + + + + This assigns an xdg_popup's parent to this layer_surface. This popup + should have been created via xdg_surface::get_popup with the parent set + to NULL, and this request must be invoked before committing the popup's + initial state. + + See the documentation of xdg_popup for more details about what an + xdg_popup is and how it is used. + + + + + + + When a configure event is received, if a client commits the + surface in response to the configure event, then the client + must make an ack_configure request sometime before the commit + request, passing along the serial of the configure event. + + If the client receives multiple configure events before it + can respond to one, it only has to ack the last configure event. + + A client is not required to commit immediately after sending + an ack_configure request - it may even ack_configure several times + before its next surface commit. + + A client may send multiple ack_configure requests before committing, but + only the last request sent before a commit indicates which configure + event the client really is responding to. + + + + + + + This request destroys the layer surface. + + + + + + The configure event asks the client to resize its surface. + + Clients should arrange their surface for the new states, and then send + an ack_configure request with the serial sent in this configure event at + some point before committing the new surface. + + The client is free to dismiss all but the last configure event it + received. + + The width and height arguments specify the size of the window in + surface-local coordinates. + + The size is a hint, in the sense that the client is free to ignore it if + it doesn't resize, pick a smaller size (to satisfy aspect ratio or + resize in steps of NxM pixels). If the client picks a smaller size and + is anchored to two opposite anchors (e.g. 'top' and 'bottom'), the + surface will be centered on this axis. + + If the width or height arguments are zero, it means the client should + decide its own window dimension. + + + + + + + + + The closed event is sent by the compositor when the surface will no + longer be shown. The output may have been destroyed or the user may + have asked for it to be removed. Further changes to the surface will be + ignored. The client should destroy the resource after receiving this + event, and create a new surface if they so choose. + + + + + + + + + + + + + + + + + + + + + + Change the layer that the surface is rendered on. + + Layer is double-buffered, see wl_surface.commit. + + + + + diff --git a/widget/milsko/milskosrc/src/abstract/charset.c b/widget/milsko/milskosrc/src/abstract/charset.c new file mode 100644 index 0000000000..3bd76252ff --- /dev/null +++ b/widget/milsko/milskosrc/src/abstract/charset.c @@ -0,0 +1,95 @@ +#include + +#ifndef CP_UTF8 +#define CP_UTF8 65001 +#endif + +char* MwACPToUTF8(const char* input) { +#if defined(_WIN32) && defined(MW_HAS_WCHAR) + int mbbytes = (strlen(input) + 1) * 4; + int wbytes = 0; + int len; + + wchar_t* wout; + char* mbout = malloc(mbbytes); + + wbytes = MultiByteToWideChar(CP_ACP, 0, input, strlen(input), NULL, 0) * sizeof(wchar_t); + if(wbytes == 0) { + free(mbout); + return MwStringDuplicate(input); + } + + wout = malloc(wbytes + sizeof(wchar_t)); + len = wbytes / sizeof(wchar_t); + + memset(wout, 0, wbytes); + memset(mbout, 0, mbbytes); + + len = MultiByteToWideChar(CP_ACP, 0, input, strlen(input), wout, len); + if(len == 0) { + free(mbout); + free(wout); + return MwStringDuplicate(input); + } + wout[len] = 0; + + len = WideCharToMultiByte(CP_UTF8, 0, wout, len, mbout, mbbytes, 0, 0); + if(len == 0) { + free(mbout); + free(wout); + return MwStringDuplicate(input); + } + mbout[len] = 0; + + free(wout); + + return mbout; +#else + return MwStringDuplicate(input); +#endif +} + +char* MwUTF8ToACP(const char* input) { +#if defined(_WIN32) && defined(MW_HAS_WCHAR) + int mbbytes = (strlen(input) + 1) * 4; + int wbytes = 0; + int len; + + wchar_t* wout; + char* mbout = malloc(mbbytes); + + wbytes = MultiByteToWideChar(CP_UTF8, 0, input, strlen(input), NULL, 0) * sizeof(wchar_t); + if(wbytes == 0) { + free(mbout); + return MwStringDuplicate(input); + } + + wout = malloc(wbytes + sizeof(wchar_t)); + len = wbytes / sizeof(wchar_t); + + memset(wout, 0, wbytes); + memset(mbout, 0, mbbytes); + + len = MultiByteToWideChar(CP_UTF8, 0, input, strlen(input), wout, len); + if(len == 0) { + free(mbout); + free(wout); + return MwStringDuplicate(input); + } + wout[len] = 0; + + len = WideCharToMultiByte(CP_ACP, 0, wout, len, mbout, mbbytes, 0, 0); + if(len == 0) { + free(mbout); + free(wout); + return MwStringDuplicate(input); + } + mbout[len] = 0; + + free(wout); + + return mbout; +#else + return MwStringDuplicate(input); +#endif +} diff --git a/widget/milsko/milskosrc/src/abstract/directory.c b/widget/milsko/milskosrc/src/abstract/directory.c new file mode 100644 index 0000000000..ac5a382d1e --- /dev/null +++ b/widget/milsko/milskosrc/src/abstract/directory.c @@ -0,0 +1,223 @@ +#include + +#ifdef _WIN32 +typedef struct dir { + HANDLE hFind; + WIN32_FIND_DATA ffd; + int next; +} dir_t; +#elif defined(CLASSIC_MAC_OS) +typedef struct dir { + int dummy; +} dir_t; +#else +typedef struct dir { + DIR* dir; + char* base; +} dir_t; +#endif + +void* MwDirectoryOpen(const char* path) { + dir_t* dir = malloc(sizeof(*dir)); +#ifdef _WIN32 + char* p = malloc(strlen(path) + 2 + 1); + strcpy(p, path); + if(strchr(path, '/') != NULL) { + strcat(p, "/"); + } else { + strcat(p, "\\"); + } + strcat(p, "*"); + if((dir->hFind = FindFirstFile(p, &dir->ffd)) == INVALID_HANDLE_VALUE) { + free(p); + free(dir); + return NULL; + } + free(p); + dir->next = 1; +#elif defined(CLASSIC_MAC_OS) +/* todo */ +#else + if((dir->dir = opendir(path)) == NULL) { + free(dir); + return NULL; + } + dir->base = malloc(strlen(path) + 1); + strcpy(dir->base, path); +#endif + + return dir; +} + +void MwDirectoryClose(void* handle) { + dir_t* dir = handle; +#ifdef _WIN32 + FindClose(dir->hFind); +#elif defined(CLASSIC_MAC_OS) +/* todo */ +#else + closedir(dir->dir); + free(dir->base); +#endif + free(handle); +} + +MwDirectoryEntry* MwDirectoryRead(void* handle) { + dir_t* dir = handle; + MwDirectoryEntry* entry = malloc(sizeof(*entry)); +#ifdef _WIN32 + ULARGE_INTEGER* l; + + if(!dir->next) return NULL; + + entry->name = MwStringDuplicate(dir->ffd.cFileName); + if(dir->ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { + entry->type = MwDIRECTORY_DIRECTORY; + } else { + entry->type = MwDIRECTORY_FILE; + } + entry->size = 0; + + entry->size = entry->size << 32; + entry->size |= dir->ffd.nFileSizeHigh; + entry->size = entry->size << 32; + entry->size |= dir->ffd.nFileSizeLow; + + l = (ULARGE_INTEGER*)&dir->ffd.ftLastWriteTime; + + entry->mtime = l->QuadPart / 10000000 - 11644473600; + + dir->next = FindNextFile(dir->hFind, &dir->ffd); +#elif defined(CLASSIC_MAC_OS) +/* todo */ +#else + struct dirent* d; + struct stat s; + char* p; + if((d = readdir(dir->dir)) == NULL) { + free(entry); + return NULL; + } + entry->name = MwStringDuplicate(d->d_name); + + p = malloc(strlen(dir->base) + 1 + strlen(d->d_name) + 1); + strcpy(p, dir->base); + strcat(p, "/"); + strcat(p, d->d_name); + + stat(p, &s); + if(S_ISDIR(s.st_mode)) { + entry->type = MwDIRECTORY_DIRECTORY; + } else { + entry->type = MwDIRECTORY_FILE; + } + entry->size = s.st_size; + entry->mtime = s.st_mtime; + + free(p); +#endif + + return entry; +} + +void MwDirectoryFreeEntry(MwDirectoryEntry* entry) { + free(entry->name); + free(entry); +} + +char* MwDirectoryCurrent(void) { +#ifdef _WIN32 + int len = GetCurrentDirectory(0, NULL); + char* out = malloc(len); + + GetCurrentDirectory(len, out); + + return out; +#elif CLASSIC_MAC_OS + return ""; +#else + return getcwd(NULL, 0); +#endif +} + +#ifdef _WIN32 +#define DIRSEP '\\' +#else +#define DIRSEP '/' +#endif +static void MwDirectoryJoinSingle(char* target, char* p) { + int i; + if(strcmp(p, ".") == 0) return; + + for(i = strlen(target) - 1; i >= 0; i--) { + if(target[i] == DIRSEP) { + target[i] = 0; + } else { + break; + } + } + + if(strcmp(p, "..") == 0) { + for(i = strlen(target) - 1; i >= 0; i--) { + if(target[i] != DIRSEP) { + target[i] = 0; + } else { + break; + } + } + } else { + char b[2]; + b[0] = DIRSEP; + b[1] = 0; + + strcat(target, b); + strcat(target, p); + } + + for(i = strlen(target) - 1; i >= 0; i--) { + if(target[i] == DIRSEP) { + target[i] = 0; + } else { + break; + } + } + + if(strchr(target, DIRSEP) == NULL) { + char b[2]; + b[0] = DIRSEP; + b[1] = 0; + + strcat(target, b); + } +} + +char* MwDirectoryJoin(char* a, char* b) { + char* p = malloc(strlen(a) + 1 + strlen(b) + 1); + char* bdup = MwStringDuplicate(b); + char* b2 = bdup; + int i; + + strcpy(p, a); + for(i = strlen(p) - 1; i >= 0; i--) { + if(p[i] == DIRSEP) { + p[i] = 0; + } else { + break; + } + } + while(b2 != NULL) { + char* current = b2; + + b2 = strchr(b2, DIRSEP); + if(b2 != NULL) { + b2[0] = 0; + } + + MwDirectoryJoinSingle(p, current); + + if(b2 != NULL) b2++; + } + free(bdup); + + return p; +} diff --git a/widget/milsko/milskosrc/src/abstract/dynamic.c b/widget/milsko/milskosrc/src/abstract/dynamic.c new file mode 100644 index 0000000000..58bc8312d6 --- /dev/null +++ b/widget/milsko/milskosrc/src/abstract/dynamic.c @@ -0,0 +1,63 @@ +#include + +#if defined(_WIN32) +void* MwDynamicOpen(const char* path) { + return LoadLibrary(path); +} + +void* MwDynamicSymbol(void* handle, const char* symbol) { + return GetProcAddress(handle, symbol); +} + +void MwDynamicClose(void* handle) { + FreeLibrary(handle); +} +#elif defined(CLASSIC_MAC_OS) +void* MwDynamicOpen(const char* path) { + // CFragConnectionID connID; + // Ptr* addr; + // unsigned char err[255]; + + // if(GetSharedLibrary((ConstStr63Param)path, kPowerPCCFragArch, kPrivateCFragCopy, + // &connID, addr, err)) { + // printf("Error getting %s: %s\n", path, err); + // return NULL; + // }; + // return connID; + printf("MwDynamicOpen not implemented yet.\n"); + getchar(); + return NULL; +} + +void* MwDynamicSymbol(void* handle, const char* symbol) { + // CFragConnectionID connID = (CFragConnectionID)handle; + // Ptr* symAddr; + // CFragSymbolClass* symClass; + // OSErr err; + // if((err = FindSymbol(connID, (ConstStr63Param)symbol, symAddr, symClass))) { + // printf("Error getting %s: %d\n", symbol, err); + // return NULL; + // }; + // return symAddr; + printf("MwDynamicSymbol not implemented yet.\n"); + getchar(); + return NULL; +} + +void MwDynamicClose(void* handle) { + // CFragConnectionID connID = (CFragConnectionID)handle; + // CloseConnection(&connID); +} +#elif defined(__unix__) || defined(__APPLE__) || defined(__HAIKU__) +void* MwDynamicOpen(const char* path) { + return dlopen(path, RTLD_LOCAL | RTLD_LAZY); +} + +void* MwDynamicSymbol(void* handle, const char* symbol) { + return dlsym(handle, symbol); +} + +void MwDynamicClose(void* handle) { + dlclose(handle); +} +#endif diff --git a/widget/milsko/milskosrc/src/abstract/time.c b/widget/milsko/milskosrc/src/abstract/time.c new file mode 100644 index 0000000000..59e9774526 --- /dev/null +++ b/widget/milsko/milskosrc/src/abstract/time.c @@ -0,0 +1,79 @@ +#include + +#if defined(_WIN32) +long MwTimeGetTick(void) { + return timeGetTime(); +} + +void MwTimeSleep(int ms) { + Sleep(ms); +} +#elif defined(__APPLE__) +long MwTimeGetTick(void) { + struct timespec ts; + long n = 0; + clock_serv_t cclock; + mach_timespec_t mts; + + host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); + clock_get_time(cclock, &mts); + mach_port_deallocate(mach_task_self(), cclock); + + n += ts.tv_nsec / 1000 / 1000; + n += ts.tv_sec * 1000; + + return n; +} +void MwTimeSleep(int ms) { + struct timespec ts; + + ts.tv_sec = ms / 1000; + ts.tv_nsec = (ms % 1000) * 1000 * 1000; + + nanosleep(&ts, NULL); +} +#elif defined(CLASSIC_MAC_OS) +// static TMTask tm; +// static int timer; +// void timerUpdateFunc(void) { +// timer += 1; +// PrimeTime((QElemPtr)&tm, 1); +// }; + +long MwTimeGetTick(void) { + UnsignedWide h; + Microseconds(&h); + return h.lo; +} +void MwTimeSleep(int ms) { + // tm.tmAddr = NewTimerProc(timerUpdateFunc); + // tm.tmWakeUp = 0; + // tm.tmReserved = 0; + + // InsTime((QElemPtr)&tm); + // PrimeTime((QElemPtr)&tm, 1); + + // DisposeTimerUPP(tm.tmAddr); +} +#elif defined(__unix__) || defined(__HAIKU__) +long MwTimeGetTick(void) { + struct timespec ts; + long n = 0; + + clock_gettime(CLOCK_MONOTONIC, &ts); + + n += ts.tv_nsec / 1000 / 1000; + n += ts.tv_sec * 1000; + + return n; +} + +void MwTimeSleep(int ms) { + struct timespec ts; + + ts.tv_sec = ms / 1000; + ts.tv_nsec = (ms % 1000) * 1000000; + + nanosleep(&ts, NULL); +} +#endif diff --git a/widget/milsko/milskosrc/src/backend/.gitignore b/widget/milsko/milskosrc/src/backend/.gitignore new file mode 100644 index 0000000000..137387c58f --- /dev/null +++ b/widget/milsko/milskosrc/src/backend/.gitignore @@ -0,0 +1 @@ +wayland*protocol.c diff --git a/widget/milsko/milskosrc/src/backend/cairo.c b/widget/milsko/milskosrc/src/backend/cairo.c new file mode 100644 index 0000000000..0c26ff3c61 --- /dev/null +++ b/widget/milsko/milskosrc/src/backend/cairo.c @@ -0,0 +1,265 @@ +#include + +#include "../../external/stb_ds.h" + +cairo_call_table_t cairo_call_tbl; + +void MwLLCairoPolygon(struct _MwLLCairo handle, MwPoint* points, int points_count, MwLLColor color) { + int i; + cairo_set_source_rgba(handle.front_cairo, color->common.red / 255.0, color->common.green / 255.0, color->common.blue / 255.0, 1.0); + cairo_new_path(handle.front_cairo); + for(i = 0; i < points_count; i++) { + if(i == 0) { + cairo_move_to(handle.front_cairo, points[i].x, points[i].y); + } else { + cairo_line_to(handle.front_cairo, points[i].x, points[i].y); + } + } + cairo_close_path(handle.front_cairo); + + cairo_set_operator(handle.front_cairo, CAIRO_OPERATOR_SOURCE); + cairo_fill(handle.front_cairo); + cairo_set_operator(handle.front_cairo, CAIRO_OPERATOR_OVER); +}; + +void MwLLCairoLine(struct _MwLLCairo handle, MwPoint* points, MwLLColor color) { + int i; + + cairo_set_antialias(handle.front_cairo, CAIRO_ANTIALIAS_NONE); + cairo_set_line_cap(handle.front_cairo, CAIRO_LINE_CAP_SQUARE); + cairo_set_source_rgba(handle.front_cairo, color->common.red / 255.0, color->common.green / 255.0, color->common.blue / 255.0, 1.0); + cairo_new_path(handle.front_cairo); + for(i = 0; i < 2; i++) { + if(i == 0) { + cairo_move_to(handle.front_cairo, points[i].x, points[i].y); + } else { + cairo_line_to(handle.front_cairo, points[i].x, points[i].y); + } + } + cairo_close_path(handle.front_cairo); + cairo_stroke(handle.front_cairo); +}; + +MwLLPixmap MwLLCairoCreatePixmap(struct _MwLLCairo handle, unsigned char* data, int width, int height) { + MwLLPixmap r = malloc(sizeof(*r)); + (void)handle; + + if(width >= INT16_MAX) width = INT16_MAX; + if(height >= INT16_MAX) height = INT16_MAX; + + r->common.width = width; + r->common.height = height; + r->common.raw = malloc(4 * width * height); + memcpy(r->common.raw, data, 4 * width * height); + + r->wayland.cs = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height); + + MwLLPixmapUpdate(r); + + return r; +} + +void MwLLCairoPixmapUpdate(MwLLPixmap r) { + int i; + unsigned char* d; + + cairo_surface_flush(r->wayland.cs); + d = cairo_image_surface_get_data(r->wayland.cs); + for(i = 0; i < r->common.width * r->common.height * 4; i += 4) { + MwU32* p = (MwU32*)&d[i]; + *p <<= 8; + *p |= r->common.raw[i + 3]; + *p <<= 8; + *p |= r->common.raw[i + 0]; + *p <<= 8; + *p |= r->common.raw[i + 1]; + *p <<= 8; + *p |= r->common.raw[i + 2]; + } + cairo_surface_mark_dirty(r->wayland.cs); +} + +void MwLLCairoDestroyPixmap(MwLLPixmap pixmap) { + cairo_surface_destroy(pixmap->wayland.cs); + free(pixmap->common.raw); + free(pixmap); +} + +void MwLLCairoDrawPixmap(struct _MwLLCairo handle, MwRect* rect, MwLLPixmap pixmap) { + cairo_t* c; + cairo_surface_t* cs; + cairo_t* selected_cairo = handle.selected_cairo ? handle.selected_cairo : handle.front_cairo; + cs = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, rect->width, rect->height); + c = cairo_create(cs); + + if(rect->width <= 0 || rect->height <= 0 || pixmap->common.width <= 0 || pixmap->common.height <= 0) return; + if(rect->width >= INT16_MAX) rect->width = INT16_MAX; + if(rect->height >= INT16_MAX) rect->height = INT16_MAX; + + cairo_scale(c, (double)rect->width / pixmap->common.width, (double)rect->height / pixmap->common.height); + + cairo_set_source_surface(c, pixmap->cairo.cs, 0, 0); + cairo_pattern_set_filter(cairo_get_source(c), CAIRO_FILTER_NEAREST); + + cairo_set_operator(handle.front_cairo, CAIRO_OPERATOR_OVER); + + cairo_paint(c); + + cairo_set_source_surface(selected_cairo, cs, rect->x, rect->y); + cairo_paint(selected_cairo); + + cairo_destroy(c); + cairo_surface_destroy(cs); +}; + +void MwLLCairoFrontSetup(struct _MwLLCairo* cairo, MwU8* data, MwU32 width, MwU32 height) { + if(data) { + cairo->front_cs = cairo_image_surface_create_for_data(data, CAIRO_FORMAT_ARGB32, width, height, width * 4); + } else { + cairo->front_cs = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height); + } + cairo->front_cairo = cairo_create(cairo->front_cs); +} + +void MwLLCairoBackSetup(struct _MwLLCairo* cairo, MwU8* data, MwU32 width, MwU32 height) { + if(data) { + cairo->back_cs = cairo_image_surface_create_for_data(data, CAIRO_FORMAT_ARGB32, width, height, width * 4); + } else { + cairo->back_cs = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height); + } + cairo->back_cairo = cairo_create(cairo->back_cs); +} + +void MwLLCairoFrontDestroy(struct _MwLLCairo* cairo) { + cairo_destroy(cairo->front_cairo); + cairo_surface_destroy(cairo->front_cs); +}; +void MwLLCairoBackDestroy(struct _MwLLCairo* cairo) { + cairo_destroy(cairo->back_cairo); + cairo_surface_destroy(cairo->back_cs); +}; + +void MwLLCairoDestroy(struct _MwLLCairo handle) { + // MwLLCairoFrontDestroy(&handle); + // MwLLCairoBackDestroy(&handle); +} + +static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) { + MwLL r; + r = malloc(sizeof(*r)); + memset(r, 0, sizeof(*r)); + MwLLCreateCommon(r); + + r->cairo.width = width; + r->cairo.height = height; + r->cairo.x = x; + r->cairo.y = x; + + r->cairo.toplevel = !parent; + r->cairo.parent = parent; + + MwLLCairoFrontSetup(&r->cairo, NULL, r->cairo.width, r->cairo.height); + MwLLCairoBackSetup(&r->cairo, NULL, r->cairo.width, r->cairo.height); + + return r; +} +static void MwLLDestroyImpl(MwLL handle) { + MwLLCairoDestroy(handle->cairo); + free(handle); +} + +static void MwLLBeginDrawImpl(MwLL handle) { + handle->cairo.selected_cairo = handle->cairo.front_cairo; +} +static void MwLLEndDrawImpl(MwLL handle) { +} + +static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLLColor color) { + MwLLCairoPolygon(handle->cairo, points, points_count, color); +} +static void MwLLLineImpl(MwLL handle, MwPoint* points, MwLLColor color) { + MwLLCairoLine(handle->cairo, points, color); +} +static MwLLColor MwLLAllocColorImpl(MwLL handle, int r, int g, int b) { + MwLLColor c = malloc(sizeof(*c)); + MwLLColorUpdate(handle, c, r, g, b); + return c; +} + +static void MwLLColorUpdateImpl(MwLL handle, MwLLColor c, int r, int g, int b) { + (void)handle; + + c->common.red = r; + c->common.green = g; + c->common.blue = b; +} +static void MwLLGetXYWHImpl(MwLL handle, int* x, int* y, unsigned int* w, unsigned int* h) { + (void)handle; + *x = handle->cairo.x; + *y = handle->cairo.y; + *w = handle->cairo.width; + *h = handle->cairo.height; +} +static void MwLLSetXYImpl(MwLL handle, int x, int y) { + handle->cairo.x = x; + handle->cairo.y = y; +} +static void MwLLSetWHImpl(MwLL handle, int w, int h) { + handle->cairo.width = w; + handle->cairo.height = h; +} +static void MwLLFreeColorImpl(MwLLColor color) {} + +static MwBool lmao = MwFALSE; +static int MwLLPendingImpl(MwLL handle) { + lmao = !lmao; + return lmao; +} +static void MwLLNextEventImpl(MwLL handle) { + MwLLDispatch(handle, draw, NULL); +} +static void MwLLSetTitleImpl(MwLL handle, const char* title) {} +static MwLLPixmap MwLLCreatePixmapImpl(MwLL handle, unsigned char* data, int width, int height) { + return MwLLCairoCreatePixmap(handle->cairo, data, width, height); +} +static void MwLLPixmapUpdateImpl(MwLLPixmap r) { + MwLLCairoPixmapUpdate(r); +} +static void MwLLDestroyPixmapImpl(MwLLPixmap pixmap) { + MwLLCairoPixmapUpdate(pixmap); +} + +static void MwLLDrawPixmapImpl(MwLL handle, MwRect* rect, MwLLPixmap pixmap) { + MwLLCairoDrawPixmap(handle->cairo, rect, pixmap); +} +static void MwLLSetIconImpl(MwLL handle, MwLLPixmap pixmap) {} +static void MwLLForceRenderImpl(MwLL handle) {} +static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) {} +static void MwLLDetachImpl(MwLL handle, MwPoint* point) {} +static void MwLLShowImpl(MwLL handle, int show) {} +static void MwLLMakePopupImpl(MwLL handle, MwLL parent) {} +static void MwLLSetSizeHintsImpl(MwLL handle, int minx, int miny, int maxx, int maxy) {} +static void MwLLMakeBorderlessImpl(MwLL handle, int toggle) {} +static void MwLLFocusImpl(MwLL handle) {} +static void MwLLGrabPointerImpl(MwLL handle, int toggle) {} +static void MwLLSetClipboardImpl(MwLL handle, const char* text, int clipboard_type) {} +static void MwLLGetClipboardImpl(MwLL handle, int clipboard_type) {} +static void MwLLMakeToolWindowImpl(MwLL handle) {} +static void MwLLGetCursorCoordImpl(MwLL handle, MwPoint* point) {} +static void MwLLGetScreenSizeImpl(MwLL handle, MwRect* rect) {} +static void MwLLBeginStateChangeImpl(MwLL handle) {} +static void MwLLEndStateChangeImpl(MwLL handle) {} +static void MwLLSetDarkThemeImpl(MwLL handle, int toggle) {} +static MwBool MwLLDoModernImpl(MwLL handle) { + return MwFALSE; +} +static void MwLLRaiseImpl(MwLL handle) {} +static void MwLLClipImpl(MwLL handle, MwRect* rect) {} +static int MwLLCairoCallInitImpl(void) { + if(cairo_load_funcs() != 0) { + return 1; + } + return 0; +} +#include "call.c" +CALL(Cairo); diff --git a/widget/milsko/milskosrc/src/backend/call.c b/widget/milsko/milskosrc/src/backend/call.c new file mode 100644 index 0000000000..f84247f7d7 --- /dev/null +++ b/widget/milsko/milskosrc/src/backend/call.c @@ -0,0 +1,65 @@ +/* This file gets included by backend */ +#define CALL(NAME) \ + int MwLL##NAME##CallInit(void) { \ + int st; \ +\ + if((st = MwLL##NAME##CallInitImpl()) != 0) return st; \ +\ + MwLLCreate = MwLLCreateImpl; \ + MwLLDestroy = MwLLDestroyImpl; \ +\ + MwLLPolygon = MwLLPolygonImpl; \ + MwLLLine = MwLLLineImpl; \ + MwLLBeginDraw = MwLLBeginDrawImpl; \ + MwLLEndDraw = MwLLEndDrawImpl; \ +\ + MwLLAllocColor = MwLLAllocColorImpl; \ + MwLLColorUpdate = MwLLColorUpdateImpl; \ + MwLLFreeColor = MwLLFreeColorImpl; \ +\ + MwLLGetXYWH = MwLLGetXYWHImpl; \ + MwLLSetXY = MwLLSetXYImpl; \ + MwLLSetWH = MwLLSetWHImpl; \ +\ + MwLLSetTitle = MwLLSetTitleImpl; \ +\ + MwLLPending = MwLLPendingImpl; \ + MwLLNextEvent = MwLLNextEventImpl; \ +\ + MwLLCreatePixmap = MwLLCreatePixmapImpl; \ + MwLLPixmapUpdate = MwLLPixmapUpdateImpl; \ + MwLLDestroyPixmap = MwLLDestroyPixmapImpl; \ + MwLLDrawPixmap = MwLLDrawPixmapImpl; \ + MwLLSetIcon = MwLLSetIconImpl; \ +\ + MwLLForceRender = MwLLForceRenderImpl; \ +\ + MwLLSetCursor = MwLLSetCursorImpl; \ + MwLLDetach = MwLLDetachImpl; \ + MwLLShow = MwLLShowImpl; \ +\ + MwLLSetSizeHints = MwLLSetSizeHintsImpl; \ + MwLLMakeBorderless = MwLLMakeBorderlessImpl; \ + MwLLMakeToolWindow = MwLLMakeToolWindowImpl; \ + MwLLMakePopup = MwLLMakePopupImpl; \ +\ + MwLLBeginStateChange = MwLLBeginStateChangeImpl; \ + MwLLEndStateChange = MwLLEndStateChangeImpl; \ +\ + MwLLFocus = MwLLFocusImpl; \ + MwLLGrabPointer = MwLLGrabPointerImpl; \ +\ + MwLLSetClipboard = MwLLSetClipboardImpl; \ + MwLLGetClipboard = MwLLGetClipboardImpl; \ +\ + MwLLGetCursorCoord = MwLLGetCursorCoordImpl; \ + MwLLGetScreenSize = MwLLGetScreenSizeImpl; \ +\ + MwLLSetDarkTheme = MwLLSetDarkThemeImpl; \ + MwLLDoModern = MwLLDoModernImpl; \ +\ + MwLLRaise = MwLLRaiseImpl; \ +\ + MwLLClip = MwLLClipImpl; \ + return 0; \ + } diff --git a/widget/milsko/milskosrc/src/backend/classicmacos.c b/widget/milsko/milskosrc/src/backend/classicmacos.c new file mode 100644 index 0000000000..d3da454b12 --- /dev/null +++ b/widget/milsko/milskosrc/src/backend/classicmacos.c @@ -0,0 +1,391 @@ +#include +#include + +#include "../../external/stb_ds.h" + +static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) { + MwLL r; + r = malloc(sizeof(*r)); + memset(r, 0, sizeof(*r)); + MwLLCreateCommon(r); + + r->cmacos.parent = parent; + + if(x == MwDEFAULT) { + x = (qd.screenBits.bounds.right / 2) - (width / 2); + } + if(y == MwDEFAULT) { + y = (qd.screenBits.bounds.bottom / 2) - (height / 2); + } + + /* todo: how do we set parent windows? If we can't, what is our equivalant to MacOS's NSViews, Wayland's subsurfaces, etc.? */ + SetRect(&r->cmacos.winRect, x, y, width, height); + r->cmacos.window = newcwindow(nil, &r->cmacos.winRect, "", true, + documentProc, (WindowPtr)(-1), true, 0); + SetPort(r->cmacos.window); + + return r; +} + +static void MwLLDestroyImpl(MwLL handle) { + MwLLDestroyCommon(handle); + + free(handle); +} + +static void MwLLBeginDrawImpl(MwLL handle) { +} + +static void MwLLEndDrawImpl(MwLL handle) { +} + +static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLLColor color) { + int i; + PolyHandle p; + RGBColor col; + + SetPort(handle->cmacos.window); + BeginUpdate(handle->cmacos.window); + + p = OpenPoly(); + col.red = color->common.red * 0x101; + col.green = color->common.green * 0x101; + col.blue = color->common.blue * 0x101; + + for(i = 0; i < points_count; i++) { + if(i == 0) { + MoveTo(points[i].x, points[i].y); + } else { + LineTo(points[i].x, points[i].y); + } + } + + ClosePoly(); + + PenMode(patCopy); + RGBForeColor(&col); + PaintPoly(p); + + KillPoly(p); + + EndUpdate(handle->cmacos.window); +} + +static void MwLLLineImpl(MwLL handle, MwPoint* points, MwLLColor color) { + RGBColor col; + SetPort(handle->cmacos.window); + + col.red = color->common.red; + col.green = color->common.green; + col.blue = color->common.blue; + + RGBForeColor(&col); + + PenMode(patCopy); + + MoveTo(points[0].x, points[0].y); + LineTo(points[1].x, points[1].y); +} + +static MwLLColor MwLLAllocColorImpl(MwLL handle, int r, int g, int b) { + MwLLColor c = malloc(sizeof(*c)); + MwLLColorUpdate(handle, c, r, g, b); + return c; +} + +static void MwLLColorUpdateImpl(MwLL handle, MwLLColor c, int r, int g, int b) { + c->common.red = r; + c->common.green = g; + c->common.blue = b; +} + +static void MwLLGetXYWHImpl(MwLL handle, int* x, int* y, unsigned int* w, unsigned int* h) { + Rect bounds; + GetWindowBounds(handle->cmacos.window, kWindowContentRgn, &bounds); + *x = bounds.left; + *y = bounds.top; + *w = bounds.right; + *h = bounds.bottom; +} + +static void MwLLSetXYImpl(MwLL handle, int x, int y) { + MoveWindow(handle->cmacos.window, x, y, MwTRUE); +} + +static void MwLLSetWHImpl(MwLL handle, int w, int h) { + SizeWindow(handle->cmacos.window, w, h, MwTRUE); +} + +static void MwLLFreeColorImpl(MwLLColor color) { + free(color); +} + +static int MwLLPendingImpl(MwLL handle) { + YieldToAnyThread(); + return EventAvail(everyEvent, &handle->cmacos.event); +} + +static void MwLLNextEventImpl(MwLL handle) { + EventRecord event; + GetNextEvent(everyEvent, &event); + + switch(event.what) { + case updateEvt: + { + /* + This is our blocker for getting anything running. + This needs to be called at this point to start drawing anything. + ...It locks up and/or crashes the entire system. At least on SheepShaver. + It's not a stack overflow, it's not anything in the drawing functions. + It's *something* else. But because Classic Mac OS development is like + digging up forbidden tombs while stabbing yourself in the eye several times, + I don't know what. + + Fun fact: for as much as everyone loves to glaze about AI being the future + of programming, even Claude got confused when I gave up and tried to ask it + for help. Information about Classic Mac OS probably takes up 0.0001% of its + knowledge base; god knows it's hard enough finding information online about + this! + */ + MwLLDispatch(handle, draw, NULL); + } break; + case osEvt: + break; + case mouseUp: + { + // MwLLMouse m; + // m.button = MwLLMouseLeft; + // if(___curWindow->mouseButtonCallback != NULL) { + // int mods = MacModifiersToGLFWModifiers(event.modifiers); + + // if(___curWindow->keyStateMap[MK_LCTRL] == 1) { + // ___curWindow->mouseButtonCallback( + // ___curWindow, GLFW_MOUSE_BUTTON_RIGHT, GLFW_RELEASE, mods); + // } else { + // ___curWindow->mouseButtonCallback( + // ___curWindow, GLFW_MOUSE_BUTTON_LEFT, GLFW_RELEASE, mods); + // } + // } + } + case mouseDown: + { + // // start with callback stuff + // if(___curWindow->mouseButtonCallback != NULL) { + // int mods = MacModifiersToGLFWModifiers(event.modifiers); + + // if(___curWindow->keyStateMap[MK_LCTRL] == 1) { + // ___curWindow->mouseButtonCallback( + // ___curWindow, GLFW_MOUSE_BUTTON_RIGHT, GLFW_PRESS, mods); + // } else { + // ___curWindow->mouseButtonCallback( + // ___curWindow, GLFW_MOUSE_BUTTON_LEFT, GLFW_PRESS, mods); + // } + // } + + // then do system stuff + switch(FindWindow(event.where, &handle->cmacos.window)) { + case inDrag: + DragWindow(handle->cmacos.window, event.where, &qd.screenBits.bounds); + // if(___curWindow->windowPosCallback != NULL) { + // ___curWindow->windowPosCallback(___curWindow, event.where.h, + // event.where.v); + // } + break; + case inGrow: + { + long growResult = + GrowWindow(handle->cmacos.window, event.where, &qd.screenBits.bounds); + + int width = growResult & 0xFFFF; + int height = growResult >> 16; + + SizeWindow(handle->cmacos.window, growResult & 0xFFFF, growResult >> 16, true); + + Rect rect; + GetWindowBounds(handle->cmacos.window, kWindowStructureRgn, &rect); + rect.right = width; + rect.bottom = height; + SetWindowBounds(handle->cmacos.window, kWindowStructureRgn, &rect); + + // ___curWindow->width = width; + // ___curWindow->height = height; + + // if(___curWindow->windowSizeCallback != NULL) { + // ___curWindow->windowSizeCallback(___curWindow, width, height); + // } + // if(___curWindow->windowSetFramebufferSizeCallback != NULL) { + // ___curWindow->windowSetFramebufferSizeCallback(___curWindow, + // width, height); + // } + } break; + + case inGoAway: + { + if(TrackGoAway(handle->cmacos.window, event.where)) { + MwLLDispatch(handle, close, NULL); + // if(___curWindow->windowCloseCallback != NULL) { + // ___curWindow->windowCloseCallback(___curWindow); + // } + // ___curWindow->shouldClose = true; + } + } break; + } + } + case autoKey: + case keyDown: + case keyUp: + { + // // key char stuff + // unsigned char ch = (event.message & charCodeMask); + // if(*___curWindow->charCallback != NULL) { + // ___curWindow->charCallback(___curWindow, ch); + // } + + // // key state map + // unsigned char key = (event.message & keyCodeMask) >> 8; + // ___curWindow->keyStateMap[key] = 0; + // if(event.what == keyDown || event.what == autoKey) { + // ___curWindow->keyStateMap[key] &= 1; + // } + + // if(*___curWindow->keyCallback != NULL) { + // int key = MacKeyToGLFWKey(event.message); + // int scancode = (event.message & adbAddrMask) >> 16; + + // int mods = MacModifiersToGLFWModifiers(event.modifiers); + + // int action; + // if(event.what == keyUp) { + // action = GLFW_RELEASE; + // } else { + // action = GLFW_PRESS; + // } + // ___curWindow->keyCallback(___curWindow, key, scancode, action, + // mods); + // } + } + } + + FlushEvents(everyEvent, -1); + YieldToAnyThread(); +} + +static void MwLLSetTitleImpl(MwLL handle, const char* title) { + setwtitle(handle->cmacos.window, title); +} + +static MwLLPixmap MwLLCreatePixmapImpl(MwLL handle, unsigned char* data, int width, int height) { + MwLLPixmap r = malloc(sizeof(*r)); + + r->common.raw = malloc(4 * width * height); + memcpy(r->common.raw, data, 4 * width * height); + + MwLLPixmapUpdate(r); + return r; +} + +static void MwLLPixmapUpdateImpl(MwLLPixmap r) { +} + +static void MwLLDestroyPixmapImpl(MwLLPixmap pixmap) { +} + +static void MwLLDrawPixmapImpl(MwLL handle, MwRect* rect, MwLLPixmap pixmap) { +} + +static void MwLLSetIconImpl(MwLL handle, MwLLPixmap pixmap) { +} + +static void MwLLForceRenderImpl(MwLL handle) { +} + +static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) { +} + +static void MwLLDetachImpl(MwLL handle, MwPoint* point) { +} + +static void MwLLShowImpl(MwLL handle, int show) { + if(show) + ShowWindow(handle->cmacos.window); + else + HideWindow(handle->cmacos.window); +} + +static void MwLLMakePopupImpl(MwLL handle, MwLL parent) { +} + +static void MwLLSetSizeHintsImpl(MwLL handle, int minx, int miny, int maxx, int maxy) { +} + +static void MwLLMakeBorderlessImpl(MwLL handle, int toggle) { +} + +static void MwLLFocusImpl(MwLL handle) { + HiliteWindow(handle->cmacos.window, MwTRUE); +} + +static void MwLLGrabPointerImpl(MwLL handle, int toggle) { +} + +static void MwLLSetClipboardImpl(MwLL handle, const char* text, int clipboard_type) { + /* TODO */ + + (void)handle; + (void)text; +} + +static void MwLLGetClipboardImpl(MwLL handle, int clipboard_type) { +} + +static void MwLLMakeToolWindowImpl(MwLL handle) { +} + +static void MwLLGetCursorCoordImpl(MwLL handle, MwPoint* point) { +} + +static void MwLLGetScreenSizeImpl(MwLL handle, MwRect* rect) { +} + +static void MwLLBeginStateChangeImpl(MwLL handle) { + MwLLShow(handle, 0); +} + +static void MwLLEndStateChangeImpl(MwLL handle) { + MwLLShow(handle, 1); +} + +static void MwLLSetDarkThemeImpl(MwLL handle, int toggle) { + (void)handle; + (void)toggle; +} + +static MwBool MwLLDoModernImpl(MwLL handle) { + (void)handle; + return MwFALSE; +} + +static void MwLLRaiseImpl(MwLL handle) { + (void)handle; +} + +static void MwLLClipImpl(MwLL handle, MwRect* rect) { + (void)handle; + (void)rect; +} + +static int MwLLClassicMacOSCallInitImpl(void) { + InitGraf(&qd.thePort); + InitFonts(); + FlushEvents(everyEvent, 0); + InitWindows(); + InitMenus(); + TEInit(); + InitDialogs(0L); + InitCursor(); + + return 0; +} + +#include "call.c" +CALL(ClassicMacOS); diff --git a/widget/milsko/milskosrc/src/backend/cocoa.m b/widget/milsko/milskosrc/src/backend/cocoa.m new file mode 100644 index 0000000000..e07eb64112 --- /dev/null +++ b/widget/milsko/milskosrc/src/backend/cocoa.m @@ -0,0 +1,1199 @@ +/* + * some implementation notes to know: + * - Mac really does not like immediate mode drawing, there was some trick I tried where I rendered to a bitmap context but it was very slow. So instead we just convert it to a commands system which gets cleared out whenever MacOS Actually draws the window. + * - We override NSApplication to intercept sendEvent and know when an event has been sent. When it is, doPending is sent. The appropriate "pending" function then returns whether that's set (before resetting it). + * - We want the application to be *functional* on old MacOS, at a minimum of 10.4. There's obviously points where newer functions will have to be used, and in that case we use ObjC's "respondsToSelector" function to know if we can call the newer function. + */ + +#include +#include "../../external/stb_ds.h" +#include "Mw/LowLevel/Cocoa.h" + +#ifdef MW_VULKAN +#include +#include +#endif + +#ifdef __clang__ +#pragma clang push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif + +/* + * GNUStep has the modal session be a global singleton and once we assign it we can't do any more. This breaks several widgets. + * I barely care about supporting this so we'll just not support that, sorry. + */ +#ifndef __APPLE__ +static bool canAssignModalSession = MwTRUE; +#else +#define canAssignModalSession 1 +#endif + +/* Coordinate flipping function (global, rect) */ +static NSRect rectFlip(NSRect originFrame) { + NSScreen* zeroScreen = [[NSScreen screens] objectAtIndex:0]; + double screenHeight = [zeroScreen frame].size.height; + double originY = originFrame.origin.y; + double frameHeight = originFrame.size.height; + double destinationY = screenHeight - (originY + frameHeight); + NSRect destinationFrame = originFrame; + destinationFrame.origin.y = destinationY; + return destinationFrame; +} + +/* Coordinate flipping function (global, point) */ +static inline NSPoint pointFlip(NSPoint point) { + return rectFlip(NSMakeRect(point.x, point.y, 0, 0)).origin; +} + +/* Coordinate flipping function (local to view; rect) */ +static NSRect localRectFlip(NSRect originFrame, NSView* view) { + float viewHeight = [view bounds].size.height; + NSRect destinationFrame = + NSMakeRect(originFrame.origin.x, + [view bounds].size.height - + (originFrame.origin.y + originFrame.size.height), + originFrame.size.width, originFrame.size.height); + return destinationFrame; +} + +/* Coordinate flipping function (local to view; point) */ +static inline NSPoint localPointFlip(NSPoint point, NSView* view) { + return localRectFlip(NSMakeRect(point.x, point.y, 0, 0), view).origin; +} + +/* Recursively dispatch a key event to a widget and its children */ +static void recursive_dispatch_key(MwLL handle, int* k) { + MwWidget h = (MwWidget)handle->common.user; + MwLLDispatch(handle, key, k); + if(h) { + int i; + for(i = 0; i < arrlen(h->children); i++) { + MwLLDispatch(h->children[i]->lowlevel, key, k); + if(arrlen(h->children[i]->children) > 0) { + recursive_dispatch_key(h->children[i]->lowlevel, k); + } + } + } +}; +/* Recursively dispatch a key released event to a widget and its children */ +static void recursive_dispatch_key_released(MwLL handle, int* k) { + MwWidget h = (MwWidget)handle->common.user; + MwLLDispatch(handle, key_released, k); + if(h) { + int i; + for(i = 0; i < arrlen(h->children); i++) { + MwLLDispatch(h->children[i]->lowlevel, key_released, k); + if(arrlen(h->children[i]->children) > 0) { + recursive_dispatch_key_released(h->children[i]->lowlevel, k); + } + } + } +}; + +@implementation MilskoCocoaApplication +- (void)sendEvent:(NSEvent*)event { + self->doPending = MwTRUE; + [super sendEvent:event]; +} +- (MwBool)pending { + if(self->doPending) { + self->doPending = MwFALSE; + return MwTRUE; + } + return MwFALSE; +} +@end + +@implementation MilskoCocoaView +- (id)initWithFrame:(NSRect)frame { + [super initWithFrame:frame]; + self->commands = NULL; + return self; +} + +- (void)setChild { + self->_child = MwTRUE; +} +- (void)destroy { + arrfree(self->commands); +}; + +- (void)drawRect:(NSRect)dirtyRect { + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + int i; + + [super drawRect:dirtyRect]; + + for(i = 0; i < arrlen(self->commands); i++) { + draw_command cmd = self->commands[i]; + switch(cmd.type) { + case COCOA_DRAW_COMMAND_POLY: + { + int n; + NSBezierPath* path = [NSBezierPath bezierPath]; + + NSColor* nscolor = + [NSColor colorWithCalibratedRed:cmd.poly.color.red / 255. + green:cmd.poly.color.green / 255. + blue:cmd.poly.color.blue / 255. + alpha:1.0]; + + [nscolor setFill]; + for(n = 0; n < cmd.poly.points_count; n++) { + NSPoint p = localPointFlip(NSMakePoint(cmd.poly.points[n].x, cmd.poly.points[n].y), self); + p.x += [self bounds].origin.x; + p.y += [self bounds].origin.y; + if(n == 0) { + [path moveToPoint:p]; + } else { + [path lineToPoint:p]; + } + } + + [path closePath]; + [path fill]; + + free(cmd.poly.points); + } break; + + case COCOA_DRAW_COMMAND_LINES: + { + int n; + NSBezierPath* path = [NSBezierPath bezierPath]; + + NSColor* nscolor = + [NSColor colorWithCalibratedRed:cmd.lines.color.red / 255. + green:cmd.lines.color.green / 255. + blue:cmd.lines.color.blue / 255. + alpha:1.0]; + + [nscolor setFill]; + for(n = 0; n < 2; n++) { + NSPoint p = localPointFlip(NSMakePoint(cmd.lines.points[n].x, cmd.lines.points[n].y), self); + p.x += [self bounds].origin.x; + p.y += [self bounds].origin.y; + if(n == 0) { + [path moveToPoint:p]; + } else { + [path lineToPoint:p]; + } + } + + [path closePath]; + [path stroke]; + + free(cmd.lines.points); + } break; + + case COCOA_DRAW_COMMAND_PIXMAP: + { + NSRect rect = localRectFlip(NSMakeRect(cmd.pixmap.rect.x, cmd.pixmap.rect.y, cmd.pixmap.rect.width, cmd.pixmap.rect.height), self); + rect.origin.x += [self bounds].origin.x; + rect.origin.y += [self bounds].origin.y; + [cmd.pixmap.pixmap->cocoa.real->image + drawInRect:rect + fromRect:NSZeroRect + operation:NSCompositeSourceOver + fraction:1.0]; + MwLLDestroyPixmap(cmd.pixmap.pixmap); + } break; + } + } + + arrfree(self->commands); + + [pool release]; +} + +- (BOOL)isFlipped { + return NO; +} + +- (BOOL)canBecomeKeyView { + return YES; +} +- (BOOL)acceptsFirstResponder { + return YES; +} + +- (void)handleKeyEvent:(NSEvent*)ev ll:(MwLL)ll down:(MwBool)isDown { + int ch; + /* todo: consolidate these values into the below switch case. */ + enum { + kVK_ANSI_A = 0x00, + kVK_ANSI_S = 0x01, + kVK_ANSI_D = 0x02, + kVK_ANSI_F = 0x03, + kVK_ANSI_H = 0x04, + kVK_ANSI_G = 0x05, + kVK_ANSI_Z = 0x06, + kVK_ANSI_X = 0x07, + kVK_ANSI_C = 0x08, + kVK_ANSI_V = 0x09, + kVK_ANSI_B = 0x0B, + kVK_ANSI_Q = 0x0C, + kVK_ANSI_W = 0x0D, + kVK_ANSI_E = 0x0E, + kVK_ANSI_R = 0x0F, + kVK_ANSI_Y = 0x10, + kVK_ANSI_T = 0x11, + kVK_ANSI_1 = 0x12, + kVK_ANSI_2 = 0x13, + kVK_ANSI_3 = 0x14, + kVK_ANSI_4 = 0x15, + kVK_ANSI_6 = 0x16, + kVK_ANSI_5 = 0x17, + kVK_ANSI_Equal = 0x18, + kVK_ANSI_9 = 0x19, + kVK_ANSI_7 = 0x1A, + kVK_ANSI_Minus = 0x1B, + kVK_ANSI_8 = 0x1C, + kVK_ANSI_0 = 0x1D, + kVK_ANSI_RightBracket = 0x1E, + kVK_ANSI_O = 0x1F, + kVK_ANSI_U = 0x20, + kVK_ANSI_LeftBracket = 0x21, + kVK_ANSI_I = 0x22, + kVK_ANSI_P = 0x23, + kVK_ANSI_L = 0x25, + kVK_ANSI_J = 0x26, + kVK_ANSI_Quote = 0x27, + kVK_ANSI_K = 0x28, + kVK_ANSI_Semicolon = 0x29, + kVK_ANSI_Backslash = 0x2A, + kVK_ANSI_Comma = 0x2B, + kVK_ANSI_Slash = 0x2C, + kVK_ANSI_N = 0x2D, + kVK_ANSI_M = 0x2E, + kVK_ANSI_Period = 0x2F, + kVK_ANSI_Grave = 0x32, + kVK_Return = 0x24, + kVK_Space = 0x31, + kVK_Escape = 0x35, + kVK_Shift = 0x38, + kVK_Control = 0x3B, + kVK_RightShift = 0x3C, + kVK_RightControl = 0x3E, + kVK_LeftArrow = 0x7B, + kVK_RightArrow = 0x7C, + kVK_DownArrow = 0x7D, + kVK_UpArrow = 0x7E + }; +#define KEY_CASE(x, y) \ + case x: \ + ch = y; \ + break; + switch([ev keyCode]) { + KEY_CASE(kVK_ANSI_A, 'a') + KEY_CASE(kVK_ANSI_B, 'b') + KEY_CASE(kVK_ANSI_C, 'c') + KEY_CASE(kVK_ANSI_D, 'd') + KEY_CASE(kVK_ANSI_E, 'e') + KEY_CASE(kVK_ANSI_F, 'f') + KEY_CASE(kVK_ANSI_G, 'g') + KEY_CASE(kVK_ANSI_H, 'h') + KEY_CASE(kVK_ANSI_I, 'i') + KEY_CASE(kVK_ANSI_J, 'j') + KEY_CASE(kVK_ANSI_K, 'k') + KEY_CASE(kVK_ANSI_L, 'l') + KEY_CASE(kVK_ANSI_M, 'm') + KEY_CASE(kVK_ANSI_N, 'n') + KEY_CASE(kVK_ANSI_O, 'o') + KEY_CASE(kVK_ANSI_P, 'p') + KEY_CASE(kVK_ANSI_Q, 'q') + KEY_CASE(kVK_ANSI_R, 'r') + KEY_CASE(kVK_ANSI_S, 's') + KEY_CASE(kVK_ANSI_T, 't') + KEY_CASE(kVK_ANSI_U, 'u') + KEY_CASE(kVK_ANSI_V, 'v') + KEY_CASE(kVK_ANSI_W, 'w') + KEY_CASE(kVK_ANSI_X, 'x') + KEY_CASE(kVK_ANSI_Y, 'y') + KEY_CASE(kVK_ANSI_Z, 'z') + KEY_CASE(kVK_ANSI_0, '0') + KEY_CASE(kVK_ANSI_1, '1') + KEY_CASE(kVK_ANSI_2, '2') + KEY_CASE(kVK_ANSI_3, '3') + KEY_CASE(kVK_ANSI_4, '4') + KEY_CASE(kVK_ANSI_5, '5') + KEY_CASE(kVK_ANSI_6, '6') + KEY_CASE(kVK_ANSI_7, '7') + KEY_CASE(kVK_ANSI_8, '8') + KEY_CASE(kVK_ANSI_9, '9') + KEY_CASE(kVK_ANSI_Quote, '\"') + KEY_CASE(kVK_ANSI_Grave, '`') + KEY_CASE(kVK_ANSI_Backslash, '/') + KEY_CASE(kVK_ANSI_Comma, ',') + KEY_CASE(kVK_ANSI_Equal, '=') + KEY_CASE(kVK_Escape, MwKEY_ESCAPE) + KEY_CASE(kVK_ANSI_LeftBracket, '[') + KEY_CASE(kVK_ANSI_Minus, '-') + KEY_CASE(kVK_ANSI_Period, '.') + KEY_CASE(kVK_Return, MwKEY_ENTER) + KEY_CASE(kVK_ANSI_RightBracket, ']') + KEY_CASE(kVK_ANSI_Semicolon, ';') + KEY_CASE(kVK_ANSI_Slash, '\\') + KEY_CASE(kVK_Space, ' ') + KEY_CASE(kVK_Control, MwKEY_CONTROL) + KEY_CASE(kVK_RightControl, MwKEY_CONTROL) + KEY_CASE(kVK_Shift, MwKEY_LEFTSHIFT) + KEY_CASE(kVK_RightShift, MwKEY_RIGHTSHIFT) + KEY_CASE(kVK_DownArrow, MwKEY_DOWN) + KEY_CASE(kVK_LeftArrow, MwKEY_LEFT) + KEY_CASE(kVK_RightArrow, MwKEY_RIGHT) + KEY_CASE(kVK_UpArrow, MwKEY_UP) + } + if(isDown) { + recursive_dispatch_key(ll, &ch); + } else { + recursive_dispatch_key_released(ll, &ch); + } + [ll->cocoa.real nudge]; +} +- (void)mouseEntered:(NSEvent*)ev { + MwLL h = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer]; + MwLLDispatch(h, focus_in, NULL); + [h->cocoa.real pushCursor]; + [super mouseEntered:ev]; +} +- (void)mouseExited:(NSEvent*)ev { + MwLL h = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer]; + MwLLDispatch(h, focus_out, NULL); + [h->cocoa.real popCursor]; + [super mouseExited:ev]; +} +- (void)keyDown:(NSEvent*)ev { + MwLL h = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer]; + [self handleKeyEvent:ev ll:h down:MwTRUE]; + [super keyDown:ev]; +} +- (void)keyUp:(NSEvent*)ev { + MwLL h = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer]; + [self handleKeyEvent:ev ll:h down:MwFALSE]; + [super keyUp:ev]; +} + +- (void)mouseMoved:(NSEvent*)ev { + MwMouse mouse; + NSPoint mousePoint = [ev locationInWindow]; + MwLL this = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer]; + mouse.button = MwMOUSE_LEFT; + mouse.point.x = mousePoint.x; + mouse.point.y = mousePoint.y; + MwLLDispatch(this, move, &mouse); + [super mouseMoved:ev]; +} +- (BOOL)mouseDownCanMoveWindow { + return NO; +} + +- (void)mouseDown:(NSEvent*)ev { + MwMouse mouse; + NSPoint mousePoint = [ev locationInWindow]; + MwLL this = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer]; + mousePoint.y = [[ev window] frame].size.height - mousePoint.y; + mouse.button = MwMOUSE_LEFT; + mouse.point.x = mousePoint.x; + mouse.point.y = mousePoint.y; + MwLLDispatch(this, down, &mouse); + [super mouseDown:ev]; +} + +- (void)mouseUp:(NSEvent*)ev { + MwMouse mouse; + NSPoint mousePoint = [ev locationInWindow]; + MwLL this = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer]; + mousePoint.y = [[ev window] frame].size.height - mousePoint.y; + mouse.button = MwMOUSE_LEFT; + mouse.point.x = mousePoint.x; + mouse.point.y = mousePoint.y; + MwLLDispatch(this, up, &mouse); + [super mouseUp:ev]; +} +- (void)rightMouseDown:(NSEvent*)ev { + MwMouse mouse; + NSPoint mousePoint = [ev locationInWindow]; + MwLL this = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer]; + mousePoint.y = [[ev window] frame].size.height - mousePoint.y; + mouse.button = MwMOUSE_RIGHT; + mouse.point.x = mousePoint.x; + mouse.point.y = mousePoint.y; + MwLLDispatch(this, down, &mouse); + [super rightMouseDown:ev]; +} + +- (void)rightMouseUp:(NSEvent*)ev { + MwMouse mouse; + NSPoint mousePoint = [ev locationInWindow]; + MwLL this = [((MilskoFakePointer*)[[self subviews] objectAtIndex:0]) pointer]; + mousePoint.y = [[ev window] frame].size.height - mousePoint.y; + mouse.button = MwMOUSE_RIGHT; + mouse.point.x = mousePoint.x; + mouse.point.y = mousePoint.y; + MwLLDispatch(this, up, &mouse); + [super rightMouseUp:ev]; +} + +@end + +@implementation MilskoCocoaApplicationDelegate +- (MilskoCocoaApplicationDelegate*)initWithAppl:(MilskoCocoaApplication*)_appl { + self->appl = _appl; + return self; +} +@end + +@implementation MilskoCocoaWindowDelegate + +- (NSSize)windowWillResize:(NSWindow*)win toSize:(NSSize)frameSize; +{ + int i; + NSUInteger placeholder = [[[win contentView] subviews] count]; + for(i = 0; i < placeholder; i++) { + NSView* ptr = [[[win contentView] subviews] objectAtIndex:i]; + if([ptr isKindOfClass:[MilskoFakePointer class]]) { + MwLL h = [(MilskoFakePointer*)ptr pointer]; + MwLLDispatch(h, resize, NULL); + break; + } + } + return frameSize; +} + +- (void)windowDidBecomeMain:(NSNotification*)notification { + if([[[w contentView] subviews] count] != 0) { + MwLL h = [((MilskoFakePointer*)[[[w contentView] subviews] + objectAtIndex:0]) pointer]; + MwLLDispatch(h, focus_in, NULL); + } + [self->w makeKeyAndOrderFront:nil]; +} + +- (MilskoCocoaWindowDelegate*)initWithWin:(NSWindow*)win { + self->w = win; + return self; +} + +- (void)windowWillClose:(NSNotification*)notification { + if([[[w contentView] subviews] count] != 0) { + MwLL h = [((MilskoFakePointer*)[[[w contentView] subviews] + objectAtIndex:0]) pointer]; + MwLLDispatch(h, close, NULL); + h->cocoa.real->isClosing = MwTRUE; + } +} + +@end + +@implementation MilskoFakePointer +- (void)setPointer:(void*)pointer { + [self setFrame:*(NSRect*)&pointer]; + self->ptr = pointer; +}; +- (void*)pointer { + return self->ptr; +}; + +- (void)drawRect:(NSRect)dirtyRect { + /* explicitly do nothing */ + (void)dirtyRect; +} + +- (void)destroy { +} +@end + +@implementation MilskoCocoaWindow +- (BOOL)canBecomeKeyWindow { + return true; +} +- (BOOL)canBecomeMainWindow { + return true; +} + +@end + +@implementation MilskoCocoaPixmap ++ (MilskoCocoaPixmap*)newWithWidth:(int)width height:(int)height { + MilskoCocoaPixmap* p = [MilskoCocoaPixmap alloc]; + + p->width = width; + p->height = height; + p->image = NULL; + + p->buf = malloc(width * height * 4); + + p->rep = + [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:&p->buf + pixelsWide:(int)width + pixelsHigh:(int)height + bitsPerSample:8 + samplesPerPixel:4 + hasAlpha:YES + isPlanar:NO + colorSpaceName:NSDeviceRGBColorSpace + bytesPerRow:(int)width * 4 + bitsPerPixel:32]; + assert(p->rep); + + p->image = [[NSImage alloc] initWithSize:NSMakeSize(width, height)]; + assert(p->image); + [p->image addRepresentation:p->rep]; + + return p; +} +- (void)updateWithData:(unsigned char*)_data { + memcpy(self->buf, _data, width * height * 4); + if(self->rep) { + [self->image removeRepresentation:self->rep]; + [self->rep release]; + } + self->rep = + [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:&self->buf + pixelsWide:(int)width + pixelsHigh:(int)height + bitsPerSample:8 + samplesPerPixel:4 + hasAlpha:YES + isPlanar:NO + colorSpaceName:NSDeviceRGBColorSpace + bytesPerRow:(int)width * 4 + bitsPerPixel:32]; + assert(self->rep); + [self->image addRepresentation:self->rep]; +} +- (void)destroy { + free(self->buf); + [self->image removeRepresentation:self->rep]; + [self->image release]; + [self->rep release]; + self->image = NULL; + self->rep = NULL; +} +- (NSImage*)image { + return self->image; +} +@end + +@implementation MilskoCocoa +- (void)sendClipboardEvent { + /* Either uncomment this and make it use respondsToSelector and/or find out what the api proceeding NSPasteboard is. */ + /*NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + NSPasteboard* pasteboard = [NSPasteboard generalPasteboard]; + NSArray* items = @[ + @"public.utf8-plain-text", + @"public.utf16-external-plain-text", + @"com.apple.traditional-mac-plain-text", + ]; + MwLL this = self->handle.pointer; + + if([pasteboard canReadItemWithDataConformingToTypes:items]) { + char* data = NULL; + size_t size = 0; + for(NSPasteboardItem* item in [pasteboard pasteboardItems]) { + for(NSString* it in items) { + NSString* itemData = [item + stringForType:(NSString*)it]; if(itemData != NULL) { if(strHash != 0 && + strHash != [itemData hash]) { char* text = malloc([itemData length]); + strncpy(text, [itemData UTF8String], + [itemData length]); MwLLDispatch(this, clipboard, text); printf("%s -> %p\n", + text, this); free(text); + } + strHash = [itemData hash]; + } + } + } + } + + [pool release];*/ +} + +- (void)destroy { + [self->handle release]; + [self->window release]; +} + +- (MwLL)getParent { + return self->parent; +} + +- (NSView*)getView { + return view; +} +- (NSWindow*)getWindow { + return window; +} + +- (void)nudge { + MwLL topmost_parent = [self->handle pointer]; + MwWidget h; + + while(topmost_parent->cocoa.real->parent) topmost_parent = topmost_parent->cocoa.real->parent; + + if(!topmost_parent->cocoa.real->isClosing) + self->_eventsPending = MwTRUE; + + [topmost_parent->cocoa.real->view setNeedsDisplay:true]; + MwLLDispatch(topmost_parent, draw, NULL); + + h = (MwWidget)topmost_parent->common.user; + if(h) { + int i; + for(i = 0; i < arrlen(h->children); i++) { + [h->children[i]->lowlevel->cocoa.real->view setNeedsDisplay:true]; + MwLLDispatch(h->children[i]->lowlevel, draw, NULL); + } + } + + // MwLL p = self->parent; + // self->_eventsPending = MwTRUE; + + // while(p) { + // MwLLDispatch(p, draw, NULL); + // p = p->cocoa.real->parent; + // } +} + +- (void)pushCursor { + [self->cursor push]; +} +- (void)popCursor { + [self->cursor pop]; +} + +- (MilskoFakePointer*)getHandle { + return handle; +} + +@end + +static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) { + MwLL r; + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + MilskoCocoa* c = [MilskoCocoa alloc]; + r = malloc(sizeof(*r)); + + MwLLCreateCommon(r); + + [c retain]; + c->application = (MilskoCocoaApplication*)[MilskoCocoaApplication sharedApplication]; + [c->application retain]; + + /* + * MacOS doesn't really have a "default" window position, you're actually + * meant to center the window yourself, so if the user passes MwDEFAULT + * respond appropriately. Also for child windows just have it be 0. + */ + if(x == MwDEFAULT) { + x = parent ? 0 : ([[NSScreen mainScreen] frame].size.width / 2.) - (width / 2.); + } + if(y == MwDEFAULT) { + y = parent ? 0 : ([[NSScreen mainScreen] frame].size.height / 2.) - (height / 2.); + } + c->rect = NSMakeRect(x, y, width, height); + + if(parent == NULL) { + c->window = [[NSWindow alloc] + initWithContentRect:rectFlip(c->rect) + styleMask:(NSTitledWindowMask | + NSClosableWindowMask | NSMiniaturizableWindowMask | + NSResizableWindowMask) + backing:NSBackingStoreBuffered + defer:NO]; + [c->window + setDelegate:[[MilskoCocoaWindowDelegate alloc] initWithWin:c->window]]; + [c->window retain]; + + [c->window makeKeyAndOrderFront:c->application]; + [c->window makeFirstResponder:c->view]; + + c->view = [[MilskoCocoaView alloc] initWithFrame:c->rect]; + [c->view retain]; + [c->window setContentView:c->view]; + + /* In order for our application to be front and center when launched, we need to use this function introduced in 10.5. There's no function that works on 10.4 or below as far as I know because what you're actually supposed to do is use a feature of XCode project files to modify the settings of the compiled app to set the activation policy. */ + if([c->application respondsToSelector:@selector(setActivationPolicy:)]) { + [c->application + setActivationPolicy:0 /* NSApplicationActivationPolicyRegular */]; + } + + [c->application activateIgnoringOtherApps:MwTRUE]; + [c->application setDelegate:[[MilskoCocoaApplicationDelegate alloc] + initWithAppl:c->application]]; + [c->application retain]; + + [c->view addTrackingRect:c->rect owner:c->view userData:NULL assumeInside:MwFALSE]; + if(canAssignModalSession) + c->modalSession = [c->application beginModalSessionForWindow:c->window]; + +#ifndef __APPLE__ + canAssignModalSession = MwFALSE; +#endif + + } else { + MilskoCocoa* p = parent->cocoa.real; + NSRect rect = localRectFlip(c->rect, p->view); + + c->window = p->window; + c->view = [[MilskoCocoaView alloc] initWithFrame:rect]; + [c->view setBounds:rect]; + [c->view retain]; + [c->view setChild]; + + [c->view addTrackingRect:c->rect owner:c->view userData:NULL assumeInside:MwFALSE]; + + [p->view addSubview:c->view]; + + c->modalSession = p->modalSession; + } + [c->window setAcceptsMouseMovedEvents:MwTRUE]; + + c->handle = [[MilskoFakePointer alloc] initWithFrame:NSMakeRect(0, 0, 1, 1)]; + [c->handle retain]; + [c->handle setPointer:r]; + [c->view addSubview:c->handle]; + + c->parent = parent; + + c->_forceRender = MwTRUE; + c->strHash = 0; + + c->cursorPixmap = NULL; + + [c->application finishLaunching]; + + c->pointerLocked = MwFALSE; + + [pool release]; + + c->isClosing = MwFALSE; + + r->cocoa.real = c; + + return r; +} + +static void MwLLDestroyImpl(MwLL handle) { + MilskoCocoa* h = handle->cocoa.real; + + [h destroy]; + + MwLLDestroyCommon(handle); + + free(handle); +} + +static void MwLLBeginDrawImpl(MwLL handle) { + (void)handle; +} + +static void MwLLEndDrawImpl(MwLL handle) { + (void)handle; + // [handle->cocoa.real->view displayRect:[handle->cocoa.real->window frame]]; +} + +static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, + MwLLColor color) { + draw_command poly; + poly.type = COCOA_DRAW_COMMAND_POLY; + + poly.poly.color = color->common; + poly.poly.points_count = points_count; + + poly.poly.points = malloc(sizeof(MwPoint) * points_count); + memcpy(poly.poly.points, points, sizeof(MwPoint) * points_count); + + arrpush(handle->cocoa.real->view->commands, poly); + + [handle->cocoa.real nudge]; +} + +static void MwLLLineImpl(MwLL handle, MwPoint* points, MwLLColor color) { + draw_command lines; + lines.type = COCOA_DRAW_COMMAND_LINES; + + lines.lines.color = color->common; + + lines.lines.points = malloc(sizeof(MwPoint) * 2); + memcpy(lines.lines.points, points, sizeof(MwPoint) * 2); + + arrpush(handle->cocoa.real->view->commands, lines); + + [handle->cocoa.real nudge]; +} + +static MwLLColor MwLLAllocColorImpl(MwLL handle, int r, int g, int b) { + MwLLColor c = malloc(sizeof(*c)); + MwLLColorUpdate(handle, c, r, g, b); + return c; +} + +static void MwLLColorUpdateImpl(MwLL handle, MwLLColor c, int r, int g, int b) { + (void)handle; + + c->common.red = r; + c->common.green = g; + c->common.blue = b; +} + +static void MwLLGetXYWHImpl(MwLL handle, int* x, int* y, unsigned int* w, + unsigned int* h) { + MilskoCocoa* self = handle->cocoa.real; + NSRect frame; + if(self->parent) { + frame = [self->view frame]; + } else { + frame = [self->window frame]; + } + + if(!self->parent) { + frame = rectFlip(frame); + } else { + frame = localRectFlip(frame, self->parent->cocoa.real->view); + } + + *x = frame.origin.x; + *y = frame.origin.y; + + *w = frame.size.width; + *h = frame.size.height; +} + +static void MwLLSetXYImpl(MwLL handle, int x, int y) { + MilskoCocoa* self = handle->cocoa.real; + NSRect frame; + if(self->parent) { + frame = [self->view frame]; + } else { + frame = [self->window frame]; + } + + frame.origin.x = x; + frame.origin.y = y; + + if(!self->parent) { + frame = rectFlip(frame); + [self->window setFrame:frame display:MwTRUE animate:false]; + } else { + frame = localRectFlip(frame, self->parent->cocoa.real->view); + [self->view setFrame:frame]; + [self->view setBounds:frame]; + } + MwLLForceRender(handle); +} + +static void MwLLSetWHImpl(MwLL handle, int w, int h) { + MilskoCocoa* self = handle->cocoa.real; + NSRect frame; + if(self->parent) { + frame = [self->view frame]; + } else { + frame = [self->window frame]; + } + + frame.size.width = w; + frame.size.height = h; + + self->rect = frame; + + [self->view setFrameSize:frame.size]; + if(self->parent) { + [self->view setFrame:frame]; + [self->view setBounds:frame]; + } else { + [self->window setFrame:frame display:YES animate:false]; + } + MwLLForceRender(handle); +} + +static void MwLLFreeColorImpl(MwLLColor color) { + free(color); +} + +static int MwLLPendingImpl(MwLL handle) { + MilskoCocoa* self = handle->cocoa.real; + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + MwBool isPending = [self->application pending]; + + if(self->modalSession) { + [self->application runModalSession:self->modalSession]; + } + [pool release]; + return !self->isClosing && (self->_forceRender || self->_eventsPending || isPending); +} + +static void MwLLNextEventImpl(MwLL handle) { + MilskoCocoa* self = handle->cocoa.real; + MwLL h = [self->handle pointer]; + if(self->_forceRender) { + MwLLDispatch(h, draw, NULL); + self->_forceRender = MwFALSE; + } + if(self->_eventsPending) { + self->_eventsPending = MwFALSE; + } + [self sendClipboardEvent]; + +#ifdef __APPLE__ + if(self->pointerLocked && [self->window isMainWindow] && self->lastEvent) { + struct CGPoint pos; + pos.x = [self->window frame].origin.x + [self->window frame].size.width / 2; + pos.y = [self->window frame].origin.y + [self->window frame].size.height / 2; + + CGWarpMouseCursorPosition(pos); + } +#endif + + [self->application updateWindows]; +} + +static void MwLLSetTitleImpl(MwLL handle, const char* title) { + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + [handle->cocoa.real->window + setTitleWithRepresentedFilename:[NSString stringWithUTF8String:title]]; + [pool release]; +} + +static MwLLPixmap MwLLCreatePixmapImpl(MwLL handle, unsigned char* data, + int width, int height) { + MwLLPixmap r = malloc(sizeof(*r)); + + (void)handle; + memset(r, 0, sizeof(*r)); + + r->common.raw = malloc(4 * width * height); + memcpy(r->common.raw, data, 4 * width * height); + + r->common.width = width; + r->common.height = height; + + r->cocoa.real = [MilskoCocoaPixmap newWithWidth:width height:height]; + + MwLLPixmapUpdate(r); + return r; +} + +static void MwLLPixmapUpdateImpl(MwLLPixmap pixmap) { + MilskoCocoaPixmap* self = pixmap->cocoa.real; + memcpy(self->buf, pixmap->common.raw, pixmap->common.width * pixmap->common.height * 4); + [pixmap->cocoa.real updateWithData:pixmap->common.raw]; +} + +static void MwLLDestroyPixmapImpl(MwLLPixmap pixmap) { + free(pixmap->common.raw); + [pixmap->cocoa.real destroy]; + [pixmap->cocoa.real release]; + free(pixmap); +} + +static void MwLLDrawPixmapImpl(MwLL handle, MwRect* rect, MwLLPixmap pixmap) { + draw_command pix; + pix.type = COCOA_DRAW_COMMAND_PIXMAP; + + pix.pixmap.rect = *rect; + + /* copy the pixmap into a new object that we'll free later */ + pix.pixmap.pixmap = MwLLCreatePixmap(handle, pixmap->common.raw, pixmap->common.width, pixmap->common.height); + + arrpush(handle->cocoa.real->view->commands, pix); + + [handle->cocoa.real nudge]; +} + +static void MwLLSetIconImpl(MwLL handle, MwLLPixmap pixmap) { + [handle->cocoa.real->application setApplicationIconImage:[pixmap->cocoa.real image]]; +} + +static void MwLLForceRenderImpl(MwLL handle) { + handle->cocoa.real->_forceRender = MwTRUE; +} + +static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) { + MilskoCocoa* self = handle->cocoa.real; + int y, x, ys, xs; + unsigned char* di = malloc(image->width * image->height * 4); + memset(di, 0, image->width * image->height * 4); + + if(self->cursorPixmap) { + [self->cursorPixmap destroy]; + } + self->cursorPixmap = + [MilskoCocoaPixmap newWithWidth:image->width + height:image->height]; + + xs = -mask->x + image->x; + ys = MwCursorDataHeight + mask->y; + ys = MwCursorDataHeight + image->y - ys; + + for(y = 0; y < mask->height; y++) { + unsigned int d = mask->data[y]; + for(x = mask->width - 1; x >= 0; x--) { + int px = 0; + int idx = ((y * mask->width) + x) * 4; + + if(d & 1) { + di[idx + 3] = 255; + }; + d = d >> 1; + } + } + for(y = 0; y < image->height; y++) { + unsigned int d = image->data[y]; + for(x = image->width - 1; x >= 0; x--) { + int px = 0; + int idx = ((y * image->width) + x) * 4; + + if(d & 1) { + px = 255; + }; + + di[idx] = px; + di[idx + 1] = px; + di[idx + 2] = px; + d = d >> 1; + } + } + + [self->cursorPixmap updateWithData:di]; + + self->cursor = [[NSCursor alloc] + initWithImage:[self->cursorPixmap image] + hotSpot:NSMakePoint(image->x, image->y + image->height)]; + [self->cursor retain]; + + [self->cursor pop]; + [self->cursor push]; + + free(di); +} + +static void MwLLDetachImpl(MwLL handle, MwPoint* point) { + (void)handle; + (void)point; +} + +static void MwLLShowImpl(MwLL handle, int show) { + (void)show; +} + +static void MwLLMakePopupImpl(MwLL handle, MwLL parent) { + (void)parent; +} + +static void MwLLSetSizeHintsImpl(MwLL handle, int minx, int miny, int maxx, + int maxy) { + MilskoCocoa* self = handle->cocoa.real; + [self->window setMinSize:NSMakeSize(minx, miny)]; + [self->window setMaxSize:NSMakeSize(maxx, maxy)]; +} + +static void MwLLMakeBorderlessImpl(MwLL handle, int toggle) { + MilskoCocoa* self = handle->cocoa.real; + MwU32 mask = [self->window styleMask]; + if(toggle) { + mask ^= NSBorderlessWindowMask; + mask |= NSTitledWindowMask; + } else { + mask |= NSBorderlessWindowMask; + mask ^= NSTitledWindowMask; + } + [self->window initWithContentRect:self->rect + styleMask:mask + backing:NSBackingStoreBuffered + defer:NO]; +} + +static void MwLLFocusImpl(MwLL handle) { + [handle->cocoa.real->application activateIgnoringOtherApps:MwTRUE]; +} + +static void MwLLGrabPointerImpl(MwLL handle, int toggle) { + handle->cocoa.real->pointerLocked = toggle; +} + +static void MwLLSetClipboardImpl(MwLL handle, const char* text, int clipboard_type) { + (void)handle; + (void)text; + (void)clipboard_type; +} + +static void MwLLGetClipboardImpl(MwLL handle, int clipboard_type) { + (void)handle; + (void)clipboard_type; +} + +static void MwLLMakeToolWindowImpl(MwLL handle) { + /* If my understand of what a "tool window" usually is is correct then I + * highly doubt the Mac OS has this and if they did they probably outright + * removed it along time ago is this kind of conflicts with modern UX. So + * we'll just make it borderless idgaf */ + MwLLMakeBorderlessImpl(handle, 1); +} + +static void MwLLGetCursorCoordImpl(MwLL handle, MwPoint* point) { + NSPoint p = [NSEvent mouseLocation]; + point->x = p.x; + point->y = p.y; +} + +static void MwLLGetScreenSizeImpl(MwLL handle, MwRect* rect) { + MilskoCocoa* self = handle->cocoa.real; + NSScreen* screen = [self->window screen]; + rect->x = [screen frame].origin.x; + rect->y = [screen frame].origin.y; + rect->width = [screen frame].size.width; + rect->height = [screen frame].size.height; +} + +static void MwLLBeginStateChangeImpl(MwLL handle) { + MwLLShow(handle, 0); +} + +static void MwLLEndStateChangeImpl(MwLL handle) { + MwLLShow(handle, 1); +} + +static void MwLLSetDarkThemeImpl(MwLL handle, int toggle) { + (void)handle; + (void)toggle; +} + +static MwBool MwLLDoModernImpl(MwLL handle) { + (void)handle; + return MwTRUE; +} + +static void MwLLRaiseImpl(MwLL handle) { + (void)handle; +} + +static void MwLLClipImpl(MwLL handle, MwRect* rect) { + (void)handle; + (void)rect; +} + +static int MwLLCocoaCallInitImpl(void) { +#ifndef __APPLE__ + printf("Using GNUStep Backend\n"); +#endif + + [MilskoCocoaApplication sharedApplication]; + + return 0; +} + +#ifdef MW_VULKAN +VkMetalSurfaceCreateInfoEXT MwCocoaGetMetalSurfaceCreateInfo(MwWidget handle) { + VkMetalSurfaceCreateInfoEXT createInfo = { + .sType = VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT, + .pNext = NULL, + .flags = 0, + .pLayer = (CAMetalLayer*)[handle->lowlevel->cocoa.real->view layer], + }; + return createInfo; +}; +#endif + +#include "call.c" +CALL(Cocoa); diff --git a/widget/milsko/milskosrc/src/backend/gdi.c b/widget/milsko/milskosrc/src/backend/gdi.c new file mode 100644 index 0000000000..acc341e46a --- /dev/null +++ b/widget/milsko/milskosrc/src/backend/gdi.c @@ -0,0 +1,1017 @@ +#include + +typedef struct userdata { + MwLL ll; + POINT min; + POINT max; + int min_set; + int max_set; +} userdata_t; + +static struct symtbl { + void* lib_dwmapi; + + HRESULT(WINAPI* DwmSetWindowAttribute)(HWND hwnd, DWORD dwAttribute, LPCVOID pvAttribute, DWORD cbAttribute); +} wsymtbl; + +static int is_plgblt_reliable = 0; + +#define DwmSetWindowAttribute wsymtbl.DwmSetWindowAttribute + +/* Dark theme detection for classic Windows: check if the user has set their theme to be dark. */ +static void detect_darktheme_classictheme(MwLL handle) { + /* Returns NULL on Windows 10+, use this to our advantage to check if the value is supported. */ + if(GetSysColorBrush(COLOR_MENU)) { + DWORD col = GetSysColor(COLOR_MENU); + int t = (GetRValue(col) <= 75 && GetGValue(col) <= 75 && GetBValue(col) <= 75); + MwLLDispatch(handle, dark_theme, &t); + } +} + +/* Dark theme detection for modern Windows: use the registry to check if dark mode is enabled. */ +static void detect_darktheme(MwLL handle) { + DWORD dw; + DWORD sz = sizeof(dw); + int err, t; + HKEY hkey; + DWORD type; + + err = RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", 0, KEY_QUERY_VALUE, &hkey); + if(err != ERROR_SUCCESS) { + detect_darktheme_classictheme(handle); + return; + } + + err = RegQueryValueEx(hkey, "AppsUseLightTheme", NULL, &type, (PBYTE)&dw, &sz); + RegCloseKey(hkey); + if(err != ERROR_SUCCESS || type != REG_DWORD) { + detect_darktheme_classictheme(handle); + return; + } + + t = dw ? 0 : 1; + + /* no don't do this here (nishi) */ +#if 0 + if(t && DwmSetWindowAttribute != NULL) { + LPARAM style = GetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE); + if(!(style & WS_CHILD)) MwLLSetDarkTheme(handle, 1); + } +#endif + + MwLLDispatch(handle, dark_theme, &t); +} + +static LRESULT CALLBACK wndproc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) { + userdata_t* u = (userdata_t*)GetWindowLongPtr(hWnd, GWLP_USERDATA); + + if(u == NULL) return DefWindowProc(hWnd, msg, wp, lp); + + switch(msg) { + case WM_PAINT: + { + PAINTSTRUCT ps; + RECT rc; + HBITMAP hbmp; + HDC dc, hbdc; + + u->ll->gdi.force_render = 0; + + if(u->ll->common.copy_buffer) { + GetClientRect(hWnd, &rc); + + dc = GetDC(hWnd); + hbmp = CreateCompatibleBitmap(dc, rc.right - rc.left, rc.bottom - rc.top); + hbdc = CreateCompatibleDC(dc); + SelectObject(hbdc, hbmp); + ReleaseDC(hWnd, dc); + + u->ll->gdi.hDC = hbdc; + MwLLDispatch(u->ll, draw, NULL); + + dc = BeginPaint(hWnd, &ps); + StretchBlt(dc, 0, 0, rc.right - rc.left, rc.bottom - rc.top, hbdc, 0, 0, rc.right - rc.left, rc.bottom - rc.top, SRCCOPY); + EndPaint(hWnd, &ps); + + DeleteDC(hbdc); + DeleteObject(hbmp); + } else { + u->ll->gdi.hDC = BeginPaint(hWnd, &ps); + MwLLDispatch(u->ll, draw, NULL); + EndPaint(hWnd, &ps); + } + break; + } + case WM_LBUTTONDOWN: + case WM_MBUTTONDOWN: + case WM_RBUTTONDOWN: + { + MwMouse p; + p.point.x = LOWORD(lp); + p.point.y = HIWORD(lp); + if(msg == WM_LBUTTONDOWN) { + p.button = MwMOUSE_LEFT; + } else if(msg == WM_MBUTTONDOWN) { + p.button = MwMOUSE_MIDDLE; + } else if(msg == WM_RBUTTONDOWN) { + p.button = MwMOUSE_RIGHT; + } + + SetCapture(hWnd); + SetFocus(hWnd); + MwLLDispatch(u->ll, down, &p); + break; + } + case WM_LBUTTONUP: + case WM_MBUTTONUP: + case WM_RBUTTONUP: + { + MwMouse p; + p.point.x = LOWORD(lp); + p.point.y = HIWORD(lp); + if(msg == WM_LBUTTONUP) { + p.button = MwMOUSE_LEFT; + } else if(msg == WM_MBUTTONUP) { + p.button = MwMOUSE_MIDDLE; + } else if(msg == WM_RBUTTONUP) { + p.button = MwMOUSE_RIGHT; + } + + SetCapture(NULL); + MwLLDispatch(u->ll, up, &p); + break; + } + case WM_MOUSEWHEEL: + { + int d = GET_WHEEL_DELTA_WPARAM(wp); + MwMouse p; + p.point.x = LOWORD(lp); + p.point.y = HIWORD(lp); + + if(d > 0) { + p.button = MwMOUSE_WHEELUP; + } else if(d < 0) { + p.button = MwMOUSE_WHEELDOWN; + } + + MwLLDispatch(u->ll, down, &p); + MwLLDispatch(u->ll, up, &p); + break; + } + case WM_MOUSEMOVE: + { + MwPoint p; + p.x = LOWORD(lp); + p.y = HIWORD(lp); + + if(u->ll->gdi.grabbed) { + RECT rc; + + GetClientRect(hWnd, &rc); + p.x -= (rc.right - rc.left) / 2; + p.y -= (rc.bottom - rc.top) / 2; + } + + MwLLDispatch(u->ll, move, &p); + + if(u->ll->gdi.grabbed && (p.x != 0 || p.y != 0)) { + RECT rc; + POINT p; + + GetClientRect(hWnd, &rc); + + p.x = (rc.right - rc.left) / 2; + p.y = (rc.bottom - rc.top) / 2; + + MapWindowPoints(hWnd, HWND_DESKTOP, &p, 1); + + SetCursorPos(p.x, p.y); + } + break; + } + case WM_SIZE: + { + MwLLDispatch(u->ll, resize, NULL); + break; + } + case WM_ERASEBKGND: + { + return 1; + } + case WM_NCHITTEST: + { + LPARAM style = GetWindowLongPtr(hWnd, GWL_STYLE); + if(style & WS_CHILD) return HTCLIENT; + return DefWindowProc(hWnd, msg, wp, lp); + } + case WM_DESTROY: + { + PostQuitMessage(0); + break; + } + case WM_CLOSE: + { + MwLLDispatch(u->ll, close, NULL); + break; + } + case WM_CHAR: + case WM_SYSCHAR: + { + int n = wp; + const int base = 'A' - 1; + + if(n != 0x1b && n <= 0x1f) { + n = (n + base) | MwKEY_CONTROL_FLAG; + if(!(GetKeyState(VK_LSHIFT) || GetKeyState(VK_RSHIFT))) n += 0x20; + } + if(HIBYTE(VkKeyScan(wp)) & 2) n |= MwKEY_CONTROL_FLAG; + if(msg == WM_SYSCHAR) n |= MwKEY_ALT_FLAG; + + if((0x20 <= n && n <= 0x7f) || (n & MwKEY_FLAG)) MwLLDispatch(u->ll, key, &n); + break; + } + case WM_SETFOCUS: + { + MwLLDispatch(u->ll, focus_in, NULL); + break; + } + case WM_KILLFOCUS: + { + MwLLDispatch(u->ll, focus_out, NULL); + break; + } + case WM_KEYDOWN: + case WM_KEYUP: + case WM_SYSKEYDOWN: + case WM_SYSKEYUP: + { + int n = -1; + + if(wp == VK_MENU && msg == WM_KEYUP) return 0; + switch(wp) { + case VK_LEFT: + n = MwKEY_LEFT; + break; + case VK_RIGHT: + n = MwKEY_RIGHT; + break; + case VK_UP: + n = MwKEY_UP; + break; + case VK_DOWN: + n = MwKEY_DOWN; + break; + case VK_RETURN: + n = MwKEY_ENTER; + break; + case VK_BACK: + n = MwKEY_BACKSPACE; + break; + case VK_ESCAPE: + n = MwKEY_ESCAPE; + break; + case VK_LSHIFT: + n = MwKEY_LEFTSHIFT; + break; + case VK_RSHIFT: + n = MwKEY_RIGHTSHIFT; + break; + case VK_MENU: + n = MwKEY_ALT; + break; + case VK_CONTROL: + n = MwKEY_CONTROL; + break; + } + + if((msg == WM_SYSKEYDOWN || msg == WM_SYSKEYUP) && n != -1 && wp != VK_MENU) { + n |= MwKEY_ALT_FLAG; + } + if(n != -1) { + if(msg == WM_KEYDOWN || msg == WM_SYSKEYDOWN) { + MwLLDispatch(u->ll, key, &n); + } else { + MwLLDispatch(u->ll, key_released, &n); + } + } + break; + } + case WM_GETMINMAXINFO: + { + if(u->min_set || u->max_set) { + LPARAM style = GetWindowLongPtr(hWnd, GWL_STYLE); + MINMAXINFO* mmi = (MINMAXINFO*)lp; + if(u->min_set) { + RECT rc; + + rc.left = 0; + rc.top = 0; + rc.right = u->min.x; + rc.bottom = u->min.y; + AdjustWindowRect(&rc, style, FALSE); + + mmi->ptMinTrackSize.x = rc.right - rc.left; + mmi->ptMinTrackSize.y = rc.bottom - rc.top; + } + if(u->max_set) { + RECT rc; + + rc.left = 0; + rc.top = 0; + rc.right = u->min.x; + rc.bottom = u->min.y; + AdjustWindowRect(&rc, style, FALSE); + + mmi->ptMaxTrackSize.x = rc.right - rc.left; + mmi->ptMaxTrackSize.y = rc.bottom - rc.top; + } + } else { + return DefWindowProc(hWnd, msg, wp, lp); + } + break; + } + case WM_SETCURSOR: + { + if(LOWORD(lp) != HTCLIENT) return DefWindowProc(hWnd, msg, wp, lp); + if(u->ll->gdi.cursor != NULL) SetCursor(u->ll->gdi.cursor); + break; + } + case WM_USER: + { + InvalidateRect(hWnd, NULL, FALSE); + UpdateWindow(hWnd); + break; + } + case WM_WININICHANGE: + { + char* s = (char*)lp; + LPARAM style = GetWindowLongPtr(hWnd, GWL_STYLE); + + if(!(style & WS_CHILD)) { + if(s != NULL && strcmp(s, "ImmersiveColorSet") == 0) detect_darktheme(u->ll); + } + break; + } + default: + { + return DefWindowProc(hWnd, msg, wp, lp); + } + } + return 0; +} + +static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) { + MwLL r = malloc(sizeof(*r)); + userdata_t* u = malloc(sizeof(*u)); + WNDCLASSEX wc; + + memset(&wc, 0, sizeof(wc)); + wc.cbSize = sizeof(WNDCLASSEX); + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = wndproc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = (HINSTANCE)GetModuleHandle(NULL); + wc.lpszClassName = "milsko"; + wc.lpszMenuName = NULL; + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hbrBackground = GetSysColorBrush(COLOR_MENU); + wc.hIcon = LoadIcon(NULL, IDI_WINLOGO); + wc.hIconSm = NULL; + + MwLLCreateCommon(r); + + RegisterClassEx(&wc); + + r->common.copy_buffer = 1; + r->common.type = MwLLBackendGDI; + + r->gdi.get_clipboard = 0; + if(parent == NULL) r->gdi.get_darktheme = 1; + r->gdi.force_render = 0; + r->gdi.grabbed = 0; + r->gdi.hWnd = CreateWindow("milsko", "Milsko", parent == NULL ? (WS_OVERLAPPEDWINDOW) : (WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS), x == MwDEFAULT ? CW_USEDEFAULT : x, y == MwDEFAULT ? CW_USEDEFAULT : y, width, height, parent == NULL ? NULL : parent->gdi.hWnd, 0, wc.hInstance, NULL); + r->gdi.hInstance = wc.hInstance; + r->gdi.cursor = NULL; + r->gdi.icon = NULL; + + r->gdi.clip = NULL; + + u->ll = r; + u->min_set = 0; + u->max_set = 0; + SetWindowLongPtr(r->gdi.hWnd, GWLP_USERDATA, (LPARAM)u); + + if(parent == NULL) { + RECT rc; + + rc.left = 0; + rc.top = 0; + rc.right = width; + rc.bottom = height; + AdjustWindowRect(&rc, GetWindowLongPtr(r->gdi.hWnd, GWL_STYLE), FALSE); + SetWindowPos(r->gdi.hWnd, NULL, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, SWP_NOMOVE); + + ShowWindow(r->gdi.hWnd, SW_NORMAL); + UpdateWindow(r->gdi.hWnd); + + InvalidateRect(r->gdi.hWnd, NULL, FALSE); + } + + SetWindowPos(r->gdi.hWnd, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); + + return r; +} + +static void MwLLDestroyImpl(MwLL handle) { + MwLLDestroyCommon(handle); + + /* for safety */ + SetWindowLongPtr(handle->gdi.hWnd, GWLP_USERDATA, (LPARAM)NULL); + DestroyWindow(handle->gdi.hWnd); + + if(handle->gdi.clip != NULL) DeleteObject(handle->gdi.clip); + + if(handle->gdi.cursor != NULL) DestroyCursor(handle->gdi.cursor); + + free(handle); +} + +static void MwLLBeginDrawImpl(MwLL handle) { + (void)handle; +} + +static void MwLLEndDrawImpl(MwLL handle) { + (void)handle; +} + +static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLLColor color) { + POINT* p = malloc(sizeof(*p) * points_count); + HPEN pen = CreatePen(PS_NULL, 0, RGB(0, 0, 0)); + int i; + + for(i = 0; i < points_count; i++) { + p[i].x = points[i].x; + p[i].y = points[i].y; + } + SelectObject(handle->gdi.hDC, color->gdi.brush); + SelectObject(handle->gdi.hDC, pen); + SetPolyFillMode(handle->gdi.hDC, ALTERNATE); + Polygon(handle->gdi.hDC, p, points_count); + + DeleteObject(pen); + + free(p); +} + +static void MwLLLineImpl(MwLL handle, MwPoint* points, MwLLColor color) { + HPEN pen = CreatePen(PS_SOLID, 1, RGB(color->common.red, color->common.green, color->common.blue)); + RECT rc; + + rc.left = points[1].x; + rc.top = points[1].y; + rc.right = rc.left + 1; + rc.bottom = rc.top + 1; + + SelectObject(handle->gdi.hDC, pen); + MoveToEx(handle->gdi.hDC, points[0].x, points[0].y, NULL); + LineTo(handle->gdi.hDC, points[1].x, points[1].y); + FillRect(handle->gdi.hDC, &rc, color->gdi.brush); + + DeleteObject(pen); +} + +static MwLLColor MwLLAllocColorImpl(MwLL handle, int r, int g, int b) { + MwLLColor c = malloc(sizeof(*c)); + + c->gdi.brush = NULL; + + MwLLColorUpdate(handle, c, r, g, b); + + return c; +} + +static void MwLLColorUpdateImpl(MwLL handle, MwLLColor c, int r, int g, int b) { + HDC dc = GetDC(handle->gdi.hWnd); + + if(r > 255) r = 255; + if(g > 255) g = 255; + if(b > 255) b = 255; + if(r < 0) r = 0; + if(g < 0) g = 0; + if(b < 0) b = 0; + + if(c->gdi.brush != NULL) DeleteObject(c->gdi.brush); + c->gdi.color = GetNearestColor(dc, RGB(r, g, b)); + c->gdi.brush = CreateSolidBrush(c->gdi.color); + c->common.red = r; + c->common.green = g; + c->common.blue = b; + + ReleaseDC(handle->gdi.hWnd, dc); +} + +static void MwLLFreeColorImpl(MwLLColor color) { + DeleteObject(color->gdi.brush); + + free(color); +} + +static void MwLLGetXYWHImpl(MwLL handle, int* x, int* y, unsigned int* w, unsigned int* h) { + RECT rc; + + GetClientRect(handle->gdi.hWnd, &rc); + MapWindowPoints(handle->gdi.hWnd, GetParent(handle->gdi.hWnd), (LPPOINT)&rc, 2); + + *x = rc.left; + *y = rc.top; + *w = rc.right - rc.left; + *h = rc.bottom - rc.top; +} + +static void MwLLSetXYImpl(MwLL handle, int x, int y) { + SetWindowPos(handle->gdi.hWnd, NULL, x, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER); +} + +static void MwLLSetWHImpl(MwLL handle, int w, int h) { + SetWindowPos(handle->gdi.hWnd, NULL, 0, 0, w, h, SWP_NOMOVE | SWP_NOZORDER); + InvalidateRect(handle->gdi.hWnd, NULL, FALSE); +} + +static void MwLLSetTitleImpl(MwLL handle, const char* title) { + SetWindowText(handle->gdi.hWnd, title); +} + +static int MwLLPendingImpl(MwLL handle) { + MSG msg; + + (void)handle; + + if(handle->gdi.get_clipboard || handle->gdi.get_darktheme) return 1; + return PeekMessage(&msg, handle->gdi.hWnd, 0, 0, PM_NOREMOVE) ? 1 : 0; +} + +static void MwLLNextEventImpl(MwLL handle) { + MSG msg; + + (void)handle; + + if(handle->gdi.get_clipboard) { + HGLOBAL hg; + if(OpenClipboard(handle->gdi.hWnd) != 0 && (hg = GetClipboardData(CF_TEXT)) != NULL) { + char* txt = malloc(GlobalSize(hg)); + char* clp = GlobalLock(hg); + + strcpy(txt, clp); + + GlobalUnlock(hg); + CloseClipboard(); + + MwLLDispatch(handle, clipboard, txt); + + free(txt); + } + + handle->gdi.get_clipboard = 0; + } + if(handle->gdi.get_darktheme) { + detect_darktheme(handle); + + handle->gdi.get_darktheme = 0; + } + while(PeekMessage(&msg, handle->gdi.hWnd, 0, 0, PM_NOREMOVE)) { + GetMessage(&msg, handle->gdi.hWnd, 0, 0); + TranslateMessage(&msg); + DispatchMessage(&msg); + } +} + +static MwLLPixmap MwLLCreatePixmapImpl(MwLL handle, unsigned char* data, int width, int height) { + MwLLPixmap r = malloc(sizeof(*r)); + HDC dc = GetDC(handle->gdi.hWnd); + BITMAPINFOHEADER bmih; + + r->common.raw = malloc(width * height * 4); + memcpy(r->common.raw, data, 4 * width * height); + + r->common.width = width; + r->common.height = height; + + bmih.biSize = sizeof(bmih); + bmih.biWidth = width; + bmih.biHeight = -(LONG)height; + bmih.biPlanes = 1; + bmih.biBitCount = 32; + bmih.biCompression = BI_RGB; + bmih.biSizeImage = 0; + bmih.biXPelsPerMeter = 0; + bmih.biYPelsPerMeter = 0; + bmih.biClrUsed = 0; + bmih.biClrImportant = 0; + + r->gdi.hBitmap = CreateDIBSection(dc, (BITMAPINFO*)&bmih, DIB_RGB_COLORS, (void**)&r->gdi.quad, NULL, (DWORD)0); + + r->gdi.hMask = NULL; + r->gdi.hMask2 = NULL; + + ReleaseDC(handle->gdi.hWnd, dc); + + MwLLPixmapUpdate(r); + + return r; +} + +static void MwLLPixmapUpdateImpl(MwLLPixmap r) { + int y, x; + int w = (r->common.width + (16 - (r->common.width % 16))) / 8; + WORD* words; + WORD* words2; + + if(16 * (r->common.width / 16) == r->common.width) w -= 2; + + words = malloc(w * r->common.height); + words2 = malloc(w * r->common.height); + memset(words, 0, w * r->common.height); + memset(words2, 0, w * r->common.height); + for(y = 0; y < r->common.height; y++) { + BYTE* l = (BYTE*)&words[y * (w / 2)]; + BYTE* l2 = (BYTE*)&words2[y * (w / 2)]; + for(x = 0; x < r->common.width; x++) { + RGBQUAD* q = &r->gdi.quad[y * r->common.width + x]; + unsigned char* px = &r->common.raw[(y * r->common.width + x) * 4]; + + q->rgbRed = px[0]; + q->rgbGreen = px[1]; + q->rgbBlue = px[2]; + + if(px[3]) { + l[x / 8] |= 1 << (7 - (x % 8)); + } else { + l2[x / 8] |= 1 << (7 - (x % 8)); + } + } + } + + if(r->gdi.hMask != NULL) DeleteObject(r->gdi.hMask); + if(r->gdi.hMask2 != NULL) DeleteObject(r->gdi.hMask2); + + r->gdi.hMask = CreateBitmap(r->common.width, r->common.height, 1, 1, words); + r->gdi.hMask2 = CreateBitmap(r->common.width, r->common.height, 1, 1, words2); + + free(words); + free(words2); +} + +static void MwLLDestroyPixmapImpl(MwLLPixmap pixmap) { + free(pixmap->common.raw); + DeleteObject(pixmap->gdi.hMask); + DeleteObject(pixmap->gdi.hMask2); + DeleteObject(pixmap->gdi.hBitmap); + + free(pixmap); +} + +static void MwLLDrawPixmapImpl(MwLL handle, MwRect* rect, MwLLPixmap pixmap) { + HDC hmdc = CreateCompatibleDC(handle->gdi.hDC); + POINT p[3]; + SetStretchBltMode(handle->gdi.hDC, HALFTONE); + + p[0].x = rect->x; + p[0].y = rect->y; + + p[1].x = rect->x + rect->width; + p[1].y = rect->y; + + p[2].x = rect->x; + p[2].y = rect->y + rect->height; + + SelectObject(hmdc, pixmap->gdi.hBitmap); + + if(!is_plgblt_reliable || PlgBlt(handle->gdi.hDC, p, hmdc, 0, 0, pixmap->common.width, pixmap->common.height, pixmap->gdi.hMask, 0, 0) == 0) { + SelectObject(hmdc, pixmap->gdi.hMask2); + StretchBlt(handle->gdi.hDC, rect->x, rect->y, rect->width, rect->height, hmdc, 0, 0, pixmap->common.width, pixmap->common.height, SRCAND); + + SelectObject(hmdc, pixmap->gdi.hBitmap); + StretchBlt(handle->gdi.hDC, rect->x, rect->y, rect->width, rect->height, hmdc, 0, 0, pixmap->common.width, pixmap->common.height, SRCPAINT); + } + + DeleteDC(hmdc); +} + +static void MwLLSetIconImpl(MwLL handle, MwLLPixmap pixmap) { + ICONINFO ii; + + memset(&ii, 0, sizeof(ii)); + ii.fIcon = TRUE; + ii.xHotspot = 0; + ii.yHotspot = 0; + ii.hbmMask = pixmap->gdi.hMask2; + ii.hbmColor = pixmap->gdi.hBitmap; + + if(handle->gdi.icon != NULL) DestroyIcon(handle->gdi.icon); + handle->gdi.icon = CreateIconIndirect(&ii); + SendMessage(handle->gdi.hWnd, WM_SETICON, ICON_SMALL, (LPARAM)handle->gdi.icon); + SendMessage(handle->gdi.hWnd, WM_SETICON, ICON_BIG, (LPARAM)handle->gdi.icon); +} + +static void MwLLForceRenderImpl(MwLL handle) { + if(!handle->gdi.force_render) { + PostMessage(handle->gdi.hWnd, WM_USER, 0, 0); + + handle->gdi.force_render = 1; + } +} + +HCURSOR MwLLGDICreateCursor(MwCursor* image, MwCursor* mask) { + HCURSOR cursor; + BYTE* dmask = malloc((MwCursorDataHeight / 8) * MwCursorDataHeight); + BYTE* dimage = malloc((MwCursorDataHeight / 8) * MwCursorDataHeight); + int y, x, ys, xs; + + xs = -mask->x + image->x; + ys = mask->height + mask->y; + ys = image->height + image->y - ys; + + if(ys < 0) ys = -ys; + + memset(dmask, 0xff, (MwCursorDataHeight / 8) * MwCursorDataHeight); + memset(dimage, 0, (MwCursorDataHeight / 8) * MwCursorDataHeight); + + for(y = 0; y < mask->height; y++) { + BYTE* l = &dmask[y * (MwCursorDataHeight / 8)]; + unsigned int n = mask->data[y]; + for(x = mask->width - 1; x >= 0; x--) { + l[x / 8] = l[x / 8] >> 1; + if(!(n & 1)) { + l[x / 8] |= 1 << 7; + } + + n = n >> 1; + } + } + + for(y = 0; y < image->height; y++) { + BYTE* l = &dimage[(y + ys) * (MwCursorDataHeight / 8)]; + unsigned int n = image->data[y]; + + for(x = image->width - 1; x >= 0; x--) { + if(n & 1) { + l[(x + xs) / 8] |= (1 << (7 - ((x + xs) % 8))); + } + + n = n >> 1; + } + } + + cursor = CreateCursor(GetModuleHandle(NULL), xs - image->x, ys + (MwCursorDataHeight + image->y), MwCursorDataHeight, MwCursorDataHeight, dmask, dimage); + + free(dimage); + free(dmask); + + return cursor; +} + +static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) { + HCURSOR cursor = MwLLGDICreateCursor(image, mask); + + if(handle->gdi.cursor != NULL) DestroyCursor(handle->gdi.cursor); + if(handle->gdi.icon != NULL) DestroyIcon(handle->gdi.icon); + handle->gdi.cursor = cursor; +} + +static void MwLLDetachImpl(MwLL handle, MwPoint* point) { + RECT rc, rc2; + LPARAM lp = GetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE); + LPARAM lp2 = GetWindowLongPtr(handle->gdi.hWnd, GWL_EXSTYLE); + + lp &= WS_VISIBLE; + + GetWindowRect(GetParent(handle->gdi.hWnd), &rc); + + GetClientRect(handle->gdi.hWnd, &rc2); + + if(lp2 & WS_EX_TOOLWINDOW) { + SetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE, (LPARAM)lp); + } else { + SetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE, (LPARAM)WS_OVERLAPPEDWINDOW | lp); + } + SetParent(handle->gdi.hWnd, NULL); + + rc.left += point->x; + rc.top += point->y; + + AdjustWindowRect(&rc2, GetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE), FALSE); + rc2.right -= rc2.left; + rc2.bottom -= rc2.top; + + SetWindowPos(handle->gdi.hWnd, HWND_TOPMOST, rc.left, rc.top, rc2.right == 0 ? 1 : rc2.right, rc2.bottom == 0 ? 1 : rc2.bottom, SWP_FRAMECHANGED | SWP_NOACTIVATE); + + handle->gdi.get_darktheme = 1; +} + +static void MwLLShowImpl(MwLL handle, int show) { + ShowWindow(handle->gdi.hWnd, show ? SW_NORMAL : SW_HIDE); + if(show) SetFocus(handle->gdi.hWnd); +} + +static void MwLLMakePopupImpl(MwLL handle, MwLL parent) { + (void)handle; + (void)parent; + /* TODO */ +} + +static void MwLLSetSizeHintsImpl(MwLL handle, int minx, int miny, int maxx, int maxy) { + userdata_t* u = (userdata_t*)GetWindowLongPtr(handle->gdi.hWnd, GWLP_USERDATA); + + u->min_set = u->max_set = 1; + u->min.x = minx; + u->min.y = miny; + u->max.x = maxx; + u->max.y = maxy; +} + +static void MwLLMakeBorderlessImpl(MwLL handle, int toggle) { + LPARAM lp = GetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE); + + if(toggle) { + lp &= ~WS_CAPTION; + } else { + lp |= WS_CAPTION; + } + + SetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE, lp); + + SetWindowPos(handle->gdi.hWnd, NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER); +} + +static void MwLLFocusImpl(MwLL handle) { + SetFocus(handle->gdi.hWnd); +} + +static void MwLLGrabPointerImpl(MwLL handle, int toggle) { + if(toggle) { + POINT p; + RECT rc; + + GetClientRect(handle->gdi.hWnd, &rc); + + rc.right -= rc.left; + rc.bottom -= rc.top; + + p.x = (rc.right - rc.left) / 2; + p.y = (rc.bottom - rc.top) / 2; + + MapWindowPoints(handle->gdi.hWnd, HWND_DESKTOP, &p, 1); + + handle->gdi.grabbed = 1; + + SetFocus(handle->gdi.hWnd); + + GetWindowRect(handle->gdi.hWnd, &rc); + ClipCursor(&rc); + + SetCursorPos(p.x, p.y); + } else { + handle->gdi.grabbed = 0; + ClipCursor(NULL); + } +} + +static void MwLLSetClipboardImpl(MwLL handle, const char* text, int clipboard_type) { + HGLOBAL hg; + (void)clipboard_type; + if(OpenClipboard(handle->gdi.hWnd) != 0) { + char* lock; + + EmptyClipboard(); + hg = GlobalAlloc(GHND | GMEM_SHARE, strlen(text) + 1); + + lock = GlobalLock(hg); + strcpy(lock, text); + GlobalUnlock(hg); + + SetClipboardData(CF_TEXT, hg); + + CloseClipboard(); + } +} + +static void MwLLGetClipboardImpl(MwLL handle, int clipboard_type) { + (void)clipboard_type; + handle->gdi.get_clipboard = 1; /* nishi: we do this to make clipboard api work similar to other backends */ +} + +static void MwLLMakeToolWindowImpl(MwLL handle) { + LPARAM lp = GetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE) & (WS_VISIBLE | WS_CHILD); + RECT rc; + int w, h; + + SetWindowLongPtr(handle->gdi.hWnd, GWL_STYLE, (LPARAM)lp); + SetWindowLongPtr(handle->gdi.hWnd, GWL_EXSTYLE, (LPARAM)WS_EX_TOOLWINDOW); + + GetClientRect(handle->gdi.hWnd, &rc); + + w = rc.right - rc.left; + h = rc.bottom - rc.top; + + SetWindowPos(handle->gdi.hWnd, NULL, 0, 0, w, h, SWP_FRAMECHANGED | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER); +} + +static void MwLLGetCursorCoordImpl(MwLL handle, MwPoint* point) { + POINT p; + + (void)handle; + + GetCursorPos(&p); + + point->x = p.x; + point->y = p.y; +} + +static void MwLLGetScreenSizeImpl(MwLL handle, MwRect* rect) { + RECT rc; + + (void)handle; + + GetClientRect(GetDesktopWindow(), &rc); + + rect->x = rect->y = 0; + rect->width = rc.right - rc.left; + rect->height = rc.bottom - rc.top; +} + +static void MwLLBeginStateChangeImpl(MwLL handle) { + (void)handle; +} + +static void MwLLEndStateChangeImpl(MwLL handle) { + (void)handle; +} + +static void MwLLSetDarkThemeImpl(MwLL handle, int toggle) { + BOOL v = toggle ? TRUE : FALSE; + + if(DwmSetWindowAttribute) + DwmSetWindowAttribute(handle->gdi.hWnd, 20, &v, sizeof(v)); +} + +static MwBool MwLLDoModernImpl(MwLL handle) { + OSVERSIONINFO osvi; + + (void)handle; + + osvi.dwOSVersionInfoSize = sizeof(osvi); + + GetVersionEx(&osvi); + + if(osvi.dwMajorVersion < 5 || (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion < 1)) { + return MwFALSE; + } + + return MwTRUE; +} + +static void MwLLRaiseImpl(MwLL handle) { + SetWindowPos(handle->gdi.hWnd, NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); +} + +static void MwLLClipImpl(MwLL handle, MwRect* rect) { + if(rect == NULL) { + SelectClipRgn(handle->gdi.hDC, NULL); + + if(handle->gdi.clip != NULL) { + DeleteObject(handle->gdi.clip); + handle->gdi.clip = NULL; + } + } else { + HRGN clip = CreateRectRgn(rect->x, rect->y, rect->x + rect->width, rect->y + rect->height); + + SelectClipRgn(handle->gdi.hDC, clip); + + if(handle->gdi.clip != NULL) DeleteObject(handle->gdi.clip); + + handle->gdi.clip = clip; + } +} + +static int MwLLGDICallInitImpl(void) { + void* ntdll; + + memset(&wsymtbl, 0, sizeof(wsymtbl)); + + wsymtbl.lib_dwmapi = MwDynamicOpen("dwmapi.dll"); + + if(wsymtbl.lib_dwmapi != NULL) DwmSetWindowAttribute = MwDynamicSymbol(wsymtbl.lib_dwmapi, "DwmSetWindowAttribute"); + + if((ntdll = GetModuleHandle("ntdll.dll")) != NULL && GetProcAddress(ntdll, "wine_get_version") != NULL) { + is_plgblt_reliable = 0; + } else { + is_plgblt_reliable = 1; + } + + /* TODO: check properly */ + return 0; +} + +#include "call.c" +CALL(GDI); diff --git a/widget/milsko/milskosrc/src/backend/haiku.cc b/widget/milsko/milskosrc/src/backend/haiku.cc new file mode 100644 index 0000000000..8c4f8bf135 --- /dev/null +++ b/widget/milsko/milskosrc/src/backend/haiku.cc @@ -0,0 +1,906 @@ +#include + +#include "../../external/stb_ds.h" + +MwApplication::MwApplication(MwRect rc, MwLL handle) + : BApplication("application/milsko-generic") { + BScreen* scr = new BScreen(); + float x = (scr->Frame().Width() - rc.width) / 2; + float y = (scr->Frame().Height() - rc.height) / 2; + BRect rc2; + int dx = rc.x == MwDEFAULT; + int dy = rc.y == MwDEFAULT; + + rc.x += dx ? -rc.x : 0; + rc.y += dy ? -rc.y : 0; + + if(dx) rc.x += x; + if(dy) rc.y += y; + + rc2 = BRect(rc.x, rc.y, rc.x + rc.width - 1, rc.y + rc.height - 1); + + handle->haiku.window = new MwWindow(rc2, B_TITLED_WINDOW, 0); + handle->haiku.window->Show(); + + handle->haiku.view = new MwView(handle, handle->haiku.window->Bounds(), B_FOLLOW_ALL_SIDES, B_WILL_DRAW); + + handle->haiku.window->AddChild(handle->haiku.view); + + delete scr; +} + +MwApplication::~MwApplication() { +} + +void MwApplication::MessageReceived(BMessage* message) { + switch(message->what) { + case BAPP_MW_DESTROY: + { + this->Quit(); + break; + } + default: + { + BLooper::MessageReceived(message); + break; + } + } +} + +MwView::MwView(MwLL handle, BRect frame, uint32 resizingMode, uint32 flags) + : BView(frame, NULL, resizingMode, flags | B_FRAME_EVENTS) { + this->handle = handle; + + this->locker = new BLocker(); + + this->SetDrawingMode(B_OP_OVER); + this->SetLineMode(B_BUTT_CAP, B_BUTT_JOIN); + + this->SetViewColor(B_TRANSPARENT_COLOR); + + this->buttons = 0; +} + +MwView::~MwView() { + delete this->locker; +} + +void MwView::MessageReceived(BMessage* message) { + switch(message->what) { + case BVIEW_MW_DESTROY: + { + this->RemoveSelf(); + delete this; + break; + } + case BVIEW_MW_DETACH: + { + BRect rc; + BPoint point; + + if(message->FindPoint("view-point", &point) != B_OK) break; + + point = this->ConvertToScreen(this->ConvertFromParent(point)); + + rc.left = point.x; + rc.top = point.y; + rc.right = rc.left + this->handle->haiku.width - 1; + rc.bottom = rc.top + this->handle->haiku.height - 1; + + if(this->Parent() != NULL) { + this->RemoveSelf(); + } + + this->handle->haiku.parent = NULL; + + this->handle->haiku.window = new MwWindow(rc, B_TITLED_WINDOW, 0); + this->handle->haiku.window->Show(); + + this->MoveTo(0, 0); + this->ResizeTo(this->handle->haiku.width, this->handle->haiku.height); + this->SetResizingMode(B_FOLLOW_ALL_SIDES); + this->handle->haiku.window->AddChild(this); + + while(this->Window() != this->handle->haiku.window); + + MwLLForceRender(this->handle); + break; + } + case BVIEW_MW_RESIZE: + { + int width, height; + + if(message->FindInt32("view-width", &width) != B_OK) break; + if(message->FindInt32("view-height", &height) != B_OK) break; + + if(this->handle->haiku.window == NULL) { + this->ResizeTo(width - 1, height - 1); + } else { + this->handle->haiku.window->ResizeTo(width - 1, height - 1); + this->ResizeTo(width - 1, height - 1); + } + this->Draw(BRect(0, 0, 0, 0)); + break; + } + case BVIEW_MW_MOVE: + { + int x, y; + + if(message->FindInt32("view-x", &x) != B_OK) break; + if(message->FindInt32("view-y", &y) != B_OK) break; + + if(this->handle->haiku.app == NULL) { + this->MoveTo(x, y); + } else { + this->Window()->MoveTo(x, y); + } + break; + } + case BVIEW_MW_SHOW: + { + if(this->Parent() == NULL) { + this->handle->haiku.parent->haiku.view->AddChild(this); + } + break; + } + case BVIEW_MW_HIDE: + { + if(this->Parent() != NULL) { + this->RemoveSelf(); + } + break; + } + case BVIEW_MW_SET_COLOR: + { + int32 rgb[3]; + int i; + + rgb[0] = rgb[1] = rgb[2] = 0; + + for(i = 0; i < 3 && message->FindInt32("view-color", i, &rgb[i]) == B_OK; i++); + + this->SetHighColor(rgb[0], rgb[1], rgb[2]); + + break; + } + case BVIEW_MW_POLYGON: + { + int i; + BPoint p; + BPoint points[32]; + + for(i = 0; i < 32 && message->FindPoint("view-point", i, &p) == B_OK; i++) { + points[i] = p; + } + + this->FillPolygon(points, i); + break; + } + case BVIEW_MW_LINE: + { + int i; + BPoint p; + BPoint points[2]; + + for(i = 0; i < 2 && message->FindPoint("view-point", i, &p) == B_OK; i++) { + points[i] = p; + } + + this->StrokeLine(points[0], points[1]); + break; + } + case BVIEW_MW_BITMAP: + { + BRect rc; + BBitmap* bitmap; + + if(message->FindRect("view-rect", &rc) != B_OK) break; + if(message->FindPointer("view-bitmap", (void**)&bitmap) != B_OK) break; + + this->DrawBitmap(bitmap, rc); + break; + } + case BVIEW_MW_RENDER: + { + this->Invalidate(); + break; + } + case BVIEW_MW_RAISE: + { + BView* v = this->Parent(); + + this->RemoveSelf(); + v->AddChild(this); + break; + } + case BVIEW_MW_GET_MOUSE: + { + BPoint* p; + uint32 btn; + + if(message->FindPointer("view-ppoint", (void**)&p) != B_OK) break; + + this->GetMouse(p, &btn); + + break; + } + default: + { + BView::MessageReceived(message); + break; + } + } +} + +void MwView::PostMessage(BMessage* message) { + BMessage copy = *message; + MwLL top = this->handle; + + while(top->haiku.parent != NULL) top = top->haiku.parent; + + copy.AddPointer("window-view", this); + + top->haiku.window->PostMessage(©); +} + +void MwView::PostMessage(uint32 command) { + BMessage msg(command); + + this->PostMessage(&msg); +} + +status_t MwView::SendMessage(BMessage* message) { + BMessage copy = *message; + BMessage reply; + MwLL top = this->handle; + + while(top->haiku.parent != NULL) top = top->haiku.parent; + + copy.AddPointer("window-view", this); + + return BMessenger(top->haiku.window).SendMessage(©, &reply); +} + +status_t MwView::SendMessage(uint32 command) { + BMessage msg(command); + + return this->SendMessage(&msg); +} + +void MwView::Invalidate() { + this->Draw(BRect(0, 0, 0, 0)); +} + +void MwView::AttachedToWindow() { + this->SetOrigin(0, 0); +} + +void MwView::Draw(BRect updateRect) { + MwLLHaikuEvent ev; + + (void)updateRect; + + ev.type = MwLLHAIKU_EVENT_DRAW; + + this->locker->Lock(); + arrput(this->handle->haiku.events, ev); + this->locker->Unlock(); +} + +void MwView::FrameResized(float width, float height) { + MwLLHaikuEvent ev; + + ev.type = MwLLHAIKU_EVENT_FRAMERESIZED; + ev.frame_resized.width = width; + ev.frame_resized.height = height; + + this->locker->Lock(); + arrput(this->handle->haiku.events, ev); + this->locker->Unlock(); +} + +void MwView::MouseDown(BPoint point) { + MwLLHaikuEvent ev; + uint32 btn; + BPoint p; + + this->GetMouse(&p, &btn, false); + + this->SetMouseEventMask(B_LOCK_WINDOW_FOCUS); + + ev.type = MwLLHAIKU_EVENT_MOUSEDOWN; + ev.mouse.point.x = point.x; + ev.mouse.point.y = point.y; + + if((btn & B_PRIMARY_MOUSE_BUTTON) && !(this->buttons & B_PRIMARY_MOUSE_BUTTON)) { + ev.mouse.button = MwMOUSE_LEFT; + } else if((btn & B_SECONDARY_MOUSE_BUTTON) && !(this->buttons & B_SECONDARY_MOUSE_BUTTON)) { + ev.mouse.button = MwMOUSE_RIGHT; + } else if((btn & B_TERTIARY_MOUSE_BUTTON) && !(this->buttons & B_TERTIARY_MOUSE_BUTTON)) { + ev.mouse.button = MwMOUSE_MIDDLE; + } + this->buttons = btn; + + this->locker->Lock(); + arrput(this->handle->haiku.events, ev); + this->locker->Unlock(); +} + +void MwView::MouseUp(BPoint point) { + MwLLHaikuEvent ev; + uint32 btn; + BPoint p; + + this->GetMouse(&p, &btn, false); + + ev.type = MwLLHAIKU_EVENT_MOUSEUP; + ev.mouse.point.x = point.x; + ev.mouse.point.y = point.y; + + if(!(btn & B_PRIMARY_MOUSE_BUTTON) && (this->buttons & B_PRIMARY_MOUSE_BUTTON)) { + ev.mouse.button = MwMOUSE_LEFT; + } else if(!(btn & B_SECONDARY_MOUSE_BUTTON) && (this->buttons & B_SECONDARY_MOUSE_BUTTON)) { + ev.mouse.button = MwMOUSE_RIGHT; + } else if(!(btn & B_TERTIARY_MOUSE_BUTTON) && (this->buttons & B_TERTIARY_MOUSE_BUTTON)) { + ev.mouse.button = MwMOUSE_MIDDLE; + } + this->buttons = btn; + + this->locker->Lock(); + arrput(this->handle->haiku.events, ev); + this->locker->Unlock(); +} + +void MwView::MouseMoved(BPoint point, uint32 transit, const BMessage* message) { + MwLLHaikuEvent ev; + + (void)transit; + (void)message; + + ev.type = MwLLHAIKU_EVENT_MOUSEMOVED; + ev.mouse.point.x = point.x; + ev.mouse.point.y = point.y; + ev.mouse.button = 0; + + this->locker->Lock(); + arrput(this->handle->haiku.events, ev); + this->locker->Unlock(); +} + +void MwView::SetColor(MwLLColor color) { + BMessage msg(BVIEW_MW_SET_COLOR); + + msg.AddInt32("view-color", color->common.red); + msg.AddInt32("view-color", color->common.green); + msg.AddInt32("view-color", color->common.blue); + + this->PostMessage(&msg); +} + +MwWindow::MwWindow(BRect frame, window_type type, uint32 flags) + : BWindow(frame, "Milsko", type, flags) { +} + +void MwWindow::MessageReceived(BMessage* message) { + void* ptr; + + if(message->FindPointer("window-view", &ptr) == B_OK) { + MwView* v = (MwView*)ptr; + + v->MessageReceived(message); + + return; + } + + switch(message->what) { + case BVIEW_MW_DESTROY: + { + this->Quit(); + delete this; + break; + } + case BWIN_MW_SET_TITLE: + { + const char* title; + + if(message->FindString("window-title", &title) != B_OK) break; + + this->SetTitle(title); + break; + } + case BWIN_MW_SET_TYPE: + { + int type; + + if(message->FindInt32("window-type", &type) != B_OK) break; + + this->SetType((window_type)type); + + if(type == B_UNTYPED_WINDOW) { + this->SetLook(B_NO_BORDER_WINDOW_LOOK); + } + break; + } + default: + { + BWindow::MessageReceived(message); + break; + } + } +} + +void MwWindow::FrameMoved(BPoint newLocation) { + MwLLHaikuEvent ev; + MwView* v = (MwView*)this->ChildAt(0); + + ev.type = MwLLHAIKU_EVENT_FRAMEMOVED; + ev.frame_moved.point.x = newLocation.x; + ev.frame_moved.point.y = newLocation.y; + + v->locker->Lock(); + arrput(v->handle->haiku.events, ev); + v->locker->Unlock(); +} + +bool MwWindow::QuitRequested() { + MwLLHaikuEvent ev; + MwView* v = (MwView*)this->ChildAt(0); + + ev.type = MwLLHAIKU_EVENT_CLOSE; + + v->locker->Lock(); + arrput(v->handle->haiku.events, ev); + v->locker->Unlock(); + + return false; +} + +struct app_param { + MwRect rc; + MwLL handle; +}; + +static int32 app_thread(void* data) { + struct app_param* r = (struct app_param*)data; + + r->handle->haiku.app = new MwApplication(r->rc, r->handle); + r->handle->haiku.app->Run(); + + free(r); + + return 0; +} + +static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) { + MwLL r = (MwLL)malloc(sizeof(*r)); + MwRect mrc; + BRect rc = BRect(x, y, x + width - 1, y + height - 1); + + mrc.x = x; + mrc.y = y; + mrc.width = width; + mrc.height = height; + + MwLLCreateCommon(r); + + r->common.copy_buffer = 1; + r->common.type = MwLLBackendHaiku; + + r->haiku.force_render = 0; + + r->haiku.parent = parent; + + r->haiku.events = NULL; + + if(parent == NULL) { + struct app_param* p = (struct app_param*)malloc(sizeof(*p)); + + r->haiku.app = NULL; + + p->rc = mrc; + p->handle = r; + + r->haiku.app = NULL; + r->haiku.window = NULL; + r->haiku.view = NULL; + + r->haiku.app_thread = spawn_thread(app_thread, NULL, B_NORMAL_PRIORITY, p); + resume_thread(r->haiku.app_thread); + + while(r->haiku.app == NULL || r->haiku.window == NULL || r->haiku.view == NULL) MwTimeSleep(10); + } else { + MwLL top = r; + while(top->haiku.parent != NULL) { + top = top->haiku.parent; + } + + r->haiku.app = NULL; + r->haiku.window = NULL; + r->haiku.view = new MwView(r, rc, B_FOLLOW_NONE, B_WILL_DRAW); + + parent->haiku.view->AddChild(r->haiku.view); + + r->haiku.view->SendMessage(BVIEW_MW_RAISE); + } + + r->haiku.x = x; + r->haiku.y = y; + r->haiku.width = width; + r->haiku.height = height; + + return r; +} + +static void MwLLDestroyImpl(MwLL handle) { + MwLLDestroyCommon(handle); + + handle->haiku.view->PostMessage(BVIEW_MW_DESTROY); + + if(handle->haiku.app != NULL) { + status_t exit_value; + + handle->haiku.app->PostMessage(BAPP_MW_DESTROY); + wait_for_thread(handle->haiku.app_thread, &exit_value); + + delete handle->haiku.app; + } else if(handle->haiku.window != NULL) { + handle->haiku.window->PostMessage(BWIN_MW_DESTROY); + } + + free(handle); +} + +static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLLColor color) { + int i; + BMessage msg(BVIEW_MW_POLYGON); + + for(i = 0; i < points_count; i++) { + BPoint p(points[i].x, points[i].y); + + msg.AddPoint("view-point", p); + } + + handle->haiku.view->SetColor(color); + handle->haiku.view->PostMessage(&msg); +} + +static void MwLLLineImpl(MwLL handle, MwPoint* points, MwLLColor color) { + int i; + BMessage msg(BVIEW_MW_LINE); + + for(i = 0; i < 2; i++) { + BPoint p(points[i].x, points[i].y); + + msg.AddPoint("view-point", p); + } + + handle->haiku.view->SetColor(color); + handle->haiku.view->PostMessage(&msg); +} + +static void MwLLBeginDrawImpl(MwLL handle) { + (void)handle; +} + +static void MwLLEndDrawImpl(MwLL handle) { + (void)handle; +} + +static MwLLColor MwLLAllocColorImpl(MwLL handle, int r, int g, int b) { + MwLLColor c = (MwLLColor)malloc(sizeof(*c)); + + MwLLColorUpdate(handle, c, r, g, b); + + return c; +} + +static void MwLLColorUpdateImpl(MwLL handle, MwLLColor c, int r, int g, int b) { + (void)handle; + + c->common.red = r; + c->common.green = g; + c->common.blue = b; +} + +static void MwLLFreeColorImpl(MwLLColor color) { + free(color); +} + +static void MwLLGetXYWHImpl(MwLL handle, int* x, int* y, unsigned int* w, unsigned int* h) { + *x = handle->haiku.x; + *y = handle->haiku.y; + *w = handle->haiku.width; + *h = handle->haiku.height; +} + +static void MwLLSetXYImpl(MwLL handle, int x, int y) { + BMessage msg(BVIEW_MW_MOVE); + + handle->haiku.x = x; + handle->haiku.y = y; + + msg.AddInt32("view-x", x); + msg.AddInt32("view-y", y); + + handle->haiku.view->PostMessage(&msg); +} + +static void MwLLSetWHImpl(MwLL handle, int w, int h) { + BMessage msg(BVIEW_MW_RESIZE); + + handle->haiku.width = w; + handle->haiku.height = h; + + msg.AddInt32("view-width", w); + msg.AddInt32("view-height", h); + + handle->haiku.view->PostMessage(&msg); + + MwLLDispatch(handle, resize, NULL); +} + +static void MwLLSetTitleImpl(MwLL handle, const char* title) { + BMessage msg(BWIN_MW_SET_TITLE); + + if(handle->haiku.app == NULL) return; + + msg.AddString("window-title", title); + + handle->haiku.window->PostMessage(&msg); +} + +static int MwLLPendingImpl(MwLL handle) { + handle->haiku.view->locker->Lock(); + if(arrlen(handle->haiku.events) > 0) { + handle->haiku.view->locker->Unlock(); + return 1; + } + handle->haiku.view->locker->Unlock(); + + return 0; +} + +static void MwLLNextEventImpl(MwLL handle) { + int rendered = 0; + + handle->haiku.view->locker->Lock(); + while(arrlen(handle->haiku.events) > 0) { + MwLLHaikuEvent* ev = &handle->haiku.events[0]; + MwMouse m; + + if(ev->type == MwLLHAIKU_EVENT_MOUSEDOWN || ev->type == MwLLHAIKU_EVENT_MOUSEUP) { + m.point = ev->mouse.point; + m.button = ev->mouse.button; + } + + if(ev->type == MwLLHAIKU_EVENT_DRAW) { + MwLLDispatch(handle, draw, NULL); + + rendered = 1; + } else if(ev->type == MwLLHAIKU_EVENT_CLOSE) { + MwLLDispatch(handle, close, NULL); + } else if(ev->type == MwLLHAIKU_EVENT_FRAMERESIZED) { + handle->haiku.width = ev->frame_resized.width + 1; + handle->haiku.height = ev->frame_resized.height + 1; + + MwLLDispatch(handle, resize, NULL); + } else if(ev->type == MwLLHAIKU_EVENT_FRAMEMOVED) { + handle->haiku.x = ev->frame_moved.point.x + 1; + handle->haiku.y = ev->frame_moved.point.y + 1; + } else if(ev->type == MwLLHAIKU_EVENT_MOUSEDOWN) { + MwLLDispatch(handle, down, &m); + } else if(ev->type == MwLLHAIKU_EVENT_MOUSEUP) { + MwLLDispatch(handle, up, &m); + } else if(ev->type == MwLLHAIKU_EVENT_MOUSEMOVED) { + MwLLDispatch(handle, move, &ev->mouse.point); + } + + arrdel(handle->haiku.events, 0); + } + handle->haiku.view->locker->Unlock(); + + if(rendered) handle->haiku.force_render = 0; +} + +static MwLLPixmap MwLLCreatePixmapImpl(MwLL handle, unsigned char* data, int width, int height) { + MwLLPixmap r = (MwLLPixmap)malloc(sizeof(*r)); + + (void)handle; + + r->common.raw = (unsigned char*)malloc(4 * width * height); + memcpy(r->common.raw, data, 4 * width * height); + + r->common.width = width; + r->common.height = height; + + r->haiku.bitmap = NULL; + + MwLLPixmapUpdate(r); + return r; + + return r; +} + +static void MwLLPixmapUpdateImpl(MwLLPixmap pixmap) { + uint32* px = (uint32*)malloc(4 * pixmap->common.width * pixmap->common.height); + int i; + + for(i = 0; i < pixmap->common.width * pixmap->common.height; i++) { + unsigned char* ipx = &pixmap->common.raw[4 * i]; + + px[i] = (ipx[3] << 24) | (ipx[0] << 16) | (ipx[1] << 8) | (ipx[2] << 0); + } + + if(pixmap->haiku.bitmap != NULL) delete pixmap->haiku.bitmap; + + pixmap->haiku.bitmap = new BBitmap(BRect(0, 0, pixmap->common.width - 1, pixmap->common.height - 1), B_RGBA32); + + pixmap->haiku.bitmap->SetBits(px, pixmap->common.width * pixmap->common.height * 4, 0, B_RGBA32); + + free(px); +} + +static void MwLLDestroyPixmapImpl(MwLLPixmap pixmap) { + free(pixmap->common.raw); + + free(pixmap); +} + +static void MwLLDrawPixmapImpl(MwLL handle, MwRect* rect, MwLLPixmap pixmap) { + BRect rc; + BMessage msg(BVIEW_MW_BITMAP); + + rc = BRect(rect->x, rect->y, rect->x + rect->width - 1, rect->y + rect->height - 1); + + msg.AddRect("view-rect", rc); + msg.AddPointer("view-bitmap", pixmap->haiku.bitmap); + + handle->haiku.view->PostMessage(&msg); +} + +static void MwLLSetIconImpl(MwLL handle, MwLLPixmap pixmap) { + (void)handle; + (void)pixmap; +} + +static void MwLLForceRenderImpl(MwLL handle) { + if(handle->haiku.force_render) return; + + handle->haiku.force_render = 1; + handle->haiku.view->PostMessage(BVIEW_MW_RENDER); +} + +static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) { + (void)handle; + (void)image; + (void)mask; +} + +static void MwLLDetachImpl(MwLL handle, MwPoint* point) { + BMessage msg(BVIEW_MW_DETACH); + + msg.AddPoint("view-point", BPoint(point->x, point->y)); + + handle->haiku.view->PostMessage(&msg); + + while(handle->haiku.window == NULL); +} + +static void MwLLShowImpl(MwLL handle, int show) { + if(show) { + handle->haiku.view->PostMessage(BVIEW_MW_SHOW); + } else { + handle->haiku.view->PostMessage(BVIEW_MW_HIDE); + } +} + +static void MwLLSetSizeHintsImpl(MwLL handle, int minx, int miny, int maxx, int maxy) { + (void)handle; + (void)minx; + (void)miny; + (void)maxx; + (void)maxy; +} + +static void MwLLMakeBorderlessImpl(MwLL handle, int toggle) { + if(toggle) { + handle->haiku.type = B_TITLED_WINDOW; + } else { + handle->haiku.type = B_UNTYPED_WINDOW; + } +} + +static void MwLLMakeToolWindowImpl(MwLL handle) { + handle->haiku.type = B_UNTYPED_WINDOW; +} + +static void MwLLMakePopupImpl(MwLL handle, MwLL parent) { + (void)handle; + (void)parent; +} + +static void MwLLBeginStateChangeImpl(MwLL handle) { + handle->haiku.type = handle->haiku.window == NULL ? B_TITLED_WINDOW : handle->haiku.window->Type(); +} + +static void MwLLEndStateChangeImpl(MwLL handle) { + BMessage msg(BWIN_MW_SET_TYPE); + + msg.AddInt32("window-type", handle->haiku.type); + + BMessenger(handle->haiku.window).SendMessage(&msg); +} + +static void MwLLFocusImpl(MwLL handle) { + (void)handle; +} + +static void MwLLGrabPointerImpl(MwLL handle, int toggle) { + (void)handle; + (void)toggle; +} + +static void MwLLSetClipboardImpl(MwLL handle, const char* text, int clipboard_type) { + (void)handle; + (void)text; + (void)clipboard_type; +} + +static void MwLLGetClipboardImpl(MwLL handle, int clipboard_type) { + (void)handle; + (void)clipboard_type; +} + +static void MwLLGetCursorCoordImpl(MwLL handle, MwPoint* point) { + MwLL top = handle; + BMessage msg(BVIEW_MW_GET_MOUSE); + BPoint p; + while(top->haiku.parent != NULL) { + top = top->haiku.parent; + } + + msg.AddPointer("view-ppoint", &p); + top->haiku.view->SendMessage(&msg); + + point->x = p.x; + point->y = p.y; +} + +static void MwLLGetScreenSizeImpl(MwLL handle, MwRect* rect) { + BScreen* screen = new BScreen(); + + (void)handle; + + if(screen->IsValid()) { + rect->width = screen->Frame().Width(); + rect->height = screen->Frame().Height(); + } + + delete screen; +} + +static void MwLLSetDarkThemeImpl(MwLL handle, int toggle) { + (void)handle; + (void)toggle; +} + +static MwBool MwLLDoModernImpl(MwLL handle) { + (void)handle; + return MwTRUE; +} + +static void MwLLRaiseImpl(MwLL handle) { + handle->haiku.view->SendMessage(BVIEW_MW_RAISE); +} + +static void MwLLClipImpl(MwLL handle, MwRect* rect) { + (void)handle; + (void)rect; +} + +int MwLLHaikuCallInitImpl() { + return 0; +} + +#include "call.c" +CALL(Haiku); diff --git a/widget/milsko/milskosrc/src/backend/nococoa.m b/widget/milsko/milskosrc/src/backend/nococoa.m new file mode 100644 index 0000000000..c009b38d31 --- /dev/null +++ b/widget/milsko/milskosrc/src/backend/nococoa.m @@ -0,0 +1,9 @@ +#include +#import + +void MwLLNoCocoaErrorMessage(void) { + NSAlert* alert = [[NSAlert alloc] init]; + [alert setMessageText:@"Milsko applications currently requires XQuartz or cocoa-way. PRs are welcome for anyone who wants to finish the Cocoa backend (prefarably in Objective-C)"]; + [alert addButtonWithTitle:@"Ok"]; + [alert runModal]; +} diff --git a/widget/milsko/milskosrc/src/backend/wayland/buffer.c b/widget/milsko/milskosrc/src/backend/wayland/buffer.c new file mode 100644 index 0000000000..df1de797c5 --- /dev/null +++ b/widget/milsko/milskosrc/src/backend/wayland/buffer.c @@ -0,0 +1,114 @@ +#include +#include + +void MwLLWaylandFramebufferSetup(struct _MwLLWayland* wayland) { + MwLLWaylandBufferSetup(&wayland->framebuffer, wayland->ww, wayland->wh); + + MwLLCairoFrontSetup(&wayland->cairo, wayland->framebuffer.buf_back, wayland->ww, wayland->wh); + + memset(wayland->framebuffer.buf_back, 0, wayland->framebuffer.buf_size); + if(wayland->configured) + wl_surface_attach(wayland->framebuffer.surface, wayland->framebuffer.shm_buffer, 0, 0); + wl_surface_commit(wayland->framebuffer.surface); + + MwLLWaylandHangUntilConfigured((MwLL)wayland); + MwLLWaylandBufferUpdate((MwLL)wayland, &wayland->framebuffer); +}; +void MwLLWaylandFramebufferDestroy(struct _MwLLWayland* wayland) { + wl_surface_attach(wayland->framebuffer.surface, NULL, 0, 0); + MwLLWaylandBufferDestroy(&wayland->framebuffer); + MwLLCairoFrontDestroy(&wayland->cairo); +}; + +void MwLLWaylandBackbufferSetup(struct _MwLLWayland* wayland) { + if(wayland->type != MwLL_WAYLAND_TOPLEVEL) { + return; + } + MwU32 w = wayland->ww; + MwU32 h = wayland->wh; + if(!wayland->has_decorations && wayland->do_csd) { + w += (CSD_BORDER_FRAME_LEFT + CSD_BORDER_FRAME_RIGHT); + h += (CSD_BORDER_FRAME_TOP + CSD_BORDER_FRAME_BOTTOM); + } + MwLLWaylandBufferSetup(&wayland->backbuffer, w, h); + + MwLLCairoBackSetup(&wayland->cairo, wayland->backbuffer.buf_back, w, h); + + memset(wayland->backbuffer.buf_back, 255, wayland->backbuffer.buf_size); + if(wayland->configured) + wl_surface_attach(wayland->backbuffer.surface, wayland->backbuffer.shm_buffer, 0, 0); + wl_surface_commit(wayland->backbuffer.surface); + MwLLWaylandHangUntilConfigured((MwLL)wayland); + MwLLWaylandBufferUpdate((MwLL)wayland, &wayland->backbuffer); +}; +void MwLLWaylandBackbufferDestroy(struct _MwLLWayland* wayland) { + // wl_surface_attach(wayland->backbuffer.surface, NULL, 0, 0); + MwLLWaylandBufferDestroy(&wayland->backbuffer); + MwLLCairoBackDestroy(&wayland->cairo); +}; + +void MwLLWaylandBufferSetup(struct _MwLLWaylandShmBuffer* buffer, MwU32 width, MwU32 height) { + int stride = width * 4; + char temp_name[] = "/tmp/milsko-wl-shm-XXXXXX"; + char temp_name_back[] = "/tmp/milsko-wl-shm-back-XXXXXX"; + + buffer->buf_size = width * height * 4; + + buffer->fd = mkstemp(temp_name); + buffer->fd_back = mkstemp(temp_name_back); + + unlink(temp_name); + unlink(temp_name_back); + + if(posix_fallocate(buffer->fd, 0, buffer->buf_size) != 0) { + printf("failure setting up wl_shm: could not fallocate. %s.\n", strerror(errno)); + close(buffer->fd); + return; + } + if(posix_fallocate(buffer->fd_back, 0, buffer->buf_size) != 0) { + printf("failure setting up wl_shm: could not fallocate. %s.\n", strerror(errno)); + close(buffer->fd_back); + return; + } + if(ftruncate(buffer->fd, buffer->buf_size) != 0) { + printf("failure setting up wl_shm: could not truncate. %s.\n", strerror(errno)); + close(buffer->fd); + return; + } + if(ftruncate(buffer->fd_back, buffer->buf_size) != 0) { + printf("failure setting up wl_shm: could not truncate. %s.\n", strerror(errno)); + close(buffer->fd_back); + return; + } + + buffer->buf = mmap(NULL, buffer->buf_size, PROT_WRITE, MAP_SHARED, buffer->fd, 0); + buffer->buf_back = mmap(NULL, buffer->buf_size, PROT_WRITE, MAP_SHARED, buffer->fd_back, 0); + + fsync(buffer->fd); + fsync(buffer->fd_back); + + if(!(buffer->shm_pool = wl_shm_create_pool(buffer->shm, buffer->fd, buffer->buf_size))) { + printf("failure setting up wl_shm: could not create pool.\n"); + } + if(!(buffer->shm_pool_back = wl_shm_create_pool(buffer->shm, buffer->fd_back, buffer->buf_size))) { + printf("failure setting up wl_shm: could not create pool.\n"); + } + buffer->shm_buffer = wl_shm_pool_create_buffer(buffer->shm_pool, 0, width, height, stride, WL_SHM_FORMAT_ARGB8888); + buffer->shm_buffer_back = wl_shm_pool_create_buffer(buffer->shm_pool_back, 0, width, height, stride, WL_SHM_FORMAT_ARGB8888); + buffer->setup = MwTRUE; +} + +void MwLLWaylandBufferDestroy(struct _MwLLWaylandShmBuffer* buffer) { + if(!buffer->setup) { + return; + } + if(buffer->buf) munmap(buffer->buf, buffer->buf_size); + if(buffer->buf_back) munmap(buffer->buf_back, buffer->buf_size); + if(buffer->shm_buffer) wl_buffer_destroy(buffer->shm_buffer); + if(buffer->shm_buffer_back) wl_buffer_destroy(buffer->shm_buffer_back); + if(buffer->shm_pool) wl_shm_pool_destroy(buffer->shm_pool); + if(buffer->shm_pool_back) wl_shm_pool_destroy(buffer->shm_pool_back); + close(buffer->fd); + close(buffer->fd_back); + buffer->setup = MwFALSE; +} diff --git a/widget/milsko/milskosrc/src/backend/wayland/interfaces.c b/widget/milsko/milskosrc/src/backend/wayland/interfaces.c new file mode 100644 index 0000000000..84ed4923de --- /dev/null +++ b/widget/milsko/milskosrc/src/backend/wayland/interfaces.c @@ -0,0 +1,1225 @@ +#include +#include +#include "../../../external/stb_ds.h" + +/* TODO: find out what FreeBSD and such wants us to include */ +#ifdef __FreeBSD__ +/* XXX: Untested (nishi) */ +#include +#else +#include +#include +#endif + +#include + +static void setup_clipboard(MwLL self, struct wl_seat* wl_seat); +static void setup_zwp_clipboard(MwLL self, struct wl_seat* wl_seat); + +static void destroy_clipboard(MwLL self, struct wl_seat* wl_seat); +static void destroy_zwp_clipboard(MwLL self, struct wl_seat* wl_seat); + +/* Recursively dispatch a move event to a widget and its children */ +static void recursive_dispatch_move(MwLL handle, MwMouse* p) { + MwWidget h = (MwWidget)handle->common.user; + if(h) { + int i; + for(i = 0; i < arrlen(h->children); i++) { + MwLLDispatch(h->children[i]->lowlevel, move, p); + if(arrlen(h->children[i]->children) > 0) { + recursive_dispatch_move(h->children[i]->lowlevel, p); + } + } + } +}; + +/* `wl_registry.global` callback */ +static void new_protocol(void* data, struct wl_registry* registry, + MwU32 name, const char* interface, + MwU32 version) { + MwLL self = data; + (void)version; + (void)registry; + + WAYLAND_EVENT_OP_START(self); + + wayland_protocol_callback_table_t* cb = shget(self->wayland.wl_protocol_setup_map, interface); + if(cb != NULL) { + shput(self->wayland.wl_protocol_map, interface, cb->setup(name, data, version)); + /* we don't care for adding this protocol, we just use it to know if the compositor will let us have transparent surfaces */ + } else if(strcmp(interface, "wp_alpha_modifier_v1") == 0) { + self->common.supports_transparency = MwTRUE; + } else { + // printf("unknown interface %s\n", interface); + } + + WAYLAND_EVENT_OP_END(self); +}; + +/* `wl_registry.global_remove` callback */ +static void protocol_removed(void* data, + struct wl_registry* registry, + MwU32 name) { + (void)data; + (void)registry; + (void)name; + printf("%d destroyed\n", name); +}; + +static void wl_offer(void* data, + struct wl_data_offer* wl_data_offer, + const char* mime_type) { + wl_clipboard_device_context_t* self = data; + wl_data_offer_accept(wl_data_offer, self->ll->wayland.clipboard_serial, mime_type); +}; + +struct wl_data_offer_listener offer_listener = { + .offer = wl_offer, +}; + +static void wl_data_device_data_offer(void* data, + struct wl_data_device* wl_data_device, + struct wl_data_offer* offer) { + wl_clipboard_device_context_t* self = data; + (void)wl_data_device; + + wl_data_offer_add_listener(offer, &offer_listener, data); + + self->offer.wl = offer; +}; + +static void wl_data_device_enter(void* data, + struct wl_data_device* wl_data_device, + uint32_t serial, + struct wl_surface* surface, + wl_fixed_t x, + wl_fixed_t y, + struct wl_data_offer* id) { + MwLL self = data; + (void)wl_data_device; + (void)surface; + (void)x; + (void)y; + (void)id; + + WAYLAND_EVENT_OP_START(self); + + self->wayland.clipboard_serial = serial; + + WAYLAND_EVENT_OP_END(self); +}; +static void wl_data_device_leave(void* data, + struct wl_data_device* wl_data_device) { + MwLL self = data; + + WAYLAND_EVENT_OP_START(self); + wl_data_device_destroy(wl_data_device); + WAYLAND_EVENT_OP_END(self); +}; +static void wl_data_device_motion(void* data, + struct wl_data_device* wl_data_device, + uint32_t time, + wl_fixed_t x, + wl_fixed_t y) { + (void)data; + (void)wl_data_device; + (void)time; + (void)x; + (void)y; +}; +static void wl_data_device_drop(void* data, + struct wl_data_device* wl_data_device) { + (void)data; + (void)wl_data_device; +}; + +static void wl_data_device_selection(void* data, + struct wl_data_device* wl_data_device, + struct wl_data_offer* id) { + (void)data; + (void)wl_data_device; + (void)id; +}; + +struct wl_data_device_listener wl_data_device_listener = { + .data_offer = wl_data_device_data_offer, + .enter = wl_data_device_enter, + .leave = wl_data_device_leave, + .motion = wl_data_device_motion, + .drop = wl_data_device_drop, + .selection = wl_data_device_selection, +}; + +static void zwp_primary_selection_device_v1_data_offer(void* data, + struct zwp_primary_selection_device_v1* zwp_primary_selection_device_v1, + struct zwp_primary_selection_offer_v1* offer) { + wl_clipboard_device_context_t* self = data; + (void)zwp_primary_selection_device_v1; + + self->offer.zwp = offer; +}; + +static void zwp_primary_selection_device_v1_selection(void* data, + struct zwp_primary_selection_device_v1* zwp_primary_selection_device_v1, + struct zwp_primary_selection_offer_v1* id) { + (void)data; + (void)zwp_primary_selection_device_v1; + (void)id; +}; + +struct zwp_primary_selection_device_v1_listener zwp_primary_selection_device_v1_listener = { + .data_offer = zwp_primary_selection_device_v1_data_offer, + .selection = zwp_primary_selection_device_v1_selection, +}; + +void MwLLWaylandClipboardRead(wl_clipboard_device_context_t* ctx, int clipboard_type) { + int fds[2]; + fd_set set; + char* buf = NULL; + struct timeval timeout; + int rc = 0; + + if(pipe(fds) != 0) { + return; + } + + FD_ZERO(&set); + FD_SET(fds[0], &set); + timeout.tv_sec = 0; + timeout.tv_usec = 100; + + if(clipboard_type == MwCLIPBOARD_PRIMARY && ctx->offer.zwp) { + zwp_primary_selection_offer_v1_receive(ctx->offer.zwp, "text/plain", fds[1]); + } else if(ctx->offer.wl) { + wl_data_offer_receive(ctx->offer.wl, "text/plain", fds[1]); + } + close(fds[1]); + + MwLLWaylandFlush(ctx->ll); + wl_display_roundtrip(ctx->ll->wayland.display); + + while(MwTRUE) { + rc = select(fds[0] + 1, &set, NULL, NULL, &timeout); + if(rc <= 0) { + break; + } else { + char b; + ssize_t n = read(fds[0], &b, sizeof(b)); + if(n <= 0) { + break; + } + arrpush(buf, b); + } + } + arrpush(buf, 0); + close(fds[0]); + + MwLLDispatch(ctx->ll, clipboard, buf); + arrfree(buf); + + ctx->ll->wayland.events_pending = 1; +} + +static void wl_data_source_listener_target(void* data, + struct wl_data_source* wl_data_source, + const char* mime_type) { + (void)data; + (void)wl_data_source; + (void)mime_type; +}; +static void wl_data_source_listener_send(void* data, + struct wl_data_source* wl_data_source, + const char* mime_type, + int32_t fd) { + MwLL self = data; + (void)wl_data_source; + (void)mime_type; + + WAYLAND_EVENT_OP_START(self); + if(self->wayland.clipboard_buffer != NULL) { + write(fd, self->wayland.clipboard_buffer, strlen(self->wayland.clipboard_buffer)); + close(fd); + } + WAYLAND_EVENT_OP_END(self); +}; +static void wl_data_source_listener_cancelled(void* data, + struct wl_data_source* wl_data_source); + +struct wl_data_source_listener wl_data_source_listener = { + .target = wl_data_source_listener_target, + .send = wl_data_source_listener_send, + .cancelled = wl_data_source_listener_cancelled, +}; + +static void wl_data_source_listener_cancelled(void* data, + struct wl_data_source* wl_data_source) { + MwLL self = data; + + WAYLAND_EVENT_OP_START(self); + + if(wl_data_source) + wl_data_source_destroy(wl_data_source); + + self->wayland.clipboard_source.wl = wl_data_device_manager_create_data_source(self->wayland.clipboard_manager.wl); + + wl_data_source_offer(self->wayland.clipboard_source.wl, "text/plain"); + wl_data_source_offer(self->wayland.clipboard_source.wl, "text/plain;charset=utf-8"); + wl_data_source_offer(self->wayland.clipboard_source.wl, "TEXT"); + wl_data_source_offer(self->wayland.clipboard_source.wl, "STRING"); + wl_data_source_offer(self->wayland.clipboard_source.wl, "UTF8_STRING"); + + wl_data_source_add_listener(self->wayland.clipboard_source.wl, &wl_data_source_listener, self); + + WAYLAND_EVENT_OP_END(self); +}; + +static void zwp_primary_selection_source_v1_send(void* data, + struct zwp_primary_selection_source_v1* wl_data_source, + const char* mime_type, + int32_t fd) { + MwLL self = data; + (void)wl_data_source; + (void)mime_type; + + WAYLAND_EVENT_OP_START(self); + + if(self->wayland.clipboard_buffer != NULL) { + write(fd, self->wayland.clipboard_buffer, strlen(self->wayland.clipboard_buffer)); + close(fd); + } + + WAYLAND_EVENT_OP_END(self); +}; +static void zwp_primary_selection_source_v1_cancelled(void* data, + struct zwp_primary_selection_source_v1* wl_data_source) { + MwLL self = data; + (void)wl_data_source; + + WAYLAND_EVENT_OP_START(self); + + zwp_primary_selection_source_v1_destroy(self->wayland.clipboard_source.zwp); + + self->wayland.clipboard_source.zwp = zwp_primary_selection_device_manager_v1_create_source(self->wayland.clipboard_manager.zwp); + + zwp_primary_selection_source_v1_offer(self->wayland.clipboard_source.zwp, "text/plain"); + zwp_primary_selection_source_v1_offer(self->wayland.clipboard_source.zwp, "text/plain;charset=utf-8"); + zwp_primary_selection_source_v1_offer(self->wayland.clipboard_source.zwp, "TEXT"); + zwp_primary_selection_source_v1_offer(self->wayland.clipboard_source.zwp, "STRING"); + zwp_primary_selection_source_v1_offer(self->wayland.clipboard_source.zwp, "UTF8_STRING"); + + WAYLAND_EVENT_OP_END(self); +}; + +struct zwp_primary_selection_source_v1_listener zwp_primary_selection_source_v1_listener = { + .send = zwp_primary_selection_source_v1_send, + .cancelled = zwp_primary_selection_source_v1_cancelled, +}; + +/* wl_data_device_manager setup function */ +static wayland_protocol_t* wl_data_device_manager_setup(MwU32 name, struct _MwLLWayland* wayland, MwU32 version) { + (void)version; + wayland->clipboard_manager.wl = wl_registry_bind(wayland->registry, name, &wl_data_device_manager_interface, 2); + + wayland->clipboard_source.wl = wl_data_device_manager_create_data_source(wayland->clipboard_manager.wl); + + wl_data_source_offer(wayland->clipboard_source.wl, "text/plain"); + wl_data_source_offer(wayland->clipboard_source.wl, "text/plain;charset=utf-8"); + wl_data_source_offer(wayland->clipboard_source.wl, "TEXT"); + wl_data_source_offer(wayland->clipboard_source.wl, "STRING"); + wl_data_source_offer(wayland->clipboard_source.wl, "UTF8_STRING"); + + wl_data_source_add_listener(wayland->clipboard_source.wl, &wl_data_source_listener, wayland); + + if(wayland->pointer_seat) { + setup_clipboard((MwLL)wayland, wayland->pointer_seat); + } + + return NULL; +} + +static void wl_data_device_manager_interface_destroy(struct _MwLLWayland* wayland, wayland_protocol_t* data) { + (void)data; + if(wayland->clipboard_manager.wl != NULL) { + wl_data_device_manager_destroy(wayland->clipboard_manager.wl); + wayland->clipboard_manager.wl = NULL; + } + if(wayland->clipboard_source.wl) { + // wl_data_source_destroy(wayland->clipboard_source.wl); + wayland->clipboard_source.wl = NULL; + } +} + +/* zwp_primary_selection_device_manager_v1 setup function */ +static wayland_protocol_t* zwp_primary_selection_device_manager_v1_setup(MwU32 name, struct _MwLLWayland* wayland, MwU32 version) { + (void)version; + wayland->clipboard_manager.zwp = wl_registry_bind(wayland->registry, name, &zwp_primary_selection_device_manager_v1_interface, 1); + + wayland->clipboard_source.zwp = zwp_primary_selection_device_manager_v1_create_source(wayland->clipboard_manager.zwp); + + zwp_primary_selection_source_v1_offer(wayland->clipboard_source.zwp, "text/plain"); + zwp_primary_selection_source_v1_offer(wayland->clipboard_source.zwp, "text/plain;charset=utf-8"); + zwp_primary_selection_source_v1_offer(wayland->clipboard_source.zwp, "TEXT"); + zwp_primary_selection_source_v1_offer(wayland->clipboard_source.zwp, "STRING"); + zwp_primary_selection_source_v1_offer(wayland->clipboard_source.zwp, "UTF8_STRING"); + + zwp_primary_selection_source_v1_add_listener(wayland->clipboard_source.zwp, &zwp_primary_selection_source_v1_listener, wayland); + + wayland->supports_zwp = MwTRUE; + + if(wayland->pointer_seat) { + setup_zwp_clipboard((MwLL)wayland, wayland->pointer_seat); + } + + return NULL; +} + +static void zwp_primary_selection_device_manager_v1_interface_destroy(struct _MwLLWayland* wayland, wayland_protocol_t* data) { + (void)wayland; + (void)data; +} + +/* zwp_primary_selection_device_manager_v1 setup function */ +static wayland_protocol_t* zwp_pointer_constraints_v1_setup(MwU32 name, struct _MwLLWayland* wayland, MwU32 version) { + (void)version; + wayland->pointer_constraints = wl_registry_bind(wayland->registry, name, &zwp_pointer_constraints_v1_interface, 1); + return NULL; +} + +static void zwp_pointer_constraints_v1_interface_destroy(struct _MwLLWayland* wayland, wayland_protocol_t* data) { + (void)wayland; + (void)data; +} + +static struct wl_surface* curSurface = NULL; + +/* `wl_pointer.enter` callback */ +static void pointer_enter(void* data, struct wl_pointer* wl_pointer, MwU32 serial, + struct wl_surface* surface, wl_fixed_t surface_x, + wl_fixed_t surface_y) { + MwLL self = data; + MwLL topmost_parent = self; + + (void)surface_x; + (void)surface_y; + (void)wl_pointer; + + WAYLAND_EVENT_OP_START(self); + while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent; + + if(self->wayland.framebuffer.surface == surface) { + curSurface = surface; + self->wayland.pointer_serial = serial; + + wl_pointer_set_cursor(self->wayland.pointer, self->wayland.pointer_serial, topmost_parent->wayland.cursor.surface, 0, 0); + } + + if(self->wayland.backbuffer.surface == surface) { + curSurface = surface; + } + WAYLAND_EVENT_OP_END(self); +}; + +/* `wl_pointer.leave` callback */ +static void pointer_leave(void* data, struct wl_pointer* wl_pointer, MwU32 serial, + struct wl_surface* surface) { + MwLL self = data; + (void)wl_pointer; + (void)serial; + (void)surface; + WAYLAND_EVENT_OP_START(self); + curSurface = NULL; + WAYLAND_EVENT_OP_END(self); +}; + +static void xdg_borderless_step_mdown(MwLL self, MwMouse p, MwU32 serial) { + if(self->wayland.type == MwLL_WAYLAND_TOPLEVEL && self->wayland.backbuffer.surface == curSurface) { + if(p.point.y >= (self->wayland.wh + CSD_BORDER_FRAME_TOP + CSD_BORDER_FRAME_BOTTOM) - 5) { + if(p.point.x >= (self->wayland.ww + CSD_BORDER_FRAME_LEFT + CSD_BORDER_FRAME_RIGHT) - 5) { + xdg_toplevel_resize(self->wayland.toplevel->xdg_top_level, self->wayland.pointer_seat, serial, XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM_RIGHT); + } else { + xdg_toplevel_resize(self->wayland.toplevel->xdg_top_level, self->wayland.pointer_seat, serial, XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM); + } + } else if(p.point.y <= 5) { + if(p.point.x >= (self->wayland.ww + CSD_BORDER_FRAME_LEFT + CSD_BORDER_FRAME_RIGHT) - 5) { + xdg_toplevel_resize(self->wayland.toplevel->xdg_top_level, self->wayland.pointer_seat, serial, XDG_TOPLEVEL_RESIZE_EDGE_TOP_RIGHT); + } else { + xdg_toplevel_resize(self->wayland.toplevel->xdg_top_level, self->wayland.pointer_seat, serial, XDG_TOPLEVEL_RESIZE_EDGE_TOP); + } + } else if(p.point.x >= (self->wayland.ww + CSD_BORDER_FRAME_LEFT + CSD_BORDER_FRAME_RIGHT) - 5) { + xdg_toplevel_resize(self->wayland.toplevel->xdg_top_level, self->wayland.pointer_seat, serial, XDG_TOPLEVEL_RESIZE_EDGE_RIGHT); + } else if(p.point.x <= 5) { + xdg_toplevel_resize(self->wayland.toplevel->xdg_top_level, self->wayland.pointer_seat, serial, XDG_TOPLEVEL_RESIZE_EDGE_LEFT); + } else if(p.point.y <= CSD_BORDER_FRAME_TOP) { + if(p.point.x >= CSD_BORDER_FRAME_LEFT && p.point.x <= CSD_BORDER_FRAME_LEFT + 18) { + } else if(p.point.x >= (self->wayland.ww + CSD_BORDER_FRAME_LEFT + CSD_BORDER_FRAME_RIGHT) - 21) { + } else if(p.point.x >= (self->wayland.ww + CSD_BORDER_FRAME_LEFT + CSD_BORDER_FRAME_RIGHT) - 38) { + } else { + xdg_toplevel_move(self->wayland.toplevel->xdg_top_level, self->wayland.pointer_seat, serial); + } + } + }; +} +static void xdg_borderless_step_mup(MwLL self, MwMouse p, MwU32 serial) { + (void)serial; + if(self->wayland.type == MwLL_WAYLAND_TOPLEVEL && self->wayland.backbuffer.surface == curSurface) { + if(p.point.y <= CSD_BORDER_FRAME_TOP) { + if(p.point.x >= CSD_BORDER_FRAME_LEFT && p.point.x <= CSD_BORDER_FRAME_LEFT + 18) { + MwLLDispatch(self, close, NULL); + } else if(p.point.x >= (self->wayland.ww + CSD_BORDER_FRAME_LEFT + CSD_BORDER_FRAME_RIGHT) - 21) { + self->wayland.toplevel->maxim_state = !self->wayland.toplevel->maxim_state; + if(self->wayland.toplevel->maxim_state == 0) { + xdg_toplevel_unset_maximized(self->wayland.toplevel->xdg_top_level); + } else { + xdg_toplevel_set_maximized(self->wayland.toplevel->xdg_top_level); + } + self->wayland.setting_wh = 1; + MwLLWaylandRegionSetup(self); + } else if(p.point.x >= (self->wayland.ww + CSD_BORDER_FRAME_LEFT + CSD_BORDER_FRAME_RIGHT) - 38) { + xdg_toplevel_set_minimized(self->wayland.toplevel->xdg_top_level); + } + } + }; +} + +static void relative_pointer_motion(void* data, + struct zwp_relative_pointer_v1* pointer, + uint32_t timeHi, + uint32_t timeLo, + wl_fixed_t dx, + wl_fixed_t dy, + wl_fixed_t dxUnaccel, + wl_fixed_t dyUnaccel) { + MwLL self = data; + MwMouse p; + + (void)pointer; + (void)timeHi; + (void)timeLo; + (void)dx; + (void)dy; + + WAYLAND_EVENT_OP_START(self); + + p.point.x = wl_fixed_to_int(dxUnaccel); + p.point.y = wl_fixed_to_int(dyUnaccel); + + recursive_dispatch_move(self, &p); + if(self->wayland.locked_pointer) zwp_locked_pointer_v1_set_cursor_position_hint(self->wayland.locked_pointer, 0, CSD_BORDER_FRAME_TOP); + + WAYLAND_EVENT_OP_END(self); +} + +struct zwp_relative_pointer_v1_listener MwLLWaylandRelativePointerListener = + { + relative_pointer_motion}; + +/* zwp_primary_selection_device_manager_v1 setup function */ +static wayland_protocol_t* zwp_relative_pointer_manager_v1_setup(MwU32 name, struct _MwLLWayland* wayland, MwU32 version) { + (void)version; + wayland->relative_pointer_manager = wl_registry_bind(wayland->registry, name, &zwp_relative_pointer_manager_v1_interface, 1); + return NULL; +} + +static void zwp_relative_pointer_manager_v1_interface_destroy(struct _MwLLWayland* wayland, wayland_protocol_t* data) { + (void)wayland; + (void)data; +} + +/* `wl_pointer.motion` callback */ +static void pointer_motion(void* data, struct wl_pointer* wl_pointer, MwU32 time, + wl_fixed_t surface_x, wl_fixed_t surface_y) { + MwLL self = data; + MwLL topmost_parent = self; + MwMouse p; + MwBool inArea = MwFALSE; + MwLL currentlyHeldWidget = NULL; + + (void)time; + (void)wl_pointer; + + WAYLAND_EVENT_OP_START(self); + while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent; + + currentlyHeldWidget = topmost_parent->wayland.currentlyHeldWidget; + + if(self->wayland.framebuffer.surface) { + inArea |= self->wayland.framebuffer.surface == curSurface; + } + + if(self->wayland.backbuffer.surface) { + inArea |= self->wayland.backbuffer.surface == curSurface; + } + + self->wayland.cur_mouse_pos.x = wl_fixed_to_int(surface_x); + self->wayland.cur_mouse_pos.y = wl_fixed_to_int(surface_y); + if(currentlyHeldWidget != NULL) { + currentlyHeldWidget->wayland.cur_mouse_pos.x = wl_fixed_to_int(surface_x); + currentlyHeldWidget->wayland.cur_mouse_pos.y = wl_fixed_to_int(surface_y); + } + + if(inArea) { + p.point = self->wayland.cur_mouse_pos; + MwLLDispatch(self, move, &p); + + wl_pointer_set_cursor(self->wayland.pointer, self->wayland.pointer_serial, self->wayland.cursor.surface, 0, 0); + } else if(currentlyHeldWidget == self) { + p.point = currentlyHeldWidget->wayland.cur_mouse_pos; + MwLLDispatch(currentlyHeldWidget, move, &p); + } + + WAYLAND_EVENT_OP_END(self); +}; + +/* `wl_pointer.button` callback */ +static void pointer_button(void* data, struct wl_pointer* wl_pointer, MwU32 serial, MwU32 time, MwU32 button, MwU32 state) { + MwLL self = data; + MwMouse p; + MwBool inArea = MwFALSE; + MwLL topmost_parent = self; + + (void)wl_pointer; + (void)serial; + (void)time; + + WAYLAND_EVENT_OP_START(self); + + p.point = self->wayland.cur_mouse_pos; + while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent; + + if(self->wayland.framebuffer.surface) { + inArea |= self->wayland.framebuffer.surface == curSurface; + } + if(self->wayland.backbuffer.surface) { + inArea |= self->wayland.backbuffer.surface == curSurface; + } + if(inArea) { + switch(button) { + case BTN_LEFT: + p.button = MwMOUSE_LEFT; + break; + case BTN_MIDDLE: + p.button = MwMOUSE_MIDDLE; + break; + case BTN_RIGHT: + p.button = MwMOUSE_RIGHT; + break; + } + self->wayland.held_down = state == WL_POINTER_BUTTON_STATE_PRESSED; + + switch(state) { + case WL_POINTER_BUTTON_STATE_PRESSED: + if(button == BTN_LEFT) { + topmost_parent->wayland.focusedWidget = self; + } + MwLLDispatch(self, down, &p); + topmost_parent->wayland.currentlyHeldWidget = self; + + break; + case WL_POINTER_BUTTON_STATE_RELEASED: + if(topmost_parent->wayland.currentlyHeldWidget != NULL) { + MwLLDispatch(topmost_parent->wayland.currentlyHeldWidget, up, &p); + topmost_parent->wayland.currentlyHeldWidget = NULL; + } else { + MwLLDispatch(self, up, &p); + } + break; + } + } + + if(!self->wayland.has_decorations && self->wayland.do_csd) { + if(state != WL_POINTER_BUTTON_STATE_RELEASED) + xdg_borderless_step_mdown(self, p, serial); + else + xdg_borderless_step_mup(self, p, serial); + } + + WAYLAND_EVENT_OP_END(self); +}; + +/* `wl_pointer.axis` callback */ +static void pointer_axis(void* data, struct wl_pointer* wl_pointer, MwU32 time, + MwU32 axis, wl_fixed_t value) { + (void)data; + (void)wl_pointer; + (void)time; + (void)axis; + (void)value; +}; + +struct wl_pointer_listener pointer_listener = { + .enter = pointer_enter, + .leave = pointer_leave, + .motion = pointer_motion, + .button = pointer_button, + .axis = pointer_axis, +}; + +/* `wl_keyboard.keymap` callback */ +static void keyboard_keymap(void* data, + struct wl_keyboard* wl_keyboard, + MwU32 format, + int32_t fd, + MwU32 size) { + MwLL self = data; + (void)wl_keyboard; + + if(!self->wayland.parent) { + assert(format == WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1); + + char* map_shm = (char*)mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); + assert(map_shm != MAP_FAILED); + + struct xkb_keymap* xkb_keymap = xkb_keymap_new_from_string( + self->wayland.xkb_context, map_shm, XKB_KEYMAP_FORMAT_TEXT_V1, + XKB_KEYMAP_COMPILE_NO_FLAGS); + munmap(map_shm, size); + close(fd); + + struct xkb_state* xkb_state = xkb_state_new(xkb_keymap); + + self->wayland.xkb_keymap = xkb_keymap; + self->wayland.xkb_state = xkb_state; + } else { + self->wayland.xkb_keymap = self->wayland.parent->wayland.xkb_keymap; + self->wayland.xkb_state = self->wayland.parent->wayland.xkb_state; + } +}; + +/* `wl_keyboard.enter` callback */ +static void keyboard_enter(void* data, + struct wl_keyboard* wl_keyboard, + MwU32 serial, + struct wl_surface* surface, + struct wl_array* keys) { + MwLL self = data; + (void)wl_keyboard; + (void)surface; + (void)keys; + + WAYLAND_EVENT_OP_START(self); + + self->wayland.keyboard_serial = serial; + + MwLLDispatch(self, focus_in, NULL); + + WAYLAND_EVENT_OP_END(self); +}; + +/* `wl_keyboard.leave` callback */ +static void keyboard_leave(void* data, + struct wl_keyboard* wl_keyboard, + MwU32 serial, + struct wl_surface* surface) { + MwLL self = data; + (void)wl_keyboard; + (void)serial; + (void)surface; + + WAYLAND_EVENT_OP_START(self); + + MwLLDispatch(self, focus_out, NULL); + + WAYLAND_EVENT_OP_END(self); +}; + +/* `wl_keyboard.key` callback */ +static void keyboard_key(void* data, + struct wl_keyboard* wl_keyboard, + MwU32 serial, + MwU32 _time, + MwU32 key, + MwU32 state) { + MwLL self = data; + MwBool inArea = 0; + MwLL topmost_parent = self; + + (void)wl_keyboard; + (void)serial; + (void)_time; + + while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent; + + WAYLAND_EVENT_OP_START(self); + + if(self->wayland.framebuffer.surface) { + inArea |= self->wayland.framebuffer.surface == curSurface; + } + + if(self->wayland.backbuffer.surface) { + inArea |= self->wayland.backbuffer.surface == curSurface; + } + + inArea |= (self == topmost_parent->wayland.focusedWidget); + + if(inArea) { + xkb_layout_index_t layout; + MwU32 levels; + xkb_level_index_t level = 0; + const xkb_keysym_t* syms_out; + MwU32 keycode = key + 8; + MwU64 syms_num; + int i; + + if(!self->wayland.xkb_keymap) { + WAYLAND_EVENT_OP_END(self); + return; + } + + layout = xkb_state_key_get_layout(self->wayland.xkb_state, keycode); + levels = + xkb_keymap_num_levels_for_key(self->wayland.xkb_keymap, keycode, layout); + + if((((self->wayland.mod_state & 1) == 1) || ((self->wayland.mod_state & 2) == 2)) && levels >= 2) { + level = 1; + } else if(levels >= 1) { + level = 0; + } + syms_num = xkb_keymap_key_get_syms_by_level(self->wayland.xkb_keymap, keycode, layout, level, &syms_out); + if(syms_out == NULL) { + WAYLAND_EVENT_OP_END(self); + return; + } + + for(i = 0; i < syms_num; i++) { + int sym = syms_out[i]; + int key = -1; + + switch(sym) { + case XKB_KEY_BackSpace: + key = MwKEY_BACKSPACE; + break; + case XKB_KEY_Left: + key = MwKEY_LEFT; + break; + case XKB_KEY_Right: + key = MwKEY_RIGHT; + break; + case XKB_KEY_Up: + key = MwKEY_UP; + break; + case XKB_KEY_Down: + key = MwKEY_DOWN; + break; + case XKB_KEY_Return: + key = MwKEY_ENTER; + break; + case XKB_KEY_Escape: + key = MwKEY_ESCAPE; + break; + case XKB_KEY_Shift_L: + key = MwKEY_LEFTSHIFT; + break; + case XKB_KEY_Shift_R: + key = MwKEY_RIGHTSHIFT; + break; + case XKB_KEY_Alt_L: + case XKB_KEY_Alt_R: + key = MwKEY_ALT; + break; + case XKB_KEY_Control_L: + case XKB_KEY_Control_R: + key = MwKEY_CONTROL; + break; + default: + if(MwStringIsKeyUTF8(sym)) { + key = sym; + } + } + + if((self->wayland.mod_state & 4) == 4) { + key |= MwKEY_CONTROL_FLAG; + } + if((self->wayland.mod_state & 8) == 8) { + key |= MwKEY_ALT_FLAG; + } + + if(key != -1) { + if(state == WL_KEYBOARD_KEY_STATE_PRESSED) { + MwLL topmost_parent = self; + while(topmost_parent->wayland.parent) { + MwLLDispatch(topmost_parent, key, &key); + topmost_parent = topmost_parent->wayland.parent; + } + self->wayland.holding_key = MwTRUE; + self->wayland.last_pressed_key = key; + } else { + MwLLDispatch(self, key_released, &key); + self->wayland.holding_key = MwFALSE; + } + self->wayland.start_time = MwTimeGetTick(); + self->wayland.next_elapsed = self->wayland.keyboard_delay; + } + } + } + + if(!MwWaylandVulkan) { + MwLLDispatch(self, draw, NULL); + } + + WAYLAND_EVENT_OP_END(self); +}; + +/* `wl_keyboard.modifiers` callback */ +static void keyboard_modifiers(void* data, + struct wl_keyboard* wl_keyboard, + MwU32 serial, + MwU32 mods_depressed, + MwU32 mods_latched, + MwU32 mods_locked, + MwU32 group) { + MwLL self = data; + (void)wl_keyboard; + (void)serial; + (void)group; + (void)mods_latched; + + WAYLAND_EVENT_OP_START(self); + + self->wayland.mod_state = 0; + self->wayland.mod_state |= mods_depressed; + self->wayland.mod_state |= mods_locked; + + WAYLAND_EVENT_OP_END(self); +}; + +static void setup_zwp_clipboard(MwLL self, struct wl_seat* wl_seat) { + wl_clipboard_device_context_t* device_ctx_zwp = NULL; + device_ctx_zwp = malloc(sizeof(wl_clipboard_device_context_t)); + memset(device_ctx_zwp, 0, sizeof(wl_clipboard_device_context_t)); + device_ctx_zwp->device.zwp = zwp_primary_selection_device_manager_v1_get_device(self->wayland.clipboard_manager.zwp, wl_seat); + device_ctx_zwp->ll = self; + zwp_primary_selection_device_v1_add_listener(device_ctx_zwp->device.zwp, &zwp_primary_selection_device_v1_listener, device_ctx_zwp); + arrpush(self->wayland.clipboard_devices_zwp, device_ctx_zwp); +} +static void setup_clipboard(MwLL self, struct wl_seat* wl_seat) { + wl_clipboard_device_context_t* device_ctx_wl = malloc(sizeof(wl_clipboard_device_context_t)); + memset(device_ctx_wl, 0, sizeof(wl_clipboard_device_context_t)); + + device_ctx_wl->device.wl = wl_data_device_manager_get_data_device(self->wayland.clipboard_manager.wl, wl_seat); + device_ctx_wl->ll = self; + + wl_data_device_add_listener(device_ctx_wl->device.wl, &wl_data_device_listener, device_ctx_wl); + arrpush(self->wayland.clipboard_devices_wl, device_ctx_wl); +}; + +static void keyboard_repeat_info(void* data, + struct wl_keyboard* wl_keyboard, + int32_t rate, + int32_t delay) { + MwLL self = data; + + (void)wl_keyboard; + + self->wayland.keyboard_rate = rate; + self->wayland.keyboard_delay = delay; +}; + +struct wl_keyboard_listener keyboard_listener = { + .keymap = keyboard_keymap, + .enter = keyboard_enter, + .leave = keyboard_leave, + .key = keyboard_key, + .modifiers = keyboard_modifiers, + .repeat_info = keyboard_repeat_info, +}; + +/* `wl_seat.name` callback */ +static void +wl_seat_name(void* data, struct wl_seat* wl_seat, const char* name) { + (void)data; + (void)wl_seat; + (void)name; +}; + +/* `wl_seat.capabilities` callback */ +static void wl_seat_capabilities(void* data, struct wl_seat* wl_seat, + MwU32 capabilities) { + MwLL self = data; + + WAYLAND_EVENT_OP_START(self); + + if(capabilities & WL_SEAT_CAPABILITY_KEYBOARD) { + self->wayland.keyboard = wl_seat_get_keyboard(wl_seat); + wl_keyboard_add_listener(self->wayland.keyboard, &keyboard_listener, data); + } + if(capabilities & WL_SEAT_CAPABILITY_POINTER) { + self->wayland.pointer_seat = wl_seat; + self->wayland.pointer = wl_seat_get_pointer(wl_seat); + wl_pointer_add_listener(self->wayland.pointer, &pointer_listener, data); + } + WAYLAND_EVENT_OP_END(self); + + if(self->wayland.clipboard_manager.wl) + setup_clipboard(self, self->wayland.pointer_seat); + if(self->wayland.clipboard_manager.zwp) + setup_zwp_clipboard(self, self->wayland.pointer_seat); +}; + +static void output_geometry(void* data, + struct wl_output* wl_output, + int32_t x, + int32_t y, + int32_t physical_width, + int32_t physical_height, + int32_t subpixel, + const char* make, + const char* model, + int32_t transform) { + (void)data; + (void)wl_output; + (void)x; + (void)y; + (void)physical_width; + (void)physical_height; + (void)subpixel; + (void)make; + (void)model; + (void)transform; +}; +static void output_mode(void* data, + struct wl_output* wl_output, + uint32_t flags, + int32_t width, + int32_t height, + int32_t refresh) { + MwLL self = data; + (void)wl_output; + (void)flags; + (void)refresh; + self->wayland.mw = width; + self->wayland.mh = height; +}; + +struct wl_output_listener output_listener = { + .geometry = output_geometry, + .mode = output_mode, +}; + +/* `xdg_wm_base.ping` callback */ +void xdg_wm_base_ping(void* data, + struct xdg_wm_base* xdg_wm_base, + MwU32 serial) { + (void)data; + xdg_wm_base_pong(xdg_wm_base, serial); +}; + +/* wl_seat setup function */ +static wayland_protocol_t* wl_seat_setup(MwU32 name, MwLL ll, MwU32 version) { + wayland_protocol_t* proto = malloc(sizeof(wayland_protocol_t)); + MwU32 ver = (version >= 4) ? 4 : 1; + proto->listener = malloc(sizeof(struct wl_seat_listener)); + + ((struct wl_seat_listener*)proto->listener)->name = wl_seat_name; + ((struct wl_seat_listener*)proto->listener)->capabilities = wl_seat_capabilities; + + wl_seat_add_listener(wl_registry_bind(ll->wayland.registry, name, &wl_seat_interface, ver), proto->listener, ll); + + return proto; +} + +static void wl_seat_interface_destroy(struct _MwLLWayland* wayland, wayland_protocol_t* data) { + (void)wayland; + free(data->listener); + free(data); +} + +/* wl_output setup function */ +static wayland_protocol_t* wl_output_setup(MwU32 name, MwLL ll, MwU32 version) { + (void)version; + ll->wayland.output = wl_registry_bind(ll->wayland.registry, name, &wl_output_interface, 1); + wl_output_add_listener(ll->wayland.output, &output_listener, ll); + + return NULL; +} + +static void wl_output_interface_destroy(struct _MwLLWayland* wayland, wayland_protocol_t* data) { + (void)wayland; + (void)data; +} + +/* wl_compositor setup function */ +static wayland_protocol_t* wl_compositor_setup(MwU32 name, struct _MwLLWayland* wayland, MwU32 version) { + (void)version; + wayland->compositor = wl_registry_bind(wayland->registry, name, &wl_compositor_interface, 1); + + return NULL; +} + +static void wl_compositor_interface_destroy(struct _MwLLWayland* wayland, wayland_protocol_t* data) { + (void)wayland; + (void)data; +} + +/* wl_subcompositor setup function */ +static wayland_protocol_t* wl_subcompositor_setup(MwU32 name, struct _MwLLWayland* wayland, MwU32 version) { + (void)version; + if(wayland->type == MwLL_WAYLAND_TOPLEVEL) { + wayland->toplevel->scompositor = wl_registry_bind(wayland->registry, name, &wl_subcompositor_interface, 1); + } else { + wayland->sublevel->subcompositor = wl_registry_bind(wayland->registry, name, &wl_subcompositor_interface, 1); + } + + return NULL; +} + +static void wl_subcompositor_interface_destroy(struct _MwLLWayland* wayland, wayland_protocol_t* data) { + (void)data; + if(wayland->type == MwLL_WAYLAND_TOPLEVEL) { + wl_subcompositor_destroy(wayland->toplevel->scompositor); + } else { + wl_subcompositor_destroy(wayland->sublevel->subcompositor); + } +} + +/* xdg_wm_base setup function */ +static wayland_protocol_t* xdg_wm_base_setup(MwU32 name, struct _MwLLWayland* wayland, MwU32 version) { + wayland_protocol_t* proto = malloc(sizeof(wayland_protocol_t)); + (void)version; + proto->listener = malloc(sizeof(struct xdg_wm_base_listener)); + + ((struct xdg_wm_base_listener*)proto->listener)->ping = xdg_wm_base_ping; + + proto->context = wl_registry_bind(wayland->registry, name, &xdg_wm_base_interface, 1); + xdg_wm_base_add_listener(proto->context, proto->listener, wayland); + + return proto; +} + +static void xdg_wm_base_interface_destroy(struct _MwLLWayland* wayland, wayland_protocol_t* data) { + (void)wayland; + free(data->listener); + free(data); +} + +/* xdg_wm_base setup function */ +static wayland_protocol_t* wp_viewporter_setup(MwU32 name, struct _MwLLWayland* wayland, MwU32 version) { + wayland_protocol_t* proto = malloc(sizeof(wayland_protocol_t)); + (void)version; + proto->context = wl_registry_bind(wayland->registry, name, &wp_viewporter_interface, 1); + + return proto; +} + +static void wp_viewporter_interface_destroy(struct _MwLLWayland* wayland, wayland_protocol_t* data) { + (void)wayland; + (void)data; +} + +/* zxdg_decoration_manager_v1 setup function */ +static wayland_protocol_t* zxdg_decoration_manager_v1_setup(MwU32 name, struct _MwLLWayland* wayland, MwU32 version) { + wayland_protocol_t* proto = malloc(sizeof(wayland_protocol_t)); + zxdg_decoration_manager_v1_context_t* ctx = malloc(sizeof(zxdg_decoration_manager_v1_context_t)); + (void)version; + proto->listener = NULL; + + ctx->manager = wl_registry_bind(wayland->registry, name, &zxdg_decoration_manager_v1_interface, 1); + ; + + proto->context = ctx; + + return proto; +} + +static void zxdg_decoration_manager_v1_interface_destroy(struct _MwLLWayland* wayland, wayland_protocol_t* data) { + (void)wayland; + (void)data; +} + +/* wl_shm setup function */ +static wayland_protocol_t* wl_shm_setup(MwU32 name, struct _MwLLWayland* wayland, MwU32 version) { + (void)version; + wayland->framebuffer.shm = wl_registry_bind(wayland->registry, name, &wl_shm_interface, 1); + wayland->backbuffer.shm = wl_registry_bind(wayland->registry, name, &wl_shm_interface, 1); + wayland->cursor.shm = wl_registry_bind(wayland->registry, name, &wl_shm_interface, 1); + + return NULL; +} + +static void wl_shm_interface_destroy(struct _MwLLWayland* wayland, wayland_protocol_t* data) { + (void)wayland; + (void)data; +} + +static wayland_protocol_t* xdg_toplevel_icon_manager_v1_setup(MwU32 name, struct _MwLLWayland* wayland, MwU32 version) { + wayland_protocol_t* proto = malloc(sizeof(wayland_protocol_t)); + + (void)version; + + proto->context = wl_registry_bind(wayland->registry, name, &xdg_toplevel_icon_manager_v1_interface, 1); + proto->listener = NULL; + + return proto; +} + +static void xdg_toplevel_icon_manager_v1_interface_destroy(struct _MwLLWayland* wayland, wayland_protocol_t* data) { + (void)wayland; + free(data->listener); + free(data); +} + +static wayland_protocol_t* zwlr_layer_shell_v1_setup(MwU32 name, struct _MwLLWayland* wayland, MwU32 version) { + wayland_protocol_t* proto = malloc(sizeof(wayland_protocol_t)); + + proto->context = wl_registry_bind(wayland->registry, name, &zwlr_layer_shell_v1_interface, version); + proto->listener = NULL; + + return proto; +} + +static void zwlr_layer_shell_v1_interface_destroy(struct _MwLLWayland* wayland, wayland_protocol_t* data) { + (void)wayland; + + free(data); +} + +/* Function for setting up the callbacks/structs that will be registered upon the relevant interfaces being found. */ +void MwLLWaylandSetupCallbacks(struct _MwLLWayland* wayland) { +/* Convience macro for adding the interface functions to the setup map */ +#define WL_INTERFACE(interface) \ + do { \ + wayland_protocol_callback_table_t* cb = malloc(sizeof(wayland_protocol_callback_table_t)); \ + cb->setup = (wl_setup_func*)interface##_setup; \ + cb->destroy = (wl_destroy_func*)interface##_interface_destroy; \ + shput(wayland->wl_protocol_setup_map, interface##_interface.name, cb); \ + } while(0); + + wayland->registry_listener.global = new_protocol; + wayland->registry_listener.global_remove = protocol_removed; + + if(wayland->wl_protocol_map) { + shfree(wayland->wl_protocol_map); + } + if(wayland->wl_protocol_setup_map) { + shfree(wayland->wl_protocol_setup_map); + } + + wayland->wl_protocol_setup_map = NULL; + wayland->wl_protocol_map = NULL; + + sh_new_arena(wayland->wl_protocol_map); + sh_new_arena(wayland->wl_protocol_setup_map); + + WL_INTERFACE(wl_shm); + WL_INTERFACE(wl_compositor); + WL_INTERFACE(wl_seat); + WL_INTERFACE(wl_output); + WL_INTERFACE(wl_data_device_manager); + WL_INTERFACE(zwp_primary_selection_device_manager_v1); + WL_INTERFACE(zwp_pointer_constraints_v1); + WL_INTERFACE(zwp_relative_pointer_manager_v1); + WL_INTERFACE(xdg_wm_base); + WL_INTERFACE(zwlr_layer_shell_v1); /* Only used for layer surface, but we use it always if it's turned into a tool window */ + if(wayland->type == MwLL_WAYLAND_TOPLEVEL) { + WL_INTERFACE(wp_viewporter); + WL_INTERFACE(zxdg_decoration_manager_v1); + WL_INTERFACE(xdg_toplevel_icon_manager_v1); + WL_INTERFACE(wl_subcompositor); + } else if(wayland->type == MwLL_WAYLAND_POPUP) { + } else if(wayland->type == MwLL_WAYLAND_LAYER_SURFACE) { + WL_INTERFACE(wp_viewporter); + WL_INTERFACE(wl_subcompositor); + } else { + WL_INTERFACE(wl_subcompositor); + } +#undef WL_INTERFACE +} diff --git a/widget/milsko/milskosrc/src/backend/wayland/region.c b/widget/milsko/milskosrc/src/backend/wayland/region.c new file mode 100644 index 0000000000..4b6a5ae215 --- /dev/null +++ b/widget/milsko/milskosrc/src/backend/wayland/region.c @@ -0,0 +1,45 @@ +#include + +void MwLLWaylandRegionInvalidate(MwLL handle) { + if(!handle->wayland.configured) { + return; + } + wl_region_subtract(handle->wayland.region, 0, 0, handle->wayland.ww, handle->wayland.wh); +} +void MwLLWaylandRegionSetup(MwLL handle) { + int width = (handle->wayland.clipping_rect.width == 0) ? handle->wayland.ww : handle->wayland.clipping_rect.width; + int height = (handle->wayland.clipping_rect.height == 0) ? handle->wayland.wh : handle->wayland.clipping_rect.height; + + if(!handle->wayland.has_decorations && handle->wayland.do_csd && handle->wayland.type == MwLL_WAYLAND_TOPLEVEL) { + width += CSD_BORDER_FRAME_LEFT + CSD_BORDER_FRAME_RIGHT; + height += CSD_BORDER_FRAME_TOP + CSD_BORDER_FRAME_BOTTOM; + } + if(!handle->wayland.configured) { + return; + } + + if(!handle->wayland.parent) + wl_region_add(handle->wayland.o_region, 0, 0, width, height); + + if(handle->wayland.type == MwLL_WAYLAND_POPUP) { + wl_region_add(handle->wayland.region, 0, 0, width + abs(handle->wayland.x), height + abs(handle->wayland.y)); + } else { + wl_region_subtract(handle->wayland.region, 0, 0, width + abs(handle->wayland.x), height + abs(handle->wayland.y)); + wl_region_add(handle->wayland.region, handle->wayland.clipping_rect.x, handle->wayland.clipping_rect.y, handle->wayland.clipping_rect.width, handle->wayland.clipping_rect.height); + + if(!handle->wayland.parent) + wl_region_add(handle->wayland.region, 0, 0, width, height); + else { + if(!handle->wayland.parent->wayland.parent) { + wl_region_add(handle->wayland.region, 0, 0, width, height); + } + } + } + + if(handle->wayland.type == MwLL_WAYLAND_TOPLEVEL) { + wl_surface_set_opaque_region(handle->wayland.backbuffer.surface, handle->wayland.o_region); + wl_surface_set_input_region(handle->wayland.backbuffer.surface, handle->wayland.region); + } + wl_surface_set_opaque_region(handle->wayland.framebuffer.surface, handle->wayland.o_region); + wl_surface_set_input_region(handle->wayland.framebuffer.surface, handle->wayland.region); +} diff --git a/widget/milsko/milskosrc/src/backend/wayland/wayland.c b/widget/milsko/milskosrc/src/backend/wayland/wayland.c new file mode 100644 index 0000000000..48d6c7601e --- /dev/null +++ b/widget/milsko/milskosrc/src/backend/wayland/wayland.c @@ -0,0 +1,1928 @@ +#include + +#include +#include + +#include "../../../external/stb_ds.h" + +wayland_call_table_t wl_call_tbl; +#ifdef MW_VULKAN +MwBool MwWaylandVulkan = MwFALSE; +#endif + +MwBool MwWaylandCairoOnly = MwFALSE; + +static pthread_mutex_t destroyedWidgetsTableMutex; +/* + * So Wayland, bless its soul; it keeps using callbacks LONG after they should not only be destroyed but the widget doesn't even exist anymore. Naturally, this causes use after free. so we fight fire with fire in the worst code i've ever written: by storing the freed pointers here, we disallow wayland from ever using them again. if something else is created that takes this slot, we remove it from the table. + * + * To illustrate how bad this code is: if Israel and Palestine found out I was doing this then the Israel/Palestine conflict would be solved because both world leaders would come to the conclusion that this code is the worst thing ever. + */ +static MwLL* destroyedWidgetsTable; + +MwBool MwLLWaylandWidgetIsDestroyed(MwLL self) { + int i; + pthread_mutex_lock(&destroyedWidgetsTableMutex); + for(i = 0; i < arrlen(destroyedWidgetsTable); i++) { + if(self == destroyedWidgetsTable[i]) { + pthread_mutex_unlock(&destroyedWidgetsTableMutex); + return MwTRUE; + } + } + pthread_mutex_unlock(&destroyedWidgetsTableMutex); + return MwFALSE; +} +void MwLLWaylandWidgetUndestroy(MwLL self) { + int i; + pthread_mutex_lock(&destroyedWidgetsTableMutex); + for(i = 0; i < arrlen(destroyedWidgetsTable); i++) { + if(self == destroyedWidgetsTable[i]) { + arrdel(destroyedWidgetsTable, i); + break; + } + } + pthread_mutex_unlock(&destroyedWidgetsTableMutex); + return; +} + +static int event_loop(MwLL handle); + +/* Recursively dispatch a resize event to a widget and its children */ +static void recursive_dispatch_resize(MwLL handle) { + MwWidget h = (MwWidget)handle->common.user; + if(h) { + int i; + for(i = 0; i < arrlen(h->children); i++) { + MwDispatch(h->children[i], resize); + if(arrlen(h->children[i]->children) > 0) { + recursive_dispatch_resize(h->children[i]->lowlevel); + } + } + } +}; + +static void recursive_render(MwLL handle) { + int i; + WIDGET_CHECK(handle); + + for(i = 0; i < arrlen(((MwWidget)handle->common.user)->children); i++) recursive_render(((MwWidget)handle->common.user)->children[i]->lowlevel); + + MwLLForceRender(handle); +} + +/* Flush Wayland events */ +void MwLLWaylandFlush(MwLL handle) { + struct pollfd pfd; + int rc; + + pfd.fd = wl_display_get_fd(handle->wayland.display); + pfd.events = POLLIN; + while(MwTRUE) { + rc = wl_display_flush(handle->wayland.display); + if(errno != EAGAIN || rc != -1) { + break; + } + + if(poll(&pfd, 1, -1) == -1) { + break; + } + } +} + +/* Get the registered interface from r, or NULL if it doesn't currently have it. */ +#define WAYLAND_GET_INTERFACE(handle, inter) shget(handle.wl_protocol_map, inter##_interface.name) + +/* Standard Wayland event loop. */ +static int event_loop(MwLL handle) { + struct pollfd fd; + struct timespec timeout; + struct _MwLLWayland* wayland = &handle->wayland; + + timeout.tv_nsec = 1; + timeout.tv_sec = 0; + + if(wayland->display == NULL) { + return 0; + } + fd.fd = wl_display_get_fd(wayland->display); + fd.events = POLLIN; + + /* If an error other than EAGAIN happens, we have likely been disconnected from the Wayland session */ + while(wl_display_flush(wayland->display) == -1) { + if(errno != EAGAIN) { + return MwFALSE; + } + + while(poll(&fd, 1, -1) == -1) { + if(errno != EINTR && errno != EAGAIN) { + wl_display_cancel_read(wayland->display); + + MwLLDispatch(handle, close, NULL); + return 0; + } + } + } + + wl_display_prepare_read(handle->wayland.display); + /* Condition where no events are being sent. */ + if(!poll(&fd, 1, timeout.tv_nsec)) { + wl_display_cancel_read(wayland->display); + + if(wayland->configured) { + MwLLWaylandBufferUpdate(handle, &wayland->framebuffer); + if(wayland->type == MwLL_WAYLAND_TOPLEVEL) + MwLLWaylandBufferUpdate(handle, &wayland->backbuffer); + } + return 0; + } + wl_display_read_events(wayland->display); + if(wl_display_dispatch_pending(wayland->display) < 0) { + wl_display_cancel_read(wayland->display); + } + return 1; +} + +/* make the fuck sure that we're configurd */ +void MwLLWaylandHangUntilConfigured(MwLL handle) { + while(!handle->wayland.configured) { + if(wl_display_roundtrip(handle->wayland.display) == -1) { + printf("roundtrip failed: %d\n", wl_display_get_error(handle->wayland.display)); + raise(SIGTRAP); + return; + } + event_loop(handle); + } +} + +/* `xdg_toplevel.configure` callback */ +static void xdg_toplevel_configure(void* data, + struct xdg_toplevel* xdg_toplevel, + MwI32 width, MwI32 height, + struct wl_array* states) { + MwLL self = data; + (void)states; + (void)xdg_toplevel; + + /* Yes, somehow this can get called before */ + if(!self->wayland.configured) { + return; + } + + if(width == 0 || height == 0) { + width = self->wayland.ww; + height = self->wayland.wh; + /* if it's still 0 then bail */ + if(width == 0 || height == 0) { + return; + } + } + + if(self->wayland.type == MwLL_WAYLAND_TOPLEVEL) { + if(width < 50) width = 50; + if(height < 50) height = 50; + } + + MwLLWaylandRegionInvalidate(self); + self->wayland.ww = width; + self->wayland.wh = height; + // if(self->wayland.type == MwLL_WAYLAND_TOPLEVEL) { + // if(!self->wayland.has_decorations && self->wayland.toplevel->maxim_state) { + // self->wayland.ww -= CSD_BORDER_FRAME_LEFT + CSD_BORDER_FRAME_RIGHT; + // self->wayland.wh -= CSD_BORDER_FRAME_TOP + CSD_BORDER_FRAME_BOTTOM; + // } + // } + + if(self->wayland.resizing == 0) { + xdg_surface_set_window_geometry(self->wayland.toplevel->xdg_surface, 0, 0, self->wayland.ww, self->wayland.wh); + + MwLLWaylandBackbufferDestroy(&self->wayland); + MwLLWaylandBackbufferSetup(&self->wayland); + MwLLWaylandFramebufferDestroy(&self->wayland); + MwLLWaylandFramebufferSetup(&self->wayland); + + MwLLWaylandRegionSetup(self); + MwLLDispatch(self, resize, NULL); + + recursive_dispatch_resize(self); + + if(self->wayland.pointer_constrained) { + zwp_locked_pointer_v1_set_cursor_position_hint(self->wayland.locked_pointer, 0, CSD_BORDER_FRAME_TOP); + wl_surface_commit(self->wayland.framebuffer.surface); + } + self->wayland.resizing = 1; + } +}; + +/* `xdg_surface.close` callback */ +static void xdg_toplevel_close( + void* data, struct xdg_toplevel* xdg_toplevel) { + MwLL self = data; + (void)xdg_toplevel; + WAYLAND_EVENT_OP_START(self); + MwLLDispatch(self, close, NULL); + WAYLAND_EVENT_OP_END(self); +}; + +/* `xdg_surface.configure` callback */ +static void xdg_surface_configure( + void* data, struct xdg_surface* xdg_surface, MwU32 serial) { + MwLL self = data; + + xdg_surface_ack_configure(xdg_surface, serial); + + MwLLDispatch(self, draw, NULL); + + if(self->wayland.configured) { + MwLLWaylandBufferUpdate(self, &self->wayland.framebuffer); + MwLLWaylandBufferUpdate(self, &self->wayland.backbuffer); + } + + self->wayland.configured = MwTRUE; +} + +void MwLLWaylandBufferUpdate(MwLL self, struct _MwLLWaylandShmBuffer* buffer) { + if(self->wayland.configured) { + memcpy(buffer->buf, buffer->buf_back, buffer->buf_size); + if(buffer->surface) { + // Yes this is needed every time, it's how we fix weston. + if(self->wayland.configured) + wl_surface_attach(buffer->surface, buffer->shm_buffer, 0, 0); + wl_surface_commit(buffer->surface); + } + } +} + +/* Toplevel setup function */ +static void setup_toplevel(MwLL r, int x, int y) { + r->wayland.type = MwLL_WAYLAND_TOPLEVEL; + r->wayland.toplevel = malloc(sizeof(struct _MwLLWaylandTopLevel)); + r->wayland.x = x; + r->wayland.y = y; + + MwLLWaylandSetupCallbacks(&r->wayland); + + /* Connect to the Wayland compositor */ + if(!r->wayland.display) { + r->wayland.display = wl_display_connect(NULL); + if(r->wayland.display == NULL) { + printf("wayland: failed to create display\n"); + raise(SIGTRAP); + return; + } + } + + /* Do a roundtrip to ensure all interfaces are setup. */ + r->wayland.registry = wl_display_get_registry(r->wayland.display); + wl_registry_add_listener(r->wayland.registry, &r->wayland.registry_listener, r); + if(wl_display_roundtrip(r->wayland.display) == -1) { + printf("roundtrip failed\n"); + raise(SIGTRAP); + return; + } + + /* check now if we have decorations so that everything else can act accordingly */ + if(shget(r->wayland.wl_protocol_map, zxdg_decoration_manager_v1_interface.name) != NULL) { + r->wayland.has_decorations = MwTRUE; + } else { + r->wayland.do_csd = MwTRUE; + } + + r->wayland.xkb_context = xkb_context_new(XKB_CONTEXT_NO_FLAGS); + + /* Create a wl_surface, a xdg_surface and a xdg_toplevel */ + r->wayland.framebuffer.surface = wl_compositor_create_surface(r->wayland.compositor); + r->wayland.backbuffer.surface = wl_compositor_create_surface(r->wayland.compositor); + r->wayland.toplevel->ssurface = wl_subcompositor_get_subsurface(r->wayland.toplevel->scompositor, r->wayland.framebuffer.surface, r->wayland.backbuffer.surface); + wl_subsurface_set_desync(r->wayland.toplevel->ssurface); + + r->wayland.toplevel->xdg_surface = + xdg_wm_base_get_xdg_surface(WAYLAND_GET_INTERFACE(r->wayland, xdg_wm_base)->context, r->wayland.backbuffer.surface); + r->wayland.toplevel->xdg_top_level = xdg_surface_get_toplevel(r->wayland.toplevel->xdg_surface); + + /* setup mandatory listeners */ + r->wayland.toplevel->xdg_surface_listener.configure = xdg_surface_configure; + + r->wayland.toplevel->xdg_toplevel_listener.configure = xdg_toplevel_configure; + r->wayland.toplevel->xdg_toplevel_listener.close = xdg_toplevel_close; + + xdg_surface_add_listener(r->wayland.toplevel->xdg_surface, &r->wayland.toplevel->xdg_surface_listener, r); + xdg_toplevel_add_listener(r->wayland.toplevel->xdg_top_level, &r->wayland.toplevel->xdg_toplevel_listener, + r); + + xdg_toplevel_set_title(r->wayland.toplevel->xdg_top_level, "Milsko App"); + xdg_toplevel_set_app_id(r->wayland.toplevel->xdg_top_level, "MilskoWaylandApp"); + + /* Perform the initial commit and wait for the first configure event */ + wl_surface_commit(r->wayland.backbuffer.surface); + wl_surface_commit(r->wayland.framebuffer.surface); + + while(!r->wayland.configured) { + if(wl_display_roundtrip(r->wayland.display) == -1) { + printf("roundtrip failed\n"); + raise(SIGTRAP); + return; + } + } + + /* setup decorations if we can */ + if(r->wayland.has_decorations) { + zxdg_decoration_manager_v1_context_t* dec = WAYLAND_GET_INTERFACE(r->wayland, zxdg_decoration_manager_v1)->context; + + dec->decoration = zxdg_decoration_manager_v1_get_toplevel_decoration( + dec->manager, r->wayland.toplevel->xdg_top_level); + + zxdg_toplevel_decoration_v1_set_mode( + dec->decoration, ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE); + } else { + wl_subsurface_set_position(r->wayland.toplevel->ssurface, r->wayland.do_csd ? CSD_BORDER_FRAME_LEFT : 0, r->wayland.do_csd ? CSD_BORDER_FRAME_TOP : 0); + } + + MwLLWaylandFramebufferSetup(&r->wayland); + MwLLWaylandBackbufferSetup(&r->wayland); +} + +/* Toplevel destroy function */ +static void destroy_toplevel(MwLL r) { + if(shget(r->wayland.wl_protocol_map, zxdg_decoration_manager_v1_interface.name) != NULL) { + zxdg_decoration_manager_v1_context_t* dec = WAYLAND_GET_INTERFACE(r->wayland, zxdg_decoration_manager_v1)->context; + zxdg_toplevel_decoration_v1_destroy(dec->decoration); + zxdg_decoration_manager_v1_destroy(dec->manager); + } + + MwLLWaylandFramebufferDestroy(&r->wayland); + MwLLWaylandBackbufferDestroy(&r->wayland); + + xdg_toplevel_destroy(r->wayland.toplevel->xdg_top_level); + + xdg_surface_destroy(r->wayland.toplevel->xdg_surface); + + wl_compositor_destroy(r->wayland.compositor); + + xkb_keymap_unref(r->wayland.xkb_keymap); + + xkb_state_unref(r->wayland.xkb_state); + + xkb_context_unref(r->wayland.xkb_context); + + wl_pointer_destroy(r->wayland.pointer); + wl_keyboard_destroy(r->wayland.keyboard); + + if(r->common.user) { + MwWidget w = r->common.user; + int i; + for(i = 0; i < arrlen(w->children); i++) { + if(w->children[i]->lowlevel->wayland.type == MwLL_WAYLAND_SUBLEVEL) { + MwLL child = w->children[i]->lowlevel; + wl_subsurface_destroy(child->wayland.sublevel->subsurface); + child->wayland.sublevel->subsurface = NULL; + } + } + } + + wl_surface_destroy(r->wayland.framebuffer.surface); + + free(r->wayland.toplevel); + + r->wayland.configured = MwFALSE; +} + +/* Sublevel setup function */ +static void setup_sublevel(MwLL parent, MwLL r, int x, int y) { + struct wl_compositor* compositor = parent->wayland.compositor; + struct wl_surface* parent_surface = parent->wayland.framebuffer.surface; + + r->wayland.sublevel = malloc(sizeof(struct _MwLLWaylandSublevel)); + r->wayland.sublevel->parent = parent; + + r->wayland.type = MwLL_WAYLAND_SUBLEVEL; + + r->wayland.display = parent->wayland.display; + + MwLLWaylandSetupCallbacks(&r->wayland); + + r->wayland.registry = wl_display_get_registry(parent->wayland.display); + r->wayland.display = parent->wayland.display; + + if(parent->wayland.type == MwLL_WAYLAND_TOPLEVEL) { + r->wayland.sublevel->xdg_surface = parent->wayland.toplevel->xdg_surface; + } else { + r->wayland.sublevel->xdg_surface = parent->wayland.sublevel->xdg_surface; + } + + wl_registry_add_listener(r->wayland.registry, &r->wayland.registry_listener, r); + if(wl_display_roundtrip(r->wayland.display) == -1) { + printf("roundtrip failed: %d\n", wl_display_get_error(r->wayland.display)); + raise(SIGTRAP); + return; + } + + r->wayland.framebuffer.surface = wl_compositor_create_surface(compositor); + + r->wayland.sublevel->subsurface = wl_subcompositor_get_subsurface(r->wayland.sublevel->subcompositor, r->wayland.framebuffer.surface, parent_surface); + + wl_subsurface_set_desync(r->wayland.sublevel->subsurface); + wl_subsurface_set_position(r->wayland.sublevel->subsurface, x, y); + + if(parent) { + wl_subsurface_place_above(r->wayland.sublevel->subsurface, parent->wayland.framebuffer.surface); + } + + r->wayland.xkb_keymap = parent->wayland.xkb_keymap; + r->wayland.xkb_state = parent->wayland.xkb_state; + + r->wayland.configured = MwTRUE; + + MwLLWaylandFramebufferSetup(&r->wayland); + MwLLWaylandBackbufferSetup(&r->wayland); +} + +/* Sublevel setup function */ +static void destroy_sublevel(MwLL r) { + MwLLWaylandBackbufferDestroy(&r->wayland); + MwLLWaylandFramebufferDestroy(&r->wayland); + + wl_subsurface_destroy(r->wayland.sublevel->subsurface); + + free(r->wayland.sublevel); + + r->wayland.configured = MwFALSE; +} + +static void popup_configure(void* data, + struct xdg_popup* xdg_popup, + int32_t x, + int32_t y, + int32_t width, + int32_t height) { + MwLL self = data; + (void)xdg_popup; + + if(width < 50) width = 50; + if(height < 50) height = 50; + self->wayland.x = x; + self->wayland.y = y; + self->wayland.ww = width; + self->wayland.wh = height; +}; + +static void popup_done(void* data, + struct xdg_popup* xdg_popup) { + (void)data; + (void)xdg_popup; +}; + +static void popup_repositioned(void* data, + struct xdg_popup* xdg_popup, + uint32_t token) { + MwLL self = data; + (void)xdg_popup; + + xdg_surface_ack_configure(self->wayland.popup->xdg_surface, token); +}; + +struct xdg_popup_listener popup_listener = { + .configure = popup_configure, + .popup_done = popup_done, + .repositioned = popup_repositioned, + +}; + +/* Popup setup function */ +static void setup_popup(MwLL r, int x, int y, MwLL parent) { + MwLL topmost_parent = r->wayland.parent; + r->wayland.type = MwLL_WAYLAND_POPUP; + r->wayland.x = x; + r->wayland.y = y; + r->wayland.popup = malloc(sizeof(struct _MwLLWaylandPopup)); + + if(parent) { + MwWidget p = parent->common.user; + while(topmost_parent->wayland.parent) { + topmost_parent = topmost_parent->wayland.parent; + } + + if(!topmost_parent->wayland.has_decorations && topmost_parent->wayland.do_csd) { + if(p->is_menu) { + r->wayland.x += round((float)CSD_BORDER_FRAME_LEFT / 2.); + r->wayland.y += ceil((float)CSD_BORDER_FRAME_TOP / 2.); + } + } + } + + MwLLWaylandSetupCallbacks(&r->wayland); + + /* Connect to the Wayland compositor */ + r->wayland.display = parent->wayland.display; + + /* Do a roundtrip to ensure all interfaces are setup. */ + r->wayland.registry = wl_display_get_registry(r->wayland.display); + wl_registry_add_listener(r->wayland.registry, &r->wayland.registry_listener, r); + if(wl_display_roundtrip(r->wayland.display) == -1) { + printf("roundtrip failed: %d\n", wl_display_get_error(r->wayland.display)); + raise(SIGTRAP); + return; + } + + /* check now if we have decorations so that everything else can act accordingly */ + if(shget(r->wayland.wl_protocol_map, zxdg_decoration_manager_v1_interface.name) != NULL) { + r->wayland.has_decorations = MwTRUE; + } else { + r->wayland.do_csd = MwTRUE; + } + + r->wayland.popup->xdg_wm_base = WAYLAND_GET_INTERFACE(r->wayland, xdg_wm_base)->context; + + r->wayland.popup->xdg_positioner = xdg_wm_base_create_positioner(r->wayland.popup->xdg_wm_base); + + xdg_positioner_set_size(r->wayland.popup->xdg_positioner, r->wayland.ww, r->wayland.wh); + xdg_positioner_set_anchor_rect( + r->wayland.popup->xdg_positioner, + topmost_parent->wayland.x, topmost_parent->wayland.y, r->wayland.ww, r->wayland.wh); + xdg_positioner_set_offset( + r->wayland.popup->xdg_positioner, + r->wayland.x, r->wayland.y); + + xdg_positioner_set_anchor(r->wayland.popup->xdg_positioner, XDG_POSITIONER_ANCHOR_NONE); + xdg_positioner_set_gravity(r->wayland.popup->xdg_positioner, XDG_POSITIONER_GRAVITY_NONE); + + r->wayland.xkb_keymap = topmost_parent->wayland.xkb_keymap; + r->wayland.xkb_state = topmost_parent->wayland.xkb_state; + + r->wayland.framebuffer.surface = wl_compositor_create_surface(r->wayland.compositor); + + r->wayland.popup->xdg_surface = + xdg_wm_base_get_xdg_surface(WAYLAND_GET_INTERFACE(r->wayland, xdg_wm_base)->context, r->wayland.framebuffer.surface); + + if(topmost_parent->wayland.type == MwLL_WAYLAND_TOPLEVEL) { + r->wayland.popup->xdg_popup = xdg_surface_get_popup( + r->wayland.popup->xdg_surface, + topmost_parent->wayland.toplevel->xdg_surface, + r->wayland.popup->xdg_positioner); + } else if(topmost_parent->wayland.type == MwLL_WAYLAND_LAYER_SURFACE) { + r->wayland.popup->xdg_popup = xdg_surface_get_popup( + r->wayland.popup->xdg_surface, NULL, + r->wayland.popup->xdg_positioner); + zwlr_layer_surface_v1_get_popup(topmost_parent->wayland.layer_surface->surface, r->wayland.popup->xdg_popup); + } + + xdg_popup_add_listener(r->wayland.popup->xdg_popup, &popup_listener, r); + + r->wayland.popup->xdg_surface_listener.configure = xdg_surface_configure; + xdg_surface_add_listener(r->wayland.popup->xdg_surface, &r->wayland.popup->xdg_surface_listener, r); + + if(wl_display_roundtrip(r->wayland.display) == -1) { + printf("roundtrip failed\n"); + raise(SIGTRAP); + return; + } + + MwLLWaylandFramebufferSetup(&r->wayland); +} + +/* Popup destroy function */ +static void destroy_popup(MwLL r) { + + MwLLWaylandBackbufferDestroy(&r->wayland); + MwLLWaylandFramebufferDestroy(&r->wayland); + + xdg_surface_destroy(r->wayland.popup->xdg_surface); + + xdg_popup_destroy(r->wayland.popup->xdg_popup); + + xdg_positioner_destroy(r->wayland.popup->xdg_positioner); + + wl_surface_destroy(r->wayland.framebuffer.surface); + + wl_registry_destroy(r->wayland.registry); + + free(r->wayland.popup); + + r->wayland.configured = MwFALSE; +} + +static void layer_shell_configure(void* data, + struct zwlr_layer_surface_v1* surface, + uint32_t serial, + uint32_t width, + uint32_t height) { + MwLL self = data; + zwlr_layer_surface_v1_ack_configure(surface, serial); + + if(width < 50) width = 50; + if(height < 50) height = 50; + + self->wayland.ww = width; + self->wayland.wh = height; + + self->wayland.configured = MwTRUE; + + MwLLWaylandFramebufferSetup(&self->wayland); + MwLLWaylandRegionSetup(self); + MwLLDispatch(self, resize, NULL); + + wl_surface_commit(self->wayland.framebuffer.surface); +}; + +static void layer_shell_done(void* data, + struct zwlr_layer_surface_v1* zwlr_layer_surface_v1) { + (void)data; + (void)zwlr_layer_surface_v1; + + printf("closed\n"); +}; + +static const struct zwlr_layer_surface_v1_listener layer_surface_listener = { + .configure = layer_shell_configure, + .closed = layer_shell_done, +}; + +/* Layer surface setup function */ +static void setup_layer_surface(MwLL r, int x, int y, int width, int height) { + wayland_protocol_t* layer_shell_protocol; + struct zwlr_layer_shell_v1* layer_shell; + r->wayland.type = MwLL_WAYLAND_LAYER_SURFACE; + r->wayland.layer_surface = malloc(sizeof(struct _MwLLWaylandLayerSurface)); + r->wayland.x = x; + r->wayland.y = y; + + MwLLWaylandSetupCallbacks(&r->wayland); + + /* Connect to the Wayland compositor */ + if(!r->wayland.display) { + r->wayland.display = wl_display_connect(NULL); + if(r->wayland.display == NULL) { + printf("wayland: failed to create display\n"); + raise(SIGTRAP); + return; + } + } + + /* Do a roundtrip to ensure all interfaces are setup. */ + r->wayland.registry = wl_display_get_registry(r->wayland.display); + wl_registry_add_listener(r->wayland.registry, &r->wayland.registry_listener, r); + if(wl_display_roundtrip(r->wayland.display) == -1) { + printf("roundtrip failed\n"); + raise(SIGTRAP); + return; + } + + layer_shell_protocol = WAYLAND_GET_INTERFACE(r->wayland, zwlr_layer_shell_v1); + assert(layer_shell_protocol); + + layer_shell = layer_shell_protocol->context; + + r->wayland.xkb_context = xkb_context_new(XKB_CONTEXT_NO_FLAGS); + + r->wayland.framebuffer.surface = wl_compositor_create_surface(r->wayland.compositor); + + r->wayland.layer_surface->surface = zwlr_layer_shell_v1_get_layer_surface(layer_shell, r->wayland.framebuffer.surface, NULL, ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY, "milsko-surfaces"); + + zwlr_layer_surface_v1_set_size(r->wayland.layer_surface->surface, width, height); + zwlr_layer_surface_v1_set_margin(r->wayland.layer_surface->surface, + y, 0, 0, x); + zwlr_layer_surface_v1_set_anchor(r->wayland.layer_surface->surface, ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT); + zwlr_layer_surface_v1_set_exclusive_zone(r->wayland.layer_surface->surface, 1); + zwlr_layer_surface_v1_set_keyboard_interactivity( + r->wayland.layer_surface->surface, ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND); + + zwlr_layer_surface_v1_add_listener(r->wayland.layer_surface->surface, &layer_surface_listener, r); + + /* Perform the initial commit and wait for the first configure event */ + wl_surface_commit(r->wayland.framebuffer.surface); + + if(wl_display_roundtrip(r->wayland.display) == -1) { + printf("roundtrip failed\n"); + raise(SIGTRAP); + return; + } +} + +/* Toplevel destroy function */ +static void destroy_layer_surface(MwLL r) { + if(shget(r->wayland.wl_protocol_map, zxdg_decoration_manager_v1_interface.name) != NULL) { + zxdg_decoration_manager_v1_context_t* dec = WAYLAND_GET_INTERFACE(r->wayland, zxdg_decoration_manager_v1)->context; + zxdg_decoration_manager_v1_destroy(dec->manager); + } + + wl_surface_destroy(r->wayland.framebuffer.surface); + + wl_compositor_destroy(r->wayland.compositor); + + xkb_keymap_unref(r->wayland.xkb_keymap); + + xkb_state_unref(r->wayland.xkb_state); + + xkb_context_unref(r->wayland.xkb_context); + + wl_registry_destroy(r->wayland.registry); + + r->wayland.configured = MwFALSE; +} + +static void destroy_widget(MwLL handle) { + int i; + + MwLLShow(handle, MwFALSE); + + switch(handle->wayland.type) { + case MwLL_WAYLAND_TOPLEVEL: + destroy_toplevel(handle); + break; + case MwLL_WAYLAND_SUBLEVEL: + destroy_sublevel(handle); + break; + case MwLL_WAYLAND_POPUP: + destroy_popup(handle); + break; + case MwLL_WAYLAND_LAYER_SURFACE: + destroy_layer_surface(handle); + break; + default: + printf("Handle with unknown type(%d) tried to be destroyed (%p)\n", handle->wayland.type, handle); + break; + } + + if(wl_display_roundtrip(handle->wayland.display) == -1) { + printf("roundtrip failed\n"); + raise(SIGTRAP); + return; + } + + for(i = 0; i < shlen(handle->wayland.wl_protocol_setup_map); i++) { + void* ctx = shget(handle->wayland.wl_protocol_map, handle->wayland.wl_protocol_setup_map[i].key); + + if(ctx != NULL) { + handle->wayland.wl_protocol_setup_map[i].value->destroy(&handle->wayland, ctx); + } + shdel(handle->wayland.wl_protocol_map, handle->wayland.wl_protocol_setup_map[i].value); + free(handle->wayland.wl_protocol_setup_map[i].value); + } + + shfree(handle->wayland.wl_protocol_map); + shfree(handle->wayland.wl_protocol_setup_map); + + MwLLWaylandFlush(handle); +} + +static void clip(MwLL handle) { + int i; + int x, y, cx, cy, mx, my; + MwLL toplevel = handle->wayland.parent; + MwLL* ws = NULL; + + arrput(ws, handle); + while(toplevel) { + arrput(ws, toplevel); + if(!toplevel->wayland.parent || toplevel->wayland.is_toplevel) { + break; + } + toplevel = toplevel->wayland.parent; + } + if(toplevel) { + +#define MIN(a, b) ((a) < (b) ? (a) : (b)) +#define MAX(a, b) ((a) > (b) ? (a) : (b)) + /* i seriously have no fucking idea how this works, do not ask me how this really works (nishi) */ + x = 0; + y = 0; + cx = 0; + cy = 0; + mx = toplevel->wayland.ww; + my = toplevel->wayland.wh; + // ws is traversed result + // ws[ws.length - 1] is ignored bc it's toplevel + for(i = arrlen(ws) - 2; i >= 0; i--) { + int j; + int l = 0; + + x += ws[i]->wayland.x; + y += ws[i]->wayland.y; + + for(j = i - 1; j >= 0; j--) { + if(ws[j]->wayland.x > cx) l = 1; + if(ws[j]->wayland.y > cy) l = 1; + if(l) break; + } + + if(!l) { + cx = MAX(cx, ws[i]->wayland.x); + cy = MAX(cy, ws[i]->wayland.y); + } + + mx = MIN(mx, x + ws[i]->wayland.ww); + my = MIN(my, y + ws[i]->wayland.wh); + } + + if(mx < cx) mx = cx; + if(my < cy) my = cy; + + arrfree(ws); + + if(mx < cx) mx = cx; + if(my < cy) my = cy; + + handle->wayland.clipping_rect.x = cx - x; + handle->wayland.clipping_rect.y = cy - y; + handle->wayland.clipping_rect.width = mx - cx; + handle->wayland.clipping_rect.height = my - cy; + MwLLWaylandRegionSetup(handle); + + cairo_reset_clip(handle->wayland.cairo.front_cairo); + if(handle->wayland.type == MwLL_WAYLAND_SUBLEVEL && !handle->wayland.is_toplevel) { + cairo_rectangle(handle->wayland.cairo.front_cairo, cx - x, cy - y, mx - cx, my - cy); + cairo_clip(handle->wayland.cairo.front_cairo); + } + + if(handle->wayland.is_clipping) { + cairo_rectangle(handle->wayland.cairo.front_cairo, handle->wayland.clip.x, handle->wayland.clip.y, handle->wayland.clip.width, handle->wayland.clip.height); + cairo_clip(handle->wayland.cairo.front_cairo); + } + } +} + +static void wl_logger(const char* fmt, va_list args) { + vprintf(fmt, args); + raise(SIGTRAP); +} + +static void widget_setup(MwLL r, MwLL parent, int x, int y, int width, int height, enum _MwLLWaylandType ty) { + /* Wayland does not report global coordinates ever. Compositors are not even expected to have knowledge of this. + */ + r->common.coordinate_type = MwCOORDINATE_LOCAL; + + r->common.type = MwLLBackendWayland; + + if(width < 2) width = 2; + if(height < 2) height = 2; + + if(x == MwDEFAULT) { + x = 0; + } + if(y == MwDEFAULT) { + y = 0; + } + + r->wayland.ww = width; + r->wayland.wh = height; + r->wayland.x = x; + r->wayland.y = y; + r->wayland.parent = parent; + if(MwLLWaylandWidgetIsDestroyed(parent)) { + r->wayland.valid = MwFALSE; + return; + } else { + r->wayland.valid = MwTRUE; + } + + if(ty == MwLL_WAYLAND_UNKNOWN) { + if(parent == NULL) { + setup_toplevel(r, x, y); + } else { + setup_sublevel(parent, r, x, y); + } + } else { + switch(ty) { + case MwLL_WAYLAND_UNKNOWN: + break; + case MwLL_WAYLAND_TOPLEVEL: + setup_toplevel(r, x, y); + break; + case MwLL_WAYLAND_SUBLEVEL: + setup_sublevel(parent, r, x, y); + break; + case MwLL_WAYLAND_POPUP: + if(parent) { + setup_popup(r, x, y, parent); + } else { + /* + * We can't actually have a popup without a parent but this needs to be valid behavior. + * If we're down this code path, though, it means we can't create a layer surface. + * So we just fake it with a borderless window. + */ + setup_toplevel(r, x, y); + MwLLMakeBorderless(r, MwTRUE); + } + break; + case MwLL_WAYLAND_LAYER_SURFACE: + setup_layer_surface(r, x, y, width, height); + break; + } + } + + WIDGET_CHECK(r); + + r->wayland.region = wl_compositor_create_region(r->wayland.compositor); + r->wayland.o_region = wl_compositor_create_region(r->wayland.compositor); + MwLLWaylandRegionSetup(r); + + MwLLForceRender(r); + if(parent != NULL) { + MwLLForceRender(parent); + } + + /* If the compositor never sets the keyboard repeat info, we'll copy KDE's default of... */ + r->wayland.keyboard_delay = 600; /* starting at 600ms... */ + r->wayland.keyboard_rate = 25; /* and going every 25ms... */ + + if(!r->wayland.has_decorations && r->wayland.do_csd) { + MwLLBeginDraw(r); + MwLLEndDraw(r); + } +} + +#ifdef USE_DBUS +static void dark_theme_listener(MwLL handle, MwU32 new_value) { + handle->wayland.dark_theme = (new_value == 1) ? 1 : 0; + + MwLLDispatch(handle, dark_theme, &handle->wayland.dark_theme); +} + +static void detect_dark_theme(MwLL handle) { + MwU32 value = 0; + + MwLLDBusPortalGet(&wl_call_tbl.dbus, &handle->wayland.dbus, "org.freedesktop.portal.Settings", "org.freedesktop.appearance", "color-scheme", &value); + handle->wayland.dark_theme = (value == 1) ? 1 : 0; + + MwLLDBusPortalWatch(&wl_call_tbl.dbus, &handle->wayland.dbus, "org.freedesktop.portal.Settings"); + + MwLLDispatch(handle, dark_theme, &handle->wayland.dark_theme); +} +#endif + +static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) { + MwLL r; + r = malloc(sizeof(*r)); + memset(r, 0, sizeof(*r)); + MwLLCreateCommon(r); + + if(MwLLWaylandWidgetIsDestroyed(r)) { + MwLLWaylandWidgetUndestroy(r); + } + + r->wayland.is_toplevel = parent == NULL; + r->wayland.is_clipping = 0; + + widget_setup(r, parent, x, y, width, height, MwLL_WAYLAND_UNKNOWN); + +#ifdef USE_DBUS + if(!parent && wl_call_tbl.has_dbus) { + wl_call_tbl.has_dbus = MwLLDBusNewContext(&wl_call_tbl.dbus, &r->wayland.dbus); + r->wayland.dark_theme_detection = MwTRUE; + r->wayland.dark_theme = -1; + } +#endif + + return r; +} + +static void MwLLDestroyImpl(MwLL handle) { + int i; + struct timeval tv; + int select_ret; + + event_loop(handle); + // wl_display_cancel_read(handle->wayland.display); + + MwLLWaylandFlush(handle); + + handle->wayland.cancelEvent = MwTRUE; + + MwLLDestroyCommon(handle); + + tv.tv_sec = 0; + tv.tv_usec = 1000; + do { + select_ret = select(1, NULL, NULL, NULL, &tv); + } while((select_ret == -1) && (errno == EINTR)); + + pthread_mutex_destroy(&handle->wayland.eventsMutex); + +#ifdef USE_DBUS + if(!wl_call_tbl.has_dbus) { + MwLLDBusFreeContext(&wl_call_tbl.dbus, &handle->wayland.dbus); + } +#endif + + if(handle->wayland.valid) { + MwLLWaylandBufferDestroy(&handle->wayland.cursor); + wl_region_destroy(handle->wayland.region); + + if(handle->wayland.supports_zwp) { + zwp_primary_selection_source_v1_destroy(handle->wayland.clipboard_source.zwp); + } else { + wl_data_source_destroy(handle->wayland.clipboard_source.wl); + } + if(handle->wayland.icon != NULL) { + MwLLWaylandBufferDestroy(handle->wayland.icon); + wl_surface_destroy(handle->wayland.icon->surface); + } + + destroy_widget(handle); + } else { + printf("widget invalid\n"); + } + + pthread_mutex_lock(&destroyedWidgetsTableMutex); + arrput(destroyedWidgetsTable, handle); + pthread_mutex_unlock(&destroyedWidgetsTableMutex); + + free(handle); + + // if(topmost_parent->wayland.currentlyHeldWidget == handle) { + // topmost_parent->wayland.currentlyHeldWidget = NULL; + // } +} + +static void MwLLGetXYWHImpl(MwLL handle, int* x, int* y, unsigned int* w, unsigned int* h) { + if(!handle->wayland.valid) { + *x = 0; + *y = 0; + *w = 1; + *h = 1; + return; + } + *x = handle->wayland.x; + *y = handle->wayland.y; + *w = handle->wayland.ww; + *h = handle->wayland.wh; +} + +static void MwLLSetXYImpl(MwLL handle, int x, int y) { + WIDGET_CHECK(handle); + MwLLWaylandRegionInvalidate(handle); + handle->wayland.x = x; + handle->wayland.y = y; + + switch(handle->wayland.type) { + case MwLL_WAYLAND_TOPLEVEL: + /* toplevels cannot be moved */ + break; + case MwLL_WAYLAND_SUBLEVEL: + wl_subsurface_set_position(handle->wayland.sublevel->subsurface, x, y); + break; + case MwLL_WAYLAND_POPUP: + xdg_positioner_set_anchor_rect(handle->wayland.popup->xdg_positioner, handle->wayland.parent->wayland.x, handle->wayland.parent->wayland.y, handle->wayland.ww, handle->wayland.wh); + xdg_positioner_set_offset(handle->wayland.popup->xdg_positioner, x, y); + xdg_popup_reposition(handle->wayland.popup->xdg_popup, handle->wayland.popup->xdg_positioner, 0); + xdg_surface_set_window_geometry(handle->wayland.popup->xdg_surface, 0, 0, handle->wayland.ww, handle->wayland.wh); + break; + case MwLL_WAYLAND_LAYER_SURFACE: + zwlr_layer_surface_v1_set_margin(handle->wayland.layer_surface->surface, + y, 0, 0, x); + break; + case MwLL_WAYLAND_UNKNOWN: + break; + } + MwLLWaylandRegionSetup(handle); + + if(handle->wayland.type != MwLL_WAYLAND_TOPLEVEL) recursive_render(handle); + + MwLLDispatch(handle, draw, NULL); +} + +static void actually_set_wh(MwLL handle) { + MwLLWaylandRegionInvalidate(handle); + + if(handle->wayland.type == MwLL_WAYLAND_TOPLEVEL && handle->wayland.configured) { + xdg_surface_set_window_geometry(handle->wayland.toplevel->xdg_surface, 0, 0, handle->wayland.ww, handle->wayland.wh); + } + + if(handle->wayland.type == MwLL_WAYLAND_SUBLEVEL && handle->wayland.configured && !handle->wayland.dispatching_resize) { + handle->wayland.dispatching_resize = MwTRUE; + MwLLDispatch(handle, resize, NULL); + handle->wayland.dispatching_resize = MwFALSE; + } + + if(handle->wayland.type == MwLL_WAYLAND_POPUP) { + destroy_widget(handle); + MwLLWaylandFlush(handle); + setup_popup(handle, handle->wayland.x, handle->wayland.y, handle->wayland.parent); + } + + MwLLWaylandRegionSetup(handle); + if(handle->wayland.type == MwLL_WAYLAND_SUBLEVEL) recursive_render(handle); + + MwLLWaylandFramebufferDestroy(&handle->wayland); + MwLLWaylandFramebufferSetup(&handle->wayland); + MwLLWaylandBackbufferDestroy(&handle->wayland); + MwLLWaylandBackbufferSetup(&handle->wayland); + MwLLDispatch(handle, draw, NULL); +} + +static void MwLLSetWHImpl(MwLL handle, int w, int h) { + WIDGET_CHECK(handle); + + if(handle->wayland.ww == w && handle->wayland.wh == h) { + return; + } + + /* Prevent an integer underflow when the w/h is too low */ + if(handle->wayland.type == MwLL_WAYLAND_TOPLEVEL) { + if(w < 50) w = 50; + if(h < 50) h = 50; + } + + handle->wayland.ww = w; + handle->wayland.wh = h; + + if(!handle->wayland.setting_wh) { + handle->wayland.setting_wh = 1; + } + + handle->wayland.events_pending = 1; +} + +typedef struct { + double r, g, b; +} float_color; +static float_color lerp_color(float_color a, float_color b, float t) { + return (float_color){ + a.r + (b.r - a.r) * t, + a.g + (b.g - a.g) * t, + a.b + (b.b - a.b) * t}; +} +const float_color one = {.2627451, .37254902, .49411765}; +const float_color two = {.05490196, .17254902, .30588235}; + +static void MwLLBeginDrawImpl(MwLL handle) { + WIDGET_CHECK(handle); + cairo_save(handle->wayland.cairo.front_cairo); + cairo_set_source_rgba(handle->wayland.cairo.front_cairo, 0, 0, 0, 0); + cairo_set_operator(handle->wayland.cairo.front_cairo, CAIRO_OPERATOR_SOURCE); + cairo_rectangle(handle->wayland.cairo.front_cairo, 0, 0, handle->wayland.ww, handle->wayland.wh); + cairo_fill(handle->wayland.cairo.front_cairo); + cairo_restore(handle->wayland.cairo.front_cairo); + + if(handle->wayland.type != MwLL_WAYLAND_TOPLEVEL) { + handle->wayland.cairo.selected_cairo = handle->wayland.cairo.front_cairo; + return; + } + + if(!handle->wayland.has_decorations && handle->wayland.do_csd) { + int y; + MwU32 w = handle->wayland.ww + CSD_BORDER_FRAME_LEFT + CSD_BORDER_FRAME_RIGHT; + MwU32 h = handle->wayland.wh + CSD_BORDER_FRAME_TOP + CSD_BORDER_FRAME_BOTTOM; + MwRect r; + handle->wayland.cairo.selected_cairo = handle->wayland.cairo.back_cairo; + +#define DO_BOX(x, y, col, w, h) \ + cairo_rectangle(handle->wayland.cairo.back_cairo, x, y, w, h); \ + cairo_set_source_rgb(handle->wayland.cairo.back_cairo, col, col, col); \ + cairo_fill(handle->wayland.cairo.back_cairo); + +#define DO_LINE(off, col) \ + cairo_move_to(handle->wayland.cairo.back_cairo, off, off); \ + cairo_line_to(handle->wayland.cairo.back_cairo, off, h - (off)); \ + cairo_set_source_rgb(handle->wayland.cairo.back_cairo, col, col, col); \ + cairo_stroke(handle->wayland.cairo.back_cairo); \ + cairo_move_to(handle->wayland.cairo.back_cairo, off, off); \ + cairo_line_to(handle->wayland.cairo.back_cairo, w - (off), off); \ + cairo_set_source_rgb(handle->wayland.cairo.back_cairo, col, col, col); \ + cairo_stroke(handle->wayland.cairo.back_cairo); + + /* border */ + cairo_set_antialias(handle->wayland.cairo.back_cairo, CAIRO_ANTIALIAS_NONE); + + DO_BOX(0, 0, 0.14901961, w, h); + DO_BOX(1, 1, 0.55686275, w - 2, h - 2); + DO_BOX(2, 2, 0.82352941, w - 4, h - 4); + DO_BOX(3, 3, 0.93333333, w - 6, h - 6); + DO_BOX(4, 4, 1, w - 8, h - 8); + DO_BOX(4, 4, 0.14901961, w - CSD_BORDER_FRAME_LEFT - 4, h - CSD_BORDER_FRAME_BOTTOM - 4); + cairo_set_line_width(handle->wayland.cairo.back_cairo, 1.0); + + DO_LINE(1, 1) + DO_LINE(2, 0.93333333) + DO_LINE(3, 0.82352941) + DO_LINE(4, 0.55686275) + DO_LINE(5, 0.14901961) + + cairo_set_line_width(handle->wayland.cairo.back_cairo, 2.0); + for(y = 1; y < CSD_BORDER_FRAME_TOP - CSD_BORDER_FRAME_LEFT; y++) { + float_color c = lerp_color(one, two, (double)y / (double)(CSD_BORDER_FRAME_TOP - CSD_BORDER_FRAME_LEFT)); + + cairo_set_source_rgb(handle->wayland.cairo.back_cairo, c.r, c.g, c.b); + + cairo_move_to(handle->wayland.cairo.back_cairo, CSD_BORDER_FRAME_LEFT, y + CSD_BORDER_FRAME_LEFT); + cairo_line_to(handle->wayland.cairo.back_cairo, w - CSD_BORDER_FRAME_RIGHT, y + CSD_BORDER_FRAME_LEFT); + cairo_stroke(handle->wayland.cairo.back_cairo); + } + + /* icon */ + r.x = CSD_BORDER_FRAME_LEFT + 1; + r.y = CSD_BORDER_FRAME_RIGHT + 1; + r.width = 15; + r.height = 15; + DO_BOX(5, 5, 1, 18, 18); + DO_BOX(6, 6, 0.35294118, 17, 17); + DO_BOX(6, 6, 0.82352941, 16, 16); + handle->wayland.cairo.selected_cairo = handle->wayland.cairo.back_cairo; + if(handle->wayland.icon_pixmap) { + MwLLDrawPixmap(handle, &r, handle->wayland.icon_pixmap); + } + + /* close */ + DO_BOX(w - 19 - CSD_BORDER_FRAME_LEFT, CSD_BORDER_FRAME_BOTTOM + 1, 1, 18, 18); + DO_BOX(w - 18 - CSD_BORDER_FRAME_LEFT, CSD_BORDER_FRAME_BOTTOM + 2, 0.35294118, 17, 17); + DO_BOX(w - 18 - CSD_BORDER_FRAME_LEFT, CSD_BORDER_FRAME_BOTTOM + 2, 0.82352941, 16, 16); + DO_BOX(w - 18 - CSD_BORDER_FRAME_LEFT + 5, CSD_BORDER_FRAME_BOTTOM + 7, 0, 6, 6); + DO_BOX(w - 18 - CSD_BORDER_FRAME_LEFT + 6, CSD_BORDER_FRAME_BOTTOM + 8, 0.82352941, 4, 4); + + /* maxim */ + DO_BOX(w - 37 - CSD_BORDER_FRAME_LEFT, CSD_BORDER_FRAME_BOTTOM + 1, 1, 18, 18); + DO_BOX(w - 36 - CSD_BORDER_FRAME_LEFT, CSD_BORDER_FRAME_BOTTOM + 2, 0.35294118, 17, 17); + DO_BOX(w - 36 - CSD_BORDER_FRAME_LEFT, CSD_BORDER_FRAME_BOTTOM + 2, 0.82352941, 16, 16); + DO_BOX(w - 36 - CSD_BORDER_FRAME_LEFT + 5, CSD_BORDER_FRAME_BOTTOM + 7, 0, 6, 6); + DO_BOX(w - 36 - CSD_BORDER_FRAME_LEFT, CSD_BORDER_FRAME_BOTTOM + 9, 0.82352941, 16, 2); + DO_BOX(w - 36 - CSD_BORDER_FRAME_LEFT + 7, CSD_BORDER_FRAME_BOTTOM + 4, 0.82352941, 2, 14); + DO_BOX(w - 36 - CSD_BORDER_FRAME_LEFT + 6, CSD_BORDER_FRAME_BOTTOM + 8, 0.82352941, 4, 4); + + /* title */ + if(strlen(handle->wayland.title) != 0) { + int y, x; + int i = 0, sx = 0, sy = 0; + int tw, th; + unsigned char* px; + MwLLPixmap p; + tw = strlen(handle->wayland.title) * 7; + th = 14; + px = malloc(tw * th * 4); + assert(px); + + memset(px, 0, tw * th * 4); + + while(handle->wayland.title[i]) { + int out; + i += MwUTF8ToUTF32(handle->wayland.title + i, &out); + + if(out > 0xff) { + out = 0; + } + + for(y = 0; y < 14; y++) { + for(x = 0; x < 7; x++) { + unsigned char* ppx = &px[((sy + y) * tw + sx + x) * 4]; + int col = MwFontData[out].data[y] & (1 << ((7 - 1) - x)) ? 255 : 0; + ppx[0] = col; + ppx[1] = col; + ppx[2] = col; + ppx[3] = col; + } + } + sx += 7; + } + + p = MwLLCreatePixmap(handle, px, tw, th); + r.x = 24; + r.y = 5 + 2; + r.width = tw; + r.height = th; + + MwLLDrawPixmap(handle, &r, p); + MwLLDestroyPixmap(p); + free(px); + } + MwLLWaylandBufferUpdate(handle, &handle->wayland.backbuffer); + } + handle->wayland.cairo.selected_cairo = handle->wayland.cairo.front_cairo; +} + +static void MwLLEndDrawImpl(MwLL handle) { + if(handle->wayland.configured) { + if(handle->wayland.type == MwLL_WAYLAND_TOPLEVEL) { + MwLLWaylandBufferUpdate(handle, &handle->wayland.backbuffer); + } + MwLLWaylandBufferUpdate(handle, &handle->wayland.framebuffer); + } +} + +static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLLColor color) { + WIDGET_CHECK(handle); + + clip(handle); + + MwLLCairoPolygon(handle->wayland.cairo, points, points_count, color); + + handle->wayland.events_pending = 1; +} + +static void MwLLLineImpl(MwLL handle, MwPoint* points, MwLLColor color) { + int i; + WIDGET_CHECK(handle); + + clip(handle); + + MwLLCairoLine(handle->wayland.cairo, points, color); + + handle->wayland.events_pending = 1; +} + +static MwLLColor MwLLAllocColorImpl(MwLL handle, int r, int g, int b) { + MwLLColor c = malloc(sizeof(*c)); + (void)handle; + + c->common.red = r; + c->common.blue = b; + c->common.green = g; + + return c; +} + +static void MwLLColorUpdateImpl(MwLL handle, MwLLColor c, int r, int g, int b) { + (void)handle; + c->common.red = r; + c->common.blue = b; + c->common.green = g; +} + +static void MwLLFreeColorImpl(MwLLColor color) { + free(color); +} + +static int MwLLPendingImpl(MwLL handle) { + struct timespec timeout = { + .tv_nsec = 1, + .tv_sec = 0, + }; + struct pollfd fd = { + .fd = wl_display_get_fd(handle->wayland.display), + .events = POLLOUT, + }; + int pending = 0; + + if(MwLLWaylandWidgetIsDestroyed(handle) || !handle->wayland.valid) { + return 0; + } + + handle->wayland.resizing = 0; + + if(handle->wayland.setting_wh) { + actually_set_wh(handle); + handle->wayland.setting_wh = 0; + } + + handle->wayland.end_time = MwTimeGetTick(); + + if(handle->wayland.holding_key) { + float elapsed = ((float)(handle->wayland.end_time - (float)handle->wayland.start_time)); + if(elapsed >= handle->wayland.next_elapsed) { + MwLL topmost_parent = handle; + while(topmost_parent->wayland.parent) { + MwLLDispatch(topmost_parent, key, &handle->wayland.last_pressed_key); + topmost_parent = topmost_parent->wayland.parent; + } + handle->wayland.next_elapsed = elapsed + handle->wayland.keyboard_rate; + } + } + +#ifdef USE_DBUS + if(wl_call_tbl.has_dbus) { + if(handle->wayland.dark_theme_detection) { + + handle->wayland.dark_theme_detection = MwFALSE; + detect_dark_theme(handle); + MwLLDispatch(handle, draw, NULL); + } else { + MwLLDBusPortalPoll(&wl_call_tbl.dbus, &handle->wayland.dbus, handle, "org.freedesktop.portal.Settings", "org.freedesktop.appearance", "color-scheme", &dark_theme_listener); + } + } +#endif + + if(!handle->wayland.did_initial_resize) { + recursive_dispatch_resize(handle); + handle->wayland.did_initial_resize = 1; + } + + if(!MwWaylandVulkan) { + wl_display_prepare_read(handle->wayland.display); + if(!poll(&fd, 1, timeout.tv_nsec)) { + wl_display_cancel_read(handle->wayland.display); + } else { + wl_display_read_events(handle->wayland.display); + if((pending = wl_display_dispatch_pending(handle->wayland.display)) < 0) { + wl_display_cancel_read(handle->wayland.display); + } + } + } else { + if((pending = wl_display_dispatch_pending(handle->wayland.display)) < 0) { + wl_display_cancel_read(handle->wayland.display); + } + return pending; + } + + MwLLWaylandBufferUpdate(handle, &handle->wayland.framebuffer); + if(handle->wayland.type == MwLL_WAYLAND_TOPLEVEL) { + MwLLWaylandBufferUpdate(handle, &handle->wayland.backbuffer); + } + + return handle->wayland.force_render || handle->wayland.events_pending || pending; +} + +static void MwLLNextEventImpl(MwLL handle) { + WIDGET_CHECK(handle); + if(!MwWaylandVulkan) { + if(handle->wayland.did_event_loop_early) { + handle->wayland.did_event_loop_early = MwFALSE; + } else { + event_loop(handle); + } + } + + if(handle->wayland.force_render) { + MwLLDispatch(handle, draw, NULL); + if(handle->wayland.configured) MwLLWaylandBufferUpdate(handle, &handle->wayland.framebuffer); + handle->wayland.force_render = 0; + } + if(handle->wayland.events_pending) { + handle->wayland.events_pending = 0; + } +} + +static void MwLLSetTitleImpl(MwLL handle, const char* title) { + WIDGET_CHECK(handle); + if(handle->wayland.type == MwLL_WAYLAND_TOPLEVEL) { + xdg_toplevel_set_title(handle->wayland.toplevel->xdg_top_level, title); + } + if(!handle->wayland.has_decorations && handle->wayland.do_csd) { + strncpy(handle->wayland.title, title, 255); + MwLLBeginDraw(handle); + MwLLEndDraw(handle); + + xdg_toplevel_set_min_size(handle->wayland.toplevel->xdg_top_level, (strlen(handle->wayland.title) * 8) + 64, 64); + } +} + +static MwLLPixmap MwLLCreatePixmapImpl(MwLL handle, unsigned char* data, int width, int height) { + return MwLLCairoCreatePixmap(handle->wayland.cairo, data, width, height); +} + +static void MwLLPixmapUpdateImpl(MwLLPixmap r) { + MwLLCairoPixmapUpdate(r); +} + +static void MwLLDestroyPixmapImpl(MwLLPixmap pixmap) { + MwLLCairoDestroyPixmap(pixmap); +} + +static void MwLLDrawPixmapImpl(MwLL handle, MwRect* rect, MwLLPixmap pixmap) { + WIDGET_CHECK(handle); + + clip(handle); + + MwLLCairoDrawPixmap(handle->wayland.cairo, rect, pixmap); + + MwLLForceRender(handle); + wl_surface_damage(handle->wayland.framebuffer.surface, 0, 0, handle->wayland.ww, handle->wayland.wh); +} +static void MwLLSetIconImpl(MwLL handle, MwLLPixmap pixmap) { + WIDGET_CHECK(handle); + if(handle->wayland.type == MwLL_WAYLAND_TOPLEVEL) { + if(WAYLAND_GET_INTERFACE(handle->wayland, xdg_toplevel_icon_manager_v1) != NULL) { + struct xdg_toplevel_icon_manager_v1* icon_manager = WAYLAND_GET_INTERFACE(handle->wayland, xdg_toplevel_icon_manager_v1)->context; + struct xdg_toplevel_icon_v1* icon = xdg_toplevel_icon_manager_v1_create_icon(icon_manager); + MwU64 size = pixmap->common.width * pixmap->common.height * 4; + int i = 0; + int line = (pixmap->common.width < pixmap->common.height) ? pixmap->common.height : pixmap->common.width; + + if(handle->wayland.icon == NULL) { + handle->wayland.icon = malloc(sizeof(struct _MwLLWaylandShmBuffer)); + memset(handle->wayland.icon, 0, sizeof(struct _MwLLWaylandShmBuffer)); + handle->wayland.icon->shm = handle->wayland.framebuffer.shm; + } + + if(handle->wayland.icon->setup) { + MwLLWaylandBufferDestroy(handle->wayland.icon); + wl_surface_destroy(handle->wayland.icon->surface); + } + handle->wayland.icon->surface = wl_compositor_create_surface(handle->wayland.compositor); + + MwLLWaylandBufferSetup(handle->wayland.icon, line, line); + + wl_surface_attach(handle->wayland.icon->surface, handle->wayland.icon->shm_buffer, 0, 0); + wl_surface_commit(handle->wayland.icon->surface); + + for(; i < size; i += 2) { + handle->wayland.icon->buf_back[i] = pixmap->common.raw[i + 2]; + handle->wayland.icon->buf_back[i + 1] = pixmap->common.raw[i + 1]; + handle->wayland.icon->buf_back[i + 2] = pixmap->common.raw[i + 0]; + handle->wayland.icon->buf_back[i + 3] = 255; + } + + if(handle->wayland.configured) MwLLWaylandBufferUpdate(handle, handle->wayland.icon); + + xdg_toplevel_icon_v1_add_buffer(icon, handle->wayland.icon->shm_buffer_back, 1); + + xdg_toplevel_icon_manager_v1_set_icon(icon_manager, handle->wayland.toplevel->xdg_top_level, icon); + } + } + if(!handle->wayland.has_decorations && handle->wayland.do_csd) { + if(handle->wayland.icon_pixmap) { + MwLLDestroyPixmap(handle->wayland.icon_pixmap); + } + handle->wayland.icon_pixmap = MwLLCreatePixmap(handle, pixmap->common.raw, pixmap->common.width, pixmap->common.height); + + actually_set_wh(handle); + actually_set_wh(handle); + MwLLBeginDraw(handle); + MwLLEndDraw(handle); + } +} + +static void MwLLForceRenderImpl(MwLL handle) { + WIDGET_CHECK(handle); + wl_surface_damage(handle->wayland.framebuffer.surface, 0, 0, handle->wayland.ww, handle->wayland.wh); + + handle->wayland.force_render = MwTRUE; + if(handle->wayland.parent) { + handle->wayland.parent->wayland.force_render = MwTRUE; + } +} + +static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) { + int x, y, xs, ys; + + WIDGET_CHECK(handle); + + if(handle->wayland.cursor.setup) { + MwLLWaylandBufferDestroy(&handle->wayland.cursor); + wl_surface_destroy(handle->wayland.cursor.surface); + } + MwLLWaylandBufferSetup(&handle->wayland.cursor, mask->width, mask->height); + memset(handle->wayland.cursor.buf_back, 0, handle->wayland.cursor.buf_size); + + xs = -mask->x + image->x; + ys = mask->height + mask->y; + ys = image->height + image->y - ys; + + if(ys < 0) ys = -ys; + + for(y = 0; y < mask->height; y++) { + unsigned int d = mask->data[y]; + for(x = mask->width - 1; x >= 0; x--) { + int idx = ((y * mask->width) + x) * 4; + + if(d & 1) { + handle->wayland.cursor.buf_back[idx + 3] = 255; + }; + d = d >> 1; + } + } + for(y = 0; y < image->height; y++) { + unsigned int d = image->data[y]; + for(x = image->width - 1; x >= 0; x--) { + int px = 0; + int idx = (((y + ys) * mask->width) + (x + xs)) * 4; + + if(d & 1) { + px = 255; + }; + + handle->wayland.cursor.buf_back[idx] = px; + handle->wayland.cursor.buf_back[idx + 1] = px; + handle->wayland.cursor.buf_back[idx + 2] = px; + d = d >> 1; + } + } + + handle->wayland.cursor.surface = wl_compositor_create_surface(handle->wayland.compositor); + wl_surface_attach(handle->wayland.cursor.surface, handle->wayland.cursor.shm_buffer, 0, 0); + wl_surface_commit(handle->wayland.cursor.surface); + MwLLWaylandBufferUpdate(handle, &handle->wayland.cursor); +} + +static void MwLLDetachImpl(MwLL handle, MwPoint* point) { + MwLL p = handle->wayland.parent; + int x = 0, y = 0; + WIDGET_CHECK(handle); + while(p != NULL) { + if(p->wayland.type != MwLL_WAYLAND_TOPLEVEL) { + x += p->wayland.x; + y += p->wayland.y; + } else { + break; + } + p = p->wayland.parent; + } + + handle->wayland.changing = MwTRUE; + handle->wayland.detatching = MwTRUE; + handle->wayland.detach_point = *point; + handle->wayland.detach_point.x += x; + handle->wayland.detach_point.y += y; +} + +static void MwLLShowImpl(MwLL handle, int show) { + if(!handle->wayland.configured) { + return; + } + WIDGET_CHECK(handle); + /* Some guy on a mailing list said that "abusing" wl_surface_attach for this purpose is bad? This is documented behavior so please I beg of you let me know if there's a compositor that actually has a problem with this. */ + if(handle->wayland.framebuffer.surface) { + wl_surface_attach(handle->wayland.framebuffer.surface, show ? handle->wayland.framebuffer.shm_buffer : NULL, 0, 0); + wl_surface_commit(handle->wayland.framebuffer.surface); + } + if(handle->wayland.backbuffer.surface) { + wl_surface_attach(handle->wayland.backbuffer.surface, show ? handle->wayland.backbuffer.shm_buffer : NULL, 0, 0); + wl_surface_commit(handle->wayland.backbuffer.surface); + } +} + +static void MwLLMakePopupImpl(MwLL handle, MwLL parent) { + (void)handle; + (void)parent; + /* Wayland doesn't have "popups" in the Milsko sense per se. xdg_popup is closer to ToolWindow and as such is what we use there. So just like the Mac backend, this is just left alone. */ +} + +static void MwLLSetSizeHintsImpl(MwLL handle, int minx, int miny, int maxx, int maxy) { + WIDGET_CHECK(handle); + if(handle->wayland.type == MwLL_WAYLAND_TOPLEVEL) { + xdg_toplevel_set_min_size(handle->wayland.toplevel->xdg_top_level, minx, miny); + xdg_toplevel_set_max_size(handle->wayland.toplevel->xdg_top_level, maxx, maxy); + + wl_surface_commit(handle->wayland.framebuffer.surface); + wl_surface_commit(handle->wayland.backbuffer.surface); + } +} + +static void MwLLMakeBorderlessImpl(MwLL handle, int toggle) { + WIDGET_CHECK(handle); + if(handle->wayland.type == MwLL_WAYLAND_TOPLEVEL) { + if(WAYLAND_GET_INTERFACE(handle->wayland, zxdg_decoration_manager_v1) != NULL) { + zxdg_decoration_manager_v1_context_t* dec = WAYLAND_GET_INTERFACE(handle->wayland, zxdg_decoration_manager_v1)->context; + + if(!dec->decoration) { + dec->decoration = zxdg_decoration_manager_v1_get_toplevel_decoration( + dec->manager, handle->wayland.toplevel->xdg_top_level); + } + + zxdg_toplevel_decoration_v1_unset_mode(dec->decoration); + zxdg_toplevel_decoration_v1_set_mode( + dec->decoration, toggle ? ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE : ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE); + } else { + handle->wayland.do_csd = !toggle; + wl_subsurface_set_position(handle->wayland.toplevel->ssurface, handle->wayland.do_csd ? CSD_BORDER_FRAME_LEFT : 0, handle->wayland.do_csd ? CSD_BORDER_FRAME_TOP : 0); + } + } +} + +static void MwLLFocusImpl(MwLL handle) { + (void)handle; + printf("[WARNING] MwLLFocus not supported on Wayland\n"); +} + +static void MwLLGrabPointerImpl(MwLL handle, int toggle) { + MwLL topmost_parent = handle; + WIDGET_CHECK(handle); + while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent; + if(handle->wayland.pointer_constraints && handle->wayland.relative_pointer_manager) { + if(toggle) { + topmost_parent->wayland.locked_pointer = zwp_pointer_constraints_v1_lock_pointer(topmost_parent->wayland.pointer_constraints, topmost_parent->wayland.backbuffer.surface, topmost_parent->wayland.pointer, topmost_parent->wayland.region, ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT); + wl_surface_commit(topmost_parent->wayland.backbuffer.surface); + zwp_locked_pointer_v1_set_cursor_position_hint(topmost_parent->wayland.locked_pointer, 0, CSD_BORDER_FRAME_TOP); + handle->wayland.relative_pointer = zwp_relative_pointer_manager_v1_get_relative_pointer(handle->wayland.relative_pointer_manager, handle->wayland.pointer); + zwp_relative_pointer_v1_add_listener(handle->wayland.relative_pointer, &MwLLWaylandRelativePointerListener, topmost_parent); + } else { + if(topmost_parent->wayland.locked_pointer) { + zwp_locked_pointer_v1_destroy(topmost_parent->wayland.locked_pointer); + topmost_parent->wayland.locked_pointer = NULL; + } + if(topmost_parent->wayland.relative_pointer) { + zwp_relative_pointer_v1_destroy(topmost_parent->wayland.relative_pointer); + topmost_parent->wayland.relative_pointer = NULL; + } + } + handle->wayland.do_lock_pointer = toggle; + } else { + printf("[WARNING] MwLLGrabPointer not supported in Wayland session, zwp_pointer_constraints_v1 and relative_pointer_manager_v1 are required.\n"); + } +} + +static void MwLLSetClipboardImpl(MwLL handle, const char* text, int clipboard_type) { + int i; + WIDGET_CHECK(handle); + + if(handle->wayland.clipboard_buffer != NULL) { + free(handle->wayland.clipboard_buffer); + } + handle->wayland.clipboard_buffer = malloc(strlen(text)); + strcpy(handle->wayland.clipboard_buffer, text); + + if(clipboard_type == MwCLIPBOARD_PRIMARY) { + if(handle->wayland.supports_zwp) { + for(i = 0; i < arrlen(handle->wayland.clipboard_devices_zwp); i++) { + wl_clipboard_device_context_t* device = handle->wayland.clipboard_devices_zwp[i]; + zwp_primary_selection_device_v1_set_selection(device->device.zwp, handle->wayland.clipboard_source.zwp, handle->wayland.keyboard_serial); + } + } else { + printf("[WARNING] Primary clipboard requested for MwLLSetClipboard, but this Wayland compositor doesn't support it.\n"); + } + } else { + for(i = 0; i < arrlen(handle->wayland.clipboard_devices_wl); i++) { + wl_clipboard_device_context_t* device = handle->wayland.clipboard_devices_wl[i]; + wl_data_device_set_selection(device->device.wl, handle->wayland.clipboard_source.wl, handle->wayland.keyboard_serial); + } + } +} + +static void MwLLGetClipboardImpl(MwLL handle, int clipboard_type) { + int i; + WIDGET_CHECK(handle); + if(clipboard_type == MwCLIPBOARD_PRIMARY) { + if(handle->wayland.supports_zwp) { + for(i = 0; i < arrlen(handle->wayland.clipboard_devices_zwp); i++) { + MwLLWaylandClipboardRead( + handle->wayland.clipboard_devices_zwp[i], clipboard_type); + } + } else { + printf("[WARNING] Primary clipboard requested for MwLLSetClipboard, but this Wayland compositor doesn't support it.\n"); + } + } else { + for(i = 0; i < arrlen(handle->wayland.clipboard_devices_wl); i++) { + MwLLWaylandClipboardRead( + handle->wayland.clipboard_devices_wl[i], clipboard_type); + } + } + return; +} + +static void MwLLMakeToolWindowImpl(MwLL handle) { + MwBool can_do_layer_surface = MwFALSE; + + WIDGET_CHECK(handle); + + can_do_layer_surface = (WAYLAND_GET_INTERFACE(handle->wayland, zwlr_layer_shell_v1) != NULL); + + if(!handle->wayland.parent && can_do_layer_surface) { + handle->wayland.type_to_be = MwLL_WAYLAND_LAYER_SURFACE; + } else { + handle->wayland.type_to_be = MwLL_WAYLAND_POPUP; + } + + handle->wayland.changing = MwTRUE; +} + +static void MwLLGetCursorCoordImpl(MwLL handle, MwPoint* point) { + MwLL topmost_parent = handle; + + WIDGET_CHECK(handle); + while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent; + + *point = topmost_parent->wayland.cur_mouse_pos; +} + +static void MwLLGetScreenSizeImpl(MwLL handle, MwRect* rect) { + WIDGET_CHECK(handle); + + rect->x = 0; + rect->y = 0; + rect->width = handle->wayland.mw; + rect->height = handle->wayland.mh; +} + +static void MwLLBeginStateChangeImpl(MwLL handle) { + (void)handle; + /* no-op */ +} + +static void MwLLEndStateChangeImpl(MwLL handle) { + MwLL topmost_parent; + int x, y; + WIDGET_CHECK(handle); + + if(!handle->wayland.changing) { + return; + } + handle->wayland.changing = MwFALSE; + + x = handle->wayland.detatching ? handle->wayland.detach_point.x : handle->wayland.x; + y = handle->wayland.detatching ? handle->wayland.detach_point.y : handle->wayland.y; + + topmost_parent = handle->wayland.parent; + + while(topmost_parent) { + if(topmost_parent->wayland.type != MwLL_WAYLAND_TOPLEVEL) { + topmost_parent = topmost_parent->wayland.parent; + } else { + break; + } + } + + destroy_widget(handle); + + if(wl_display_roundtrip(handle->wayland.display) == -1) { + printf("roundtrip failed\n"); + raise(SIGTRAP); + return; + } + + MwLLWaylandFlush(handle); + + widget_setup(handle, handle->wayland.parent, x, y, handle->wayland.ww, handle->wayland.wh, handle->wayland.type_to_be); + + handle->wayland.is_toplevel = MwTRUE; + + if(!handle->wayland.parent) + handle->wayland.dark_theme_detection = MwTRUE; + + if(handle->common.user) { + MwWidget w = handle->common.user; + int i; + for(i = 0; i < arrlen(w->children); i++) { + if(w->children[i]->lowlevel->wayland.type == MwLL_WAYLAND_SUBLEVEL) { + MwLL child = w->children[i]->lowlevel; + child->wayland.sublevel->xdg_surface = handle->wayland.popup->xdg_surface; + if(child->wayland.sublevel->subsurface) + wl_subsurface_destroy(child->wayland.sublevel->subsurface); + MwLLWaylandFlush(handle); + + child->wayland.sublevel->subsurface = wl_subcompositor_get_subsurface(child->wayland.sublevel->subcompositor, child->wayland.framebuffer.surface, handle->wayland.framebuffer.surface); + wl_subsurface_set_desync(child->wayland.sublevel->subsurface); + wl_subsurface_set_position(child->wayland.sublevel->subsurface, child->wayland.x, child->wayland.y); + + wl_subsurface_place_above(child->wayland.sublevel->subsurface, handle->wayland.framebuffer.surface); + MwLLEndStateChangeImpl(w->children[i]->lowlevel); + + if(topmost_parent) { + topmost_parent->wayland.currentlyHeldWidget = NULL; + } + } + } + } + + recursive_render(handle); + + handle->wayland.events_pending = 1; + + handle->wayland.detatching = MwFALSE; +} + +static void MwLLSetDarkThemeImpl(MwLL handle, int toggle) { + (void)toggle; + + /* Not Really what's supposed to happen with this function, but take this opprutunity to do the handlers that will force everything to redraw. */ + MwLLDispatch(handle, resize, NULL); + MwLLDispatch(handle, draw, NULL); +} + +static MwBool MwLLDoModernImpl(MwLL handle) { + (void)handle; + return MwTRUE; +} + +static void MwLLRaiseImpl(MwLL handle) { + (void)handle; + /* WIDGET_CHECK(handle); + + if(handle->wayland.type == MwLL_WAYLAND_SUBLEVEL) { + MwLL topmost_parent = handle; + int children_num; + while(topmost_parent->wayland.parent) topmost_parent = topmost_parent->wayland.parent; + children_num = arrlen(((MwWidget)topmost_parent->common.user)->children); + + if(children_num > 1) { + printf("%d\n", children_num); + MwWidget last_child = ((MwWidget)topmost_parent->common.user)->children[children_num - 1]; + wl_subsurface_place_above(handle->wayland.sublevel->subsurface, last_child->lowlevel->wayland.framebuffer.surface); + } + }*/ +} + +static void MwLLClipImpl(MwLL handle, MwRect* rect) { + if(rect == NULL) { + handle->wayland.is_clipping = MwFALSE; + } else { + handle->wayland.clip = *rect; + handle->wayland.is_clipping = MwTRUE; + } +} + +static int MwLLWaylandCallInitImpl(void) { +#ifdef __linux__ + MwBool loadWayland = MwFALSE; + if(getenv("MILSKO_BACKEND")) { + loadWayland |= + (strcmp(getenv("MILSKO_BACKEND"), "wayland") == 0); + } else if(getenv("WAYLAND_DISPLAY")) { + loadWayland |= (getenv("WAYLAND_DISPLAY") != NULL); + } + +#ifdef MW_OPENGL + if(getenv("WSLENV") || getenv("WSL_DISTRO_NAME")) { + loadWayland = 0; + } +#endif + + if(loadWayland) { + if(wayland_load_funcs()) { + return 1; + } + wl_log_set_handler_client(wl_logger); + + return 0; + } +#endif + return 1; +} + +#include "../call.c" +CALL(Wayland); diff --git a/widget/milsko/milskosrc/src/backend/x11.c b/widget/milsko/milskosrc/src/backend/x11.c new file mode 100644 index 0000000000..79ce4295c0 --- /dev/null +++ b/widget/milsko/milskosrc/src/backend/x11.c @@ -0,0 +1,1525 @@ +#include + +#include "../../external/stb_ds.h" + +#define ClipboardTimeout 100 + +#ifdef USE_XRENDER +// #undef USE_XRENDER +#endif + +static struct symtbl { + void* lib_xlib; + void* lib_xrender; + MwBool has_xrender; + +#ifdef USE_DBUS + MwLLDBusFuncTable dbus; + MwBool has_dbus; +#endif + + int (*XClearWindow)(Display* display, Window w); + XImage* (*XCreateImage)(Display*, Visual*, unsigned int, int, int, char*, unsigned int, unsigned int, int, int); + Display* (*XOpenDisplay)(_Xconst char*); + char* (*XKeysymToString)(KeySym); + Atom (*XInternAtom)(Display*, _Xconst char*, Bool); + Cursor (*XCreatePixmapCursor)(Display*, Pixmap, Pixmap, XColor*, XColor*, unsigned int, unsigned int); + GC (*XCreateGC)(Display*, Drawable, unsigned long, XGCValues*); + Pixmap (*XCreatePixmap)(Display*, Drawable, unsigned int, unsigned int, unsigned int); + Window (*XCreateSimpleWindow)(Display*, Window, int, int, unsigned int, unsigned int, unsigned int, unsigned long, unsigned long); + VisualID (*XVisualIDFromVisual)(Visual*); + Window (*XRootWindow)(Display*, int); + Status (*XSetWMProtocols)(Display*, Window, Atom*, int); + int (*XSetTransientForHint)(Display*, Window, Window); + Status (*XAllocColor)(Display*, Colormap, XColor*); + int (*XChangeProperty)(Display*, Window, Atom, Atom, int, int, _Xconst unsigned char*, int); + int (*XChangeWindowAttributes)(Display*, Window, unsigned long, XSetWindowAttributes*); + Bool (*XCheckTypedWindowEvent)(Display*, Window, int, XEvent*); + Bool (*XCheckWindowEvent)(Display*, Window, long, XEvent*); + int (*XCloseDisplay)(Display*); + int (*XConfigureWindow)(Display*, Window, unsigned int, XWindowChanges*); + int (*XConvertSelection)(Display*, Atom, Atom, Atom, Window, Time); + int (*XCopyArea)(Display*, Drawable, Drawable, GC, int, int, unsigned int, unsigned int, int, int); + int (*XDefaultScreen)(Display*); + int (*XDefineCursor)(Display*, Window, Cursor); + int (*XDeleteProperty)(Display*, Window, Atom); + int (*XDestroyWindow)(Display*, Window); + int (*XDrawLine)(Display*, Drawable, GC, int, int, int, int); + int (*XFillPolygon)(Display*, Drawable, GC, XPoint*, int, int, int); + int (*XFree)(void*); + int (*XFreeCursor)(Display*, Cursor); + int (*XFreeGC)(Display*, GC); + int (*XFreePixmap)(Display*, Pixmap); + Status (*XGetGeometry)(Display*, Drawable, Window*, int*, int*, unsigned int*, unsigned int*, unsigned int*, unsigned int*); + int (*XGetWindowProperty)(Display*, Window, Atom, long, long, Bool, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**); + Status (*XGetWindowAttributes)(Display*, Window, XWindowAttributes*); + int (*XMapWindow)(Display*, Window); + int (*XNextEvent)(Display*, XEvent*); + int (*XPending)(Display*); + int (*XPutBackEvent)(Display*, XEvent*); + int (*XPutImage)(Display*, Drawable, GC, XImage*, int, int, int, int, unsigned int, unsigned int); + Bool (*XQueryPointer)(Display*, Window, Window*, Window*, int*, int*, int*, int*, unsigned int*); + Status (*XQueryTree)(Display*, Window, Window*, Window*, Window**, unsigned int*); + int (*XReparentWindow)(Display*, Window, Window, int, int); + int (*XSelectInput)(Display*, Window, long); + Status (*XSendEvent)(Display*, Window, Bool, long, XEvent*); + int (*XSetClipMask)(Display*, GC, Pixmap); + int (*XSetClipOrigin)(Display*, GC, int, int); + int (*XSetClipRectangles)(Display*, GC, int, int, XRectangle[], int, int); + int (*XSetForeground)(Display*, GC, unsigned long); + int (*XSetGraphicsExposures)(Display*, GC, Bool); + int (*XSetInputFocus)(Display*, Window, int, Time); + int (*XSetWindowBackgroundPixmap)(Display*, Window, Pixmap); + int (*XSync)(Display*, Bool); + Bool (*XTranslateCoordinates)(Display*, Window, Window, int, int, int*, int*, Window*); + int (*XUnmapWindow)(Display*, Window); + int (*XWarpPointer)(Display*, Window, Window, int, int, unsigned int, unsigned int, int, int); + char* (*XSetLocaleModifiers)(const char*); + XIM (*XOpenIM)(Display*, struct _XrmHashBucketRec*, char*, char*); + Status (*XCloseIM)(XIM); + XIC (*XCreateIC)(XIM, ...); + void (*XDestroyIC)(XIC); + void (*XSetICFocus)(XIC); + XImage* (*XGetImage)(Display*, Drawable, int, int, unsigned int, unsigned int, unsigned long, int); + int (*XRaiseWindow)(Display*, Window); + + XSizeHints* (*XAllocSizeHints)(void); + XVisualInfo* (*XGetVisualInfo)(Display*, long, XVisualInfo*, int*); + Status (*XGetWMNormalHints)(Display*, Window, XSizeHints*, long*); + Status (*XGetWMSizeHints)(Display*, Window, XSizeHints*, long*, Atom); + int (*XLookupString)(XKeyEvent*, char*, int, KeySym*, XComposeStatus*); + int (*XSetStandardProperties)(Display*, Window, _Xconst char*, _Xconst char*, Pixmap, char**, int, XSizeHints*); + void (*XSetWMNormalHints)(Display*, Window, XSizeHints*); + void (*XSetWMSizeHints)(Display*, Window, XSizeHints*, Atom); + +#if USE_XRENDER + Bool (*XRenderQueryExtension)(Display* dpy, int* event_basep, int* error_basep); + + XRenderPictFormat* (*XRenderFindStandardFormat)(Display* dpy, int format); + + Picture (*XRenderCreatePicture)(Display* dpy, Drawable drawable, + _Xconst XRenderPictFormat* format, + unsigned long valuemask, + _Xconst XRenderPictureAttributes* attributes); + + void (*XRenderFreePicture)(Display* dpy, Picture picture); + + void (*XRenderSetPictureTransform)(Display* dpy, Picture picture, + XTransform* transform); + + void (*XRenderComposite)(Display* dpy, int op, Picture src, Picture mask, + Picture dst, int src_x, int src_y, int mask_x, int mask_y, + int dst_x, int dst_y, unsigned int width, + unsigned int height); +#endif +} xsymtbl; + +#define XClearWindow xsymtbl.XClearWindow +#define XCreateIC xsymtbl.XCreateIC +#define XFree xsymtbl.XFree +#define XFreeCursor xsymtbl.XFreeCursor +#define XConfigureWindow xsymtbl.XConfigureWindow +#define XCheckTypedWindowEvent xsymtbl.XCheckTypedWindowEvent +#define XGetWMNormalHints xsymtbl.XGetWMNormalHints +#define XLookupString xsymtbl.XLookupString +#define XCreateImage xsymtbl.XCreateImage +#define XSetClipMask xsymtbl.XSetClipMask +#define XConvertSelection xsymtbl.XConvertSelection +#define XGetWindowProperty xsymtbl.XGetWindowProperty +#define XSetWMNormalHints xsymtbl.XSetWMNormalHints +#define XTranslateCoordinates xsymtbl.XTranslateCoordinates +#define XCreateSimpleWindow xsymtbl.XCreateSimpleWindow +#define XGetWMSizeHints xsymtbl.XGetWMSizeHints +#define XRootWindow xsymtbl.XRootWindow +#define XOpenDisplay xsymtbl.XOpenDisplay +#define XCopyArea xsymtbl.XCopyArea +#define XDeleteProperty xsymtbl.XDeleteProperty +#define XDrawLine xsymtbl.XDrawLine +#define XSetGraphicsExposures xsymtbl.XSetGraphicsExposures +#define XDestroyWindow xsymtbl.XDestroyWindow +#define XCloseDisplay xsymtbl.XCloseDisplay +#define XSetForeground xsymtbl.XSetForeground +#define XGetGeometry xsymtbl.XGetGeometry +#define XUnmapWindow xsymtbl.XUnmapWindow +#define XSetTransientForHint xsymtbl.XSetTransientForHint +#define XSetWMSizeHints xsymtbl.XSetWMSizeHints +#define XCreatePixmapCursor xsymtbl.XCreatePixmapCursor +#define XFreeGC xsymtbl.XFreeGC +#define XNextEvent xsymtbl.XNextEvent +#define XSetWMProtocols xsymtbl.XSetWMProtocols +#define XDefaultScreen xsymtbl.XDefaultScreen +#define XKeysymToString xsymtbl.XKeysymToString +#define XMapWindow xsymtbl.XMapWindow +#define XPutBackEvent xsymtbl.XPutBackEvent +#define XCreateGC xsymtbl.XCreateGC +#define XSelectInput xsymtbl.XSelectInput +#define XSetInputFocus xsymtbl.XSetInputFocus +#define XDestroyIC xsymtbl.XDestroyIC +#define XSync xsymtbl.XSync +#define XSendEvent xsymtbl.XSendEvent +#define XSetICFocus xsymtbl.XSetICFocus +#define XWarpPointer xsymtbl.XWarpPointer +#define XPutImage xsymtbl.XPutImage +#define XFillPolygon xsymtbl.XFillPolygon +#define XOpenIM xsymtbl.XOpenIM +#define XDefineCursor xsymtbl.XDefineCursor +#define XSetWindowBackgroundPixmap xsymtbl.XSetWindowBackgroundPixmap +#define XAllocColor xsymtbl.XAllocColor +#define XInternAtom xsymtbl.XInternAtom +#define XQueryPointer xsymtbl.XQueryPointer +#define XGetVisualInfo xsymtbl.XGetVisualInfo +#define XVisualIDFromVisual xsymtbl.XVisualIDFromVisual +#define XSetLocaleModifiers xsymtbl.XSetLocaleModifiers +#define XGetWindowAttributes xsymtbl.XGetWindowAttributes +#define XSetStandardProperties xsymtbl.XSetStandardProperties +#define XChangeProperty xsymtbl.XChangeProperty +#define XAllocSizeHints xsymtbl.XAllocSizeHints +#define XCheckWindowEvent xsymtbl.XCheckWindowEvent +#define XFreePixmap xsymtbl.XFreePixmap +#define XReparentWindow xsymtbl.XReparentWindow +#define XCreatePixmap xsymtbl.XCreatePixmap +#define XSetClipOrigin xsymtbl.XSetClipOrigin +#define XSetClipRectangles xsymtbl.XSetClipRectangles +#define XCloseIM xsymtbl.XCloseIM +#define XQueryTree xsymtbl.XQueryTree +#define XPending xsymtbl.XPending +#define XChangeWindowAttributes xsymtbl.XChangeWindowAttributes +#define XGetImage xsymtbl.XGetImage +#define XRaiseWindow xsymtbl.XRaiseWindow + +#if USE_XRENDER +#define XRenderFindStandardFormat xsymtbl.XRenderFindStandardFormat +#define XRenderCreatePicture xsymtbl.XRenderCreatePicture +#define XRenderFreePicture xsymtbl.XRenderFreePicture +#define XRenderComposite xsymtbl.XRenderComposite +#define XRenderQueryExtension xsymtbl.XRenderQueryExtension +#define XRenderSetPictureTransform xsymtbl.XRenderSetPictureTransform +#endif + +typedef struct mwm_hints { + unsigned long flags; + unsigned long functions; + unsigned long decorations; + long input_mode; + unsigned long status; +} mwm_hints_t; + +enum mwm_hints_enum { + MWM_HINTS_FUNCTIONS = (1L << 0), + MWM_HINTS_DECORATIONS = (1L << 1), + MWM_FUNC_ALL = (1L << 0), + MWM_FUNC_RESIZE = (1L << 1), + MWM_FUNC_MOVE = (1L << 2), + MWM_FUNC_MINIMIZE = (1L << 3), + MWM_FUNC_MAXIMIZE = (1L << 4), + MWM_FUNC_CLOSE = (1L << 5) +}; + +static unsigned long mask = ExposureMask | StructureNotifyMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask | EnterWindowMask | KeymapNotify | FocusChangeMask; + +static void create_pixmap(MwLL handle) { + XWindowAttributes attr; + int x, y; + unsigned int w, h; + + MwLLGetXYWH(handle, &x, &y, &w, &h); + + XGetWindowAttributes(handle->x11.display, handle->x11.window, &attr); + + handle->x11.pixmap = XCreatePixmap(handle->x11.display, handle->x11.window, w, h, attr.depth); +} + +static void destroy_pixmap(MwLL handle) { + XFreePixmap(handle->x11.display, handle->x11.pixmap); +} + +static void sync_move(MwLL handle, int x, int y) { + XEvent* queue = NULL; + XEvent ev; + unsigned long n = MwTimeGetTick() + 100; + XWindowAttributes xwa; + + XGetWindowAttributes(handle->x11.display, handle->x11.window, &xwa); + + XSync(handle->x11.display, False); + + while(!xwa.override_redirect && n > MwTimeGetTick()) { + XSync(handle->x11.display, False); + if(!XPending(handle->x11.display)) continue; + XNextEvent(handle->x11.display, &ev); + if(ev.type == ReparentNotify && ev.xreparent.window == handle->x11.window) { + break; + } else { + arrput(queue, ev); + } + } + + while(arrlen(queue) > 0) { + XPutBackEvent(handle->x11.display, &queue[0]); + arrdel(queue, 0); + } + arrfree(queue); + + MwLLSetXY(handle, x, y); +} + +static void wait_map(MwLL handle, int sync) { + XWindowAttributes xwa; + + XGetWindowAttributes(handle->x11.display, handle->x11.window, &xwa); + if(xwa.map_state != IsViewable) { + XSync(handle->x11.display, False); + + XMapWindow(handle->x11.display, handle->x11.window); + XSync(handle->x11.display, False); + + if(!sync) return; + do { + XMapWindow(handle->x11.display, handle->x11.window); + XSync(handle->x11.display, False); + XGetWindowAttributes(handle->x11.display, handle->x11.window, &xwa); + } while(xwa.map_state != IsViewable); + } +} + +static void wait_unmap(MwLL handle, int sync) { + XWindowAttributes xwa; + + XGetWindowAttributes(handle->x11.display, handle->x11.window, &xwa); + if(xwa.map_state != IsUnmapped) { + XSync(handle->x11.display, False); + + XUnmapWindow(handle->x11.display, handle->x11.window); + XSync(handle->x11.display, False); + + if(!sync) return; + do { + XUnmapWindow(handle->x11.display, handle->x11.window); + XSync(handle->x11.display, False); + XGetWindowAttributes(handle->x11.display, handle->x11.window, &xwa); + } while(xwa.map_state != IsUnmapped); + } +} + +static unsigned long generate_color(MwLL handle, unsigned long r, unsigned long g, unsigned long b) { + unsigned long c = 0; + + c |= (r * handle->x11.red_max / 255) << handle->x11.red_shift; + + c |= (g * handle->x11.green_max / 255) << handle->x11.green_shift; + + c |= (b * handle->x11.blue_max / 255) << handle->x11.blue_shift; + + return c; +} + +static XVisualInfo* get_visual_info(Display* display) { + XVisualInfo xvi; + int n; + Visual* visual = DefaultVisual(display, DefaultScreen(display)); + + xvi.visualid = XVisualIDFromVisual(visual); + + return XGetVisualInfo(display, VisualIDMask, &xvi, &n); +} + +#ifdef USE_DBUS +static void detect_dark_theme(MwLL handle) { + MwU32 value = 0; + MwU32 dark_theme = 0; + MwLLDBusPortalGet(&xsymtbl.dbus, &handle->x11.dbus, "org.freedesktop.portal.Settings", "org.freedesktop.appearance", "color-scheme", &value); + + dark_theme = (value == 1) ? 1 : 0; + + MwLLDispatch(handle, dark_theme, &dark_theme); +} +#endif + +static MwLL MwLLCreateImpl(MwLL parent, int x, int y, int width, int height) { + MwLL r; + Window p; + XVisualInfo* xvi; + unsigned long n = 1; + int i; + int px = x, py = y; + XSizeHints sh; + + r = malloc(sizeof(*r)); + + MwLLCreateCommon(r); + + if(px == MwDEFAULT) px = 0; + if(py == MwDEFAULT) py = 0; + if(width < 2) width = 2; + if(height < 2) height = 2; + + if(parent == NULL) { + r->x11.display = XOpenDisplay(NULL); + p = XRootWindow(r->x11.display, XDefaultScreen(r->x11.display)); + r->x11.top = 1; + r->x11.toplevel = 1; + } else { + r->x11.display = parent->x11.display; + p = parent->x11.window; + r->x11.top = 0; + r->x11.toplevel = 0; + } + r->x11.window = XCreateSimpleWindow(r->x11.display, p, px, py, width, height, 0, 0, WhitePixel(r->x11.display, DefaultScreen(r->x11.display))); + + sh.flags = PWinGravity; + sh.win_gravity = StaticGravity; + XSetWMNormalHints(r->x11.display, r->x11.window, &sh); + + xvi = get_visual_info(r->x11.display); + + if(xvi->red_mask != 0) { + i = 0; + while(!((n << i) & xvi->red_mask)) i++; + r->x11.red_mask = xvi->red_mask; + r->x11.red_max = xvi->red_mask >> i; + r->x11.red_shift = i; + + i = 0; + while(!((n << i) & xvi->green_mask)) i++; + r->x11.green_mask = xvi->green_mask; + r->x11.green_max = xvi->green_mask >> i; + r->x11.green_shift = i; + + i = 0; + while(!((n << i) & xvi->blue_mask)) i++; + r->x11.blue_mask = xvi->blue_mask; + r->x11.blue_max = xvi->blue_mask >> i; + r->x11.blue_shift = i; + } + + XFree(xvi); + +#ifdef DO_XIM + XSetLocaleModifiers(""); + if((r->x11.xim = XOpenIM(r->x11.display, 0, 0, 0)) == NULL) { + XSetLocaleModifiers("@im=none"); + r->x11.xim = XOpenIM(r->x11.display, 0, 0, 0); + } + + r->x11.xic = XCreateIC(r->x11.xim, + XNInputStyle, XIMPreeditNothing | XIMStatusNothing, + XNClientWindow, r->x11.window, + XNFocusWindow, r->x11.window, + NULL); + XSetICFocus(r->x11.xic); +#endif + + r->common.copy_buffer = 1; + r->common.type = MwLLBackendX11; + + r->x11.width = width; + r->x11.height = height; + + r->x11.grabbed = 0; + r->x11.force_render = 0; + r->x11.dark_theme_detection = 0; + + r->x11.colormap = DefaultColormap(r->x11.display, XDefaultScreen(r->x11.display)); + r->x11.wm_delete = XInternAtom(r->x11.display, "WM_DELETE_WINDOW", False); + r->x11.wm_protocols = XInternAtom(r->x11.display, "WM_PROTOCOLS", False); + XSetWMProtocols(r->x11.display, r->x11.window, &r->x11.wm_delete, 1); + + r->x11.utf8_string = XInternAtom(r->x11.display, "UTF8_STRING", False); + r->x11.compound_text = XInternAtom(r->x11.display, "COMPOUND_TEXT", False); + r->x11.text = XInternAtom(r->x11.display, "TEXT", False); + r->x11.clipboard = XInternAtom(r->x11.display, "CLIPBOARD", False); + r->x11.selection = XInternAtom(r->x11.display, "_MILSKO_SELECTION_", False); + + r->x11.clipboard_pending = 0; + + r->x11.gc = XCreateGC(r->x11.display, r->x11.window, 0, NULL); + + create_pixmap(r); + + XSetGraphicsExposures(r->x11.display, r->x11.gc, False); + + XSelectInput(r->x11.display, r->x11.window, mask); + + wait_map(r, 0); + + if(x != MwDEFAULT || y != MwDEFAULT) { + unsigned int dummy; + + MwLLGetXYWH(r, &px, &py, &dummy, &dummy); + + if(x == MwDEFAULT) x = px; + if(y == MwDEFAULT) y = py; + + if(parent == NULL) { + sync_move(r, x, y); + } else { + MwLLSetXY(r, x, y); + } + } + +#ifdef USE_DBUS + memset(&r->x11.dbus, 0, sizeof(r->x11.dbus)); + if(!parent && xsymtbl.has_dbus) { + xsymtbl.has_dbus = MwLLDBusNewContext(&xsymtbl.dbus, &r->x11.dbus); + r->x11.dark_theme_detection = MwTRUE; + } +#endif + + return r; +} + +static void MwLLDestroyImpl(MwLL handle) { + MwLLDestroyCommon(handle); + +#ifdef DO_XIM + if(handle->x11.xic) XDestroyIC(handle->x11.xic); + if(handle->x11.xim) XCloseIM(handle->x11.xim); +#endif + + destroy_pixmap(handle); + XFreeGC(handle->x11.display, handle->x11.gc); + XUnmapWindow(handle->x11.display, handle->x11.window); + XDestroyWindow(handle->x11.display, handle->x11.window); + + XSync(handle->x11.display, False); + + if(handle->x11.toplevel) XCloseDisplay(handle->x11.display); + +#ifdef USE_DBUS + if(!xsymtbl.has_dbus) { + MwLLDBusFreeContext(&xsymtbl.dbus, &handle->x11.dbus); + } +#endif + + free(handle); +} + +static void MwLLBeginDrawImpl(MwLL handle) { + (void)handle; +} + +static void MwLLEndDrawImpl(MwLL handle) { + (void)handle; + + if(handle->common.copy_buffer) XClearWindow(handle->x11.display, handle->x11.window); +} + +static void MwLLPolygonImpl(MwLL handle, MwPoint* points, int points_count, MwLLColor color) { + int i; + XPoint* p = malloc(sizeof(*p) * points_count); + + XSetForeground(handle->x11.display, handle->x11.gc, color->x11.pixel); + + for(i = 0; i < points_count; i++) { + p[i].x = points[i].x; + p[i].y = points[i].y; + } + XFillPolygon(handle->x11.display, handle->x11.pixmap, handle->x11.gc, p, points_count, Nonconvex, CoordModeOrigin); + + free(p); +} + +static void MwLLLineImpl(MwLL handle, MwPoint* points, MwLLColor color) { + XSetForeground(handle->x11.display, handle->x11.gc, color->x11.pixel); + + XDrawLine(handle->x11.display, handle->x11.pixmap, handle->x11.gc, points[0].x, points[0].y, points[1].x, points[1].y); +} + +static MwLLColor MwLLAllocColorImpl(MwLL handle, int r, int g, int b) { + MwLLColor c = malloc(sizeof(*c)); + MwLLColorUpdate(handle, c, r, g, b); + return c; +} + +static void MwLLColorUpdateImpl(MwLL handle, MwLLColor c, int r, int g, int b) { + XColor xc; + + if(handle->x11.red_mask == 0) { + if(r > 255) r = 255; + if(g > 255) g = 255; + if(b > 255) b = 255; + if(r < 0) r = 0; + if(g < 0) g = 0; + if(b < 0) b = 0; + + xc.red = 256 * r; + xc.green = 256 * g; + xc.blue = 256 * b; + XAllocColor(handle->x11.display, handle->x11.colormap, &xc); + + c->x11.pixel = xc.pixel; + } else { + c->x11.pixel = generate_color(handle, r, g, b); + } + c->common.red = r; + c->common.green = g; + c->common.blue = b; +} + +static void MwLLGetXYWHImpl(MwLL handle, int* x, int* y, unsigned int* w, unsigned int* h) { + Window root; + unsigned int border, depth; + + XGetGeometry(handle->x11.display, handle->x11.window, &root, x, y, w, h, &border, &depth); + if(handle->x11.top) { + int rx, ry; + Window child; + + XTranslateCoordinates(handle->x11.display, handle->x11.window, root, 0, 0, &rx, &ry, &child); + + *x = rx; + *y = ry; + } +} + +static void MwLLSetXYImpl(MwLL handle, int x, int y) { + XSizeHints sh; + long r; + XWindowChanges xwc; + XWindowAttributes xwa; + + XGetWindowAttributes(handle->x11.display, handle->x11.window, &xwa); + if(xwa.x == x && xwa.y == y) return; + + sh.flags = 0; + XGetWMNormalHints(handle->x11.display, handle->x11.window, &sh, &r); + + sh.flags |= USPosition; + sh.x = x; + sh.y = y; + +#if 1 + xwc.x = x; + xwc.y = y; + XConfigureWindow(handle->x11.display, handle->x11.window, CWX | CWY, &xwc); +#else + XMoveWindow(handle->x11.display, handle->x11.window, x, y); +#endif + XSetWMNormalHints(handle->x11.display, handle->x11.window, &sh); + + XSync(handle->x11.display, False); +} + +static void MwLLSetWHImpl(MwLL handle, int w, int h) { + XSizeHints sh; + long r; + XWindowChanges xwc; + XWindowAttributes xwa; + + XGetWindowAttributes(handle->x11.display, handle->x11.window, &xwa); + if(xwa.width == w && xwa.height == h) return; + + sh.flags = 0; + XGetWMNormalHints(handle->x11.display, handle->x11.window, &sh, &r); + + if(w < 2) w = 2; + if(h < 2) h = 2; + + sh.flags |= PSize; + sh.width = w; + sh.height = h; + +#if 1 + xwc.width = w; + xwc.height = h; + XConfigureWindow(handle->x11.display, handle->x11.window, CWWidth | CWHeight, &xwc); +#else + XResizeWindow(handle->x11.display, handle->x11.window, w, h); +#endif + XSetWMNormalHints(handle->x11.display, handle->x11.window, &sh); + + destroy_pixmap(handle); + create_pixmap(handle); + + /* we want events */ +#if 0 + handle->x11.width = w; + handle->x11.height = h; +#endif + + XSync(handle->x11.display, False); + + MwLLForceRender(handle); +} + +static void MwLLFreeColorImpl(MwLLColor color) { + free(color); +} + +static int MwLLPendingImpl(MwLL handle) { + XEvent ev; + + if(handle->x11.dark_theme_detection) { + handle->x11.dark_theme_detection = MwFALSE; +#ifdef USE_DBUS + if(xsymtbl.has_dbus) { + detect_dark_theme(handle); + MwLLDispatch(handle, draw, NULL); + } +#endif + } + + if(handle->x11.clipboard_pending && (MwTimeGetTick() - handle->x11.clipboard_time) >= ClipboardTimeout) { + return 1; + } + + if(XCheckTypedWindowEvent(handle->x11.display, handle->x11.window, ClientMessage, &ev) || XCheckTypedWindowEvent(handle->x11.display, handle->x11.window, SelectionNotify, &ev) || XCheckWindowEvent(handle->x11.display, handle->x11.window, mask, &ev)) { + XPutBackEvent(handle->x11.display, &ev); + return 1; + } + return 0; +} + +static void MwLLNextEventImpl(MwLL handle) { + XEvent ev; + + if(handle->x11.clipboard_pending && (MwTimeGetTick() - handle->x11.clipboard_time) >= ClipboardTimeout) { + Atom a = handle->x11.selection; + + handle->x11.clipboard_pending++; + handle->x11.clipboard_time = MwTimeGetTick(); + + switch(handle->x11.clipboard_pending) { + case 2: + a = handle->x11.compound_text; + break; + case 3: + a = handle->x11.text; + break; + case 4: + a = XA_STRING; + break; + case 5: + handle->x11.clipboard_pending = 0; + break; + } + + if(a != handle->x11.selection) { + XConvertSelection(handle->x11.display, handle->x11.clipboard, a, handle->x11.selection, handle->x11.window, CurrentTime); + } + } + + while(XCheckTypedWindowEvent(handle->x11.display, handle->x11.window, ClientMessage, &ev) || XCheckTypedWindowEvent(handle->x11.display, handle->x11.window, SelectionNotify, &ev) || XCheckWindowEvent(handle->x11.display, handle->x11.window, mask, &ev)) { + int render = 0; + if(ev.type == Expose) { + handle->x11.force_render = 0; + render = 1; + } else if(ev.type == ButtonPress) { + MwMouse p; + p.point.x = ev.xbutton.x; + p.point.y = ev.xbutton.y; + if(ev.xbutton.button == Button1) { + p.button = MwMOUSE_LEFT; + } else if(ev.xbutton.button == Button2) { + p.button = MwMOUSE_MIDDLE; + } else if(ev.xbutton.button == Button3) { + p.button = MwMOUSE_RIGHT; + } else if(ev.xbutton.button == Button4) { + p.button = MwMOUSE_WHEELUP; + } else if(ev.xbutton.button == Button5) { + p.button = MwMOUSE_WHEELDOWN; + } + +#ifndef ALLOW_SLOPPY_FOCUS + XSetInputFocus(handle->x11.display, handle->x11.window, RevertToNone, CurrentTime); +#endif + + MwLLDispatch(handle, down, &p); + } else if(ev.type == ButtonRelease) { + MwMouse p; + p.point.x = ev.xbutton.x; + p.point.y = ev.xbutton.y; + if(ev.xbutton.button == Button1) { + p.button = MwMOUSE_LEFT; + } else if(ev.xbutton.button == Button2) { + p.button = MwMOUSE_MIDDLE; + } else if(ev.xbutton.button == Button3) { + p.button = MwMOUSE_RIGHT; + } else if(ev.xbutton.button == Button4) { + p.button = MwMOUSE_WHEELUP; + } else if(ev.xbutton.button == Button5) { + p.button = MwMOUSE_WHEELDOWN; + } + + MwLLDispatch(handle, up, &p); + } else if(ev.type == ConfigureNotify) { + if(handle->x11.width != (unsigned int)ev.xconfigure.width || handle->x11.height != (unsigned int)ev.xconfigure.height) { + MwLLDispatch(handle, resize, NULL); + destroy_pixmap(handle); + create_pixmap(handle); + render = 1; + } + handle->x11.width = ev.xconfigure.width; + handle->x11.height = ev.xconfigure.height; + } else if(ev.type == ClientMessage) { + if(ev.xclient.message_type == handle->x11.wm_protocols && ev.xclient.data.l[0] == (long)handle->x11.wm_delete) { + MwLLDispatch(handle, close, NULL); + } + } else if(ev.type == FocusIn) { + MwLLDispatch(handle, focus_in, NULL); + } else if(ev.type == FocusOut) { + MwLLDispatch(handle, focus_out, NULL); + } else if(ev.type == MotionNotify) { + MwPoint p; + XWindowAttributes attr; + + XGetWindowAttributes(handle->x11.display, handle->x11.window, &attr); + + p.x = ev.xmotion.x; + p.y = ev.xmotion.y; + + if(handle->x11.grabbed) { + p.x -= attr.width / 2; + p.y -= attr.height / 2; + } + + MwLLDispatch(handle, move, &p); + if(handle->x11.grabbed && (p.x != 0 || p.y != 0)) { + XWarpPointer(handle->x11.display, None, handle->x11.window, 0, 0, 0, 0, attr.width / 2, attr.height / 2); + } + } else if(ev.type == KeyPress || ev.type == KeyRelease) { + int n = -1; + char str[512]; + KeySym sym; + + str[0] = 0; + + XLookupString(&ev.xkey, str, 512, &sym, NULL); + + /* wtf is wrong with xlib? */ + if(strlen(str) == 0 || (str[0] < 0x20)) { + char* s = XKeysymToString(sym); + + strcpy(str, s); + } + + if(MwStringIsKeyUTF8(sym)) { + char s = str[0]; + + if(ev.xkey.state & (ShiftMask | LockMask) && !(ev.xkey.state & (ControlMask | Mod1Mask))) { + n = toupper((int)s); + } else { + n = s; + } + } + + if(strcmp(str, "BackSpace") == 0) { + n = MwKEY_BACKSPACE; + } else if(strcmp(str, "Left") == 0) { + n = MwKEY_LEFT; + } else if(strcmp(str, "Right") == 0) { + n = MwKEY_RIGHT; + } else if(strcmp(str, "Up") == 0) { + n = MwKEY_UP; + } else if(strcmp(str, "Down") == 0) { + n = MwKEY_DOWN; + } else if(strcmp(str, "Return") == 0) { + n = MwKEY_ENTER; + } else if(strcmp(str, "Escape") == 0) { + n = MwKEY_ESCAPE; + } else if(strcmp(str, "Shift_L") == 0) { + n = MwKEY_LEFTSHIFT; + } else if(strcmp(str, "Shift_R") == 0) { + n = MwKEY_RIGHTSHIFT; + } else if(strcmp(str, "Alt_L") == 0 || strcmp(str, "Alt_R") == 0) { + n = MwKEY_ALT; + } else if(strcmp(str, "Control_R") == 0 || strcmp(str, "Control_R") == 0) { + n = MwKEY_CONTROL; + } + + if(n != MwKEY_CONTROL && ev.xkey.state & ControlMask) { + n |= MwKEY_CONTROL_FLAG; + } + if(n != MwKEY_ALT && ev.xkey.state & Mod1Mask) { + n |= MwKEY_ALT_FLAG; + } + + if(n != -1) { + if(ev.type == KeyPress) { + MwLLDispatch(handle, key, &n); + } else { + MwLLDispatch(handle, key_released, &n); + } + } + } else if(ev.type == SelectionNotify) { + handle->x11.clipboard_pending = 0; + + if(ev.xselection.property != None) { + Atom type; + int format; + unsigned long nitems, after, size; + unsigned char* pdat; + int ret = XGetWindowProperty(handle->x11.display, handle->x11.window, handle->x11.selection, 0, 0, False, AnyPropertyType, &type, &format, &nitems, &after, &pdat); + + if(pdat != NULL) XFree(pdat); + + size = after; + + if(ret == Success && type != None && format == 8) { + char* buf = malloc(size + 1); + int offset; + + for(offset = 0; after > 0; offset += nitems) { + ret = XGetWindowProperty(handle->x11.display, handle->x11.window, handle->x11.selection, offset / 4, after / 4 + 1, False, AnyPropertyType, &type, &format, &nitems, &after, &pdat); + + if(ret != Success) { + free(buf); + buf = NULL; + break; + } + + memcpy(buf + offset, pdat, nitems); + + XFree(pdat); + } + + if(buf != NULL) { + buf[size] = 0; + + MwLLDispatch(handle, clipboard, buf); + + free(buf); + } + } + + XDeleteProperty(handle->x11.display, handle->x11.window, handle->x11.selection); + } + } + if(render) { + int x, y; + unsigned int w, h; + + MwLLGetXYWH(handle, &x, &y, &w, &h); + + MwLLDispatch(handle, draw, NULL); + if(handle->common.copy_buffer) { + XCopyArea(handle->x11.display, handle->x11.pixmap, handle->x11.window, handle->x11.gc, 0, 0, w, h, 0, 0); + XSetWindowBackgroundPixmap(handle->x11.display, handle->x11.window, handle->x11.pixmap); + } + } + } +} + +static void MwLLSetTitleImpl(MwLL handle, const char* title) { + XSetStandardProperties(handle->x11.display, handle->x11.window, title, title, None, (char**)NULL, 0, NULL); +} + +static MwLLPixmap MwLLCreatePixmapImpl(MwLL handle, unsigned char* data, int width, int height) { + MwLLPixmap r = malloc(sizeof(*r)); + int evbase, erbase; + XWindowAttributes attr; + + r->common.raw = malloc(4 * width * height); + memcpy(r->common.raw, data, 4 * width * height); + + XGetWindowAttributes(handle->x11.display, handle->x11.window, &attr); + + r->common.width = width; + r->common.height = height; + + r->x11.depth = attr.depth; + r->x11.display = handle->x11.display; + r->x11.data = malloc(sizeof(unsigned long) * width * height); + r->x11.handle = handle; + +#ifdef USE_XRENDER + if(xsymtbl.has_xrender) { + r->x11.use_xrender = XRenderQueryExtension(handle->x11.display, &evbase, &erbase) ? 1 : 0; + } +#endif + + r->x11.image = XCreateImage(handle->x11.display, DefaultVisual(handle->x11.display, DefaultScreen(handle->x11.display)), r->x11.depth, ZPixmap, 0, NULL, width, height, 32, 0); + r->x11.mask = XCreateImage(handle->x11.display, DefaultVisual(handle->x11.display, DefaultScreen(handle->x11.display)), 8, ZPixmap, 0, NULL, width, height, 32, 0); + + r->x11.image->data = malloc(r->x11.image->bytes_per_line * height); + r->x11.mask->data = malloc(r->x11.mask->bytes_per_line * height); + + MwLLPixmapUpdate(r); + return r; +} + +static void MwLLPixmapUpdateImpl(MwLLPixmap r) { + int y, x; + for(y = 0; y < r->common.height; y++) { + for(x = 0; x < r->common.width; x++) { + unsigned char* px = &r->common.raw[(y * r->common.width + x) * 4]; + MwLLColor c = NULL; + unsigned long p; + + c = MwLLAllocColor(r->x11.handle, px[0], px[1], px[2]); + p = c->x11.pixel; + MwLLFreeColor(c); + + XPutPixel(r->x11.image, x, y, p); + *(unsigned long*)(&r->x11.data[(y * r->common.width + x) * sizeof(unsigned long)]) = (px[3] << 24) | p; + } + } + + for(y = 0; y < r->common.height; y++) { + for(x = 0; x < r->common.width; x++) { + if(r->common.raw[(y * r->common.width + x) * 4 + 3]) { + XPutPixel(r->x11.mask, x, y, 255); + } else { + XPutPixel(r->x11.mask, x, y, 0); + } + } + } +} + +static void MwLLDestroyPixmapImpl(MwLLPixmap pixmap) { + free(pixmap->common.raw); + XDestroyImage(pixmap->x11.image); + XDestroyImage(pixmap->x11.mask); + free(pixmap->x11.data); + + free(pixmap); +} + +#define DO_XRENDER(dest_px, src, format, bpp) \ + { \ + Picture src_pic, dest_pic; \ + XRenderPictFormat* fmt = XRenderFindStandardFormat(handle->x11.display, format); \ + Pixmap src_px = XCreatePixmap(handle->x11.display, handle->x11.window, pixmap->common.width, pixmap->common.height, bpp); \ + GC gc = XCreateGC(handle->x11.display, src_px, 0, NULL); \ +\ + dest_px = XCreatePixmap(handle->x11.display, handle->x11.window, rect->width, rect->height, bpp); \ +\ + XPutImage(handle->x11.display, src_px, gc, src, 0, 0, 0, 0, pixmap->common.width, pixmap->common.height); \ +\ + src_pic = XRenderCreatePicture(handle->x11.display, src_px, fmt, render_mask, &attr); \ + dest_pic = XRenderCreatePicture(handle->x11.display, dest_px, fmt, render_mask, &attr); \ +\ + XRenderSetPictureTransform(handle->x11.display, src_pic, &m); \ + XRenderComposite(handle->x11.display, PictOpSrc, src_pic, 0, dest_pic, 0, 0, 0, 0, 0, 0, rect->width, rect->height); \ +\ + XRenderFreePicture(handle->x11.display, src_pic); \ + XRenderFreePicture(handle->x11.display, dest_pic); \ + XFreePixmap(handle->x11.display, src_px); \ + XFreeGC(handle->x11.display, gc); \ + } + +static void MwLLDrawPixmapImpl(MwLL handle, MwRect* rect, MwLLPixmap pixmap) { + if(rect->width <= 0 || rect->height <= 0 || pixmap->common.width <= 0 || pixmap->common.height <= 0) return; + if(rect->width >= INT16_MAX) rect->width = INT16_MAX; + if(rect->height >= INT16_MAX) rect->height = INT16_MAX; + +#ifdef USE_XRENDER + if(pixmap->x11.image != NULL && pixmap->x11.use_xrender) { + Pixmap px; + Pixmap mask, mask_tmp; + XRenderPictureAttributes attr; + XTransform m; + double xsc; + double ysc; + unsigned long render_mask = 0; + XImage* mask_tmp_img; + XImage* mask_img; + int y, x; + GC mask_gc; + + memset(&attr, 0, sizeof(attr)); + + xsc = (double)pixmap->common.width / rect->width; + ysc = (double)pixmap->common.height / rect->height; + + m.matrix[0][0] = XDoubleToFixed(xsc); + m.matrix[0][1] = XDoubleToFixed(0); + m.matrix[0][2] = XDoubleToFixed(0); + + m.matrix[1][0] = XDoubleToFixed(0); + m.matrix[1][1] = XDoubleToFixed(ysc); + m.matrix[1][2] = XDoubleToFixed(0); + + m.matrix[2][0] = XDoubleToFixed(0); + m.matrix[2][1] = XDoubleToFixed(0); + m.matrix[2][2] = XDoubleToFixed(1.0); + + DO_XRENDER(px, pixmap->x11.image, PictStandardRGB24, pixmap->x11.depth); + DO_XRENDER(mask_tmp, pixmap->x11.mask, PictStandardA8, 8); + + /* FIXME: this is terrible way to do this... i hope someone who knows xrender better than me + * gives me better solution + */ + mask_tmp_img = XGetImage(handle->x11.display, mask_tmp, 0, 0, rect->width, rect->height, 0xff, ZPixmap); + mask_img = XCreateImage(handle->x11.display, DefaultVisual(handle->x11.display, DefaultScreen(handle->x11.display)), 1, ZPixmap, 0, NULL, rect->width, rect->height, 32, 0); + mask = XCreatePixmap(handle->x11.display, handle->x11.window, rect->width, rect->height, 1); + mask_gc = XCreateGC(handle->x11.display, mask, 0, NULL); + + mask_img->data = malloc(mask_img->bytes_per_line * rect->height); + + for(y = 0; y < rect->height; y++) { + for(x = 0; x < rect->width; x++) { + unsigned long p = XGetPixel(mask_tmp_img, x, y); + if(p == 255) { + p = 1; + } else { + p = 0; + } + XPutPixel(mask_img, x, y, p); + } + } + XPutImage(handle->x11.display, mask, mask_gc, mask_img, 0, 0, 0, 0, rect->width, rect->height); + XFreeGC(handle->x11.display, mask_gc); + XDestroyImage(mask_img); + XDestroyImage(mask_tmp_img); + /* end terrible hack */ + + XSetClipMask(handle->x11.display, handle->x11.gc, mask); + XSetClipOrigin(handle->x11.display, handle->x11.gc, rect->x, rect->y); + XCopyArea(handle->x11.display, px, handle->x11.pixmap, handle->x11.gc, 0, 0, rect->width, rect->height, rect->x, rect->y); + XSetClipMask(handle->x11.display, handle->x11.gc, None); + + XFreePixmap(handle->x11.display, mask_tmp); + XFreePixmap(handle->x11.display, mask); + XFreePixmap(handle->x11.display, px); + } else +#endif + if(pixmap->x11.image != NULL) { + XImage* dest; + XImage* destmask; + Pixmap mask = XCreatePixmap(handle->x11.display, handle->x11.window, rect->width, rect->height, 1); + GC maskgc = XCreateGC(handle->x11.display, mask, 0, NULL); + char* di = malloc(rect->width * rect->height * 4); + char* dm = malloc(rect->width * rect->height * 4); + int y, x; + + dest = XCreateImage(handle->x11.display, DefaultVisual(handle->x11.display, DefaultScreen(handle->x11.display)), pixmap->x11.depth, ZPixmap, 0, di, rect->width, rect->height, 32, rect->width * 4); + destmask = XCreateImage(handle->x11.display, DefaultVisual(handle->x11.display, DefaultScreen(handle->x11.display)), 1, ZPixmap, 0, dm, rect->width, rect->height, 32, rect->width * 4); + + for(y = 0; y < (int)rect->height; y++) { + for(x = 0; x < (int)rect->width; x++) { + int sy = y * pixmap->common.height / rect->height; + int sx = x * pixmap->common.width / rect->width; + char* ipx; + char* opx; + sy = (int)sy; + sx = (int)sx; + + ipx = &pixmap->x11.image->data[(pixmap->common.width * sy + sx) * (pixmap->x11.image->bitmap_unit / 8)]; + opx = &di[(rect->width * y + x) * (pixmap->x11.image->bitmap_unit / 8)]; + memcpy(opx, ipx, pixmap->x11.image->bitmap_unit / 8); + + XPutPixel(destmask, x, y, XGetPixel(pixmap->x11.mask, sx, sy)); + } + } + + XPutImage(handle->x11.display, mask, maskgc, destmask, 0, 0, 0, 0, rect->width, rect->height); + + XSetClipMask(handle->x11.display, handle->x11.gc, mask); + XSetClipOrigin(handle->x11.display, handle->x11.gc, rect->x, rect->y); + XPutImage(handle->x11.display, handle->x11.pixmap, handle->x11.gc, dest, 0, 0, rect->x, rect->y, rect->width, rect->height); + XSetClipMask(handle->x11.display, handle->x11.gc, None); + + XDestroyImage(dest); + XDestroyImage(destmask); + + XFreeGC(handle->x11.display, maskgc); + XFreePixmap(handle->x11.display, mask); + } +} + +static void MwLLSetIconImpl(MwLL handle, MwLLPixmap pixmap) { + unsigned long* icon = malloc((2 + pixmap->common.width * pixmap->common.height) * sizeof(*icon)); + int i; + Atom atom = XInternAtom(handle->x11.display, "_NET_WM_ICON", False); + + icon[0] = pixmap->common.width; + icon[1] = pixmap->common.height; + + for(i = 0; i < pixmap->common.width * pixmap->common.height; i++) { + icon[2 + i] = *(unsigned long*)(&pixmap->x11.data[i * sizeof(unsigned long)]); + } + + XChangeProperty(handle->x11.display, handle->x11.window, atom, 6, 32, PropModeReplace, (unsigned char*)icon, 2 + pixmap->common.width * pixmap->common.height); + + free(icon); +} + +static void MwLLForceRenderImpl(MwLL handle) { + if(!handle->x11.force_render) { + XEvent ev; + memset(&ev, 0, sizeof(ev)); + + ev.type = Expose; + ev.xexpose.window = handle->x11.window; + XSendEvent(handle->x11.display, handle->x11.window, False, ExposureMask, &ev); + + handle->x11.force_render = 1; + } +} + +Cursor MwLLX11CreateCursor(Display* display, MwCursor* image, MwCursor* mask) { + Cursor cur; + int y, x, ys, xs; + char* di = malloc(MwCursorDataHeight * MwCursorDataHeight * 4); + char* dm = malloc(MwCursorDataHeight * MwCursorDataHeight * 4); + XImage* cimage = XCreateImage(display, DefaultVisual(display, DefaultScreen(display)), 1, ZPixmap, 0, di, MwCursorDataHeight, MwCursorDataHeight, 32, MwCursorDataHeight * 4); + XImage* cmask = XCreateImage(display, DefaultVisual(display, DefaultScreen(display)), 1, ZPixmap, 0, dm, MwCursorDataHeight, MwCursorDataHeight, 32, MwCursorDataHeight * 4); + Pixmap pimage = XCreatePixmap(display, DefaultRootWindow(display), MwCursorDataHeight, MwCursorDataHeight, 1); + Pixmap pmask = XCreatePixmap(display, DefaultRootWindow(display), MwCursorDataHeight, MwCursorDataHeight, 1); + GC imagegc = XCreateGC(display, pimage, 0, NULL); + GC maskgc = XCreateGC(display, pmask, 0, NULL); + XColor cfg, cbg; + + xs = -mask->x + image->x; + ys = mask->height + mask->y; + ys = image->height + image->y - ys; + + if(ys < 0) ys = -ys; + + memset(cimage->data, 0, cimage->bytes_per_line * cimage->height); + memset(cmask->data, 0, cmask->bytes_per_line * cmask->height); + for(y = 0; y < mask->height; y++) { + unsigned int l = mask->data[y]; + for(x = mask->width - 1; x >= 0; x--) { + if(l & 1) { + XPutPixel(cmask, x, y, 1); + } + l = l >> 1; + } + } + for(y = 0; y < image->height; y++) { + unsigned int l = image->data[y]; + for(x = image->width - 1; x >= 0; x--) { + int px = 0; + if(l & 1) px = 1; + XPutPixel(cimage, xs + x, ys + y, px); + + l = l >> 1; + } + } + + cfg.red = 65535; + cfg.green = 65535; + cfg.blue = 65535; + XAllocColor(display, DefaultColormap(display, DefaultScreen(display)), &cfg); + + cbg.red = 0; + cbg.green = 0; + cbg.blue = 0; + XAllocColor(display, DefaultColormap(display, DefaultScreen(display)), &cbg); + + XPutImage(display, pimage, imagegc, cimage, 0, 0, 0, 0, MwCursorDataHeight, MwCursorDataHeight); + XPutImage(display, pmask, maskgc, cmask, 0, 0, 0, 0, MwCursorDataHeight, MwCursorDataHeight); + + cur = XCreatePixmapCursor(display, pimage, pmask, &cfg, &cbg, xs - image->x, ys + (MwCursorDataHeight + image->y)); + + XFreePixmap(display, pimage); + XFreePixmap(display, pmask); + + XDestroyImage(cimage); + XDestroyImage(cmask); + + XFreeGC(display, imagegc); + XFreeGC(display, maskgc); + + return cur; +} + +static void MwLLSetCursorImpl(MwLL handle, MwCursor* image, MwCursor* mask) { + Cursor cur = MwLLX11CreateCursor(handle->x11.display, image, mask); + + XDefineCursor(handle->x11.display, handle->x11.window, cur); + XFreeCursor(handle->x11.display, cur); +} + +static void MwLLDetachImpl(MwLL handle, MwPoint* point) { + int x = 0, y = 0; + Window child, root, parent; + Window* children; + unsigned int nchild; + XWindowAttributes xwa; + + handle->x11.top = 1; + + XQueryTree(handle->x11.display, handle->x11.window, &root, &parent, &children, &nchild); + if(children != NULL) XFree(children); + + XTranslateCoordinates(handle->x11.display, parent, RootWindow(handle->x11.display, DefaultScreen(handle->x11.display)), 0, 0, &x, &y, &child); + + XGetWindowAttributes(handle->x11.display, handle->x11.window, &xwa); + + XReparentWindow(handle->x11.display, handle->x11.window, RootWindow(handle->x11.display, DefaultScreen(handle->x11.display)), x + point->x, y + point->y); + + if(xwa.map_state == IsViewable) { + sync_move(handle, x + point->x, y + point->y); + } +} + +static void MwLLShowImpl(MwLL handle, int show) { + if(show) { + wait_map(handle, 1); + +#ifndef ALLOW_SLOPPY_FOCUS + XSetInputFocus(handle->x11.display, handle->x11.window, RevertToNone, CurrentTime); +#endif + } else { + wait_unmap(handle, 1); + } +} + +static void MwLLMakePopupImpl(MwLL handle, MwLL parent) { + Atom wndtype = XInternAtom(handle->x11.display, "_NET_WM_WINDOW_TYPE", False); + Atom wnddlg = XInternAtom(handle->x11.display, "_NET_WM_WINDOW_TYPE_DIALOG", False); + Atom wndstate = XInternAtom(handle->x11.display, "_NET_WM_STATE", False); + Atom wndmodal = XInternAtom(handle->x11.display, "_NET_WM_STATE_MODAL", False); + + if(parent != NULL) XSetTransientForHint(handle->x11.display, handle->x11.window, parent->x11.window); + XChangeProperty(handle->x11.display, handle->x11.window, wndtype, XA_ATOM, 32, PropModeReplace, (unsigned char*)&wnddlg, 1); + XChangeProperty(handle->x11.display, handle->x11.window, wndstate, XA_ATOM, 32, PropModeReplace, (unsigned char*)&wndmodal, 1); +} + +static void MwLLSetSizeHintsImpl(MwLL handle, int minx, int miny, int maxx, int maxy) { + XSizeHints* hints = XAllocSizeHints(); + long ret; + + XGetWMSizeHints(handle->x11.display, handle->x11.window, hints, &ret, XA_WM_NORMAL_HINTS); + + hints->flags |= PMinSize | PMaxSize; + hints->min_width = minx; + hints->min_height = miny; + hints->max_width = maxx; + hints->max_height = maxy; + XSetWMSizeHints(handle->x11.display, handle->x11.window, hints, XA_WM_NORMAL_HINTS); + XFree(hints); +} + +static void MwLLMakeBorderlessImpl(MwLL handle, int toggle) { + Atom atom = XInternAtom(handle->x11.display, "_MOTIF_WM_HINTS", 0); + mwm_hints_t hints; + + hints.flags = MWM_HINTS_DECORATIONS; + hints.decorations = toggle ? 0 : 1; + XChangeProperty(handle->x11.display, handle->x11.window, atom, atom, 32, PropModeReplace, (unsigned char*)&hints, 5); +} + +static void MwLLFocusImpl(MwLL handle) { + XSetInputFocus(handle->x11.display, handle->x11.window, RevertToNone, CurrentTime); +} + +static void MwLLGrabPointerImpl(MwLL handle, int toggle) { + XWindowAttributes attr; + + XGetWindowAttributes(handle->x11.display, handle->x11.window, &attr); + + if(toggle) { + handle->x11.grabbed = 1; + + XWarpPointer(handle->x11.display, None, handle->x11.window, 0, 0, 0, 0, attr.width / 2, attr.height / 2); + } else { + handle->x11.grabbed = 0; + } +} + +static void MwLLSetClipboardImpl(MwLL handle, const char* text, int clipboard_type) { + /* TODO */ + + (void)handle; + (void)text; + (void)clipboard_type; +} + +static void MwLLGetClipboardImpl(MwLL handle, int clipboard_type) { + (void)clipboard_type; + + if(handle->x11.clipboard_pending) return; + + XConvertSelection(handle->x11.display, handle->x11.clipboard, handle->x11.utf8_string, handle->x11.selection, handle->x11.window, CurrentTime); + + handle->x11.clipboard_pending = 1; + handle->x11.clipboard_time = MwTimeGetTick(); +} + +static void MwLLMakeToolWindowImpl(MwLL handle) { + XSetWindowAttributes xswa; + Atom wndtype = XInternAtom(handle->x11.display, "_NET_WM_WINDOW_TYPE", False); + Atom wndmenu = XInternAtom(handle->x11.display, "_NET_WM_WINDOW_TYPE_MENU", False); + + xswa.override_redirect = True; + + XChangeWindowAttributes(handle->x11.display, handle->x11.window, CWOverrideRedirect, &xswa); + XChangeProperty(handle->x11.display, handle->x11.window, wndtype, XA_ATOM, 32, PropModeReplace, (unsigned char*)&wndmenu, 1); +} + +static void MwLLGetCursorCoordImpl(MwLL handle, MwPoint* point) { + Window root, child; + int rx, ry, wx, wy; + unsigned int m; + + XQueryPointer(handle->x11.display, DefaultRootWindow(handle->x11.display), &root, &child, &rx, &ry, &wx, &wy, &m); + + point->x = rx; + point->y = ry; +} + +static void MwLLGetScreenSizeImpl(MwLL handle, MwRect* rect) { + XWindowAttributes xwa; + XGetWindowAttributes(handle->x11.display, DefaultRootWindow(handle->x11.display), &xwa); + + rect->x = rect->y = 0; + rect->width = xwa.width; + rect->height = xwa.height; +} + +static void MwLLBeginStateChangeImpl(MwLL handle) { + MwLLShow(handle, 0); +} + +static void MwLLEndStateChangeImpl(MwLL handle) { + MwLLShow(handle, 1); +} + +static void MwLLSetDarkThemeImpl(MwLL handle, int toggle) { + (void)handle; + (void)toggle; +} + +static MwBool MwLLDoModernImpl(MwLL handle) { + (void)handle; + return MwTRUE; +} + +static void MwLLRaiseImpl(MwLL handle) { + XRaiseWindow(handle->x11.display, handle->x11.window); +} + +static void MwLLClipImpl(MwLL handle, MwRect* rect) { + if(rect == NULL) { + XSetClipMask(handle->x11.display, handle->x11.gc, None); + } else { + XRectangle rc; + + rc.x = 0; + rc.y = 0; + rc.width = rect->width; + rc.height = rect->height; + + XSetClipRectangles(handle->x11.display, handle->x11.gc, rect->x, rect->y, &rc, 1, Unsorted); + } +} + +static int MwLLX11CallInitImpl(void) { + MwBool loadX11 = MwFALSE; + if(getenv("MILSKO_BACKEND")) { + loadX11 |= + (strcmp(getenv("MILSKO_BACKEND"), "x11") == 0); + } else if(getenv("DISPLAY")) { + loadX11 |= (getenv("DISPLAY") != NULL); + } + + if(!loadX11) { + return 1; + } + +#ifdef __APPLE__ + xsymtbl.lib_xlib = MwDynamicOpen("libX11.dylib"); +#else + xsymtbl.lib_xlib = MwDynamicOpen("libX11.so"); +#endif + if(!xsymtbl.lib_xlib) { + return 1; + } + + xsymtbl.has_xrender = MwFALSE; +#if USE_XRENDER + xsymtbl.lib_xrender = MwDynamicOpen("libXrender.so"); + if(xsymtbl.lib_xrender) { + xsymtbl.has_xrender = MwTRUE; + } +#endif + +#define X11_FUNC_LOAD(x) x = MwDynamicSymbol(xsymtbl.lib_xlib, #x) + + X11_FUNC_LOAD(XClearWindow); + X11_FUNC_LOAD(XCreateImage); + X11_FUNC_LOAD(XOpenDisplay); + X11_FUNC_LOAD(XKeysymToString); + X11_FUNC_LOAD(XInternAtom); + X11_FUNC_LOAD(XCreatePixmapCursor); + X11_FUNC_LOAD(XCreateGC); + X11_FUNC_LOAD(XCreatePixmap); + X11_FUNC_LOAD(XCreateSimpleWindow); + X11_FUNC_LOAD(XVisualIDFromVisual); + X11_FUNC_LOAD(XRootWindow); + X11_FUNC_LOAD(XSetWMProtocols); + X11_FUNC_LOAD(XSetTransientForHint); + X11_FUNC_LOAD(XAllocColor); + X11_FUNC_LOAD(XChangeProperty); + X11_FUNC_LOAD(XChangeWindowAttributes); + X11_FUNC_LOAD(XCheckTypedWindowEvent); + X11_FUNC_LOAD(XCheckWindowEvent); + X11_FUNC_LOAD(XCloseDisplay); + X11_FUNC_LOAD(XConfigureWindow); + X11_FUNC_LOAD(XConvertSelection); + X11_FUNC_LOAD(XCopyArea); + X11_FUNC_LOAD(XDefaultScreen); + X11_FUNC_LOAD(XDefineCursor); + X11_FUNC_LOAD(XDeleteProperty); + X11_FUNC_LOAD(XDestroyWindow); + X11_FUNC_LOAD(XDrawLine); + X11_FUNC_LOAD(XFillPolygon); + X11_FUNC_LOAD(XFree); + X11_FUNC_LOAD(XFreeCursor); + X11_FUNC_LOAD(XFreeGC); + X11_FUNC_LOAD(XFreePixmap); + X11_FUNC_LOAD(XGetGeometry); + X11_FUNC_LOAD(XGetWindowProperty); + X11_FUNC_LOAD(XGetWindowAttributes); + X11_FUNC_LOAD(XMapWindow); + X11_FUNC_LOAD(XNextEvent); + X11_FUNC_LOAD(XPending); + X11_FUNC_LOAD(XPutBackEvent); + X11_FUNC_LOAD(XPutImage); + X11_FUNC_LOAD(XQueryPointer); + X11_FUNC_LOAD(XQueryTree); + X11_FUNC_LOAD(XReparentWindow); + X11_FUNC_LOAD(XSelectInput); + X11_FUNC_LOAD(XSendEvent); + X11_FUNC_LOAD(XSetClipMask); + X11_FUNC_LOAD(XSetClipOrigin); + X11_FUNC_LOAD(XSetClipRectangles); + X11_FUNC_LOAD(XSetForeground); + X11_FUNC_LOAD(XSetGraphicsExposures); + X11_FUNC_LOAD(XSetInputFocus); + X11_FUNC_LOAD(XSetWindowBackgroundPixmap); + X11_FUNC_LOAD(XSync); + X11_FUNC_LOAD(XTranslateCoordinates); + X11_FUNC_LOAD(XUnmapWindow); + X11_FUNC_LOAD(XWarpPointer); + X11_FUNC_LOAD(XSetLocaleModifiers); + X11_FUNC_LOAD(XOpenIM); + X11_FUNC_LOAD(XCloseIM); + X11_FUNC_LOAD(XCreateIC); + X11_FUNC_LOAD(XDestroyIC); + X11_FUNC_LOAD(XSetICFocus); + X11_FUNC_LOAD(XGetImage); + X11_FUNC_LOAD(XRaiseWindow); + + X11_FUNC_LOAD(XAllocSizeHints); + X11_FUNC_LOAD(XGetVisualInfo); + X11_FUNC_LOAD(XGetWMNormalHints); + X11_FUNC_LOAD(XGetWMSizeHints); + X11_FUNC_LOAD(XLookupString); + X11_FUNC_LOAD(XSetStandardProperties); + X11_FUNC_LOAD(XSetWMNormalHints); + X11_FUNC_LOAD(XSetWMSizeHints); + +#if USE_XRENDER +#define XRENDER_FUNC_LOAD(x) x = MwDynamicSymbol(xsymtbl.lib_xrender, #x); + + XRENDER_FUNC_LOAD(XRenderQueryExtension) + XRENDER_FUNC_LOAD(XRenderFindStandardFormat) + XRENDER_FUNC_LOAD(XRenderCreatePicture) + XRENDER_FUNC_LOAD(XRenderFreePicture) + XRENDER_FUNC_LOAD(XRenderSetPictureTransform) + XRENDER_FUNC_LOAD(XRenderComposite) +#endif + +#ifdef USE_DBUS + xsymtbl.has_dbus = MwLLDBusFuncSetup(&xsymtbl.dbus); +#endif + return 0; +} + +#include "call.c" +CALL(X11); diff --git a/widget/milsko/milskosrc/src/color.c b/widget/milsko/milskosrc/src/color.c new file mode 100644 index 0000000000..ae3667ed59 --- /dev/null +++ b/widget/milsko/milskosrc/src/color.c @@ -0,0 +1,815 @@ +#include + +#include "../external/stb_ds.h" + +struct color { + char* key; + MwU32 value; +}; + +static struct color* colors = NULL; + +MwLLColor MwParseColorName(MwWidget handle, const char* color) { + MwRGB rgb; + MwParseColorNameNoAllocate(color, &rgb); + return MwLLAllocColor(handle->lowlevel, rgb.red, rgb.green, rgb.blue); +} + +void MwParseColorNameNoAllocate(const char* color, MwRGB* rgb) { + MwU32 v = shget(colors, color); + rgb->red = (v >> 16) & 0xff; + rgb->green = (v >> 8) & 0xff; + rgb->blue = (v >> 0) & 0xff; +} + +static void add_color(const char* name, int red, int green, int blue) { + MwU32 v = (red << 16) | (green << 8) | (blue << 0); + shput(colors, name, v); +} + +void MwColorTableInit(void) { + sh_new_strdup(colors); + shdefault(colors, 0); + add_color("snow", 255, 250, 250); + add_color("ghost white", 248, 248, 255); + add_color("GhostWhite", 248, 248, 255); + add_color("white smoke", 245, 245, 245); + add_color("WhiteSmoke", 245, 245, 245); + add_color("gainsboro", 220, 220, 220); + add_color("floral white", 255, 250, 240); + add_color("FloralWhite", 255, 250, 240); + add_color("old lace", 253, 245, 230); + add_color("OldLace", 253, 245, 230); + add_color("linen", 250, 240, 230); + add_color("antique white", 250, 235, 215); + add_color("AntiqueWhite", 250, 235, 215); + add_color("papaya whip", 255, 239, 213); + add_color("PapayaWhip", 255, 239, 213); + add_color("blanched almond", 255, 235, 205); + add_color("BlanchedAlmond", 255, 235, 205); + add_color("bisque", 255, 228, 196); + add_color("peach puff", 255, 218, 185); + add_color("PeachPuff", 255, 218, 185); + add_color("navajo white", 255, 222, 173); + add_color("NavajoWhite", 255, 222, 173); + add_color("moccasin", 255, 228, 181); + add_color("cornsilk", 255, 248, 220); + add_color("ivory", 255, 255, 240); + add_color("lemon chiffon", 255, 250, 205); + add_color("LemonChiffon", 255, 250, 205); + add_color("seashell", 255, 245, 238); + add_color("honeydew", 240, 255, 240); + add_color("mint cream", 245, 255, 250); + add_color("MintCream", 245, 255, 250); + add_color("azure", 240, 255, 255); + add_color("alice blue", 240, 248, 255); + add_color("AliceBlue", 240, 248, 255); + add_color("lavender", 230, 230, 250); + add_color("lavender blush", 255, 240, 245); + add_color("LavenderBlush", 255, 240, 245); + add_color("misty rose", 255, 228, 225); + add_color("MistyRose", 255, 228, 225); + add_color("white", 255, 255, 255); + add_color("black", 0, 0, 0); + add_color("dark slate gray", 47, 79, 79); + add_color("DarkSlateGray", 47, 79, 79); + add_color("dark slate grey", 47, 79, 79); + add_color("DarkSlateGrey", 47, 79, 79); + add_color("dim gray", 105, 105, 105); + add_color("DimGray", 105, 105, 105); + add_color("dim grey", 105, 105, 105); + add_color("DimGrey", 105, 105, 105); + add_color("slate gray", 112, 128, 144); + add_color("SlateGray", 112, 128, 144); + add_color("slate grey", 112, 128, 144); + add_color("SlateGrey", 112, 128, 144); + add_color("light slate gray", 119, 136, 153); + add_color("LightSlateGray", 119, 136, 153); + add_color("light slate grey", 119, 136, 153); + add_color("LightSlateGrey", 119, 136, 153); + add_color("gray", 190, 190, 190); + add_color("grey", 190, 190, 190); + add_color("x11 gray", 190, 190, 190); + add_color("X11Gray", 190, 190, 190); + add_color("x11 grey", 190, 190, 190); + add_color("X11Grey", 190, 190, 190); + add_color("web gray", 128, 128, 128); + add_color("WebGray", 128, 128, 128); + add_color("web grey", 128, 128, 128); + add_color("WebGrey", 128, 128, 128); + add_color("light grey", 211, 211, 211); + add_color("LightGrey", 211, 211, 211); + add_color("light gray", 211, 211, 211); + add_color("LightGray", 211, 211, 211); + add_color("midnight blue", 25, 25, 112); + add_color("MidnightBlue", 25, 25, 112); + add_color("navy", 0, 0, 128); + add_color("navy blue", 0, 0, 128); + add_color("NavyBlue", 0, 0, 128); + add_color("cornflower blue", 100, 149, 237); + add_color("CornflowerBlue", 100, 149, 237); + add_color("dark slate blue", 72, 61, 139); + add_color("DarkSlateBlue", 72, 61, 139); + add_color("slate blue", 106, 90, 205); + add_color("SlateBlue", 106, 90, 205); + add_color("medium slate blue", 123, 104, 238); + add_color("MediumSlateBlue", 123, 104, 238); + add_color("light slate blue", 132, 112, 255); + add_color("LightSlateBlue", 132, 112, 255); + add_color("medium blue", 0, 0, 205); + add_color("MediumBlue", 0, 0, 205); + add_color("royal blue", 65, 105, 225); + add_color("RoyalBlue", 65, 105, 225); + add_color("blue", 0, 0, 255); + add_color("dodger blue", 30, 144, 255); + add_color("DodgerBlue", 30, 144, 255); + add_color("deep sky blue", 0, 191, 255); + add_color("DeepSkyBlue", 0, 191, 255); + add_color("sky blue", 135, 206, 235); + add_color("SkyBlue", 135, 206, 235); + add_color("light sky blue", 135, 206, 250); + add_color("LightSkyBlue", 135, 206, 250); + add_color("steel blue", 70, 130, 180); + add_color("SteelBlue", 70, 130, 180); + add_color("light steel blue", 176, 196, 222); + add_color("LightSteelBlue", 176, 196, 222); + add_color("light blue", 173, 216, 230); + add_color("LightBlue", 173, 216, 230); + add_color("powder blue", 176, 224, 230); + add_color("PowderBlue", 176, 224, 230); + add_color("pale turquoise", 175, 238, 238); + add_color("PaleTurquoise", 175, 238, 238); + add_color("dark turquoise", 0, 206, 209); + add_color("DarkTurquoise", 0, 206, 209); + add_color("medium turquoise", 72, 209, 204); + add_color("MediumTurquoise", 72, 209, 204); + add_color("turquoise", 64, 224, 208); + add_color("cyan", 0, 255, 255); + add_color("aqua", 0, 255, 255); + add_color("light cyan", 224, 255, 255); + add_color("LightCyan", 224, 255, 255); + add_color("cadet blue", 95, 158, 160); + add_color("CadetBlue", 95, 158, 160); + add_color("medium aquamarine", 102, 205, 170); + add_color("MediumAquamarine", 102, 205, 170); + add_color("aquamarine", 127, 255, 212); + add_color("dark green", 0, 100, 0); + add_color("DarkGreen", 0, 100, 0); + add_color("dark olive green", 85, 107, 47); + add_color("DarkOliveGreen", 85, 107, 47); + add_color("dark sea green", 143, 188, 143); + add_color("DarkSeaGreen", 143, 188, 143); + add_color("sea green", 46, 139, 87); + add_color("SeaGreen", 46, 139, 87); + add_color("medium sea green", 60, 179, 113); + add_color("MediumSeaGreen", 60, 179, 113); + add_color("light sea green", 32, 178, 170); + add_color("LightSeaGreen", 32, 178, 170); + add_color("pale green", 152, 251, 152); + add_color("PaleGreen", 152, 251, 152); + add_color("spring green", 0, 255, 127); + add_color("SpringGreen", 0, 255, 127); + add_color("lawn green", 124, 252, 0); + add_color("LawnGreen", 124, 252, 0); + add_color("green", 0, 255, 0); + add_color("lime", 0, 255, 0); + add_color("x11 green", 0, 255, 0); + add_color("X11Green", 0, 255, 0); + add_color("web green", 0, 128, 0); + add_color("WebGreen", 0, 128, 0); + add_color("chartreuse", 127, 255, 0); + add_color("medium spring green", 0, 250, 154); + add_color("MediumSpringGreen", 0, 250, 154); + add_color("green yellow", 173, 255, 47); + add_color("GreenYellow", 173, 255, 47); + add_color("lime green", 50, 205, 50); + add_color("LimeGreen", 50, 205, 50); + add_color("yellow green", 154, 205, 50); + add_color("YellowGreen", 154, 205, 50); + add_color("forest green", 34, 139, 34); + add_color("ForestGreen", 34, 139, 34); + add_color("olive drab", 107, 142, 35); + add_color("OliveDrab", 107, 142, 35); + add_color("dark khaki", 189, 183, 107); + add_color("DarkKhaki", 189, 183, 107); + add_color("khaki", 240, 230, 140); + add_color("pale goldenrod", 238, 232, 170); + add_color("PaleGoldenrod", 238, 232, 170); + add_color("light goldenrod yellow", 250, 250, 210); + add_color("LightGoldenrodYellow", 250, 250, 210); + add_color("light yellow", 255, 255, 224); + add_color("LightYellow", 255, 255, 224); + add_color("yellow", 255, 255, 0); + add_color("gold", 255, 215, 0); + add_color("light goldenrod", 238, 221, 130); + add_color("LightGoldenrod", 238, 221, 130); + add_color("goldenrod", 218, 165, 32); + add_color("dark goldenrod", 184, 134, 11); + add_color("DarkGoldenrod", 184, 134, 11); + add_color("rosy brown", 188, 143, 143); + add_color("RosyBrown", 188, 143, 143); + add_color("indian red", 205, 92, 92); + add_color("IndianRed", 205, 92, 92); + add_color("saddle brown", 139, 69, 19); + add_color("SaddleBrown", 139, 69, 19); + add_color("sienna", 160, 82, 45); + add_color("peru", 205, 133, 63); + add_color("burlywood", 222, 184, 135); + add_color("beige", 245, 245, 220); + add_color("wheat", 245, 222, 179); + add_color("sandy brown", 244, 164, 96); + add_color("SandyBrown", 244, 164, 96); + add_color("tan", 210, 180, 140); + add_color("chocolate", 210, 105, 30); + add_color("firebrick", 178, 34, 34); + add_color("brown", 165, 42, 42); + add_color("dark salmon", 233, 150, 122); + add_color("DarkSalmon", 233, 150, 122); + add_color("salmon", 250, 128, 114); + add_color("light salmon", 255, 160, 122); + add_color("LightSalmon", 255, 160, 122); + add_color("orange", 255, 165, 0); + add_color("dark orange", 255, 140, 0); + add_color("DarkOrange", 255, 140, 0); + add_color("coral", 255, 127, 80); + add_color("light coral", 240, 128, 128); + add_color("LightCoral", 240, 128, 128); + add_color("tomato", 255, 99, 71); + add_color("orange red", 255, 69, 0); + add_color("OrangeRed", 255, 69, 0); + add_color("red", 255, 0, 0); + add_color("hot pink", 255, 105, 180); + add_color("HotPink", 255, 105, 180); + add_color("deep pink", 255, 20, 147); + add_color("DeepPink", 255, 20, 147); + add_color("pink", 255, 192, 203); + add_color("light pink", 255, 182, 193); + add_color("LightPink", 255, 182, 193); + add_color("pale violet red", 219, 112, 147); + add_color("PaleVioletRed", 219, 112, 147); + add_color("maroon", 176, 48, 96); + add_color("x11 maroon", 176, 48, 96); + add_color("X11Maroon", 176, 48, 96); + add_color("web maroon", 128, 0, 0); + add_color("WebMaroon", 128, 0, 0); + add_color("medium violet red", 199, 21, 133); + add_color("MediumVioletRed", 199, 21, 133); + add_color("violet red", 208, 32, 144); + add_color("VioletRed", 208, 32, 144); + add_color("magenta", 255, 0, 255); + add_color("fuchsia", 255, 0, 255); + add_color("violet", 238, 130, 238); + add_color("plum", 221, 160, 221); + add_color("orchid", 218, 112, 214); + add_color("medium orchid", 186, 85, 211); + add_color("MediumOrchid", 186, 85, 211); + add_color("dark orchid", 153, 50, 204); + add_color("DarkOrchid", 153, 50, 204); + add_color("dark violet", 148, 0, 211); + add_color("DarkViolet", 148, 0, 211); + add_color("blue violet", 138, 43, 226); + add_color("BlueViolet", 138, 43, 226); + add_color("purple", 160, 32, 240); + add_color("x11 purple", 160, 32, 240); + add_color("X11Purple", 160, 32, 240); + add_color("web purple", 128, 0, 128); + add_color("WebPurple", 128, 0, 128); + add_color("medium purple", 147, 112, 219); + add_color("MediumPurple", 147, 112, 219); + add_color("thistle", 216, 191, 216); + add_color("snow1", 255, 250, 250); + add_color("snow2", 238, 233, 233); + add_color("snow3", 205, 201, 201); + add_color("snow4", 139, 137, 137); + add_color("seashell1", 255, 245, 238); + add_color("seashell2", 238, 229, 222); + add_color("seashell3", 205, 197, 191); + add_color("seashell4", 139, 134, 130); + add_color("AntiqueWhite1", 255, 239, 219); + add_color("AntiqueWhite2", 238, 223, 204); + add_color("AntiqueWhite3", 205, 192, 176); + add_color("AntiqueWhite4", 139, 131, 120); + add_color("bisque1", 255, 228, 196); + add_color("bisque2", 238, 213, 183); + add_color("bisque3", 205, 183, 158); + add_color("bisque4", 139, 125, 107); + add_color("PeachPuff1", 255, 218, 185); + add_color("PeachPuff2", 238, 203, 173); + add_color("PeachPuff3", 205, 175, 149); + add_color("PeachPuff4", 139, 119, 101); + add_color("NavajoWhite1", 255, 222, 173); + add_color("NavajoWhite2", 238, 207, 161); + add_color("NavajoWhite3", 205, 179, 139); + add_color("NavajoWhite4", 139, 121, 94); + add_color("LemonChiffon1", 255, 250, 205); + add_color("LemonChiffon2", 238, 233, 191); + add_color("LemonChiffon3", 205, 201, 165); + add_color("LemonChiffon4", 139, 137, 112); + add_color("cornsilk1", 255, 248, 220); + add_color("cornsilk2", 238, 232, 205); + add_color("cornsilk3", 205, 200, 177); + add_color("cornsilk4", 139, 136, 120); + add_color("ivory1", 255, 255, 240); + add_color("ivory2", 238, 238, 224); + add_color("ivory3", 205, 205, 193); + add_color("ivory4", 139, 139, 131); + add_color("honeydew1", 240, 255, 240); + add_color("honeydew2", 224, 238, 224); + add_color("honeydew3", 193, 205, 193); + add_color("honeydew4", 131, 139, 131); + add_color("LavenderBlush1", 255, 240, 245); + add_color("LavenderBlush2", 238, 224, 229); + add_color("LavenderBlush3", 205, 193, 197); + add_color("LavenderBlush4", 139, 131, 134); + add_color("MistyRose1", 255, 228, 225); + add_color("MistyRose2", 238, 213, 210); + add_color("MistyRose3", 205, 183, 181); + add_color("MistyRose4", 139, 125, 123); + add_color("azure1", 240, 255, 255); + add_color("azure2", 224, 238, 238); + add_color("azure3", 193, 205, 205); + add_color("azure4", 131, 139, 139); + add_color("SlateBlue1", 131, 111, 255); + add_color("SlateBlue2", 122, 103, 238); + add_color("SlateBlue3", 105, 89, 205); + add_color("SlateBlue4", 71, 60, 139); + add_color("RoyalBlue1", 72, 118, 255); + add_color("RoyalBlue2", 67, 110, 238); + add_color("RoyalBlue3", 58, 95, 205); + add_color("RoyalBlue4", 39, 64, 139); + add_color("blue1", 0, 0, 255); + add_color("blue2", 0, 0, 238); + add_color("blue3", 0, 0, 205); + add_color("blue4", 0, 0, 139); + add_color("DodgerBlue1", 30, 144, 255); + add_color("DodgerBlue2", 28, 134, 238); + add_color("DodgerBlue3", 24, 116, 205); + add_color("DodgerBlue4", 16, 78, 139); + add_color("SteelBlue1", 99, 184, 255); + add_color("SteelBlue2", 92, 172, 238); + add_color("SteelBlue3", 79, 148, 205); + add_color("SteelBlue4", 54, 100, 139); + add_color("DeepSkyBlue1", 0, 191, 255); + add_color("DeepSkyBlue2", 0, 178, 238); + add_color("DeepSkyBlue3", 0, 154, 205); + add_color("DeepSkyBlue4", 0, 104, 139); + add_color("SkyBlue1", 135, 206, 255); + add_color("SkyBlue2", 126, 192, 238); + add_color("SkyBlue3", 108, 166, 205); + add_color("SkyBlue4", 74, 112, 139); + add_color("LightSkyBlue1", 176, 226, 255); + add_color("LightSkyBlue2", 164, 211, 238); + add_color("LightSkyBlue3", 141, 182, 205); + add_color("LightSkyBlue4", 96, 123, 139); + add_color("SlateGray1", 198, 226, 255); + add_color("SlateGray2", 185, 211, 238); + add_color("SlateGray3", 159, 182, 205); + add_color("SlateGray4", 108, 123, 139); + add_color("LightSteelBlue1", 202, 225, 255); + add_color("LightSteelBlue2", 188, 210, 238); + add_color("LightSteelBlue3", 162, 181, 205); + add_color("LightSteelBlue4", 110, 123, 139); + add_color("LightBlue1", 191, 239, 255); + add_color("LightBlue2", 178, 223, 238); + add_color("LightBlue3", 154, 192, 205); + add_color("LightBlue4", 104, 131, 139); + add_color("LightCyan1", 224, 255, 255); + add_color("LightCyan2", 209, 238, 238); + add_color("LightCyan3", 180, 205, 205); + add_color("LightCyan4", 122, 139, 139); + add_color("PaleTurquoise1", 187, 255, 255); + add_color("PaleTurquoise2", 174, 238, 238); + add_color("PaleTurquoise3", 150, 205, 205); + add_color("PaleTurquoise4", 102, 139, 139); + add_color("CadetBlue1", 152, 245, 255); + add_color("CadetBlue2", 142, 229, 238); + add_color("CadetBlue3", 122, 197, 205); + add_color("CadetBlue4", 83, 134, 139); + add_color("turquoise1", 0, 245, 255); + add_color("turquoise2", 0, 229, 238); + add_color("turquoise3", 0, 197, 205); + add_color("turquoise4", 0, 134, 139); + add_color("cyan1", 0, 255, 255); + add_color("cyan2", 0, 238, 238); + add_color("cyan3", 0, 205, 205); + add_color("cyan4", 0, 139, 139); + add_color("DarkSlateGray1", 151, 255, 255); + add_color("DarkSlateGray2", 141, 238, 238); + add_color("DarkSlateGray3", 121, 205, 205); + add_color("DarkSlateGray4", 82, 139, 139); + add_color("aquamarine1", 127, 255, 212); + add_color("aquamarine2", 118, 238, 198); + add_color("aquamarine3", 102, 205, 170); + add_color("aquamarine4", 69, 139, 116); + add_color("DarkSeaGreen1", 193, 255, 193); + add_color("DarkSeaGreen2", 180, 238, 180); + add_color("DarkSeaGreen3", 155, 205, 155); + add_color("DarkSeaGreen4", 105, 139, 105); + add_color("SeaGreen1", 84, 255, 159); + add_color("SeaGreen2", 78, 238, 148); + add_color("SeaGreen3", 67, 205, 128); + add_color("SeaGreen4", 46, 139, 87); + add_color("PaleGreen1", 154, 255, 154); + add_color("PaleGreen2", 144, 238, 144); + add_color("PaleGreen3", 124, 205, 124); + add_color("PaleGreen4", 84, 139, 84); + add_color("SpringGreen1", 0, 255, 127); + add_color("SpringGreen2", 0, 238, 118); + add_color("SpringGreen3", 0, 205, 102); + add_color("SpringGreen4", 0, 139, 69); + add_color("green1", 0, 255, 0); + add_color("green2", 0, 238, 0); + add_color("green3", 0, 205, 0); + add_color("green4", 0, 139, 0); + add_color("chartreuse1", 127, 255, 0); + add_color("chartreuse2", 118, 238, 0); + add_color("chartreuse3", 102, 205, 0); + add_color("chartreuse4", 69, 139, 0); + add_color("OliveDrab1", 192, 255, 62); + add_color("OliveDrab2", 179, 238, 58); + add_color("OliveDrab3", 154, 205, 50); + add_color("OliveDrab4", 105, 139, 34); + add_color("DarkOliveGreen1", 202, 255, 112); + add_color("DarkOliveGreen2", 188, 238, 104); + add_color("DarkOliveGreen3", 162, 205, 90); + add_color("DarkOliveGreen4", 110, 139, 61); + add_color("khaki1", 255, 246, 143); + add_color("khaki2", 238, 230, 133); + add_color("khaki3", 205, 198, 115); + add_color("khaki4", 139, 134, 78); + add_color("LightGoldenrod1", 255, 236, 139); + add_color("LightGoldenrod2", 238, 220, 130); + add_color("LightGoldenrod3", 205, 190, 112); + add_color("LightGoldenrod4", 139, 129, 76); + add_color("LightYellow1", 255, 255, 224); + add_color("LightYellow2", 238, 238, 209); + add_color("LightYellow3", 205, 205, 180); + add_color("LightYellow4", 139, 139, 122); + add_color("yellow1", 255, 255, 0); + add_color("yellow2", 238, 238, 0); + add_color("yellow3", 205, 205, 0); + add_color("yellow4", 139, 139, 0); + add_color("gold1", 255, 215, 0); + add_color("gold2", 238, 201, 0); + add_color("gold3", 205, 173, 0); + add_color("gold4", 139, 117, 0); + add_color("goldenrod1", 255, 193, 37); + add_color("goldenrod2", 238, 180, 34); + add_color("goldenrod3", 205, 155, 29); + add_color("goldenrod4", 139, 105, 20); + add_color("DarkGoldenrod1", 255, 185, 15); + add_color("DarkGoldenrod2", 238, 173, 14); + add_color("DarkGoldenrod3", 205, 149, 12); + add_color("DarkGoldenrod4", 139, 101, 8); + add_color("RosyBrown1", 255, 193, 193); + add_color("RosyBrown2", 238, 180, 180); + add_color("RosyBrown3", 205, 155, 155); + add_color("RosyBrown4", 139, 105, 105); + add_color("IndianRed1", 255, 106, 106); + add_color("IndianRed2", 238, 99, 99); + add_color("IndianRed3", 205, 85, 85); + add_color("IndianRed4", 139, 58, 58); + add_color("sienna1", 255, 130, 71); + add_color("sienna2", 238, 121, 66); + add_color("sienna3", 205, 104, 57); + add_color("sienna4", 139, 71, 38); + add_color("burlywood1", 255, 211, 155); + add_color("burlywood2", 238, 197, 145); + add_color("burlywood3", 205, 170, 125); + add_color("burlywood4", 139, 115, 85); + add_color("wheat1", 255, 231, 186); + add_color("wheat2", 238, 216, 174); + add_color("wheat3", 205, 186, 150); + add_color("wheat4", 139, 126, 102); + add_color("tan1", 255, 165, 79); + add_color("tan2", 238, 154, 73); + add_color("tan3", 205, 133, 63); + add_color("tan4", 139, 90, 43); + add_color("chocolate1", 255, 127, 36); + add_color("chocolate2", 238, 118, 33); + add_color("chocolate3", 205, 102, 29); + add_color("chocolate4", 139, 69, 19); + add_color("firebrick1", 255, 48, 48); + add_color("firebrick2", 238, 44, 44); + add_color("firebrick3", 205, 38, 38); + add_color("firebrick4", 139, 26, 26); + add_color("brown1", 255, 64, 64); + add_color("brown2", 238, 59, 59); + add_color("brown3", 205, 51, 51); + add_color("brown4", 139, 35, 35); + add_color("salmon1", 255, 140, 105); + add_color("salmon2", 238, 130, 98); + add_color("salmon3", 205, 112, 84); + add_color("salmon4", 139, 76, 57); + add_color("LightSalmon1", 255, 160, 122); + add_color("LightSalmon2", 238, 149, 114); + add_color("LightSalmon3", 205, 129, 98); + add_color("LightSalmon4", 139, 87, 66); + add_color("orange1", 255, 165, 0); + add_color("orange2", 238, 154, 0); + add_color("orange3", 205, 133, 0); + add_color("orange4", 139, 90, 0); + add_color("DarkOrange1", 255, 127, 0); + add_color("DarkOrange2", 238, 118, 0); + add_color("DarkOrange3", 205, 102, 0); + add_color("DarkOrange4", 139, 69, 0); + add_color("coral1", 255, 114, 86); + add_color("coral2", 238, 106, 80); + add_color("coral3", 205, 91, 69); + add_color("coral4", 139, 62, 47); + add_color("tomato1", 255, 99, 71); + add_color("tomato2", 238, 92, 66); + add_color("tomato3", 205, 79, 57); + add_color("tomato4", 139, 54, 38); + add_color("OrangeRed1", 255, 69, 0); + add_color("OrangeRed2", 238, 64, 0); + add_color("OrangeRed3", 205, 55, 0); + add_color("OrangeRed4", 139, 37, 0); + add_color("red1", 255, 0, 0); + add_color("red2", 238, 0, 0); + add_color("red3", 205, 0, 0); + add_color("red4", 139, 0, 0); + add_color("DeepPink1", 255, 20, 147); + add_color("DeepPink2", 238, 18, 137); + add_color("DeepPink3", 205, 16, 118); + add_color("DeepPink4", 139, 10, 80); + add_color("HotPink1", 255, 110, 180); + add_color("HotPink2", 238, 106, 167); + add_color("HotPink3", 205, 96, 144); + add_color("HotPink4", 139, 58, 98); + add_color("pink1", 255, 181, 197); + add_color("pink2", 238, 169, 184); + add_color("pink3", 205, 145, 158); + add_color("pink4", 139, 99, 108); + add_color("LightPink1", 255, 174, 185); + add_color("LightPink2", 238, 162, 173); + add_color("LightPink3", 205, 140, 149); + add_color("LightPink4", 139, 95, 101); + add_color("PaleVioletRed1", 255, 130, 171); + add_color("PaleVioletRed2", 238, 121, 159); + add_color("PaleVioletRed3", 205, 104, 137); + add_color("PaleVioletRed4", 139, 71, 93); + add_color("maroon1", 255, 52, 179); + add_color("maroon2", 238, 48, 167); + add_color("maroon3", 205, 41, 144); + add_color("maroon4", 139, 28, 98); + add_color("VioletRed1", 255, 62, 150); + add_color("VioletRed2", 238, 58, 140); + add_color("VioletRed3", 205, 50, 120); + add_color("VioletRed4", 139, 34, 82); + add_color("magenta1", 255, 0, 255); + add_color("magenta2", 238, 0, 238); + add_color("magenta3", 205, 0, 205); + add_color("magenta4", 139, 0, 139); + add_color("orchid1", 255, 131, 250); + add_color("orchid2", 238, 122, 233); + add_color("orchid3", 205, 105, 201); + add_color("orchid4", 139, 71, 137); + add_color("plum1", 255, 187, 255); + add_color("plum2", 238, 174, 238); + add_color("plum3", 205, 150, 205); + add_color("plum4", 139, 102, 139); + add_color("MediumOrchid1", 224, 102, 255); + add_color("MediumOrchid2", 209, 95, 238); + add_color("MediumOrchid3", 180, 82, 205); + add_color("MediumOrchid4", 122, 55, 139); + add_color("DarkOrchid1", 191, 62, 255); + add_color("DarkOrchid2", 178, 58, 238); + add_color("DarkOrchid3", 154, 50, 205); + add_color("DarkOrchid4", 104, 34, 139); + add_color("purple1", 155, 48, 255); + add_color("purple2", 145, 44, 238); + add_color("purple3", 125, 38, 205); + add_color("purple4", 85, 26, 139); + add_color("MediumPurple1", 171, 130, 255); + add_color("MediumPurple2", 159, 121, 238); + add_color("MediumPurple3", 137, 104, 205); + add_color("MediumPurple4", 93, 71, 139); + add_color("thistle1", 255, 225, 255); + add_color("thistle2", 238, 210, 238); + add_color("thistle3", 205, 181, 205); + add_color("thistle4", 139, 123, 139); + add_color("gray0", 0, 0, 0); + add_color("grey0", 0, 0, 0); + add_color("gray1", 3, 3, 3); + add_color("grey1", 3, 3, 3); + add_color("gray2", 5, 5, 5); + add_color("grey2", 5, 5, 5); + add_color("gray3", 8, 8, 8); + add_color("grey3", 8, 8, 8); + add_color("gray4", 10, 10, 10); + add_color("grey4", 10, 10, 10); + add_color("gray5", 13, 13, 13); + add_color("grey5", 13, 13, 13); + add_color("gray6", 15, 15, 15); + add_color("grey6", 15, 15, 15); + add_color("gray7", 18, 18, 18); + add_color("grey7", 18, 18, 18); + add_color("gray8", 20, 20, 20); + add_color("grey8", 20, 20, 20); + add_color("gray9", 23, 23, 23); + add_color("grey9", 23, 23, 23); + add_color("gray10", 26, 26, 26); + add_color("grey10", 26, 26, 26); + add_color("gray11", 28, 28, 28); + add_color("grey11", 28, 28, 28); + add_color("gray12", 31, 31, 31); + add_color("grey12", 31, 31, 31); + add_color("gray13", 33, 33, 33); + add_color("grey13", 33, 33, 33); + add_color("gray14", 36, 36, 36); + add_color("grey14", 36, 36, 36); + add_color("gray15", 38, 38, 38); + add_color("grey15", 38, 38, 38); + add_color("gray16", 41, 41, 41); + add_color("grey16", 41, 41, 41); + add_color("gray17", 43, 43, 43); + add_color("grey17", 43, 43, 43); + add_color("gray18", 46, 46, 46); + add_color("grey18", 46, 46, 46); + add_color("gray19", 48, 48, 48); + add_color("grey19", 48, 48, 48); + add_color("gray20", 51, 51, 51); + add_color("grey20", 51, 51, 51); + add_color("gray21", 54, 54, 54); + add_color("grey21", 54, 54, 54); + add_color("gray22", 56, 56, 56); + add_color("grey22", 56, 56, 56); + add_color("gray23", 59, 59, 59); + add_color("grey23", 59, 59, 59); + add_color("gray24", 61, 61, 61); + add_color("grey24", 61, 61, 61); + add_color("gray25", 64, 64, 64); + add_color("grey25", 64, 64, 64); + add_color("gray26", 66, 66, 66); + add_color("grey26", 66, 66, 66); + add_color("gray27", 69, 69, 69); + add_color("grey27", 69, 69, 69); + add_color("gray28", 71, 71, 71); + add_color("grey28", 71, 71, 71); + add_color("gray29", 74, 74, 74); + add_color("grey29", 74, 74, 74); + add_color("gray30", 77, 77, 77); + add_color("grey30", 77, 77, 77); + add_color("gray31", 79, 79, 79); + add_color("grey31", 79, 79, 79); + add_color("gray32", 82, 82, 82); + add_color("grey32", 82, 82, 82); + add_color("gray33", 84, 84, 84); + add_color("grey33", 84, 84, 84); + add_color("gray34", 87, 87, 87); + add_color("grey34", 87, 87, 87); + add_color("gray35", 89, 89, 89); + add_color("grey35", 89, 89, 89); + add_color("gray36", 92, 92, 92); + add_color("grey36", 92, 92, 92); + add_color("gray37", 94, 94, 94); + add_color("grey37", 94, 94, 94); + add_color("gray38", 97, 97, 97); + add_color("grey38", 97, 97, 97); + add_color("gray39", 99, 99, 99); + add_color("grey39", 99, 99, 99); + add_color("gray40", 102, 102, 102); + add_color("grey40", 102, 102, 102); + add_color("gray41", 105, 105, 105); + add_color("grey41", 105, 105, 105); + add_color("gray42", 107, 107, 107); + add_color("grey42", 107, 107, 107); + add_color("gray43", 110, 110, 110); + add_color("grey43", 110, 110, 110); + add_color("gray44", 112, 112, 112); + add_color("grey44", 112, 112, 112); + add_color("gray45", 115, 115, 115); + add_color("grey45", 115, 115, 115); + add_color("gray46", 117, 117, 117); + add_color("grey46", 117, 117, 117); + add_color("gray47", 120, 120, 120); + add_color("grey47", 120, 120, 120); + add_color("gray48", 122, 122, 122); + add_color("grey48", 122, 122, 122); + add_color("gray49", 125, 125, 125); + add_color("grey49", 125, 125, 125); + add_color("gray50", 127, 127, 127); + add_color("grey50", 127, 127, 127); + add_color("gray51", 130, 130, 130); + add_color("grey51", 130, 130, 130); + add_color("gray52", 133, 133, 133); + add_color("grey52", 133, 133, 133); + add_color("gray53", 135, 135, 135); + add_color("grey53", 135, 135, 135); + add_color("gray54", 138, 138, 138); + add_color("grey54", 138, 138, 138); + add_color("gray55", 140, 140, 140); + add_color("grey55", 140, 140, 140); + add_color("gray56", 143, 143, 143); + add_color("grey56", 143, 143, 143); + add_color("gray57", 145, 145, 145); + add_color("grey57", 145, 145, 145); + add_color("gray58", 148, 148, 148); + add_color("grey58", 148, 148, 148); + add_color("gray59", 150, 150, 150); + add_color("grey59", 150, 150, 150); + add_color("gray60", 153, 153, 153); + add_color("grey60", 153, 153, 153); + add_color("gray61", 156, 156, 156); + add_color("grey61", 156, 156, 156); + add_color("gray62", 158, 158, 158); + add_color("grey62", 158, 158, 158); + add_color("gray63", 161, 161, 161); + add_color("grey63", 161, 161, 161); + add_color("gray64", 163, 163, 163); + add_color("grey64", 163, 163, 163); + add_color("gray65", 166, 166, 166); + add_color("grey65", 166, 166, 166); + add_color("gray66", 168, 168, 168); + add_color("grey66", 168, 168, 168); + add_color("gray67", 171, 171, 171); + add_color("grey67", 171, 171, 171); + add_color("gray68", 173, 173, 173); + add_color("grey68", 173, 173, 173); + add_color("gray69", 176, 176, 176); + add_color("grey69", 176, 176, 176); + add_color("gray70", 179, 179, 179); + add_color("grey70", 179, 179, 179); + add_color("gray71", 181, 181, 181); + add_color("grey71", 181, 181, 181); + add_color("gray72", 184, 184, 184); + add_color("grey72", 184, 184, 184); + add_color("gray73", 186, 186, 186); + add_color("grey73", 186, 186, 186); + add_color("gray74", 189, 189, 189); + add_color("grey74", 189, 189, 189); + add_color("gray75", 191, 191, 191); + add_color("grey75", 191, 191, 191); + add_color("gray76", 194, 194, 194); + add_color("grey76", 194, 194, 194); + add_color("gray77", 196, 196, 196); + add_color("grey77", 196, 196, 196); + add_color("gray78", 199, 199, 199); + add_color("grey78", 199, 199, 199); + add_color("gray79", 201, 201, 201); + add_color("grey79", 201, 201, 201); + add_color("gray80", 204, 204, 204); + add_color("grey80", 204, 204, 204); + add_color("gray81", 207, 207, 207); + add_color("grey81", 207, 207, 207); + add_color("gray82", 209, 209, 209); + add_color("grey82", 209, 209, 209); + add_color("gray83", 212, 212, 212); + add_color("grey83", 212, 212, 212); + add_color("gray84", 214, 214, 214); + add_color("grey84", 214, 214, 214); + add_color("gray85", 217, 217, 217); + add_color("grey85", 217, 217, 217); + add_color("gray86", 219, 219, 219); + add_color("grey86", 219, 219, 219); + add_color("gray87", 222, 222, 222); + add_color("grey87", 222, 222, 222); + add_color("gray88", 224, 224, 224); + add_color("grey88", 224, 224, 224); + add_color("gray89", 227, 227, 227); + add_color("grey89", 227, 227, 227); + add_color("gray90", 229, 229, 229); + add_color("grey90", 229, 229, 229); + add_color("gray91", 232, 232, 232); + add_color("grey91", 232, 232, 232); + add_color("gray92", 235, 235, 235); + add_color("grey92", 235, 235, 235); + add_color("gray93", 237, 237, 237); + add_color("grey93", 237, 237, 237); + add_color("gray94", 240, 240, 240); + add_color("grey94", 240, 240, 240); + add_color("gray95", 242, 242, 242); + add_color("grey95", 242, 242, 242); + add_color("gray96", 245, 245, 245); + add_color("grey96", 245, 245, 245); + add_color("gray97", 247, 247, 247); + add_color("grey97", 247, 247, 247); + add_color("gray98", 250, 250, 250); + add_color("grey98", 250, 250, 250); + add_color("gray99", 252, 252, 252); + add_color("grey99", 252, 252, 252); + add_color("gray100", 255, 255, 255); + add_color("grey100", 255, 255, 255); + add_color("dark grey", 169, 169, 169); + add_color("DarkGrey", 169, 169, 169); + add_color("dark gray", 169, 169, 169); + add_color("DarkGray", 169, 169, 169); + add_color("dark blue", 0, 0, 139); + add_color("DarkBlue", 0, 0, 139); + add_color("dark cyan", 0, 139, 139); + add_color("DarkCyan", 0, 139, 139); + add_color("dark magenta", 139, 0, 139); + add_color("DarkMagenta", 139, 0, 139); + add_color("dark red", 139, 0, 0); + add_color("DarkRed", 139, 0, 0); + add_color("light green", 144, 238, 144); + add_color("LightGreen", 144, 238, 144); + add_color("crimson", 220, 20, 60); + add_color("indigo", 75, 0, 130); + add_color("olive", 128, 128, 0); + add_color("rebecca purple", 102, 51, 153); + add_color("RebeccaPurple", 102, 51, 153); + add_color("silver", 192, 192, 192); + add_color("teal", 0, 128, 128); +} diff --git a/widget/milsko/milskosrc/src/core.c b/widget/milsko/milskosrc/src/core.c new file mode 100644 index 0000000000..7059840f62 --- /dev/null +++ b/widget/milsko/milskosrc/src/core.c @@ -0,0 +1,1211 @@ +#include + +#include "../external/stb_ds.h" + +#ifdef USE_COCOA +#define PERIODIC +#endif + +#define RESIZE_ON_TICK + +#define DRAW(handle) \ + { \ + MwLLBeginDraw(handle->lowlevel); \ +\ + handle->bgcolor = NULL; \ + MwDispatch(handle, draw); \ + if(handle->draw_inject != NULL) handle->draw_inject(handle); \ + MwDispatchUserHandler(handle, MwNdrawHandler, NULL); \ +\ + MwLLEndDraw(handle->lowlevel); \ + } + +#define RESIZE(handle) \ + { \ + int RESIZE_i; \ + MwDispatchUserHandler(handle, MwNresizeHandler, NULL); \ + for(RESIZE_i = 0; RESIZE_i < arrlen(handle->children); RESIZE_i++) { \ + MwDispatch(handle->children[RESIZE_i], parent_resize); \ + } \ + MwDispatch(handle, resize); \ + } + +static void MWAPI MwVaListApply_Internal(MwWidget handle, va_list va, int only_early); +static MwWidget MWAPI MwCreateWidget_Internal(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height, int do_prop, va_list prop); + +static void lldrawhandler(MwLL handle, void* data) { + MwWidget h = (MwWidget)handle->common.user; +#ifdef PERIODIC + MwWidget top; +#endif + + (void)data; + +#ifdef PERIODIC + top = h; + while(top != NULL) { + if(top->top_step) { + break; + } + + top = top->parent; + } + + if(top == NULL) { + DRAW(h); /* fallback */ + } else { + int i; + + for(i = 0; i < arrlen(top->draw_queue); i++) { + if(top->draw_queue[i] == h) break; + } + if(i == arrlen(top->draw_queue)) arrput(top->draw_queue, h); + } +#else + DRAW(h); +#endif +} + +static void lluphandler(MwLL handle, void* data) { + MwWidget h = (MwWidget)handle->common.user; + MwMouse* p = data; + if(MwGetInteger(h, MwNdisabled) == 1) return; + + if(p->button == MwMOUSE_LEFT) h->pressed = 0; + h->mouse_point.x = p->point.x; + h->mouse_point.y = p->point.y; + + if(p->button == MwMOUSE_LEFT) MwDispatch(h, click); + MwDispatch3(h, mouse_up, data); + MwDispatchUserHandler(h, MwNmouseUpHandler, data); +} + +static void lldownhandler(MwLL handle, void* data) { + MwWidget h = (MwWidget)handle->common.user; + MwMouse* p = data; + if(MwGetInteger(h, MwNdisabled) == 1) return; + + if(p->button == MwMOUSE_LEFT) h->pressed = 1; + h->mouse_point.x = p->point.x; + h->mouse_point.y = p->point.y; + + MwDispatch3(h, mouse_down, data); + MwDispatchUserHandler(h, MwNmouseDownHandler, data); +} + +static void llresizehandler(MwLL handle, void* data) { + MwWidget h = (MwWidget)handle->common.user; +#ifdef RESIZE_ON_TICK + MwWidget top; +#endif + + (void)data; + +#ifdef RESIZE_ON_TICK + top = h; + while(top != NULL) { + if(top->top_step) { + break; + } + + top = top->parent; + } + + if(top == NULL) { + RESIZE(h); /* fallback */ + } else { + int i; + + for(i = 0; i < arrlen(top->resize_queue); i++) { + if(top->resize_queue[i] == h) break; + } + if(i == arrlen(top->resize_queue)) arrput(top->resize_queue, h); + } +#else + RESIZE(h); +#endif +} + +static void llclosehandler(MwLL handle, void* data) { + MwWidget h = (MwWidget)handle->common.user; + int n; + + (void)data; + + if((n = MwGetInteger(h, MwNmain)) != MwDEFAULT && n) { + while(h != NULL) { + h->close = 1; + MwDispatchUserHandler(h, MwNcloseHandler, NULL); + h = h->parent; + } + } else { + h->close = 1; + MwDispatchUserHandler(h, MwNcloseHandler, NULL); + } +} + +static void llmovehandler(MwLL handle, void* data) { + MwWidget h = (MwWidget)handle->common.user; + MwPoint* p = data; + h->mouse_point.x = p->x; + h->mouse_point.y = p->y; + + MwDispatch(h, mouse_move); + MwDispatchUserHandler(h, MwNmouseMoveHandler, data); +} + +static void llkeyhandler(MwLL handle, void* data) { + MwWidget h = (MwWidget)handle->common.user; + int key = *(int*)data; + if(MwGetInteger(h, MwNdisabled) == 1) return; + + MwDispatch3(h, key, key); + MwDispatchUserHandler(h, MwNkeyHandler, data); +} + +static void llkeyrelhandler(MwLL handle, void* data) { + MwWidget h = (MwWidget)handle->common.user; + if(MwGetInteger(h, MwNdisabled) == 1) return; + + MwDispatchUserHandler(h, MwNkeyReleaseHandler, data); +} + +static void llfocusinhandler(MwLL handle, void* data) { + MwWidget h = (MwWidget)handle->common.user; + if(MwGetInteger(h, MwNdisabled) == 1) return; + + MwDispatchUserHandler(h, MwNfocusInHandler, data); +} + +static void llfocusouthandler(MwLL handle, void* data) { + MwWidget h = (MwWidget)handle->common.user; + if(MwGetInteger(h, MwNdisabled) == 1) return; + + MwDispatchUserHandler(h, MwNfocusOutHandler, data); +} + +static void llclipboardhandler(MwLL handle, void* data) { + MwWidget h = (MwWidget)handle->common.user; + if(MwGetInteger(h, MwNdisabled) == 1) return; + + MwDispatch3(h, clipboard, data); + MwDispatchUserHandler(h, MwNclipboardHandler, data); +} + +/* if both of them are true + * 1. widget class is not NULL + * 2. parent is NULL + * or parent's widget class is NULL + * + * most likely this widget is first *visible* widget + * + * this macro is not used anywhere else - we could expose it if we have to + * + * (nishi) + */ +#define IsFirstVisible(handle) ((handle)->widget_class != NULL && ((handle)->parent == NULL || (handle)->parent->widget_class == NULL)) + +static void lldarkthemehandler(MwLL handle, void* data) { + MwWidget h = (MwWidget)handle->common.user; + int* ptr = data; + int s; + + if(h->widget_class == MwWindowClass && (shgeti(h->integer, MwNdarkTheme) == -1 || ((s = MwGetInteger(h, MwNdarkThemeAutomatic)) != MwDEFAULT && s))) { + if(MwGetInteger(h, MwNmodernLook)) { + MwVaApply(h, + MwNdarkTheme, *ptr, + MwNdarkThemeAutomatic, 1, + NULL); + + MwDispatchUserHandler(h, MwNdarkThemeHandler, data); + } + } +} + +static MwWidget MwCreateWidget_Internal(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height, int do_prop, va_list prop) { + MwWidget h = malloc(sizeof(*h)); + + if(name) + h->name = MwStringDuplicate(name); + else + h->name = NULL; + + h->parent = parent; + h->children = NULL; + + if(widget_class != NULL) { + if((h->lowlevel = MwLLCreate(parent == NULL ? NULL : parent->lowlevel, x, y, width, height)) == NULL) { + if(h->name) { + free(h->name); + } + free(h); + return NULL; + } + } else { + h->lowlevel = NULL; + } + h->widget_class = widget_class; + h->pressed = 0; + h->close = 0; + h->destroy_queue = NULL; + h->prop_event = 1; + h->draw_inject = NULL; + h->destroy_inject = NULL; + h->tick_list = NULL; + h->destroyed = 0; + h->bgcolor = NULL; + + h->berserk = 0; + h->last_tick = MwTimeGetTick(); + + h->internal = NULL; + h->opaque = NULL; + h->user = NULL; + + h->top_step = 0; + h->draw_queue = NULL; + h->resize_queue = NULL; + h->monitored_entries = NULL; + + if(parent == NULL) arrput(h->tick_list, h); + + if(parent == NULL) h->top_step = 1; + + if(h->lowlevel != NULL) { + h->lowlevel->common.user = h; + h->lowlevel->common.handler->draw = lldrawhandler; + h->lowlevel->common.handler->up = lluphandler; + h->lowlevel->common.handler->down = lldownhandler; + h->lowlevel->common.handler->resize = llresizehandler; + h->lowlevel->common.handler->close = llclosehandler; + h->lowlevel->common.handler->move = llmovehandler; + h->lowlevel->common.handler->key = llkeyhandler; + h->lowlevel->common.handler->key_released = llkeyrelhandler; + h->lowlevel->common.handler->focus_in = llfocusinhandler; + h->lowlevel->common.handler->focus_out = llfocusouthandler; + h->lowlevel->common.handler->clipboard = llclipboardhandler; + h->lowlevel->common.handler->dark_theme = lldarkthemehandler; + } + + if(parent != NULL) arrput(parent->children, h); + + sh_new_strdup(h->text); + sh_new_strdup(h->integer); + sh_new_strdup(h->handler); + sh_new_strdup(h->data); + + shdefault(h->integer, MwDEFAULT); + shdefault(h->text, NULL); + shdefault(h->handler, NULL); + shdefault(h->data, NULL); + + if(do_prop) MwVaListApply_Internal(h, prop, 1); + + h->prop_event = 0; + if(MwDispatch2(h, create) != 0) { + h->widget_class = NULL; + MwDestroyWidget(h); + return NULL; + } + if(h->widget_class == NULL) { + MwSetDefault(h); + } + h->prop_event = 1; + + if(h->widget_class != NULL && h->widget_class->tick != NULL) { + MwAddTickList(h); + } + +#if defined(USE_STB_TRUETYPE) || defined(USE_FREETYPE2) || defined(USE_GDI_TEXT) + if(IsFirstVisible(h)) { + font_setup: + h->root_font = MwFontLoad(MwTTFData, MwTTFDataSize); + h->root_boldfont = MwFontLoad(MwBoldTTFData, MwBoldTTFDataSize); + h->root_monofont = MwFontLoad(MwMonospaceTTFData, MwMonospaceTTFDataSize); + h->root_boldmonofont = MwFontLoad(MwBoldMonospaceTTFData, MwBoldMonospaceTTFDataSize); + if(!h->root_font) { +#ifdef USE_STB_TRUETYPE + MwFL_STBTTSetup(); + goto font_setup; +#endif + } + } else +#endif + { + h->root_font = NULL; + h->root_boldfont = NULL; + h->root_monofont = NULL; + h->root_boldmonofont = NULL; + } + + if(h->parent != NULL) MwDispatch4(h->parent, children_update, h, 1); + + return h; +} + +MwWidget MwCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height) { + va_list dummy; + + memset(&dummy, 0, sizeof(dummy)); + + return MwCreateWidget_Internal(widget_class, name, parent, x, y, width, height, 0, dummy); +} + +MwWidget MwVaCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height, ...) { + MwWidget h; + va_list va; + + va_start(va, height); + h = MwVaListCreateWidget(widget_class, name, parent, x, y, width, height, va); + va_end(va); + + return h; +} + +MwWidget MwVaListCreateWidget(MwClass widget_class, const char* name, MwWidget parent, int x, int y, unsigned int width, unsigned int height, va_list va) { + MwWidget h; + va_list va2; + +#ifdef va_copy + va_copy(va2, va); +#else + va2 = va; +#endif + + h = MwCreateWidget_Internal(widget_class, name, parent, x, y, width, height, 1, va); + MwVaListApply(h, va2); + + va_end(va2); + + return h; +} + +void MwFreeWidget(MwWidget handle) { + int i; + MwWidget root = handle; + MwWidget w; + + w = handle; + while(w != NULL) { + if(w->top_step) break; + w = w->parent; + } + + if(w != NULL) { + for(i = 0; i < arrlen(w->draw_queue); i++) { + if(w->draw_queue[i] == handle) { + arrdel(w->draw_queue, i); + i--; + } + } + } + + handle->destroyed = 0; + if(handle->destroy_inject != NULL) handle->destroy_inject(handle); + MwDispatch(handle, destroy); + + for(i = 0; i < arrlen(handle->children); i++) { + MwFreeWidget(handle->children[i]); + } + arrfree(handle->children); + + while(root->parent != NULL) root = root->parent; + for(i = 0; i < arrlen(root->tick_list); i++) { + if(handle == root->tick_list[i]) { + arrdel(root->tick_list, i); + i--; + } + } + + if(handle->name) free(handle->name); + + if(handle->lowlevel != NULL) MwLLDestroy(handle->lowlevel); + + shfree(handle->integer); + + for(i = 0; i < shlen(handle->text); i++) { + free(handle->text[i].value); + handle->text[i].value = NULL; + } + shfree(handle->text); + for(i = 0; i < shlen(handle->handler); i++) { + arrfree(handle->handler[i].value); + } + shfree(handle->handler); + shfree(handle->data); + + arrfree(handle->destroy_queue); + arrfree(handle->tick_list); + + arrfree(handle->draw_queue); + arrfree(handle->resize_queue); + + if(handle->root_font != NULL) MwFontFree(handle->root_font); + if(handle->root_boldfont != NULL) MwFontFree(handle->root_boldfont); + if(handle->root_monofont != NULL) MwFontFree(handle->root_monofont); + if(handle->root_boldmonofont != NULL) MwFontFree(handle->root_boldmonofont); + + free(handle); +} + +static void destroy_children(MwWidget handle) { + int i; + for(i = 0; i < arrlen(handle->children); i++) { + destroy_children(handle->children[i]); + } + handle->destroyed = 1; +} + +void MwDestroyWidget(MwWidget handle) { + if(handle->destroyed) return; + + if(handle->parent != NULL) { + int i; + for(i = 0; i < arrlen(handle->parent->destroy_queue); i++) { + if(handle->parent->destroy_queue[i] == handle) break; + } + if(i == arrlen(handle->parent->destroy_queue)) { + arrput(handle->parent->destroy_queue, handle); + } + + MwDispatch4(handle->parent, children_update, handle, 0); + } + destroy_children(handle); + handle->destroyed = 1; +} + +void MwVaWidgetExecute(MwWidget handle, const char* func_name, void* out, ...) { + va_list args; + va_start(args, out); + MwVaListWidgetExecute(handle, func_name, out, args); + va_end(args); +} + +void MwVaListWidgetExecute(MwWidget handle, const char* func_name, void* out, va_list va) { + if(handle->widget_class->execute != NULL) { + handle->widget_class->execute(handle, func_name, out, va); + } +} + +static void clean_destroy_queue(MwWidget handle) { + int i, j; + for(i = 0; i < arrlen(handle->destroy_queue); i++) { + MwWidget w = handle->destroy_queue[i]; + + MwFreeWidget(w); + } + for(i = 0; i < arrlen(handle->destroy_queue); i++) { + for(j = 0; j < arrlen(handle->children); j++) { + if(handle->children[j] == handle->destroy_queue[i]) { + arrdel(handle->children, j); + break; + } + } + } + arrfree(handle->destroy_queue); +} + +static void MwAfterStep(MwWidget handle) { + int i; + +#ifdef PERIODIC + if(handle->top_step) { + for(i = 0; i < arrlen(handle->draw_queue); i++) { + DRAW(handle->draw_queue[i]); + } + + arrfree(handle->draw_queue); + } +#endif + +#ifdef RESIZE_ON_TICK + if(handle->top_step) { + for(i = 0; i < arrlen(handle->resize_queue); i++) { + RESIZE(handle->resize_queue[i]); + } + + arrfree(handle->resize_queue); + } +#endif + + if(arrlen(handle->tick_list) > 0 && (MwTimeGetTick() - handle->last_tick) >= (MwGetInteger(handle, MwNwaitMS) == MwDEFAULT ? MwWaitMS : MwGetInteger(handle, MwNwaitMS))) { + for(i = 0; i < arrlen(handle->tick_list); i++) { + MwDispatch(handle->tick_list[i], tick); + MwDispatchUserHandler(handle->tick_list[i], MwNtickHandler, NULL); + } + + handle->last_tick = MwTimeGetTick(); + } +} + +int MwStep(MwWidget handle) { + int i; + MwWidget* widgets = NULL; + for(i = 0; i < arrlen(handle->children); i++) { + arrput(widgets, handle->children[i]); + } + for(i = 0; i < arrlen(widgets); i++) MwStep(widgets[i]); + + arrfree(widgets); + + handle->prop_event = 0; + + while(handle->lowlevel != NULL && MwLLPending(handle->lowlevel)) + MwLLNextEvent(handle->lowlevel); + + handle->prop_event = 1; + + if(handle->top_step) MwAfterStep(handle); + + clean_destroy_queue(handle); + if(handle->parent == NULL && handle->destroyed) { + MwFreeWidget(handle); + return 1; + } + return 0; +} + +int MwPending(MwWidget handle) { + int i; + for(i = 0; i < arrlen(handle->children); i++) { + if(MwPending(handle->children[i])) return 1; + } + return (arrlen(handle->tick_list) > 0 && (MwTimeGetTick() - handle->last_tick) >= (MwGetInteger(handle, MwNwaitMS) == MwDEFAULT ? MwWaitMS : MwGetInteger(handle, MwNwaitMS))) || (arrlen(handle->destroy_queue) > 0) || (handle->widget_class == NULL ? 0 : MwLLPending(handle->lowlevel)); +} + +void MwLoop(MwWidget handle) { + long tick = MwTimeGetTick(); + long wait = MwGetInteger(handle, MwNwaitMS); + long over = 0; + if(wait == MwDEFAULT) wait = MwWaitMS; + while(!handle->close) { + int v = 0; + long t, t2; + long more; + while(MwPending(handle)) { + if((v = MwStep(handle)) != 0) break; + } + if(v != 0) break; + + more = over % (wait / 2); + t = (tick + wait - more) - (t2 = MwTimeGetTick()); + if(t > 0) { + if(!handle->berserk) MwTimeSleep(t); + tick = MwTimeGetTick(); + over -= more; + } else { + tick = t2; + over += -t; + } + } +} + +static void force_render_all(MwWidget handle) { + int i; + for(i = 0; i < arrlen(handle->children); i++) { + force_render_all(handle->children[i]); + } + if(handle->lowlevel != NULL) MwForceRender(handle); +} + +void MwSetInteger(MwWidget handle, const char* key, int n) { + int xy; + int wh = 0; + if((xy = ((strcmp(key, MwNx) == 0 || strcmp(key, MwNy) == 0) ? 1 : 0)) || (wh = ((strcmp(key, MwNwidth) == 0 || strcmp(key, MwNheight) == 0)) ? 1 : 0)) { + int x, y; + unsigned int w, h; + + MwLLGetXYWH(handle->lowlevel, &x, &y, &w, &h); + if(strcmp(key, MwNx) == 0) x = n; + if(strcmp(key, MwNy) == 0) y = n; + if(strcmp(key, MwNwidth) == 0) w = n; + if(strcmp(key, MwNheight) == 0) h = n; + if(xy) MwLLSetXY(handle->lowlevel, x, y); + if(wh) MwLLSetWH(handle->lowlevel, w, h); + } else { + shput(handle->integer, key, n); + } + if(handle->prop_event) { + char** keys = NULL; + + arrput(keys, (char*)key); + arrput(keys, NULL); + MwDispatch3(handle, props_change, keys); + arrfree(keys); + + MwDispatch3(handle, prop_change, key); + } + + if(handle->parent != NULL && handle->parent->prop_event) { + if(handle->parent != NULL) MwDispatch4(handle->parent, children_prop_change, handle, key); + } + + if(strcmp(key, MwNforceInverted) == 0) { + MwForceRender(handle); + } + if(strcmp(key, MwNmodernLook) == 0 || strcmp(key, MwNdarkTheme) == 0 || strcmp(key, MwNbitmapFont) == 0) { + force_render_all(handle); + } + + if(strcmp(key, MwNdarkTheme) == 0) { + MwWidget h = handle; + + shdel(h->integer, MwNdarkThemeAutomatic); + + if(h->widget_class != MwWindowClass) { + while(h->parent != NULL && h->parent->widget_class != MwWindowClass) h = h->parent; + } + + if(h->lowlevel != NULL) MwLLSetDarkTheme(h->lowlevel, n); + } +} + +void MwSetText(MwWidget handle, const char* key, const char* value) { + if(handle->widget_class == MwWindowClass && strcmp(key, MwNtitle) == 0) { + MwLLSetTitle(handle->lowlevel, value); + } else { + char* v = value == NULL ? NULL : MwStringDuplicate(value); + + if(shgeti(handle->text, key) != -1) free(shget(handle->text, key)); + + if(value != NULL) { + shput(handle->text, key, v); + } else { + shdel(handle->text, key); + } + } + if(handle->prop_event) { + char** keys = NULL; + + arrput(keys, (char*)key); + arrput(keys, NULL); + MwDispatch3(handle, props_change, keys); + arrfree(keys); + + MwDispatch3(handle, prop_change, key); + } + + if(handle->parent != NULL && handle->parent->prop_event) { + if(handle->parent != NULL) MwDispatch4(handle->parent, children_prop_change, handle, key); + } + + if(strcmp(key, MwNbackground) == 0 || strcmp(key, MwNforeground) == 0 || strcmp(key, MwNsubBackground) == 0 || strcmp(key, MwNsubForeground) == 0) { + MwForceRender(handle); + } +} + +void MwSetVoid(MwWidget handle, const char* key, void* value) { + if(IsFirstVisible(handle) && strcmp(key, MwNiconPixmap) == 0) { + MwLLSetIcon(handle->lowlevel, value); + } else if(strcmp(key, MwNsizeHints) == 0) { + MwSizeHints* sz = value; + + MwLLBeginStateChange(handle->lowlevel); + MwLLSetSizeHints(handle->lowlevel, sz->min_width, sz->min_height, sz->max_width, sz->max_height); + MwLLEndStateChange(handle->lowlevel); + } else { + shput(handle->data, key, value); + } + if(handle->prop_event) { + char** keys = NULL; + + arrput(keys, (char*)key); + arrput(keys, NULL); + MwDispatch3(handle, props_change, keys); + arrfree(keys); + + MwDispatch3(handle, prop_change, key); + } + + if(handle->parent != NULL && handle->parent->prop_event) { + if(handle->parent != NULL) MwDispatch4(handle->parent, children_prop_change, handle, key); + } +} + +static int inherit_integer(MwWidget handle, const char* key, int default_v) { + int v; + + if(handle->parent != NULL && (v = MwGetInteger(handle->parent, key)) != MwDEFAULT) { + return v; + } + return default_v; +} + +int MwGetInteger(MwWidget handle, const char* key) { + if(strcmp(key, MwNx) == 0 || strcmp(key, MwNy) == 0 || strcmp(key, MwNwidth) == 0 || strcmp(key, MwNheight) == 0) { + int x, y; + unsigned int w, h; + + MwLLGetXYWH(handle->lowlevel, &x, &y, &w, &h); + + if(strcmp(key, MwNx) == 0) return x; + if(strcmp(key, MwNy) == 0) return y; + if(strcmp(key, MwNwidth) == 0) return w; + if(strcmp(key, MwNheight) == 0) return h; + return MwDEFAULT; + } else { + if(shgeti(handle->integer, key) == -1) { +#if defined(USE_STB_TRUETYPE) || defined(USE_FREETYPE2) || defined(USE_GDI_TEXT) + if(strcmp(key, MwNbitmapFont) == 0) return inherit_integer(handle, key, 0); +#else + if(strcmp(key, MwNbitmapFont) == 0) return inherit_integer(handle, key, 1); +#endif +#ifdef USE_CLASSIC_THEME + if(strcmp(key, MwNmodernLook) == 0) return inherit_integer(handle, key, 0); +#else + if(strcmp(key, MwNmodernLook) == 0) return inherit_integer(handle, key, MwLLDoModern(handle->lowlevel)); +#endif + if(strcmp(key, MwNdarkTheme) == 0) return inherit_integer(handle, key, 0); + if(strcmp(key, MwNuseMonospace) == 0) return inherit_integer(handle, key, 0); + if(strcmp(key, MwNdisabled) == 0) return inherit_integer(handle, key, 0); + } + return shget(handle->integer, key); + } +} + +const char* MwGetText(MwWidget handle, const char* key) { + if((shgeti(handle->text, key) == -1 || strcmp(shget(handle->text, key), "DEFAULT") == 0) && (strcmp(key, MwNbackground) == 0 || strcmp(key, MwNforeground) == 0 || strcmp(key, MwNsubBackground) == 0 || strcmp(key, MwNsubForeground) == 0 || strcmp(key, MwNtitleBackground) == 0 || strcmp(key, MwNtitleForeground) == 0)) { + const char* v = NULL; + if(shgeti(handle->text, key) != -1 && strcmp(shget(handle->text, key), "DEFAULT") != 0) { + MwWidget h = handle->parent; + while(h != NULL) { + if((v = MwGetText(h, key)) != NULL) break; + h = h->parent; + } + } + if(v == NULL) { + if(MwGetInteger(handle, MwNdarkTheme)) { + if(strcmp(key, MwNbackground) == 0) return MwDefaultDarkBackground; + if(strcmp(key, MwNforeground) == 0) return MwDefaultDarkForeground; + if(strcmp(key, MwNsubBackground) == 0) return MwDefaultDarkSubBackground; + if(strcmp(key, MwNsubForeground) == 0) return MwDefaultDarkSubForeground; + if(strcmp(key, MwNtitleBackground) == 0) return MwDefaultDarkTitleBackground; + if(strcmp(key, MwNtitleForeground) == 0) return MwDefaultDarkTitleForeground; + } else { + if(strcmp(key, MwNbackground) == 0) return MwDefaultBackground; + if(strcmp(key, MwNforeground) == 0) return MwDefaultForeground; + if(strcmp(key, MwNsubBackground) == 0) return MwDefaultSubBackground; + if(strcmp(key, MwNsubForeground) == 0) return MwDefaultSubForeground; + if(strcmp(key, MwNtitleBackground) == 0) return MwDefaultTitleBackground; + if(strcmp(key, MwNtitleForeground) == 0) return MwDefaultTitleForeground; + } + } + return v; + } + + return shget(handle->text, key); +} + +#if defined(USE_STB_TRUETYPE) || defined(USE_FREETYPE2) || defined(USE_GDI_TEXT) +static void* inherit_void(MwWidget handle, const char* key) { + void* v; + + if(handle->parent != NULL && (v = MwGetVoid(handle->parent, key)) != NULL) { + return v; + } + return NULL; +} +#endif + +void* MwGetVoid(MwWidget handle, const char* key) { + void* v = shget(handle->data, key); + + if(v != NULL) return v; + +#if defined(USE_STB_TRUETYPE) || defined(USE_FREETYPE2) || defined(USE_GDI_TEXT) + if(strcmp(key, MwNfont) == 0 || strcmp(key, MwNboldFont) == 0 || strcmp(key, MwNmonospaceFont) == 0 || strcmp(key, MwNboldMonospaceFont) == 0) { + v = inherit_void(handle, key); + + if(v == NULL) { + MwWidget w = handle; + + while(w != NULL && v == NULL) { + if(strcmp(key, MwNfont) == 0) { + v = w->root_font; + } else if(strcmp(key, MwNboldFont) == 0) { + v = w->root_boldfont; + } else if(strcmp(key, MwNmonospaceFont) == 0) { + v = w->root_monofont; + } else if(strcmp(key, MwNboldMonospaceFont) == 0) { + v = w->root_boldmonofont; + } + + w = w->parent; + } + } + } +#endif + + return v; +} + +void MwVaApply(MwWidget handle, ...) { + va_list va; + + va_start(va, handle); + MwVaListApply(handle, va); + va_end(va); +} + +static void MwVaListApply_Internal(MwWidget handle, va_list va, int only_early) { + char* key; + int x = MwDEFAULT, y = MwDEFAULT, w = MwDEFAULT, h = MwDEFAULT; + char** keys = NULL; + int old = handle->prop_event; + int i; + + handle->prop_event = 0; + while((key = va_arg(va, char*)) != NULL) { + if(!only_early || key[1] == 'E') { + arrput(keys, key); + } + + if(key[0] == 'I') { + int n = va_arg(va, int); + if(only_early && key[1] != 'E') continue; + + if(strcmp(key, MwNx) == 0) { + x = n; + } else if(strcmp(key, MwNy) == 0) { + y = n; + } else if(strcmp(key, MwNwidth) == 0) { + w = n; + } else if(strcmp(key, MwNheight) == 0) { + h = n; + } else { + MwSetInteger(handle, key, n); + } + } else if(key[0] == 'S') { + char* t = va_arg(va, char*); + if(only_early && key[1] != 'E') continue; + + MwSetText(handle, key, t); + } else if(key[0] == 'C') { + MwUserHandler h = va_arg(va, MwUserHandler); + if(only_early && key[1] != 'E') continue; + + MwAddUserHandler(handle, key, h, NULL); + } else if(key[0] == 'V') { + void* v = va_arg(va, void*); + if(only_early && key[1] != 'E') continue; + MwSetVoid(handle, key, v); + } + } + if(x != MwDEFAULT && y != MwDEFAULT) { + MwLLSetXY(handle->lowlevel, x, y); + if(handle->prop_event) { + MwDispatch3(handle, prop_change, MwNx); + MwDispatch3(handle, prop_change, MwNy); + } + } else { + if(x != MwDEFAULT) { + MwSetInteger(handle, MwNx, x); + } else if(y != MwDEFAULT) { + MwSetInteger(handle, MwNy, y); + } + } + if(w != MwDEFAULT && h != MwDEFAULT) { + MwLLSetWH(handle->lowlevel, w, h); + if(handle->prop_event) { + MwDispatch3(handle, prop_change, MwNwidth); + MwDispatch3(handle, prop_change, MwNheight); + } + } else { + if(w != MwDEFAULT) { + MwSetInteger(handle, MwNwidth, w); + } else if(h != MwDEFAULT) { + MwSetInteger(handle, MwNheight, h); + } + } + handle->prop_event = old; + + arrput(keys, NULL); + + if(handle->prop_event) { + for(i = 0; keys[i] != NULL; i++) { + MwDispatch3(handle, prop_change, keys[i]); + } + + MwDispatch3(handle, props_change, keys); + } + + arrfree(keys); +} + +void MwVaListApply(MwWidget handle, va_list va) { + MwVaListApply_Internal(handle, va, 0); +} + +void MwSetDefault(MwWidget handle) { + if(handle->lowlevel != NULL) MwLLSetCursor(handle->lowlevel, &MwCursorDefault, &MwCursorDefaultMask); +} + +void MwHideCursor(MwWidget handle) { + MwLLSetCursor(handle->lowlevel, &MwCursorHidden, &MwCursorHiddenMask); +} + +void MwDispatchUserHandler(MwWidget handle, const char* key, void* handler_data) { + int ind = shgeti(handle->handler, key); + int p = handle->prop_event; + int i; + + if(ind == -1) return; + if(handle->destroyed) return; + + if(!p) handle->prop_event = 1; + for(i = 0; i < arrlen(handle->handler[ind].value); i++) { + handle->handler[ind].value[i].handler(handle, handle->handler[ind].value[i].user_data, handler_data); + } + if(!p) handle->prop_event = 0; +} + +void MwAddUserHandler(MwWidget handle, const char* key, MwUserHandler handler, void* user_data) { + int ind; + MwUserHandlerArray a; + a.handler = handler; + a.user_data = user_data; + + ind = shgeti(handle->handler, key); + if(ind == -1) { + MwUserHandlerKeyValue e; + e.key = (char*)key; + e.value = NULL; + + arrput(e.value, a); + shputs(handle->handler, e); + } else { + arrput(handle->handler[ind].value, a); + } +} + +static MwErrorHandler error_handler = NULL; +static void* error_user_data = NULL; + +void MwSetErrorHandler(MwErrorHandler handler, void* user_data) { + error_handler = handler; + error_user_data = user_data; +} + +void MwDispatchError(int code, const char* message) { + if(error_handler != NULL) { + error_handler(code, message, error_user_data); + } else { +#ifdef _WIN32 + char buffer[1024]; + MwStringPrintIntoBuffer(buffer, 1024, "Error: %s\r\nCode : %d\r\n\r\nMilsko is exiting.", message, code); + MessageBox(NULL, buffer, "Error", MB_ICONERROR | MB_OK); +#else + fprintf(stderr, "Error: %s\nCode : %d\n\nMilsko is exiting.", message, code); +#endif + exit(1); + } +} + +#undef MwForceRender +void MwForceRender(MwWidget handle) { + MwLLForceRender(handle->lowlevel); +} + +#undef MwForceRender2 +void MwForceRender2(MwWidget handle, void* ptr) { + (void)ptr; + + MwForceRender(handle); +} + +void MwForceRender_Internal(MwWidget handle) { + MwForceRender(handle); +} + +void MwForceRender2_Internal(MwWidget handle, void* ptr) { + (void)ptr; + + MwForceRender(handle); +} + +void MwAddTickList(MwWidget handle) { + MwWidget root = handle; + while(root->parent != NULL) root = root->parent; + + arrput(root->tick_list, handle); +} + +void MwFocus(MwWidget handle) { + MwLLFocus(handle->lowlevel); +} + +void MwGrabPointer(MwWidget handle, int toggle) { + if(toggle) MwFocus(handle); + MwLLGrabPointer(handle->lowlevel, toggle); +} + +void MwSetDarkTheme(MwWidget handle, int toggle) { + MwVaApply(handle, + MwNdarkTheme, toggle, + NULL); +} + +MwWidget MwGetParent(MwWidget handle) { + return handle->parent; +} + +typedef int (*call_t)(void); +int MwLibraryInit(void) { + call_t calls[] = { +#ifdef USE_WAYLAND + NULL, /* set in a bit */ +#endif +#ifdef USE_X11 + MwLLX11CallInit, +#endif +#ifdef USE_COCOA + MwLLCocoaCallInit, +#endif +#ifdef USE_GDI + MwLLGDICallInit, +#endif +#ifdef CLASSIC_MAC_OS + MwLLClassicMacOSCallInit, +#endif +#ifdef USE_HAIKU + MwLLHaikuCallInit, +#endif + NULL}; + int i; + +#ifdef _WIN32 + timeBeginPeriod(10); +#endif + +#ifdef USE_WAYLAND + if(MwWaylandCairoOnly) { + calls[0] = MwLLCairoCallInit; + } else { + calls[0] = MwLLWaylandCallInit; + } +#endif + + MwColorTableInit(); + + MwFLSetup(); + + for(i = 0; calls[i] != NULL; i++) { + if(calls[i]() == 0) return 0; + } + +#ifdef __APPLE__ + void MwLLNoCocoaErrorMessage(void); + MwLLNoCocoaErrorMessage(); +#else + printf("[WARNING] No suitable GUI backend found! Enabled:" +#ifdef USE_COCOA + " Cocoa" +#endif +#ifdef USE_WAYLAND + " Wayland" +#endif +#ifdef USE_X11 + " X11" +#endif +#ifdef USE_GDI + " GDI" +#endif +#ifdef CLASSIC_MAC_OS + " ClassicMacOS" +#endif + "\n"); +#endif + return 1; +} + +void MwShow(MwWidget handle, int toggle) { + MwLLShow(handle->lowlevel, toggle); +} + +void MwReparent(MwWidget handle, MwWidget new_parent) { + if(handle->parent != NULL) { + int i; + for(i = 0; i < arrlen(handle->parent->children); i++) { + if(handle->parent->children[i] == handle) { + arrdel(handle->parent->children, i); + break; + } + } + + MwDispatch4(handle->parent, children_update, handle, 0); + } + + handle->parent = new_parent; + if(new_parent != NULL) { + arrput(new_parent->children, handle); + + MwDispatch4(handle->parent, children_update, handle, 1); + } + + if(new_parent == NULL) { + handle->top_step = 1; + arrput(handle->tick_list, handle); + } else { + handle->top_step = 0; + arrfree(handle->tick_list); + } + + MwForceRender(handle); +} + +MwClass MwGetClass(MwWidget handle) { + return handle->widget_class; +} + +const char* MwGetName(MwWidget handle) { + return handle->name; +} + +MwWidget* MwGetChildren(MwWidget handle) { + MwWidget* c = malloc(sizeof(*c) * (arrlen(handle->children) + 1)); + int i; + + for(i = 0; i < arrlen(handle->children); i++) { + c[i] = handle->children[i]; + } + c[arrlen(handle->children)] = 0; + + return c; +} + +void MwGetCursorCoord(MwWidget handle, MwPoint* point) { + MwLLGetCursorCoord(handle->lowlevel, point); +} + +void MwGetScreenSize(MwWidget handle, MwRect* rect) { + MwLLGetScreenSize(handle->lowlevel, rect); +} + +int MwGetCoordinateType(MwWidget handle) { + if(handle->parent == NULL || handle->parent->lowlevel == NULL) { + return handle->lowlevel->common.coordinate_type; + } else { + return MwCOORDINATE_LOCAL; + } +} + +void MwGetClipboard(MwWidget handle, int clipboard_type) { + MwLLGetClipboard(handle->lowlevel, clipboard_type); +} + +void MwSetUser(MwWidget handle, void* user) { + handle->user = user; +} + +void* MwGetUser(MwWidget handle) { + return handle->user; +} + +void MwGetFrame(MwWidget handle, MwRect* rect) { + rect->x = MwGetInteger(handle, MwNx); + rect->y = MwGetInteger(handle, MwNy); + rect->width = MwGetInteger(handle, MwNwidth); + rect->height = MwGetInteger(handle, MwNheight); +} + +const char* MwVersionString = MwVERSION; diff --git a/widget/milsko/milskosrc/src/cursor/arrow.c b/widget/milsko/milskosrc/src/cursor/arrow.c new file mode 100644 index 0000000000..5a1d9bff87 --- /dev/null +++ b/widget/milsko/milskosrc/src/cursor/arrow.c @@ -0,0 +1,43 @@ +#include + +/** + * Created by bitmaptobdf + * + * Copyright notice: + * These ""glyphs"" are unencumbered + */ +MwCursor MwCursorArrow = { + 14, 14, -13, -14, {3, /* ............## */ + 15, /* ..........#### */ + 62, /* ........#####. */ + 254, /* ......#######. */ + 1020, /* ....########.. */ + 4092, /* ..##########.. */ + 248, /* ......#####... */ + 504, /* .....######... */ + 944, /* ....###.##.... */ + 1840, /* ...###..##.... */ + 3616, /* ..###...#..... */ + 7200, /* .###....#..... */ + 14336, /* ###........... */ + 4096, /* .#............ */ + 0, 0}}; +MwCursor MwCursorArrowMask = { + 16, 16, -14, -15, { + 7, /* .............### */ + 31, /* ...........##### */ + 127, /* .........####### */ + 510, /* .......########. */ + 2046, /* .....##########. */ + 8188, /* ...###########.. */ + 16380, /* ..############.. */ + 16376, /* ..###########... */ + 2040, /* .....########... */ + 4080, /* ....########.... */ + 8176, /* ...#########.... */ + 16096, /* ..#####.###..... */ + 31968, /* .#####..###..... */ + 63552, /* #####....#...... */ + 28672, /* .###............ */ + 8192 /* ..#............. */ + }}; diff --git a/widget/milsko/milskosrc/src/cursor/cross.c b/widget/milsko/milskosrc/src/cursor/cross.c new file mode 100644 index 0000000000..8c53739b33 --- /dev/null +++ b/widget/milsko/milskosrc/src/cursor/cross.c @@ -0,0 +1,8 @@ +#include + +/** + * Created by bitmaptobdf + * + * Copyright notice: + * These ""glyphs"" are unencumbered + */ diff --git a/widget/milsko/milskosrc/src/cursor/default.c b/widget/milsko/milskosrc/src/cursor/default.c new file mode 100644 index 0000000000..d4bda3cda4 --- /dev/null +++ b/widget/milsko/milskosrc/src/cursor/default.c @@ -0,0 +1,43 @@ +#include + +/** + * Created by bitmaptobdf + * + * Copyright notice: + * These ""glyphs"" are unencumbered + */ +MwCursor MwCursorDefault = { + 8, 14, 0, -14, {128, /* #....... */ + 192, /* ##...... */ + 224, /* ###..... */ + 240, /* ####.... */ + 248, /* #####... */ + 252, /* ######.. */ + 254, /* #######. */ + 255, /* ######## */ + 248, /* #####... */ + 216, /* ##.##... */ + 140, /* #...##.. */ + 12, /* ....##.. */ + 6, /* .....##. */ + 6, /* .....##. */ + 0, 0}}; +MwCursor MwCursorDefaultMask = { + 10, 16, -1, -15, { + 768, /* ##........ */ + 896, /* ###....... */ + 960, /* ####...... */ + 992, /* #####..... */ + 1008, /* ######.... */ + 1016, /* #######... */ + 1020, /* ########.. */ + 1022, /* #########. */ + 1023, /* ########## */ + 1023, /* ########## */ + 1016, /* #######... */ + 956, /* ###.####.. */ + 828, /* ##..####.. */ + 30, /* .....####. */ + 30, /* .....####. */ + 12 /* ......##.. */ + }}; diff --git a/widget/milsko/milskosrc/src/cursor/hidden.c b/widget/milsko/milskosrc/src/cursor/hidden.c new file mode 100644 index 0000000000..61cd44b522 --- /dev/null +++ b/widget/milsko/milskosrc/src/cursor/hidden.c @@ -0,0 +1,5 @@ +#include +MwCursor MwCursorHidden = { + 1, 1, 0, -1, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; +MwCursor MwCursorHiddenMask = { + 1, 1, 0, -1, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; diff --git a/widget/milsko/milskosrc/src/cursor/text.c b/widget/milsko/milskosrc/src/cursor/text.c new file mode 100644 index 0000000000..855f01a329 --- /dev/null +++ b/widget/milsko/milskosrc/src/cursor/text.c @@ -0,0 +1,43 @@ +#include + +/** + * Created by bitmaptobdf + * + * Copyright notice: + * These ""glyphs"" are unencumbered + */ +MwCursor MwCursorText = { + 7, 14, -3, -7, {119, /* ###.### */ + 28, /* ..###.. */ + 8, /* ...#... */ + 8, /* ...#... */ + 8, /* ...#... */ + 8, /* ...#... */ + 8, /* ...#... */ + 8, /* ...#... */ + 8, /* ...#... */ + 8, /* ...#... */ + 8, /* ...#... */ + 8, /* ...#... */ + 28, /* ..###.. */ + 119, /* ###.### */ + 0, 0}}; +MwCursor MwCursorTextMask = { + 9, 16, -4, -8, { + 495, /* ####.#### */ + 511, /* ######### */ + 511, /* ######### */ + 124, /* ..#####.. */ + 56, /* ...###... */ + 56, /* ...###... */ + 56, /* ...###... */ + 56, /* ...###... */ + 56, /* ...###... */ + 56, /* ...###... */ + 56, /* ...###... */ + 56, /* ...###... */ + 124, /* ..#####.. */ + 511, /* ######### */ + 511, /* ######### */ + 495 /* ####.#### */ + }}; diff --git a/widget/milsko/milskosrc/src/default.c b/widget/milsko/milskosrc/src/default.c new file mode 100644 index 0000000000..44e4c4d6f0 --- /dev/null +++ b/widget/milsko/milskosrc/src/default.c @@ -0,0 +1,41 @@ +#include + +const char* MwDefaultBackground = "#d2d2d2"; +const char* MwDefaultForeground = "#000"; +const char* MwDefaultSubBackground = "#fff"; +const char* MwDefaultSubForeground = "#000"; +const char* MwDefaultTitleBackground = "#008"; +const char* MwDefaultTitleForeground = "#fff"; + +const char* MwDefaultDarkBackground = "#333"; +const char* MwDefaultDarkForeground = "#ddd"; +const char* MwDefaultDarkSubBackground = "#333"; +const char* MwDefaultDarkSubForeground = "#ddd"; +const char* MwDefaultDarkTitleBackground = "#008"; +const char* MwDefaultDarkTitleForeground = "#fff"; + +const int MwDefaultShadow = -32; + +int MwDefaultBorderWidth(MwWidget handle) { + int bw = MwGetInteger(handle, MwNborderWidth); + + if(bw != MwDEFAULT) return bw; + + if(MwGetInteger(handle, MwNmodernLook)) { + return 2; + } else { + return 2; + } +} + +int MwDefaultThinBorderWidth(MwWidget handle) { + int bw = MwGetInteger(handle, MwNborderWidth); + + if(bw != MwDEFAULT) return bw; + + if(MwGetInteger(handle, MwNmodernLook)) { + return 1; + } else { + return 2; + } +} diff --git a/widget/milsko/milskosrc/src/dialog/colorpicker.c b/widget/milsko/milskosrc/src/dialog/colorpicker.c new file mode 100644 index 0000000000..926fddcbcc --- /dev/null +++ b/widget/milsko/milskosrc/src/dialog/colorpicker.c @@ -0,0 +1,380 @@ +#include + +#define WIN_SIZE 464 +#define PICKER_SIZE 364 +#define IMG_POS_X(w) ((w - PICKER_SIZE) / 2) +#define IMG_POS_Y(h) ((h - PICKER_SIZE) / 2) +#define SCROLL_BAR_WIDTH 16 +#define MARGIN (PICKER_SIZE / 32) +#define COLOR_DISPLAY_HEIGHT 12 + +#define HSV_HUE_SEXTANT 256. +#define HSV_HUE_STEPS (6. * HSV_HUE_SEXTANT) + +#define HSV_HUE_MIN 0. +#define HSV_HUE_MAX (HSV_HUE_STEPS - 1.) +#define HSV_SAT_MIN 0. +#define HSV_SAT_MAX 255. +#define HSV_VAL_MIN 0. +#define HSV_VAL_MAX 255. + +typedef struct _MwHSV { + MwBool generated : 1; + MwU16 h : 11; + MwU8 s; + MwU8 v; +} MwHSV; + +typedef struct color_picker { + MwWidget parent; + MwWidget color_picker_img; + MwWidget value_slider; + MwWidget color_display_text; + MwWidget finish; + MwLLPixmap color_picker_pixmap; + double value; + MwRGB chosen_color; + unsigned char color_picker_image_data[PICKER_SIZE * PICKER_SIZE * 4]; + MwHSV hue_table[101753]; + MwU8 doUpdate; +} color_picker_t; + +static void hsv2rgb(MwU32 h, MwU32 s, MwU32 v, MwU16* r, MwU16* g, MwU16* b) { + MwU8 sextant = h >> 8; + MwU16 ww; + MwU32 h_fraction, d; + +#define HSV_SWAPPTR(a, b) \ + do { \ + MwU16* tmp = a; \ + a = b; \ + b = tmp; \ + } while(0) + + if(sextant & 2) { + HSV_SWAPPTR(r, b); + } + if(sextant & 4) { + HSV_SWAPPTR(g, b); + } + if(!(sextant & 6)) { + if(!(sextant & 1)) { + HSV_SWAPPTR(r, g); + } + } else { + if(sextant & 1) { + HSV_SWAPPTR(r, g); + } + } + + *g = v; /* Top level */ + + /* Perform actual calculations */ + + /** + * Bottom level: v * (1.0 - s) + * --> (v * (255 - s) + error_corr + 1) / 256 + */ + ww = v * (255 - (s)); /* We don't use ~s to prevent size-promotion side effects */ + ww += 1; /* Error correction */ + ww += ww >> 8; /* Error correction */ + *b = ww >> 8; + + h_fraction = h & 0xff; /* 0...255 */ + + if(!(sextant & 1)) { + /* *r = ...slope_up...; */ + d = v * (MwU32)((0xff << 8) - (MwU16)(s * (0xff - h_fraction))); + *r = d >> 16; + } else { + /* *r = ...slope_down...; */ + d = v * (MwU32)((0xff << 8) - (MwU16)(s * h_fraction)); + *r = d >> 16; + } + return; +} + +static void color_picker_image_update(color_picker_t* picker) { + MwU16 y, x; + int n = 0; + for(y = 0; y < PICKER_SIZE; y++) { + for(x = 0; x < PICKER_SIZE; x++) { + int i = ((y * PICKER_SIZE) + x) * 4; + int _x = x - (PICKER_SIZE / 2); + int _y = y - (PICKER_SIZE / 2); + double dist = sqrt(_x * _x + _y * _y); + + if(dist >= 182.) { + picker->color_picker_image_data[i] = 0; + picker->color_picker_image_data[i + 1] = 0; + picker->color_picker_image_data[i + 2] = 0; + picker->color_picker_image_data[i + 3] = 0; + } else if(dist >= 180.) { + picker->color_picker_image_data[i] = dist; + picker->color_picker_image_data[i + 1] = dist; + picker->color_picker_image_data[i + 2] = dist; + picker->color_picker_image_data[i + 3] = 255; + } else { + MwHSV hsv_v; + MwRGB color; + if(picker->hue_table[n].generated == 0) { + double xd = (M_PI / 180.) * ((double)_x); + double yd = (M_PI / 180.) * ((double)_y); + + float angle = atan2(yd, xd) - M_PI; + float hue = (angle * 180.) / M_PI; + + if(hue < 0.0) { + hue += 360; + } + hsv_v.h = (hue) * (HSV_HUE_STEPS / 360.); + hsv_v.s = (dist) * (HSV_SAT_MAX / 180.); + picker->hue_table[n] = hsv_v; + picker->hue_table[n].generated = 1; + } + + hsv_v = picker->hue_table[n]; + hsv_v.v = HSV_VAL_MAX - (picker->value * HSV_VAL_MAX); + + hsv2rgb(hsv_v.h, hsv_v.s, hsv_v.v, &color.red, &color.green, &color.blue); + + picker->color_picker_image_data[i] = color.red; + picker->color_picker_image_data[i + 1] = color.green; + picker->color_picker_image_data[i + 2] = color.blue; + + picker->color_picker_image_data[i + 3] = 255; + n++; + } + } + } + if(picker->color_picker_pixmap == NULL) { + picker->color_picker_pixmap = MwLoadRaw( + picker->parent, picker->color_picker_image_data, PICKER_SIZE, PICKER_SIZE); + } else { + MwPixmapReloadRaw( + picker->color_picker_pixmap, picker->color_picker_image_data); + } + MwVaApply(picker->color_picker_img, MwNpixmap, picker->color_picker_pixmap, NULL); + /* printf("%d\n", n); */ +} + +static void MWAPI color_picker_click(MwWidget handle, void* user, void* call) { + color_picker_t* picker = user; + MwMouse* mouse = call; + char hexColor[8]; + int i; + char fgColor[8]; + int fr, fg, fb; + + (void)handle; + (void)user; + (void)call; + + /* color_picker_image_update(picker); */ + + i = ((mouse->point.y * PICKER_SIZE) + mouse->point.x) * 4; + + picker->chosen_color.red = picker->color_picker_image_data[i]; + picker->chosen_color.green = picker->color_picker_image_data[i + 1]; + picker->chosen_color.blue = picker->color_picker_image_data[i + 2]; + + MwStringPrintIntoBuffer(hexColor, 8, "#%02X%02X%02X", picker->chosen_color.red & 0xff, picker->chosen_color.green & 0xff, picker->chosen_color.blue & 0xff); + + fr = picker->chosen_color.red > 128 ? 0 : 255; + fg = picker->chosen_color.green > 128 ? 0 : 255; + fb = picker->chosen_color.blue > 128 ? 0 : 255; + + MwStringPrintIntoBuffer(fgColor, 8, "#%02X%02X%02X", fr, fg, fb); + MwSetText(picker->color_display_text, MwNforeground, fgColor); + + MwSetText(picker->color_display_text, MwNbackground, hexColor); + MwSetText(picker->color_display_text, MwNtext, hexColor); +} +static void MWAPI color_picker_on_change_value(MwWidget handle, void* user, + void* call) { + color_picker_t* picker = user; + + int value = MwGetInteger(handle, MwNvalue); + int diff = MwGetInteger(handle, MwNchangedBy); + + (void)diff; + (void)call; + + picker->value = ((double)value / 1024.); + + picker->doUpdate = 1; + /* color_picker_image_update(picker); */ +} + +static void MWAPI color_picker_tick(MwWidget handle, void* user, + void* call) { + color_picker_t* picker = user; + + (void)handle; + (void)call; + + if(picker->doUpdate == 1) { + color_picker_image_update(picker); + picker->doUpdate = 0; + } +} + +static void color_picker_destroy(color_picker_t* picker) { + MwLLDestroyPixmap(picker->color_picker_pixmap); + free(picker); +} + +static void MWAPI color_picker_close(MwWidget handle, void* user, + void* call) { + color_picker_t* picker = user; + + (void)call; + + color_picker_destroy(picker); + MwDestroyWidget(handle); +} + +static void MWAPI color_display_text_change(MwWidget handle, void* user, + void* call) { + color_picker_t* picker = user; + char hexColor[9]; + char fgColor[9]; + MwLLColor color; + int fr, fg, fb; + + (void)call; + + memcpy(&hexColor, MwGetText(handle, MwNtext), 8); + + color = MwParseColor(handle, hexColor); + + fr = color->common.red > 128 ? 0 : 255; + fg = color->common.green > 128 ? 0 : 255; + fb = color->common.blue > 128 ? 0 : 255; + + MwStringPrintIntoBuffer(fgColor, 9, "#%02X%02X%02X", fr, fg, fb); + MwSetText(picker->color_display_text, MwNforeground, fgColor); + + MwSetText(picker->color_display_text, MwNbackground, hexColor); + MwSetText(picker->color_display_text, MwNtext, hexColor); + + picker->chosen_color.red = color->common.red; + picker->chosen_color.green = color->common.green; + picker->chosen_color.blue = color->common.blue; + + MwLLFreeColor(color); +} + +static void MWAPI color_picker_finish(MwWidget handle, void* user, + void* call) { + color_picker_t* picker = user; + + (void)call; + + MwDispatchUserHandler(picker->parent, MwNcolorChosenHandler, &picker->chosen_color); + + color_picker_destroy(picker); + MwDestroyWidget(handle->parent); +} + +color_picker_t* color_picker_setup(MwWidget parent, int w, int h) { + color_picker_t* picker = malloc(sizeof(*picker)); + memset(picker, 0, sizeof(*picker)); + + picker->parent = parent; + + picker->color_picker_img = + MwVaCreateWidget(MwImageClass, "image", picker->parent, IMG_POS_X(w), IMG_POS_Y(h), + PICKER_SIZE, PICKER_SIZE, NULL); + + /* picker->color_picker_image_data = malloc(PICKER_SIZE * PICKER_SIZE * 4); */ + + picker->color_picker_pixmap = NULL; + picker->value = 0; + + /* color_picker_image_update(picker); */ + picker->doUpdate = 1; + + MwAddUserHandler(picker->color_picker_img, MwNmouseDownHandler, + color_picker_click, picker); + + picker->color_display_text = MwCreateWidget( + MwEntryClass, "colorDisplayText", picker->parent, IMG_POS_X(w) + (PICKER_SIZE / 2) - ((PICKER_SIZE / 4) / 2), + IMG_POS_Y(h) - (PICKER_SIZE / 16) - MARGIN, (PICKER_SIZE / 4), PICKER_SIZE / 16); + + MwSetText(picker->color_display_text, MwNbackground, "#FFFFFF"); + MwSetText(picker->color_display_text, MwNtext, "#FFFFFF"); + /* MwSetInteger(picker->color_display_text, Mwnali, MwALIGNMENT_CENTER); */ + + MwAddUserHandler(picker->color_display_text, MwNactivateHandler, + color_display_text_change, picker); + picker->value_slider = MwVaCreateWidget( + MwScrollBarClass, "value-slider", picker->parent, + /* x */ + IMG_POS_X(w) + PICKER_SIZE + MARGIN, + + /* y */ + IMG_POS_Y(h), + + /* width */ + SCROLL_BAR_WIDTH, + + /* height */ + PICKER_SIZE, + + MwNorientation, MwVERTICAL, MwNminValue, 0, MwNmaxValue, 1024, NULL); + + MwAddUserHandler(picker->value_slider, MwNchangedHandler, + color_picker_on_change_value, picker); + + picker->finish = MwCreateWidget( + MwButtonClass, "colorPickerFinish", picker->parent, IMG_POS_X(w), + IMG_POS_Y(h) + PICKER_SIZE + MARGIN, PICKER_SIZE, (WIN_SIZE - PICKER_SIZE - MARGIN * 4) / 2); + MwSetText(picker->finish, MwNtext, "Select"); + MwSetInteger(picker->finish, MwNhasBorder, 1); + MwSetInteger(picker->finish, MwNinverted, 1); + + MwAddUserHandler(picker->finish, MwNactivateHandler, + color_picker_finish, picker); + + memset(picker->hue_table, 0, sizeof(picker->hue_table)); + + return picker; +} + +MwWidget MwColorPicker(MwWidget handle, const char* title) { + color_picker_t* wheel; + MwWidget window; + MwSizeHints sh; + int wx; + int wy; + + if(handle == NULL) { + wx = wy = MwDEFAULT; + } else { + wx = MwGetInteger(handle, MwNx) + (MwGetInteger(handle, MwNwidth) - WIN_SIZE) / 2; + wy = MwGetInteger(handle, MwNy) + (MwGetInteger(handle, MwNheight) - WIN_SIZE) / 2; + } + + sh.min_width = sh.max_width = WIN_SIZE; + sh.min_height = sh.max_height = WIN_SIZE; + + window = MwVaCreateWidget(MwWindowClass, "main", NULL, wx, wy, + WIN_SIZE, WIN_SIZE, + MwNtitle, title, + MwNsizeHints, &sh, + NULL); + if(handle != NULL) MwReparent(window, handle); + + wheel = color_picker_setup(window, WIN_SIZE, WIN_SIZE); + + MwAddUserHandler(window, MwNcloseHandler, color_picker_close, wheel); + MwAddUserHandler(window, MwNtickHandler, color_picker_tick, wheel); + MwAddTickList(window); + + MwLLBeginStateChange(window->lowlevel); + MwLLMakePopup(window->lowlevel, handle == NULL ? NULL : handle->lowlevel); + MwLLEndStateChange(window->lowlevel); + + return window; +} diff --git a/widget/milsko/milskosrc/src/dialog/directorychooser.c b/widget/milsko/milskosrc/src/dialog/directorychooser.c new file mode 100644 index 0000000000..8f9416fae1 --- /dev/null +++ b/widget/milsko/milskosrc/src/dialog/directorychooser.c @@ -0,0 +1,5 @@ +#include + +MwWidget MwDirectoryChooser(MwWidget handle, const char* title) { + return MwFileChooserEx(handle, title, 1); +} diff --git a/widget/milsko/milskosrc/src/dialog/filechooser.c b/widget/milsko/milskosrc/src/dialog/filechooser.c new file mode 100644 index 0000000000..138fc6cf00 --- /dev/null +++ b/widget/milsko/milskosrc/src/dialog/filechooser.c @@ -0,0 +1,573 @@ +#include + +#include "../external/stb_ds.h" + +typedef struct filechooser { + char* path; + char** history; + int history_seek; + int dir_only; + + MwDirectoryEntry** entries; + MwDirectoryEntry** sorted_entries; + + MwWidget nav; + MwWidget files; + MwWidget addr; + MwWidget addr_back; + MwWidget addr_fwd; + MwWidget addr_up; + MwWidget filename_label; + MwWidget filename; + MwWidget okay; + MwWidget cancel; + + MwLLPixmap dir; + MwLLPixmap file; + MwLLPixmap back; + MwLLPixmap forward; + MwLLPixmap up; + MwLLPixmap computer; +} filechooser_t; + +static void scan(MwWidget handle, const char* path, int record); + +static void destroy(MwWidget handle) { + filechooser_t* fc = handle->opaque; + int i; + + for(i = 0; i < arrlen(fc->history); i++) free(fc->history[i]); + arrfree(fc->history); + + arrfree(fc->sorted_entries); + for(i = 0; i < arrlen(fc->entries); i++) MwDirectoryFreeEntry(fc->entries[i]); + arrfree(fc->entries); + + MwLLDestroyPixmap(fc->dir); + MwLLDestroyPixmap(fc->file); + MwLLDestroyPixmap(fc->back); + MwLLDestroyPixmap(fc->forward); + MwLLDestroyPixmap(fc->up); + MwLLDestroyPixmap(fc->computer); + free(handle->opaque); +} + +static void MWAPI filecancel(MwWidget handle, void* user, void* call) { + (void)user; + (void)call; + + MwDestroyWidget(handle->parent); +} + +static void MWAPI cancel_window(MwWidget handle, void* user, void* call) { + (void)user; + (void)call; + + MwDestroyWidget(handle); +} + +static void MWAPI okay(MwWidget handle, void* user, void* call) { + (void)user; + (void)call; + + MwDestroyWidget(handle->parent); +} + +static void MWAPI msgbox_okay(MwWidget handle, void* user, void* call) { + (void)user; + (void)call; + + MwDestroyWidget(handle->parent); +} + +static void MWAPI files_activate(MwWidget handle, void* user, void* call) { + int index = *(int*)call; + filechooser_t* fc = handle->parent->opaque; + + (void)user; + + if(fc->sorted_entries[index - 1]->type == MwDIRECTORY_DIRECTORY) { + char* p = MwDirectoryJoin(fc->path, fc->sorted_entries[index - 1]->name); + + scan(handle->parent, p, 1); + + free(p); + } else { + char* p; + + p = MwDirectoryJoin(fc->path, fc->sorted_entries[MwGetInteger(fc->files, MwNvalue) - 1]->name); + MwDispatchUserHandler(handle->parent, fc->dir_only ? MwNdirectoryChosenHandler : MwNfileChosenHandler, p); + free(p); + + okay(fc->okay, NULL, NULL); + } +} + +static void MWAPI okay_activate(MwWidget handle, void* user, void* call) { + filechooser_t* fc = handle->parent->opaque; + char* t = (char*)MwGetText(fc->filename, MwNtext); + struct stat s; + char* p = NULL; + + (void)user; + (void)call; + + if(t != NULL && t[0] == '/') { + p = MwStringDuplicate(t); + } else { + p = MwDirectoryJoin(fc->path, t); + } + + if(t == NULL || strlen(t) == 0) { + MwWidget msgbox = MwMessageBox(handle->parent, fc->dir_only ? "You have to type directory!" : "You have to type filename!", "Error", MwMB_ICONERROR | MwMB_BUTTONOK); + MwAddUserHandler(MwMessageBoxGetChild(msgbox, MwMB_BUTTONOK), MwNactivateHandler, msgbox_okay, NULL); + } else if(stat(p, &s) != 0) { + MwWidget msgbox = MwMessageBox(handle->parent, "File does not exist!", "Error", MwMB_ICONERROR | MwMB_BUTTONOK); + MwAddUserHandler(MwMessageBoxGetChild(msgbox, MwMB_BUTTONOK), MwNactivateHandler, msgbox_okay, NULL); +#ifdef _S_IFDIR + } else if(fc->dir_only ? ((s.st_mode & _S_IFDIR) != _S_IFDIR) : 0) { +#else + } else if(fc->dir_only ? !S_ISDIR(s.st_mode) : 0) { +#endif + MwWidget msgbox = MwMessageBox(handle->parent, "File is not permitted here!", "Error", MwMB_ICONERROR | MwMB_BUTTONOK); + MwAddUserHandler(MwMessageBoxGetChild(msgbox, MwMB_BUTTONOK), MwNactivateHandler, msgbox_okay, NULL); + } else { + MwDispatchUserHandler(handle->parent, fc->dir_only ? MwNdirectoryChosenHandler : MwNfileChosenHandler, p); + okay(fc->okay, NULL, NULL); + } + + if(p != NULL) free(p); +} + +static void MWAPI nav_activate(MwWidget handle, void* user, void* call) { + int index = *(int*)call; + const char* e = MwListBoxGet(handle, index); + + (void)user; + + if(strcmp(e, "Home") == 0) { +#if defined(_WIN32) || defined(CLASSIC_MAC_OS) +#else + struct passwd* p = getpwuid(getuid()); + + scan(handle->parent, p->pw_dir, 1); +#endif + } +} + +static void MWAPI addr_up_activate(MwWidget handle, void* user, void* call) { + filechooser_t* fc = handle->parent->opaque; + char* p = MwDirectoryJoin(fc->path, ".."); + + (void)user; + (void)call; + + scan(handle->parent, p, 1); + + free(p); +} + +static void MWAPI addr_back_activate(MwWidget handle, void* user, void* call) { + filechooser_t* fc = handle->parent->opaque; + + (void)user; + (void)call; + + if(fc->history_seek > 1) { + fc->history_seek -= 2; + scan(handle->parent, fc->history[fc->history_seek], 0); + fc->history_seek++; + } +} + +static void MWAPI addr_fwd_activate(MwWidget handle, void* user, void* call) { + filechooser_t* fc = handle->parent->opaque; + + (void)user; + (void)call; + + if(fc->history_seek < arrlen(fc->history)) { + scan(handle->parent, fc->history[fc->history_seek++], 0); + } +} + +static void MWAPI addr_activate(MwWidget handle, void* user, void* call) { + (void)user; + (void)call; + + scan(handle->parent, MwGetText(handle, MwNtext), 1); +} + +static void layout(MwWidget handle) { + filechooser_t* fc = handle->opaque; + int w = MwGetInteger(handle, MwNwidth); + int h = MwGetInteger(handle, MwNheight); + int wx, wy, ww, wh; + + wx = 5; + wy = 5 + 24 + 5; + ww = 160; + wh = h - 10 - 24 - 5 - 24 - 5 - 24 - 5; + if(fc->nav == NULL) { + int index; + + fc->nav = MwVaCreateWidget(MwListBoxClass, "nav", handle, wx, wy, ww, wh, + MwNleftPadding, 16, + NULL); + + index = MwListBoxSet(fc->nav, -1, 0, "Home"); + MwListBoxSetIcon(fc->nav, index, fc->computer); + + MwAddUserHandler(fc->nav, MwNlistBoxActivateHandler, nav_activate, NULL); + } else { + MwVaApply(fc->nav, + MwNx, wx, + MwNy, wy, + MwNwidth, ww, + MwNheight, wh, + NULL); + } + + wx = 5 + 160 + 5; + wy = 5 + 24 + 5; + ww = w - 5 - 160 - 5 - 5; + wh = h - 10 - 24 - 5 - 24 - 5 - 24 - 5; + if(fc->files == NULL) { + fc->files = MwVaCreateWidget(MwListBoxClass, "files", handle, wx, wy, ww, wh, + MwNhasHeading, 1, + MwNleftPadding, 16, + NULL); + MwAddUserHandler(fc->files, MwNlistBoxActivateHandler, files_activate, NULL); + } else { + MwVaApply(fc->files, + MwNx, wx, + MwNy, wy, + MwNwidth, ww, + MwNheight, wh, + NULL); + } + + wx = 5 + ((24 + 5) * 3); + wy = 5; + ww = w - 10 - ((24 + 5) * 3); + wh = 24; + if(fc->addr == NULL) { + fc->addr = MwCreateWidget(MwEntryClass, "addr", handle, wx, wy, ww, wh); + MwAddUserHandler(fc->addr, MwNactivateHandler, addr_activate, NULL); + } else { + MwVaApply(fc->addr, + MwNx, wx, + MwNy, wy, + MwNwidth, ww, + MwNheight, wh, + NULL); + } + + wx = 5; + wy = 5; + ww = 24; + wh = 24; + if(fc->addr_back == NULL) { + fc->addr_back = MwVaCreateWidget(MwButtonClass, "addr_back", handle, wx, wy, ww, wh, + MwNpixmap, fc->back, + NULL); + MwAddUserHandler(fc->addr_back, MwNactivateHandler, addr_back_activate, NULL); + } else { + MwVaApply(fc->addr_back, + MwNx, wx, + MwNy, wy, + MwNwidth, ww, + MwNheight, wh, + NULL); + } + + wx = 5 + 24 + 5; + wy = 5; + ww = 24; + wh = 24; + if(fc->addr_fwd == NULL) { + fc->addr_fwd = MwVaCreateWidget(MwButtonClass, "addr_fwd", handle, wx, wy, ww, wh, + MwNpixmap, fc->forward, + NULL); + MwAddUserHandler(fc->addr_fwd, MwNactivateHandler, addr_fwd_activate, NULL); + } else { + MwVaApply(fc->addr_fwd, + MwNx, wx, + MwNy, wy, + MwNwidth, ww, + MwNheight, wh, + NULL); + } + + wx = 5 + 24 + 5 + 24 + 5; + wy = 5; + ww = 24; + wh = 24; + if(fc->addr_up == NULL) { + fc->addr_up = MwVaCreateWidget(MwButtonClass, "addr_up", handle, wx, wy, ww, wh, + MwNpixmap, fc->up, + NULL); + MwAddUserHandler(fc->addr_up, MwNactivateHandler, addr_up_activate, NULL); + } else { + MwVaApply(fc->addr_up, + MwNx, wx, + MwNy, wy, + MwNwidth, ww, + MwNheight, wh, + NULL); + } + + wx = 5 + ((24 + 5) * 3); + wy = h - 5 - 24 - 5 - 24; + ww = w - 10 - ((24 + 5) * 3); + wh = 24; + if(fc->filename == NULL) { + fc->filename = MwCreateWidget(MwEntryClass, "filename", handle, wx, wy, ww, wh); + MwAddUserHandler(fc->filename, MwNactivateHandler, okay_activate, NULL); + } else { + MwVaApply(fc->filename, + MwNx, wx, + MwNy, wy, + MwNwidth, ww, + MwNheight, wh, + NULL); + } + + wx = 5; + wy = h - 5 - 24 - 5 - 24; + ww = ((24 + 5) * 3); + wh = 24; + if(fc->filename_label == NULL) { + fc->filename_label = MwVaCreateWidget(MwLabelClass, "filename_label", handle, wx, wy, ww, wh, + MwNtext, fc->dir_only ? "Directory:" : "Filename:", + NULL); + } else { + MwVaApply(fc->filename_label, + MwNx, wx, + MwNy, wy, + MwNwidth, ww, + MwNheight, wh, + NULL); + } + + wx = w - 5 - 24 * 3 - 5 - 24 * 3; + wy = h - 5 - 24; + ww = 24 * 3; + wh = 24; + if(fc->okay == NULL) { + fc->okay = MwVaCreateWidget(MwButtonClass, "ok", handle, wx, wy, ww, wh, + MwNtext, "Okay", + NULL); + + MwAddUserHandler(fc->okay, MwNactivateHandler, okay_activate, NULL); + } else { + MwVaApply(fc->okay, + MwNx, wx, + MwNy, wy, + MwNwidth, ww, + MwNheight, wh, + NULL); + } + + wx = w - 5 - 24 * 3; + wy = h - 5 - 24; + ww = 24 * 3; + wh = 24; + if(fc->cancel == NULL) { + fc->cancel = MwVaCreateWidget(MwButtonClass, "cancel", handle, wx, wy, ww, wh, + MwNtext, "Cancel", + NULL); + + MwAddUserHandler(fc->cancel, MwNactivateHandler, filecancel, NULL); + } else { + MwVaApply(fc->cancel, + MwNx, wx, + MwNy, wy, + MwNwidth, ww, + MwNheight, wh, + NULL); + } +} + +static void MWAPI resize(MwWidget handle, void* user, void* call) { + (void)user; + (void)call; + + layout(handle); +} + +static int qsort_files(const void* a, const void* b) { + MwDirectoryEntry* aent = *(MwDirectoryEntry**)a; + MwDirectoryEntry* bent = *(MwDirectoryEntry**)b; + + return strcmp(aent->name, bent->name); +} + +static void scan(MwWidget handle, const char* path, int record) { + filechooser_t* fc = handle->opaque; + void* dir = MwDirectoryOpen(path); + int i; + int index; + + if(dir != NULL) { + MwDirectoryEntry* entry; + + arrfree(fc->sorted_entries); + for(i = 0; i < arrlen(fc->entries); i++) MwDirectoryFreeEntry(fc->entries[i]); + arrfree(fc->entries); + + while((entry = MwDirectoryRead(dir)) != NULL) arrput(fc->entries, entry); + MwDirectoryClose(dir); + + qsort(fc->entries, arrlen(fc->entries), sizeof(MwDirectoryEntry*), qsort_files); + + if(record) { + char* str = MwStringDuplicate(path); + + while(arrlen(fc->history) > fc->history_seek) { + free(fc->history[fc->history_seek]); + arrdel(fc->history, fc->history_seek); + } + + arrins(fc->history, fc->history_seek, str); + + fc->history_seek++; + } + } else { + MwWidget msgbox = MwMessageBox(handle, "Directory does not exist!", "Error", MwMB_ICONERROR | MwMB_BUTTONOK); + MwAddUserHandler(MwMessageBoxGetChild(msgbox, MwMB_BUTTONOK), MwNactivateHandler, msgbox_okay, NULL); + return; + } + + if(fc->path != NULL) free(fc->path); + fc->path = MwStringDuplicate(path); + + MwVaApply(fc->addr, + MwNtext, path, + NULL); + + if(fc->dir_only) { + MwVaApply(fc->filename, + MwNtext, path, + NULL); + } else { + MwVaApply(fc->filename, + MwNtext, "", + NULL); + } + + MwListBoxReset(fc->files); + MwListBoxSetWidth(fc->files, 0, -128 - 96); + MwListBoxSetWidth(fc->files, 1, 128); + MwListBoxSetWidth(fc->files, 2, 0); + + index = MwListBoxSet(fc->files, -1, 0, "Name"); + MwListBoxSet(fc->files, index, -1, "Date modified"); + MwListBoxSet(fc->files, index, -1, "Size"); + + for(i = 0; i < arrlen(fc->entries); i++) { + if(strcmp(fc->entries[i]->name, ".") == 0 || strcmp(fc->entries[i]->name, "..") == 0) continue; + if(fc->entries[i]->type == MwDIRECTORY_DIRECTORY) { + char date[128]; + char* n = MwACPToUTF8(fc->entries[i]->name); + + MwStringTime(date, fc->entries[i]->mtime); + + index = MwListBoxSet(fc->files, -1, 0, n); + MwListBoxSet(fc->files, index, -1, date); + MwListBoxSet(fc->files, index, -1, NULL); + MwListBoxSetIcon(fc->files, index, fc->dir); + + free(n); + + arrput(fc->sorted_entries, fc->entries[i]); + } + } + for(i = 0; i < arrlen(fc->entries); i++) { + if(fc->entries[i]->type == MwDIRECTORY_FILE && !fc->dir_only) { + char date[128]; + char size[128]; + char* n = MwACPToUTF8(fc->entries[i]->name); + + MwStringTime(date, fc->entries[i]->mtime); + MwStringSize(size, fc->entries[i]->size); + + index = MwListBoxSet(fc->files, -1, 0, n); + MwListBoxSet(fc->files, index, -1, date); + MwListBoxSet(fc->files, index, -1, size); + MwListBoxSetIcon(fc->files, index, fc->file); + + free(n); + + arrput(fc->sorted_entries, fc->entries[i]); + } + } +} + +static void setup_fallback_filechooser(MwWidget window, int dir) { + char* path; + MwLLPixmap icon; + filechooser_t* fc = malloc(sizeof(*fc)); + memset(fc, 0, sizeof(*fc)); + + fc->history_seek = 0; + + fc->dir = MwLoadIcon(window, MwIconDirectory); + fc->file = MwLoadIcon(window, MwIconFile); + fc->back = MwLoadIcon(window, MwIconBack); + fc->forward = MwLoadIcon(window, MwIconForward); + fc->up = MwLoadIcon(window, MwIconUp); + fc->computer = MwLoadIcon(window, MwIconComputer); + fc->dir_only = dir; + + icon = MwLoadIcon(window, MwIconSearch); + MwVaApply(window, + MwNiconPixmap, icon, + NULL); + + window->opaque = fc; + + window->destroy_inject = destroy; + + layout(window); + MwAddUserHandler(window, MwNresizeHandler, resize, NULL); + MwAddUserHandler(window, MwNcloseHandler, cancel_window, NULL); + + path = MwDirectoryCurrent(); + scan(window, path, 1); + free(path); + + MwLLBeginStateChange(window->lowlevel); + MwLLMakePopup(window->lowlevel, window == NULL ? NULL : window->lowlevel); + MwLLEndStateChange(window->lowlevel); +} + +MwWidget MwFileChooserEx(MwWidget handle, const char* title, int dir) { + MwWidget window; + int w, h; + int wx; + int wy; + + w = 700; + h = w * 2 / 3; + + if(handle == NULL) { + wx = wy = MwDEFAULT; + } else { + wx = MwGetInteger(handle, MwNx) + (MwGetInteger(handle, MwNwidth) - w) / 2; + wy = MwGetInteger(handle, MwNy) + (MwGetInteger(handle, MwNheight) - h) / 2; + } + + window = MwVaCreateWidget(MwWindowClass, "filechooser", NULL, wx, wy, w, h, + MwNtitle, title, + NULL); + if(handle != NULL) MwReparent(window, handle); + + setup_fallback_filechooser(window, dir); + + return window; +} + +MwWidget MwFileChooser(MwWidget handle, const char* title) { + return MwFileChooserEx(handle, title, 0); +} diff --git a/widget/milsko/milskosrc/src/dialog/messagebox.c b/widget/milsko/milskosrc/src/dialog/messagebox.c new file mode 100644 index 0000000000..6a96f6d2f7 --- /dev/null +++ b/widget/milsko/milskosrc/src/dialog/messagebox.c @@ -0,0 +1,137 @@ +#include + +#include "../external/stb_ds.h" + +typedef struct msgbox { + int key; + MwWidget value; +} msgbox_t; + +static void spawn_button(MwWidget handle, int x, int y, int id, const char* text) { + msgbox_t* mb = handle->opaque; + MwWidget widget = MwVaCreateWidget(MwButtonClass, text, handle, x, y, 80, 24, + MwNtext, text, + NULL); + + hmput(mb, id, widget); + + handle->opaque = mb; +} + +static void messagebox_destroy_inject(MwWidget handle) { + void* px; + + if((px = MwGetVoid(handle, MwNpixmap)) != NULL) MwLLDestroyPixmap(px); +} + +static void MWAPI messagebox_close(MwWidget handle, void* user, void* call) { + (void)user; + (void)call; + MwDestroyWidget(handle); +} + +MwWidget MwMessageBox(MwWidget handle, const char* text, const char* title, unsigned int flag) { + MwWidget window; + int w, h; + int left = 8; + int th; + int x = 0; + int wx; + int wy; + MwSizeHints sh; + + w = 512; + h = 32 * 4; + + if(handle == NULL) { + wx = wy = MwDEFAULT; + } else { + wx = MwGetInteger(handle, MwNx) + (MwGetInteger(handle, MwNwidth) - w) / 2; + wy = MwGetInteger(handle, MwNy) + (MwGetInteger(handle, MwNheight) - h) / 2; + } + + sh.min_width = sh.max_width = w; + sh.min_height = sh.max_height = h; + + window = MwVaCreateWidget(MwWindowClass, "messagebox", NULL, wx, wy, w, h, + MwNtitle, title, + MwNsizeHints, &sh, + NULL); + if(handle != NULL) MwReparent(window, handle); + + window->opaque = NULL; + + if(flag & MwMB_BUTTONOK) spawn_button(window, w - (x += 8 + 80), h - 8 - 24, MwMB_BUTTONOK, "OK"); + if(flag & MwMB_BUTTONCANCEL) spawn_button(window, w - (x += 8 + 80), h - 8 - 24, MwMB_BUTTONCANCEL, "Cancel"); + + if(flag & MwMB_BUTTONNO) spawn_button(window, w - (x += 8 + 80), h - 8 - 24, MwMB_BUTTONNO, "No"); + if(flag & MwMB_BUTTONYES) spawn_button(window, w - (x += 8 + 80), h - 8 - 24, MwMB_BUTTONYES, "Yes"); + + if((flag & MwMB_ICONMASK) != 0) { + MwWidget icon; + MwLLPixmap px; + MwU32* data = NULL; + + icon = MwCreateWidget(MwImageClass, "image", window, 8, (h - 48) / 2, 48, 48); + + switch(flag & MwMB_ICONMASK) { + case MwMB_ICONWARNING: + { + data = MwIconWarning; + break; + } + case MwMB_ICONINFO: + { + data = MwIconInfo; + break; + } + case MwMB_ICONNOTE: + { + data = MwIconNote; + break; + } + case MwMB_ICONNEWS: + { + data = MwIconNews; + break; + } + case MwMB_ICONERROR: + { + data = MwIconError; + break; + } + case MwMB_ICONCLOCK: + { + data = MwIconClock; + break; + } + } + + px = MwLoadIcon(icon, data); + + MwSetVoid(icon, MwNpixmap, px); + + left = 8 + 48 + 8; + } + + th = MwTextHeight(handle, NULL, text); + (void)MwVaCreateWidget(MwLabelClass, "label", window, left, (h - th) / 2, w - left - 8, th, + MwNtext, text, + MwNalignment, MwALIGNMENT_BEGINNING, + NULL); + + MwLLBeginStateChange(window->lowlevel); + MwLLMakePopup(window->lowlevel, handle == NULL ? NULL : handle->lowlevel); + MwLLEndStateChange(window->lowlevel); + + MwAddUserHandler(window, MwNcloseHandler, messagebox_close, NULL); + window->destroy_inject = messagebox_destroy_inject; + + return window; +} + +MwWidget MwMessageBoxGetChild(MwWidget handle, int child) { + msgbox_t* mb = handle->opaque; + + return hmget(mb, child); +} diff --git a/widget/milsko/milskosrc/src/draw.c b/widget/milsko/milskosrc/src/draw.c new file mode 100644 index 0000000000..ce86d90161 --- /dev/null +++ b/widget/milsko/milskosrc/src/draw.c @@ -0,0 +1,969 @@ +#include + +#ifdef NO_IMAGE +#elif defined(USE_STB_IMAGE) +#include "../external/stb_image.h" +#else +#include +#include +#include +#endif + +#include "../external/stb_ds.h" + +static int get_color_diff(MwWidget handle) { + if(MwGetInteger(handle, MwNmodernLook)) { + return 40; + } else { + return 80; + } +} + +static int hex(const char* txt, int len) { + int i; + int r = 0; + for(i = 0; i < len; i++) { + char c = txt[i]; + int n = 0; + if('a' <= c && c <= 'f') { + n = c - 'a' + 10; + } else if('A' <= c && c <= 'F') { + n = c - 'A' + 10; + } else if('0' <= c && c <= 'g') { + n = c - '0'; + } + r = r << 4; + r |= n; + } + return r; +} + +static void color_set_disabled_if_disabled(MwWidget handle, MwLLColor rgb) { + if(MwGetInteger(handle, MwNdisabled) == 1) { + MwLLColor c = handle->parent == NULL ? NULL : MwParseColor(handle->parent, MwGetText(handle->parent, MwNbackground)); + + if(c != NULL) { + rgb->common.red = rgb->common.red + (c->common.red - rgb->common.red) * 0.5; + rgb->common.green = rgb->common.green + (c->common.green - rgb->common.green) * 0.5; + rgb->common.blue = rgb->common.blue + (c->common.blue - rgb->common.blue) * 0.5; + MwLLColorUpdate(handle->lowlevel, rgb, rgb->common.red, rgb->common.green, rgb->common.blue); + + MwLLFreeColor(c); + } + } +}; + +void MwParseColorNoAllocate(const char* text, MwRGB* rgb) { + if(text[0] == '#' && strlen(text) == 4) { + rgb->red = hex(text + 1, 1); + rgb->green = hex(text + 2, 1); + rgb->blue = hex(text + 3, 1); + + rgb->red |= rgb->red << 4; + rgb->green |= rgb->green << 4; + rgb->blue |= rgb->blue << 4; + } else if(text[0] == '#' && strlen(text) == 7) { + rgb->red = hex(text + 1, 2); + rgb->green = hex(text + 3, 2); + rgb->blue = hex(text + 5, 2); + } else { + MwParseColorNameNoAllocate(text, rgb); + return; + } +} + +MwLLColor MwParseColor(MwWidget handle, const char* text) { + MwRGB rgb; + + rgb.red = 0; + rgb.green = 0; + rgb.blue = 0; + + MwParseColorNoAllocate(text, &rgb); + + return MwLLAllocColor(handle->lowlevel, rgb.red, rgb.green, rgb.blue); +} + +MwLLColor MwLightenColor(MwWidget handle, MwLLColor color, int r, int g, int b) { + int cr = color->common.red + r; + int cg = color->common.green + g; + int cb = color->common.blue + b; + + if(cr < 0) cr = 0; + if(cg < 0) cg = 0; + if(cb < 0) cb = 0; + if(cr > 255) cr = 255; + if(cg > 255) cg = 255; + if(cb > 255) cb = 255; + + return MwLLAllocColor(handle->lowlevel, cr, cg, cb); +} + +void MwDrawRect(MwWidget handle, MwRect* rect, MwLLColor color) { + MwPoint p[4]; + + p[0].x = rect->x; + p[0].y = rect->y; + + p[1].x = rect->x + rect->width; + p[1].y = rect->y; + + p[2].x = rect->x + rect->width; + p[2].y = rect->y + rect->height; + + p[3].x = rect->x; + p[3].y = rect->y + rect->height; + + MwLLPolygon(handle->lowlevel, p, 4, color); +} + +void MwDrawRectFading(MwWidget handle, MwRect* rect, MwLLColor color) { + MwLLPixmap pixmap; + int y; + double darken = 0.; + int ColorDiff = get_color_diff(handle); + double darkenStep = (ColorDiff / 2.) / rect->height; + unsigned long sz = 1 * rect->height * 4; + unsigned char* data = malloc(sz); + MwRect r = *rect; + if(rect->width <= 0 || rect->height <= 0) { + free(data); + return; + } + memset(data, 0, sz); + + r.x += 1; + r.y += 1; + r.width -= 2; + r.height -= 2; + + for(y = 0; y < rect->height; y++) { + MwLLColor col = MwLightenColor(handle, color, -darken, -darken, -darken); + int idx = y * 4; + color_set_disabled_if_disabled(handle, col); + data[idx] = col->common.red; + data[idx + 1] = col->common.green; + data[idx + 2] = col->common.blue; + data[idx + 3] = 255; + MwLLFreeColor(col); + darken += darkenStep; + } + + pixmap = MwLLCreatePixmap(handle->lowlevel, data, 1, rect->height); + MwLLDrawPixmap(handle->lowlevel, &r, pixmap); + MwLLDestroyPixmap(pixmap); + + free(data); +} + +void MwDrawFrame(MwWidget handle, MwRect* rect, MwLLColor color, int invert) { + MwDrawFrameWithBorder(handle, rect, color, invert, MwDefaultBorderWidth(handle)); +} + +static int translate_border(MwWidget handle, int border) { + if(border == MwDEFAULT) return MwDefaultBorderWidth(handle); + + return border; +} + +void MwDrawFrameWithBorder(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border) { + int inv; + + border = translate_border(handle, border); + + if((inv = MwGetInteger(handle, MwNforceInverted)) != MwDEFAULT && inv) invert = 1; + if(MwGetInteger(handle, MwNmodernLook)) { + MwDrawFrameEx(handle, rect, color, invert, border, 0, 0); + } else { + int diff = get_color_diff(handle) / 3 * 2; + + if(border >= 2) { + int i; + int st = invert ? 1 : 0; + for(i = st; i < st + 2; i++) { + if((i % 2) == 0) MwDrawFrameEx(handle, rect, color, invert, border - 1, -diff, (handle->parent == NULL || handle->parent->lowlevel == NULL) ? 1 : 0); + if((i % 2) == 1) MwDrawFrameEx(handle, rect, color, invert, 1, diff, 0); + } + } else { + MwDrawFrameEx(handle, rect, color, invert, border, 0, 0); + } + } +} + +void MwDrawWidgetBack(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border) { + MwLLColor col; + + if(rect->width <= 0 || rect->height <= 0) return; + + if(border) { + if(!handle->lowlevel->common.supports_transparency) { + MwLLColor c = handle->parent == NULL ? NULL : MwParseColor(handle->parent, MwGetText(handle->parent, MwNbackground)); + + if(c != NULL) { + MwDrawRect(handle, rect, c); + MwLLFreeColor(c); + } + } + + MwDrawFrameWithBorder(handle, rect, color, invert, border); + + if(border == MwDEFAULT) { + int d = MwDefaultBorderWidth(handle) - MwDefaultThinBorderWidth(handle); + + rect->x -= d; + rect->y -= d; + rect->width += d * 2; + rect->height += d * 2; + } + } + + if(rect->width <= 0 || rect->height <= 0) return; + + col = invert ? MwLightenColor(handle, color, -8, -8, -8) : MwLightenColor(handle, color, 0, 0, 0); + color_set_disabled_if_disabled(handle, col); + + if(MwGetInteger(handle, MwNmodernLook)) { + MwDrawRectFading(handle, rect, col); + } else { + MwDrawRect(handle, rect, col); + } + MwLLFreeColor(col); +} + +void MwDrawDiamond(MwWidget handle, MwRect* rect, MwLLColor color, int invert) { + MwPoint p[6]; + int border = MwDefaultBorderWidth(handle); + int ColorDiff = get_color_diff(handle) + (MwGetInteger(handle, MwNmodernLook) ? 48 : 0); + MwLLColor darker = MwLightenColor(handle, color, -ColorDiff, -ColorDiff, -ColorDiff); + MwLLColor lighter = MwLightenColor(handle, color, ColorDiff, ColorDiff, ColorDiff); + MwLLColor col = invert ? MwLightenColor(handle, color, -8, -8, -8) : MwLightenColor(handle, color, 0, 0, 0); + color_set_disabled_if_disabled(handle, col); + color_set_disabled_if_disabled(handle, darker); + color_set_disabled_if_disabled(handle, lighter); + + p[0].x = rect->x; + p[0].y = rect->y + rect->height / 2; + + p[1].x = rect->x + rect->width / 2; + p[1].y = rect->y; + + p[2].x = rect->x + rect->width; + p[2].y = rect->y + rect->height / 2; + + p[3].x = rect->x + rect->width - border; + p[3].y = rect->y + rect->height / 2; + + p[4].x = rect->x + rect->width / 2; + p[4].y = rect->y + border; + + p[5].x = rect->x + border; + p[5].y = rect->y + rect->height / 2; + + MwLLPolygon(handle->lowlevel, p, 6, invert ? darker : lighter); + + p[0].x = rect->x; + p[0].y = rect->y + rect->height / 2; + + p[1].x = rect->x + rect->width / 2; + p[1].y = rect->y + rect->height; + + p[2].x = rect->x + rect->width; + p[2].y = rect->y + rect->height / 2; + + p[3].x = rect->x + rect->width - border; + p[3].y = rect->y + rect->height / 2; + + p[4].x = rect->x + rect->width / 2; + p[4].y = rect->y + rect->height - border; + + p[5].x = rect->x + border; + p[5].y = rect->y + rect->height / 2; + + MwLLPolygon(handle->lowlevel, p, 6, invert ? lighter : darker); + + p[0].x = rect->x + rect->width / 2; + p[0].y = rect->y + border; + + p[1].x = rect->x + rect->width - border; + p[1].y = rect->y + rect->height / 2; + + p[2].x = rect->x + rect->width / 2; + p[2].y = rect->y + rect->height - border; + + p[3].x = rect->x + border; + p[3].y = rect->y + rect->height / 2; + + MwLLPolygon(handle->lowlevel, p, 4, col); + + MwLLFreeColor(col); + MwLLFreeColor(lighter); + MwLLFreeColor(darker); +} + +static void MwDrawFrameEx_simple(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border, int diff, int same) { + MwPoint p[7]; + int ColorDiff = get_color_diff(handle); + MwLLColor darker = MwLightenColor(handle, color, -ColorDiff * 3 / 2 + diff, -ColorDiff * 3 / 2 + diff, -ColorDiff * 3 / 2 + diff); + MwLLColor lighter = same ? MwLightenColor(handle, darker, 0, 0, 0) : MwLightenColor(handle, color, ColorDiff - diff, ColorDiff - diff, ColorDiff - diff); + color_set_disabled_if_disabled(handle, darker); + color_set_disabled_if_disabled(handle, lighter); + + p[0].x = rect->x; + p[0].y = rect->y; + + p[1].x = rect->x + rect->width; + p[1].y = rect->y; + + p[2].x = rect->x + rect->width - border; + p[2].y = rect->y + border; + p[3].x = rect->x + border; + p[3].y = rect->y + border; + + p[4].x = rect->x + border; + p[4].y = rect->y + rect->height - border; + + p[5].x = rect->x; + p[5].y = rect->y + rect->height; + MwLLPolygon(handle->lowlevel, p, 6, invert ? darker : lighter); + + p[0].x = rect->x + rect->width; + p[0].y = rect->y; + + p[1].x = rect->x + rect->width - border; + p[1].y = rect->y + border; + + p[2].x = rect->x + rect->width - border; + p[2].y = rect->y + rect->height - border; + + p[3].x = rect->x + border; + p[3].y = rect->y + rect->height - border; + + p[4].x = rect->x; + p[4].y = rect->y + rect->height; + + p[5].x = rect->x + rect->width; + p[5].y = rect->y + rect->height; + MwLLPolygon(handle->lowlevel, p, 6, invert ? lighter : darker); + + MwLLFreeColor(lighter); + MwLLFreeColor(darker); + + rect->x += border; + rect->y += border; + rect->width -= border * 2; + rect->height -= border * 2; +} + +static void frame_border_complex(MwWidget handle, MwRect* rect, MwLLColor lighter, MwLLColor darker, int invert, int border, int diff, int same) { + MwPoint p[7]; + + (void)diff; + (void)same; + + p[0].x = rect->x; + p[0].y = rect->y; + + p[1].x = rect->x + rect->width; + p[1].y = rect->y; + + p[2].x = rect->x + rect->width - border; + p[2].y = rect->y + border; + p[3].x = rect->x + border; + p[3].y = rect->y + border; + + p[4].x = rect->x + border; + p[4].y = rect->y + rect->height - border; + + p[5].x = rect->x; + p[5].y = rect->y + rect->height; + MwLLPolygon(handle->lowlevel, p, 6, invert ? lighter : darker); + + p[0].x = rect->x + rect->width; + p[0].y = rect->y; + + p[1].x = rect->x + rect->width - border; + p[1].y = rect->y + border; + + p[2].x = rect->x + rect->width - border; + p[2].y = rect->y + rect->height - border; + + p[3].x = rect->x + border; + p[3].y = rect->y + rect->height - border; + + p[4].x = rect->x; + p[4].y = rect->y + rect->height; + + p[5].x = rect->x + rect->width; + p[5].y = rect->y + rect->height; + MwLLPolygon(handle->lowlevel, p, 6, invert ? lighter : darker); +} + +static void MwDrawFrameEx_complex(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border, int diff, int same) { + int ColorDiff = get_color_diff(handle); + MwLLColor darker = MwLightenColor(handle, color, -ColorDiff * 3 / 2 + diff, -ColorDiff * 3 / 2 + diff, -ColorDiff * 3 / 2 + diff); + MwLLColor lighter = same ? MwLightenColor(handle, darker, 0, 0, 0) : MwLightenColor(handle, color, (ColorDiff / 2) - diff, (ColorDiff / 2) - diff, (ColorDiff / 2) - diff); + MwRect r = *rect; + + color_set_disabled_if_disabled(handle, darker); + color_set_disabled_if_disabled(handle, lighter); + + frame_border_complex(handle, rect, lighter, darker, invert, border == 1 ? 1 : (border / 2), diff, same); + + if(border > 1) { + r.x += border / 2; + r.y += border / 2; + r.width -= border; + r.height -= border; + frame_border_complex(handle, &r, lighter, darker, !invert, border / 2, diff, same); + } + + MwLLFreeColor(lighter); + MwLLFreeColor(darker); + + rect->x += border; + rect->y += border; + rect->width -= border * 2; + rect->height -= border * 2; +} + +void MwDrawFrameEx(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int border, int diff, int same) { + border = translate_border(handle, border); + + if(MwGetInteger(handle, MwNmodernLook)) { + MwDrawFrameEx_complex(handle, rect, color, invert, border, diff, same); + } else { + MwDrawFrameEx_simple(handle, rect, color, invert, border, diff, same); + } +} + +void MwDrawTriangle(MwWidget handle, MwRect* rect, MwLLColor color, int invert, int direction) { + MwPoint p1[4], p2[4], p3[4], p4[3]; + const int border = MwGetInteger(handle, MwNmodernLook) ? 2 : MwDefaultBorderWidth(handle); + int ColorDiff = get_color_diff(handle); + MwLLColor darker = MwLightenColor(handle, color, -ColorDiff, -ColorDiff, -ColorDiff); + MwLLColor lighter = MwLightenColor(handle, color, ColorDiff, ColorDiff, ColorDiff); + MwLLColor col = invert ? MwLightenColor(handle, color, -8, -8, -8) : MwLightenColor(handle, color, 0, 0, 0); + double deg = 30 * ((direction == MwEAST || direction == MwWEST) ? 2 : 1); + double c = cos(deg / 180 * M_PI); + double s = sin(deg / 180 * M_PI); + + color_set_disabled_if_disabled(handle, col); + color_set_disabled_if_disabled(handle, darker); + color_set_disabled_if_disabled(handle, lighter); + + if(direction == MwNORTH) { + p1[0].x = rect->x + rect->width / 2; + p1[0].y = rect->y; + + p1[1].x = rect->x; + p1[1].y = rect->y + rect->height; + + p1[2].x = rect->x + c * border; + p1[2].y = rect->y + rect->height - s * border; + + p1[3].x = rect->x + rect->width / 2; + p1[3].y = rect->y + border; + + p2[0].x = rect->x + rect->width / 2; + p2[0].y = rect->y; + + p2[1].x = rect->x + rect->width; + p2[1].y = rect->y + rect->height; + + p2[2].x = rect->x + rect->width - c * border; + p2[2].y = rect->y + rect->height - s * border; + + p2[3].x = rect->x + rect->width / 2; + p2[3].y = rect->y + border; + + p3[0].x = rect->x + c * border; + p3[0].y = rect->y + rect->height - s * border; + + p3[1].x = rect->x; + p3[1].y = rect->y + rect->height; + + p3[2].x = rect->x + rect->width; + p3[2].y = rect->y + rect->height; + + p3[3].x = rect->x + rect->width - c * border; + p3[3].y = rect->y + rect->height - s * border; + + MwLLPolygon(handle->lowlevel, p1, 4, invert ? darker : lighter); + MwLLPolygon(handle->lowlevel, p2, 4, invert ? lighter : darker); + MwLLPolygon(handle->lowlevel, p3, 4, invert ? lighter : darker); + + p4[0].x = rect->x + c * border; + p4[0].y = rect->y + rect->height - s * border; + + p4[1].x = rect->x + rect->width - c * border; + p4[1].y = rect->y + rect->height - s * border; + + p4[2].x = rect->x + rect->width / 2; + p4[2].y = rect->y + border; + } else if(direction == MwSOUTH) { + p1[0].x = rect->x; + p1[0].y = rect->y; + + p1[1].x = rect->x + c * border; + p1[1].y = rect->y + s * border; + + p1[2].x = rect->x + rect->width - c * border; + p1[2].y = rect->y + s * border; + + p1[3].x = rect->x + rect->width; + p1[3].y = rect->y; + + p2[0].x = rect->x; + p2[0].y = rect->y; + + p2[1].x = rect->x + c * border; + p2[1].y = rect->y + s * border; + + p2[2].x = rect->x + rect->width / 2; + p2[2].y = rect->y + rect->height - border; + + p2[3].x = rect->x + rect->width / 2; + p2[3].y = rect->y + rect->height; + + p3[0].x = rect->x + rect->width; + p3[0].y = rect->y; + + p3[1].x = rect->x + rect->width / 2; + p3[1].y = rect->y + rect->height; + + p3[2].x = rect->x + rect->width / 2; + p3[2].y = rect->y + rect->height - border; + + p3[3].x = rect->x + rect->width - c * border; + p3[3].y = rect->y + s * border; + + MwLLPolygon(handle->lowlevel, p1, 4, invert ? darker : lighter); + MwLLPolygon(handle->lowlevel, p2, 4, invert ? darker : lighter); + MwLLPolygon(handle->lowlevel, p3, 4, invert ? lighter : darker); + + p4[0].x = rect->x + c * border; + p4[0].y = rect->y + s * border; + + p4[1].x = rect->x + rect->width - c * border; + p4[1].y = rect->y + s * border; + + p4[2].x = rect->x + rect->width / 2; + p4[2].y = rect->y + rect->height - border; + } else if(direction == MwEAST) { + p1[0].x = rect->x; + p1[0].y = rect->y; + + p1[1].x = rect->x + c * border; + p1[1].y = rect->y + s * border; + + p1[2].x = rect->x + c * border; + p1[2].y = rect->y + rect->height - s * border; + + p1[3].x = rect->x; + p1[3].y = rect->y + rect->height; + + p2[0].x = rect->x; + p2[0].y = rect->y; + + p2[1].x = rect->x + rect->width; + p2[1].y = rect->y + rect->height / 2; + + p2[2].x = rect->x + rect->width - border; + p2[2].y = rect->y + rect->height / 2; + + p2[3].x = rect->x + c * border; + p2[3].y = rect->y + s * border; + + p3[0].x = rect->x + c * border; + p3[0].y = rect->y + rect->height - s * border; + + p3[1].x = rect->x; + p3[1].y = rect->y + rect->height; + + p3[2].x = rect->x + rect->width; + p3[2].y = rect->y + rect->height / 2; + + p3[3].x = rect->x + rect->width - border; + p3[3].y = rect->y + rect->height / 2; + + MwLLPolygon(handle->lowlevel, p1, 4, invert ? darker : lighter); + MwLLPolygon(handle->lowlevel, p2, 4, invert ? darker : lighter); + MwLLPolygon(handle->lowlevel, p3, 4, invert ? lighter : darker); + + p4[0].x = rect->x + rect->width - border; + p4[0].y = rect->y + rect->height / 2; + + p4[1].x = rect->x + c * border; + p4[1].y = rect->y + rect->height - s * border; + + p4[2].x = rect->x + c * border; + p4[2].y = rect->y + s * border; + } else if(direction == MwWEST) { + p1[0].x = rect->x; + p1[0].y = rect->y + rect->height / 2; + + p1[1].x = rect->x + border; + p1[1].y = rect->y + rect->height / 2; + + p1[2].x = rect->x + rect->width - c * border; + p1[2].y = rect->y + s * border; + + p1[3].x = rect->x + rect->width; + p1[3].y = rect->y; + + p2[0].x = rect->x; + p2[0].y = rect->y + rect->height / 2; + + p2[1].x = rect->x + border; + p2[1].y = rect->y + rect->height / 2; + + p2[2].x = rect->x + rect->width - c * border; + p2[2].y = rect->y + rect->height - s * border; + + p2[3].x = rect->x + rect->width; + p2[3].y = rect->y + rect->height; + + p3[0].x = rect->x + rect->width; + p3[0].y = rect->y; + + p3[1].x = rect->x + rect->width - c * border; + p3[1].y = rect->y + s * border; + + p3[2].x = rect->x + rect->width - c * border; + p3[2].y = rect->y + rect->height - s * border; + + p3[3].x = rect->x + rect->width; + p3[3].y = rect->y + rect->height; + + MwLLPolygon(handle->lowlevel, p1, 4, invert ? darker : lighter); + MwLLPolygon(handle->lowlevel, p2, 4, invert ? lighter : darker); + MwLLPolygon(handle->lowlevel, p3, 4, invert ? lighter : darker); + + p4[0].x = rect->x + border; + p4[0].y = rect->y + rect->height / 2; + + p4[1].x = rect->x + rect->width - c * border; + p4[1].y = rect->y + rect->height - s * border; + + p4[2].x = rect->x + rect->width - c * border; + p4[2].y = rect->y + s * border; + } + MwLLPolygon(handle->lowlevel, p4, 3, col); + + MwLLFreeColor(col); + MwLLFreeColor(lighter); + MwLLFreeColor(darker); +} + +#if defined(NO_IMAGE) +#elif !defined(USE_STB_IMAGE) +static void PNGCAPI user_error(png_structp png, const char* str) { + (void)str; + + longjmp(png_jmpbuf(png), 1); +} + +static void PNGCAPI user_warning(png_structp png, const char* str) { + (void)png; + (void)str; +} + +static unsigned char* load_png(FILE* f, int* w, int* h) { + png_structp png = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); + png_infop info = png_create_info_struct(png); + int depth, type, i; + unsigned char* data; + unsigned char* row; + + if(setjmp(png_jmpbuf(png))) { + png_destroy_read_struct(&png, &info, NULL); + return NULL; + } + + png_set_error_fn(png, NULL, user_error, user_warning); + + png_init_io(png, f); + png_read_info(png, info); + + *w = png_get_image_width(png, info); + *h = png_get_image_height(png, info); + depth = png_get_bit_depth(png, info); + type = png_get_color_type(png, info); + + if(depth == 16) png_set_strip_16(png); + if(type == PNG_COLOR_TYPE_PALETTE) png_set_palette_to_rgb(png); + if(type == PNG_COLOR_TYPE_GRAY && depth < 8) png_set_expand_gray_1_2_4_to_8(png); + if(png_get_valid(png, info, PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png); + if(type == PNG_COLOR_TYPE_RGB || type == PNG_COLOR_TYPE_GRAY || type == PNG_COLOR_TYPE_PALETTE) png_set_filler(png, 0xFF, PNG_FILLER_AFTER); + if(type == PNG_COLOR_TYPE_GRAY || type == PNG_COLOR_TYPE_GRAY_ALPHA) png_set_gray_to_rgb(png); + png_read_update_info(png, info); + + data = malloc((*w) * (*h) * 4); + + row = malloc(png_get_rowbytes(png, info)); + for(i = 0; i < (*h); i++) { + png_read_row(png, row, NULL); + memcpy(&data[i * (*w) * 4], row, png_get_rowbytes(png, info)); + } + free(row); + + png_destroy_read_struct(&png, &info, NULL); + + return data; +} + +static void jpeg_err(j_common_ptr cinfo) { + jmp_buf* j = cinfo->client_data; + + longjmp(*j, 1); +} + +static unsigned char* load_jpeg(FILE* f, int* w, int* h) { + struct jpeg_decompress_struct cinfo; + struct jpeg_error_mgr jerr; + jmp_buf* j = malloc(sizeof(*j)); + unsigned char* data; + unsigned char* row; + int i; + + if(setjmp(*j)) { + jpeg_destroy_decompress(&cinfo); + free(j); + return NULL; + } + + cinfo.client_data = j; + cinfo.err = jpeg_std_error(&jerr); + jerr.error_exit = jpeg_err; + + jpeg_create_decompress(&cinfo); + jpeg_stdio_src(&cinfo, f); + jpeg_read_header(&cinfo, TRUE); + + jpeg_start_decompress(&cinfo); + + *w = cinfo.output_width; + *h = cinfo.output_height; + + data = malloc((*w) * (*h) * 4); + row = malloc((*h) * cinfo.num_components); + for(i = 0; i < (*h); i++) { + int j; + jpeg_read_scanlines(&cinfo, &row, 1); + + for(j = 0; j < (*w); j++) { + unsigned char* from = &row[j * cinfo.num_components]; + unsigned char* to = &data[(i * (*w) + j) * 4]; + + memcpy(to, from, 3); + to[3] = 255; + } + } + free(row); + + jpeg_finish_decompress(&cinfo); + jpeg_destroy_decompress(&cinfo); + + free(j); + + return data; +} +#endif + +static unsigned char* load_image(const char* path, int* w, int* h) { +#if defined(NO_IMAGE) + return NULL; +#elif defined(USE_STB_IMAGE) + int ch; + + return stbi_load(path, w, h, &ch, 4); +#else + FILE* f = fopen(path, "rb"); + unsigned char* d; + if(f == NULL) return NULL; + + if((d = load_png(f, w, h)) != NULL) return d; + fseek(f, 0, SEEK_SET); + + if((d = load_jpeg(f, w, h)) != NULL) return d; + fseek(f, 0, SEEK_SET); + + fclose(f); + + return NULL; +#endif +} + +MwLLPixmap MwLoadImage(MwWidget handle, const char* path) { + int width, height; + unsigned char* rgb = load_image(path, &width, &height); + MwLLPixmap px; + + if(rgb == NULL) return NULL; + + px = MwLoadRaw(handle, rgb, width, height); + + free(rgb); + + return px; +} + +MwLLPixmap MwLoadRaw(MwWidget handle, unsigned char* rgb, int width, int height) { + MwLLPixmap px = MwLLCreatePixmap(handle->lowlevel, rgb, width, height); + + px->common.user = handle; + MwPixmapReloadRaw(px, rgb); + + return px; +} + +void MwPixmapReloadRaw(MwLLPixmap px, unsigned char* rgb) { + int i; + MwWidget handle = px->common.user; + MwLLColor base = handle->bgcolor == NULL ? MwParseColor(handle, MwGetText(handle, MwNbackground)) : handle->bgcolor; + + memset(px->common.raw, 0, px->common.width * px->common.height * 4); + for(i = 0; i < px->common.width * px->common.height; i++) { + unsigned char* pin = &rgb[i * 4]; + unsigned char* pout = &px->common.raw[i * 4]; + double a = pin[3]; + + a /= 255; + if(a != 0) { + pout[0] = pin[0] * a; + pout[1] = pin[1] * a; + pout[2] = pin[2] * a; + + pout[0] += base->common.red * (1 - a); + pout[1] += base->common.green * (1 - a); + pout[2] += base->common.blue * (1 - a); + pout[3] = 255; + } + } + + if(handle->bgcolor == NULL) MwLLFreeColor(base); + + MwLLPixmapUpdate(px); +} + +unsigned char* MwPixmapGetRaw(MwLLPixmap pixmap) { + return pixmap->common.raw; +} + +void MwPixmapGetSize(MwLLPixmap pixmap, MwRect* rect) { + rect->width = pixmap->common.width; + rect->height = pixmap->common.height; +} + +void MwColorGet(MwLLColor color, int* red, int* green, int* blue) { + *red = color->common.red; + *green = color->common.green; + *blue = color->common.blue; +} + +MwLLPixmap MwLoadIcon(MwWidget handle, MwU32* data) { + int width = (data[0] >> 16) & 0xffff; + int height = (data[0]) & 0xffff; + unsigned char* rgba = malloc(width * height * 4); + MwLLPixmap px; + int i; + + memset(rgba, 0, width * height * 4); + + for(i = 0; i < width * height; i++) { + unsigned char* px = &rgba[i * 4]; + + px[0] = (data[i + 1] >> 24) & 0xff; + px[1] = (data[i + 1] >> 16) & 0xff; + px[2] = (data[i + 1] >> 8) & 0xff; + px[3] = data[i + 1] & 0xff; + } + + px = MwLoadRaw(handle, rgba, width, height); + + free(rgba); + + return px; +} + +typedef struct color { + char* key; + char* value; + int r; + int g; + int b; + int a; +} color_t; + +MwLLPixmap MwLoadXPM(MwWidget handle, char** data) { + int col, row, colors, cpp; + unsigned char* rgb; + MwLLPixmap px; + color_t* c = NULL; + int i, y, x; + char* comp; + + sh_new_strdup(c); + + sscanf(data[0], "%d %d %d %d", &col, &row, &colors, &cpp); + + for(i = 0; i < colors; i++) { + char k[128]; + char* v = data[i + 1] + cpp + 3; + int ind; + if(strcmp(v, "None") == 0) { + memcpy(k, data[i + 1], cpp); + k[cpp] = 0; + + shput(c, k, v); + ind = shgeti(c, k); + + c[ind].r = 0; + c[ind].g = 0; + c[ind].b = 0; + c[ind].a = 0; + } else { + MwLLColor color = MwParseColor(handle, v); + + memcpy(k, data[i + 1], cpp); + k[cpp] = 0; + + shput(c, k, v); + ind = shgeti(c, k); + + c[ind].r = color->common.red; + c[ind].g = color->common.green; + c[ind].b = color->common.blue; + c[ind].a = 255; + + MwLLFreeColor(color); + } + } + + rgb = malloc(row * col * 4); + comp = malloc(cpp + 1); + comp[cpp] = 0; + for(y = 0; y < row; y++) { + for(x = 0; x < col; x++) { + unsigned char* pout = &rgb[(y * col + x) * 4]; + color_t colent; + memcpy(comp, &data[1 + colors + y][x * cpp], cpp); + + colent = shgets(c, comp); + + pout[0] = colent.r; + pout[1] = colent.g; + pout[2] = colent.b; + pout[3] = colent.a; + } + } + free(comp); + + px = MwLoadRaw(handle, rgb, col, row); + + free(rgb); + + shfree(c); + + return px; +} diff --git a/widget/milsko/milskosrc/src/icon/back.c b/widget/milsko/milskosrc/src/icon/back.c new file mode 100644 index 0000000000..20f2c5c7b4 --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/back.c @@ -0,0 +1,445 @@ +#include + +MwU32 MwIconBack[] = { + (20 << 16) | 22, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x666666FF, + 0xCCFFFF00, + 0x333333FF, + 0x333333FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x999999FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x666666FF, + 0xCCFFFF00, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x999999FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x666666FF, + 0xCCFFFF00, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x999999FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x666666FF, + 0xCCFFFF00, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0xCCFFFF00, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x999999FF, + 0x333333FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x999999FF, + 0x333333FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x999999FF, + 0x333333FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x333333FF, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x999999FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x666666FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x333333FF, + 0x999999FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x333333FF, + 0x999999FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x333333FF, + 0x999999FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0}; diff --git a/widget/milsko/milskosrc/src/icon/clock.c b/widget/milsko/milskosrc/src/icon/clock.c new file mode 100644 index 0000000000..ccdafef47d --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/clock.c @@ -0,0 +1,2309 @@ +#include + +MwU32 MwIconClock[] = { + (48 << 16) | 48, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000022, + 0x0000004F, + 0x0000006C, + 0x00000077, + 0x0000006A, + 0x0000004B, + 0x00000021, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000024, + 0x00000084, + 0x000000E2, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000DC, + 0x0000008C, + 0x00000023, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000001B, + 0x000000AB, + 0x000000FE, + 0x010303FF, + 0x163C3DFF, + 0x327B7CFF, + 0x48A6A7FF, + 0x58C0C1FF, + 0x62CACBFF, + 0x67C8C9FF, + 0x5FB0B0FF, + 0x4C8687FF, + 0x2A4747FF, + 0x030606FF, + 0x000000FD, + 0x000000A5, + 0x0000001A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000001, + 0x0000006C, + 0x000000F2, + 0x020708FF, + 0x216364FF, + 0x43B4B6FF, + 0x52CBCDFF, + 0x5AD0D1FF, + 0x61D4D5FF, + 0x69D8D9FF, + 0x71DCDDFF, + 0x79E0E1FF, + 0x81E4E5FF, + 0x88E8E9FF, + 0x90ECEDFF, + 0x8AD9DAFF, + 0x4D7676FF, + 0x060909FF, + 0x000000F2, + 0x00000074, + 0x00000004, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000000D, + 0x000000AB, + 0x000000FF, + 0x113738FF, + 0x3AABACFF, + 0x4AC7C9FF, + 0x52CBCDFF, + 0x5AD0D1FF, + 0x61D4D5FF, + 0x69D8D9FF, + 0x71DCDDFF, + 0x79E0E1FF, + 0x81E4E5FF, + 0x88E8E9FF, + 0x90ECEDFF, + 0x98F0F1FF, + 0xA0F4F5FF, + 0xA8F8F9FF, + 0x99DCDDFF, + 0x374F4FFF, + 0x000000FF, + 0x000000BC, + 0x00000013, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000001D, + 0x000000D4, + 0x030707FF, + 0x4D9899FF, + 0x8CE4E5FF, + 0xABF0F0FF, + 0xBBF4F5FF, + 0xC2F5F5FF, + 0xBDF2F3FF, + 0xAEECEDFF, + 0x96E6E6FF, + 0x7BE1E2FF, + 0x81E4E5FF, + 0x88E8E9FF, + 0x90ECEDFF, + 0x98F0F1FF, + 0xA0F4F5FF, + 0xA8F8F9FF, + 0xAFFCFDFF, + 0xB0FBFCFF, + 0xAAF6F7FF, + 0x699A9BFF, + 0x050707FF, + 0x000000DD, + 0x0000002C, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000028, + 0x000000E2, + 0x162828FF, + 0x7ED4D6FF, + 0x86E2E2FF, + 0x7DDEDEFF, + 0x81DEDFFF, + 0x91E3E4FF, + 0xB1EDEFFF, + 0xD3F8F8FF, + 0xE0FAFAFF, + 0xE9FCFCFF, + 0xE8FAFBFF, + 0xC0F3F4FF, + 0x93EDEEFF, + 0x98F0F1FF, + 0xA0F4F5FF, + 0xA8F8F9FF, + 0xAFFCFDFF, + 0xB0FBFCFF, + 0xAAF6F7FF, + 0xA4F1F2FF, + 0x9FECEDFF, + 0x79B7B8FF, + 0x101818FF, + 0x000000EC, + 0x00000029, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002D, + 0x000000EB, + 0x0C2325FF, + 0x54C3C6FF, + 0x42C6C8FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x49C8CAFF, + 0x8ADFE1FF, + 0xD7F6F6FF, + 0xFCFEFFFF, + 0xFAFDFDFF, + 0xE5FAFAFF, + 0xB4F5F6FF, + 0xA8F8F9FF, + 0xAFFCFDFF, + 0xB0FBFCFF, + 0xAAF6F7FF, + 0xA4F1F2FF, + 0x9FECEDFF, + 0x99E7E8FF, + 0x93E2E3FF, + 0x7DC4C5FF, + 0x0F1919FF, + 0x000000E3, + 0x0000001E, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000014, + 0x000000DD, + 0x091A1BFF, + 0x3DBBBDFF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x89DDDFFF, + 0xE4F9F9FF, + 0xEBF8F8FF, + 0xE3F5F5FF, + 0xC7F8F8FF, + 0xB0FBFCFF, + 0xAAF6F7FF, + 0xA4F1F2FF, + 0x9FECEDFF, + 0x99E7E8FF, + 0x93E2E3FF, + 0x8DDDDEFF, + 0x87D9DAFF, + 0x6CAFB0FF, + 0x080E0EFF, + 0x000000D5, + 0x0000000A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000091, + 0x020505FF, + 0x35A3A5FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x3CB9BBFF, + 0x37A9ABFF, + 0x3BB7B9FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x49C9CBFF, + 0xAFEAEBFF, + 0xDAF3F3FF, + 0xD3F0F0FF, + 0xC0F0F1FF, + 0xA5F1F2FF, + 0x9FECEDFF, + 0x99E7E8FF, + 0x93E2E3FF, + 0x8DDDDEFF, + 0x87D8D9FF, + 0x82D4D5FF, + 0x7CCFD0FF, + 0x579696FF, + 0x010202FF, + 0x00000095, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000001A, + 0x000000F7, + 0x1C5757FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x2A8283FF, + 0x0D2929FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x061314FF, + 0x1A5051FF, + 0x339EA0FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x83DEDFFF, + 0xCAEDEEFF, + 0xC4EBEBFF, + 0xB3E9EAFF, + 0x99E7E8FF, + 0x93E2E3FF, + 0x8DDDDEFF, + 0x87D9DAFF, + 0x82D4D5FF, + 0x7CCFD0FF, + 0x76CACBFF, + 0x70C5C6FF, + 0x305758FF, + 0x000000FE, + 0x00000049, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000067, + 0x000000FF, + 0x37ABACFF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x1D5859FF, + 0x000000FF, + 0x000000FF, + 0x1E1E2EFF, + 0x46466AFF, + 0x4E4E74FF, + 0x3A3A54FF, + 0x111119FF, + 0x000000FF, + 0x143C3DFF, + 0x38ACAEFF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x63D2D4FF, + 0xB8E8E8FF, + 0xB5E5E6FF, + 0xA1E3E3FF, + 0x8DDDDEFF, + 0x87D9DAFF, + 0x82D4D5FF, + 0x7CCFD0FF, + 0x76CACBFF, + 0x70C5C6FF, + 0x6AC0C1FF, + 0x62B6B7FF, + 0x101F20FF, + 0x000000DB, + 0x00000004, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000AB, + 0x0A1E1EFF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x2B8485FF, + 0x000000FF, + 0x0B0B11FF, + 0x7474B4FF, + 0xAAAAFFFF, + 0xADADFFFF, + 0xB1B1FFFF, + 0xB4B4FFFF, + 0xB3B3FBFF, + 0x8080B2FF, + 0x262634FF, + 0x030808FF, + 0x27797AFF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x5BCECFFF, + 0xAAE3E3FF, + 0xA5E0E1FF, + 0x90DADBFF, + 0x82D4D5FF, + 0x7CCFD0FF, + 0x76CACBFF, + 0x70C5C6FF, + 0x6AC0C1FF, + 0x65BBBCFF, + 0x5FB6B7FF, + 0x3E7C7DFF, + 0x000000FF, + 0x00000064, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000D6, + 0x133B3CFF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x0A1F1FFF, + 0x010102FF, + 0x7E7EC2FF, + 0xAAAAFFFF, + 0xB8B8FFFF, + 0xDEDEFFFF, + 0xEEEEFFFF, + 0xEDEDFFFF, + 0xE1E1FFFF, + 0xCACAFFFF, + 0xBEBEFDFF, + 0x6F6F94FF, + 0x060608FF, + 0x1C5757FF, + 0x3FC3C5FF, + 0x40C5C7FF, + 0x5BCDCFFF, + 0x9CDDDEFF, + 0x95DADBFF, + 0x7ED0D1FF, + 0x76CACBFF, + 0x70C5C6FF, + 0x6AC0C1FF, + 0x65BBBCFF, + 0x5FB6B7FF, + 0x59B1B2FF, + 0x53ACADFF, + 0x112526FF, + 0x000000E0, + 0x00000005, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000EA, + 0x194E4FFF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x34A1A3FF, + 0x000000FF, + 0x393959FF, + 0xA8A8FFFF, + 0xBDBDFFFF, + 0xFAFAFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFEFEFEFF, + 0x777777FF, + 0xD1D1E0FF, + 0xCCCCFFFF, + 0x9A9AC8FF, + 0x121218FF, + 0x194C4DFF, + 0x40C4C6FF, + 0x40C5C7FF, + 0x63CECFFF, + 0x8DD7D8FF, + 0x81D1D2FF, + 0x70C5C6FF, + 0x6AC0C1FF, + 0x65BBBCFF, + 0x5FB6B7FF, + 0x59B1B2FF, + 0x53ACADFF, + 0x4DA7A8FF, + 0x327273FF, + 0x000000FF, + 0x0000004E, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FB, + 0x1F5F60FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x297F80FF, + 0x000000FF, + 0x7373B1FF, + 0xACACFFFF, + 0xF2F2FFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xF6F6FEFF, + 0xD4D4EBFF, + 0xE0E0FFFF, + 0x383838FF, + 0x6F6F72FF, + 0xFCFCFFFF, + 0xD7D7FFFF, + 0xAAAAD9FF, + 0x111116FF, + 0x1E5B5CFF, + 0x40C5C7FF, + 0x30A3A5FF, + 0x6CC6C7FF, + 0x7FD3D4FF, + 0x6EC4C6FF, + 0x65BBBCFF, + 0x5FB6B7FF, + 0x59B1B2FF, + 0x53ACADFF, + 0x4DA7A8FF, + 0x47A2A3FF, + 0x419B9CFF, + 0x060E0EFF, + 0x000000AA, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FD, + 0x206162FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x236B6CFF, + 0x000000FF, + 0x9494E0FF, + 0xC0C0FFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xE5E5FFFF, + 0xBCBCF1FF, + 0x555556FF, + 0xABABD4FF, + 0x42424EFF, + 0x3F3F4EFF, + 0xDDDDFFFF, + 0xF5F5FFFF, + 0xDCDCFFFF, + 0xA3A3CDFF, + 0x09090BFF, + 0x1F6B6CFF, + 0x30A3A5FF, + 0x31A4A6FF, + 0x71CBCCFF, + 0x6DC9C9FF, + 0x5FB6B7FF, + 0x59B1B2FF, + 0x53ACADFF, + 0x4DA7A8FF, + 0x47A2A3FF, + 0x429D9EFF, + 0x3C9899FF, + 0x184040FF, + 0x000000F7, + 0x0000000E, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FD, + 0x206162FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x236B6CFF, + 0x000000FF, + 0xA6A6F6FF, + 0xCECEECFF, + 0xD4D4D4FF, + 0xEDEDFBFF, + 0xC4C4FFFF, + 0xC8C8FFFF, + 0x50505AFF, + 0x5A5A6BFF, + 0xBEBEE6FF, + 0x9B9BB9FF, + 0xD5D5FFFF, + 0xD6D6FFFF, + 0xEAEAFFFF, + 0xD9D9FFFF, + 0x7D7D9CFF, + 0x030A0AFF, + 0x298F90FF, + 0x2FA3A5FF, + 0x41ACAFFF, + 0x68CBCCFF, + 0x5AB6B7FF, + 0x53ACADFF, + 0x4DA7A8FF, + 0x47A2A3FF, + 0x429D9EFF, + 0x3C9899FF, + 0x369394FF, + 0x24696AFF, + 0x000000FF, + 0x00000046, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FD, + 0x206162FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x297D7EFF, + 0x000000FF, + 0xA2A2ECFF, + 0xCCCCEAFF, + 0x8D8D8DFF, + 0x83838BFF, + 0xC3C3FAFF, + 0xCBCBFFFF, + 0x777790FF, + 0x0C0C0FFF, + 0xD2D2F8FF, + 0xDADAFFFF, + 0xDBDBFFFF, + 0xDADAFFFF, + 0xD8D8FFFF, + 0xE5E5FFFF, + 0xD2D2FFFF, + 0x404051FF, + 0x0E3232FF, + 0x2FA3A5FF, + 0x2FA3A5FF, + 0x54BBBCFF, + 0x57BCBEFF, + 0x4DA7A8FF, + 0x47A2A3FF, + 0x429D9EFF, + 0x3C9899FF, + 0x369394FF, + 0x308E8FFF, + 0x288283FF, + 0x000202FF, + 0x0000007C, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FD, + 0x206162FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x309597FF, + 0x000000FF, + 0x9494D5FF, + 0xD2D2FFFF, + 0xD5D5D5FF, + 0x5E5E64FF, + 0xA6A6CFFF, + 0xCFCFFFFF, + 0xB8B8DDFF, + 0x000000FF, + 0x9A9AB2FF, + 0xDFDFFFFF, + 0xE1E1FFFF, + 0xFBFBFFFF, + 0xFAFAFFFF, + 0xE3E3FFFF, + 0xD9D9FFFF, + 0xB3B3DDFF, + 0x050506FF, + 0x227A7CFF, + 0x2EA3A5FF, + 0x34A6A7FF, + 0x50C1C2FF, + 0x47A3A4FF, + 0x429D9EFF, + 0x3C9899FF, + 0x369394FF, + 0x308E8FFF, + 0x2A898AFF, + 0x258485FF, + 0x051516FF, + 0x000000B1, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FD, + 0x206162FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x3EBFC1FF, + 0x020606FF, + 0x7171A2FF, + 0xCBCBFFFF, + 0xFFFFFFFF, + 0xC5C5FCFF, + 0xCCCCFFFF, + 0xD2D2FFFF, + 0xD8D8FFFF, + 0x2D2D34FF, + 0x51515CFF, + 0xE5E5FFFF, + 0xE8E8FFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFEFEFFFF, + 0xDEDEFFFF, + 0xD2D2FFFF, + 0x57576DFF, + 0x0B2626FF, + 0x2EA3A5FF, + 0x2EA3A5FF, + 0x43B3B5FF, + 0x42A7A8FF, + 0x3C9899FF, + 0x369394FF, + 0x308E8FFF, + 0x2A898AFF, + 0x258485FF, + 0x1F7F80FF, + 0x082727FF, + 0x000000D0, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FD, + 0x206162FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x113334FF, + 0x454562FF, + 0xBDBDFFFF, + 0xFDFDFFFF, + 0xCBCBFFFF, + 0xCECEFFFF, + 0xD4D4FFFF, + 0xDADAFFFF, + 0x79798AFF, + 0x050506FF, + 0x1F1F22FF, + 0x111112FF, + 0x111111FF, + 0x111111FF, + 0x0C0C0CFF, + 0xA4A4B0FF, + 0xD4D4FFFF, + 0xAEAED8FF, + 0x010101FF, + 0x268687FF, + 0x2DA3A5FF, + 0x32A7A7FF, + 0x3AADAFFF, + 0x369394FF, + 0x308E8FFF, + 0x2A898AFF, + 0x258485FF, + 0x1F7F80FF, + 0x197A7BFF, + 0x072E2EFF, + 0x000000E3, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FD, + 0x206162FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x27797BFF, + 0x0D0D13FF, + 0xB5B5F7FF, + 0xECECFFFF, + 0xD2D2FFFF, + 0xCFCFFFFF, + 0xD6D6FFFF, + 0xDCDCFFFF, + 0xCDCDE6FF, + 0x0F0F10FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x343438FF, + 0xD6D6FFFF, + 0xCFCFFFFF, + 0x31313EFF, + 0x134445FF, + 0x2DA3A5FF, + 0x2DA3A5FF, + 0x33AAACFF, + 0x308E8FFF, + 0x2A898AFF, + 0x258485FF, + 0x1F7F80FF, + 0x197A7BFF, + 0x137576FF, + 0x063434FF, + 0x000000F6, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FD, + 0x206162FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x3EBEC0FF, + 0x040D0DFF, + 0x7878A4FF, + 0xD3D3FFFF, + 0xDFDFFFFF, + 0xD0D0FFFF, + 0xD6D6FFFF, + 0xDDDDFFFF, + 0xE4E4FFFF, + 0xCECEE0FF, + 0xB1B1BBFF, + 0xB5B5BBFF, + 0xB6B6C1FF, + 0xBBBBCCFF, + 0xBABACCFF, + 0xC4C4E1FF, + 0xD6D6FFFF, + 0xD0D0FFFF, + 0x696985FF, + 0x061515FF, + 0x2DA3A5FF, + 0x2DA3A5FF, + 0x2CA5A7FF, + 0x298B8CFF, + 0x258485FF, + 0x1F7F80FF, + 0x197A7BFF, + 0x137576FF, + 0x0D7071FF, + 0x043636FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FD, + 0x206162FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x1F5E5FFF, + 0x20202CFF, + 0xC0C0FCFF, + 0xE4E4FFFF, + 0xCFCFFFFF, + 0xD6D6FFFF, + 0xDDDDFFFF, + 0xE3E3FFFF, + 0xEAEAFFFF, + 0xF0F0FFFF, + 0xF4F4FFFF, + 0xF0F0FFFF, + 0xEAEAFFFF, + 0xE3E3FFFF, + 0xDDDDFFFF, + 0xD6D6FFFF, + 0xCFCFFFFF, + 0x9A9AC4FF, + 0x000000FF, + 0x278F90FF, + 0x2CA3A5FF, + 0x2BA0A3FF, + 0x238E8EFF, + 0x1F7F80FF, + 0x197A7BFF, + 0x137576FF, + 0x0D7071FF, + 0x086B6CFF, + 0x013334FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FD, + 0x206162FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x3CBABCFF, + 0x061111FF, + 0x76769CFF, + 0xD3D3FFFF, + 0xD3D3FFFF, + 0xD5D5FFFF, + 0xDBDBFFFF, + 0xE2E2FFFF, + 0xE7E7FFFF, + 0xECECFFFF, + 0xEEEEFFFF, + 0xECECFFFF, + 0xE7E7FFFF, + 0xCCCCE6FF, + 0x32323AFF, + 0xA5A5C6FF, + 0xCECEFFFF, + 0xB4B4E5FF, + 0x000000FF, + 0x1E7071FF, + 0x2CA3A5FF, + 0x2CA3A5FF, + 0x1E8C8CFF, + 0x197A7BFF, + 0x137576FF, + 0x0D7071FF, + 0x086B6CFF, + 0x026667FF, + 0x013434FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FD, + 0x206162FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x27797AFF, + 0x0E0E13FF, + 0xB1B1E4FF, + 0xD1D1FFFF, + 0xD3D3FFFF, + 0xD9D9FFFF, + 0xDFDFFFFF, + 0xE4E4FFFF, + 0xE7E7FFFF, + 0xE9E9FFFF, + 0xE7E7FFFF, + 0xE4E4FFFF, + 0xDCDCFCFF, + 0x292930FF, + 0x020203FF, + 0x9595B9FF, + 0xC3C3FBFF, + 0x010101FF, + 0x1A6162FF, + 0x2CA3A5FF, + 0x2CA3A5FF, + 0x1C898BFF, + 0x137576FF, + 0x0D7071FF, + 0x086B6CFF, + 0x026667FF, + 0x026768FF, + 0x013435FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FD, + 0x206162FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x0F3434FF, + 0x333342FF, + 0xC8C8FCFF, + 0xD0D0FFFF, + 0xD6D6FFFF, + 0xDBDBFFFF, + 0xC3C3DFFF, + 0xD4D4EFFF, + 0xE3E3FFFF, + 0xE2E2FFFF, + 0xDFDFFFFF, + 0xDBDBFFFF, + 0xC9C9EFFF, + 0x535366FF, + 0x5D5D75FF, + 0xB8B8F0FF, + 0x000000FF, + 0x175657FF, + 0x2CA3A5FF, + 0x2BA3A5FF, + 0x1C8687FF, + 0x0D7071FF, + 0x086B6CFF, + 0x026667FF, + 0x026768FF, + 0x026869FF, + 0x013535FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FD, + 0x206162FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x30A3A5FF, + 0x2D9799FF, + 0x061415FF, + 0x4F4F65FF, + 0xCCCCFEFF, + 0xD2D2FFFF, + 0xD7D7FFFF, + 0x5D5D6DFF, + 0x2D2D34FF, + 0xDDDDFEFF, + 0xDDDDFFFF, + 0xDADAFFFF, + 0xD7D7FFFF, + 0xD2D2FFFF, + 0xCDCDFFFF, + 0xC8C8FFFF, + 0xA0A0D2FF, + 0x000000FF, + 0x1A6263FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x1B888AFF, + 0x086B6CFF, + 0x026667FF, + 0x026768FF, + 0x026869FF, + 0x02696AFF, + 0x013536FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FB, + 0x1F6061FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x30A3A5FF, + 0x30A3A5FF, + 0x2FA3A5FF, + 0x288B8CFF, + 0x040E0EFF, + 0x5A5A71FF, + 0xCCCCFDFF, + 0xD2D2FFFF, + 0x67677BFF, + 0x000000FF, + 0xC2C2E5FF, + 0xD7D7FFFF, + 0xD5D5FFFF, + 0xD2D2FFFF, + 0xCECEFFFF, + 0xCACAFFFF, + 0xC4C4FFFF, + 0x666688FF, + 0x000000FF, + 0x1F7476FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x1A888AFF, + 0x026667FF, + 0x026768FF, + 0x026869FF, + 0x02696AFF, + 0x026A6BFF, + 0x023637FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000DA, + 0x174647FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x40C5C7FF, + 0x30A3A5FF, + 0x30A3A5FF, + 0x2FA3A5FF, + 0x2FA3A5FF, + 0x2FA3A5FF, + 0x268485FF, + 0x040D0EFF, + 0x3F3F50FF, + 0xC3C3F3FF, + 0xB2B2DAFF, + 0x101013FF, + 0xBBBBE3FF, + 0xD2D2FFFF, + 0xD0D0FFFF, + 0xCDCDFFFF, + 0xCACAFFFF, + 0xC6C6FFFF, + 0xB9B9F4FF, + 0x191922FF, + 0x020707FF, + 0x299C9EFF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x178687FF, + 0x026768FF, + 0x026869FF, + 0x02696AFF, + 0x026A6BFF, + 0x036B6DFF, + 0x023637FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000AC, + 0x081717FF, + 0x3FC2C4FF, + 0x40C5C7FF, + 0x30A3A5FF, + 0x30A3A5FF, + 0x2FA3A5FF, + 0x2FA3A5FF, + 0x2FA3A5FF, + 0x2FA3A5FF, + 0x2EA3A5FF, + 0x288F90FF, + 0x081D1DFF, + 0x18181EFF, + 0x8B8BAFFF, + 0xC7C7F9FF, + 0xCDCDFFFF, + 0xCCCCFFFF, + 0xCBCBFFFF, + 0xC8C8FFFF, + 0xC5C5FFFF, + 0xBCBCF9FF, + 0x43435AFF, + 0x000000FF, + 0x113F40FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x2AA3A5FF, + 0x178688FF, + 0x026869FF, + 0x02696AFF, + 0x026A6BFF, + 0x036B6DFF, + 0x036C6EFF, + 0x023738FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000048, + 0x000000FF, + 0x27797AFF, + 0x30A3A5FF, + 0x30A3A5FF, + 0x2FA3A5FF, + 0x2FA3A5FF, + 0x2FA3A5FF, + 0x2FA3A5FF, + 0x2EA3A5FF, + 0x2EA3A5FF, + 0x2EA3A5FF, + 0x2C9B9DFF, + 0x134647FF, + 0x010202FF, + 0x252530FF, + 0x737393FF, + 0xA2A2CFFF, + 0xBBBBF2FF, + 0xAEAEE4FF, + 0x7F7FA9FF, + 0x282836FF, + 0x000000FF, + 0x051111FF, + 0x289799FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x178788FF, + 0x02696AFF, + 0x026A6BFF, + 0x036B6DFF, + 0x036C6EFF, + 0x036D6FFF, + 0x023738FF, + 0x000000FF, + 0x00000008, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000C4, + 0x030909FF, + 0x288889FF, + 0x2FA3A5FF, + 0x2FA3A5FF, + 0x2FA3A5FF, + 0x2FA3A5FF, + 0x2EA3A5FF, + 0x2EA3A5FF, + 0x2EA3A5FF, + 0x2EA3A5FF, + 0x2DA3A5FF, + 0x2DA3A5FF, + 0x248385FF, + 0x0E3233FF, + 0x010303FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x081F20FF, + 0x268F90FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x168789FF, + 0x026A6BFF, + 0x036B6DFF, + 0x036C6EFF, + 0x036D6FFF, + 0x036E70FF, + 0x023839FF, + 0x000000FF, + 0x0000006B, + 0x0000003C, + 0x00000008, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000001A, + 0x000000E3, + 0x061515FF, + 0x268385FF, + 0x2FA3A5FF, + 0x2FA3A5FF, + 0x2EA3A5FF, + 0x2EA3A5FF, + 0x2EA3A5FF, + 0x2EA3A5FF, + 0x2DA3A5FF, + 0x2DA3A5FF, + 0x2DA3A5FF, + 0x2DA3A5FF, + 0x2CA3A5FF, + 0x289395FF, + 0x1B6465FF, + 0x134849FF, + 0x103D3EFF, + 0x144B4CFF, + 0x207879FF, + 0x2BA2A4FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x29A3A5FF, + 0x168889FF, + 0x036B6DFF, + 0x036C6EFF, + 0x036D6FFF, + 0x036E70FF, + 0x036F71FF, + 0x023839FF, + 0x000000FF, + 0x00000071, + 0x00000071, + 0x0000006B, + 0x0000003C, + 0x00000008, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000031, + 0x000000E0, + 0x010404FF, + 0x164E4FFF, + 0x2B9799FF, + 0x2EA3A5FF, + 0x2EA3A5FF, + 0x2EA3A5FF, + 0x2DA3A5FF, + 0x2DA3A5FF, + 0x2DA3A5FF, + 0x2DA3A5FF, + 0x2CA3A5FF, + 0x2CA3A5FF, + 0x2CA3A5FF, + 0x2CA3A5FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x16888AFF, + 0x036C6EFF, + 0x036D6FFF, + 0x036E70FF, + 0x036F71FF, + 0x037072FF, + 0x023839FF, + 0x000000FF, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x0000006B, + 0x0000003C, + 0x00000008, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000000F, + 0x0000009F, + 0x000000FD, + 0x020808FF, + 0x154C4DFF, + 0x2A9799FF, + 0x2DA3A5FF, + 0x2DA3A5FF, + 0x2DA3A5FF, + 0x2DA3A5FF, + 0x2CA3A5FF, + 0x2CA3A5FF, + 0x2CA3A5FF, + 0x2CA3A5FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x16898AFF, + 0x036D6FFF, + 0x036E70FF, + 0x036F71FF, + 0x037072FF, + 0x037072FF, + 0x023839FF, + 0x000000FF, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x0000006A, + 0x00000035, + 0x00000001, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002B, + 0x000000A8, + 0x000000FD, + 0x020808FF, + 0x154C4DFF, + 0x2A9799FF, + 0x2CA3A5FF, + 0x2CA3A5FF, + 0x2CA3A5FF, + 0x2CA3A5FF, + 0x2CA3A5FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x16898BFF, + 0x036E70FF, + 0x036F71FF, + 0x037072FF, + 0x037072FF, + 0x037072FF, + 0x013334FF, + 0x000000F9, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000030, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002B, + 0x000000A9, + 0x000000FD, + 0x020808FF, + 0x154C4DFF, + 0x299799FF, + 0x2CA3A5FF, + 0x2CA3A5FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x28A3A5FF, + 0x16898BFF, + 0x036F71FF, + 0x037072FF, + 0x037072FF, + 0x037072FF, + 0x036F71FF, + 0x011515FF, + 0x000000E0, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x0000003B, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002B, + 0x000000A9, + 0x000000FD, + 0x020808FF, + 0x144C4DFF, + 0x289799FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x2BA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x168A8CFF, + 0x037072FF, + 0x037072FF, + 0x037072FF, + 0x037072FF, + 0x012E2EFF, + 0x000000FF, + 0x000000A7, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000070, + 0x00000015, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002B, + 0x000000A9, + 0x000000FD, + 0x020808FF, + 0x144C4DFF, + 0x279799FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x2AA3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x168A8CFF, + 0x037072FF, + 0x037072FF, + 0x037072FF, + 0x012E2EFF, + 0x000000FF, + 0x000000B8, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x0000003E, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002C, + 0x000000A9, + 0x000000FD, + 0x020808FF, + 0x144C4DFF, + 0x279799FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x29A3A5FF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x168A8CFF, + 0x037072FF, + 0x037072FF, + 0x012E2FFF, + 0x000000FF, + 0x000000B8, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x0000004D, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002A, + 0x000000A2, + 0x000000FC, + 0x020808FF, + 0x134C4DFF, + 0x269799FF, + 0x29A3A5FF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x168A8CFF, + 0x037072FF, + 0x012E2FFF, + 0x000000FF, + 0x000000BD, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x0000004C, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002C, + 0x000000AA, + 0x000000FD, + 0x020A0AFF, + 0x145051FF, + 0x25989AFF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x15898BFF, + 0x012F2FFF, + 0x000000FF, + 0x000000B9, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000070, + 0x00000039, + 0x00000001, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002C, + 0x000000AA, + 0x000000FD, + 0x020A0AFF, + 0x145152FF, + 0x25989AFF, + 0x28A3A5FF, + 0x28A3A5FF, + 0x28A2A4FF, + 0x094647FF, + 0x000000FF, + 0x000000BA, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x0000005F, + 0x0000001C, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002C, + 0x000000AA, + 0x000000FD, + 0x020909FF, + 0x104041FF, + 0x155657FF, + 0x0A2A2BFF, + 0x000000FF, + 0x000000BB, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000069, + 0x00000036, + 0x00000003, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002C, + 0x0000009C, + 0x000000ED, + 0x000000FF, + 0x000000FF, + 0x000000BB, + 0x00000071, + 0x00000071, + 0x00000071, + 0x00000071, + 0x0000006B, + 0x00000055, + 0x0000002D, + 0x00000004, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0}; diff --git a/widget/milsko/milskosrc/src/icon/computer.c b/widget/milsko/milskosrc/src/icon/computer.c new file mode 100644 index 0000000000..ced71103a3 --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/computer.c @@ -0,0 +1,261 @@ +#include + +MwU32 MwIconComputer[] = { + (16 << 16) | 16, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x949494FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x5A6363FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x292118FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x5A6363FF, + 0x5A6363FF, + 0x949494FF, + 0x949494FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x949494FF, + 0x000000FF, + 0x949494FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x5A6363FF, + 0x5A6363FF, + 0x949494FF, + 0x73BDDEFF, + 0x73BDDEFF, + 0x73BDDEFF, + 0x39A5CEFF, + 0x949494FF, + 0x000000FF, + 0x949494FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x5A6363FF, + 0x5A6363FF, + 0x39A5CEFF, + 0x73BDDEFF, + 0x73BDDEFF, + 0x73BDDEFF, + 0x949494FF, + 0x949494FF, + 0x000000FF, + 0x949494FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x5A6363FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0xFFFFFFFF, + 0x000000FF, + 0x949494FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x39A5CEFF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x39A5CEFF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x73BDDEFF, + 0x39A5CEFF, + 0x73BDDEFF, + 0x39A5CEFF, + 0x39A5CEFF, + 0x39A5CEFF, + 0x39A5CEFF, + 0x39A5CEFF, + 0x39A5CEFF, + 0x39A5CEFF, + 0x73BDDEFF, + 0x39A5CEFF, + 0x5A6363FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x73BDDEFF, + 0x73BDDEFF, + 0x39A5CEFF, + 0x39A5CEFF, + 0x39A5CEFF, + 0x39A5CEFF, + 0x39A5CEFF, + 0x39A5CEFF, + 0x39A5CEFF, + 0x39A5CEFF, + 0x39A5CEFF, + 0x39A5CEFF, + 0x5A6363FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x39A5CEFF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x949494FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x949494FF, + 0x5A6363FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x949494FF, + 0x292118FF, + 0x5A6363FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x949494FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x5A6363FF, + 0x949494FF, + 0x000000FF, + 0x949494FF, + 0x00000000, + 0x00000000, + 0x5A6363FF, + 0x000000FF, + 0x292118FF, + 0x292118FF, + 0x292118FF, + 0x292118FF, + 0x292118FF, + 0x292118FF, + 0x292118FF, + 0x292118FF, + 0x292118FF, + 0x000000FF, + 0x5A6363FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0}; diff --git a/widget/milsko/milskosrc/src/icon/directory.c b/widget/milsko/milskosrc/src/icon/directory.c new file mode 100644 index 0000000000..ebd5440b10 --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/directory.c @@ -0,0 +1,261 @@ +#include + +MwU32 MwIconDirectory[] = { + (16 << 16) | 16, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0x000000FF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0x2B251DFF, + 0xB8A07DFF, + 0xB8A07DFF, + 0x000000FF, + 0x000000FF, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0x000000FF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0xFFDEADFF, + 0x2B251DFF, + 0x2B251DFF, + 0xB8A07DFF, + 0xB8A07DFF, + 0x000000FF, + 0x000000FF, + 0xB8A07DFF, + 0xFFDCAEFF, + 0x000000FF, + 0x000000FF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0x2B251DFF, + 0x2B251DFF, + 0xB8A07DFF, + 0xB8A07DFF, + 0xB8A07DFF, + 0xB8A07DFF, + 0xFFDCAEFF, + 0xB8A07DFF, + 0x000000FF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0x2B251DFF, + 0x2B251DFF, + 0xB8A07DFF, + 0xB8A07DFF, + 0xB8A07DFF, + 0xB8A07DFF, + 0x000000FF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0x2B251DFF, + 0x2B251DFF, + 0xB8A07DFF, + 0xB8A07DFF, + 0x000000FF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0x000000FF, + 0xB8A07DFF, + 0x000000FF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xB8A07DFF, + 0x000000FF, + 0x574B3BFF, + 0x000000FF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xB8A07DFF, + 0x000000FF, + 0x574B3BFF, + 0x000000FF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xB8A07DFF, + 0x000000FF, + 0x574B3BFF, + 0x000000FF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0x574B3BFF, + 0xB8A07DFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xB8A07DFF, + 0x000000FF, + 0x574B3BFF, + 0x000000FF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0x000000FF, + 0x574B3BFF, + 0xB8A07DFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xB8A07DFF, + 0x000000FF, + 0x574B3BFF, + 0x000000FF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0x000000FF, + 0x574B3BFF, + 0xB8A07DFF, + 0xFFDEADFF, + 0xFFDEADFF, + 0xB8A07DFF, + 0x000000FF, + 0x574B3BFF, + 0x000000FF, + 0x2B251DFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0x000000FF, + 0x574B3BFF, + 0xB8A07DFF, + 0xB8A07DFF, + 0x000000FF, + 0x574B3BFF, + 0x000000FF, + 0x2B251DFF, + 0x2B251DFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0x000000FF, + 0x574B3BFF, + 0x000000FF, + 0x574B3BFF, + 0x000000FF, + 0x2B251DFF, + 0x2B251DFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x2B251DFF, + 0x2B251DFF, + 0xC0C0C000, + 0xC0C0C000, + 0}; diff --git a/widget/milsko/milskosrc/src/icon/down.c b/widget/milsko/milskosrc/src/icon/down.c new file mode 100644 index 0000000000..03af9d4960 --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/down.c @@ -0,0 +1,445 @@ +#include + +MwU32 MwIconDown[] = { + (20 << 16) | 22, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0}; diff --git a/widget/milsko/milskosrc/src/icon/error.c b/widget/milsko/milskosrc/src/icon/error.c new file mode 100644 index 0000000000..f268c1792c --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/error.c @@ -0,0 +1,2309 @@ +#include + +MwU32 MwIconError[] = { + (48 << 16) | 48, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000000C, + 0x00000080, + 0x000000F6, + 0x000000E6, + 0x000000AA, + 0x0000006F, + 0x00000033, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000006, + 0x00000070, + 0x000000EC, + 0x020101FF, + 0x563938FF, + 0x523534FF, + 0x170E0EFF, + 0x000000FF, + 0x000000FF, + 0x000000EB, + 0x000000B0, + 0x00000074, + 0x00000039, + 0x00000005, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000001, + 0x00000058, + 0x000000DD, + 0x000000FF, + 0x442F2EFF, + 0xCE8C89FF, + 0xFFA9A5FF, + 0xFFA4A1FF, + 0xFFA09DFF, + 0xE68C89FF, + 0xAA6563FF, + 0x663A3AFF, + 0x2B1818FF, + 0x010101FF, + 0x000000FF, + 0x000000F5, + 0x000000C0, + 0x00000082, + 0x00000047, + 0x0000000E, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000041, + 0x000000CB, + 0x000000FF, + 0x2B201FFF, + 0xB3807CFF, + 0xFFB2ADFF, + 0xFFADA9FF, + 0xFFA9A5FF, + 0xFFA4A1FF, + 0xFFA09DFF, + 0xFF9B98FF, + 0xFF9794FF, + 0xFF9290FF, + 0xFF8E8CFF, + 0xE97D7CFF, + 0xB35D5DFF, + 0x773C3BFF, + 0x3C1D1DFF, + 0x060303FF, + 0x000000FF, + 0x000000FC, + 0x000000CE, + 0x00000035, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002C, + 0x000000B5, + 0x000000FF, + 0x1F1817FF, + 0xA27976FF, + 0xFDBAB5FF, + 0xFFB6B1FF, + 0xFFB2ADFF, + 0xFFADA9FF, + 0xFFA9A5FF, + 0xFFA4A1FF, + 0xFFA09DFF, + 0xFF9B98FF, + 0xFF9794FF, + 0xFF9290FF, + 0xFF8E8CFF, + 0xFF8988FF, + 0xFF8584FF, + 0xFF807FFF, + 0xFF7C7BFF, + 0xF37171FF, + 0xB85454FF, + 0x2D0E0EFF, + 0x000000FC, + 0x00000015, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000029, + 0x000000FC, + 0x110D0DFF, + 0x886A66FF, + 0xF7BEB8FF, + 0xFFBFBAFF, + 0xFFBBB6FF, + 0xFFB6B1FF, + 0xFFB2ADFF, + 0xFFADA9FF, + 0xFFA9A5FF, + 0xFFA4A1FF, + 0xFFA09DFF, + 0xFF9B98FF, + 0xFF9794FF, + 0xFF9290FF, + 0xFF8E8CFF, + 0xFF8988FF, + 0xFF8584FF, + 0xFF807FFF, + 0xFF7C7BFF, + 0xE66B6BF8, + 0x8A1D1DFF, + 0x1A0000FF, + 0x000000C2, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000002, + 0x000000E7, + 0x552422FF, + 0xCD6963FF, + 0xD08983EB, + 0xF9B7B2DB, + 0xFFBBB6FE, + 0xFFB6B1FF, + 0xFFB2ADFF, + 0xFFADA9FF, + 0xFFA9A5FF, + 0xFFA4A1FF, + 0xFFA09DFF, + 0xFF9B98FF, + 0xFF9794FF, + 0xFF9290FF, + 0xFF8E8CFF, + 0xFF8988FF, + 0xFF8584FF, + 0xFF807FFF, + 0xE96765C4, + 0x850606FB, + 0x770101FF, + 0x010000FF, + 0x00000073, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000099, + 0x0D0505FF, + 0xF75E56FF, + 0xFF6159FF, + 0xFF6159FF, + 0xFF6A62EA, + 0xFF857EC6, + 0xFFA39DC4, + 0xFFADA8EE, + 0xFFA9A5FF, + 0xFFA4A1FF, + 0xFFA09DFF, + 0xFF9B98FF, + 0xFF9794FF, + 0xFF9290FF, + 0xFF8E8CFF, + 0xFF8988FF, + 0xFE8483EC, + 0xB33332C8, + 0x800000FF, + 0x860101FF, + 0x4E0101FF, + 0x000000FF, + 0x00000024, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000049, + 0x000000FF, + 0xB64540FF, + 0xFF6159FF, + 0xFF6159FF, + 0xFE5E56FF, + 0xFD5B53FF, + 0xFC5750FF, + 0xFB554EFC, + 0xFB655FD6, + 0xFC837EC0, + 0xFF9895CD, + 0xFF9B98FA, + 0xFF9794FF, + 0xFF9290FF, + 0xFF8E8CFF, + 0xF37C7BCC, + 0x8D0F0EE9, + 0x800000FF, + 0x830000FF, + 0x880101FF, + 0x240101FF, + 0x000000D3, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000007, + 0x000000F1, + 0x662724FF, + 0xFF6159FF, + 0xFE5E56FF, + 0xFD5A53FF, + 0xFC574FFF, + 0xFB534CFF, + 0xFA5049FF, + 0xF94C46FF, + 0xF84943FF, + 0xF7453FFF, + 0xF84942EF, + 0xFA635FC6, + 0xFC817EC2, + 0xC34B4AC2, + 0x800000FF, + 0x800000FF, + 0x800000FF, + 0x850101FF, + 0x810101FF, + 0x020000FF, + 0x00000083, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000A8, + 0x170908FF, + 0xFC5C54FF, + 0xFD5A52FF, + 0xFC564FFF, + 0xFB534CFF, + 0xFA4F49FF, + 0xF94C45FF, + 0xF84842FF, + 0xF7453FFF, + 0xF6413CFF, + 0xF53E38FF, + 0xF43A35FF, + 0xDB2B28D9, + 0x800000FF, + 0x800000FF, + 0x800000FF, + 0x830000FF, + 0x880101FF, + 0x5A0101FF, + 0x000000FF, + 0x00000034, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000058, + 0x000000FF, + 0xC3453FFF, + 0xFC564EFF, + 0xFB524BFF, + 0xFA4F48FF, + 0xF94B45FF, + 0xF84742FF, + 0xF7443EFF, + 0xF6403BFF, + 0xF53D38FF, + 0xF43935FF, + 0xF33632FF, + 0xB51615C1, + 0x800000FF, + 0x800000FF, + 0x800000FF, + 0x850101FF, + 0x8B0101FF, + 0x2F0101FF, + 0x000000E4, + 0x00000001, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000000D, + 0x000000F7, + 0x742724FF, + 0xFB514BFF, + 0xFA4E48FF, + 0xF94A44FF, + 0xF84741FF, + 0xF7433EFF, + 0xF6403BFF, + 0xF53C37FF, + 0xF43934FF, + 0xF33531FF, + 0xF2322EFF, + 0x930807C4, + 0x800000FF, + 0x800000FF, + 0x830000FF, + 0x880101FF, + 0x8A0202FF, + 0x070000FF, + 0x00000095, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000B6, + 0x230B0AFF, + 0xFA4D47FF, + 0xF94A44FF, + 0xF84641FF, + 0xF7433DFF, + 0xF63F3AFF, + 0xF53C37FF, + 0xF43834FF, + 0xF33531FF, + 0xF2312DFF, + 0xF12E2AFF, + 0x820101E4, + 0x800000FF, + 0x800000FF, + 0x850101FF, + 0x8B0101FF, + 0x650101FF, + 0x000000FF, + 0x00000046, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000066, + 0x000000FF, + 0xCD3C37FF, + 0xF74640FF, + 0xF6423DFF, + 0xF53F3AFF, + 0xF53B36FF, + 0xF43833FF, + 0xF33430FF, + 0xF2312DFF, + 0xF12D2AFF, + 0xE32621E7, + 0x800000FF, + 0x800000FF, + 0x820000FF, + 0x880101FF, + 0x8D0202FF, + 0x3A0101FF, + 0x000000F0, + 0x00000006, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000017, + 0x000000FD, + 0x7F2321FF, + 0xF6423CFF, + 0xF53E39FF, + 0xF43B36FF, + 0xF33733FF, + 0xF23430FF, + 0xF1302CFF, + 0xF02D29FF, + 0xEF2926FF, + 0xBE1513C5, + 0x800000FF, + 0x800000FF, + 0x850101FF, + 0x8B0101FF, + 0x8F0202FF, + 0x0E0000FF, + 0x000000A7, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000C5, + 0x310D0CFF, + 0xF53E39FF, + 0xF43A35FF, + 0xF33732FF, + 0xF2332FFF, + 0xF1302CFF, + 0xF02C29FF, + 0xEF2925FF, + 0xEE2522FF, + 0x990808C1, + 0x800000FF, + 0x820000FF, + 0x880101FF, + 0x8D0202FF, + 0x720202FF, + 0x000000FF, + 0x00000058, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000075, + 0x000000FF, + 0xD5332EFF, + 0xF33632FF, + 0xF2332FFF, + 0xF12F2BFF, + 0xF02C28FF, + 0xEF2825FF, + 0xEE2522FF, + 0xED211EFF, + 0x840101D8, + 0x800000FF, + 0x850101FF, + 0x8B0101FF, + 0x900202FF, + 0x450101FF, + 0x000000FA, + 0x00000010, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000024, + 0x000000FF, + 0x8B1F1CFF, + 0xF2322EFF, + 0xF12F2BFF, + 0xF02B28FF, + 0xEF2824FF, + 0xEE2421FF, + 0xED211EFF, + 0xE61B1AF2, + 0x800000FC, + 0x820000FF, + 0x880101FF, + 0x8D0202FF, + 0x930202FF, + 0x170000FF, + 0x000000B8, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000D3, + 0x3F0D0CFF, + 0xF12E2AFF, + 0xF02B27FF, + 0xEF2724FF, + 0xEE2421FF, + 0xED201DFF, + 0xEC1D1AFF, + 0xC7100FCC, + 0x800000FF, + 0x850101FF, + 0x8A0101FF, + 0x900202FF, + 0x7E0303FF, + 0x000000FF, + 0x00000069, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000083, + 0x030100FF, + 0xDD2724FF, + 0xEF2723FF, + 0xEE2320FF, + 0xED201DFF, + 0xEC1C1AFF, + 0xEB1917FF, + 0xA20705BF, + 0x820000FF, + 0x880101FF, + 0x8D0202FF, + 0x930202FF, + 0x500202FF, + 0x000000FE, + 0x0000001C, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000033, + 0x000000FF, + 0x961816FF, + 0xEE2220FF, + 0xED1F1CFF, + 0xEC1B19FF, + 0xEB1816FF, + 0xEA1413FF, + 0x880101CF, + 0x850101FF, + 0x8A0101FF, + 0x900202FF, + 0x950303FF, + 0x220101FF, + 0x000000CA, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000DF, + 0x4A0B0AFF, + 0xEC1E1CFF, + 0xEB1B19FF, + 0xEB1716FF, + 0xEA1412FF, + 0xE8100FFA, + 0x820000F5, + 0x880101FF, + 0x8D0202FF, + 0x930202FF, + 0x8A0303FF, + 0x010000FF, + 0x0000007B, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000092, + 0x080101FF, + 0xE11917FF, + 0xEA1715FF, + 0xE91312FF, + 0xE8100FFF, + 0xCC0808D4, + 0x850101FF, + 0x8A0101FF, + 0x900202FF, + 0x950303FF, + 0x5D0202FF, + 0x000000FF, + 0x0000002C, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000042, + 0x000000FF, + 0xA10F0EFF, + 0xE91311FF, + 0xE80F0EFF, + 0xE70C0BFF, + 0xAA0303C0, + 0x870101FF, + 0x8D0202FF, + 0x920202FF, + 0x980303FF, + 0x2E0101FF, + 0x000000DC, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000004, + 0x000000EC, + 0x570706FF, + 0xE80F0EFF, + 0xE70B0AFF, + 0xE60807FF, + 0x920101C7, + 0x8A0101FF, + 0x900202FF, + 0x950303FF, + 0x940303FF, + 0x050000FF, + 0x0000008E, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000A0, + 0x100101FF, + 0xE30B0AFF, + 0xE60707FF, + 0xE50403FF, + 0x880101E9, + 0x8D0202FF, + 0x920202FF, + 0x980303FF, + 0x4B0202FF, + 0x000000FF, + 0x0000003F, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000050, + 0x000000FF, + 0xAA0504FF, + 0xE50303FF, + 0xD50000DF, + 0x8A0101FF, + 0x900202FF, + 0x950303FF, + 0x4D0101FF, + 0x000000FF, + 0x0000009D, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000009, + 0x000000F4, + 0x620101FF, + 0xE40000FF, + 0x9F0000DE, + 0x8D0202FF, + 0x920202FF, + 0x4C0101FF, + 0x000000FF, + 0x0000009E, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000C4, + 0x180000FF, + 0xE30000FF, + 0x770101FF, + 0x8F0202FF, + 0x4A0101FF, + 0x000000FF, + 0x000000FF, + 0x000000C3, + 0x00000041, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000004, + 0x00000091, + 0x000000FF, + 0x000000FF, + 0xB60000FF, + 0x7C0202FF, + 0x490101FF, + 0x000000FF, + 0x400301FF, + 0x6D0402FF, + 0x190100FF, + 0x000000FF, + 0x00000099, + 0x00000005, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000001, + 0x000000AB, + 0x010000FF, + 0x6A1411FF, + 0x040101FF, + 0x610000FF, + 0x480101FF, + 0x000000FF, + 0x500502FF, + 0xCD0B04FF, + 0xCD0903FF, + 0xC40803FF, + 0x5D0301FF, + 0x000000FF, + 0x000000A9, + 0x00000001, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000075, + 0x000000FF, + 0x881A16FF, + 0xF9342CFF, + 0x410E0CFF, + 0x070000FF, + 0x000000FF, + 0x4F0502FB, + 0xD10E05FF, + 0xD10C04FF, + 0xCE0A03FF, + 0xCC0903FF, + 0xC90702FF, + 0x6D0301FF, + 0x000000FF, + 0x00000072, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000015, + 0x000000F2, + 0x4E0E0CFF, + 0xF9332BFF, + 0xFF3930FF, + 0x923C39FF, + 0x000000FF, + 0x53201DED, + 0xDC251CFF, + 0xD50F05FF, + 0xD20D04FF, + 0xD00B04FF, + 0xCD0903FF, + 0xCA0803FF, + 0xC70602FF, + 0x3D0100FF, + 0x000000F0, + 0x00000014, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000074, + 0x010000FF, + 0xD02822FF, + 0xFB362DFF, + 0xFF5E56FF, + 0xE48E8AFF, + 0x624D4CFF, + 0xF67A73C1, + 0xE5362DFF, + 0xD9180EFF, + 0xD30E05FF, + 0xD00C04FF, + 0xCD0A03FF, + 0xCB0803FF, + 0xC80602FF, + 0xA60301FF, + 0x010000FF, + 0x00000072, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000C1, + 0x300807FF, + 0xF42F28FF, + 0xFC362EFF, + 0xFF665FFF, + 0xFFADAAFF, + 0xFEEBEAFF, + 0xFDA6A2D9, + 0xE93F36CE, + 0xDA1B11FF, + 0xD30E05FF, + 0xD00C04FF, + 0xCD0A03FF, + 0xCB0803FF, + 0xC80602FF, + 0xC50401FF, + 0x260000FF, + 0x000000BF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000E6, + 0x5F100DFF, + 0xF32E27FF, + 0xFA352CFF, + 0xFF4E46FF, + 0xFF8781FF, + 0xFFA4A0FF, + 0xFF908BFF, + 0xFF5A53FF, + 0xF22D24D3, + 0xD81209C6, + 0xD00C04F9, + 0xCD0A03FF, + 0xCA0803FF, + 0xC70602FF, + 0xC50401FF, + 0x4D0100FF, + 0x000000E5, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000F9, + 0x6F120FFF, + 0xF02C25FF, + 0xF6312AFF, + 0xFC372EFF, + 0xFF4A42FF, + 0xFF5C55FF, + 0xFF5048FF, + 0xFD382FFF, + 0xF8332BFF, + 0xF12D26FF, + 0xE8241CEA, + 0xD5110CC0, + 0xCC0704D1, + 0xC80502F0, + 0xB50301FF, + 0x520201FF, + 0x000000F8, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000E6, + 0x5C0E0CFF, + 0xEC2821FF, + 0xF12D26FF, + 0xF63129FF, + 0xFA342CFF, + 0xFB352DFF, + 0xFA352CFF, + 0xF7322AFF, + 0xF22E27FF, + 0xED2922FF, + 0xE7231EFF, + 0xE01D19FF, + 0xD91713FF, + 0xD2110EFF, + 0xCA0A09FF, + 0x4C0201FF, + 0x000000E5, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000C0, + 0x2C0605FF, + 0xE6231DFF, + 0xEB2721FF, + 0xEF2B24FF, + 0xF22E26FF, + 0xF32E27FF, + 0xF22E27FF, + 0xF02C25FF, + 0xEC2822FF, + 0xE7241EFF, + 0xE21F1AFF, + 0xDC1A15FF, + 0xD51411FF, + 0xCE0E0CFF, + 0xC70806FF, + 0x240000FF, + 0x000000C0, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000000C, + 0x0000001C, + 0x0000002C, + 0x0000003C, + 0x0000004C, + 0x0000005B, + 0x0000006B, + 0x00000066, + 0x0000002C, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000073, + 0x010000FF, + 0xBD1915FF, + 0xE5221CFF, + 0xE8251FFF, + 0xEB2721FF, + 0xEB2821FF, + 0xEB2721FF, + 0xE9251FFF, + 0xE6221DFF, + 0xE11F1AFF, + 0xDC1A16FF, + 0xD71512FF, + 0xD1100DFF, + 0xCA0A09FF, + 0xA40303FF, + 0x000000FF, + 0x000000B1, + 0x00000046, + 0x00000009, + 0x0000000F, + 0x00000044, + 0x00000054, + 0x00000063, + 0x00000073, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000066, + 0x0000002C, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000014, + 0x000000F1, + 0x440706FF, + 0xDE1C17FF, + 0xE11E19FF, + 0xE3201BFF, + 0xE4211BFF, + 0xE3201BFF, + 0xE11F1AFF, + 0xDF1C18FF, + 0xDB1915FF, + 0xD61512FF, + 0xD1100EFF, + 0xCC0B0AFF, + 0xC60605FF, + 0x3A0000FF, + 0x000000F7, + 0x00000081, + 0x00000077, + 0x00000068, + 0x00000068, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000066, + 0x0000002C, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000073, + 0x000000FF, + 0x750B0AFF, + 0xDA1814FF, + 0xDB1915FF, + 0xDC1A16FF, + 0xDB1915FF, + 0xDA1814FF, + 0xD71612FF, + 0xD41310FF, + 0xD00F0DFF, + 0xCB0B09FF, + 0xC60705FF, + 0x680101FF, + 0x000000FF, + 0x000000B3, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000055, + 0x00000004, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000001, + 0x000000A9, + 0x000000FF, + 0x600806FF, + 0xCD120FFF, + 0xD41310FF, + 0xD4120FFF, + 0xD2110FFF, + 0xD00F0DFF, + 0xCD0D0BFF, + 0xCA0908FF, + 0xBF0605FF, + 0x580000FF, + 0x000000FF, + 0x000000D0, + 0x00000078, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000055, + 0x00000004, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000004, + 0x000000B8, + 0x000000FF, + 0x190101FF, + 0x6E0605FF, + 0xA70908FF, + 0xC10A09FF, + 0xC00907FF, + 0xA20504FF, + 0x680202FF, + 0x0F0000FF, + 0x000000FF, + 0x000000C4, + 0x00000079, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000055, + 0x00000004, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000010, + 0x0000008F, + 0x000000DF, + 0x000000FE, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FE, + 0x000000DE, + 0x00000098, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000068, + 0x00000068, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000055, + 0x00000004, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000008, + 0x00000046, + 0x00000082, + 0x000000A6, + 0x000000B3, + 0x000000B3, + 0x000000A6, + 0x00000085, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000073, + 0x00000045, + 0x00000008, + 0x0000000F, + 0x00000044, + 0x00000054, + 0x00000063, + 0x00000073, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000077, + 0x00000055, + 0x00000004, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000008, + 0x0000002C, + 0x0000004B, + 0x0000005F, + 0x0000006E, + 0x00000074, + 0x00000074, + 0x0000006E, + 0x0000005F, + 0x0000004B, + 0x0000002C, + 0x00000008, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000000C, + 0x0000001C, + 0x0000002C, + 0x0000003C, + 0x0000004C, + 0x0000005B, + 0x0000006B, + 0x00000055, + 0x00000004, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0}; diff --git a/widget/milsko/milskosrc/src/icon/file.c b/widget/milsko/milskosrc/src/icon/file.c new file mode 100644 index 0000000000..0ac5b5a3cb --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/file.c @@ -0,0 +1,261 @@ +#include + +MwU32 MwIconFile[] = { + (16 << 16) | 16, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x8C8C8CFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xCECECEFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xCECECEFF, + 0xE7E7E7FF, + 0x8C8C8CFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xCECECEFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xCECECEFF, + 0xFFFFFFFF, + 0xE7E7E7FF, + 0x8C8C8CFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xCECECEFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xCECECEFF, + 0xCECECEFF, + 0xCECECEFF, + 0xC0C0C000, + 0x8C8C8CFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xCECECEFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x393939FF, + 0x393939FF, + 0x393939FF, + 0x393939FF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xCECECEFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xC0C0C000, + 0xC0C0C000, + 0x6B6B6BFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xCECECEFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xE7E7E7FF, + 0x6B6B6BFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xCECECEFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x6B6B6BFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xCECECEFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x6B6B6BFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xCECECEFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x6B6B6BFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xCECECEFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x6B6B6BFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xCECECEFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x6B6B6BFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xCECECEFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x6B6B6BFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xCECECEFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x6B6B6BFF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0x8C8C8CFF, + 0x6B6B6BFF, + 0x6B6B6BFF, + 0x6B6B6BFF, + 0x6B6B6BFF, + 0x6B6B6BFF, + 0x6B6B6BFF, + 0x6B6B6BFF, + 0x6B6B6BFF, + 0x6B6B6BFF, + 0x393939FF, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0xC0C0C000, + 0}; diff --git a/widget/milsko/milskosrc/src/icon/forward.c b/widget/milsko/milskosrc/src/icon/forward.c new file mode 100644 index 0000000000..d24f5ed500 --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/forward.c @@ -0,0 +1,445 @@ +#include + +MwU32 MwIconForward[] = { + (20 << 16) | 22, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0x333333FF, + 0xCCFFFF00, + 0x666666FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x999999FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0xCCFFFF00, + 0x666666FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x999999FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0xCCFFFF00, + 0x666666FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x999999FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0xCCFFFF00, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0xCCFFFF00, + 0x666666FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x333333FF, + 0x999999FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x333333FF, + 0x999999FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x333333FF, + 0x999999FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x999999FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x666666FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x999999FF, + 0x333333FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x999999FF, + 0x333333FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x999999FF, + 0x333333FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0}; diff --git a/widget/milsko/milskosrc/src/icon/info.c b/widget/milsko/milskosrc/src/icon/info.c new file mode 100644 index 0000000000..8a51dd6939 --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/info.c @@ -0,0 +1,2309 @@ +#include + +MwU32 MwIconInfo[] = { + (48 << 16) | 48, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000015, + 0x00000074, + 0x000000C1, + 0x000000E6, + 0x000000FA, + 0x000000E6, + 0x000000C0, + 0x00000073, + 0x00000014, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000001, + 0x00000076, + 0x000000F2, + 0x000001FF, + 0x04112BFF, + 0x072256FF, + 0x082561FF, + 0x061E50FF, + 0x030D26FF, + 0x000001FF, + 0x000000F1, + 0x00000073, + 0x00000001, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000005, + 0x000000AB, + 0x000000FF, + 0x071F4AFF, + 0x1354C5FF, + 0x1664E8FF, + 0x1662E5FF, + 0x145DDFFF, + 0x1256D6FF, + 0x104DCAFF, + 0x0B39A1FF, + 0x031237FF, + 0x000000FF, + 0x000000A9, + 0x00000004, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000097, + 0x000001FF, + 0x0C3983FF, + 0x186CF3FF, + 0x1A71F8FF, + 0x1A72FAFF, + 0x196FF6FF, + 0x1869EEFF, + 0x1561E4FF, + 0x1357D7FF, + 0x104CC8FF, + 0x0C40B9FF, + 0x051D5DFF, + 0x000000FF, + 0x00000093, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000043, + 0x000000FF, + 0x0A306FFF, + 0x196FF6FF, + 0x1F79FFFF, + 0x3687FFFF, + 0x408CFFFF, + 0x297EFFFF, + 0x1B75FDFF, + 0x186AF0FF, + 0x155FE1FF, + 0x1153D1FF, + 0x0E46C1FF, + 0x0B39B1FF, + 0x03144AFF, + 0x000000FF, + 0x00000040, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000C6, + 0x030C1DFF, + 0x1768EAFF, + 0x1D77FFFF, + 0x4F95FFFF, + 0x8CBAFFFF, + 0x9AC3FFFF, + 0x73ABFFFF, + 0x297EFFFF, + 0x1A72F9FF, + 0x1665E9FF, + 0x1358D8FF, + 0x0F4AC7FF, + 0x0C3DB5FF, + 0x082FA0FF, + 0x010514FF, + 0x000000C3, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000001E, + 0x000000FE, + 0x0C357DFF, + 0x196FF6FF, + 0x247BFFFF, + 0x73ABFFFF, + 0xC0D9FFFF, + 0xE3EEFFFF, + 0x9AC3FFFF, + 0x408DFFFF, + 0x1B76FFFF, + 0x1768EDFF, + 0x145BDBFF, + 0x104DCAFF, + 0x0C3FB8FF, + 0x0831A6FF, + 0x031350FF, + 0x000000FE, + 0x0000001B, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000005A, + 0x000000FF, + 0x1151BEFF, + 0x196FF6FF, + 0x217BFFFF, + 0x67A5FFFF, + 0xABCDFFFF, + 0xC0D9FFFF, + 0x8CBAFFFF, + 0x3786FFFF, + 0x1B76FFFF, + 0x1768EDFF, + 0x145BDCFF, + 0x104DCAFF, + 0x0C3FB8FF, + 0x0931A6FF, + 0x041E7BFF, + 0x000000FF, + 0x00000058, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000075, + 0x000000FF, + 0x145BD7FF, + 0x186CF2FF, + 0x1D77FFFF, + 0x2F82FFFF, + 0x67A5FFFF, + 0x73ABFFFF, + 0x4F95FFFF, + 0x227BFFFF, + 0x1A72FAFF, + 0x1765EAFF, + 0x1358D9FF, + 0x0F4BC7FF, + 0x0C3DB6FF, + 0x0830A4FF, + 0x04208CFF, + 0x000000FF, + 0x00000073, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000073, + 0x000000FF, + 0x1256D1FF, + 0x1766EAFF, + 0x1A71F8FF, + 0x1D78FFFF, + 0x237BFFFF, + 0x277DFFFF, + 0x217AFFFF, + 0x1B76FFFF, + 0x186BF1FF, + 0x1560E2FF, + 0x1254D3FF, + 0x0E47C2FF, + 0x0B3AB1FF, + 0x072DA0FF, + 0x041E87FF, + 0x000000FF, + 0x00000072, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000059, + 0x000000FF, + 0x0E45ADFF, + 0x145DDFFF, + 0x1767EBFF, + 0x196EF5FF, + 0x1A73FBFF, + 0x1A74FCFF, + 0x1A71F9FF, + 0x186BF0FF, + 0x1662E5FF, + 0x1358D8FF, + 0x104DCAFF, + 0x0D41BBFF, + 0x0935ABFF, + 0x06289BFF, + 0x00006AFF, + 0x000000FF, + 0x00000057, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000001C, + 0x000000FE, + 0x08286BFF, + 0x1253D2FF, + 0x145BDDFF, + 0x1662E5FF, + 0x1765EAFF, + 0x1766EBFF, + 0x1664E8FF, + 0x155FE1FF, + 0x1358D8FF, + 0x104FCCFF, + 0x0E45BFFF, + 0x0B3AB1FF, + 0x082EA2FF, + 0x042293FF, + 0x000045FF, + 0x000000FE, + 0x0000001A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000C3, + 0x010816FF, + 0x0F46BFFF, + 0x114FCDFF, + 0x1255D4FF, + 0x1358D8FF, + 0x1358D9FF, + 0x1357D6FF, + 0x1152D1FF, + 0x104CC9FF, + 0x0E44BFFF, + 0x0B3BB3FF, + 0x0831A6FF, + 0x062798FF, + 0x00007DFF, + 0x00000FFF, + 0x000000C1, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000041, + 0x000000FF, + 0x061C54FF, + 0x0D43BDFF, + 0x0E48C3FF, + 0x0F4AC6FF, + 0x0F4BC7FF, + 0x0F49C5FF, + 0x0E45C0FF, + 0x0C40B9FF, + 0x0B39B0FF, + 0x0831A6FF, + 0x06289AFF, + 0x031E8DFF, + 0x00003AFF, + 0x000000FF, + 0x0000006C, + 0x00000001, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000036, + 0x000000C0, + 0x000000FF, + 0x000000FF, + 0x051E5FFF, + 0x0B3AB2FF, + 0x0B3CB5FF, + 0x0C3DB5FF, + 0x0B3CB3FF, + 0x0A38AFFF, + 0x0934A9FF, + 0x072DA1FF, + 0x052698FF, + 0x031E8DFF, + 0x000046FF, + 0x000000FF, + 0x010307FF, + 0x000000FF, + 0x000000D9, + 0x00000078, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000A9, + 0x000000FE, + 0x091018FF, + 0x356091FF, + 0x1C3452FF, + 0x000000FF, + 0x020E32FF, + 0x072889FF, + 0x082FA3FF, + 0x082EA2FF, + 0x072B9EFF, + 0x062799FF, + 0x042192FF, + 0x00006CFF, + 0x000027FF, + 0x000000FF, + 0x07174BFF, + 0x1442CDFF, + 0x10308AFF, + 0x040A21FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x122A4BFF, + 0x5296DBFF, + 0x5AA3F9FF, + 0x5399F5FF, + 0x2B5186FF, + 0x04080EFF, + 0x000000FF, + 0x01061DFF, + 0x020D39FF, + 0x010E42FF, + 0x000033FF, + 0x000019FF, + 0x000000FF, + 0x01040DFF, + 0x072077FF, + 0x0530D0FF, + 0x0C38D0FC, + 0x091F8BFF, + 0x01024AFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x10397FFF, + 0x1D6DF6FF, + 0x357EF0CE, + 0x5097F6CD, + 0x4E94F3FF, + 0x4280DDFF, + 0x244883FF, + 0x0F1F3CFF, + 0x050C18FF, + 0x010205FF, + 0x040A17FF, + 0x091739FF, + 0x102D7BFF, + 0x1745CAFF, + 0x1546D8FF, + 0x1442D6DB, + 0x07129ED8, + 0x030392FF, + 0x02024BFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x0E3475FF, + 0x1D6EFBFF, + 0x1C6AFAFF, + 0x1A67F9FF, + 0x2871F7D4, + 0x4388F4BD, + 0x4789F0F7, + 0x4181EDFF, + 0x3B7AEAFF, + 0x3672E8FF, + 0x316BE6FF, + 0x2C65E3FF, + 0x2860E1FF, + 0x255BE0FE, + 0x1A42C9C1, + 0x03048EF8, + 0x02028FFF, + 0x030393FF, + 0x02024CFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000D5, + 0x000103FF, + 0x0F3A86FF, + 0x1B6AFAFF, + 0x1A66F9FF, + 0x1963F8FF, + 0x1760F7FF, + 0x1B61F6EA, + 0x3578F2C0, + 0x4485EFE6, + 0x4080EDFF, + 0x3B7AEBFF, + 0x3875E9FF, + 0x346FE7E5, + 0x1124A4CF, + 0x010189FF, + 0x02028CFF, + 0x030390FF, + 0x030394FF, + 0x02024CFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000000B, + 0x0000009F, + 0x000000FF, + 0x092557FF, + 0x1961EFFF, + 0x1862F8FF, + 0x175FF7FF, + 0x165BF6FF, + 0x1458F5FF, + 0x1656F4F9, + 0x2D6EF2C8, + 0x4586F1D7, + 0x3B71DEC4, + 0x040989EE, + 0x010186FF, + 0x01018AFF, + 0x02028DFF, + 0x030391FF, + 0x030395FF, + 0x02024CFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000005F, + 0x000000FF, + 0x0D327CFF, + 0x1861F7FF, + 0x175EF6FF, + 0x155AF5FF, + 0x1457F4FF, + 0x1354F3FF, + 0x1150F2FF, + 0x104DF1FF, + 0x000081FF, + 0x000083FF, + 0x010187FF, + 0x02028BFF, + 0x02028EFF, + 0x030392FF, + 0x030395FF, + 0x02024DFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x0C3078FF, + 0x1860F7FF, + 0x165DF6FF, + 0x1559F5FF, + 0x1456F4FF, + 0x1253F3FF, + 0x114FF2FF, + 0x104CF1FF, + 0x000081FF, + 0x010184FF, + 0x010188FF, + 0x02028BFF, + 0x02028FFF, + 0x030393FF, + 0x040496FF, + 0x02024DFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x0C3078FF, + 0x175FF7FF, + 0x165CF6FF, + 0x1559F5FF, + 0x1355F4FF, + 0x1252F3FF, + 0x114FF2FF, + 0x0F4BF1FF, + 0x000081FF, + 0x010185FF, + 0x010189FF, + 0x02028CFF, + 0x020290FF, + 0x030394FF, + 0x040497FF, + 0x02024EFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x0C3079FF, + 0x175EF7FF, + 0x165BF5FF, + 0x1458F4FF, + 0x1354F3FF, + 0x1251F2FF, + 0x104EF1FF, + 0x0F4AF0FF, + 0x000082FF, + 0x010186FF, + 0x010189FF, + 0x02028DFF, + 0x030391FF, + 0x030394FF, + 0x040498FF, + 0x02024EFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x0C2F78FF, + 0x175DF6FF, + 0x155AF5FF, + 0x1457F4FF, + 0x1353F3FF, + 0x1150F2FF, + 0x104DF1FF, + 0x0F49F0FF, + 0x000083FF, + 0x010187FF, + 0x02028AFF, + 0x02028EFF, + 0x030392FF, + 0x030395FF, + 0x040499FF, + 0x03034FFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x0B2F78FF, + 0x165CF6FF, + 0x1559F5FF, + 0x1356F4FF, + 0x1252F3FF, + 0x114FF2FF, + 0x0F4CF1FF, + 0x0E48F0FF, + 0x000084FF, + 0x010187FF, + 0x02028BFF, + 0x02028FFF, + 0x030392FF, + 0x040496FF, + 0x04049AFF, + 0x03034FFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x0B2F79FF, + 0x165BF6FF, + 0x1458F5FF, + 0x1355F4FF, + 0x1251F3FF, + 0x104EF2FF, + 0x0F4BF1FF, + 0x0E47F0FF, + 0x010185FF, + 0x010188FF, + 0x02028CFF, + 0x020290FF, + 0x030393FF, + 0x040497FF, + 0x04049BFF, + 0x03034FFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000046, + 0x000000FF, + 0x0B2E79FF, + 0x155BF5FF, + 0x1457F4FF, + 0x1354F3FF, + 0x1151F2FF, + 0x104DF1FF, + 0x0F4AF0FF, + 0x0D47EFFF, + 0x010185FF, + 0x010189FF, + 0x02028DFF, + 0x030390FF, + 0x030394FF, + 0x040498FF, + 0x04049BFF, + 0x030350FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000017, + 0x000000A5, + 0x000000FF, + 0x0D1726FF, + 0x204DA1FF, + 0x155AF5FF, + 0x1456F4FF, + 0x1253F3FF, + 0x1150F2FF, + 0x104CF1FF, + 0x0E49F0FF, + 0x0D46EFFF, + 0x010186FF, + 0x01018AFF, + 0x02028EFF, + 0x030391FF, + 0x030395FF, + 0x040499FF, + 0x05059CFF, + 0x030350FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000001, + 0x00000065, + 0x000000EE, + 0x020305FF, + 0x284975FF, + 0x5195F3FF, + 0x2F64BEFB, + 0x1559F5FF, + 0x1355F4FF, + 0x1252F3FF, + 0x114FF2FF, + 0x0F4BF1FF, + 0x0E48F0FF, + 0x0D45EFFF, + 0x010187FF, + 0x02028BFF, + 0x02028EFF, + 0x030392FF, + 0x030396FF, + 0x040499FF, + 0x05059DFF, + 0x030351FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000026, + 0x000000BD, + 0x000000FF, + 0x16273DFF, + 0x4B88D3FF, + 0x579FFCFF, + 0x559CFBFF, + 0x3B80F1C6, + 0x1458F5FF, + 0x1354F4FF, + 0x1251F3FF, + 0x104EF1FF, + 0x0F4AF0FF, + 0x0E47EFFF, + 0x0C44EEFF, + 0x010188FF, + 0x02028CFF, + 0x02028FFF, + 0x030393FF, + 0x040497FF, + 0x04049AFF, + 0x05059EFF, + 0x030351FF, + 0x000000FF, + 0x00000027, + 0x00000027, + 0x00000027, + 0x00000027, + 0x00000027, + 0x00000027, + 0x00000027, + 0x00000023, + 0x00000005, + 0x00000000, + 0x0000000C, + 0x0000001C, + 0x00000026, + 0x00000027, + 0x00000026, + 0x0000001C, + 0x0000000C, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FA, + 0x060B11FF, + 0x396598FF, + 0x5CA5FCFF, + 0x5AA3FCFF, + 0x58A0FCFF, + 0x569DFBFF, + 0x3F84FABF, + 0x1457F4FF, + 0x1354F3FF, + 0x1150F2FF, + 0x104DF1FF, + 0x0F4AF0FF, + 0x0D46EFFF, + 0x0C43EEFF, + 0x010189FF, + 0x02028DFF, + 0x030390FF, + 0x030394FF, + 0x040497FF, + 0x04049BFF, + 0x05059FFF, + 0x030351FF, + 0x000000FF, + 0x00000067, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x0000004F, + 0x00000048, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000047, + 0x00000024, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x113878FF, + 0x356EBDFF, + 0x5AA2F5F7, + 0x5BA5FDFF, + 0x59A2FCFF, + 0x579FFCFF, + 0x4086FABF, + 0x1456F4FF, + 0x1253F3FF, + 0x114FF2FF, + 0x104CF1FF, + 0x0E49F0FF, + 0x0D45EFFF, + 0x0C42EEFF, + 0x01018AFF, + 0x02028DFF, + 0x030391FF, + 0x030395FF, + 0x040498FF, + 0x04049CFF, + 0x0505A0FF, + 0x04085CFF, + 0x000001FF, + 0x000000FE, + 0x000000D1, + 0x00000091, + 0x0000005A, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000043, + 0x00000007, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x0F367EFF, + 0x1B69FAFF, + 0x1E6AF9F3, + 0x428BFAC0, + 0x5AA2FCEF, + 0x58A0FCFF, + 0x4086F8C0, + 0x1355F4FF, + 0x1252F3FF, + 0x114EF2FF, + 0x0F4BF1FF, + 0x0E48F0FF, + 0x0D44EFFF, + 0x0B41EEFF, + 0x02028BFF, + 0x02028EFF, + 0x030392FF, + 0x030396FF, + 0x040499FF, + 0x05059DFF, + 0x041193FB, + 0x0627D9FF, + 0x0526C7FF, + 0x031979FF, + 0x01061FFF, + 0x000000FF, + 0x000000F5, + 0x000000BB, + 0x0000007C, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000038, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x0E367EFF, + 0x1B68FAFF, + 0x1A65F9FF, + 0x1861F7FF, + 0x1D62F8F0, + 0x428AF8C0, + 0x3A81FAC0, + 0x1354F3FF, + 0x1251F2FF, + 0x104DF1FF, + 0x0F4AF0FF, + 0x0E47EFFF, + 0x0C43EEFF, + 0x0B40EDFF, + 0x02028BFF, + 0x02028FFF, + 0x030393FF, + 0x040496FF, + 0x04059CF7, + 0x071DCDC3, + 0x0624D9FF, + 0x0627DCFF, + 0x062ADEFF, + 0x062DE1FF, + 0x062FE3FF, + 0x0526B6FF, + 0x02135BFF, + 0x00020CFF, + 0x000000FF, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000050, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FD, + 0x020711FF, + 0x0E3785FF, + 0x1860EFFF, + 0x1861F7FF, + 0x165DF6FF, + 0x155AF5FF, + 0x1457F4FF, + 0x1253F3FF, + 0x1150F2FF, + 0x104DF1FF, + 0x0E49F0FF, + 0x0D46EFFF, + 0x0C43EEFF, + 0x0A3FEDFF, + 0x02028CFF, + 0x020290FF, + 0x030394FF, + 0x06089FE5, + 0x051BD1D6, + 0x0620D5FF, + 0x0623D8FF, + 0x0626DAFF, + 0x0628DDFF, + 0x062BE0FF, + 0x062EE2FF, + 0x062FE3FF, + 0x0527C3FF, + 0x040959FF, + 0x000000FF, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000041, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002C, + 0x000000B3, + 0x000000FF, + 0x030A1AFF, + 0x0E3A94FF, + 0x165BF2FF, + 0x1559F5FF, + 0x1356F4FF, + 0x1252F3FF, + 0x114FF2FF, + 0x0F4CF1FF, + 0x0E48F0FF, + 0x0D45EFFF, + 0x0B42EEFF, + 0x0A3EEDFF, + 0x02028DFF, + 0x030391FF, + 0x0409A6D0, + 0x0519CEEB, + 0x051CD2FF, + 0x061FD4FF, + 0x0621D7FF, + 0x0624D9FF, + 0x0627DCFF, + 0x062ADEFF, + 0x062DE1FF, + 0x062AD2E2, + 0x070BAEFF, + 0x05055CFF, + 0x000000FF, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x0000004E, + 0x00000010, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000003E, + 0x000000C6, + 0x000000FF, + 0x030E27FF, + 0x0D3BA3FF, + 0x1355F3FF, + 0x1251F3FF, + 0x104EF2FF, + 0x0F4BF1FF, + 0x0E47F0FF, + 0x0C44EEFF, + 0x0B41EDFF, + 0x0A3DECFF, + 0x02028EFF, + 0x040BAFC2, + 0x0515CBFA, + 0x0518CEFF, + 0x051AD0FF, + 0x051DD3FF, + 0x0620D5FF, + 0x0623D8FF, + 0x0626DAFF, + 0x0628DDFF, + 0x0624C9DA, + 0x090BB6FA, + 0x0909B7FF, + 0x05055CFF, + 0x000000FF, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000053, + 0x00000038, + 0x0000000A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000051, + 0x000000D7, + 0x000000FF, + 0x041338FF, + 0x0D3DBAFF, + 0x104DF1FF, + 0x0F4AF0FF, + 0x0D46EFFF, + 0x0C43EEFF, + 0x0B40EDFF, + 0x093CECFF, + 0x1832C7B3, + 0x1B39D7CD, + 0x1A39DACD, + 0x1A3ADBCD, + 0x193ADCCD, + 0x193DDFCD, + 0x1639DDD1, + 0x1234D8DD, + 0x1235D2E4, + 0x0720BDD1, + 0x0808B2FD, + 0x0909B7FF, + 0x0808A1FF, + 0x010118FF, + 0x000000F3, + 0x00000054, + 0x00000054, + 0x00000054, + 0x00000054, + 0x0000003E, + 0x00000031, + 0x0000003A, + 0x0000003E, + 0x0000003A, + 0x00000031, + 0x00000020, + 0x00000008, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000002, + 0x00000055, + 0x000000DF, + 0x000000FF, + 0x041440FF, + 0x0B3CC4FF, + 0x0D46EFFF, + 0x0C42EEFF, + 0x0A3FEDFF, + 0x093CECFF, + 0x0D3CECF3, + 0x306AF3C0, + 0x4588F8EF, + 0x4485F8FF, + 0x4282F7FF, + 0x407FF7FF, + 0x3D7CF7FF, + 0x3B79F6FF, + 0x264FCAD5, + 0x0808B1FF, + 0x0909B4FF, + 0x0808A1FF, + 0x010118FF, + 0x000000F4, + 0x00000078, + 0x00000054, + 0x00000036, + 0x0000002D, + 0x0000002A, + 0x00000003, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000000A, + 0x00000077, + 0x000000EF, + 0x000102FF, + 0x041750FF, + 0x0A39CFFF, + 0x0A3EEDFF, + 0x093BECFF, + 0x0737EBFF, + 0x0634EAFF, + 0x0937EAF3, + 0x2C65F2C0, + 0x4383F8EF, + 0x4181F7FF, + 0x3F7EF7FC, + 0x203FC2D2, + 0x0707AEFF, + 0x0808B1FF, + 0x0808A0FF, + 0x010118FF, + 0x000000F4, + 0x00000078, + 0x00000054, + 0x0000002A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000012, + 0x00000088, + 0x000000F6, + 0x000208FF, + 0x051C6DFF, + 0x0736DBFF, + 0x0736EAFF, + 0x0633E9FF, + 0x0430E8FF, + 0x032CE7FF, + 0x062FE8F0, + 0x2C62F0C0, + 0x1D37C6C9, + 0x0707ABFF, + 0x0808AFFF, + 0x07079CFF, + 0x010117FF, + 0x000000F4, + 0x00000078, + 0x00000054, + 0x0000002A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000001C, + 0x00000099, + 0x000000FC, + 0x010410FF, + 0x041C7DFF, + 0x0530E1FF, + 0x042FE8FF, + 0x032BE7FF, + 0x0128E6FF, + 0x0025E5FF, + 0x0707A8FF, + 0x0707ACFF, + 0x07079AFF, + 0x010118FF, + 0x000000F4, + 0x00000078, + 0x00000054, + 0x0000002A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002C, + 0x000000B3, + 0x000000FF, + 0x010519FF, + 0x021C8BFF, + 0x022AE3FF, + 0x0127E6FF, + 0x0025E5FF, + 0x0707A9FF, + 0x060699FF, + 0x010117FF, + 0x000000F3, + 0x00000076, + 0x00000054, + 0x0000002A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000003E, + 0x000000C7, + 0x000000FF, + 0x000724FF, + 0x011999FF, + 0x0025E4FF, + 0x060696FF, + 0x010117FF, + 0x000000F3, + 0x00000076, + 0x00000054, + 0x0000002A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000001, + 0x00000051, + 0x000000D7, + 0x000000FF, + 0x000935FF, + 0x010115FF, + 0x000000F3, + 0x00000076, + 0x00000054, + 0x0000002A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000002, + 0x00000055, + 0x000000DF, + 0x000000F4, + 0x00000078, + 0x00000054, + 0x0000002A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0}; diff --git a/widget/milsko/milskosrc/src/icon/left.c b/widget/milsko/milskosrc/src/icon/left.c new file mode 100644 index 0000000000..19103cd5d3 --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/left.c @@ -0,0 +1,445 @@ +#include + +MwU32 MwIconLeft[] = { + (20 << 16) | 22, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0}; diff --git a/widget/milsko/milskosrc/src/icon/news.c b/widget/milsko/milskosrc/src/icon/news.c new file mode 100644 index 0000000000..86c7b8fdd2 --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/news.c @@ -0,0 +1,2309 @@ +#include + +MwU32 MwIconNews[] = { + (48 << 16) | 48, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000022, + 0x010101B0, + 0x0000004A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000032, + 0x010101B5, + 0x0000001E, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010101BB, + 0x010101FF, + 0x010101FF, + 0x010101DD, + 0x00000070, + 0x00000000, + 0x00000032, + 0x010101ED, + 0x010101FF, + 0x010101EC, + 0x0000004D, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000006B, + 0x010101FF, + 0xA0A098FF, + 0xB9B9AFFF, + 0x5B5B56FF, + 0x040404FF, + 0x010101E9, + 0x010101ED, + 0x262624FF, + 0xC9C8C0FF, + 0x4B4B47FF, + 0x010101FE, + 0x0000006A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000031, + 0x010101F7, + 0x5E5E58FF, + 0xE1E1D6FF, + 0xE2E2D7FF, + 0xE2E2D7FF, + 0xC4C4B9FF, + 0x52524EFF, + 0x2C2C2AFF, + 0xDCDCD4FF, + 0xEDEDE4FF, + 0xE9E9E0FF, + 0x666561FF, + 0x010101FE, + 0x0000006A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010101DA, + 0x262624FF, + 0xDADACFFF, + 0xE2E2D7FF, + 0xDFDFD4FF, + 0xD1D1C7FF, + 0xC3C3BAFF, + 0xC4C4BDFF, + 0xEAE9E0FF, + 0xF2F1E9FF, + 0xF1F0E8FF, + 0xF0EFE6FF, + 0xEBEAE2FF, + 0x666661FF, + 0x010101FC, + 0x00000049, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010101C4, + 0x0C0C0CFF, + 0xC5C5BCFF, + 0xE2E2D7FF, + 0xD6D6CCFF, + 0xC9C9C0FF, + 0xBBBBB3FF, + 0xCECDC6FF, + 0xF5F4ECFF, + 0xF6F5EEFF, + 0xF5F5EDFF, + 0xF4F3EBFF, + 0xF3F2E9FF, + 0xF1F0E7FF, + 0xEBEBE1FF, + 0x4B4B48FF, + 0x010101F1, + 0x0000002C, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010101AE, + 0x040404FF, + 0xB5B5ACFF, + 0xD9D9CFFF, + 0xCCCCC3FF, + 0xBFBFB7FF, + 0xBCBCB5FF, + 0xE3E2DCFF, + 0xFBFAF3FF, + 0xFBFAF2FF, + 0xFAF9F2FF, + 0xF9F8F0FF, + 0xF7F6EFFF, + 0xF5F4ECFF, + 0xF3F2EAFF, + 0xF0F0E7FF, + 0xE3E2DAFF, + 0x262624FF, + 0x010101E0, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0202029F, + 0x010101FF, + 0x999992FF, + 0xCDCDC4FF, + 0xC1C1B9FF, + 0xB6B6B0FF, + 0xD0CFC8FF, + 0xF9F8F1FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFAF9F1FF, + 0xE6ECF0FF, + 0xF5F4ECFF, + 0xF2F1E9FF, + 0xEFEEE6FF, + 0xD5D4CCFF, + 0x161615FF, + 0x010101CB, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010101AE, + 0x010101FF, + 0x878780FF, + 0xC1C1B9FF, + 0xB6B6AFFF, + 0xBFBFB9FF, + 0xEDEDE6FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xDEEAF7FF, + 0xD8E7F7FF, + 0x86B8FCFF, + 0xC0D6F3FF, + 0xF3F2EAFF, + 0xF0EFE7FF, + 0xEDECE3FF, + 0xBEBEB5FF, + 0x060605FF, + 0x010101B2, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002D, + 0x010101D5, + 0x050504FF, + 0x8D8D87FF, + 0xB5B5AEFF, + 0xB8B8B2FF, + 0xE1E0DAFF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0x89BBFFFF, + 0x89BBFFFF, + 0x89BAFDFF, + 0xE9EEF0FF, + 0xF4F3EBFF, + 0xF0F0E7FF, + 0xEDECE3FF, + 0xE9E9DFFF, + 0xA8A89FFF, + 0x010101FF, + 0x0202029D, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0202028A, + 0x010101FA, + 0x1A1A19FF, + 0x9B9B94FF, + 0xB1B1ACFF, + 0xD6D6CFFF, + 0xFBFAF3FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xBDD8FAFF, + 0x89BBFFFF, + 0xB3D3FBFF, + 0xE3EDF5FF, + 0xF8F7EFFF, + 0xF4F3EBFF, + 0xF0F0E7FF, + 0xEDECE3FF, + 0xE9E8DFFF, + 0xE5E5DBFF, + 0x919188FF, + 0x010101FF, + 0x02020285, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000076, + 0x010101EC, + 0x030302FF, + 0x5E5E59FF, + 0xA6A6A2FF, + 0xCECEC7FF, + 0xF8F7F0FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xE7E6E1FF, + 0xC4C4C2FF, + 0xBAB9B8FF, + 0xF2F2EBFF, + 0xFCFBF4FF, + 0xBDD8FAFF, + 0xA7CCFCFF, + 0xD2E3F8FF, + 0xFBFAF3FF, + 0xF8F7EFFF, + 0xF4F3EBFF, + 0xF0EFE7FF, + 0xECEBE2FF, + 0xE8E8DEFF, + 0xE4E4DAFF, + 0xE1E0D5FF, + 0x7E7E76FF, + 0x010101FF, + 0x00000065, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000002, + 0x02020286, + 0x010101EF, + 0x010101FF, + 0x4D4D48FF, + 0x9A9993FF, + 0xC3C3BDFF, + 0xF2F1EBFF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xEAE9E4FF, + 0xC0C0BEFF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xBBBBBAFF, + 0xFBFAF3FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFBFAF3FF, + 0xF7F6EEFF, + 0xF3F2EAFF, + 0xEFEEE6FF, + 0xEBEAE1FF, + 0xD6DDDEFF, + 0xA8C1DEFF, + 0xD0D7D5FF, + 0xDAD9CFFF, + 0x595953FF, + 0x010101F9, + 0x0000003C, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000001B, + 0x02020294, + 0x010101F7, + 0x040403FF, + 0x4F4F4AFF, + 0x90908AFF, + 0xB7B7B0FF, + 0xE8E8DFFF, + 0xF7F6EFFF, + 0xFBFAF3FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xF2F2EBFF, + 0xC6C6C3FF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xE1E0DCFF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xF9F9F1FF, + 0xF6F5EDFF, + 0xF2F1E8FF, + 0xEEEDE4FF, + 0xC7D5E3FF, + 0x629AE6FF, + 0x518EE2FF, + 0x528DDDFF, + 0xB7C6D1FF, + 0xD0D0C5FF, + 0x30302DFF, + 0x010101E2, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0202028F, + 0x010101F7, + 0x090909FF, + 0x5E5E5AFF, + 0x90908BFF, + 0xB1B1AAFF, + 0xDEDED6FF, + 0xF1F1E8FF, + 0xF5F4ECFF, + 0xF9F8F1FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFAF9F2FF, + 0xD4D3D0FF, + 0xAFAFAFFF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xB3B3B2FF, + 0xEFEEE8FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xF8F7EFFF, + 0xF4F3EBFF, + 0xF0EFE7FF, + 0xBDD0E6FF, + 0x619AE9FF, + 0x5592E4FF, + 0x4D8BE0FF, + 0x4484DCFF, + 0x4885D6FF, + 0xC3CACAFF, + 0xBABAAFFF, + 0x080807FF, + 0x0202029C, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010101CB, + 0x060605FF, + 0x5E5D5BFF, + 0x91918DFF, + 0xB1B1AAFF, + 0xDAD9D1FF, + 0xEBEAE1FF, + 0xEFEEE5FF, + 0xF3F2EAFF, + 0xF7F6EEFF, + 0xFBFAF2FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xCBCAC8FF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xBCBCBBFF, + 0xF1F1EBFF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xF9F9F1FF, + 0xF6F5EDFF, + 0xF2F1E9FF, + 0xB6CEE8FF, + 0x639CEBFF, + 0x5995E6FF, + 0x518EE2FF, + 0x4888DEFF, + 0x4081D9FF, + 0x377AD5FF, + 0x6B96CDFF, + 0xCECEC1FF, + 0x7C7C74FF, + 0x010101FB, + 0x00000026, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000004C, + 0x010101FF, + 0x8F8F8AFF, + 0xB5B5AEFF, + 0xD6D6CCFF, + 0xE4E4DAFF, + 0xE8E8DEFF, + 0xECEBE2FF, + 0xF0EFE7FF, + 0xF4F3EBFF, + 0xF8F7EFFF, + 0xFBFAF3FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFAF9F2FF, + 0xC1C1BFFF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xACACACFF, + 0xCFCECBFF, + 0xFAF9F2FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFBFAF2FF, + 0xF7F6EEFF, + 0xF3F2EAFF, + 0xB3CDEBFF, + 0x659EECFF, + 0x5D98E8FF, + 0x5491E4FF, + 0x4C8AE0FF, + 0x4484DBFF, + 0x3B7DD7FF, + 0x3376D3FF, + 0x2C71CEFF, + 0xB1BCC1FF, + 0xC1C1B4FF, + 0x060606FF, + 0x00000093, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x02020283, + 0x080807FF, + 0xDAD9CEFF, + 0xDEDDD2FF, + 0xE1E1D6FF, + 0xE5E5DBFF, + 0xE9E8DFFF, + 0xEDECE3FF, + 0xF1F0E7FF, + 0xF4F3EBFF, + 0xF8F7EFFF, + 0xFBFAF3FF, + 0xDBE8F7FF, + 0xEBF2F6FF, + 0xFCFBF4FF, + 0xF7F6F0FF, + 0xB6B6B5FF, + 0xACACACFF, + 0xACACACFF, + 0xB8B7B6FF, + 0xE8E7E2FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFBFAF3FF, + 0xF8F7EFFF, + 0xF4F3EBFF, + 0xBAD1ECFF, + 0x67A0EEFF, + 0x5F9AE9FF, + 0x5793E5FF, + 0x4F8DE1FF, + 0x4686DDFF, + 0x3E7FD8FF, + 0x3679D4FF, + 0x2D72D0FF, + 0x256BCCFF, + 0x7498C2FF, + 0xC6C6B8FF, + 0x383834FF, + 0x010101D3, + 0x0000003F, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x02020283, + 0x090908FF, + 0xDAD9CEFF, + 0xDEDED3FF, + 0xE2E1D7FF, + 0xE6E5DBFF, + 0xE9E9DFFF, + 0xEDECE3FF, + 0xF1F0E7FF, + 0xDEE7EDFF, + 0xC0D8F4FF, + 0xC5DBF9FF, + 0x93C1FEFF, + 0xABCEFCFF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xE3E2DDFF, + 0xB1B1B0FF, + 0xD4D3D0FF, + 0xF9F8F1FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFBFAF3FF, + 0xF8F7EFFF, + 0xECEBE4FF, + 0xF1F0E7FF, + 0xE5E7E4FF, + 0x80ADE8FF, + 0x5995E6FF, + 0x518EE2FF, + 0x4988DEFF, + 0x4081DAFF, + 0x387BD5FF, + 0x3074D1FF, + 0x286ECDFF, + 0x1F67C9FF, + 0x4E80C1FF, + 0xC4C3B5FF, + 0x262623FF, + 0x010101CE, + 0x00000074, + 0x00000025, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000058, + 0x010101FF, + 0xC7C7BCFF, + 0xDFDED3FF, + 0xE2E2D7FF, + 0xE6E5DBFF, + 0xE9E9DFFF, + 0xEDECE3FF, + 0xF0F0E7FF, + 0xA6C7F1FF, + 0x7EB2F9FF, + 0x84B7FDFF, + 0x89BBFFFF, + 0xE4EDF6FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFBFAF3FF, + 0xF7F6F0FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFAF9F2FF, + 0xF4F3ECFF, + 0xBBBBB8FF, + 0xA5A5A4FF, + 0xE8E7DFFF, + 0xEAE9E0FF, + 0xDBE0DDFF, + 0x6399E2FF, + 0x4A89DFFF, + 0x4283DAFF, + 0x3A7CD6FF, + 0x3276D2FF, + 0x2A6FCEFF, + 0x2269CAFF, + 0x1A62C6FF, + 0x7798BAFF, + 0xB1B1A3FF, + 0x050504FF, + 0x010101BB, + 0x00000074, + 0x00000052, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010101DC, + 0x44433FFF, + 0xDCDBCFFF, + 0xE2E2D7FF, + 0xE6E5DBFF, + 0xE9E8DFFF, + 0xD2DDE6FF, + 0xCDDBE9FF, + 0x7DB0F5FF, + 0xA9CAF4FF, + 0xF8F7F0FF, + 0xFBFAF2FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFBFAF3FF, + 0xF9F8F0FF, + 0xF0EFE7FF, + 0xB2B2B0FF, + 0x999999FF, + 0xC0C0BBFF, + 0xEAE9DFFF, + 0xE6E6DCFF, + 0xE3E2D8FF, + 0xBECCD6FF, + 0x4684DBFF, + 0x3B7DD7FF, + 0x3377D3FF, + 0x2B71CFFF, + 0x236ACBFF, + 0x1B64C7FF, + 0x3A74BFFF, + 0xBEC0B3FF, + 0x68685FFF, + 0x010101FF, + 0x00000093, + 0x00000074, + 0x00000057, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000038, + 0x010101FB, + 0x878781FF, + 0xE1E0D6FF, + 0xE5E4DAFF, + 0xE8E8DEFF, + 0x87B1E9FF, + 0x6BA3F0FF, + 0x71A8F3FF, + 0xD0DEEEFF, + 0xF6F5EDFF, + 0xF8F7F0FF, + 0xFAF9F2FF, + 0xFBFAF3FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFCFBF4FF, + 0xFBFAF3FF, + 0xFAF9F2FF, + 0xF9F8F0FF, + 0xF7F6EEFF, + 0xE8E7E0FF, + 0xA8A8A7FF, + 0x999999FF, + 0xCDCCC6FF, + 0xE9E8DFFF, + 0xE6E5DBFF, + 0xE3E2D8FF, + 0xDFDFD4FF, + 0xDCDBD0FF, + 0x81A6D3FF, + 0x3478D3FF, + 0x2C71CFFF, + 0x256BCBFF, + 0x1D65C7FF, + 0x3371C1FF, + 0xB4BAB5FF, + 0x9A9A8EFF, + 0x060606FF, + 0x010101D7, + 0x00000074, + 0x00000074, + 0x00000038, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000073, + 0x010101FF, + 0x979690FF, + 0xE4E3D9FF, + 0xE7E6DDFF, + 0xCFD9E2FF, + 0xCAD8E5FF, + 0xCCDBE9FF, + 0xEEEFE8FF, + 0xF3F3EBFF, + 0xF5F4ECFF, + 0xF7F6EEFF, + 0xF8F7EFFF, + 0xF8F7F0FF, + 0xF8F7F0FF, + 0xF8F7EFFF, + 0xF7F6EEFF, + 0xF6F5EDFF, + 0xF4F3EBFF, + 0xDBDBD5FF, + 0x9E9E9DFF, + 0x9D9D9CFF, + 0xD8D7D0FF, + 0xE8E7DEFF, + 0xE5E4DAFF, + 0xE2E1D7FF, + 0xDFDED3FF, + 0xDCDBD0FF, + 0xD8D8CCFF, + 0xCBCFC8FF, + 0x3979CEFF, + 0x256CCCFF, + 0x1D65C8FF, + 0x447AC2FF, + 0xB5BBB6FF, + 0x9B9B90FF, + 0x0B0B0AFF, + 0x010101E8, + 0x0000007E, + 0x00000074, + 0x00000061, + 0x00000005, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x02020285, + 0x010101FF, + 0xA09E99FF, + 0xE6E5DBFF, + 0xE8E8DEFF, + 0xEBEAE1FF, + 0xEDECE3FF, + 0xEFEEE5FF, + 0xF1F0E7FF, + 0xF2F1E9FF, + 0xF3F2EAFF, + 0xF4F3EBFF, + 0xF4F3EBFF, + 0xF4F3EBFF, + 0xF3F3EAFF, + 0xF3F2E9FF, + 0xF1F0E8FF, + 0xF0EFE6FF, + 0xB2B1AEFF, + 0xA2A2A0FF, + 0xDEDED5FF, + 0xE7E6DCFF, + 0xD5D4CCFF, + 0xB6B6AFFF, + 0xDEDED3FF, + 0xDBDBCFFF, + 0xD8D7CCFF, + 0xD5D4C8FF, + 0xD1D1C4FF, + 0x789CC7FF, + 0x2167C8FF, + 0x6E93BEFF, + 0xC1C2B5FF, + 0x8C8C82FF, + 0x030303FF, + 0x010101DE, + 0x0000007F, + 0x00000074, + 0x0000005F, + 0x0000000E, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000006D, + 0x010101FB, + 0x070707FF, + 0xBAB9B1FF, + 0xE6E5DCFF, + 0xE8E8DEFF, + 0xEAEAE0FF, + 0xECEBE2FF, + 0xEEEDE4FF, + 0xEFEEE5FF, + 0xEFEFE6FF, + 0xF0EFE7FF, + 0xF0EFE7FF, + 0xF0EFE6FF, + 0xEFEEE6FF, + 0xE2E1DAFF, + 0xEDECE3FF, + 0xEBEBE1FF, + 0xE5E5DCFF, + 0xE2E2D9FF, + 0xE5E4DAFF, + 0xD4D4CBFF, + 0x888887FF, + 0x848483FF, + 0xD2D2C7FF, + 0xD7D7CBFF, + 0xCFCFC3FF, + 0xCDCDC1FF, + 0xCECDC0FF, + 0xB3BCBFFF, + 0xAEB9BBFF, + 0xC1C1B3FF, + 0x65655DFF, + 0x010101FF, + 0x010101CC, + 0x00000078, + 0x00000074, + 0x00000054, + 0x00000006, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000038, + 0x010101CD, + 0x010101FF, + 0x353432FF, + 0xA3A29BFF, + 0xBBBAB2FF, + 0xCDCCC3FF, + 0xE6E5DBFF, + 0xE7E7DDFF, + 0xE9E8DFFF, + 0xEAE9E0FF, + 0xEBEAE1FF, + 0xECEBE2FF, + 0xECEBE2FF, + 0xECEBE2FF, + 0xECEBE2FF, + 0xC4C4BFFF, + 0x929292FF, + 0xC3C3BDFF, + 0xE7E6DCFF, + 0xE5E4DAFF, + 0xE3E2D8FF, + 0xD2D1C8FF, + 0x858584FF, + 0x828281FF, + 0xC9C8BFFF, + 0xD6D6CAFF, + 0xCECEC2FF, + 0x7E7E7BFF, + 0x80807CFF, + 0xCACABCFF, + 0xC7C6B8FF, + 0xBDBDB0FF, + 0x494943FF, + 0x010101FE, + 0x000000B8, + 0x00000075, + 0x00000074, + 0x00000046, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x02020291, + 0x010101FD, + 0x191918FF, + 0x8E8D89FF, + 0xCECDC5FF, + 0xC8C6BFFF, + 0xC1C0B8FF, + 0xB9B1ACFF, + 0xCAA4A6FF, + 0xE4E4DAFF, + 0xE6E5DBFF, + 0xE7E6DCFF, + 0xE7E7DDFF, + 0xE8E7DEFF, + 0xE8E7DEFF, + 0xE0DFD6FF, + 0xA6A6A3FF, + 0x898989FF, + 0xA3A3A0FF, + 0xDBDAD1FF, + 0xE2E2D7FF, + 0xE1E0D5FF, + 0xDFDED3FF, + 0xAFAFA9FF, + 0x7F7F7DFF, + 0xC7C7BDFF, + 0xD5D4C8FF, + 0xCDCDC1FF, + 0x7D7D7AFF, + 0x616161FF, + 0xA5A59BFF, + 0xC6C6B8FF, + 0xB7B7A8FF, + 0x2D2D29FF, + 0x010101FB, + 0x000000A6, + 0x00000074, + 0x00000073, + 0x00000032, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000048, + 0x010101E9, + 0x060605FF, + 0x656562FF, + 0xD6D4CDFF, + 0xDBD9D2FF, + 0xD4D3CCFF, + 0xCDCCC5FF, + 0xC5ADACFF, + 0xB7596EFF, + 0xAE425BFF, + 0xC89B9FFF, + 0xE2E2D7FF, + 0xE3E2D8FF, + 0xE4E3D9FF, + 0xE4E3D9FF, + 0xCAC9C2FF, + 0x8D8D8CFF, + 0x878787FF, + 0xBABAB4FF, + 0xE1E0D6FF, + 0xE0DFD4FF, + 0xDEDDD3FF, + 0xD2D2C8FF, + 0xDADACEFF, + 0xD8D8CCFF, + 0xCECDC2FF, + 0xD3D3C6FF, + 0xCCCBC0FF, + 0x7B7B78FF, + 0x5F5F5FFF, + 0xA3A39AFF, + 0xC5C5B7FF, + 0xA7A79AFF, + 0x141412FF, + 0x010101F2, + 0x00000091, + 0x00000074, + 0x0000006F, + 0x00000023, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000057, + 0x010101FB, + 0x2D2D2CFF, + 0xCAC8C3FF, + 0xEDECE5FF, + 0xE7E6DFFF, + 0xE1DFD8FF, + 0xDAD7D1FF, + 0xD19CA4FF, + 0xC55972FF, + 0xBC4F68FF, + 0xB34660FF, + 0xAB3F58FF, + 0xC6999EFF, + 0xDFDFD4FF, + 0xE0DFD4FF, + 0xCCCBC3FF, + 0x808080FF, + 0x8F8F8DFF, + 0xCECEC4FF, + 0xDEDDD2FF, + 0xDDDCD1FF, + 0xDBDBCFFF, + 0xC0BFB7FF, + 0x797878FF, + 0xAAA9A2FF, + 0xD4D3C7FF, + 0xD1D1C4FF, + 0xCACABEFF, + 0x797976FF, + 0x5D5D5DFF, + 0xA2A299FF, + 0xC4C4B6FF, + 0x939387FF, + 0x070706FF, + 0x010101E6, + 0x00000085, + 0x00000074, + 0x00000068, + 0x00000017, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002E, + 0x010101FB, + 0x424240FF, + 0xEBE9E4FF, + 0xF9F7F1FF, + 0xF4F2ECFF, + 0xEDEBE5FF, + 0xE6DBD7FF, + 0xDB8D9EFF, + 0xD3657FFF, + 0xCA5C76FF, + 0xC1546DFF, + 0xB84B65FF, + 0xAF425CFF, + 0xA73C54FF, + 0xC69EA0FF, + 0xDCDBD0FF, + 0xDCDBD0FF, + 0xB7B7B0FF, + 0xD8D8CDFF, + 0xDADACEFF, + 0xD9D9CDFF, + 0xD8D8CCFF, + 0xAFAFA7FF, + 0x707070FF, + 0x7D7D7BFF, + 0xC5C5B9FF, + 0xCFCFC2FF, + 0xCDCDC0FF, + 0xB1B0A7FF, + 0x5E5E5EFF, + 0xA1A097FF, + 0xC2C2B3FF, + 0x79796FFF, + 0x010101FF, + 0x010101D6, + 0x0000007B, + 0x00000074, + 0x0000005F, + 0x0000000E, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010101B0, + 0x161616FF, + 0xDBDAD4FF, + 0xF1EFE8FF, + 0xF7F5EFFF, + 0xF7F5EFFF, + 0xF1D4D6FF, + 0xE8869CFF, + 0xDF718BFF, + 0xD76982FF, + 0xCE607AFF, + 0xC55871FF, + 0xBC4F68FF, + 0xB34660FF, + 0xAA3E57FF, + 0xA3374FFF, + 0xC4A4A4FF, + 0xD8D7CBFF, + 0xD7D7CBFF, + 0xD7D6CAFF, + 0xD6D6CAFF, + 0xD4D4C7FF, + 0x9D9C96FF, + 0x696969FF, + 0x848481FF, + 0xC9C9BCFF, + 0xCDCDC0FF, + 0xCBCBBDFF, + 0xC9C9BBFF, + 0xC6C6B8FF, + 0xBBBBADFF, + 0xBEBEB0FF, + 0x56564FFF, + 0x010101FF, + 0x010101C2, + 0x00000076, + 0x00000074, + 0x00000054, + 0x00000006, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010101E7, + 0x5C5C59FF, + 0xE4E2DCFF, + 0xEAE9E2FF, + 0xF0EEE7FF, + 0xF2CBD0FF, + 0xEF839DFF, + 0xE97A94FF, + 0xE1738DFF, + 0xD96B85FF, + 0xD0637CFF, + 0xC85A74FF, + 0xBF526BFF, + 0xB64963FF, + 0xAE415AFF, + 0xA75063FF, + 0xA99F9AFF, + 0xC7C6BBFF, + 0xD3D3C6FF, + 0xD2D2C6FF, + 0xCFCEC3FF, + 0x8B8B87FF, + 0x646464FF, + 0x8D8D88FF, + 0xCACABDFF, + 0xCACABDFF, + 0xC9C8BBFF, + 0xC7C6B8FF, + 0xC4C4B6FF, + 0xC2C2B3FF, + 0xBBBBACFF, + 0x44443FFF, + 0x010101FD, + 0x000000AD, + 0x00000074, + 0x00000074, + 0x00000046, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010101DD, + 0x232321FF, + 0xB2B1ABFF, + 0xE0DED6FF, + 0xE6E4DEFF, + 0xEBDCD9FF, + 0xEAAFB8FF, + 0xE67F96FF, + 0xE0728CFF, + 0xD96B85FF, + 0xD1637DFF, + 0xC95B75FF, + 0xC1536DFF, + 0xB84B65FF, + 0xB26272FF, + 0xB2ABA5FF, + 0xABABA2FF, + 0x96968FFF, + 0xB9B8AEFF, + 0xCECEC1FF, + 0xB6B6ACFF, + 0x636363FF, + 0x999991FF, + 0xC9C9BCFF, + 0xC8C8BAFF, + 0xC1C1B3FF, + 0x878781FF, + 0xBEBEAFFF, + 0xC0C0B1FF, + 0xB9B9ABFF, + 0x363631FF, + 0x010101FA, + 0x0000009F, + 0x00000074, + 0x00000074, + 0x0000003A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000003B, + 0x010101E7, + 0x020202FF, + 0x42413FFF, + 0xB1AFA9FF, + 0xDAD9D0FF, + 0xE2E1DAFF, + 0xE2DCD6FF, + 0xDEADB4FF, + 0xD7778DFF, + 0xD0627CFF, + 0xC95B75FF, + 0xC1546DFF, + 0xBC7684FF, + 0xBBB8B0FF, + 0xB4B3ABFF, + 0x9C9B94FF, + 0x40403FFF, + 0x4E4E4BFF, + 0xC7C7B8FF, + 0xC9C9BBFF, + 0xBDBDB0FF, + 0xC6C6B8FF, + 0xC5C5B7FF, + 0xBEBEB0FF, + 0x6A6A66FF, + 0x4D4D4DFF, + 0xA2A297FF, + 0xBABAABFF, + 0x373733FF, + 0x010101FA, + 0x00000097, + 0x00000074, + 0x00000074, + 0x00000032, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000000E, + 0x00000079, + 0x010101EA, + 0x010101FF, + 0x2D2D2BFF, + 0x9A9A93FF, + 0xD1D0C7FF, + 0xD9D7D0FF, + 0xD6D4CEFF, + 0xD2ABB0FF, + 0xC97485FF, + 0xC38792FF, + 0xC1BFB7FF, + 0xBBBAB2FF, + 0xA3A39CFF, + 0x4B4B4AFF, + 0x40403FFF, + 0x8D8C85FF, + 0xAAAA9EFF, + 0xC4C4B6FF, + 0xC3C3B5FF, + 0xC2C2B3FF, + 0xBCBCADFF, + 0x676763FF, + 0x4B4B4BFF, + 0x96968DFF, + 0xBBBBADFF, + 0x3C3C37FF, + 0x010101FA, + 0x00000099, + 0x00000074, + 0x00000073, + 0x0000002C, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000000A, + 0x0000006B, + 0x010101DC, + 0x010101FF, + 0x21201FFF, + 0x92928BFF, + 0xC7C6BCFF, + 0xCFCEC6FF, + 0xCBCAC2FF, + 0xC6C5BDFF, + 0xC0BFB7FF, + 0xAAA9A2FF, + 0x545453FF, + 0x4A4A49FF, + 0x94938CFF, + 0xA0A097FF, + 0x5B5A56FF, + 0x8B8B80FF, + 0xBFBFB0FF, + 0xBABAABFF, + 0x676763FF, + 0x4B4B4BFF, + 0x96968DFF, + 0xBDBDADFF, + 0x464642FF, + 0x010101FC, + 0x0000009C, + 0x00000074, + 0x00000072, + 0x00000025, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000003, + 0x00000054, + 0x010101C8, + 0x010101FF, + 0x1A1A18FF, + 0x8C8C83FF, + 0xBFBFB5FF, + 0xC2C1BAFF, + 0xBEBDB5FF, + 0xACABA4FF, + 0x5E5E5CFF, + 0x9C9B94FF, + 0xA7A69DFF, + 0x60605CFF, + 0x252525FF, + 0x595954FF, + 0xBDBDAEFF, + 0xBBBBACFF, + 0x6D6D68FF, + 0x98988EFF, + 0xBCBCAEFF, + 0x4A4A46FF, + 0x010101FD, + 0x000000A0, + 0x00000074, + 0x00000074, + 0x0000002D, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000003C, + 0x010101B1, + 0x010101FE, + 0x4A4A44FF, + 0xAEAEA2FF, + 0xBCBCB2FF, + 0xB6B6ADFF, + 0xB1B0A8FF, + 0xACABA2FF, + 0x86857FFF, + 0x2D2D2DFF, + 0x575753FF, + 0x939389FF, + 0xB3B3A6FF, + 0xBFBFB0FF, + 0xBFBFB0FF, + 0xBCBCADFF, + 0x4E4E48FF, + 0x010101FE, + 0x000000A5, + 0x00000074, + 0x00000074, + 0x00000035, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000003E, + 0x010101D2, + 0x11110FFF, + 0x94948AFF, + 0xB8B8ABFF, + 0xB2B1A7FF, + 0xAAA9A0FF, + 0xA4A49BFF, + 0x7E7E78FF, + 0x98988FFF, + 0x929289FF, + 0xB7B7A8FF, + 0xBFBFB0FF, + 0xBABAABFF, + 0x42423EFF, + 0x010101FD, + 0x000000A7, + 0x00000074, + 0x00000074, + 0x0000003C, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000004, + 0x00000074, + 0x010101F8, + 0x444440FF, + 0xB3B2A4FF, + 0xB7B7AAFF, + 0xA9A99EFF, + 0x9D9C93FF, + 0x97978DFF, + 0x9E9E93FF, + 0xBFBFB0FF, + 0xAFAFA0FF, + 0x272724FF, + 0x010101FB, + 0x000000A0, + 0x00000074, + 0x00000074, + 0x0000004A, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000030, + 0x010101D6, + 0x020202FF, + 0x5A5954FF, + 0xA2A295FF, + 0xB5B5A8FF, + 0xB4B4A6FF, + 0xADADA0FF, + 0x6E6E65FF, + 0x060606FF, + 0x010101EE, + 0x00000090, + 0x00000074, + 0x00000074, + 0x0000004F, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000007, + 0x0000007A, + 0x010101EB, + 0x010101FF, + 0x010101FF, + 0x010101FF, + 0x010101FF, + 0x010101FB, + 0x010101C0, + 0x0000007D, + 0x00000074, + 0x0000006C, + 0x00000041, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000007, + 0x00000041, + 0x0000006C, + 0x00000083, + 0x00000072, + 0x00000043, + 0x0000002C, + 0x00000022, + 0x00000014, + 0x00000001, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0}; diff --git a/widget/milsko/milskosrc/src/icon/note.c b/widget/milsko/milskosrc/src/icon/note.c new file mode 100644 index 0000000000..91938d4893 --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/note.c @@ -0,0 +1,2309 @@ +#include + +MwU32 MwIconNote[] = { + (48 << 16) | 48, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000023, + 0x0000006A, + 0x020000A6, + 0x010000CE, + 0x010000EC, + 0x010000FA, + 0x010000FA, + 0x010000EC, + 0x010000CE, + 0x020000A5, + 0x00000069, + 0x00000022, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000003, + 0x00000058, + 0x010000C4, + 0x010000FF, + 0x010000FF, + 0x1F1D11FF, + 0x4C4728FF, + 0x6D6637FF, + 0x787139FF, + 0x787036FF, + 0x6D662CFF, + 0x4B451BFF, + 0x1F1C0AFF, + 0x010000FF, + 0x010000FE, + 0x010000C3, + 0x00000056, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000045, + 0x010000D8, + 0x010000FF, + 0x2A281BFF, + 0x8B865AFF, + 0xDED68EFF, + 0xFFF59FFF, + 0xFFF59AFF, + 0xFFF493FF, + 0xFFF38BFF, + 0xFFF281FF, + 0xFFF177FF, + 0xFFF06CFF, + 0xFFEF60FF, + 0xDCCC48FF, + 0x897F26FF, + 0x282409FF, + 0x010000FF, + 0x010000D5, + 0x00000042, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000008, + 0x02000099, + 0x010000FF, + 0x28261BFF, + 0xAFAA7CFF, + 0xFEF7B5FF, + 0xFFF8B6FF, + 0xFFF7B4FF, + 0xFFF7B0FF, + 0xFFF6AAFF, + 0xFFF6A3FF, + 0xFFF59AFF, + 0xFFF490FF, + 0xFFF384FF, + 0xFFF178FF, + 0xFFF06CFF, + 0xFFEF5EFF, + 0xFFED50FF, + 0xFDEA41FF, + 0xAC9E22FF, + 0x252105FF, + 0x010000FF, + 0x02000095, + 0x00000007, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000014, + 0x010000CA, + 0x030201FF, + 0x7A7658FF, + 0xF8F2BCFF, + 0xFFF9C5FF, + 0xFFF9C8FF, + 0xFFF9C8FF, + 0xFFF9C5FF, + 0xFFF9C1FF, + 0xFFF8BAFF, + 0xFFF7B2FF, + 0xFFF6A8FF, + 0xFFF59DFF, + 0xFFF491FF, + 0xFFF384FF, + 0xFFF177FF, + 0xFFF069FF, + 0xFFEE5AFF, + 0xFFED4BFF, + 0xFFEB3CFF, + 0xF7E32CFF, + 0x756A0DFF, + 0x020100FF, + 0x010000C7, + 0x00000013, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000014, + 0x010000D5, + 0x0B0A07FF, + 0xB2AE87FF, + 0xFFFACAFF, + 0xFFFAD1FF, + 0xFFFBD6FF, + 0xFFFBD9FF, + 0xFFFBD9FF, + 0xFFFBD6FF, + 0xFFFAD1FF, + 0xFFFACAFF, + 0xFFF9C1FF, + 0xFFF8B6FF, + 0xFFF6AAFF, + 0xFFF59DFF, + 0xFFF490FF, + 0xFFF281FF, + 0xFFF173FF, + 0xFFEF64FF, + 0xFFEE54FF, + 0xFFEC44FF, + 0xFFEA34FF, + 0xFFE924FF, + 0xAE9E0EFF, + 0x0A0800FF, + 0x010000D4, + 0x00000013, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000008, + 0x010000C9, + 0x0B0A07FF, + 0xC2BD94FF, + 0xFFFACFFF, + 0xFFFBD9FF, + 0xFFFCE2FF, + 0xFFFDE8FF, + 0xFFFDEBFF, + 0xFFFDEBFF, + 0xFFFDE8FF, + 0xFFFCE2FF, + 0xFFFBD9FF, + 0xFFFACFFF, + 0xFFF9C3FF, + 0xFFF8B6FF, + 0xFFF6A8FF, + 0xFFF59AFF, + 0xFFF38BFF, + 0xFFF27BFF, + 0xFFF06CFF, + 0xFFEE5CFF, + 0xFFED4BFF, + 0xFFEB3BFF, + 0xFFE92BFF, + 0xFFE81AFF, + 0xBFAC07FF, + 0x0A0800FF, + 0x010000C6, + 0x00000007, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x02000097, + 0x030201FF, + 0xB1AD86FF, + 0xFFFACFFF, + 0xFFFBDCFF, + 0xFFFDE8FF, + 0xFFFEF1FF, + 0xFFFEF8FF, + 0xFFFFFCFF, + 0xFFFFFCFF, + 0xFFFEF8FF, + 0xFFFEF1FF, + 0xFFFDE8FF, + 0xFFFBDCFF, + 0xFFFACFFF, + 0xFFF9C1FF, + 0xFFF7B2FF, + 0xFFF6A3FF, + 0xFFF493FF, + 0xFFF283FF, + 0xFFF173FF, + 0xFFEF62FF, + 0xFFED52FF, + 0xFFEC41FF, + 0xFFEA30FF, + 0xFFE81FFF, + 0xFFE60EFF, + 0xAD9B00FF, + 0x020100FF, + 0x02000092, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000043, + 0x010000FF, + 0x777356FF, + 0xFFFACAFF, + 0xFFFBD9FF, + 0xFFFDE8FF, + 0xFFFEF5FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFEF5FF, + 0xFFFDE8FF, + 0xFFFBD9FF, + 0xFFFACAFF, + 0xFFF8BAFF, + 0xFFF6AAFF, + 0xFFF59AFF, + 0xFFF389FF, + 0xFFF178FF, + 0xFFF068FF, + 0xFFEE57FF, + 0xFFEC46FF, + 0xFFEA34FF, + 0xFFE923FF, + 0xFFE712FF, + 0xFFE501FF, + 0x736300FF, + 0x010000FE, + 0x0000003F, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000003, + 0x010000D6, + 0x252319FF, + 0xF7F1BBFF, + 0xFFFAD1FF, + 0xFFFCE2FF, + 0xFFFEF1FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFEF1FF, + 0xFFFCE2FF, + 0xFFFAD1FF, + 0xFFF9C1FF, + 0xFFF7B0FF, + 0xFFF59FFF, + 0xFFF38EFF, + 0xFFF27DFF, + 0xFFF06CFF, + 0xFFEE5AFF, + 0xFFEC49FF, + 0xFFEB38FF, + 0xFFE926FF, + 0xFFE715FF, + 0xFFE504FF, + 0xF6D700FF, + 0x231D00FF, + 0x010000D2, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000057, + 0x010000FF, + 0xADA87AFF, + 0xFFF9C5FF, + 0xFFFBD6FF, + 0xFFFDE8FF, + 0xFFFEF8FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFEF8FF, + 0xFFFDE8FF, + 0xFFFBD6FF, + 0xFFF9C5FF, + 0xFFF7B4FF, + 0xFFF6A3FF, + 0xFFF491FF, + 0xFFF280FF, + 0xFFF06EFF, + 0xFFEE5DFF, + 0xFFED4BFF, + 0xFFEB3AFF, + 0xFFE928FF, + 0xFFE717FF, + 0xFFE605FF, + 0xFFE000FF, + 0xA98F00FF, + 0x010000FF, + 0x00000054, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010000C5, + 0x29271AFF, + 0xFDF6B5FF, + 0xFFF9C8FF, + 0xFFFBD9FF, + 0xFFFDEBFF, + 0xFFFFFCFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFCFF, + 0xFFFDEBFF, + 0xFFFBD9FF, + 0xFFF9C8FF, + 0xFFF8B6FF, + 0xFFF6A5FF, + 0xFFF493FF, + 0xFFF281FF, + 0xFFF070FF, + 0xFFEF5EFF, + 0xFFED4DFF, + 0xFFEB3BFF, + 0xFFE92AFF, + 0xFFE718FF, + 0xFFE606FF, + 0xFFE000FF, + 0xFDD600FF, + 0x271F00FF, + 0x010000C0, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000022, + 0x010000FE, + 0x8A8559FF, + 0xFFF8B6FF, + 0xFFF9C8FF, + 0xFFFBD9FF, + 0xFFFDEBFF, + 0xFFFFFCFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFCFF, + 0xFFFDEBFF, + 0xFFFBD9FF, + 0xFFF9C8FF, + 0xFFF8B6FF, + 0xFFF6A5FF, + 0xFFF493FF, + 0xFFF281FF, + 0xFFF070FF, + 0xFFEF5EFF, + 0xFFED4DFF, + 0xFFEB3BFF, + 0xFFE92AFF, + 0xFFE718FF, + 0xFFE606FF, + 0xFFE000FF, + 0xFFD800FF, + 0x856C00FF, + 0x010000FE, + 0x0000001E, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000069, + 0x010000FF, + 0xDCD48DFF, + 0xFFF7B4FF, + 0xFFF9C5FF, + 0xFFFBD6FF, + 0xFFFDE8FF, + 0xFFFEF8FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFEF8FF, + 0xFFFDE8FF, + 0xFFFBD6FF, + 0xFFF9C5FF, + 0xFFF7B4FF, + 0xFFF6A3FF, + 0xFFF491FF, + 0xFFF280FF, + 0xFFF06EFF, + 0xFFEE5DFF, + 0xFFED4BFF, + 0xFFEB3AFF, + 0xFFE928FF, + 0xFFE717FF, + 0xFFE605FF, + 0xFFE000FF, + 0xFFD800FF, + 0xD8B000FF, + 0x010000FF, + 0x00000065, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x020000A5, + 0x1E1C10FF, + 0xFFF59FFF, + 0xFFF7B0FF, + 0xFFF9C1FF, + 0xFFFAD1FF, + 0xFFFCE2FF, + 0xFFFEF1FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFEF1FF, + 0xFFFCE2FF, + 0xFFFAD1FF, + 0xFFF9C1FF, + 0xFFF7B0FF, + 0xFFF59FFF, + 0xFFF38EFF, + 0xFFF27DFF, + 0xFFF06CFF, + 0xFFEE5AFF, + 0xFFEC49FF, + 0xFFEB38FF, + 0xFFE926FF, + 0xFFE715FF, + 0xFFE504FF, + 0xFFDF00FF, + 0xFFD700FF, + 0xFFCF00FF, + 0x1B1400FF, + 0x020000A2, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010000CF, + 0x4C4728FF, + 0xFFF59AFF, + 0xFFF6AAFF, + 0xFFF8BAFF, + 0xFFFACAFF, + 0xFFFBD9FF, + 0xFFFDE8FF, + 0xFFFEF5FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFBECFF, + 0xFFE8A3FF, + 0xFFDE7CFF, + 0xFFDC76FF, + 0xFFE387FF, + 0xFFF4A5FF, + 0xFFF59AFF, + 0xFFF389FF, + 0xFFF178FF, + 0xFFF068FF, + 0xFFEE57FF, + 0xFFEC46FF, + 0xFFEA34FF, + 0xFFE923FF, + 0xFFE712FF, + 0xFFE501FF, + 0xFFDD00FF, + 0xFFD600FF, + 0xFFCE00FF, + 0x483800FF, + 0x010000CB, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010000EC, + 0x6C6637FF, + 0xFFF493FF, + 0xFFF6A3FF, + 0xFFF7B2FF, + 0xFFF9C1FF, + 0xFFFACFFF, + 0xFFFBDCFF, + 0xFFFDE8FF, + 0xFFFEF1FF, + 0xFFFEF8FF, + 0xFFFFFCFF, + 0xFFFFFCFF, + 0xFFFEF8FF, + 0xFFFBE8FF, + 0xFFE28FFF, + 0xFFDB76FF, + 0xFFDA71FF, + 0xFFD86BFF, + 0xFFD765FF, + 0xFFDB6BFF, + 0xFFF28FFF, + 0xFFF283FF, + 0xFFF173FF, + 0xFFEF62FF, + 0xFFED52FF, + 0xFFEC41FF, + 0xFFEA30FF, + 0xFFE81FFF, + 0xFFE60EFF, + 0xFFE400FF, + 0xFFDC00FF, + 0xFFD400FF, + 0xFFCC00FF, + 0x6A5200FF, + 0x010000E9, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010000F9, + 0x7B743BFF, + 0xFFF38BFF, + 0xFFF59AFF, + 0xFFF6A8FF, + 0xFFF8B6FF, + 0xFFF9C3FF, + 0xFFFACFFF, + 0xFFFBD9FF, + 0xFFFCE2FF, + 0xFFFDE8FF, + 0xFFFDEBFF, + 0xFFFDEBFF, + 0xFFFDE8FF, + 0xFFE9A2FF, + 0xFFDB75FF, + 0xFFDA71FF, + 0xFFD96CFF, + 0xFFD767FF, + 0xFFD661FF, + 0xFFD45BFF, + 0xFFE06AFF, + 0xFFF27BFF, + 0xFFF06CFF, + 0xFFEE5CFF, + 0xFFED4BFF, + 0xFFEB3BFF, + 0xFFE92BFF, + 0xFFE81AFF, + 0xFFE609FF, + 0xFFE200FF, + 0xFFDA00FF, + 0xFFD200FF, + 0xFFCA00FF, + 0x795E00FF, + 0x010000F8, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010000F4, + 0x756E34FF, + 0xFFF281FF, + 0xFFF490FF, + 0xFFF59DFF, + 0xFFF6AAFF, + 0xFFF8B6FF, + 0xFFF9C1FF, + 0xFFFACAFF, + 0xFFFAD1FF, + 0xFFFBD6FF, + 0xFFFBD9FF, + 0xFFFBD9FF, + 0xFFF8CEFF, + 0xFFDB75FF, + 0xFFD96FFF, + 0xFFD86BFF, + 0xFFEE9EFF, + 0xFFEC94FF, + 0xFFD55CFF, + 0xFFD357FF, + 0xFFD453FF, + 0xFFEE70FF, + 0xFFEF64FF, + 0xFFEE54FF, + 0xFFEC44FF, + 0xFFEA34FF, + 0xFFE924FF, + 0xFFE714FF, + 0xFFE504FF, + 0xFFDF00FF, + 0xFFD800FF, + 0xFFD000FF, + 0xFFC800FF, + 0x745A00FF, + 0x010000F2, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010000DD, + 0x5E5826FF, + 0xFFF177FF, + 0xFFF384FF, + 0xFFF491FF, + 0xFFF59DFF, + 0xFFF6A8FF, + 0xFFF7B2FF, + 0xFFF8BAFF, + 0xFFF9C1FF, + 0xFFF9C5FF, + 0xFFF9C8FF, + 0xFFF9C8FF, + 0xFFF0ABFF, + 0xFFD86BFF, + 0xFFD868FF, + 0xFFDE77FF, + 0xFFF6A8FF, + 0xFFF59DFF, + 0xFFDB64FF, + 0xFFD252FF, + 0xFFD14CFF, + 0xFFE65FFF, + 0xFFEE5AFF, + 0xFFED4BFF, + 0xFFEB3CFF, + 0xFFEA2DFF, + 0xFFE81DFF, + 0xFFE60DFF, + 0xFFE400FF, + 0xFFDC00FF, + 0xFFD500FF, + 0xFFCD00FF, + 0xFFC800FF, + 0x5C4700FF, + 0x010000DA, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010000C6, + 0x47421AFF, + 0xFFF06CFF, + 0xFFF178FF, + 0xFFF384FF, + 0xFFF490FF, + 0xFFF59AFF, + 0xFFF6A3FF, + 0xFFF6AAFF, + 0xFFF7B0FF, + 0xFFF7B4FF, + 0xFFF8B6FF, + 0xFFF8B6FF, + 0xFFE992FF, + 0xFFD764FF, + 0xFFD662FF, + 0xFFE37CFF, + 0xFFF59AFF, + 0xFFF490FF, + 0xFFE068FF, + 0xFFD14DFF, + 0xFFD048FF, + 0xFFE151FF, + 0xFFED50FF, + 0xFFEC42FF, + 0xFFEA33FF, + 0xFFE924FF, + 0xFFE715FF, + 0xFFE605FF, + 0xFFE000FF, + 0xFFD900FF, + 0xFFD200FF, + 0xFFCA00FF, + 0xFFC800FF, + 0x453500FF, + 0x010000C4, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0200009F, + 0x151307FF, + 0xFDED5FFF, + 0xFFF06CFF, + 0xFFF177FF, + 0xFFF281FF, + 0xFFF38BFF, + 0xFFF493FF, + 0xFFF59AFF, + 0xFFF59FFF, + 0xFFF6A3FF, + 0xFFF6A5FF, + 0xFFF6A5FF, + 0xFFE885FF, + 0xFFD55DFF, + 0xFFD45BFF, + 0xFFE272FF, + 0xFFF38BFF, + 0xFFF281FF, + 0xFFDF5EFF, + 0xFFD048FF, + 0xFFCF42FF, + 0xFFDF49FF, + 0xFFEC46FF, + 0xFFEB38FF, + 0xFFE92AFF, + 0xFFE81BFF, + 0xFFE60CFF, + 0xFFE400FF, + 0xFFDD00FF, + 0xFFD600FF, + 0xFFCE00FF, + 0xFFC800FF, + 0xFDC600FF, + 0x161000FF, + 0x0200009C, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000059, + 0x010000FF, + 0xCBBD42FF, + 0xFFEF5EFF, + 0xFFF069FF, + 0xFFF173FF, + 0xFFF27BFF, + 0xFFF283FF, + 0xFFF389FF, + 0xFFF38EFF, + 0xFFF491FF, + 0xFFF493FF, + 0xFFF493FF, + 0xFFEA7FFF, + 0xFFD356FF, + 0xFFD354FF, + 0xFFD95CFF, + 0xFFF27BFF, + 0xFFF173FF, + 0xFFD84DFF, + 0xFFCF42FF, + 0xFFCD3DFF, + 0xFFE342FF, + 0xFFEB3AFF, + 0xFFEA2DFF, + 0xFFE81FFF, + 0xFFE711FF, + 0xFFE503FF, + 0xFFE000FF, + 0xFFD900FF, + 0xFFD200FF, + 0xFFCB00FF, + 0xFFC800FF, + 0xC89D00FF, + 0x010000FF, + 0x00000056, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000013, + 0x010000FC, + 0x807623FF, + 0xFFED50FF, + 0xFFEE5AFF, + 0xFFEF64FF, + 0xFFF06CFF, + 0xFFF173FF, + 0xFFF178FF, + 0xFFF27DFF, + 0xFFF280FF, + 0xFFF281FF, + 0xFFF281FF, + 0xFFEF7CFF, + 0xFFD351FF, + 0xFFD14DFF, + 0xFFD14AFF, + 0xFFE661FF, + 0xFFE55AFF, + 0xFFCE40FF, + 0xFFCD3CFF, + 0xFFCD38FF, + 0xFFE939FF, + 0xFFEA2EFF, + 0xFFE821FF, + 0xFFE714FF, + 0xFFE606FF, + 0xFFE200FF, + 0xFFDB00FF, + 0xFFD400FF, + 0xFFCE00FF, + 0xFFC800FF, + 0xFFC800FF, + 0x7F6300FF, + 0x010000FC, + 0x00000012, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010000B6, + 0x181505FF, + 0xF5E33FFF, + 0xFFED4BFF, + 0xFFEE54FF, + 0xFFEE5CFF, + 0xFFEF62FF, + 0xFFF068FF, + 0xFFF06CFF, + 0xFFF06EFF, + 0xFFF070FF, + 0xFFF070FF, + 0xFFF06EFF, + 0xFFDD56FF, + 0xFFCF46FF, + 0xFFCF44FF, + 0xFFCE41FF, + 0xFFCE3EFF, + 0xFFCD3AFF, + 0xFFCC36FF, + 0xFFD835FF, + 0xFFEA2DFF, + 0xFFE821FF, + 0xFFE715FF, + 0xFFE608FF, + 0xFFE300FF, + 0xFFDD00FF, + 0xFFD600FF, + 0xFFD000FF, + 0xFFC900FF, + 0xFFC800FF, + 0xF5C000FF, + 0x171100FF, + 0x010000B4, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000003B, + 0x010000FF, + 0x91851DFF, + 0xFFEB3CFF, + 0xFFEC44FF, + 0xFFED4BFF, + 0xFFED52FF, + 0xFFEE57FF, + 0xFFEE5AFF, + 0xFFEE5DFF, + 0xFFEF5EFF, + 0xFFEF5EFF, + 0xFFEE5DFF, + 0xFFEC59FF, + 0xFFD443FF, + 0xFFCD3DFF, + 0xFFCD3AFF, + 0xFFCC37FF, + 0xFFCB34FF, + 0xFFD031FF, + 0xFFE62AFF, + 0xFFE81FFF, + 0xFFE714FF, + 0xFFE608FF, + 0xFFE300FF, + 0xFFDD00FF, + 0xFFD800FF, + 0xFFD100FF, + 0xFFCB00FF, + 0xFFC800FF, + 0xFFC800FF, + 0x8D6F00FF, + 0x010000FF, + 0x00000038, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010000BD, + 0x161303FF, + 0xE6D329FF, + 0xFFEA34FF, + 0xFFEB3BFF, + 0xFFEC41FF, + 0xFFEC46FF, + 0xFFEC49FF, + 0xFFED4BFF, + 0xFFED4DFF, + 0xFFED4DFF, + 0xFFED4BFF, + 0xFFEC49FF, + 0xFFE945FF, + 0xFFD238FF, + 0xFFCB33FF, + 0xFFCA30FF, + 0xFFD02DFF, + 0xFFE724FF, + 0xFFE81BFF, + 0xFFE711FF, + 0xFFE606FF, + 0xFFE300FF, + 0xFFDD00FF, + 0xFFD800FF, + 0xFFD200FF, + 0xFFCC00FF, + 0xFFC800FF, + 0xFFC800FF, + 0xE5B400FF, + 0x151000FF, + 0x010000BA, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000028, + 0x010000F4, + 0x413A07FF, + 0xFCE624FF, + 0xFFE92BFF, + 0xFFEA30FF, + 0xFFEA34FF, + 0xFFEB38FF, + 0xFFEB3AFF, + 0xFFEB3BFF, + 0xFFEB3BFF, + 0xFFEB3AFF, + 0xFFEB38FF, + 0xFFEA34FF, + 0xFFDA30FF, + 0xFFC92CFF, + 0xFFC92AFF, + 0xFFD822FF, + 0xFFE715FF, + 0xFFE60CFF, + 0xFFE503FF, + 0xFFE200FF, + 0xFFDD00FF, + 0xFFD800FF, + 0xFFD200FF, + 0xFFCD00FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFDC600FF, + 0x453500FF, + 0x010000F3, + 0x00000025, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000061, + 0x010000FF, + 0x776B09FF, + 0xFFE81AFF, + 0xFFE81FFF, + 0xFFE923FF, + 0xFFE926FF, + 0xFFE928FF, + 0xFFE92AFF, + 0xFFE92AFF, + 0xFFE928FF, + 0xFFE926FF, + 0xFFE923FF, + 0xFFD823FF, + 0xFFC825FF, + 0xFFC723FF, + 0xFFD716FF, + 0xFFE605FF, + 0xFFE400FF, + 0xFFE000FF, + 0xFFDB00FF, + 0xFFD600FF, + 0xFFD100FF, + 0xFFCC00FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0x755B00FF, + 0x010000FF, + 0x0000005E, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x02000094, + 0x010000FF, + 0x6B6004FF, + 0xFEE50EFF, + 0xFFE712FF, + 0xFFE715FF, + 0xFFE717FF, + 0xFFE718FF, + 0xFFE718FF, + 0xFFE717FF, + 0xFFE715FF, + 0xFFE712FF, + 0xFFD717FF, + 0xFFC61EFF, + 0xFFC61CFF, + 0xFFD50DFF, + 0xFFE000FF, + 0xFFDD00FF, + 0xFFD900FF, + 0xFFD400FF, + 0xFFD000FF, + 0xFFCB00FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFEC700FF, + 0x725900FF, + 0x010000FF, + 0x02000092, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000001, + 0x0200008D, + 0x010000FF, + 0x594F00FF, + 0xEED601FF, + 0xFFE504FF, + 0xFFE605FF, + 0xFFE606FF, + 0xFFE606FF, + 0xFFE605FF, + 0xFFE504FF, + 0xFFE501FF, + 0xFFD50DFF, + 0xFFC517FF, + 0xFFC415FF, + 0xFFD00AFF, + 0xFFD900FF, + 0xFFD600FF, + 0xFFD200FF, + 0xFFCE00FF, + 0xFFC900FF, + 0xFFC800FF, + 0xFFC800FF, + 0xEDBA00FF, + 0x574300FF, + 0x010000FF, + 0x0200008B, + 0x00000001, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000077, + 0x010000FA, + 0x1C1700FF, + 0x8C7A00FF, + 0xFFE000FF, + 0xFFE000FF, + 0xFFE000FF, + 0xFFE000FF, + 0xFFDF00FF, + 0xFFDD00FF, + 0xFFD009FF, + 0xFFC310FF, + 0xFFC20EFF, + 0xFFCB06FF, + 0xFFD200FF, + 0xFFCE00FF, + 0xFFCB00FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0x8A6C00FF, + 0x1B1400FF, + 0x010000F9, + 0x00000074, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000030, + 0x010000E5, + 0x181300FF, + 0x4B3F00FF, + 0xAA9000FF, + 0xFCD500FF, + 0xFFD800FF, + 0xFFD700FF, + 0xFFD600FF, + 0xFFCB06FF, + 0xFFC109FF, + 0xFFC107FF, + 0xFFC603FF, + 0xFFCA00FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFCC500FF, + 0xAD8800FF, + 0x4B3A00FF, + 0x181200FF, + 0x010000E5, + 0x0000002F, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x010000BE, + 0x403300FF, + 0xF7C900FF, + 0xBE9B00FF, + 0x977B00FF, + 0xB79500FF, + 0xE8BC00FF, + 0xFFCE00FF, + 0xFFC602FF, + 0xFFC002FF, + 0xFFBF00FF, + 0xFFC202FF, + 0xFFC800FF, + 0xE8B600FF, + 0xB79000FF, + 0x977600FF, + 0xBE9500FF, + 0xF7C200FF, + 0x403100FF, + 0x010000BE, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x020000A7, + 0x291F00FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC202FF, + 0xFFBB03FF, + 0xFFBB03FF, + 0xFFC202FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0x271E00FF, + 0x020000A6, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000007D, + 0x050300FF, + 0xE5B400FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC202FF, + 0xFFBB03FF, + 0xFFBB03FF, + 0xFFC202FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xE4B300FF, + 0x040200FF, + 0x00000080, + 0x00000009, + 0x00000007, + 0x00000004, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000021, + 0x010000FD, + 0x765C00FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC301FF, + 0xFFBB03FF, + 0xFFBB03FF, + 0xFFC301FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0x745A00FF, + 0x010000FD, + 0x0000003A, + 0x0000001C, + 0x0000001A, + 0x00000016, + 0x00000013, + 0x0000000E, + 0x0000000A, + 0x00000005, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x02000099, + 0x050300FF, + 0xBD9400FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC301FF, + 0xFFC301FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xBA9200FF, + 0x040200FF, + 0x010000AB, + 0x00000032, + 0x00000030, + 0x0000002C, + 0x00000028, + 0x00000024, + 0x0000001F, + 0x0000001A, + 0x00000014, + 0x0000000E, + 0x00000008, + 0x00000001, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000000E, + 0x010000E3, + 0x0C0900FF, + 0xAF8900FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xAD8800FF, + 0x0B0800FF, + 0x010000E9, + 0x0000004D, + 0x00000044, + 0x00000042, + 0x0000003E, + 0x00000039, + 0x00000034, + 0x0000002E, + 0x00000028, + 0x00000021, + 0x0000001A, + 0x00000014, + 0x0000000C, + 0x00000005, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000002, + 0x0000008E, + 0x010000FF, + 0x010000FF, + 0x574300FF, + 0xCEA200FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xFFC800FF, + 0xCDA100FF, + 0x544100FF, + 0x010000FF, + 0x010000FF, + 0x000000A9, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000041, + 0x0000003A, + 0x00000033, + 0x0000002C, + 0x00000024, + 0x0000001D, + 0x00000015, + 0x0000000D, + 0x00000005, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000006, + 0x00000087, + 0x010000FF, + 0x7B7B7BFF, + 0x0F0E0EFF, + 0x010000FF, + 0x231B00FF, + 0x5C4700FF, + 0x745A00FF, + 0x745A00FF, + 0x5C4700FF, + 0x221A00FF, + 0x010000FF, + 0x0C0B0BFF, + 0x727272FF, + 0x010000FF, + 0x000000A2, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000043, + 0x0000003B, + 0x00000033, + 0x0000002B, + 0x00000023, + 0x0000001B, + 0x00000012, + 0x0000000A, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000008, + 0x00000088, + 0x010000FF, + 0xF1F1F1FF, + 0xE5E5E5FF, + 0x8F8F8FFF, + 0x4F4E4EFF, + 0x212020FF, + 0x0B0A0AFF, + 0x0B0A0AFF, + 0x1C1B1BFF, + 0x373636FF, + 0x5E5E5EFF, + 0xB6B6B6FF, + 0xD5D5D5FF, + 0x010000FF, + 0x000000A2, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000044, + 0x0000003D, + 0x00000035, + 0x0000002D, + 0x00000024, + 0x0000001C, + 0x00000014, + 0x0000000C, + 0x00000003, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000006, + 0x00000078, + 0x010000FF, + 0xA6A6A6FF, + 0xC8C8C8FF, + 0xD7D7D7FF, + 0xDEDEDEFF, + 0xDBDBDBFF, + 0xCFCFCFFF, + 0xBABABAFF, + 0x9F9F9FFF, + 0x9A9A9AFF, + 0xB9B9B9FF, + 0xD9D9D9FF, + 0xA2A2A2FF, + 0x010000FF, + 0x00000095, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000042, + 0x0000003A, + 0x00000032, + 0x0000002A, + 0x00000022, + 0x0000001A, + 0x00000012, + 0x0000000A, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000001, + 0x00000047, + 0x010000FF, + 0x6F6F6FFF, + 0x999999FF, + 0x8F8F8FFF, + 0x969696FF, + 0x959595FF, + 0x8F8F8FFF, + 0x9B9B9BFF, + 0xADADADFF, + 0xC4C4C4FF, + 0xDDDDDDFF, + 0xB1B1B1FF, + 0x4C4C4CFF, + 0x010000FF, + 0x00000071, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000044, + 0x00000040, + 0x00000039, + 0x00000032, + 0x0000002B, + 0x00000023, + 0x0000001C, + 0x00000014, + 0x0000000C, + 0x00000005, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000001, + 0x010000D3, + 0x191818FF, + 0xBFBFBFFF, + 0xCBCBCBFF, + 0xC5C5C5FF, + 0xC5C5C5FF, + 0xC9C9C9FF, + 0xD3D3D3FF, + 0xE1E1E1FF, + 0xBFBFBFFF, + 0x959595FF, + 0x5A5A5AFF, + 0x0A0909FF, + 0x010000DD, + 0x00000045, + 0x00000044, + 0x00000043, + 0x00000040, + 0x0000003C, + 0x00000037, + 0x00000032, + 0x0000002C, + 0x00000026, + 0x00000020, + 0x00000019, + 0x00000012, + 0x0000000B, + 0x00000004, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002F, + 0x010000F0, + 0x0F0E0EFF, + 0x636363FF, + 0x9D9D9DFF, + 0xA1A1A1FF, + 0x9C9C9CFF, + 0x8E8E8EFF, + 0x797979FF, + 0x5B5B5BFF, + 0x3C3C3CFF, + 0x0B0A0AFF, + 0x010000F2, + 0x00000057, + 0x00000033, + 0x00000032, + 0x00000030, + 0x0000002D, + 0x0000002A, + 0x00000026, + 0x00000022, + 0x0000001D, + 0x00000018, + 0x00000012, + 0x0000000C, + 0x00000006, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002E, + 0x010000D1, + 0x010000FF, + 0x0A0909FF, + 0x201F1FFF, + 0x2A2929FF, + 0x2A2929FF, + 0x1F1E1EFF, + 0x0A0909FF, + 0x010000FF, + 0x010000D4, + 0x00000046, + 0x0000001E, + 0x0000001E, + 0x0000001E, + 0x0000001C, + 0x0000001A, + 0x00000017, + 0x00000014, + 0x00000010, + 0x0000000C, + 0x00000008, + 0x00000002, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000004, + 0x00000052, + 0x020000A8, + 0x010000DF, + 0x010000F6, + 0x010000F6, + 0x010000DF, + 0x020000A8, + 0x00000054, + 0x0000000B, + 0x00000009, + 0x0000000A, + 0x0000000A, + 0x00000008, + 0x00000007, + 0x00000005, + 0x00000003, + 0x00000001, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0}; diff --git a/widget/milsko/milskosrc/src/icon/right.c b/widget/milsko/milskosrc/src/icon/right.c new file mode 100644 index 0000000000..871fee18de --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/right.c @@ -0,0 +1,445 @@ +#include + +MwU32 MwIconRight[] = { + (20 << 16) | 22, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0}; diff --git a/widget/milsko/milskosrc/src/icon/search.c b/widget/milsko/milskosrc/src/icon/search.c new file mode 100644 index 0000000000..e275db2425 --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/search.c @@ -0,0 +1,445 @@ +#include + +MwU32 MwIconSearch[] = { + (20 << 16) | 22, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x333333FF, + 0xFFFFFFFF, + 0x333333FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x333333FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x333333FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x333333FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x000000FF, + 0x333333FF, + 0x000000FF, + 0x333333FF, + 0x000000FF, + 0x333333FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x999999FF, + 0x333333FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x333333FF, + 0x999999FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x999999FF, + 0x000000FF, + 0x333333FF, + 0x999999FF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x999999FF, + 0x333333FF, + 0x000000FF, + 0x999999FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x999999FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x333333FF, + 0x333333FF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x333333FF, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x999999FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xFFFFFFFF, + 0x999999FF, + 0x000000FF, + 0x999999FF, + 0x66CCFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x999999FF, + 0x000000FF, + 0x333333FF, + 0x000000FF, + 0x333333FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x333333FF, + 0xFFFFFFFF, + 0x999999FF, + 0x000000FF, + 0x66CCFFFF, + 0x66CCFFFF, + 0xFFFFFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x000000FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x333333FF, + 0x000000FF, + 0x333333FF, + 0xFFFFFFFF, + 0x999999FF, + 0x000000FF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x000000FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x000000FF, + 0x333333FF, + 0xFFFFFFFF, + 0x999999FF, + 0x000000FF, + 0x999999FF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x999999FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x333333FF, + 0x333333FF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x333333FF, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x999999FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x999999FF, + 0x000000FF, + 0x333333FF, + 0x999999FF, + 0x66CCFFFF, + 0x66CCFFFF, + 0x999999FF, + 0x333333FF, + 0x000000FF, + 0x999999FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x999999FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x999999FF, + 0x333333FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x333333FF, + 0x999999FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x999999FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x999999FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0xFFFFFFFF, + 0x999999FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0x333333FF, + 0x333333FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x999999FF, + 0x333333FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0}; diff --git a/widget/milsko/milskosrc/src/icon/up.c b/widget/milsko/milskosrc/src/icon/up.c new file mode 100644 index 0000000000..41d1056716 --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/up.c @@ -0,0 +1,445 @@ +#include + +MwU32 MwIconUp[] = { + (20 << 16) | 22, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0x000000FF, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0xCCFFFF00, + 0}; diff --git a/widget/milsko/milskosrc/src/icon/warning.c b/widget/milsko/milskosrc/src/icon/warning.c new file mode 100644 index 0000000000..08236e2363 --- /dev/null +++ b/widget/milsko/milskosrc/src/icon/warning.c @@ -0,0 +1,2309 @@ +#include + +MwU32 MwIconWarning[] = { + (48 << 16) | 48, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002B, + 0x000000A2, + 0x000000FA, + 0x000000D5, + 0x00000099, + 0x00000055, + 0x00000012, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002E, + 0x000000AC, + 0x000000FE, + 0x10100FFF, + 0x676660FF, + 0x3F3F3AFF, + 0x080807FF, + 0x000000FF, + 0x000000FC, + 0x000000CB, + 0x0000008C, + 0x0000004C, + 0x0000000F, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002E, + 0x000000AC, + 0x000000FE, + 0x0D0D0DFF, + 0x777772FF, + 0xEEECE0FF, + 0xFFFDEBFF, + 0xFFFCE6FF, + 0xFBF8DEFF, + 0xCCC9B1FF, + 0x888673FF, + 0x444338FF, + 0x090907FF, + 0x000000FF, + 0x000000FC, + 0x000000CB, + 0x0000008C, + 0x0000004C, + 0x0000000F, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000AC, + 0x000000FE, + 0x0D0D0DFF, + 0x777776FF, + 0xEEEDE7FF, + 0xFFFEF2FF, + 0xFFFDEDFF, + 0xFFFDE9FF, + 0xFFFCE4FF, + 0xFFFBDFFF, + 0xFFFBDAFF, + 0xFFFAD5FF, + 0xFFFAD1FF, + 0xFBF5C9FF, + 0xCCC79FFF, + 0x888467FF, + 0x444232FF, + 0x090907FF, + 0x000000FF, + 0x000000FC, + 0x000000CB, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x4A4838FF, + 0xCBCAC5FF, + 0xFFFEF9FF, + 0xFFFEF4FF, + 0xFFFDF0FF, + 0xFFFDEBFF, + 0xFFFCE6FF, + 0xFFFCE1FF, + 0xFFFBDCFF, + 0xFFFBD8FF, + 0xFFFAD3FF, + 0xFFFACEFF, + 0xFFF9C9FF, + 0xFFF9C5FF, + 0xFFF8C0FF, + 0xFFF8BBFF, + 0xF7EFB0FF, + 0xBAB17DFF, + 0x413215FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x80794CFF, + 0xFFEF93FF, + 0xFAE99AE9, + 0xFFF4C1C2, + 0xFFFBE1CA, + 0xFFFCE8FA, + 0xFFFCE3FF, + 0xFFFBDFFF, + 0xFFFBDAFF, + 0xFFFAD5FF, + 0xFFFAD0FF, + 0xFFF9CCFF, + 0xFFF9C7FF, + 0xFFF8C2FF, + 0xFFF8BDFF, + 0xFFF7B8FF, + 0xDFC476EA, + 0xD28A18FF, + 0x7A500EFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x80784BFF, + 0xFFEE91FF, + 0xFFEB8DFF, + 0xFFE988FF, + 0xFFE783FF, + 0xFFE686EE, + 0xFFEEA6C6, + 0xFFF6CBC4, + 0xFFFBD6F3, + 0xFFFAD3FF, + 0xFFFACEFF, + 0xFFF9C9FF, + 0xFFF9C4FF, + 0xFFF8BFFF, + 0xFEF1AEEF, + 0xF2AC31C2, + 0xF09B12FE, + 0xF29E18FF, + 0x7A510FFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x80784AFF, + 0xFFED90FF, + 0xFFEA8BFF, + 0xFFE886FF, + 0xFFE681FF, + 0xFFE37DFF, + 0xFFE178FF, + 0xFFDF73FF, + 0xFFDD73F7, + 0xFFE691CA, + 0xFFF1B5C2, + 0xFFFAC5E9, + 0xFFF8C2FF, + 0xF7CD6FC6, + 0xEE9609EC, + 0xEF980DFF, + 0xF09B13FF, + 0xF29E18FF, + 0x7A510FFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x80774AFF, + 0xFFEC8EFF, + 0xFFEA89FF, + 0xFFE784FF, + 0xFFE580FF, + 0xFFE27BFF, + 0xFFE076FF, + 0xFFDE71FF, + 0xFFDB6DFF, + 0xFFD968FF, + 0xFFD763FF, + 0xFFD65FFC, + 0xF4AF31B8, + 0xED9406FF, + 0xEE9509FF, + 0xEF980EFF, + 0xF19B13FF, + 0xF29E19FF, + 0x7A510FFF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x807749FF, + 0xFFEB8CFF, + 0xFFE987FF, + 0xFFE683FF, + 0xFFE47EFF, + 0xFFE279FF, + 0xFFDF74FF, + 0xFFDD70FF, + 0xFFDA6BFF, + 0xFFD866FF, + 0xFFD661FF, + 0xFFD35DFF, + 0xF3A721C0, + 0xED9406FF, + 0xEE9609FF, + 0xEF990FFF, + 0xF19C14FF, + 0xF29F19FF, + 0x7A5110FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x807648FF, + 0xFFEA8AFF, + 0xFFE885FF, + 0xFFE581FF, + 0xFFE37CFF, + 0xFFE177FF, + 0xFFDE72FF, + 0xFFDC6EFF, + 0xFFDA69FF, + 0xFFD764FF, + 0xFFD560FF, + 0xFFD25BFF, + 0xF3A720C0, + 0xED9406FF, + 0xEE960AFF, + 0xEF990FFF, + 0xF19C14FF, + 0xF29F1AFF, + 0x7A5110FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x807647FF, + 0xFFE988FF, + 0xFFE784FF, + 0xFFE47FFF, + 0xFFE27AFF, + 0xFFE075FF, + 0xFFDD71FF, + 0xFFDB6CFF, + 0xFFD967FF, + 0xFFD662FF, + 0xFFD45EFF, + 0xFFD159FF, + 0xF3A720C0, + 0xED9406FF, + 0xEE960AFF, + 0xF09910FF, + 0xF19C15FF, + 0xF39F1AFF, + 0x7A5110FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x807646FF, + 0xFFE887FF, + 0xFFE682FF, + 0xFFE47DFF, + 0xFFE178FF, + 0xFFDF74FF, + 0xFFDC6FFF, + 0xFFDA6AFF, + 0xFFD865FF, + 0xFFD561FF, + 0xFFD35CFF, + 0xFFD157FF, + 0xF3A61FC0, + 0xED9406FF, + 0xEE970BFF, + 0xF09A10FF, + 0xF19D16FF, + 0xF39F1BFF, + 0x7A5110FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x807545FF, + 0xFFE785FF, + 0xFFE580FF, + 0xFFE37BFF, + 0xFFE077FF, + 0xFFDE72FF, + 0xFFDC6DFF, + 0xFFD968FF, + 0xFFD764FF, + 0xFFD45FFF, + 0xFFD25AFF, + 0xFFD055FF, + 0xF3A61FC0, + 0xED9406FF, + 0xEE970BFF, + 0xF09A11FF, + 0xF19D16FF, + 0xF3A01CFF, + 0x7A5211FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x807544FF, + 0xFFE683FF, + 0xFFE47EFF, + 0xFFE279FF, + 0xFFDF75FF, + 0xFFDD70FF, + 0xFFDB6BFF, + 0xFFD867FF, + 0xFFD662FF, + 0xFFD45DFF, + 0xFFD158FF, + 0xFFCF54FF, + 0xF3A61FC0, + 0xED9407FF, + 0xEF970CFF, + 0xF09A11FF, + 0xF29D17FF, + 0xF3A01CFF, + 0x7A5211FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x807443FF, + 0xFFE681FF, + 0xFFE37CFF, + 0xFFE178FF, + 0xFFDE73FF, + 0xFFDC6EFF, + 0xFFDA69FF, + 0xFFD765FF, + 0xFFD560FF, + 0xFFD35BFF, + 0xFFD056FF, + 0xFFCE52FF, + 0xF3A61DC0, + 0xED9507FF, + 0xEF980DFF, + 0xF09A12FF, + 0xF29D17FF, + 0xF3A01DFF, + 0x7B5211FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x807442FF, + 0xFFE57FFF, + 0xFFE27BFF, + 0xFFE076FF, + 0xFFDE71FF, + 0xFFDB6CFF, + 0xFFD968FF, + 0xFFD663FF, + 0xFFD45EFF, + 0xFFD259FF, + 0xFFCF55FF, + 0xFFCD50FF, + 0xF3A61DC0, + 0xED9508FF, + 0xEF980DFF, + 0xF09B12FF, + 0xF29E18FF, + 0xF3A11DFF, + 0x7B5212FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x807341FF, + 0xFFE47EFF, + 0xFFE179FF, + 0xFFDF74FF, + 0xFFDD6FFF, + 0xFFDA6BFF, + 0xFFD866FF, + 0xFFD661FF, + 0xFFD35CFF, + 0xFFD158FF, + 0xFFCE53FF, + 0xFFCC4EFF, + 0xF3A51CC0, + 0xEE9508FF, + 0xEF980EFF, + 0xF19B13FF, + 0xF29E18FF, + 0xF3A11EFF, + 0x7B5212FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x807340FF, + 0xFFE37CFF, + 0xFFE177FF, + 0xFFDE72FF, + 0xFFDC6EFF, + 0xFFD969FF, + 0xFFD764FF, + 0xFFD55FFF, + 0xFFD25BFF, + 0xFFD056FF, + 0xFFCE51FF, + 0xFFCB4CFF, + 0xF3A51CC0, + 0xEE9609FF, + 0xEF980EFF, + 0xF19B14FF, + 0xF29E19FF, + 0xF4A11EFF, + 0x7B5212FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x807240FF, + 0xFFE27AFF, + 0xFFE075FF, + 0xFFDD70FF, + 0xFFDB6CFF, + 0xFFD867FF, + 0xFFD662FF, + 0xFFD45DFF, + 0xFFD159FF, + 0xFFCF54FF, + 0xFFCD4FFF, + 0xFFCA4AFF, + 0xF3A51BC0, + 0xEE9609FF, + 0xEF990FFF, + 0xF19C14FF, + 0xF29F1AFF, + 0xF4A21FFF, + 0x7B5312FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x80723FFF, + 0xFFE178FF, + 0xFFDF73FF, + 0xFFDC6FFF, + 0xFFDA6AFF, + 0xFFD865FF, + 0xFFD560FF, + 0xFFD35CFF, + 0xFFD057FF, + 0xFFCE52FF, + 0xFFCC4DFF, + 0xFFC949FF, + 0xF3A51BC0, + 0xEE960AFF, + 0xF0990FFF, + 0xF19C15FF, + 0xF29F1AFF, + 0xF4A220FF, + 0x7B5313FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x80723EFF, + 0xFFE076FF, + 0xFFDE72FF, + 0xFFDB6DFF, + 0xFFD968FF, + 0xFFD763FF, + 0xFFD45FFF, + 0xFFD25AFF, + 0xFFD055FF, + 0xFFCD50FF, + 0xFFCB4CFF, + 0xFFC847FF, + 0xF3A319C0, + 0xEE960BFF, + 0xF09910FF, + 0xF19C15FF, + 0xF39F1BFF, + 0xF4A220FF, + 0x7B5313FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x80713DFF, + 0xFFDF75FF, + 0xFFDD70FF, + 0xFFDB6BFF, + 0xFFD866FF, + 0xFFD662FF, + 0xFFD35DFF, + 0xFFD158FF, + 0xFFCF53FF, + 0xFFCC4FFF, + 0xFFCA4AFF, + 0xFFC845FF, + 0xF3A319C0, + 0xEE970BFF, + 0xF09A11FF, + 0xF19D16FF, + 0xF3A01BFF, + 0xF4A321FF, + 0x7B5313FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x80713CFF, + 0xFFDE73FF, + 0xFFDC6EFF, + 0xFFDA69FF, + 0xFFD764FF, + 0xFFD560FF, + 0xFFD25BFF, + 0xFFD056FF, + 0xFFCE51FF, + 0xFFCB4DFF, + 0xFFC948FF, + 0xFFC743FF, + 0xF3A318C0, + 0xEF970CFF, + 0xF09A11FF, + 0xF19D16FF, + 0xF3A01CFF, + 0xF4A321FF, + 0x7B5314FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x80703BFF, + 0xFFDD71FF, + 0xFFDB6CFF, + 0xFFD967FF, + 0xFFD663FF, + 0xFFD45EFF, + 0xFFD259FF, + 0xFFCF54FF, + 0xFFCD50FF, + 0xFFCA4BFF, + 0xFFC846FF, + 0xFFC641FF, + 0xF3A319C0, + 0xEF970CFF, + 0xF09A12FF, + 0xF29D17FF, + 0xF3A01CFF, + 0xF5A322FF, + 0x7B5314FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x4E4423FF, + 0xE8C965FF, + 0xFFDA6AFF, + 0xFFD866FF, + 0xFFD561FF, + 0xFFD35CFF, + 0xFFD157FF, + 0xFFCE53FF, + 0xFFCC4EFF, + 0xFFCA49FF, + 0xFFC744FF, + 0xFFC540FF, + 0xF3A319C0, + 0xEF980DFF, + 0xF09B12FF, + 0xF29E18FF, + 0xF3A11DFF, + 0xF5A322FF, + 0x7B5314FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000B3, + 0x000000FD, + 0x060503FF, + 0x554823FF, + 0xC8A94EFF, + 0xFFD55FFF, + 0xFFD25AFF, + 0xFFD056FF, + 0xFFCD51FF, + 0xFFCB4CFF, + 0xFFC947FF, + 0xFFC643FF, + 0xFFC43EFF, + 0xEA9E17C7, + 0xEF980DFF, + 0xF09B13FF, + 0xF29E18FF, + 0xF3A11EFF, + 0xDE9520FF, + 0x362509FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000023, + 0x0000008D, + 0x000000F9, + 0x000000FF, + 0x3C3216FF, + 0xAA8B3BFF, + 0xFBCC53FF, + 0xFFCC4FFF, + 0xFFCA4AFF, + 0xFFC845FF, + 0xFFC541FF, + 0xFFC33CFF, + 0xB77B13FF, + 0xEF980EFF, + 0xF19B13FF, + 0xF29E19FF, + 0xB77916FF, + 0x191104FF, + 0x000000F6, + 0x00000066, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000028, + 0x000000D2, + 0x010100FF, + 0x3E3114FF, + 0x1E1709FF, + 0x000000FF, + 0x211B0BFF, + 0x886D29FF, + 0xEEBC43FF, + 0xFFC744FF, + 0xFFC43FFF, + 0xFFC23AFF, + 0xCF8812FF, + 0xEF990FFF, + 0xF09B14FF, + 0x81550DFF, + 0x030200FF, + 0x000000E0, + 0x0000002B, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000060, + 0x000000F4, + 0x151209FF, + 0xB2984AFF, + 0xF5CB5DFF, + 0xF0C153FF, + 0xA37E33FF, + 0x382A10FF, + 0x000000FF, + 0x0D0A04FF, + 0x664F1AFF, + 0xD7A533FF, + 0xFFC138FF, + 0xB77B12FF, + 0xDB8C0EFF, + 0x432B06FF, + 0x000000FF, + 0x040200FF, + 0x000000FF, + 0x000000DA, + 0x0000007B, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x35301BFF, + 0xE4D170FF, + 0xFADF73FF, + 0xF8D76AFF, + 0xF6CF61FF, + 0xF4C758FF, + 0xF2BF4FFF, + 0xC09238FF, + 0x563F16FF, + 0x060401FF, + 0x020200FF, + 0x503C11FF, + 0x7E560EFF, + 0x170E02FF, + 0x090500FF, + 0x8C4B00FF, + 0xD57300FF, + 0x8D4C00FF, + 0x271602FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x806D35FF, + 0xD9B757FF, + 0xF1D369CC, + 0xFBE176F6, + 0xF9DA6EFF, + 0xF7D265FF, + 0xF5CB5CFF, + 0xF3C353FF, + 0xF1BB4AFF, + 0xD9A33BFF, + 0x7E5B1EFF, + 0x181105FF, + 0x000000FF, + 0x241705FF, + 0xBD7210FF, + 0xE3830BFF, + 0xE17B02FF, + 0xB46D0EFF, + 0x785115FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x806D34FF, + 0xFFD662FF, + 0xFFD45EFF, + 0xFFD159EB, + 0xFED560C0, + 0xFBDC6DE7, + 0xF8D669FF, + 0xF6CE60FF, + 0xF4C657FF, + 0xF2BE4EFF, + 0xF0B645FF, + 0xE7A93AFF, + 0x9C6E22FF, + 0xE09728FF, + 0xE89721FF, + 0xE68F18FF, + 0xEE9719C0, + 0xF5A526FF, + 0x7C5516FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x806C33FF, + 0xFFD561FF, + 0xFFD35CFF, + 0xFFD157FF, + 0xFFCE52FF, + 0xFFCC4EF9, + 0xFFCD50C6, + 0xFAD563D4, + 0xF7D264FF, + 0xF5CA5BFF, + 0xF3C252FF, + 0xF1BA49FF, + 0xEFB240FF, + 0xEDAA37FF, + 0xEBA22DFB, + 0xF19F1EC2, + 0xF5A322FF, + 0xF6A627FF, + 0x7C5516FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x806C32FF, + 0xFFD45FFF, + 0xFFD25AFF, + 0xFFD055FF, + 0xFFCD51FF, + 0xFFCB4CFF, + 0xFFC947FF, + 0xFFC642FF, + 0xFFC642D2, + 0xFBCD54C6, + 0xF6CD5FFB, + 0xF4C556FF, + 0xF2BD4DFF, + 0xEFB443F4, + 0xF19E1ACB, + 0xF3A01DFF, + 0xF5A322FF, + 0xF6A627FF, + 0x7C5517FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x806B31FF, + 0xFFD35DFF, + 0xFFD158FF, + 0xFFCF53FF, + 0xFFCC4FFF, + 0xFFCA4AFF, + 0xFFC845FF, + 0xFFC541FF, + 0xFFC33CFF, + 0xFFC137FF, + 0xFEBE34E3, + 0xFBC444C4, + 0xF3C34EDC, + 0xF09D15D7, + 0xF29E18FF, + 0xF3A11DFF, + 0xF5A423FF, + 0xF6A728FF, + 0x7C5517FF, + 0x000000FF, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x806B30FF, + 0xFFD35BFF, + 0xFFD056FF, + 0xFFCE52FF, + 0xFFCB4DFF, + 0xFFC948FF, + 0xFFC743FF, + 0xFFC43FFF, + 0xFFC23AFF, + 0xFFC035FF, + 0xFFBD30FF, + 0xFFBD30FF, + 0xF4A319C0, + 0xF19B13FF, + 0xF29E18FF, + 0xF4A11EFF, + 0xF5A423FF, + 0xF6A729FF, + 0x7C5517FF, + 0x000000FF, + 0x00000061, + 0x0000003A, + 0x0000003F, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x0000006E, + 0x00000046, + 0x00000017, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x806A2FFF, + 0xFFD259FF, + 0xFFCF55FF, + 0xFFCD50FF, + 0xFFCB4BFF, + 0xFFC846FF, + 0xFFC642FF, + 0xFFC33DFF, + 0xFFC138FF, + 0xFFBF33FF, + 0xFFBD30FF, + 0xFFBD30FF, + 0xF4A319C0, + 0xF19B14FF, + 0xF29E19FF, + 0xF4A11EFF, + 0xF5A424FF, + 0xF7A729FF, + 0x7C5518FF, + 0x000000FF, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x0000005D, + 0x0000002E, + 0x00000006, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FF, + 0x806A2EFF, + 0xFFD158FF, + 0xFFCE53FF, + 0xFFCC4EFF, + 0xFFCA49FF, + 0xFFC745FF, + 0xFFC540FF, + 0xFFC33BFF, + 0xFFC036FF, + 0xFFBE32FF, + 0xFFBD30FF, + 0xFFBD30FF, + 0xF4A51BC0, + 0xF19C14FF, + 0xF29F1AFF, + 0xF4A21FFF, + 0xF5A524FF, + 0xF7A72AFF, + 0x7C5518FF, + 0x000000FF, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x0000006E, + 0x00000046, + 0x00000017, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x000000FE, + 0x0D0B05FF, + 0x776128FF, + 0xEEBF4CFF, + 0xFFCB4CFF, + 0xFFC947FF, + 0xFFC643FF, + 0xFFC43EFF, + 0xFFC239FF, + 0xFFBF35FF, + 0xFFBD30FF, + 0xFFBD30FF, + 0xFFBD30FF, + 0xF4A51BC0, + 0xF19C15FF, + 0xF29F1AFF, + 0xF4A220FF, + 0xF5A525FF, + 0xDA9425FF, + 0x211706FF, + 0x000000F5, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000045, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002B, + 0x000000A2, + 0x000000FC, + 0x0D0A04FF, + 0x775E23FF, + 0xEEBB41FF, + 0xFFC541FF, + 0xFFC33CFF, + 0xFFC137FF, + 0xFFBE33FF, + 0xFFBD30FF, + 0xFFBD30FF, + 0xFFBD30FF, + 0xF4A51BC0, + 0xF19C15FF, + 0xF39F1BFF, + 0xF4A220FF, + 0xD99221FF, + 0x211606FF, + 0x000000F6, + 0x00000091, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x0000005A, + 0x00000003, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002B, + 0x000000A2, + 0x000000FC, + 0x0D0A03FF, + 0x775C1DFF, + 0xEEB536FF, + 0xFFC036FF, + 0xFFBD31FF, + 0xFFBD30FF, + 0xFFBD30FF, + 0xFFBD30FF, + 0xF4A51CC0, + 0xF19D16FF, + 0xF3A01BFF, + 0xD7901DFF, + 0x211605FF, + 0x000000F6, + 0x00000091, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000069, + 0x0000000C, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002B, + 0x000000A2, + 0x000000FC, + 0x0D0A03FF, + 0x775918FF, + 0xEEB02DFF, + 0xFFBD30FF, + 0xFFBD30FF, + 0xFFBD30FF, + 0xE69B1ACC, + 0xF19D16FF, + 0xD68D19FF, + 0x211604FF, + 0x000000F6, + 0x00000091, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000072, + 0x0000001C, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002E, + 0x000000AC, + 0x000000FE, + 0x0D0A02FF, + 0x775816FF, + 0xEEB02DFF, + 0xFFBD30FF, + 0xB97D15FD, + 0xD68B14FF, + 0x201504FF, + 0x000000F5, + 0x0000008F, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x0000002E, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002E, + 0x000000AC, + 0x000000FE, + 0x100C03FF, + 0x805F18FF, + 0xA06E14FF, + 0x1E1403FF, + 0x000000F5, + 0x0000008F, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000045, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002B, + 0x000000A2, + 0x000000FC, + 0x000000FF, + 0x000000F5, + 0x00000091, + 0x00000074, + 0x00000074, + 0x00000066, + 0x00000015, + 0x00000036, + 0x0000006C, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x00000074, + 0x0000005A, + 0x00000003, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000002E, + 0x000000AC, + 0x00000064, + 0x0000003E, + 0x0000003E, + 0x0000003E, + 0x0000000F, + 0x00000000, + 0x00000000, + 0x00000007, + 0x00000035, + 0x0000003E, + 0x0000003E, + 0x0000003E, + 0x0000003E, + 0x0000003E, + 0x0000003E, + 0x0000003E, + 0x0000003E, + 0x0000003E, + 0x0000003E, + 0x0000000B, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0}; diff --git a/widget/milsko/milskosrc/src/lowlevel.c b/widget/milsko/milskosrc/src/lowlevel.c new file mode 100644 index 0000000000..bc9e55b7cd --- /dev/null +++ b/widget/milsko/milskosrc/src/lowlevel.c @@ -0,0 +1,315 @@ +#include + +MwLL (*MwLLCreate)(MwLL parent, int x, int y, int width, int height) = NULL; +void (*MwLLDestroy)(MwLL handle) = NULL; + +void (*MwLLPolygon)(MwLL handle, MwPoint* points, int points_count, MwLLColor color) = NULL; +void (*MwLLLine)(MwLL handle, MwPoint* points, MwLLColor color) = NULL; + +void (*MwLLBeginDraw)(MwLL handle) = NULL; +void (*MwLLEndDraw)(MwLL handle) = NULL; + +MwLLColor (*MwLLAllocColor)(MwLL handle, int r, int g, int b) = NULL; +void (*MwLLColorUpdate)(MwLL handle, MwLLColor c, int r, int g, int b) = NULL; +void (*MwLLFreeColor)(MwLLColor color) = NULL; + +void (*MwLLGetXYWH)(MwLL handle, int* x, int* y, unsigned int* w, unsigned int* h) = NULL; +void (*MwLLSetXY)(MwLL handle, int x, int y) = NULL; +void (*MwLLSetWH)(MwLL handle, int w, int h) = NULL; + +void (*MwLLSetTitle)(MwLL handle, const char* title) = NULL; + +int (*MwLLPending)(MwLL handle) = NULL; +void (*MwLLNextEvent)(MwLL handle) = NULL; + +MwLLPixmap (*MwLLCreatePixmap)(MwLL handle, unsigned char* data, int width, int height) = NULL; +void (*MwLLPixmapUpdate)(MwLLPixmap pixmap) = NULL; +void (*MwLLDestroyPixmap)(MwLLPixmap pixmap) = NULL; +void (*MwLLDrawPixmap)(MwLL handle, MwRect* rect, MwLLPixmap pixmap) = NULL; +void (*MwLLSetIcon)(MwLL handle, MwLLPixmap pixmap) = NULL; + +void (*MwLLForceRender)(MwLL handle) = NULL; + +void (*MwLLSetCursor)(MwLL handle, MwCursor* image, MwCursor* mask) = NULL; +void (*MwLLDetach)(MwLL handle, MwPoint* point) = NULL; +void (*MwLLShow)(MwLL handle, int show) = NULL; + +void (*MwLLSetSizeHints)(MwLL handle, int minx, int miny, int maxx, int maxy) = NULL; +void (*MwLLMakeBorderless)(MwLL handle, int toggle) = NULL; +void (*MwLLMakeToolWindow)(MwLL handle) = NULL; +void (*MwLLMakePopup)(MwLL handle, MwLL parent) = NULL; + +void (*MwLLBeginStateChange)(MwLL handle) = NULL; +void (*MwLLEndStateChange)(MwLL handle) = NULL; + +void (*MwLLFocus)(MwLL handle) = NULL; +void (*MwLLGrabPointer)(MwLL handle, int toggle) = NULL; + +void (*MwLLSetClipboard)(MwLL handle, const char* text, int clipboard_type) = NULL; +void (*MwLLGetClipboard)(MwLL, int clipboard_type) = NULL; + +void (*MwLLGetCursorCoord)(MwLL handle, MwPoint* point) = NULL; +void (*MwLLGetScreenSize)(MwLL handle, MwRect* rect) = NULL; + +void (*MwLLSetDarkTheme)(MwLL handle, int toggle) = NULL; + +MwBool (*MwLLDoModern)(MwLL handle) = NULL; + +void (*MwLLRaise)(MwLL handle) = NULL; + +void (*MwLLClip)(MwLL handle, MwRect* rect) = NULL; + +void MwLLCreateCommon(MwLL handle) { + handle->common.handler = malloc(sizeof(*handle->common.handler)); + memset(handle->common.handler, 0, sizeof(*handle->common.handler)); + + handle->common.supports_transparency = 0; +} + +void MwLLDestroyCommon(MwLL handle) { + free(handle->common.handler); +} + +#ifdef USE_DBUS +MwBool MwLLDBusFuncSetup(MwLLDBusFuncTable* tbl) { +#ifdef __APPLE__ + tbl->lib = MwDynamicOpen("libdbus-1.dylib"); +#else + tbl->lib = MwDynamicOpen("libdbus-1.so"); +#endif + if(!tbl->lib) { + fprintf(stderr, "[WARNING] dbus library (libdbus-1.so) not found, will not be able to check for any XDG settings.\n"); + return MwFALSE; + } + +#define DBUS_FUNC(x) \ + tbl->x = MwDynamicSymbol(tbl->lib, #x); \ + if(!tbl->x) { \ + fprintf(stderr, "[WARNING] dbus function %s not found, will not be able to check for any XDG settings.\n", #x); \ + dlclose(tbl->lib); \ + return MwFALSE; \ + } + + DBUS_FUNC(dbus_error_init); + DBUS_FUNC(dbus_bus_get); + DBUS_FUNC(dbus_bus_add_match); + DBUS_FUNC(dbus_error_is_set); + DBUS_FUNC(dbus_error_free); + DBUS_FUNC(dbus_message_new_method_call); + DBUS_FUNC(dbus_message_is_signal); + DBUS_FUNC(dbus_message_iter_init_append); + DBUS_FUNC(dbus_message_iter_append_basic); + DBUS_FUNC(dbus_connection_flush); + DBUS_FUNC(dbus_connection_pop_message); + DBUS_FUNC(dbus_connection_read_write); + DBUS_FUNC(dbus_connection_send_with_reply_and_block); + DBUS_FUNC(dbus_message_unref); + DBUS_FUNC(dbus_message_iter_init); + DBUS_FUNC(dbus_message_iter_get_arg_type); + DBUS_FUNC(dbus_message_iter_recurse); + DBUS_FUNC(dbus_message_iter_next); + DBUS_FUNC(dbus_connection_unref); + DBUS_FUNC(dbus_message_iter_get_basic); + + return MwTRUE; +} +#endif + +#ifdef USE_DBUS +MwBool MwLLDBusNewContext(MwLLDBusFuncTable* tbl, MwLLDBusContext* ctx) { + if(!tbl->lib) { + return MwFALSE; + } + + tbl->dbus_error_init(&ctx->dbus_err); + + ctx->dbus_conn = tbl->dbus_bus_get(DBUS_BUS_SESSION, &ctx->dbus_err); + if(tbl->dbus_error_is_set(&ctx->dbus_err)) { + fprintf(stderr, "[WARNING] Could not initialize dbus: Connection error: %s\n", ctx->dbus_err.message); + tbl->dbus_error_free(&ctx->dbus_err); + return MwFALSE; + } + if(!ctx->dbus_conn) { + fprintf(stderr, "[WARNING] Could not initialize dbus: Failed to connect to session bus\n"); + return MwFALSE; + } + return MwTRUE; +}; + +MWDECL MwBool MwLLDBusPortalGet(MwLLDBusFuncTable* tbl, MwLLDBusContext* ctx, const char* portal, const char* namespace, const char* key, void* out) { + DBusMessageIter dbus_args, dbus_variant, dbus_inner_variant; + char arg_type; + if(!ctx->dbus_conn) { + return MwFALSE; + } + + ctx->dbus_msg = tbl->dbus_message_new_method_call( + "org.freedesktop.portal.Desktop", + "/org/freedesktop/portal/desktop", + portal, + "Read"); + if(!ctx->dbus_msg) { + fprintf(stderr, "[WARNING] Couldn't get %s::%s: Failed to create message\n", namespace, key); + return MwFALSE; + } + + tbl->dbus_message_iter_init_append(ctx->dbus_msg, &dbus_args); + tbl->dbus_message_iter_append_basic(&dbus_args, 's', &namespace); + tbl->dbus_message_iter_append_basic(&dbus_args, 's', &key); + + ctx->dbus_reply = tbl->dbus_connection_send_with_reply_and_block(ctx->dbus_conn, ctx->dbus_msg, 100, &ctx->dbus_err); + + if(tbl->dbus_error_is_set(&ctx->dbus_err)) { + fprintf(stderr, "[WARNING] Couldn't get %s::%s: Send error: %s\n", namespace, key, ctx->dbus_err.message); + tbl->dbus_error_free(&ctx->dbus_err); + return MwFALSE; + } + if(!ctx->dbus_reply) { + fprintf(stderr, "[WARNING] Couldn't get %s::%s: No reply received\n", namespace, key); + return MwFALSE; + } + + if(!tbl->dbus_message_iter_init(ctx->dbus_reply, &dbus_args)) { + fprintf(stderr, "[WARNING] Couldn't get %s::%s: Reply has no arguments\n", namespace, key); + tbl->dbus_message_unref(ctx->dbus_reply); + return MwFALSE; + } + + if((arg_type = tbl->dbus_message_iter_get_arg_type(&dbus_args)) != 'v') { + fprintf(stderr, "[WARNING] Couldn't get %s::%s: Expected outer variant, got: %c\n", namespace, key, arg_type); + tbl->dbus_message_unref(ctx->dbus_reply); + return MwFALSE; + } + tbl->dbus_message_iter_recurse(&dbus_args, &dbus_variant); + + /* Some portals wrap the value in a second variant */ + arg_type = tbl->dbus_message_iter_get_arg_type(&dbus_variant); + if(arg_type == 'v') { + tbl->dbus_message_iter_recurse(&dbus_variant, &dbus_inner_variant); + if((arg_type = tbl->dbus_message_iter_get_arg_type(&dbus_inner_variant)) != 'u') { + fprintf(stderr, "[WARNING] Signal reply for %s::SettingChanged: Expected 'u' (uint32) for 'value', got: %c\n", portal, arg_type); + tbl->dbus_message_unref(ctx->dbus_reply); + return MwFALSE; + } + tbl->dbus_message_iter_get_basic(&dbus_inner_variant, out); + } else if(arg_type == 'u') { + tbl->dbus_message_iter_get_basic(&dbus_variant, out); + } else { + fprintf(stderr, "[WARNING] Couldn't get %s::%s: Expected variant or string, got: %c\n", namespace, key, arg_type); + tbl->dbus_message_unref(ctx->dbus_reply); + return MwFALSE; + } + tbl->dbus_message_unref(ctx->dbus_msg); + + return MwTRUE; +} + +MWDECL MwBool MwLLDBusPortalWatch(MwLLDBusFuncTable* tbl, MwLLDBusContext* ctx, const char* portal) { + char filter_string[2048]; + if(!ctx->dbus_conn) { + return MwFALSE; + } + + MwStringPrintIntoBuffer(filter_string, sizeof(filter_string), "type='%s',interface=%s", "signal", portal); + + tbl->dbus_bus_add_match(ctx->dbus_conn, filter_string, &ctx->dbus_err); + tbl->dbus_connection_flush(ctx->dbus_conn); + + return MwTRUE; +} + +/* Technically this will swallow all other results, so this is not usable multiple times. + TODO: Use a hashmap instead */ +MWDECL MwBool MwLLDBusPortalPoll(MwLLDBusFuncTable* tbl, MwLLDBusContext* ctx, MwLL handle, const char* portal, const char* namespace, const char* key, MwLLDBusPortalPollListener listener) { + DBusMessageIter args, msg_value, msg_value_inner; + const char* msg_namespace; + const char* msg_key; + MwU32 msg_value_content; + char arg_type; + + if(!ctx->dbus_conn) { + return MwFALSE; + } + + tbl->dbus_connection_read_write(ctx->dbus_conn, 0); + tbl->dbus_connection_read_write(ctx->dbus_conn, 0); + ctx->dbus_reply = tbl->dbus_connection_pop_message(ctx->dbus_conn); + + if(tbl->dbus_error_is_set(&ctx->dbus_err)) { + fprintf(stderr, "[WARNING] Signal reply for %s::SettingChanged: Poll error: %s\n", portal, ctx->dbus_err.message); + tbl->dbus_error_free(&ctx->dbus_err); + return MwFALSE; + } + if(!ctx->dbus_reply) { + return MwFALSE; + } + + /* check if the message is a signal from the correct interface and with the correct name */ + if(tbl->dbus_message_is_signal(ctx->dbus_reply, portal, "SettingChanged")) { + /* read the parameters */ + if(!tbl->dbus_message_iter_init(ctx->dbus_reply, &args)) + fprintf(stderr, "[WARNING] Signal reply for %s::SettingChanged has no arguments\n", portal); + else { + if((arg_type = tbl->dbus_message_iter_get_arg_type(&args)) != 's') { + fprintf(stderr, "[WARNING] Signal reply for %s::SettingChanged: Expected 's' (string) for 'namespace', got: %c\n", portal, arg_type); + tbl->dbus_message_unref(ctx->dbus_reply); + return MwFALSE; + } + tbl->dbus_message_iter_get_basic(&args, &msg_namespace); + + tbl->dbus_message_iter_next(&args); + if((arg_type = tbl->dbus_message_iter_get_arg_type(&args)) != 's') { + fprintf(stderr, "[WARNING] Signal reply for %s::SettingChanged: Expected 's' (string) for 'key', got: %c\n", portal, arg_type); + tbl->dbus_message_unref(ctx->dbus_reply); + return MwFALSE; + } + tbl->dbus_message_iter_get_basic(&args, &msg_key); + + /* Check that key and namespace match */ + if(strcmp(msg_namespace, namespace) == 0 && strcmp(msg_key, key) == 0) { + /* Assuming the value is a basic type */ + tbl->dbus_message_iter_next(&args); + + if((arg_type = tbl->dbus_message_iter_get_arg_type(&args)) != 'v') { + fprintf(stderr, "[WARNING] Couldn't get %s::%s: Expected outer variant, got: %c\n", namespace, key, arg_type); + tbl->dbus_message_unref(ctx->dbus_reply); + return MwFALSE; + } + tbl->dbus_message_iter_recurse(&args, &msg_value); + + /* Some portals wrap the value in a second variant */ + arg_type = tbl->dbus_message_iter_get_arg_type(&msg_value); + if(arg_type == 'v') { + tbl->dbus_message_iter_recurse(&msg_value, &msg_value_inner); + if((arg_type = tbl->dbus_message_iter_get_arg_type(&msg_value_inner)) != 'u') { + fprintf(stderr, "[WARNING] Signal reply for %s::SettingChanged: Expected 'u' (uint32) for 'value', got: %c\n", portal, arg_type); + tbl->dbus_message_unref(ctx->dbus_reply); + return MwFALSE; + } + tbl->dbus_message_iter_get_basic(&msg_value_inner, &msg_value_content); + } else if(arg_type == 'u') { + tbl->dbus_message_iter_get_basic(&msg_value, &msg_value_content); + } else { + fprintf(stderr, "[WARNING] Couldn't get %s::%s: Expected variant or string, got: %c\n", namespace, key, arg_type); + tbl->dbus_message_unref(ctx->dbus_reply); + return MwFALSE; + } + + listener(handle, msg_value_content); + } + } + } + + /* free the message */ + tbl->dbus_message_unref(ctx->dbus_reply); + return MwTRUE; +} + +void MwLLDBusFreeContext(MwLLDBusFuncTable* tbl, MwLLDBusContext* ctx) { + if(!tbl->lib) { + return; + } + if(ctx->dbus_reply) tbl->dbus_message_unref(ctx->dbus_reply); + if(ctx->dbus_conn) tbl->dbus_connection_unref(ctx->dbus_conn); +}; +#endif diff --git a/widget/milsko/milskosrc/src/string.c b/widget/milsko/milskosrc/src/string.c new file mode 100644 index 0000000000..f56b9acb7f --- /dev/null +++ b/widget/milsko/milskosrc/src/string.c @@ -0,0 +1,116 @@ +#include + +char* MwStringDuplicate(const char* str) { + char* r = malloc(strlen(str) + 1); + strcpy(r, str); + + return r; +} + +char* MwStringConcat(const char* str1, const char* str2) { + char* r = malloc(strlen(str1) + strlen(str2) + 1); + strcpy(r, str1); + strcat(r, str2); + + return r; +} + +void MwStringSize(char* out, MwOffset size) { + if(size / 1024 == 0) { + sprintf(out, "%d", (int)size); + } else if(size / 1024 / 1024 == 0) { + sprintf(out, "%.1fK", (double)size / 1024); + } else if(size / 1024 / 1024 / 1024 == 0) { + sprintf(out, "%.1fM", (double)size / 1024 / 1024); + } else { + sprintf(out, "%.1fG", (double)size / 1024 / 1024 / 1024); + } +} + +void MwStringTime(char* out, time_t t) { + struct tm* tm = localtime(&t); + const char* months[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; + + if(tm == NULL) { + sprintf(out, "localtime error"); + } else { + sprintf(out, "%s %2d %02d:%02d %d", months[tm->tm_mon], tm->tm_mday, tm->tm_hour, tm->tm_min, 1900 + tm->tm_year); + } +} +void MwStringPrintIntoBuffer(char* out, MwU32 size, const char* fmt, ...) { + va_list va; + va_start(va, fmt); + +#if __STDC_VERSION__ >= 199901L + vsnprintf(out, size, fmt, va); +#else + vsprintf(out, fmt, va); +#endif + + va_end(va); +}; + +MWDECL MwBool MwStringIsKeyUTF8(MwU32 key) { + unsigned char bytes[4]; + int i; + bytes[0] = (key & 0x000000FF); + bytes[1] = (key & 0x0000FF00) >> 8; + bytes[2] = (key & 0x00FF0000) >> 16; + bytes[3] = (key & 0xFF000000) >> 24; + + for(i = 0; i < sizeof(MwU32); i++) { + if(( // ASCII + // use bytes[0] <= 0x7F to allow ASCII control characters + bytes[0] == 0x09 || + bytes[0] == 0x0A || + bytes[0] == 0x0D || + (0x20 <= bytes[0] && bytes[0] <= 0x7E))) { + continue; + } + + if(( // non-overlong 2-byte + (0xC2 <= bytes[0] && bytes[0] <= 0xDF) && + (0x80 <= bytes[1] && bytes[1] <= 0xBF))) { + continue; + } + + if(( // excluding overlongs + bytes[0] == 0xE0 && + (0xA0 <= bytes[1] && bytes[1] <= 0xBF) && + (0x80 <= bytes[2] && bytes[2] <= 0xBF)) || + ( // straight 3-byte + ((0xE1 <= bytes[0] && bytes[0] <= 0xEC) || + bytes[0] == 0xEE || + bytes[0] == 0xEF) && + (0x80 <= bytes[1] && bytes[1] <= 0xBF) && + (0x80 <= bytes[2] && bytes[2] <= 0xBF)) || + ( // excluding surrogates + bytes[0] == 0xED && + (0x80 <= bytes[1] && bytes[1] <= 0x9F) && + (0x80 <= bytes[2] && bytes[2] <= 0xBF))) { + continue; + } + + if(( // planes 1-3 + bytes[0] == 0xF0 && + (0x90 <= bytes[1] && bytes[1] <= 0xBF) && + (0x80 <= bytes[2] && bytes[2] <= 0xBF) && + (0x80 <= bytes[3] && bytes[3] <= 0xBF)) || + ( // planes 4-15 + (0xF1 <= bytes[0] && bytes[0] <= 0xF3) && + (0x80 <= bytes[1] && bytes[1] <= 0xBF) && + (0x80 <= bytes[2] && bytes[2] <= 0xBF) && + (0x80 <= bytes[3] && bytes[3] <= 0xBF)) || + ( // plane 16 + bytes[0] == 0xF4 && + (0x80 <= bytes[1] && bytes[1] <= 0x8F) && + (0x80 <= bytes[2] && bytes[2] <= 0xBF) && + (0x80 <= bytes[3] && bytes[3] <= 0xBF))) { + continue; + } + + return 0; + } + + return 1; +} diff --git a/widget/milsko/milskosrc/src/text/font/boldfont.c b/widget/milsko/milskosrc/src/text/font/boldfont.c new file mode 100644 index 0000000000..c63be2c4e0 --- /dev/null +++ b/widget/milsko/milskosrc/src/text/font/boldfont.c @@ -0,0 +1,264 @@ +#include + +/** + * Copyright notice: + * "Public domain font. Share and enjoy." + */ +MwFont MwBoldFontData[] = { + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 0 */ + {0, 12, {0, 0, 12, 12, 30, 30, 63, 63, 30, 30, 12, 12, 0, 0}}, /* 1 */ + {0, 12, {59, 119, 110, 93, 59, 119, 110, 93, 59, 119, 110, 93, 59, 119}}, /* 2 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 3 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 4 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 5 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 6 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 7 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 8 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 9 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 10 */ + {0, 12, {12, 12, 12, 12, 12, 12, 124, 124, 0, 0, 0, 0, 0, 0}}, /* 11 */ + {0, 12, {0, 0, 0, 0, 0, 0, 124, 124, 12, 12, 12, 12, 12, 12}}, /* 12 */ + {0, 12, {0, 0, 0, 0, 0, 0, 15, 15, 12, 12, 12, 12, 12, 12}}, /* 13 */ + {0, 12, {12, 12, 12, 12, 12, 12, 15, 15, 0, 0, 0, 0, 0, 0}}, /* 14 */ + {0, 12, {12, 12, 12, 12, 12, 12, 127, 127, 12, 12, 12, 12, 12, 12}}, /* 15 */ + {0, 12, {127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 16 */ + {0, 12, {0, 0, 0, 127, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 17 */ + {0, 12, {0, 0, 0, 0, 0, 0, 127, 127, 0, 0, 0, 0, 0, 0}}, /* 18 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127, 0, 0, 0}}, /* 19 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 127}}, /* 20 */ + {0, 12, {12, 12, 12, 12, 12, 12, 15, 15, 12, 12, 12, 12, 12, 12}}, /* 21 */ + {0, 12, {12, 12, 12, 12, 12, 12, 124, 124, 12, 12, 12, 12, 12, 12}}, /* 22 */ + {0, 12, {12, 12, 12, 12, 12, 12, 127, 127, 0, 0, 0, 0, 0, 0}}, /* 23 */ + {0, 12, {0, 0, 0, 0, 0, 0, 127, 127, 12, 12, 12, 12, 12, 12}}, /* 24 */ + {0, 12, {12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}}, /* 25 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 26 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 27 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 28 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 29 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 30 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 31 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 32 */ + {0, 12, {0, 0, 12, 12, 12, 12, 12, 12, 12, 0, 12, 12, 0, 0}}, /* 33 */ + {0, 12, {63, 27, 27, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 34 */ + {0, 12, {0, 0, 15, 15, 15, 63, 30, 30, 63, 60, 60, 60, 0, 0}}, /* 35 */ + {0, 12, {0, 0, 12, 30, 45, 45, 28, 14, 13, 45, 45, 30, 12, 0}}, /* 36 */ + {0, 12, {0, 0, 27, 55, 54, 28, 4, 8, 14, 27, 59, 54, 0, 0}}, /* 37 */ + {0, 12, {0, 0, 14, 27, 27, 27, 14, 27, 55, 54, 54, 27, 0, 0}}, /* 38 */ + {0, 12, {28, 12, 12, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 39 */ + {0, 12, {0, 3, 6, 12, 12, 24, 24, 24, 24, 24, 12, 12, 6, 3}}, /* 40 */ + {0, 12, {0, 48, 24, 12, 12, 6, 6, 6, 6, 6, 12, 12, 24, 48}}, /* 41 */ + {0, 12, {0, 0, 0, 45, 45, 30, 12, 12, 30, 45, 45, 0, 0, 0}}, /* 42 */ + {0, 12, {0, 0, 0, 0, 12, 12, 12, 63, 12, 12, 12, 0, 0, 0}}, /* 43 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 12, 12, 24}}, /* 44 */ + {0, 12, {0, 0, 0, 0, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0}}, /* 45 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 0}}, /* 46 */ + {0, 12, {0, 3, 3, 3, 6, 6, 12, 12, 12, 24, 24, 48, 48, 48}}, /* 47 */ + {0, 12, {0, 0, 30, 51, 51, 51, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 48 */ + {0, 12, {0, 0, 12, 28, 60, 12, 12, 12, 12, 12, 12, 63, 0, 0}}, /* 49 */ + {0, 12, {0, 0, 30, 51, 51, 3, 6, 6, 12, 24, 48, 63, 0, 0}}, /* 50 */ + {0, 12, {0, 0, 30, 51, 51, 3, 14, 3, 3, 51, 51, 30, 0, 0}}, /* 51 */ + {0, 12, {0, 0, 2, 6, 6, 14, 30, 22, 54, 63, 2, 2, 0, 0}}, /* 52 */ + {0, 12, {0, 0, 63, 48, 48, 62, 51, 3, 3, 51, 51, 30, 0, 0}}, /* 53 */ + {0, 12, {0, 0, 14, 27, 51, 48, 62, 51, 51, 51, 51, 30, 0, 0}}, /* 54 */ + {0, 12, {0, 0, 63, 51, 54, 6, 12, 12, 12, 12, 12, 12, 0, 0}}, /* 55 */ + {0, 12, {0, 0, 30, 51, 51, 30, 12, 30, 51, 51, 51, 30, 0, 0}}, /* 56 */ + {0, 12, {0, 0, 30, 51, 51, 51, 51, 31, 3, 51, 54, 28, 0, 0}}, /* 57 */ + {0, 12, {0, 0, 0, 0, 12, 12, 0, 0, 0, 12, 12, 0, 0, 0}}, /* 58 */ + {0, 12, {0, 0, 0, 0, 12, 12, 0, 0, 0, 28, 12, 12, 24, 0}}, /* 59 */ + {0, 12, {0, 0, 0, 3, 6, 12, 24, 48, 24, 12, 6, 3, 0, 0}}, /* 60 */ + {0, 12, {0, 0, 0, 0, 63, 63, 0, 63, 63, 0, 0, 0, 0, 0}}, /* 61 */ + {0, 12, {0, 0, 0, 48, 24, 12, 6, 3, 6, 12, 24, 48, 0, 0}}, /* 62 */ + {0, 12, {0, 0, 30, 51, 51, 6, 12, 12, 12, 0, 12, 12, 0, 0}}, /* 63 */ + {0, 12, {0, 0, 14, 27, 55, 61, 61, 61, 61, 55, 24, 15, 0, 0}}, /* 64 */ + {0, 12, {0, 0, 30, 63, 51, 51, 51, 51, 63, 51, 51, 51, 0, 0}}, /* 65 */ + {0, 12, {0, 0, 62, 51, 51, 50, 62, 51, 51, 51, 51, 62, 0, 0}}, /* 66 */ + {0, 12, {0, 0, 30, 51, 51, 48, 48, 48, 48, 51, 51, 30, 0, 0}}, /* 67 */ + {0, 12, {0, 0, 60, 54, 51, 51, 51, 51, 51, 51, 54, 60, 0, 0}}, /* 68 */ + {0, 12, {0, 0, 63, 48, 48, 48, 62, 48, 48, 48, 48, 63, 0, 0}}, /* 69 */ + {0, 12, {0, 0, 63, 48, 48, 48, 62, 48, 48, 48, 48, 48, 0, 0}}, /* 70 */ + {0, 12, {0, 0, 30, 51, 51, 48, 48, 55, 51, 51, 51, 30, 0, 0}}, /* 71 */ + {0, 12, {0, 0, 51, 51, 51, 51, 63, 51, 51, 51, 51, 51, 0, 0}}, /* 72 */ + {0, 12, {0, 0, 63, 12, 12, 12, 12, 12, 12, 12, 12, 63, 0, 0}}, /* 73 */ + {0, 12, {0, 0, 3, 3, 3, 3, 3, 3, 3, 51, 54, 28, 0, 0}}, /* 74 */ + {0, 12, {0, 0, 51, 54, 60, 56, 56, 60, 60, 54, 51, 51, 0, 0}}, /* 75 */ + {0, 12, {0, 0, 48, 48, 48, 48, 48, 48, 48, 48, 48, 63, 0, 0}}, /* 76 */ + {0, 12, {0, 0, 33, 51, 51, 63, 63, 51, 51, 51, 51, 51, 0, 0}}, /* 77 */ + {0, 12, {0, 0, 51, 51, 59, 59, 59, 55, 55, 55, 51, 51, 0, 0}}, /* 78 */ + {0, 12, {0, 0, 30, 51, 51, 51, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 79 */ + {0, 12, {0, 0, 62, 51, 51, 51, 51, 62, 48, 48, 48, 48, 0, 0}}, /* 80 */ + {0, 12, {0, 0, 30, 51, 51, 51, 51, 51, 59, 55, 51, 30, 3, 1}}, /* 81 */ + {0, 12, {0, 0, 62, 51, 51, 51, 62, 54, 51, 51, 51, 51, 0, 0}}, /* 82 */ + {0, 12, {0, 0, 30, 51, 51, 24, 12, 12, 6, 51, 51, 30, 0, 0}}, /* 83 */ + {0, 12, {0, 0, 63, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0}}, /* 84 */ + {0, 12, {0, 0, 51, 51, 51, 51, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 85 */ + {0, 12, {0, 0, 51, 51, 51, 51, 51, 51, 51, 30, 30, 12, 0, 0}}, /* 86 */ + {0, 12, {0, 0, 51, 51, 51, 51, 51, 63, 63, 63, 63, 18, 0, 0}}, /* 87 */ + {0, 12, {0, 0, 51, 51, 30, 30, 12, 12, 30, 30, 51, 51, 0, 0}}, /* 88 */ + {0, 12, {0, 0, 51, 51, 51, 30, 30, 12, 12, 12, 12, 12, 0, 0}}, /* 89 */ + {0, 12, {0, 0, 63, 3, 6, 6, 12, 12, 24, 24, 48, 63, 0, 0}}, /* 90 */ + {0, 12, {0, 31, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 31}}, /* 91 */ + {0, 12, {0, 48, 48, 48, 24, 24, 12, 12, 12, 6, 6, 3, 3, 3}}, /* 92 */ + {0, 12, {0, 62, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 62}}, /* 93 */ + {0, 12, {12, 30, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 94 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63, 63}}, /* 95 */ + {0, 12, {14, 12, 12, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 96 */ + {0, 12, {0, 0, 0, 0, 0, 30, 51, 7, 27, 51, 51, 31, 0, 0}}, /* 97 */ + {0, 12, {0, 0, 48, 48, 48, 62, 51, 51, 51, 51, 51, 62, 0, 0}}, /* 98 */ + {0, 12, {0, 0, 0, 0, 0, 30, 51, 48, 48, 48, 51, 30, 0, 0}}, /* 99 */ + {0, 12, {0, 0, 3, 3, 3, 31, 51, 51, 51, 51, 51, 31, 0, 0}}, /* 100 */ + {0, 12, {0, 0, 0, 0, 0, 30, 51, 51, 63, 48, 51, 30, 0, 0}}, /* 101 */ + {0, 12, {0, 0, 6, 15, 12, 12, 63, 12, 12, 12, 12, 12, 0, 0}}, /* 102 */ + {0, 12, {0, 0, 0, 0, 0, 29, 55, 54, 54, 28, 16, 62, 51, 30}}, /* 103 */ + {0, 12, {0, 0, 48, 48, 48, 62, 51, 51, 51, 51, 51, 51, 0, 0}}, /* 104 */ + {0, 12, {0, 0, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0}}, /* 105 */ + {0, 12, {0, 0, 6, 6, 0, 6, 6, 6, 6, 6, 6, 6, 54, 28}}, /* 106 */ + {0, 12, {0, 0, 48, 48, 48, 50, 54, 60, 60, 54, 51, 49, 0, 0}}, /* 107 */ + {0, 12, {0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0}}, /* 108 */ + {0, 12, {0, 0, 0, 0, 0, 54, 63, 63, 63, 63, 63, 63, 0, 0}}, /* 109 */ + {0, 12, {0, 0, 0, 0, 0, 62, 51, 51, 51, 51, 51, 51, 0, 0}}, /* 110 */ + {0, 12, {0, 0, 0, 0, 0, 30, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 111 */ + {0, 12, {0, 0, 0, 0, 0, 62, 51, 51, 51, 51, 51, 62, 48, 48}}, /* 112 */ + {0, 12, {0, 0, 0, 0, 0, 31, 51, 51, 51, 51, 51, 31, 3, 3}}, /* 113 */ + {0, 12, {0, 0, 0, 0, 0, 62, 51, 51, 48, 48, 48, 48, 0, 0}}, /* 114 */ + {0, 12, {0, 0, 0, 0, 0, 30, 51, 24, 12, 6, 51, 30, 0, 0}}, /* 115 */ + {0, 12, {0, 0, 12, 12, 12, 63, 12, 12, 12, 12, 12, 7, 0, 0}}, /* 116 */ + {0, 12, {0, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 31, 0, 0}}, /* 117 */ + {0, 12, {0, 0, 0, 0, 0, 51, 51, 51, 30, 30, 12, 12, 0, 0}}, /* 118 */ + {0, 12, {0, 0, 0, 0, 0, 51, 51, 63, 63, 63, 63, 18, 0, 0}}, /* 119 */ + {0, 12, {0, 0, 0, 0, 0, 51, 51, 30, 12, 30, 51, 51, 0, 0}}, /* 120 */ + {0, 12, {0, 0, 0, 0, 0, 51, 51, 27, 27, 14, 14, 6, 54, 28}}, /* 121 */ + {0, 12, {0, 0, 0, 0, 0, 63, 3, 6, 12, 24, 48, 63, 0, 0}}, /* 122 */ + {0, 12, {0, 7, 12, 12, 12, 12, 12, 24, 12, 12, 12, 12, 12, 7}}, /* 123 */ + {0, 12, {0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12}}, /* 124 */ + {0, 12, {0, 56, 12, 12, 12, 12, 12, 6, 12, 12, 12, 12, 12, 56}}, /* 125 */ + {0, 12, {0, 16, 63, 63, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 126 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 127 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 128 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 129 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 130 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 131 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 132 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 133 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 134 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 135 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 136 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 137 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 138 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 139 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 140 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 141 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 142 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 143 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 144 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 145 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 146 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 147 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 148 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 149 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 150 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 151 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 152 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 153 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 154 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 155 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 156 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 157 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 158 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 159 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 160 */ + {0, 12, {0, 0, 12, 12, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0}}, /* 161 */ + {0, 12, {0, 0, 0, 0, 12, 31, 45, 44, 44, 44, 45, 31, 12, 0}}, /* 162 */ + {0, 12, {0, 0, 0, 14, 27, 24, 24, 60, 24, 24, 62, 27, 0, 0}}, /* 163 */ + {0, 12, {0, 0, 0, 0, 51, 30, 26, 22, 30, 51, 0, 0, 0, 0}}, /* 164 */ + {0, 12, {0, 0, 33, 51, 30, 63, 12, 12, 63, 12, 12, 12, 0, 0}}, /* 165 */ + {0, 12, {0, 0, 12, 12, 12, 12, 0, 0, 12, 12, 12, 12, 0, 0}}, /* 166 */ + {0, 12, {0, 30, 51, 24, 12, 30, 51, 30, 12, 6, 51, 30, 0, 0}}, /* 167 */ + {0, 12, {0, 54, 54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 168 */ + {0, 12, {0, 30, 51, 63, 59, 59, 59, 59, 59, 63, 51, 30, 0, 0}}, /* 169 */ + {0, 12, {0, 14, 27, 15, 27, 27, 15, 0, 31, 0, 0, 0, 0, 0}}, /* 170 */ + {0, 12, {0, 0, 0, 0, 0, 7, 15, 30, 60, 30, 15, 7, 0, 0}}, /* 171 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 126, 126, 6, 6, 6, 0, 0}}, /* 172 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 120, 120, 0, 0, 0, 0, 0}}, /* 173 */ + {0, 12, {0, 30, 51, 63, 59, 59, 63, 59, 59, 59, 51, 30, 0, 0}}, /* 174 */ + {0, 12, {0, 0, 120, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 175 */ + {0, 12, {0, 28, 54, 54, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 176 */ + {0, 12, {0, 0, 0, 0, 0, 0, 12, 12, 63, 12, 12, 63, 0, 0}}, /* 177 */ + {0, 12, {0, 28, 54, 6, 12, 24, 48, 62, 0, 0, 0, 0, 0, 0}}, /* 178 */ + {0, 12, {0, 28, 54, 6, 28, 6, 54, 28, 0, 0, 0, 0, 0, 0}}, /* 179 */ + {0, 12, {0, 6, 12, 24, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 180 */ + {0, 12, {0, 0, 0, 0, 0, 0, 51, 51, 51, 51, 55, 63, 48, 48}}, /* 181 */ + {0, 12, {0, 0, 31, 59, 59, 59, 59, 27, 11, 11, 11, 11, 11, 15}}, /* 182 */ + {0, 12, {0, 0, 0, 0, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0}}, /* 183 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 24}}, /* 184 */ + {0, 12, {0, 0, 24, 56, 24, 24, 24, 24, 0, 0, 0, 0, 0, 0}}, /* 185 */ + {0, 12, {0, 0, 14, 27, 27, 14, 0, 31, 0, 0, 0, 0, 0, 0}}, /* 186 */ + {0, 12, {0, 0, 0, 0, 0, 56, 28, 14, 7, 14, 28, 56, 0, 0}}, /* 187 */ + {0, 12, {0, 0, 25, 59, 26, 30, 30, 13, 27, 23, 55, 35, 0, 0}}, /* 188 */ + {0, 12, {0, 0, 25, 59, 26, 30, 30, 14, 29, 19, 54, 39, 0, 0}}, /* 189 */ + {0, 12, {0, 0, 49, 27, 58, 30, 60, 15, 27, 55, 39, 3, 0, 0}}, /* 190 */ + {0, 12, {0, 0, 0, 6, 6, 0, 6, 6, 6, 6, 6, 51, 51, 30}}, /* 191 */ + {0, 12, {28, 14, 0, 30, 63, 51, 51, 51, 63, 51, 51, 51, 0, 0}}, /* 192 */ + {0, 12, {14, 28, 0, 30, 63, 51, 51, 51, 63, 51, 51, 51, 0, 0}}, /* 193 */ + {0, 12, {12, 30, 0, 30, 63, 51, 51, 51, 63, 51, 51, 51, 0, 0}}, /* 194 */ + {0, 12, {10, 20, 0, 30, 63, 51, 51, 51, 63, 51, 51, 51, 0, 0}}, /* 195 */ + {0, 12, {18, 18, 0, 30, 63, 51, 51, 51, 63, 51, 51, 51, 0, 0}}, /* 196 */ + {0, 12, {12, 12, 0, 30, 63, 51, 51, 51, 63, 51, 51, 51, 0, 0}}, /* 197 */ + {0, 12, {0, 0, 63, 108, 108, 108, 110, 124, 108, 108, 108, 111, 0, 0}}, /* 198 */ + {0, 12, {0, 0, 30, 51, 51, 48, 48, 48, 48, 51, 51, 30, 12, 24}}, /* 199 */ + {0, 12, {28, 14, 0, 63, 48, 48, 48, 62, 48, 48, 48, 63, 0, 0}}, /* 200 */ + {0, 12, {14, 28, 0, 63, 48, 48, 48, 62, 48, 48, 48, 63, 0, 0}}, /* 201 */ + {0, 12, {12, 30, 0, 63, 48, 48, 48, 62, 48, 48, 48, 63, 0, 0}}, /* 202 */ + {0, 12, {18, 18, 0, 63, 48, 48, 48, 62, 48, 48, 48, 63, 0, 0}}, /* 203 */ + {0, 12, {28, 14, 0, 63, 12, 12, 12, 12, 12, 12, 12, 63, 0, 0}}, /* 204 */ + {0, 12, {14, 28, 0, 63, 12, 12, 12, 12, 12, 12, 12, 63, 0, 0}}, /* 205 */ + {0, 12, {12, 30, 0, 63, 12, 12, 12, 12, 12, 12, 12, 63, 0, 0}}, /* 206 */ + {0, 12, {18, 18, 0, 63, 12, 12, 12, 12, 12, 12, 12, 63, 0, 0}}, /* 207 */ + {0, 12, {0, 0, 60, 54, 51, 51, 127, 51, 51, 51, 54, 60, 0, 0}}, /* 208 */ + {0, 12, {10, 20, 0, 51, 59, 59, 59, 55, 55, 55, 51, 51, 0, 0}}, /* 209 */ + {0, 12, {28, 14, 0, 30, 51, 51, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 210 */ + {0, 12, {14, 28, 0, 30, 51, 51, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 211 */ + {0, 12, {12, 30, 0, 30, 51, 51, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 212 */ + {0, 12, {10, 20, 0, 30, 51, 51, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 213 */ + {0, 12, {18, 18, 0, 30, 51, 51, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 214 */ + {0, 12, {0, 0, 0, 0, 0, 99, 54, 28, 28, 54, 99, 65, 0, 0}}, /* 215 */ + {0, 12, {1, 1, 30, 55, 55, 55, 55, 59, 59, 59, 59, 30, 32, 32}}, /* 216 */ + {0, 12, {28, 14, 0, 51, 51, 51, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 217 */ + {0, 12, {14, 28, 0, 51, 51, 51, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 218 */ + {0, 12, {12, 30, 0, 51, 51, 51, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 219 */ + {0, 12, {18, 18, 0, 51, 51, 51, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 220 */ + {0, 12, {14, 28, 0, 51, 51, 51, 30, 30, 30, 12, 12, 12, 0, 0}}, /* 221 */ + {0, 12, {0, 0, 48, 48, 62, 51, 51, 51, 51, 62, 48, 48, 0, 0}}, /* 222 */ + {0, 12, {0, 0, 14, 27, 27, 27, 30, 27, 27, 27, 27, 62, 0, 0}}, /* 223 */ + {0, 12, {0, 24, 12, 6, 0, 30, 51, 15, 27, 51, 51, 31, 0, 0}}, /* 224 */ + {0, 12, {0, 6, 12, 24, 0, 30, 51, 15, 27, 51, 51, 31, 0, 0}}, /* 225 */ + {0, 12, {0, 0, 12, 30, 0, 30, 51, 15, 27, 51, 51, 31, 0, 0}}, /* 226 */ + {0, 12, {0, 0, 10, 20, 0, 30, 51, 15, 27, 51, 51, 31, 0, 0}}, /* 227 */ + {0, 12, {0, 0, 18, 18, 0, 30, 51, 15, 27, 51, 51, 31, 0, 0}}, /* 228 */ + {0, 12, {0, 12, 30, 12, 0, 30, 51, 15, 27, 51, 51, 31, 0, 0}}, /* 229 */ + {0, 12, {0, 0, 0, 0, 0, 62, 109, 29, 47, 108, 111, 62, 0, 0}}, /* 230 */ + {0, 12, {0, 0, 0, 0, 0, 30, 51, 48, 48, 48, 51, 30, 12, 24}}, /* 231 */ + {0, 12, {0, 24, 12, 6, 0, 30, 51, 51, 63, 48, 51, 30, 0, 0}}, /* 232 */ + {0, 12, {0, 6, 12, 24, 0, 30, 51, 51, 63, 48, 51, 30, 0, 0}}, /* 233 */ + {0, 12, {0, 0, 12, 30, 0, 30, 51, 51, 63, 48, 51, 30, 0, 0}}, /* 234 */ + {0, 12, {0, 0, 18, 18, 0, 30, 51, 51, 63, 48, 51, 30, 0, 0}}, /* 235 */ + {0, 12, {0, 24, 12, 6, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0}}, /* 236 */ + {0, 12, {0, 6, 12, 24, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0}}, /* 237 */ + {0, 12, {0, 0, 12, 30, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0}}, /* 238 */ + {0, 12, {0, 0, 18, 18, 0, 12, 12, 12, 12, 12, 12, 12, 0, 0}}, /* 239 */ + {0, 12, {0, 20, 8, 22, 6, 30, 54, 54, 54, 54, 54, 28, 0, 0}}, /* 240 */ + {0, 12, {0, 0, 10, 20, 0, 62, 51, 51, 51, 51, 51, 51, 0, 0}}, /* 241 */ + {0, 12, {0, 24, 12, 6, 0, 30, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 242 */ + {0, 12, {0, 6, 12, 24, 0, 30, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 243 */ + {0, 12, {0, 0, 12, 30, 0, 30, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 244 */ + {0, 12, {0, 0, 10, 20, 0, 30, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 245 */ + {0, 12, {0, 0, 18, 18, 0, 30, 51, 51, 51, 51, 51, 30, 0, 0}}, /* 246 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 24, 0, 126, 0, 24, 0, 0}}, /* 247 */ + {0, 12, {0, 0, 0, 1, 2, 30, 55, 55, 59, 59, 51, 30, 32, 32}}, /* 248 */ + {0, 12, {0, 16, 24, 12, 4, 51, 51, 51, 51, 51, 51, 31, 0, 0}}, /* 249 */ + {0, 12, {0, 2, 6, 12, 8, 51, 51, 51, 51, 51, 51, 31, 0, 0}}, /* 250 */ + {0, 12, {0, 0, 12, 30, 0, 51, 51, 51, 51, 51, 51, 31, 0, 0}}, /* 251 */ + {0, 12, {0, 0, 18, 18, 0, 51, 51, 51, 51, 51, 51, 31, 0, 0}}, /* 252 */ + {0, 12, {0, 2, 6, 12, 8, 51, 51, 51, 30, 14, 14, 12, 60, 24}}, /* 253 */ + {0, 12, {0, 0, 48, 48, 48, 62, 51, 51, 51, 51, 51, 62, 48, 48}}, /* 254 */ + {0, 12, {0, 0, 18, 18, 0, 51, 51, 51, 30, 14, 14, 12, 60, 24}} /* 255 */ +}; diff --git a/widget/milsko/milskosrc/src/text/font/boldmonottf.c b/widget/milsko/milskosrc/src/text/font/boldmonottf.c new file mode 100644 index 0000000000..8526c1b053 --- /dev/null +++ b/widget/milsko/milskosrc/src/text/font/boldmonottf.c @@ -0,0 +1,3022 @@ +#include + +#if defined(USE_STB_TRUETYPE) || defined(USE_FREETYPE2) || defined(USE_GDI_TEXT) +unsigned char MwBoldMonospaceTTFData[] = { + 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x04, 0x00, 0x10, + 0x46, 0x46, 0x54, 0x4d, 0xac, 0x0d, 0xe4, 0x44, 0x00, 0x00, 0x8d, 0x3c, + 0x00, 0x00, 0x00, 0x1c, 0x4f, 0x53, 0x2f, 0x32, 0xa4, 0xe6, 0xab, 0x72, + 0x00, 0x00, 0x01, 0x98, 0x00, 0x00, 0x00, 0x60, 0x63, 0x6d, 0x61, 0x70, + 0x0a, 0x08, 0xe7, 0x8a, 0x00, 0x00, 0x04, 0x60, 0x00, 0x00, 0x01, 0x5a, + 0x63, 0x76, 0x74, 0x20, 0x03, 0xff, 0x11, 0xcf, 0x00, 0x00, 0x09, 0x34, + 0x00, 0x00, 0x00, 0x4a, 0x66, 0x65, 0x61, 0x74, 0x40, 0x36, 0x0d, 0x66, + 0x00, 0x00, 0x8a, 0xd8, 0x00, 0x00, 0x00, 0x5c, 0x66, 0x70, 0x67, 0x6d, + 0x06, 0x59, 0x9c, 0x37, 0x00, 0x00, 0x05, 0xbc, 0x00, 0x00, 0x01, 0x73, + 0x67, 0x61, 0x73, 0x70, 0x00, 0x18, 0x00, 0x23, 0x00, 0x00, 0x8a, 0xc8, + 0x00, 0x00, 0x00, 0x10, 0x67, 0x6c, 0x79, 0x66, 0xf8, 0x0d, 0xdb, 0x5e, + 0x00, 0x00, 0x0b, 0x08, 0x00, 0x00, 0x6d, 0x38, 0x68, 0x65, 0x61, 0x64, + 0x28, 0x83, 0x41, 0xdc, 0x00, 0x00, 0x01, 0x1c, 0x00, 0x00, 0x00, 0x36, + 0x68, 0x68, 0x65, 0x61, 0x06, 0x5b, 0x03, 0x44, 0x00, 0x00, 0x01, 0x54, + 0x00, 0x00, 0x00, 0x24, 0x68, 0x6d, 0x74, 0x78, 0x0f, 0x76, 0x25, 0x59, + 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x66, 0x6c, 0x6f, 0x63, 0x61, + 0xee, 0xf2, 0xd4, 0xb0, 0x00, 0x00, 0x09, 0x80, 0x00, 0x00, 0x01, 0x86, + 0x6d, 0x61, 0x78, 0x70, 0x02, 0xd9, 0x01, 0x94, 0x00, 0x00, 0x01, 0x78, + 0x00, 0x00, 0x00, 0x20, 0x6d, 0x6f, 0x72, 0x78, 0x02, 0x7c, 0xa9, 0x72, + 0x00, 0x00, 0x8b, 0x34, 0x00, 0x00, 0x02, 0x08, 0x6e, 0x61, 0x6d, 0x65, + 0xb2, 0x36, 0x4e, 0x6c, 0x00, 0x00, 0x78, 0x40, 0x00, 0x00, 0x10, 0xc7, + 0x70, 0x6f, 0x73, 0x74, 0x26, 0x62, 0xd0, 0xd4, 0x00, 0x00, 0x89, 0x08, + 0x00, 0x00, 0x01, 0xbe, 0x70, 0x72, 0x65, 0x70, 0x48, 0x01, 0x73, 0x29, + 0x00, 0x00, 0x07, 0x30, 0x00, 0x00, 0x02, 0x02, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x02, 0x01, 0x06, 0x07, 0xe3, 0xc8, 0x87, 0x5f, 0x0f, 0x3c, 0xf5, + 0x00, 0x1f, 0x03, 0xe8, 0x00, 0x00, 0x00, 0x00, 0xe1, 0xa9, 0xde, 0x3f, + 0x00, 0x00, 0x00, 0x00, 0xe5, 0x4d, 0x1e, 0x99, 0xff, 0xfc, 0xff, 0x2c, + 0x02, 0x5b, 0x03, 0xed, 0x00, 0x01, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x01, 0xfe, 0xed, + 0x00, 0x00, 0x03, 0xe8, 0xff, 0xfc, 0xff, 0xfd, 0x02, 0x5b, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x71, 0x00, 0x01, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x59, + 0x00, 0x06, 0x00, 0x47, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0xf2, 0x00, 0x02, 0x00, 0x01, + 0x00, 0x04, 0x02, 0x58, 0x02, 0xbc, 0x00, 0x05, 0x00, 0x00, 0x02, 0x8a, + 0x02, 0x58, 0x00, 0x00, 0x00, 0x4b, 0x02, 0x8a, 0x02, 0x58, 0x00, 0x00, + 0x01, 0x5e, 0x00, 0x64, 0x01, 0x35, 0x08, 0x09, 0x02, 0x0b, 0x08, 0x09, + 0x05, 0x02, 0x03, 0x00, 0x02, 0x03, 0xa0, 0x00, 0x02, 0x6f, 0x40, 0x00, + 0x38, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x42, + 0x4d, 0x20, 0x01, 0x20, 0x00, 0x00, 0x00, 0xff, 0x03, 0x0c, 0xff, 0x24, + 0x01, 0x2c, 0x04, 0x01, 0x01, 0x13, 0x60, 0x00, 0x01, 0x97, 0x00, 0x00, + 0x00, 0x00, 0x02, 0x04, 0x02, 0xba, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, + 0x03, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x58, 0x00, 0x00, + 0x02, 0x58, 0x00, 0x00, 0x02, 0x58, 0x00, 0xca, 0x02, 0x58, 0x00, 0x7a, + 0x02, 0x58, 0x00, 0x09, 0x02, 0x58, 0x00, 0x1e, 0x02, 0x58, 0x00, 0x02, + 0x02, 0x58, 0x00, 0x0e, 0x02, 0x58, 0x00, 0xea, 0x02, 0x58, 0x00, 0xae, + 0x02, 0x58, 0x00, 0x46, 0x02, 0x58, 0x00, 0x1e, 0x02, 0x58, 0x00, 0x3e, + 0x02, 0x58, 0x00, 0xaa, 0x02, 0x58, 0x00, 0x8c, 0x02, 0x58, 0x00, 0xc3, + 0x02, 0x58, 0x00, 0x49, 0x02, 0x58, 0x00, 0x1b, 0x02, 0x58, 0x00, 0x23, + 0x02, 0x58, 0x00, 0x26, 0x02, 0x58, 0x00, 0x18, 0x02, 0x58, 0x00, 0x19, + 0x02, 0x58, 0x00, 0x2a, 0x02, 0x58, 0x00, 0x26, 0x02, 0x58, 0x00, 0x33, + 0x02, 0x58, 0x00, 0x24, 0x02, 0x58, 0x00, 0x1f, 0x02, 0x58, 0x00, 0xc3, + 0x02, 0x58, 0x00, 0xaa, 0x02, 0x58, 0x00, 0x55, 0x02, 0x58, 0x00, 0x3e, + 0x02, 0x58, 0x00, 0x55, 0x02, 0x58, 0x00, 0x3d, 0x02, 0x58, 0x00, 0x26, + 0x02, 0x58, 0x00, 0x05, 0x02, 0x58, 0x00, 0x4d, 0x02, 0x58, 0x00, 0x29, + 0x02, 0x58, 0x00, 0x40, 0x02, 0x58, 0x00, 0x50, 0x02, 0x58, 0x00, 0x50, + 0x02, 0x58, 0x00, 0x23, 0x02, 0x58, 0x00, 0x3d, 0x02, 0x58, 0x00, 0x4b, + 0x02, 0x58, 0x00, 0x26, 0x02, 0x58, 0x00, 0x44, 0x02, 0x58, 0x00, 0x5c, + 0x02, 0x58, 0x00, 0x27, 0x02, 0x58, 0x00, 0x3d, 0x02, 0x58, 0x00, 0x1b, + 0x02, 0x58, 0x00, 0x4c, 0x02, 0x58, 0x00, 0x1b, 0x02, 0x58, 0x00, 0x4c, + 0x02, 0x58, 0x00, 0x1f, 0x02, 0x58, 0x00, 0x18, 0x02, 0x58, 0x00, 0x37, + 0x02, 0x58, 0x00, 0x09, 0x02, 0x58, 0x00, 0x0b, 0x02, 0x58, 0x00, 0x09, + 0x02, 0x58, 0x00, 0x04, 0x02, 0x58, 0x00, 0x30, 0x02, 0x58, 0x00, 0xb7, + 0x02, 0x58, 0x00, 0x49, 0x02, 0x58, 0x00, 0x5d, 0x02, 0x58, 0x00, 0x1b, + 0x02, 0x58, 0x00, 0x3c, 0x02, 0x58, 0x00, 0x96, 0x02, 0x58, 0x00, 0x34, + 0x02, 0x58, 0x00, 0x3b, 0x02, 0x58, 0x00, 0x3c, 0x02, 0x58, 0x00, 0x27, + 0x02, 0x58, 0x00, 0x32, 0x02, 0x58, 0x00, 0x3d, 0x02, 0x58, 0x00, 0x2f, + 0x02, 0x58, 0x00, 0x41, 0x02, 0x58, 0x00, 0x5e, 0x02, 0x58, 0x00, 0x5a, + 0x02, 0x58, 0x00, 0x41, 0x02, 0x58, 0x00, 0x44, 0x02, 0x58, 0x00, 0x1e, + 0x02, 0x58, 0x00, 0x41, 0x02, 0x58, 0x00, 0x29, 0x02, 0x58, 0x00, 0x3b, + 0x02, 0x58, 0x00, 0x27, 0x02, 0x58, 0x00, 0x4a, 0x02, 0x58, 0x00, 0x31, + 0x02, 0x58, 0x00, 0x2a, 0x02, 0x58, 0x00, 0x3d, 0x02, 0x58, 0x00, 0x1b, + 0x02, 0x58, 0x00, 0x07, 0x02, 0x58, 0x00, 0x17, 0x02, 0x58, 0x00, 0x13, + 0x02, 0x58, 0x00, 0x42, 0x02, 0x58, 0x00, 0x5c, 0x02, 0x58, 0x00, 0xed, + 0x02, 0x58, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x24, 0x02, 0x58, 0x00, 0x00, + 0x02, 0x58, 0x00, 0xca, 0x02, 0x58, 0x00, 0x3c, 0x02, 0x58, 0x00, 0x2e, + 0x02, 0x58, 0x00, 0x2e, 0x02, 0x58, 0x00, 0x00, 0x02, 0x58, 0x00, 0xed, + 0x02, 0x58, 0x00, 0x41, 0x02, 0x58, 0x00, 0x6e, 0x02, 0x58, 0x00, 0x00, + 0x02, 0x58, 0x00, 0x7d, 0x02, 0x58, 0x00, 0x3c, 0x02, 0x58, 0x00, 0x3e, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x58, 0x00, 0x75, 0x00, 0x93, 0x00, 0x70, + 0x00, 0x3e, 0x00, 0x96, 0x00, 0x8a, 0x00, 0xe4, 0x00, 0x41, 0x00, 0x14, + 0x00, 0xc3, 0x00, 0xbe, 0x00, 0xa4, 0x00, 0x77, 0x00, 0x32, 0x00, 0x01, + 0x00, 0x01, 0x00, 0x01, 0x00, 0x49, 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, + 0x00, 0x05, 0x00, 0x05, 0x00, 0x05, 0xff, 0xfc, 0x00, 0x29, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x4b, 0x00, 0x4b, 0x00, 0x4b, + 0x00, 0x4b, 0x00, 0x0a, 0x00, 0x3d, 0x00, 0x1b, 0x00, 0x1b, 0x00, 0x1b, + 0x00, 0x1b, 0x00, 0x1b, 0x00, 0x46, 0x00, 0x13, 0x00, 0x37, 0x00, 0x37, + 0x00, 0x37, 0x00, 0x37, 0x00, 0x04, 0x00, 0x4c, 0x00, 0x3c, 0x00, 0x34, + 0x00, 0x34, 0x00, 0x34, 0x00, 0x34, 0x00, 0x34, 0x00, 0x34, 0x00, 0x04, + 0x00, 0x3c, 0x00, 0x32, 0x00, 0x32, 0x00, 0x32, 0x00, 0x32, 0x00, 0x5e, + 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x5e, 0x00, 0x28, 0x00, 0x41, 0x00, 0x29, + 0x00, 0x29, 0x00, 0x29, 0x00, 0x29, 0x00, 0x29, 0x00, 0x3e, 0x00, 0x17, + 0x00, 0x3d, 0x00, 0x3d, 0x00, 0x3d, 0x00, 0x3d, 0x00, 0x13, 0x00, 0x3b, + 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x1c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, + 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x38, + 0x00, 0x00, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x0d, 0x00, 0x7e, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0d, 0x00, 0x20, 0x00, 0xa0, 0xff, 0xff, 0x00, 0x01, 0xff, 0xf5, + 0xff, 0xe3, 0xff, 0xc2, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, + 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, + 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, + 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, + 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, + 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, + 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x00, 0x86, 0x87, 0x89, 0x8b, 0x93, 0x98, + 0x9e, 0xa3, 0xa2, 0xa4, 0xa6, 0xa5, 0xa7, 0xa9, 0xab, 0xaa, 0xac, 0xad, + 0xaf, 0xae, 0xb0, 0xb1, 0xb3, 0xb5, 0xb4, 0xb6, 0xb8, 0xb7, 0xbc, 0xbb, + 0xbd, 0xbe, 0x00, 0x72, 0x64, 0x65, 0x69, 0x00, 0x78, 0xa1, 0x70, 0x6b, + 0x00, 0x76, 0x6a, 0x00, 0x88, 0x9a, 0x00, 0x73, 0x00, 0x00, 0x67, 0x77, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x7c, 0x00, 0xa8, 0xba, 0x81, 0x63, + 0x6e, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x7d, 0x00, 0x62, 0x82, 0x85, 0x97, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb9, 0x00, 0xc1, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x84, + 0x8c, 0x83, 0x8d, 0x8a, 0x8f, 0x90, 0x91, 0x8e, 0x95, 0x96, 0x00, 0x94, + 0x9c, 0x9d, 0x9b, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x7a, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x2c, 0x4b, 0xb8, 0x00, 0x09, + 0x50, 0x58, 0xb1, 0x01, 0x01, 0x8e, 0x59, 0xb8, 0x01, 0xff, 0x85, 0xb8, + 0x00, 0x44, 0x1d, 0xb9, 0x00, 0x09, 0x00, 0x03, 0x5f, 0x5e, 0x2d, 0xb8, + 0x00, 0x01, 0x2c, 0x20, 0x20, 0x45, 0x69, 0x44, 0xb0, 0x01, 0x60, 0x2d, + 0xb8, 0x00, 0x02, 0x2c, 0xb8, 0x00, 0x01, 0x2a, 0x21, 0x2d, 0xb8, 0x00, + 0x03, 0x2c, 0x20, 0x46, 0xb0, 0x03, 0x25, 0x46, 0x52, 0x58, 0x23, 0x59, + 0x20, 0x8a, 0x20, 0x8a, 0x49, 0x64, 0x8a, 0x20, 0x46, 0x20, 0x68, 0x61, + 0x64, 0xb0, 0x04, 0x25, 0x46, 0x20, 0x68, 0x61, 0x64, 0x52, 0x58, 0x23, + 0x65, 0x8a, 0x59, 0x2f, 0x20, 0xb0, 0x00, 0x53, 0x58, 0x69, 0x20, 0xb0, + 0x00, 0x54, 0x58, 0x21, 0xb0, 0x40, 0x59, 0x1b, 0x69, 0x20, 0xb0, 0x00, + 0x54, 0x58, 0x21, 0xb0, 0x40, 0x65, 0x59, 0x59, 0x3a, 0x2d, 0xb8, 0x00, + 0x04, 0x2c, 0x20, 0x46, 0xb0, 0x04, 0x25, 0x46, 0x52, 0x58, 0x23, 0x8a, + 0x59, 0x20, 0x46, 0x20, 0x6a, 0x61, 0x64, 0xb0, 0x04, 0x25, 0x46, 0x20, + 0x6a, 0x61, 0x64, 0x52, 0x58, 0x23, 0x8a, 0x59, 0x2f, 0xfd, 0x2d, 0xb8, + 0x00, 0x05, 0x2c, 0x4b, 0x20, 0xb0, 0x03, 0x26, 0x50, 0x58, 0x51, 0x58, + 0xb0, 0x80, 0x44, 0x1b, 0xb0, 0x40, 0x44, 0x59, 0x1b, 0x21, 0x21, 0x20, + 0x45, 0xb0, 0xc0, 0x50, 0x58, 0xb0, 0xc0, 0x44, 0x1b, 0x21, 0x59, 0x59, + 0x2d, 0xb8, 0x00, 0x06, 0x2c, 0x20, 0x20, 0x45, 0x69, 0x44, 0xb0, 0x01, + 0x60, 0x20, 0x20, 0x45, 0x7d, 0x69, 0x18, 0x44, 0xb0, 0x01, 0x60, 0x2d, + 0xb8, 0x00, 0x07, 0x2c, 0xb8, 0x00, 0x06, 0x2a, 0x2d, 0xb8, 0x00, 0x08, + 0x2c, 0x4b, 0x20, 0xb0, 0x03, 0x26, 0x53, 0x58, 0xb0, 0x40, 0x1b, 0xb0, + 0x00, 0x59, 0x8a, 0x8a, 0x20, 0xb0, 0x03, 0x26, 0x53, 0x58, 0x23, 0x21, + 0xb0, 0x80, 0x8a, 0x8a, 0x1b, 0x8a, 0x23, 0x59, 0x20, 0xb0, 0x03, 0x26, + 0x53, 0x58, 0x23, 0x21, 0xb8, 0x00, 0xc0, 0x8a, 0x8a, 0x1b, 0x8a, 0x23, + 0x59, 0x20, 0xb0, 0x03, 0x26, 0x53, 0x58, 0x23, 0x21, 0xb8, 0x01, 0x00, + 0x8a, 0x8a, 0x1b, 0x8a, 0x23, 0x59, 0x20, 0xb0, 0x03, 0x26, 0x53, 0x58, + 0x23, 0x21, 0xb8, 0x01, 0x40, 0x8a, 0x8a, 0x1b, 0x8a, 0x23, 0x59, 0x20, + 0xb8, 0x00, 0x03, 0x26, 0x53, 0x58, 0xb0, 0x03, 0x25, 0x45, 0xb8, 0x01, + 0x80, 0x50, 0x58, 0x23, 0x21, 0xb8, 0x01, 0x80, 0x23, 0x21, 0x1b, 0xb0, + 0x03, 0x25, 0x45, 0x23, 0x21, 0x23, 0x21, 0x59, 0x1b, 0x21, 0x59, 0x44, + 0x2d, 0xb8, 0x00, 0x09, 0x2c, 0x4b, 0x53, 0x58, 0x45, 0x44, 0x1b, 0x21, + 0x21, 0x59, 0x2d, 0x00, 0xb8, 0x00, 0x00, 0x2b, 0x00, 0xba, 0x00, 0x01, + 0x00, 0x0e, 0x00, 0x02, 0x2b, 0x01, 0xba, 0x00, 0x0f, 0x00, 0x02, 0x00, + 0x02, 0x2b, 0x01, 0xbf, 0x00, 0x0f, 0x00, 0x25, 0x00, 0x1e, 0x00, 0x18, + 0x00, 0x11, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, 0x10, + 0x00, 0x25, 0x00, 0x1e, 0x00, 0x18, 0x00, 0x11, 0x00, 0x0a, 0x00, 0x00, + 0x00, 0x08, 0x2b, 0x00, 0xbf, 0x00, 0x01, 0x00, 0x45, 0x00, 0x39, 0x00, + 0x29, 0x00, 0x1b, 0x00, 0x11, 0x00, 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, + 0x02, 0x00, 0x39, 0x00, 0x30, 0x00, 0x27, 0x00, 0x1b, 0x00, 0x0f, 0x00, + 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, 0x03, 0x00, 0x2f, 0x00, 0x27, 0x00, + 0x1f, 0x00, 0x17, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, + 0x04, 0x00, 0x68, 0x00, 0x55, 0x00, 0x43, 0x00, 0x26, 0x00, 0x17, 0x00, + 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, 0x05, 0x00, 0x54, 0x00, 0x51, 0x00, + 0x36, 0x00, 0x2a, 0x00, 0x21, 0x00, 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, + 0x06, 0x00, 0x34, 0x00, 0x2b, 0x00, 0x21, 0x00, 0x16, 0x00, 0x0e, 0x00, + 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, 0x07, 0x00, 0x21, 0x00, 0x1b, 0x00, + 0x17, 0x00, 0x0f, 0x00, 0x09, 0x00, 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, + 0x08, 0x00, 0x54, 0x00, 0x3c, 0x00, 0x1d, 0x00, 0x17, 0x00, 0x13, 0x00, + 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, 0x09, 0x00, 0x30, 0x00, 0x27, 0x00, + 0x1e, 0x00, 0x16, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, + 0x0a, 0x00, 0x1c, 0x00, 0x17, 0x00, 0x12, 0x00, 0x0d, 0x00, 0x08, 0x00, + 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, 0x0b, 0x00, 0x83, 0x00, 0x6c, 0x00, + 0x54, 0x00, 0x3c, 0x00, 0x24, 0x00, 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, + 0x0c, 0x00, 0x4b, 0x00, 0x3d, 0x00, 0x30, 0x00, 0x21, 0x00, 0x12, 0x00, + 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, 0x0d, 0x00, 0x2b, 0x00, 0x27, 0x00, + 0x1e, 0x00, 0x16, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, + 0x0e, 0x00, 0x23, 0x00, 0x1d, 0x00, 0x17, 0x00, 0x10, 0x00, 0x0a, 0x00, + 0x00, 0x00, 0x08, 0x2b, 0x00, 0xba, 0x00, 0x11, 0x00, 0x0a, 0x00, 0x07, + 0x2b, 0xb8, 0x00, 0x00, 0x20, 0x45, 0x7d, 0x69, 0x18, 0x44, 0xba, 0x00, + 0x40, 0x00, 0x15, 0x00, 0x01, 0x74, 0xba, 0x00, 0x10, 0x00, 0x15, 0x00, + 0x01, 0x74, 0xba, 0x00, 0x3f, 0x00, 0x15, 0x00, 0x01, 0x74, 0xba, 0x00, + 0x70, 0x00, 0x15, 0x00, 0x01, 0x74, 0xba, 0x00, 0xa0, 0x00, 0x15, 0x00, + 0x01, 0x74, 0xba, 0x00, 0x10, 0x00, 0x15, 0x00, 0x01, 0x75, 0xba, 0x00, + 0x3f, 0x00, 0x15, 0x00, 0x01, 0x75, 0xba, 0x00, 0x40, 0x00, 0x15, 0x00, + 0x01, 0x75, 0xba, 0x00, 0x3f, 0x00, 0x17, 0x00, 0x01, 0x74, 0xba, 0x00, + 0x40, 0x00, 0x17, 0x00, 0x01, 0x74, 0xba, 0x00, 0x70, 0x00, 0x17, 0x00, + 0x01, 0x74, 0xba, 0x00, 0x9f, 0x00, 0x17, 0x00, 0x01, 0x74, 0xba, 0x00, + 0xa0, 0x00, 0x17, 0x00, 0x01, 0x74, 0xba, 0x00, 0xcf, 0x00, 0x17, 0x00, + 0x01, 0x74, 0xba, 0x00, 0x6f, 0x00, 0x19, 0x00, 0x01, 0x74, 0xba, 0x00, + 0x60, 0x00, 0x1b, 0x00, 0x01, 0x73, 0xba, 0x00, 0x6f, 0x00, 0x1b, 0x00, + 0x01, 0x75, 0xba, 0x00, 0x0f, 0x00, 0x1b, 0x00, 0x01, 0x75, 0xba, 0x00, + 0x9f, 0x00, 0x1b, 0x00, 0x01, 0x75, 0xba, 0x00, 0x6f, 0x00, 0x1b, 0x00, + 0x01, 0x74, 0xba, 0x00, 0x70, 0x00, 0x23, 0x00, 0x01, 0x73, 0xba, 0x00, + 0x3f, 0x00, 0x23, 0x00, 0x01, 0x74, 0xba, 0x00, 0x40, 0x00, 0x23, 0x00, + 0x01, 0x74, 0x00, 0x00, 0x00, 0x17, 0x00, 0x50, 0x00, 0x5c, 0x00, 0x7b, + 0x00, 0x35, 0x00, 0x48, 0x00, 0x6b, 0x00, 0xa9, 0x00, 0x42, 0x00, 0x74, + 0x00, 0xc9, 0x00, 0x2a, 0x00, 0x4a, 0x00, 0x79, 0x00, 0x9e, 0x00, 0x96, + 0x00, 0x98, 0x00, 0x00, 0x00, 0x0c, 0xff, 0x38, 0x00, 0x0c, 0x01, 0x49, + 0x00, 0x06, 0x01, 0x6b, 0x00, 0x06, 0x01, 0x4f, 0x00, 0x06, 0x01, 0x71, + 0x00, 0x06, 0x02, 0x04, 0x00, 0x0c, 0x02, 0xba, 0x00, 0x0c, 0x02, 0xe4, + 0x00, 0x0c, 0x02, 0x18, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x4e, 0x00, 0xc2, + 0x01, 0x64, 0x02, 0x1e, 0x02, 0xd6, 0x02, 0xf2, 0x03, 0x22, 0x03, 0x52, + 0x03, 0x78, 0x03, 0xa0, 0x03, 0xb8, 0x03, 0xd0, 0x03, 0xf4, 0x04, 0x0e, + 0x04, 0x96, 0x04, 0xda, 0x05, 0x34, 0x05, 0xc0, 0x06, 0x0c, 0x06, 0x82, + 0x06, 0xf6, 0x07, 0x2c, 0x07, 0xee, 0x08, 0x62, 0x08, 0x6e, 0x08, 0x7a, + 0x08, 0x98, 0x08, 0xc4, 0x08, 0xe2, 0x09, 0x48, 0x09, 0xe0, 0x0a, 0x2c, + 0x0a, 0x98, 0x0a, 0xea, 0x0b, 0x30, 0x0b, 0x72, 0x0b, 0xae, 0x0c, 0x22, + 0x0c, 0x86, 0x0c, 0xc0, 0x0d, 0x02, 0x0d, 0x50, 0x0d, 0x7a, 0x0d, 0xd2, + 0x0e, 0x1a, 0x0e, 0x64, 0x0e, 0xb4, 0x0f, 0x16, 0x0f, 0x78, 0x0f, 0xe8, + 0x10, 0x1a, 0x10, 0x66, 0x10, 0x9e, 0x10, 0xfc, 0x11, 0x58, 0x11, 0x9c, + 0x11, 0xdc, 0x12, 0x02, 0x12, 0x1c, 0x12, 0x42, 0x12, 0x66, 0x12, 0x7e, + 0x12, 0xa2, 0x13, 0x22, 0x13, 0x98, 0x13, 0xea, 0x14, 0x64, 0x14, 0xd2, + 0x15, 0x2a, 0x16, 0x06, 0x16, 0x64, 0x16, 0xbc, 0x17, 0x10, 0x17, 0x5c, + 0x17, 0x94, 0x18, 0x1c, 0x18, 0x78, 0x18, 0xcc, 0x19, 0x42, 0x19, 0xbc, + 0x1a, 0x18, 0x1a, 0x8e, 0x1a, 0xde, 0x1b, 0x38, 0x1b, 0x70, 0x1b, 0xcc, + 0x1c, 0x28, 0x1c, 0x72, 0x1c, 0xb2, 0x1d, 0x26, 0x1d, 0x3e, 0x1d, 0xb4, + 0x1e, 0x04, 0x1e, 0x04, 0x1e, 0x3e, 0x1e, 0xb2, 0x1f, 0x20, 0x1f, 0xb0, + 0x20, 0x0c, 0x20, 0x34, 0x20, 0xe6, 0x21, 0x46, 0x21, 0xe4, 0x22, 0x66, + 0x22, 0x84, 0x22, 0xa0, 0x22, 0xa0, 0x23, 0x70, 0x23, 0x8a, 0x23, 0xd8, + 0x24, 0x14, 0x24, 0x6e, 0x24, 0xfc, 0x25, 0x20, 0x25, 0x8a, 0x25, 0xc2, + 0x25, 0xe6, 0x26, 0x30, 0x26, 0x74, 0x26, 0xc8, 0x26, 0xe6, 0x27, 0x1e, + 0x27, 0x68, 0x27, 0xc4, 0x28, 0x20, 0x28, 0x42, 0x28, 0x66, 0x28, 0x8e, + 0x28, 0xce, 0x29, 0x0c, 0x29, 0x54, 0x29, 0xbc, 0x2a, 0x4c, 0x2a, 0x6c, + 0x2a, 0x8c, 0x2a, 0xb0, 0x2a, 0xec, 0x2b, 0x0a, 0x2b, 0x28, 0x2b, 0x4a, + 0x2b, 0x84, 0x2b, 0xac, 0x2b, 0xea, 0x2c, 0x1a, 0x2c, 0x4a, 0x2c, 0x7e, + 0x2c, 0xcc, 0x2d, 0x18, 0x2d, 0x4a, 0x2d, 0xda, 0x2e, 0x0a, 0x2e, 0x3a, + 0x2e, 0x70, 0x2e, 0xbc, 0x2e, 0xdc, 0x2f, 0x34, 0x2f, 0xa8, 0x2f, 0xb4, + 0x2f, 0xc0, 0x30, 0x0a, 0x30, 0x6c, 0x30, 0x78, 0x30, 0xe2, 0x31, 0xac, + 0x32, 0x3a, 0x32, 0x46, 0x32, 0x52, 0x32, 0x94, 0x32, 0xa0, 0x32, 0xbc, + 0x32, 0xd8, 0x32, 0xfa, 0x33, 0x32, 0x33, 0xc6, 0x34, 0x14, 0x34, 0x20, + 0x34, 0x2c, 0x34, 0x6a, 0x34, 0xc2, 0x34, 0xce, 0x35, 0x20, 0x35, 0xb6, + 0x35, 0xc2, 0x35, 0xce, 0x36, 0x00, 0x36, 0x0c, 0x36, 0x18, 0x36, 0x90, + 0x36, 0x9c, 0x00, 0x00, 0x00, 0x02, 0x00, 0xca, 0xff, 0xf4, 0x01, 0x8e, + 0x02, 0xba, 0x00, 0x05, 0x00, 0x13, 0x00, 0x43, 0xba, 0x00, 0x06, 0x00, + 0x14, 0x00, 0x15, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x06, 0x10, 0xb8, 0x00, + 0x00, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x02, 0x2f, + 0x1b, 0xb9, 0x00, 0x02, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, 0x11, 0x3e, + 0x59, 0xb9, 0x00, 0x0d, 0x00, 0x0a, 0xf4, 0xb9, 0x00, 0x05, 0x00, 0x08, + 0xf4, 0x30, 0x31, 0x25, 0x27, 0x35, 0x33, 0x15, 0x0f, 0x01, 0x22, 0x26, + 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x01, + 0x14, 0x39, 0xa2, 0x39, 0x18, 0x36, 0x2c, 0x2d, 0x35, 0x35, 0x2d, 0x2c, + 0xf3, 0xfc, 0xcb, 0xcb, 0xfc, 0xff, 0x2e, 0x20, 0x20, 0x1f, 0x2e, 0x2e, + 0x1f, 0x20, 0x20, 0x2e, 0xff, 0xff, 0x00, 0x7a, 0x01, 0x9e, 0x01, 0xdf, + 0x02, 0xe4, 0x12, 0x26, 0x00, 0x0a, 0x90, 0x00, 0x10, 0x06, 0x00, 0x0a, + 0x71, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x09, 0x00, 0x00, 0x02, 0x4f, + 0x02, 0xba, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x9d, 0xba, 0x00, 0x17, 0x00, + 0x18, 0x00, 0x19, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x17, 0x10, 0xb8, 0x00, + 0x09, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, + 0x1b, 0xb9, 0x00, 0x08, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x0c, 0x2f, 0x1b, 0xb9, 0x00, 0x0c, 0x00, 0x1f, 0x3e, + 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0b, 0x2f, 0x1b, 0xb9, + 0x00, 0x0b, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x17, 0x2f, 0x1b, 0xb9, 0x00, 0x17, 0x00, 0x11, 0x3e, 0x59, 0xba, + 0x00, 0x03, 0x00, 0x08, 0x00, 0x0b, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x03, + 0x2f, 0xb9, 0x00, 0x00, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x04, 0x00, 0x08, + 0x00, 0x0b, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x04, 0x2f, 0xb9, 0x00, 0x07, + 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x0e, 0xd0, 0xb8, 0x00, 0x04, 0x10, 0xb8, + 0x00, 0x11, 0xd0, 0xb8, 0x00, 0x03, 0x10, 0xb8, 0x00, 0x12, 0xd0, 0xb8, + 0x00, 0x00, 0x10, 0xb8, 0x00, 0x15, 0xd0, 0x30, 0x31, 0x37, 0x23, 0x35, + 0x33, 0x37, 0x23, 0x35, 0x33, 0x37, 0x33, 0x03, 0x23, 0x01, 0x33, 0x07, + 0x33, 0x15, 0x23, 0x07, 0x33, 0x15, 0x23, 0x07, 0x23, 0x75, 0x6c, 0x80, + 0x0f, 0x69, 0x7d, 0x22, 0x75, 0x7b, 0x75, 0x01, 0x3d, 0x75, 0x22, 0x6c, + 0x80, 0x0f, 0x69, 0x7d, 0x22, 0x75, 0xc2, 0x6e, 0x5a, 0x6e, 0xc2, 0xfd, + 0x46, 0x02, 0xba, 0xc2, 0x6e, 0x5a, 0x6e, 0xc2, 0x00, 0x03, 0x00, 0x1e, + 0xff, 0x8f, 0x02, 0x38, 0x03, 0x2b, 0x00, 0x24, 0x00, 0x2b, 0x00, 0x32, + 0x00, 0xa7, 0xba, 0x00, 0x07, 0x00, 0x33, 0x00, 0x34, 0x11, 0x12, 0x39, + 0xb8, 0x00, 0x07, 0x10, 0xb8, 0x00, 0x28, 0xd0, 0xb8, 0x00, 0x07, 0x10, + 0xb8, 0x00, 0x30, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x0f, 0x2f, 0x1b, 0xb9, 0x00, 0x0f, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, + 0x11, 0x3e, 0x59, 0xb9, 0x00, 0x07, 0x00, 0x0d, 0xf4, 0xb8, 0x00, 0x0f, + 0x10, 0xb9, 0x00, 0x29, 0x00, 0x0d, 0xf4, 0xba, 0x00, 0x08, 0x00, 0x29, + 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0f, 0x10, 0xb8, 0x00, 0x11, + 0xdc, 0xb8, 0x00, 0x0f, 0x10, 0xb8, 0x00, 0x12, 0xd0, 0xb8, 0x00, 0x29, + 0x10, 0xb8, 0x00, 0x18, 0xd0, 0xb8, 0x00, 0x07, 0x10, 0xb8, 0x00, 0x30, + 0xd0, 0xba, 0x00, 0x19, 0x00, 0x12, 0x00, 0x30, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x00, 0x10, 0xb8, 0x00, 0x22, 0xd0, 0xb8, 0x00, 0x00, 0x10, 0xb8, + 0x00, 0x23, 0xdc, 0xba, 0x00, 0x28, 0x00, 0x0f, 0x00, 0x07, 0x11, 0x12, + 0x39, 0xba, 0x00, 0x2f, 0x00, 0x18, 0x00, 0x22, 0x11, 0x12, 0x39, 0x30, + 0x31, 0x17, 0x2e, 0x01, 0x27, 0x37, 0x1e, 0x01, 0x17, 0x35, 0x27, 0x2e, + 0x01, 0x35, 0x34, 0x36, 0x37, 0x35, 0x33, 0x15, 0x1e, 0x01, 0x17, 0x07, + 0x26, 0x27, 0x15, 0x17, 0x1e, 0x01, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x15, + 0x23, 0x03, 0x14, 0x16, 0x17, 0x35, 0x0e, 0x01, 0x13, 0x34, 0x26, 0x27, + 0x15, 0x3e, 0x01, 0xfd, 0x4b, 0x71, 0x23, 0x57, 0x20, 0x49, 0x29, 0x17, + 0x60, 0x5c, 0x68, 0x61, 0x72, 0x3f, 0x59, 0x1e, 0x56, 0x2a, 0x40, 0x17, + 0x60, 0x5c, 0x1b, 0x33, 0x4b, 0x30, 0x72, 0x3c, 0x21, 0x25, 0x25, 0x21, + 0xeb, 0x22, 0x25, 0x24, 0x23, 0x0a, 0x06, 0x37, 0x2d, 0x5f, 0x22, 0x26, + 0x06, 0xb8, 0x04, 0x11, 0x6b, 0x4d, 0x55, 0x6a, 0x0d, 0x69, 0x68, 0x08, + 0x30, 0x23, 0x60, 0x2e, 0x0e, 0xa7, 0x04, 0x12, 0x67, 0x4c, 0x29, 0x48, + 0x38, 0x27, 0x09, 0x6c, 0x02, 0x6c, 0x20, 0x21, 0x0a, 0x97, 0x06, 0x26, + 0xfe, 0xaf, 0x22, 0x22, 0x09, 0xa5, 0x08, 0x2d, 0x00, 0x06, 0x00, 0x02, + 0xff, 0xf4, 0x02, 0x56, 0x02, 0xc6, 0x00, 0x0b, 0x00, 0x19, 0x00, 0x1d, + 0x00, 0x21, 0x00, 0x2d, 0x00, 0x3b, 0x00, 0xc5, 0xba, 0x00, 0x25, 0x00, + 0x3c, 0x00, 0x3d, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x25, 0x10, 0xb8, 0x00, + 0x09, 0xd0, 0xb8, 0x00, 0x25, 0x10, 0xb8, 0x00, 0x0f, 0xd0, 0xb8, 0x00, + 0x25, 0x10, 0xb8, 0x00, 0x1d, 0xd0, 0xb8, 0x00, 0x25, 0x10, 0xb8, 0x00, + 0x1f, 0xd0, 0xb8, 0x00, 0x25, 0x10, 0xb8, 0x00, 0x39, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, + 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x1a, + 0x2f, 0x1b, 0xb9, 0x00, 0x1a, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x21, 0x2f, 0x1b, 0xb9, 0x00, 0x21, 0x00, 0x11, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x22, 0x2f, 0x1b, + 0xb9, 0x00, 0x22, 0x00, 0x11, 0x3e, 0x59, 0xba, 0x00, 0x00, 0x00, 0x21, + 0x00, 0x06, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x00, 0x2f, 0xb9, 0x00, 0x0c, + 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x06, 0x10, 0xb9, 0x00, 0x13, 0x00, 0x09, + 0xf4, 0xba, 0x00, 0x28, 0x00, 0x1a, 0x00, 0x22, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x28, 0x2f, 0xb8, 0x00, 0x1c, 0xdc, 0xb8, 0x00, 0x00, 0x10, 0xb8, + 0x00, 0x1e, 0xdc, 0xb8, 0x00, 0x22, 0x10, 0xb9, 0x00, 0x2e, 0x00, 0x09, + 0xf4, 0xb8, 0x00, 0x28, 0x10, 0xb9, 0x00, 0x35, 0x00, 0x09, 0xf4, 0x30, + 0x31, 0x13, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, + 0x06, 0x27, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, + 0x01, 0x14, 0x16, 0x01, 0x33, 0x03, 0x23, 0x07, 0x33, 0x03, 0x23, 0x05, + 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x27, + 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, + 0x16, 0xa5, 0x4b, 0x52, 0x52, 0x4b, 0x4b, 0x52, 0x52, 0x4b, 0x1d, 0x17, + 0x17, 0x1d, 0x1d, 0x17, 0x17, 0x01, 0x5d, 0x71, 0x97, 0x71, 0xb5, 0x71, + 0x97, 0x71, 0x01, 0xb2, 0x4b, 0x52, 0x52, 0x4b, 0x4b, 0x52, 0x52, 0x4b, + 0x1d, 0x17, 0x17, 0x1d, 0x1d, 0x17, 0x17, 0x01, 0x52, 0x63, 0x57, 0x57, + 0x63, 0x63, 0x57, 0x57, 0x63, 0x57, 0x2a, 0x23, 0x2c, 0x23, 0x2a, 0x2a, + 0x23, 0x2c, 0x23, 0x2a, 0x01, 0x11, 0xfe, 0xd4, 0x62, 0xfe, 0xd4, 0x0c, + 0x63, 0x57, 0x57, 0x63, 0x63, 0x57, 0x57, 0x63, 0x57, 0x2a, 0x23, 0x2c, + 0x23, 0x2a, 0x2a, 0x23, 0x2c, 0x23, 0x2a, 0x00, 0x00, 0x02, 0x00, 0x0e, + 0xff, 0xf4, 0x02, 0x57, 0x02, 0xc6, 0x00, 0x36, 0x00, 0x41, 0x00, 0xb6, + 0xba, 0x00, 0x22, 0x00, 0x42, 0x00, 0x43, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x22, 0x10, 0xb8, 0x00, 0x3a, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x10, 0x2f, 0x1b, 0xb9, 0x00, 0x10, 0x00, 0x1f, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, + 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x32, 0x2f, 0x1b, 0xb9, 0x00, 0x32, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x10, 0xb9, 0x00, 0x37, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x22, 0x00, + 0x10, 0x00, 0x37, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x10, 0x10, 0xb9, 0x00, + 0x19, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x3b, 0x00, 0x19, 0x00, 0x00, 0x11, + 0x12, 0x39, 0xba, 0x00, 0x08, 0x00, 0x22, 0x00, 0x3b, 0x11, 0x12, 0x39, + 0xba, 0x00, 0x24, 0x00, 0x10, 0x00, 0x37, 0x11, 0x12, 0x39, 0xba, 0x00, + 0x2d, 0x00, 0x10, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x2d, 0x2f, + 0xb9, 0x00, 0x2b, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x33, 0x00, 0x19, 0x00, + 0x00, 0x11, 0x12, 0x39, 0xba, 0x00, 0x30, 0x00, 0x24, 0x00, 0x33, 0x11, + 0x12, 0x39, 0xba, 0x00, 0x3a, 0x00, 0x24, 0x00, 0x33, 0x11, 0x12, 0x39, + 0x30, 0x31, 0x17, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x2e, 0x01, + 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x07, 0x2e, 0x01, + 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x1e, 0x02, 0x1f, 0x02, 0x33, 0x3e, + 0x03, 0x35, 0x33, 0x15, 0x23, 0x0e, 0x01, 0x07, 0x17, 0x23, 0x27, 0x23, + 0x0e, 0x01, 0x27, 0x32, 0x36, 0x37, 0x27, 0x0e, 0x01, 0x1d, 0x01, 0x14, + 0x16, 0xcf, 0x2f, 0x48, 0x31, 0x19, 0x3c, 0x3a, 0x20, 0x21, 0x1d, 0x35, + 0x47, 0x2a, 0x25, 0x40, 0x31, 0x21, 0x08, 0x66, 0x0b, 0x2e, 0x1e, 0x1e, + 0x25, 0x08, 0x14, 0x1f, 0x18, 0x39, 0x30, 0x06, 0x03, 0x04, 0x03, 0x01, + 0xb2, 0x46, 0x05, 0x14, 0x10, 0x82, 0x9e, 0x50, 0x07, 0x07, 0x4e, 0x19, + 0x17, 0x28, 0x0e, 0x81, 0x1a, 0x10, 0x33, 0x0c, 0x21, 0x37, 0x49, 0x29, + 0x3f, 0x5e, 0x22, 0x2d, 0x46, 0x26, 0x25, 0x41, 0x2f, 0x1b, 0x15, 0x22, + 0x2d, 0x18, 0x37, 0x20, 0x25, 0x24, 0x1d, 0x05, 0x0e, 0x19, 0x1f, 0x29, + 0x1e, 0x48, 0x4a, 0x11, 0x29, 0x2b, 0x29, 0x11, 0x6e, 0x20, 0x43, 0x23, + 0x9e, 0x61, 0x33, 0x3a, 0x71, 0x11, 0x17, 0xa4, 0x19, 0x33, 0x1d, 0x02, + 0x30, 0x31, 0x00, 0x00, 0x00, 0x01, 0x00, 0xea, 0x01, 0x9e, 0x01, 0x6e, + 0x02, 0xe4, 0x00, 0x03, 0x00, 0x1e, 0xba, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x05, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x21, 0x3e, 0x59, 0x30, 0x31, + 0x13, 0x11, 0x33, 0x11, 0xea, 0x84, 0x01, 0x9e, 0x01, 0x46, 0xfe, 0xba, + 0x00, 0x01, 0x00, 0xae, 0xff, 0x76, 0x02, 0x12, 0x02, 0xf8, 0x00, 0x16, + 0x00, 0x15, 0xba, 0x00, 0x0c, 0x00, 0x17, 0x00, 0x18, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x05, 0x2f, 0xb8, 0x00, 0x12, 0x2f, 0x30, 0x31, 0x13, + 0x34, 0x3e, 0x02, 0x37, 0x33, 0x0e, 0x03, 0x1d, 0x01, 0x14, 0x1e, 0x02, + 0x17, 0x23, 0x2e, 0x03, 0xae, 0x21, 0x39, 0x4c, 0x2a, 0x94, 0x2f, 0x54, + 0x3f, 0x26, 0x26, 0x3f, 0x54, 0x2f, 0x94, 0x2a, 0x4c, 0x39, 0x21, 0x01, + 0x37, 0x49, 0x87, 0x74, 0x5d, 0x20, 0x20, 0x55, 0x66, 0x74, 0x3f, 0x66, + 0x3f, 0x74, 0x66, 0x55, 0x20, 0x1f, 0x5e, 0x74, 0x87, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x46, 0xff, 0x76, 0x01, 0xaa, 0x02, 0xf8, 0x00, 0x16, + 0x00, 0x15, 0xba, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x18, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x11, 0x2f, 0xb8, 0x00, 0x06, 0x2f, 0x30, 0x31, 0x01, + 0x14, 0x0e, 0x02, 0x07, 0x23, 0x3e, 0x03, 0x3d, 0x01, 0x34, 0x2e, 0x02, + 0x27, 0x33, 0x1e, 0x03, 0x01, 0xaa, 0x21, 0x39, 0x4c, 0x2a, 0x94, 0x2e, + 0x55, 0x3f, 0x26, 0x26, 0x3f, 0x55, 0x2e, 0x94, 0x2a, 0x4c, 0x39, 0x21, + 0x01, 0x37, 0x49, 0x87, 0x74, 0x5e, 0x1f, 0x20, 0x55, 0x66, 0x74, 0x3f, + 0x66, 0x3f, 0x74, 0x66, 0x55, 0x20, 0x20, 0x5d, 0x74, 0x87, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x1e, 0x00, 0x3c, 0x02, 0x3a, 0x02, 0x38, 0x00, 0x0e, + 0x00, 0x11, 0xba, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x10, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x06, 0x2f, 0x30, 0x31, 0x37, 0x27, 0x37, 0x27, 0x37, + 0x17, 0x35, 0x33, 0x15, 0x37, 0x17, 0x07, 0x17, 0x07, 0x27, 0xbf, 0x68, + 0x72, 0xab, 0x27, 0xa7, 0x80, 0xa7, 0x27, 0xab, 0x72, 0x68, 0x6d, 0x3c, + 0x45, 0x96, 0x3a, 0x73, 0x3d, 0xb1, 0xb1, 0x3d, 0x73, 0x3a, 0x96, 0x45, + 0x95, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x3e, 0x00, 0x3e, 0x02, 0x1a, + 0x02, 0x24, 0x00, 0x0b, 0x00, 0x27, 0xba, 0x00, 0x00, 0x00, 0x0c, 0x00, + 0x0d, 0x11, 0x12, 0x39, 0x00, 0xbb, 0x00, 0x02, 0x00, 0x09, 0x00, 0x03, + 0x00, 0x04, 0x2b, 0xb8, 0x00, 0x03, 0x10, 0xb8, 0x00, 0x07, 0xd0, 0xb8, + 0x00, 0x02, 0x10, 0xb8, 0x00, 0x0a, 0xd0, 0x30, 0x31, 0x37, 0x35, 0x23, + 0x35, 0x33, 0x35, 0x33, 0x15, 0x33, 0x15, 0x23, 0x15, 0xec, 0xae, 0xae, + 0x80, 0xae, 0xae, 0x3e, 0xb8, 0x76, 0xb8, 0xb8, 0x76, 0xb8, 0x00, 0x00, + 0x00, 0x01, 0x00, 0xaa, 0xff, 0x69, 0x01, 0xa1, 0x00, 0xae, 0x00, 0x03, + 0x00, 0x15, 0xba, 0x00, 0x02, 0x00, 0x04, 0x00, 0x05, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x2f, 0xb8, 0x00, 0x03, 0x2f, 0x30, 0x31, 0x37, + 0x33, 0x03, 0x23, 0xe3, 0xbe, 0x89, 0x6e, 0xae, 0xfe, 0xbb, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x8c, 0x00, 0xea, 0x01, 0xcc, 0x01, 0x78, 0x00, 0x03, + 0x00, 0x17, 0xba, 0x00, 0x00, 0x00, 0x04, 0x00, 0x05, 0x11, 0x12, 0x39, + 0x00, 0xbb, 0x00, 0x01, 0x00, 0x0d, 0x00, 0x00, 0x00, 0x04, 0x2b, 0x30, + 0x31, 0x37, 0x35, 0x21, 0x15, 0x8c, 0x01, 0x40, 0xea, 0x8e, 0x8e, 0x00, + 0x00, 0x01, 0x00, 0xc3, 0xff, 0xf4, 0x01, 0x95, 0x00, 0xbd, 0x00, 0x0d, + 0x00, 0x17, 0xba, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x0f, 0x11, 0x12, 0x39, + 0x00, 0xbb, 0x00, 0x07, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x04, 0x2b, 0x30, + 0x31, 0x05, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, + 0x01, 0x14, 0x06, 0x01, 0x2c, 0x38, 0x31, 0x31, 0x38, 0x38, 0x31, 0x31, + 0x0c, 0x31, 0x22, 0x23, 0x22, 0x31, 0x31, 0x22, 0x23, 0x22, 0x31, 0x00, + 0x00, 0x01, 0x00, 0x49, 0xff, 0x76, 0x02, 0x0f, 0x02, 0xf8, 0x00, 0x03, + 0x00, 0x15, 0xba, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x01, 0x2f, 0xb8, 0x00, 0x00, 0x2f, 0x30, 0x31, 0x17, + 0x01, 0x33, 0x01, 0x49, 0x01, 0x41, 0x85, 0xfe, 0xbf, 0x8a, 0x03, 0x82, + 0xfc, 0x7e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x1b, 0xff, 0xf4, 0x02, 0x3d, + 0x02, 0xc6, 0x00, 0x0b, 0x00, 0x19, 0x00, 0x27, 0x00, 0x9d, 0xba, 0x00, + 0x00, 0x00, 0x28, 0x00, 0x29, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0c, 0xd0, + 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, 0x1a, 0xd0, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, 0x1f, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb9, 0x00, 0x0c, 0x00, 0x0d, + 0xf4, 0xb8, 0x00, 0x06, 0x10, 0xb9, 0x00, 0x13, 0x00, 0x0d, 0xf4, 0xba, + 0x00, 0x1a, 0x00, 0x13, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x1a, + 0x2f, 0x41, 0x03, 0x00, 0x4f, 0x00, 0x1a, 0x00, 0x01, 0x71, 0x41, 0x05, + 0x00, 0x90, 0x00, 0x1a, 0x00, 0xa0, 0x00, 0x1a, 0x00, 0x02, 0x5d, 0x41, + 0x05, 0x00, 0x20, 0x00, 0x1a, 0x00, 0x30, 0x00, 0x1a, 0x00, 0x02, 0x5d, + 0xb9, 0x00, 0x21, 0x00, 0x07, 0xf4, 0x41, 0x03, 0x00, 0xcf, 0x00, 0x21, + 0x00, 0x01, 0x5d, 0x41, 0x03, 0x00, 0x10, 0x00, 0x21, 0x00, 0x01, 0x71, + 0x41, 0x03, 0x00, 0x00, 0x00, 0x21, 0x00, 0x01, 0x5d, 0x30, 0x31, 0x05, + 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x27, + 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, + 0x16, 0x37, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, + 0x01, 0x14, 0x06, 0x01, 0x2c, 0x8c, 0x85, 0x85, 0x8c, 0x8c, 0x85, 0x85, + 0x8c, 0x43, 0x35, 0x35, 0x43, 0x43, 0x35, 0x35, 0x43, 0x23, 0x1b, 0x1b, + 0x23, 0x23, 0x1b, 0x1b, 0x0c, 0xbe, 0xab, 0xab, 0xbe, 0xbe, 0xab, 0xab, + 0xbe, 0x76, 0x5e, 0x54, 0x82, 0x54, 0x5e, 0x5e, 0x54, 0x82, 0x54, 0x5e, + 0xb8, 0x1c, 0x14, 0x16, 0x14, 0x1c, 0x1c, 0x14, 0x16, 0x14, 0x1c, 0x00, + 0x00, 0x01, 0x00, 0x23, 0x00, 0x00, 0x02, 0x44, 0x02, 0xba, 0x00, 0x0b, + 0x00, 0x5b, 0xba, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x0d, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, 0x1b, 0xb9, + 0x00, 0x08, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb9, + 0x00, 0x01, 0x00, 0x0d, 0xf4, 0xb8, 0x00, 0x08, 0x10, 0xb9, 0x00, 0x04, + 0x00, 0x0d, 0xf4, 0xba, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x06, 0x10, 0xb9, 0x00, 0x05, 0x00, 0x09, 0xf4, 0xb8, + 0x00, 0x01, 0x10, 0xb8, 0x00, 0x09, 0xd0, 0x30, 0x31, 0x33, 0x35, 0x33, + 0x11, 0x23, 0x07, 0x27, 0x37, 0x33, 0x11, 0x33, 0x15, 0x5e, 0xbc, 0x09, + 0x8e, 0x60, 0xa7, 0xe6, 0x94, 0x79, 0x01, 0xd4, 0xba, 0x4b, 0xdc, 0xfd, + 0xbf, 0x79, 0x00, 0x00, 0x00, 0x01, 0x00, 0x26, 0x00, 0x00, 0x02, 0x2b, + 0x02, 0xc6, 0x00, 0x1f, 0x00, 0x53, 0xba, 0x00, 0x13, 0x00, 0x20, 0x00, + 0x21, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x13, 0x2f, 0x1b, 0xb9, 0x00, 0x13, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, + 0x11, 0x3e, 0x59, 0xb9, 0x00, 0x1e, 0x00, 0x0d, 0xf4, 0xba, 0x00, 0x03, + 0x00, 0x13, 0x00, 0x1e, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x13, 0x10, 0xb9, + 0x00, 0x0a, 0x00, 0x0d, 0xf4, 0xba, 0x00, 0x1d, 0x00, 0x0a, 0x00, 0x01, + 0x11, 0x12, 0x39, 0x30, 0x31, 0x29, 0x01, 0x35, 0x37, 0x3e, 0x01, 0x3d, + 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x03, 0x33, 0x32, + 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x0f, 0x01, 0x21, 0x02, 0x2b, 0xfe, + 0x0a, 0xdc, 0x39, 0x32, 0x34, 0x2c, 0x32, 0x36, 0x0b, 0x83, 0x0c, 0x2a, + 0x41, 0x56, 0x38, 0x39, 0x5a, 0x3e, 0x20, 0x1d, 0x33, 0x45, 0x27, 0x85, + 0x01, 0x50, 0x89, 0xb7, 0x31, 0x48, 0x28, 0x0a, 0x2c, 0x2d, 0x3a, 0x28, + 0x32, 0x24, 0x41, 0x30, 0x1d, 0x20, 0x38, 0x4d, 0x2d, 0x2c, 0x49, 0x40, + 0x3c, 0x1e, 0x67, 0x00, 0x00, 0x01, 0x00, 0x18, 0xff, 0xf4, 0x02, 0x2b, + 0x02, 0xc6, 0x00, 0x35, 0x00, 0x80, 0xba, 0x00, 0x10, 0x00, 0x36, 0x00, + 0x37, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x10, 0x2f, 0x1b, 0xb9, 0x00, 0x10, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x23, 0x2f, 0x1b, 0xb9, 0x00, 0x23, 0x00, + 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x10, 0x10, 0xb9, 0x00, 0x07, 0x00, 0x0d, + 0xf4, 0xba, 0x00, 0x34, 0x00, 0x10, 0x00, 0x23, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x34, 0x2f, 0x41, 0x03, 0x00, 0xcf, 0x00, 0x34, 0x00, 0x01, 0x5d, + 0x41, 0x03, 0x00, 0x5f, 0x00, 0x34, 0x00, 0x01, 0x5d, 0x41, 0x05, 0x00, + 0x2f, 0x00, 0x34, 0x00, 0x3f, 0x00, 0x34, 0x00, 0x02, 0x5d, 0xb9, 0x00, + 0x35, 0x00, 0x0d, 0xf4, 0xba, 0x00, 0x1a, 0x00, 0x35, 0x00, 0x34, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x23, 0x10, 0xb9, 0x00, 0x2c, 0x00, 0x0d, 0xf4, + 0x30, 0x31, 0x01, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, + 0x07, 0x27, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, + 0x07, 0x15, 0x1e, 0x01, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, + 0x27, 0x37, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x2b, + 0x01, 0x35, 0x01, 0x11, 0x3a, 0x35, 0x33, 0x2f, 0x2b, 0x4b, 0x1a, 0x5f, + 0x14, 0x30, 0x3a, 0x49, 0x2e, 0x39, 0x5c, 0x41, 0x24, 0x16, 0x25, 0x31, + 0x1c, 0x40, 0x55, 0x27, 0x47, 0x65, 0x3e, 0x35, 0x51, 0x3e, 0x2d, 0x11, + 0x6f, 0x17, 0x45, 0x3a, 0x36, 0x3a, 0x42, 0x3b, 0x41, 0x01, 0xa6, 0x2c, + 0x20, 0x07, 0x26, 0x2d, 0x2b, 0x28, 0x58, 0x1a, 0x2b, 0x1f, 0x11, 0x1a, + 0x31, 0x44, 0x2a, 0x21, 0x36, 0x28, 0x19, 0x05, 0x06, 0x0b, 0x55, 0x48, + 0x2f, 0x4c, 0x36, 0x1d, 0x16, 0x25, 0x31, 0x1a, 0x56, 0x2b, 0x37, 0x32, + 0x2c, 0x07, 0x2b, 0x2b, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x19, + 0x00, 0x00, 0x02, 0x3d, 0x02, 0xba, 0x00, 0x0a, 0x00, 0x0e, 0x00, 0x5f, + 0xba, 0x00, 0x04, 0x00, 0x0f, 0x00, 0x10, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x04, 0x10, 0xb8, 0x00, 0x0e, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1f, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, + 0x00, 0x00, 0x11, 0x3e, 0x59, 0xba, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x01, 0x2f, 0xb9, 0x00, 0x0c, 0x00, 0x09, + 0xf4, 0xb8, 0x00, 0x06, 0xd0, 0xb8, 0x00, 0x01, 0x10, 0xb8, 0x00, 0x09, + 0xd0, 0xb8, 0x00, 0x05, 0x10, 0xb8, 0x00, 0x0d, 0xd0, 0x30, 0x31, 0x21, + 0x35, 0x21, 0x35, 0x01, 0x33, 0x11, 0x33, 0x15, 0x23, 0x15, 0x25, 0x33, + 0x11, 0x23, 0x01, 0x53, 0xfe, 0xc6, 0x01, 0x16, 0xb4, 0x5a, 0x5a, 0xfe, + 0xaf, 0xc1, 0x09, 0x86, 0x80, 0x01, 0xb4, 0xfe, 0x40, 0x74, 0x86, 0xfa, + 0x01, 0x25, 0x00, 0x00, 0x00, 0x01, 0x00, 0x2a, 0xff, 0xf4, 0x02, 0x37, + 0x02, 0xba, 0x00, 0x2a, 0x00, 0x6d, 0xba, 0x00, 0x24, 0x00, 0x2b, 0x00, + 0x2c, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x29, 0x2f, 0x1b, 0xb9, 0x00, 0x29, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x12, 0x2f, 0x1b, 0xb9, 0x00, 0x12, 0x00, + 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x29, 0x10, 0xb9, 0x00, 0x01, 0x00, 0x0d, + 0xf4, 0xba, 0x00, 0x24, 0x00, 0x12, 0x00, 0x29, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x24, 0x2f, 0x41, 0x03, 0x00, 0xcf, 0x00, 0x24, 0x00, 0x01, 0x5d, + 0x41, 0x05, 0x00, 0x4f, 0x00, 0x24, 0x00, 0x5f, 0x00, 0x24, 0x00, 0x02, + 0x5d, 0xb9, 0x00, 0x08, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x12, 0x10, 0xb9, + 0x00, 0x1d, 0x00, 0x0d, 0xf4, 0x30, 0x31, 0x01, 0x21, 0x07, 0x33, 0x3e, + 0x03, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, + 0x02, 0x27, 0x37, 0x1e, 0x03, 0x33, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, + 0x23, 0x22, 0x06, 0x07, 0x27, 0x13, 0x21, 0x02, 0x0d, 0xfe, 0xbd, 0x10, + 0x09, 0x0b, 0x1c, 0x26, 0x32, 0x20, 0x2b, 0x4d, 0x3b, 0x22, 0x24, 0x45, + 0x66, 0x41, 0x33, 0x50, 0x3d, 0x2d, 0x10, 0x6d, 0x0c, 0x1b, 0x23, 0x2b, + 0x1c, 0x38, 0x39, 0x3a, 0x33, 0x2a, 0x37, 0x0e, 0x7b, 0x1a, 0x01, 0xb1, + 0x02, 0x37, 0xdd, 0x18, 0x29, 0x1d, 0x10, 0x1e, 0x39, 0x53, 0x34, 0x35, + 0x5a, 0x42, 0x25, 0x16, 0x25, 0x31, 0x1a, 0x56, 0x14, 0x24, 0x1b, 0x0f, + 0x3d, 0x33, 0x08, 0x31, 0x38, 0x21, 0x10, 0x11, 0x01, 0x8b, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x26, 0xff, 0xf4, 0x02, 0x39, 0x02, 0xba, 0x00, 0x1f, + 0x00, 0x2d, 0x00, 0x63, 0xba, 0x00, 0x20, 0x00, 0x2e, 0x00, 0x2f, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x20, 0x10, 0xb8, 0x00, 0x00, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, + 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, + 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xba, 0x00, 0x27, + 0x00, 0x0a, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x27, 0x2f, 0xb9, + 0x00, 0x16, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x11, 0x00, 0x27, 0x00, 0x16, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x11, 0x2f, 0xb8, 0x00, 0x00, 0x10, 0xb9, + 0x00, 0x20, 0x00, 0x09, 0xf4, 0x30, 0x31, 0x05, 0x22, 0x2e, 0x02, 0x35, + 0x34, 0x3e, 0x02, 0x37, 0x33, 0x0e, 0x03, 0x07, 0x17, 0x3e, 0x03, 0x33, + 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, 0x36, 0x3d, 0x01, + 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x30, 0x3f, + 0x63, 0x44, 0x24, 0x2e, 0x49, 0x5b, 0x2d, 0xcf, 0x41, 0x67, 0x4d, 0x31, + 0x0b, 0x09, 0x09, 0x1a, 0x26, 0x33, 0x22, 0x2c, 0x4c, 0x37, 0x20, 0x26, + 0x45, 0x62, 0x3d, 0x36, 0x38, 0x39, 0x35, 0x33, 0x3a, 0x37, 0x0c, 0x27, + 0x49, 0x66, 0x3f, 0x49, 0x83, 0x6f, 0x58, 0x1e, 0x2d, 0x53, 0x53, 0x58, + 0x33, 0x03, 0x14, 0x26, 0x1d, 0x12, 0x1f, 0x39, 0x50, 0x32, 0x35, 0x5a, + 0x41, 0x24, 0x75, 0x39, 0x34, 0x0e, 0x34, 0x37, 0x37, 0x34, 0x0e, 0x34, + 0x39, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x33, 0x00, 0x00, 0x02, 0x29, + 0x02, 0xba, 0x00, 0x08, 0x00, 0x47, 0xba, 0x00, 0x08, 0x00, 0x09, 0x00, + 0x0a, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, + 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x05, 0x10, 0xb9, 0x00, 0x02, 0x00, 0x0d, + 0xf4, 0xba, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x04, 0x2f, 0x30, 0x31, 0x33, 0x13, 0x23, 0x15, 0x23, 0x35, 0x21, + 0x15, 0x03, 0xa4, 0xf0, 0xe2, 0x7f, 0x01, 0xf6, 0xe7, 0x02, 0x40, 0x7f, + 0xf9, 0x82, 0xfd, 0xc8, 0x00, 0x03, 0x00, 0x24, 0xff, 0xf4, 0x02, 0x34, + 0x02, 0xc6, 0x00, 0x21, 0x00, 0x2f, 0x00, 0x3d, 0x00, 0xd7, 0xba, 0x00, + 0x00, 0x00, 0x3e, 0x00, 0x3f, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x22, 0xd0, + 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, 0x30, 0xd0, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x11, 0x2f, 0x1b, 0xb9, 0x00, 0x11, 0x00, 0x1f, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x11, 0x10, 0xb9, + 0x00, 0x37, 0x00, 0x0d, 0xf4, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x22, + 0x00, 0x0d, 0xf4, 0xba, 0x00, 0x29, 0x00, 0x37, 0x00, 0x22, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x29, 0x2f, 0x41, 0x05, 0x00, 0x00, 0x00, 0x29, 0x00, + 0x10, 0x00, 0x29, 0x00, 0x02, 0x72, 0x41, 0x07, 0x00, 0xd0, 0x00, 0x29, + 0x00, 0xe0, 0x00, 0x29, 0x00, 0xf0, 0x00, 0x29, 0x00, 0x03, 0x72, 0x41, + 0x05, 0x00, 0x2f, 0x00, 0x29, 0x00, 0x3f, 0x00, 0x29, 0x00, 0x02, 0x5d, + 0x41, 0x03, 0x00, 0xcf, 0x00, 0x29, 0x00, 0x01, 0x5d, 0x41, 0x03, 0x00, + 0x5f, 0x00, 0x29, 0x00, 0x01, 0x5d, 0x41, 0x05, 0x00, 0x40, 0x00, 0x29, + 0x00, 0x50, 0x00, 0x29, 0x00, 0x02, 0x72, 0x41, 0x05, 0x00, 0x60, 0x00, + 0x29, 0x00, 0x70, 0x00, 0x29, 0x00, 0x02, 0x71, 0x41, 0x03, 0x00, 0xd0, + 0x00, 0x29, 0x00, 0x01, 0x5d, 0xb9, 0x00, 0x30, 0x00, 0x09, 0xf4, 0xba, + 0x00, 0x08, 0x00, 0x30, 0x00, 0x29, 0x11, 0x12, 0x39, 0xba, 0x00, 0x1a, + 0x00, 0x30, 0x00, 0x29, 0x11, 0x12, 0x39, 0x30, 0x31, 0x05, 0x22, 0x2e, + 0x02, 0x35, 0x34, 0x36, 0x37, 0x35, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, + 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x15, 0x1e, 0x01, 0x15, + 0x14, 0x0e, 0x02, 0x27, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, + 0x06, 0x1d, 0x01, 0x14, 0x16, 0x13, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, + 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x2c, 0x3f, 0x62, 0x44, + 0x23, 0x4e, 0x3d, 0x34, 0x42, 0x20, 0x3e, 0x5a, 0x3b, 0x3a, 0x5b, 0x3e, + 0x20, 0x42, 0x34, 0x3d, 0x4e, 0x23, 0x44, 0x62, 0x3f, 0x34, 0x37, 0x36, + 0x35, 0x35, 0x36, 0x37, 0x34, 0x32, 0x34, 0x35, 0x31, 0x31, 0x35, 0x34, + 0x0c, 0x1f, 0x36, 0x4b, 0x2c, 0x44, 0x53, 0x11, 0x08, 0x13, 0x4e, 0x3d, + 0x28, 0x44, 0x31, 0x1b, 0x1b, 0x31, 0x44, 0x28, 0x3d, 0x4e, 0x13, 0x08, + 0x11, 0x53, 0x44, 0x2c, 0x4b, 0x36, 0x1f, 0x73, 0x30, 0x29, 0x14, 0x2a, + 0x2f, 0x2f, 0x2a, 0x14, 0x29, 0x30, 0x01, 0x34, 0x2e, 0x27, 0x0f, 0x27, + 0x2d, 0x2d, 0x27, 0x0f, 0x27, 0x2e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x1f, + 0x00, 0x00, 0x02, 0x32, 0x02, 0xc6, 0x00, 0x1f, 0x00, 0x2d, 0x00, 0x63, + 0xba, 0x00, 0x20, 0x00, 0x2e, 0x00, 0x2f, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x20, 0x10, 0xb8, 0x00, 0x1b, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x1b, 0x2f, 0x1b, 0xb9, 0x00, 0x1b, 0x00, 0x1f, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, + 0x05, 0x00, 0x11, 0x3e, 0x59, 0xba, 0x00, 0x20, 0x00, 0x1b, 0x00, 0x05, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x20, 0x2f, 0xb9, 0x00, 0x11, 0x00, 0x09, + 0xf4, 0xba, 0x00, 0x0c, 0x00, 0x11, 0x00, 0x20, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x0c, 0x2f, 0xb8, 0x00, 0x1b, 0x10, 0xb9, 0x00, 0x27, 0x00, 0x09, + 0xf4, 0x30, 0x31, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x23, 0x3e, 0x03, 0x37, + 0x27, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, + 0x32, 0x1e, 0x02, 0x05, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, + 0x06, 0x1d, 0x01, 0x14, 0x16, 0x02, 0x32, 0x2e, 0x49, 0x5b, 0x2d, 0xcf, + 0x41, 0x67, 0x4d, 0x31, 0x0b, 0x09, 0x09, 0x1b, 0x25, 0x33, 0x22, 0x2c, + 0x4c, 0x37, 0x20, 0x26, 0x45, 0x62, 0x3c, 0x3f, 0x63, 0x44, 0x24, 0xfe, + 0xf7, 0x33, 0x3a, 0x37, 0x36, 0x36, 0x38, 0x39, 0x01, 0xb1, 0x4a, 0x82, + 0x6f, 0x58, 0x1e, 0x2d, 0x53, 0x53, 0x58, 0x33, 0x03, 0x14, 0x26, 0x1d, + 0x12, 0x1f, 0x39, 0x50, 0x32, 0x35, 0x5a, 0x41, 0x24, 0x27, 0x49, 0x66, + 0x85, 0x37, 0x34, 0x0e, 0x34, 0x39, 0x39, 0x34, 0x0e, 0x34, 0x37, 0x00, + 0xff, 0xff, 0x00, 0xc3, 0xff, 0xf4, 0x01, 0x95, 0x02, 0x10, 0x12, 0x26, + 0x00, 0x11, 0x00, 0x00, 0x10, 0x07, 0x00, 0x11, 0x00, 0x00, 0x01, 0x53, + 0xff, 0xff, 0x00, 0xaa, 0xff, 0x69, 0x01, 0xa1, 0x02, 0x10, 0x12, 0x26, + 0x00, 0x0f, 0x00, 0x00, 0x10, 0x07, 0x00, 0x11, 0x00, 0x00, 0x01, 0x53, + 0x00, 0x01, 0x00, 0x55, 0x00, 0x06, 0x02, 0x03, 0x02, 0x5c, 0x00, 0x07, + 0x00, 0x15, 0xba, 0x00, 0x05, 0x00, 0x08, 0x00, 0x09, 0x11, 0x12, 0x39, + 0x00, 0xba, 0x00, 0x07, 0x00, 0x02, 0x00, 0x03, 0x2b, 0x30, 0x31, 0x37, + 0x35, 0x25, 0x15, 0x05, 0x15, 0x05, 0x15, 0x55, 0x01, 0xae, 0xfe, 0xd7, + 0x01, 0x29, 0xec, 0x8a, 0xe6, 0x8a, 0x9d, 0x08, 0x9d, 0x8a, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x3e, 0x00, 0x83, 0x02, 0x1a, 0x01, 0xdf, 0x00, 0x03, + 0x00, 0x07, 0x00, 0x32, 0xba, 0x00, 0x04, 0x00, 0x08, 0x00, 0x09, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x04, 0x10, 0xb8, 0x00, 0x00, 0xd0, 0x00, 0xbb, + 0x00, 0x01, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x2b, 0xbb, 0x00, 0x05, + 0x00, 0x09, 0x00, 0x04, 0x00, 0x04, 0x2b, 0x41, 0x03, 0x00, 0x1f, 0x00, + 0x04, 0x00, 0x01, 0x5d, 0x30, 0x31, 0x13, 0x35, 0x21, 0x15, 0x05, 0x35, + 0x21, 0x15, 0x3e, 0x01, 0xdc, 0xfe, 0x24, 0x01, 0xdc, 0x01, 0x69, 0x76, + 0x76, 0xe6, 0x76, 0x76, 0x00, 0x01, 0x00, 0x55, 0x00, 0x06, 0x02, 0x03, + 0x02, 0x5c, 0x00, 0x07, 0x00, 0x15, 0xba, 0x00, 0x01, 0x00, 0x08, 0x00, + 0x09, 0x11, 0x12, 0x39, 0x00, 0xba, 0x00, 0x07, 0x00, 0x04, 0x00, 0x03, + 0x2b, 0x30, 0x31, 0x37, 0x25, 0x35, 0x25, 0x35, 0x05, 0x15, 0x05, 0x55, + 0x01, 0x29, 0xfe, 0xd7, 0x01, 0xae, 0xfe, 0x52, 0x90, 0x9d, 0x08, 0x9d, + 0x8a, 0xe6, 0x8a, 0xe6, 0x00, 0x02, 0x00, 0x3d, 0xff, 0xf4, 0x02, 0x0f, + 0x02, 0xc6, 0x00, 0x1c, 0x00, 0x2a, 0x00, 0x51, 0xba, 0x00, 0x11, 0x00, + 0x2b, 0x00, 0x2c, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x11, 0x10, 0xb8, 0x00, + 0x1d, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x11, 0x2f, + 0x1b, 0xb9, 0x00, 0x11, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x1d, 0x2f, 0x1b, 0xb9, 0x00, 0x1d, 0x00, 0x11, 0x3e, + 0x59, 0xb8, 0x00, 0x11, 0x10, 0xb9, 0x00, 0x08, 0x00, 0x0d, 0xf4, 0xb8, + 0x00, 0x1d, 0x10, 0xb9, 0x00, 0x24, 0x00, 0x0a, 0xf4, 0xb9, 0x00, 0x1c, + 0x00, 0x08, 0xf4, 0x30, 0x31, 0x37, 0x35, 0x3e, 0x01, 0x3d, 0x01, 0x34, + 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, + 0x15, 0x14, 0x0e, 0x02, 0x07, 0x15, 0x07, 0x22, 0x26, 0x3d, 0x01, 0x34, + 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0xd0, 0x4b, 0x58, 0x31, + 0x24, 0x29, 0x34, 0x0a, 0x7a, 0x09, 0x23, 0x38, 0x4e, 0x34, 0x35, 0x57, + 0x3e, 0x22, 0x1d, 0x31, 0x41, 0x24, 0x44, 0x35, 0x2d, 0x2d, 0x35, 0x35, + 0x2e, 0x2d, 0xe9, 0x99, 0x03, 0x2e, 0x39, 0x0e, 0x2a, 0x24, 0x2f, 0x26, + 0x33, 0x1e, 0x39, 0x2d, 0x1c, 0x1e, 0x36, 0x4c, 0x2d, 0x2a, 0x45, 0x33, + 0x20, 0x06, 0x48, 0xf5, 0x2e, 0x20, 0x20, 0x20, 0x2d, 0x2e, 0x1f, 0x20, + 0x20, 0x2e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x26, 0xff, 0x8f, 0x02, 0x29, + 0x02, 0xc6, 0x00, 0x33, 0x00, 0x41, 0x00, 0x80, 0xba, 0x00, 0x0b, 0x00, + 0x42, 0x00, 0x43, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0b, 0x10, 0xb8, 0x00, + 0x3f, 0xd0, 0x00, 0xb8, 0x00, 0x43, 0x2f, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x0b, 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, 0x1f, 0x3e, 0x59, + 0xb8, 0x00, 0x43, 0x10, 0xb8, 0x00, 0x01, 0xdc, 0xba, 0x00, 0x11, 0x00, + 0x0b, 0x00, 0x43, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x11, 0x2f, 0xb8, 0x00, + 0x17, 0xd0, 0xb9, 0x00, 0x34, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x13, 0x00, + 0x34, 0x00, 0x17, 0x11, 0x12, 0x39, 0xba, 0x00, 0x1d, 0x00, 0x17, 0x00, + 0x0b, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x1d, 0x2f, 0xb8, 0x00, 0x0b, 0x10, + 0xb9, 0x00, 0x27, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x01, 0x10, 0xb9, 0x00, + 0x32, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x1d, 0x10, 0xb9, 0x00, 0x3b, 0x00, + 0x09, 0xf4, 0x30, 0x31, 0x05, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, + 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x11, 0x23, 0x35, 0x23, 0x0e, 0x01, + 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x17, 0x33, 0x35, + 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x1d, 0x01, 0x14, 0x1e, 0x02, + 0x3b, 0x01, 0x27, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, + 0x1d, 0x01, 0x14, 0x16, 0x01, 0xbe, 0x69, 0x53, 0x74, 0x48, 0x20, 0x23, + 0x43, 0x62, 0x3f, 0x41, 0x5f, 0x3e, 0x1e, 0x6b, 0x07, 0x0b, 0x30, 0x23, + 0x3b, 0x41, 0x41, 0x3b, 0x23, 0x30, 0x0b, 0x07, 0x14, 0x25, 0x33, 0x1f, + 0x25, 0x3a, 0x29, 0x15, 0x15, 0x2e, 0x48, 0x34, 0x69, 0x39, 0x1c, 0x1d, + 0x1d, 0x1c, 0x1b, 0x1d, 0x1d, 0x71, 0x34, 0x68, 0x9d, 0x69, 0x72, 0x9b, + 0x5f, 0x29, 0x26, 0x43, 0x5a, 0x34, 0xfe, 0x8c, 0x3d, 0x25, 0x24, 0x67, + 0x70, 0x70, 0x67, 0x24, 0x25, 0x1b, 0x2a, 0x3a, 0x24, 0x10, 0x18, 0x3a, + 0x64, 0x4b, 0x81, 0x3a, 0x5c, 0x3f, 0x21, 0xb6, 0x20, 0x1b, 0x8c, 0x1b, + 0x20, 0x28, 0x38, 0x42, 0x38, 0x28, 0x00, 0x00, 0x00, 0x02, 0x00, 0x05, + 0x00, 0x00, 0x02, 0x53, 0x02, 0xba, 0x00, 0x07, 0x00, 0x0b, 0x00, 0x64, + 0xba, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x0d, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x08, 0x10, 0xb8, 0x00, 0x01, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1f, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x04, 0x2f, 0x1b, 0xb9, 0x00, + 0x04, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xba, 0x00, + 0x0a, 0x00, 0x05, 0x00, 0x04, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0a, 0x2f, + 0xb9, 0x00, 0x02, 0x00, 0x0d, 0xf4, 0xb8, 0x00, 0x05, 0x10, 0xb8, 0x00, + 0x09, 0xd0, 0x30, 0x31, 0x21, 0x27, 0x23, 0x07, 0x23, 0x13, 0x33, 0x13, + 0x01, 0x23, 0x03, 0x33, 0x01, 0xb3, 0x2c, 0xbf, 0x2b, 0x98, 0xbd, 0xd4, + 0xbd, 0xfe, 0xd9, 0x08, 0x44, 0x90, 0xa8, 0xa8, 0x02, 0xba, 0xfd, 0x46, + 0x02, 0x29, 0xfe, 0xf8, 0x00, 0x03, 0x00, 0x4d, 0x00, 0x00, 0x02, 0x2c, + 0x02, 0xba, 0x00, 0x0f, 0x00, 0x19, 0x00, 0x23, 0x00, 0x6d, 0xba, 0x00, + 0x10, 0x00, 0x24, 0x00, 0x25, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x10, 0x10, + 0xb8, 0x00, 0x01, 0xd0, 0xb8, 0x00, 0x10, 0x10, 0xb8, 0x00, 0x1a, 0xd0, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, + 0x00, 0x00, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x0f, 0x2f, 0x1b, 0xb9, 0x00, 0x0f, 0x00, 0x11, 0x3e, 0x59, 0xb9, + 0x00, 0x19, 0x00, 0x0d, 0xf4, 0xba, 0x00, 0x23, 0x00, 0x00, 0x00, 0x19, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x23, 0x2f, 0xb9, 0x00, 0x18, 0x00, 0x09, + 0xf4, 0xba, 0x00, 0x07, 0x00, 0x23, 0x00, 0x18, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x00, 0x10, 0xb9, 0x00, 0x22, 0x00, 0x0d, 0xf4, 0x30, 0x31, 0x13, + 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x15, 0x1e, 0x01, 0x15, 0x14, + 0x06, 0x23, 0x21, 0x37, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x2b, 0x01, + 0x15, 0x13, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x2b, 0x01, 0x15, 0x4d, + 0xf5, 0x67, 0x6d, 0x3b, 0x37, 0x41, 0x47, 0x6f, 0x64, 0xfe, 0xf4, 0xde, + 0x36, 0x32, 0x32, 0x36, 0x4c, 0x39, 0x35, 0x30, 0x30, 0x35, 0x39, 0x02, + 0xba, 0x64, 0x56, 0x3c, 0x47, 0x10, 0x06, 0x10, 0x50, 0x47, 0x58, 0x68, + 0x69, 0x24, 0x30, 0x1d, 0x30, 0x24, 0xc5, 0x01, 0x29, 0x23, 0x2e, 0x1e, + 0x2e, 0x22, 0xbf, 0x00, 0x00, 0x01, 0x00, 0x29, 0xff, 0xf4, 0x02, 0x33, + 0x02, 0xc6, 0x00, 0x20, 0x00, 0x43, 0xba, 0x00, 0x18, 0x00, 0x21, 0x00, + 0x22, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, + 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x06, 0x10, 0xb9, 0x00, 0x11, 0x00, 0x0d, + 0xf4, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x18, 0x00, 0x0d, 0xf4, 0x30, + 0x31, 0x05, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x17, + 0x07, 0x2e, 0x03, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x33, 0x32, + 0x36, 0x37, 0x17, 0x0e, 0x03, 0x01, 0x3c, 0x8c, 0x87, 0x87, 0x8c, 0x36, + 0x53, 0x3c, 0x27, 0x0b, 0x8c, 0x06, 0x10, 0x19, 0x25, 0x1a, 0x3d, 0x33, + 0x33, 0x3d, 0x34, 0x2f, 0x0b, 0x8c, 0x0b, 0x27, 0x3c, 0x53, 0x0c, 0xbd, + 0xac, 0xac, 0xbd, 0x1d, 0x34, 0x4a, 0x2e, 0x22, 0x19, 0x2a, 0x1e, 0x11, + 0x5f, 0x54, 0x7a, 0x54, 0x5f, 0x40, 0x32, 0x22, 0x2e, 0x4a, 0x35, 0x1c, + 0x00, 0x02, 0x00, 0x40, 0x00, 0x00, 0x02, 0x36, 0x02, 0xba, 0x00, 0x08, + 0x00, 0x12, 0x00, 0x4b, 0xba, 0x00, 0x07, 0x00, 0x13, 0x00, 0x14, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x07, 0x10, 0xb8, 0x00, 0x09, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, + 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, + 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, + 0x10, 0xb9, 0x00, 0x11, 0x00, 0x0d, 0xf4, 0xb8, 0x00, 0x08, 0x10, 0xb9, + 0x00, 0x12, 0x00, 0x0d, 0xf4, 0x30, 0x31, 0x13, 0x33, 0x32, 0x16, 0x15, + 0x14, 0x06, 0x2b, 0x01, 0x37, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x2b, + 0x01, 0x11, 0x40, 0xe1, 0x8d, 0x88, 0x88, 0x8d, 0xe1, 0xd7, 0x43, 0x3e, + 0x3e, 0x43, 0x43, 0x02, 0xba, 0xb4, 0xa9, 0xa9, 0xb4, 0x76, 0x56, 0x52, + 0x7f, 0x51, 0x56, 0xfe, 0x32, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x50, + 0x00, 0x00, 0x02, 0x0e, 0x02, 0xba, 0x00, 0x0b, 0x00, 0x57, 0xba, 0x00, + 0x09, 0x00, 0x0c, 0x00, 0x0d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1f, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x01, 0x10, 0xb9, + 0x00, 0x04, 0x00, 0x0d, 0xf4, 0xba, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x08, 0x2f, 0xb9, 0x00, 0x05, 0x00, 0x0d, + 0xf4, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x09, 0x00, 0x0d, 0xf4, 0x30, + 0x31, 0x33, 0x11, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x21, + 0x15, 0x50, 0x01, 0xbe, 0xfe, 0xd8, 0x01, 0x1e, 0xfe, 0xe2, 0x01, 0x28, + 0x02, 0xba, 0x7b, 0xa0, 0x7b, 0xa9, 0x7b, 0x00, 0x00, 0x01, 0x00, 0x50, + 0x00, 0x00, 0x02, 0x1f, 0x02, 0xba, 0x00, 0x09, 0x00, 0x4d, 0xba, 0x00, + 0x09, 0x00, 0x0a, 0x00, 0x0b, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1f, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x01, 0x10, 0xb9, + 0x00, 0x04, 0x00, 0x0d, 0xf4, 0xba, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x08, 0x2f, 0xb9, 0x00, 0x05, 0x00, 0x0d, + 0xf4, 0x30, 0x31, 0x33, 0x11, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x21, + 0x11, 0x50, 0x01, 0xcf, 0xfe, 0xc7, 0x01, 0x18, 0xfe, 0xe8, 0x02, 0xba, + 0x7b, 0xa0, 0x7b, 0xfe, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x23, + 0xff, 0xf4, 0x02, 0x21, 0x02, 0xc6, 0x00, 0x29, 0x00, 0x72, 0xba, 0x00, + 0x0e, 0x00, 0x2a, 0x00, 0x2b, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x0e, 0x2f, 0x1b, 0xb9, 0x00, 0x0e, 0x00, 0x1f, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x06, 0x2f, 0x1b, + 0xb9, 0x00, 0x06, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x29, 0x2f, 0x1b, 0xb9, 0x00, 0x29, 0x00, 0x11, 0x3e, 0x59, + 0xb8, 0x00, 0x06, 0x10, 0xb9, 0x00, 0x20, 0x00, 0x09, 0xf4, 0xba, 0x00, + 0x00, 0x00, 0x06, 0x00, 0x20, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0e, 0x10, + 0xb9, 0x00, 0x19, 0x00, 0x0d, 0xf4, 0xba, 0x00, 0x25, 0x00, 0x19, 0x00, + 0x06, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x25, 0x2f, 0xb9, 0x00, 0x26, 0x00, + 0x09, 0xf4, 0x30, 0x31, 0x25, 0x23, 0x0e, 0x03, 0x23, 0x22, 0x2e, 0x02, + 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x07, 0x2e, 0x03, 0x23, + 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x33, 0x32, 0x36, 0x3d, 0x01, 0x23, + 0x35, 0x33, 0x11, 0x23, 0x01, 0x9b, 0x09, 0x09, 0x1a, 0x26, 0x33, 0x20, + 0x33, 0x4f, 0x36, 0x1b, 0x82, 0x88, 0x36, 0x52, 0x3b, 0x26, 0x0b, 0x8c, + 0x06, 0x0f, 0x18, 0x24, 0x1a, 0x39, 0x2f, 0x33, 0x41, 0x33, 0x32, 0x77, + 0xfd, 0x86, 0x63, 0x16, 0x28, 0x1f, 0x12, 0x30, 0x5c, 0x84, 0x53, 0xb2, + 0xbd, 0x1d, 0x35, 0x4a, 0x2d, 0x22, 0x16, 0x29, 0x20, 0x13, 0x5e, 0x55, + 0x72, 0x55, 0x66, 0x3c, 0x2f, 0x33, 0x6a, 0xfe, 0x8b, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x3d, 0x00, 0x00, 0x02, 0x1b, 0x02, 0xba, 0x00, 0x0b, + 0x00, 0x9a, 0xba, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x0d, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x04, 0x2f, 0x1b, 0xb9, + 0x00, 0x04, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, 0x1f, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x03, 0x2f, 0x1b, 0xb9, 0x00, 0x03, + 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0b, + 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, 0x11, 0x3e, 0x59, 0xba, 0x00, 0x01, + 0x00, 0x04, 0x00, 0x03, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x01, 0x2f, 0x41, + 0x05, 0x00, 0x9f, 0x00, 0x01, 0x00, 0xaf, 0x00, 0x01, 0x00, 0x02, 0x5d, + 0x41, 0x03, 0x00, 0x3f, 0x00, 0x01, 0x00, 0x01, 0x71, 0x41, 0x03, 0x00, + 0xbf, 0x00, 0x01, 0x00, 0x01, 0x71, 0x41, 0x03, 0x00, 0x5f, 0x00, 0x01, + 0x00, 0x01, 0x5d, 0x41, 0x05, 0x00, 0x2f, 0x00, 0x01, 0x00, 0x3f, 0x00, + 0x01, 0x00, 0x02, 0x5d, 0xb9, 0x00, 0x06, 0x00, 0x0d, 0xf4, 0x30, 0x31, + 0x01, 0x23, 0x11, 0x23, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x23, + 0x01, 0x84, 0xb0, 0x97, 0x97, 0xb0, 0x97, 0x97, 0x01, 0x24, 0xfe, 0xdc, + 0x02, 0xba, 0xfe, 0xe5, 0x01, 0x1b, 0xfd, 0x46, 0x00, 0x01, 0x00, 0x4b, + 0x00, 0x00, 0x02, 0x0d, 0x02, 0xba, 0x00, 0x0b, 0x00, 0x4b, 0xba, 0x00, + 0x02, 0x00, 0x0c, 0x00, 0x0d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1f, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb9, 0x00, 0x01, 0x00, 0x09, + 0xf4, 0xb8, 0x00, 0x05, 0x10, 0xb9, 0x00, 0x04, 0x00, 0x09, 0xf4, 0xb8, + 0x00, 0x08, 0xd0, 0xb8, 0x00, 0x01, 0x10, 0xb8, 0x00, 0x09, 0xd0, 0x30, + 0x31, 0x33, 0x35, 0x33, 0x11, 0x23, 0x35, 0x21, 0x15, 0x23, 0x11, 0x33, + 0x15, 0x4b, 0x96, 0x96, 0x01, 0xc2, 0x96, 0x96, 0x6f, 0x01, 0xdc, 0x6f, + 0x6f, 0xfe, 0x24, 0x6f, 0x00, 0x01, 0x00, 0x26, 0xff, 0xf4, 0x01, 0xff, + 0x02, 0xba, 0x00, 0x13, 0x00, 0x3f, 0xba, 0x00, 0x06, 0x00, 0x14, 0x00, + 0x15, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x13, 0x2f, 0x1b, 0xb9, 0x00, 0x13, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, + 0x11, 0x3e, 0x59, 0xb9, 0x00, 0x0d, 0x00, 0x0d, 0xf4, 0xb8, 0x00, 0x13, + 0x10, 0xb9, 0x00, 0x12, 0x00, 0x0d, 0xf4, 0x30, 0x31, 0x01, 0x11, 0x14, + 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x37, 0x1e, 0x01, 0x33, 0x32, 0x36, + 0x35, 0x11, 0x23, 0x35, 0x01, 0xff, 0x21, 0x3d, 0x56, 0x35, 0x6b, 0x75, + 0x10, 0x8e, 0x08, 0x2d, 0x2d, 0x26, 0x2b, 0xe6, 0x02, 0xba, 0xfe, 0x09, + 0x2f, 0x4d, 0x36, 0x1d, 0x6b, 0x57, 0x1d, 0x2d, 0x38, 0x31, 0x33, 0x01, + 0x6d, 0x7b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, 0x00, 0x00, 0x02, 0x5b, + 0x02, 0xba, 0x00, 0x0d, 0x00, 0x63, 0xba, 0x00, 0x08, 0x00, 0x0e, 0x00, + 0x0f, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x04, 0x2f, 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x09, 0x2f, 0x1b, 0xb9, 0x00, 0x09, 0x00, + 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x03, 0x2f, + 0x1b, 0xb9, 0x00, 0x03, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x0d, 0x2f, 0x1b, 0xb9, 0x00, 0x0d, 0x00, 0x11, 0x3e, + 0x59, 0xba, 0x00, 0x06, 0x00, 0x09, 0x00, 0x03, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x06, 0x10, 0xb8, 0x00, 0x01, 0xd0, 0x30, 0x31, 0x01, 0x07, 0x15, + 0x23, 0x11, 0x33, 0x11, 0x33, 0x3f, 0x01, 0x33, 0x03, 0x13, 0x23, 0x01, + 0x18, 0x3e, 0x96, 0x96, 0x08, 0x4c, 0x7b, 0xa8, 0xd1, 0xdb, 0xa9, 0x01, + 0x23, 0x57, 0xcc, 0x02, 0xba, 0xfe, 0xdc, 0x74, 0xb0, 0xfe, 0xd9, 0xfe, + 0x6d, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x5c, 0x00, 0x00, 0x02, 0x1f, + 0x02, 0xba, 0x00, 0x05, 0x00, 0x35, 0xba, 0x00, 0x03, 0x00, 0x06, 0x00, + 0x07, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, + 0x11, 0x3e, 0x59, 0xb9, 0x00, 0x03, 0x00, 0x0d, 0xf4, 0x30, 0x31, 0x33, + 0x11, 0x33, 0x11, 0x21, 0x15, 0x5c, 0x97, 0x01, 0x2c, 0x02, 0xba, 0xfd, + 0xc1, 0x7b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x27, 0x00, 0x00, 0x02, 0x31, + 0x02, 0xba, 0x00, 0x10, 0x00, 0x71, 0xba, 0x00, 0x03, 0x00, 0x11, 0x00, + 0x12, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x09, 0x2f, 0x1b, 0xb9, 0x00, 0x09, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0d, 0x2f, 0x1b, 0xb9, 0x00, 0x0d, 0x00, + 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, + 0x1b, 0xb9, 0x00, 0x08, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x10, 0x2f, 0x1b, 0xb9, 0x00, 0x10, 0x00, 0x11, 0x3e, + 0x59, 0xb8, 0x00, 0x0d, 0x10, 0xb8, 0x00, 0x02, 0xd0, 0xb8, 0x00, 0x08, + 0x10, 0xb8, 0x00, 0x03, 0xdc, 0xb8, 0x00, 0x09, 0x10, 0xb8, 0x00, 0x05, + 0xd0, 0xb8, 0x00, 0x03, 0x10, 0xb8, 0x00, 0x0b, 0xd0, 0x30, 0x31, 0x01, + 0x37, 0x23, 0x0b, 0x01, 0x23, 0x17, 0x11, 0x23, 0x11, 0x33, 0x17, 0x33, + 0x37, 0x33, 0x11, 0x23, 0x01, 0xaf, 0x08, 0x09, 0x82, 0x82, 0x09, 0x08, + 0x82, 0xb1, 0x56, 0x08, 0x56, 0xa5, 0x82, 0x01, 0x37, 0xc3, 0xfe, 0x99, + 0x01, 0x67, 0xc3, 0xfe, 0xc9, 0x02, 0xba, 0xeb, 0xeb, 0xfd, 0x46, 0x00, + 0x00, 0x01, 0x00, 0x3d, 0x00, 0x00, 0x02, 0x1b, 0x02, 0xba, 0x00, 0x0b, + 0x00, 0x61, 0xba, 0x00, 0x0b, 0x00, 0x0c, 0x00, 0x0d, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x04, 0x2f, 0x1b, 0xb9, + 0x00, 0x04, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, 0x1f, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x03, 0x2f, 0x1b, 0xb9, 0x00, 0x03, + 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0b, + 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x04, + 0x10, 0xb8, 0x00, 0x00, 0xd0, 0xb8, 0x00, 0x0b, 0x10, 0xb8, 0x00, 0x07, + 0xd0, 0x30, 0x31, 0x13, 0x23, 0x11, 0x23, 0x11, 0x33, 0x13, 0x33, 0x11, + 0x33, 0x11, 0x23, 0xc8, 0x0b, 0x80, 0xb4, 0x9f, 0x0b, 0x80, 0xb4, 0x01, + 0xd0, 0xfe, 0x30, 0x02, 0xba, 0xfe, 0x30, 0x01, 0xd0, 0xfd, 0x46, 0x00, + 0x00, 0x02, 0x00, 0x1b, 0xff, 0xf4, 0x02, 0x3d, 0x02, 0xc6, 0x00, 0x0b, + 0x00, 0x19, 0x00, 0x43, 0xba, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x1b, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x0c, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, 0x1f, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, + 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb9, 0x00, 0x0c, 0x00, 0x0d, 0xf4, 0xb8, + 0x00, 0x06, 0x10, 0xb9, 0x00, 0x13, 0x00, 0x0d, 0xf4, 0x30, 0x31, 0x05, + 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x27, + 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, + 0x16, 0x01, 0x2c, 0x8c, 0x85, 0x85, 0x8c, 0x8c, 0x85, 0x85, 0x8c, 0x40, + 0x31, 0x31, 0x40, 0x40, 0x31, 0x31, 0x0c, 0xbe, 0xab, 0xab, 0xbe, 0xbe, + 0xab, 0xab, 0xbe, 0x79, 0x5f, 0x55, 0x79, 0x54, 0x5f, 0x5f, 0x54, 0x7a, + 0x54, 0x5f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x4c, 0x00, 0x00, 0x02, 0x30, + 0x02, 0xba, 0x00, 0x0e, 0x00, 0x18, 0x00, 0x55, 0xba, 0x00, 0x10, 0x00, + 0x19, 0x00, 0x1a, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x10, 0x10, 0xb8, 0x00, + 0x0c, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, + 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, + 0x59, 0xba, 0x00, 0x0f, 0x00, 0x01, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x0f, 0x2f, 0xb9, 0x00, 0x0d, 0x00, 0x0d, 0xf4, 0xb8, 0x00, 0x01, + 0x10, 0xb9, 0x00, 0x18, 0x00, 0x0d, 0xf4, 0x30, 0x31, 0x33, 0x11, 0x21, + 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x2b, 0x01, 0x15, 0x11, 0x33, + 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x2b, 0x01, 0x4c, 0x01, 0x0e, 0x33, + 0x50, 0x37, 0x1c, 0x1c, 0x37, 0x50, 0x33, 0x77, 0x51, 0x35, 0x29, 0x29, + 0x35, 0x51, 0x02, 0xba, 0x1f, 0x3a, 0x52, 0x33, 0x33, 0x52, 0x3a, 0x1f, + 0xfe, 0x01, 0x77, 0x28, 0x2e, 0x1e, 0x2e, 0x28, 0x00, 0x02, 0x00, 0x1b, + 0xff, 0x41, 0x02, 0x3d, 0x02, 0xc6, 0x00, 0x13, 0x00, 0x21, 0x00, 0x61, + 0xba, 0x00, 0x14, 0x00, 0x22, 0x00, 0x23, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x14, 0x10, 0xb8, 0x00, 0x0b, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x0b, 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, 0x1f, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, + 0x05, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x12, 0xd0, 0xb8, 0x00, 0x12, + 0x2f, 0xb9, 0x00, 0x01, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x05, 0x10, 0xb8, + 0x00, 0x11, 0xd0, 0xb8, 0x00, 0x05, 0x10, 0xb9, 0x00, 0x14, 0x00, 0x09, + 0xf4, 0xb8, 0x00, 0x0b, 0x10, 0xb9, 0x00, 0x1b, 0x00, 0x0d, 0xf4, 0x30, + 0x31, 0x05, 0x23, 0x22, 0x26, 0x3d, 0x01, 0x2e, 0x01, 0x35, 0x34, 0x36, + 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x15, 0x33, 0x27, 0x32, 0x36, + 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x02, + 0x0e, 0x8e, 0x51, 0x44, 0x6b, 0x65, 0x85, 0x8c, 0x8c, 0x85, 0x65, 0x6b, + 0xa1, 0xe2, 0x40, 0x31, 0x31, 0x40, 0x40, 0x31, 0x31, 0xbf, 0x4e, 0x42, + 0x29, 0x15, 0xb7, 0x97, 0xab, 0xbe, 0xbe, 0xab, 0x97, 0xb7, 0x15, 0x4e, + 0xc1, 0x5f, 0x55, 0x79, 0x54, 0x5f, 0x5f, 0x54, 0x7a, 0x54, 0x5f, 0x00, + 0x00, 0x02, 0x00, 0x4c, 0x00, 0x00, 0x02, 0x3e, 0x02, 0xba, 0x00, 0x0f, + 0x00, 0x19, 0x00, 0x70, 0xba, 0x00, 0x0e, 0x00, 0x1a, 0x00, 0x1b, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x0e, 0x10, 0xb8, 0x00, 0x10, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x02, 0x2f, 0x1b, 0xb9, 0x00, 0x02, + 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, + 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x0d, 0x2f, 0x1b, 0xb9, 0x00, 0x0d, 0x00, 0x11, + 0x3e, 0x59, 0xba, 0x00, 0x19, 0x00, 0x02, 0x00, 0x01, 0x11, 0x12, 0x39, + 0xb8, 0x00, 0x19, 0x2f, 0xb9, 0x00, 0x0f, 0x00, 0x0d, 0xf4, 0xba, 0x00, + 0x0b, 0x00, 0x19, 0x00, 0x0f, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x02, 0x10, + 0xb9, 0x00, 0x18, 0x00, 0x0d, 0xf4, 0x30, 0x31, 0x33, 0x23, 0x11, 0x21, + 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x13, 0x23, 0x03, 0x23, 0x37, + 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x2b, 0x01, 0x15, 0xe0, 0x94, 0x01, + 0x0e, 0x33, 0x50, 0x37, 0x1c, 0x40, 0x3b, 0x89, 0xa4, 0x75, 0x45, 0x56, + 0x35, 0x29, 0x29, 0x35, 0x56, 0x02, 0xba, 0x1f, 0x3a, 0x52, 0x33, 0x4a, + 0x6a, 0x11, 0xfe, 0xe9, 0x01, 0x03, 0x74, 0x28, 0x2e, 0x1e, 0x2e, 0x28, + 0xca, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, 0xff, 0xf4, 0x02, 0x2c, + 0x02, 0xc6, 0x00, 0x28, 0x00, 0x63, 0xba, 0x00, 0x07, 0x00, 0x29, 0x00, + 0x2a, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x14, 0x2f, 0x1b, 0xb9, 0x00, 0x14, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, + 0x11, 0x3e, 0x59, 0xb9, 0x00, 0x07, 0x00, 0x0d, 0xf4, 0xb8, 0x00, 0x14, + 0x10, 0xb9, 0x00, 0x1b, 0x00, 0x0d, 0xf4, 0xba, 0x00, 0x0e, 0x00, 0x1b, + 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0e, 0x10, 0xb8, 0x00, 0x0d, + 0xd0, 0xba, 0x00, 0x20, 0x00, 0x14, 0x00, 0x07, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x20, 0x10, 0xb8, 0x00, 0x21, 0xd0, 0x30, 0x31, 0x05, 0x22, 0x26, + 0x27, 0x37, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x2f, 0x01, + 0x2e, 0x01, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x17, 0x07, 0x2e, 0x01, + 0x23, 0x22, 0x15, 0x14, 0x16, 0x1f, 0x01, 0x1e, 0x01, 0x15, 0x14, 0x0e, + 0x02, 0x01, 0x21, 0x58, 0x82, 0x28, 0x57, 0x26, 0x5b, 0x2f, 0x36, 0x38, + 0x2b, 0x33, 0x49, 0x5e, 0x54, 0x84, 0x77, 0x51, 0x78, 0x25, 0x55, 0x1c, + 0x4c, 0x30, 0x65, 0x2d, 0x33, 0x49, 0x55, 0x5c, 0x22, 0x44, 0x63, 0x0c, + 0x3a, 0x32, 0x60, 0x2a, 0x28, 0x30, 0x2d, 0x25, 0x26, 0x08, 0x0c, 0x10, + 0x6b, 0x4d, 0x65, 0x6f, 0x32, 0x2b, 0x5f, 0x1f, 0x23, 0x53, 0x24, 0x24, + 0x09, 0x0d, 0x0f, 0x62, 0x53, 0x31, 0x53, 0x3d, 0x22, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x18, 0x00, 0x00, 0x02, 0x40, 0x02, 0xba, 0x00, 0x07, + 0x00, 0x3d, 0xba, 0x00, 0x02, 0x00, 0x08, 0x00, 0x09, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, + 0x00, 0x05, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x02, 0x2f, 0x1b, 0xb9, 0x00, 0x02, 0x00, 0x11, 0x3e, 0x59, 0xb8, + 0x00, 0x05, 0x10, 0xb9, 0x00, 0x04, 0x00, 0x0d, 0xf4, 0xb8, 0x00, 0x00, + 0xd0, 0x30, 0x31, 0x01, 0x11, 0x23, 0x11, 0x23, 0x35, 0x21, 0x15, 0x01, + 0x77, 0x96, 0xc9, 0x02, 0x28, 0x02, 0x3f, 0xfd, 0xc1, 0x02, 0x3f, 0x7b, + 0x7b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x37, 0xff, 0xf4, 0x02, 0x21, + 0x02, 0xba, 0x00, 0x19, 0x00, 0x46, 0xba, 0x00, 0x13, 0x00, 0x1a, 0x00, + 0x1b, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x19, 0x2f, 0x1b, 0xb9, 0x00, 0x19, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0c, 0x2f, 0x1b, 0xb9, 0x00, 0x0c, 0x00, + 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x13, 0x2f, + 0x1b, 0xb9, 0x00, 0x13, 0x00, 0x11, 0x3e, 0x59, 0xb9, 0x00, 0x06, 0x00, + 0x0d, 0xf4, 0x30, 0x31, 0x13, 0x11, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, + 0x02, 0x35, 0x11, 0x33, 0x11, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, + 0x35, 0x11, 0xcd, 0x05, 0x13, 0x26, 0x21, 0x21, 0x26, 0x13, 0x05, 0x96, + 0x13, 0x36, 0x60, 0x4c, 0x4c, 0x60, 0x36, 0x13, 0x02, 0xba, 0xfe, 0x46, + 0x21, 0x37, 0x26, 0x15, 0x15, 0x26, 0x37, 0x21, 0x01, 0xba, 0xfe, 0x5a, + 0x48, 0x6c, 0x48, 0x24, 0x24, 0x48, 0x6c, 0x48, 0x01, 0xa6, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x09, 0x00, 0x00, 0x02, 0x4f, 0x02, 0xba, 0x00, 0x09, + 0x00, 0x44, 0xba, 0x00, 0x04, 0x00, 0x0a, 0x00, 0x0b, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, + 0x00, 0x01, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x07, 0x2f, 0x1b, 0xb9, 0x00, 0x07, 0x00, 0x1f, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, + 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x04, 0xd0, 0x30, 0x31, 0x33, 0x03, + 0x33, 0x13, 0x17, 0x33, 0x37, 0x13, 0x33, 0x03, 0xc2, 0xb9, 0xa7, 0x52, + 0x29, 0x08, 0x2a, 0x53, 0x9f, 0xb9, 0x02, 0xba, 0xfe, 0x9d, 0xc9, 0xc9, + 0x01, 0x63, 0xfd, 0x46, 0x00, 0x01, 0x00, 0x0b, 0x00, 0x00, 0x02, 0x4d, + 0x02, 0xba, 0x00, 0x11, 0x00, 0x77, 0xba, 0x00, 0x10, 0x00, 0x12, 0x00, + 0x13, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0b, 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, + 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, + 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x0e, 0x2f, 0x1b, 0xb9, 0x00, 0x0e, 0x00, 0x11, 0x3e, + 0x59, 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, 0x04, 0xd0, 0xba, 0x00, 0x06, + 0x00, 0x01, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x06, 0x2f, 0xb8, + 0x00, 0x04, 0x10, 0xb8, 0x00, 0x08, 0xd0, 0xb8, 0x00, 0x06, 0x10, 0xb8, + 0x00, 0x10, 0xd0, 0x30, 0x31, 0x33, 0x03, 0x33, 0x13, 0x17, 0x33, 0x13, + 0x33, 0x13, 0x33, 0x37, 0x13, 0x33, 0x03, 0x23, 0x03, 0x23, 0x03, 0x36, + 0x2b, 0x81, 0x14, 0x06, 0x09, 0x3c, 0x87, 0x3c, 0x09, 0x06, 0x14, 0x7c, + 0x2b, 0xbe, 0x33, 0x0a, 0x33, 0x02, 0xba, 0xfe, 0x5e, 0x84, 0x01, 0x8e, + 0xfe, 0x72, 0x80, 0x01, 0xa6, 0xfd, 0x46, 0x01, 0x81, 0xfe, 0x7f, 0x00, + 0x00, 0x01, 0x00, 0x09, 0x00, 0x00, 0x02, 0x4f, 0x02, 0xba, 0x00, 0x11, + 0x00, 0x77, 0xba, 0x00, 0x03, 0x00, 0x12, 0x00, 0x13, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x09, 0x2f, 0x1b, 0xb9, + 0x00, 0x09, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x0f, 0x2f, 0x1b, 0xb9, 0x00, 0x0f, 0x00, 0x1f, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x07, 0x2f, 0x1b, 0xb9, 0x00, 0x07, + 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, + 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x11, 0x3e, 0x59, 0xba, 0x00, 0x04, + 0x00, 0x0f, 0x00, 0x01, 0x11, 0x12, 0x39, 0xba, 0x00, 0x0c, 0x00, 0x09, + 0x00, 0x07, 0x11, 0x12, 0x39, 0xba, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x04, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x08, 0x10, 0xb8, 0x00, 0x11, 0xd0, 0x30, + 0x31, 0x21, 0x23, 0x2f, 0x01, 0x23, 0x0f, 0x01, 0x23, 0x13, 0x03, 0x33, + 0x1f, 0x01, 0x33, 0x3f, 0x01, 0x33, 0x03, 0x02, 0x4f, 0xab, 0x48, 0x31, + 0x09, 0x32, 0x4a, 0x9d, 0xc4, 0xb7, 0xab, 0x39, 0x33, 0x08, 0x34, 0x3c, + 0x9d, 0xb7, 0x8b, 0x6e, 0x6e, 0x8b, 0x01, 0x69, 0x01, 0x51, 0x6f, 0x70, + 0x70, 0x6f, 0xfe, 0xad, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x02, 0x54, + 0x02, 0xba, 0x00, 0x0b, 0x00, 0x5a, 0xba, 0x00, 0x05, 0x00, 0x0c, 0x00, + 0x0d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x02, 0x2f, 0x1b, 0xb9, 0x00, 0x02, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, + 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, + 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xba, 0x00, 0x05, 0x00, + 0x02, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x05, 0x2f, 0xb8, 0x00, + 0x01, 0xd0, 0xb8, 0x00, 0x05, 0x10, 0xb8, 0x00, 0x0a, 0xd0, 0x30, 0x31, + 0x33, 0x35, 0x03, 0x33, 0x1f, 0x01, 0x33, 0x3f, 0x01, 0x33, 0x03, 0x15, + 0xe1, 0xdd, 0xa7, 0x4a, 0x36, 0x08, 0x36, 0x4a, 0xa1, 0xdd, 0xf7, 0x01, + 0xc3, 0xa2, 0x89, 0x89, 0xa2, 0xfe, 0x3d, 0xf7, 0x00, 0x01, 0x00, 0x30, + 0x00, 0x00, 0x02, 0x27, 0x02, 0xba, 0x00, 0x09, 0x00, 0x53, 0xba, 0x00, + 0x03, 0x00, 0x0a, 0x00, 0x0b, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1f, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, + 0xb9, 0x00, 0x01, 0x00, 0x11, 0x3e, 0x59, 0xb9, 0x00, 0x08, 0x00, 0x0d, + 0xf4, 0xb8, 0x00, 0x05, 0x10, 0xb9, 0x00, 0x04, 0x00, 0x0d, 0xf4, 0xba, + 0x00, 0x07, 0x00, 0x04, 0x00, 0x08, 0x11, 0x12, 0x39, 0xba, 0x00, 0x02, + 0x00, 0x08, 0x00, 0x07, 0x11, 0x12, 0x39, 0x30, 0x31, 0x29, 0x01, 0x35, + 0x01, 0x21, 0x35, 0x21, 0x15, 0x01, 0x21, 0x02, 0x27, 0xfe, 0x09, 0x01, + 0x45, 0xfe, 0xc5, 0x01, 0xe3, 0xfe, 0xbb, 0x01, 0x4f, 0x83, 0x01, 0xbc, + 0x7b, 0x83, 0xfe, 0x44, 0x00, 0x01, 0x00, 0xb7, 0xff, 0x76, 0x01, 0xfb, + 0x02, 0xf8, 0x00, 0x07, 0x00, 0x29, 0xba, 0x00, 0x05, 0x00, 0x08, 0x00, + 0x09, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x01, 0x2f, 0xb8, 0x00, 0x00, + 0x2f, 0xb8, 0x00, 0x01, 0x10, 0xb9, 0x00, 0x04, 0x00, 0x09, 0xf4, 0xb8, + 0x00, 0x00, 0x10, 0xb9, 0x00, 0x05, 0x00, 0x09, 0xf4, 0x30, 0x31, 0x17, + 0x11, 0x21, 0x15, 0x23, 0x11, 0x33, 0x15, 0xb7, 0x01, 0x44, 0xcd, 0xcd, + 0x8a, 0x03, 0x82, 0x63, 0xfd, 0x44, 0x63, 0x00, 0x00, 0x01, 0x00, 0x49, + 0xff, 0x76, 0x02, 0x0f, 0x02, 0xf8, 0x00, 0x03, 0x00, 0x15, 0xba, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x05, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x01, + 0x2f, 0xb8, 0x00, 0x00, 0x2f, 0x30, 0x31, 0x05, 0x01, 0x33, 0x01, 0x01, + 0x8a, 0xfe, 0xbf, 0x85, 0x01, 0x41, 0x8a, 0x03, 0x82, 0xfc, 0x7e, 0x00, + 0x00, 0x01, 0x00, 0x5d, 0xff, 0x76, 0x01, 0xa1, 0x02, 0xf8, 0x00, 0x07, + 0x00, 0x25, 0xba, 0x00, 0x04, 0x00, 0x08, 0x00, 0x09, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x07, 0x2f, 0xb8, 0x00, 0x02, 0x2f, 0xb9, 0x00, 0x03, + 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x07, 0x10, 0xb9, 0x00, 0x06, 0x00, 0x09, + 0xf4, 0x30, 0x31, 0x01, 0x11, 0x21, 0x35, 0x33, 0x11, 0x23, 0x35, 0x01, + 0xa1, 0xfe, 0xbc, 0xcd, 0xcd, 0x02, 0xf8, 0xfc, 0x7e, 0x63, 0x02, 0xbc, + 0x63, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1b, 0x00, 0xef, 0x02, 0x3d, + 0x02, 0xba, 0x00, 0x07, 0x00, 0x1e, 0xba, 0x00, 0x01, 0x00, 0x08, 0x00, + 0x09, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1f, 0x3e, 0x59, 0x30, 0x31, + 0x25, 0x03, 0x23, 0x03, 0x27, 0x13, 0x33, 0x13, 0x01, 0xc8, 0x99, 0x0c, + 0x99, 0x6f, 0xc3, 0x9d, 0xc2, 0xef, 0x01, 0x43, 0xfe, 0xbd, 0x36, 0x01, + 0x95, 0xfe, 0x6b, 0x00, 0x00, 0x01, 0x00, 0x3c, 0xff, 0x40, 0x02, 0x1c, + 0xff, 0xb9, 0x00, 0x03, 0x00, 0x17, 0xba, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x05, 0x11, 0x12, 0x39, 0x00, 0xbb, 0x00, 0x01, 0x00, 0x0d, 0x00, 0x00, + 0x00, 0x04, 0x2b, 0x30, 0x31, 0x17, 0x35, 0x21, 0x15, 0x3c, 0x01, 0xe0, + 0xc0, 0x79, 0x79, 0x00, 0x00, 0x01, 0x00, 0x96, 0x02, 0x3a, 0x01, 0x74, + 0x03, 0x27, 0x00, 0x03, 0x00, 0x2c, 0xba, 0x00, 0x03, 0x00, 0x04, 0x00, + 0x05, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x03, 0x2f, 0x41, 0x03, 0x00, + 0x4f, 0x00, 0x03, 0x00, 0x01, 0x5d, 0x41, 0x03, 0x00, 0x2f, 0x00, 0x03, + 0x00, 0x01, 0x5d, 0x41, 0x03, 0x00, 0x0f, 0x00, 0x03, 0x00, 0x01, 0x5d, + 0x30, 0x31, 0x13, 0x37, 0x17, 0x07, 0x96, 0x7b, 0x63, 0x58, 0x02, 0xea, + 0x3d, 0xc2, 0x2b, 0x00, 0x00, 0x02, 0x00, 0x34, 0xff, 0xf4, 0x02, 0x3c, + 0x02, 0x10, 0x00, 0x1f, 0x00, 0x2a, 0x00, 0x88, 0xba, 0x00, 0x19, 0x00, + 0x2b, 0x00, 0x2c, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x19, 0x10, 0xb8, 0x00, + 0x25, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x19, 0x2f, + 0x1b, 0xb9, 0x00, 0x19, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x07, 0x2f, 0x1b, 0xb9, 0x00, 0x07, 0x00, 0x11, 0x3e, + 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, + 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x07, 0x10, 0xb9, 0x00, + 0x20, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x0d, 0x00, 0x07, 0x00, 0x19, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x0d, 0x2f, 0xb9, 0x00, 0x25, 0x00, 0x01, 0xf4, + 0xba, 0x00, 0x04, 0x00, 0x20, 0x00, 0x25, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x04, 0x2f, 0xb8, 0x00, 0x19, 0x10, 0xb9, 0x00, 0x12, 0x00, 0x09, 0xf4, + 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x1d, 0x00, 0x09, 0xf4, 0x30, 0x31, + 0x21, 0x22, 0x26, 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, + 0x36, 0x3b, 0x01, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, + 0x01, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x33, 0x15, 0x25, 0x32, 0x36, 0x3d, + 0x01, 0x23, 0x22, 0x1d, 0x01, 0x14, 0x16, 0x01, 0xe7, 0x2e, 0x38, 0x05, + 0x05, 0x0e, 0x53, 0x3c, 0x4b, 0x5b, 0x76, 0x72, 0x53, 0x2b, 0x33, 0x2f, + 0x3a, 0x15, 0x51, 0x1a, 0x6f, 0x57, 0x6a, 0x77, 0x39, 0xfe, 0xd6, 0x27, + 0x36, 0x4f, 0x5b, 0x2a, 0x2f, 0x2c, 0x33, 0x34, 0x51, 0x49, 0x51, 0x4e, + 0x1a, 0x2e, 0x2f, 0x24, 0x1d, 0x48, 0x2c, 0x39, 0x61, 0x62, 0xe2, 0x6b, + 0x55, 0x26, 0x24, 0x3e, 0x3d, 0x14, 0x1b, 0x1c, 0x00, 0x02, 0x00, 0x3b, + 0xff, 0xf4, 0x02, 0x31, 0x02, 0xe4, 0x00, 0x16, 0x00, 0x24, 0x00, 0x81, + 0xba, 0x00, 0x17, 0x00, 0x25, 0x00, 0x26, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x17, 0x10, 0xb8, 0x00, 0x10, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x21, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, + 0x06, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x10, 0x2f, 0x1b, 0xb9, 0x00, 0x10, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x15, 0x2f, 0x1b, 0xb9, 0x00, 0x15, 0x00, + 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x06, 0x10, 0xb9, 0x00, 0x1e, 0x00, 0x09, + 0xf4, 0xba, 0x00, 0x03, 0x00, 0x1e, 0x00, 0x06, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x10, 0x10, 0xb9, 0x00, 0x17, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x13, + 0x00, 0x17, 0x00, 0x10, 0x11, 0x12, 0x39, 0x30, 0x31, 0x13, 0x33, 0x11, + 0x33, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x23, + 0x22, 0x26, 0x27, 0x23, 0x15, 0x23, 0x37, 0x32, 0x36, 0x3d, 0x01, 0x34, + 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x3b, 0x94, 0x07, 0x13, + 0x48, 0x3e, 0x2b, 0x47, 0x33, 0x1d, 0x1d, 0x33, 0x47, 0x2b, 0x3e, 0x48, + 0x13, 0x07, 0x94, 0xf4, 0x32, 0x36, 0x36, 0x32, 0x27, 0x39, 0x39, 0x02, + 0xe4, 0xfe, 0xc2, 0x2e, 0x3c, 0x20, 0x42, 0x66, 0x46, 0x46, 0x66, 0x42, + 0x20, 0x3b, 0x2f, 0x5e, 0x67, 0x3d, 0x36, 0x50, 0x36, 0x3d, 0x26, 0x29, + 0x98, 0x29, 0x26, 0x00, 0x00, 0x01, 0x00, 0x3c, 0xff, 0xf4, 0x02, 0x1f, + 0x02, 0x10, 0x00, 0x1e, 0x00, 0x43, 0xba, 0x00, 0x11, 0x00, 0x1f, 0x00, + 0x20, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, + 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x0a, 0x10, 0xb9, 0x00, 0x11, 0x00, 0x09, + 0xf4, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x18, 0x00, 0x09, 0xf4, 0x30, + 0x31, 0x05, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, + 0x17, 0x07, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x33, + 0x32, 0x36, 0x37, 0x17, 0x0e, 0x01, 0x01, 0x41, 0x3d, 0x61, 0x43, 0x24, + 0x24, 0x43, 0x61, 0x3c, 0x55, 0x67, 0x1b, 0x72, 0x0e, 0x2d, 0x2a, 0x33, + 0x37, 0x37, 0x35, 0x2b, 0x31, 0x11, 0x70, 0x1c, 0x6b, 0x0c, 0x25, 0x46, + 0x64, 0x3f, 0x3f, 0x64, 0x46, 0x25, 0x45, 0x39, 0x3e, 0x1e, 0x28, 0x3b, + 0x33, 0x54, 0x33, 0x3b, 0x28, 0x20, 0x40, 0x39, 0x45, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x27, 0xff, 0xf4, 0x02, 0x1d, 0x02, 0xe4, 0x00, 0x18, + 0x00, 0x26, 0x00, 0x81, 0xba, 0x00, 0x19, 0x00, 0x27, 0x00, 0x28, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x19, 0x10, 0xb8, 0x00, 0x04, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x16, 0x2f, 0x1b, 0xb9, 0x00, 0x16, + 0x00, 0x21, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0e, + 0x2f, 0x1b, 0xb9, 0x00, 0x0e, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x04, 0x2f, 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x11, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x18, 0x2f, 0x1b, + 0xb9, 0x00, 0x18, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x04, 0x10, 0xb9, + 0x00, 0x19, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x01, 0x00, 0x19, 0x00, 0x04, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0e, 0x10, 0xb9, 0x00, 0x20, 0x00, 0x09, + 0xf4, 0xba, 0x00, 0x13, 0x00, 0x20, 0x00, 0x0e, 0x11, 0x12, 0x39, 0x30, + 0x31, 0x25, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, + 0x02, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x33, 0x11, 0x33, 0x11, 0x23, 0x27, + 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, + 0x16, 0x01, 0x89, 0x07, 0x14, 0x47, 0x3e, 0x2b, 0x47, 0x33, 0x1d, 0x1d, + 0x33, 0x47, 0x2b, 0x1f, 0x30, 0x25, 0x1b, 0x0a, 0x07, 0x94, 0x94, 0x60, + 0x27, 0x39, 0x39, 0x27, 0x32, 0x36, 0x36, 0x5e, 0x2f, 0x3b, 0x20, 0x42, + 0x66, 0x46, 0x46, 0x66, 0x42, 0x20, 0x10, 0x1c, 0x27, 0x17, 0x01, 0x3e, + 0xfd, 0x1c, 0x67, 0x26, 0x29, 0x98, 0x29, 0x26, 0x3d, 0x36, 0x50, 0x36, + 0x3d, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x32, 0xff, 0xf4, 0x02, 0x26, + 0x02, 0x10, 0x00, 0x19, 0x00, 0x22, 0x00, 0x74, 0xba, 0x00, 0x08, 0x00, + 0x23, 0x00, 0x24, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x08, 0x10, 0xb8, 0x00, + 0x1a, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, + 0x1b, 0xb9, 0x00, 0x08, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, + 0x59, 0xb9, 0x00, 0x13, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x08, 0x10, 0xb9, + 0x00, 0x1a, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x0f, 0x00, 0x13, 0x00, 0x1a, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0f, 0x2f, 0x41, 0x03, 0x00, 0x50, 0x00, + 0x0f, 0x00, 0x01, 0x71, 0xb8, 0x00, 0x0e, 0xd0, 0xb8, 0x00, 0x16, 0xd0, + 0xb8, 0x00, 0x16, 0x2f, 0xb8, 0x00, 0x0f, 0x10, 0xb9, 0x00, 0x1e, 0x00, + 0x01, 0xf4, 0x30, 0x31, 0x05, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, 0x33, + 0x32, 0x1e, 0x02, 0x1d, 0x01, 0x21, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, + 0x37, 0x17, 0x0e, 0x01, 0x03, 0x22, 0x06, 0x1d, 0x01, 0x33, 0x35, 0x34, + 0x26, 0x01, 0x3a, 0x82, 0x86, 0x23, 0x41, 0x5d, 0x3a, 0x3a, 0x5c, 0x40, + 0x23, 0xfe, 0x9f, 0x3e, 0x3c, 0x2e, 0x42, 0x18, 0x50, 0x1e, 0x6c, 0x5f, + 0x30, 0x39, 0xd0, 0x37, 0x0c, 0x90, 0x7c, 0x3f, 0x65, 0x47, 0x25, 0x25, + 0x44, 0x61, 0x3c, 0x2c, 0x09, 0x32, 0x3d, 0x23, 0x1d, 0x57, 0x25, 0x36, + 0x01, 0xb2, 0x3b, 0x32, 0x08, 0x08, 0x33, 0x3a, 0x00, 0x01, 0x00, 0x3d, + 0x00, 0x00, 0x02, 0x2c, 0x02, 0xe4, 0x00, 0x14, 0x00, 0x72, 0xba, 0x00, + 0x11, 0x00, 0x15, 0x00, 0x16, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x09, 0x2f, 0x1b, 0xb9, 0x00, 0x09, 0x00, 0x21, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x04, 0x2f, 0x1b, + 0xb9, 0x00, 0x04, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x14, 0x2f, 0x1b, 0xb9, 0x00, 0x14, 0x00, 0x11, 0x3e, 0x59, + 0xb9, 0x00, 0x00, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x04, 0x10, 0xb9, 0x00, + 0x03, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x09, 0x10, 0xb9, 0x00, 0x0c, 0x00, + 0x09, 0xf4, 0xb8, 0x00, 0x04, 0x10, 0xb8, 0x00, 0x0d, 0xd0, 0xb8, 0x00, + 0x03, 0x10, 0xb8, 0x00, 0x10, 0xd0, 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, + 0x11, 0xd0, 0x30, 0x31, 0x37, 0x33, 0x11, 0x23, 0x35, 0x33, 0x35, 0x34, + 0x36, 0x3b, 0x01, 0x15, 0x23, 0x15, 0x33, 0x15, 0x23, 0x11, 0x33, 0x15, + 0x21, 0x47, 0x98, 0xa2, 0xa2, 0x4d, 0x51, 0xaf, 0xb9, 0xb9, 0xb9, 0xa2, + 0xfe, 0x32, 0x73, 0x01, 0x1e, 0x73, 0x4b, 0x42, 0x53, 0x73, 0x6d, 0x73, + 0xfe, 0xe2, 0x73, 0x00, 0x00, 0x03, 0x00, 0x2f, 0xff, 0x2c, 0x02, 0x47, + 0x02, 0x67, 0x00, 0x3d, 0x00, 0x4a, 0x00, 0x58, 0x00, 0xcb, 0xba, 0x00, + 0x03, 0x00, 0x59, 0x00, 0x5a, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x03, 0x10, + 0xb8, 0x00, 0x47, 0xd0, 0xb8, 0x00, 0x03, 0x10, 0xb8, 0x00, 0x4b, 0xd0, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x1b, 0x2f, 0x1b, 0xb9, + 0x00, 0x1b, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x23, 0x2f, 0x1b, 0xb9, 0x00, 0x23, 0x00, 0x1d, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x03, 0x2f, 0x1b, 0xb9, 0x00, 0x03, + 0x00, 0x13, 0x3e, 0x59, 0xb8, 0x00, 0x23, 0x10, 0xb9, 0x00, 0x22, 0x00, + 0x09, 0xf4, 0xba, 0x00, 0x2d, 0x00, 0x03, 0x00, 0x1b, 0x11, 0x12, 0x39, + 0xb8, 0x00, 0x2d, 0x2f, 0x41, 0x03, 0x00, 0x70, 0x00, 0x2d, 0x00, 0x01, + 0x71, 0x41, 0x03, 0x00, 0xd0, 0x00, 0x2d, 0x00, 0x01, 0x5d, 0xb8, 0x00, + 0x03, 0x10, 0xb9, 0x00, 0x48, 0x00, 0x09, 0xf4, 0x41, 0x03, 0x00, 0xd0, + 0x00, 0x48, 0x00, 0x01, 0x5d, 0xba, 0x00, 0x39, 0x00, 0x2d, 0x00, 0x48, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x39, 0x2f, 0x41, 0x05, 0x00, 0x6f, 0x00, + 0x39, 0x00, 0x7f, 0x00, 0x39, 0x00, 0x02, 0x71, 0xb9, 0x00, 0x41, 0x00, + 0x0d, 0xf4, 0x41, 0x03, 0x00, 0xc0, 0x00, 0x41, 0x00, 0x01, 0x5d, 0xb8, + 0x00, 0x2d, 0x10, 0xb9, 0x00, 0x4b, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x1b, + 0x10, 0xb9, 0x00, 0x52, 0x00, 0x09, 0xf4, 0x30, 0x31, 0x05, 0x14, 0x06, + 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x35, 0x2e, 0x01, 0x35, + 0x34, 0x36, 0x37, 0x35, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, + 0x17, 0x35, 0x34, 0x36, 0x3b, 0x01, 0x15, 0x23, 0x15, 0x1e, 0x01, 0x15, + 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x0e, 0x01, 0x15, 0x14, 0x1e, + 0x02, 0x3b, 0x01, 0x32, 0x1e, 0x02, 0x07, 0x34, 0x26, 0x2b, 0x01, 0x06, + 0x15, 0x14, 0x16, 0x3b, 0x01, 0x32, 0x36, 0x03, 0x32, 0x36, 0x3d, 0x01, + 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x02, 0x47, 0x8a, + 0x94, 0x4a, 0x60, 0x39, 0x17, 0x34, 0x2f, 0x21, 0x27, 0x33, 0x2a, 0x2e, + 0x33, 0x20, 0x3b, 0x52, 0x33, 0x31, 0x2a, 0x2a, 0x25, 0x5b, 0x7c, 0x2a, + 0x2f, 0x20, 0x3c, 0x53, 0x33, 0x17, 0x2a, 0x13, 0x0b, 0x0f, 0x0c, 0x15, + 0x1c, 0x0f, 0x76, 0x37, 0x4e, 0x32, 0x16, 0x8c, 0x20, 0x2d, 0xb1, 0x14, + 0x29, 0x31, 0x57, 0x33, 0x2e, 0x95, 0x2d, 0x29, 0x29, 0x2d, 0x2c, 0x28, + 0x28, 0x34, 0x52, 0x4e, 0x11, 0x20, 0x2c, 0x1a, 0x2c, 0x2d, 0x0c, 0x06, + 0x0a, 0x25, 0x22, 0x26, 0x24, 0x0a, 0x06, 0x16, 0x50, 0x39, 0x2d, 0x45, + 0x2e, 0x18, 0x0b, 0x1c, 0x1e, 0x28, 0x6c, 0x09, 0x16, 0x4d, 0x37, 0x2d, + 0x44, 0x2f, 0x18, 0x05, 0x05, 0x06, 0x12, 0x0e, 0x0c, 0x0e, 0x07, 0x02, + 0x16, 0x28, 0x36, 0x2c, 0x14, 0x17, 0x11, 0x19, 0x18, 0x1f, 0x1c, 0x01, + 0x57, 0x2c, 0x22, 0x18, 0x22, 0x2c, 0x2c, 0x22, 0x18, 0x22, 0x2c, 0x00, + 0x00, 0x01, 0x00, 0x41, 0x00, 0x00, 0x02, 0x1b, 0x02, 0xe4, 0x00, 0x19, + 0x00, 0x6b, 0xba, 0x00, 0x12, 0x00, 0x1a, 0x00, 0x1b, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, + 0x00, 0x01, 0x00, 0x21, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, 0x1d, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x18, 0x2f, 0x1b, 0xb9, 0x00, 0x18, + 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0e, + 0x2f, 0x1b, 0xb9, 0x00, 0x0e, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x08, + 0x10, 0xb9, 0x00, 0x12, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x02, 0x00, 0x12, + 0x00, 0x08, 0x11, 0x12, 0x39, 0x7d, 0xb8, 0x00, 0x02, 0x2f, 0x18, 0x30, + 0x31, 0x13, 0x33, 0x11, 0x33, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x15, + 0x11, 0x23, 0x11, 0x34, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x11, 0x23, 0x41, + 0x94, 0x06, 0x09, 0x1a, 0x25, 0x31, 0x1f, 0x25, 0x3e, 0x2c, 0x19, 0x94, + 0x57, 0x11, 0x21, 0x1a, 0x0f, 0x94, 0x02, 0xe4, 0xfe, 0xc2, 0x16, 0x26, + 0x1d, 0x11, 0x19, 0x32, 0x48, 0x2f, 0xfe, 0xb2, 0x01, 0x3a, 0x64, 0x09, + 0x13, 0x1c, 0x13, 0xfe, 0xad, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5e, + 0x00, 0x00, 0x02, 0x2e, 0x02, 0xef, 0x00, 0x0d, 0x00, 0x17, 0x00, 0x5f, + 0xba, 0x00, 0x00, 0x00, 0x18, 0x00, 0x19, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x0f, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x12, 0x2f, + 0x1b, 0xb9, 0x00, 0x12, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x17, 0x2f, 0x1b, 0xb9, 0x00, 0x17, 0x00, 0x11, 0x3e, + 0x59, 0xb8, 0x00, 0x12, 0x10, 0xb9, 0x00, 0x00, 0x00, 0x08, 0xf4, 0xb9, + 0x00, 0x07, 0x00, 0x07, 0xf4, 0xb8, 0x00, 0x17, 0x10, 0xb9, 0x00, 0x0e, + 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x12, 0x10, 0xb9, 0x00, 0x11, 0x00, 0x09, + 0xf4, 0xb8, 0x00, 0x0e, 0x10, 0xb8, 0x00, 0x14, 0xd0, 0x30, 0x31, 0x01, + 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, + 0x06, 0x01, 0x33, 0x11, 0x23, 0x35, 0x21, 0x11, 0x33, 0x15, 0x21, 0x01, + 0x4c, 0x32, 0x27, 0x27, 0x32, 0x32, 0x27, 0x27, 0xfe, 0xe0, 0xa4, 0xa4, + 0x01, 0x38, 0x98, 0xfe, 0x30, 0x02, 0x46, 0x29, 0x1d, 0x1d, 0x1e, 0x28, + 0x28, 0x1e, 0x1d, 0x1d, 0x29, 0xfe, 0x2d, 0x01, 0x1e, 0x73, 0xfe, 0x6f, + 0x73, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5a, 0xff, 0x38, 0x01, 0xc5, + 0x02, 0xef, 0x00, 0x0a, 0x00, 0x18, 0x00, 0x57, 0xba, 0x00, 0x01, 0x00, + 0x19, 0x00, 0x1a, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x01, 0x10, 0xb8, 0x00, + 0x0e, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x04, 0x2f, + 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, 0x00, 0x13, 0x3e, + 0x59, 0xb9, 0x00, 0x00, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x04, 0x10, 0xb9, + 0x00, 0x03, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x04, 0x10, 0xb9, 0x00, 0x0b, + 0x00, 0x08, 0xf4, 0xb9, 0x00, 0x12, 0x00, 0x07, 0xf4, 0x30, 0x31, 0x17, + 0x33, 0x11, 0x23, 0x35, 0x21, 0x11, 0x14, 0x06, 0x2b, 0x01, 0x01, 0x22, + 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, + 0x5c, 0xc6, 0xc8, 0x01, 0x5c, 0x4e, 0x4f, 0xbd, 0x01, 0x10, 0x32, 0x27, + 0x27, 0x32, 0x31, 0x28, 0x28, 0x55, 0x01, 0xe6, 0x73, 0xfd, 0xc9, 0x41, + 0x54, 0x03, 0x0e, 0x29, 0x1d, 0x1d, 0x1e, 0x28, 0x28, 0x1e, 0x1d, 0x1d, + 0x29, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x00, 0x00, 0x02, 0x4c, + 0x02, 0xe4, 0x00, 0x0d, 0x00, 0x63, 0xba, 0x00, 0x04, 0x00, 0x0e, 0x00, + 0x0f, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x21, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, + 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x09, 0x2f, + 0x1b, 0xb9, 0x00, 0x09, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x0d, 0x2f, 0x1b, 0xb9, 0x00, 0x0d, 0x00, 0x11, 0x3e, + 0x59, 0xba, 0x00, 0x02, 0x00, 0x05, 0x00, 0x0d, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x02, 0x10, 0xb8, 0x00, 0x0b, 0xd0, 0x30, 0x31, 0x13, 0x33, 0x11, + 0x33, 0x3f, 0x01, 0x33, 0x07, 0x13, 0x23, 0x27, 0x07, 0x15, 0x23, 0x41, + 0x94, 0x07, 0x45, 0x6c, 0xaa, 0xc8, 0xdd, 0xb0, 0x96, 0x31, 0x94, 0x02, + 0xe4, 0xfe, 0x5c, 0x51, 0x73, 0xcc, 0xfe, 0xc8, 0xe4, 0x31, 0xb3, 0x00, + 0x00, 0x01, 0x00, 0x44, 0x00, 0x00, 0x02, 0x14, 0x02, 0xe4, 0x00, 0x09, + 0x00, 0x47, 0xba, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x0b, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x04, 0x2f, 0x1b, 0xb9, + 0x00, 0x04, 0x00, 0x21, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x09, 0x2f, 0x1b, 0xb9, 0x00, 0x09, 0x00, 0x11, 0x3e, 0x59, 0xb9, + 0x00, 0x00, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x04, 0x10, 0xb9, 0x00, 0x03, + 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, 0x06, 0xd0, 0x30, + 0x31, 0x37, 0x33, 0x11, 0x23, 0x35, 0x21, 0x11, 0x33, 0x15, 0x21, 0x44, + 0x9e, 0x9e, 0x01, 0x32, 0x9e, 0xfe, 0x30, 0x73, 0x01, 0xfe, 0x73, 0xfd, + 0x8f, 0x73, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1e, 0x00, 0x00, 0x02, 0x3a, + 0x02, 0x10, 0x00, 0x24, 0x00, 0xa7, 0xba, 0x00, 0x09, 0x00, 0x25, 0x00, + 0x26, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x07, 0x2f, 0x1b, 0xb9, 0x00, 0x07, 0x00, + 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0f, 0x2f, + 0x1b, 0xb9, 0x00, 0x0f, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, + 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x1c, 0x2f, 0x1b, 0xb9, + 0x00, 0x1c, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x13, 0x2f, 0x1b, 0xb9, 0x00, 0x13, 0x00, 0x11, 0x3e, 0x59, 0xb8, + 0x00, 0x07, 0x10, 0xb9, 0x00, 0x20, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x03, + 0x00, 0x20, 0x00, 0x07, 0x11, 0x12, 0x39, 0x7d, 0xb8, 0x00, 0x03, 0x2f, + 0x18, 0xb8, 0x00, 0x0f, 0x10, 0xb9, 0x00, 0x17, 0x00, 0x09, 0xf4, 0xba, + 0x00, 0x09, 0x00, 0x17, 0x00, 0x0f, 0x11, 0x12, 0x39, 0x7d, 0xb8, 0x00, + 0x09, 0x2f, 0x18, 0x30, 0x31, 0x33, 0x11, 0x33, 0x15, 0x33, 0x3e, 0x01, + 0x33, 0x32, 0x17, 0x33, 0x3e, 0x03, 0x33, 0x32, 0x15, 0x11, 0x23, 0x11, + 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x11, 0x23, 0x11, 0x34, 0x26, 0x23, + 0x22, 0x06, 0x15, 0x11, 0x1e, 0x77, 0x07, 0x0c, 0x2d, 0x29, 0x4b, 0x11, + 0x06, 0x06, 0x12, 0x1a, 0x24, 0x18, 0x6c, 0x77, 0x19, 0x14, 0x13, 0x1b, + 0x78, 0x17, 0x14, 0x14, 0x1c, 0x02, 0x04, 0x4c, 0x24, 0x34, 0x58, 0x12, + 0x20, 0x18, 0x0e, 0x9f, 0xfe, 0x8f, 0x01, 0x62, 0x24, 0x1d, 0x19, 0x1a, + 0xfe, 0x90, 0x01, 0x62, 0x24, 0x1d, 0x19, 0x1a, 0xfe, 0x90, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x41, 0x00, 0x00, 0x02, 0x1b, 0x02, 0x10, 0x00, 0x19, + 0x00, 0x6b, 0xba, 0x00, 0x13, 0x00, 0x1a, 0x00, 0x1b, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x09, 0x2f, 0x1b, 0xb9, + 0x00, 0x09, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1d, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, + 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x10, + 0x2f, 0x1b, 0xb9, 0x00, 0x10, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x09, + 0x10, 0xb9, 0x00, 0x13, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x03, 0x00, 0x09, + 0x00, 0x13, 0x11, 0x12, 0x39, 0x7d, 0xb8, 0x00, 0x03, 0x2f, 0x18, 0x30, + 0x31, 0x33, 0x11, 0x33, 0x15, 0x33, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, + 0x15, 0x11, 0x23, 0x11, 0x34, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x11, 0x41, + 0x94, 0x06, 0x09, 0x1a, 0x25, 0x31, 0x1f, 0x25, 0x3e, 0x2c, 0x19, 0x94, + 0x57, 0x11, 0x21, 0x1a, 0x0f, 0x02, 0x04, 0x5e, 0x16, 0x26, 0x1d, 0x11, + 0x19, 0x32, 0x48, 0x2f, 0xfe, 0xb2, 0x01, 0x3a, 0x64, 0x09, 0x13, 0x1c, + 0x13, 0xfe, 0xad, 0x00, 0x00, 0x02, 0x00, 0x29, 0xff, 0xf4, 0x02, 0x2f, + 0x02, 0x10, 0x00, 0x13, 0x00, 0x21, 0x00, 0x43, 0xba, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x23, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x14, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, + 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, + 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb9, 0x00, 0x14, + 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x0a, 0x10, 0xb9, 0x00, 0x1b, 0x00, 0x09, + 0xf4, 0x30, 0x31, 0x05, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, + 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, 0x36, 0x3d, 0x01, + 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x2c, 0x3c, + 0x60, 0x43, 0x24, 0x24, 0x43, 0x60, 0x3c, 0x3c, 0x60, 0x43, 0x24, 0x24, + 0x43, 0x60, 0x3c, 0x32, 0x38, 0x38, 0x32, 0x32, 0x38, 0x38, 0x0c, 0x25, + 0x46, 0x64, 0x3f, 0x3f, 0x64, 0x46, 0x25, 0x25, 0x46, 0x64, 0x3f, 0x3f, + 0x64, 0x46, 0x25, 0x6e, 0x3e, 0x39, 0x52, 0x39, 0x3e, 0x3e, 0x39, 0x52, + 0x39, 0x3e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x3b, 0xff, 0x38, 0x02, 0x31, + 0x02, 0x10, 0x00, 0x16, 0x00, 0x24, 0x00, 0x81, 0xba, 0x00, 0x17, 0x00, + 0x25, 0x00, 0x26, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x17, 0x10, 0xb8, 0x00, + 0x10, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, + 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, 0x1d, 0x3e, + 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x16, 0x2f, 0x1b, 0xb9, + 0x00, 0x16, 0x00, 0x13, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x10, 0x2f, 0x1b, 0xb9, 0x00, 0x10, 0x00, 0x11, 0x3e, 0x59, 0xb8, + 0x00, 0x06, 0x10, 0xb9, 0x00, 0x1e, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x02, + 0x00, 0x1e, 0x00, 0x06, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x10, 0x10, 0xb9, + 0x00, 0x17, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x14, 0x00, 0x17, 0x00, 0x10, + 0x11, 0x12, 0x39, 0x30, 0x31, 0x13, 0x33, 0x15, 0x33, 0x3e, 0x01, 0x33, + 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x23, + 0x11, 0x23, 0x13, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, + 0x1d, 0x01, 0x14, 0x16, 0x3b, 0x94, 0x07, 0x13, 0x48, 0x3e, 0x2b, 0x47, + 0x33, 0x1d, 0x1d, 0x33, 0x47, 0x2b, 0x3e, 0x48, 0x13, 0x07, 0x94, 0xf4, + 0x32, 0x36, 0x36, 0x32, 0x27, 0x39, 0x39, 0x02, 0x04, 0x5e, 0x2e, 0x3c, + 0x20, 0x42, 0x66, 0x46, 0x46, 0x66, 0x42, 0x20, 0x3b, 0x2f, 0xfe, 0xda, + 0x01, 0x2f, 0x3d, 0x36, 0x50, 0x36, 0x3d, 0x26, 0x29, 0x98, 0x29, 0x26, + 0x00, 0x02, 0x00, 0x27, 0xff, 0x38, 0x02, 0x1d, 0x02, 0x10, 0x00, 0x18, + 0x00, 0x26, 0x00, 0x81, 0xba, 0x00, 0x19, 0x00, 0x27, 0x00, 0x28, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x19, 0x10, 0xb8, 0x00, 0x04, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x15, 0x2f, 0x1b, 0xb9, 0x00, 0x15, + 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0e, + 0x2f, 0x1b, 0xb9, 0x00, 0x0e, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x04, 0x2f, 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x11, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x18, 0x2f, 0x1b, + 0xb9, 0x00, 0x18, 0x00, 0x13, 0x3e, 0x59, 0xb8, 0x00, 0x04, 0x10, 0xb9, + 0x00, 0x19, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x00, 0x00, 0x19, 0x00, 0x04, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0e, 0x10, 0xb9, 0x00, 0x20, 0x00, 0x09, + 0xf4, 0xba, 0x00, 0x14, 0x00, 0x20, 0x00, 0x0e, 0x11, 0x12, 0x39, 0x30, + 0x31, 0x25, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, + 0x02, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x33, 0x35, 0x33, 0x11, 0x23, 0x03, + 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, + 0x16, 0x01, 0x89, 0x07, 0x14, 0x47, 0x3e, 0x2b, 0x47, 0x33, 0x1d, 0x1d, + 0x33, 0x47, 0x2b, 0x1f, 0x30, 0x25, 0x1b, 0x0a, 0x07, 0x94, 0x94, 0x60, + 0x27, 0x39, 0x39, 0x27, 0x32, 0x36, 0x36, 0x5e, 0x2f, 0x3b, 0x20, 0x42, + 0x66, 0x46, 0x46, 0x66, 0x42, 0x20, 0x10, 0x1c, 0x27, 0x17, 0x5e, 0xfd, + 0x34, 0x01, 0x2f, 0x26, 0x29, 0x98, 0x29, 0x26, 0x3d, 0x36, 0x50, 0x36, + 0x3d, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x4a, 0x00, 0x00, 0x02, 0x32, + 0x02, 0x04, 0x00, 0x16, 0x00, 0x72, 0xba, 0x00, 0x13, 0x00, 0x17, 0x00, + 0x18, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x04, 0x2f, 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0c, 0x2f, 0x1b, 0xb9, 0x00, 0x0c, 0x00, + 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x16, 0x2f, + 0x1b, 0xb9, 0x00, 0x16, 0x00, 0x11, 0x3e, 0x59, 0xb9, 0x00, 0x00, 0x00, + 0x09, 0xf4, 0xb8, 0x00, 0x04, 0x10, 0xb9, 0x00, 0x03, 0x00, 0x09, 0xf4, + 0xba, 0x00, 0x06, 0x00, 0x16, 0x00, 0x0c, 0x11, 0x12, 0x39, 0x7d, 0xb8, + 0x00, 0x06, 0x2f, 0x18, 0xb8, 0x00, 0x0c, 0x10, 0xb9, 0x00, 0x0f, 0x00, + 0x0d, 0xf4, 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, 0x13, 0xd0, 0x30, 0x31, + 0x37, 0x33, 0x11, 0x23, 0x35, 0x21, 0x15, 0x33, 0x3e, 0x03, 0x3b, 0x01, + 0x15, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x33, 0x15, 0x21, 0x4a, 0x77, 0x77, + 0x01, 0x0b, 0x07, 0x07, 0x19, 0x27, 0x38, 0x26, 0x31, 0x6e, 0x37, 0x38, + 0xaa, 0xfe, 0x4b, 0x73, 0x01, 0x1e, 0x73, 0x92, 0x1c, 0x35, 0x29, 0x18, + 0x88, 0x41, 0x2f, 0x99, 0x73, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x31, + 0xff, 0xf4, 0x02, 0x16, 0x02, 0x10, 0x00, 0x2a, 0x00, 0x6f, 0xba, 0x00, + 0x07, 0x00, 0x2b, 0x00, 0x2c, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x16, 0x2f, 0x1b, 0xb9, 0x00, 0x16, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x16, 0x10, 0xb9, + 0x00, 0x1d, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x0e, 0x00, 0x1d, 0x00, 0x00, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x07, 0x00, 0x09, + 0xf4, 0xba, 0x00, 0x04, 0x00, 0x0e, 0x00, 0x07, 0x11, 0x12, 0x39, 0xba, + 0x00, 0x22, 0x00, 0x07, 0x00, 0x16, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x22, + 0x2f, 0xba, 0x00, 0x1a, 0x00, 0x1d, 0x00, 0x22, 0x11, 0x12, 0x39, 0x30, + 0x31, 0x05, 0x22, 0x26, 0x27, 0x37, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x35, + 0x34, 0x26, 0x2f, 0x01, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, + 0x17, 0x07, 0x2e, 0x01, 0x23, 0x22, 0x15, 0x14, 0x16, 0x1f, 0x01, 0x1e, + 0x03, 0x15, 0x14, 0x06, 0x01, 0x26, 0x56, 0x7f, 0x20, 0x53, 0x1e, 0x51, + 0x34, 0x2c, 0x32, 0x22, 0x1e, 0x53, 0x23, 0x3c, 0x2c, 0x1a, 0x7c, 0x70, + 0x4c, 0x6b, 0x20, 0x4a, 0x17, 0x48, 0x33, 0x56, 0x22, 0x1e, 0x52, 0x23, + 0x3c, 0x2d, 0x1a, 0x7d, 0x0c, 0x34, 0x2d, 0x4d, 0x21, 0x25, 0x1b, 0x1c, + 0x16, 0x11, 0x05, 0x0d, 0x05, 0x15, 0x24, 0x34, 0x25, 0x51, 0x5c, 0x29, + 0x26, 0x54, 0x19, 0x22, 0x34, 0x17, 0x11, 0x05, 0x0d, 0x05, 0x15, 0x24, + 0x34, 0x25, 0x51, 0x5e, 0x00, 0x01, 0x00, 0x2a, 0x00, 0x00, 0x02, 0x13, + 0x02, 0xba, 0x00, 0x13, 0x00, 0x64, 0xba, 0x00, 0x11, 0x00, 0x14, 0x00, + 0x15, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x0b, 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, + 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, + 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x06, 0x10, + 0xb9, 0x00, 0x05, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x06, 0x10, 0xb8, 0x00, + 0x0d, 0xd0, 0xb8, 0x00, 0x05, 0x10, 0xb8, 0x00, 0x10, 0xd0, 0xb8, 0x00, + 0x00, 0x10, 0xb9, 0x00, 0x11, 0x00, 0x09, 0xf4, 0x30, 0x31, 0x21, 0x22, + 0x26, 0x3d, 0x01, 0x23, 0x35, 0x33, 0x32, 0x36, 0x3d, 0x01, 0x33, 0x15, + 0x33, 0x15, 0x23, 0x11, 0x33, 0x15, 0x01, 0x54, 0x50, 0x4e, 0x8c, 0x5b, + 0x21, 0x1c, 0x88, 0xc9, 0xc9, 0xc9, 0x54, 0x41, 0xfc, 0x73, 0x1a, 0x23, + 0x79, 0xb6, 0x73, 0xfe, 0xe2, 0x73, 0x00, 0x00, 0x00, 0x01, 0x00, 0x3d, + 0xff, 0xf4, 0x02, 0x17, 0x02, 0x04, 0x00, 0x17, 0x00, 0x69, 0xba, 0x00, + 0x0e, 0x00, 0x18, 0x00, 0x19, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x14, 0x2f, 0x1b, + 0xb9, 0x00, 0x14, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x04, 0x2f, 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x11, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x17, 0x2f, 0x1b, 0xb9, 0x00, + 0x17, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x04, 0x10, 0xb9, 0x00, 0x0e, + 0x00, 0x09, 0xf4, 0xba, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x04, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x00, 0x2f, 0x30, 0x31, 0x25, 0x23, 0x0e, 0x01, 0x23, + 0x22, 0x2e, 0x02, 0x35, 0x11, 0x33, 0x11, 0x14, 0x33, 0x32, 0x3e, 0x02, + 0x35, 0x11, 0x33, 0x11, 0x23, 0x01, 0x83, 0x06, 0x11, 0x49, 0x3e, 0x25, + 0x3e, 0x2c, 0x19, 0x94, 0x57, 0x11, 0x21, 0x19, 0x10, 0x94, 0x94, 0x5e, + 0x2c, 0x3e, 0x19, 0x32, 0x48, 0x2f, 0x01, 0x4e, 0xfe, 0xc6, 0x64, 0x09, + 0x13, 0x1c, 0x13, 0x01, 0x53, 0xfd, 0xfc, 0x00, 0x00, 0x01, 0x00, 0x1b, + 0x00, 0x00, 0x02, 0x3d, 0x02, 0x04, 0x00, 0x09, 0x00, 0x44, 0xba, 0x00, + 0x04, 0x00, 0x0a, 0x00, 0x0b, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, 0x1b, + 0xb9, 0x00, 0x08, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, + 0xb8, 0x00, 0x05, 0xd0, 0x30, 0x31, 0x33, 0x03, 0x33, 0x1f, 0x01, 0x33, + 0x3f, 0x01, 0x33, 0x03, 0xd4, 0xb9, 0x9c, 0x43, 0x31, 0x08, 0x31, 0x43, + 0x96, 0xb9, 0x02, 0x04, 0xdd, 0xac, 0xac, 0xdd, 0xfd, 0xfc, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x07, 0x00, 0x00, 0x02, 0x51, 0x02, 0x04, 0x00, 0x0f, + 0x00, 0x7a, 0xba, 0x00, 0x0d, 0x00, 0x10, 0x00, 0x11, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, + 0x00, 0x00, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x04, 0x2f, 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x1d, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, + 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0f, + 0x2f, 0x1b, 0xb9, 0x00, 0x0f, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x0b, 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, 0x11, + 0x3e, 0x59, 0xb8, 0x00, 0x0f, 0x10, 0xb8, 0x00, 0x02, 0xd0, 0xb8, 0x00, + 0x02, 0x2f, 0xb8, 0x00, 0x06, 0xd0, 0xb8, 0x00, 0x04, 0x10, 0xb8, 0x00, + 0x0d, 0xd0, 0x30, 0x31, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, + 0x13, 0x33, 0x03, 0x23, 0x03, 0x23, 0x03, 0x23, 0x07, 0x7b, 0x25, 0x0a, + 0x3d, 0x82, 0x3c, 0x0a, 0x26, 0x75, 0x3d, 0xb0, 0x33, 0x0a, 0x33, 0xb0, + 0x02, 0x04, 0xfe, 0x5e, 0x01, 0xa2, 0xfe, 0x5e, 0x01, 0xa2, 0xfd, 0xfc, + 0x01, 0x64, 0xfe, 0x9c, 0x00, 0x01, 0x00, 0x17, 0x00, 0x00, 0x02, 0x41, + 0x02, 0x04, 0x00, 0x11, 0x00, 0x77, 0xba, 0x00, 0x05, 0x00, 0x12, 0x00, + 0x13, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x02, 0x2f, 0x1b, 0xb9, 0x00, 0x02, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, + 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, + 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x0c, 0x2f, 0x1b, 0xb9, 0x00, 0x0c, 0x00, 0x11, 0x3e, + 0x59, 0xba, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x11, 0x12, 0x39, 0xba, + 0x00, 0x0e, 0x00, 0x08, 0x00, 0x0c, 0x11, 0x12, 0x39, 0xba, 0x00, 0x01, + 0x00, 0x05, 0x00, 0x0e, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x01, 0x10, 0xb8, + 0x00, 0x0a, 0xd0, 0x30, 0x31, 0x33, 0x13, 0x27, 0x33, 0x1f, 0x01, 0x33, + 0x3f, 0x01, 0x33, 0x07, 0x13, 0x23, 0x2f, 0x01, 0x23, 0x0f, 0x01, 0x17, + 0xc1, 0xb4, 0xa9, 0x37, 0x2a, 0x08, 0x2b, 0x38, 0x9b, 0xb4, 0xc1, 0xaa, + 0x41, 0x2d, 0x08, 0x2c, 0x42, 0x01, 0x06, 0xfe, 0x53, 0x43, 0x43, 0x53, + 0xf6, 0xfe, 0xf2, 0x61, 0x45, 0x45, 0x61, 0x00, 0x00, 0x01, 0x00, 0x13, + 0xff, 0x38, 0x02, 0x45, 0x02, 0x04, 0x00, 0x0f, 0x00, 0x58, 0xba, 0x00, + 0x0d, 0x00, 0x10, 0x00, 0x11, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, 0x13, 0x3e, 0x59, + 0xb9, 0x00, 0x07, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x0d, 0x00, 0x0a, 0x00, + 0x06, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0d, 0x10, 0xb8, 0x00, 0x09, 0xd0, + 0x30, 0x31, 0x01, 0x33, 0x03, 0x0e, 0x01, 0x2b, 0x01, 0x35, 0x33, 0x37, + 0x03, 0x33, 0x1f, 0x01, 0x33, 0x37, 0x01, 0xae, 0x97, 0xf3, 0x17, 0x4c, + 0x42, 0x66, 0x7c, 0x20, 0xd0, 0x9f, 0x4b, 0x2f, 0x08, 0x2d, 0x02, 0x04, + 0xfd, 0xa9, 0x39, 0x3c, 0x73, 0x58, 0x02, 0x01, 0xd9, 0x96, 0x96, 0x00, + 0x00, 0x01, 0x00, 0x42, 0x00, 0x00, 0x02, 0x16, 0x02, 0x04, 0x00, 0x09, + 0x00, 0x53, 0xba, 0x00, 0x02, 0x00, 0x0a, 0x00, 0x0b, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x04, 0x2f, 0x1b, 0xb9, + 0x00, 0x04, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x09, 0x2f, 0x1b, 0xb9, 0x00, 0x09, 0x00, 0x11, 0x3e, 0x59, 0xb9, + 0x00, 0x08, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x04, 0x10, 0xb9, 0x00, 0x03, + 0x00, 0x09, 0xf4, 0xba, 0x00, 0x01, 0x00, 0x08, 0x00, 0x03, 0x11, 0x12, + 0x39, 0xba, 0x00, 0x06, 0x00, 0x03, 0x00, 0x08, 0x11, 0x12, 0x39, 0x30, + 0x31, 0x33, 0x35, 0x01, 0x21, 0x35, 0x21, 0x15, 0x01, 0x21, 0x15, 0x42, + 0x01, 0x1f, 0xfe, 0xeb, 0x01, 0xc0, 0xfe, 0xe1, 0x01, 0x29, 0x7b, 0x01, + 0x16, 0x73, 0x7b, 0xfe, 0xea, 0x73, 0x00, 0x00, 0x00, 0x01, 0x00, 0x5c, + 0xff, 0x76, 0x01, 0xfc, 0x02, 0xf8, 0x00, 0x3b, 0x00, 0x47, 0xba, 0x00, + 0x2f, 0x00, 0x3c, 0x00, 0x3d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x21, + 0x2f, 0xb8, 0x00, 0x00, 0x2f, 0xb8, 0x00, 0x21, 0x10, 0xb9, 0x00, 0x24, + 0x00, 0x09, 0xf4, 0xba, 0x00, 0x0f, 0x00, 0x24, 0x00, 0x00, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x0f, 0x2f, 0xb9, 0x00, 0x12, 0x00, 0x09, 0xf4, 0xba, + 0x00, 0x2e, 0x00, 0x12, 0x00, 0x0f, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x00, + 0x10, 0xb9, 0x00, 0x39, 0x00, 0x09, 0xf4, 0x30, 0x31, 0x05, 0x22, 0x26, + 0x3d, 0x01, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x01, 0x35, 0x34, 0x26, 0x2b, + 0x01, 0x35, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x27, 0x2e, 0x03, 0x3d, + 0x01, 0x34, 0x36, 0x3b, 0x01, 0x15, 0x23, 0x15, 0x14, 0x16, 0x17, 0x1e, + 0x01, 0x15, 0x14, 0x06, 0x07, 0x15, 0x1e, 0x01, 0x15, 0x14, 0x06, 0x07, + 0x0e, 0x01, 0x1d, 0x01, 0x33, 0x15, 0x01, 0x4a, 0x44, 0x3a, 0x0b, 0x10, + 0x14, 0x09, 0x11, 0x0d, 0x36, 0x36, 0x5a, 0x5a, 0x36, 0x36, 0x0d, 0x11, + 0x09, 0x14, 0x10, 0x0b, 0x3a, 0x44, 0xb2, 0xb9, 0x19, 0x0f, 0x11, 0x1e, + 0x3a, 0x3c, 0x3c, 0x3a, 0x1e, 0x11, 0x0f, 0x19, 0xb9, 0x8a, 0x3d, 0x2f, + 0x2d, 0x19, 0x26, 0x1e, 0x17, 0x0b, 0x14, 0x1d, 0x10, 0x1a, 0x1c, 0x64, + 0x1c, 0x1a, 0x10, 0x1d, 0x14, 0x0a, 0x18, 0x1e, 0x26, 0x19, 0x2d, 0x2f, + 0x3d, 0x63, 0x30, 0x26, 0x28, 0x14, 0x15, 0x30, 0x20, 0x2a, 0x32, 0x07, + 0x08, 0x07, 0x32, 0x2a, 0x20, 0x30, 0x15, 0x14, 0x28, 0x26, 0x30, 0x63, + 0x00, 0x01, 0x00, 0xed, 0xff, 0x76, 0x01, 0x6b, 0x02, 0xf8, 0x00, 0x03, + 0x00, 0x15, 0xba, 0x00, 0x00, 0x00, 0x04, 0x00, 0x05, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x01, 0x2f, 0xb8, 0x00, 0x00, 0x2f, 0x30, 0x31, 0x17, + 0x11, 0x33, 0x11, 0xed, 0x7e, 0x8a, 0x03, 0x82, 0xfc, 0x7e, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x5c, 0xff, 0x76, 0x01, 0xfc, 0x02, 0xf8, 0x00, 0x3b, + 0x00, 0x47, 0xba, 0x00, 0x2e, 0x00, 0x3c, 0x00, 0x3d, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x3b, 0x2f, 0xb8, 0x00, 0x22, 0x2f, 0xb8, 0x00, 0x3b, + 0x10, 0xb9, 0x00, 0x3a, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x12, 0x00, 0x3a, + 0x00, 0x22, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x12, 0x2f, 0xb9, 0x00, 0x0f, + 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x22, 0x10, 0xb9, 0x00, 0x23, 0x00, 0x09, + 0xf4, 0xba, 0x00, 0x2e, 0x00, 0x0f, 0x00, 0x12, 0x11, 0x12, 0x39, 0x30, + 0x31, 0x01, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x0e, 0x02, 0x07, 0x0e, 0x01, + 0x15, 0x14, 0x16, 0x3b, 0x01, 0x15, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, + 0x17, 0x1e, 0x03, 0x1d, 0x01, 0x14, 0x06, 0x2b, 0x01, 0x35, 0x33, 0x35, + 0x34, 0x26, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x35, 0x2e, 0x01, + 0x35, 0x34, 0x36, 0x37, 0x3e, 0x01, 0x3d, 0x01, 0x23, 0x35, 0x01, 0x0e, + 0x44, 0x3a, 0x0b, 0x10, 0x14, 0x09, 0x11, 0x0d, 0x36, 0x36, 0x5a, 0x5a, + 0x36, 0x36, 0x0d, 0x11, 0x09, 0x14, 0x10, 0x0b, 0x3a, 0x44, 0xb2, 0xb9, + 0x19, 0x0f, 0x11, 0x1e, 0x3a, 0x3c, 0x3c, 0x3a, 0x1e, 0x11, 0x0f, 0x19, + 0xb9, 0x02, 0xf8, 0x3d, 0x2f, 0x2d, 0x19, 0x26, 0x1e, 0x18, 0x0a, 0x14, + 0x1d, 0x10, 0x1a, 0x1c, 0x64, 0x1c, 0x1a, 0x10, 0x1d, 0x14, 0x0b, 0x17, + 0x1e, 0x26, 0x19, 0x2d, 0x2f, 0x3d, 0x63, 0x30, 0x26, 0x28, 0x14, 0x15, + 0x30, 0x20, 0x2a, 0x32, 0x07, 0x08, 0x07, 0x32, 0x2a, 0x20, 0x30, 0x15, + 0x14, 0x28, 0x26, 0x30, 0x63, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, + 0x00, 0xad, 0x02, 0x34, 0x01, 0xb4, 0x00, 0x19, 0x00, 0x49, 0xba, 0x00, + 0x03, 0x00, 0x1a, 0x00, 0x1b, 0x11, 0x12, 0x39, 0x00, 0xbb, 0x00, 0x06, + 0x00, 0x09, 0x00, 0x0d, 0x00, 0x04, 0x2b, 0xb8, 0x00, 0x06, 0x10, 0xb8, + 0x00, 0x00, 0xdc, 0xba, 0x00, 0x09, 0x00, 0x06, 0x00, 0x00, 0x11, 0x12, + 0x39, 0x7d, 0xb8, 0x00, 0x09, 0x2f, 0x18, 0xb8, 0x00, 0x00, 0x10, 0xb9, + 0x00, 0x13, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x16, 0x00, 0x0d, 0x00, 0x13, + 0x11, 0x12, 0x39, 0x7c, 0xb8, 0x00, 0x16, 0x2f, 0x18, 0x30, 0x31, 0x25, + 0x22, 0x26, 0x27, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, + 0x33, 0x32, 0x16, 0x17, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x37, 0x17, 0x0e, + 0x01, 0x01, 0x88, 0x29, 0x3c, 0x1b, 0x14, 0x1a, 0x11, 0x19, 0x19, 0x09, + 0x6a, 0x10, 0x55, 0x47, 0x29, 0x3c, 0x1b, 0x14, 0x1a, 0x11, 0x19, 0x19, + 0x09, 0x6a, 0x10, 0x55, 0xad, 0x26, 0x26, 0x1e, 0x22, 0x44, 0x3c, 0x14, + 0x7a, 0x6d, 0x26, 0x26, 0x1e, 0x22, 0x44, 0x3c, 0x14, 0x7a, 0x6d, 0x00, + 0x00, 0x02, 0x00, 0xca, 0xff, 0x4a, 0x01, 0x8e, 0x02, 0x10, 0x00, 0x05, + 0x00, 0x13, 0x00, 0x32, 0xba, 0x00, 0x06, 0x00, 0x14, 0x00, 0x15, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x06, 0x10, 0xb8, 0x00, 0x02, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0d, 0x2f, 0x1b, 0xb9, 0x00, 0x0d, + 0x00, 0x1d, 0x3e, 0x59, 0xb9, 0x00, 0x06, 0x00, 0x0a, 0xf4, 0xb9, 0x00, + 0x03, 0x00, 0x08, 0xf4, 0x30, 0x31, 0x17, 0x35, 0x37, 0x33, 0x17, 0x15, + 0x03, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, + 0x14, 0x06, 0xdb, 0x39, 0x30, 0x39, 0x51, 0x35, 0x2d, 0x2c, 0x36, 0x36, + 0x2c, 0x2d, 0xb6, 0xcb, 0xfc, 0xfc, 0xcb, 0x02, 0x0b, 0x2d, 0x20, 0x20, + 0x20, 0x2e, 0x2e, 0x20, 0x20, 0x20, 0x2d, 0x00, 0x00, 0x02, 0x00, 0x3c, + 0xff, 0x8e, 0x02, 0x1f, 0x02, 0x76, 0x00, 0x1a, 0x00, 0x22, 0x00, 0x73, + 0xba, 0x00, 0x1e, 0x00, 0x23, 0x00, 0x24, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x1e, 0x10, 0xb8, 0x00, 0x01, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x07, 0x2f, 0x1b, 0xb9, 0x00, 0x07, 0x00, 0x1d, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, + 0x01, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x07, 0x10, 0xb8, 0x00, 0x09, + 0xdc, 0xb8, 0x00, 0x07, 0x10, 0xb8, 0x00, 0x0a, 0xd0, 0xb8, 0x00, 0x07, + 0x10, 0xb9, 0x00, 0x1f, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x11, 0xd0, 0xb8, + 0x00, 0x01, 0x10, 0xb9, 0x00, 0x1e, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x12, + 0xd0, 0xb8, 0x00, 0x01, 0x10, 0xb8, 0x00, 0x19, 0xd0, 0xb8, 0x00, 0x01, + 0x10, 0xb8, 0x00, 0x1a, 0xdc, 0x30, 0x31, 0x05, 0x35, 0x2e, 0x01, 0x35, + 0x34, 0x36, 0x37, 0x35, 0x33, 0x15, 0x1e, 0x01, 0x17, 0x07, 0x2e, 0x01, + 0x27, 0x11, 0x3e, 0x01, 0x37, 0x17, 0x0e, 0x01, 0x07, 0x15, 0x03, 0x14, + 0x16, 0x17, 0x11, 0x0e, 0x01, 0x15, 0x01, 0x02, 0x5e, 0x68, 0x68, 0x5e, + 0x72, 0x3e, 0x4e, 0x17, 0x6b, 0x0a, 0x20, 0x17, 0x1a, 0x25, 0x0c, 0x69, + 0x17, 0x54, 0x40, 0xaa, 0x21, 0x21, 0x20, 0x22, 0x72, 0x6c, 0x11, 0x8a, + 0x6d, 0x6d, 0x8a, 0x11, 0x6c, 0x6a, 0x0a, 0x40, 0x30, 0x3a, 0x15, 0x24, + 0x0a, 0xfe, 0xcd, 0x09, 0x25, 0x17, 0x3b, 0x30, 0x40, 0x0a, 0x6a, 0x01, + 0x4a, 0x27, 0x39, 0x0e, 0x01, 0x30, 0x0d, 0x39, 0x28, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x2e, 0x00, 0x00, 0x02, 0x2f, 0x02, 0xc6, 0x00, 0x2a, + 0x00, 0x63, 0xba, 0x00, 0x22, 0x00, 0x2b, 0x00, 0x2c, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x11, 0x2f, 0x1b, 0xb9, + 0x00, 0x11, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb8, + 0x00, 0x11, 0x10, 0xb9, 0x00, 0x18, 0x00, 0x0d, 0xf4, 0xb8, 0x00, 0x00, + 0x10, 0xb9, 0x00, 0x28, 0x00, 0x0d, 0xf4, 0xba, 0x00, 0x07, 0x00, 0x18, + 0x00, 0x28, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x07, 0x2f, 0xb9, 0x00, 0x08, + 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x1e, 0xd0, 0xb8, 0x00, 0x07, 0x10, 0xb8, + 0x00, 0x21, 0xd0, 0x30, 0x31, 0x33, 0x35, 0x3e, 0x01, 0x35, 0x34, 0x27, + 0x23, 0x35, 0x33, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, + 0x17, 0x07, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x17, 0x33, + 0x15, 0x23, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x15, 0x21, 0x15, 0x45, 0x28, + 0x2d, 0x01, 0x6b, 0x47, 0x0c, 0x13, 0x24, 0x41, 0x5c, 0x38, 0x4c, 0x6e, + 0x26, 0x63, 0x17, 0x37, 0x2a, 0x2f, 0x36, 0x11, 0x0b, 0xaf, 0x8c, 0x0e, + 0x17, 0x1c, 0x0d, 0x01, 0x49, 0x88, 0x11, 0x3e, 0x2a, 0x08, 0x04, 0x6e, + 0x1c, 0x3d, 0x24, 0x2e, 0x4c, 0x36, 0x1e, 0x36, 0x33, 0x5d, 0x1e, 0x27, + 0x35, 0x30, 0x1c, 0x31, 0x18, 0x6e, 0x07, 0x1a, 0x28, 0x1e, 0x16, 0x07, + 0x09, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x2e, 0x00, 0x10, 0x02, 0x2a, + 0x02, 0xaa, 0x00, 0x1f, 0x00, 0x2d, 0x00, 0x95, 0xba, 0x00, 0x00, 0x00, + 0x2e, 0x00, 0x2f, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x20, 0xd0, 0x00, 0xb8, + 0x00, 0x10, 0x2f, 0x41, 0x03, 0x00, 0x20, 0x00, 0x10, 0x00, 0x01, 0x5d, + 0xba, 0x00, 0x00, 0x00, 0x10, 0x00, 0x2e, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x00, 0x2f, 0x41, 0x05, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, + 0x00, 0x02, 0x5d, 0xb8, 0x00, 0x10, 0x10, 0xb9, 0x00, 0x27, 0x00, 0x09, + 0xf4, 0xba, 0x00, 0x02, 0x00, 0x00, 0x00, 0x27, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x02, 0x10, 0xb8, 0x00, 0x05, 0xd0, 0xb8, 0x00, 0x00, 0x10, 0xb9, + 0x00, 0x20, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x0e, 0x00, 0x10, 0x00, 0x20, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0e, 0x10, 0xb8, 0x00, 0x0b, 0xd0, 0xba, + 0x00, 0x12, 0x00, 0x10, 0x00, 0x20, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x12, + 0x10, 0xb8, 0x00, 0x15, 0xd0, 0xba, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x27, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x1e, 0x10, 0xb8, 0x00, 0x1b, 0xd0, 0x30, + 0x31, 0x25, 0x22, 0x27, 0x07, 0x27, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x36, + 0x37, 0x27, 0x37, 0x17, 0x36, 0x33, 0x32, 0x17, 0x37, 0x17, 0x07, 0x1e, + 0x01, 0x15, 0x14, 0x06, 0x07, 0x17, 0x07, 0x27, 0x06, 0x27, 0x32, 0x36, + 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, + 0x2c, 0x31, 0x2a, 0x3e, 0x65, 0x42, 0x18, 0x1b, 0x1b, 0x18, 0x42, 0x65, + 0x3e, 0x2a, 0x31, 0x31, 0x2a, 0x3e, 0x65, 0x42, 0x18, 0x1b, 0x1b, 0x18, + 0x42, 0x65, 0x3e, 0x2a, 0x31, 0x2b, 0x30, 0x30, 0x2b, 0x2b, 0x30, 0x30, + 0x6b, 0x0e, 0x69, 0x3b, 0x70, 0x1f, 0x51, 0x32, 0x32, 0x51, 0x1f, 0x70, + 0x3b, 0x69, 0x0e, 0x0e, 0x69, 0x3b, 0x70, 0x1f, 0x51, 0x32, 0x32, 0x51, + 0x1f, 0x70, 0x3b, 0x69, 0x0e, 0x6b, 0x38, 0x33, 0x38, 0x33, 0x38, 0x38, + 0x33, 0x38, 0x33, 0x38, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x58, + 0x02, 0xba, 0x00, 0x13, 0x00, 0x76, 0xba, 0x00, 0x08, 0x00, 0x14, 0x00, + 0x15, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, 0x00, + 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x13, 0x2f, + 0x1b, 0xb9, 0x00, 0x13, 0x00, 0x11, 0x3e, 0x59, 0xb9, 0x00, 0x00, 0x00, + 0x09, 0xf4, 0xba, 0x00, 0x03, 0x00, 0x06, 0x00, 0x13, 0x11, 0x12, 0x39, + 0xb8, 0x00, 0x03, 0x10, 0xb9, 0x00, 0x04, 0x00, 0x09, 0xf4, 0xb8, 0x00, + 0x08, 0xd0, 0xb8, 0x00, 0x04, 0x10, 0xb8, 0x00, 0x0c, 0xd0, 0xb8, 0x00, + 0x03, 0x10, 0xb8, 0x00, 0x0f, 0xd0, 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, + 0x10, 0xd0, 0x30, 0x31, 0x37, 0x33, 0x35, 0x23, 0x35, 0x33, 0x03, 0x33, + 0x13, 0x33, 0x13, 0x33, 0x03, 0x33, 0x15, 0x23, 0x15, 0x33, 0x15, 0x21, + 0x38, 0xad, 0xad, 0x68, 0xa0, 0x9c, 0x8d, 0x0a, 0x8e, 0x97, 0x9f, 0x67, + 0xad, 0xad, 0xfe, 0x18, 0x71, 0x6c, 0x71, 0x01, 0x6c, 0xfe, 0x94, 0x01, + 0x6c, 0xfe, 0x94, 0x71, 0x6c, 0x71, 0x00, 0x00, 0x00, 0x02, 0x00, 0xed, + 0xff, 0x76, 0x01, 0x6b, 0x02, 0xf8, 0x00, 0x03, 0x00, 0x07, 0x00, 0x25, + 0xba, 0x00, 0x04, 0x00, 0x08, 0x00, 0x09, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x04, 0x10, 0xb8, 0x00, 0x00, 0xd0, 0x00, 0xb8, 0x00, 0x01, 0x2f, 0xb8, + 0x00, 0x04, 0x2f, 0xba, 0x00, 0x00, 0x00, 0x05, 0x00, 0x03, 0x2b, 0x30, + 0x31, 0x13, 0x11, 0x33, 0x11, 0x03, 0x11, 0x33, 0x11, 0xed, 0x7e, 0x7e, + 0x7e, 0x01, 0x91, 0x01, 0x67, 0xfe, 0x99, 0xfd, 0xe5, 0x01, 0x67, 0xfe, + 0x99, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x41, 0xff, 0x50, 0x02, 0x1e, + 0x02, 0xc6, 0x00, 0x3d, 0x00, 0x51, 0x00, 0x7a, 0xba, 0x00, 0x12, 0x00, + 0x52, 0x00, 0x53, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x12, 0x10, 0xb8, 0x00, + 0x4b, 0xd0, 0x00, 0xb8, 0x00, 0x05, 0x2f, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x24, 0x2f, 0x1b, 0xb9, 0x00, 0x24, 0x00, 0x1f, 0x3e, 0x59, + 0xb8, 0x00, 0x05, 0x10, 0xb9, 0x00, 0x0c, 0x00, 0x09, 0xf4, 0xb8, 0x00, + 0x24, 0x10, 0xb9, 0x00, 0x2b, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x12, 0x00, + 0x2b, 0x00, 0x05, 0x11, 0x12, 0x39, 0xba, 0x00, 0x31, 0x00, 0x24, 0x00, + 0x0c, 0x11, 0x12, 0x39, 0xba, 0x00, 0x45, 0x00, 0x2b, 0x00, 0x05, 0x11, + 0x12, 0x39, 0xba, 0x00, 0x1c, 0x00, 0x31, 0x00, 0x45, 0x11, 0x12, 0x39, + 0xba, 0x00, 0x4f, 0x00, 0x24, 0x00, 0x0c, 0x11, 0x12, 0x39, 0xba, 0x00, + 0x3a, 0x00, 0x4f, 0x00, 0x12, 0x11, 0x12, 0x39, 0x30, 0x31, 0x25, 0x14, + 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x37, 0x1e, 0x01, 0x33, 0x32, 0x36, + 0x35, 0x34, 0x26, 0x2f, 0x01, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x37, 0x35, + 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x17, 0x07, 0x2e, + 0x01, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x1f, 0x01, 0x1e, 0x03, 0x15, + 0x14, 0x06, 0x07, 0x15, 0x1e, 0x01, 0x27, 0x34, 0x26, 0x2f, 0x01, 0x2e, + 0x01, 0x27, 0x0e, 0x01, 0x15, 0x14, 0x16, 0x1f, 0x01, 0x1e, 0x01, 0x17, + 0x3e, 0x01, 0x01, 0xff, 0x21, 0x3a, 0x52, 0x31, 0x34, 0x69, 0x2c, 0x49, + 0x1a, 0x41, 0x26, 0x2c, 0x34, 0x2b, 0x2e, 0x4e, 0x2b, 0x3b, 0x24, 0x10, + 0x35, 0x39, 0x2a, 0x25, 0x21, 0x3a, 0x52, 0x31, 0x34, 0x69, 0x2c, 0x49, + 0x1a, 0x41, 0x26, 0x2c, 0x34, 0x2b, 0x2e, 0x4e, 0x2b, 0x3b, 0x24, 0x10, + 0x35, 0x39, 0x2a, 0x25, 0x5c, 0x21, 0x32, 0x4d, 0x09, 0x10, 0x08, 0x12, + 0x14, 0x21, 0x32, 0x4d, 0x09, 0x10, 0x08, 0x12, 0x14, 0x03, 0x29, 0x42, + 0x2f, 0x19, 0x20, 0x28, 0x58, 0x1a, 0x1d, 0x25, 0x1f, 0x1b, 0x1f, 0x0c, + 0x15, 0x0c, 0x21, 0x27, 0x2c, 0x16, 0x2b, 0x47, 0x17, 0x10, 0x1a, 0x48, + 0x2a, 0x29, 0x42, 0x2f, 0x19, 0x20, 0x28, 0x58, 0x1a, 0x1d, 0x25, 0x1f, + 0x1b, 0x1f, 0x0c, 0x15, 0x0c, 0x21, 0x27, 0x2c, 0x16, 0x2b, 0x47, 0x17, + 0x10, 0x1a, 0x48, 0xcf, 0x1a, 0x2a, 0x0e, 0x15, 0x02, 0x06, 0x03, 0x14, + 0x29, 0x17, 0x1a, 0x2a, 0x0e, 0x15, 0x02, 0x06, 0x03, 0x14, 0x29, 0x00, + 0x00, 0x02, 0x00, 0x6e, 0x02, 0x4f, 0x01, 0xea, 0x02, 0xe6, 0x00, 0x0d, + 0x00, 0x1b, 0x00, 0x6c, 0xba, 0x00, 0x0b, 0x00, 0x1c, 0x00, 0x1d, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x0b, 0x10, 0xb8, 0x00, 0x11, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x2f, 0x41, 0x03, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x5d, + 0x41, 0x03, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x01, 0x5d, 0x41, 0x03, 0x00, + 0x90, 0x00, 0x00, 0x00, 0x01, 0x5d, 0xb9, 0x00, 0x07, 0x00, 0x07, 0xf4, + 0x41, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x10, 0x00, 0x07, 0x00, 0x20, + 0x00, 0x07, 0x00, 0x03, 0x5d, 0x41, 0x07, 0x00, 0x60, 0x00, 0x07, 0x00, + 0x70, 0x00, 0x07, 0x00, 0x80, 0x00, 0x07, 0x00, 0x03, 0x5d, 0xb8, 0x00, + 0x00, 0x10, 0xb8, 0x00, 0x0e, 0xd0, 0xb8, 0x00, 0x07, 0x10, 0xb8, 0x00, + 0x15, 0xd0, 0x30, 0x31, 0x13, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, + 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x33, 0x22, 0x26, 0x3d, 0x01, 0x34, + 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0xbe, 0x2d, 0x23, 0x23, + 0x2d, 0x2d, 0x24, 0x24, 0xaf, 0x2d, 0x24, 0x24, 0x2d, 0x2d, 0x23, 0x23, + 0x02, 0x4f, 0x25, 0x1a, 0x1a, 0x1a, 0x24, 0x24, 0x1a, 0x1a, 0x1a, 0x25, + 0x25, 0x1a, 0x1a, 0x1a, 0x24, 0x24, 0x1a, 0x1a, 0x1a, 0x25, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x12, 0x02, 0x58, 0x02, 0xa8, 0x00, 0x13, + 0x00, 0x29, 0x00, 0x4a, 0x00, 0x6d, 0xba, 0x00, 0x00, 0x00, 0x4b, 0x00, + 0x4c, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x14, 0xd0, 0xb8, 0x00, 0x00, 0x10, + 0xb8, 0x00, 0x2a, 0xd0, 0x00, 0xb8, 0x00, 0x0a, 0x2f, 0xb8, 0x00, 0x00, + 0x2f, 0xb9, 0x00, 0x14, 0x00, 0x04, 0xf4, 0xb8, 0x00, 0x0a, 0x10, 0xb9, + 0x00, 0x1f, 0x00, 0x04, 0xf4, 0xb8, 0x00, 0x14, 0x10, 0xb8, 0x00, 0x2a, + 0xdc, 0xb8, 0x00, 0x1f, 0x10, 0xb8, 0x00, 0x34, 0xdc, 0xb9, 0x00, 0x3b, + 0x00, 0x01, 0xf4, 0xb8, 0x00, 0x2a, 0x10, 0xb9, 0x00, 0x42, 0x00, 0x01, + 0xf4, 0xba, 0x00, 0x38, 0x00, 0x3b, 0x00, 0x42, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x38, 0x2f, 0xba, 0x00, 0x45, 0x00, 0x3b, 0x00, 0x42, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x45, 0x2f, 0x30, 0x31, 0x25, 0x22, 0x2e, 0x02, 0x35, + 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, + 0x32, 0x3e, 0x02, 0x3d, 0x01, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, + 0x1d, 0x01, 0x14, 0x1e, 0x02, 0x37, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, + 0x02, 0x33, 0x32, 0x16, 0x17, 0x07, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x1d, + 0x01, 0x14, 0x16, 0x33, 0x32, 0x36, 0x37, 0x17, 0x0e, 0x03, 0x01, 0x2c, + 0x3f, 0x6d, 0x51, 0x2f, 0x2f, 0x51, 0x6d, 0x3f, 0x3f, 0x6d, 0x51, 0x2f, + 0x2f, 0x51, 0x6d, 0x3f, 0x33, 0x57, 0x3f, 0x24, 0x24, 0x3f, 0x57, 0x33, + 0x33, 0x57, 0x3f, 0x24, 0x24, 0x3f, 0x57, 0x3c, 0x2a, 0x44, 0x30, 0x1a, + 0x1b, 0x31, 0x43, 0x29, 0x3e, 0x4a, 0x12, 0x55, 0x0a, 0x1f, 0x1a, 0x1e, + 0x22, 0x22, 0x1f, 0x1c, 0x21, 0x0b, 0x55, 0x09, 0x1a, 0x27, 0x34, 0x12, + 0x2e, 0x56, 0x7a, 0x4d, 0x4c, 0x7b, 0x56, 0x2e, 0x2e, 0x56, 0x7b, 0x4c, + 0x4d, 0x7a, 0x56, 0x2e, 0x37, 0x26, 0x43, 0x5a, 0x33, 0x3c, 0x33, 0x5a, + 0x43, 0x26, 0x26, 0x43, 0x5a, 0x33, 0x3c, 0x33, 0x5a, 0x43, 0x26, 0x50, + 0x1c, 0x33, 0x48, 0x2c, 0x2d, 0x49, 0x33, 0x1c, 0x39, 0x2d, 0x2b, 0x17, + 0x1d, 0x25, 0x1d, 0x49, 0x1d, 0x26, 0x1e, 0x16, 0x2b, 0x14, 0x25, 0x1c, + 0x11, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x7d, 0x01, 0x4c, 0x01, 0xe9, + 0x02, 0xc6, 0x00, 0x1f, 0x00, 0x2a, 0x00, 0x88, 0xba, 0x00, 0x19, 0x00, + 0x2b, 0x00, 0x2c, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x19, 0x10, 0xb8, 0x00, + 0x20, 0xd0, 0x00, 0xb8, 0x00, 0x1f, 0x2f, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x19, 0x2f, 0x1b, 0xb9, 0x00, 0x19, 0x00, 0x1f, 0x3e, 0x59, + 0x41, 0x03, 0x00, 0x7f, 0x00, 0x1f, 0x00, 0x01, 0x5d, 0x41, 0x03, 0x00, + 0xff, 0x00, 0x1f, 0x00, 0x01, 0x5d, 0xb8, 0x00, 0x1f, 0x10, 0xb9, 0x00, + 0x1e, 0x00, 0x0c, 0xf4, 0xba, 0x00, 0x03, 0x00, 0x1e, 0x00, 0x1f, 0x11, + 0x12, 0x39, 0xba, 0x00, 0x26, 0x00, 0x1e, 0x00, 0x1f, 0x11, 0x12, 0x39, + 0x7c, 0xb8, 0x00, 0x26, 0x2f, 0x18, 0xb9, 0x00, 0x07, 0x00, 0x0c, 0xf4, + 0xba, 0x00, 0x0d, 0x00, 0x19, 0x00, 0x1e, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x0d, 0x2f, 0xb8, 0x00, 0x19, 0x10, 0xb9, 0x00, 0x12, 0x00, 0x0c, 0xf4, + 0xb8, 0x00, 0x0d, 0x10, 0xb9, 0x00, 0x20, 0x00, 0x04, 0xf4, 0x30, 0x31, + 0x01, 0x22, 0x26, 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, + 0x36, 0x3b, 0x01, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, + 0x01, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x33, 0x15, 0x27, 0x22, 0x1d, 0x01, + 0x14, 0x16, 0x33, 0x32, 0x36, 0x3d, 0x01, 0x01, 0xad, 0x20, 0x27, 0x03, + 0x04, 0x0a, 0x3a, 0x2a, 0x35, 0x3f, 0x53, 0x4f, 0x3a, 0x1e, 0x23, 0x21, + 0x29, 0x0f, 0x38, 0x12, 0x4e, 0x3d, 0x4a, 0x53, 0x28, 0xc7, 0x40, 0x1d, + 0x19, 0x1c, 0x25, 0x01, 0x54, 0x21, 0x1f, 0x23, 0x25, 0x39, 0x33, 0x39, + 0x36, 0x12, 0x20, 0x21, 0x19, 0x14, 0x32, 0x1f, 0x28, 0x44, 0x45, 0x9e, + 0x4b, 0x9b, 0x2b, 0x0e, 0x13, 0x13, 0x1a, 0x1a, 0x2b, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x3c, 0x00, 0x26, 0x02, 0x27, 0x01, 0xfa, 0x00, 0x06, + 0x00, 0x0d, 0x00, 0x00, 0x25, 0x27, 0x35, 0x37, 0x17, 0x07, 0x17, 0x05, + 0x27, 0x35, 0x37, 0x17, 0x07, 0x17, 0x01, 0xfa, 0xc8, 0xc8, 0x2d, 0x82, + 0x82, 0xfe, 0xdd, 0xc8, 0xc8, 0x2d, 0x82, 0x82, 0x26, 0xa8, 0x84, 0xa8, + 0x60, 0x8a, 0x8b, 0x5f, 0xa8, 0x84, 0xa8, 0x60, 0x8a, 0x8b, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x3e, 0x00, 0x36, 0x02, 0x0a, 0x01, 0x6c, 0x00, 0x05, + 0x00, 0x17, 0xba, 0x00, 0x00, 0x00, 0x06, 0x00, 0x07, 0x11, 0x12, 0x39, + 0x00, 0xbb, 0x00, 0x03, 0x00, 0x09, 0x00, 0x02, 0x00, 0x04, 0x2b, 0x30, + 0x31, 0x25, 0x35, 0x21, 0x35, 0x21, 0x11, 0x01, 0x91, 0xfe, 0xad, 0x01, + 0xcc, 0x36, 0xc0, 0x76, 0xfe, 0xca, 0x00, 0x00, 0x00, 0x04, 0x00, 0x75, + 0x01, 0x5a, 0x01, 0xe3, 0x02, 0xc6, 0x00, 0x13, 0x00, 0x29, 0x00, 0x36, + 0x00, 0x3e, 0x00, 0xf2, 0xba, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x40, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x14, 0xd0, 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, + 0x35, 0xd0, 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, 0x37, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, + 0x00, 0x1f, 0x3e, 0x59, 0xb9, 0x00, 0x1f, 0x00, 0x0b, 0xf4, 0xba, 0x00, + 0x2b, 0x00, 0x1f, 0x00, 0x14, 0x11, 0x12, 0x39, 0x7c, 0xb8, 0x00, 0x2b, + 0x2f, 0x18, 0x41, 0x03, 0x00, 0x10, 0x00, 0x2b, 0x00, 0x01, 0x72, 0x41, + 0x03, 0x00, 0xa0, 0x00, 0x2b, 0x00, 0x01, 0x71, 0x41, 0x03, 0x00, 0x30, + 0x00, 0x2b, 0x00, 0x01, 0x5d, 0x41, 0x03, 0x00, 0xf0, 0x00, 0x2b, 0x00, + 0x01, 0x5d, 0x41, 0x05, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x10, 0x00, 0x2b, + 0x00, 0x02, 0x71, 0x41, 0x09, 0x00, 0xa0, 0x00, 0x2b, 0x00, 0xb0, 0x00, + 0x2b, 0x00, 0xc0, 0x00, 0x2b, 0x00, 0xd0, 0x00, 0x2b, 0x00, 0x04, 0x5d, + 0xba, 0x00, 0x14, 0x00, 0x2b, 0x00, 0x3f, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x14, 0x2f, 0x41, 0x05, 0x00, 0x30, 0x00, 0x14, 0x00, 0x40, 0x00, 0x14, + 0x00, 0x02, 0x71, 0xb9, 0x00, 0x00, 0x00, 0x0b, 0xf4, 0xba, 0x00, 0x2c, + 0x00, 0x1f, 0x00, 0x14, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x2c, 0x2f, 0x41, + 0x03, 0x00, 0xbf, 0x00, 0x2c, 0x00, 0x01, 0x71, 0xb9, 0x00, 0x3d, 0x00, + 0x0b, 0xf4, 0xba, 0x00, 0x3e, 0x00, 0x3d, 0x00, 0x2b, 0x11, 0x12, 0x39, + 0xb8, 0x00, 0x3e, 0x2f, 0xb9, 0x00, 0x36, 0x00, 0x0b, 0xf4, 0xba, 0x00, + 0x32, 0x00, 0x3e, 0x00, 0x36, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x2b, 0x10, + 0xb8, 0x00, 0x34, 0xd0, 0x30, 0x31, 0x01, 0x22, 0x2e, 0x02, 0x35, 0x34, + 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, + 0x3e, 0x02, 0x3d, 0x01, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x1d, + 0x01, 0x14, 0x1e, 0x02, 0x37, 0x23, 0x35, 0x33, 0x32, 0x16, 0x15, 0x14, + 0x07, 0x17, 0x23, 0x27, 0x23, 0x37, 0x32, 0x3d, 0x01, 0x34, 0x2b, 0x01, + 0x15, 0x01, 0x2c, 0x26, 0x43, 0x32, 0x1c, 0x1c, 0x32, 0x43, 0x26, 0x26, + 0x43, 0x31, 0x1d, 0x1d, 0x31, 0x43, 0x26, 0x1d, 0x31, 0x24, 0x15, 0x15, + 0x24, 0x31, 0x1d, 0x1d, 0x31, 0x24, 0x15, 0x15, 0x24, 0x31, 0x07, 0x38, + 0x5c, 0x26, 0x22, 0x22, 0x27, 0x3d, 0x1e, 0x16, 0x18, 0x1a, 0x1a, 0x18, + 0x01, 0x5a, 0x1c, 0x30, 0x43, 0x27, 0x27, 0x43, 0x30, 0x1c, 0x1c, 0x30, + 0x43, 0x27, 0x27, 0x43, 0x30, 0x1c, 0x29, 0x13, 0x22, 0x30, 0x1e, 0x14, + 0x1e, 0x30, 0x22, 0x13, 0x13, 0x22, 0x30, 0x1e, 0x14, 0x1e, 0x30, 0x22, + 0x13, 0x31, 0xb9, 0x24, 0x1b, 0x29, 0x10, 0x41, 0x36, 0x29, 0x14, 0x07, + 0x14, 0x2f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x93, 0x02, 0x67, 0x01, 0xc5, + 0x02, 0xce, 0x00, 0x03, 0x00, 0x17, 0xba, 0x00, 0x03, 0x00, 0x04, 0x00, + 0x05, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x03, 0x2f, 0xb9, 0x00, 0x00, + 0x00, 0x06, 0xf4, 0x30, 0x31, 0x13, 0x21, 0x15, 0x21, 0x93, 0x01, 0x32, + 0xfe, 0xce, 0x02, 0xce, 0x67, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x70, + 0x01, 0x4e, 0x01, 0xe8, 0x02, 0xc6, 0x00, 0x13, 0x00, 0x1f, 0x00, 0x3a, + 0xba, 0x00, 0x00, 0x00, 0x20, 0x00, 0x21, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x14, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x2f, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, 0x00, 0x1f, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x14, 0x00, 0x0c, 0xf4, 0xb8, 0x00, + 0x0a, 0x10, 0xb9, 0x00, 0x1a, 0x00, 0x0c, 0xf4, 0x30, 0x31, 0x01, 0x22, + 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, + 0x0e, 0x02, 0x27, 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, + 0x14, 0x16, 0x01, 0x2c, 0x28, 0x44, 0x33, 0x1d, 0x1d, 0x33, 0x44, 0x28, + 0x28, 0x44, 0x33, 0x1d, 0x1d, 0x33, 0x44, 0x28, 0x27, 0x2f, 0x2f, 0x27, + 0x27, 0x2f, 0x2f, 0x01, 0x4e, 0x1d, 0x32, 0x45, 0x28, 0x28, 0x45, 0x32, + 0x1d, 0x1d, 0x32, 0x45, 0x28, 0x28, 0x45, 0x32, 0x1d, 0x5f, 0x36, 0x27, + 0x27, 0x36, 0x36, 0x27, 0x27, 0x36, 0x00, 0x00, 0x00, 0x02, 0x00, 0x3e, + 0x00, 0x00, 0x02, 0x1a, 0x02, 0x7a, 0x00, 0x0b, 0x00, 0x0f, 0x00, 0x43, + 0xba, 0x00, 0x00, 0x00, 0x10, 0x00, 0x11, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x0c, 0xd0, 0x00, 0xbb, 0x00, 0x03, 0x00, 0x09, 0x00, 0x02, 0x00, 0x04, + 0x2b, 0xbb, 0x00, 0x0d, 0x00, 0x09, 0x00, 0x0c, 0x00, 0x04, 0x2b, 0xba, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x0d, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x00, + 0x2f, 0xb8, 0x00, 0x03, 0x10, 0xb8, 0x00, 0x07, 0xd0, 0xb8, 0x00, 0x02, + 0x10, 0xb8, 0x00, 0x0a, 0xd0, 0x30, 0x31, 0x37, 0x35, 0x23, 0x35, 0x33, + 0x35, 0x33, 0x15, 0x33, 0x15, 0x23, 0x15, 0x05, 0x35, 0x21, 0x15, 0xec, + 0xae, 0xae, 0x80, 0xae, 0xae, 0xfe, 0xd2, 0x01, 0xdc, 0xb8, 0xa6, 0x76, + 0xa6, 0xa6, 0x76, 0xa6, 0xb8, 0x77, 0x77, 0x00, 0x00, 0x01, 0x00, 0x96, + 0x01, 0x49, 0x01, 0xc2, 0x02, 0xc0, 0x00, 0x1d, 0x00, 0x57, 0xba, 0x00, + 0x13, 0x00, 0x1e, 0x00, 0x1f, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x13, 0x2f, 0x1b, 0xb9, 0x00, 0x13, 0x00, 0x1f, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, + 0xb9, 0x00, 0x01, 0x00, 0x15, 0x3e, 0x59, 0xb9, 0x00, 0x1c, 0x00, 0x0c, + 0xf4, 0xb8, 0x00, 0x02, 0xd0, 0xba, 0x00, 0x03, 0x00, 0x13, 0x00, 0x1c, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x13, 0x10, 0xb9, 0x00, 0x0c, 0x00, 0x0c, + 0xf4, 0xba, 0x00, 0x1b, 0x00, 0x0c, 0x00, 0x01, 0x11, 0x12, 0x39, 0x30, + 0x31, 0x01, 0x21, 0x35, 0x37, 0x3e, 0x03, 0x3d, 0x01, 0x34, 0x26, 0x23, + 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, + 0x02, 0x0f, 0x01, 0x33, 0x01, 0xc2, 0xfe, 0xdf, 0x76, 0x12, 0x16, 0x0d, + 0x05, 0x18, 0x13, 0x17, 0x1b, 0x05, 0x59, 0x0e, 0x4d, 0x3f, 0x42, 0x4c, + 0x12, 0x1f, 0x29, 0x18, 0x3b, 0xb1, 0x01, 0x49, 0x58, 0x5a, 0x0e, 0x13, + 0x11, 0x11, 0x09, 0x01, 0x11, 0x11, 0x19, 0x14, 0x21, 0x2a, 0x38, 0x40, + 0x31, 0x19, 0x2a, 0x24, 0x1e, 0x0d, 0x21, 0x00, 0x00, 0x01, 0x00, 0x8a, + 0x01, 0x43, 0x01, 0xc2, 0x02, 0xc0, 0x00, 0x2b, 0x00, 0x9f, 0xba, 0x00, + 0x0e, 0x00, 0x2c, 0x00, 0x2d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x0e, 0x2f, 0x1b, 0xb9, 0x00, 0x0e, 0x00, 0x1f, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x1b, 0x2f, 0x1b, + 0xb9, 0x00, 0x1b, 0x00, 0x15, 0x3e, 0x59, 0xba, 0x00, 0x29, 0x00, 0x0e, + 0x00, 0x1b, 0x11, 0x12, 0x39, 0x7c, 0xb8, 0x00, 0x29, 0x2f, 0x18, 0x41, + 0x05, 0x00, 0x10, 0x00, 0x29, 0x00, 0x20, 0x00, 0x29, 0x00, 0x02, 0x71, + 0x41, 0x09, 0x00, 0xc0, 0x00, 0x29, 0x00, 0xd0, 0x00, 0x29, 0x00, 0xe0, + 0x00, 0x29, 0x00, 0xf0, 0x00, 0x29, 0x00, 0x04, 0x72, 0x41, 0x03, 0x00, + 0xe0, 0x00, 0x29, 0x00, 0x01, 0x5d, 0x41, 0x07, 0x00, 0x40, 0x00, 0x29, + 0x00, 0x50, 0x00, 0x29, 0x00, 0x60, 0x00, 0x29, 0x00, 0x03, 0x5d, 0xb9, + 0x00, 0x00, 0x00, 0x04, 0xf4, 0xb8, 0x00, 0x0e, 0x10, 0xb9, 0x00, 0x07, + 0x00, 0x0c, 0xf4, 0xba, 0x00, 0x15, 0x00, 0x00, 0x00, 0x29, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x1b, 0x10, 0xb9, 0x00, 0x22, 0x00, 0x0c, 0xf4, 0x30, + 0x31, 0x01, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, + 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x15, 0x1e, + 0x01, 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, 0x27, 0x37, 0x1e, 0x01, 0x33, + 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x2b, 0x01, 0x35, 0x01, 0x1d, 0x1b, + 0x18, 0x17, 0x16, 0x15, 0x2b, 0x10, 0x3e, 0x1a, 0x42, 0x35, 0x47, 0x4f, + 0x2d, 0x1f, 0x26, 0x2c, 0x57, 0x46, 0x41, 0x46, 0x14, 0x4c, 0x0b, 0x26, + 0x1e, 0x17, 0x1b, 0x22, 0x1b, 0x1f, 0x02, 0x2e, 0x12, 0x0d, 0x04, 0x0d, + 0x13, 0x16, 0x15, 0x3b, 0x1f, 0x20, 0x38, 0x2d, 0x23, 0x2a, 0x04, 0x04, + 0x06, 0x2c, 0x23, 0x33, 0x3b, 0x2c, 0x1f, 0x3a, 0x17, 0x1f, 0x13, 0x11, + 0x02, 0x14, 0x10, 0x52, 0x00, 0x01, 0x00, 0xe4, 0x02, 0x3a, 0x01, 0xc2, + 0x03, 0x27, 0x00, 0x03, 0x00, 0x2c, 0xba, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x05, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x2f, 0x41, 0x03, 0x00, + 0x4f, 0x00, 0x00, 0x00, 0x01, 0x5d, 0x41, 0x03, 0x00, 0x2f, 0x00, 0x00, + 0x00, 0x01, 0x5d, 0x41, 0x03, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x5d, + 0x30, 0x31, 0x01, 0x27, 0x37, 0x17, 0x01, 0x3c, 0x58, 0x63, 0x7b, 0x02, + 0x3a, 0x2b, 0xc2, 0x3d, 0x00, 0x01, 0x00, 0x41, 0xff, 0x38, 0x02, 0x17, + 0x02, 0x04, 0x00, 0x1b, 0x00, 0x82, 0xba, 0x00, 0x05, 0x00, 0x1c, 0x00, + 0x1d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0b, 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, + 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0e, 0x2f, + 0x1b, 0xb9, 0x00, 0x0e, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x13, 0x3e, + 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x15, 0x2f, 0x1b, 0xb9, + 0x00, 0x15, 0x00, 0x11, 0x3e, 0x59, 0xb9, 0x00, 0x05, 0x00, 0x09, 0xf4, + 0xba, 0x00, 0x0f, 0x00, 0x15, 0x00, 0x05, 0x11, 0x12, 0x39, 0x7c, 0xb8, + 0x00, 0x0f, 0x2f, 0x18, 0xba, 0x00, 0x18, 0x00, 0x05, 0x00, 0x15, 0x11, + 0x12, 0x39, 0x30, 0x31, 0x17, 0x11, 0x33, 0x11, 0x14, 0x33, 0x32, 0x3e, + 0x02, 0x35, 0x11, 0x33, 0x11, 0x23, 0x35, 0x23, 0x0e, 0x03, 0x23, 0x22, + 0x26, 0x27, 0x23, 0x17, 0x15, 0x41, 0x94, 0x55, 0x11, 0x20, 0x19, 0x0f, + 0x94, 0x94, 0x06, 0x06, 0x14, 0x1e, 0x26, 0x18, 0x14, 0x24, 0x11, 0x06, + 0x1d, 0xc8, 0x02, 0xcc, 0xfe, 0xd0, 0x6e, 0x09, 0x13, 0x1c, 0x13, 0x01, + 0x53, 0xfd, 0xfc, 0x5e, 0x14, 0x26, 0x1e, 0x12, 0x11, 0x19, 0x85, 0x61, + 0x00, 0x01, 0x00, 0x14, 0xff, 0x6b, 0x02, 0x28, 0x02, 0xba, 0x00, 0x11, + 0x00, 0x34, 0xba, 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x11, 0x2f, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, 0x00, 0x1f, 0x3e, 0x59, 0xb9, 0x00, + 0x0f, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x00, 0xdc, 0xb8, 0x00, 0x11, 0x10, + 0xb8, 0x00, 0x0d, 0xd0, 0x30, 0x31, 0x37, 0x22, 0x2e, 0x02, 0x35, 0x34, + 0x3e, 0x02, 0x33, 0x21, 0x11, 0x23, 0x11, 0x23, 0x11, 0x23, 0xf5, 0x2f, + 0x51, 0x3e, 0x23, 0x23, 0x3e, 0x51, 0x2f, 0x01, 0x33, 0x77, 0x45, 0x77, + 0xf6, 0x22, 0x3c, 0x53, 0x31, 0x31, 0x53, 0x3c, 0x22, 0xfc, 0xb1, 0x02, + 0xdb, 0xfd, 0x25, 0x00, 0x00, 0x01, 0x00, 0xc3, 0x00, 0xcc, 0x01, 0x95, + 0x01, 0x95, 0x00, 0x0d, 0x00, 0x17, 0xba, 0x00, 0x00, 0x00, 0x0e, 0x00, + 0x0f, 0x11, 0x12, 0x39, 0x00, 0xbb, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x07, + 0x00, 0x04, 0x2b, 0x30, 0x31, 0x25, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, + 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x01, 0x2c, 0x38, 0x31, 0x31, + 0x38, 0x38, 0x31, 0x31, 0xcc, 0x31, 0x22, 0x23, 0x22, 0x31, 0x31, 0x22, + 0x23, 0x22, 0x31, 0x00, 0x00, 0x01, 0x00, 0xbe, 0xff, 0x2c, 0x01, 0xbe, + 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x34, 0xba, 0x00, 0x07, 0x00, 0x1f, 0x00, + 0x20, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x12, 0x2f, 0xb8, 0x00, 0x17, + 0xdc, 0x41, 0x07, 0x00, 0x0f, 0x00, 0x17, 0x00, 0x1f, 0x00, 0x17, 0x00, + 0x2f, 0x00, 0x17, 0x00, 0x03, 0x5d, 0xb8, 0x00, 0x0f, 0xd0, 0xb8, 0x00, + 0x07, 0xdc, 0xb9, 0x00, 0x00, 0x00, 0x04, 0xf4, 0x30, 0x31, 0x05, 0x22, + 0x26, 0x27, 0x37, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x35, 0x34, 0x2e, 0x02, + 0x2f, 0x01, 0x37, 0x33, 0x07, 0x17, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, + 0x14, 0x0e, 0x02, 0x01, 0x3a, 0x34, 0x3b, 0x0d, 0x2e, 0x0a, 0x21, 0x17, + 0x13, 0x19, 0x06, 0x11, 0x1d, 0x17, 0x15, 0x16, 0x43, 0x12, 0x04, 0x0c, + 0x18, 0x0c, 0x1e, 0x2b, 0x16, 0x25, 0x30, 0xd4, 0x1d, 0x0f, 0x38, 0x0c, + 0x11, 0x0c, 0x0d, 0x06, 0x0c, 0x0b, 0x09, 0x02, 0x02, 0x68, 0x55, 0x04, + 0x03, 0x04, 0x20, 0x25, 0x1a, 0x22, 0x16, 0x09, 0x00, 0x01, 0x00, 0xa4, + 0x01, 0x49, 0x01, 0xcf, 0x02, 0xba, 0x00, 0x0a, 0x00, 0x5b, 0xba, 0x00, + 0x02, 0x00, 0x0b, 0x00, 0x0c, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x07, 0x2f, 0x1b, 0xb9, 0x00, 0x07, 0x00, 0x1f, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x15, 0x3e, 0x59, 0xb9, 0x00, 0x01, 0x00, 0x0c, + 0xf4, 0xb8, 0x00, 0x07, 0x10, 0xb9, 0x00, 0x03, 0x00, 0x0c, 0xf4, 0xba, + 0x00, 0x04, 0x00, 0x03, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x04, + 0x10, 0xb9, 0x00, 0x05, 0x00, 0x0c, 0xf4, 0xb8, 0x00, 0x01, 0x10, 0xb8, + 0x00, 0x08, 0xd0, 0x30, 0x31, 0x13, 0x35, 0x33, 0x35, 0x07, 0x27, 0x37, + 0x33, 0x11, 0x33, 0x15, 0xbc, 0x5d, 0x4f, 0x26, 0x70, 0x6a, 0x51, 0x01, + 0x49, 0x4f, 0xc6, 0x24, 0x48, 0x38, 0xfe, 0xde, 0x4f, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x77, 0x01, 0x4c, 0x01, 0xe1, 0x02, 0xc6, 0x00, 0x0b, + 0x00, 0x19, 0x00, 0x55, 0xba, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x1b, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x0c, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x2f, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, + 0x00, 0x1f, 0x3e, 0x59, 0x41, 0x03, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x01, + 0x5d, 0x41, 0x03, 0x00, 0xff, 0x00, 0x00, 0x00, 0x01, 0x5d, 0x41, 0x03, + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x71, 0xb8, 0x00, 0x00, 0x10, 0xb9, + 0x00, 0x0c, 0x00, 0x0c, 0xf4, 0xb8, 0x00, 0x06, 0x10, 0xb9, 0x00, 0x13, + 0x00, 0x0c, 0xf4, 0x30, 0x31, 0x01, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, + 0x32, 0x16, 0x15, 0x14, 0x06, 0x27, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, + 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x2c, 0x55, 0x60, 0x60, + 0x55, 0x55, 0x60, 0x60, 0x55, 0x23, 0x27, 0x27, 0x23, 0x23, 0x27, 0x27, + 0x01, 0x4c, 0x65, 0x58, 0x58, 0x65, 0x65, 0x58, 0x58, 0x65, 0x4d, 0x2b, + 0x28, 0x3a, 0x28, 0x2b, 0x2b, 0x28, 0x3a, 0x28, 0x2b, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x32, 0x00, 0x26, 0x02, 0x1d, 0x01, 0xfa, 0x00, 0x06, + 0x00, 0x0d, 0x00, 0x00, 0x25, 0x37, 0x27, 0x37, 0x17, 0x15, 0x07, 0x25, + 0x37, 0x27, 0x37, 0x17, 0x15, 0x07, 0x01, 0x28, 0x82, 0x82, 0x2d, 0xc8, + 0xc8, 0xfe, 0xdd, 0x82, 0x82, 0x2d, 0xc8, 0xc8, 0x85, 0x8b, 0x8a, 0x60, + 0xa8, 0x84, 0xa8, 0x5f, 0x8b, 0x8a, 0x60, 0xa8, 0x84, 0xa8, 0x00, 0x00, + 0x00, 0x05, 0x00, 0x01, 0x00, 0x00, 0x02, 0x57, 0x02, 0xba, 0x00, 0x0a, + 0x00, 0x0e, 0x00, 0x19, 0x00, 0x1d, 0x00, 0x21, 0x00, 0x00, 0x25, 0x23, + 0x35, 0x37, 0x33, 0x15, 0x33, 0x15, 0x23, 0x15, 0x23, 0x3d, 0x01, 0x23, + 0x07, 0x01, 0x33, 0x35, 0x07, 0x27, 0x37, 0x33, 0x11, 0x33, 0x15, 0x23, + 0x01, 0x33, 0x03, 0x23, 0x07, 0x33, 0x03, 0x23, 0x01, 0xce, 0x97, 0x83, + 0x68, 0x2c, 0x2c, 0x54, 0x05, 0x54, 0xfe, 0xb0, 0x55, 0x4c, 0x20, 0x66, + 0x5e, 0x4b, 0xf8, 0x01, 0xcb, 0x67, 0xad, 0x67, 0x95, 0x67, 0xad, 0x67, + 0x3f, 0x4a, 0xc6, 0xd3, 0x3d, 0x3f, 0x7c, 0x7e, 0x7e, 0x01, 0x34, 0xc2, + 0x27, 0x3a, 0x35, 0xfe, 0xf6, 0x45, 0x01, 0x4f, 0xfe, 0xd4, 0x62, 0xfe, + 0xd4, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x02, 0x57, + 0x02, 0xba, 0x00, 0x1b, 0x00, 0x26, 0x00, 0x2a, 0x00, 0x2e, 0x00, 0x00, + 0x25, 0x37, 0x3e, 0x01, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, + 0x27, 0x3e, 0x03, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x0f, 0x01, 0x33, + 0x15, 0x21, 0x01, 0x33, 0x35, 0x07, 0x27, 0x37, 0x33, 0x11, 0x33, 0x15, + 0x23, 0x01, 0x33, 0x03, 0x23, 0x07, 0x33, 0x03, 0x23, 0x01, 0x41, 0x6a, + 0x23, 0x17, 0x17, 0x13, 0x15, 0x1d, 0x08, 0x49, 0x06, 0x14, 0x20, 0x2e, + 0x1f, 0x3b, 0x48, 0x3b, 0x2e, 0x36, 0xa4, 0xfe, 0xfa, 0xfe, 0xe4, 0x55, + 0x4c, 0x20, 0x66, 0x5e, 0x4b, 0xf8, 0x01, 0xcb, 0x67, 0xad, 0x67, 0x95, + 0x67, 0xad, 0x67, 0x4b, 0x50, 0x1b, 0x20, 0x16, 0x02, 0x0f, 0x12, 0x19, + 0x16, 0x1c, 0x11, 0x1f, 0x1a, 0x0f, 0x38, 0x2e, 0x27, 0x40, 0x1e, 0x25, + 0x45, 0x01, 0xb0, 0xc2, 0x27, 0x3a, 0x35, 0xfe, 0xf6, 0x45, 0x01, 0x4f, + 0xfe, 0xd4, 0x62, 0xfe, 0xd4, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x01, + 0x00, 0x00, 0x02, 0x57, 0x02, 0xc0, 0x00, 0x0a, 0x00, 0x0e, 0x00, 0x38, + 0x00, 0x3c, 0x00, 0x40, 0x00, 0x00, 0x25, 0x23, 0x35, 0x37, 0x33, 0x15, + 0x33, 0x15, 0x23, 0x15, 0x23, 0x3d, 0x01, 0x23, 0x07, 0x27, 0x22, 0x26, + 0x27, 0x37, 0x1e, 0x01, 0x33, 0x32, 0x3d, 0x01, 0x34, 0x26, 0x2b, 0x01, + 0x35, 0x33, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x07, 0x27, + 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x15, 0x1e, 0x01, + 0x15, 0x14, 0x06, 0x01, 0x33, 0x03, 0x23, 0x07, 0x33, 0x03, 0x23, 0x01, + 0xce, 0x97, 0x83, 0x68, 0x2c, 0x2c, 0x54, 0x05, 0x54, 0xe0, 0x39, 0x40, + 0x11, 0x3f, 0x0b, 0x23, 0x1b, 0x30, 0x22, 0x1a, 0x1b, 0x1f, 0x1c, 0x18, + 0x17, 0x14, 0x2e, 0x20, 0x34, 0x18, 0x3a, 0x30, 0x3f, 0x48, 0x2a, 0x1d, + 0x23, 0x2a, 0x4d, 0x01, 0x1c, 0x67, 0xad, 0x67, 0x95, 0x67, 0xad, 0x67, + 0x3f, 0x4a, 0xc6, 0xd3, 0x3d, 0x3f, 0x7c, 0x7e, 0x7e, 0xe9, 0x28, 0x1a, + 0x2a, 0x13, 0x17, 0x22, 0x08, 0x13, 0x13, 0x3f, 0x14, 0x0e, 0x08, 0x0d, + 0x11, 0x29, 0x32, 0x1b, 0x1e, 0x32, 0x29, 0x20, 0x28, 0x04, 0x04, 0x05, + 0x26, 0x21, 0x2e, 0x36, 0x01, 0x55, 0xfe, 0xd4, 0x62, 0xfe, 0xd4, 0x00, + 0x00, 0x02, 0x00, 0x49, 0xff, 0x3e, 0x02, 0x1b, 0x02, 0x10, 0x00, 0x1c, + 0x00, 0x2a, 0x00, 0x3c, 0xba, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x2c, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x1d, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x2f, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x24, 0x2f, 0x1b, 0xb9, 0x00, 0x24, + 0x00, 0x1d, 0x3e, 0x59, 0xb9, 0x00, 0x1d, 0x00, 0x0a, 0xf4, 0xb9, 0x00, + 0x0c, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x14, 0x00, + 0x0d, 0xf4, 0x30, 0x31, 0x05, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, + 0x37, 0x35, 0x33, 0x15, 0x0e, 0x01, 0x1d, 0x01, 0x14, 0x16, 0x33, 0x32, + 0x36, 0x37, 0x17, 0x0e, 0x03, 0x03, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, + 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x01, 0x35, 0x35, 0x57, 0x3e, + 0x22, 0x1d, 0x31, 0x41, 0x24, 0x8c, 0x4b, 0x58, 0x31, 0x24, 0x29, 0x34, + 0x0a, 0x7a, 0x09, 0x23, 0x38, 0x4e, 0x29, 0x35, 0x2e, 0x2d, 0x36, 0x35, + 0x2d, 0x2d, 0xc2, 0x1e, 0x36, 0x4c, 0x2d, 0x2a, 0x45, 0x33, 0x20, 0x06, + 0x48, 0x99, 0x03, 0x2e, 0x39, 0x0e, 0x2a, 0x24, 0x2f, 0x26, 0x33, 0x1e, + 0x3a, 0x2d, 0x1b, 0x02, 0x17, 0x2d, 0x20, 0x20, 0x20, 0x2e, 0x2e, 0x20, + 0x20, 0x20, 0x2d, 0x00, 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x02, 0x53, + 0x03, 0xd1, 0x00, 0x03, 0x00, 0x0b, 0x00, 0x0f, 0x00, 0x00, 0x13, 0x37, + 0x17, 0x07, 0x13, 0x27, 0x23, 0x07, 0x23, 0x13, 0x33, 0x13, 0x01, 0x23, + 0x03, 0x33, 0x96, 0x7b, 0x63, 0x58, 0x97, 0x2c, 0xbf, 0x2b, 0x98, 0xbd, + 0xd4, 0xbd, 0xfe, 0xd9, 0x08, 0x44, 0x90, 0x03, 0x94, 0x3d, 0xc2, 0x2b, + 0xfd, 0x1c, 0xa8, 0xa8, 0x02, 0xba, 0xfd, 0x46, 0x02, 0x29, 0xfe, 0xf8, + 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x02, 0x53, 0x03, 0xd1, 0x00, 0x03, + 0x00, 0x0b, 0x00, 0x0f, 0x00, 0x00, 0x01, 0x27, 0x37, 0x17, 0x03, 0x27, + 0x23, 0x07, 0x23, 0x13, 0x33, 0x13, 0x01, 0x23, 0x03, 0x33, 0x01, 0x3c, + 0x58, 0x63, 0x7b, 0x0f, 0x2c, 0xbf, 0x2b, 0x98, 0xbd, 0xd4, 0xbd, 0xfe, + 0xd9, 0x08, 0x44, 0x90, 0x02, 0xe4, 0x2b, 0xc2, 0x3d, 0xfc, 0x6c, 0xa8, + 0xa8, 0x02, 0xba, 0xfd, 0x46, 0x02, 0x29, 0xfe, 0xf8, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x05, 0x00, 0x00, 0x02, 0x53, 0x03, 0xbc, 0x00, 0x06, + 0x00, 0x0e, 0x00, 0x12, 0x00, 0x00, 0x01, 0x17, 0x07, 0x27, 0x07, 0x27, + 0x37, 0x13, 0x27, 0x23, 0x07, 0x23, 0x13, 0x33, 0x13, 0x01, 0x23, 0x03, + 0x33, 0x01, 0x6a, 0x84, 0x4b, 0x79, 0x79, 0x47, 0x84, 0xc5, 0x2c, 0xbf, + 0x2b, 0x98, 0xbd, 0xd4, 0xbd, 0xfe, 0xd9, 0x08, 0x44, 0x90, 0x03, 0xbc, + 0x9f, 0x3a, 0x73, 0x73, 0x3a, 0x9f, 0xfc, 0x44, 0xa8, 0xa8, 0x02, 0xba, + 0xfd, 0x46, 0x02, 0x29, 0xfe, 0xf8, 0x00, 0x00, 0x00, 0x03, 0x00, 0x05, + 0x00, 0x00, 0x02, 0x53, 0x03, 0x8f, 0x00, 0x19, 0x00, 0x21, 0x00, 0x25, + 0x00, 0x00, 0x01, 0x22, 0x26, 0x27, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x07, + 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x01, 0x33, 0x32, 0x36, + 0x37, 0x17, 0x0e, 0x01, 0x13, 0x27, 0x23, 0x07, 0x23, 0x13, 0x33, 0x13, + 0x01, 0x23, 0x03, 0x33, 0x01, 0x78, 0x17, 0x23, 0x13, 0x16, 0x24, 0x14, + 0x11, 0x1a, 0x10, 0x34, 0x12, 0x38, 0x28, 0x17, 0x23, 0x13, 0x16, 0x24, + 0x14, 0x11, 0x1a, 0x10, 0x34, 0x12, 0x38, 0x13, 0x2c, 0xbf, 0x2b, 0x98, + 0xbd, 0xd4, 0xbd, 0xfe, 0xd9, 0x08, 0x44, 0x90, 0x02, 0xfa, 0x0c, 0x08, + 0x09, 0x0d, 0x0c, 0x0d, 0x44, 0x1b, 0x25, 0x0c, 0x08, 0x09, 0x0d, 0x0c, + 0x0d, 0x44, 0x1b, 0x25, 0xfd, 0x06, 0xa8, 0xa8, 0x02, 0xba, 0xfd, 0x46, + 0x02, 0x29, 0xfe, 0xf8, 0x00, 0x04, 0x00, 0x05, 0x00, 0x00, 0x02, 0x53, + 0x03, 0x90, 0x00, 0x0d, 0x00, 0x1b, 0x00, 0x23, 0x00, 0x27, 0x00, 0x00, + 0x13, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, + 0x14, 0x06, 0x33, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, + 0x1d, 0x01, 0x14, 0x06, 0x03, 0x27, 0x23, 0x07, 0x23, 0x13, 0x33, 0x13, + 0x01, 0x23, 0x03, 0x33, 0xbe, 0x2d, 0x23, 0x23, 0x2d, 0x2d, 0x24, 0x24, + 0xaf, 0x2d, 0x24, 0x24, 0x2d, 0x2d, 0x23, 0x23, 0x14, 0x2c, 0xbf, 0x2b, + 0x98, 0xbd, 0xd4, 0xbd, 0xfe, 0xd9, 0x08, 0x44, 0x90, 0x02, 0xf9, 0x25, + 0x1a, 0x1a, 0x1a, 0x24, 0x24, 0x1a, 0x1a, 0x1a, 0x25, 0x25, 0x1a, 0x1a, + 0x1a, 0x24, 0x24, 0x1a, 0x1a, 0x1a, 0x25, 0xfd, 0x07, 0xa8, 0xa8, 0x02, + 0xba, 0xfd, 0x46, 0x02, 0x29, 0xfe, 0xf8, 0x00, 0x00, 0x04, 0x00, 0x05, + 0x00, 0x00, 0x02, 0x53, 0x03, 0xed, 0x00, 0x13, 0x00, 0x21, 0x00, 0x29, + 0x00, 0x2d, 0x00, 0x00, 0x01, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, + 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, 0x36, 0x3d, + 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x13, 0x27, + 0x23, 0x07, 0x23, 0x13, 0x33, 0x13, 0x01, 0x23, 0x03, 0x33, 0x01, 0x2c, + 0x1f, 0x36, 0x28, 0x17, 0x17, 0x28, 0x36, 0x1f, 0x1f, 0x36, 0x28, 0x17, + 0x17, 0x28, 0x36, 0x1f, 0x19, 0x1a, 0x1a, 0x19, 0x19, 0x1a, 0x1a, 0xa0, + 0x2c, 0xbf, 0x2b, 0x98, 0xbd, 0xd4, 0xbd, 0xfe, 0xd9, 0x08, 0x44, 0x90, + 0x02, 0xcf, 0x15, 0x26, 0x35, 0x1f, 0x1f, 0x34, 0x26, 0x16, 0x15, 0x26, + 0x35, 0x1f, 0x1f, 0x34, 0x26, 0x16, 0x4b, 0x1c, 0x17, 0x22, 0x18, 0x1b, + 0x1c, 0x17, 0x22, 0x18, 0x1b, 0xfc, 0xe6, 0xa8, 0xa8, 0x02, 0xba, 0xfd, + 0x46, 0x02, 0x29, 0xfe, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xfc, + 0x00, 0x00, 0x02, 0x3c, 0x02, 0xba, 0x00, 0x0f, 0x00, 0x13, 0x00, 0x8c, + 0xba, 0x00, 0x0f, 0x00, 0x14, 0x00, 0x15, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x0f, 0x10, 0xb8, 0x00, 0x12, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1f, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0e, 0x2f, 0x1b, 0xb9, 0x00, + 0x0e, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x02, 0x2f, 0x1b, 0xb9, 0x00, 0x02, 0x00, 0x11, 0x3e, 0x59, 0xba, 0x00, + 0x11, 0x00, 0x05, 0x00, 0x0e, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x11, 0x2f, + 0xb9, 0x00, 0x01, 0x00, 0x0d, 0xf4, 0xb8, 0x00, 0x05, 0x10, 0xb9, 0x00, + 0x06, 0x00, 0x0d, 0xf4, 0xba, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x0e, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x0b, 0x2f, 0xb9, 0x00, 0x08, 0x00, 0x0d, 0xf4, + 0xb8, 0x00, 0x0e, 0x10, 0xb9, 0x00, 0x0d, 0x00, 0x0d, 0xf4, 0xb8, 0x00, + 0x06, 0x10, 0xb8, 0x00, 0x13, 0xd0, 0x30, 0x31, 0x25, 0x23, 0x07, 0x23, + 0x13, 0x21, 0x15, 0x23, 0x15, 0x33, 0x15, 0x23, 0x15, 0x33, 0x15, 0x21, + 0x0b, 0x01, 0x33, 0x11, 0x01, 0x17, 0x68, 0x21, 0x92, 0x9f, 0x01, 0xa1, + 0x9b, 0x91, 0x91, 0x9b, 0xfe, 0xdb, 0x16, 0x3c, 0x52, 0xa8, 0xa8, 0x02, + 0xba, 0x6f, 0xb2, 0x6f, 0xbb, 0x6f, 0x02, 0x52, 0xfe, 0xc5, 0x01, 0x3b, + 0x00, 0x01, 0x00, 0x29, 0xff, 0x2c, 0x02, 0x33, 0x02, 0xc6, 0x00, 0x3c, + 0x00, 0x72, 0xba, 0x00, 0x22, 0x00, 0x3d, 0x00, 0x3e, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x32, 0x2f, 0x1b, 0xb9, + 0x00, 0x32, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x0e, 0x2f, 0x1b, 0xb9, 0x00, 0x0e, 0x00, 0x11, 0x3e, 0x59, 0xb8, + 0x00, 0x32, 0x10, 0xb9, 0x00, 0x00, 0x00, 0x0d, 0xf4, 0xb8, 0x00, 0x0e, + 0x10, 0xb9, 0x00, 0x07, 0x00, 0x0d, 0xf4, 0xb8, 0x00, 0x0e, 0x10, 0xb8, + 0x00, 0x13, 0xdc, 0x41, 0x07, 0x00, 0x0f, 0x00, 0x13, 0x00, 0x1f, 0x00, + 0x13, 0x00, 0x2f, 0x00, 0x13, 0x00, 0x03, 0x5d, 0xb8, 0x00, 0x2a, 0xdc, + 0xb8, 0x00, 0x22, 0xdc, 0xb9, 0x00, 0x1b, 0x00, 0x04, 0xf4, 0xb8, 0x00, + 0x0e, 0x10, 0xb8, 0x00, 0x2c, 0xd0, 0x30, 0x31, 0x01, 0x22, 0x06, 0x1d, + 0x01, 0x14, 0x16, 0x33, 0x32, 0x36, 0x37, 0x17, 0x0e, 0x01, 0x0f, 0x01, + 0x17, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, + 0x26, 0x27, 0x37, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x35, 0x34, 0x2e, 0x02, + 0x2f, 0x01, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, + 0x17, 0x07, 0x2e, 0x03, 0x01, 0x39, 0x3d, 0x33, 0x33, 0x3d, 0x34, 0x2f, + 0x0b, 0x8c, 0x14, 0x6e, 0x64, 0x09, 0x04, 0x0c, 0x18, 0x0c, 0x1e, 0x2b, + 0x16, 0x25, 0x30, 0x19, 0x34, 0x3b, 0x0d, 0x2e, 0x0a, 0x21, 0x17, 0x13, + 0x19, 0x06, 0x11, 0x1d, 0x17, 0x15, 0x0e, 0x74, 0x6e, 0x87, 0x8c, 0x36, + 0x53, 0x3c, 0x27, 0x0b, 0x8c, 0x06, 0x10, 0x19, 0x25, 0x02, 0x4d, 0x5f, + 0x54, 0x7a, 0x54, 0x5f, 0x40, 0x32, 0x22, 0x58, 0x6b, 0x05, 0x2c, 0x04, + 0x03, 0x04, 0x20, 0x25, 0x1a, 0x22, 0x16, 0x09, 0x1d, 0x0f, 0x38, 0x0c, + 0x11, 0x0c, 0x0d, 0x06, 0x0c, 0x0b, 0x09, 0x02, 0x02, 0x42, 0x10, 0xb8, + 0x9d, 0xac, 0xbd, 0x1d, 0x34, 0x4a, 0x2e, 0x22, 0x19, 0x2a, 0x1e, 0x11, + 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x02, 0x0e, 0x03, 0xd1, 0x00, 0x03, + 0x00, 0x0f, 0x00, 0x00, 0x13, 0x37, 0x17, 0x07, 0x03, 0x11, 0x21, 0x15, + 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x99, 0x7b, 0x63, 0x58, + 0xcf, 0x01, 0xbe, 0xfe, 0xd8, 0x01, 0x1e, 0xfe, 0xe2, 0x01, 0x28, 0x03, + 0x94, 0x3d, 0xc2, 0x2b, 0xfd, 0x1c, 0x02, 0xba, 0x7b, 0xa0, 0x7b, 0xa9, + 0x7b, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x50, 0x00, 0x00, 0x02, 0x0e, + 0x03, 0xd1, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x00, 0x01, 0x27, 0x37, 0x17, + 0x01, 0x11, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, + 0x01, 0x3f, 0x58, 0x63, 0x7b, 0xfe, 0x8b, 0x01, 0xbe, 0xfe, 0xd8, 0x01, + 0x1e, 0xfe, 0xe2, 0x01, 0x28, 0x02, 0xe4, 0x2b, 0xc2, 0x3d, 0xfc, 0x6c, + 0x02, 0xba, 0x7b, 0xa0, 0x7b, 0xa9, 0x7b, 0x00, 0x00, 0x02, 0x00, 0x50, + 0x00, 0x00, 0x02, 0x0e, 0x03, 0xbc, 0x00, 0x06, 0x00, 0x12, 0x00, 0x00, + 0x01, 0x17, 0x07, 0x27, 0x07, 0x27, 0x37, 0x03, 0x11, 0x21, 0x15, 0x21, + 0x15, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x01, 0x6d, 0x84, 0x4b, 0x79, + 0x79, 0x47, 0x84, 0xa1, 0x01, 0xbe, 0xfe, 0xd8, 0x01, 0x1e, 0xfe, 0xe2, + 0x01, 0x28, 0x03, 0xbc, 0x9f, 0x3a, 0x73, 0x73, 0x3a, 0x9f, 0xfc, 0x44, + 0x02, 0xba, 0x7b, 0xa0, 0x7b, 0xa9, 0x7b, 0x00, 0x00, 0x03, 0x00, 0x50, + 0x00, 0x00, 0x02, 0x0e, 0x03, 0x90, 0x00, 0x0d, 0x00, 0x1b, 0x00, 0x27, + 0x00, 0x00, 0x13, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, + 0x1d, 0x01, 0x14, 0x06, 0x33, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, + 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x01, 0x11, 0x21, 0x15, 0x21, 0x15, + 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0xc1, 0x2d, 0x23, 0x23, 0x2d, 0x2d, + 0x24, 0x24, 0xaf, 0x2d, 0x24, 0x24, 0x2d, 0x2d, 0x23, 0x23, 0xfe, 0x86, + 0x01, 0xbe, 0xfe, 0xd8, 0x01, 0x1e, 0xfe, 0xe2, 0x01, 0x28, 0x02, 0xf9, + 0x25, 0x1a, 0x1a, 0x1a, 0x24, 0x24, 0x1a, 0x1a, 0x1a, 0x25, 0x25, 0x1a, + 0x1a, 0x1a, 0x24, 0x24, 0x1a, 0x1a, 0x1a, 0x25, 0xfd, 0x07, 0x02, 0xba, + 0x7b, 0xa0, 0x7b, 0xa9, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x4b, + 0x00, 0x00, 0x02, 0x0d, 0x03, 0xd1, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x00, + 0x13, 0x37, 0x17, 0x07, 0x03, 0x35, 0x33, 0x11, 0x23, 0x35, 0x21, 0x15, + 0x23, 0x11, 0x33, 0x15, 0x96, 0x7b, 0x63, 0x58, 0xd1, 0x96, 0x96, 0x01, + 0xc2, 0x96, 0x96, 0x03, 0x94, 0x3d, 0xc2, 0x2b, 0xfd, 0x1c, 0x6f, 0x01, + 0xdc, 0x6f, 0x6f, 0xfe, 0x24, 0x6f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x4b, + 0x00, 0x00, 0x02, 0x0d, 0x03, 0xd1, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x00, + 0x01, 0x27, 0x37, 0x17, 0x01, 0x35, 0x33, 0x11, 0x23, 0x35, 0x21, 0x15, + 0x23, 0x11, 0x33, 0x15, 0x01, 0x3c, 0x58, 0x63, 0x7b, 0xfe, 0x89, 0x96, + 0x96, 0x01, 0xc2, 0x96, 0x96, 0x02, 0xe4, 0x2b, 0xc2, 0x3d, 0xfc, 0x6c, + 0x6f, 0x01, 0xdc, 0x6f, 0x6f, 0xfe, 0x24, 0x6f, 0x00, 0x02, 0x00, 0x4b, + 0x00, 0x00, 0x02, 0x0d, 0x03, 0xbc, 0x00, 0x06, 0x00, 0x12, 0x00, 0x00, + 0x01, 0x17, 0x07, 0x27, 0x07, 0x27, 0x37, 0x03, 0x35, 0x33, 0x11, 0x23, + 0x35, 0x21, 0x15, 0x23, 0x11, 0x33, 0x15, 0x01, 0x6a, 0x84, 0x4b, 0x79, + 0x79, 0x47, 0x84, 0xa3, 0x96, 0x96, 0x01, 0xc2, 0x96, 0x96, 0x03, 0xbc, + 0x9f, 0x3a, 0x73, 0x73, 0x3a, 0x9f, 0xfc, 0x44, 0x6f, 0x01, 0xdc, 0x6f, + 0x6f, 0xfe, 0x24, 0x6f, 0x00, 0x03, 0x00, 0x4b, 0x00, 0x00, 0x02, 0x0d, + 0x03, 0x90, 0x00, 0x0d, 0x00, 0x1b, 0x00, 0x27, 0x00, 0x00, 0x13, 0x22, + 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, + 0x33, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, + 0x14, 0x06, 0x01, 0x35, 0x33, 0x11, 0x23, 0x35, 0x21, 0x15, 0x23, 0x11, + 0x33, 0x15, 0xbe, 0x2d, 0x23, 0x23, 0x2d, 0x2d, 0x24, 0x24, 0xaf, 0x2d, + 0x24, 0x24, 0x2d, 0x2d, 0x23, 0x23, 0xfe, 0x84, 0x96, 0x96, 0x01, 0xc2, + 0x96, 0x96, 0x02, 0xf9, 0x25, 0x1a, 0x1a, 0x1a, 0x24, 0x24, 0x1a, 0x1a, + 0x1a, 0x25, 0x25, 0x1a, 0x1a, 0x1a, 0x24, 0x24, 0x1a, 0x1a, 0x1a, 0x25, + 0xfd, 0x07, 0x6f, 0x01, 0xdc, 0x6f, 0x6f, 0xfe, 0x24, 0x6f, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x0a, 0x00, 0x00, 0x02, 0x36, 0x02, 0xba, 0x00, 0x0c, + 0x00, 0x1a, 0x00, 0x00, 0x13, 0x23, 0x35, 0x33, 0x11, 0x33, 0x32, 0x16, + 0x15, 0x14, 0x06, 0x2b, 0x01, 0x37, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, + 0x2b, 0x01, 0x15, 0x33, 0x15, 0x23, 0x15, 0x45, 0x3b, 0x3b, 0xdc, 0x8d, + 0x88, 0x88, 0x8d, 0xdc, 0xd2, 0x43, 0x3e, 0x3e, 0x43, 0x3e, 0x6e, 0x6e, + 0x01, 0x37, 0x72, 0x01, 0x11, 0xb4, 0xa9, 0xa9, 0xb4, 0x76, 0x56, 0x52, + 0x7f, 0x51, 0x56, 0xa0, 0x68, 0xc6, 0x00, 0x00, 0x00, 0x02, 0x00, 0x3d, + 0x00, 0x00, 0x02, 0x1b, 0x03, 0x8f, 0x00, 0x19, 0x00, 0x25, 0x00, 0x00, + 0x01, 0x22, 0x26, 0x27, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, + 0x01, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x37, 0x17, + 0x0e, 0x01, 0x03, 0x23, 0x11, 0x23, 0x11, 0x33, 0x13, 0x33, 0x11, 0x33, + 0x11, 0x23, 0x01, 0x78, 0x17, 0x23, 0x13, 0x16, 0x24, 0x14, 0x11, 0x1a, + 0x10, 0x34, 0x12, 0x38, 0x28, 0x17, 0x23, 0x13, 0x16, 0x24, 0x14, 0x11, + 0x1a, 0x10, 0x34, 0x12, 0x38, 0xd8, 0x0b, 0x80, 0xb4, 0x9f, 0x0b, 0x80, + 0xb4, 0x02, 0xfa, 0x0c, 0x08, 0x09, 0x0d, 0x0c, 0x0d, 0x44, 0x1b, 0x25, + 0x0c, 0x08, 0x09, 0x0d, 0x0c, 0x0d, 0x44, 0x1b, 0x25, 0xfe, 0xd6, 0xfe, + 0x30, 0x02, 0xba, 0xfe, 0x30, 0x01, 0xd0, 0xfd, 0x46, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x1b, 0xff, 0xf4, 0x02, 0x3d, 0x03, 0xd1, 0x00, 0x03, + 0x00, 0x0f, 0x00, 0x1d, 0x00, 0x00, 0x13, 0x37, 0x17, 0x07, 0x13, 0x22, + 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x27, 0x32, + 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, + 0x96, 0x7b, 0x63, 0x58, 0x10, 0x8c, 0x85, 0x85, 0x8c, 0x8c, 0x85, 0x85, + 0x8c, 0x40, 0x31, 0x31, 0x40, 0x40, 0x31, 0x31, 0x03, 0x94, 0x3d, 0xc2, + 0x2b, 0xfd, 0x10, 0xbe, 0xab, 0xab, 0xbe, 0xbe, 0xab, 0xab, 0xbe, 0x79, + 0x5f, 0x55, 0x79, 0x54, 0x5f, 0x5f, 0x54, 0x7a, 0x54, 0x5f, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x1b, 0xff, 0xf4, 0x02, 0x3d, 0x03, 0xd1, 0x00, 0x03, + 0x00, 0x0f, 0x00, 0x1d, 0x00, 0x00, 0x01, 0x27, 0x37, 0x17, 0x03, 0x22, + 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x27, 0x32, + 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, + 0x01, 0x3c, 0x58, 0x63, 0x7b, 0x96, 0x8c, 0x85, 0x85, 0x8c, 0x8c, 0x85, + 0x85, 0x8c, 0x40, 0x31, 0x31, 0x40, 0x40, 0x31, 0x31, 0x02, 0xe4, 0x2b, + 0xc2, 0x3d, 0xfc, 0x60, 0xbe, 0xab, 0xab, 0xbe, 0xbe, 0xab, 0xab, 0xbe, + 0x79, 0x5f, 0x55, 0x79, 0x54, 0x5f, 0x5f, 0x54, 0x7a, 0x54, 0x5f, 0x00, + 0x00, 0x03, 0x00, 0x1b, 0xff, 0xf4, 0x02, 0x3d, 0x03, 0xbc, 0x00, 0x06, + 0x00, 0x12, 0x00, 0x20, 0x00, 0x00, 0x01, 0x17, 0x07, 0x27, 0x07, 0x27, + 0x37, 0x13, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, + 0x06, 0x27, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, + 0x01, 0x14, 0x16, 0x01, 0x6a, 0x84, 0x4b, 0x79, 0x79, 0x47, 0x84, 0x3e, + 0x8c, 0x85, 0x85, 0x8c, 0x8c, 0x85, 0x85, 0x8c, 0x40, 0x31, 0x31, 0x40, + 0x40, 0x31, 0x31, 0x03, 0xbc, 0x9f, 0x3a, 0x73, 0x73, 0x3a, 0x9f, 0xfc, + 0x38, 0xbe, 0xab, 0xab, 0xbe, 0xbe, 0xab, 0xab, 0xbe, 0x79, 0x5f, 0x55, + 0x79, 0x54, 0x5f, 0x5f, 0x54, 0x7a, 0x54, 0x5f, 0x00, 0x03, 0x00, 0x1b, + 0xff, 0xf4, 0x02, 0x3d, 0x03, 0x8f, 0x00, 0x19, 0x00, 0x25, 0x00, 0x33, + 0x00, 0x00, 0x01, 0x22, 0x26, 0x27, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x07, + 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x01, 0x33, 0x32, 0x36, + 0x37, 0x17, 0x0e, 0x01, 0x03, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, + 0x16, 0x15, 0x14, 0x06, 0x27, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, + 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x78, 0x17, 0x23, 0x13, 0x16, + 0x24, 0x14, 0x11, 0x1a, 0x10, 0x34, 0x12, 0x38, 0x28, 0x17, 0x23, 0x13, + 0x16, 0x24, 0x14, 0x11, 0x1a, 0x10, 0x34, 0x12, 0x38, 0x74, 0x8c, 0x85, + 0x85, 0x8c, 0x8c, 0x85, 0x85, 0x8c, 0x40, 0x31, 0x31, 0x40, 0x40, 0x31, + 0x31, 0x02, 0xfa, 0x0c, 0x08, 0x09, 0x0d, 0x0c, 0x0d, 0x44, 0x1b, 0x25, + 0x0c, 0x08, 0x09, 0x0d, 0x0c, 0x0d, 0x44, 0x1b, 0x25, 0xfc, 0xfa, 0xbe, + 0xab, 0xab, 0xbe, 0xbe, 0xab, 0xab, 0xbe, 0x79, 0x5f, 0x55, 0x79, 0x54, + 0x5f, 0x5f, 0x54, 0x7a, 0x54, 0x5f, 0x00, 0x00, 0x00, 0x04, 0x00, 0x1b, + 0xff, 0xf4, 0x02, 0x3d, 0x03, 0x90, 0x00, 0x0d, 0x00, 0x1b, 0x00, 0x27, + 0x00, 0x35, 0x00, 0x00, 0x13, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, + 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x33, 0x22, 0x26, 0x3d, 0x01, 0x34, + 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x03, 0x22, 0x26, 0x35, + 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x27, 0x32, 0x36, 0x3d, + 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0xbe, 0x2d, + 0x23, 0x23, 0x2d, 0x2d, 0x24, 0x24, 0xaf, 0x2d, 0x24, 0x24, 0x2d, 0x2d, + 0x23, 0x23, 0x9b, 0x8c, 0x85, 0x85, 0x8c, 0x8c, 0x85, 0x85, 0x8c, 0x40, + 0x31, 0x31, 0x40, 0x40, 0x31, 0x31, 0x02, 0xf9, 0x25, 0x1a, 0x1a, 0x1a, + 0x24, 0x24, 0x1a, 0x1a, 0x1a, 0x25, 0x25, 0x1a, 0x1a, 0x1a, 0x24, 0x24, + 0x1a, 0x1a, 0x1a, 0x25, 0xfc, 0xfb, 0xbe, 0xab, 0xab, 0xbe, 0xbe, 0xab, + 0xab, 0xbe, 0x79, 0x5f, 0x55, 0x79, 0x54, 0x5f, 0x5f, 0x54, 0x7a, 0x54, + 0x5f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x46, 0x00, 0x4b, 0x02, 0x12, + 0x02, 0x17, 0x00, 0x0b, 0x00, 0x2f, 0xba, 0x00, 0x00, 0x00, 0x0c, 0x00, + 0x0d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x07, 0x2f, 0x1b, 0xb9, 0x00, 0x07, 0x00, + 0x1d, 0x3e, 0x59, 0x30, 0x31, 0x25, 0x07, 0x27, 0x37, 0x27, 0x37, 0x17, + 0x37, 0x17, 0x07, 0x17, 0x07, 0x01, 0x2c, 0x91, 0x55, 0x91, 0x91, 0x55, + 0x91, 0x91, 0x55, 0x91, 0x91, 0x55, 0xdc, 0x91, 0x55, 0x91, 0x91, 0x55, + 0x91, 0x91, 0x55, 0x91, 0x91, 0x55, 0x00, 0x00, 0x00, 0x03, 0x00, 0x13, + 0xff, 0xbe, 0x02, 0x45, 0x02, 0xfc, 0x00, 0x13, 0x00, 0x1d, 0x00, 0x27, + 0x00, 0x9f, 0xba, 0x00, 0x00, 0x00, 0x28, 0x00, 0x29, 0x11, 0x12, 0x39, + 0xb8, 0x00, 0x1a, 0xd0, 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, 0x1e, 0xd0, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, + 0x00, 0x0a, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb8, + 0x00, 0x0a, 0x10, 0xb9, 0x00, 0x1a, 0x00, 0x0d, 0xf4, 0xba, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x1a, 0x11, 0x12, 0x39, 0xba, 0x00, 0x05, 0x00, 0x00, + 0x00, 0x1a, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x1e, + 0x00, 0x0d, 0xf4, 0xba, 0x00, 0x0c, 0x00, 0x0a, 0x00, 0x1e, 0x11, 0x12, + 0x39, 0xba, 0x00, 0x0f, 0x00, 0x0a, 0x00, 0x1e, 0x11, 0x12, 0x39, 0xba, + 0x00, 0x17, 0x00, 0x1e, 0x00, 0x0a, 0x11, 0x12, 0x39, 0xba, 0x00, 0x18, + 0x00, 0x1a, 0x00, 0x00, 0x11, 0x12, 0x39, 0xba, 0x00, 0x25, 0x00, 0x1a, + 0x00, 0x00, 0x11, 0x12, 0x39, 0xba, 0x00, 0x26, 0x00, 0x1e, 0x00, 0x0a, + 0x11, 0x12, 0x39, 0x30, 0x31, 0x05, 0x22, 0x27, 0x07, 0x27, 0x37, 0x26, + 0x35, 0x34, 0x36, 0x33, 0x32, 0x17, 0x37, 0x17, 0x07, 0x16, 0x15, 0x14, + 0x06, 0x03, 0x1c, 0x01, 0x17, 0x13, 0x26, 0x23, 0x22, 0x06, 0x15, 0x13, + 0x32, 0x36, 0x3d, 0x01, 0x3c, 0x01, 0x27, 0x03, 0x16, 0x01, 0x2c, 0x4f, + 0x37, 0x35, 0x5e, 0x42, 0x3a, 0x85, 0x8c, 0x4f, 0x37, 0x35, 0x5e, 0x42, + 0x3a, 0x85, 0xfd, 0x02, 0xb6, 0x1a, 0x2d, 0x40, 0x31, 0x71, 0x40, 0x31, + 0x02, 0xb6, 0x19, 0x0c, 0x1f, 0x55, 0x36, 0x6b, 0x5b, 0xa3, 0xab, 0xbe, + 0x1f, 0x55, 0x36, 0x6b, 0x5b, 0xa3, 0xab, 0xbe, 0x01, 0x2c, 0x0b, 0x12, + 0x0a, 0x01, 0x3c, 0x18, 0x5f, 0x54, 0xfe, 0xd3, 0x5f, 0x54, 0x7a, 0x0b, + 0x11, 0x0b, 0xfe, 0xc4, 0x18, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x37, + 0xff, 0xf4, 0x02, 0x21, 0x03, 0xd1, 0x00, 0x03, 0x00, 0x1d, 0x00, 0x00, + 0x13, 0x37, 0x17, 0x0f, 0x01, 0x11, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, + 0x02, 0x35, 0x11, 0x33, 0x11, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, + 0x35, 0x11, 0x96, 0x7b, 0x63, 0x58, 0x4f, 0x05, 0x13, 0x26, 0x21, 0x21, + 0x26, 0x13, 0x05, 0x96, 0x13, 0x36, 0x60, 0x4c, 0x4c, 0x60, 0x36, 0x13, + 0x03, 0x94, 0x3d, 0xc2, 0x2b, 0x2a, 0xfe, 0x46, 0x21, 0x37, 0x26, 0x15, + 0x15, 0x26, 0x37, 0x21, 0x01, 0xba, 0xfe, 0x5a, 0x48, 0x6c, 0x48, 0x24, + 0x24, 0x48, 0x6c, 0x48, 0x01, 0xa6, 0x00, 0x00, 0x00, 0x02, 0x00, 0x37, + 0xff, 0xf4, 0x02, 0x21, 0x03, 0xd1, 0x00, 0x03, 0x00, 0x1d, 0x00, 0x00, + 0x01, 0x27, 0x37, 0x17, 0x07, 0x11, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, + 0x02, 0x35, 0x11, 0x33, 0x11, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, + 0x35, 0x11, 0x01, 0x3c, 0x58, 0x63, 0x7b, 0xf5, 0x05, 0x13, 0x26, 0x21, + 0x21, 0x26, 0x13, 0x05, 0x96, 0x13, 0x36, 0x60, 0x4c, 0x4c, 0x60, 0x36, + 0x13, 0x02, 0xe4, 0x2b, 0xc2, 0x3d, 0xda, 0xfe, 0x46, 0x21, 0x37, 0x26, + 0x15, 0x15, 0x26, 0x37, 0x21, 0x01, 0xba, 0xfe, 0x5a, 0x48, 0x6c, 0x48, + 0x24, 0x24, 0x48, 0x6c, 0x48, 0x01, 0xa6, 0x00, 0x00, 0x02, 0x00, 0x37, + 0xff, 0xf4, 0x02, 0x21, 0x03, 0xbc, 0x00, 0x06, 0x00, 0x20, 0x00, 0x00, + 0x01, 0x17, 0x07, 0x27, 0x07, 0x27, 0x37, 0x03, 0x11, 0x14, 0x1e, 0x02, + 0x33, 0x32, 0x3e, 0x02, 0x35, 0x11, 0x33, 0x11, 0x14, 0x0e, 0x02, 0x23, + 0x22, 0x2e, 0x02, 0x35, 0x11, 0x01, 0x6a, 0x84, 0x4b, 0x79, 0x79, 0x47, + 0x84, 0x21, 0x05, 0x13, 0x26, 0x21, 0x21, 0x26, 0x13, 0x05, 0x96, 0x13, + 0x36, 0x60, 0x4c, 0x4c, 0x60, 0x36, 0x13, 0x03, 0xbc, 0x9f, 0x3a, 0x73, + 0x73, 0x3a, 0x9f, 0xfe, 0xfe, 0xfe, 0x46, 0x21, 0x37, 0x26, 0x15, 0x15, + 0x26, 0x37, 0x21, 0x01, 0xba, 0xfe, 0x5a, 0x48, 0x6c, 0x48, 0x24, 0x24, + 0x48, 0x6c, 0x48, 0x01, 0xa6, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x37, + 0xff, 0xf4, 0x02, 0x21, 0x03, 0x90, 0x00, 0x0d, 0x00, 0x1b, 0x00, 0x35, + 0x00, 0x00, 0x13, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, + 0x1d, 0x01, 0x14, 0x06, 0x33, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, + 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x07, 0x11, 0x14, 0x1e, 0x02, 0x33, + 0x32, 0x3e, 0x02, 0x35, 0x11, 0x33, 0x11, 0x14, 0x0e, 0x02, 0x23, 0x22, + 0x2e, 0x02, 0x35, 0x11, 0xbe, 0x2d, 0x23, 0x23, 0x2d, 0x2d, 0x24, 0x24, + 0xaf, 0x2d, 0x24, 0x24, 0x2d, 0x2d, 0x23, 0x23, 0xfa, 0x05, 0x13, 0x26, + 0x21, 0x21, 0x26, 0x13, 0x05, 0x96, 0x13, 0x36, 0x60, 0x4c, 0x4c, 0x60, + 0x36, 0x13, 0x02, 0xf9, 0x25, 0x1a, 0x1a, 0x1a, 0x24, 0x24, 0x1a, 0x1a, + 0x1a, 0x25, 0x25, 0x1a, 0x1a, 0x1a, 0x24, 0x24, 0x1a, 0x1a, 0x1a, 0x25, + 0x3f, 0xfe, 0x46, 0x21, 0x37, 0x26, 0x15, 0x15, 0x26, 0x37, 0x21, 0x01, + 0xba, 0xfe, 0x5a, 0x48, 0x6c, 0x48, 0x24, 0x24, 0x48, 0x6c, 0x48, 0x01, + 0xa6, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0x00, 0x02, 0x54, + 0x03, 0xd1, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x00, 0x01, 0x27, 0x37, 0x17, + 0x03, 0x35, 0x03, 0x33, 0x1f, 0x01, 0x33, 0x3f, 0x01, 0x33, 0x03, 0x15, + 0x01, 0x3c, 0x58, 0x63, 0x7b, 0xe1, 0xdd, 0xa7, 0x4a, 0x36, 0x08, 0x36, + 0x4a, 0xa1, 0xdd, 0x02, 0xe4, 0x2b, 0xc2, 0x3d, 0xfc, 0x6c, 0xf7, 0x01, + 0xc3, 0xa2, 0x89, 0x89, 0xa2, 0xfe, 0x3d, 0xf7, 0x00, 0x02, 0x00, 0x4c, + 0x00, 0x00, 0x02, 0x2b, 0x02, 0xba, 0x00, 0x10, 0x00, 0x1a, 0x00, 0x63, + 0xba, 0x00, 0x12, 0x00, 0x1b, 0x00, 0x1c, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x12, 0x10, 0xb8, 0x00, 0x0e, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1f, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, + 0x00, 0x00, 0x11, 0x3e, 0x59, 0xba, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x03, 0x2f, 0xba, 0x00, 0x0f, 0x00, 0x00, + 0x00, 0x01, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0f, 0x2f, 0xb9, 0x00, 0x11, + 0x00, 0x0d, 0xf4, 0xb8, 0x00, 0x03, 0x10, 0xb9, 0x00, 0x1a, 0x00, 0x0d, + 0xf4, 0x30, 0x31, 0x33, 0x11, 0x33, 0x15, 0x33, 0x32, 0x1e, 0x02, 0x15, + 0x14, 0x0e, 0x02, 0x2b, 0x01, 0x15, 0x35, 0x33, 0x32, 0x36, 0x3d, 0x01, + 0x34, 0x26, 0x2b, 0x01, 0x4c, 0x97, 0x72, 0x34, 0x50, 0x36, 0x1c, 0x1c, + 0x36, 0x50, 0x34, 0x72, 0x4d, 0x35, 0x29, 0x29, 0x35, 0x4d, 0x02, 0xba, + 0x79, 0x20, 0x3a, 0x52, 0x32, 0x32, 0x52, 0x3a, 0x20, 0x85, 0xfe, 0x28, + 0x2e, 0x1e, 0x2e, 0x28, 0x00, 0x01, 0x00, 0x3c, 0xff, 0x38, 0x02, 0x3e, + 0x02, 0xe4, 0x00, 0x20, 0x00, 0x8d, 0xba, 0x00, 0x14, 0x00, 0x21, 0x00, + 0x22, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x04, 0x2f, 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x21, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, + 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x11, 0x2f, + 0x1b, 0xb9, 0x00, 0x11, 0x00, 0x13, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x20, 0x2f, 0x1b, 0xb9, 0x00, 0x20, 0x00, 0x11, 0x3e, + 0x59, 0xb8, 0x00, 0x04, 0x10, 0xb9, 0x00, 0x07, 0x00, 0x09, 0xf4, 0xba, + 0x00, 0x1d, 0x00, 0x08, 0x00, 0x20, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x1d, + 0x2f, 0xb9, 0x00, 0x1c, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x0b, 0x00, 0x1d, + 0x00, 0x1c, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x11, 0x10, 0xb9, 0x00, 0x14, + 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x08, 0x10, 0xb9, 0x00, 0x1f, 0x00, 0x09, + 0xf4, 0x30, 0x31, 0x33, 0x11, 0x34, 0x36, 0x3b, 0x01, 0x15, 0x23, 0x15, + 0x21, 0x15, 0x07, 0x1e, 0x01, 0x15, 0x14, 0x06, 0x2b, 0x01, 0x35, 0x33, + 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x2b, 0x01, 0x35, 0x37, 0x23, 0x11, + 0x3c, 0x4d, 0x51, 0x9e, 0xac, 0x01, 0x50, 0x8b, 0x51, 0x5c, 0x8e, 0x78, + 0x42, 0x39, 0x3f, 0x3b, 0x3e, 0x42, 0x18, 0x7b, 0xc0, 0x02, 0x4f, 0x42, + 0x53, 0x6f, 0x71, 0x6a, 0xc5, 0x0f, 0x61, 0x55, 0x6b, 0x6d, 0x6f, 0x2c, + 0x30, 0x17, 0x31, 0x2c, 0x6f, 0xaf, 0xfe, 0x6b, 0xff, 0xff, 0x00, 0x34, + 0xff, 0xf4, 0x02, 0x3c, 0x03, 0x27, 0x12, 0x26, 0x00, 0x44, 0x00, 0x00, + 0x10, 0x06, 0x00, 0x43, 0xf9, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x34, + 0xff, 0xf4, 0x02, 0x3c, 0x03, 0x27, 0x12, 0x26, 0x00, 0x44, 0x00, 0x00, + 0x10, 0x06, 0x00, 0x76, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x34, + 0xff, 0xf4, 0x02, 0x3c, 0x03, 0x12, 0x00, 0x06, 0x00, 0x26, 0x00, 0x31, + 0x00, 0x00, 0x01, 0x17, 0x07, 0x27, 0x07, 0x27, 0x37, 0x01, 0x22, 0x26, + 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x3b, 0x01, + 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, + 0x16, 0x1d, 0x01, 0x33, 0x15, 0x25, 0x32, 0x36, 0x3d, 0x01, 0x23, 0x22, + 0x1d, 0x01, 0x14, 0x16, 0x01, 0x63, 0x84, 0x4b, 0x79, 0x79, 0x47, 0x84, + 0x01, 0x00, 0x2e, 0x38, 0x05, 0x05, 0x0e, 0x53, 0x3c, 0x4b, 0x5b, 0x76, + 0x72, 0x53, 0x2b, 0x33, 0x2f, 0x3a, 0x15, 0x51, 0x1a, 0x6f, 0x57, 0x6a, + 0x77, 0x39, 0xfe, 0xd6, 0x27, 0x36, 0x4f, 0x5b, 0x2a, 0x03, 0x12, 0x9f, + 0x3a, 0x73, 0x73, 0x3a, 0x9f, 0xfc, 0xee, 0x2f, 0x2c, 0x33, 0x34, 0x51, + 0x49, 0x51, 0x4e, 0x1a, 0x2e, 0x2f, 0x24, 0x1d, 0x48, 0x2c, 0x39, 0x61, + 0x62, 0xe2, 0x6b, 0x55, 0x26, 0x24, 0x3e, 0x3d, 0x14, 0x1b, 0x1c, 0x00, + 0x00, 0x03, 0x00, 0x34, 0xff, 0xf4, 0x02, 0x3c, 0x02, 0xe5, 0x00, 0x19, + 0x00, 0x39, 0x00, 0x44, 0x00, 0x00, 0x01, 0x22, 0x26, 0x27, 0x2e, 0x01, + 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x17, 0x1e, + 0x01, 0x33, 0x32, 0x36, 0x37, 0x17, 0x0e, 0x01, 0x13, 0x22, 0x26, 0x27, + 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x3b, 0x01, 0x35, + 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, + 0x1d, 0x01, 0x33, 0x15, 0x25, 0x32, 0x36, 0x3d, 0x01, 0x23, 0x22, 0x1d, + 0x01, 0x14, 0x16, 0x01, 0x71, 0x17, 0x23, 0x13, 0x16, 0x24, 0x14, 0x11, + 0x1a, 0x10, 0x34, 0x12, 0x38, 0x28, 0x17, 0x23, 0x13, 0x16, 0x24, 0x14, + 0x11, 0x1a, 0x10, 0x34, 0x12, 0x38, 0x4e, 0x2e, 0x38, 0x05, 0x05, 0x0e, + 0x53, 0x3c, 0x4b, 0x5b, 0x76, 0x72, 0x53, 0x2b, 0x33, 0x2f, 0x3a, 0x15, + 0x51, 0x1a, 0x6f, 0x57, 0x6a, 0x77, 0x39, 0xfe, 0xd6, 0x27, 0x36, 0x4f, + 0x5b, 0x2a, 0x02, 0x50, 0x0c, 0x08, 0x09, 0x0d, 0x0c, 0x0d, 0x44, 0x1b, + 0x25, 0x0c, 0x08, 0x09, 0x0d, 0x0c, 0x0d, 0x44, 0x1b, 0x25, 0xfd, 0xb0, + 0x2f, 0x2c, 0x33, 0x34, 0x51, 0x49, 0x51, 0x4e, 0x1a, 0x2e, 0x2f, 0x24, + 0x1d, 0x48, 0x2c, 0x39, 0x61, 0x62, 0xe2, 0x6b, 0x55, 0x26, 0x24, 0x3e, + 0x3d, 0x14, 0x1b, 0x1c, 0xff, 0xff, 0x00, 0x34, 0xff, 0xf4, 0x02, 0x3c, + 0x02, 0xe6, 0x12, 0x26, 0x00, 0x44, 0x00, 0x00, 0x10, 0x06, 0x00, 0x6a, + 0xf9, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x34, 0xff, 0xf4, 0x02, 0x3c, + 0x03, 0x43, 0x00, 0x13, 0x00, 0x21, 0x00, 0x41, 0x00, 0x4c, 0x00, 0x00, + 0x01, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, + 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, + 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x13, 0x22, 0x26, 0x27, 0x23, 0x0e, + 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x3b, 0x01, 0x35, 0x34, 0x26, + 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x1d, 0x01, + 0x33, 0x15, 0x25, 0x32, 0x36, 0x3d, 0x01, 0x23, 0x22, 0x1d, 0x01, 0x14, + 0x16, 0x01, 0x25, 0x1f, 0x36, 0x28, 0x17, 0x17, 0x28, 0x36, 0x1f, 0x1f, + 0x36, 0x28, 0x17, 0x17, 0x28, 0x36, 0x1f, 0x19, 0x1a, 0x1a, 0x19, 0x19, + 0x1a, 0x1a, 0xdb, 0x2e, 0x38, 0x05, 0x05, 0x0e, 0x53, 0x3c, 0x4b, 0x5b, + 0x76, 0x72, 0x53, 0x2b, 0x33, 0x2f, 0x3a, 0x15, 0x51, 0x1a, 0x6f, 0x57, + 0x6a, 0x77, 0x39, 0xfe, 0xd6, 0x27, 0x36, 0x4f, 0x5b, 0x2a, 0x02, 0x25, + 0x15, 0x26, 0x35, 0x1f, 0x1f, 0x34, 0x26, 0x16, 0x15, 0x26, 0x35, 0x1f, + 0x1f, 0x34, 0x26, 0x16, 0x4b, 0x1c, 0x17, 0x22, 0x18, 0x1b, 0x1c, 0x17, + 0x22, 0x18, 0x1b, 0xfd, 0x90, 0x2f, 0x2c, 0x33, 0x34, 0x51, 0x49, 0x51, + 0x4e, 0x1a, 0x2e, 0x2f, 0x24, 0x1d, 0x48, 0x2c, 0x39, 0x61, 0x62, 0xe2, + 0x6b, 0x55, 0x26, 0x24, 0x3e, 0x3d, 0x14, 0x1b, 0x1c, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x04, 0xff, 0xf4, 0x02, 0x48, 0x02, 0x10, 0x00, 0x33, + 0x00, 0x3f, 0x00, 0x48, 0x00, 0xcd, 0xba, 0x00, 0x17, 0x00, 0x49, 0x00, + 0x4a, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x17, 0x10, 0xb8, 0x00, 0x37, 0xd0, + 0xb8, 0x00, 0x17, 0x10, 0xb8, 0x00, 0x44, 0xd0, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x13, 0x2f, 0x1b, 0xb9, 0x00, 0x13, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x19, 0x2f, 0x1b, + 0xb9, 0x00, 0x19, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x2d, 0x2f, 0x1b, 0xb9, 0x00, + 0x2d, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x13, 0x10, 0xb9, 0x00, 0x0c, + 0x00, 0x02, 0xf4, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x34, 0x00, 0x02, + 0xf4, 0xba, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x34, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x08, 0x2f, 0xba, 0x00, 0x16, 0x00, 0x13, 0x00, 0x0c, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x19, 0x10, 0xb9, 0x00, 0x40, 0x00, 0x02, 0xf4, 0xb8, + 0x00, 0x2d, 0x10, 0xb9, 0x00, 0x24, 0x00, 0x02, 0xf4, 0xba, 0x00, 0x20, + 0x00, 0x40, 0x00, 0x24, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x20, 0x2f, 0xb8, + 0x00, 0x08, 0x10, 0xb9, 0x00, 0x39, 0x00, 0x01, 0xf4, 0xba, 0x00, 0x31, + 0x00, 0x34, 0x00, 0x39, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x20, 0x10, 0xb9, + 0x00, 0x44, 0x00, 0x01, 0xf4, 0x30, 0x31, 0x17, 0x22, 0x2e, 0x02, 0x35, + 0x34, 0x36, 0x3b, 0x01, 0x35, 0x34, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, + 0x01, 0x33, 0x32, 0x16, 0x17, 0x33, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x1d, + 0x01, 0x23, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x37, 0x17, 0x0e, 0x03, + 0x23, 0x22, 0x26, 0x27, 0x23, 0x0e, 0x01, 0x27, 0x32, 0x36, 0x3d, 0x01, + 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x22, 0x06, 0x1d, 0x01, + 0x33, 0x35, 0x34, 0x26, 0x89, 0x1c, 0x31, 0x24, 0x14, 0x5e, 0x58, 0x28, + 0x3b, 0x1a, 0x1b, 0x09, 0x5c, 0x11, 0x50, 0x3a, 0x2e, 0x3e, 0x11, 0x04, + 0x2a, 0x4d, 0x26, 0x3e, 0x2c, 0x18, 0xef, 0x25, 0x23, 0x1c, 0x1c, 0x08, + 0x61, 0x08, 0x19, 0x27, 0x35, 0x22, 0x35, 0x56, 0x12, 0x04, 0x09, 0x40, + 0x10, 0x20, 0x19, 0x1d, 0x25, 0x28, 0x18, 0x01, 0x0a, 0x21, 0x20, 0x82, + 0x20, 0x0c, 0x13, 0x26, 0x3a, 0x26, 0x51, 0x53, 0x2b, 0x58, 0x24, 0x20, + 0x21, 0x41, 0x3e, 0x26, 0x23, 0x49, 0x22, 0x3e, 0x58, 0x37, 0x3d, 0x0f, + 0x3a, 0x47, 0x2b, 0x1d, 0x1b, 0x1d, 0x34, 0x26, 0x16, 0x37, 0x3e, 0x3d, + 0x38, 0x5a, 0x34, 0x31, 0x31, 0x24, 0x23, 0x13, 0x1c, 0x20, 0x01, 0x68, + 0x3b, 0x2a, 0x20, 0x20, 0x2a, 0x3b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x3c, + 0xff, 0x2c, 0x02, 0x1f, 0x02, 0x10, 0x00, 0x3a, 0x00, 0x72, 0xba, 0x00, + 0x29, 0x00, 0x3b, 0x00, 0x3c, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x33, 0x2f, 0x1b, + 0xb9, 0x00, 0x33, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x10, 0xb9, + 0x00, 0x07, 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x33, 0x10, 0xb9, 0x00, 0x0e, + 0x00, 0x09, 0xf4, 0xb8, 0x00, 0x33, 0x10, 0xb8, 0x00, 0x15, 0xd0, 0xb8, + 0x00, 0x33, 0x10, 0xb8, 0x00, 0x1a, 0xdc, 0x41, 0x07, 0x00, 0x0f, 0x00, + 0x1a, 0x00, 0x1f, 0x00, 0x1a, 0x00, 0x2f, 0x00, 0x1a, 0x00, 0x03, 0x5d, + 0xb8, 0x00, 0x31, 0xdc, 0xb8, 0x00, 0x29, 0xdc, 0xb9, 0x00, 0x22, 0x00, + 0x0b, 0xf4, 0x30, 0x31, 0x01, 0x32, 0x16, 0x17, 0x07, 0x2e, 0x01, 0x23, + 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x33, 0x32, 0x36, 0x37, 0x17, 0x0e, + 0x01, 0x0f, 0x01, 0x17, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, + 0x02, 0x23, 0x22, 0x26, 0x27, 0x37, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x35, + 0x34, 0x2e, 0x02, 0x2f, 0x01, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, + 0x01, 0x40, 0x55, 0x67, 0x1b, 0x72, 0x0e, 0x2d, 0x2a, 0x33, 0x37, 0x37, + 0x35, 0x2b, 0x31, 0x11, 0x70, 0x1b, 0x67, 0x52, 0x09, 0x04, 0x0c, 0x18, + 0x0c, 0x1e, 0x2b, 0x16, 0x25, 0x30, 0x19, 0x34, 0x3b, 0x0d, 0x2e, 0x0a, + 0x21, 0x17, 0x13, 0x19, 0x06, 0x11, 0x1d, 0x17, 0x15, 0x0e, 0x61, 0x6c, + 0x24, 0x43, 0x61, 0x02, 0x10, 0x45, 0x39, 0x3e, 0x1e, 0x28, 0x3b, 0x33, + 0x54, 0x33, 0x3b, 0x28, 0x20, 0x40, 0x37, 0x45, 0x02, 0x2b, 0x04, 0x03, + 0x04, 0x20, 0x25, 0x1a, 0x22, 0x16, 0x09, 0x1d, 0x0f, 0x38, 0x0c, 0x11, + 0x0c, 0x0d, 0x06, 0x0c, 0x0b, 0x09, 0x02, 0x02, 0x43, 0x10, 0x8a, 0x6f, + 0x3f, 0x64, 0x46, 0x25, 0xff, 0xff, 0x00, 0x32, 0xff, 0xf4, 0x02, 0x26, + 0x03, 0x27, 0x12, 0x26, 0x00, 0x48, 0x00, 0x00, 0x10, 0x06, 0x00, 0x43, + 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x32, 0xff, 0xf4, 0x02, 0x26, + 0x03, 0x27, 0x12, 0x26, 0x00, 0x48, 0x00, 0x00, 0x10, 0x06, 0x00, 0x76, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x32, 0xff, 0xf4, 0x02, 0x26, + 0x03, 0x12, 0x00, 0x06, 0x00, 0x20, 0x00, 0x29, 0x00, 0x00, 0x01, 0x17, + 0x07, 0x27, 0x07, 0x27, 0x37, 0x13, 0x22, 0x26, 0x35, 0x34, 0x3e, 0x02, + 0x33, 0x32, 0x1e, 0x02, 0x1d, 0x01, 0x21, 0x15, 0x14, 0x16, 0x33, 0x32, + 0x36, 0x37, 0x17, 0x0e, 0x01, 0x03, 0x22, 0x06, 0x1d, 0x01, 0x33, 0x35, + 0x34, 0x26, 0x01, 0x6b, 0x84, 0x4b, 0x79, 0x79, 0x47, 0x84, 0x4b, 0x82, + 0x86, 0x23, 0x41, 0x5d, 0x3a, 0x3a, 0x5c, 0x40, 0x23, 0xfe, 0x9f, 0x3e, + 0x3c, 0x2e, 0x42, 0x18, 0x50, 0x1e, 0x6c, 0x5f, 0x30, 0x39, 0xd0, 0x37, + 0x03, 0x12, 0x9f, 0x3a, 0x73, 0x73, 0x3a, 0x9f, 0xfc, 0xe2, 0x90, 0x7c, + 0x3f, 0x65, 0x47, 0x25, 0x25, 0x44, 0x61, 0x3c, 0x2c, 0x09, 0x32, 0x3d, + 0x23, 0x1d, 0x57, 0x25, 0x36, 0x01, 0xb2, 0x3b, 0x32, 0x08, 0x08, 0x33, + 0x3a, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x32, 0xff, 0xf4, 0x02, 0x26, + 0x02, 0xe6, 0x12, 0x26, 0x00, 0x48, 0x00, 0x00, 0x10, 0x06, 0x00, 0x6a, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5e, 0x00, 0x00, 0x02, 0x2e, + 0x03, 0x27, 0x00, 0x09, 0x00, 0x0d, 0x00, 0x00, 0x37, 0x33, 0x11, 0x23, + 0x35, 0x21, 0x11, 0x33, 0x15, 0x21, 0x13, 0x37, 0x17, 0x07, 0x5e, 0xa4, + 0xa4, 0x01, 0x38, 0x98, 0xfe, 0x30, 0x58, 0x7b, 0x63, 0x58, 0x73, 0x01, + 0x1e, 0x73, 0xfe, 0x6f, 0x73, 0x02, 0xea, 0x3d, 0xc2, 0x2b, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x5e, 0x00, 0x00, 0x02, 0x2e, 0x03, 0x27, 0x00, 0x09, + 0x00, 0x0d, 0x00, 0x00, 0x37, 0x33, 0x11, 0x23, 0x35, 0x21, 0x11, 0x33, + 0x15, 0x21, 0x13, 0x27, 0x37, 0x17, 0x5e, 0xa4, 0xa4, 0x01, 0x38, 0x98, + 0xfe, 0x30, 0xfe, 0x58, 0x63, 0x7b, 0x73, 0x01, 0x1e, 0x73, 0xfe, 0x6f, + 0x73, 0x02, 0x3a, 0x2b, 0xc2, 0x3d, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5e, + 0x00, 0x00, 0x02, 0x2e, 0x03, 0x12, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, + 0x01, 0x17, 0x07, 0x27, 0x07, 0x27, 0x37, 0x03, 0x33, 0x11, 0x23, 0x35, + 0x21, 0x11, 0x33, 0x15, 0x21, 0x01, 0x8a, 0x84, 0x4b, 0x79, 0x79, 0x47, + 0x84, 0xb0, 0xa4, 0xa4, 0x01, 0x38, 0x98, 0xfe, 0x30, 0x03, 0x12, 0x9f, + 0x3a, 0x73, 0x73, 0x3a, 0x9f, 0xfd, 0x61, 0x01, 0x1e, 0x73, 0xfe, 0x6f, + 0x73, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x5e, 0x00, 0x00, 0x02, 0x2e, + 0x02, 0xe6, 0x00, 0x09, 0x00, 0x17, 0x00, 0x25, 0x00, 0x00, 0x37, 0x33, + 0x11, 0x23, 0x35, 0x21, 0x11, 0x33, 0x15, 0x21, 0x13, 0x22, 0x26, 0x3d, + 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x33, 0x22, + 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, + 0x5e, 0xa4, 0xa4, 0x01, 0x38, 0x98, 0xfe, 0x30, 0x80, 0x2d, 0x23, 0x23, + 0x2d, 0x2d, 0x24, 0x24, 0xaf, 0x2d, 0x24, 0x24, 0x2d, 0x2d, 0x23, 0x23, + 0x73, 0x01, 0x1e, 0x73, 0xfe, 0x6f, 0x73, 0x02, 0x4f, 0x25, 0x1a, 0x1a, + 0x1a, 0x24, 0x24, 0x1a, 0x1a, 0x1a, 0x25, 0x25, 0x1a, 0x1a, 0x1a, 0x24, + 0x24, 0x1a, 0x1a, 0x1a, 0x25, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x28, + 0xff, 0xf4, 0x02, 0x31, 0x02, 0xf1, 0x00, 0x27, 0x00, 0x35, 0x00, 0x87, + 0xba, 0x00, 0x2f, 0x00, 0x36, 0x00, 0x37, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x2f, 0x10, 0xb8, 0x00, 0x0b, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x22, 0x2f, 0x1b, 0xb9, 0x00, 0x22, 0x00, 0x21, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0b, 0x2f, 0x1b, 0xb9, 0x00, + 0x0b, 0x00, 0x11, 0x3e, 0x59, 0xba, 0x00, 0x15, 0x00, 0x22, 0x00, 0x0b, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x15, 0x2f, 0xba, 0x00, 0x26, 0x00, 0x22, + 0x00, 0x15, 0x11, 0x12, 0x39, 0xba, 0x00, 0x1c, 0x00, 0x26, 0x00, 0x15, + 0x11, 0x12, 0x39, 0xba, 0x00, 0x01, 0x00, 0x26, 0x00, 0x1c, 0x11, 0x12, + 0x39, 0xb9, 0x00, 0x2f, 0x00, 0x01, 0xf4, 0xba, 0x00, 0x18, 0x00, 0x2f, + 0x00, 0x15, 0x11, 0x12, 0x39, 0xba, 0x00, 0x1f, 0x00, 0x26, 0x00, 0x1c, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0b, 0x10, 0xb9, 0x00, 0x28, 0x00, 0x09, + 0xf4, 0x30, 0x31, 0x01, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x0e, 0x02, 0x23, + 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x17, 0x37, + 0x2e, 0x01, 0x27, 0x07, 0x27, 0x37, 0x2e, 0x01, 0x27, 0x33, 0x1e, 0x01, + 0x17, 0x37, 0x03, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, + 0x1d, 0x01, 0x14, 0x16, 0x01, 0xe3, 0x4b, 0x21, 0x38, 0x29, 0x17, 0x25, + 0x44, 0x5f, 0x3a, 0x3e, 0x62, 0x43, 0x24, 0x1d, 0x35, 0x4a, 0x2e, 0x39, + 0x4c, 0x18, 0x09, 0x0e, 0x3a, 0x2a, 0x5c, 0x33, 0x52, 0x24, 0x51, 0x2d, + 0xe2, 0x0d, 0x19, 0x0d, 0x55, 0x83, 0x32, 0x38, 0x3a, 0x31, 0x33, 0x39, + 0x3b, 0x02, 0xb5, 0x2c, 0x21, 0x4f, 0x5c, 0x6a, 0x3d, 0x4c, 0x6e, 0x46, + 0x22, 0x25, 0x44, 0x62, 0x3e, 0x38, 0x5b, 0x41, 0x23, 0x33, 0x2d, 0x04, + 0x2e, 0x57, 0x29, 0x36, 0x3c, 0x30, 0x1d, 0x34, 0x17, 0x08, 0x13, 0x0a, + 0x32, 0xfd, 0x71, 0x3e, 0x39, 0x38, 0x39, 0x3a, 0x3c, 0x39, 0x36, 0x39, + 0x3e, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x41, 0x00, 0x00, 0x02, 0x1b, + 0x02, 0xe5, 0x00, 0x19, 0x00, 0x33, 0x00, 0x00, 0x01, 0x22, 0x26, 0x27, + 0x2e, 0x01, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, + 0x17, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x37, 0x17, 0x0e, 0x01, 0x01, 0x11, + 0x33, 0x15, 0x33, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x11, 0x23, + 0x11, 0x34, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x11, 0x01, 0x7a, 0x17, 0x23, + 0x13, 0x16, 0x24, 0x14, 0x11, 0x1a, 0x10, 0x34, 0x12, 0x38, 0x28, 0x17, + 0x23, 0x13, 0x16, 0x24, 0x14, 0x11, 0x1a, 0x10, 0x34, 0x12, 0x38, 0xfe, + 0x9f, 0x94, 0x06, 0x09, 0x1a, 0x25, 0x31, 0x1f, 0x25, 0x3e, 0x2c, 0x19, + 0x94, 0x57, 0x11, 0x21, 0x1a, 0x0f, 0x02, 0x50, 0x0c, 0x08, 0x09, 0x0d, + 0x0c, 0x0d, 0x44, 0x1b, 0x25, 0x0c, 0x08, 0x09, 0x0d, 0x0c, 0x0d, 0x44, + 0x1b, 0x25, 0xfd, 0xb0, 0x02, 0x04, 0x5e, 0x16, 0x26, 0x1d, 0x11, 0x19, + 0x32, 0x48, 0x2f, 0xfe, 0xb2, 0x01, 0x3a, 0x64, 0x09, 0x13, 0x1c, 0x13, + 0xfe, 0xad, 0x00, 0x00, 0xff, 0xff, 0x00, 0x29, 0xff, 0xf4, 0x02, 0x2f, + 0x03, 0x27, 0x12, 0x26, 0x00, 0x52, 0x00, 0x00, 0x10, 0x06, 0x00, 0x43, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x29, 0xff, 0xf4, 0x02, 0x2f, + 0x03, 0x27, 0x12, 0x26, 0x00, 0x52, 0x00, 0x00, 0x10, 0x06, 0x00, 0x76, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x29, 0xff, 0xf4, 0x02, 0x2f, + 0x03, 0x12, 0x00, 0x06, 0x00, 0x1a, 0x00, 0x28, 0x00, 0x00, 0x01, 0x17, + 0x07, 0x27, 0x07, 0x27, 0x37, 0x13, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, + 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, 0x36, + 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, + 0x6a, 0x84, 0x4b, 0x79, 0x79, 0x47, 0x84, 0x3e, 0x3c, 0x60, 0x43, 0x24, + 0x24, 0x43, 0x60, 0x3c, 0x3c, 0x60, 0x43, 0x24, 0x24, 0x43, 0x60, 0x3c, + 0x32, 0x38, 0x38, 0x32, 0x32, 0x38, 0x38, 0x03, 0x12, 0x9f, 0x3a, 0x73, + 0x73, 0x3a, 0x9f, 0xfc, 0xe2, 0x25, 0x46, 0x64, 0x3f, 0x3f, 0x64, 0x46, + 0x25, 0x25, 0x46, 0x64, 0x3f, 0x3f, 0x64, 0x46, 0x25, 0x6e, 0x3e, 0x39, + 0x52, 0x39, 0x3e, 0x3e, 0x39, 0x52, 0x39, 0x3e, 0x00, 0x03, 0x00, 0x29, + 0xff, 0xf4, 0x02, 0x2f, 0x02, 0xe5, 0x00, 0x19, 0x00, 0x2d, 0x00, 0x3b, + 0x00, 0x00, 0x01, 0x22, 0x26, 0x27, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x07, + 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x01, 0x33, 0x32, 0x36, + 0x37, 0x17, 0x0e, 0x01, 0x03, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, + 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, 0x36, 0x3d, + 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x78, + 0x17, 0x23, 0x13, 0x16, 0x24, 0x14, 0x11, 0x1a, 0x10, 0x34, 0x12, 0x38, + 0x28, 0x17, 0x23, 0x13, 0x16, 0x24, 0x14, 0x11, 0x1a, 0x10, 0x34, 0x12, + 0x38, 0x74, 0x3c, 0x60, 0x43, 0x24, 0x24, 0x43, 0x60, 0x3c, 0x3c, 0x60, + 0x43, 0x24, 0x24, 0x43, 0x60, 0x3c, 0x32, 0x38, 0x38, 0x32, 0x32, 0x38, + 0x38, 0x02, 0x50, 0x0c, 0x08, 0x09, 0x0d, 0x0c, 0x0d, 0x44, 0x1b, 0x25, + 0x0c, 0x08, 0x09, 0x0d, 0x0c, 0x0d, 0x44, 0x1b, 0x25, 0xfd, 0xa4, 0x25, + 0x46, 0x64, 0x3f, 0x3f, 0x64, 0x46, 0x25, 0x25, 0x46, 0x64, 0x3f, 0x3f, + 0x64, 0x46, 0x25, 0x6e, 0x3e, 0x39, 0x52, 0x39, 0x3e, 0x3e, 0x39, 0x52, + 0x39, 0x3e, 0x00, 0x00, 0xff, 0xff, 0x00, 0x29, 0xff, 0xf4, 0x02, 0x2f, + 0x02, 0xe6, 0x12, 0x26, 0x00, 0x52, 0x00, 0x00, 0x10, 0x06, 0x00, 0x6a, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x3e, 0x00, 0x1d, 0x02, 0x1a, + 0x02, 0x45, 0x00, 0x03, 0x00, 0x11, 0x00, 0x1f, 0x00, 0x43, 0xba, 0x00, + 0x04, 0x00, 0x20, 0x00, 0x21, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x04, 0x10, + 0xb8, 0x00, 0x00, 0xd0, 0xb8, 0x00, 0x04, 0x10, 0xb8, 0x00, 0x12, 0xd0, + 0x00, 0xbb, 0x00, 0x01, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x2b, 0xb8, + 0x00, 0x00, 0x10, 0xb8, 0x00, 0x0b, 0xdc, 0xb9, 0x00, 0x04, 0x00, 0x07, + 0xf4, 0xb8, 0x00, 0x01, 0x10, 0xb8, 0x00, 0x12, 0xdc, 0xb9, 0x00, 0x19, + 0x00, 0x07, 0xf4, 0x30, 0x31, 0x37, 0x35, 0x21, 0x15, 0x07, 0x22, 0x26, + 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x03, + 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, + 0x06, 0x3e, 0x01, 0xdc, 0xee, 0x30, 0x28, 0x28, 0x30, 0x30, 0x28, 0x28, + 0x30, 0x30, 0x28, 0x28, 0x30, 0x30, 0x28, 0x28, 0xf6, 0x76, 0x76, 0xd9, + 0x28, 0x1d, 0x18, 0x1d, 0x28, 0x28, 0x1d, 0x18, 0x1d, 0x28, 0x01, 0x86, + 0x28, 0x1d, 0x18, 0x1d, 0x28, 0x28, 0x1d, 0x18, 0x1d, 0x28, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x17, 0xff, 0xc5, 0x02, 0x41, 0x02, 0x3f, 0x00, 0x19, + 0x00, 0x23, 0x00, 0x2d, 0x00, 0x9f, 0xba, 0x00, 0x15, 0x00, 0x2e, 0x00, + 0x2f, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x15, 0x10, 0xb8, 0x00, 0x1a, 0xd0, + 0xb8, 0x00, 0x15, 0x10, 0xb8, 0x00, 0x24, 0xd0, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x15, 0x2f, 0x1b, + 0xb9, 0x00, 0x15, 0x00, 0x11, 0x3e, 0x59, 0xba, 0x00, 0x01, 0x00, 0x08, + 0x00, 0x15, 0x11, 0x12, 0x39, 0xb9, 0x00, 0x24, 0x00, 0x09, 0xf4, 0xba, + 0x00, 0x0b, 0x00, 0x08, 0x00, 0x24, 0x11, 0x12, 0x39, 0xba, 0x00, 0x0e, + 0x00, 0x08, 0x00, 0x24, 0x11, 0x12, 0x39, 0xba, 0x00, 0x18, 0x00, 0x08, + 0x00, 0x15, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x08, 0x10, 0xb9, 0x00, 0x1a, + 0x00, 0x09, 0xf4, 0xba, 0x00, 0x21, 0x00, 0x08, 0x00, 0x24, 0x11, 0x12, + 0x39, 0xba, 0x00, 0x22, 0x00, 0x1a, 0x00, 0x15, 0x11, 0x12, 0x39, 0xba, + 0x00, 0x2b, 0x00, 0x1a, 0x00, 0x15, 0x11, 0x12, 0x39, 0xba, 0x00, 0x2c, + 0x00, 0x08, 0x00, 0x24, 0x11, 0x12, 0x39, 0x30, 0x31, 0x3f, 0x01, 0x26, + 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x17, 0x37, 0x17, 0x07, 0x16, + 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x07, 0x13, 0x22, 0x06, + 0x1d, 0x01, 0x1c, 0x01, 0x17, 0x37, 0x26, 0x03, 0x32, 0x36, 0x3d, 0x01, + 0x3c, 0x01, 0x27, 0x07, 0x16, 0x17, 0x45, 0x33, 0x24, 0x43, 0x60, 0x3c, + 0x26, 0x42, 0x1b, 0x40, 0x52, 0x45, 0x33, 0x24, 0x43, 0x60, 0x3c, 0x26, + 0x42, 0x1b, 0x40, 0xc3, 0x32, 0x38, 0x02, 0xa5, 0x19, 0x24, 0x32, 0x38, + 0x02, 0xa5, 0x19, 0x01, 0x53, 0x43, 0x6b, 0x3f, 0x64, 0x46, 0x25, 0x10, + 0x0e, 0x4d, 0x3c, 0x53, 0x44, 0x6a, 0x3f, 0x64, 0x46, 0x25, 0x10, 0x0e, + 0x4d, 0x01, 0xdd, 0x3e, 0x39, 0x4a, 0x06, 0x0e, 0x05, 0xc9, 0x11, 0xfe, + 0xc0, 0x3e, 0x39, 0x4a, 0x06, 0x0e, 0x05, 0xc9, 0x11, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x3d, 0xff, 0xf4, 0x02, 0x17, 0x03, 0x27, 0x12, 0x26, + 0x00, 0x58, 0x00, 0x00, 0x10, 0x06, 0x00, 0x43, 0xff, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x3d, 0xff, 0xf4, 0x02, 0x17, 0x03, 0x27, 0x12, 0x26, + 0x00, 0x58, 0x00, 0x00, 0x10, 0x06, 0x00, 0x76, 0xff, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x3d, 0xff, 0xf4, 0x02, 0x17, 0x03, 0x12, 0x00, 0x06, + 0x00, 0x1e, 0x00, 0x00, 0x01, 0x17, 0x07, 0x27, 0x07, 0x27, 0x37, 0x13, + 0x23, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x11, 0x33, 0x11, 0x14, + 0x33, 0x32, 0x3e, 0x02, 0x35, 0x11, 0x33, 0x11, 0x23, 0x01, 0x69, 0x84, + 0x4b, 0x79, 0x79, 0x47, 0x84, 0x96, 0x06, 0x11, 0x49, 0x3e, 0x25, 0x3e, + 0x2c, 0x19, 0x94, 0x57, 0x11, 0x21, 0x19, 0x10, 0x94, 0x94, 0x03, 0x12, + 0x9f, 0x3a, 0x73, 0x73, 0x3a, 0x9f, 0xfd, 0x4c, 0x2c, 0x3e, 0x19, 0x32, + 0x48, 0x2f, 0x01, 0x4e, 0xfe, 0xc6, 0x64, 0x09, 0x13, 0x1c, 0x13, 0x01, + 0x53, 0xfd, 0xfc, 0x00, 0xff, 0xff, 0x00, 0x3d, 0xff, 0xf4, 0x02, 0x17, + 0x02, 0xe6, 0x12, 0x26, 0x00, 0x58, 0x00, 0x00, 0x10, 0x06, 0x00, 0x6a, + 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x13, 0xff, 0x38, 0x02, 0x45, + 0x03, 0x27, 0x12, 0x26, 0x00, 0x5c, 0x00, 0x00, 0x10, 0x06, 0x00, 0x76, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x3b, 0xff, 0x38, 0x02, 0x31, + 0x02, 0xe4, 0x00, 0x16, 0x00, 0x24, 0x00, 0x81, 0xba, 0x00, 0x17, 0x00, + 0x25, 0x00, 0x26, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x17, 0x10, 0xb8, 0x00, + 0x10, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, + 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x21, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, 0x1d, 0x3e, + 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x16, 0x2f, 0x1b, 0xb9, + 0x00, 0x16, 0x00, 0x13, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x10, 0x2f, 0x1b, 0xb9, 0x00, 0x10, 0x00, 0x11, 0x3e, 0x59, 0xb8, + 0x00, 0x06, 0x10, 0xb9, 0x00, 0x1e, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x02, + 0x00, 0x1e, 0x00, 0x06, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x10, 0x10, 0xb9, + 0x00, 0x17, 0x00, 0x09, 0xf4, 0xba, 0x00, 0x13, 0x00, 0x17, 0x00, 0x10, + 0x11, 0x12, 0x39, 0x30, 0x31, 0x13, 0x33, 0x11, 0x33, 0x3e, 0x01, 0x33, + 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x23, + 0x11, 0x23, 0x13, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, + 0x1d, 0x01, 0x14, 0x16, 0x3b, 0x94, 0x07, 0x13, 0x48, 0x3e, 0x2b, 0x47, + 0x33, 0x1d, 0x1d, 0x33, 0x47, 0x2b, 0x3e, 0x48, 0x13, 0x07, 0x94, 0xf4, + 0x32, 0x36, 0x36, 0x32, 0x27, 0x39, 0x39, 0x02, 0xe4, 0xfe, 0xc2, 0x2e, + 0x3c, 0x20, 0x42, 0x66, 0x46, 0x46, 0x66, 0x42, 0x20, 0x3b, 0x2f, 0xfe, + 0xda, 0x01, 0x2f, 0x3d, 0x36, 0x50, 0x36, 0x3d, 0x26, 0x29, 0x98, 0x29, + 0x26, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x13, 0xff, 0x38, 0x02, 0x45, + 0x02, 0xe6, 0x12, 0x26, 0x00, 0x5c, 0x00, 0x00, 0x10, 0x06, 0x00, 0x6a, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x04, 0x9e, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x5c, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0d, 0x00, 0xa6, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x04, 0x00, 0xbe, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x1b, 0x00, 0xfb, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x01, 0x3d, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0d, 0x01, 0x6c, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x01, 0x9c, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x51, 0x02, 0x51, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0b, 0x02, 0xbb, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x33, 0x03, 0x2f, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x19, 0x03, 0x97, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x12, 0x03, 0xd7, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x90, 0x05, 0x0c, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1a, 0x05, 0xd3, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x3a, 0x06, 0x64, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x12, 0x0c, 0x16, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x18, 0x06, 0x9f, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x12, 0x0b, 0xdd, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x11, 0x07, 0x26, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x13, 0x0b, 0xa3, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x09, 0x07, 0x5d, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x00, 0x11, 0x0b, 0x69, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x00, 0x0b, 0x07, 0x79, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x1a, 0x0b, 0x2a, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x11, 0x07, 0xa5, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x05, 0x00, 0x15, 0x0a, 0xde, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x05, 0x00, 0x18, 0x08, 0x14, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x00, 0x09, 0x08, 0x7b, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x00, 0x18, 0x0a, 0x99, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x00, 0x09, 0x08, 0xb8, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x0c, 0x08, 0xf6, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x09, 0x00, 0x12, 0x09, 0x3e, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x0a, 0x00, 0x12, 0x09, 0x9e, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x0b, 0x00, 0x12, 0x0a, 0x05, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x18, 0x06, 0xb8, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x12, 0x07, 0x38, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x09, 0x07, 0x67, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x12, 0x07, 0x85, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x04, 0x00, 0x1f, 0x07, 0xb7, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x05, 0x00, 0x1a, 0x08, 0x2d, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x06, 0x00, 0x13, 0x08, 0x85, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x07, 0x00, 0x13, 0x08, 0xc2, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x08, 0x00, 0x10, 0x09, 0x03, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x09, 0x00, 0x16, 0x09, 0x51, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x0a, 0x00, 0x1f, 0x09, 0xb1, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x0b, 0x00, 0x23, 0x0a, 0x18, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x21, 0x06, 0xd1, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x04, 0x00, 0x17, 0x07, 0xd7, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x05, 0x00, 0x06, 0x08, 0x48, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x06, 0x00, 0x0c, 0x08, 0x99, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x07, 0x00, 0x0c, 0x08, 0xd6, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x08, 0x00, 0x0b, 0x09, 0x14, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x09, 0x00, 0x10, 0x09, 0x68, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x0a, 0x00, 0x10, 0x09, 0xd1, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x0b, 0x00, 0x0f, 0x0a, 0x3c, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x15, 0x06, 0xf3, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x04, 0x00, 0x11, 0x07, 0xef, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x05, 0x00, 0x11, 0x08, 0x4f, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x06, 0x00, 0x05, 0x08, 0xa6, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x07, 0x00, 0x06, 0x08, 0xe3, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x08, 0x00, 0x10, 0x09, 0x20, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x09, 0x00, 0x12, 0x09, 0x79, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x0a, 0x00, 0x13, 0x09, 0xe2, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x0b, 0x00, 0x0c, 0x0a, 0x4c, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x1c, 0x07, 0x09, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x01, 0x00, 0x11, 0x07, 0x4b, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x02, 0x00, 0x07, 0x07, 0x71, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x03, 0x00, 0x0c, 0x07, 0x98, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x04, 0x00, 0x12, 0x08, 0x01, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x05, 0x00, 0x19, 0x08, 0x61, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x06, 0x00, 0x0b, 0x08, 0xac, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x07, 0x00, 0x0b, 0x08, 0xea, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x08, 0x00, 0x0c, 0x09, 0x31, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x09, 0x00, 0x11, 0x09, 0x8c, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x0a, 0x00, 0x0e, 0x09, 0xf6, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x0b, 0x00, 0x0d, 0x0a, 0x59, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x01, 0x00, 0x1a, 0x00, 0x8a, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x02, 0x00, 0x08, 0x00, 0xb4, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x03, 0x00, 0x36, 0x00, 0xc3, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x04, 0x00, 0x24, 0x01, 0x17, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x05, 0x00, 0x1a, 0x01, 0x50, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x06, 0x00, 0x20, 0x01, 0x7a, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x07, 0x00, 0xa2, 0x01, 0xad, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x08, 0x00, 0x16, 0x02, 0xa3, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x09, 0x00, 0x66, 0x02, 0xc7, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x0b, 0x00, 0x32, 0x03, 0x63, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x0c, 0x00, 0x24, 0x03, 0xb1, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x0d, 0x01, 0x20, 0x03, 0xea, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x0e, 0x00, 0x34, 0x05, 0x9d, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x13, 0x00, 0x74, 0x05, 0xee, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x01, 0x00, 0x00, 0x24, 0x0b, 0xf0, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x01, 0x01, 0x00, 0x24, 0x0b, 0xb7, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x01, 0x02, 0x00, 0x26, 0x0b, 0x7b, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x01, 0x03, 0x00, 0x22, 0x0b, 0x45, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x01, 0x04, 0x00, 0x34, 0x0a, 0xf4, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x01, 0x05, 0x00, 0x2a, 0x0a, 0xb2, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x01, 0x06, 0x00, 0x30, 0x0a, 0x67, 0x00, 0x43, + 0x00, 0x6f, 0x00, 0x70, 0x00, 0x79, 0x00, 0x72, 0x00, 0x69, 0x00, 0x67, + 0x00, 0x68, 0x00, 0x74, 0x00, 0x20, 0x00, 0x32, 0x00, 0x30, 0x00, 0x31, + 0x00, 0x37, 0x00, 0x20, 0x00, 0x49, 0x00, 0x42, 0x00, 0x4d, 0x00, 0x20, + 0x00, 0x43, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x70, 0x00, 0x2e, 0x00, 0x20, + 0x00, 0x41, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x20, 0x00, 0x72, 0x00, 0x69, + 0x00, 0x67, 0x00, 0x68, 0x00, 0x74, 0x00, 0x73, 0x00, 0x20, 0x00, 0x72, + 0x00, 0x65, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00, 0x76, 0x00, 0x65, + 0x00, 0x64, 0x00, 0x2e, 0x00, 0x00, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, + 0x67, 0x68, 0x74, 0x20, 0x32, 0x30, 0x31, 0x37, 0x20, 0x49, 0x42, 0x4d, + 0x20, 0x43, 0x6f, 0x72, 0x70, 0x2e, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, + 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x2e, 0x00, 0x00, 0x49, 0x00, 0x42, 0x00, 0x4d, 0x00, 0x20, + 0x00, 0x50, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x78, 0x00, 0x20, 0x00, 0x4d, + 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x00, 0x49, 0x42, 0x4d, 0x20, + 0x50, 0x6c, 0x65, 0x78, 0x20, 0x4d, 0x6f, 0x6e, 0x6f, 0x00, 0x00, 0x42, + 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x64, 0x00, 0x00, 0x42, 0x6f, 0x6c, 0x64, + 0x00, 0x00, 0x32, 0x00, 0x2e, 0x00, 0x30, 0x00, 0x30, 0x00, 0x34, 0x00, + 0x3b, 0x00, 0x49, 0x00, 0x42, 0x00, 0x4d, 0x00, 0x20, 0x00, 0x3b, 0x00, + 0x49, 0x00, 0x42, 0x00, 0x4d, 0x00, 0x50, 0x00, 0x6c, 0x00, 0x65, 0x00, + 0x78, 0x00, 0x4d, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x2d, 0x00, + 0x42, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x64, 0x00, 0x00, 0x32, 0x2e, 0x30, + 0x30, 0x34, 0x3b, 0x49, 0x42, 0x4d, 0x20, 0x3b, 0x49, 0x42, 0x4d, 0x50, + 0x6c, 0x65, 0x78, 0x4d, 0x6f, 0x6e, 0x6f, 0x2d, 0x42, 0x6f, 0x6c, 0x64, + 0x00, 0x00, 0x49, 0x00, 0x42, 0x00, 0x4d, 0x00, 0x20, 0x00, 0x50, 0x00, + 0x6c, 0x00, 0x65, 0x00, 0x78, 0x00, 0x20, 0x00, 0x4d, 0x00, 0x6f, 0x00, + 0x6e, 0x00, 0x6f, 0x00, 0x20, 0x00, 0x42, 0x00, 0x6f, 0x00, 0x6c, 0x00, + 0x64, 0x00, 0x00, 0x49, 0x42, 0x4d, 0x20, 0x50, 0x6c, 0x65, 0x78, 0x20, + 0x4d, 0x6f, 0x6e, 0x6f, 0x20, 0x42, 0x6f, 0x6c, 0x64, 0x00, 0x00, 0x56, + 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, + 0x00, 0x20, 0x00, 0x32, 0x00, 0x2e, 0x00, 0x30, 0x00, 0x30, 0x00, 0x34, + 0x00, 0x00, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x32, 0x2e, + 0x30, 0x30, 0x34, 0x00, 0x00, 0x49, 0x00, 0x42, 0x00, 0x4d, 0x00, 0x50, + 0x00, 0x6c, 0x00, 0x65, 0x00, 0x78, 0x00, 0x4d, 0x00, 0x6f, 0x00, 0x6e, + 0x00, 0x6f, 0x00, 0x2d, 0x00, 0x42, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x64, + 0x00, 0x00, 0x49, 0x42, 0x4d, 0x50, 0x6c, 0x65, 0x78, 0x4d, 0x6f, 0x6e, + 0x6f, 0x2d, 0x42, 0x6f, 0x6c, 0x64, 0x00, 0x00, 0x49, 0x00, 0x42, 0x00, + 0x4d, 0x00, 0x20, 0x00, 0x50, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x78, 0x00, + 0xae, 0x00, 0x20, 0x00, 0x69, 0x00, 0x73, 0x00, 0x20, 0x00, 0x61, 0x00, + 0x20, 0x00, 0x74, 0x00, 0x72, 0x00, 0x61, 0x00, 0x64, 0x00, 0x65, 0x00, + 0x6d, 0x00, 0x61, 0x00, 0x72, 0x00, 0x6b, 0x00, 0x20, 0x00, 0x6f, 0x00, + 0x66, 0x00, 0x20, 0x00, 0x49, 0x00, 0x42, 0x00, 0x4d, 0x00, 0x20, 0x00, + 0x43, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x70, 0x00, 0x2c, 0x00, 0x20, 0x00, + 0x72, 0x00, 0x65, 0x00, 0x67, 0x00, 0x69, 0x00, 0x73, 0x00, 0x74, 0x00, + 0x65, 0x00, 0x72, 0x00, 0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x69, 0x00, + 0x6e, 0x00, 0x20, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x79, 0x00, + 0x20, 0x00, 0x6a, 0x00, 0x75, 0x00, 0x72, 0x00, 0x69, 0x00, 0x73, 0x00, + 0x64, 0x00, 0x69, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, + 0x6e, 0x00, 0x73, 0x00, 0x20, 0x00, 0x77, 0x00, 0x6f, 0x00, 0x72, 0x00, + 0x6c, 0x00, 0x64, 0x00, 0x77, 0x00, 0x69, 0x00, 0x64, 0x00, 0x65, 0x00, + 0x2e, 0x00, 0x00, 0x49, 0x42, 0x4d, 0x20, 0x50, 0x6c, 0x65, 0x78, 0xa8, + 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x74, 0x72, 0x61, 0x64, 0x65, 0x6d, + 0x61, 0x72, 0x6b, 0x20, 0x6f, 0x66, 0x20, 0x49, 0x42, 0x4d, 0x20, 0x43, + 0x6f, 0x72, 0x70, 0x2c, 0x20, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x6d, 0x61, 0x6e, 0x79, 0x20, + 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x77, 0x69, 0x64, 0x65, 0x2e, + 0x00, 0x00, 0x42, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x64, 0x00, 0x20, 0x00, + 0x4d, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x61, 0x00, 0x79, 0x00, + 0x00, 0x42, 0x6f, 0x6c, 0x64, 0x20, 0x4d, 0x6f, 0x6e, 0x64, 0x61, 0x79, + 0x00, 0x00, 0x4d, 0x00, 0x69, 0x00, 0x6b, 0x00, 0x65, 0x00, 0x20, 0x00, + 0x41, 0x00, 0x62, 0x00, 0x62, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x6b, 0x00, + 0x2c, 0x00, 0x20, 0x00, 0x50, 0x00, 0x61, 0x00, 0x75, 0x00, 0x6c, 0x00, + 0x20, 0x00, 0x76, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x64, 0x00, + 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x4c, 0x00, 0x61, 0x00, 0x61, 0x00, + 0x6e, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x50, 0x00, 0x69, 0x00, 0x65, 0x00, + 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x76, 0x00, 0x61, 0x00, + 0x6e, 0x00, 0x20, 0x00, 0x52, 0x00, 0x6f, 0x00, 0x73, 0x00, 0x6d, 0x00, + 0x61, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x00, 0x4d, 0x69, 0x6b, + 0x65, 0x20, 0x41, 0x62, 0x62, 0x69, 0x6e, 0x6b, 0x2c, 0x20, 0x50, 0x61, + 0x75, 0x6c, 0x20, 0x76, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x72, 0x20, 0x4c, + 0x61, 0x61, 0x6e, 0x2c, 0x20, 0x50, 0x69, 0x65, 0x74, 0x65, 0x72, 0x20, + 0x76, 0x61, 0x6e, 0x20, 0x52, 0x6f, 0x73, 0x6d, 0x61, 0x6c, 0x65, 0x6e, + 0x00, 0x00, 0x68, 0x00, 0x74, 0x00, 0x74, 0x00, 0x70, 0x00, 0x3a, 0x00, + 0x2f, 0x00, 0x2f, 0x00, 0x77, 0x00, 0x77, 0x00, 0x77, 0x00, 0x2e, 0x00, + 0x62, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x64, 0x00, 0x6d, 0x00, 0x6f, 0x00, + 0x6e, 0x00, 0x64, 0x00, 0x61, 0x00, 0x79, 0x00, 0x2e, 0x00, 0x63, 0x00, + 0x6f, 0x00, 0x6d, 0x00, 0x00, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, + 0x77, 0x77, 0x77, 0x2e, 0x62, 0x6f, 0x6c, 0x64, 0x6d, 0x6f, 0x6e, 0x64, + 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x00, 0x00, 0x68, 0x00, 0x74, 0x00, + 0x74, 0x00, 0x70, 0x00, 0x3a, 0x00, 0x2f, 0x00, 0x2f, 0x00, 0x77, 0x00, + 0x77, 0x00, 0x77, 0x00, 0x2e, 0x00, 0x69, 0x00, 0x62, 0x00, 0x6d, 0x00, + 0x2e, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x00, 0x68, 0x74, 0x74, + 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x62, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x00, 0x00, 0x54, 0x00, 0x68, 0x00, 0x69, 0x00, 0x73, + 0x00, 0x20, 0x00, 0x46, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x20, + 0x00, 0x53, 0x00, 0x6f, 0x00, 0x66, 0x00, 0x74, 0x00, 0x77, 0x00, 0x61, + 0x00, 0x72, 0x00, 0x65, 0x00, 0x20, 0x00, 0x69, 0x00, 0x73, 0x00, 0x20, + 0x00, 0x6c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x73, + 0x00, 0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x64, + 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x74, 0x00, 0x68, 0x00, 0x65, + 0x00, 0x20, 0x00, 0x53, 0x00, 0x49, 0x00, 0x4c, 0x00, 0x20, 0x00, 0x4f, + 0x00, 0x70, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x46, 0x00, 0x6f, + 0x00, 0x6e, 0x00, 0x74, 0x00, 0x20, 0x00, 0x4c, 0x00, 0x69, 0x00, 0x63, + 0x00, 0x65, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x65, 0x00, 0x2c, 0x00, 0x20, + 0x00, 0x56, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, + 0x00, 0x6e, 0x00, 0x20, 0x00, 0x31, 0x00, 0x2e, 0x00, 0x31, 0x00, 0x2e, + 0x00, 0x20, 0x00, 0x54, 0x00, 0x68, 0x00, 0x69, 0x00, 0x73, 0x00, 0x20, + 0x00, 0x6c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x73, + 0x00, 0x65, 0x00, 0x20, 0x00, 0x69, 0x00, 0x73, 0x00, 0x20, 0x00, 0x61, + 0x00, 0x76, 0x00, 0x61, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x62, + 0x00, 0x6c, 0x00, 0x65, 0x00, 0x20, 0x00, 0x77, 0x00, 0x69, 0x00, 0x74, + 0x00, 0x68, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x46, 0x00, 0x41, + 0x00, 0x51, 0x00, 0x20, 0x00, 0x61, 0x00, 0x74, 0x00, 0x3a, 0x00, 0x20, + 0x00, 0x68, 0x00, 0x74, 0x00, 0x74, 0x00, 0x70, 0x00, 0x3a, 0x00, 0x2f, + 0x00, 0x2f, 0x00, 0x73, 0x00, 0x63, 0x00, 0x72, 0x00, 0x69, 0x00, 0x70, + 0x00, 0x74, 0x00, 0x73, 0x00, 0x2e, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6c, + 0x00, 0x2e, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x67, 0x00, 0x2f, 0x00, 0x4f, + 0x00, 0x46, 0x00, 0x4c, 0x00, 0x00, 0x54, 0x68, 0x69, 0x73, 0x20, 0x46, + 0x6f, 0x6e, 0x74, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, + 0x20, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x64, + 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x53, + 0x49, 0x4c, 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x46, 0x6f, 0x6e, 0x74, + 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x31, 0x2e, 0x31, 0x2e, 0x20, 0x54, + 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, + 0x69, 0x73, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x46, 0x41, 0x51, 0x20, + 0x61, 0x74, 0x3a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x2e, 0x73, 0x69, 0x6c, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x4f, 0x46, 0x4c, 0x00, 0x00, 0x68, 0x00, 0x74, 0x00, + 0x74, 0x00, 0x70, 0x00, 0x3a, 0x00, 0x2f, 0x00, 0x2f, 0x00, 0x73, 0x00, + 0x63, 0x00, 0x72, 0x00, 0x69, 0x00, 0x70, 0x00, 0x74, 0x00, 0x73, 0x00, + 0x2e, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x2e, 0x00, 0x6f, 0x00, + 0x72, 0x00, 0x67, 0x00, 0x2f, 0x00, 0x4f, 0x00, 0x46, 0x00, 0x4c, 0x00, + 0x00, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x73, 0x2e, 0x73, 0x69, 0x6c, 0x2e, 0x6f, 0x72, 0x67, 0x2f, + 0x4f, 0x46, 0x4c, 0x00, 0x00, 0x48, 0x00, 0x6f, 0x00, 0x77, 0x00, 0x20, + 0x00, 0x72, 0x00, 0x61, 0x00, 0x7a, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x62, + 0x00, 0x61, 0x00, 0x63, 0x00, 0x6b, 0x00, 0x2d, 0x00, 0x6a, 0x00, 0x75, + 0x00, 0x6d, 0x00, 0x70, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x20, + 0x00, 0x66, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x67, 0x00, 0x73, 0x00, 0x20, + 0x00, 0x63, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x6c, 0x00, 0x65, + 0x00, 0x76, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x20, 0x00, 0x73, 0x00, 0x69, + 0x00, 0x78, 0x00, 0x20, 0x00, 0x70, 0x00, 0x69, 0x00, 0x71, 0x00, 0x75, + 0x00, 0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x67, 0x00, 0x79, 0x00, 0x6d, + 0x00, 0x6e, 0x00, 0x61, 0x00, 0x73, 0x00, 0x74, 0x00, 0x73, 0x00, 0x21, + 0x00, 0x00, 0x48, 0x6f, 0x77, 0x20, 0x72, 0x61, 0x7a, 0x6f, 0x72, 0x62, + 0x61, 0x63, 0x6b, 0x2d, 0x6a, 0x75, 0x6d, 0x70, 0x69, 0x6e, 0x67, 0x20, + 0x66, 0x72, 0x6f, 0x67, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x20, 0x73, 0x69, 0x78, 0x20, 0x70, 0x69, 0x71, 0x75, + 0x65, 0x64, 0x20, 0x67, 0x79, 0x6d, 0x6e, 0x61, 0x73, 0x74, 0x73, 0x21, + 0x00, 0x41, 0x6c, 0x6c, 0x20, 0x54, 0x79, 0x70, 0x6f, 0x67, 0x72, 0x61, + 0x70, 0x68, 0x69, 0x63, 0x20, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x00, 0x46, 0x6f, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, + 0x74, 0x79, 0x70, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x71, 0x75, + 0x65, 0x73, 0x00, 0x41, 0x6c, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x6f, + 0x67, 0x72, 0x61, 0x66, 0x69, 0x73, 0x63, 0x68, 0x65, 0x6e, 0x20, 0x4d, + 0x9a, 0x67, 0x6c, 0x69, 0x63, 0x68, 0x6b, 0x65, 0x69, 0x74, 0x65, 0x6e, + 0x00, 0x46, 0x75, 0x6e, 0x7a, 0x69, 0x6f, 0x6e, 0x69, 0x20, 0x54, 0x69, + 0x70, 0x6f, 0x67, 0x72, 0x61, 0x66, 0x69, 0x63, 0x68, 0x65, 0x00, 0x41, + 0x6c, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x6f, 0x67, 0x72, 0x61, 0x66, + 0x69, 0x73, 0x63, 0x68, 0x65, 0x20, 0x6b, 0x65, 0x6e, 0x6d, 0x65, 0x72, + 0x6b, 0x65, 0x6e, 0x00, 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, + 0x20, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x56, 0x65, 0x72, 0x74, 0x69, + 0x63, 0x61, 0x6c, 0x65, 0x00, 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, + 0x6c, 0x65, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x65, 0x00, 0x46, + 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x00, 0x46, 0x72, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x00, 0x42, 0x72, 0x65, 0x75, 0x6b, + 0x65, 0x6e, 0x00, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x43, 0x61, + 0x73, 0x65, 0x00, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x20, 0x64, 0x65, 0x73, + 0x20, 0x43, 0x68, 0x69, 0x66, 0x66, 0x72, 0x65, 0x73, 0x00, 0x4e, 0x75, + 0x6d, 0x6d, 0x65, 0x72, 0x68, 0x6f, 0x6f, 0x67, 0x74, 0x65, 0x00, 0x41, + 0x6c, 0x6c, 0x20, 0x54, 0x79, 0x70, 0x65, 0x20, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x00, 0x54, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x20, + 0x66, 0x6f, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x79, + 0x70, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x71, 0x75, 0x65, 0x73, + 0x00, 0x41, 0x6c, 0x6c, 0x65, 0x20, 0x41, 0x75, 0x73, 0x7a, 0x65, 0x69, + 0x63, 0x68, 0x6e, 0x75, 0x6e, 0x67, 0x73, 0x61, 0x72, 0x74, 0x65, 0x6e, + 0x00, 0x54, 0x75, 0x74, 0x74, 0x65, 0x20, 0x6c, 0x65, 0x20, 0x46, 0x75, + 0x6e, 0x7a, 0x69, 0x6f, 0x6e, 0x69, 0x00, 0x41, 0x6c, 0x6c, 0x65, 0x20, + 0x74, 0x79, 0x70, 0x65, 0x6b, 0x65, 0x6e, 0x6d, 0x65, 0x72, 0x6b, 0x65, + 0x6e, 0x00, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x20, 0x56, 0x65, 0x72, + 0x74, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x00, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x4e, 0x6f, + 0x72, 0x6d, 0x61, 0x6c, 0x65, 0x00, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, + 0x00, 0x50, 0x6f, 0x73, 0x69, 0x7a, 0x69, 0x6f, 0x6e, 0x65, 0x20, 0x4e, + 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x65, 0x00, 0x4e, 0x6f, 0x72, 0x6d, 0x61, + 0x6c, 0x65, 0x20, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x65, + 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x65, 0x00, 0x53, 0x75, 0x70, + 0x65, 0x72, 0x69, 0x6f, 0x72, 0x73, 0x00, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x53, 0x75, 0x70, 0x8e, 0x72, 0x69, 0x65, 0x75, + 0x72, 0x65, 0x00, 0x48, 0x6f, 0x63, 0x68, 0x67, 0x65, 0x73, 0x74, 0x65, + 0x6c, 0x6c, 0x74, 0x00, 0x41, 0x70, 0x69, 0x63, 0x65, 0x00, 0x53, 0x75, + 0x70, 0x65, 0x72, 0x69, 0x65, 0x75, 0x72, 0x65, 0x6e, 0x00, 0x49, 0x6e, + 0x66, 0x65, 0x72, 0x69, 0x6f, 0x72, 0x73, 0x00, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x6e, 0x66, 0x8e, 0x72, 0x69, 0x65, + 0x75, 0x72, 0x65, 0x00, 0x54, 0x69, 0x65, 0x66, 0x67, 0x65, 0x73, 0x74, + 0x65, 0x6c, 0x6c, 0x74, 0x00, 0x50, 0x65, 0x64, 0x69, 0x63, 0x65, 0x00, + 0x49, 0x6e, 0x66, 0x65, 0x72, 0x69, 0x65, 0x75, 0x72, 0x65, 0x6e, 0x00, + 0x4e, 0x6f, 0x20, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x00, 0x50, 0x61, 0x73, 0x20, 0x64, 0x65, 0x20, 0x46, 0x72, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x00, 0x4b, 0x65, 0x69, 0x6e, 0x20, 0x42, + 0x72, 0x75, 0x63, 0x68, 0x65, 0x00, 0x4e, 0x65, 0x73, 0x73, 0x75, 0x6e, + 0x61, 0x20, 0x46, 0x72, 0x61, 0x7a, 0x69, 0x6f, 0x6e, 0x65, 0x00, 0x47, + 0x65, 0x65, 0x6e, 0x20, 0x62, 0x72, 0x65, 0x75, 0x6b, 0x65, 0x6e, 0x00, + 0x44, 0x69, 0x61, 0x67, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x46, 0x72, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x00, 0x46, 0x72, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x65, 0x6e, 0x20, 0x44, 0x69, 0x61, 0x67, + 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x00, 0x44, 0x69, 0x61, 0x67, 0x6f, 0x6e, + 0x61, 0x6c, 0x65, 0x72, 0x20, 0x42, 0x72, 0x75, 0x63, 0x68, 0x00, 0x46, + 0x72, 0x61, 0x7a, 0x69, 0x6f, 0x6e, 0x69, 0x20, 0x44, 0x69, 0x61, 0x67, + 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x00, 0x44, 0x69, 0x61, 0x67, 0x6f, 0x6e, + 0x61, 0x6c, 0x65, 0x20, 0x62, 0x72, 0x65, 0x75, 0x6b, 0x65, 0x6e, 0x00, + 0x4c, 0x6f, 0x77, 0x65, 0x72, 0x20, 0x43, 0x61, 0x73, 0x65, 0x20, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x00, 0x43, 0x68, 0x69, 0x66, 0x66, + 0x72, 0x65, 0x73, 0x20, 0x41, 0x6e, 0x63, 0x69, 0x65, 0x6e, 0x73, 0x20, + 0x28, 0x62, 0x61, 0x73, 0x20, 0x64, 0x65, 0x20, 0x63, 0x61, 0x73, 0x73, + 0x65, 0x29, 0x00, 0x4d, 0x65, 0x64, 0x69, 0xbe, 0x76, 0x61, 0x6c, 0x2d, + 0x5a, 0x69, 0x66, 0x66, 0x65, 0x72, 0x6e, 0x00, 0x53, 0x6f, 0x70, 0x72, + 0x61, 0x20, 0x6c, 0x61, 0x20, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x20, 0x42, + 0x61, 0x73, 0x65, 0x00, 0x4b, 0x6c, 0x65, 0x69, 0x6e, 0x65, 0x20, 0x6e, + 0x75, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x00, 0x55, 0x70, 0x70, 0x65, 0x72, + 0x20, 0x43, 0x61, 0x73, 0x65, 0x20, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x00, 0x43, 0x68, 0x69, 0x66, 0x66, 0x72, 0x65, 0x73, 0x20, 0x43, + 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x6e, 0x65, 0x6c, + 0x73, 0x20, 0x28, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x61, 0x6e, 0x74, 0x73, + 0x29, 0x00, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x65, 0x20, 0x5a, 0x69, + 0x66, 0x66, 0x65, 0x72, 0x6e, 0x00, 0x54, 0x72, 0x61, 0x64, 0x69, 0x7a, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x00, 0x47, 0x72, 0x6f, 0x74, 0x65, + 0x20, 0x6e, 0x75, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x00, 0x00, 0x42, 0x00, + 0x75, 0x00, 0x6c, 0x00, 0x67, 0x00, 0x61, 0x00, 0x72, 0x00, 0x69, 0x00, + 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x43, 0x00, 0x79, 0x00, 0x72, 0x00, + 0x69, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x20, 0x00, + 0x66, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x6d, 0x00, 0x73, 0x00, 0x00, 0x42, + 0x75, 0x6c, 0x67, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x20, 0x43, 0x79, 0x72, + 0x69, 0x6c, 0x6c, 0x69, 0x63, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, + 0x00, 0x61, 0x00, 0x6c, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6e, + 0x00, 0x61, 0x00, 0x74, 0x00, 0x65, 0x00, 0x20, 0x00, 0x6e, 0x00, 0x75, + 0x00, 0x6d, 0x00, 0x62, 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x73, + 0x00, 0x69, 0x00, 0x67, 0x00, 0x6e, 0x00, 0x00, 0x61, 0x6c, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x74, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x20, 0x73, 0x69, 0x67, 0x6e, 0x00, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x74, + 0x00, 0x65, 0x00, 0x72, 0x00, 0x6e, 0x00, 0x61, 0x00, 0x74, 0x00, 0x65, + 0x00, 0x20, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x77, 0x00, 0x65, 0x00, 0x72, + 0x00, 0x63, 0x00, 0x61, 0x00, 0x73, 0x00, 0x65, 0x00, 0x20, 0x00, 0x65, + 0x00, 0x73, 0x00, 0x7a, 0x00, 0x65, 0x00, 0x74, 0x00, 0x74, 0x00, 0x00, + 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x20, 0x6c, 0x6f, + 0x77, 0x65, 0x72, 0x63, 0x61, 0x73, 0x65, 0x20, 0x65, 0x73, 0x7a, 0x65, + 0x74, 0x74, 0x00, 0x00, 0x70, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x69, 0x00, + 0x6e, 0x00, 0x20, 0x00, 0x6e, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x62, 0x00, + 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x7a, 0x00, 0x65, 0x00, 0x72, 0x00, + 0x6f, 0x00, 0x00, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x20, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x20, 0x7a, 0x65, 0x72, 0x6f, 0x00, 0x00, 0x73, 0x00, + 0x6c, 0x00, 0x61, 0x00, 0x73, 0x00, 0x68, 0x00, 0x65, 0x00, 0x64, 0x00, + 0x20, 0x00, 0x6e, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x62, 0x00, 0x65, 0x00, + 0x72, 0x00, 0x20, 0x00, 0x7a, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6f, 0x00, + 0x00, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x64, 0x20, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x20, 0x7a, 0x65, 0x72, 0x6f, 0x00, 0x00, 0x73, 0x00, + 0x69, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x20, 0x00, + 0x6c, 0x00, 0x6f, 0x00, 0x77, 0x00, 0x65, 0x00, 0x72, 0x00, 0x63, 0x00, + 0x61, 0x00, 0x73, 0x00, 0x65, 0x00, 0x20, 0x00, 0x67, 0x00, 0x00, 0x73, + 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x63, + 0x61, 0x73, 0x65, 0x20, 0x67, 0x00, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6d, + 0x00, 0x70, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x20, 0x00, 0x6c, 0x00, 0x6f, + 0x00, 0x77, 0x00, 0x65, 0x00, 0x72, 0x00, 0x63, 0x00, 0x61, 0x00, 0x73, + 0x00, 0x65, 0x00, 0x20, 0x00, 0x61, 0x00, 0x00, 0x73, 0x69, 0x6d, 0x70, + 0x6c, 0x65, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x63, 0x61, 0x73, 0x65, + 0x20, 0x61, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0x9c, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc2, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x03, 0x00, 0x04, + 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0a, + 0x00, 0x0b, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x10, + 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0x00, 0x14, 0x00, 0x15, 0x00, 0x16, + 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1c, + 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x20, 0x00, 0x21, 0x00, 0x22, + 0x00, 0x23, 0x00, 0x24, 0x00, 0x25, 0x00, 0x26, 0x00, 0x27, 0x00, 0x28, + 0x00, 0x29, 0x00, 0x2a, 0x00, 0x2b, 0x00, 0x2c, 0x00, 0x2d, 0x00, 0x2e, + 0x00, 0x2f, 0x00, 0x30, 0x00, 0x31, 0x00, 0x32, 0x00, 0x33, 0x00, 0x34, + 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, + 0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x40, + 0x00, 0x41, 0x00, 0x42, 0x00, 0x43, 0x00, 0x44, 0x00, 0x45, 0x00, 0x46, + 0x00, 0x47, 0x00, 0x48, 0x00, 0x49, 0x00, 0x4a, 0x00, 0x4b, 0x00, 0x4c, + 0x00, 0x4d, 0x00, 0x4e, 0x00, 0x4f, 0x00, 0x50, 0x00, 0x51, 0x00, 0x52, + 0x00, 0x53, 0x00, 0x54, 0x00, 0x55, 0x00, 0x56, 0x00, 0x57, 0x00, 0x58, + 0x00, 0x59, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x5c, 0x00, 0x5d, 0x00, 0x5e, + 0x00, 0x5f, 0x00, 0x60, 0x00, 0x61, 0x01, 0x03, 0x00, 0xa3, 0x00, 0x84, + 0x00, 0x85, 0x00, 0xbd, 0x00, 0x96, 0x00, 0xe8, 0x00, 0x86, 0x00, 0x8e, + 0x00, 0x8b, 0x00, 0x9d, 0x00, 0xa9, 0x00, 0xa4, 0x01, 0x04, 0x00, 0x8a, + 0x00, 0xda, 0x00, 0x83, 0x00, 0x93, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0x8d, + 0x00, 0x97, 0x00, 0x88, 0x00, 0xc3, 0x00, 0xde, 0x00, 0xf1, 0x00, 0x9e, + 0x00, 0xaa, 0x00, 0xf5, 0x00, 0xf4, 0x00, 0xf6, 0x00, 0xa2, 0x00, 0xad, + 0x00, 0xc9, 0x00, 0xc7, 0x00, 0xae, 0x00, 0x62, 0x00, 0x63, 0x00, 0x90, + 0x00, 0x64, 0x00, 0xcb, 0x00, 0x65, 0x00, 0xc8, 0x00, 0xca, 0x00, 0xcf, + 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xe9, 0x00, 0x66, 0x00, 0xd3, + 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xaf, 0x00, 0x67, 0x00, 0xf0, 0x00, 0x91, + 0x00, 0xd6, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0x68, 0x00, 0xeb, 0x00, 0xed, + 0x00, 0x89, 0x00, 0x6a, 0x00, 0x69, 0x00, 0x6b, 0x00, 0x6d, 0x00, 0x6c, + 0x00, 0x6e, 0x00, 0xa0, 0x00, 0x6f, 0x00, 0x71, 0x00, 0x70, 0x00, 0x72, + 0x00, 0x73, 0x00, 0x75, 0x00, 0x74, 0x00, 0x76, 0x00, 0x77, 0x00, 0xea, + 0x00, 0x78, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x7b, 0x00, 0x7d, 0x00, 0x7c, + 0x00, 0xb8, 0x00, 0xa1, 0x00, 0x7f, 0x00, 0x7e, 0x00, 0x80, 0x00, 0x81, + 0x00, 0xec, 0x00, 0xee, 0x00, 0xba, 0x07, 0x75, 0x6e, 0x69, 0x30, 0x30, + 0x30, 0x44, 0x07, 0x75, 0x6e, 0x69, 0x30, 0x30, 0x41, 0x30, 0x07, 0x75, + 0x6e, 0x69, 0x30, 0x30, 0x41, 0x44, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, + 0x00, 0x08, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x07, 0xff, 0xff, 0x00, 0x0f, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x0a, 0x00, 0x03, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x00, 0x01, 0x01, + 0x00, 0x0b, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4c, 0xc0, 0x00, 0x01, 0x02, + 0x00, 0x15, 0x00, 0x02, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x01, 0x01, 0x03, + 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x01, 0x05, 0x00, 0x01, 0x01, 0x06, + 0x00, 0x02, 0x01, 0x07, 0x00, 0x00, 0x01, 0x08, 0x00, 0x02, 0x01, 0x09, + 0x00, 0x00, 0x01, 0x0a, 0x00, 0x01, 0x01, 0x0b, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfd, 0x00, 0x0b, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xe7, 0x00, 0x0a, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x08, 0xff, 0xff, 0xff, 0xef, 0x00, 0x0a, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x10, 0xff, 0xff, 0xff, 0xf7, 0x00, 0x15, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x20, 0xff, 0xff, 0xff, 0xff, 0x00, 0x15, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xdf, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x28, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, + 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0xb0, + 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x01, 0x16, + 0x00, 0x04, 0x00, 0x06, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x12, 0x00, 0x12, 0x00, 0x1e, 0x00, 0x17, 0x00, 0x14, 0x00, 0x20, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, + 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, + 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa0, 0x00, 0x00, 0x03, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa0, 0x00, 0x00, 0x06, 0x3f, 0xff, 0xff, 0xeb, 0x3f, 0xff, 0xff, 0xef, + 0xbf, 0xff, 0xff, 0xee, 0x3f, 0xff, 0xff, 0xec, 0x3f, 0xff, 0xff, 0xf2, + 0xbf, 0xff, 0xff, 0xf1, 0x3f, 0xff, 0xff, 0xef, 0x3f, 0xff, 0xff, 0xf5, + 0xbf, 0xff, 0xff, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x7f, + 0x00, 0x7e, 0x00, 0x80, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x06, 0x00, 0x01, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x14, 0x00, 0x18, 0xff, 0xff, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x7b, 0x00, 0x74, 0x00, 0x75, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, + 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xe5, 0x16, 0xe7, 0x6b, + 0x00, 0x00, 0x00, 0x00, 0xe1, 0xa9, 0xde, 0x3f, 0x00, 0x00, 0x00, 0x00, + 0xe5, 0x4d, 0x1e, 0x99}; +unsigned int MwBoldMonospaceTTFDataSize = 36184; +#endif diff --git a/widget/milsko/milskosrc/src/text/font/boldttf.c b/widget/milsko/milskosrc/src/text/font/boldttf.c new file mode 100644 index 0000000000..2ec91c7ff0 --- /dev/null +++ b/widget/milsko/milskosrc/src/text/font/boldttf.c @@ -0,0 +1,3052 @@ +#include + +#if defined(USE_STB_TRUETYPE) || defined(USE_FREETYPE2) || defined(USE_GDI_TEXT) +unsigned char MwBoldTTFData[] = { + 0x00, 0x01, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x00, 0x04, 0x00, 0x20, + 0x46, 0x46, 0x54, 0x4d, 0x94, 0x9f, 0x60, 0x18, 0x00, 0x00, 0x8e, 0xa8, + 0x00, 0x00, 0x00, 0x1c, 0x4f, 0x53, 0x2f, 0x32, 0xa2, 0x6c, 0xa1, 0xa5, + 0x00, 0x00, 0x01, 0xa8, 0x00, 0x00, 0x00, 0x60, 0x63, 0x6d, 0x61, 0x70, + 0x09, 0xe8, 0xe7, 0x70, 0x00, 0x00, 0x05, 0x10, 0x00, 0x00, 0x01, 0x4a, + 0x63, 0x76, 0x74, 0x20, 0x13, 0x2d, 0x1a, 0x94, 0x00, 0x00, 0x0f, 0x34, + 0x00, 0x00, 0x00, 0xaa, 0x66, 0x65, 0x61, 0x74, 0xc0, 0x1a, 0x05, 0x59, + 0x00, 0x00, 0x8e, 0x78, 0x00, 0x00, 0x00, 0x30, 0x66, 0x70, 0x67, 0x6d, + 0xbb, 0x73, 0xa4, 0x75, 0x00, 0x00, 0x06, 0x5c, 0x00, 0x00, 0x07, 0xe0, + 0x67, 0x61, 0x73, 0x70, 0x00, 0x08, 0x00, 0x1b, 0x00, 0x00, 0x8d, 0xf4, + 0x00, 0x00, 0x00, 0x0c, 0x67, 0x6c, 0x79, 0x66, 0x5b, 0x0c, 0x09, 0x3e, + 0x00, 0x00, 0x11, 0x68, 0x00, 0x00, 0x57, 0x30, 0x68, 0x65, 0x61, 0x64, + 0x15, 0x93, 0x86, 0x3a, 0x00, 0x00, 0x01, 0x2c, 0x00, 0x00, 0x00, 0x36, + 0x68, 0x68, 0x65, 0x61, 0x0f, 0xb4, 0x05, 0xf1, 0x00, 0x00, 0x01, 0x64, + 0x00, 0x00, 0x00, 0x24, 0x68, 0x6d, 0x74, 0x78, 0x81, 0x02, 0x45, 0x0f, + 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x03, 0x08, 0x6b, 0x65, 0x72, 0x6e, + 0x4a, 0x11, 0x58, 0x96, 0x00, 0x00, 0x68, 0x98, 0x00, 0x00, 0x1a, 0x76, + 0x6c, 0x6f, 0x63, 0x61, 0xcc, 0x0a, 0xb6, 0xe0, 0x00, 0x00, 0x0f, 0xe0, + 0x00, 0x00, 0x01, 0x86, 0x6d, 0x61, 0x78, 0x70, 0x02, 0x3a, 0x01, 0x34, + 0x00, 0x00, 0x01, 0x88, 0x00, 0x00, 0x00, 0x20, 0x6d, 0x6f, 0x72, 0x78, + 0x00, 0x32, 0x00, 0xbb, 0x00, 0x00, 0x8e, 0x00, 0x00, 0x00, 0x00, 0x78, + 0x6e, 0x61, 0x6d, 0x65, 0x1f, 0x23, 0x2a, 0x61, 0x00, 0x00, 0x83, 0x10, + 0x00, 0x00, 0x09, 0x2c, 0x70, 0x6f, 0x73, 0x74, 0xb1, 0xe2, 0x4e, 0x7c, + 0x00, 0x00, 0x8c, 0x3c, 0x00, 0x00, 0x01, 0xb8, 0x70, 0x72, 0x65, 0x70, + 0xc8, 0x09, 0xfc, 0x6b, 0x00, 0x00, 0x0e, 0x3c, 0x00, 0x00, 0x00, 0xf8, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x19, 0x9a, 0x79, 0x05, 0xaf, 0x87, + 0x5f, 0x0f, 0x3c, 0xf5, 0x00, 0x1f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc9, 0x42, 0x17, 0xa0, 0x00, 0x00, 0x00, 0x00, 0xe5, 0xf9, 0x0a, 0x7c, + 0xff, 0x68, 0xfe, 0x14, 0x07, 0xbc, 0x07, 0x73, 0x00, 0x01, 0x00, 0x08, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x08, 0x8d, 0xfd, 0xa8, 0x00, 0x00, 0x08, 0x00, 0xff, 0x68, 0xff, 0x86, + 0x07, 0xbc, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x01, 0x00, 0x00, + 0x00, 0xc2, 0x00, 0x41, 0x00, 0x05, 0x00, 0x3b, 0x00, 0x04, 0x00, 0x02, + 0x00, 0x10, 0x00, 0x2f, 0x00, 0x5c, 0x00, 0x00, 0x01, 0x00, 0x00, 0x86, + 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x04, 0x9c, 0x02, 0xbc, 0x00, 0x05, + 0x00, 0x00, 0x05, 0x9a, 0x05, 0x33, 0x00, 0x00, 0x01, 0x1f, 0x05, 0x9a, + 0x05, 0x33, 0x00, 0x00, 0x03, 0xd1, 0x00, 0x66, 0x01, 0xfc, 0x08, 0x02, + 0x02, 0x0b, 0x08, 0x06, 0x03, 0x05, 0x04, 0x02, 0x02, 0x04, 0xe0, 0x00, + 0x02, 0xef, 0x40, 0x00, 0x20, 0x5b, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, + 0x00, 0x00, 0x31, 0x41, 0x53, 0x43, 0x00, 0x20, 0x00, 0x20, 0x00, 0xff, + 0x06, 0x1f, 0xfe, 0x14, 0x00, 0x84, 0x08, 0x8d, 0x02, 0x58, 0x20, 0x00, + 0x01, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x04, 0x5e, 0x05, 0xb6, 0x00, 0x00, + 0x00, 0x20, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x02, 0x14, 0x00, 0x00, 0x02, 0x4a, 0x00, 0x75, + 0x03, 0xc7, 0x00, 0x85, 0x05, 0x2b, 0x00, 0x2d, 0x04, 0x91, 0x00, 0x58, + 0x07, 0x35, 0x00, 0x3f, 0x06, 0x00, 0x00, 0x52, 0x02, 0x21, 0x00, 0x85, + 0x02, 0xb6, 0x00, 0x52, 0x02, 0xb6, 0x00, 0x3d, 0x04, 0x5c, 0x00, 0x3f, + 0x04, 0x91, 0x00, 0x58, 0x02, 0x52, 0x00, 0x3f, 0x02, 0x93, 0x00, 0x3d, + 0x02, 0x48, 0x00, 0x75, 0x03, 0x4e, 0x00, 0x0e, 0x04, 0x91, 0x00, 0x4a, + 0x04, 0x91, 0x00, 0x79, 0x04, 0x91, 0x00, 0x4e, 0x04, 0x91, 0x00, 0x4e, + 0x04, 0x91, 0x00, 0x23, 0x04, 0x91, 0x00, 0x64, 0x04, 0x91, 0x00, 0x48, + 0x04, 0x91, 0x00, 0x37, 0x04, 0x91, 0x00, 0x48, 0x04, 0x91, 0x00, 0x42, + 0x02, 0x48, 0x00, 0x75, 0x02, 0x52, 0x00, 0x3f, 0x04, 0x91, 0x00, 0x58, + 0x04, 0x91, 0x00, 0x58, 0x04, 0x91, 0x00, 0x58, 0x03, 0xd1, 0x00, 0x06, + 0x07, 0x2d, 0x00, 0x66, 0x05, 0x85, 0x00, 0x00, 0x05, 0x60, 0x00, 0xb8, + 0x05, 0x19, 0x00, 0x77, 0x05, 0xec, 0x00, 0xb8, 0x04, 0x7b, 0x00, 0xb8, + 0x04, 0x64, 0x00, 0xb8, 0x05, 0xcb, 0x00, 0x77, 0x06, 0x1f, 0x00, 0xb8, + 0x02, 0xa6, 0x00, 0xb8, 0x02, 0xa6, 0xff, 0x68, 0x05, 0x50, 0x00, 0xb8, + 0x04, 0x85, 0x00, 0xb8, 0x07, 0x8b, 0x00, 0xb8, 0x06, 0x81, 0x00, 0xb8, + 0x06, 0x5e, 0x00, 0x77, 0x05, 0x06, 0x00, 0xb8, 0x06, 0x5e, 0x00, 0x77, + 0x05, 0x48, 0x00, 0xb8, 0x04, 0x68, 0x00, 0x5e, 0x04, 0xa2, 0x00, 0x29, + 0x06, 0x0c, 0x00, 0xae, 0x05, 0x33, 0x00, 0x00, 0x07, 0xbc, 0x00, 0x00, + 0x05, 0x56, 0x00, 0x00, 0x04, 0xfe, 0x00, 0x00, 0x04, 0xa2, 0x00, 0x31, + 0x02, 0xa6, 0x00, 0x8f, 0x03, 0x4e, 0x00, 0x0c, 0x02, 0xa6, 0x00, 0x33, + 0x04, 0x42, 0x00, 0x08, 0x03, 0x4a, 0xff, 0xfc, 0x04, 0xdb, 0x01, 0x4c, + 0x04, 0xd5, 0x00, 0x56, 0x05, 0x10, 0x00, 0xa0, 0x04, 0x1d, 0x00, 0x5c, + 0x05, 0x10, 0x00, 0x5c, 0x04, 0xba, 0x00, 0x5c, 0x03, 0x19, 0x00, 0x29, + 0x04, 0x85, 0x00, 0x06, 0x05, 0x42, 0x00, 0xa0, 0x02, 0x71, 0x00, 0x93, + 0x02, 0x71, 0xff, 0x7d, 0x04, 0xf6, 0x00, 0xa0, 0x02, 0x71, 0x00, 0xa0, + 0x07, 0xdb, 0x00, 0xa0, 0x05, 0x42, 0x00, 0xa0, 0x04, 0xf4, 0x00, 0x5c, + 0x05, 0x10, 0x00, 0xa0, 0x05, 0x10, 0x00, 0x5c, 0x03, 0xa2, 0x00, 0xa0, + 0x03, 0xfa, 0x00, 0x5c, 0x03, 0x79, 0x00, 0x2f, 0x05, 0x42, 0x00, 0x9a, + 0x04, 0x8d, 0x00, 0x00, 0x06, 0xd9, 0x00, 0x14, 0x04, 0xa0, 0x00, 0x0a, + 0x04, 0x8d, 0x00, 0x00, 0x03, 0xe7, 0x00, 0x37, 0x03, 0x27, 0x00, 0x1f, + 0x04, 0x68, 0x01, 0xc7, 0x03, 0x27, 0x00, 0x52, 0x04, 0x91, 0x00, 0x58, + 0x02, 0x14, 0x00, 0x00, 0x02, 0x4a, 0x00, 0x75, 0x04, 0x91, 0x00, 0x8f, + 0x04, 0x91, 0x00, 0x52, 0x04, 0x91, 0x00, 0x71, 0x04, 0x91, 0x00, 0x06, + 0x04, 0x68, 0x01, 0xc7, 0x03, 0xe3, 0x00, 0x6a, 0x04, 0xdb, 0x01, 0x17, + 0x06, 0xa8, 0x00, 0x64, 0x03, 0x10, 0x00, 0x2f, 0x04, 0xec, 0x00, 0x52, + 0x04, 0x91, 0x00, 0x58, 0x02, 0x93, 0x00, 0x3d, 0x06, 0xa8, 0x00, 0x64, + 0x04, 0x00, 0xff, 0xfa, 0x03, 0x6d, 0x00, 0x5c, 0x04, 0x91, 0x00, 0x58, + 0x03, 0x08, 0x00, 0x2f, 0x03, 0x08, 0x00, 0x3b, 0x04, 0xdb, 0x01, 0x4c, + 0x05, 0x48, 0x00, 0xa0, 0x05, 0x3d, 0x00, 0x71, 0x02, 0x48, 0x00, 0x75, + 0x01, 0xa4, 0xff, 0xdb, 0x03, 0x08, 0x00, 0x5c, 0x03, 0x1b, 0x00, 0x39, + 0x04, 0xec, 0x00, 0x52, 0x07, 0x0c, 0x00, 0x2e, 0x07, 0x0c, 0x00, 0x2e, + 0x07, 0x0c, 0x00, 0x5a, 0x03, 0xd1, 0x00, 0x3d, 0x05, 0x85, 0x00, 0x00, + 0x05, 0x85, 0x00, 0x00, 0x05, 0x85, 0x00, 0x00, 0x05, 0x85, 0x00, 0x00, + 0x05, 0x85, 0x00, 0x00, 0x05, 0x85, 0x00, 0x00, 0x07, 0x9e, 0x00, 0x00, + 0x05, 0x19, 0x00, 0x77, 0x04, 0x7b, 0x00, 0xb8, 0x04, 0x7b, 0x00, 0xb8, + 0x04, 0x7b, 0x00, 0xaf, 0x04, 0x7b, 0x00, 0xb8, 0x02, 0xa6, 0xff, 0xc6, + 0x02, 0xa6, 0x00, 0xa7, 0x02, 0xa6, 0xff, 0xa0, 0x02, 0xa6, 0xff, 0xfd, + 0x05, 0xec, 0x00, 0x2f, 0x06, 0x81, 0x00, 0xb8, 0x06, 0x5e, 0x00, 0x77, + 0x06, 0x5e, 0x00, 0x77, 0x06, 0x5e, 0x00, 0x77, 0x06, 0x5e, 0x00, 0x77, + 0x06, 0x5e, 0x00, 0x77, 0x04, 0x91, 0x00, 0x81, 0x06, 0x5e, 0x00, 0x77, + 0x06, 0x0c, 0x00, 0xae, 0x06, 0x0c, 0x00, 0xae, 0x06, 0x0c, 0x00, 0xae, + 0x06, 0x0c, 0x00, 0xae, 0x04, 0xfe, 0x00, 0x00, 0x05, 0x06, 0x00, 0xb8, + 0x05, 0xb0, 0x00, 0xa0, 0x04, 0xd5, 0x00, 0x56, 0x04, 0xd5, 0x00, 0x56, + 0x04, 0xd5, 0x00, 0x56, 0x04, 0xd5, 0x00, 0x56, 0x04, 0xd5, 0x00, 0x56, + 0x04, 0xd5, 0x00, 0x56, 0x07, 0x56, 0x00, 0x56, 0x04, 0x1d, 0x00, 0x5c, + 0x04, 0xba, 0x00, 0x5c, 0x04, 0xba, 0x00, 0x5c, 0x04, 0xba, 0x00, 0x5c, + 0x04, 0xba, 0x00, 0x5c, 0x02, 0x71, 0xff, 0x9b, 0x02, 0x71, 0x00, 0x91, + 0x02, 0x71, 0xff, 0x86, 0x02, 0x71, 0xff, 0xe3, 0x04, 0xf4, 0x00, 0x5c, + 0x05, 0x42, 0x00, 0xa0, 0x04, 0xf4, 0x00, 0x5c, 0x04, 0xf4, 0x00, 0x5c, + 0x04, 0xf4, 0x00, 0x5c, 0x04, 0xf4, 0x00, 0x5c, 0x04, 0xf4, 0x00, 0x5c, + 0x04, 0x91, 0x00, 0x58, 0x04, 0xf4, 0x00, 0x5c, 0x05, 0x42, 0x00, 0x9a, + 0x05, 0x42, 0x00, 0x9a, 0x05, 0x42, 0x00, 0x9a, 0x05, 0x42, 0x00, 0x9a, + 0x04, 0x8d, 0x00, 0x00, 0x05, 0x10, 0x00, 0xa0, 0x04, 0x8d, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1c, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x03, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x28, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x7e, 0x00, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x20, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xc2, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03, 0x04, + 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, + 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, + 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, + 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x00, 0x86, 0x87, + 0x89, 0x8b, 0x93, 0x98, 0x9e, 0xa3, 0xa2, 0xa4, 0xa6, 0xa5, 0xa7, 0xa9, + 0xab, 0xaa, 0xac, 0xad, 0xaf, 0xae, 0xb0, 0xb1, 0xb3, 0xb5, 0xb4, 0xb6, + 0xb8, 0xb7, 0xbc, 0xbb, 0xbd, 0xbe, 0x00, 0x72, 0x64, 0x65, 0x69, 0x00, + 0x78, 0xa1, 0x70, 0x6b, 0x00, 0x76, 0x6a, 0x00, 0x88, 0x9a, 0x00, 0x73, + 0x00, 0x00, 0x67, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x7c, 0x00, + 0xa8, 0xba, 0x81, 0x63, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x7d, 0x00, + 0x62, 0x82, 0x85, 0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xb9, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, + 0x00, 0x00, 0x00, 0x84, 0x8c, 0x83, 0x8d, 0x8a, 0x8f, 0x90, 0x91, 0x8e, + 0x95, 0x96, 0x00, 0x94, 0x9c, 0x9d, 0x9b, 0x00, 0x00, 0x00, 0x71, 0x00, + 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x47, 0x5b, 0x5a, + 0x59, 0x58, 0x55, 0x54, 0x53, 0x52, 0x51, 0x50, 0x4f, 0x4e, 0x4d, 0x4c, + 0x4b, 0x4a, 0x49, 0x48, 0x47, 0x46, 0x45, 0x44, 0x43, 0x42, 0x41, 0x40, + 0x3f, 0x3e, 0x3d, 0x3c, 0x3b, 0x3a, 0x39, 0x38, 0x37, 0x36, 0x35, 0x31, + 0x30, 0x2f, 0x2e, 0x2d, 0x2c, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, + 0x21, 0x1f, 0x18, 0x14, 0x11, 0x10, 0x0f, 0x0e, 0x0d, 0x0b, 0x0a, 0x09, + 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x2c, 0x20, 0xb0, + 0x01, 0x60, 0x45, 0xb0, 0x03, 0x25, 0x20, 0x11, 0x46, 0x61, 0x23, 0x45, + 0x23, 0x61, 0x48, 0x2d, 0x2c, 0x20, 0x45, 0x18, 0x68, 0x44, 0x2d, 0x2c, + 0x45, 0x23, 0x46, 0x60, 0xb0, 0x20, 0x61, 0x20, 0xb0, 0x46, 0x60, 0xb0, + 0x04, 0x26, 0x23, 0x48, 0x48, 0x2d, 0x2c, 0x45, 0x23, 0x46, 0x23, 0x61, + 0xb0, 0x20, 0x60, 0x20, 0xb0, 0x26, 0x61, 0xb0, 0x20, 0x61, 0xb0, 0x04, + 0x26, 0x23, 0x48, 0x48, 0x2d, 0x2c, 0x45, 0x23, 0x46, 0x60, 0xb0, 0x40, + 0x61, 0x20, 0xb0, 0x66, 0x60, 0xb0, 0x04, 0x26, 0x23, 0x48, 0x48, 0x2d, + 0x2c, 0x45, 0x23, 0x46, 0x23, 0x61, 0xb0, 0x40, 0x60, 0x20, 0xb0, 0x26, + 0x61, 0xb0, 0x40, 0x61, 0xb0, 0x04, 0x26, 0x23, 0x48, 0x48, 0x2d, 0x2c, + 0x01, 0x10, 0x20, 0x3c, 0x00, 0x3c, 0x2d, 0x2c, 0x20, 0x45, 0x23, 0x20, + 0xb0, 0xcd, 0x44, 0x23, 0x20, 0xb8, 0x01, 0x5a, 0x51, 0x58, 0x23, 0x20, + 0xb0, 0x8d, 0x44, 0x23, 0x59, 0x20, 0xb0, 0xed, 0x51, 0x58, 0x23, 0x20, + 0xb0, 0x4d, 0x44, 0x23, 0x59, 0x20, 0xb0, 0x04, 0x26, 0x51, 0x58, 0x23, + 0x20, 0xb0, 0x0d, 0x44, 0x23, 0x59, 0x21, 0x21, 0x2d, 0x2c, 0x20, 0x20, + 0x45, 0x18, 0x68, 0x44, 0x20, 0xb0, 0x01, 0x60, 0x20, 0x45, 0xb0, 0x46, + 0x76, 0x68, 0x8a, 0x45, 0x60, 0x44, 0x2d, 0x2c, 0x01, 0xb1, 0x0b, 0x0a, + 0x43, 0x23, 0x43, 0x65, 0x0a, 0x2d, 0x2c, 0x00, 0xb1, 0x0a, 0x0b, 0x43, + 0x23, 0x43, 0x0b, 0x2d, 0x2c, 0x00, 0xb0, 0x28, 0x23, 0x70, 0xb1, 0x01, + 0x28, 0x3e, 0x01, 0xb0, 0x28, 0x23, 0x70, 0xb1, 0x02, 0x28, 0x45, 0x3a, + 0xb1, 0x02, 0x00, 0x08, 0x0d, 0x2d, 0x2c, 0x20, 0x45, 0xb0, 0x03, 0x25, + 0x45, 0x61, 0x64, 0xb0, 0x50, 0x51, 0x58, 0x45, 0x44, 0x1b, 0x21, 0x21, + 0x59, 0x2d, 0x2c, 0x49, 0xb0, 0x0e, 0x23, 0x44, 0x2d, 0x2c, 0x20, 0x45, + 0xb0, 0x00, 0x43, 0x60, 0x44, 0x2d, 0x2c, 0x01, 0xb0, 0x06, 0x43, 0xb0, + 0x07, 0x43, 0x65, 0x0a, 0x2d, 0x2c, 0x20, 0x69, 0xb0, 0x40, 0x61, 0xb0, + 0x00, 0x8b, 0x20, 0xb1, 0x2c, 0xc0, 0x8a, 0x8c, 0xb8, 0x10, 0x00, 0x62, + 0x60, 0x2b, 0x0c, 0x64, 0x23, 0x64, 0x61, 0x5c, 0x58, 0xb0, 0x03, 0x61, + 0x59, 0x2d, 0x2c, 0x8a, 0x03, 0x45, 0x8a, 0x8a, 0x87, 0xb0, 0x11, 0x2b, + 0xb0, 0x29, 0x23, 0x44, 0xb0, 0x29, 0x7a, 0xe4, 0x18, 0x2d, 0x2c, 0x45, + 0x65, 0xb0, 0x2c, 0x23, 0x44, 0x45, 0xb0, 0x2b, 0x23, 0x44, 0x2d, 0x2c, + 0x4b, 0x52, 0x58, 0x45, 0x44, 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0x4b, + 0x51, 0x58, 0x45, 0x44, 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0x01, 0xb0, + 0x05, 0x25, 0x10, 0x23, 0x20, 0x8a, 0xf5, 0x00, 0xb0, 0x01, 0x60, 0x23, + 0xed, 0xec, 0x2d, 0x2c, 0x01, 0xb0, 0x05, 0x25, 0x10, 0x23, 0x20, 0x8a, + 0xf5, 0x00, 0xb0, 0x01, 0x61, 0x23, 0xed, 0xec, 0x2d, 0x2c, 0x01, 0xb0, + 0x06, 0x25, 0x10, 0xf5, 0x00, 0xed, 0xec, 0x2d, 0x2c, 0xb0, 0x02, 0x43, + 0xb0, 0x01, 0x52, 0x58, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1b, 0x46, 0x23, + 0x46, 0x60, 0x8a, 0x8a, 0x46, 0x23, 0x20, 0x46, 0x8a, 0x60, 0x8a, 0x61, + 0xb8, 0xff, 0x80, 0x62, 0x23, 0x20, 0x10, 0x23, 0x8a, 0xb1, 0x0c, 0x0c, + 0x8a, 0x70, 0x45, 0x60, 0x20, 0xb0, 0x00, 0x50, 0x58, 0xb0, 0x01, 0x61, + 0xb8, 0xff, 0xba, 0x8b, 0x1b, 0xb0, 0x46, 0x8c, 0x59, 0xb0, 0x10, 0x60, + 0x68, 0x01, 0x3a, 0x59, 0x2d, 0x2c, 0x20, 0x45, 0xb0, 0x03, 0x25, 0x46, + 0x52, 0x4b, 0xb0, 0x13, 0x51, 0x5b, 0x58, 0xb0, 0x02, 0x25, 0x46, 0x20, + 0x68, 0x61, 0xb0, 0x03, 0x25, 0xb0, 0x03, 0x25, 0x3f, 0x23, 0x21, 0x38, + 0x1b, 0x21, 0x11, 0x59, 0x2d, 0x2c, 0x20, 0x45, 0xb0, 0x03, 0x25, 0x46, + 0x50, 0x58, 0xb0, 0x02, 0x25, 0x46, 0x20, 0x68, 0x61, 0xb0, 0x03, 0x25, + 0xb0, 0x03, 0x25, 0x3f, 0x23, 0x21, 0x38, 0x1b, 0x21, 0x11, 0x59, 0x2d, + 0x2c, 0x00, 0xb0, 0x07, 0x43, 0xb0, 0x06, 0x43, 0x0b, 0x2d, 0x2c, 0x21, + 0x21, 0x0c, 0x64, 0x23, 0x64, 0x8b, 0xb8, 0x40, 0x00, 0x62, 0x2d, 0x2c, + 0x21, 0xb0, 0x80, 0x51, 0x58, 0x0c, 0x64, 0x23, 0x64, 0x8b, 0xb8, 0x20, + 0x00, 0x62, 0x1b, 0xb2, 0x00, 0x40, 0x2f, 0x2b, 0x59, 0xb0, 0x02, 0x60, + 0x2d, 0x2c, 0x21, 0xb0, 0xc0, 0x51, 0x58, 0x0c, 0x64, 0x23, 0x64, 0x8b, + 0xb8, 0x15, 0x55, 0x62, 0x1b, 0xb2, 0x00, 0x80, 0x2f, 0x2b, 0x59, 0xb0, + 0x02, 0x60, 0x2d, 0x2c, 0x0c, 0x64, 0x23, 0x64, 0x8b, 0xb8, 0x40, 0x00, + 0x62, 0x60, 0x23, 0x21, 0x2d, 0x2c, 0x4b, 0x53, 0x58, 0x8a, 0xb0, 0x04, + 0x25, 0x49, 0x64, 0x23, 0x45, 0x69, 0xb0, 0x40, 0x8b, 0x61, 0xb0, 0x80, + 0x62, 0xb0, 0x20, 0x61, 0x6a, 0xb0, 0x0e, 0x23, 0x44, 0x23, 0x10, 0xb0, + 0x0e, 0xf6, 0x1b, 0x21, 0x23, 0x8a, 0x12, 0x11, 0x20, 0x39, 0x2f, 0x59, + 0x2d, 0x2c, 0x4b, 0x53, 0x58, 0x20, 0xb0, 0x03, 0x25, 0x49, 0x64, 0x69, + 0x20, 0xb0, 0x05, 0x26, 0xb0, 0x06, 0x25, 0x49, 0x64, 0x23, 0x61, 0xb0, + 0x80, 0x62, 0xb0, 0x20, 0x61, 0x6a, 0xb0, 0x0e, 0x23, 0x44, 0xb0, 0x04, + 0x26, 0x10, 0xb0, 0x0e, 0xf6, 0x8a, 0x10, 0xb0, 0x0e, 0x23, 0x44, 0xb0, + 0x0e, 0xf6, 0xb0, 0x0e, 0x23, 0x44, 0xb0, 0x0e, 0xed, 0x1b, 0x8a, 0xb0, + 0x04, 0x26, 0x11, 0x12, 0x20, 0x39, 0x23, 0x20, 0x39, 0x2f, 0x2f, 0x59, + 0x2d, 0x2c, 0x45, 0x23, 0x45, 0x60, 0x23, 0x45, 0x60, 0x23, 0x45, 0x60, + 0x23, 0x76, 0x68, 0x18, 0xb0, 0x80, 0x62, 0x20, 0x2d, 0x2c, 0xb0, 0x48, + 0x2b, 0x2d, 0x2c, 0x20, 0x45, 0xb0, 0x00, 0x54, 0x58, 0xb0, 0x40, 0x44, + 0x20, 0x45, 0xb0, 0x40, 0x61, 0x44, 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x2c, + 0x45, 0xb1, 0x30, 0x2f, 0x45, 0x23, 0x45, 0x61, 0x60, 0xb0, 0x01, 0x60, + 0x69, 0x44, 0x2d, 0x2c, 0x4b, 0x51, 0x58, 0xb0, 0x2f, 0x23, 0x70, 0xb0, + 0x14, 0x23, 0x42, 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0x4b, 0x51, 0x58, + 0x20, 0xb0, 0x03, 0x25, 0x45, 0x69, 0x53, 0x58, 0x44, 0x1b, 0x21, 0x21, + 0x59, 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0x45, 0xb0, 0x14, 0x43, 0xb0, + 0x00, 0x60, 0x63, 0xb0, 0x01, 0x60, 0x69, 0x44, 0x2d, 0x2c, 0xb0, 0x2f, + 0x45, 0x44, 0x2d, 0x2c, 0x45, 0x23, 0x20, 0x45, 0x8a, 0x60, 0x44, 0x2d, + 0x2c, 0x46, 0x23, 0x46, 0x60, 0x8a, 0x8a, 0x46, 0x23, 0x20, 0x46, 0x8a, + 0x60, 0x8a, 0x61, 0xb8, 0xff, 0x80, 0x62, 0x23, 0x20, 0x10, 0x23, 0x8a, + 0xb1, 0x0c, 0x0c, 0x8a, 0x70, 0x45, 0x60, 0x20, 0xb0, 0x00, 0x50, 0x58, + 0xb0, 0x01, 0x61, 0xb8, 0xff, 0x80, 0x8b, 0x1b, 0xb0, 0x81, 0x8c, 0x59, + 0x68, 0x3a, 0x2d, 0x2c, 0x4b, 0x23, 0x51, 0x58, 0xb9, 0x00, 0x33, 0xff, + 0xe0, 0xb1, 0x34, 0x20, 0x1b, 0xb3, 0x33, 0x00, 0x34, 0x00, 0x59, 0x44, + 0x44, 0x2d, 0x2c, 0xb0, 0x16, 0x43, 0x58, 0xb0, 0x03, 0x26, 0x45, 0x8a, + 0x58, 0x64, 0x66, 0xb0, 0x1f, 0x60, 0x1b, 0x64, 0xb0, 0x20, 0x60, 0x66, + 0x20, 0x58, 0x1b, 0x21, 0xb0, 0x40, 0x59, 0xb0, 0x01, 0x61, 0x59, 0x23, + 0x58, 0x65, 0x59, 0xb0, 0x29, 0x23, 0x44, 0x23, 0x10, 0xb0, 0x29, 0xe0, + 0x1b, 0x21, 0x21, 0x21, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0xb0, 0x02, 0x43, + 0x54, 0x58, 0x4b, 0x53, 0x23, 0x4b, 0x51, 0x5a, 0x58, 0x38, 0x1b, 0x21, + 0x21, 0x59, 0x1b, 0x21, 0x21, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0xb0, 0x16, + 0x43, 0x58, 0xb0, 0x04, 0x25, 0x45, 0x64, 0xb0, 0x20, 0x60, 0x66, 0x20, + 0x58, 0x1b, 0x21, 0xb0, 0x40, 0x59, 0xb0, 0x01, 0x61, 0x23, 0x58, 0x1b, + 0x65, 0x59, 0xb0, 0x29, 0x23, 0x44, 0xb0, 0x05, 0x25, 0xb0, 0x08, 0x25, + 0x08, 0x20, 0x58, 0x02, 0x1b, 0x03, 0x59, 0xb0, 0x04, 0x25, 0x10, 0xb0, + 0x05, 0x25, 0x20, 0x46, 0xb0, 0x04, 0x25, 0x23, 0x42, 0x3c, 0xb0, 0x04, + 0x25, 0xb0, 0x07, 0x25, 0x08, 0xb0, 0x07, 0x25, 0x10, 0xb0, 0x06, 0x25, + 0x20, 0x46, 0xb0, 0x04, 0x25, 0xb0, 0x01, 0x60, 0x23, 0x42, 0x3c, 0x20, + 0x58, 0x01, 0x1b, 0x00, 0x59, 0xb0, 0x04, 0x25, 0x10, 0xb0, 0x05, 0x25, + 0xb0, 0x29, 0xe0, 0xb0, 0x29, 0x20, 0x45, 0x65, 0x44, 0xb0, 0x07, 0x25, + 0x10, 0xb0, 0x06, 0x25, 0xb0, 0x29, 0xe0, 0xb0, 0x05, 0x25, 0xb0, 0x08, + 0x25, 0x08, 0x20, 0x58, 0x02, 0x1b, 0x03, 0x59, 0xb0, 0x05, 0x25, 0xb0, + 0x03, 0x25, 0x43, 0x48, 0xb0, 0x04, 0x25, 0xb0, 0x07, 0x25, 0x08, 0xb0, + 0x06, 0x25, 0xb0, 0x03, 0x25, 0xb0, 0x01, 0x60, 0x43, 0x48, 0x1b, 0x21, + 0x59, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x2d, 0x2c, 0x02, 0xb0, + 0x04, 0x25, 0x20, 0x20, 0x46, 0xb0, 0x04, 0x25, 0x23, 0x42, 0xb0, 0x05, + 0x25, 0x08, 0xb0, 0x03, 0x25, 0x45, 0x48, 0x21, 0x21, 0x21, 0x21, 0x2d, + 0x2c, 0x02, 0xb0, 0x03, 0x25, 0x20, 0xb0, 0x04, 0x25, 0x08, 0xb0, 0x02, + 0x25, 0x43, 0x48, 0x21, 0x21, 0x21, 0x2d, 0x2c, 0x45, 0x23, 0x20, 0x45, + 0x18, 0x20, 0xb0, 0x00, 0x50, 0x20, 0x58, 0x23, 0x65, 0x23, 0x59, 0x23, + 0x68, 0x20, 0xb0, 0x40, 0x50, 0x58, 0x21, 0xb0, 0x40, 0x59, 0x23, 0x58, + 0x65, 0x59, 0x8a, 0x60, 0x44, 0x2d, 0x2c, 0x4b, 0x53, 0x23, 0x4b, 0x51, + 0x5a, 0x58, 0x20, 0x45, 0x8a, 0x60, 0x44, 0x1b, 0x21, 0x21, 0x59, 0x2d, + 0x2c, 0x4b, 0x54, 0x58, 0x20, 0x45, 0x8a, 0x60, 0x44, 0x1b, 0x21, 0x21, + 0x59, 0x2d, 0x2c, 0x4b, 0x53, 0x23, 0x4b, 0x51, 0x5a, 0x58, 0x38, 0x1b, + 0x21, 0x21, 0x59, 0x2d, 0x2c, 0xb0, 0x00, 0x21, 0x4b, 0x54, 0x58, 0x38, + 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0xb0, 0x02, 0x43, 0x54, 0x58, 0xb0, + 0x46, 0x2b, 0x1b, 0x21, 0x21, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0xb0, 0x02, + 0x43, 0x54, 0x58, 0xb0, 0x47, 0x2b, 0x1b, 0x21, 0x21, 0x21, 0x59, 0x2d, + 0x2c, 0xb0, 0x02, 0x43, 0x54, 0x58, 0xb0, 0x48, 0x2b, 0x1b, 0x21, 0x21, + 0x21, 0x21, 0x59, 0x2d, 0x2c, 0xb0, 0x02, 0x43, 0x54, 0x58, 0xb0, 0x49, + 0x2b, 0x1b, 0x21, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0x20, 0x8a, 0x08, 0x23, + 0x4b, 0x53, 0x8a, 0x4b, 0x51, 0x5a, 0x58, 0x23, 0x38, 0x1b, 0x21, 0x21, + 0x59, 0x2d, 0x2c, 0x00, 0xb0, 0x02, 0x25, 0x49, 0xb0, 0x00, 0x53, 0x58, + 0x20, 0xb0, 0x40, 0x38, 0x11, 0x1b, 0x21, 0x59, 0x2d, 0x2c, 0x01, 0x46, + 0x23, 0x46, 0x60, 0x23, 0x46, 0x61, 0x23, 0x20, 0x10, 0x20, 0x46, 0x8a, + 0x61, 0xb8, 0xff, 0x80, 0x62, 0x8a, 0xb1, 0x40, 0x40, 0x8a, 0x70, 0x45, + 0x60, 0x68, 0x3a, 0x2d, 0x2c, 0x20, 0x8a, 0x23, 0x49, 0x64, 0x8a, 0x23, + 0x53, 0x58, 0x3c, 0x1b, 0x21, 0x59, 0x2d, 0x2c, 0x4b, 0x52, 0x58, 0x7d, + 0x1b, 0x7a, 0x59, 0x2d, 0x2c, 0xb0, 0x12, 0x00, 0x4b, 0x01, 0x4b, 0x54, + 0x42, 0x2d, 0x2c, 0xb1, 0x02, 0x00, 0x42, 0xb1, 0x23, 0x01, 0x88, 0x51, + 0xb1, 0x40, 0x01, 0x88, 0x53, 0x5a, 0x58, 0xb9, 0x10, 0x00, 0x00, 0x20, + 0x88, 0x54, 0x58, 0xb2, 0x02, 0x01, 0x02, 0x43, 0x60, 0x42, 0x59, 0xb1, + 0x24, 0x01, 0x88, 0x51, 0x58, 0xb9, 0x20, 0x00, 0x00, 0x40, 0x88, 0x54, + 0x58, 0xb2, 0x02, 0x02, 0x02, 0x43, 0x60, 0x42, 0xb1, 0x24, 0x01, 0x88, + 0x54, 0x58, 0xb2, 0x02, 0x20, 0x02, 0x43, 0x60, 0x42, 0x00, 0x4b, 0x01, + 0x4b, 0x52, 0x58, 0xb2, 0x02, 0x08, 0x02, 0x43, 0x60, 0x42, 0x59, 0x1b, + 0xb9, 0x40, 0x00, 0x00, 0x80, 0x88, 0x54, 0x58, 0xb2, 0x02, 0x04, 0x02, + 0x43, 0x60, 0x42, 0x59, 0xb9, 0x40, 0x00, 0x00, 0x80, 0x63, 0xb8, 0x01, + 0x00, 0x88, 0x54, 0x58, 0xb2, 0x02, 0x08, 0x02, 0x43, 0x60, 0x42, 0x59, + 0xb9, 0x40, 0x00, 0x01, 0x00, 0x63, 0xb8, 0x02, 0x00, 0x88, 0x54, 0x58, + 0xb2, 0x02, 0x10, 0x02, 0x43, 0x60, 0x42, 0x59, 0xb1, 0x26, 0x01, 0x88, + 0x51, 0x58, 0xb9, 0x40, 0x00, 0x02, 0x00, 0x63, 0xb8, 0x04, 0x00, 0x88, + 0x54, 0x58, 0xb2, 0x02, 0x40, 0x02, 0x43, 0x60, 0x42, 0x59, 0xb9, 0x40, + 0x00, 0x04, 0x00, 0x63, 0xb8, 0x08, 0x00, 0x88, 0x54, 0x58, 0xb2, 0x02, + 0x80, 0x02, 0x43, 0x60, 0x42, 0x59, 0x59, 0x59, 0x59, 0x59, 0x59, 0xb1, + 0x00, 0x02, 0x43, 0x54, 0x58, 0x40, 0x0a, 0x05, 0x40, 0x08, 0x40, 0x09, + 0x40, 0x0c, 0x02, 0x0d, 0x02, 0x1b, 0xb1, 0x01, 0x02, 0x43, 0x54, 0x58, + 0xb2, 0x05, 0x40, 0x08, 0xba, 0x01, 0x00, 0x00, 0x09, 0x01, 0x00, 0xb3, + 0x0c, 0x01, 0x0d, 0x01, 0x1b, 0xb1, 0x80, 0x02, 0x43, 0x52, 0x58, 0xb2, + 0x05, 0x40, 0x08, 0xb8, 0x01, 0x80, 0xb1, 0x09, 0x40, 0x1b, 0xb2, 0x05, + 0x40, 0x08, 0xba, 0x01, 0x80, 0x00, 0x09, 0x01, 0x40, 0x59, 0xb9, 0x40, + 0x00, 0x00, 0x80, 0x88, 0x55, 0xb9, 0x40, 0x00, 0x02, 0x00, 0x63, 0xb8, + 0x04, 0x00, 0x88, 0x55, 0x5a, 0x58, 0xb3, 0x0c, 0x00, 0x0d, 0x01, 0x1b, + 0xb3, 0x0c, 0x00, 0x0d, 0x01, 0x59, 0x59, 0x59, 0x42, 0x42, 0x42, 0x42, + 0x42, 0x2d, 0x2c, 0x45, 0x18, 0x68, 0x23, 0x4b, 0x51, 0x58, 0x23, 0x20, + 0x45, 0x20, 0x64, 0xb0, 0x40, 0x50, 0x58, 0x7c, 0x59, 0x68, 0x8a, 0x60, + 0x59, 0x44, 0x2d, 0x2c, 0xb0, 0x00, 0x16, 0xb0, 0x02, 0x25, 0xb0, 0x02, + 0x25, 0x01, 0xb0, 0x01, 0x23, 0x3e, 0x00, 0xb0, 0x02, 0x23, 0x3e, 0xb1, + 0x01, 0x02, 0x06, 0x0c, 0xb0, 0x0a, 0x23, 0x65, 0x42, 0xb0, 0x0b, 0x23, + 0x42, 0x01, 0xb0, 0x01, 0x23, 0x3f, 0x00, 0xb0, 0x02, 0x23, 0x3f, 0xb1, + 0x01, 0x02, 0x06, 0x0c, 0xb0, 0x06, 0x23, 0x65, 0x42, 0xb0, 0x07, 0x23, + 0x42, 0xb0, 0x01, 0x16, 0x01, 0x2d, 0x2c, 0xb0, 0x80, 0xb0, 0x02, 0x43, + 0x50, 0xb0, 0x01, 0xb0, 0x02, 0x43, 0x54, 0x5b, 0x58, 0x21, 0x23, 0x10, + 0xb0, 0x20, 0x1a, 0xc9, 0x1b, 0x8a, 0x10, 0xed, 0x59, 0x2d, 0x2c, 0xb0, + 0x59, 0x2b, 0x2d, 0x2c, 0x8a, 0x10, 0xe5, 0x2d, 0x40, 0x8b, 0x09, 0x21, + 0x48, 0x20, 0x55, 0x20, 0x01, 0x03, 0x55, 0x1f, 0x48, 0x03, 0x55, 0x1e, + 0x03, 0xff, 0x1f, 0x50, 0x4c, 0x16, 0x1f, 0x4f, 0x4d, 0x64, 0x1f, 0x4e, + 0x4c, 0x64, 0x1f, 0x26, 0x34, 0x10, 0x55, 0x25, 0x33, 0x24, 0x55, 0x19, + 0x13, 0xff, 0x1f, 0x07, 0x04, 0xff, 0x1f, 0x06, 0x03, 0xff, 0x1f, 0x4d, + 0x4c, 0x1e, 0x1f, 0x64, 0x4c, 0x01, 0x4c, 0x46, 0x0d, 0x1f, 0x13, 0x33, + 0x12, 0x55, 0x05, 0x01, 0x03, 0x55, 0x04, 0x33, 0x03, 0x55, 0x1f, 0x03, + 0x01, 0x0f, 0x03, 0x3f, 0x03, 0xaf, 0x03, 0x03, 0x06, 0x4b, 0x46, 0xcb, + 0x46, 0xdb, 0x46, 0x03, 0x23, 0x33, 0x22, 0x55, 0x1c, 0x33, 0x1b, 0x55, + 0x16, 0x33, 0x15, 0x55, 0x11, 0x01, 0x0f, 0x55, 0x10, 0x33, 0x0f, 0x55, + 0xaf, 0x0f, 0xcf, 0x0f, 0x02, 0x30, 0x0f, 0x01, 0x01, 0x33, 0x00, 0x55, + 0x6f, 0x00, 0x7f, 0x00, 0xaf, 0x00, 0xef, 0x00, 0x04, 0x10, 0x00, 0x01, + 0x80, 0x16, 0x01, 0x05, 0x01, 0xb8, 0x01, 0x90, 0xb1, 0x54, 0x53, 0x2b, + 0x2b, 0x4b, 0xb8, 0x07, 0xff, 0x52, 0x4b, 0xb0, 0x09, 0x50, 0x5b, 0xb0, + 0x01, 0x88, 0xb0, 0x25, 0x53, 0xb0, 0x01, 0x88, 0xb0, 0x40, 0x51, 0x5a, + 0xb0, 0x06, 0x88, 0xb0, 0x00, 0x55, 0x5a, 0x5b, 0x58, 0xb1, 0x01, 0x01, + 0x8e, 0x59, 0x85, 0x8d, 0x8d, 0x00, 0x42, 0x1d, 0x4b, 0xb0, 0x32, 0x53, + 0x58, 0xb0, 0x20, 0x1d, 0x59, 0x4b, 0xb0, 0x64, 0x53, 0x58, 0xb0, 0x10, + 0x1d, 0xb1, 0x16, 0x00, 0x42, 0x59, 0x73, 0x73, 0x2b, 0x73, 0x73, 0x2b, + 0x2b, 0x2b, 0x2b, 0x2b, 0x73, 0x5e, 0x73, 0x74, 0x2b, 0x2b, 0x2b, 0x2b, + 0x74, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, + 0x2b, 0x2b, 0x18, 0x5e, 0x06, 0x14, 0x00, 0x17, 0x00, 0x00, 0x05, 0xb6, + 0x00, 0x17, 0x00, 0x75, 0x05, 0xb6, 0x05, 0xcd, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x5e, + 0x00, 0x17, 0x00, 0x7b, 0x00, 0x00, 0xff, 0xec, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xec, 0x00, 0x00, 0x00, 0x00, 0xff, 0xec, 0x00, 0x00, 0xfe, 0x14, + 0xff, 0xec, 0x00, 0x00, 0x05, 0xb6, 0x00, 0x15, 0xfc, 0x94, 0xff, 0xeb, + 0xfe, 0x8f, 0xff, 0xe0, 0xfe, 0xbc, 0xff, 0xec, 0x00, 0x12, 0xfe, 0x56, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xe5, 0x00, 0xf6, 0x01, 0x00, 0x01, 0x2b, 0x00, 0xd3, 0x00, 0xb2, + 0x01, 0x02, 0x00, 0xf6, 0x01, 0x02, 0x00, 0xf6, 0x00, 0xed, 0x00, 0xdf, + 0x00, 0xb2, 0x00, 0x00, 0x01, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x56, 0x00, 0xcc, + 0x01, 0x58, 0x01, 0xc6, 0x02, 0x4e, 0x02, 0x66, 0x02, 0x94, 0x02, 0xc2, + 0x03, 0x00, 0x03, 0x2c, 0x03, 0x4a, 0x03, 0x60, 0x03, 0x82, 0x03, 0xa0, + 0x03, 0xe2, 0x04, 0x10, 0x04, 0x5e, 0x04, 0xc6, 0x05, 0x10, 0x05, 0x6c, + 0x05, 0xc8, 0x05, 0xf2, 0x06, 0x66, 0x06, 0xc2, 0x06, 0xfa, 0x07, 0x32, + 0x07, 0x5c, 0x07, 0x82, 0x07, 0xae, 0x08, 0x0a, 0x08, 0x9a, 0x08, 0xde, + 0x09, 0x3e, 0x09, 0x80, 0x09, 0xb8, 0x09, 0xf4, 0x0a, 0x24, 0x0a, 0x7a, + 0x0a, 0xb0, 0x0a, 0xc6, 0x0a, 0xf2, 0x0b, 0x32, 0x0b, 0x52, 0x0b, 0x98, + 0x0b, 0xd4, 0x0c, 0x16, 0x0c, 0x56, 0x0c, 0xac, 0x0d, 0x00, 0x0d, 0x60, + 0x0d, 0x86, 0x0d, 0xbc, 0x0d, 0xee, 0x0e, 0x4a, 0x0e, 0x8c, 0x0e, 0xc0, + 0x0e, 0xf6, 0x0f, 0x18, 0x0f, 0x36, 0x0f, 0x58, 0x0f, 0x84, 0x0f, 0x9c, + 0x0f, 0xc0, 0x10, 0x1a, 0x10, 0x6e, 0x10, 0xaa, 0x10, 0xfe, 0x11, 0x54, + 0x11, 0x96, 0x12, 0x32, 0x12, 0x70, 0x12, 0x9c, 0x12, 0xda, 0x13, 0x22, + 0x13, 0x3a, 0x13, 0x96, 0x13, 0xd2, 0x14, 0x16, 0x14, 0x6c, 0x14, 0xc2, + 0x14, 0xf4, 0x15, 0x4c, 0x15, 0x8e, 0x15, 0xca, 0x15, 0xfc, 0x16, 0x58, + 0x16, 0x9e, 0x16, 0xee, 0x17, 0x24, 0x17, 0x70, 0x17, 0x88, 0x17, 0xd8, + 0x18, 0x18, 0x18, 0x18, 0x18, 0x4a, 0x18, 0x9a, 0x18, 0xf4, 0x19, 0x50, + 0x19, 0xae, 0x19, 0xd4, 0x1a, 0x52, 0x1a, 0x8a, 0x1b, 0x04, 0x1b, 0x5a, + 0x1b, 0xae, 0x1b, 0xcc, 0x1b, 0xd4, 0x1c, 0x62, 0x1c, 0x7a, 0x1c, 0xb0, + 0x1c, 0xea, 0x1d, 0x24, 0x1d, 0x7a, 0x1d, 0x9e, 0x1d, 0xe8, 0x1e, 0x1c, + 0x1e, 0x3e, 0x1e, 0x78, 0x1e, 0xa6, 0x1e, 0xdc, 0x1f, 0x30, 0x1f, 0x6e, + 0x1f, 0xb0, 0x20, 0x0c, 0x20, 0x6c, 0x20, 0x7e, 0x20, 0x90, 0x20, 0xc8, + 0x21, 0x0c, 0x21, 0x1e, 0x21, 0x62, 0x21, 0xc2, 0x21, 0xce, 0x21, 0xe0, + 0x21, 0xf2, 0x22, 0x20, 0x22, 0x32, 0x22, 0x44, 0x22, 0x56, 0x22, 0x7a, + 0x22, 0x8c, 0x22, 0xdc, 0x23, 0x1e, 0x23, 0x30, 0x23, 0x42, 0x23, 0x86, + 0x23, 0xd4, 0x23, 0xe6, 0x24, 0x16, 0x24, 0x74, 0x24, 0x86, 0x24, 0x98, + 0x24, 0xd0, 0x24, 0xe2, 0x24, 0xf4, 0x25, 0x36, 0x25, 0xae, 0x25, 0xbe, + 0x25, 0xce, 0x26, 0x1a, 0x26, 0x72, 0x26, 0x84, 0x26, 0xda, 0x27, 0x74, + 0x27, 0x80, 0x27, 0x90, 0x27, 0xa0, 0x27, 0xe8, 0x27, 0xfa, 0x28, 0x16, + 0x28, 0x32, 0x28, 0x56, 0x28, 0x84, 0x29, 0x02, 0x29, 0x46, 0x29, 0x56, + 0x29, 0x68, 0x29, 0xac, 0x29, 0xfc, 0x2a, 0x0e, 0x2a, 0x50, 0x2a, 0xae, + 0x2a, 0xbe, 0x2a, 0xd0, 0x2b, 0x0a, 0x2b, 0x1c, 0x2b, 0x2c, 0x2b, 0x86, + 0x2b, 0x98, 0x00, 0x00, 0x00, 0x02, 0x00, 0x75, 0xff, 0xe5, 0x01, 0xd3, + 0x05, 0xb6, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x26, 0x40, 0x12, 0x03, 0x0a, + 0x0a, 0x02, 0x04, 0x04, 0x10, 0x11, 0x01, 0x07, 0x0d, 0x07, 0x54, 0x59, + 0x0d, 0x13, 0x02, 0x03, 0x00, 0x3f, 0x3f, 0x2b, 0x11, 0x00, 0x33, 0x11, + 0x12, 0x01, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x23, + 0x03, 0x21, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, + 0x22, 0x26, 0x01, 0xa0, 0xf4, 0x33, 0x01, 0x5a, 0xfe, 0xa2, 0x5a, 0x56, + 0x53, 0x5b, 0x5c, 0x52, 0x54, 0x5c, 0x01, 0xe5, 0x03, 0xd1, 0xfa, 0xd9, + 0x54, 0x56, 0x58, 0x52, 0x4f, 0x5b, 0x59, 0x00, 0x00, 0x02, 0x00, 0x85, + 0x03, 0xa6, 0x03, 0x42, 0x05, 0xb6, 0x00, 0x03, 0x00, 0x07, 0x00, 0x1b, + 0x40, 0x0b, 0x04, 0x07, 0x00, 0x03, 0x03, 0x08, 0x06, 0x02, 0x07, 0x03, + 0x03, 0x00, 0x3f, 0x33, 0xcd, 0x32, 0x11, 0x01, 0x33, 0x11, 0x33, 0xcc, + 0x32, 0x31, 0x30, 0x01, 0x03, 0x23, 0x03, 0x21, 0x03, 0x23, 0x03, 0x01, + 0x9c, 0x29, 0xc5, 0x29, 0x02, 0xbd, 0x29, 0xc5, 0x29, 0x05, 0xb6, 0xfd, + 0xf0, 0x02, 0x10, 0xfd, 0xf0, 0x02, 0x10, 0x00, 0x00, 0x02, 0x00, 0x2d, + 0x00, 0x00, 0x04, 0xfe, 0x05, 0xb4, 0x00, 0x1b, 0x00, 0x1f, 0x00, 0x7d, + 0x40, 0x44, 0x08, 0x1c, 0x1f, 0x15, 0x04, 0x14, 0x09, 0x09, 0x0a, 0x04, + 0x01, 0x00, 0x19, 0x04, 0x18, 0x05, 0x05, 0x06, 0x12, 0x0f, 0x0e, 0x0b, + 0x04, 0x0a, 0x13, 0x13, 0x14, 0x16, 0x1e, 0x1d, 0x07, 0x04, 0x06, 0x17, + 0x17, 0x18, 0x18, 0x14, 0x06, 0x0a, 0x04, 0x20, 0x21, 0x08, 0x04, 0x0b, + 0x0b, 0x1c, 0x01, 0x0e, 0x1f, 0x00, 0x0f, 0x0f, 0x19, 0x15, 0x12, 0x0e, + 0x12, 0x0e, 0x12, 0x0a, 0x17, 0x13, 0x03, 0x06, 0x0a, 0x12, 0x00, 0x3f, + 0x33, 0x3f, 0x33, 0x12, 0x39, 0x39, 0x2f, 0x2f, 0x11, 0x33, 0x33, 0x33, + 0x11, 0x33, 0x33, 0x11, 0x33, 0x33, 0x33, 0x11, 0x33, 0x33, 0x11, 0x12, + 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x12, 0x17, 0x39, 0x11, 0x33, 0x11, + 0x12, 0x17, 0x39, 0x11, 0x33, 0x11, 0x12, 0x17, 0x39, 0x11, 0x33, 0x11, + 0x12, 0x17, 0x39, 0x31, 0x30, 0x01, 0x07, 0x21, 0x15, 0x21, 0x03, 0x23, + 0x13, 0x23, 0x03, 0x23, 0x13, 0x23, 0x35, 0x21, 0x37, 0x23, 0x35, 0x21, + 0x13, 0x33, 0x03, 0x33, 0x13, 0x33, 0x03, 0x33, 0x15, 0x05, 0x33, 0x37, + 0x23, 0x03, 0xe7, 0x2f, 0x01, 0x02, 0xfe, 0xd7, 0x4d, 0xdc, 0x4e, 0xc2, + 0x4c, 0xd7, 0x4a, 0xee, 0x01, 0x15, 0x2f, 0xfc, 0x01, 0x21, 0x4d, 0xdb, + 0x4d, 0xc6, 0x4e, 0xd7, 0x4e, 0xf0, 0xfd, 0x1d, 0xc4, 0x2f, 0xc4, 0x03, + 0x4c, 0xe8, 0xce, 0xfe, 0x6a, 0x01, 0x96, 0xfe, 0x6a, 0x01, 0x96, 0xce, + 0xe8, 0xd1, 0x01, 0x97, 0xfe, 0x69, 0x01, 0x97, 0xfe, 0x69, 0xd1, 0xe8, + 0xe8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x58, 0xff, 0x89, 0x04, 0x44, + 0x06, 0x12, 0x00, 0x20, 0x00, 0x26, 0x00, 0x2c, 0x00, 0x86, 0x40, 0x45, + 0x24, 0x17, 0x03, 0x1d, 0x1d, 0x14, 0x0d, 0x06, 0x2a, 0x2a, 0x21, 0x29, + 0x1e, 0x27, 0x00, 0x27, 0x08, 0x0f, 0x23, 0x11, 0x21, 0x21, 0x19, 0x00, + 0x11, 0x00, 0x2d, 0x2e, 0x2a, 0x1d, 0x27, 0x00, 0x00, 0x0d, 0x24, 0x11, + 0x21, 0x11, 0x27, 0x2b, 0x1a, 0x27, 0x21, 0x09, 0x25, 0x06, 0x0c, 0x1c, + 0x17, 0x1c, 0x4f, 0x59, 0x14, 0x17, 0x06, 0x0c, 0x50, 0x59, 0x05, 0x06, + 0x03, 0x06, 0x17, 0x06, 0x17, 0x06, 0x2d, 0x15, 0x00, 0x00, 0x3f, 0x12, + 0x39, 0x39, 0x2f, 0x2f, 0x11, 0x33, 0x10, 0xcd, 0x2b, 0x11, 0x00, 0x33, + 0x2b, 0x11, 0x12, 0x00, 0x17, 0x39, 0x11, 0x33, 0x11, 0x12, 0x39, 0x39, + 0x33, 0x11, 0x12, 0x39, 0x39, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, + 0x33, 0x11, 0x12, 0x39, 0x39, 0x32, 0x32, 0x11, 0x12, 0x39, 0x39, 0x11, + 0x39, 0x11, 0x33, 0x33, 0x33, 0x33, 0x11, 0x33, 0x33, 0x33, 0x31, 0x30, + 0x01, 0x14, 0x06, 0x07, 0x15, 0x23, 0x35, 0x26, 0x27, 0x11, 0x1e, 0x01, + 0x17, 0x11, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x35, 0x33, 0x15, + 0x16, 0x17, 0x07, 0x26, 0x27, 0x11, 0x1e, 0x02, 0x05, 0x34, 0x26, 0x27, + 0x15, 0x36, 0x01, 0x14, 0x16, 0x17, 0x35, 0x06, 0x04, 0x44, 0xe6, 0xcf, + 0x89, 0xf4, 0xb8, 0x57, 0xf5, 0x60, 0x43, 0xc6, 0xa5, 0xe3, 0xcb, 0x89, + 0xe5, 0xb9, 0x5e, 0x9c, 0xa4, 0xc3, 0xa5, 0x4d, 0xfe, 0xd3, 0x44, 0x44, + 0x88, 0xfe, 0x6e, 0x3d, 0x44, 0x81, 0x01, 0xc9, 0x9f, 0xc1, 0x13, 0xcd, + 0xc9, 0x05, 0x51, 0x01, 0x08, 0x2b, 0x42, 0x06, 0x01, 0x36, 0x1a, 0x4e, + 0xb7, 0x87, 0x91, 0xbb, 0x14, 0x99, 0x95, 0x0a, 0x52, 0xea, 0x40, 0x0e, + 0xfe, 0xd9, 0x4b, 0x6e, 0x84, 0x67, 0x2a, 0x3a, 0x1f, 0xf9, 0x17, 0x02, + 0xbe, 0x2c, 0x39, 0x1e, 0xeb, 0x13, 0x00, 0x00, 0x00, 0x05, 0x00, 0x3f, + 0xff, 0xee, 0x06, 0xf6, 0x05, 0xcb, 0x00, 0x09, 0x00, 0x14, 0x00, 0x18, + 0x00, 0x22, 0x00, 0x2d, 0x00, 0x4a, 0x40, 0x24, 0x16, 0x17, 0x17, 0x05, + 0x05, 0x0a, 0x10, 0x00, 0x10, 0x18, 0x15, 0x15, 0x19, 0x19, 0x29, 0x23, + 0x1e, 0x23, 0x10, 0x23, 0x2e, 0x2f, 0x20, 0x2b, 0x1c, 0x26, 0x19, 0x18, + 0x06, 0x17, 0x18, 0x03, 0x0d, 0x07, 0x12, 0x07, 0x00, 0x3f, 0x33, 0xc4, + 0x32, 0x3f, 0x3f, 0x3f, 0x33, 0xc4, 0x32, 0x11, 0x12, 0x01, 0x39, 0x39, + 0x11, 0x33, 0x10, 0xc0, 0x32, 0x12, 0x39, 0x11, 0x33, 0x11, 0x33, 0x10, + 0xc0, 0x32, 0x12, 0x39, 0x11, 0x33, 0x31, 0x30, 0x01, 0x14, 0x16, 0x33, + 0x32, 0x35, 0x34, 0x23, 0x22, 0x06, 0x05, 0x14, 0x06, 0x23, 0x22, 0x26, + 0x35, 0x10, 0x21, 0x32, 0x16, 0x25, 0x01, 0x23, 0x01, 0x13, 0x14, 0x16, + 0x33, 0x32, 0x35, 0x34, 0x23, 0x22, 0x06, 0x05, 0x14, 0x06, 0x23, 0x22, + 0x26, 0x35, 0x10, 0x21, 0x32, 0x16, 0x01, 0x3b, 0x2d, 0x32, 0x60, 0x60, + 0x32, 0x2d, 0x01, 0xbb, 0xb2, 0xac, 0xa5, 0xb4, 0x01, 0x59, 0xa9, 0xb5, + 0x02, 0xb0, 0xfc, 0xd5, 0xf0, 0x03, 0x2b, 0x85, 0x2d, 0x32, 0x60, 0x60, + 0x32, 0x2d, 0x01, 0xbb, 0xb2, 0xac, 0xa5, 0xb4, 0x01, 0x59, 0xa9, 0xb5, + 0x04, 0x00, 0x7f, 0x7d, 0xfc, 0xfa, 0x7b, 0x7d, 0xe6, 0xe7, 0xed, 0xe0, + 0x01, 0xc9, 0xed, 0xd8, 0xfa, 0x4a, 0x05, 0xb6, 0xfc, 0x02, 0x7f, 0x7d, + 0xfc, 0xfa, 0x7b, 0x7d, 0xe5, 0xe7, 0xed, 0xdf, 0x01, 0xc9, 0xed, 0x00, + 0x00, 0x03, 0x00, 0x52, 0xff, 0xec, 0x06, 0x00, 0x05, 0xcb, 0x00, 0x1d, + 0x00, 0x26, 0x00, 0x31, 0x00, 0x71, 0x40, 0x39, 0x2d, 0x0d, 0x23, 0x0a, + 0x01, 0x1d, 0x16, 0x00, 0x0a, 0x16, 0x0d, 0x13, 0x13, 0x27, 0x19, 0x1a, + 0x1a, 0x27, 0x0d, 0x03, 0x07, 0x01, 0x00, 0x00, 0x33, 0x1e, 0x07, 0x07, + 0x32, 0x17, 0x21, 0x1a, 0x16, 0x0a, 0x24, 0x24, 0x2f, 0x2f, 0x10, 0x1a, + 0x1a, 0x04, 0x10, 0x10, 0x2a, 0x4d, 0x59, 0x10, 0x04, 0x04, 0x21, 0x4c, + 0x59, 0x04, 0x13, 0x01, 0x12, 0x00, 0x3f, 0x3f, 0x2b, 0x00, 0x18, 0x3f, + 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x12, 0x39, 0x11, 0x33, 0x12, + 0x39, 0x39, 0x11, 0x12, 0x39, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x33, 0x12, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, + 0x39, 0x11, 0x12, 0x39, 0x11, 0x12, 0x39, 0x11, 0x33, 0x31, 0x30, 0x29, + 0x01, 0x27, 0x06, 0x23, 0x22, 0x24, 0x35, 0x34, 0x36, 0x37, 0x2e, 0x01, + 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x01, 0x36, + 0x37, 0x21, 0x06, 0x02, 0x07, 0x25, 0x14, 0x16, 0x33, 0x32, 0x37, 0x01, + 0x0e, 0x01, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x17, 0x3e, + 0x01, 0x06, 0x00, 0xfe, 0x87, 0x73, 0xbf, 0xf1, 0xf4, 0xfe, 0xe2, 0x79, + 0x93, 0x4b, 0x44, 0xe9, 0xc3, 0xba, 0xdf, 0x8a, 0x9a, 0x01, 0x1c, 0x47, + 0x34, 0x01, 0x3e, 0x24, 0x7e, 0x50, 0xfc, 0xc0, 0x81, 0x65, 0x7e, 0x65, + 0xfe, 0xb4, 0x3a, 0x43, 0x01, 0x67, 0x48, 0x39, 0x43, 0x4d, 0x5f, 0x56, + 0x5c, 0x71, 0x85, 0xe0, 0xbf, 0x89, 0xc1, 0x54, 0x56, 0x9d, 0x5d, 0x98, + 0xba, 0xad, 0x91, 0x77, 0xc5, 0x59, 0xfe, 0xeb, 0x75, 0xb8, 0x87, 0xfe, + 0xff, 0x63, 0x83, 0x56, 0x66, 0x3d, 0x01, 0x4a, 0x2c, 0x60, 0x02, 0x86, + 0x35, 0x3d, 0x40, 0x3b, 0x58, 0x6a, 0x30, 0x5d, 0x00, 0x01, 0x00, 0x85, + 0x03, 0xa6, 0x01, 0x9c, 0x05, 0xb6, 0x00, 0x03, 0x00, 0x12, 0xb6, 0x00, + 0x03, 0x03, 0x04, 0x02, 0x03, 0x03, 0x00, 0x3f, 0xcd, 0x11, 0x01, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x01, 0x03, 0x23, 0x03, 0x01, 0x9c, 0x29, 0xc5, + 0x29, 0x05, 0xb6, 0xfd, 0xf0, 0x02, 0x10, 0x00, 0x00, 0x01, 0x00, 0x52, + 0xfe, 0xbc, 0x02, 0x79, 0x05, 0xb6, 0x00, 0x0d, 0x00, 0x20, 0x40, 0x0e, + 0x0b, 0x0a, 0x0a, 0x03, 0x04, 0x04, 0x00, 0x07, 0x07, 0x0f, 0x0b, 0x24, + 0x03, 0x03, 0x00, 0x3f, 0x3f, 0x11, 0x01, 0x33, 0x11, 0x33, 0x33, 0x11, + 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, 0x10, 0x12, 0x37, 0x33, 0x06, + 0x02, 0x15, 0x14, 0x12, 0x17, 0x23, 0x26, 0x02, 0x52, 0x9b, 0x92, 0xfa, + 0x8d, 0x90, 0x93, 0x88, 0xf8, 0x93, 0x9a, 0x02, 0x31, 0x01, 0x09, 0x01, + 0xce, 0xae, 0xc1, 0xfe, 0x32, 0xf4, 0xf5, 0xfe, 0x37, 0xb9, 0xaa, 0x01, + 0xc6, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x3d, 0xfe, 0xbc, 0x02, 0x64, + 0x05, 0xb6, 0x00, 0x0d, 0x00, 0x20, 0x40, 0x0e, 0x03, 0x04, 0x04, 0x0b, + 0x0a, 0x0a, 0x00, 0x07, 0x07, 0x0e, 0x0a, 0x03, 0x04, 0x24, 0x00, 0x3f, + 0x3f, 0x11, 0x01, 0x33, 0x11, 0x33, 0x33, 0x11, 0x33, 0x33, 0x11, 0x33, + 0x31, 0x30, 0x01, 0x10, 0x02, 0x07, 0x23, 0x36, 0x12, 0x35, 0x34, 0x02, + 0x27, 0x33, 0x16, 0x12, 0x02, 0x64, 0x9b, 0x92, 0xf8, 0x87, 0x94, 0x90, + 0x8d, 0xfa, 0x93, 0x9a, 0x02, 0x31, 0xfe, 0xf9, 0xfe, 0x3a, 0xa8, 0xb8, + 0x01, 0xc9, 0xf6, 0xf4, 0x01, 0xce, 0xc1, 0xaf, 0xfe, 0x31, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x3f, 0x02, 0x56, 0x04, 0x1d, 0x06, 0x14, 0x00, 0x0e, + 0x00, 0x35, 0x40, 0x18, 0x09, 0x0b, 0x0b, 0x05, 0x03, 0x03, 0x0d, 0x01, + 0x07, 0x07, 0x10, 0x0f, 0x04, 0x0a, 0x0a, 0x07, 0x07, 0x01, 0x0d, 0x0d, + 0x06, 0x08, 0x0e, 0x00, 0x00, 0x3f, 0xc4, 0x32, 0x39, 0x11, 0x33, 0x33, + 0x12, 0x39, 0x11, 0x33, 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x33, 0x33, + 0x12, 0x39, 0x33, 0x12, 0x39, 0x31, 0x30, 0x01, 0x03, 0x25, 0x17, 0x05, + 0x13, 0x07, 0x0b, 0x01, 0x27, 0x13, 0x25, 0x37, 0x05, 0x03, 0x02, 0xb0, + 0x29, 0x01, 0x75, 0x21, 0xfe, 0xac, 0xdf, 0xe3, 0x9c, 0x89, 0xec, 0xdd, + 0xfe, 0xae, 0x27, 0x01, 0x6d, 0x29, 0x06, 0x14, 0xfe, 0x90, 0x68, 0xfc, + 0x18, 0xfe, 0xd7, 0x79, 0x01, 0x39, 0xfe, 0xc9, 0x77, 0x01, 0x29, 0x1a, + 0xfa, 0x68, 0x01, 0x70, 0x00, 0x01, 0x00, 0x58, 0x00, 0xe3, 0x04, 0x39, + 0x04, 0xc5, 0x00, 0x0b, 0x00, 0x26, 0x40, 0x10, 0x08, 0x06, 0x09, 0x09, + 0x03, 0x01, 0x00, 0x00, 0x0c, 0x0d, 0x0b, 0x09, 0x00, 0x06, 0x04, 0x03, + 0x00, 0x2f, 0x33, 0x33, 0x33, 0x32, 0x32, 0x11, 0x12, 0x01, 0x39, 0x11, + 0x33, 0x33, 0x33, 0x11, 0x33, 0x33, 0x31, 0x30, 0x01, 0x21, 0x35, 0x21, + 0x11, 0x33, 0x11, 0x21, 0x15, 0x21, 0x11, 0x23, 0x01, 0xdb, 0xfe, 0x7d, + 0x01, 0x83, 0xdb, 0x01, 0x83, 0xfe, 0x7d, 0xdb, 0x02, 0x64, 0xdb, 0x01, + 0x86, 0xfe, 0x7a, 0xdb, 0xfe, 0x7f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x3f, + 0xfe, 0xf8, 0x01, 0xcb, 0x00, 0xee, 0x00, 0x06, 0x00, 0x15, 0xb7, 0x02, + 0x03, 0x00, 0x05, 0x05, 0x07, 0x03, 0x05, 0x00, 0x2f, 0xc6, 0x11, 0x01, + 0x33, 0x11, 0x33, 0xc2, 0x32, 0x31, 0x30, 0x25, 0x06, 0x03, 0x23, 0x12, + 0x37, 0x21, 0x01, 0xcb, 0x34, 0x7c, 0xdc, 0x41, 0x24, 0x01, 0x18, 0xd7, + 0xca, 0xfe, 0xeb, 0x01, 0x0a, 0xec, 0x00, 0x00, 0x00, 0x01, 0x00, 0x3d, + 0x01, 0xa8, 0x02, 0x56, 0x02, 0xa2, 0x00, 0x03, 0x00, 0x11, 0xb5, 0x03, + 0x05, 0x00, 0x04, 0x00, 0x01, 0x00, 0x2f, 0x33, 0x11, 0x01, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x13, 0x35, 0x21, 0x15, 0x3d, 0x02, 0x19, 0x01, 0xa8, + 0xfa, 0xfa, 0x00, 0x00, 0x00, 0x01, 0x00, 0x75, 0xff, 0xe5, 0x01, 0xd3, + 0x01, 0x39, 0x00, 0x0b, 0x00, 0x16, 0x40, 0x0a, 0x06, 0x00, 0x00, 0x0c, + 0x09, 0x03, 0x54, 0x59, 0x09, 0x13, 0x00, 0x3f, 0x2b, 0x11, 0x01, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x37, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, + 0x06, 0x23, 0x22, 0x26, 0x75, 0x5a, 0x56, 0x53, 0x5b, 0x5c, 0x52, 0x54, + 0x5c, 0x8f, 0x54, 0x56, 0x58, 0x52, 0x4f, 0x5b, 0x59, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x0e, 0x00, 0x00, 0x03, 0x44, 0x05, 0xb6, 0x00, 0x03, + 0x00, 0x1c, 0x40, 0x0c, 0x01, 0x02, 0x03, 0x00, 0x02, 0x00, 0x04, 0x05, + 0x03, 0x03, 0x02, 0x12, 0x00, 0x3f, 0x3f, 0x11, 0x12, 0x01, 0x39, 0x39, + 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x09, 0x01, 0x21, 0x01, 0x03, 0x44, + 0xfd, 0xdf, 0xfe, 0xeb, 0x02, 0x21, 0x05, 0xb6, 0xfa, 0x4a, 0x05, 0xb6, + 0x00, 0x02, 0x00, 0x4a, 0xff, 0xec, 0x04, 0x48, 0x05, 0xcd, 0x00, 0x0b, + 0x00, 0x17, 0x00, 0x28, 0x40, 0x14, 0x0c, 0x06, 0x12, 0x00, 0x06, 0x00, + 0x18, 0x19, 0x09, 0x15, 0x4f, 0x59, 0x09, 0x07, 0x03, 0x0f, 0x4f, 0x59, + 0x03, 0x19, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x01, + 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x10, 0x02, 0x21, + 0x22, 0x00, 0x11, 0x10, 0x12, 0x21, 0x32, 0x00, 0x01, 0x10, 0x16, 0x33, + 0x32, 0x36, 0x11, 0x10, 0x26, 0x23, 0x22, 0x06, 0x04, 0x48, 0xfb, 0xfe, + 0xfb, 0xfd, 0xfe, 0xff, 0xfa, 0x01, 0x04, 0xfd, 0x01, 0x03, 0xfd, 0x35, + 0x5d, 0x6e, 0x6c, 0x60, 0x61, 0x6b, 0x6d, 0x5e, 0x02, 0xdb, 0xfe, 0x81, + 0xfe, 0x90, 0x01, 0x7c, 0x01, 0x73, 0x01, 0x83, 0x01, 0x6f, 0xfe, 0x80, + 0xfe, 0x8e, 0xfe, 0xf3, 0xe9, 0xec, 0x01, 0x0a, 0x01, 0x0d, 0xeb, 0xeb, + 0x00, 0x01, 0x00, 0x79, 0x00, 0x00, 0x03, 0x4e, 0x05, 0xb6, 0x00, 0x0a, + 0x00, 0x2a, 0x40, 0x13, 0x09, 0x04, 0x00, 0x00, 0x08, 0x01, 0x01, 0x0b, + 0x0c, 0x08, 0x07, 0x07, 0x01, 0x04, 0x04, 0x09, 0x06, 0x01, 0x18, 0x00, + 0x3f, 0x3f, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x11, 0x12, 0x01, 0x39, + 0x11, 0x33, 0x33, 0x12, 0x39, 0x39, 0x31, 0x30, 0x29, 0x01, 0x11, 0x3f, + 0x01, 0x06, 0x0f, 0x01, 0x27, 0x01, 0x33, 0x03, 0x4e, 0xfe, 0xcb, 0x03, + 0x05, 0x4d, 0x1e, 0xa8, 0x95, 0x01, 0xd7, 0xfe, 0x03, 0x4e, 0x8b, 0x98, + 0x4d, 0x18, 0x87, 0xba, 0x01, 0x77, 0x00, 0x00, 0x00, 0x01, 0x00, 0x4e, + 0x00, 0x00, 0x04, 0x50, 0x05, 0xcb, 0x00, 0x1d, 0x00, 0x3d, 0x40, 0x1e, + 0x1c, 0x0e, 0x01, 0x07, 0x00, 0x16, 0x01, 0x16, 0x1e, 0x1f, 0x16, 0x07, + 0x07, 0x02, 0x0a, 0x12, 0x0a, 0x4e, 0x59, 0x12, 0x07, 0x02, 0x01, 0x1c, + 0x01, 0x1c, 0x4e, 0x59, 0x01, 0x18, 0x00, 0x3f, 0x2b, 0x11, 0x12, 0x00, + 0x39, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x11, 0x33, 0x11, 0x12, + 0x01, 0x39, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x33, 0x31, 0x30, 0x29, + 0x01, 0x35, 0x01, 0x3e, 0x02, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, + 0x27, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x01, 0x15, 0x14, 0x0e, 0x01, 0x0f, + 0x01, 0x15, 0x21, 0x04, 0x50, 0xfc, 0x02, 0x01, 0x6f, 0xa3, 0x64, 0x2c, + 0x61, 0x51, 0x55, 0xa0, 0x57, 0xa8, 0x6c, 0x8e, 0xa8, 0x68, 0x89, 0xd2, + 0x74, 0x47, 0x95, 0xbc, 0xbc, 0x02, 0x7d, 0xd7, 0x01, 0x73, 0xa7, 0x81, + 0x6e, 0x3b, 0x58, 0x56, 0x4e, 0x48, 0xc7, 0x5c, 0x4c, 0x29, 0x64, 0xb4, + 0x74, 0x65, 0xb1, 0xba, 0xac, 0xb1, 0x0e, 0x00, 0x00, 0x01, 0x00, 0x4e, + 0xff, 0xec, 0x04, 0x42, 0x05, 0xcb, 0x00, 0x26, 0x00, 0x5b, 0x40, 0x2f, + 0x22, 0x17, 0x0d, 0x13, 0x13, 0x07, 0x03, 0x1c, 0x1c, 0x00, 0x00, 0x07, + 0x0d, 0x07, 0x27, 0x28, 0x21, 0x1e, 0x24, 0x1e, 0x4f, 0x59, 0x03, 0x18, + 0x17, 0x18, 0x17, 0x50, 0x59, 0x0c, 0x18, 0x01, 0x0d, 0x03, 0x18, 0x18, + 0x0a, 0x24, 0x07, 0x0d, 0x10, 0x0a, 0x10, 0x4f, 0x59, 0x0a, 0x19, 0x00, + 0x3f, 0x2b, 0x11, 0x00, 0x33, 0x18, 0x3f, 0x12, 0x39, 0x2f, 0x5f, 0x5e, + 0x5d, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x2b, 0x11, 0x00, 0x33, 0x11, 0x12, + 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, + 0x12, 0x39, 0x39, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x15, 0x1e, 0x01, + 0x15, 0x14, 0x04, 0x21, 0x22, 0x27, 0x11, 0x1e, 0x01, 0x33, 0x32, 0x36, + 0x35, 0x34, 0x26, 0x2b, 0x01, 0x35, 0x33, 0x32, 0x36, 0x35, 0x34, 0x23, + 0x22, 0x06, 0x07, 0x27, 0x36, 0x21, 0x32, 0x04, 0x04, 0x17, 0xa6, 0x96, + 0xb1, 0xb6, 0xfe, 0xce, 0xfe, 0xe4, 0xee, 0xb8, 0x55, 0xcc, 0x64, 0x99, + 0x92, 0xa8, 0xb8, 0x6f, 0x71, 0xaa, 0x9d, 0xd0, 0x48, 0x95, 0x5b, 0x8f, + 0xc8, 0x01, 0x15, 0xe3, 0x01, 0x07, 0x04, 0x6f, 0x89, 0xc0, 0x24, 0x06, + 0x16, 0xab, 0x91, 0xd3, 0xeb, 0x4f, 0x01, 0x07, 0x2b, 0x36, 0x68, 0x73, + 0x67, 0x56, 0xed, 0x59, 0x6c, 0xa6, 0x30, 0x3b, 0xd5, 0x90, 0xb8, 0x00, + 0x00, 0x02, 0x00, 0x23, 0x00, 0x00, 0x04, 0x71, 0x05, 0xb6, 0x00, 0x0a, + 0x00, 0x13, 0x00, 0x46, 0x40, 0x22, 0x0f, 0x07, 0x03, 0x09, 0x02, 0x02, + 0x0b, 0x03, 0x03, 0x05, 0x00, 0x00, 0x15, 0x13, 0x05, 0x05, 0x14, 0x06, + 0x13, 0x01, 0x05, 0x13, 0x05, 0x50, 0x59, 0x09, 0x13, 0x13, 0x03, 0x0f, + 0x07, 0x06, 0x03, 0x18, 0x00, 0x3f, 0x3f, 0x33, 0x12, 0x39, 0x2f, 0x33, + 0x2b, 0x11, 0x00, 0x33, 0x12, 0x39, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, + 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x12, 0x39, 0x39, + 0x31, 0x30, 0x01, 0x23, 0x11, 0x21, 0x11, 0x21, 0x35, 0x01, 0x21, 0x11, + 0x33, 0x21, 0x35, 0x34, 0x36, 0x37, 0x23, 0x06, 0x07, 0x01, 0x04, 0x71, + 0xb0, 0xfe, 0xd2, 0xfd, 0x90, 0x02, 0x81, 0x01, 0x1d, 0xb0, 0xfe, 0x22, + 0x0a, 0x03, 0x08, 0x25, 0x34, 0xfe, 0xf4, 0x01, 0x2f, 0xfe, 0xd1, 0x01, + 0x2f, 0xd7, 0x03, 0xb0, 0xfc, 0x69, 0xf8, 0x3e, 0xec, 0x13, 0x52, 0x4e, + 0xfe, 0x6b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x64, 0xff, 0xec, 0x04, 0x35, + 0x05, 0xb6, 0x00, 0x1b, 0x00, 0x56, 0x40, 0x2b, 0x18, 0x15, 0x15, 0x17, + 0x03, 0x19, 0x14, 0x14, 0x0e, 0x08, 0x0e, 0x03, 0x08, 0x03, 0x1c, 0x1d, + 0x14, 0x13, 0x09, 0x13, 0x0c, 0x10, 0x00, 0x10, 0x4f, 0x59, 0x19, 0x00, + 0x00, 0x06, 0x15, 0x15, 0x18, 0x4e, 0x59, 0x15, 0x06, 0x06, 0x0c, 0x4f, + 0x59, 0x06, 0x19, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, + 0x00, 0x39, 0x18, 0x2f, 0x33, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x39, 0x11, + 0x33, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x12, 0x39, 0x11, + 0x33, 0x12, 0x39, 0x39, 0x11, 0x33, 0x31, 0x30, 0x01, 0x32, 0x16, 0x15, + 0x14, 0x00, 0x21, 0x22, 0x27, 0x11, 0x1e, 0x01, 0x33, 0x20, 0x35, 0x34, + 0x21, 0x22, 0x06, 0x07, 0x27, 0x13, 0x21, 0x11, 0x21, 0x03, 0x37, 0x36, + 0x02, 0x66, 0xd4, 0xfb, 0xfe, 0xd2, 0xfe, 0xe7, 0xf4, 0x96, 0x4f, 0xd2, + 0x5e, 0x01, 0x1b, 0xfe, 0xdb, 0x35, 0x80, 0x28, 0x7b, 0x37, 0x03, 0x19, + 0xfd, 0xf6, 0x1b, 0x23, 0x3d, 0x03, 0xa6, 0xee, 0xcf, 0xf5, 0xfe, 0xf8, + 0x4f, 0x01, 0x0b, 0x2a, 0x35, 0xe8, 0xdd, 0x15, 0x0c, 0x42, 0x02, 0xe9, + 0xfe, 0xfa, 0xfe, 0xe1, 0x07, 0x0e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x48, + 0xff, 0xec, 0x04, 0x50, 0x05, 0xc7, 0x00, 0x18, 0x00, 0x24, 0x00, 0x41, + 0x40, 0x21, 0x06, 0x12, 0x0c, 0x0c, 0x22, 0x22, 0x00, 0x1c, 0x12, 0x00, + 0x12, 0x25, 0x26, 0x0f, 0x1f, 0x50, 0x59, 0x0f, 0x0f, 0x15, 0x03, 0x15, + 0x19, 0x4f, 0x59, 0x15, 0x19, 0x03, 0x08, 0x4f, 0x59, 0x03, 0x07, 0x00, + 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, + 0x2b, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x12, 0x39, + 0x11, 0x12, 0x39, 0x31, 0x30, 0x13, 0x10, 0x00, 0x21, 0x32, 0x17, 0x15, + 0x26, 0x23, 0x22, 0x0e, 0x01, 0x07, 0x33, 0x36, 0x33, 0x32, 0x16, 0x15, + 0x14, 0x00, 0x23, 0x22, 0x26, 0x02, 0x05, 0x32, 0x36, 0x35, 0x34, 0x26, + 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x48, 0x01, 0x6f, 0x01, 0x6e, 0x7d, + 0x47, 0x59, 0x57, 0x9f, 0xc9, 0x64, 0x09, 0x0d, 0x63, 0xda, 0xc4, 0xde, + 0xfe, 0xf8, 0xea, 0xa2, 0xf1, 0x83, 0x02, 0x10, 0x63, 0x6a, 0x63, 0x64, + 0x5e, 0x85, 0x7d, 0x02, 0x6d, 0x01, 0xb2, 0x01, 0xa8, 0x0f, 0xf7, 0x14, + 0x60, 0xbc, 0xad, 0xaa, 0xf6, 0xd9, 0xea, 0xfe, 0xef, 0x96, 0x01, 0x20, + 0xbf, 0x85, 0x7b, 0x6b, 0x7b, 0x7a, 0x51, 0x77, 0xa4, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x37, 0x00, 0x00, 0x04, 0x50, 0x05, 0xb4, 0x00, 0x06, + 0x00, 0x2e, 0x40, 0x16, 0x06, 0x00, 0x00, 0x02, 0x01, 0x01, 0x05, 0x02, + 0x05, 0x07, 0x08, 0x05, 0x03, 0x02, 0x03, 0x02, 0x4e, 0x59, 0x03, 0x06, + 0x00, 0x18, 0x00, 0x3f, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x11, 0x12, + 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x31, 0x30, + 0x33, 0x01, 0x21, 0x11, 0x21, 0x15, 0x01, 0xe3, 0x02, 0x25, 0xfd, 0x2f, + 0x04, 0x19, 0xfd, 0xd7, 0x04, 0xb0, 0x01, 0x04, 0xc2, 0xfb, 0x0e, 0x00, + 0x00, 0x03, 0x00, 0x48, 0xff, 0xec, 0x04, 0x4a, 0x05, 0xc9, 0x00, 0x17, + 0x00, 0x22, 0x00, 0x2e, 0x00, 0x53, 0x40, 0x29, 0x12, 0x06, 0x15, 0x2c, + 0x03, 0x03, 0x18, 0x09, 0x18, 0x26, 0x15, 0x15, 0x0f, 0x1e, 0x1e, 0x09, + 0x0f, 0x09, 0x2f, 0x30, 0x06, 0x12, 0x12, 0x21, 0x21, 0x29, 0x29, 0x0c, + 0x00, 0x0c, 0x1b, 0x51, 0x59, 0x0c, 0x19, 0x00, 0x23, 0x51, 0x59, 0x00, + 0x07, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, + 0x11, 0x33, 0x12, 0x39, 0x11, 0x33, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, + 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x32, 0x11, 0x12, 0x39, 0x11, 0x33, + 0x12, 0x39, 0x39, 0x31, 0x30, 0x01, 0x32, 0x04, 0x15, 0x14, 0x06, 0x07, + 0x1e, 0x01, 0x15, 0x14, 0x04, 0x23, 0x22, 0x24, 0x35, 0x34, 0x36, 0x37, + 0x2e, 0x01, 0x35, 0x34, 0x24, 0x03, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, + 0x34, 0x26, 0x27, 0x06, 0x13, 0x22, 0x06, 0x15, 0x14, 0x16, 0x17, 0x3e, + 0x01, 0x35, 0x34, 0x26, 0x02, 0x4a, 0xd2, 0x01, 0x01, 0x7c, 0x8a, 0xa4, + 0x8f, 0xfe, 0xe6, 0xe6, 0xf0, 0xfe, 0xee, 0x85, 0x93, 0x7d, 0x6e, 0x01, + 0x04, 0x13, 0x78, 0x68, 0x73, 0x72, 0x71, 0x7f, 0xd5, 0xe2, 0x4f, 0x61, + 0x4d, 0x65, 0x62, 0x4e, 0x64, 0x05, 0xc9, 0xbf, 0xa2, 0x70, 0xaf, 0x45, + 0x58, 0xbf, 0x72, 0xb4, 0xdb, 0xcc, 0xbb, 0x7d, 0xc2, 0x4a, 0x4f, 0xb4, + 0x6b, 0x9d, 0xc2, 0xfb, 0xbc, 0x56, 0x60, 0x63, 0x51, 0x43, 0x75, 0x42, + 0x62, 0x02, 0xcc, 0x51, 0x44, 0x3c, 0x5f, 0x32, 0x2e, 0x60, 0x3f, 0x45, + 0x50, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x42, 0xff, 0xec, 0x04, 0x4a, + 0x05, 0xc7, 0x00, 0x19, 0x00, 0x25, 0x00, 0x3f, 0x40, 0x20, 0x1d, 0x05, + 0x13, 0x0c, 0x0c, 0x23, 0x23, 0x00, 0x13, 0x00, 0x26, 0x27, 0x10, 0x20, + 0x50, 0x59, 0x10, 0x10, 0x03, 0x16, 0x16, 0x1a, 0x4f, 0x59, 0x16, 0x07, + 0x03, 0x08, 0x50, 0x59, 0x03, 0x19, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, + 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x2b, 0x11, 0x12, 0x01, 0x39, + 0x39, 0x11, 0x33, 0x12, 0x39, 0x11, 0x12, 0x39, 0x32, 0x31, 0x30, 0x01, + 0x10, 0x00, 0x21, 0x22, 0x27, 0x35, 0x16, 0x33, 0x32, 0x3e, 0x01, 0x37, + 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x00, 0x33, 0x32, 0x16, + 0x12, 0x25, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, + 0x26, 0x04, 0x4a, 0xfe, 0x94, 0xfe, 0x8f, 0x82, 0x43, 0x54, 0x5c, 0x9b, + 0xc8, 0x6a, 0x08, 0x0c, 0x3a, 0x98, 0x72, 0xbf, 0xdc, 0x01, 0x0b, 0xe6, + 0xa2, 0xf3, 0x82, 0xfd, 0xef, 0x60, 0x6c, 0x62, 0x64, 0x5e, 0x86, 0x7d, + 0x03, 0x46, 0xfe, 0x50, 0xfe, 0x56, 0x0e, 0xf8, 0x15, 0x5b, 0xc3, 0xab, + 0x5e, 0x4c, 0xf5, 0xda, 0xeb, 0x01, 0x11, 0x98, 0xfe, 0xdf, 0xc1, 0x84, + 0x7c, 0x6a, 0x7c, 0x7b, 0x50, 0x77, 0xa4, 0x00, 0x00, 0x02, 0x00, 0x75, + 0xff, 0xe5, 0x01, 0xd3, 0x04, 0x73, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x26, + 0x40, 0x13, 0x12, 0x06, 0x06, 0x0c, 0x00, 0x00, 0x18, 0x0f, 0x15, 0x54, + 0x59, 0x0f, 0x10, 0x09, 0x03, 0x54, 0x59, 0x09, 0x13, 0x00, 0x3f, 0x2b, + 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x01, 0x33, 0x11, 0x33, 0x33, 0x11, 0x33, + 0x31, 0x30, 0x37, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, + 0x22, 0x26, 0x11, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, + 0x22, 0x26, 0x75, 0x5a, 0x56, 0x53, 0x5b, 0x5c, 0x52, 0x54, 0x5c, 0x5a, + 0x56, 0x53, 0x5b, 0x5d, 0x51, 0x54, 0x5c, 0x8f, 0x54, 0x56, 0x58, 0x52, + 0x4f, 0x5b, 0x59, 0x03, 0x8b, 0x54, 0x56, 0x58, 0x52, 0x51, 0x59, 0x58, + 0x00, 0x02, 0x00, 0x3f, 0xfe, 0xf8, 0x01, 0xd3, 0x04, 0x73, 0x00, 0x06, + 0x00, 0x12, 0x00, 0x28, 0x40, 0x13, 0x0d, 0x07, 0x07, 0x13, 0x03, 0x04, + 0x06, 0x01, 0x06, 0x06, 0x13, 0x0a, 0x10, 0x54, 0x59, 0x0a, 0x10, 0x04, + 0x06, 0x00, 0x2f, 0xc6, 0x3f, 0x2b, 0x11, 0x01, 0x33, 0x11, 0x33, 0x10, + 0xc2, 0x32, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x25, 0x17, 0x06, 0x03, + 0x23, 0x12, 0x37, 0x03, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, + 0x23, 0x22, 0x26, 0x01, 0xbc, 0x0f, 0x34, 0x7c, 0xdc, 0x41, 0x24, 0x2f, + 0x5a, 0x56, 0x53, 0x5b, 0x5d, 0x51, 0x54, 0x5c, 0xee, 0x17, 0xca, 0xfe, + 0xeb, 0x01, 0x0a, 0xec, 0x02, 0xdb, 0x54, 0x56, 0x58, 0x52, 0x51, 0x59, + 0x58, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x58, 0x00, 0xcb, 0x04, 0x39, + 0x05, 0x00, 0x00, 0x06, 0x00, 0x27, 0x40, 0x10, 0x05, 0x01, 0x04, 0x00, + 0x01, 0x00, 0x07, 0x08, 0x04, 0x03, 0x03, 0x06, 0x00, 0x02, 0x01, 0x05, + 0x00, 0x3d, 0x2f, 0x33, 0x33, 0x33, 0x32, 0x33, 0x11, 0x33, 0x11, 0x12, + 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x25, 0x01, 0x35, + 0x01, 0x15, 0x09, 0x01, 0x04, 0x39, 0xfc, 0x1f, 0x03, 0xe1, 0xfd, 0x54, + 0x02, 0xac, 0xcb, 0x01, 0xb6, 0x8f, 0x01, 0xf0, 0xf0, 0xfe, 0xc3, 0xfe, + 0xe7, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x58, 0x01, 0xa2, 0x04, 0x39, + 0x04, 0x00, 0x00, 0x03, 0x00, 0x07, 0x00, 0x24, 0x40, 0x11, 0x07, 0x03, + 0x03, 0x09, 0x04, 0x00, 0x08, 0x05, 0x50, 0x04, 0x60, 0x04, 0x02, 0x04, + 0x04, 0x00, 0x01, 0x00, 0x2f, 0x33, 0x33, 0x2f, 0x5d, 0x33, 0x11, 0x01, + 0x33, 0x32, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, 0x35, 0x21, 0x15, + 0x01, 0x35, 0x21, 0x15, 0x58, 0x03, 0xe1, 0xfc, 0x1f, 0x03, 0xe1, 0x03, + 0x25, 0xdb, 0xdb, 0xfe, 0x7d, 0xdb, 0xdb, 0x00, 0x00, 0x01, 0x00, 0x58, + 0x00, 0xcb, 0x04, 0x39, 0x05, 0x00, 0x00, 0x06, 0x00, 0x2b, 0x40, 0x12, + 0x02, 0x00, 0x01, 0x05, 0x00, 0x05, 0x07, 0x08, 0x00, 0x06, 0x06, 0x01, + 0x02, 0x03, 0x03, 0x05, 0x04, 0x01, 0x00, 0x3d, 0x2f, 0x33, 0x33, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, + 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, 0x09, 0x01, 0x35, 0x01, 0x15, 0x01, + 0x58, 0x02, 0xac, 0xfd, 0x54, 0x03, 0xe1, 0xfc, 0x1f, 0x01, 0xba, 0x01, + 0x19, 0x01, 0x3d, 0xf0, 0xfe, 0x10, 0x8f, 0xfe, 0x4a, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x06, 0xff, 0xe5, 0x03, 0xa0, 0x05, 0xcb, 0x00, 0x19, + 0x00, 0x25, 0x00, 0x44, 0x40, 0x22, 0x20, 0x1a, 0x1a, 0x19, 0x00, 0x00, + 0x0d, 0x07, 0x07, 0x12, 0x0d, 0x12, 0x26, 0x27, 0x0f, 0x00, 0x01, 0x09, + 0x03, 0x00, 0x00, 0x23, 0x23, 0x1d, 0x54, 0x59, 0x23, 0x13, 0x0f, 0x0a, + 0x4f, 0x59, 0x0f, 0x04, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, + 0x00, 0x33, 0x18, 0x2f, 0x5f, 0x5e, 0x5d, 0x11, 0x12, 0x01, 0x39, 0x39, + 0x11, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, + 0x01, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x01, 0x35, 0x34, 0x26, 0x23, 0x22, + 0x07, 0x27, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x01, + 0x1d, 0x01, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, + 0x22, 0x26, 0x01, 0x14, 0x52, 0x6d, 0x69, 0x43, 0x60, 0x56, 0x96, 0xc0, + 0x6d, 0xdf, 0xfa, 0xce, 0xf3, 0x64, 0x8c, 0x60, 0x33, 0xfe, 0xd7, 0x5a, + 0x56, 0x53, 0x5b, 0x5c, 0x52, 0x54, 0x5c, 0x01, 0xe5, 0x4a, 0x60, 0x8e, + 0x50, 0x4b, 0x5e, 0x3a, 0x41, 0x44, 0x62, 0xdb, 0x7d, 0xc6, 0xa5, 0x6e, + 0xa0, 0x64, 0x47, 0x4a, 0x3c, 0x3c, 0xfe, 0xaa, 0x54, 0x56, 0x58, 0x52, + 0x4f, 0x5b, 0x59, 0x00, 0x00, 0x02, 0x00, 0x66, 0xff, 0x66, 0x06, 0xc7, + 0x05, 0xc9, 0x00, 0x34, 0x00, 0x3f, 0x00, 0x59, 0x40, 0x2b, 0x07, 0x39, + 0x39, 0x14, 0x14, 0x13, 0x35, 0x35, 0x0d, 0x3b, 0x13, 0x28, 0x13, 0x0d, + 0x03, 0x21, 0x19, 0x21, 0x2d, 0x19, 0x00, 0x2d, 0x00, 0x40, 0x41, 0x16, + 0x08, 0x37, 0x37, 0x04, 0x0a, 0x3d, 0x10, 0x0a, 0x10, 0x0a, 0x10, 0x2a, + 0x1d, 0x31, 0x04, 0x24, 0x2a, 0x00, 0x2f, 0x33, 0x3f, 0x33, 0x12, 0x39, + 0x39, 0x2f, 0x2f, 0x11, 0x33, 0x11, 0x33, 0x33, 0x11, 0x33, 0x33, 0x11, + 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x17, 0x39, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x12, 0x39, 0x31, + 0x30, 0x01, 0x14, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x27, 0x23, 0x06, 0x23, + 0x22, 0x26, 0x35, 0x34, 0x00, 0x33, 0x32, 0x16, 0x17, 0x03, 0x14, 0x33, + 0x32, 0x36, 0x35, 0x34, 0x2e, 0x01, 0x23, 0x22, 0x04, 0x02, 0x15, 0x10, + 0x00, 0x21, 0x32, 0x36, 0x37, 0x15, 0x06, 0x21, 0x20, 0x00, 0x11, 0x34, + 0x12, 0x24, 0x21, 0x32, 0x04, 0x12, 0x01, 0x14, 0x33, 0x32, 0x36, 0x3f, + 0x01, 0x26, 0x23, 0x22, 0x06, 0x06, 0xc7, 0x5c, 0xa8, 0x6f, 0x4a, 0x72, + 0x19, 0x10, 0x6c, 0xa7, 0xb1, 0xcc, 0x01, 0x0c, 0xd8, 0x56, 0xcf, 0x43, + 0x17, 0x4c, 0x40, 0x4c, 0x86, 0xf3, 0x9c, 0xca, 0xfe, 0xd6, 0x9f, 0x01, + 0x27, 0x01, 0x18, 0x6a, 0xfe, 0x7b, 0xd6, 0xfe, 0xfb, 0xfe, 0x84, 0xfe, + 0x57, 0xd9, 0x01, 0x91, 0x01, 0x05, 0xdc, 0x01, 0x5a, 0xbc, 0xfc, 0x00, + 0xac, 0x5a, 0x5e, 0x0a, 0x0d, 0x33, 0x40, 0x7d, 0x8b, 0x02, 0xf0, 0x90, + 0xef, 0x88, 0x47, 0x3a, 0x81, 0xd5, 0xb9, 0xd3, 0x01, 0x02, 0x21, 0x17, + 0xfe, 0x17, 0x8b, 0xbb, 0x97, 0xa1, 0xf7, 0x82, 0xa6, 0xfe, 0xc7, 0xcd, + 0xfe, 0xec, 0xfe, 0xd9, 0x2f, 0x2d, 0xc0, 0x5b, 0x01, 0x90, 0x01, 0x64, + 0xf7, 0x01, 0x93, 0xe5, 0xb4, 0xfe, 0xb4, 0xfe, 0xaa, 0xd3, 0x7f, 0x8f, + 0xdd, 0x0b, 0x9c, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x05, 0x85, + 0x05, 0xbc, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x43, 0x40, 0x21, 0x02, 0x0d, + 0x03, 0x08, 0x01, 0x00, 0x06, 0x05, 0x0b, 0x0b, 0x03, 0x00, 0x00, 0x07, + 0x07, 0x0f, 0x03, 0x04, 0x04, 0x0e, 0x0d, 0x02, 0x4c, 0x59, 0x0d, 0x0d, + 0x03, 0x0b, 0x05, 0x03, 0x00, 0x03, 0x12, 0x00, 0x3f, 0x33, 0x3f, 0x33, + 0x12, 0x39, 0x2f, 0x2b, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, + 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x33, 0x12, 0x39, 0x39, 0x12, 0x39, + 0x39, 0x31, 0x30, 0x21, 0x03, 0x21, 0x03, 0x21, 0x01, 0x21, 0x09, 0x01, + 0x02, 0x26, 0x27, 0x06, 0x03, 0x04, 0x37, 0x6a, 0xfd, 0xeb, 0x6a, 0xfe, + 0xb2, 0x02, 0x04, 0x01, 0x7b, 0x02, 0x06, 0xfd, 0xfe, 0x93, 0x25, 0x08, + 0x21, 0x9c, 0x01, 0x5c, 0xfe, 0xa4, 0x05, 0xbc, 0xfa, 0x44, 0x02, 0x60, + 0x01, 0xd9, 0x7c, 0x24, 0x80, 0xfe, 0x07, 0x00, 0x00, 0x03, 0x00, 0xb8, + 0x00, 0x00, 0x04, 0xf4, 0x05, 0xb6, 0x00, 0x0f, 0x00, 0x18, 0x00, 0x20, + 0x00, 0x56, 0x40, 0x2c, 0x07, 0x14, 0x14, 0x04, 0x04, 0x1a, 0x1e, 0x0b, + 0x0b, 0x22, 0x10, 0x1a, 0x1a, 0x0f, 0x0f, 0x21, 0x08, 0x10, 0x19, 0x10, + 0x19, 0x4d, 0x59, 0x0c, 0x10, 0x01, 0x0d, 0x03, 0x10, 0x10, 0x0f, 0x00, + 0x0f, 0x1a, 0x4c, 0x59, 0x0f, 0x12, 0x00, 0x18, 0x4c, 0x59, 0x00, 0x03, + 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, + 0x2f, 0x5f, 0x5e, 0x5d, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x11, 0x01, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x12, 0x39, 0x11, 0x33, + 0x12, 0x39, 0x31, 0x30, 0x13, 0x21, 0x20, 0x04, 0x15, 0x14, 0x06, 0x07, + 0x15, 0x1e, 0x01, 0x15, 0x14, 0x04, 0x23, 0x21, 0x01, 0x33, 0x32, 0x36, + 0x35, 0x34, 0x26, 0x2b, 0x01, 0x19, 0x01, 0x33, 0x32, 0x36, 0x35, 0x34, + 0x21, 0xb8, 0x01, 0xc7, 0x01, 0x37, 0x01, 0x19, 0x7b, 0x66, 0x8b, 0x7b, + 0xfe, 0xdf, 0xf8, 0xfd, 0xdd, 0x01, 0x36, 0xb4, 0x7e, 0x71, 0x7b, 0x85, + 0xa3, 0xca, 0x80, 0x7a, 0xfe, 0xfc, 0x05, 0xb6, 0xb1, 0xc1, 0x83, 0xa8, + 0x11, 0x0a, 0x1f, 0xaa, 0x8d, 0xc8, 0xe0, 0x03, 0x73, 0x4e, 0x5a, 0x54, + 0x49, 0xfd, 0xc5, 0xfe, 0x83, 0x62, 0x65, 0xb6, 0x00, 0x01, 0x00, 0x77, + 0xff, 0xec, 0x04, 0xd1, 0x05, 0xcb, 0x00, 0x16, 0x00, 0x31, 0x40, 0x18, + 0x07, 0x13, 0x13, 0x18, 0x03, 0x0d, 0x0d, 0x17, 0x14, 0x00, 0x11, 0x00, + 0x4c, 0x59, 0x11, 0x04, 0x07, 0x05, 0x0a, 0x05, 0x4c, 0x59, 0x0a, 0x13, + 0x00, 0x3f, 0x2b, 0x11, 0x00, 0x33, 0x18, 0x3f, 0x2b, 0x11, 0x00, 0x33, + 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, + 0x22, 0x02, 0x15, 0x10, 0x21, 0x32, 0x37, 0x11, 0x06, 0x23, 0x20, 0x00, + 0x11, 0x34, 0x12, 0x24, 0x33, 0x32, 0x17, 0x07, 0x2e, 0x01, 0x03, 0x25, + 0xaf, 0xc0, 0x01, 0x6f, 0x9a, 0xdb, 0xb4, 0xde, 0xfe, 0xc1, 0xfe, 0xae, + 0xa6, 0x01, 0x37, 0xd1, 0xd5, 0xd7, 0x64, 0x52, 0xa6, 0x04, 0xc9, 0xfe, + 0xf9, 0xeb, 0xfe, 0x17, 0x4d, 0xfe, 0xfc, 0x4b, 0x01, 0x83, 0x01, 0x6a, + 0xe4, 0x01, 0x57, 0xb7, 0x67, 0xfc, 0x27, 0x3a, 0x00, 0x02, 0x00, 0xb8, + 0x00, 0x00, 0x05, 0x75, 0x05, 0xb6, 0x00, 0x08, 0x00, 0x0f, 0x00, 0x28, + 0x40, 0x14, 0x09, 0x00, 0x00, 0x11, 0x0d, 0x04, 0x04, 0x10, 0x05, 0x0c, + 0x4c, 0x59, 0x05, 0x03, 0x04, 0x0d, 0x4c, 0x59, 0x04, 0x12, 0x00, 0x3f, + 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x01, 0x10, 0x00, 0x29, 0x01, 0x11, 0x21, 0x20, + 0x00, 0x01, 0x10, 0x21, 0x23, 0x11, 0x33, 0x20, 0x05, 0x75, 0xfe, 0x65, + 0xfe, 0x7c, 0xfe, 0x62, 0x01, 0xcb, 0x01, 0x66, 0x01, 0x8c, 0xfe, 0xbe, + 0xfe, 0x60, 0xa5, 0x85, 0x01, 0xc0, 0x02, 0xe9, 0xfe, 0x97, 0xfe, 0x80, + 0x05, 0xb6, 0xfe, 0x86, 0xfe, 0xa5, 0x01, 0xd7, 0xfc, 0x48, 0x00, 0x00, + 0x00, 0x01, 0x00, 0xb8, 0x00, 0x00, 0x04, 0x02, 0x05, 0xb6, 0x00, 0x0b, + 0x00, 0x45, 0x40, 0x24, 0x08, 0x04, 0x00, 0x00, 0x0d, 0x06, 0x0a, 0x0a, + 0x01, 0x01, 0x0c, 0x06, 0x09, 0x4c, 0x59, 0x0c, 0x06, 0x01, 0x0d, 0x03, + 0x06, 0x06, 0x01, 0x02, 0x02, 0x05, 0x4c, 0x59, 0x02, 0x03, 0x01, 0x0a, + 0x4c, 0x59, 0x01, 0x12, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, + 0x12, 0x00, 0x39, 0x18, 0x2f, 0x5f, 0x5e, 0x5d, 0x2b, 0x11, 0x01, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x33, 0x31, 0x30, 0x29, + 0x01, 0x11, 0x21, 0x15, 0x21, 0x11, 0x21, 0x15, 0x21, 0x11, 0x21, 0x04, + 0x02, 0xfc, 0xb6, 0x03, 0x4a, 0xfd, 0xec, 0x01, 0xef, 0xfe, 0x11, 0x02, + 0x14, 0x05, 0xb6, 0xfe, 0xfe, 0xbf, 0xfe, 0xfe, 0x87, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0xb8, 0x00, 0x00, 0x03, 0xfe, 0x05, 0xb6, 0x00, 0x09, + 0x00, 0x34, 0x40, 0x1a, 0x08, 0x03, 0x03, 0x0b, 0x06, 0x00, 0x00, 0x01, + 0x01, 0x0a, 0x06, 0x09, 0x4c, 0x59, 0x06, 0x06, 0x01, 0x02, 0x02, 0x05, + 0x4c, 0x59, 0x02, 0x03, 0x01, 0x12, 0x00, 0x3f, 0x3f, 0x2b, 0x11, 0x12, + 0x00, 0x39, 0x18, 0x2f, 0x2b, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x29, 0x01, 0x11, 0x21, 0x15, 0x21, + 0x11, 0x21, 0x15, 0x21, 0x01, 0xe9, 0xfe, 0xcf, 0x03, 0x46, 0xfd, 0xeb, + 0x01, 0xf0, 0xfe, 0x10, 0x05, 0xb6, 0xfe, 0xfe, 0x87, 0xfd, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x77, 0xff, 0xec, 0x05, 0x27, 0x05, 0xcb, 0x00, 0x1a, + 0x00, 0x4c, 0x40, 0x27, 0x1a, 0x18, 0x18, 0x02, 0x0e, 0x0d, 0x0d, 0x02, + 0x02, 0x13, 0x1c, 0x13, 0x08, 0x08, 0x1b, 0x0e, 0x10, 0x0b, 0x10, 0x4c, + 0x59, 0x00, 0x1a, 0x4c, 0x59, 0x00, 0x00, 0x05, 0x0b, 0x04, 0x18, 0x16, + 0x05, 0x16, 0x4c, 0x59, 0x02, 0x05, 0x13, 0x00, 0x3f, 0x33, 0x2b, 0x11, + 0x00, 0x33, 0x18, 0x3f, 0x12, 0x39, 0x2f, 0x2b, 0x2b, 0x11, 0x00, 0x33, + 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x33, 0x11, 0x39, 0x31, 0x30, 0x01, 0x21, 0x11, 0x0e, 0x01, 0x23, + 0x20, 0x00, 0x11, 0x10, 0x00, 0x21, 0x32, 0x17, 0x07, 0x26, 0x23, 0x22, + 0x02, 0x15, 0x14, 0x16, 0x33, 0x32, 0x37, 0x11, 0x21, 0x02, 0xe3, 0x02, + 0x44, 0x8d, 0xf9, 0x82, 0xfe, 0xb5, 0xfe, 0xa3, 0x01, 0x95, 0x01, 0x67, + 0xe1, 0xd1, 0x67, 0xa0, 0xad, 0xc9, 0xf2, 0xc3, 0xba, 0x61, 0x64, 0xfe, + 0xeb, 0x03, 0x35, 0xfd, 0x0a, 0x2e, 0x25, 0x01, 0x85, 0x01, 0x6c, 0x01, + 0x62, 0x01, 0x8c, 0x5a, 0xf8, 0x50, 0xfe, 0xf2, 0xe4, 0xee, 0xfb, 0x14, + 0x01, 0x31, 0x00, 0x00, 0x00, 0x01, 0x00, 0xb8, 0x00, 0x00, 0x05, 0x66, + 0x05, 0xb6, 0x00, 0x0b, 0x00, 0x37, 0x40, 0x1c, 0x09, 0x01, 0x01, 0x00, + 0x00, 0x0d, 0x08, 0x04, 0x04, 0x05, 0x05, 0x0c, 0x08, 0x03, 0x4c, 0x59, + 0x4c, 0x08, 0x01, 0x08, 0x08, 0x05, 0x0a, 0x06, 0x03, 0x01, 0x05, 0x12, + 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x12, 0x39, 0x2f, 0x5d, 0x2b, 0x11, 0x01, + 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, + 0x30, 0x29, 0x01, 0x11, 0x21, 0x11, 0x21, 0x11, 0x21, 0x11, 0x21, 0x11, + 0x21, 0x05, 0x66, 0xfe, 0xcb, 0xfd, 0xbd, 0xfe, 0xca, 0x01, 0x36, 0x02, + 0x43, 0x01, 0x35, 0x02, 0x77, 0xfd, 0x89, 0x05, 0xb6, 0xfd, 0xc3, 0x02, + 0x3d, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xb8, 0x00, 0x00, 0x01, 0xee, + 0x05, 0xb6, 0x00, 0x03, 0x00, 0x11, 0xb6, 0x00, 0x04, 0x05, 0x01, 0x03, + 0x00, 0x12, 0x00, 0x3f, 0x3f, 0x11, 0x12, 0x01, 0x39, 0x31, 0x30, 0x33, + 0x11, 0x21, 0x11, 0xb8, 0x01, 0x36, 0x05, 0xb6, 0xfa, 0x4a, 0x00, 0x00, + 0x00, 0x01, 0xff, 0x68, 0xfe, 0x52, 0x01, 0xee, 0x05, 0xb6, 0x00, 0x0d, + 0x00, 0x1f, 0x40, 0x0e, 0x0b, 0x02, 0x08, 0x08, 0x0e, 0x03, 0x05, 0x00, + 0x05, 0x4c, 0x59, 0x00, 0x09, 0x03, 0x00, 0x3f, 0xc4, 0x2b, 0x11, 0x00, + 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, 0x33, 0x31, 0x30, 0x13, 0x22, 0x27, + 0x11, 0x16, 0x33, 0x32, 0x36, 0x35, 0x11, 0x21, 0x11, 0x10, 0x02, 0x1f, + 0x69, 0x4e, 0x50, 0x42, 0x66, 0x58, 0x01, 0x36, 0xea, 0xfe, 0x52, 0x16, + 0x01, 0x02, 0x14, 0x7f, 0x87, 0x05, 0x5a, 0xfa, 0xa8, 0xff, 0x00, 0xfe, + 0xf4, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xb8, 0x00, 0x00, 0x05, 0x50, + 0x05, 0xb6, 0x00, 0x0c, 0x00, 0x42, 0x40, 0x1f, 0x0c, 0x02, 0x02, 0x0a, + 0x0b, 0x0b, 0x01, 0x00, 0x00, 0x0e, 0x08, 0x03, 0x05, 0x05, 0x0d, 0x0c, + 0x02, 0x02, 0x03, 0x0b, 0x0b, 0x06, 0x03, 0x08, 0x08, 0x05, 0x06, 0x03, + 0x01, 0x05, 0x12, 0x00, 0x3f, 0x33, 0x3f, 0x12, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, 0x32, + 0x11, 0x33, 0x11, 0x33, 0x33, 0x11, 0x33, 0x39, 0x11, 0x33, 0x31, 0x30, + 0x29, 0x01, 0x01, 0x07, 0x11, 0x21, 0x11, 0x21, 0x11, 0x37, 0x01, 0x21, + 0x01, 0x05, 0x50, 0xfe, 0xa0, 0xfe, 0x81, 0x83, 0xfe, 0xca, 0x01, 0x36, + 0x7a, 0x01, 0x8c, 0x01, 0x58, 0xfe, 0x02, 0x02, 0x68, 0x5e, 0xfd, 0xf6, + 0x05, 0xb6, 0xfd, 0x63, 0xac, 0x01, 0xf1, 0xfd, 0x79, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0xb8, 0x00, 0x00, 0x04, 0x3f, 0x05, 0xb6, 0x00, 0x05, + 0x00, 0x1f, 0x40, 0x0e, 0x04, 0x07, 0x03, 0x00, 0x00, 0x06, 0x01, 0x03, + 0x00, 0x03, 0x4c, 0x59, 0x00, 0x12, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, + 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x33, 0x11, 0x21, + 0x11, 0x21, 0x11, 0xb8, 0x01, 0x36, 0x02, 0x51, 0x05, 0xb6, 0xfb, 0x4a, + 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xb8, 0x00, 0x00, 0x06, 0xd3, + 0x05, 0xb6, 0x00, 0x14, 0x00, 0x3a, 0x40, 0x1c, 0x14, 0x00, 0x09, 0x0b, + 0x09, 0x08, 0x03, 0x05, 0x0e, 0x0e, 0x0d, 0x0d, 0x16, 0x05, 0x06, 0x15, + 0x12, 0x02, 0x09, 0x02, 0x06, 0x0b, 0x07, 0x03, 0x0e, 0x00, 0x06, 0x12, + 0x00, 0x3f, 0x33, 0x33, 0x3f, 0x33, 0x12, 0x39, 0x39, 0x11, 0x33, 0x11, + 0x01, 0x33, 0x32, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x17, 0x39, 0x11, + 0x33, 0x33, 0x31, 0x30, 0x21, 0x01, 0x23, 0x12, 0x15, 0x11, 0x21, 0x11, + 0x21, 0x01, 0x33, 0x01, 0x21, 0x11, 0x21, 0x11, 0x34, 0x36, 0x13, 0x23, + 0x01, 0x03, 0x23, 0xfe, 0xa0, 0x09, 0x13, 0xfe, 0xeb, 0x01, 0xa6, 0x01, + 0x5a, 0x06, 0x01, 0x6f, 0x01, 0xa6, 0xfe, 0xdf, 0x03, 0x0c, 0x09, 0xfe, + 0x87, 0x04, 0x7b, 0xfe, 0xa2, 0x75, 0xfd, 0x58, 0x05, 0xb6, 0xfb, 0xa2, + 0x04, 0x5e, 0xfa, 0x4a, 0x02, 0xb4, 0x31, 0x80, 0x01, 0x14, 0xfb, 0x87, + 0x00, 0x01, 0x00, 0xb8, 0x00, 0x00, 0x05, 0xc9, 0x05, 0xb6, 0x00, 0x0f, + 0x00, 0x36, 0x40, 0x19, 0x0a, 0x00, 0x09, 0x01, 0x06, 0x0d, 0x0d, 0x00, + 0x00, 0x11, 0x03, 0x05, 0x06, 0x06, 0x07, 0x10, 0x0b, 0x03, 0x07, 0x0e, + 0x08, 0x03, 0x01, 0x07, 0x12, 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x12, 0x39, + 0x39, 0x11, 0x01, 0x33, 0x32, 0x11, 0x33, 0x39, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x12, 0x39, 0x39, 0x12, 0x39, 0x31, 0x30, 0x29, 0x01, 0x01, 0x23, + 0x12, 0x15, 0x11, 0x21, 0x11, 0x21, 0x01, 0x33, 0x02, 0x35, 0x11, 0x21, + 0x05, 0xc9, 0xfe, 0x76, 0xfd, 0x84, 0x09, 0x13, 0xfe, 0xeb, 0x01, 0x87, + 0x02, 0x7b, 0x07, 0x0f, 0x01, 0x17, 0x04, 0x52, 0xfe, 0xdb, 0x7d, 0xfd, + 0x50, 0x05, 0xb6, 0xfb, 0xb9, 0x01, 0x1d, 0x76, 0x02, 0xb4, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x77, 0xff, 0xec, 0x05, 0xe7, 0x05, 0xcd, 0x00, 0x0b, + 0x00, 0x15, 0x00, 0x28, 0x40, 0x14, 0x11, 0x00, 0x00, 0x17, 0x0c, 0x06, + 0x06, 0x16, 0x09, 0x13, 0x4c, 0x59, 0x09, 0x04, 0x03, 0x0f, 0x4c, 0x59, + 0x03, 0x13, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x01, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x10, 0x00, 0x21, + 0x20, 0x00, 0x11, 0x10, 0x00, 0x21, 0x20, 0x00, 0x01, 0x14, 0x16, 0x33, + 0x20, 0x11, 0x10, 0x21, 0x22, 0x06, 0x05, 0xe7, 0xfe, 0x98, 0xfe, 0xb0, + 0xfe, 0xb0, 0xfe, 0x98, 0x01, 0x69, 0x01, 0x51, 0x01, 0x51, 0x01, 0x65, + 0xfb, 0xd5, 0xba, 0xb9, 0x01, 0x73, 0xfe, 0x8f, 0xb9, 0xbc, 0x02, 0xdd, + 0xfe, 0x95, 0xfe, 0x7a, 0x01, 0x86, 0x01, 0x6d, 0x01, 0x6d, 0x01, 0x81, + 0xfe, 0x7c, 0xfe, 0x94, 0xf5, 0xf8, 0x01, 0xed, 0x01, 0xee, 0xf9, 0x00, + 0x00, 0x02, 0x00, 0xb8, 0x00, 0x00, 0x04, 0xaa, 0x05, 0xb6, 0x00, 0x08, + 0x00, 0x13, 0x00, 0x34, 0x40, 0x1a, 0x04, 0x09, 0x09, 0x15, 0x00, 0x0e, + 0x0e, 0x0f, 0x0f, 0x14, 0x0d, 0x00, 0x4c, 0x59, 0x0d, 0x0d, 0x0f, 0x10, + 0x10, 0x08, 0x4c, 0x59, 0x10, 0x03, 0x0f, 0x12, 0x00, 0x3f, 0x3f, 0x2b, + 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x2b, 0x11, 0x01, 0x33, 0x11, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x33, 0x32, 0x36, + 0x35, 0x34, 0x26, 0x2b, 0x01, 0x05, 0x14, 0x04, 0x21, 0x23, 0x11, 0x21, + 0x11, 0x21, 0x20, 0x04, 0x01, 0xee, 0x66, 0x8f, 0x8e, 0x77, 0x7f, 0x8d, + 0x02, 0xbc, 0xfe, 0xd9, 0xfe, 0xf0, 0x85, 0xfe, 0xca, 0x01, 0xd3, 0x01, + 0x0a, 0x01, 0x15, 0x03, 0x06, 0x71, 0x6c, 0x6d, 0x68, 0xca, 0xec, 0xfa, + 0xfd, 0xf8, 0x05, 0xb6, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x77, + 0xfe, 0xa4, 0x05, 0xe7, 0x05, 0xcd, 0x00, 0x0f, 0x00, 0x19, 0x00, 0x42, + 0x40, 0x22, 0x06, 0x03, 0x05, 0x04, 0x04, 0x02, 0x03, 0x08, 0x04, 0x0a, + 0x15, 0x00, 0x00, 0x1b, 0x10, 0x0a, 0x0a, 0x1a, 0x03, 0x07, 0x0d, 0x0d, + 0x17, 0x4c, 0x59, 0x0d, 0x04, 0x07, 0x13, 0x4c, 0x59, 0x05, 0x07, 0x13, + 0x00, 0x3f, 0xc6, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, + 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x12, 0x17, 0x39, + 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x10, 0x02, 0x07, 0x01, 0x21, + 0x01, 0x23, 0x20, 0x00, 0x11, 0x10, 0x00, 0x21, 0x20, 0x00, 0x01, 0x14, + 0x16, 0x33, 0x20, 0x11, 0x10, 0x21, 0x22, 0x06, 0x05, 0xe7, 0xb7, 0xb1, + 0x01, 0x60, 0xfe, 0x73, 0xfe, 0xf4, 0x17, 0xfe, 0xb0, 0xfe, 0x98, 0x01, + 0x69, 0x01, 0x51, 0x01, 0x51, 0x01, 0x65, 0xfb, 0xd5, 0xba, 0xb9, 0x01, + 0x73, 0xfe, 0x8f, 0xb9, 0xbc, 0x02, 0xdd, 0xfe, 0xfe, 0xfe, 0xa3, 0x51, + 0xfe, 0x77, 0x01, 0x48, 0x01, 0x86, 0x01, 0x6d, 0x01, 0x6d, 0x01, 0x81, + 0xfe, 0x7c, 0xfe, 0x94, 0xf5, 0xf8, 0x01, 0xed, 0x01, 0xee, 0xf9, 0x00, + 0x00, 0x02, 0x00, 0xb8, 0x00, 0x00, 0x05, 0x48, 0x05, 0xb6, 0x00, 0x08, + 0x00, 0x17, 0x00, 0x4e, 0x40, 0x26, 0x13, 0x17, 0x17, 0x04, 0x0a, 0x04, + 0x10, 0x10, 0x0a, 0x16, 0x15, 0x19, 0x00, 0x0a, 0x0a, 0x0b, 0x0b, 0x18, + 0x13, 0x09, 0x0c, 0x00, 0x09, 0x4d, 0x59, 0x00, 0x00, 0x0b, 0x0c, 0x0c, + 0x08, 0x4c, 0x59, 0x0c, 0x03, 0x16, 0x0b, 0x12, 0x00, 0x3f, 0x33, 0x3f, + 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x2b, 0x11, 0x12, 0x00, 0x39, + 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x10, 0x18, 0xc4, 0x32, 0x11, + 0x39, 0x11, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x31, 0x30, 0x01, 0x33, + 0x32, 0x36, 0x35, 0x34, 0x26, 0x2b, 0x01, 0x19, 0x01, 0x21, 0x11, 0x21, + 0x20, 0x04, 0x15, 0x14, 0x06, 0x07, 0x00, 0x17, 0x21, 0x01, 0x01, 0xee, + 0x64, 0x93, 0x8c, 0x8f, 0x96, 0x5e, 0xfe, 0xca, 0x01, 0xaa, 0x01, 0x2a, + 0x01, 0x1e, 0x8e, 0x82, 0x01, 0x4a, 0x64, 0xfe, 0xa8, 0xfe, 0xa3, 0x03, + 0x2d, 0x62, 0x69, 0x68, 0x58, 0xfd, 0x79, 0xfd, 0xcf, 0x05, 0xb6, 0xd9, + 0xdd, 0x81, 0xc9, 0x39, 0xfe, 0x13, 0x90, 0x02, 0x31, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x5e, 0xff, 0xec, 0x04, 0x17, 0x05, 0xcb, 0x00, 0x27, + 0x00, 0x45, 0x40, 0x22, 0x1b, 0x1a, 0x1a, 0x21, 0x00, 0x21, 0x05, 0x14, + 0x0c, 0x00, 0x14, 0x00, 0x28, 0x29, 0x14, 0x21, 0x00, 0x0c, 0x21, 0x0c, + 0x1e, 0x09, 0x17, 0x1e, 0x4c, 0x59, 0x17, 0x04, 0x03, 0x09, 0x4c, 0x59, + 0x03, 0x13, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, + 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, + 0x33, 0x11, 0x33, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x31, 0x30, 0x01, + 0x14, 0x04, 0x23, 0x22, 0x27, 0x11, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x35, + 0x34, 0x2e, 0x01, 0x27, 0x2e, 0x02, 0x35, 0x34, 0x24, 0x33, 0x32, 0x16, + 0x17, 0x07, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x15, 0x14, 0x1e, 0x01, 0x17, + 0x1e, 0x01, 0x04, 0x17, 0xfe, 0xe3, 0xfe, 0xea, 0xb4, 0x94, 0xcd, 0x55, + 0x66, 0x6d, 0x30, 0x5d, 0x8f, 0x86, 0x86, 0x50, 0x01, 0x07, 0xe8, 0x72, + 0xcf, 0x71, 0x64, 0x75, 0x99, 0x4a, 0x58, 0x5e, 0x26, 0x53, 0x9b, 0xcd, + 0x98, 0x01, 0x96, 0xc6, 0xe4, 0x58, 0x01, 0x20, 0x42, 0x36, 0x4e, 0x4d, + 0x2b, 0x43, 0x3e, 0x44, 0x3f, 0x74, 0x9a, 0x67, 0xc2, 0xde, 0x36, 0x31, + 0xf1, 0x30, 0x26, 0x52, 0x42, 0x29, 0x3d, 0x39, 0x4a, 0x62, 0xc5, 0x00, + 0x00, 0x01, 0x00, 0x29, 0x00, 0x00, 0x04, 0x79, 0x05, 0xb6, 0x00, 0x07, + 0x00, 0x26, 0x40, 0x12, 0x06, 0x00, 0x00, 0x03, 0x01, 0x01, 0x08, 0x09, + 0x07, 0x03, 0x04, 0x03, 0x4c, 0x59, 0x04, 0x03, 0x01, 0x12, 0x00, 0x3f, + 0x3f, 0x2b, 0x11, 0x00, 0x33, 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x29, 0x01, 0x11, 0x21, 0x11, 0x21, 0x11, 0x21, + 0x02, 0xec, 0xfe, 0xca, 0xfe, 0x73, 0x04, 0x50, 0xfe, 0x73, 0x04, 0xb4, + 0x01, 0x02, 0xfe, 0xfe, 0x00, 0x01, 0x00, 0xae, 0xff, 0xec, 0x05, 0x5e, + 0x05, 0xb6, 0x00, 0x12, 0x00, 0x25, 0x40, 0x11, 0x11, 0x01, 0x01, 0x14, + 0x0b, 0x08, 0x08, 0x13, 0x12, 0x09, 0x03, 0x05, 0x0e, 0x4c, 0x59, 0x05, + 0x13, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x33, 0x11, 0x01, 0x33, 0x11, + 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x11, 0x14, 0x06, 0x04, + 0x23, 0x20, 0x00, 0x35, 0x11, 0x21, 0x11, 0x14, 0x16, 0x33, 0x32, 0x36, + 0x35, 0x11, 0x05, 0x5e, 0x91, 0xfe, 0xee, 0xbb, 0xfe, 0xe6, 0xfe, 0xc8, + 0x01, 0x35, 0x88, 0x9d, 0x98, 0x89, 0x05, 0xb6, 0xfc, 0x4e, 0xa2, 0xf4, + 0x82, 0x01, 0x21, 0xfb, 0x03, 0xae, 0xfc, 0x81, 0xa9, 0x9e, 0x9f, 0xaa, + 0x03, 0x7d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0x33, + 0x05, 0xb6, 0x00, 0x0b, 0x00, 0x2a, 0x40, 0x13, 0x03, 0x02, 0x09, 0x09, + 0x05, 0x00, 0x01, 0x01, 0x0d, 0x05, 0x04, 0x04, 0x0c, 0x00, 0x04, 0x03, + 0x09, 0x03, 0x12, 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x11, 0x01, 0x33, 0x11, + 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x39, 0x11, 0x33, 0x33, 0x31, 0x30, + 0x01, 0x21, 0x01, 0x21, 0x01, 0x21, 0x01, 0x1e, 0x01, 0x17, 0x36, 0x37, + 0x03, 0xfa, 0x01, 0x39, 0xfe, 0x0f, 0xfe, 0xae, 0xfe, 0x10, 0x01, 0x39, + 0x01, 0x13, 0x17, 0x31, 0x06, 0x0b, 0x40, 0x05, 0xb6, 0xfa, 0x4a, 0x05, + 0xb6, 0xfc, 0x9a, 0x4d, 0xcd, 0x28, 0x5c, 0xe6, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x07, 0xbc, 0x05, 0xb6, 0x00, 0x1d, 0x00, 0x46, 0x40, 0x22, + 0x0a, 0x09, 0x0f, 0x14, 0x13, 0x05, 0x01, 0x00, 0x18, 0x18, 0x05, 0x0f, + 0x03, 0x0c, 0x1c, 0x1c, 0x1d, 0x1d, 0x1f, 0x0c, 0x0b, 0x0b, 0x1e, 0x1c, + 0x13, 0x05, 0x0b, 0x03, 0x18, 0x0f, 0x0f, 0x01, 0x0a, 0x12, 0x00, 0x3f, + 0x33, 0x33, 0x11, 0x33, 0x3f, 0x33, 0x33, 0x33, 0x11, 0x01, 0x33, 0x11, + 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x17, 0x39, 0x11, 0x33, 0x33, + 0x11, 0x33, 0x33, 0x11, 0x33, 0x33, 0x31, 0x30, 0x29, 0x01, 0x03, 0x26, + 0x02, 0x27, 0x0e, 0x01, 0x07, 0x03, 0x21, 0x01, 0x21, 0x13, 0x16, 0x17, + 0x3e, 0x01, 0x37, 0x13, 0x21, 0x13, 0x1e, 0x01, 0x17, 0x3e, 0x01, 0x37, + 0x13, 0x21, 0x06, 0x48, 0xfe, 0x9f, 0xc6, 0x0b, 0x35, 0x04, 0x06, 0x30, + 0x0d, 0xc5, 0xfe, 0xa0, 0xfe, 0x8b, 0x01, 0x31, 0xbb, 0x31, 0x16, 0x06, + 0x2b, 0x13, 0xd5, 0x01, 0x25, 0xd5, 0x0e, 0x2a, 0x0b, 0x0a, 0x2c, 0x12, + 0xba, 0x01, 0x31, 0x03, 0x00, 0x29, 0x01, 0x01, 0x2c, 0x36, 0xef, 0x33, + 0xfd, 0x02, 0x05, 0xb6, 0xfc, 0xe2, 0xdd, 0xa2, 0x39, 0xef, 0x42, 0x03, + 0x33, 0xfc, 0xcd, 0x37, 0xe2, 0x51, 0x4e, 0xe9, 0x48, 0x03, 0x1e, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x05, 0x56, 0x05, 0xb6, 0x00, 0x0b, + 0x00, 0x44, 0x40, 0x20, 0x0b, 0x05, 0x02, 0x08, 0x08, 0x07, 0x09, 0x07, + 0x06, 0x09, 0x0a, 0x06, 0x0a, 0x01, 0x00, 0x00, 0x0d, 0x03, 0x04, 0x0c, + 0x0b, 0x08, 0x02, 0x05, 0x05, 0x04, 0x09, 0x06, 0x03, 0x01, 0x04, 0x12, + 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x12, 0x39, 0x11, 0x33, 0x33, 0x33, 0x11, + 0x01, 0x33, 0x32, 0x11, 0x33, 0x11, 0x33, 0x39, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x33, 0x33, 0x31, 0x30, 0x29, 0x01, + 0x09, 0x01, 0x21, 0x09, 0x01, 0x21, 0x09, 0x01, 0x21, 0x01, 0x05, 0x56, + 0xfe, 0x9e, 0xfe, 0xac, 0xfe, 0xac, 0xfe, 0xb4, 0x01, 0xe5, 0xfe, 0x3a, + 0x01, 0x56, 0x01, 0x3b, 0x01, 0x35, 0x01, 0x4e, 0xfe, 0x35, 0x02, 0x29, + 0xfd, 0xd7, 0x02, 0xf2, 0x02, 0xc4, 0xfd, 0xf2, 0x02, 0x0e, 0xfd, 0x2b, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0xfe, 0x05, 0xb6, 0x00, 0x08, + 0x00, 0x36, 0x40, 0x19, 0x08, 0x07, 0x07, 0x05, 0x01, 0x02, 0x02, 0x00, + 0x04, 0x04, 0x05, 0x05, 0x09, 0x0a, 0x03, 0x06, 0x06, 0x00, 0x00, 0x05, + 0x01, 0x07, 0x03, 0x05, 0x12, 0x00, 0x3f, 0x3f, 0x33, 0x12, 0x39, 0x11, + 0x33, 0x11, 0x33, 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x12, 0x39, 0x32, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x09, 0x01, 0x21, 0x01, + 0x11, 0x21, 0x11, 0x01, 0x21, 0x02, 0x7f, 0x01, 0x31, 0x01, 0x4e, 0xfe, + 0x1b, 0xfe, 0xcc, 0xfe, 0x1b, 0x01, 0x50, 0x03, 0x5c, 0x02, 0x5a, 0xfc, + 0x83, 0xfd, 0xc7, 0x02, 0x2f, 0x03, 0x87, 0x00, 0x00, 0x01, 0x00, 0x31, + 0x00, 0x00, 0x04, 0x71, 0x05, 0xb6, 0x00, 0x09, 0x00, 0x3b, 0x40, 0x1d, + 0x08, 0x04, 0x01, 0x03, 0x07, 0x07, 0x00, 0x01, 0x00, 0x0a, 0x0b, 0x07, + 0x04, 0x05, 0x05, 0x04, 0x4c, 0x59, 0x05, 0x03, 0x02, 0x01, 0x08, 0x01, + 0x08, 0x4c, 0x59, 0x01, 0x12, 0x00, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, + 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x11, 0x12, 0x01, 0x39, 0x39, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x33, 0x31, 0x30, 0x29, 0x01, 0x35, + 0x01, 0x21, 0x11, 0x21, 0x15, 0x01, 0x21, 0x04, 0x71, 0xfb, 0xc0, 0x02, + 0xbd, 0xfd, 0x56, 0x04, 0x1a, 0xfd, 0x44, 0x02, 0xcf, 0xc9, 0x03, 0xed, + 0x01, 0x00, 0xc8, 0xfc, 0x12, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x8f, + 0xfe, 0xbc, 0x02, 0x73, 0x05, 0xb6, 0x00, 0x07, 0x00, 0x1e, 0x40, 0x0d, + 0x06, 0x01, 0x01, 0x08, 0x04, 0x00, 0x09, 0x05, 0x02, 0x03, 0x06, 0x01, + 0x24, 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x11, 0x01, 0x33, 0x32, 0x11, 0x39, + 0x11, 0x33, 0x31, 0x30, 0x01, 0x21, 0x11, 0x21, 0x15, 0x23, 0x11, 0x33, + 0x02, 0x73, 0xfe, 0x1c, 0x01, 0xe4, 0xe0, 0xe0, 0xfe, 0xbc, 0x06, 0xfa, + 0xd3, 0xfa, 0xac, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x00, 0x00, 0x03, 0x42, + 0x05, 0xb6, 0x00, 0x03, 0x00, 0x1c, 0x40, 0x0c, 0x00, 0x03, 0x03, 0x04, + 0x02, 0x01, 0x01, 0x05, 0x03, 0x03, 0x02, 0x12, 0x00, 0x3f, 0x3f, 0x11, + 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x09, 0x01, + 0x21, 0x01, 0x01, 0x21, 0x02, 0x21, 0xfe, 0xeb, 0xfd, 0xdf, 0x05, 0xb6, + 0xfa, 0x4a, 0x05, 0xb6, 0x00, 0x01, 0x00, 0x33, 0xfe, 0xbc, 0x02, 0x17, + 0x05, 0xb6, 0x00, 0x07, 0x00, 0x20, 0x40, 0x0e, 0x01, 0x06, 0x06, 0x09, + 0x03, 0x07, 0x07, 0x08, 0x00, 0x07, 0x24, 0x03, 0x04, 0x03, 0x00, 0x3f, + 0x33, 0x3f, 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, 0x12, 0x39, 0x11, 0x33, + 0x31, 0x30, 0x17, 0x33, 0x11, 0x23, 0x35, 0x21, 0x11, 0x21, 0x33, 0xdf, + 0xdf, 0x01, 0xe4, 0xfe, 0x1c, 0x71, 0x05, 0x54, 0xd3, 0xf9, 0x06, 0x00, + 0x00, 0x01, 0x00, 0x08, 0x02, 0x08, 0x04, 0x3d, 0x05, 0xbe, 0x00, 0x06, + 0x00, 0x2d, 0x40, 0x14, 0x02, 0x01, 0x05, 0x05, 0x06, 0x04, 0x04, 0x03, + 0x03, 0x08, 0x06, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x05, 0x02, 0x06, + 0x00, 0x3f, 0x33, 0x12, 0x39, 0x2f, 0x33, 0x01, 0x32, 0x11, 0x33, 0x11, + 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x33, 0x31, 0x30, 0x13, + 0x01, 0x33, 0x01, 0x23, 0x09, 0x01, 0x08, 0x01, 0xb6, 0x90, 0x01, 0xef, + 0xef, 0xfe, 0xbe, 0xfe, 0xe8, 0x02, 0x08, 0x03, 0xb6, 0xfc, 0x4a, 0x02, + 0x83, 0xfd, 0x7d, 0x00, 0x00, 0x01, 0xff, 0xfc, 0xfe, 0xbc, 0x03, 0x4e, + 0xff, 0x48, 0x00, 0x03, 0x00, 0x12, 0xb6, 0x00, 0x05, 0x01, 0x04, 0x02, + 0x01, 0x24, 0x00, 0x3f, 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, 0x31, 0x30, + 0x01, 0x21, 0x35, 0x21, 0x03, 0x4e, 0xfc, 0xae, 0x03, 0x52, 0xfe, 0xbc, + 0x8c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x4c, 0x04, 0xd9, 0x03, 0x8d, + 0x06, 0x21, 0x00, 0x08, 0x00, 0x1c, 0x40, 0x0b, 0x00, 0x07, 0x40, 0x03, + 0x05, 0x05, 0x09, 0x0a, 0x05, 0x80, 0x00, 0x00, 0x2f, 0x1a, 0xdd, 0x11, + 0x12, 0x01, 0x39, 0x11, 0x33, 0x1a, 0xca, 0x32, 0x31, 0x30, 0x01, 0x2e, + 0x01, 0x27, 0x35, 0x21, 0x16, 0x17, 0x15, 0x02, 0xc3, 0x3f, 0xf4, 0x44, + 0x01, 0x56, 0x3f, 0xac, 0x04, 0xd9, 0x2c, 0xc5, 0x42, 0x15, 0x65, 0xc8, + 0x1b, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x56, 0xff, 0xec, 0x04, 0x3b, + 0x04, 0x75, 0x00, 0x18, 0x00, 0x22, 0x00, 0x4a, 0x40, 0x26, 0x12, 0x0c, + 0x08, 0x0c, 0x02, 0x22, 0x22, 0x18, 0x18, 0x24, 0x1d, 0x08, 0x08, 0x23, + 0x0c, 0x19, 0x4b, 0x59, 0x0c, 0x0c, 0x05, 0x14, 0x14, 0x0f, 0x46, 0x59, + 0x14, 0x10, 0x02, 0x1f, 0x05, 0x1f, 0x46, 0x59, 0x05, 0x16, 0x00, 0x15, + 0x00, 0x3f, 0x3f, 0x2b, 0x11, 0x00, 0x33, 0x18, 0x3f, 0x2b, 0x11, 0x12, + 0x00, 0x39, 0x18, 0x2f, 0x2b, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x33, 0x12, 0x39, 0x32, 0x11, 0x12, 0x39, 0x31, 0x30, 0x21, 0x27, + 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x3f, 0x01, 0x35, + 0x34, 0x23, 0x22, 0x07, 0x27, 0x36, 0x33, 0x32, 0x16, 0x15, 0x11, 0x01, + 0x07, 0x0e, 0x01, 0x15, 0x14, 0x33, 0x32, 0x36, 0x35, 0x03, 0x66, 0x3b, + 0x08, 0x4d, 0xa3, 0x83, 0xa1, 0xb9, 0xf9, 0xfb, 0xc2, 0xae, 0x86, 0xb5, + 0x65, 0xc1, 0xeb, 0xe1, 0xf0, 0xfe, 0xd1, 0x76, 0x85, 0x82, 0x94, 0x6a, + 0x7f, 0x98, 0x61, 0x4b, 0xb8, 0xaa, 0xb2, 0xa9, 0x09, 0x06, 0x31, 0xaa, + 0x51, 0xce, 0x65, 0xc4, 0xc8, 0xfd, 0x17, 0x02, 0x06, 0x04, 0x04, 0x58, + 0x5a, 0x81, 0x7a, 0x65, 0x00, 0x02, 0x00, 0xa0, 0xff, 0xec, 0x04, 0xb4, + 0x06, 0x14, 0x00, 0x12, 0x00, 0x1f, 0x00, 0x42, 0x40, 0x21, 0x1d, 0x03, + 0x03, 0x21, 0x09, 0x10, 0x0b, 0x0e, 0x17, 0x17, 0x0b, 0x0b, 0x20, 0x0c, + 0x00, 0x0b, 0x15, 0x09, 0x10, 0x06, 0x00, 0x06, 0x1a, 0x47, 0x59, 0x06, + 0x16, 0x00, 0x13, 0x47, 0x59, 0x00, 0x10, 0x00, 0x3f, 0x2b, 0x00, 0x18, + 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x39, 0x18, 0x3f, 0x3f, 0x11, 0x01, + 0x33, 0x11, 0x33, 0x11, 0x33, 0x12, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, + 0x31, 0x30, 0x01, 0x32, 0x12, 0x11, 0x10, 0x02, 0x23, 0x22, 0x27, 0x23, + 0x07, 0x23, 0x11, 0x21, 0x11, 0x14, 0x07, 0x33, 0x36, 0x17, 0x22, 0x06, + 0x07, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x03, 0x0e, + 0xc6, 0xe0, 0xe7, 0xc7, 0xc5, 0x70, 0x15, 0x33, 0xe9, 0x01, 0x31, 0x0c, + 0x0c, 0x6b, 0x70, 0x71, 0x68, 0x02, 0x6b, 0x74, 0x5e, 0x6f, 0x70, 0x04, + 0x73, 0xfe, 0xcb, 0xfe, 0xf3, 0xfe, 0xeb, 0xfe, 0xd0, 0x8f, 0x7b, 0x06, + 0x14, 0xfe, 0x96, 0x45, 0x98, 0xa6, 0xf4, 0x8b, 0xa0, 0x21, 0xb4, 0x9c, + 0xad, 0xa5, 0xa5, 0xa5, 0x00, 0x01, 0x00, 0x5c, 0xff, 0xec, 0x03, 0xdd, + 0x04, 0x73, 0x00, 0x15, 0x00, 0x2a, 0x40, 0x15, 0x13, 0x0d, 0x07, 0x07, + 0x17, 0x0d, 0x02, 0x02, 0x16, 0x05, 0x0b, 0x47, 0x59, 0x05, 0x10, 0x00, + 0x0f, 0x47, 0x59, 0x00, 0x16, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, + 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, 0x31, 0x30, + 0x05, 0x20, 0x11, 0x10, 0x00, 0x21, 0x32, 0x17, 0x07, 0x2e, 0x01, 0x23, + 0x22, 0x11, 0x10, 0x33, 0x32, 0x36, 0x37, 0x11, 0x0e, 0x01, 0x02, 0x66, + 0xfd, 0xf6, 0x01, 0x1c, 0x01, 0x09, 0xc2, 0x9a, 0x5a, 0x48, 0x7c, 0x3e, + 0xee, 0xee, 0x58, 0x96, 0x4b, 0x4a, 0x97, 0x14, 0x02, 0x3d, 0x01, 0x1d, + 0x01, 0x2d, 0x4c, 0xec, 0x1d, 0x25, 0xfe, 0xae, 0xfe, 0xb8, 0x2f, 0x32, + 0xfe, 0xfb, 0x2f, 0x24, 0x00, 0x02, 0x00, 0x5c, 0xff, 0xec, 0x04, 0x71, + 0x06, 0x14, 0x00, 0x12, 0x00, 0x1f, 0x00, 0x40, 0x40, 0x21, 0x09, 0x16, + 0x10, 0x03, 0x0b, 0x0b, 0x0e, 0x0e, 0x21, 0x1d, 0x03, 0x03, 0x20, 0x0f, + 0x15, 0x0c, 0x00, 0x11, 0x09, 0x00, 0x06, 0x06, 0x1a, 0x47, 0x59, 0x06, + 0x10, 0x00, 0x13, 0x47, 0x59, 0x00, 0x16, 0x00, 0x3f, 0x2b, 0x00, 0x18, + 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x39, 0x18, 0x3f, 0x3f, 0x11, 0x01, + 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x12, 0x17, 0x39, 0x31, 0x30, + 0x05, 0x22, 0x02, 0x11, 0x10, 0x12, 0x33, 0x32, 0x17, 0x33, 0x26, 0x35, + 0x11, 0x21, 0x11, 0x23, 0x27, 0x23, 0x06, 0x27, 0x32, 0x36, 0x37, 0x35, + 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x02, 0x02, 0xc5, 0xe1, + 0xe5, 0xc9, 0xd3, 0x6f, 0x0a, 0x17, 0x01, 0x32, 0xea, 0x3b, 0x0d, 0x68, + 0x6a, 0x75, 0x6d, 0x05, 0x6f, 0x7d, 0x66, 0x71, 0x72, 0x14, 0x01, 0x32, + 0x01, 0x0f, 0x01, 0x13, 0x01, 0x33, 0xa4, 0x7d, 0x62, 0x01, 0x66, 0xf9, + 0xec, 0x91, 0xa5, 0xf3, 0x88, 0xa3, 0x21, 0xb4, 0x9c, 0xad, 0xa5, 0xa5, + 0xa5, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5c, 0xff, 0xec, 0x04, 0x62, + 0x04, 0x73, 0x00, 0x06, 0x00, 0x1b, 0x00, 0x46, 0x40, 0x23, 0x03, 0x12, + 0x04, 0x04, 0x19, 0x11, 0x11, 0x1d, 0x12, 0x0a, 0x0a, 0x1c, 0x18, 0x15, + 0x12, 0x03, 0x12, 0x4a, 0x59, 0x03, 0x03, 0x07, 0x0d, 0x0d, 0x00, 0x4a, + 0x59, 0x0d, 0x10, 0x07, 0x15, 0x46, 0x59, 0x07, 0x16, 0x00, 0x3f, 0x2b, + 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x2b, 0x11, + 0x12, 0x00, 0x39, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, + 0x33, 0x11, 0x12, 0x39, 0x31, 0x30, 0x01, 0x22, 0x06, 0x07, 0x21, 0x2e, + 0x01, 0x03, 0x20, 0x00, 0x11, 0x10, 0x00, 0x33, 0x32, 0x00, 0x1d, 0x01, + 0x21, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x37, 0x15, 0x0e, 0x01, 0x02, 0x6f, + 0x61, 0x6e, 0x08, 0x01, 0xac, 0x02, 0x72, 0x36, 0xfe, 0xf2, 0xfe, 0xd0, + 0x01, 0x19, 0xf8, 0xed, 0x01, 0x08, 0xfd, 0x2f, 0x05, 0x90, 0x82, 0x65, + 0xb4, 0x62, 0x50, 0xb6, 0x03, 0x9a, 0x7b, 0x71, 0x71, 0x7b, 0xfc, 0x52, + 0x01, 0x2a, 0x01, 0x11, 0x01, 0x19, 0x01, 0x33, 0xfe, 0xf2, 0xee, 0x94, + 0x82, 0x92, 0x2a, 0x2e, 0xec, 0x28, 0x27, 0x00, 0x00, 0x01, 0x00, 0x29, + 0x00, 0x00, 0x03, 0x75, 0x06, 0x1f, 0x00, 0x15, 0x00, 0x3c, 0x40, 0x1e, + 0x14, 0x02, 0x02, 0x07, 0x05, 0x03, 0x03, 0x16, 0x17, 0x0d, 0x00, 0x00, + 0x17, 0x05, 0x01, 0x14, 0x01, 0x46, 0x59, 0x07, 0x14, 0x0f, 0x0b, 0x10, + 0x47, 0x59, 0x0b, 0x00, 0x03, 0x15, 0x00, 0x3f, 0x3f, 0x2b, 0x00, 0x18, + 0x3f, 0x33, 0x2b, 0x11, 0x00, 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, + 0x12, 0x39, 0x11, 0x33, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x21, + 0x11, 0x21, 0x11, 0x23, 0x35, 0x37, 0x35, 0x34, 0x36, 0x33, 0x32, 0x17, + 0x07, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x21, 0x03, 0x0a, 0xfe, 0xf8, + 0xfe, 0xcf, 0xa8, 0xa8, 0xbc, 0xcf, 0x9e, 0x7b, 0x4e, 0x5c, 0x4e, 0x41, + 0x3a, 0x01, 0x08, 0x03, 0x79, 0xfc, 0x87, 0x03, 0x79, 0x93, 0x52, 0x52, + 0xbf, 0xb0, 0x2f, 0xe0, 0x1d, 0x4d, 0x3c, 0x46, 0x00, 0x03, 0x00, 0x06, + 0xfe, 0x14, 0x04, 0x6d, 0x04, 0x73, 0x00, 0x29, 0x00, 0x36, 0x00, 0x40, + 0x00, 0x80, 0x40, 0x44, 0x0b, 0x1d, 0x1d, 0x3d, 0x3d, 0x04, 0x30, 0x11, + 0x11, 0x02, 0x29, 0x07, 0x20, 0x04, 0x23, 0x01, 0x04, 0x04, 0x42, 0x1a, + 0x2a, 0x2a, 0x17, 0x17, 0x37, 0x23, 0x23, 0x41, 0x1a, 0x0d, 0x00, 0x0d, + 0x01, 0x0d, 0x06, 0x0d, 0x34, 0x07, 0x3a, 0x4b, 0x59, 0x09, 0x20, 0x04, + 0x03, 0x07, 0x07, 0x26, 0x34, 0x29, 0x02, 0x4a, 0x59, 0x29, 0x29, 0x26, + 0x26, 0x3f, 0x4b, 0x59, 0x26, 0x10, 0x14, 0x2d, 0x4a, 0x59, 0x14, 0x1b, + 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x00, 0x33, 0x18, 0x2f, + 0x2b, 0x00, 0x18, 0x2f, 0x12, 0x39, 0x2f, 0x17, 0x39, 0x2b, 0x11, 0x00, + 0x33, 0x5f, 0x5e, 0x5d, 0x12, 0x39, 0x11, 0x01, 0x33, 0x11, 0x33, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x12, 0x17, 0x39, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x39, 0x11, 0x33, 0x31, 0x30, 0x01, 0x15, + 0x07, 0x16, 0x15, 0x14, 0x06, 0x23, 0x2f, 0x01, 0x06, 0x15, 0x14, 0x3b, + 0x01, 0x32, 0x16, 0x15, 0x14, 0x04, 0x21, 0x22, 0x26, 0x35, 0x34, 0x36, + 0x37, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x36, + 0x33, 0x32, 0x16, 0x17, 0x01, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, + 0x26, 0x2b, 0x01, 0x22, 0x06, 0x13, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, + 0x34, 0x23, 0x22, 0x04, 0x6d, 0xaf, 0x30, 0xfb, 0xdf, 0x37, 0x2d, 0x2f, + 0xa8, 0xbe, 0xb8, 0xc1, 0xfe, 0xb9, 0xfe, 0xce, 0xea, 0xf7, 0x7e, 0x7a, + 0x2f, 0x46, 0x4a, 0x46, 0x58, 0x67, 0xee, 0xdd, 0x2f, 0x81, 0x12, 0xfe, + 0x27, 0x79, 0x6d, 0xa4, 0xba, 0x6e, 0x73, 0x9e, 0x54, 0x71, 0x6f, 0x53, + 0x55, 0x56, 0x50, 0xa6, 0xa8, 0x04, 0x5e, 0x9b, 0x2d, 0x4b, 0x5d, 0xb4, + 0xc9, 0x03, 0x05, 0x24, 0x2c, 0x42, 0x9e, 0x99, 0xc4, 0xd8, 0xa3, 0x93, + 0x65, 0x88, 0x1d, 0x14, 0x5b, 0x33, 0x40, 0x55, 0x29, 0x26, 0xa8, 0x72, + 0xb7, 0xc8, 0x11, 0x04, 0xfb, 0x04, 0x3f, 0x48, 0x5a, 0x4e, 0x3f, 0x30, + 0x4f, 0x03, 0x4d, 0x5b, 0x6a, 0x6a, 0x5b, 0xca, 0x00, 0x01, 0x00, 0xa0, + 0x00, 0x00, 0x04, 0xa8, 0x06, 0x14, 0x00, 0x15, 0x00, 0x35, 0x40, 0x1a, + 0x01, 0x00, 0x00, 0x17, 0x0f, 0x09, 0x0c, 0x08, 0x08, 0x09, 0x09, 0x16, + 0x0f, 0x04, 0x12, 0x12, 0x04, 0x47, 0x59, 0x12, 0x10, 0x0a, 0x00, 0x01, + 0x09, 0x15, 0x00, 0x3f, 0x33, 0x3f, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, + 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x12, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x29, 0x01, 0x11, 0x34, 0x23, 0x22, 0x06, 0x15, 0x11, + 0x21, 0x11, 0x21, 0x11, 0x14, 0x0f, 0x01, 0x33, 0x36, 0x33, 0x32, 0x16, + 0x15, 0x04, 0xa8, 0xfe, 0xcf, 0xb4, 0x80, 0x72, 0xfe, 0xcf, 0x01, 0x31, + 0x07, 0x07, 0x10, 0x66, 0xde, 0xc5, 0xcc, 0x02, 0x8d, 0xf2, 0xae, 0xc3, + 0xfd, 0xf2, 0x06, 0x14, 0xfe, 0xc3, 0x25, 0x89, 0x5a, 0xa4, 0xd4, 0xc6, + 0x00, 0x02, 0x00, 0x93, 0x00, 0x00, 0x01, 0xdf, 0x06, 0x14, 0x00, 0x08, + 0x00, 0x0c, 0x00, 0x24, 0x40, 0x11, 0x04, 0x09, 0x09, 0x00, 0x0a, 0x0a, + 0x0d, 0x0b, 0x0f, 0x0a, 0x15, 0x02, 0x07, 0x49, 0x59, 0x02, 0x00, 0x00, + 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x3f, 0x11, 0x01, 0x33, 0x11, 0x33, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x13, 0x34, 0x33, 0x32, 0x15, 0x14, 0x06, 0x23, + 0x22, 0x01, 0x21, 0x11, 0x21, 0x93, 0xa6, 0xa6, 0x53, 0x53, 0xa6, 0x01, + 0x3e, 0xfe, 0xcf, 0x01, 0x31, 0x05, 0x7f, 0x95, 0x95, 0x47, 0x4f, 0xfb, + 0x17, 0x04, 0x5e, 0x00, 0x00, 0x02, 0xff, 0x7d, 0xfe, 0x14, 0x01, 0xdf, + 0x06, 0x14, 0x00, 0x0d, 0x00, 0x16, 0x00, 0x2f, 0x40, 0x18, 0x12, 0x0b, + 0x0b, 0x0e, 0x02, 0x08, 0x08, 0x17, 0x10, 0x15, 0x49, 0x59, 0x10, 0x00, + 0x09, 0x0f, 0x03, 0x05, 0x00, 0x05, 0x47, 0x59, 0x00, 0x1b, 0x00, 0x3f, + 0x2b, 0x11, 0x00, 0x33, 0x18, 0x3f, 0x3f, 0x2b, 0x11, 0x01, 0x33, 0x11, + 0x33, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, 0x22, 0x27, 0x35, 0x16, + 0x33, 0x32, 0x36, 0x35, 0x11, 0x21, 0x11, 0x14, 0x06, 0x03, 0x34, 0x33, + 0x32, 0x15, 0x14, 0x06, 0x23, 0x22, 0x46, 0x75, 0x54, 0x46, 0x49, 0x4d, + 0x47, 0x01, 0x31, 0xce, 0x70, 0xa6, 0xa6, 0x53, 0x53, 0xa6, 0xfe, 0x14, + 0x19, 0xf0, 0x13, 0x56, 0x54, 0x04, 0xaa, 0xfb, 0x29, 0xb2, 0xc1, 0x07, + 0x6b, 0x95, 0x95, 0x47, 0x4f, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, + 0x00, 0x00, 0x04, 0xf6, 0x06, 0x14, 0x00, 0x0e, 0x00, 0x49, 0x40, 0x23, + 0x04, 0x07, 0x07, 0x08, 0x02, 0x03, 0x03, 0x06, 0x05, 0x05, 0x10, 0x0e, + 0x0a, 0x0d, 0x0d, 0x08, 0x08, 0x0a, 0x0a, 0x0f, 0x0b, 0x00, 0x04, 0x07, + 0x07, 0x08, 0x08, 0x0e, 0x0e, 0x03, 0x06, 0x0a, 0x15, 0x03, 0x0f, 0x00, + 0x3f, 0x3f, 0x33, 0x12, 0x39, 0x11, 0x33, 0x11, 0x39, 0x11, 0x33, 0x3f, + 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, + 0x11, 0x33, 0x33, 0x11, 0x33, 0x12, 0x39, 0x11, 0x33, 0x31, 0x30, 0x01, + 0x37, 0x01, 0x21, 0x09, 0x01, 0x21, 0x01, 0x07, 0x11, 0x21, 0x11, 0x21, + 0x11, 0x07, 0x01, 0xc5, 0x85, 0x01, 0x39, 0x01, 0x58, 0xfe, 0x44, 0x01, + 0xd7, 0xfe, 0xa0, 0xfe, 0xbe, 0x83, 0xfe, 0xcf, 0x01, 0x31, 0x10, 0x02, + 0x60, 0xaa, 0x01, 0x54, 0xfe, 0x1b, 0xfd, 0x87, 0x01, 0xc5, 0x69, 0xfe, + 0xa4, 0x06, 0x14, 0xfd, 0x4a, 0xfe, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, + 0x00, 0x00, 0x01, 0xd1, 0x06, 0x14, 0x00, 0x03, 0x00, 0x13, 0xb7, 0x00, + 0x01, 0x01, 0x04, 0x02, 0x00, 0x01, 0x15, 0x00, 0x3f, 0x3f, 0x11, 0x01, + 0x33, 0x11, 0x33, 0x31, 0x30, 0x29, 0x01, 0x11, 0x21, 0x01, 0xd1, 0xfe, + 0xcf, 0x01, 0x31, 0x06, 0x14, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0xa0, + 0x00, 0x00, 0x07, 0x42, 0x04, 0x73, 0x00, 0x23, 0x00, 0x4d, 0x40, 0x26, + 0x14, 0x13, 0x13, 0x00, 0x00, 0x01, 0x01, 0x0a, 0x1c, 0x1c, 0x1b, 0x1b, + 0x25, 0x0d, 0x09, 0x09, 0x0a, 0x0a, 0x24, 0x13, 0x0d, 0x0d, 0x11, 0x20, + 0x05, 0x11, 0x05, 0x47, 0x59, 0x17, 0x11, 0x10, 0x0b, 0x0f, 0x1c, 0x01, + 0x0a, 0x15, 0x00, 0x3f, 0x33, 0x33, 0x3f, 0x3f, 0x33, 0x2b, 0x11, 0x00, + 0x33, 0x12, 0x39, 0x11, 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, 0x12, 0x39, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x12, 0x39, 0x11, + 0x33, 0x31, 0x30, 0x29, 0x01, 0x11, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, + 0x11, 0x21, 0x11, 0x33, 0x17, 0x33, 0x3e, 0x01, 0x33, 0x32, 0x17, 0x33, + 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x11, 0x21, 0x11, 0x34, 0x26, 0x23, + 0x22, 0x06, 0x15, 0x04, 0x89, 0xfe, 0xcf, 0x51, 0x57, 0x75, 0x6a, 0xfe, + 0xcf, 0xe9, 0x29, 0x11, 0x2d, 0xaa, 0x6e, 0xfb, 0x59, 0x1b, 0x2d, 0xaf, + 0x6e, 0xbe, 0xc3, 0xfe, 0xce, 0x51, 0x57, 0x70, 0x6f, 0x02, 0x8d, 0x79, + 0x79, 0xac, 0xc5, 0xfd, 0xf2, 0x04, 0x5e, 0x8f, 0x4d, 0x57, 0xa4, 0x4e, + 0x56, 0xc3, 0xd7, 0xfd, 0x27, 0x02, 0x8d, 0x79, 0x79, 0xa0, 0xae, 0x00, + 0x00, 0x01, 0x00, 0xa0, 0x00, 0x00, 0x04, 0xa8, 0x04, 0x73, 0x00, 0x14, + 0x00, 0x31, 0x40, 0x18, 0x01, 0x00, 0x00, 0x16, 0x0d, 0x09, 0x09, 0x0a, + 0x0a, 0x15, 0x0d, 0x05, 0x11, 0x11, 0x05, 0x47, 0x59, 0x11, 0x10, 0x0b, + 0x0f, 0x01, 0x0a, 0x15, 0x00, 0x3f, 0x33, 0x3f, 0x3f, 0x2b, 0x11, 0x12, + 0x00, 0x39, 0x11, 0x01, 0x33, 0x11, 0x33, 0x12, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x29, 0x01, 0x11, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, + 0x11, 0x21, 0x11, 0x33, 0x17, 0x33, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, + 0x04, 0xa8, 0xfe, 0xcf, 0x56, 0x5e, 0x80, 0x72, 0xfe, 0xcf, 0xe9, 0x29, + 0x11, 0x33, 0xb3, 0x72, 0xc3, 0xca, 0x02, 0x8d, 0x79, 0x79, 0xab, 0xc6, + 0xfd, 0xf2, 0x04, 0x5e, 0x8f, 0x51, 0x53, 0xd3, 0xc7, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x5c, 0xff, 0xec, 0x04, 0x98, 0x04, 0x73, 0x00, 0x0b, + 0x00, 0x19, 0x00, 0x28, 0x40, 0x14, 0x06, 0x0c, 0x0c, 0x1b, 0x00, 0x13, + 0x13, 0x1a, 0x16, 0x09, 0x47, 0x59, 0x16, 0x10, 0x0f, 0x03, 0x47, 0x59, + 0x0f, 0x16, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x01, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x14, 0x16, 0x33, + 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x05, 0x10, 0x00, 0x21, + 0x22, 0x26, 0x02, 0x35, 0x10, 0x00, 0x21, 0x32, 0x16, 0x12, 0x01, 0x93, + 0x6d, 0x7b, 0x7a, 0x6b, 0x6c, 0x7b, 0x7a, 0x6c, 0x03, 0x05, 0xfe, 0xe0, + 0xfe, 0xff, 0xa1, 0xf6, 0x84, 0x01, 0x1e, 0x01, 0x03, 0xa1, 0xf6, 0x84, + 0x02, 0x31, 0xa6, 0xaa, 0xa9, 0xa7, 0xa6, 0xa6, 0xa5, 0xa7, 0xfe, 0xef, + 0xfe, 0xcc, 0x8d, 0x01, 0x08, 0xb0, 0x01, 0x12, 0x01, 0x30, 0x8c, 0xfe, + 0xfa, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa0, 0xfe, 0x14, 0x04, 0xb4, + 0x04, 0x73, 0x00, 0x13, 0x00, 0x1f, 0x00, 0x43, 0x40, 0x22, 0x18, 0x06, + 0x06, 0x07, 0x0a, 0x03, 0x03, 0x07, 0x1d, 0x10, 0x07, 0x10, 0x20, 0x21, + 0x03, 0x0a, 0x00, 0x0d, 0x0d, 0x14, 0x47, 0x59, 0x0d, 0x10, 0x08, 0x0f, + 0x07, 0x1b, 0x00, 0x1b, 0x47, 0x59, 0x00, 0x16, 0x00, 0x3f, 0x2b, 0x00, + 0x18, 0x3f, 0x3f, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x39, 0x11, 0x12, + 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x05, 0x22, 0x27, 0x23, 0x16, 0x15, 0x11, 0x21, 0x11, + 0x33, 0x17, 0x33, 0x36, 0x33, 0x32, 0x12, 0x11, 0x14, 0x02, 0x06, 0x03, + 0x22, 0x06, 0x07, 0x15, 0x14, 0x16, 0x33, 0x32, 0x11, 0x34, 0x26, 0x03, + 0x06, 0xc5, 0x70, 0x10, 0x10, 0xfe, 0xcf, 0xf8, 0x2b, 0x0e, 0x6b, 0xd2, + 0xc6, 0xe0, 0x69, 0xc2, 0xdd, 0x71, 0x68, 0x02, 0x6b, 0x74, 0xcd, 0x65, + 0x14, 0x8f, 0x8c, 0x16, 0xfe, 0x3b, 0x06, 0x4a, 0x91, 0xa6, 0xfe, 0xce, + 0xfe, 0xf0, 0xb3, 0xfe, 0xf8, 0x8a, 0x03, 0x93, 0x8b, 0xa0, 0x21, 0xb4, + 0x9c, 0x01, 0x52, 0xa5, 0xa5, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5c, + 0xfe, 0x14, 0x04, 0x71, 0x04, 0x73, 0x00, 0x0b, 0x00, 0x20, 0x00, 0x42, + 0x40, 0x21, 0x16, 0x03, 0x1d, 0x03, 0x1a, 0x1a, 0x19, 0x19, 0x22, 0x09, + 0x0f, 0x0f, 0x21, 0x1a, 0x1b, 0x17, 0x0f, 0x1e, 0x16, 0x0c, 0x12, 0x12, + 0x07, 0x47, 0x59, 0x12, 0x10, 0x0c, 0x00, 0x47, 0x59, 0x0c, 0x16, 0x00, + 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x39, 0x18, + 0x3f, 0x3f, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x12, + 0x39, 0x39, 0x11, 0x33, 0x31, 0x30, 0x25, 0x32, 0x36, 0x37, 0x35, 0x34, + 0x26, 0x23, 0x22, 0x11, 0x14, 0x16, 0x17, 0x22, 0x02, 0x11, 0x10, 0x12, + 0x33, 0x32, 0x16, 0x17, 0x33, 0x37, 0x21, 0x11, 0x21, 0x11, 0x34, 0x37, + 0x23, 0x0e, 0x01, 0x02, 0x6f, 0x74, 0x6c, 0x05, 0x6f, 0x7b, 0xd7, 0x6b, + 0x04, 0xc6, 0xe0, 0xe5, 0xc7, 0x6a, 0x9e, 0x3c, 0x08, 0x1b, 0x01, 0x02, + 0xfe, 0xce, 0x0d, 0x0d, 0x31, 0xa2, 0xdb, 0x85, 0xa6, 0x25, 0xb4, 0x9c, + 0xfe, 0xae, 0xa8, 0xa6, 0xef, 0x01, 0x31, 0x01, 0x10, 0x01, 0x12, 0x01, + 0x34, 0x50, 0x54, 0x8f, 0xf9, 0xb6, 0x01, 0xd5, 0x3d, 0x6b, 0x51, 0x54, + 0x00, 0x01, 0x00, 0xa0, 0x00, 0x00, 0x03, 0x77, 0x04, 0x73, 0x00, 0x10, + 0x00, 0x25, 0x40, 0x11, 0x02, 0x12, 0x0d, 0x09, 0x09, 0x0a, 0x0a, 0x11, + 0x0b, 0x0f, 0x0a, 0x15, 0x0d, 0x05, 0x05, 0x00, 0x10, 0x00, 0x3f, 0x32, + 0x11, 0x39, 0x3f, 0x3f, 0x11, 0x01, 0x33, 0x11, 0x33, 0x12, 0x39, 0x11, + 0x33, 0x31, 0x30, 0x01, 0x32, 0x17, 0x03, 0x26, 0x23, 0x22, 0x06, 0x15, + 0x11, 0x21, 0x11, 0x33, 0x17, 0x33, 0x3e, 0x01, 0x03, 0x10, 0x3e, 0x29, + 0x17, 0x25, 0x35, 0x92, 0xa3, 0xfe, 0xcf, 0xe7, 0x2d, 0x0f, 0x34, 0xb1, + 0x04, 0x73, 0x09, 0xfe, 0xe2, 0x0a, 0x96, 0x87, 0xfd, 0xc7, 0x04, 0x5e, + 0xbc, 0x5e, 0x73, 0x00, 0x00, 0x01, 0x00, 0x5c, 0xff, 0xec, 0x03, 0xac, + 0x04, 0x73, 0x00, 0x25, 0x00, 0x3f, 0x40, 0x1f, 0x06, 0x19, 0x14, 0x0c, + 0x00, 0x00, 0x27, 0x1f, 0x14, 0x14, 0x26, 0x00, 0x0c, 0x14, 0x1f, 0x0c, + 0x1f, 0x0a, 0x1d, 0x17, 0x1d, 0x46, 0x59, 0x17, 0x10, 0x03, 0x0a, 0x46, + 0x59, 0x03, 0x16, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, + 0x00, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x12, 0x39, 0x39, 0x31, 0x30, 0x01, 0x14, 0x06, + 0x23, 0x22, 0x26, 0x27, 0x35, 0x1e, 0x01, 0x33, 0x32, 0x35, 0x34, 0x2e, + 0x01, 0x27, 0x2e, 0x02, 0x35, 0x34, 0x36, 0x33, 0x32, 0x17, 0x07, 0x2e, + 0x01, 0x23, 0x22, 0x15, 0x14, 0x16, 0x17, 0x1e, 0x02, 0x03, 0xac, 0xef, + 0xee, 0x7a, 0xac, 0x4b, 0x55, 0xd5, 0x51, 0xa6, 0x2c, 0x6c, 0x5a, 0x81, + 0x79, 0x37, 0xe7, 0xd4, 0xca, 0xbf, 0x5c, 0x54, 0x92, 0x4c, 0x87, 0x57, + 0x93, 0x83, 0x7a, 0x3a, 0x01, 0x4c, 0xac, 0xb4, 0x21, 0x20, 0xfc, 0x28, + 0x36, 0x60, 0x24, 0x2d, 0x39, 0x26, 0x36, 0x5c, 0x77, 0x57, 0x95, 0xa3, + 0x58, 0xdc, 0x24, 0x2e, 0x49, 0x29, 0x3c, 0x3b, 0x35, 0x5c, 0x78, 0x00, + 0x00, 0x01, 0x00, 0x2f, 0xff, 0xec, 0x03, 0x37, 0x05, 0x4c, 0x00, 0x15, + 0x00, 0x3d, 0x40, 0x1e, 0x0c, 0x08, 0x0f, 0x0f, 0x13, 0x13, 0x0a, 0x08, + 0x02, 0x11, 0x08, 0x11, 0x16, 0x17, 0x0a, 0x12, 0x0f, 0x12, 0x46, 0x59, + 0x0d, 0x0c, 0x0f, 0x0f, 0x05, 0x00, 0x47, 0x59, 0x05, 0x16, 0x00, 0x3f, + 0x2b, 0x00, 0x18, 0x3f, 0x33, 0xc1, 0x2b, 0x11, 0x00, 0x33, 0x11, 0x12, + 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x33, 0x11, 0x33, 0x11, 0x12, + 0x39, 0x31, 0x30, 0x25, 0x32, 0x37, 0x15, 0x06, 0x23, 0x22, 0x26, 0x35, + 0x11, 0x23, 0x35, 0x3f, 0x01, 0x33, 0x15, 0x21, 0x15, 0x21, 0x11, 0x14, + 0x16, 0x02, 0x77, 0x50, 0x70, 0x72, 0xa6, 0xb7, 0xa7, 0x92, 0xa8, 0x58, + 0xc3, 0x01, 0x39, 0xfe, 0xc7, 0x49, 0xdf, 0x23, 0xe3, 0x33, 0xb9, 0xb9, + 0x02, 0x1b, 0x81, 0x66, 0xec, 0xee, 0xe5, 0xfd, 0xe5, 0x41, 0x3e, 0x00, + 0x00, 0x01, 0x00, 0x9a, 0xff, 0xec, 0x04, 0xa2, 0x04, 0x5e, 0x00, 0x14, + 0x00, 0x32, 0x40, 0x18, 0x02, 0x11, 0x11, 0x14, 0x14, 0x16, 0x0b, 0x08, + 0x08, 0x15, 0x12, 0x09, 0x0f, 0x02, 0x05, 0x0e, 0x05, 0x0e, 0x47, 0x59, + 0x05, 0x16, 0x00, 0x15, 0x00, 0x3f, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, + 0x18, 0x3f, 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, + 0x12, 0x39, 0x31, 0x30, 0x21, 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, + 0x35, 0x11, 0x21, 0x11, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x11, 0x21, + 0x11, 0x03, 0xb8, 0x29, 0x10, 0x31, 0xb4, 0x73, 0xc5, 0xc8, 0x01, 0x31, + 0x56, 0x5e, 0x80, 0x72, 0x01, 0x31, 0x8f, 0x4e, 0x55, 0xd3, 0xc6, 0x02, + 0xd9, 0xfd, 0x73, 0x79, 0x79, 0xab, 0xc6, 0x02, 0x0e, 0xfb, 0xa2, 0x00, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x8d, 0x04, 0x5e, 0x00, 0x0b, + 0x00, 0x2c, 0x40, 0x14, 0x0b, 0x00, 0x05, 0x05, 0x02, 0x09, 0x09, 0x0a, + 0x0a, 0x0d, 0x02, 0x01, 0x01, 0x0c, 0x09, 0x01, 0x0f, 0x05, 0x00, 0x15, + 0x00, 0x3f, 0x32, 0x3f, 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x33, 0x31, 0x30, 0x21, 0x01, + 0x21, 0x13, 0x16, 0x17, 0x33, 0x36, 0x37, 0x13, 0x21, 0x01, 0x01, 0xaa, + 0xfe, 0x56, 0x01, 0x3f, 0xd8, 0x24, 0x09, 0x06, 0x05, 0x28, 0xd7, 0x01, + 0x3f, 0xfe, 0x56, 0x04, 0x5e, 0xfd, 0x83, 0x79, 0x6c, 0x60, 0x85, 0x02, + 0x7d, 0xfb, 0xa2, 0x00, 0x00, 0x01, 0x00, 0x14, 0x00, 0x00, 0x06, 0xc5, + 0x04, 0x5e, 0x00, 0x1d, 0x00, 0x4a, 0x40, 0x24, 0x05, 0x04, 0x0a, 0x10, + 0x0f, 0x03, 0x1d, 0x00, 0x17, 0x17, 0x03, 0x0a, 0x03, 0x07, 0x1b, 0x1b, + 0x1c, 0x1c, 0x1f, 0x07, 0x06, 0x06, 0x1e, 0x17, 0x0a, 0x0a, 0x03, 0x05, + 0x0f, 0x0f, 0x1b, 0x06, 0x0f, 0x00, 0x05, 0x15, 0x00, 0x3f, 0x33, 0x3f, + 0x33, 0x33, 0x11, 0x12, 0x39, 0x39, 0x11, 0x33, 0x11, 0x01, 0x33, 0x11, + 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x17, 0x39, 0x11, 0x33, 0x33, + 0x11, 0x33, 0x33, 0x11, 0x33, 0x33, 0x31, 0x30, 0x21, 0x0b, 0x01, 0x23, + 0x03, 0x21, 0x01, 0x21, 0x13, 0x16, 0x17, 0x33, 0x36, 0x3f, 0x01, 0x13, + 0x21, 0x13, 0x1e, 0x03, 0x17, 0x33, 0x3e, 0x01, 0x37, 0x13, 0x21, 0x01, + 0x04, 0x37, 0x56, 0x74, 0x07, 0xcc, 0xfe, 0xb8, 0xfe, 0xc2, 0x01, 0x30, + 0x81, 0x1f, 0x20, 0x06, 0x04, 0x1f, 0x10, 0x8a, 0x01, 0x50, 0x83, 0x04, + 0x11, 0x10, 0x0d, 0x01, 0x06, 0x09, 0x2e, 0x0a, 0x86, 0x01, 0x2b, 0xfe, + 0xbe, 0x01, 0x87, 0x01, 0xee, 0xfc, 0x8b, 0x04, 0x5e, 0xfe, 0x11, 0x85, + 0xea, 0x4c, 0xa5, 0x55, 0x02, 0x18, 0xfd, 0xe8, 0x16, 0x56, 0x61, 0x5d, + 0x1c, 0x48, 0xfb, 0x2c, 0x01, 0xef, 0xfb, 0xa2, 0x00, 0x01, 0x00, 0x0a, + 0x00, 0x00, 0x04, 0x96, 0x04, 0x5e, 0x00, 0x0b, 0x00, 0x4c, 0x40, 0x24, + 0x06, 0x05, 0x00, 0x01, 0x09, 0x03, 0x03, 0x02, 0x04, 0x02, 0x01, 0x04, + 0x05, 0x01, 0x05, 0x0b, 0x08, 0x07, 0x07, 0x0d, 0x0a, 0x0b, 0x0b, 0x0c, + 0x09, 0x06, 0x03, 0x00, 0x00, 0x01, 0x08, 0x0b, 0x15, 0x04, 0x01, 0x0f, + 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x12, 0x39, 0x11, 0x33, 0x33, 0x33, 0x11, + 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x12, 0x39, 0x39, 0x11, + 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x12, 0x39, 0x12, 0x39, + 0x31, 0x30, 0x09, 0x01, 0x21, 0x1b, 0x01, 0x21, 0x09, 0x01, 0x21, 0x0b, + 0x01, 0x21, 0x01, 0x85, 0xfe, 0x98, 0x01, 0x5a, 0xd9, 0xdb, 0x01, 0x5a, + 0xfe, 0x94, 0x01, 0x7d, 0xfe, 0xa5, 0xeb, 0xec, 0xfe, 0xa6, 0x02, 0x3b, + 0x02, 0x23, 0xfe, 0x9c, 0x01, 0x64, 0xfd, 0xdd, 0xfd, 0xc5, 0x01, 0x7f, + 0xfe, 0x81, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0xfe, 0x14, 0x04, 0x8d, + 0x04, 0x5e, 0x00, 0x16, 0x00, 0x4c, 0x40, 0x25, 0x0b, 0x14, 0x14, 0x10, + 0x16, 0x16, 0x04, 0x04, 0x01, 0x08, 0x08, 0x09, 0x09, 0x18, 0x10, 0x01, + 0x00, 0x00, 0x17, 0x0b, 0x14, 0x14, 0x12, 0x04, 0x16, 0x15, 0x10, 0x12, + 0x0d, 0x12, 0x47, 0x59, 0x0d, 0x1b, 0x08, 0x00, 0x0f, 0x00, 0x3f, 0x32, + 0x3f, 0x2b, 0x11, 0x00, 0x33, 0x18, 0x3f, 0x33, 0x12, 0x39, 0x11, 0x33, + 0x11, 0x01, 0x33, 0x11, 0x33, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, + 0x39, 0x11, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x31, 0x30, 0x11, 0x21, + 0x13, 0x16, 0x17, 0x33, 0x36, 0x37, 0x13, 0x21, 0x01, 0x0e, 0x01, 0x23, + 0x22, 0x27, 0x35, 0x16, 0x33, 0x32, 0x36, 0x3f, 0x01, 0x01, 0x4e, 0xd3, + 0x1b, 0x0a, 0x06, 0x0b, 0x20, 0xcf, 0x01, 0x47, 0xfe, 0x27, 0x41, 0xf1, + 0xa1, 0x4f, 0x4c, 0x37, 0x41, 0x51, 0x79, 0x22, 0x12, 0x04, 0x5e, 0xfd, + 0x8b, 0x52, 0x70, 0x67, 0x5b, 0x02, 0x75, 0xfb, 0x13, 0xaf, 0xae, 0x11, + 0xf2, 0x0d, 0x63, 0x64, 0x37, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x37, + 0x00, 0x00, 0x03, 0xaa, 0x04, 0x5e, 0x00, 0x09, 0x00, 0x3d, 0x40, 0x1e, + 0x03, 0x07, 0x04, 0x07, 0x01, 0x00, 0x00, 0x0b, 0x08, 0x01, 0x01, 0x0a, + 0x07, 0x04, 0x05, 0x05, 0x04, 0x46, 0x59, 0x05, 0x0f, 0x02, 0x08, 0x01, + 0x01, 0x08, 0x46, 0x59, 0x01, 0x15, 0x00, 0x3f, 0x2b, 0x11, 0x12, 0x00, + 0x39, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x11, 0x01, 0x33, 0x11, + 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, 0x39, 0x11, 0x33, 0x31, 0x30, 0x29, + 0x01, 0x35, 0x01, 0x21, 0x35, 0x21, 0x15, 0x01, 0x21, 0x03, 0xaa, 0xfc, + 0x8d, 0x02, 0x06, 0xfe, 0x19, 0x03, 0x42, 0xfe, 0x08, 0x02, 0x0a, 0xb4, + 0x02, 0xc1, 0xe9, 0xc6, 0xfd, 0x51, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1f, + 0xfe, 0xbc, 0x02, 0xd5, 0x05, 0xb6, 0x00, 0x1f, 0x00, 0x36, 0x40, 0x19, + 0x03, 0x14, 0x08, 0x1f, 0x1f, 0x11, 0x18, 0x18, 0x20, 0x0d, 0x1c, 0x1c, + 0x21, 0x04, 0x03, 0x13, 0x13, 0x0d, 0x1b, 0x1b, 0x1c, 0x24, 0x0d, 0x0c, + 0x03, 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x33, + 0x11, 0x01, 0x33, 0x11, 0x33, 0x12, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, + 0x33, 0x39, 0x31, 0x30, 0x01, 0x34, 0x26, 0x23, 0x35, 0x32, 0x36, 0x3d, + 0x01, 0x11, 0x34, 0x36, 0x33, 0x15, 0x0e, 0x01, 0x15, 0x11, 0x06, 0x07, + 0x15, 0x16, 0x1d, 0x01, 0x11, 0x14, 0x16, 0x17, 0x15, 0x22, 0x26, 0x35, + 0x01, 0x1f, 0x83, 0x7d, 0x7e, 0x82, 0xc2, 0xf4, 0x63, 0x4b, 0x06, 0xe4, + 0xea, 0x4a, 0x64, 0xf4, 0xc2, 0x01, 0x0e, 0x57, 0x5c, 0xef, 0x58, 0x52, + 0x08, 0x01, 0x3e, 0x99, 0x7d, 0xe1, 0x03, 0x46, 0x44, 0xfe, 0xd5, 0xbc, + 0x22, 0x0c, 0x23, 0xb1, 0x09, 0xfe, 0xd5, 0x44, 0x46, 0x03, 0xe2, 0x7d, + 0x9a, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0xc7, 0xfe, 0x2f, 0x02, 0xa2, + 0x06, 0x0e, 0x00, 0x03, 0x00, 0x14, 0xb7, 0x02, 0x03, 0x03, 0x04, 0x05, + 0x03, 0x00, 0x00, 0x00, 0x3f, 0x2f, 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, + 0x31, 0x30, 0x01, 0x33, 0x11, 0x23, 0x01, 0xc7, 0xdb, 0xdb, 0x06, 0x0e, + 0xf8, 0x21, 0x00, 0x00, 0x00, 0x01, 0x00, 0x52, 0xfe, 0xbc, 0x03, 0x08, + 0x05, 0xb6, 0x00, 0x22, 0x00, 0x36, 0x40, 0x19, 0x1f, 0x1a, 0x0d, 0x00, + 0x00, 0x10, 0x08, 0x08, 0x24, 0x14, 0x04, 0x04, 0x23, 0x1f, 0x1e, 0x0e, + 0x0e, 0x14, 0x05, 0x14, 0x15, 0x03, 0x05, 0x04, 0x24, 0x00, 0x3f, 0x33, + 0x3f, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x33, 0x11, 0x01, 0x33, 0x11, + 0x33, 0x12, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x33, 0x39, 0x31, 0x30, + 0x05, 0x14, 0x0e, 0x01, 0x23, 0x35, 0x3e, 0x01, 0x35, 0x11, 0x35, 0x34, + 0x36, 0x37, 0x35, 0x26, 0x27, 0x11, 0x34, 0x26, 0x27, 0x35, 0x32, 0x1e, + 0x01, 0x15, 0x11, 0x15, 0x14, 0x16, 0x33, 0x15, 0x22, 0x06, 0x15, 0x02, + 0x08, 0x52, 0xbd, 0xa7, 0x63, 0x4b, 0x76, 0x73, 0xe3, 0x06, 0x4a, 0x64, + 0xa7, 0xbe, 0x51, 0x7b, 0x85, 0x7d, 0x83, 0x2d, 0x70, 0x72, 0x35, 0xe2, + 0x02, 0x44, 0x47, 0x01, 0x2b, 0x0b, 0x56, 0x6b, 0x11, 0x0c, 0x22, 0xbc, + 0x01, 0x2b, 0x46, 0x44, 0x03, 0xe1, 0x35, 0x73, 0x6e, 0xfe, 0xc2, 0x0a, + 0x54, 0x54, 0xef, 0x52, 0x61, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x58, + 0x02, 0x27, 0x04, 0x39, 0x03, 0x7d, 0x00, 0x15, 0x00, 0x37, 0x40, 0x18, + 0x06, 0x00, 0x11, 0x0b, 0x00, 0x0b, 0x03, 0x0f, 0x0f, 0x17, 0x03, 0x16, + 0x0f, 0x0e, 0x0e, 0x06, 0x04, 0x03, 0x03, 0x0b, 0x11, 0x11, 0x00, 0x06, + 0x00, 0x2f, 0x33, 0x32, 0x7d, 0x2f, 0x33, 0x33, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, 0x39, 0x11, + 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x22, 0x06, 0x07, 0x35, 0x36, 0x33, + 0x32, 0x16, 0x17, 0x16, 0x33, 0x32, 0x36, 0x37, 0x15, 0x06, 0x23, 0x22, + 0x26, 0x27, 0x26, 0x01, 0x42, 0x37, 0x7d, 0x36, 0x67, 0x99, 0x49, 0x81, + 0x4b, 0x81, 0x62, 0x35, 0x7e, 0x36, 0x65, 0x9b, 0x42, 0x78, 0x5a, 0x83, + 0x02, 0xa0, 0x43, 0x36, 0xe7, 0x6d, 0x20, 0x20, 0x37, 0x40, 0x39, 0xe7, + 0x6d, 0x1a, 0x25, 0x38, 0x00, 0x02, 0x00, 0x75, 0xfe, 0x8f, 0x01, 0xd3, + 0x04, 0x5e, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x26, 0x40, 0x12, 0x03, 0x0a, + 0x0a, 0x02, 0x04, 0x04, 0x11, 0x10, 0x00, 0x07, 0x0d, 0x07, 0x54, 0x59, + 0x0d, 0x0f, 0x03, 0x22, 0x00, 0x3f, 0x3f, 0x2b, 0x11, 0x00, 0x33, 0x11, + 0x12, 0x01, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, 0x33, + 0x13, 0x21, 0x01, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, + 0x32, 0x16, 0xa8, 0xf4, 0x33, 0xfe, 0xa6, 0x01, 0x5e, 0x5a, 0x56, 0x53, + 0x5b, 0x5d, 0x51, 0x54, 0x5c, 0x02, 0x5e, 0xfc, 0x31, 0x05, 0x25, 0x54, + 0x56, 0x58, 0x52, 0x51, 0x59, 0x58, 0x00, 0x00, 0x00, 0x01, 0x00, 0x8f, + 0xff, 0xec, 0x04, 0x10, 0x05, 0xcb, 0x00, 0x1b, 0x00, 0x44, 0x40, 0x23, + 0x11, 0x08, 0x1a, 0x1a, 0x05, 0x1b, 0x1b, 0x02, 0x17, 0x17, 0x0a, 0x02, + 0x0a, 0x1c, 0x1d, 0x19, 0x13, 0x4f, 0x59, 0x08, 0x0e, 0x4f, 0x59, 0x00, + 0x05, 0x08, 0x19, 0x08, 0x19, 0x08, 0x06, 0x1b, 0x19, 0x06, 0x07, 0x00, + 0x3f, 0x3f, 0x12, 0x39, 0x39, 0x2f, 0x2f, 0x12, 0x39, 0x39, 0x2b, 0x2b, + 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, + 0x33, 0x11, 0x33, 0x32, 0x31, 0x30, 0x25, 0x24, 0x11, 0x10, 0x12, 0x37, + 0x35, 0x33, 0x15, 0x16, 0x17, 0x07, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x15, + 0x10, 0x33, 0x32, 0x36, 0x37, 0x15, 0x06, 0x07, 0x15, 0x23, 0x02, 0x33, + 0xfe, 0x5c, 0xd1, 0xd3, 0xb2, 0xa6, 0x85, 0x5a, 0x48, 0x7c, 0x3e, 0x79, + 0x74, 0xed, 0x52, 0x84, 0x64, 0x7f, 0x8a, 0xb2, 0xb0, 0x3b, 0x01, 0xfa, + 0x01, 0x05, 0x01, 0x1c, 0x1f, 0xa6, 0x9e, 0x09, 0x41, 0xeb, 0x1d, 0x24, + 0xa7, 0xab, 0xfe, 0xb9, 0x1f, 0x2d, 0xfe, 0x3d, 0x09, 0xbc, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x52, 0x00, 0x00, 0x04, 0x6a, 0x05, 0xcb, 0x00, 0x1d, + 0x00, 0x58, 0x40, 0x2c, 0x0f, 0x12, 0x0b, 0x02, 0x09, 0x0d, 0x0d, 0x1a, + 0x16, 0x16, 0x02, 0x18, 0x10, 0x18, 0x12, 0x12, 0x10, 0x1e, 0x1f, 0x0c, + 0x18, 0x19, 0x18, 0x51, 0x59, 0x09, 0x19, 0x19, 0x00, 0x13, 0x12, 0x0f, + 0x12, 0x0f, 0x4e, 0x59, 0x12, 0x18, 0x00, 0x05, 0x4f, 0x59, 0x00, 0x07, + 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x11, + 0x39, 0x18, 0x2f, 0x33, 0x2b, 0x11, 0x00, 0x33, 0x11, 0x12, 0x01, 0x39, + 0x39, 0x11, 0x33, 0x11, 0x12, 0x39, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, + 0x12, 0x39, 0x12, 0x39, 0x31, 0x30, 0x01, 0x32, 0x17, 0x07, 0x26, 0x23, + 0x22, 0x06, 0x1d, 0x01, 0x21, 0x15, 0x21, 0x15, 0x14, 0x07, 0x21, 0x11, + 0x21, 0x35, 0x3e, 0x01, 0x3d, 0x01, 0x23, 0x35, 0x33, 0x35, 0x34, 0x36, + 0x02, 0xbc, 0xc3, 0xc3, 0x5d, 0x9d, 0x73, 0x4e, 0x54, 0x01, 0x77, 0xfe, + 0x89, 0x97, 0x02, 0xce, 0xfb, 0xe8, 0x67, 0x4d, 0xb2, 0xb2, 0xe5, 0x05, + 0xcb, 0x52, 0xe6, 0x40, 0x59, 0x53, 0xc1, 0xdb, 0x8f, 0xaa, 0x4e, 0xfe, + 0xfc, 0xf8, 0x2c, 0x72, 0x64, 0x91, 0xdb, 0xc3, 0xc9, 0xd9, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x71, 0x00, 0xfe, 0x04, 0x21, 0x04, 0xaa, 0x00, 0x1b, + 0x00, 0x27, 0x00, 0x3c, 0x40, 0x22, 0x10, 0x0c, 0x13, 0x09, 0x05, 0x17, + 0x1a, 0x02, 0x08, 0x00, 0x0e, 0x0e, 0x22, 0x1c, 0x00, 0x1c, 0x1c, 0x28, + 0x29, 0x17, 0x13, 0x10, 0x1a, 0x02, 0x0c, 0x09, 0x05, 0x08, 0x07, 0x15, + 0x15, 0x1f, 0x07, 0x25, 0x00, 0x2f, 0x33, 0xc6, 0x32, 0x11, 0x12, 0x17, + 0x39, 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x10, 0xc2, 0x32, 0x11, 0x12, + 0x17, 0x39, 0x31, 0x30, 0x13, 0x34, 0x37, 0x27, 0x37, 0x17, 0x36, 0x33, + 0x32, 0x17, 0x37, 0x17, 0x07, 0x16, 0x15, 0x14, 0x07, 0x17, 0x07, 0x27, + 0x06, 0x23, 0x22, 0x27, 0x07, 0x27, 0x37, 0x26, 0x37, 0x14, 0x16, 0x33, + 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0xbc, 0x36, 0x81, 0x93, + 0x7f, 0x5b, 0x6a, 0x69, 0x5b, 0x7f, 0x96, 0x81, 0x35, 0x35, 0x7d, 0x92, + 0x7f, 0x5f, 0x65, 0x73, 0x54, 0x7d, 0x91, 0x7f, 0x36, 0xcf, 0x6d, 0x50, + 0x51, 0x6f, 0x71, 0x4f, 0x4e, 0x6f, 0x02, 0xd3, 0x66, 0x5f, 0x7f, 0x93, + 0x7f, 0x35, 0x37, 0x81, 0x8f, 0x81, 0x59, 0x6e, 0x6b, 0x5c, 0x7d, 0x91, + 0x7d, 0x33, 0x33, 0x7b, 0x91, 0x7d, 0x5d, 0x68, 0x4d, 0x6f, 0x6e, 0x4e, + 0x50, 0x6e, 0x70, 0x00, 0x00, 0x01, 0x00, 0x06, 0x00, 0x00, 0x04, 0x89, + 0x05, 0xb6, 0x00, 0x16, 0x00, 0x71, 0x40, 0x38, 0x0e, 0x12, 0x14, 0x12, + 0x15, 0x0d, 0x11, 0x11, 0x00, 0x09, 0x05, 0x03, 0x05, 0x02, 0x0a, 0x06, + 0x06, 0x00, 0x00, 0x16, 0x01, 0x01, 0x02, 0x02, 0x18, 0x16, 0x15, 0x15, + 0x17, 0x06, 0x12, 0x13, 0x12, 0x52, 0x59, 0x00, 0x03, 0x01, 0x03, 0x13, + 0x0f, 0x0a, 0x0e, 0x0f, 0x0e, 0x52, 0x59, 0x07, 0x0f, 0x0f, 0x0c, 0x01, + 0x15, 0x06, 0x0c, 0x18, 0x00, 0x3f, 0x3f, 0x33, 0x12, 0x39, 0x2f, 0x33, + 0x2b, 0x11, 0x00, 0x33, 0x18, 0x10, 0xc6, 0x32, 0x11, 0x12, 0x39, 0x2b, + 0x11, 0x00, 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x12, 0x39, 0x11, 0x33, 0x11, 0x33, 0x12, 0x39, 0x39, 0x11, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x12, 0x39, 0x39, 0x11, 0x33, 0x31, 0x30, 0x09, + 0x01, 0x21, 0x01, 0x33, 0x15, 0x23, 0x15, 0x33, 0x15, 0x23, 0x15, 0x21, + 0x35, 0x23, 0x35, 0x33, 0x35, 0x23, 0x35, 0x33, 0x01, 0x21, 0x02, 0x48, + 0x01, 0x08, 0x01, 0x39, 0xfe, 0x81, 0xc3, 0xf6, 0xf6, 0xf6, 0xfe, 0xe1, + 0xf7, 0xf7, 0xf7, 0xbe, 0xfe, 0x87, 0x01, 0x3c, 0x03, 0x5c, 0x02, 0x5a, + 0xfd, 0x15, 0xb2, 0x8a, 0xb2, 0xdd, 0xdd, 0xb2, 0x8a, 0xb2, 0x02, 0xeb, + 0x00, 0x02, 0x01, 0xc7, 0xfe, 0x2f, 0x02, 0xa2, 0x06, 0x0e, 0x00, 0x03, + 0x00, 0x07, 0x00, 0x23, 0x40, 0x0f, 0x02, 0x06, 0x06, 0x03, 0x07, 0x07, + 0x08, 0x09, 0x04, 0x03, 0x04, 0x03, 0x07, 0x00, 0x00, 0x00, 0x3f, 0x2f, + 0x39, 0x39, 0x2f, 0x2f, 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x01, 0x33, 0x11, 0x23, 0x11, 0x33, 0x11, 0x23, 0x01, + 0xc7, 0xdb, 0xdb, 0xdb, 0xdb, 0x06, 0x0e, 0xfc, 0xd1, 0xfe, 0x7f, 0xfc, + 0xd1, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x6a, 0xff, 0xec, 0x03, 0x7f, + 0x06, 0x29, 0x00, 0x2d, 0x00, 0x38, 0x00, 0x55, 0x40, 0x2a, 0x0a, 0x11, + 0x17, 0x11, 0x05, 0x05, 0x2e, 0x22, 0x00, 0x27, 0x1c, 0x1c, 0x33, 0x17, + 0x00, 0x17, 0x39, 0x3a, 0x03, 0x36, 0x36, 0x13, 0x19, 0x31, 0x31, 0x2a, + 0x13, 0x2a, 0x0e, 0x25, 0x1f, 0x25, 0x4b, 0x59, 0x1f, 0x16, 0x08, 0x0e, + 0x4b, 0x59, 0x08, 0x01, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, + 0x12, 0x00, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x11, 0x33, + 0x33, 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, 0x31, 0x30, 0x13, 0x34, 0x36, + 0x37, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x17, 0x07, 0x2e, 0x01, 0x23, + 0x22, 0x06, 0x15, 0x14, 0x16, 0x17, 0x1e, 0x01, 0x15, 0x14, 0x07, 0x1e, + 0x01, 0x15, 0x14, 0x06, 0x23, 0x22, 0x27, 0x35, 0x1e, 0x01, 0x33, 0x32, + 0x35, 0x34, 0x2e, 0x01, 0x27, 0x2e, 0x01, 0x37, 0x14, 0x16, 0x17, 0x36, + 0x35, 0x34, 0x26, 0x27, 0x0e, 0x01, 0x79, 0x48, 0x3d, 0x85, 0xdf, 0xb6, + 0xaa, 0xc1, 0x52, 0x44, 0x8d, 0x4e, 0x51, 0x4a, 0x63, 0x72, 0xa3, 0x9a, + 0x7d, 0x3e, 0x3f, 0xef, 0xc9, 0xcb, 0x92, 0x51, 0xc6, 0x46, 0xc2, 0x25, + 0x5a, 0x50, 0xb7, 0x8a, 0xdf, 0x82, 0x74, 0x4e, 0x65, 0x85, 0x25, 0x35, + 0x03, 0x25, 0x4f, 0x83, 0x28, 0x54, 0x95, 0x83, 0x9e, 0x54, 0xbe, 0x20, + 0x33, 0x2e, 0x30, 0x31, 0x4a, 0x2d, 0x40, 0xa9, 0x6d, 0xb1, 0x53, 0x28, + 0x69, 0x4a, 0x94, 0xaf, 0x4f, 0xcf, 0x29, 0x39, 0x75, 0x27, 0x30, 0x33, + 0x22, 0x4a, 0x9d, 0x8b, 0x43, 0x68, 0x2e, 0x39, 0x59, 0x44, 0x5e, 0x31, + 0x0e, 0x4f, 0x00, 0x00, 0x00, 0x02, 0x01, 0x17, 0x04, 0xf8, 0x03, 0xc5, + 0x06, 0x04, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x20, 0x40, 0x0d, 0x12, 0x0c, + 0x00, 0x06, 0x00, 0x00, 0x18, 0x19, 0x0f, 0x03, 0x03, 0x15, 0x09, 0x00, + 0x2f, 0x33, 0x33, 0x11, 0x33, 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x10, + 0xcc, 0x32, 0x31, 0x30, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, + 0x06, 0x23, 0x22, 0x26, 0x25, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, + 0x06, 0x23, 0x22, 0x26, 0x01, 0x17, 0x4b, 0x40, 0x42, 0x4b, 0x4c, 0x41, + 0x40, 0x4b, 0x01, 0x93, 0x51, 0x3c, 0x41, 0x4d, 0x4e, 0x40, 0x3c, 0x51, + 0x05, 0x7d, 0x41, 0x46, 0x4a, 0x3d, 0x3c, 0x49, 0x46, 0x3f, 0x46, 0x41, + 0x48, 0x3f, 0x3d, 0x48, 0x41, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x64, + 0xff, 0xec, 0x06, 0x44, 0x05, 0xcb, 0x00, 0x15, 0x00, 0x25, 0x00, 0x35, + 0x00, 0x42, 0x40, 0x1f, 0x03, 0x0e, 0x09, 0x13, 0x0e, 0x13, 0x26, 0x2e, + 0x26, 0x16, 0x2e, 0x1e, 0x16, 0x1e, 0x36, 0x37, 0x05, 0x0b, 0x00, 0x11, + 0x0b, 0x11, 0x0b, 0x11, 0x1a, 0x2a, 0x22, 0x13, 0x32, 0x1a, 0x04, 0x00, + 0x3f, 0x33, 0x3f, 0x33, 0x12, 0x39, 0x39, 0x2f, 0x2f, 0x11, 0x33, 0x11, + 0x33, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, + 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x22, 0x06, 0x15, + 0x10, 0x33, 0x32, 0x36, 0x37, 0x15, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, + 0x36, 0x33, 0x32, 0x17, 0x07, 0x26, 0x01, 0x34, 0x12, 0x24, 0x33, 0x32, + 0x04, 0x12, 0x15, 0x14, 0x02, 0x04, 0x23, 0x22, 0x24, 0x02, 0x37, 0x14, + 0x12, 0x04, 0x33, 0x32, 0x24, 0x12, 0x35, 0x34, 0x02, 0x24, 0x23, 0x22, + 0x04, 0x02, 0x03, 0x7f, 0x61, 0x6a, 0xcb, 0x39, 0x84, 0x39, 0x78, 0x84, + 0xcc, 0xe0, 0xdd, 0xc7, 0x95, 0x9c, 0x4a, 0x71, 0xfc, 0x7d, 0xc8, 0x01, + 0x5e, 0xca, 0xc8, 0x01, 0x5e, 0xca, 0xc2, 0xfe, 0xa2, 0xd0, 0xcf, 0xfe, + 0xa2, 0xc3, 0x8e, 0xa4, 0x01, 0x1c, 0xa2, 0xa4, 0x01, 0x1b, 0xa3, 0xa4, + 0xfe, 0xe4, 0xa2, 0xa4, 0xfe, 0xe5, 0xa3, 0x03, 0xf2, 0x94, 0x83, 0xfe, + 0xe8, 0x1e, 0x1d, 0xbf, 0x39, 0xfa, 0xdd, 0xdc, 0xf5, 0x4e, 0xa8, 0x3a, + 0xfe, 0xe9, 0xc8, 0x01, 0x5e, 0xca, 0xc8, 0xfe, 0xa2, 0xca, 0xc5, 0xfe, + 0xa6, 0xd0, 0xcf, 0x01, 0x5a, 0xc6, 0xa4, 0xfe, 0xe5, 0xa3, 0xa4, 0x01, + 0x1c, 0xa2, 0xa4, 0x01, 0x1b, 0xa3, 0xa4, 0xfe, 0xe4, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x2f, 0x02, 0xf0, 0x02, 0xb8, 0x05, 0xc7, 0x00, 0x17, + 0x00, 0x21, 0x00, 0x41, 0x40, 0x1e, 0x18, 0x07, 0x01, 0x17, 0x17, 0x1e, + 0x10, 0x07, 0x0b, 0x0b, 0x1e, 0x07, 0x1e, 0x22, 0x23, 0x0f, 0x0d, 0x0d, + 0x1f, 0x0b, 0x0b, 0x13, 0x01, 0x1b, 0x1b, 0x00, 0x00, 0x04, 0x13, 0x1f, + 0x00, 0x3f, 0xc4, 0x39, 0x2f, 0x32, 0x11, 0x33, 0x12, 0x39, 0x11, 0x33, + 0x32, 0x12, 0x39, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x12, + 0x39, 0x11, 0x33, 0x12, 0x39, 0x11, 0x33, 0x31, 0x30, 0x01, 0x27, 0x0e, + 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x3f, 0x01, 0x34, 0x23, 0x22, + 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x11, 0x25, 0x14, 0x16, + 0x33, 0x32, 0x36, 0x3d, 0x01, 0x07, 0x06, 0x02, 0x31, 0x1f, 0x2b, 0x7c, + 0x4a, 0x75, 0x7d, 0xa5, 0xb9, 0x63, 0x7f, 0x51, 0x88, 0x42, 0x42, 0x9f, + 0x63, 0x89, 0x95, 0xfe, 0x44, 0x2e, 0x20, 0x4d, 0x59, 0x63, 0x91, 0x02, + 0xfc, 0x6e, 0x3a, 0x40, 0x75, 0x6a, 0x6d, 0x6d, 0x09, 0x04, 0x75, 0x3d, + 0x87, 0x20, 0x32, 0x8e, 0x83, 0xfe, 0x46, 0xd5, 0x26, 0x24, 0x53, 0x41, + 0x24, 0x06, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x52, 0x00, 0x5e, 0x04, 0x9a, + 0x04, 0x04, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x5c, 0x40, 0x2b, 0x0a, 0x0d, + 0x0c, 0x09, 0x0b, 0x0b, 0x0c, 0x03, 0x06, 0x02, 0x04, 0x04, 0x01, 0x05, + 0x0c, 0x08, 0x0c, 0x0c, 0x0f, 0x0d, 0x06, 0x06, 0x03, 0x07, 0x00, 0x00, + 0x0a, 0x03, 0x03, 0x02, 0x0b, 0x04, 0x04, 0x0c, 0x05, 0x05, 0x01, 0x0e, + 0x09, 0x02, 0x02, 0x08, 0x01, 0x00, 0x2f, 0x33, 0x33, 0x11, 0x33, 0x11, + 0x12, 0x39, 0x2f, 0x33, 0x33, 0x11, 0x33, 0x12, 0x39, 0x11, 0x33, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, 0x10, + 0xd6, 0x32, 0x32, 0x11, 0x33, 0xc1, 0x32, 0x11, 0x33, 0x11, 0x33, 0x10, + 0xc1, 0x32, 0x31, 0x30, 0x13, 0x01, 0x17, 0x09, 0x01, 0x07, 0x01, 0x25, + 0x01, 0x17, 0x09, 0x01, 0x07, 0x01, 0x52, 0x01, 0x73, 0xdb, 0xfe, 0xe9, + 0x01, 0x17, 0xdb, 0xfe, 0x8d, 0x01, 0xfa, 0x01, 0x72, 0xdc, 0xfe, 0xe9, + 0x01, 0x17, 0xdc, 0xfe, 0x8e, 0x02, 0x3d, 0x01, 0xc7, 0x77, 0xfe, 0xa4, + 0xfe, 0xa4, 0x77, 0x01, 0xc5, 0x1a, 0x01, 0xc7, 0x77, 0xfe, 0xa4, 0xfe, + 0xa4, 0x77, 0x01, 0xc5, 0x00, 0x01, 0x00, 0x58, 0x00, 0xf8, 0x04, 0x39, + 0x03, 0x3f, 0x00, 0x05, 0x00, 0x1a, 0x40, 0x0a, 0x01, 0x00, 0x00, 0x07, + 0x03, 0x01, 0x01, 0x06, 0x03, 0x04, 0x00, 0x2f, 0x33, 0x12, 0x39, 0x2f, + 0x01, 0x32, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x25, 0x23, 0x11, 0x21, + 0x35, 0x21, 0x04, 0x39, 0xdb, 0xfc, 0xfa, 0x03, 0xe1, 0xf8, 0x01, 0x6c, + 0xdb, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x3d, 0x01, 0xa8, 0x02, 0x56, + 0x02, 0xa2, 0x12, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x64, + 0xff, 0xec, 0x06, 0x44, 0x05, 0xcb, 0x00, 0x0c, 0x00, 0x15, 0x00, 0x25, + 0x00, 0x35, 0x00, 0x66, 0x40, 0x31, 0x04, 0x03, 0x02, 0x05, 0x05, 0x07, + 0x00, 0x11, 0x11, 0x0d, 0x03, 0x0d, 0x07, 0x07, 0x08, 0x03, 0x08, 0x2e, + 0x26, 0x26, 0x16, 0x2e, 0x1e, 0x16, 0x1e, 0x36, 0x37, 0x02, 0x06, 0x06, + 0x0d, 0x0d, 0x04, 0x15, 0x04, 0x08, 0x15, 0x09, 0x08, 0x09, 0x08, 0x09, + 0x1a, 0x2a, 0x22, 0x13, 0x32, 0x1a, 0x04, 0x00, 0x3f, 0x33, 0x3f, 0x33, + 0x12, 0x39, 0x39, 0x2f, 0x2f, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, + 0x11, 0x33, 0x12, 0x39, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x11, 0x12, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, + 0x11, 0x33, 0x12, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x14, + 0x07, 0x13, 0x23, 0x03, 0x23, 0x11, 0x23, 0x11, 0x21, 0x32, 0x16, 0x01, + 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x2b, 0x01, 0x01, 0x34, 0x12, 0x24, + 0x33, 0x32, 0x04, 0x12, 0x15, 0x14, 0x02, 0x04, 0x23, 0x22, 0x24, 0x02, + 0x37, 0x14, 0x12, 0x04, 0x33, 0x32, 0x24, 0x12, 0x35, 0x34, 0x02, 0x24, + 0x23, 0x22, 0x04, 0x02, 0x04, 0x85, 0x8f, 0xed, 0xfe, 0xb2, 0x2f, 0xe5, + 0x01, 0x08, 0xb5, 0xa9, 0xfe, 0x7f, 0x1f, 0x42, 0x39, 0x38, 0x45, 0x1d, + 0xfd, 0x60, 0xc8, 0x01, 0x5e, 0xca, 0xc8, 0x01, 0x5e, 0xca, 0xc2, 0xfe, + 0xa2, 0xd0, 0xcf, 0xfe, 0xa2, 0xc3, 0x8e, 0xa4, 0x01, 0x1c, 0xa2, 0xa4, + 0x01, 0x1b, 0xa3, 0xa4, 0xfe, 0xe4, 0xa2, 0xa4, 0xfe, 0xe5, 0xa3, 0x03, + 0x89, 0xaa, 0x3f, 0xfe, 0x70, 0x01, 0x52, 0xfe, 0xae, 0x03, 0x94, 0x8c, + 0xfe, 0xf2, 0x39, 0x42, 0x41, 0x36, 0xfe, 0xdf, 0xc8, 0x01, 0x5e, 0xca, + 0xc8, 0xfe, 0xa2, 0xca, 0xc5, 0xfe, 0xa6, 0xd0, 0xcf, 0x01, 0x5a, 0xc6, + 0xa4, 0xfe, 0xe5, 0xa3, 0xa4, 0x01, 0x1c, 0xa2, 0xa4, 0x01, 0x1b, 0xa3, + 0xa4, 0xfe, 0xe4, 0x00, 0x00, 0x01, 0xff, 0xfa, 0x06, 0x14, 0x04, 0x06, + 0x06, 0xdd, 0x00, 0x03, 0x00, 0x12, 0xb6, 0x00, 0x05, 0x01, 0x04, 0x02, + 0x01, 0x00, 0x00, 0x3f, 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, 0x31, 0x30, + 0x01, 0x21, 0x35, 0x21, 0x04, 0x06, 0xfb, 0xf4, 0x04, 0x0c, 0x06, 0x14, + 0xc9, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5c, 0x03, 0x19, 0x03, 0x10, + 0x05, 0xcb, 0x00, 0x0e, 0x00, 0x1a, 0x00, 0x18, 0x40, 0x09, 0x00, 0x0f, + 0x0f, 0x1c, 0x1b, 0x12, 0x0c, 0x18, 0x04, 0x00, 0x2f, 0x33, 0xc4, 0x32, + 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x31, 0x30, 0x13, 0x34, 0x3e, 0x01, + 0x33, 0x32, 0x1e, 0x01, 0x15, 0x14, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x37, + 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x5c, + 0x5c, 0xa0, 0x5e, 0x5c, 0xa1, 0x5d, 0x5d, 0xa0, 0x5d, 0x91, 0xc9, 0xbf, + 0x59, 0x42, 0x42, 0x5a, 0x5b, 0x41, 0x40, 0x5b, 0x04, 0x71, 0x5c, 0xa0, + 0x5e, 0x5c, 0xa2, 0x5c, 0x5d, 0xa1, 0x5a, 0xc7, 0x91, 0x40, 0x5a, 0x5c, + 0x3e, 0x3f, 0x5e, 0x5c, 0x00, 0x02, 0x00, 0x58, 0x00, 0x00, 0x04, 0x39, + 0x05, 0x02, 0x00, 0x0b, 0x00, 0x0f, 0x00, 0x36, 0x40, 0x18, 0x0f, 0x07, + 0x07, 0x06, 0x0a, 0x0a, 0x0b, 0x0c, 0x01, 0x01, 0x03, 0x0b, 0x0b, 0x10, + 0x11, 0x0d, 0x0c, 0x0b, 0x09, 0x01, 0x01, 0x06, 0x04, 0x02, 0x00, 0x2f, + 0x33, 0x33, 0x33, 0x11, 0x33, 0x33, 0x2f, 0x33, 0x11, 0x12, 0x01, 0x39, + 0x11, 0x33, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x33, 0x11, 0x33, + 0x31, 0x30, 0x01, 0x21, 0x35, 0x21, 0x11, 0x33, 0x11, 0x21, 0x15, 0x21, + 0x11, 0x23, 0x01, 0x35, 0x21, 0x15, 0x01, 0xdb, 0xfe, 0x7d, 0x01, 0x83, + 0xdb, 0x01, 0x83, 0xfe, 0x7d, 0xdb, 0xfe, 0x7d, 0x03, 0xe1, 0x02, 0xa2, + 0xdb, 0x01, 0x85, 0xfe, 0x7b, 0xdb, 0xfe, 0x7f, 0xfe, 0xdf, 0xdb, 0xdb, + 0x00, 0x01, 0x00, 0x2f, 0x02, 0x4a, 0x02, 0xbe, 0x05, 0xcb, 0x00, 0x16, + 0x00, 0x28, 0x40, 0x12, 0x15, 0x0c, 0x01, 0x06, 0x00, 0x11, 0x01, 0x11, + 0x17, 0x18, 0x09, 0x0e, 0x1f, 0x02, 0x15, 0x15, 0x01, 0x20, 0x00, 0x3f, + 0x33, 0x12, 0x39, 0x3f, 0x33, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, + 0x33, 0x11, 0x33, 0x33, 0x31, 0x30, 0x01, 0x21, 0x35, 0x37, 0x3e, 0x01, + 0x35, 0x34, 0x26, 0x23, 0x22, 0x07, 0x27, 0x36, 0x33, 0x32, 0x16, 0x15, + 0x14, 0x06, 0x0f, 0x01, 0x21, 0x02, 0xbe, 0xfd, 0x79, 0xe0, 0x66, 0x39, + 0x30, 0x28, 0x51, 0x63, 0x7b, 0x93, 0xbd, 0x89, 0x9e, 0x5e, 0x81, 0x69, + 0x01, 0x60, 0x02, 0x4a, 0xa8, 0xdb, 0x64, 0x59, 0x32, 0x26, 0x28, 0x58, + 0x98, 0x81, 0x85, 0x75, 0x55, 0x96, 0x75, 0x5f, 0x00, 0x01, 0x00, 0x3b, + 0x02, 0x39, 0x02, 0xb6, 0x05, 0xc9, 0x00, 0x25, 0x00, 0x3e, 0x40, 0x1d, + 0x14, 0x0b, 0x02, 0x19, 0x19, 0x00, 0x00, 0x20, 0x06, 0x20, 0x0b, 0x10, + 0x06, 0x0b, 0x06, 0x26, 0x27, 0x03, 0x14, 0x14, 0x15, 0x15, 0x09, 0x1c, + 0x23, 0x1f, 0x0e, 0x09, 0x21, 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x12, 0x39, + 0x2f, 0x33, 0x12, 0x39, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x11, 0x33, 0x12, 0x39, 0x31, 0x30, + 0x01, 0x14, 0x07, 0x15, 0x1e, 0x01, 0x15, 0x14, 0x06, 0x23, 0x22, 0x27, + 0x35, 0x16, 0x33, 0x32, 0x35, 0x34, 0x26, 0x2b, 0x01, 0x35, 0x33, 0x32, + 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, 0x33, + 0x32, 0x16, 0x02, 0x9a, 0xaa, 0x5e, 0x68, 0xb0, 0xba, 0x8f, 0x82, 0x94, + 0x7b, 0x8f, 0x58, 0x4e, 0x70, 0x5c, 0x53, 0x51, 0x32, 0x33, 0x2f, 0x54, + 0x39, 0x65, 0x3e, 0x97, 0x67, 0x7f, 0xa2, 0x04, 0xe1, 0x8f, 0x37, 0x0d, + 0x14, 0x6e, 0x4f, 0x79, 0x8b, 0x46, 0xbe, 0x5a, 0x6b, 0x35, 0x35, 0xa0, + 0x34, 0x39, 0x26, 0x32, 0x26, 0x28, 0x8d, 0x2f, 0x3e, 0x80, 0x00, 0x00, + 0x00, 0x01, 0x01, 0x4c, 0x04, 0xd9, 0x03, 0x8d, 0x06, 0x21, 0x00, 0x08, + 0x00, 0x1c, 0x40, 0x0b, 0x03, 0x04, 0x40, 0x08, 0x00, 0x00, 0x09, 0x0a, + 0x04, 0x80, 0x00, 0x00, 0x2f, 0x1a, 0xcd, 0x11, 0x12, 0x01, 0x39, 0x11, + 0x33, 0x1a, 0xc9, 0x32, 0x31, 0x30, 0x01, 0x35, 0x36, 0x37, 0x21, 0x15, + 0x0e, 0x01, 0x07, 0x01, 0x4c, 0xac, 0x3f, 0x01, 0x56, 0x34, 0xfb, 0x47, + 0x04, 0xd9, 0x1b, 0xc8, 0x65, 0x15, 0x34, 0xcd, 0x32, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0xa0, 0xfe, 0x14, 0x04, 0xa8, 0x04, 0x5e, 0x00, 0x18, + 0x00, 0x3f, 0x40, 0x1f, 0x0b, 0x06, 0x06, 0x09, 0x09, 0x1a, 0x12, 0x16, + 0x00, 0x15, 0x15, 0x16, 0x16, 0x19, 0x07, 0x17, 0x0f, 0x16, 0x1b, 0x12, + 0x0c, 0x0f, 0x03, 0x0f, 0x03, 0x47, 0x59, 0x0f, 0x16, 0x0a, 0x15, 0x00, + 0x3f, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x39, 0x18, 0x3f, 0x3f, 0x33, + 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x12, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x12, 0x39, 0x31, 0x30, 0x01, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, + 0x11, 0x21, 0x11, 0x23, 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x27, + 0x1f, 0x01, 0x11, 0x21, 0x11, 0x21, 0x01, 0xd1, 0x58, 0x5e, 0x7e, 0x72, + 0x01, 0x31, 0xe7, 0x2b, 0x0f, 0x2a, 0x78, 0x58, 0x3e, 0x68, 0x20, 0x05, + 0x05, 0xfe, 0xcf, 0x01, 0x31, 0x01, 0xd1, 0x79, 0x79, 0xad, 0xc4, 0x02, + 0x0e, 0xfb, 0xa2, 0x96, 0x55, 0x55, 0x2e, 0x2c, 0x55, 0x9d, 0xfe, 0xc0, + 0x06, 0x4a, 0x00, 0x00, 0x00, 0x01, 0x00, 0x71, 0xfe, 0xfc, 0x04, 0x8f, + 0x06, 0x14, 0x00, 0x0f, 0x00, 0x2f, 0x40, 0x15, 0x0b, 0x10, 0x04, 0x05, + 0x01, 0x00, 0x01, 0x01, 0x10, 0x11, 0x08, 0x08, 0x01, 0x0e, 0x0e, 0x03, + 0x4d, 0x59, 0x0e, 0x05, 0x01, 0x00, 0x2f, 0x33, 0x2f, 0x2b, 0x11, 0x12, + 0x00, 0x39, 0x18, 0x2f, 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x10, 0xc4, + 0x32, 0x11, 0x39, 0x31, 0x30, 0x01, 0x23, 0x11, 0x23, 0x11, 0x23, 0x11, + 0x06, 0x23, 0x22, 0x26, 0x35, 0x10, 0x36, 0x33, 0x21, 0x04, 0x8f, 0xa1, + 0xa6, 0xa2, 0x3e, 0x54, 0xd8, 0xcb, 0xda, 0xe8, 0x02, 0x5c, 0xfe, 0xfc, + 0x06, 0x50, 0xf9, 0xb0, 0x03, 0x33, 0x12, 0xfa, 0xfb, 0x01, 0x04, 0xfe, + 0x00, 0x01, 0x00, 0x75, 0x02, 0x29, 0x01, 0xd3, 0x03, 0x7d, 0x00, 0x0b, + 0x00, 0x15, 0x40, 0x09, 0x06, 0x00, 0x00, 0x0c, 0x03, 0x09, 0x54, 0x59, + 0x03, 0x00, 0x2f, 0x2b, 0x11, 0x01, 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, + 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, 0x75, + 0x5a, 0x56, 0x53, 0x5b, 0x5d, 0x51, 0x54, 0x5c, 0x02, 0xd3, 0x54, 0x56, + 0x58, 0x52, 0x51, 0x59, 0x58, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xdb, + 0xfe, 0x14, 0x01, 0xa2, 0x00, 0x00, 0x00, 0x12, 0x00, 0x34, 0x40, 0x17, + 0x10, 0x0d, 0x0d, 0x05, 0x05, 0x00, 0x0b, 0x0b, 0x13, 0x14, 0x10, 0x10, + 0x0d, 0x14, 0x0d, 0x13, 0x09, 0x0e, 0x06, 0x09, 0x09, 0x03, 0x1b, 0x00, + 0x3f, 0x33, 0x11, 0x33, 0x2f, 0x11, 0x12, 0x39, 0x11, 0x12, 0x39, 0x7c, + 0x2f, 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x33, 0x12, 0x39, 0x11, 0x33, + 0x31, 0x30, 0x05, 0x14, 0x06, 0x23, 0x22, 0x27, 0x35, 0x1e, 0x01, 0x33, + 0x32, 0x35, 0x34, 0x27, 0x37, 0x33, 0x07, 0x1e, 0x01, 0x01, 0xa2, 0x97, + 0x9e, 0x4e, 0x44, 0x1b, 0x5b, 0x19, 0x48, 0xa6, 0x4e, 0xc1, 0x1b, 0x4a, + 0x58, 0xfa, 0x80, 0x72, 0x15, 0xa8, 0x07, 0x0e, 0x3e, 0x53, 0x19, 0x9a, + 0x3d, 0x18, 0x65, 0x00, 0x00, 0x01, 0x00, 0x5c, 0x02, 0x4a, 0x02, 0x48, + 0x05, 0xb6, 0x00, 0x0a, 0x00, 0x2a, 0x40, 0x13, 0x04, 0x09, 0x00, 0x00, + 0x08, 0x01, 0x01, 0x0b, 0x0c, 0x08, 0x07, 0x07, 0x01, 0x04, 0x04, 0x09, + 0x1e, 0x01, 0x20, 0x00, 0x3f, 0x3f, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, + 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x33, 0x12, 0x39, 0x39, 0x31, 0x30, + 0x01, 0x23, 0x11, 0x3f, 0x01, 0x06, 0x0f, 0x01, 0x27, 0x25, 0x33, 0x02, + 0x48, 0xee, 0x03, 0x05, 0x1b, 0x30, 0x4e, 0x6d, 0x01, 0x2d, 0xbf, 0x02, + 0x4a, 0x01, 0xbe, 0x70, 0x5f, 0x24, 0x2a, 0x3d, 0x7f, 0xeb, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x39, 0x02, 0xf0, 0x02, 0xe1, 0x05, 0xc7, 0x00, 0x0b, + 0x00, 0x17, 0x00, 0x1f, 0x40, 0x0d, 0x0c, 0x06, 0x12, 0x00, 0x06, 0x00, + 0x18, 0x19, 0x0f, 0x03, 0x15, 0x09, 0x1f, 0x00, 0x3f, 0x33, 0xc4, 0x32, + 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, + 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x05, + 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x02, + 0xe1, 0xb7, 0x9f, 0x99, 0xb9, 0xb3, 0xa3, 0x98, 0xba, 0xfe, 0x23, 0x41, + 0x48, 0x48, 0x3f, 0x3f, 0x48, 0x48, 0x41, 0x04, 0x5c, 0xab, 0xc1, 0xc5, + 0xa7, 0xa9, 0xc2, 0xc5, 0xa6, 0x64, 0x65, 0x65, 0x64, 0x64, 0x63, 0x63, + 0x00, 0x02, 0x00, 0x52, 0x00, 0x5e, 0x04, 0x9a, 0x04, 0x04, 0x00, 0x06, + 0x00, 0x0d, 0x00, 0x5a, 0x40, 0x2a, 0x0b, 0x09, 0x09, 0x0a, 0x07, 0x08, + 0x04, 0x02, 0x02, 0x03, 0x00, 0x05, 0x01, 0x08, 0x0c, 0x08, 0x08, 0x0e, + 0x0d, 0x06, 0x06, 0x03, 0x07, 0x00, 0x00, 0x0a, 0x03, 0x03, 0x04, 0x09, + 0x02, 0x02, 0x08, 0x01, 0x01, 0x05, 0x0e, 0x0b, 0x04, 0x04, 0x0c, 0x05, + 0x00, 0x2f, 0x33, 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, 0x2f, 0x33, 0x33, + 0x11, 0x33, 0x12, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, + 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, 0x10, 0xd6, 0x32, 0xc1, 0x32, 0x33, + 0x11, 0x33, 0x10, 0xc1, 0x32, 0x33, 0x11, 0x33, 0x31, 0x30, 0x09, 0x01, + 0x27, 0x09, 0x01, 0x37, 0x01, 0x05, 0x01, 0x27, 0x09, 0x01, 0x37, 0x01, + 0x04, 0x9a, 0xfe, 0x8d, 0xdb, 0x01, 0x16, 0xfe, 0xea, 0xdb, 0x01, 0x73, + 0xfe, 0x06, 0xfe, 0x8d, 0xdb, 0x01, 0x16, 0xfe, 0xea, 0xdb, 0x01, 0x73, + 0x02, 0x23, 0xfe, 0x3b, 0x77, 0x01, 0x5c, 0x01, 0x5c, 0x77, 0xfe, 0x39, + 0x1a, 0xfe, 0x3b, 0x77, 0x01, 0x5c, 0x01, 0x5c, 0x77, 0xfe, 0x39, 0x00, + 0x00, 0x04, 0x00, 0x2e, 0x00, 0x00, 0x06, 0x92, 0x05, 0xb6, 0x00, 0x0a, + 0x00, 0x12, 0x00, 0x16, 0x00, 0x21, 0x00, 0x00, 0x25, 0x23, 0x15, 0x23, + 0x35, 0x21, 0x35, 0x01, 0x33, 0x11, 0x33, 0x21, 0x35, 0x34, 0x37, 0x0e, + 0x01, 0x0f, 0x01, 0x13, 0x01, 0x23, 0x09, 0x01, 0x23, 0x11, 0x3f, 0x01, + 0x06, 0x0f, 0x01, 0x27, 0x25, 0x33, 0x06, 0x92, 0x7d, 0xee, 0xfe, 0x81, + 0x01, 0x81, 0xec, 0x7d, 0xfe, 0x95, 0x06, 0x09, 0x35, 0x0f, 0x7f, 0xf9, + 0xfc, 0xd5, 0xef, 0x03, 0x2b, 0xfd, 0xaf, 0xee, 0x03, 0x05, 0x1b, 0x30, + 0x4e, 0x6d, 0x01, 0x2d, 0xbf, 0x98, 0x97, 0x97, 0x9a, 0x02, 0x41, 0xfd, + 0xcd, 0xa4, 0x56, 0x62, 0x1a, 0x6c, 0x17, 0xbf, 0x04, 0x76, 0xfa, 0x4a, + 0x05, 0xb6, 0xfc, 0x94, 0x01, 0xbe, 0x70, 0x5f, 0x24, 0x2a, 0x3d, 0x7f, + 0xeb, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x2e, 0x00, 0x00, 0x06, 0xb4, + 0x05, 0xb6, 0x00, 0x03, 0x00, 0x0e, 0x00, 0x25, 0x00, 0x00, 0x09, 0x01, + 0x23, 0x09, 0x01, 0x23, 0x11, 0x3f, 0x01, 0x06, 0x0f, 0x01, 0x27, 0x25, + 0x33, 0x01, 0x21, 0x35, 0x37, 0x3e, 0x01, 0x35, 0x34, 0x26, 0x23, 0x22, + 0x07, 0x27, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x0f, 0x01, 0x21, + 0x05, 0x5a, 0xfc, 0xd5, 0xef, 0x03, 0x2b, 0xfd, 0xaf, 0xee, 0x03, 0x05, + 0x1b, 0x30, 0x4e, 0x6d, 0x01, 0x2d, 0xbf, 0x04, 0x9a, 0xfd, 0x79, 0xe0, + 0x66, 0x39, 0x30, 0x28, 0x51, 0x63, 0x7b, 0x93, 0xbd, 0x89, 0x9e, 0x5e, + 0x81, 0x69, 0x01, 0x60, 0x05, 0xb6, 0xfa, 0x4a, 0x05, 0xb6, 0xfc, 0x94, + 0x01, 0xbe, 0x70, 0x5f, 0x24, 0x2a, 0x3d, 0x7f, 0xeb, 0xfa, 0x4b, 0xa8, + 0xdb, 0x64, 0x59, 0x32, 0x26, 0x28, 0x58, 0x98, 0x81, 0x85, 0x75, 0x55, + 0x96, 0x75, 0x5f, 0x00, 0x00, 0x04, 0x00, 0x5a, 0x00, 0x00, 0x06, 0xb0, + 0x05, 0xc9, 0x00, 0x0a, 0x00, 0x12, 0x00, 0x16, 0x00, 0x3c, 0x00, 0x00, + 0x25, 0x23, 0x15, 0x23, 0x35, 0x21, 0x35, 0x01, 0x33, 0x11, 0x33, 0x21, + 0x35, 0x34, 0x37, 0x0e, 0x01, 0x0f, 0x01, 0x09, 0x01, 0x23, 0x01, 0x05, + 0x14, 0x07, 0x15, 0x1e, 0x01, 0x15, 0x14, 0x06, 0x23, 0x22, 0x27, 0x35, + 0x16, 0x33, 0x32, 0x35, 0x34, 0x26, 0x2b, 0x01, 0x35, 0x33, 0x32, 0x36, + 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, + 0x16, 0x06, 0xb0, 0x7d, 0xee, 0xfe, 0x81, 0x01, 0x81, 0xec, 0x7d, 0xfe, + 0x95, 0x06, 0x09, 0x35, 0x0f, 0x7f, 0x01, 0x22, 0xfc, 0xd5, 0xef, 0x03, + 0x2b, 0xfe, 0x07, 0xaa, 0x5e, 0x68, 0xb0, 0xba, 0x8f, 0x82, 0x94, 0x7b, + 0x8f, 0x58, 0x4e, 0x70, 0x5c, 0x53, 0x51, 0x32, 0x33, 0x2f, 0x54, 0x39, + 0x65, 0x3e, 0x97, 0x67, 0x7f, 0xa2, 0x98, 0x97, 0x97, 0x9a, 0x02, 0x41, + 0xfd, 0xcd, 0xa4, 0x56, 0x62, 0x1a, 0x6c, 0x17, 0xbf, 0x04, 0x76, 0xfa, + 0x4a, 0x05, 0xb6, 0xd5, 0x8f, 0x37, 0x0d, 0x14, 0x6e, 0x4f, 0x79, 0x8b, + 0x46, 0xbe, 0x5a, 0x6b, 0x35, 0x35, 0xa0, 0x34, 0x39, 0x26, 0x32, 0x26, + 0x28, 0x8d, 0x2f, 0x3e, 0x80, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x3d, + 0xfe, 0x79, 0x03, 0xd7, 0x04, 0x5e, 0x00, 0x1b, 0x00, 0x27, 0x00, 0x46, + 0x40, 0x24, 0x22, 0x1c, 0x1c, 0x1b, 0x00, 0x00, 0x07, 0x07, 0x14, 0x14, + 0x0e, 0x28, 0x0e, 0x29, 0x00, 0x1b, 0x10, 0x1b, 0x02, 0x09, 0x03, 0x1b, + 0x1b, 0x25, 0x25, 0x1f, 0x54, 0x59, 0x25, 0x0f, 0x11, 0x0a, 0x4f, 0x59, + 0x11, 0x23, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x00, 0x33, + 0x18, 0x2f, 0x5f, 0x5e, 0x5d, 0x11, 0x01, 0x33, 0x11, 0x12, 0x39, 0x11, + 0x33, 0x11, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x15, + 0x14, 0x06, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x37, + 0x17, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x01, + 0x3d, 0x01, 0x01, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, + 0x32, 0x16, 0x02, 0xc9, 0x59, 0x6c, 0x6d, 0x39, 0x57, 0x59, 0x4f, 0xb4, + 0x60, 0x66, 0x62, 0xf7, 0x6a, 0xdc, 0xfb, 0x61, 0x8f, 0x5f, 0x35, 0x01, + 0x28, 0x5a, 0x56, 0x53, 0x5b, 0x5d, 0x51, 0x54, 0x5c, 0x02, 0x5e, 0x4a, + 0x62, 0x8e, 0x4d, 0x4e, 0x58, 0x3f, 0x39, 0x4a, 0x3a, 0x2a, 0xdd, 0x38, + 0x45, 0xc1, 0xa9, 0x6c, 0x9e, 0x69, 0x46, 0x4a, 0x3d, 0x3b, 0x01, 0x56, + 0x54, 0x56, 0x58, 0x52, 0x51, 0x59, 0x58, 0x00, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x85, 0x07, 0x73, 0x12, 0x26, 0x00, 0x24, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x43, 0x00, 0x06, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x02, + 0x16, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x85, 0x07, 0x73, 0x12, 0x26, 0x00, 0x24, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x76, 0x00, 0xd1, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x02, + 0x16, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, + 0x00, 0x00, 0x05, 0x85, 0x07, 0x73, 0x00, 0x0d, 0x00, 0x15, 0x00, 0x1b, + 0x00, 0x00, 0x01, 0x26, 0x27, 0x06, 0x07, 0x23, 0x35, 0x36, 0x37, 0x21, + 0x1e, 0x01, 0x17, 0x15, 0x0b, 0x01, 0x21, 0x03, 0x21, 0x01, 0x21, 0x09, + 0x01, 0x02, 0x26, 0x27, 0x06, 0x03, 0x03, 0xaa, 0x9d, 0x4d, 0x4e, 0x97, + 0xcb, 0xbd, 0x43, 0x01, 0x65, 0x1f, 0x99, 0x48, 0x3e, 0x6a, 0xfd, 0xeb, + 0x6a, 0xfe, 0xb2, 0x02, 0x04, 0x01, 0x7b, 0x02, 0x06, 0xfd, 0xfe, 0x93, + 0x25, 0x08, 0x21, 0x9c, 0x06, 0x2b, 0x5d, 0x53, 0x51, 0x5f, 0x1b, 0xbd, + 0x70, 0x34, 0xb3, 0x46, 0x1b, 0xf9, 0xd5, 0x01, 0x5c, 0xfe, 0xa4, 0x05, + 0xbc, 0xfa, 0x44, 0x02, 0x60, 0x01, 0xd9, 0x7c, 0x24, 0x80, 0xfe, 0x07, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x05, 0x85, 0x07, 0x60, 0x00, 0x17, + 0x00, 0x1f, 0x00, 0x25, 0x00, 0x00, 0x01, 0x22, 0x06, 0x07, 0x23, 0x3e, + 0x01, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x37, 0x33, 0x0e, 0x01, + 0x23, 0x22, 0x2e, 0x02, 0x01, 0x03, 0x21, 0x03, 0x21, 0x01, 0x21, 0x09, + 0x01, 0x02, 0x26, 0x27, 0x06, 0x03, 0x02, 0x1f, 0x1f, 0x39, 0x0d, 0x95, + 0x0b, 0x8f, 0x76, 0x29, 0x4f, 0x4d, 0x4a, 0x24, 0x1f, 0x39, 0x0d, 0x95, + 0x0b, 0x91, 0x74, 0x29, 0x4f, 0x4d, 0x4a, 0x01, 0xf4, 0x6a, 0xfd, 0xeb, + 0x6a, 0xfe, 0xb2, 0x02, 0x04, 0x01, 0x7b, 0x02, 0x06, 0xfd, 0xfe, 0x93, + 0x25, 0x08, 0x21, 0x9c, 0x06, 0x94, 0x35, 0x36, 0x91, 0xa4, 0x21, 0x27, + 0x20, 0x34, 0x36, 0x91, 0xa4, 0x21, 0x27, 0x21, 0xf9, 0x6c, 0x01, 0x5c, + 0xfe, 0xa4, 0x05, 0xbc, 0xfa, 0x44, 0x02, 0x60, 0x01, 0xd9, 0x7c, 0x24, + 0x80, 0xfe, 0x07, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x05, 0x85, + 0x07, 0x56, 0x12, 0x26, 0x00, 0x24, 0x00, 0x00, 0x11, 0x07, 0x00, 0x6a, + 0x00, 0x56, 0x01, 0x52, 0x00, 0x0a, 0xb4, 0x03, 0x02, 0x23, 0x05, 0x26, + 0x00, 0x2b, 0x35, 0x35, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x05, 0x85, + 0x07, 0x0a, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x1f, 0x00, 0x25, 0x00, 0x00, + 0x01, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, + 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, + 0x01, 0x03, 0x21, 0x03, 0x21, 0x01, 0x21, 0x09, 0x01, 0x02, 0x26, 0x27, + 0x06, 0x03, 0x03, 0xbf, 0x8e, 0x70, 0x70, 0x88, 0x87, 0x71, 0x6e, 0x90, + 0x9e, 0x36, 0x2a, 0x2a, 0x36, 0x30, 0x30, 0x2a, 0x36, 0x01, 0x16, 0x6a, + 0xfd, 0xeb, 0x6a, 0xfe, 0xb2, 0x02, 0x04, 0x01, 0x7b, 0x02, 0x06, 0xfd, + 0xfe, 0x93, 0x25, 0x08, 0x21, 0x9c, 0x06, 0x1f, 0x6c, 0x84, 0x80, 0x6e, + 0x6c, 0x81, 0x84, 0x69, 0x2d, 0x33, 0x33, 0x2d, 0x2d, 0x34, 0x34, 0xfa, + 0x10, 0x01, 0x5c, 0xfe, 0xa4, 0x05, 0xbc, 0xfa, 0x44, 0x02, 0x60, 0x01, + 0xd9, 0x7c, 0x24, 0x80, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x07, 0x25, 0x05, 0xb6, 0x00, 0x0f, 0x00, 0x13, 0x00, 0x6f, + 0x40, 0x3c, 0x06, 0x13, 0x03, 0x10, 0x13, 0x03, 0x11, 0x04, 0x11, 0x01, + 0x0a, 0x0e, 0x0e, 0x01, 0x01, 0x05, 0x0c, 0x08, 0x00, 0x00, 0x15, 0x04, + 0x05, 0x05, 0x14, 0x10, 0x03, 0x4c, 0x59, 0x0a, 0x0d, 0x4c, 0x59, 0x0c, + 0x0a, 0x01, 0x0d, 0x03, 0x10, 0x0a, 0x10, 0x0a, 0x01, 0x06, 0x13, 0x09, + 0x06, 0x09, 0x4c, 0x59, 0x06, 0x03, 0x04, 0x12, 0x01, 0x0e, 0x4c, 0x59, + 0x01, 0x12, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x3f, 0x2b, 0x11, 0x00, + 0x33, 0x11, 0x12, 0x39, 0x39, 0x18, 0x2f, 0x2f, 0x5f, 0x5e, 0x5d, 0x2b, + 0x2b, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x33, 0x12, + 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x17, 0x39, 0x11, + 0x33, 0x31, 0x30, 0x29, 0x01, 0x11, 0x21, 0x03, 0x21, 0x01, 0x21, 0x15, + 0x21, 0x11, 0x21, 0x15, 0x21, 0x11, 0x21, 0x01, 0x21, 0x11, 0x23, 0x07, + 0x25, 0xfc, 0x97, 0xfe, 0x15, 0x96, 0xfe, 0xc5, 0x02, 0x8f, 0x04, 0x96, + 0xfd, 0xcd, 0x02, 0x0e, 0xfd, 0xf2, 0x02, 0x33, 0xfb, 0x1d, 0x01, 0x7a, + 0x7f, 0x01, 0x5c, 0xfe, 0xa4, 0x05, 0xb6, 0xfe, 0xfe, 0xbf, 0xfe, 0xfe, + 0x87, 0x01, 0x60, 0x02, 0x4e, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x77, + 0xfe, 0x14, 0x04, 0xd1, 0x05, 0xcb, 0x12, 0x26, 0x00, 0x26, 0x00, 0x00, + 0x10, 0x07, 0x00, 0x7a, 0x02, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x00, 0xb8, + 0x00, 0x00, 0x04, 0x02, 0x07, 0x73, 0x12, 0x26, 0x00, 0x28, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x43, 0xff, 0xb7, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x01, + 0x14, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, 0xff, 0xff, 0x00, 0xb8, + 0x00, 0x00, 0x04, 0x02, 0x07, 0x73, 0x12, 0x26, 0x00, 0x28, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x76, 0x00, 0x5c, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x01, + 0x14, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, 0x00, 0x02, 0x00, 0xaf, + 0x00, 0x00, 0x04, 0x14, 0x07, 0x73, 0x00, 0x0d, 0x00, 0x19, 0x00, 0x00, + 0x01, 0x26, 0x27, 0x06, 0x07, 0x23, 0x35, 0x36, 0x37, 0x21, 0x1e, 0x01, + 0x17, 0x15, 0x03, 0x21, 0x11, 0x21, 0x15, 0x21, 0x11, 0x21, 0x15, 0x21, + 0x11, 0x21, 0x03, 0x49, 0x9d, 0x4d, 0x4e, 0x97, 0xcb, 0xbd, 0x43, 0x01, + 0x65, 0x1f, 0x99, 0x48, 0x12, 0xfc, 0xb6, 0x03, 0x4a, 0xfd, 0xec, 0x01, + 0xef, 0xfe, 0x11, 0x02, 0x14, 0x06, 0x2b, 0x5d, 0x53, 0x51, 0x5f, 0x1b, + 0xbd, 0x70, 0x34, 0xb3, 0x46, 0x1b, 0xf9, 0xd5, 0x05, 0xb6, 0xfe, 0xfe, + 0xbf, 0xfe, 0xfe, 0x87, 0xff, 0xff, 0x00, 0xb8, 0x00, 0x00, 0x04, 0x02, + 0x07, 0x56, 0x12, 0x26, 0x00, 0x28, 0x00, 0x00, 0x11, 0x07, 0x00, 0x6a, + 0xff, 0xf9, 0x01, 0x52, 0x00, 0x0a, 0xb4, 0x02, 0x01, 0x21, 0x05, 0x26, + 0x00, 0x2b, 0x35, 0x35, 0xff, 0xff, 0xff, 0xc6, 0x00, 0x00, 0x02, 0x07, + 0x07, 0x73, 0x12, 0x26, 0x00, 0x2c, 0x00, 0x00, 0x11, 0x07, 0x00, 0x43, + 0xfe, 0x7a, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x01, 0x0c, 0x05, 0x26, 0x00, + 0x2b, 0x35, 0x00, 0x00, 0xff, 0xff, 0x00, 0xa7, 0x00, 0x00, 0x02, 0xe8, + 0x07, 0x73, 0x12, 0x26, 0x00, 0x2c, 0x00, 0x00, 0x11, 0x07, 0x00, 0x76, + 0xff, 0x5b, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x01, 0x0c, 0x05, 0x26, 0x00, + 0x2b, 0x35, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa0, 0x00, 0x00, 0x03, 0x05, + 0x07, 0x73, 0x00, 0x0d, 0x00, 0x11, 0x00, 0x00, 0x01, 0x26, 0x27, 0x06, + 0x07, 0x23, 0x35, 0x36, 0x37, 0x21, 0x1e, 0x01, 0x17, 0x15, 0x01, 0x11, + 0x21, 0x11, 0x02, 0x3a, 0x9d, 0x4d, 0x4e, 0x97, 0xcb, 0xbd, 0x43, 0x01, + 0x65, 0x1f, 0x99, 0x48, 0xfd, 0xb3, 0x01, 0x36, 0x06, 0x2b, 0x5d, 0x53, + 0x51, 0x5f, 0x1b, 0xbd, 0x70, 0x34, 0xb3, 0x46, 0x1b, 0xf9, 0xd5, 0x05, + 0xb6, 0xfa, 0x4a, 0x00, 0xff, 0xff, 0xff, 0xfd, 0x00, 0x00, 0x02, 0xab, + 0x07, 0x56, 0x12, 0x26, 0x00, 0x2c, 0x00, 0x00, 0x11, 0x07, 0x00, 0x6a, + 0xfe, 0xe6, 0x01, 0x52, 0x00, 0x0a, 0xb4, 0x02, 0x01, 0x19, 0x05, 0x26, + 0x00, 0x2b, 0x35, 0x35, 0x00, 0x02, 0x00, 0x2f, 0x00, 0x00, 0x05, 0x75, + 0x05, 0xb6, 0x00, 0x0c, 0x00, 0x18, 0x00, 0x48, 0x40, 0x24, 0x0d, 0x06, + 0x06, 0x1a, 0x14, 0x12, 0x16, 0x16, 0x0c, 0x01, 0x0a, 0x0a, 0x19, 0x15, + 0x0c, 0x00, 0x0c, 0x4c, 0x59, 0x12, 0x00, 0x00, 0x0a, 0x02, 0x0a, 0x16, + 0x4c, 0x59, 0x0a, 0x12, 0x02, 0x11, 0x4c, 0x59, 0x02, 0x03, 0x00, 0x3f, + 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x33, + 0x2b, 0x11, 0x00, 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, 0x33, 0x33, 0x11, + 0x33, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, 0x33, 0x11, 0x21, + 0x20, 0x00, 0x11, 0x10, 0x00, 0x29, 0x01, 0x11, 0x23, 0x25, 0x34, 0x26, + 0x2b, 0x01, 0x11, 0x33, 0x15, 0x23, 0x11, 0x33, 0x20, 0x2f, 0x89, 0x01, + 0xcb, 0x01, 0x66, 0x01, 0x8c, 0xfe, 0x65, 0xfe, 0x7c, 0xfe, 0x62, 0x89, + 0x04, 0x04, 0xd0, 0xd2, 0xa3, 0xed, 0xed, 0x83, 0x01, 0xc2, 0x03, 0x52, + 0x02, 0x64, 0xfe, 0x86, 0xfe, 0xad, 0xfe, 0x97, 0xfe, 0x80, 0x02, 0x54, + 0x8d, 0xe8, 0xef, 0xfe, 0x9a, 0xfe, 0xfe, 0xac, 0x00, 0x02, 0x00, 0xb8, + 0x00, 0x00, 0x05, 0xc9, 0x07, 0x60, 0x00, 0x17, 0x00, 0x27, 0x00, 0x00, + 0x01, 0x22, 0x06, 0x07, 0x23, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x33, + 0x32, 0x36, 0x37, 0x33, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x01, 0x21, + 0x01, 0x23, 0x12, 0x15, 0x11, 0x21, 0x11, 0x21, 0x01, 0x33, 0x02, 0x35, + 0x11, 0x21, 0x02, 0x9c, 0x1f, 0x39, 0x0d, 0x95, 0x0b, 0x8f, 0x76, 0x29, + 0x4f, 0x4d, 0x4a, 0x24, 0x1f, 0x39, 0x0d, 0x95, 0x0b, 0x91, 0x74, 0x29, + 0x4f, 0x4d, 0x4a, 0x03, 0x09, 0xfe, 0x76, 0xfd, 0x84, 0x09, 0x13, 0xfe, + 0xeb, 0x01, 0x87, 0x02, 0x7b, 0x07, 0x0f, 0x01, 0x17, 0x06, 0x94, 0x35, + 0x36, 0x91, 0xa4, 0x21, 0x27, 0x20, 0x34, 0x36, 0x91, 0xa4, 0x21, 0x27, + 0x21, 0xf9, 0x6c, 0x04, 0x52, 0xfe, 0xdb, 0x7d, 0xfd, 0x50, 0x05, 0xb6, + 0xfb, 0xb9, 0x01, 0x1d, 0x76, 0x02, 0xb4, 0x00, 0xff, 0xff, 0x00, 0x77, + 0xff, 0xec, 0x05, 0xe7, 0x07, 0x73, 0x12, 0x26, 0x00, 0x32, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x43, 0x00, 0x75, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x02, + 0x1e, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, 0xff, 0xff, 0x00, 0x77, + 0xff, 0xec, 0x05, 0xe7, 0x07, 0x73, 0x12, 0x26, 0x00, 0x32, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x76, 0x01, 0x46, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x02, + 0x1e, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, 0x00, 0x03, 0x00, 0x77, + 0xff, 0xec, 0x05, 0xe7, 0x07, 0x73, 0x00, 0x0d, 0x00, 0x19, 0x00, 0x23, + 0x00, 0x00, 0x01, 0x26, 0x27, 0x06, 0x07, 0x23, 0x35, 0x36, 0x37, 0x21, + 0x1e, 0x01, 0x17, 0x15, 0x01, 0x10, 0x00, 0x21, 0x20, 0x00, 0x11, 0x10, + 0x00, 0x21, 0x20, 0x00, 0x01, 0x14, 0x16, 0x33, 0x20, 0x11, 0x10, 0x21, + 0x22, 0x06, 0x04, 0x17, 0x9d, 0x4d, 0x4e, 0x97, 0xcb, 0xbd, 0x43, 0x01, + 0x65, 0x1f, 0x99, 0x48, 0x01, 0x05, 0xfe, 0x98, 0xfe, 0xb0, 0xfe, 0xb0, + 0xfe, 0x98, 0x01, 0x69, 0x01, 0x51, 0x01, 0x51, 0x01, 0x65, 0xfb, 0xd5, + 0xba, 0xb9, 0x01, 0x73, 0xfe, 0x8f, 0xb9, 0xbc, 0x06, 0x2b, 0x5d, 0x53, + 0x51, 0x5f, 0x1b, 0xbd, 0x70, 0x34, 0xb3, 0x46, 0x1b, 0xfc, 0xb2, 0xfe, + 0x95, 0xfe, 0x7a, 0x01, 0x86, 0x01, 0x6d, 0x01, 0x6d, 0x01, 0x81, 0xfe, + 0x7c, 0xfe, 0x94, 0xf5, 0xf8, 0x01, 0xed, 0x01, 0xee, 0xf9, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x77, 0xff, 0xec, 0x05, 0xe7, 0x07, 0x60, 0x00, 0x17, + 0x00, 0x23, 0x00, 0x2d, 0x00, 0x00, 0x01, 0x22, 0x06, 0x07, 0x23, 0x3e, + 0x01, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x37, 0x33, 0x0e, 0x01, + 0x23, 0x22, 0x2e, 0x02, 0x01, 0x10, 0x00, 0x21, 0x20, 0x00, 0x11, 0x10, + 0x00, 0x21, 0x20, 0x00, 0x01, 0x14, 0x16, 0x33, 0x20, 0x11, 0x10, 0x21, + 0x22, 0x06, 0x02, 0x8c, 0x1f, 0x39, 0x0d, 0x95, 0x0b, 0x8f, 0x76, 0x29, + 0x4f, 0x4d, 0x4a, 0x24, 0x1f, 0x39, 0x0d, 0x95, 0x0b, 0x91, 0x74, 0x29, + 0x4f, 0x4d, 0x4a, 0x03, 0x37, 0xfe, 0x98, 0xfe, 0xb0, 0xfe, 0xb0, 0xfe, + 0x98, 0x01, 0x69, 0x01, 0x51, 0x01, 0x51, 0x01, 0x65, 0xfb, 0xd5, 0xba, + 0xb9, 0x01, 0x73, 0xfe, 0x8f, 0xb9, 0xbc, 0x06, 0x94, 0x35, 0x36, 0x91, + 0xa4, 0x21, 0x27, 0x20, 0x34, 0x36, 0x91, 0xa4, 0x21, 0x27, 0x21, 0xfc, + 0x49, 0xfe, 0x95, 0xfe, 0x7a, 0x01, 0x86, 0x01, 0x6d, 0x01, 0x6d, 0x01, + 0x81, 0xfe, 0x7c, 0xfe, 0x94, 0xf5, 0xf8, 0x01, 0xed, 0x01, 0xee, 0xf9, + 0xff, 0xff, 0x00, 0x77, 0xff, 0xec, 0x05, 0xe7, 0x07, 0x56, 0x12, 0x26, + 0x00, 0x32, 0x00, 0x00, 0x11, 0x07, 0x00, 0x6a, 0x00, 0xc3, 0x01, 0x52, + 0x00, 0x0a, 0xb4, 0x03, 0x02, 0x2b, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x35, + 0x00, 0x01, 0x00, 0x81, 0x01, 0x0c, 0x04, 0x10, 0x04, 0x9a, 0x00, 0x0b, + 0x00, 0x1d, 0x40, 0x0b, 0x06, 0x03, 0x00, 0x09, 0x09, 0x0c, 0x0d, 0x09, + 0x06, 0x03, 0x00, 0x00, 0x19, 0x2f, 0x32, 0x32, 0x32, 0x11, 0x12, 0x01, + 0x39, 0x11, 0x33, 0x33, 0x33, 0x31, 0x30, 0x09, 0x01, 0x37, 0x09, 0x01, + 0x17, 0x09, 0x01, 0x07, 0x09, 0x01, 0x27, 0x01, 0xac, 0xfe, 0xd5, 0x98, + 0x01, 0x2d, 0x01, 0x31, 0x99, 0xfe, 0xcf, 0x01, 0x2d, 0x95, 0xfe, 0xcf, + 0xfe, 0xd3, 0x96, 0x02, 0xd3, 0x01, 0x2d, 0x9a, 0xfe, 0xd5, 0x01, 0x2b, + 0x96, 0xfe, 0xcf, 0xfe, 0xd1, 0x98, 0x01, 0x2d, 0xfe, 0xd5, 0x98, 0x00, + 0x00, 0x03, 0x00, 0x77, 0xff, 0xa6, 0x05, 0xe7, 0x06, 0x04, 0x00, 0x13, + 0x00, 0x1b, 0x00, 0x22, 0x00, 0x39, 0x40, 0x1c, 0x17, 0x1f, 0x1c, 0x14, + 0x14, 0x0a, 0x1c, 0x00, 0x0a, 0x00, 0x23, 0x24, 0x16, 0x1e, 0x21, 0x19, + 0x0d, 0x19, 0x4c, 0x59, 0x0d, 0x04, 0x03, 0x21, 0x4c, 0x59, 0x03, 0x13, + 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x39, + 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, + 0x39, 0x31, 0x30, 0x01, 0x10, 0x00, 0x21, 0x22, 0x27, 0x07, 0x27, 0x37, + 0x26, 0x11, 0x10, 0x00, 0x21, 0x32, 0x17, 0x37, 0x17, 0x07, 0x16, 0x01, + 0x14, 0x17, 0x01, 0x26, 0x23, 0x22, 0x06, 0x05, 0x34, 0x27, 0x01, 0x16, + 0x33, 0x20, 0x05, 0xe7, 0xfe, 0x98, 0xfe, 0xb0, 0xc5, 0x8b, 0x5a, 0xa2, + 0x5a, 0xc6, 0x01, 0x69, 0x01, 0x51, 0xc6, 0x92, 0x54, 0xa0, 0x58, 0xc2, + 0xfb, 0xd5, 0x38, 0x01, 0xfa, 0x54, 0x69, 0xb9, 0xbc, 0x02, 0xe6, 0x33, + 0xfe, 0x0c, 0x4c, 0x68, 0x01, 0x73, 0x02, 0xdd, 0xfe, 0x95, 0xfe, 0x7a, + 0x41, 0x87, 0x6c, 0x88, 0xc2, 0x01, 0x83, 0x01, 0x6d, 0x01, 0x81, 0x46, + 0x7d, 0x68, 0x83, 0xc2, 0xfe, 0x86, 0xbf, 0x74, 0x02, 0xf4, 0x2d, 0xf9, + 0xf5, 0xb4, 0x75, 0xfd, 0x11, 0x27, 0x00, 0x00, 0xff, 0xff, 0x00, 0xae, + 0xff, 0xec, 0x05, 0x5e, 0x07, 0x73, 0x12, 0x26, 0x00, 0x38, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x43, 0x00, 0x2b, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x01, + 0x1b, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, 0xff, 0xff, 0x00, 0xae, + 0xff, 0xec, 0x05, 0x5e, 0x07, 0x73, 0x12, 0x26, 0x00, 0x38, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x76, 0x01, 0x0e, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x01, + 0x1b, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, 0x00, 0x02, 0x00, 0xae, + 0xff, 0xec, 0x05, 0x5e, 0x07, 0x73, 0x00, 0x0d, 0x00, 0x20, 0x00, 0x00, + 0x01, 0x26, 0x27, 0x06, 0x07, 0x23, 0x35, 0x36, 0x37, 0x21, 0x1e, 0x01, + 0x17, 0x15, 0x17, 0x11, 0x14, 0x06, 0x04, 0x23, 0x20, 0x00, 0x35, 0x11, + 0x21, 0x11, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x11, 0x03, 0xee, 0x9d, + 0x4d, 0x4e, 0x97, 0xcb, 0xbd, 0x43, 0x01, 0x65, 0x1f, 0x99, 0x48, 0xa5, + 0x91, 0xfe, 0xee, 0xbb, 0xfe, 0xe6, 0xfe, 0xc8, 0x01, 0x35, 0x88, 0x9d, + 0x98, 0x89, 0x06, 0x2b, 0x5d, 0x53, 0x51, 0x5f, 0x1b, 0xbd, 0x70, 0x34, + 0xb3, 0x46, 0x1b, 0x75, 0xfc, 0x4e, 0xa2, 0xf4, 0x82, 0x01, 0x21, 0xfb, + 0x03, 0xae, 0xfc, 0x81, 0xa9, 0x9e, 0x9f, 0xaa, 0x03, 0x7d, 0x00, 0x00, + 0xff, 0xff, 0x00, 0xae, 0xff, 0xec, 0x05, 0x5e, 0x07, 0x56, 0x12, 0x26, + 0x00, 0x38, 0x00, 0x00, 0x11, 0x07, 0x00, 0x6a, 0x00, 0x9a, 0x01, 0x52, + 0x00, 0x0a, 0xb4, 0x02, 0x01, 0x28, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x35, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x04, 0xfe, 0x07, 0x73, 0x12, 0x26, + 0x00, 0x3c, 0x00, 0x00, 0x11, 0x07, 0x00, 0x76, 0x00, 0x81, 0x01, 0x52, + 0x00, 0x08, 0xb3, 0x01, 0x11, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, + 0x00, 0x02, 0x00, 0xb8, 0x00, 0x00, 0x04, 0xaa, 0x05, 0xb6, 0x00, 0x0c, + 0x00, 0x15, 0x00, 0x36, 0x40, 0x1c, 0x11, 0x00, 0x00, 0x17, 0x0d, 0x09, + 0x05, 0x05, 0x06, 0x06, 0x16, 0x04, 0x0d, 0x4d, 0x59, 0x09, 0x15, 0x4d, + 0x59, 0x04, 0x09, 0x04, 0x09, 0x06, 0x07, 0x03, 0x06, 0x12, 0x00, 0x3f, + 0x3f, 0x12, 0x39, 0x39, 0x2f, 0x2f, 0x2b, 0x2b, 0x11, 0x01, 0x33, 0x11, + 0x33, 0x11, 0x33, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x14, + 0x04, 0x21, 0x23, 0x11, 0x21, 0x11, 0x21, 0x15, 0x33, 0x32, 0x04, 0x01, + 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x2b, 0x01, 0x04, 0xaa, 0xfe, 0xe3, + 0xfe, 0xfa, 0x99, 0xfe, 0xca, 0x01, 0x36, 0xb2, 0xfe, 0x01, 0x0c, 0xfd, + 0x44, 0x64, 0x91, 0x8e, 0x7f, 0x88, 0x7c, 0x03, 0x02, 0xe5, 0xf8, 0xfe, + 0xdb, 0x05, 0xb6, 0xe5, 0xee, 0xfe, 0x3c, 0x69, 0x7a, 0x6b, 0x68, 0x00, + 0x00, 0x01, 0x00, 0xa0, 0xff, 0xec, 0x05, 0x68, 0x06, 0x1f, 0x00, 0x35, + 0x00, 0x54, 0x40, 0x2b, 0x14, 0x07, 0x21, 0x21, 0x27, 0x27, 0x00, 0x00, + 0x2e, 0x1a, 0x0e, 0x0e, 0x37, 0x2e, 0x2f, 0x2f, 0x36, 0x0e, 0x1a, 0x21, + 0x07, 0x00, 0x27, 0x27, 0x07, 0x1a, 0x03, 0x18, 0x2a, 0x33, 0x2a, 0x47, + 0x59, 0x33, 0x00, 0x2f, 0x15, 0x11, 0x18, 0x4a, 0x59, 0x11, 0x16, 0x00, + 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x17, 0x39, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, + 0x33, 0x11, 0x33, 0x12, 0x39, 0x11, 0x33, 0x11, 0x39, 0x11, 0x33, 0x33, + 0x31, 0x30, 0x01, 0x14, 0x0e, 0x04, 0x15, 0x14, 0x16, 0x17, 0x1e, 0x02, + 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, 0x27, 0x35, 0x1e, 0x01, 0x33, 0x32, + 0x35, 0x34, 0x2e, 0x01, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x3e, + 0x01, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x11, 0x21, 0x11, 0x34, + 0x24, 0x21, 0x32, 0x04, 0x04, 0xe1, 0x2a, 0x40, 0x4a, 0x40, 0x2a, 0x35, + 0x42, 0x92, 0x69, 0x33, 0xe9, 0xe3, 0x63, 0x90, 0x3c, 0x35, 0xa5, 0x40, + 0xa8, 0x20, 0x52, 0x4a, 0x7e, 0x62, 0x46, 0x46, 0x4d, 0x3e, 0x7f, 0x64, + 0x74, 0x82, 0xfe, 0xcf, 0x01, 0x25, 0x01, 0x02, 0xf4, 0x01, 0x26, 0x04, + 0xd9, 0x40, 0x61, 0x4c, 0x3a, 0x30, 0x2a, 0x16, 0x1b, 0x34, 0x28, 0x5b, + 0x62, 0x7a, 0x4e, 0xac, 0xae, 0x1d, 0x22, 0xf2, 0x24, 0x32, 0x7b, 0x29, + 0x33, 0x3c, 0x2a, 0x48, 0x77, 0x51, 0x40, 0x6a, 0x31, 0x37, 0x50, 0x2e, + 0x3c, 0x51, 0x69, 0x60, 0xfb, 0x98, 0x04, 0x73, 0xc9, 0xe3, 0xb1, 0x00, + 0xff, 0xff, 0x00, 0x56, 0xff, 0xec, 0x04, 0x3b, 0x06, 0x21, 0x12, 0x26, + 0x00, 0x44, 0x00, 0x00, 0x11, 0x06, 0x00, 0x43, 0xa3, 0x00, 0x00, 0x08, + 0xb3, 0x02, 0x2b, 0x11, 0x26, 0x00, 0x2b, 0x35, 0xff, 0xff, 0x00, 0x56, + 0xff, 0xec, 0x04, 0x3b, 0x06, 0x21, 0x12, 0x26, 0x00, 0x44, 0x00, 0x00, + 0x11, 0x06, 0x00, 0x76, 0x6d, 0x00, 0x00, 0x08, 0xb3, 0x02, 0x2b, 0x11, + 0x26, 0x00, 0x2b, 0x35, 0x00, 0x03, 0x00, 0x56, 0xff, 0xec, 0x04, 0x3b, + 0x06, 0x20, 0x00, 0x0d, 0x00, 0x26, 0x00, 0x30, 0x00, 0x00, 0x01, 0x26, + 0x27, 0x06, 0x07, 0x23, 0x35, 0x36, 0x37, 0x21, 0x1e, 0x01, 0x17, 0x15, + 0x03, 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x3f, + 0x01, 0x35, 0x34, 0x23, 0x22, 0x07, 0x27, 0x36, 0x33, 0x32, 0x16, 0x15, + 0x11, 0x01, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x33, 0x32, 0x36, 0x35, 0x03, + 0x4b, 0x9d, 0x4d, 0x4e, 0x97, 0xcb, 0xbd, 0x43, 0x01, 0x65, 0x1f, 0x99, + 0x48, 0xb0, 0x3b, 0x08, 0x4d, 0xa3, 0x83, 0xa1, 0xb9, 0xf9, 0xfb, 0xc2, + 0xae, 0x86, 0xb5, 0x65, 0xc1, 0xeb, 0xe1, 0xf0, 0xfe, 0xd1, 0x76, 0x85, + 0x82, 0x94, 0x6a, 0x7f, 0x04, 0xd8, 0x5d, 0x53, 0x51, 0x5f, 0x1b, 0xbd, + 0x70, 0x34, 0xb3, 0x46, 0x1b, 0xfb, 0x28, 0x98, 0x61, 0x4b, 0xb8, 0xaa, + 0xb2, 0xa9, 0x09, 0x06, 0x31, 0xaa, 0x51, 0xce, 0x65, 0xc4, 0xc8, 0xfd, + 0x17, 0x02, 0x06, 0x04, 0x04, 0x58, 0x5a, 0x81, 0x7a, 0x65, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x56, 0xff, 0xec, 0x04, 0x3b, 0x06, 0x0e, 0x00, 0x17, + 0x00, 0x30, 0x00, 0x3a, 0x00, 0x00, 0x01, 0x22, 0x06, 0x07, 0x23, 0x3e, + 0x01, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x37, 0x33, 0x0e, 0x01, + 0x23, 0x22, 0x2e, 0x02, 0x01, 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, + 0x35, 0x34, 0x36, 0x3f, 0x01, 0x35, 0x34, 0x23, 0x22, 0x07, 0x27, 0x36, + 0x33, 0x32, 0x16, 0x15, 0x11, 0x01, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x33, + 0x32, 0x36, 0x35, 0x01, 0xd3, 0x1f, 0x39, 0x0d, 0x95, 0x0b, 0x8f, 0x76, + 0x29, 0x4f, 0x4d, 0x4a, 0x24, 0x1f, 0x39, 0x0d, 0x95, 0x0b, 0x91, 0x74, + 0x29, 0x4f, 0x4d, 0x4a, 0x01, 0x6f, 0x3b, 0x08, 0x4d, 0xa3, 0x83, 0xa1, + 0xb9, 0xf9, 0xfb, 0xc2, 0xae, 0x86, 0xb5, 0x65, 0xc1, 0xeb, 0xe1, 0xf0, + 0xfe, 0xd1, 0x76, 0x85, 0x82, 0x94, 0x6a, 0x7f, 0x05, 0x42, 0x35, 0x36, + 0x91, 0xa4, 0x21, 0x27, 0x20, 0x34, 0x36, 0x91, 0xa4, 0x21, 0x27, 0x21, + 0xfa, 0xbe, 0x98, 0x61, 0x4b, 0xb8, 0xaa, 0xb2, 0xa9, 0x09, 0x06, 0x31, + 0xaa, 0x51, 0xce, 0x65, 0xc4, 0xc8, 0xfd, 0x17, 0x02, 0x06, 0x04, 0x04, + 0x58, 0x5a, 0x81, 0x7a, 0x65, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x56, + 0xff, 0xec, 0x04, 0x3b, 0x06, 0x04, 0x12, 0x26, 0x00, 0x44, 0x00, 0x00, + 0x11, 0x06, 0x00, 0x6a, 0x06, 0x00, 0x00, 0x0a, 0xb4, 0x03, 0x02, 0x38, + 0x11, 0x26, 0x00, 0x2b, 0x35, 0x35, 0x00, 0x00, 0x00, 0x04, 0x00, 0x56, + 0xff, 0xec, 0x04, 0x3b, 0x06, 0xb2, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x30, + 0x00, 0x3a, 0x00, 0x00, 0x01, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, + 0x36, 0x33, 0x32, 0x16, 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, + 0x16, 0x33, 0x32, 0x36, 0x13, 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, + 0x35, 0x34, 0x36, 0x3f, 0x01, 0x35, 0x34, 0x23, 0x22, 0x07, 0x27, 0x36, + 0x33, 0x32, 0x16, 0x15, 0x11, 0x01, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x33, + 0x32, 0x36, 0x35, 0x03, 0x73, 0x8e, 0x70, 0x70, 0x88, 0x87, 0x71, 0x6e, + 0x90, 0x9e, 0x36, 0x2a, 0x2a, 0x36, 0x30, 0x30, 0x2a, 0x36, 0x91, 0x3b, + 0x08, 0x4d, 0xa3, 0x83, 0xa1, 0xb9, 0xf9, 0xfb, 0xc2, 0xae, 0x86, 0xb5, + 0x65, 0xc1, 0xeb, 0xe1, 0xf0, 0xfe, 0xd1, 0x76, 0x85, 0x82, 0x94, 0x6a, + 0x7f, 0x05, 0xc7, 0x6c, 0x84, 0x80, 0x6e, 0x6c, 0x81, 0x84, 0x69, 0x2d, + 0x33, 0x33, 0x2d, 0x2d, 0x34, 0x34, 0xfa, 0x68, 0x98, 0x61, 0x4b, 0xb8, + 0xaa, 0xb2, 0xa9, 0x09, 0x06, 0x31, 0xaa, 0x51, 0xce, 0x65, 0xc4, 0xc8, + 0xfd, 0x17, 0x02, 0x06, 0x04, 0x04, 0x58, 0x5a, 0x81, 0x7a, 0x65, 0x00, + 0x00, 0x03, 0x00, 0x56, 0xff, 0xec, 0x06, 0xfe, 0x04, 0x75, 0x00, 0x28, + 0x00, 0x32, 0x00, 0x38, 0x00, 0x85, 0x40, 0x45, 0x35, 0x36, 0x03, 0x18, + 0x20, 0x20, 0x32, 0x14, 0x0d, 0x0d, 0x32, 0x32, 0x09, 0x36, 0x36, 0x26, + 0x1f, 0x1f, 0x3a, 0x2d, 0x09, 0x09, 0x39, 0x25, 0x20, 0x23, 0x35, 0x20, + 0x4a, 0x59, 0x35, 0x35, 0x06, 0x03, 0x18, 0x00, 0x1b, 0x1b, 0x33, 0x4a, + 0x59, 0x1b, 0x10, 0x0d, 0x29, 0x4b, 0x59, 0x0d, 0x0d, 0x16, 0x06, 0x16, + 0x11, 0x46, 0x59, 0x16, 0x10, 0x00, 0x23, 0x46, 0x59, 0x00, 0x06, 0x06, + 0x2f, 0x46, 0x59, 0x06, 0x16, 0x00, 0x3f, 0x2b, 0x11, 0x00, 0x33, 0x2b, + 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x2b, 0x00, + 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x39, 0x12, 0x39, 0x18, 0x2f, + 0x2b, 0x11, 0x12, 0x00, 0x39, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x33, 0x33, 0x11, 0x12, 0x39, 0x11, 0x33, 0x11, 0x39, 0x11, 0x33, + 0x12, 0x39, 0x39, 0x11, 0x39, 0x31, 0x30, 0x05, 0x22, 0x26, 0x27, 0x0e, + 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x3f, 0x01, 0x35, 0x34, 0x26, + 0x23, 0x22, 0x07, 0x27, 0x36, 0x33, 0x32, 0x17, 0x3e, 0x01, 0x33, 0x32, + 0x00, 0x1d, 0x01, 0x21, 0x1e, 0x01, 0x33, 0x32, 0x37, 0x15, 0x0e, 0x01, + 0x01, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x33, 0x32, 0x36, 0x35, 0x01, 0x22, + 0x07, 0x21, 0x2e, 0x01, 0x05, 0x31, 0x89, 0xe1, 0x48, 0x62, 0xc5, 0x9e, + 0xa1, 0xc3, 0xf2, 0xf1, 0xbf, 0x59, 0x4d, 0x8c, 0xa5, 0x63, 0xbd, 0xe9, + 0xe3, 0x73, 0x42, 0xad, 0x78, 0xdd, 0x01, 0x00, 0xfd, 0x2d, 0x05, 0x90, + 0x82, 0xc4, 0xb8, 0x4f, 0xb8, 0xfd, 0x41, 0x71, 0x7c, 0x7c, 0x8c, 0x65, + 0x78, 0x02, 0x23, 0xd9, 0x11, 0x01, 0xae, 0x02, 0x6a, 0x14, 0x65, 0x69, + 0x75, 0x59, 0xbd, 0xa5, 0xb2, 0xa9, 0x09, 0x06, 0x54, 0x45, 0x42, 0x4d, + 0xca, 0x65, 0x83, 0x40, 0x41, 0xfe, 0xed, 0xe9, 0x94, 0x82, 0x92, 0x58, + 0xec, 0x27, 0x28, 0x02, 0x1a, 0x04, 0x04, 0x57, 0x5b, 0x81, 0x7a, 0x65, + 0x01, 0xf0, 0xec, 0x70, 0x7c, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x5c, + 0xfe, 0x14, 0x03, 0xdd, 0x04, 0x73, 0x12, 0x26, 0x00, 0x46, 0x00, 0x00, + 0x10, 0x07, 0x00, 0x7a, 0x01, 0x83, 0x00, 0x00, 0xff, 0xff, 0x00, 0x5c, + 0xff, 0xec, 0x04, 0x62, 0x06, 0x21, 0x12, 0x26, 0x00, 0x48, 0x00, 0x00, + 0x11, 0x06, 0x00, 0x43, 0xa9, 0x00, 0x00, 0x08, 0xb3, 0x02, 0x24, 0x11, + 0x26, 0x00, 0x2b, 0x35, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xec, 0x04, 0x62, + 0x06, 0x21, 0x12, 0x26, 0x00, 0x48, 0x00, 0x00, 0x11, 0x06, 0x00, 0x76, + 0x73, 0x00, 0x00, 0x08, 0xb3, 0x02, 0x24, 0x11, 0x26, 0x00, 0x2b, 0x35, + 0x00, 0x03, 0x00, 0x5c, 0xff, 0xec, 0x04, 0x62, 0x06, 0x21, 0x00, 0x0d, + 0x00, 0x14, 0x00, 0x29, 0x00, 0x00, 0x01, 0x26, 0x27, 0x06, 0x07, 0x23, + 0x35, 0x36, 0x37, 0x21, 0x1e, 0x01, 0x17, 0x15, 0x01, 0x22, 0x06, 0x07, + 0x21, 0x2e, 0x01, 0x03, 0x20, 0x00, 0x11, 0x10, 0x00, 0x33, 0x32, 0x00, + 0x1d, 0x01, 0x21, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x37, 0x15, 0x0e, 0x01, + 0x03, 0x5c, 0x9d, 0x4d, 0x4e, 0x97, 0xcb, 0xbd, 0x43, 0x01, 0x65, 0x1f, + 0x99, 0x48, 0xfe, 0x48, 0x61, 0x6e, 0x08, 0x01, 0xac, 0x02, 0x72, 0x36, + 0xfe, 0xf2, 0xfe, 0xd0, 0x01, 0x19, 0xf8, 0xed, 0x01, 0x08, 0xfd, 0x2f, + 0x05, 0x90, 0x82, 0x65, 0xb4, 0x62, 0x50, 0xb6, 0x04, 0xd9, 0x5d, 0x53, + 0x51, 0x5f, 0x1b, 0xbd, 0x70, 0x34, 0xb3, 0x46, 0x1b, 0xfe, 0xc1, 0x7b, + 0x71, 0x71, 0x7b, 0xfc, 0x52, 0x01, 0x2a, 0x01, 0x11, 0x01, 0x19, 0x01, + 0x33, 0xfe, 0xf2, 0xee, 0x94, 0x82, 0x92, 0x2a, 0x2e, 0xec, 0x28, 0x27, + 0xff, 0xff, 0x00, 0x5c, 0xff, 0xec, 0x04, 0x62, 0x06, 0x04, 0x12, 0x26, + 0x00, 0x48, 0x00, 0x00, 0x11, 0x06, 0x00, 0x6a, 0x12, 0x00, 0x00, 0x0a, + 0xb4, 0x03, 0x02, 0x31, 0x11, 0x26, 0x00, 0x2b, 0x35, 0x35, 0x00, 0x00, + 0x00, 0x02, 0xff, 0x9b, 0x00, 0x00, 0x01, 0xdc, 0x06, 0x21, 0x00, 0x03, + 0x00, 0x0c, 0x00, 0x00, 0x29, 0x01, 0x11, 0x21, 0x27, 0x2e, 0x01, 0x27, + 0x35, 0x21, 0x16, 0x17, 0x15, 0x01, 0xd1, 0xfe, 0xcf, 0x01, 0x31, 0xbf, + 0x3f, 0xf4, 0x44, 0x01, 0x56, 0x3f, 0xac, 0x04, 0x5e, 0x7b, 0x2c, 0xc5, + 0x42, 0x15, 0x65, 0xc8, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x91, + 0x00, 0x00, 0x02, 0xd2, 0x06, 0x21, 0x00, 0x03, 0x00, 0x0c, 0x00, 0x00, + 0x29, 0x01, 0x11, 0x21, 0x25, 0x35, 0x36, 0x37, 0x21, 0x15, 0x0e, 0x01, + 0x07, 0x01, 0xd1, 0xfe, 0xcf, 0x01, 0x31, 0xfe, 0xc0, 0xac, 0x3f, 0x01, + 0x56, 0x34, 0xfb, 0x47, 0x04, 0x5e, 0x7b, 0x1b, 0xc8, 0x65, 0x15, 0x34, + 0xcd, 0x32, 0x00, 0x00, 0x00, 0x02, 0xff, 0x86, 0x00, 0x00, 0x02, 0xeb, + 0x06, 0x21, 0x00, 0x0d, 0x00, 0x11, 0x00, 0x00, 0x01, 0x26, 0x27, 0x06, + 0x07, 0x23, 0x35, 0x36, 0x37, 0x21, 0x1e, 0x01, 0x17, 0x15, 0x01, 0x21, + 0x11, 0x21, 0x02, 0x20, 0x9d, 0x4d, 0x4e, 0x97, 0xcb, 0xbd, 0x43, 0x01, + 0x65, 0x1f, 0x99, 0x48, 0xfe, 0xe6, 0xfe, 0xcf, 0x01, 0x31, 0x04, 0xd9, + 0x5d, 0x53, 0x51, 0x5f, 0x1b, 0xbd, 0x70, 0x34, 0xb3, 0x46, 0x1b, 0xfb, + 0x27, 0x04, 0x5e, 0x00, 0x00, 0x03, 0xff, 0xe3, 0x00, 0x00, 0x02, 0x91, + 0x06, 0x04, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x1b, 0x00, 0x00, 0x29, 0x01, + 0x11, 0x21, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, + 0x22, 0x26, 0x25, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, + 0x22, 0x26, 0x01, 0xd1, 0xfe, 0xcf, 0x01, 0x31, 0xfe, 0x12, 0x4b, 0x40, + 0x42, 0x4b, 0x4c, 0x41, 0x40, 0x4b, 0x01, 0x93, 0x51, 0x3c, 0x41, 0x4d, + 0x4e, 0x40, 0x3c, 0x51, 0x04, 0x5e, 0x01, 0x1f, 0x41, 0x46, 0x4a, 0x3d, + 0x3c, 0x49, 0x46, 0x3f, 0x46, 0x41, 0x48, 0x3f, 0x3d, 0x48, 0x41, 0x00, + 0x00, 0x02, 0x00, 0x5c, 0xff, 0xec, 0x04, 0x98, 0x06, 0x23, 0x00, 0x1b, + 0x00, 0x27, 0x00, 0x76, 0x40, 0x3b, 0x00, 0x19, 0x02, 0x17, 0x17, 0x1c, + 0x05, 0x08, 0x03, 0x0b, 0x03, 0x02, 0x02, 0x11, 0x1c, 0x1c, 0x0b, 0x0b, + 0x29, 0x22, 0x11, 0x11, 0x28, 0x19, 0x00, 0x18, 0x02, 0x05, 0x08, 0x03, + 0x09, 0x09, 0x18, 0x18, 0x02, 0x16, 0x16, 0x1f, 0x14, 0x14, 0x1f, 0x46, + 0x59, 0x14, 0x14, 0x0e, 0x02, 0x0e, 0x25, 0x46, 0x59, 0x0e, 0x16, 0x03, + 0x02, 0x4b, 0x59, 0x03, 0x01, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, + 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x11, + 0x12, 0x39, 0x11, 0x33, 0x11, 0x12, 0x39, 0x39, 0x11, 0x12, 0x39, 0x39, + 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, + 0x11, 0x33, 0x11, 0x12, 0x39, 0x39, 0x11, 0x33, 0x11, 0x12, 0x39, 0x39, + 0x31, 0x30, 0x01, 0x26, 0x27, 0x37, 0x16, 0x17, 0x37, 0x17, 0x07, 0x16, + 0x12, 0x15, 0x10, 0x00, 0x23, 0x22, 0x00, 0x35, 0x34, 0x00, 0x33, 0x32, + 0x17, 0x37, 0x26, 0x27, 0x07, 0x27, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, + 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x01, 0xfe, 0x50, 0x48, 0x65, 0x90, + 0x72, 0xe1, 0x64, 0xaa, 0x9c, 0x94, 0xfe, 0xde, 0xff, 0xf5, 0xfe, 0xda, + 0x01, 0x04, 0xdd, 0xcd, 0x46, 0x08, 0x43, 0x7d, 0xe6, 0x64, 0x02, 0x12, + 0x7a, 0x6b, 0x79, 0x6f, 0x78, 0x70, 0x7b, 0x6a, 0x05, 0x17, 0x35, 0x27, + 0xb0, 0x41, 0x4c, 0x8b, 0x9a, 0x68, 0x8f, 0xfe, 0x95, 0xe8, 0xfe, 0xe8, + 0xfe, 0xc7, 0x01, 0x12, 0xeb, 0xe9, 0x01, 0x11, 0x62, 0x04, 0xa2, 0x77, + 0x8e, 0x9c, 0xfd, 0x68, 0x6c, 0x82, 0x89, 0x92, 0x8c, 0x8e, 0xa4, 0x00, + 0x00, 0x02, 0x00, 0xa0, 0x00, 0x00, 0x04, 0xa8, 0x06, 0x0e, 0x00, 0x17, + 0x00, 0x2c, 0x00, 0x00, 0x01, 0x22, 0x06, 0x07, 0x23, 0x3e, 0x01, 0x33, + 0x32, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x37, 0x33, 0x0e, 0x01, 0x23, 0x22, + 0x2e, 0x02, 0x01, 0x21, 0x11, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x11, + 0x21, 0x11, 0x33, 0x17, 0x33, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x01, + 0xfc, 0x1f, 0x39, 0x0d, 0x95, 0x0b, 0x8f, 0x76, 0x29, 0x4f, 0x4d, 0x4a, + 0x24, 0x1f, 0x39, 0x0d, 0x95, 0x0b, 0x91, 0x74, 0x29, 0x4f, 0x4d, 0x4a, + 0x02, 0x88, 0xfe, 0xcf, 0x56, 0x5e, 0x80, 0x72, 0xfe, 0xcf, 0xe9, 0x29, + 0x11, 0x33, 0xb3, 0x72, 0xc3, 0xca, 0x05, 0x42, 0x35, 0x36, 0x91, 0xa4, + 0x21, 0x27, 0x20, 0x34, 0x36, 0x91, 0xa4, 0x21, 0x27, 0x21, 0xfa, 0xbe, + 0x02, 0x8d, 0x79, 0x79, 0xab, 0xc6, 0xfd, 0xf2, 0x04, 0x5e, 0x8f, 0x51, + 0x53, 0xd3, 0xc7, 0x00, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xec, 0x04, 0x98, + 0x06, 0x21, 0x12, 0x26, 0x00, 0x52, 0x00, 0x00, 0x11, 0x06, 0x00, 0x43, + 0xa1, 0x00, 0x00, 0x08, 0xb3, 0x02, 0x22, 0x11, 0x26, 0x00, 0x2b, 0x35, + 0xff, 0xff, 0x00, 0x5c, 0xff, 0xec, 0x04, 0x98, 0x06, 0x21, 0x12, 0x26, + 0x00, 0x52, 0x00, 0x00, 0x11, 0x07, 0x00, 0x76, 0x00, 0x87, 0x00, 0x00, + 0x00, 0x08, 0xb3, 0x02, 0x22, 0x11, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x5c, 0xff, 0xec, 0x04, 0x98, 0x06, 0x21, 0x00, 0x0d, + 0x00, 0x19, 0x00, 0x27, 0x00, 0x00, 0x01, 0x26, 0x27, 0x06, 0x07, 0x23, + 0x35, 0x36, 0x37, 0x21, 0x1e, 0x01, 0x17, 0x15, 0x01, 0x14, 0x16, 0x33, + 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x05, 0x10, 0x00, 0x21, + 0x22, 0x26, 0x02, 0x35, 0x10, 0x00, 0x21, 0x32, 0x16, 0x12, 0x03, 0x60, + 0x9d, 0x4d, 0x4e, 0x97, 0xcb, 0xbd, 0x43, 0x01, 0x65, 0x1f, 0x99, 0x48, + 0xfd, 0x68, 0x6d, 0x7b, 0x7a, 0x6b, 0x6c, 0x7b, 0x7a, 0x6c, 0x03, 0x05, + 0xfe, 0xe0, 0xfe, 0xff, 0xa1, 0xf6, 0x84, 0x01, 0x1e, 0x01, 0x03, 0xa1, + 0xf6, 0x84, 0x04, 0xd9, 0x5d, 0x53, 0x51, 0x5f, 0x1b, 0xbd, 0x70, 0x34, + 0xb3, 0x46, 0x1b, 0xfd, 0x58, 0xa6, 0xaa, 0xa9, 0xa7, 0xa6, 0xa6, 0xa5, + 0xa7, 0xfe, 0xef, 0xfe, 0xcc, 0x8d, 0x01, 0x08, 0xb0, 0x01, 0x12, 0x01, + 0x30, 0x8c, 0xfe, 0xfa, 0x00, 0x03, 0x00, 0x5c, 0xff, 0xec, 0x04, 0x98, + 0x06, 0x0e, 0x00, 0x17, 0x00, 0x23, 0x00, 0x31, 0x00, 0x00, 0x01, 0x22, + 0x06, 0x07, 0x23, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x36, + 0x37, 0x33, 0x0e, 0x01, 0x23, 0x22, 0x2e, 0x02, 0x03, 0x14, 0x16, 0x33, + 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x05, 0x10, 0x00, 0x21, + 0x22, 0x26, 0x02, 0x35, 0x10, 0x00, 0x21, 0x32, 0x16, 0x12, 0x01, 0xd5, + 0x1f, 0x39, 0x0d, 0x95, 0x0b, 0x8f, 0x76, 0x29, 0x4f, 0x4d, 0x4a, 0x24, + 0x1f, 0x39, 0x0d, 0x95, 0x0b, 0x91, 0x74, 0x29, 0x4f, 0x4d, 0x4a, 0x66, + 0x6d, 0x7b, 0x7a, 0x6b, 0x6c, 0x7b, 0x7a, 0x6c, 0x03, 0x05, 0xfe, 0xe0, + 0xfe, 0xff, 0xa1, 0xf6, 0x84, 0x01, 0x1e, 0x01, 0x03, 0xa1, 0xf6, 0x84, + 0x05, 0x42, 0x35, 0x36, 0x91, 0xa4, 0x21, 0x27, 0x20, 0x34, 0x36, 0x91, + 0xa4, 0x21, 0x27, 0x21, 0xfc, 0xef, 0xa6, 0xaa, 0xa9, 0xa7, 0xa6, 0xa6, + 0xa5, 0xa7, 0xfe, 0xef, 0xfe, 0xcc, 0x8d, 0x01, 0x08, 0xb0, 0x01, 0x12, + 0x01, 0x30, 0x8c, 0xfe, 0xfa, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x5c, + 0xff, 0xec, 0x04, 0x98, 0x06, 0x04, 0x12, 0x26, 0x00, 0x52, 0x00, 0x00, + 0x11, 0x06, 0x00, 0x6a, 0x0c, 0x00, 0x00, 0x0a, 0xb4, 0x03, 0x02, 0x2f, + 0x11, 0x26, 0x00, 0x2b, 0x35, 0x35, 0x00, 0x00, 0x00, 0x03, 0x00, 0x58, + 0x00, 0xdd, 0x04, 0x39, 0x04, 0xc7, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x1b, + 0x00, 0x2a, 0x40, 0x12, 0x16, 0x0a, 0x0a, 0x10, 0x04, 0x04, 0x00, 0x03, + 0x03, 0x1d, 0x00, 0x1c, 0x19, 0x13, 0x0d, 0x07, 0x00, 0x01, 0x00, 0x2f, + 0x33, 0xc4, 0x32, 0xc4, 0x32, 0x11, 0x01, 0x33, 0x11, 0x33, 0x11, 0x12, + 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, 0x35, 0x21, 0x15, + 0x05, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, + 0x11, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, + 0x58, 0x03, 0xe1, 0xfd, 0x83, 0x4a, 0x42, 0x42, 0x49, 0x4a, 0x41, 0x41, + 0x4b, 0x4a, 0x42, 0x43, 0x48, 0x4a, 0x41, 0x41, 0x4b, 0x02, 0x64, 0xdb, + 0xdb, 0xef, 0x4c, 0x4b, 0x4e, 0x49, 0x46, 0x52, 0x4e, 0x03, 0x04, 0x4b, + 0x4d, 0x51, 0x47, 0x46, 0x51, 0x4e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x5c, + 0xff, 0xb4, 0x04, 0x98, 0x04, 0x91, 0x00, 0x13, 0x00, 0x1b, 0x00, 0x23, + 0x00, 0x39, 0x40, 0x1c, 0x17, 0x1f, 0x1c, 0x14, 0x14, 0x0a, 0x1c, 0x00, + 0x0a, 0x00, 0x25, 0x24, 0x16, 0x1e, 0x21, 0x19, 0x0d, 0x19, 0x47, 0x59, + 0x0d, 0x10, 0x03, 0x21, 0x47, 0x59, 0x03, 0x16, 0x00, 0x3f, 0x2b, 0x00, + 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x39, 0x11, 0x12, 0x01, 0x39, + 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, 0x39, 0x31, 0x30, 0x01, + 0x10, 0x00, 0x21, 0x22, 0x27, 0x07, 0x27, 0x37, 0x26, 0x11, 0x10, 0x00, + 0x21, 0x32, 0x17, 0x37, 0x17, 0x07, 0x16, 0x01, 0x14, 0x17, 0x01, 0x26, + 0x23, 0x22, 0x06, 0x05, 0x34, 0x27, 0x01, 0x16, 0x33, 0x32, 0x36, 0x04, + 0x98, 0xfe, 0xe0, 0xfe, 0xff, 0x7e, 0x6c, 0x43, 0x9a, 0x44, 0x98, 0x01, + 0x1e, 0x01, 0x03, 0x84, 0x74, 0x37, 0x98, 0x3a, 0x8e, 0xfc, 0xfb, 0x13, + 0x01, 0x3d, 0x2b, 0x3f, 0x7a, 0x6c, 0x01, 0xcd, 0x0c, 0xfe, 0xcb, 0x26, + 0x36, 0x7a, 0x6b, 0x02, 0x31, 0xfe, 0xef, 0xfe, 0xcc, 0x2d, 0x65, 0x69, + 0x64, 0x9c, 0x01, 0x14, 0x01, 0x12, 0x01, 0x30, 0x34, 0x52, 0x6c, 0x54, + 0x9b, 0xfe, 0xfb, 0x5e, 0x48, 0x01, 0xdb, 0x17, 0xa5, 0xa7, 0x51, 0x3c, + 0xfe, 0x32, 0x0f, 0xa9, 0xff, 0xff, 0x00, 0x9a, 0xff, 0xec, 0x04, 0xa2, + 0x06, 0x21, 0x12, 0x26, 0x00, 0x58, 0x00, 0x00, 0x11, 0x06, 0x00, 0x43, + 0xa9, 0x00, 0x00, 0x08, 0xb3, 0x01, 0x1d, 0x11, 0x26, 0x00, 0x2b, 0x35, + 0xff, 0xff, 0x00, 0x9a, 0xff, 0xec, 0x04, 0xa2, 0x06, 0x21, 0x12, 0x26, + 0x00, 0x58, 0x00, 0x00, 0x11, 0x07, 0x00, 0x76, 0x00, 0xa6, 0x00, 0x00, + 0x00, 0x08, 0xb3, 0x01, 0x1d, 0x11, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x9a, 0xff, 0xec, 0x04, 0xa2, 0x06, 0x21, 0x00, 0x0d, + 0x00, 0x22, 0x00, 0x00, 0x01, 0x26, 0x27, 0x06, 0x07, 0x23, 0x35, 0x36, + 0x37, 0x21, 0x1e, 0x01, 0x17, 0x15, 0x03, 0x27, 0x23, 0x0e, 0x01, 0x23, + 0x22, 0x26, 0x35, 0x11, 0x21, 0x11, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, + 0x11, 0x21, 0x11, 0x03, 0x85, 0x9d, 0x4d, 0x4e, 0x97, 0xcb, 0xbd, 0x43, + 0x01, 0x65, 0x1f, 0x99, 0x48, 0x98, 0x29, 0x10, 0x31, 0xb4, 0x73, 0xc5, + 0xc8, 0x01, 0x31, 0x56, 0x5e, 0x80, 0x72, 0x01, 0x31, 0x04, 0xd9, 0x5d, + 0x53, 0x51, 0x5f, 0x1b, 0xbd, 0x70, 0x34, 0xb3, 0x46, 0x1b, 0xfb, 0x27, + 0x8f, 0x4e, 0x55, 0xd3, 0xc6, 0x02, 0xd9, 0xfd, 0x73, 0x79, 0x79, 0xab, + 0xc6, 0x02, 0x0e, 0xfb, 0xa2, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x9a, + 0xff, 0xec, 0x04, 0xa2, 0x06, 0x04, 0x12, 0x26, 0x00, 0x58, 0x00, 0x00, + 0x11, 0x06, 0x00, 0x6a, 0x2f, 0x00, 0x00, 0x0a, 0xb4, 0x02, 0x01, 0x2a, + 0x11, 0x26, 0x00, 0x2b, 0x35, 0x35, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0xfe, 0x14, 0x04, 0x8d, 0x06, 0x21, 0x12, 0x26, 0x00, 0x5c, 0x00, 0x00, + 0x11, 0x06, 0x00, 0x76, 0x3d, 0x00, 0x00, 0x08, 0xb3, 0x01, 0x1f, 0x11, + 0x26, 0x00, 0x2b, 0x35, 0x00, 0x02, 0x00, 0xa0, 0xfe, 0x14, 0x04, 0xb4, + 0x06, 0x14, 0x00, 0x15, 0x00, 0x21, 0x00, 0x44, 0x40, 0x22, 0x1f, 0x06, + 0x06, 0x23, 0x15, 0x0c, 0x10, 0x1a, 0x13, 0x0f, 0x0f, 0x10, 0x10, 0x22, + 0x11, 0x00, 0x10, 0x1b, 0x0c, 0x15, 0x09, 0x03, 0x09, 0x1d, 0x47, 0x59, + 0x09, 0x16, 0x03, 0x16, 0x47, 0x59, 0x03, 0x10, 0x00, 0x3f, 0x2b, 0x00, + 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x39, 0x18, 0x3f, 0x3f, 0x11, + 0x01, 0x33, 0x11, 0x33, 0x11, 0x33, 0x33, 0x12, 0x39, 0x39, 0x11, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x01, 0x3e, 0x01, 0x33, 0x32, 0x12, 0x11, 0x10, + 0x02, 0x23, 0x22, 0x27, 0x23, 0x1f, 0x01, 0x11, 0x21, 0x11, 0x21, 0x11, + 0x0f, 0x01, 0x17, 0x22, 0x06, 0x07, 0x15, 0x14, 0x16, 0x33, 0x32, 0x11, + 0x34, 0x26, 0x01, 0xd1, 0x32, 0xa2, 0x69, 0xc6, 0xe0, 0xdf, 0xc7, 0xd5, + 0x68, 0x0e, 0x07, 0x07, 0xfe, 0xcf, 0x01, 0x31, 0x07, 0x07, 0xe9, 0x71, + 0x68, 0x02, 0x6b, 0x74, 0xcd, 0x65, 0x03, 0xcd, 0x51, 0x55, 0xfe, 0xcb, + 0xfe, 0xf3, 0xfe, 0xef, 0xfe, 0xcc, 0x89, 0x3e, 0x5e, 0xfe, 0x3b, 0x08, + 0x00, 0xfe, 0x79, 0x78, 0x48, 0x4e, 0x8b, 0xa0, 0x21, 0xb4, 0x9c, 0x01, + 0x52, 0xa5, 0xa5, 0x00, 0xff, 0xff, 0x00, 0x00, 0xfe, 0x14, 0x04, 0x8d, + 0x06, 0x04, 0x12, 0x26, 0x00, 0x5c, 0x00, 0x00, 0x11, 0x06, 0x00, 0x6a, + 0xdc, 0x00, 0x00, 0x0a, 0xb4, 0x02, 0x01, 0x2c, 0x11, 0x26, 0x00, 0x2b, + 0x35, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x1a, 0x72, + 0x00, 0x01, 0x04, 0x66, 0x18, 0x00, 0x00, 0x0a, 0x02, 0x64, 0x00, 0x05, + 0x00, 0x24, 0xff, 0x71, 0x00, 0x05, 0x00, 0x37, 0x00, 0x29, 0x00, 0x05, + 0x00, 0x39, 0x00, 0x29, 0x00, 0x05, 0x00, 0x3a, 0x00, 0x29, 0x00, 0x05, + 0x00, 0x3c, 0x00, 0x14, 0x00, 0x05, 0x00, 0x44, 0xff, 0xae, 0x00, 0x05, + 0x00, 0x46, 0xff, 0x85, 0x00, 0x05, 0x00, 0x47, 0xff, 0x85, 0x00, 0x05, + 0x00, 0x48, 0xff, 0x85, 0x00, 0x05, 0x00, 0x4a, 0xff, 0xc3, 0x00, 0x05, + 0x00, 0x50, 0xff, 0xc3, 0x00, 0x05, 0x00, 0x51, 0xff, 0xc3, 0x00, 0x05, + 0x00, 0x52, 0xff, 0x85, 0x00, 0x05, 0x00, 0x53, 0xff, 0xc3, 0x00, 0x05, + 0x00, 0x54, 0xff, 0x85, 0x00, 0x05, 0x00, 0x55, 0xff, 0xc3, 0x00, 0x05, + 0x00, 0x56, 0xff, 0xc3, 0x00, 0x05, 0x00, 0x58, 0xff, 0xc3, 0x00, 0x05, + 0x00, 0x82, 0xff, 0x71, 0x00, 0x05, 0x00, 0x83, 0xff, 0x71, 0x00, 0x05, + 0x00, 0x84, 0xff, 0x71, 0x00, 0x05, 0x00, 0x85, 0xff, 0x71, 0x00, 0x05, + 0x00, 0x86, 0xff, 0x71, 0x00, 0x05, 0x00, 0x87, 0xff, 0x71, 0x00, 0x05, + 0x00, 0x9f, 0x00, 0x14, 0x00, 0x05, 0x00, 0xa2, 0xff, 0x85, 0x00, 0x05, + 0x00, 0xa3, 0xff, 0xae, 0x00, 0x05, 0x00, 0xa4, 0xff, 0xae, 0x00, 0x05, + 0x00, 0xa5, 0xff, 0xae, 0x00, 0x05, 0x00, 0xa6, 0xff, 0xae, 0x00, 0x05, + 0x00, 0xa7, 0xff, 0xae, 0x00, 0x05, 0x00, 0xa8, 0xff, 0xae, 0x00, 0x05, + 0x00, 0xa9, 0xff, 0x85, 0x00, 0x05, 0x00, 0xaa, 0xff, 0x85, 0x00, 0x05, + 0x00, 0xab, 0xff, 0x85, 0x00, 0x05, 0x00, 0xac, 0xff, 0x85, 0x00, 0x05, + 0x00, 0xad, 0xff, 0x85, 0x00, 0x05, 0x00, 0xb4, 0xff, 0x85, 0x00, 0x05, + 0x00, 0xb5, 0xff, 0x85, 0x00, 0x05, 0x00, 0xb6, 0xff, 0x85, 0x00, 0x05, + 0x00, 0xb7, 0xff, 0x85, 0x00, 0x05, 0x00, 0xb8, 0xff, 0x85, 0x00, 0x05, + 0x00, 0xba, 0xff, 0x85, 0x00, 0x05, 0x00, 0xbb, 0xff, 0xc3, 0x00, 0x05, + 0x00, 0xbc, 0xff, 0xc3, 0x00, 0x05, 0x00, 0xbd, 0xff, 0xc3, 0x00, 0x05, + 0x00, 0xbe, 0xff, 0xc3, 0x00, 0x0a, 0x00, 0x24, 0xff, 0x71, 0x00, 0x0a, + 0x00, 0x37, 0x00, 0x29, 0x00, 0x0a, 0x00, 0x39, 0x00, 0x29, 0x00, 0x0a, + 0x00, 0x3a, 0x00, 0x29, 0x00, 0x0a, 0x00, 0x3c, 0x00, 0x14, 0x00, 0x0a, + 0x00, 0x44, 0xff, 0xae, 0x00, 0x0a, 0x00, 0x46, 0xff, 0x85, 0x00, 0x0a, + 0x00, 0x47, 0xff, 0x85, 0x00, 0x0a, 0x00, 0x48, 0xff, 0x85, 0x00, 0x0a, + 0x00, 0x4a, 0xff, 0xc3, 0x00, 0x0a, 0x00, 0x50, 0xff, 0xc3, 0x00, 0x0a, + 0x00, 0x51, 0xff, 0xc3, 0x00, 0x0a, 0x00, 0x52, 0xff, 0x85, 0x00, 0x0a, + 0x00, 0x53, 0xff, 0xc3, 0x00, 0x0a, 0x00, 0x54, 0xff, 0x85, 0x00, 0x0a, + 0x00, 0x55, 0xff, 0xc3, 0x00, 0x0a, 0x00, 0x56, 0xff, 0xc3, 0x00, 0x0a, + 0x00, 0x58, 0xff, 0xc3, 0x00, 0x0a, 0x00, 0x82, 0xff, 0x71, 0x00, 0x0a, + 0x00, 0x83, 0xff, 0x71, 0x00, 0x0a, 0x00, 0x84, 0xff, 0x71, 0x00, 0x0a, + 0x00, 0x85, 0xff, 0x71, 0x00, 0x0a, 0x00, 0x86, 0xff, 0x71, 0x00, 0x0a, + 0x00, 0x87, 0xff, 0x71, 0x00, 0x0a, 0x00, 0x9f, 0x00, 0x14, 0x00, 0x0a, + 0x00, 0xa2, 0xff, 0x85, 0x00, 0x0a, 0x00, 0xa3, 0xff, 0xae, 0x00, 0x0a, + 0x00, 0xa4, 0xff, 0xae, 0x00, 0x0a, 0x00, 0xa5, 0xff, 0xae, 0x00, 0x0a, + 0x00, 0xa6, 0xff, 0xae, 0x00, 0x0a, 0x00, 0xa7, 0xff, 0xae, 0x00, 0x0a, + 0x00, 0xa8, 0xff, 0xae, 0x00, 0x0a, 0x00, 0xa9, 0xff, 0x85, 0x00, 0x0a, + 0x00, 0xaa, 0xff, 0x85, 0x00, 0x0a, 0x00, 0xab, 0xff, 0x85, 0x00, 0x0a, + 0x00, 0xac, 0xff, 0x85, 0x00, 0x0a, 0x00, 0xad, 0xff, 0x85, 0x00, 0x0a, + 0x00, 0xb4, 0xff, 0x85, 0x00, 0x0a, 0x00, 0xb5, 0xff, 0x85, 0x00, 0x0a, + 0x00, 0xb6, 0xff, 0x85, 0x00, 0x0a, 0x00, 0xb7, 0xff, 0x85, 0x00, 0x0a, + 0x00, 0xb8, 0xff, 0x85, 0x00, 0x0a, 0x00, 0xba, 0xff, 0x85, 0x00, 0x0a, + 0x00, 0xbb, 0xff, 0xc3, 0x00, 0x0a, 0x00, 0xbc, 0xff, 0xc3, 0x00, 0x0a, + 0x00, 0xbd, 0xff, 0xc3, 0x00, 0x0a, 0x00, 0xbe, 0xff, 0xc3, 0x00, 0x0b, + 0x00, 0x2d, 0x00, 0xb8, 0x00, 0x0f, 0x00, 0x26, 0xff, 0x9a, 0x00, 0x0f, + 0x00, 0x2a, 0xff, 0x9a, 0x00, 0x0f, 0x00, 0x32, 0xff, 0x9a, 0x00, 0x0f, + 0x00, 0x34, 0xff, 0x9a, 0x00, 0x0f, 0x00, 0x37, 0xff, 0x71, 0x00, 0x0f, + 0x00, 0x38, 0xff, 0xd7, 0x00, 0x0f, 0x00, 0x39, 0xff, 0x85, 0x00, 0x0f, + 0x00, 0x3a, 0xff, 0x85, 0x00, 0x0f, 0x00, 0x3c, 0xff, 0x85, 0x00, 0x0f, + 0x00, 0x89, 0xff, 0x9a, 0x00, 0x0f, 0x00, 0x94, 0xff, 0x9a, 0x00, 0x0f, + 0x00, 0x95, 0xff, 0x9a, 0x00, 0x0f, 0x00, 0x96, 0xff, 0x9a, 0x00, 0x0f, + 0x00, 0x97, 0xff, 0x9a, 0x00, 0x0f, 0x00, 0x98, 0xff, 0x9a, 0x00, 0x0f, + 0x00, 0x9a, 0xff, 0x9a, 0x00, 0x0f, 0x00, 0x9b, 0xff, 0xd7, 0x00, 0x0f, + 0x00, 0x9c, 0xff, 0xd7, 0x00, 0x0f, 0x00, 0x9d, 0xff, 0xd7, 0x00, 0x0f, + 0x00, 0x9e, 0xff, 0xd7, 0x00, 0x0f, 0x00, 0x9f, 0xff, 0x85, 0x00, 0x10, + 0x00, 0x37, 0xff, 0xae, 0x00, 0x11, 0x00, 0x26, 0xff, 0x9a, 0x00, 0x11, + 0x00, 0x2a, 0xff, 0x9a, 0x00, 0x11, 0x00, 0x32, 0xff, 0x9a, 0x00, 0x11, + 0x00, 0x34, 0xff, 0x9a, 0x00, 0x11, 0x00, 0x37, 0xff, 0x71, 0x00, 0x11, + 0x00, 0x38, 0xff, 0xd7, 0x00, 0x11, 0x00, 0x39, 0xff, 0x85, 0x00, 0x11, + 0x00, 0x3a, 0xff, 0x85, 0x00, 0x11, 0x00, 0x3c, 0xff, 0x85, 0x00, 0x11, + 0x00, 0x89, 0xff, 0x9a, 0x00, 0x11, 0x00, 0x94, 0xff, 0x9a, 0x00, 0x11, + 0x00, 0x95, 0xff, 0x9a, 0x00, 0x11, 0x00, 0x96, 0xff, 0x9a, 0x00, 0x11, + 0x00, 0x97, 0xff, 0x9a, 0x00, 0x11, 0x00, 0x98, 0xff, 0x9a, 0x00, 0x11, + 0x00, 0x9a, 0xff, 0x9a, 0x00, 0x11, 0x00, 0x9b, 0xff, 0xd7, 0x00, 0x11, + 0x00, 0x9c, 0xff, 0xd7, 0x00, 0x11, 0x00, 0x9d, 0xff, 0xd7, 0x00, 0x11, + 0x00, 0x9e, 0xff, 0xd7, 0x00, 0x11, 0x00, 0x9f, 0xff, 0x85, 0x00, 0x24, + 0x00, 0x05, 0xff, 0x71, 0x00, 0x24, 0x00, 0x0a, 0xff, 0x71, 0x00, 0x24, + 0x00, 0x26, 0xff, 0xd7, 0x00, 0x24, 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x24, + 0x00, 0x2d, 0x01, 0x0a, 0x00, 0x24, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x24, + 0x00, 0x34, 0xff, 0xd7, 0x00, 0x24, 0x00, 0x37, 0xff, 0x71, 0x00, 0x24, + 0x00, 0x39, 0xff, 0xae, 0x00, 0x24, 0x00, 0x3a, 0xff, 0xae, 0x00, 0x24, + 0x00, 0x3c, 0xff, 0x85, 0x00, 0x24, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x24, + 0x00, 0x94, 0xff, 0xd7, 0x00, 0x24, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x24, + 0x00, 0x96, 0xff, 0xd7, 0x00, 0x24, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x24, + 0x00, 0x98, 0xff, 0xd7, 0x00, 0x24, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x24, + 0x00, 0x9f, 0xff, 0x85, 0x00, 0x25, 0x00, 0x0f, 0xff, 0xae, 0x00, 0x25, + 0x00, 0x11, 0xff, 0xae, 0x00, 0x25, 0x00, 0x24, 0xff, 0xd7, 0x00, 0x25, + 0x00, 0x37, 0xff, 0xc3, 0x00, 0x25, 0x00, 0x39, 0xff, 0xec, 0x00, 0x25, + 0x00, 0x3a, 0xff, 0xec, 0x00, 0x25, 0x00, 0x3b, 0xff, 0xd7, 0x00, 0x25, + 0x00, 0x3c, 0xff, 0xec, 0x00, 0x25, 0x00, 0x3d, 0xff, 0xec, 0x00, 0x25, + 0x00, 0x82, 0xff, 0xd7, 0x00, 0x25, 0x00, 0x83, 0xff, 0xd7, 0x00, 0x25, + 0x00, 0x84, 0xff, 0xd7, 0x00, 0x25, 0x00, 0x85, 0xff, 0xd7, 0x00, 0x25, + 0x00, 0x86, 0xff, 0xd7, 0x00, 0x25, 0x00, 0x87, 0xff, 0xd7, 0x00, 0x25, + 0x00, 0x9f, 0xff, 0xec, 0x00, 0x26, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x26, + 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x26, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x26, + 0x00, 0x34, 0xff, 0xd7, 0x00, 0x26, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x26, + 0x00, 0x94, 0xff, 0xd7, 0x00, 0x26, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x26, + 0x00, 0x96, 0xff, 0xd7, 0x00, 0x26, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x26, + 0x00, 0x98, 0xff, 0xd7, 0x00, 0x26, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x27, + 0x00, 0x0f, 0xff, 0xae, 0x00, 0x27, 0x00, 0x11, 0xff, 0xae, 0x00, 0x27, + 0x00, 0x24, 0xff, 0xd7, 0x00, 0x27, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x27, + 0x00, 0x39, 0xff, 0xec, 0x00, 0x27, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x27, + 0x00, 0x3b, 0xff, 0xd7, 0x00, 0x27, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x27, + 0x00, 0x3d, 0xff, 0xec, 0x00, 0x27, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x27, + 0x00, 0x83, 0xff, 0xd7, 0x00, 0x27, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x27, + 0x00, 0x85, 0xff, 0xd7, 0x00, 0x27, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x27, + 0x00, 0x87, 0xff, 0xd7, 0x00, 0x27, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x28, + 0x00, 0x2d, 0x00, 0x7b, 0x00, 0x29, 0x00, 0x0f, 0xff, 0x85, 0x00, 0x29, + 0x00, 0x11, 0xff, 0x85, 0x00, 0x29, 0x00, 0x22, 0x00, 0x29, 0x00, 0x29, + 0x00, 0x24, 0xff, 0xd7, 0x00, 0x29, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x29, + 0x00, 0x83, 0xff, 0xd7, 0x00, 0x29, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x29, + 0x00, 0x85, 0xff, 0xd7, 0x00, 0x29, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x29, + 0x00, 0x87, 0xff, 0xd7, 0x00, 0x2e, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x2e, + 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x2e, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x2e, + 0x00, 0x34, 0xff, 0xd7, 0x00, 0x2e, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x2e, + 0x00, 0x94, 0xff, 0xd7, 0x00, 0x2e, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x2e, + 0x00, 0x96, 0xff, 0xd7, 0x00, 0x2e, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x2e, + 0x00, 0x98, 0xff, 0xd7, 0x00, 0x2e, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x2f, + 0x00, 0x05, 0xff, 0x5c, 0x00, 0x2f, 0x00, 0x0a, 0xff, 0x5c, 0x00, 0x2f, + 0x00, 0x26, 0xff, 0xd7, 0x00, 0x2f, 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x2f, + 0x00, 0x32, 0xff, 0xd7, 0x00, 0x2f, 0x00, 0x34, 0xff, 0xd7, 0x00, 0x2f, + 0x00, 0x37, 0xff, 0xd7, 0x00, 0x2f, 0x00, 0x38, 0xff, 0xec, 0x00, 0x2f, + 0x00, 0x39, 0xff, 0xd7, 0x00, 0x2f, 0x00, 0x3a, 0xff, 0xd7, 0x00, 0x2f, + 0x00, 0x3c, 0xff, 0xc3, 0x00, 0x2f, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x2f, + 0x00, 0x94, 0xff, 0xd7, 0x00, 0x2f, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x2f, + 0x00, 0x96, 0xff, 0xd7, 0x00, 0x2f, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x2f, + 0x00, 0x98, 0xff, 0xd7, 0x00, 0x2f, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x2f, + 0x00, 0x9b, 0xff, 0xec, 0x00, 0x2f, 0x00, 0x9c, 0xff, 0xec, 0x00, 0x2f, + 0x00, 0x9d, 0xff, 0xec, 0x00, 0x2f, 0x00, 0x9e, 0xff, 0xec, 0x00, 0x2f, + 0x00, 0x9f, 0xff, 0xc3, 0x00, 0x32, 0x00, 0x0f, 0xff, 0xae, 0x00, 0x32, + 0x00, 0x11, 0xff, 0xae, 0x00, 0x32, 0x00, 0x24, 0xff, 0xd7, 0x00, 0x32, + 0x00, 0x37, 0xff, 0xc3, 0x00, 0x32, 0x00, 0x39, 0xff, 0xec, 0x00, 0x32, + 0x00, 0x3a, 0xff, 0xec, 0x00, 0x32, 0x00, 0x3b, 0xff, 0xd7, 0x00, 0x32, + 0x00, 0x3c, 0xff, 0xec, 0x00, 0x32, 0x00, 0x3d, 0xff, 0xec, 0x00, 0x32, + 0x00, 0x82, 0xff, 0xd7, 0x00, 0x32, 0x00, 0x83, 0xff, 0xd7, 0x00, 0x32, + 0x00, 0x84, 0xff, 0xd7, 0x00, 0x32, 0x00, 0x85, 0xff, 0xd7, 0x00, 0x32, + 0x00, 0x86, 0xff, 0xd7, 0x00, 0x32, 0x00, 0x87, 0xff, 0xd7, 0x00, 0x32, + 0x00, 0x9f, 0xff, 0xec, 0x00, 0x33, 0x00, 0x0f, 0xfe, 0xf6, 0x00, 0x33, + 0x00, 0x11, 0xfe, 0xf6, 0x00, 0x33, 0x00, 0x24, 0xff, 0x9a, 0x00, 0x33, + 0x00, 0x3b, 0xff, 0xd7, 0x00, 0x33, 0x00, 0x3d, 0xff, 0xec, 0x00, 0x33, + 0x00, 0x82, 0xff, 0x9a, 0x00, 0x33, 0x00, 0x83, 0xff, 0x9a, 0x00, 0x33, + 0x00, 0x84, 0xff, 0x9a, 0x00, 0x33, 0x00, 0x85, 0xff, 0x9a, 0x00, 0x33, + 0x00, 0x86, 0xff, 0x9a, 0x00, 0x33, 0x00, 0x87, 0xff, 0x9a, 0x00, 0x34, + 0x00, 0x0f, 0xff, 0xae, 0x00, 0x34, 0x00, 0x11, 0xff, 0xae, 0x00, 0x34, + 0x00, 0x24, 0xff, 0xd7, 0x00, 0x34, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x34, + 0x00, 0x39, 0xff, 0xec, 0x00, 0x34, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x34, + 0x00, 0x3b, 0xff, 0xd7, 0x00, 0x34, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x34, + 0x00, 0x3d, 0xff, 0xec, 0x00, 0x34, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x34, + 0x00, 0x83, 0xff, 0xd7, 0x00, 0x34, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x34, + 0x00, 0x85, 0xff, 0xd7, 0x00, 0x34, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x34, + 0x00, 0x87, 0xff, 0xd7, 0x00, 0x34, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x37, + 0x00, 0x0f, 0xff, 0x85, 0x00, 0x37, 0x00, 0x10, 0xff, 0xae, 0x00, 0x37, + 0x00, 0x11, 0xff, 0x85, 0x00, 0x37, 0x00, 0x22, 0x00, 0x29, 0x00, 0x37, + 0x00, 0x24, 0xff, 0x71, 0x00, 0x37, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x37, + 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x37, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x37, + 0x00, 0x34, 0xff, 0xd7, 0x00, 0x37, 0x00, 0x37, 0x00, 0x29, 0x00, 0x37, + 0x00, 0x44, 0xff, 0x5c, 0x00, 0x37, 0x00, 0x46, 0xff, 0x71, 0x00, 0x37, + 0x00, 0x47, 0xff, 0x71, 0x00, 0x37, 0x00, 0x48, 0xff, 0x71, 0x00, 0x37, + 0x00, 0x4a, 0xff, 0x71, 0x00, 0x37, 0x00, 0x50, 0xff, 0x9a, 0x00, 0x37, + 0x00, 0x51, 0xff, 0x9a, 0x00, 0x37, 0x00, 0x52, 0xff, 0x71, 0x00, 0x37, + 0x00, 0x53, 0xff, 0x9a, 0x00, 0x37, 0x00, 0x54, 0xff, 0x71, 0x00, 0x37, + 0x00, 0x55, 0xff, 0x9a, 0x00, 0x37, 0x00, 0x56, 0xff, 0x85, 0x00, 0x37, + 0x00, 0x58, 0xff, 0x9a, 0x00, 0x37, 0x00, 0x59, 0xff, 0xd7, 0x00, 0x37, + 0x00, 0x5a, 0xff, 0xd7, 0x00, 0x37, 0x00, 0x5b, 0xff, 0xd7, 0x00, 0x37, + 0x00, 0x5c, 0xff, 0xd7, 0x00, 0x37, 0x00, 0x5d, 0xff, 0xae, 0x00, 0x37, + 0x00, 0x82, 0xff, 0x71, 0x00, 0x37, 0x00, 0x83, 0xff, 0x71, 0x00, 0x37, + 0x00, 0x84, 0xff, 0x71, 0x00, 0x37, 0x00, 0x85, 0xff, 0x71, 0x00, 0x37, + 0x00, 0x86, 0xff, 0x71, 0x00, 0x37, 0x00, 0x87, 0xff, 0x71, 0x00, 0x37, + 0x00, 0x89, 0xff, 0xd7, 0x00, 0x37, 0x00, 0x94, 0xff, 0xd7, 0x00, 0x37, + 0x00, 0x95, 0xff, 0xd7, 0x00, 0x37, 0x00, 0x96, 0xff, 0xd7, 0x00, 0x37, + 0x00, 0x97, 0xff, 0xd7, 0x00, 0x37, 0x00, 0x98, 0xff, 0xd7, 0x00, 0x37, + 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x37, 0x00, 0xa2, 0xff, 0x71, 0x00, 0x37, + 0x00, 0xa3, 0xff, 0x5c, 0x00, 0x37, 0x00, 0xa4, 0xff, 0x5c, 0x00, 0x37, + 0x00, 0xa5, 0xff, 0x5c, 0x00, 0x37, 0x00, 0xa6, 0xff, 0x5c, 0x00, 0x37, + 0x00, 0xa7, 0xff, 0x5c, 0x00, 0x37, 0x00, 0xa8, 0xff, 0x5c, 0x00, 0x37, + 0x00, 0xa9, 0xff, 0x71, 0x00, 0x37, 0x00, 0xaa, 0xff, 0x71, 0x00, 0x37, + 0x00, 0xab, 0xff, 0x71, 0x00, 0x37, 0x00, 0xac, 0xff, 0x71, 0x00, 0x37, + 0x00, 0xad, 0xff, 0x71, 0x00, 0x37, 0x00, 0xb4, 0xff, 0x71, 0x00, 0x37, + 0x00, 0xb5, 0xff, 0x71, 0x00, 0x37, 0x00, 0xb6, 0xff, 0x71, 0x00, 0x37, + 0x00, 0xb7, 0xff, 0x71, 0x00, 0x37, 0x00, 0xb8, 0xff, 0x71, 0x00, 0x37, + 0x00, 0xba, 0xff, 0x71, 0x00, 0x37, 0x00, 0xbb, 0xff, 0x9a, 0x00, 0x37, + 0x00, 0xbc, 0xff, 0x9a, 0x00, 0x37, 0x00, 0xbd, 0xff, 0x9a, 0x00, 0x37, + 0x00, 0xbe, 0xff, 0x9a, 0x00, 0x37, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0x38, + 0x00, 0x0f, 0xff, 0xd7, 0x00, 0x38, 0x00, 0x11, 0xff, 0xd7, 0x00, 0x38, + 0x00, 0x24, 0xff, 0xec, 0x00, 0x38, 0x00, 0x82, 0xff, 0xec, 0x00, 0x38, + 0x00, 0x83, 0xff, 0xec, 0x00, 0x38, 0x00, 0x84, 0xff, 0xec, 0x00, 0x38, + 0x00, 0x85, 0xff, 0xec, 0x00, 0x38, 0x00, 0x86, 0xff, 0xec, 0x00, 0x38, + 0x00, 0x87, 0xff, 0xec, 0x00, 0x39, 0x00, 0x0f, 0xff, 0x9a, 0x00, 0x39, + 0x00, 0x11, 0xff, 0x9a, 0x00, 0x39, 0x00, 0x22, 0x00, 0x29, 0x00, 0x39, + 0x00, 0x24, 0xff, 0xae, 0x00, 0x39, 0x00, 0x26, 0xff, 0xec, 0x00, 0x39, + 0x00, 0x2a, 0xff, 0xec, 0x00, 0x39, 0x00, 0x32, 0xff, 0xec, 0x00, 0x39, + 0x00, 0x34, 0xff, 0xec, 0x00, 0x39, 0x00, 0x44, 0xff, 0xd7, 0x00, 0x39, + 0x00, 0x46, 0xff, 0xd7, 0x00, 0x39, 0x00, 0x47, 0xff, 0xd7, 0x00, 0x39, + 0x00, 0x48, 0xff, 0xd7, 0x00, 0x39, 0x00, 0x4a, 0xff, 0xec, 0x00, 0x39, + 0x00, 0x50, 0xff, 0xec, 0x00, 0x39, 0x00, 0x51, 0xff, 0xec, 0x00, 0x39, + 0x00, 0x52, 0xff, 0xd7, 0x00, 0x39, 0x00, 0x53, 0xff, 0xec, 0x00, 0x39, + 0x00, 0x54, 0xff, 0xd7, 0x00, 0x39, 0x00, 0x55, 0xff, 0xec, 0x00, 0x39, + 0x00, 0x56, 0xff, 0xec, 0x00, 0x39, 0x00, 0x58, 0xff, 0xec, 0x00, 0x39, + 0x00, 0x82, 0xff, 0xae, 0x00, 0x39, 0x00, 0x83, 0xff, 0xae, 0x00, 0x39, + 0x00, 0x84, 0xff, 0xae, 0x00, 0x39, 0x00, 0x85, 0xff, 0xae, 0x00, 0x39, + 0x00, 0x86, 0xff, 0xae, 0x00, 0x39, 0x00, 0x87, 0xff, 0xae, 0x00, 0x39, + 0x00, 0x89, 0xff, 0xec, 0x00, 0x39, 0x00, 0x94, 0xff, 0xec, 0x00, 0x39, + 0x00, 0x95, 0xff, 0xec, 0x00, 0x39, 0x00, 0x96, 0xff, 0xec, 0x00, 0x39, + 0x00, 0x97, 0xff, 0xec, 0x00, 0x39, 0x00, 0x98, 0xff, 0xec, 0x00, 0x39, + 0x00, 0x9a, 0xff, 0xec, 0x00, 0x39, 0x00, 0xa2, 0xff, 0xd7, 0x00, 0x39, + 0x00, 0xa3, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xa4, 0xff, 0xd7, 0x00, 0x39, + 0x00, 0xa5, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xa6, 0xff, 0xd7, 0x00, 0x39, + 0x00, 0xa7, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xa8, 0xff, 0xd7, 0x00, 0x39, + 0x00, 0xa9, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xaa, 0xff, 0xd7, 0x00, 0x39, + 0x00, 0xab, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xac, 0xff, 0xd7, 0x00, 0x39, + 0x00, 0xad, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xb4, 0xff, 0xd7, 0x00, 0x39, + 0x00, 0xb5, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xb6, 0xff, 0xd7, 0x00, 0x39, + 0x00, 0xb7, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xb8, 0xff, 0xd7, 0x00, 0x39, + 0x00, 0xba, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xbb, 0xff, 0xec, 0x00, 0x39, + 0x00, 0xbc, 0xff, 0xec, 0x00, 0x39, 0x00, 0xbd, 0xff, 0xec, 0x00, 0x39, + 0x00, 0xbe, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x0f, 0xff, 0x9a, 0x00, 0x3a, + 0x00, 0x11, 0xff, 0x9a, 0x00, 0x3a, 0x00, 0x22, 0x00, 0x29, 0x00, 0x3a, + 0x00, 0x24, 0xff, 0xae, 0x00, 0x3a, 0x00, 0x26, 0xff, 0xec, 0x00, 0x3a, + 0x00, 0x2a, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x32, 0xff, 0xec, 0x00, 0x3a, + 0x00, 0x34, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x44, 0xff, 0xd7, 0x00, 0x3a, + 0x00, 0x46, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0x47, 0xff, 0xd7, 0x00, 0x3a, + 0x00, 0x48, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0x4a, 0xff, 0xec, 0x00, 0x3a, + 0x00, 0x50, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x51, 0xff, 0xec, 0x00, 0x3a, + 0x00, 0x52, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0x53, 0xff, 0xec, 0x00, 0x3a, + 0x00, 0x54, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0x55, 0xff, 0xec, 0x00, 0x3a, + 0x00, 0x56, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x58, 0xff, 0xec, 0x00, 0x3a, + 0x00, 0x82, 0xff, 0xae, 0x00, 0x3a, 0x00, 0x83, 0xff, 0xae, 0x00, 0x3a, + 0x00, 0x84, 0xff, 0xae, 0x00, 0x3a, 0x00, 0x85, 0xff, 0xae, 0x00, 0x3a, + 0x00, 0x86, 0xff, 0xae, 0x00, 0x3a, 0x00, 0x87, 0xff, 0xae, 0x00, 0x3a, + 0x00, 0x89, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x94, 0xff, 0xec, 0x00, 0x3a, + 0x00, 0x95, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x96, 0xff, 0xec, 0x00, 0x3a, + 0x00, 0x97, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x98, 0xff, 0xec, 0x00, 0x3a, + 0x00, 0x9a, 0xff, 0xec, 0x00, 0x3a, 0x00, 0xa2, 0xff, 0xd7, 0x00, 0x3a, + 0x00, 0xa3, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xa4, 0xff, 0xd7, 0x00, 0x3a, + 0x00, 0xa5, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xa6, 0xff, 0xd7, 0x00, 0x3a, + 0x00, 0xa7, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xa8, 0xff, 0xd7, 0x00, 0x3a, + 0x00, 0xa9, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xaa, 0xff, 0xd7, 0x00, 0x3a, + 0x00, 0xab, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xac, 0xff, 0xd7, 0x00, 0x3a, + 0x00, 0xad, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xb4, 0xff, 0xd7, 0x00, 0x3a, + 0x00, 0xb5, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xb6, 0xff, 0xd7, 0x00, 0x3a, + 0x00, 0xb7, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xb8, 0xff, 0xd7, 0x00, 0x3a, + 0x00, 0xba, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xbb, 0xff, 0xec, 0x00, 0x3a, + 0x00, 0xbc, 0xff, 0xec, 0x00, 0x3a, 0x00, 0xbd, 0xff, 0xec, 0x00, 0x3a, + 0x00, 0xbe, 0xff, 0xec, 0x00, 0x3b, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x3b, + 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x3b, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x3b, + 0x00, 0x34, 0xff, 0xd7, 0x00, 0x3b, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x3b, + 0x00, 0x94, 0xff, 0xd7, 0x00, 0x3b, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x3b, + 0x00, 0x96, 0xff, 0xd7, 0x00, 0x3b, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x3b, + 0x00, 0x98, 0xff, 0xd7, 0x00, 0x3b, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x3c, + 0x00, 0x0f, 0xff, 0x85, 0x00, 0x3c, 0x00, 0x11, 0xff, 0x85, 0x00, 0x3c, + 0x00, 0x22, 0x00, 0x29, 0x00, 0x3c, 0x00, 0x24, 0xff, 0x85, 0x00, 0x3c, + 0x00, 0x26, 0xff, 0xd7, 0x00, 0x3c, 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x3c, + 0x00, 0x32, 0xff, 0xd7, 0x00, 0x3c, 0x00, 0x34, 0xff, 0xd7, 0x00, 0x3c, + 0x00, 0x44, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0x46, 0xff, 0x9a, 0x00, 0x3c, + 0x00, 0x47, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0x48, 0xff, 0x9a, 0x00, 0x3c, + 0x00, 0x4a, 0xff, 0xd7, 0x00, 0x3c, 0x00, 0x50, 0xff, 0xc3, 0x00, 0x3c, + 0x00, 0x51, 0xff, 0xc3, 0x00, 0x3c, 0x00, 0x52, 0xff, 0x9a, 0x00, 0x3c, + 0x00, 0x53, 0xff, 0xc3, 0x00, 0x3c, 0x00, 0x54, 0xff, 0x9a, 0x00, 0x3c, + 0x00, 0x55, 0xff, 0xc3, 0x00, 0x3c, 0x00, 0x56, 0xff, 0xae, 0x00, 0x3c, + 0x00, 0x58, 0xff, 0xc3, 0x00, 0x3c, 0x00, 0x5d, 0xff, 0xd7, 0x00, 0x3c, + 0x00, 0x82, 0xff, 0x85, 0x00, 0x3c, 0x00, 0x83, 0xff, 0x85, 0x00, 0x3c, + 0x00, 0x84, 0xff, 0x85, 0x00, 0x3c, 0x00, 0x85, 0xff, 0x85, 0x00, 0x3c, + 0x00, 0x86, 0xff, 0x85, 0x00, 0x3c, 0x00, 0x87, 0xff, 0x85, 0x00, 0x3c, + 0x00, 0x89, 0xff, 0xd7, 0x00, 0x3c, 0x00, 0x94, 0xff, 0xd7, 0x00, 0x3c, + 0x00, 0x95, 0xff, 0xd7, 0x00, 0x3c, 0x00, 0x96, 0xff, 0xd7, 0x00, 0x3c, + 0x00, 0x97, 0xff, 0xd7, 0x00, 0x3c, 0x00, 0x98, 0xff, 0xd7, 0x00, 0x3c, + 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x3c, 0x00, 0xa2, 0xff, 0x9a, 0x00, 0x3c, + 0x00, 0xa3, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xa4, 0xff, 0x9a, 0x00, 0x3c, + 0x00, 0xa5, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xa6, 0xff, 0x9a, 0x00, 0x3c, + 0x00, 0xa7, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xa8, 0xff, 0x9a, 0x00, 0x3c, + 0x00, 0xa9, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xaa, 0xff, 0x9a, 0x00, 0x3c, + 0x00, 0xab, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xac, 0xff, 0x9a, 0x00, 0x3c, + 0x00, 0xad, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xb4, 0xff, 0x9a, 0x00, 0x3c, + 0x00, 0xb5, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xb6, 0xff, 0x9a, 0x00, 0x3c, + 0x00, 0xb7, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xb8, 0xff, 0x9a, 0x00, 0x3c, + 0x00, 0xba, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xbb, 0xff, 0xc3, 0x00, 0x3c, + 0x00, 0xbc, 0xff, 0xc3, 0x00, 0x3c, 0x00, 0xbd, 0xff, 0xc3, 0x00, 0x3c, + 0x00, 0xbe, 0xff, 0xc3, 0x00, 0x3d, 0x00, 0x26, 0xff, 0xec, 0x00, 0x3d, + 0x00, 0x2a, 0xff, 0xec, 0x00, 0x3d, 0x00, 0x32, 0xff, 0xec, 0x00, 0x3d, + 0x00, 0x34, 0xff, 0xec, 0x00, 0x3d, 0x00, 0x89, 0xff, 0xec, 0x00, 0x3d, + 0x00, 0x94, 0xff, 0xec, 0x00, 0x3d, 0x00, 0x95, 0xff, 0xec, 0x00, 0x3d, + 0x00, 0x96, 0xff, 0xec, 0x00, 0x3d, 0x00, 0x97, 0xff, 0xec, 0x00, 0x3d, + 0x00, 0x98, 0xff, 0xec, 0x00, 0x3d, 0x00, 0x9a, 0xff, 0xec, 0x00, 0x3e, + 0x00, 0x2d, 0x00, 0xb8, 0x00, 0x44, 0x00, 0x05, 0xff, 0xec, 0x00, 0x44, + 0x00, 0x0a, 0xff, 0xec, 0x00, 0x45, 0x00, 0x05, 0xff, 0xec, 0x00, 0x45, + 0x00, 0x0a, 0xff, 0xec, 0x00, 0x45, 0x00, 0x59, 0xff, 0xd7, 0x00, 0x45, + 0x00, 0x5a, 0xff, 0xd7, 0x00, 0x45, 0x00, 0x5b, 0xff, 0xd7, 0x00, 0x45, + 0x00, 0x5c, 0xff, 0xd7, 0x00, 0x45, 0x00, 0x5d, 0xff, 0xec, 0x00, 0x45, + 0x00, 0xbf, 0xff, 0xd7, 0x00, 0x46, 0x00, 0x05, 0x00, 0x29, 0x00, 0x46, + 0x00, 0x0a, 0x00, 0x29, 0x00, 0x48, 0x00, 0x05, 0xff, 0xec, 0x00, 0x48, + 0x00, 0x0a, 0xff, 0xec, 0x00, 0x48, 0x00, 0x59, 0xff, 0xd7, 0x00, 0x48, + 0x00, 0x5a, 0xff, 0xd7, 0x00, 0x48, 0x00, 0x5b, 0xff, 0xd7, 0x00, 0x48, + 0x00, 0x5c, 0xff, 0xd7, 0x00, 0x48, 0x00, 0x5d, 0xff, 0xec, 0x00, 0x48, + 0x00, 0xbf, 0xff, 0xd7, 0x00, 0x49, 0x00, 0x05, 0x00, 0x7b, 0x00, 0x49, + 0x00, 0x0a, 0x00, 0x7b, 0x00, 0x4b, 0x00, 0x05, 0xff, 0xec, 0x00, 0x4b, + 0x00, 0x0a, 0xff, 0xec, 0x00, 0x4e, 0x00, 0x46, 0xff, 0xd7, 0x00, 0x4e, + 0x00, 0x47, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0x48, 0xff, 0xd7, 0x00, 0x4e, + 0x00, 0x52, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0x54, 0xff, 0xd7, 0x00, 0x4e, + 0x00, 0xa2, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0xa9, 0xff, 0xd7, 0x00, 0x4e, + 0x00, 0xaa, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0xab, 0xff, 0xd7, 0x00, 0x4e, + 0x00, 0xac, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0xad, 0xff, 0xd7, 0x00, 0x4e, + 0x00, 0xb4, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0xb5, 0xff, 0xd7, 0x00, 0x4e, + 0x00, 0xb6, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0xb7, 0xff, 0xd7, 0x00, 0x4e, + 0x00, 0xb8, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0xba, 0xff, 0xd7, 0x00, 0x50, + 0x00, 0x05, 0xff, 0xec, 0x00, 0x50, 0x00, 0x0a, 0xff, 0xec, 0x00, 0x51, + 0x00, 0x05, 0xff, 0xec, 0x00, 0x51, 0x00, 0x0a, 0xff, 0xec, 0x00, 0x52, + 0x00, 0x05, 0xff, 0xec, 0x00, 0x52, 0x00, 0x0a, 0xff, 0xec, 0x00, 0x52, + 0x00, 0x59, 0xff, 0xd7, 0x00, 0x52, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0x52, + 0x00, 0x5b, 0xff, 0xd7, 0x00, 0x52, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0x52, + 0x00, 0x5d, 0xff, 0xec, 0x00, 0x52, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0x53, + 0x00, 0x05, 0xff, 0xec, 0x00, 0x53, 0x00, 0x0a, 0xff, 0xec, 0x00, 0x53, + 0x00, 0x59, 0xff, 0xd7, 0x00, 0x53, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0x53, + 0x00, 0x5b, 0xff, 0xd7, 0x00, 0x53, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0x53, + 0x00, 0x5d, 0xff, 0xec, 0x00, 0x53, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0x55, + 0x00, 0x05, 0x00, 0x52, 0x00, 0x55, 0x00, 0x0a, 0x00, 0x52, 0x00, 0x55, + 0x00, 0x44, 0xff, 0xd7, 0x00, 0x55, 0x00, 0x46, 0xff, 0xd7, 0x00, 0x55, + 0x00, 0x47, 0xff, 0xd7, 0x00, 0x55, 0x00, 0x48, 0xff, 0xd7, 0x00, 0x55, + 0x00, 0x4a, 0xff, 0xec, 0x00, 0x55, 0x00, 0x52, 0xff, 0xd7, 0x00, 0x55, + 0x00, 0x54, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xa2, 0xff, 0xd7, 0x00, 0x55, + 0x00, 0xa3, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xa4, 0xff, 0xd7, 0x00, 0x55, + 0x00, 0xa5, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xa6, 0xff, 0xd7, 0x00, 0x55, + 0x00, 0xa7, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xa8, 0xff, 0xd7, 0x00, 0x55, + 0x00, 0xa9, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xaa, 0xff, 0xd7, 0x00, 0x55, + 0x00, 0xab, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xac, 0xff, 0xd7, 0x00, 0x55, + 0x00, 0xad, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xb4, 0xff, 0xd7, 0x00, 0x55, + 0x00, 0xb5, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xb6, 0xff, 0xd7, 0x00, 0x55, + 0x00, 0xb7, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xb8, 0xff, 0xd7, 0x00, 0x55, + 0x00, 0xba, 0xff, 0xd7, 0x00, 0x57, 0x00, 0x05, 0x00, 0x29, 0x00, 0x57, + 0x00, 0x0a, 0x00, 0x29, 0x00, 0x59, 0x00, 0x05, 0x00, 0x52, 0x00, 0x59, + 0x00, 0x0a, 0x00, 0x52, 0x00, 0x59, 0x00, 0x0f, 0xff, 0xae, 0x00, 0x59, + 0x00, 0x11, 0xff, 0xae, 0x00, 0x59, 0x00, 0x22, 0x00, 0x29, 0x00, 0x5a, + 0x00, 0x05, 0x00, 0x52, 0x00, 0x5a, 0x00, 0x0a, 0x00, 0x52, 0x00, 0x5a, + 0x00, 0x0f, 0xff, 0xae, 0x00, 0x5a, 0x00, 0x11, 0xff, 0xae, 0x00, 0x5a, + 0x00, 0x22, 0x00, 0x29, 0x00, 0x5b, 0x00, 0x46, 0xff, 0xd7, 0x00, 0x5b, + 0x00, 0x47, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0x48, 0xff, 0xd7, 0x00, 0x5b, + 0x00, 0x52, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0x54, 0xff, 0xd7, 0x00, 0x5b, + 0x00, 0xa2, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0xa9, 0xff, 0xd7, 0x00, 0x5b, + 0x00, 0xaa, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0xab, 0xff, 0xd7, 0x00, 0x5b, + 0x00, 0xac, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0xad, 0xff, 0xd7, 0x00, 0x5b, + 0x00, 0xb4, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0xb5, 0xff, 0xd7, 0x00, 0x5b, + 0x00, 0xb6, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0xb7, 0xff, 0xd7, 0x00, 0x5b, + 0x00, 0xb8, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0xba, 0xff, 0xd7, 0x00, 0x5c, + 0x00, 0x05, 0x00, 0x52, 0x00, 0x5c, 0x00, 0x0a, 0x00, 0x52, 0x00, 0x5c, + 0x00, 0x0f, 0xff, 0xae, 0x00, 0x5c, 0x00, 0x11, 0xff, 0xae, 0x00, 0x5c, + 0x00, 0x22, 0x00, 0x29, 0x00, 0x5e, 0x00, 0x2d, 0x00, 0xb8, 0x00, 0x82, + 0x00, 0x05, 0xff, 0x71, 0x00, 0x82, 0x00, 0x0a, 0xff, 0x71, 0x00, 0x82, + 0x00, 0x26, 0xff, 0xd7, 0x00, 0x82, 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x82, + 0x00, 0x2d, 0x01, 0x0a, 0x00, 0x82, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x82, + 0x00, 0x34, 0xff, 0xd7, 0x00, 0x82, 0x00, 0x37, 0xff, 0x71, 0x00, 0x82, + 0x00, 0x39, 0xff, 0xae, 0x00, 0x82, 0x00, 0x3a, 0xff, 0xae, 0x00, 0x82, + 0x00, 0x3c, 0xff, 0x85, 0x00, 0x82, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x82, + 0x00, 0x94, 0xff, 0xd7, 0x00, 0x82, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x82, + 0x00, 0x96, 0xff, 0xd7, 0x00, 0x82, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x82, + 0x00, 0x98, 0xff, 0xd7, 0x00, 0x82, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x82, + 0x00, 0x9f, 0xff, 0x85, 0x00, 0x83, 0x00, 0x05, 0xff, 0x71, 0x00, 0x83, + 0x00, 0x0a, 0xff, 0x71, 0x00, 0x83, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x83, + 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x83, 0x00, 0x2d, 0x01, 0x0a, 0x00, 0x83, + 0x00, 0x32, 0xff, 0xd7, 0x00, 0x83, 0x00, 0x34, 0xff, 0xd7, 0x00, 0x83, + 0x00, 0x37, 0xff, 0x71, 0x00, 0x83, 0x00, 0x39, 0xff, 0xae, 0x00, 0x83, + 0x00, 0x3a, 0xff, 0xae, 0x00, 0x83, 0x00, 0x3c, 0xff, 0x85, 0x00, 0x83, + 0x00, 0x89, 0xff, 0xd7, 0x00, 0x83, 0x00, 0x94, 0xff, 0xd7, 0x00, 0x83, + 0x00, 0x95, 0xff, 0xd7, 0x00, 0x83, 0x00, 0x96, 0xff, 0xd7, 0x00, 0x83, + 0x00, 0x97, 0xff, 0xd7, 0x00, 0x83, 0x00, 0x98, 0xff, 0xd7, 0x00, 0x83, + 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x83, 0x00, 0x9f, 0xff, 0x85, 0x00, 0x84, + 0x00, 0x05, 0xff, 0x71, 0x00, 0x84, 0x00, 0x0a, 0xff, 0x71, 0x00, 0x84, + 0x00, 0x26, 0xff, 0xd7, 0x00, 0x84, 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x84, + 0x00, 0x2d, 0x01, 0x0a, 0x00, 0x84, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x84, + 0x00, 0x34, 0xff, 0xd7, 0x00, 0x84, 0x00, 0x37, 0xff, 0x71, 0x00, 0x84, + 0x00, 0x39, 0xff, 0xae, 0x00, 0x84, 0x00, 0x3a, 0xff, 0xae, 0x00, 0x84, + 0x00, 0x3c, 0xff, 0x85, 0x00, 0x84, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x84, + 0x00, 0x94, 0xff, 0xd7, 0x00, 0x84, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x84, + 0x00, 0x96, 0xff, 0xd7, 0x00, 0x84, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x84, + 0x00, 0x98, 0xff, 0xd7, 0x00, 0x84, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x84, + 0x00, 0x9f, 0xff, 0x85, 0x00, 0x85, 0x00, 0x05, 0xff, 0x71, 0x00, 0x85, + 0x00, 0x0a, 0xff, 0x71, 0x00, 0x85, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x85, + 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x85, 0x00, 0x2d, 0x01, 0x0a, 0x00, 0x85, + 0x00, 0x32, 0xff, 0xd7, 0x00, 0x85, 0x00, 0x34, 0xff, 0xd7, 0x00, 0x85, + 0x00, 0x37, 0xff, 0x71, 0x00, 0x85, 0x00, 0x39, 0xff, 0xae, 0x00, 0x85, + 0x00, 0x3a, 0xff, 0xae, 0x00, 0x85, 0x00, 0x3c, 0xff, 0x85, 0x00, 0x85, + 0x00, 0x89, 0xff, 0xd7, 0x00, 0x85, 0x00, 0x94, 0xff, 0xd7, 0x00, 0x85, + 0x00, 0x95, 0xff, 0xd7, 0x00, 0x85, 0x00, 0x96, 0xff, 0xd7, 0x00, 0x85, + 0x00, 0x97, 0xff, 0xd7, 0x00, 0x85, 0x00, 0x98, 0xff, 0xd7, 0x00, 0x85, + 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x85, 0x00, 0x9f, 0xff, 0x85, 0x00, 0x86, + 0x00, 0x05, 0xff, 0x71, 0x00, 0x86, 0x00, 0x0a, 0xff, 0x71, 0x00, 0x86, + 0x00, 0x26, 0xff, 0xd7, 0x00, 0x86, 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x86, + 0x00, 0x2d, 0x01, 0x0a, 0x00, 0x86, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x86, + 0x00, 0x34, 0xff, 0xd7, 0x00, 0x86, 0x00, 0x37, 0xff, 0x71, 0x00, 0x86, + 0x00, 0x39, 0xff, 0xae, 0x00, 0x86, 0x00, 0x3a, 0xff, 0xae, 0x00, 0x86, + 0x00, 0x3c, 0xff, 0x85, 0x00, 0x86, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x86, + 0x00, 0x94, 0xff, 0xd7, 0x00, 0x86, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x86, + 0x00, 0x96, 0xff, 0xd7, 0x00, 0x86, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x86, + 0x00, 0x98, 0xff, 0xd7, 0x00, 0x86, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x86, + 0x00, 0x9f, 0xff, 0x85, 0x00, 0x87, 0x00, 0x05, 0xff, 0x71, 0x00, 0x87, + 0x00, 0x0a, 0xff, 0x71, 0x00, 0x87, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x87, + 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x87, 0x00, 0x2d, 0x01, 0x0a, 0x00, 0x87, + 0x00, 0x32, 0xff, 0xd7, 0x00, 0x87, 0x00, 0x34, 0xff, 0xd7, 0x00, 0x87, + 0x00, 0x37, 0xff, 0x71, 0x00, 0x87, 0x00, 0x39, 0xff, 0xae, 0x00, 0x87, + 0x00, 0x3a, 0xff, 0xae, 0x00, 0x87, 0x00, 0x3c, 0xff, 0x85, 0x00, 0x87, + 0x00, 0x89, 0xff, 0xd7, 0x00, 0x87, 0x00, 0x94, 0xff, 0xd7, 0x00, 0x87, + 0x00, 0x95, 0xff, 0xd7, 0x00, 0x87, 0x00, 0x96, 0xff, 0xd7, 0x00, 0x87, + 0x00, 0x97, 0xff, 0xd7, 0x00, 0x87, 0x00, 0x98, 0xff, 0xd7, 0x00, 0x87, + 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x87, 0x00, 0x9f, 0xff, 0x85, 0x00, 0x88, + 0x00, 0x2d, 0x00, 0x7b, 0x00, 0x89, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x89, + 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x89, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x89, + 0x00, 0x34, 0xff, 0xd7, 0x00, 0x89, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x89, + 0x00, 0x94, 0xff, 0xd7, 0x00, 0x89, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x89, + 0x00, 0x96, 0xff, 0xd7, 0x00, 0x89, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x89, + 0x00, 0x98, 0xff, 0xd7, 0x00, 0x89, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x8a, + 0x00, 0x2d, 0x00, 0x7b, 0x00, 0x8b, 0x00, 0x2d, 0x00, 0x7b, 0x00, 0x8c, + 0x00, 0x2d, 0x00, 0x7b, 0x00, 0x8d, 0x00, 0x2d, 0x00, 0x7b, 0x00, 0x92, + 0x00, 0x0f, 0xff, 0xae, 0x00, 0x92, 0x00, 0x11, 0xff, 0xae, 0x00, 0x92, + 0x00, 0x24, 0xff, 0xd7, 0x00, 0x92, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x92, + 0x00, 0x39, 0xff, 0xec, 0x00, 0x92, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x92, + 0x00, 0x3b, 0xff, 0xd7, 0x00, 0x92, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x92, + 0x00, 0x3d, 0xff, 0xec, 0x00, 0x92, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x92, + 0x00, 0x83, 0xff, 0xd7, 0x00, 0x92, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x92, + 0x00, 0x85, 0xff, 0xd7, 0x00, 0x92, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x92, + 0x00, 0x87, 0xff, 0xd7, 0x00, 0x92, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x94, + 0x00, 0x0f, 0xff, 0xae, 0x00, 0x94, 0x00, 0x11, 0xff, 0xae, 0x00, 0x94, + 0x00, 0x24, 0xff, 0xd7, 0x00, 0x94, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x94, + 0x00, 0x39, 0xff, 0xec, 0x00, 0x94, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x94, + 0x00, 0x3b, 0xff, 0xd7, 0x00, 0x94, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x94, + 0x00, 0x3d, 0xff, 0xec, 0x00, 0x94, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x94, + 0x00, 0x83, 0xff, 0xd7, 0x00, 0x94, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x94, + 0x00, 0x85, 0xff, 0xd7, 0x00, 0x94, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x94, + 0x00, 0x87, 0xff, 0xd7, 0x00, 0x94, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x95, + 0x00, 0x0f, 0xff, 0xae, 0x00, 0x95, 0x00, 0x11, 0xff, 0xae, 0x00, 0x95, + 0x00, 0x24, 0xff, 0xd7, 0x00, 0x95, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x95, + 0x00, 0x39, 0xff, 0xec, 0x00, 0x95, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x95, + 0x00, 0x3b, 0xff, 0xd7, 0x00, 0x95, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x95, + 0x00, 0x3d, 0xff, 0xec, 0x00, 0x95, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x95, + 0x00, 0x83, 0xff, 0xd7, 0x00, 0x95, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x95, + 0x00, 0x85, 0xff, 0xd7, 0x00, 0x95, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x95, + 0x00, 0x87, 0xff, 0xd7, 0x00, 0x95, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x96, + 0x00, 0x0f, 0xff, 0xae, 0x00, 0x96, 0x00, 0x11, 0xff, 0xae, 0x00, 0x96, + 0x00, 0x24, 0xff, 0xd7, 0x00, 0x96, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x96, + 0x00, 0x39, 0xff, 0xec, 0x00, 0x96, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x96, + 0x00, 0x3b, 0xff, 0xd7, 0x00, 0x96, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x96, + 0x00, 0x3d, 0xff, 0xec, 0x00, 0x96, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x96, + 0x00, 0x83, 0xff, 0xd7, 0x00, 0x96, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x96, + 0x00, 0x85, 0xff, 0xd7, 0x00, 0x96, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x96, + 0x00, 0x87, 0xff, 0xd7, 0x00, 0x96, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x97, + 0x00, 0x0f, 0xff, 0xae, 0x00, 0x97, 0x00, 0x11, 0xff, 0xae, 0x00, 0x97, + 0x00, 0x24, 0xff, 0xd7, 0x00, 0x97, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x97, + 0x00, 0x39, 0xff, 0xec, 0x00, 0x97, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x97, + 0x00, 0x3b, 0xff, 0xd7, 0x00, 0x97, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x97, + 0x00, 0x3d, 0xff, 0xec, 0x00, 0x97, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x97, + 0x00, 0x83, 0xff, 0xd7, 0x00, 0x97, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x97, + 0x00, 0x85, 0xff, 0xd7, 0x00, 0x97, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x97, + 0x00, 0x87, 0xff, 0xd7, 0x00, 0x97, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x98, + 0x00, 0x0f, 0xff, 0xae, 0x00, 0x98, 0x00, 0x11, 0xff, 0xae, 0x00, 0x98, + 0x00, 0x24, 0xff, 0xd7, 0x00, 0x98, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x98, + 0x00, 0x39, 0xff, 0xec, 0x00, 0x98, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x98, + 0x00, 0x3b, 0xff, 0xd7, 0x00, 0x98, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x98, + 0x00, 0x3d, 0xff, 0xec, 0x00, 0x98, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x98, + 0x00, 0x83, 0xff, 0xd7, 0x00, 0x98, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x98, + 0x00, 0x85, 0xff, 0xd7, 0x00, 0x98, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x98, + 0x00, 0x87, 0xff, 0xd7, 0x00, 0x98, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x9a, + 0x00, 0x0f, 0xff, 0xae, 0x00, 0x9a, 0x00, 0x11, 0xff, 0xae, 0x00, 0x9a, + 0x00, 0x24, 0xff, 0xd7, 0x00, 0x9a, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x9a, + 0x00, 0x39, 0xff, 0xec, 0x00, 0x9a, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x9a, + 0x00, 0x3b, 0xff, 0xd7, 0x00, 0x9a, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x9a, + 0x00, 0x3d, 0xff, 0xec, 0x00, 0x9a, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x9a, + 0x00, 0x83, 0xff, 0xd7, 0x00, 0x9a, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x9a, + 0x00, 0x85, 0xff, 0xd7, 0x00, 0x9a, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x9a, + 0x00, 0x87, 0xff, 0xd7, 0x00, 0x9a, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x9b, + 0x00, 0x0f, 0xff, 0xd7, 0x00, 0x9b, 0x00, 0x11, 0xff, 0xd7, 0x00, 0x9b, + 0x00, 0x24, 0xff, 0xec, 0x00, 0x9b, 0x00, 0x82, 0xff, 0xec, 0x00, 0x9b, + 0x00, 0x83, 0xff, 0xec, 0x00, 0x9b, 0x00, 0x84, 0xff, 0xec, 0x00, 0x9b, + 0x00, 0x85, 0xff, 0xec, 0x00, 0x9b, 0x00, 0x86, 0xff, 0xec, 0x00, 0x9b, + 0x00, 0x87, 0xff, 0xec, 0x00, 0x9c, 0x00, 0x0f, 0xff, 0xd7, 0x00, 0x9c, + 0x00, 0x11, 0xff, 0xd7, 0x00, 0x9c, 0x00, 0x24, 0xff, 0xec, 0x00, 0x9c, + 0x00, 0x82, 0xff, 0xec, 0x00, 0x9c, 0x00, 0x83, 0xff, 0xec, 0x00, 0x9c, + 0x00, 0x84, 0xff, 0xec, 0x00, 0x9c, 0x00, 0x85, 0xff, 0xec, 0x00, 0x9c, + 0x00, 0x86, 0xff, 0xec, 0x00, 0x9c, 0x00, 0x87, 0xff, 0xec, 0x00, 0x9d, + 0x00, 0x0f, 0xff, 0xd7, 0x00, 0x9d, 0x00, 0x11, 0xff, 0xd7, 0x00, 0x9d, + 0x00, 0x24, 0xff, 0xec, 0x00, 0x9d, 0x00, 0x82, 0xff, 0xec, 0x00, 0x9d, + 0x00, 0x83, 0xff, 0xec, 0x00, 0x9d, 0x00, 0x84, 0xff, 0xec, 0x00, 0x9d, + 0x00, 0x85, 0xff, 0xec, 0x00, 0x9d, 0x00, 0x86, 0xff, 0xec, 0x00, 0x9d, + 0x00, 0x87, 0xff, 0xec, 0x00, 0x9e, 0x00, 0x0f, 0xff, 0xd7, 0x00, 0x9e, + 0x00, 0x11, 0xff, 0xd7, 0x00, 0x9e, 0x00, 0x24, 0xff, 0xec, 0x00, 0x9e, + 0x00, 0x82, 0xff, 0xec, 0x00, 0x9e, 0x00, 0x83, 0xff, 0xec, 0x00, 0x9e, + 0x00, 0x84, 0xff, 0xec, 0x00, 0x9e, 0x00, 0x85, 0xff, 0xec, 0x00, 0x9e, + 0x00, 0x86, 0xff, 0xec, 0x00, 0x9e, 0x00, 0x87, 0xff, 0xec, 0x00, 0x9f, + 0x00, 0x0f, 0xff, 0x85, 0x00, 0x9f, 0x00, 0x11, 0xff, 0x85, 0x00, 0x9f, + 0x00, 0x22, 0x00, 0x29, 0x00, 0x9f, 0x00, 0x24, 0xff, 0x85, 0x00, 0x9f, + 0x00, 0x26, 0xff, 0xd7, 0x00, 0x9f, 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x9f, + 0x00, 0x32, 0xff, 0xd7, 0x00, 0x9f, 0x00, 0x34, 0xff, 0xd7, 0x00, 0x9f, + 0x00, 0x44, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0x46, 0xff, 0x9a, 0x00, 0x9f, + 0x00, 0x47, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0x48, 0xff, 0x9a, 0x00, 0x9f, + 0x00, 0x4a, 0xff, 0xd7, 0x00, 0x9f, 0x00, 0x50, 0xff, 0xc3, 0x00, 0x9f, + 0x00, 0x51, 0xff, 0xc3, 0x00, 0x9f, 0x00, 0x52, 0xff, 0x9a, 0x00, 0x9f, + 0x00, 0x53, 0xff, 0xc3, 0x00, 0x9f, 0x00, 0x54, 0xff, 0x9a, 0x00, 0x9f, + 0x00, 0x55, 0xff, 0xc3, 0x00, 0x9f, 0x00, 0x56, 0xff, 0xae, 0x00, 0x9f, + 0x00, 0x58, 0xff, 0xc3, 0x00, 0x9f, 0x00, 0x5d, 0xff, 0xd7, 0x00, 0x9f, + 0x00, 0x82, 0xff, 0x85, 0x00, 0x9f, 0x00, 0x83, 0xff, 0x85, 0x00, 0x9f, + 0x00, 0x84, 0xff, 0x85, 0x00, 0x9f, 0x00, 0x85, 0xff, 0x85, 0x00, 0x9f, + 0x00, 0x86, 0xff, 0x85, 0x00, 0x9f, 0x00, 0x87, 0xff, 0x85, 0x00, 0x9f, + 0x00, 0x89, 0xff, 0xd7, 0x00, 0x9f, 0x00, 0x94, 0xff, 0xd7, 0x00, 0x9f, + 0x00, 0x95, 0xff, 0xd7, 0x00, 0x9f, 0x00, 0x96, 0xff, 0xd7, 0x00, 0x9f, + 0x00, 0x97, 0xff, 0xd7, 0x00, 0x9f, 0x00, 0x98, 0xff, 0xd7, 0x00, 0x9f, + 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x9f, 0x00, 0xa2, 0xff, 0x9a, 0x00, 0x9f, + 0x00, 0xa3, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xa4, 0xff, 0x9a, 0x00, 0x9f, + 0x00, 0xa5, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xa6, 0xff, 0x9a, 0x00, 0x9f, + 0x00, 0xa7, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xa8, 0xff, 0x9a, 0x00, 0x9f, + 0x00, 0xa9, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xaa, 0xff, 0x9a, 0x00, 0x9f, + 0x00, 0xab, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xac, 0xff, 0x9a, 0x00, 0x9f, + 0x00, 0xad, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xb4, 0xff, 0x9a, 0x00, 0x9f, + 0x00, 0xb5, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xb6, 0xff, 0x9a, 0x00, 0x9f, + 0x00, 0xb7, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xb8, 0xff, 0x9a, 0x00, 0x9f, + 0x00, 0xba, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xbb, 0xff, 0xc3, 0x00, 0x9f, + 0x00, 0xbc, 0xff, 0xc3, 0x00, 0x9f, 0x00, 0xbd, 0xff, 0xc3, 0x00, 0x9f, + 0x00, 0xbe, 0xff, 0xc3, 0x00, 0xa0, 0x00, 0x0f, 0xfe, 0xf6, 0x00, 0xa0, + 0x00, 0x11, 0xfe, 0xf6, 0x00, 0xa0, 0x00, 0x24, 0xff, 0x9a, 0x00, 0xa0, + 0x00, 0x3b, 0xff, 0xd7, 0x00, 0xa0, 0x00, 0x3d, 0xff, 0xec, 0x00, 0xa0, + 0x00, 0x82, 0xff, 0x9a, 0x00, 0xa0, 0x00, 0x83, 0xff, 0x9a, 0x00, 0xa0, + 0x00, 0x84, 0xff, 0x9a, 0x00, 0xa0, 0x00, 0x85, 0xff, 0x9a, 0x00, 0xa0, + 0x00, 0x86, 0xff, 0x9a, 0x00, 0xa0, 0x00, 0x87, 0xff, 0x9a, 0x00, 0xa2, + 0x00, 0x05, 0xff, 0xec, 0x00, 0xa2, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xa3, + 0x00, 0x05, 0xff, 0xec, 0x00, 0xa3, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xa4, + 0x00, 0x05, 0xff, 0xec, 0x00, 0xa4, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xa5, + 0x00, 0x05, 0xff, 0xec, 0x00, 0xa5, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xa6, + 0x00, 0x05, 0xff, 0xec, 0x00, 0xa6, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xa7, + 0x00, 0x05, 0xff, 0xec, 0x00, 0xa7, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xaa, + 0x00, 0x05, 0xff, 0xec, 0x00, 0xaa, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xaa, + 0x00, 0x59, 0xff, 0xd7, 0x00, 0xaa, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xaa, + 0x00, 0x5b, 0xff, 0xd7, 0x00, 0xaa, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xaa, + 0x00, 0x5d, 0xff, 0xec, 0x00, 0xaa, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xab, + 0x00, 0x05, 0xff, 0xec, 0x00, 0xab, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xab, + 0x00, 0x59, 0xff, 0xd7, 0x00, 0xab, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xab, + 0x00, 0x5b, 0xff, 0xd7, 0x00, 0xab, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xab, + 0x00, 0x5d, 0xff, 0xec, 0x00, 0xab, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xac, + 0x00, 0x05, 0xff, 0xec, 0x00, 0xac, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xac, + 0x00, 0x59, 0xff, 0xd7, 0x00, 0xac, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xac, + 0x00, 0x5b, 0xff, 0xd7, 0x00, 0xac, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xac, + 0x00, 0x5d, 0xff, 0xec, 0x00, 0xac, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xad, + 0x00, 0x05, 0xff, 0xec, 0x00, 0xad, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xad, + 0x00, 0x59, 0xff, 0xd7, 0x00, 0xad, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xad, + 0x00, 0x5b, 0xff, 0xd7, 0x00, 0xad, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xad, + 0x00, 0x5d, 0xff, 0xec, 0x00, 0xad, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xb2, + 0x00, 0x05, 0xff, 0xec, 0x00, 0xb2, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xb2, + 0x00, 0x59, 0xff, 0xd7, 0x00, 0xb2, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xb2, + 0x00, 0x5b, 0xff, 0xd7, 0x00, 0xb2, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xb2, + 0x00, 0x5d, 0xff, 0xec, 0x00, 0xb2, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xb4, + 0x00, 0x05, 0xff, 0xec, 0x00, 0xb4, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xb4, + 0x00, 0x59, 0xff, 0xd7, 0x00, 0xb4, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xb4, + 0x00, 0x5b, 0xff, 0xd7, 0x00, 0xb4, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xb4, + 0x00, 0x5d, 0xff, 0xec, 0x00, 0xb4, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xb5, + 0x00, 0x05, 0xff, 0xec, 0x00, 0xb5, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xb5, + 0x00, 0x59, 0xff, 0xd7, 0x00, 0xb5, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xb5, + 0x00, 0x5b, 0xff, 0xd7, 0x00, 0xb5, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xb5, + 0x00, 0x5d, 0xff, 0xec, 0x00, 0xb5, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xb6, + 0x00, 0x05, 0xff, 0xec, 0x00, 0xb6, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xb6, + 0x00, 0x59, 0xff, 0xd7, 0x00, 0xb6, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xb6, + 0x00, 0x5b, 0xff, 0xd7, 0x00, 0xb6, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xb6, + 0x00, 0x5d, 0xff, 0xec, 0x00, 0xb6, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xb8, + 0x00, 0x05, 0xff, 0xd7, 0x00, 0xb8, 0x00, 0x0a, 0xff, 0xd7, 0x00, 0xba, + 0x00, 0x05, 0xff, 0xec, 0x00, 0xba, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xba, + 0x00, 0x59, 0xff, 0xd7, 0x00, 0xba, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xba, + 0x00, 0x5b, 0xff, 0xd7, 0x00, 0xba, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xba, + 0x00, 0x5d, 0xff, 0xec, 0x00, 0xba, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xbf, + 0x00, 0x05, 0x00, 0x52, 0x00, 0xbf, 0x00, 0x0a, 0x00, 0x52, 0x00, 0xbf, + 0x00, 0x0f, 0xff, 0xae, 0x00, 0xbf, 0x00, 0x11, 0xff, 0xae, 0x00, 0xbf, + 0x00, 0x22, 0x00, 0x29, 0x00, 0xc0, 0x00, 0x05, 0xff, 0xec, 0x00, 0xc0, + 0x00, 0x0a, 0xff, 0xec, 0x00, 0xc0, 0x00, 0x59, 0xff, 0xd7, 0x00, 0xc0, + 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xc0, 0x00, 0x5b, 0xff, 0xd7, 0x00, 0xc0, + 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xc0, 0x00, 0x5d, 0xff, 0xec, 0x00, 0xc0, + 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xc1, 0x00, 0x05, 0x00, 0x52, 0x00, 0xc1, + 0x00, 0x0a, 0x00, 0x52, 0x00, 0xc1, 0x00, 0x0f, 0xff, 0xae, 0x00, 0xc1, + 0x00, 0x11, 0xff, 0xae, 0x00, 0xc1, 0x00, 0x22, 0x00, 0x29, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x31, 0x02, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x39, 0x00, 0x74, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x09, 0x00, 0xc2, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x04, 0x00, 0xd6, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x23, 0x01, 0x23, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x04, 0x00, 0x0e, 0x01, 0x65, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x05, 0x00, 0x0c, 0x01, 0x8e, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x0d, 0x01, 0xb7, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x07, 0x00, 0x52, 0x02, 0x6b, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x00, 0x14, 0x02, 0xe8, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0b, 0x00, 0x1c, 0x03, 0x37, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0c, 0x00, 0x2e, 0x03, 0xb2, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0d, 0x00, 0x2e, 0x04, 0x3f, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0e, 0x00, 0x2a, 0x04, 0xc4, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x18, 0x04, 0xef, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x01, 0x00, 0x0b, 0x05, 0x76, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x02, 0x00, 0x11, 0x05, 0xa2, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x03, 0x00, 0x12, 0x06, 0x11, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x04, 0x00, 0x12, 0x06, 0x78, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, + 0x01, 0x00, 0x00, 0x18, 0x05, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, + 0x01, 0x01, 0x00, 0x12, 0x05, 0x82, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, + 0x01, 0x02, 0x00, 0x1f, 0x05, 0xb4, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, + 0x01, 0x03, 0x00, 0x1f, 0x06, 0x24, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, + 0x01, 0x04, 0x00, 0x23, 0x06, 0x8b, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, + 0x01, 0x00, 0x00, 0x21, 0x05, 0x21, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, + 0x01, 0x02, 0x00, 0x17, 0x05, 0xd4, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, + 0x01, 0x03, 0x00, 0x10, 0x06, 0x44, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, + 0x01, 0x04, 0x00, 0x0f, 0x06, 0xaf, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, + 0x01, 0x00, 0x00, 0x15, 0x05, 0x43, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, + 0x01, 0x02, 0x00, 0x11, 0x05, 0xec, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, + 0x01, 0x03, 0x00, 0x13, 0x06, 0x55, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, + 0x01, 0x04, 0x00, 0x0c, 0x06, 0xbf, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, + 0x01, 0x00, 0x00, 0x1c, 0x05, 0x59, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, + 0x01, 0x01, 0x00, 0x0c, 0x05, 0x95, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, + 0x01, 0x02, 0x00, 0x12, 0x05, 0xfe, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, + 0x01, 0x03, 0x00, 0x0e, 0x06, 0x69, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, + 0x01, 0x04, 0x00, 0x0d, 0x06, 0xcc, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x00, 0x00, 0x00, 0x72, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x00, 0x01, 0x00, 0x12, 0x00, 0xae, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x00, 0x02, 0x00, 0x08, 0x00, 0xcc, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x00, 0x03, 0x00, 0x46, 0x00, 0xdb, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x00, 0x04, 0x00, 0x1c, 0x01, 0x47, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x00, 0x05, 0x00, 0x18, 0x01, 0x74, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x00, 0x06, 0x00, 0x1a, 0x01, 0x9b, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x00, 0x07, 0x00, 0xa4, 0x01, 0xc5, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x00, 0x08, 0x00, 0x28, 0x02, 0xbe, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x00, 0x0b, 0x00, 0x38, 0x02, 0xfd, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x00, 0x0c, 0x00, 0x5c, 0x03, 0x54, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x00, 0x0d, 0x00, 0x5c, 0x03, 0xe1, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, + 0x00, 0x0e, 0x00, 0x54, 0x04, 0x6e, 0x00, 0x44, 0x00, 0x69, 0x00, 0x67, + 0x00, 0x69, 0x00, 0x74, 0x00, 0x69, 0x00, 0x7a, 0x00, 0x65, 0x00, 0x64, + 0x00, 0x20, 0x00, 0x64, 0x00, 0x61, 0x00, 0x74, 0x00, 0x61, 0x00, 0x20, + 0x00, 0x63, 0x00, 0x6f, 0x00, 0x70, 0x00, 0x79, 0x00, 0x72, 0x00, 0x69, + 0x00, 0x67, 0x00, 0x68, 0x00, 0x74, 0x00, 0x20, 0x00, 0xa9, 0x00, 0x20, + 0x00, 0x32, 0x00, 0x30, 0x00, 0x31, 0x00, 0x30, 0x00, 0x2d, 0x00, 0x32, + 0x00, 0x30, 0x00, 0x31, 0x00, 0x31, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x47, + 0x00, 0x6f, 0x00, 0x6f, 0x00, 0x67, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x20, + 0x00, 0x43, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x70, 0x00, 0x6f, 0x00, 0x72, + 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x2e, + 0x00, 0x00, 0x44, 0x69, 0x67, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x64, 0x20, + 0x64, 0x61, 0x74, 0x61, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, + 0x68, 0x74, 0x20, 0xa9, 0x20, 0x32, 0x30, 0x31, 0x30, 0x2d, 0x32, 0x30, + 0x31, 0x31, 0x2c, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x43, + 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x00, + 0x00, 0x4f, 0x00, 0x70, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x53, + 0x00, 0x61, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x00, 0x4f, 0x70, 0x65, 0x6e, + 0x20, 0x53, 0x61, 0x6e, 0x73, 0x00, 0x00, 0x42, 0x00, 0x6f, 0x00, 0x6c, + 0x00, 0x64, 0x00, 0x00, 0x42, 0x6f, 0x6c, 0x64, 0x00, 0x00, 0x41, 0x00, + 0x73, 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x65, 0x00, + 0x72, 0x00, 0x20, 0x00, 0x2d, 0x00, 0x20, 0x00, 0x4f, 0x00, 0x70, 0x00, + 0x65, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x53, 0x00, 0x61, 0x00, 0x6e, 0x00, + 0x73, 0x00, 0x20, 0x00, 0x42, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x64, 0x00, + 0x20, 0x00, 0x42, 0x00, 0x75, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x64, 0x00, + 0x20, 0x00, 0x31, 0x00, 0x30, 0x00, 0x30, 0x00, 0x00, 0x41, 0x73, 0x63, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x2d, 0x20, 0x4f, 0x70, 0x65, 0x6e, + 0x20, 0x53, 0x61, 0x6e, 0x73, 0x20, 0x42, 0x6f, 0x6c, 0x64, 0x20, 0x42, + 0x75, 0x69, 0x6c, 0x64, 0x20, 0x31, 0x30, 0x30, 0x00, 0x00, 0x4f, 0x00, + 0x70, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x53, 0x00, 0x61, 0x00, + 0x6e, 0x00, 0x73, 0x00, 0x20, 0x00, 0x42, 0x00, 0x6f, 0x00, 0x6c, 0x00, + 0x64, 0x00, 0x00, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x53, 0x61, 0x6e, 0x73, + 0x20, 0x42, 0x6f, 0x6c, 0x64, 0x00, 0x00, 0x56, 0x00, 0x65, 0x00, 0x72, + 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x31, + 0x00, 0x2e, 0x00, 0x31, 0x00, 0x30, 0x00, 0x00, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x20, 0x31, 0x2e, 0x31, 0x30, 0x00, 0x00, 0x4f, 0x00, + 0x70, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x53, 0x00, 0x61, 0x00, 0x6e, 0x00, + 0x73, 0x00, 0x2d, 0x00, 0x42, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x64, 0x00, + 0x00, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x61, 0x6e, 0x73, 0x2d, 0x42, 0x6f, + 0x6c, 0x64, 0x00, 0x00, 0x4f, 0x00, 0x70, 0x00, 0x65, 0x00, 0x6e, 0x00, + 0x20, 0x00, 0x53, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x20, 0x00, + 0x69, 0x00, 0x73, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x74, 0x00, + 0x72, 0x00, 0x61, 0x00, 0x64, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x61, 0x00, + 0x72, 0x00, 0x6b, 0x00, 0x20, 0x00, 0x6f, 0x00, 0x66, 0x00, 0x20, 0x00, + 0x47, 0x00, 0x6f, 0x00, 0x6f, 0x00, 0x67, 0x00, 0x6c, 0x00, 0x65, 0x00, + 0x20, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x20, 0x00, 0x6d, 0x00, + 0x61, 0x00, 0x79, 0x00, 0x20, 0x00, 0x62, 0x00, 0x65, 0x00, 0x20, 0x00, + 0x72, 0x00, 0x65, 0x00, 0x67, 0x00, 0x69, 0x00, 0x73, 0x00, 0x74, 0x00, + 0x65, 0x00, 0x72, 0x00, 0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x69, 0x00, + 0x6e, 0x00, 0x20, 0x00, 0x63, 0x00, 0x65, 0x00, 0x72, 0x00, 0x74, 0x00, + 0x61, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x6a, 0x00, 0x75, 0x00, + 0x72, 0x00, 0x69, 0x00, 0x73, 0x00, 0x64, 0x00, 0x69, 0x00, 0x63, 0x00, + 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x2e, 0x00, + 0x00, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x53, 0x61, 0x6e, 0x73, 0x20, 0x69, + 0x73, 0x20, 0x61, 0x20, 0x74, 0x72, 0x61, 0x64, 0x65, 0x6d, 0x61, 0x72, + 0x6b, 0x20, 0x6f, 0x66, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, + 0x61, 0x6e, 0x64, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, 0x69, 0x6e, + 0x20, 0x63, 0x65, 0x72, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x6a, 0x75, 0x72, + 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x00, + 0x00, 0x41, 0x00, 0x73, 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x64, + 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x43, 0x00, 0x6f, 0x00, 0x72, + 0x00, 0x70, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, + 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x00, 0x41, 0x73, 0x63, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x20, 0x43, 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x00, 0x00, 0x68, 0x00, 0x74, 0x00, 0x74, 0x00, 0x70, 0x00, + 0x3a, 0x00, 0x2f, 0x00, 0x2f, 0x00, 0x77, 0x00, 0x77, 0x00, 0x77, 0x00, + 0x2e, 0x00, 0x61, 0x00, 0x73, 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, + 0x64, 0x00, 0x65, 0x00, 0x72, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x72, 0x00, + 0x70, 0x00, 0x2e, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2f, 0x00, + 0x00, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, + 0x61, 0x73, 0x63, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x63, 0x6f, 0x72, 0x70, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x00, 0x00, 0x68, 0x00, 0x74, 0x00, 0x74, + 0x00, 0x70, 0x00, 0x3a, 0x00, 0x2f, 0x00, 0x2f, 0x00, 0x77, 0x00, 0x77, + 0x00, 0x77, 0x00, 0x2e, 0x00, 0x61, 0x00, 0x73, 0x00, 0x63, 0x00, 0x65, + 0x00, 0x6e, 0x00, 0x64, 0x00, 0x65, 0x00, 0x72, 0x00, 0x63, 0x00, 0x6f, + 0x00, 0x72, 0x00, 0x70, 0x00, 0x2e, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, + 0x00, 0x2f, 0x00, 0x74, 0x00, 0x79, 0x00, 0x70, 0x00, 0x65, 0x00, 0x64, + 0x00, 0x65, 0x00, 0x73, 0x00, 0x69, 0x00, 0x67, 0x00, 0x6e, 0x00, 0x65, + 0x00, 0x72, 0x00, 0x73, 0x00, 0x2e, 0x00, 0x68, 0x00, 0x74, 0x00, 0x6d, + 0x00, 0x6c, 0x00, 0x00, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, + 0x77, 0x77, 0x2e, 0x61, 0x73, 0x63, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x63, + 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x79, 0x70, 0x65, + 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, + 0x6d, 0x6c, 0x00, 0x00, 0x4c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x65, 0x00, + 0x6e, 0x00, 0x73, 0x00, 0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x75, 0x00, + 0x6e, 0x00, 0x64, 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x74, 0x00, + 0x68, 0x00, 0x65, 0x00, 0x20, 0x00, 0x41, 0x00, 0x70, 0x00, 0x61, 0x00, + 0x63, 0x00, 0x68, 0x00, 0x65, 0x00, 0x20, 0x00, 0x4c, 0x00, 0x69, 0x00, + 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x65, 0x00, 0x2c, 0x00, + 0x20, 0x00, 0x56, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x69, 0x00, + 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x32, 0x00, 0x2e, 0x00, 0x30, 0x00, + 0x00, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x64, 0x20, 0x75, 0x6e, + 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x70, 0x61, 0x63, + 0x68, 0x65, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x32, 0x2e, 0x30, 0x00, + 0x00, 0x68, 0x00, 0x74, 0x00, 0x74, 0x00, 0x70, 0x00, 0x3a, 0x00, 0x2f, + 0x00, 0x2f, 0x00, 0x77, 0x00, 0x77, 0x00, 0x77, 0x00, 0x2e, 0x00, 0x61, + 0x00, 0x70, 0x00, 0x61, 0x00, 0x63, 0x00, 0x68, 0x00, 0x65, 0x00, 0x2e, + 0x00, 0x6f, 0x00, 0x72, 0x00, 0x67, 0x00, 0x2f, 0x00, 0x6c, 0x00, 0x69, + 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x65, 0x00, 0x73, + 0x00, 0x2f, 0x00, 0x4c, 0x00, 0x49, 0x00, 0x43, 0x00, 0x45, 0x00, 0x4e, + 0x00, 0x53, 0x00, 0x45, 0x00, 0x2d, 0x00, 0x32, 0x00, 0x2e, 0x00, 0x30, + 0x00, 0x00, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, + 0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, + 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x2f, 0x4c, 0x49, 0x43, + 0x45, 0x4e, 0x53, 0x45, 0x2d, 0x32, 0x2e, 0x30, 0x00, 0x41, 0x6c, 0x6c, + 0x20, 0x54, 0x79, 0x70, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, + 0x20, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x00, 0x46, 0x6f, + 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x79, 0x70, 0x6f, + 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x71, 0x75, 0x65, 0x73, 0x00, 0x41, + 0x6c, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x6f, 0x67, 0x72, 0x61, 0x66, + 0x69, 0x73, 0x63, 0x68, 0x65, 0x6e, 0x20, 0x4d, 0x9a, 0x67, 0x6c, 0x69, + 0x63, 0x68, 0x6b, 0x65, 0x69, 0x74, 0x65, 0x6e, 0x00, 0x46, 0x75, 0x6e, + 0x7a, 0x69, 0x6f, 0x6e, 0x69, 0x20, 0x54, 0x69, 0x70, 0x6f, 0x67, 0x72, + 0x61, 0x66, 0x69, 0x63, 0x68, 0x65, 0x00, 0x41, 0x6c, 0x6c, 0x65, 0x20, + 0x74, 0x79, 0x70, 0x6f, 0x67, 0x72, 0x61, 0x66, 0x69, 0x73, 0x63, 0x68, + 0x65, 0x20, 0x6b, 0x65, 0x6e, 0x6d, 0x65, 0x72, 0x6b, 0x65, 0x6e, 0x00, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x43, 0x61, 0x73, 0x65, 0x00, + 0x53, 0x74, 0x79, 0x6c, 0x65, 0x20, 0x64, 0x65, 0x73, 0x20, 0x43, 0x68, + 0x69, 0x66, 0x66, 0x72, 0x65, 0x73, 0x00, 0x4e, 0x75, 0x6d, 0x6d, 0x65, + 0x72, 0x68, 0x6f, 0x6f, 0x67, 0x74, 0x65, 0x00, 0x41, 0x6c, 0x6c, 0x20, + 0x54, 0x79, 0x70, 0x65, 0x20, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x00, 0x54, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x20, 0x66, 0x6f, 0x6e, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x79, 0x70, 0x6f, 0x67, + 0x72, 0x61, 0x70, 0x68, 0x69, 0x71, 0x75, 0x65, 0x73, 0x00, 0x41, 0x6c, + 0x6c, 0x65, 0x20, 0x41, 0x75, 0x73, 0x7a, 0x65, 0x69, 0x63, 0x68, 0x6e, + 0x75, 0x6e, 0x67, 0x73, 0x61, 0x72, 0x74, 0x65, 0x6e, 0x00, 0x54, 0x75, + 0x74, 0x74, 0x65, 0x20, 0x6c, 0x65, 0x20, 0x46, 0x75, 0x6e, 0x7a, 0x69, + 0x6f, 0x6e, 0x69, 0x00, 0x41, 0x6c, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, + 0x65, 0x6b, 0x65, 0x6e, 0x6d, 0x65, 0x72, 0x6b, 0x65, 0x6e, 0x00, 0x4c, + 0x6f, 0x77, 0x65, 0x72, 0x20, 0x43, 0x61, 0x73, 0x65, 0x20, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x73, 0x00, 0x43, 0x68, 0x69, 0x66, 0x66, 0x72, + 0x65, 0x73, 0x20, 0x41, 0x6e, 0x63, 0x69, 0x65, 0x6e, 0x73, 0x20, 0x28, + 0x62, 0x61, 0x73, 0x20, 0x64, 0x65, 0x20, 0x63, 0x61, 0x73, 0x73, 0x65, + 0x29, 0x00, 0x4d, 0x65, 0x64, 0x69, 0xbe, 0x76, 0x61, 0x6c, 0x2d, 0x5a, + 0x69, 0x66, 0x66, 0x65, 0x72, 0x6e, 0x00, 0x53, 0x6f, 0x70, 0x72, 0x61, + 0x20, 0x6c, 0x61, 0x20, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x20, 0x42, 0x61, + 0x73, 0x65, 0x00, 0x4b, 0x6c, 0x65, 0x69, 0x6e, 0x65, 0x20, 0x6e, 0x75, + 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x00, 0x55, 0x70, 0x70, 0x65, 0x72, 0x20, + 0x43, 0x61, 0x73, 0x65, 0x20, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, + 0x00, 0x43, 0x68, 0x69, 0x66, 0x66, 0x72, 0x65, 0x73, 0x20, 0x43, 0x6f, + 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x6e, 0x65, 0x6c, 0x73, + 0x20, 0x28, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x29, + 0x00, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x65, 0x20, 0x5a, 0x69, 0x66, + 0x66, 0x65, 0x72, 0x6e, 0x00, 0x54, 0x72, 0x61, 0x64, 0x69, 0x7a, 0x69, + 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x00, 0x47, 0x72, 0x6f, 0x74, 0x65, 0x20, + 0x6e, 0x75, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0x66, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, + 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, + 0x00, 0x09, 0x00, 0x0a, 0x00, 0x0b, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, + 0x00, 0x0f, 0x00, 0x10, 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0x00, 0x14, + 0x00, 0x15, 0x00, 0x16, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, 0x1a, + 0x00, 0x1b, 0x00, 0x1c, 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x20, + 0x00, 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, 0x24, 0x00, 0x25, 0x00, 0x26, + 0x00, 0x27, 0x00, 0x28, 0x00, 0x29, 0x00, 0x2a, 0x00, 0x2b, 0x00, 0x2c, + 0x00, 0x2d, 0x00, 0x2e, 0x00, 0x2f, 0x00, 0x30, 0x00, 0x31, 0x00, 0x32, + 0x00, 0x33, 0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, + 0x00, 0x39, 0x00, 0x3a, 0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3e, + 0x00, 0x3f, 0x00, 0x40, 0x00, 0x41, 0x00, 0x42, 0x00, 0x43, 0x00, 0x44, + 0x00, 0x45, 0x00, 0x46, 0x00, 0x47, 0x00, 0x48, 0x00, 0x49, 0x00, 0x4a, + 0x00, 0x4b, 0x00, 0x4c, 0x00, 0x4d, 0x00, 0x4e, 0x00, 0x4f, 0x00, 0x50, + 0x00, 0x51, 0x00, 0x52, 0x00, 0x53, 0x00, 0x54, 0x00, 0x55, 0x00, 0x56, + 0x00, 0x57, 0x00, 0x58, 0x00, 0x59, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x5c, + 0x00, 0x5d, 0x00, 0x5e, 0x00, 0x5f, 0x00, 0x60, 0x00, 0x61, 0x00, 0xac, + 0x00, 0xa3, 0x00, 0x84, 0x00, 0x85, 0x00, 0xbd, 0x00, 0x96, 0x00, 0xe8, + 0x00, 0x86, 0x00, 0x8e, 0x00, 0x8b, 0x00, 0x9d, 0x00, 0xa9, 0x00, 0xa4, + 0x01, 0x02, 0x00, 0x8a, 0x01, 0x03, 0x00, 0x83, 0x00, 0x93, 0x00, 0xf2, + 0x00, 0xf3, 0x00, 0x8d, 0x00, 0x97, 0x00, 0x88, 0x00, 0xc3, 0x00, 0xde, + 0x00, 0xf1, 0x00, 0x9e, 0x00, 0xaa, 0x00, 0xf5, 0x00, 0xf4, 0x00, 0xf6, + 0x00, 0xa2, 0x00, 0xad, 0x00, 0xc9, 0x00, 0xc7, 0x00, 0xae, 0x00, 0x62, + 0x00, 0x63, 0x00, 0x90, 0x00, 0x64, 0x00, 0xcb, 0x00, 0x65, 0x00, 0xc8, + 0x00, 0xca, 0x00, 0xcf, 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xe9, + 0x00, 0x66, 0x00, 0xd3, 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xaf, 0x00, 0x67, + 0x00, 0xf0, 0x00, 0x91, 0x00, 0xd6, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0x68, + 0x00, 0xeb, 0x00, 0xed, 0x00, 0x89, 0x00, 0x6a, 0x00, 0x69, 0x00, 0x6b, + 0x00, 0x6d, 0x00, 0x6c, 0x00, 0x6e, 0x00, 0xa0, 0x00, 0x6f, 0x00, 0x71, + 0x00, 0x70, 0x00, 0x72, 0x00, 0x73, 0x00, 0x75, 0x00, 0x74, 0x00, 0x76, + 0x00, 0x77, 0x00, 0xea, 0x00, 0x78, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x7b, + 0x00, 0x7d, 0x00, 0x7c, 0x00, 0xb8, 0x00, 0xa1, 0x00, 0x7f, 0x00, 0x7e, + 0x00, 0x80, 0x00, 0x81, 0x00, 0xec, 0x00, 0xee, 0x00, 0xba, 0x07, 0x75, + 0x6e, 0x69, 0x30, 0x30, 0x41, 0x44, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x73, + 0x63, 0x6f, 0x72, 0x65, 0x00, 0x01, 0x00, 0x02, 0x00, 0x08, 0x00, 0x0a, + 0xff, 0xff, 0x00, 0x0f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x15, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x15, 0x00, 0x02, 0x00, 0x00, 0x00, 0x28, + 0xc0, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x01, 0x03, + 0x00, 0x01, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0xe5, 0x64, 0x3d, 0xfb, 0x00, 0x00, 0x00, 0x00, 0xc9, 0x42, 0x17, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0xe5, 0xf9, 0x0a, 0x7c}; +unsigned int MwBoldTTFDataSize = 36548; +#endif diff --git a/widget/milsko/milskosrc/src/text/font/font.c b/widget/milsko/milskosrc/src/text/font/font.c new file mode 100644 index 0000000000..e1c5d89fb0 --- /dev/null +++ b/widget/milsko/milskosrc/src/text/font/font.c @@ -0,0 +1,264 @@ +#include + +/** + * Copyright notice: + * "Public domain font. Share and enjoy." + */ +MwFont MwFontData[] = { + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 0 */ + {0, 12, {0, 0, 12, 12, 30, 30, 63, 63, 30, 30, 12, 12, 0, 0}}, /* 1 */ + {0, 12, {42, 85, 42, 85, 42, 85, 42, 85, 42, 85, 42, 85, 42, 85}}, /* 2 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 3 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 4 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 5 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 6 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 7 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 8 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 9 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 10 */ + {0, 12, {8, 8, 8, 8, 8, 8, 8, 120, 0, 0, 0, 0, 0, 0}}, /* 11 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 120, 8, 8, 8, 8, 8, 8}}, /* 12 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 15, 8, 8, 8, 8, 8, 8}}, /* 13 */ + {0, 12, {8, 8, 8, 8, 8, 8, 8, 15, 0, 0, 0, 0, 0, 0}}, /* 14 */ + {0, 12, {8, 8, 8, 8, 8, 8, 8, 127, 8, 8, 8, 8, 8, 8}}, /* 15 */ + {0, 12, {127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 16 */ + {0, 12, {0, 0, 0, 0, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 17 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 127, 0, 0, 0, 0, 0, 0}}, /* 18 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 0, 0, 0, 0}}, /* 19 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127}}, /* 20 */ + {0, 12, {8, 8, 8, 8, 8, 8, 8, 15, 8, 8, 8, 8, 8, 8}}, /* 21 */ + {0, 12, {8, 8, 8, 8, 8, 8, 8, 120, 8, 8, 8, 8, 8, 8}}, /* 22 */ + {0, 12, {8, 8, 8, 8, 8, 8, 8, 127, 0, 0, 0, 0, 0, 0}}, /* 23 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 127, 8, 8, 8, 8, 8, 8}}, /* 24 */ + {0, 12, {8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8}}, /* 25 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 26 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 27 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 28 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 29 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 30 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 31 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 32 */ + {0, 12, {0, 0, 8, 8, 8, 8, 8, 8, 8, 0, 8, 8, 0, 0}}, /* 33 */ + {0, 12, {54, 18, 18, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 34 */ + {0, 12, {0, 0, 5, 5, 5, 63, 10, 10, 63, 20, 20, 20, 0, 0}}, /* 35 */ + {0, 12, {0, 0, 4, 30, 37, 37, 20, 14, 5, 37, 37, 30, 4, 0}}, /* 36 */ + {0, 12, {0, 0, 25, 37, 38, 28, 4, 8, 14, 25, 41, 38, 0, 0}}, /* 37 */ + {0, 12, {0, 0, 12, 18, 18, 18, 12, 25, 37, 34, 38, 25, 0, 0}}, /* 38 */ + {0, 12, {24, 8, 8, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 39 */ + {0, 12, {0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 4, 4, 2, 1}}, /* 40 */ + {0, 12, {0, 32, 16, 8, 8, 4, 4, 4, 4, 4, 8, 8, 16, 32}}, /* 41 */ + {0, 12, {0, 0, 0, 4, 21, 14, 4, 4, 14, 21, 4, 0, 0, 0}}, /* 42 */ + {0, 12, {0, 0, 0, 0, 8, 8, 8, 62, 8, 8, 8, 0, 0, 0}}, /* 43 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 8, 8, 16}}, /* 44 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 63, 0, 0, 0, 0, 0, 0}}, /* 45 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 0, 0}}, /* 46 */ + {0, 12, {0, 1, 1, 2, 2, 4, 4, 4, 8, 8, 16, 16, 32, 32}}, /* 47 */ + {0, 12, {0, 0, 12, 18, 33, 33, 33, 33, 33, 33, 18, 12, 0, 0}}, /* 48 */ + {0, 12, {0, 0, 4, 12, 20, 4, 4, 4, 4, 4, 4, 31, 0, 0}}, /* 49 */ + {0, 12, {0, 0, 30, 33, 33, 1, 2, 2, 4, 8, 16, 63, 0, 0}}, /* 50 */ + {0, 12, {0, 0, 30, 33, 33, 1, 14, 1, 1, 33, 33, 30, 0, 0}}, /* 51 */ + {0, 12, {0, 0, 2, 6, 10, 10, 18, 18, 34, 63, 2, 2, 0, 0}}, /* 52 */ + {0, 12, {0, 0, 63, 32, 32, 62, 33, 1, 1, 33, 33, 30, 0, 0}}, /* 53 */ + {0, 12, {0, 0, 14, 17, 33, 32, 46, 49, 33, 33, 33, 30, 0, 0}}, /* 54 */ + {0, 12, {0, 0, 63, 33, 34, 2, 4, 4, 4, 4, 4, 4, 0, 0}}, /* 55 */ + {0, 12, {0, 0, 30, 33, 33, 18, 12, 18, 33, 33, 33, 30, 0, 0}}, /* 56 */ + {0, 12, {0, 0, 30, 33, 33, 33, 35, 29, 1, 33, 34, 28, 0, 0}}, /* 57 */ + {0, 12, {0, 0, 0, 0, 8, 8, 0, 0, 0, 8, 8, 0, 0, 0}}, /* 58 */ + {0, 12, {0, 0, 0, 0, 8, 8, 0, 0, 0, 24, 8, 8, 16, 0}}, /* 59 */ + {0, 12, {0, 0, 0, 2, 4, 8, 16, 32, 16, 8, 4, 2, 0, 0}}, /* 60 */ + {0, 12, {0, 0, 0, 0, 0, 63, 0, 0, 63, 0, 0, 0, 0, 0}}, /* 61 */ + {0, 12, {0, 0, 0, 32, 16, 8, 4, 2, 4, 8, 16, 32, 0, 0}}, /* 62 */ + {0, 12, {0, 0, 30, 33, 33, 2, 4, 4, 4, 0, 4, 4, 0, 0}}, /* 63 */ + {0, 12, {0, 0, 14, 17, 39, 41, 41, 41, 41, 39, 16, 15, 0, 0}}, /* 64 */ + {0, 12, {0, 0, 8, 12, 20, 18, 34, 33, 63, 33, 33, 33, 0, 0}}, /* 65 */ + {0, 12, {0, 0, 62, 33, 33, 34, 62, 33, 33, 33, 33, 62, 0, 0}}, /* 66 */ + {0, 12, {0, 0, 30, 33, 33, 32, 32, 32, 32, 33, 33, 30, 0, 0}}, /* 67 */ + {0, 12, {0, 0, 60, 34, 33, 33, 33, 33, 33, 33, 34, 60, 0, 0}}, /* 68 */ + {0, 12, {0, 0, 63, 32, 32, 32, 62, 32, 32, 32, 32, 63, 0, 0}}, /* 69 */ + {0, 12, {0, 0, 63, 32, 32, 32, 62, 32, 32, 32, 32, 32, 0, 0}}, /* 70 */ + {0, 12, {0, 0, 30, 33, 33, 32, 32, 39, 33, 33, 33, 30, 0, 0}}, /* 71 */ + {0, 12, {0, 0, 33, 33, 33, 33, 63, 33, 33, 33, 33, 33, 0, 0}}, /* 72 */ + {0, 12, {0, 0, 31, 4, 4, 4, 4, 4, 4, 4, 4, 31, 0, 0}}, /* 73 */ + {0, 12, {0, 0, 1, 1, 1, 1, 1, 1, 1, 33, 34, 28, 0, 0}}, /* 74 */ + {0, 12, {0, 0, 33, 34, 36, 40, 56, 36, 36, 34, 33, 33, 0, 0}}, /* 75 */ + {0, 12, {0, 0, 32, 32, 32, 32, 32, 32, 32, 32, 32, 63, 0, 0}}, /* 76 */ + {0, 12, {0, 0, 33, 35, 51, 53, 45, 41, 41, 33, 33, 33, 0, 0}}, /* 77 */ + {0, 12, {0, 0, 49, 49, 41, 41, 41, 37, 37, 37, 35, 35, 0, 0}}, /* 78 */ + {0, 12, {0, 0, 30, 33, 33, 33, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 79 */ + {0, 12, {0, 0, 62, 33, 33, 33, 33, 62, 32, 32, 32, 32, 0, 0}}, /* 80 */ + {0, 12, {0, 0, 30, 33, 33, 33, 33, 33, 57, 37, 35, 30, 2, 1}}, /* 81 */ + {0, 12, {0, 0, 62, 33, 33, 33, 62, 34, 33, 33, 33, 33, 0, 0}}, /* 82 */ + {0, 12, {0, 0, 30, 33, 33, 16, 8, 4, 2, 33, 33, 30, 0, 0}}, /* 83 */ + {0, 12, {0, 0, 63, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0}}, /* 84 */ + {0, 12, {0, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 85 */ + {0, 12, {0, 0, 33, 33, 33, 34, 18, 18, 20, 12, 8, 8, 0, 0}}, /* 86 */ + {0, 12, {0, 0, 37, 37, 37, 37, 37, 63, 18, 18, 18, 18, 0, 0}}, /* 87 */ + {0, 12, {0, 0, 33, 33, 18, 18, 12, 12, 18, 18, 33, 33, 0, 0}}, /* 88 */ + {0, 12, {0, 0, 33, 33, 34, 18, 20, 12, 8, 8, 8, 8, 0, 0}}, /* 89 */ + {0, 12, {0, 0, 63, 1, 2, 4, 4, 8, 16, 16, 32, 63, 0, 0}}, /* 90 */ + {0, 12, {0, 15, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 15}}, /* 91 */ + {0, 12, {0, 32, 32, 16, 16, 8, 8, 8, 4, 4, 2, 2, 1, 1}}, /* 92 */ + {0, 12, {0, 60, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 60}}, /* 93 */ + {0, 12, {12, 18, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 94 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 63}}, /* 95 */ + {0, 12, {6, 4, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 96 */ + {0, 12, {0, 0, 0, 0, 0, 30, 33, 7, 25, 33, 35, 29, 0, 0}}, /* 97 */ + {0, 12, {0, 0, 32, 32, 32, 46, 49, 33, 33, 33, 49, 46, 0, 0}}, /* 98 */ + {0, 12, {0, 0, 0, 0, 0, 30, 33, 32, 32, 32, 33, 30, 0, 0}}, /* 99 */ + {0, 12, {0, 0, 1, 1, 1, 29, 35, 33, 33, 33, 35, 29, 0, 0}}, /* 100 */ + {0, 12, {0, 0, 0, 0, 0, 30, 33, 33, 63, 32, 33, 30, 0, 0}}, /* 101 */ + {0, 12, {0, 0, 6, 9, 8, 8, 62, 8, 8, 8, 8, 8, 0, 0}}, /* 102 */ + {0, 12, {0, 0, 0, 0, 0, 29, 34, 34, 34, 28, 16, 46, 33, 30}}, /* 103 */ + {0, 12, {0, 0, 32, 32, 32, 46, 49, 33, 33, 33, 33, 33, 0, 0}}, /* 104 */ + {0, 12, {0, 0, 8, 8, 0, 8, 8, 8, 8, 8, 8, 8, 0, 0}}, /* 105 */ + {0, 12, {0, 0, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 34, 28}}, /* 106 */ + {0, 12, {0, 0, 32, 32, 32, 34, 36, 40, 56, 36, 34, 33, 0, 0}}, /* 107 */ + {0, 12, {0, 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 0, 0}}, /* 108 */ + {0, 12, {0, 0, 0, 0, 0, 62, 41, 41, 41, 41, 41, 41, 0, 0}}, /* 109 */ + {0, 12, {0, 0, 0, 0, 0, 46, 49, 33, 33, 33, 33, 33, 0, 0}}, /* 110 */ + {0, 12, {0, 0, 0, 0, 0, 30, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 111 */ + {0, 12, {0, 0, 0, 0, 0, 46, 49, 33, 33, 33, 49, 46, 32, 32}}, /* 112 */ + {0, 12, {0, 0, 0, 0, 0, 29, 35, 33, 33, 33, 35, 29, 1, 1}}, /* 113 */ + {0, 12, {0, 0, 0, 0, 0, 46, 49, 33, 32, 32, 32, 32, 0, 0}}, /* 114 */ + {0, 12, {0, 0, 0, 0, 0, 30, 33, 16, 12, 2, 33, 30, 0, 0}}, /* 115 */ + {0, 12, {0, 0, 8, 8, 8, 63, 8, 8, 8, 8, 8, 7, 0, 0}}, /* 116 */ + {0, 12, {0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 35, 29, 0, 0}}, /* 117 */ + {0, 12, {0, 0, 0, 0, 0, 33, 33, 17, 18, 10, 12, 4, 0, 0}}, /* 118 */ + {0, 12, {0, 0, 0, 0, 0, 37, 37, 37, 63, 18, 18, 18, 0, 0}}, /* 119 */ + {0, 12, {0, 0, 0, 0, 0, 33, 33, 18, 12, 18, 33, 33, 0, 0}}, /* 120 */ + {0, 12, {0, 0, 0, 0, 0, 33, 33, 17, 18, 10, 14, 4, 36, 24}}, /* 121 */ + {0, 12, {0, 0, 0, 0, 0, 63, 2, 4, 8, 8, 16, 63, 0, 0}}, /* 122 */ + {0, 12, {0, 3, 4, 4, 4, 4, 4, 8, 4, 4, 4, 4, 4, 3}}, /* 123 */ + {0, 12, {0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8}}, /* 124 */ + {0, 12, {0, 48, 8, 8, 8, 8, 8, 4, 8, 8, 8, 8, 8, 48}}, /* 125 */ + {0, 12, {0, 16, 41, 37, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 126 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 127 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 128 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 129 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 130 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 131 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 132 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 133 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 134 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 135 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 136 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 137 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 138 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 139 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 140 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 141 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 142 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 143 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 144 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 145 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 146 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 147 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 148 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 149 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 150 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 151 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 152 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 153 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 154 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 155 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 156 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 157 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 158 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 159 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 160 */ + {0, 12, {0, 0, 8, 8, 0, 8, 8, 8, 8, 8, 8, 8, 0, 0}}, /* 161 */ + {0, 12, {0, 0, 0, 0, 8, 31, 41, 40, 40, 40, 41, 31, 8, 0}}, /* 162 */ + {0, 12, {0, 0, 0, 12, 18, 16, 16, 60, 16, 16, 60, 18, 0, 0}}, /* 163 */ + {0, 12, {0, 0, 0, 0, 33, 30, 18, 18, 30, 33, 0, 0, 0, 0}}, /* 164 */ + {0, 12, {0, 0, 33, 18, 12, 63, 4, 4, 63, 4, 4, 4, 0, 0}}, /* 165 */ + {0, 12, {0, 0, 8, 8, 8, 8, 0, 0, 8, 8, 8, 8, 0, 0}}, /* 166 */ + {0, 12, {0, 30, 33, 16, 12, 18, 33, 18, 12, 2, 33, 30, 0, 0}}, /* 167 */ + {0, 12, {0, 36, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 168 */ + {0, 12, {0, 30, 33, 45, 51, 49, 49, 49, 51, 45, 33, 30, 0, 0}}, /* 169 */ + {0, 12, {0, 14, 17, 15, 17, 19, 13, 0, 31, 0, 0, 0, 0, 0}}, /* 170 */ + {0, 12, {0, 0, 0, 0, 0, 5, 10, 20, 40, 20, 10, 5, 0, 0}}, /* 171 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 124, 4, 4, 4, 0, 0}}, /* 172 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 120, 0, 0, 0, 0, 0}}, /* 173 */ + {0, 12, {0, 30, 33, 61, 51, 51, 61, 51, 51, 51, 33, 30, 0, 0}}, /* 174 */ + {0, 12, {0, 0, 120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 175 */ + {0, 12, {0, 24, 36, 36, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 176 */ + {0, 12, {0, 0, 0, 0, 0, 0, 8, 8, 62, 8, 8, 62, 0, 0}}, /* 177 */ + {0, 12, {0, 24, 36, 4, 8, 16, 32, 60, 0, 0, 0, 0, 0, 0}}, /* 178 */ + {0, 12, {0, 24, 36, 4, 24, 4, 36, 24, 0, 0, 0, 0, 0, 0}}, /* 179 */ + {0, 12, {0, 4, 8, 16, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0}}, /* 180 */ + {0, 12, {0, 0, 0, 0, 0, 0, 34, 34, 34, 34, 54, 42, 32, 32}}, /* 181 */ + {0, 12, {0, 0, 30, 42, 42, 42, 42, 26, 10, 10, 10, 10, 10, 14}}, /* 182 */ + {0, 12, {0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0}}, /* 183 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 16}}, /* 184 */ + {0, 12, {0, 0, 16, 48, 16, 16, 16, 16, 0, 0, 0, 0, 0, 0}}, /* 185 */ + {0, 12, {0, 0, 12, 18, 18, 12, 0, 30, 0, 0, 0, 0, 0, 0}}, /* 186 */ + {0, 12, {0, 0, 0, 0, 0, 40, 20, 10, 5, 10, 20, 40, 0, 0}}, /* 187 */ + {0, 12, {0, 0, 16, 49, 18, 18, 20, 9, 11, 21, 39, 33, 0, 0}}, /* 188 */ + {0, 12, {0, 0, 16, 49, 18, 18, 20, 10, 13, 17, 34, 39, 0, 0}}, /* 189 */ + {0, 12, {0, 0, 49, 9, 18, 12, 52, 9, 19, 21, 39, 1, 0, 0}}, /* 190 */ + {0, 12, {0, 0, 0, 4, 4, 0, 4, 4, 4, 4, 2, 33, 33, 30}}, /* 191 */ + {0, 12, {16, 12, 0, 12, 20, 18, 34, 33, 63, 33, 33, 33, 0, 0}}, /* 192 */ + {0, 12, {2, 12, 0, 12, 20, 18, 34, 33, 63, 33, 33, 33, 0, 0}}, /* 193 */ + {0, 12, {12, 18, 0, 12, 20, 18, 34, 33, 63, 33, 33, 33, 0, 0}}, /* 194 */ + {0, 12, {10, 20, 0, 12, 20, 18, 34, 33, 63, 33, 33, 33, 0, 0}}, /* 195 */ + {0, 12, {0, 18, 0, 12, 20, 18, 34, 33, 63, 33, 33, 33, 0, 0}}, /* 196 */ + {0, 12, {8, 0, 8, 12, 20, 18, 34, 33, 63, 33, 33, 33, 0, 0}}, /* 197 */ + {0, 12, {0, 0, 31, 40, 40, 40, 78, 120, 72, 72, 72, 79, 0, 0}}, /* 198 */ + {0, 12, {0, 0, 30, 33, 33, 32, 32, 32, 32, 33, 33, 30, 4, 8}}, /* 199 */ + {0, 12, {16, 12, 0, 63, 32, 32, 32, 62, 32, 32, 32, 63, 0, 0}}, /* 200 */ + {0, 12, {2, 12, 0, 63, 32, 32, 32, 62, 32, 32, 32, 63, 0, 0}}, /* 201 */ + {0, 12, {12, 18, 0, 63, 32, 32, 32, 62, 32, 32, 32, 63, 0, 0}}, /* 202 */ + {0, 12, {0, 18, 0, 63, 32, 32, 32, 62, 32, 32, 32, 63, 0, 0}}, /* 203 */ + {0, 12, {8, 6, 0, 31, 4, 4, 4, 4, 4, 4, 4, 31, 0, 0}}, /* 204 */ + {0, 12, {2, 12, 0, 31, 4, 4, 4, 4, 4, 4, 4, 31, 0, 0}}, /* 205 */ + {0, 12, {4, 10, 0, 31, 4, 4, 4, 4, 4, 4, 4, 31, 0, 0}}, /* 206 */ + {0, 12, {0, 10, 0, 31, 4, 4, 4, 4, 4, 4, 4, 31, 0, 0}}, /* 207 */ + {0, 12, {0, 0, 60, 34, 33, 33, 113, 33, 33, 33, 34, 60, 0, 0}}, /* 208 */ + {0, 12, {10, 20, 0, 49, 41, 41, 41, 37, 37, 37, 35, 35, 0, 0}}, /* 209 */ + {0, 12, {16, 12, 0, 30, 33, 33, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 210 */ + {0, 12, {2, 12, 0, 30, 33, 33, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 211 */ + {0, 12, {12, 18, 0, 30, 33, 33, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 212 */ + {0, 12, {10, 20, 0, 30, 33, 33, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 213 */ + {0, 12, {0, 18, 0, 30, 33, 33, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 214 */ + {0, 12, {0, 0, 0, 0, 0, 65, 34, 20, 8, 20, 34, 65, 0, 0}}, /* 215 */ + {0, 12, {1, 1, 30, 35, 37, 37, 37, 41, 41, 41, 49, 30, 32, 32}}, /* 216 */ + {0, 12, {16, 12, 0, 33, 33, 33, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 217 */ + {0, 12, {2, 12, 0, 33, 33, 33, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 218 */ + {0, 12, {12, 18, 0, 33, 33, 33, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 219 */ + {0, 12, {0, 18, 0, 33, 33, 33, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 220 */ + {0, 12, {2, 12, 33, 33, 34, 18, 20, 12, 8, 8, 8, 8, 0, 0}}, /* 221 */ + {0, 12, {0, 0, 32, 32, 62, 33, 33, 33, 33, 62, 32, 32, 0, 0}}, /* 222 */ + {0, 12, {0, 0, 12, 18, 18, 18, 28, 18, 17, 17, 17, 62, 0, 0}}, /* 223 */ + {0, 12, {0, 16, 8, 4, 0, 30, 33, 7, 25, 33, 35, 29, 0, 0}}, /* 224 */ + {0, 12, {0, 2, 4, 8, 0, 30, 33, 7, 25, 33, 35, 29, 0, 0}}, /* 225 */ + {0, 12, {0, 0, 12, 18, 0, 30, 33, 7, 25, 33, 35, 29, 0, 0}}, /* 226 */ + {0, 12, {0, 0, 10, 20, 0, 30, 33, 7, 25, 33, 35, 29, 0, 0}}, /* 227 */ + {0, 12, {0, 0, 0, 18, 0, 30, 33, 7, 25, 33, 35, 29, 0, 0}}, /* 228 */ + {0, 12, {0, 8, 20, 8, 0, 30, 33, 7, 25, 33, 35, 29, 0, 0}}, /* 229 */ + {0, 12, {0, 0, 0, 0, 0, 62, 73, 25, 47, 72, 73, 62, 0, 0}}, /* 230 */ + {0, 12, {0, 0, 0, 0, 0, 30, 33, 32, 32, 32, 33, 30, 4, 8}}, /* 231 */ + {0, 12, {0, 16, 8, 4, 0, 30, 33, 33, 63, 32, 33, 30, 0, 0}}, /* 232 */ + {0, 12, {0, 2, 4, 8, 0, 30, 33, 33, 63, 32, 33, 30, 0, 0}}, /* 233 */ + {0, 12, {0, 0, 12, 18, 0, 30, 33, 33, 63, 32, 33, 30, 0, 0}}, /* 234 */ + {0, 12, {0, 0, 0, 18, 0, 30, 33, 33, 63, 32, 33, 30, 0, 0}}, /* 235 */ + {0, 12, {0, 16, 8, 4, 0, 8, 8, 8, 8, 8, 8, 8, 0, 0}}, /* 236 */ + {0, 12, {0, 4, 8, 16, 0, 8, 8, 8, 8, 8, 8, 8, 0, 0}}, /* 237 */ + {0, 12, {0, 0, 8, 20, 0, 8, 8, 8, 8, 8, 8, 8, 0, 0}}, /* 238 */ + {0, 12, {0, 0, 0, 20, 0, 8, 8, 8, 8, 8, 8, 8, 0, 0}}, /* 239 */ + {0, 12, {0, 20, 8, 20, 2, 30, 34, 34, 34, 34, 34, 28, 0, 0}}, /* 240 */ + {0, 12, {0, 0, 10, 20, 0, 46, 49, 33, 33, 33, 33, 33, 0, 0}}, /* 241 */ + {0, 12, {0, 16, 8, 4, 0, 30, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 242 */ + {0, 12, {0, 2, 4, 8, 0, 30, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 243 */ + {0, 12, {0, 0, 12, 18, 0, 30, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 244 */ + {0, 12, {0, 0, 10, 20, 0, 30, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 245 */ + {0, 12, {0, 0, 0, 18, 0, 30, 33, 33, 33, 33, 33, 30, 0, 0}}, /* 246 */ + {0, 12, {0, 0, 0, 0, 0, 0, 0, 24, 0, 126, 0, 24, 0, 0}}, /* 247 */ + {0, 12, {0, 0, 0, 1, 2, 30, 37, 37, 41, 41, 49, 30, 32, 32}}, /* 248 */ + {0, 12, {0, 0, 16, 8, 4, 33, 33, 33, 33, 33, 35, 29, 0, 0}}, /* 249 */ + {0, 12, {0, 0, 2, 4, 8, 33, 33, 33, 33, 33, 35, 29, 0, 0}}, /* 250 */ + {0, 12, {0, 0, 12, 18, 0, 33, 33, 33, 33, 33, 35, 29, 0, 0}}, /* 251 */ + {0, 12, {0, 0, 0, 18, 0, 33, 33, 33, 33, 33, 35, 29, 0, 0}}, /* 252 */ + {0, 12, {0, 0, 2, 4, 8, 33, 33, 17, 18, 10, 14, 4, 36, 24}}, /* 253 */ + {0, 12, {0, 0, 32, 32, 32, 46, 49, 33, 33, 33, 49, 46, 32, 32}}, /* 254 */ + {0, 12, {0, 0, 0, 18, 0, 33, 33, 17, 18, 10, 14, 4, 36, 24}} /* 255 */ +}; diff --git a/widget/milsko/milskosrc/src/text/font/monottf.c b/widget/milsko/milskosrc/src/text/font/monottf.c new file mode 100644 index 0000000000..7a89f94391 --- /dev/null +++ b/widget/milsko/milskosrc/src/text/font/monottf.c @@ -0,0 +1,3022 @@ +#include + +#if defined(USE_STB_TRUETYPE) || defined(USE_FREETYPE2) || defined(USE_GDI_TEXT) +unsigned char MwMonospaceTTFData[] = { + 0x00, 0x01, 0x00, 0x00, 0x00, 0x11, 0x01, 0x00, 0x00, 0x04, 0x00, 0x10, + 0x46, 0x46, 0x54, 0x4d, 0xac, 0x0d, 0xe4, 0x23, 0x00, 0x00, 0x8d, 0x3c, + 0x00, 0x00, 0x00, 0x1c, 0x4f, 0x53, 0x2f, 0x32, 0xa3, 0xba, 0xa8, 0x6a, + 0x00, 0x00, 0x01, 0x98, 0x00, 0x00, 0x00, 0x60, 0x63, 0x6d, 0x61, 0x70, + 0x0a, 0x08, 0xe7, 0x8a, 0x00, 0x00, 0x04, 0x60, 0x00, 0x00, 0x01, 0x5a, + 0x63, 0x76, 0x74, 0x20, 0x02, 0xeb, 0x10, 0xb0, 0x00, 0x00, 0x09, 0x08, + 0x00, 0x00, 0x00, 0x46, 0x66, 0x65, 0x61, 0x74, 0x40, 0x36, 0x0d, 0x66, + 0x00, 0x00, 0x8a, 0xd8, 0x00, 0x00, 0x00, 0x5c, 0x66, 0x70, 0x67, 0x6d, + 0x06, 0x59, 0x9c, 0x37, 0x00, 0x00, 0x05, 0xbc, 0x00, 0x00, 0x01, 0x73, + 0x67, 0x61, 0x73, 0x70, 0x00, 0x18, 0x00, 0x23, 0x00, 0x00, 0x8a, 0xc8, + 0x00, 0x00, 0x00, 0x10, 0x67, 0x6c, 0x79, 0x66, 0x52, 0xd9, 0xef, 0x7c, + 0x00, 0x00, 0x0a, 0xd8, 0x00, 0x00, 0x6d, 0x74, 0x68, 0x65, 0x61, 0x64, + 0x28, 0x83, 0x41, 0x9e, 0x00, 0x00, 0x01, 0x1c, 0x00, 0x00, 0x00, 0x36, + 0x68, 0x68, 0x65, 0x61, 0x06, 0x5b, 0x03, 0x47, 0x00, 0x00, 0x01, 0x54, + 0x00, 0x00, 0x00, 0x24, 0x68, 0x6d, 0x74, 0x78, 0x12, 0xa2, 0x30, 0xf9, + 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 0x02, 0x66, 0x6c, 0x6f, 0x63, 0x61, + 0xe2, 0xac, 0xc8, 0x8e, 0x00, 0x00, 0x09, 0x50, 0x00, 0x00, 0x01, 0x86, + 0x6d, 0x61, 0x78, 0x70, 0x02, 0xd9, 0x01, 0x90, 0x00, 0x00, 0x01, 0x78, + 0x00, 0x00, 0x00, 0x20, 0x6d, 0x6f, 0x72, 0x78, 0x02, 0x7c, 0xa9, 0x72, + 0x00, 0x00, 0x8b, 0x34, 0x00, 0x00, 0x02, 0x08, 0x6e, 0x61, 0x6d, 0x65, + 0x11, 0x8f, 0xe7, 0xf9, 0x00, 0x00, 0x78, 0x4c, 0x00, 0x00, 0x10, 0xbb, + 0x70, 0x6f, 0x73, 0x74, 0x26, 0x3a, 0xd0, 0xac, 0x00, 0x00, 0x89, 0x08, + 0x00, 0x00, 0x01, 0xbe, 0x70, 0x72, 0x65, 0x70, 0xd4, 0xb6, 0xaf, 0x59, + 0x00, 0x00, 0x07, 0x30, 0x00, 0x00, 0x01, 0xd6, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x02, 0x01, 0x06, 0x91, 0x31, 0xff, 0xb3, 0x5f, 0x0f, 0x3c, 0xf5, + 0x00, 0x1f, 0x03, 0xe8, 0x00, 0x00, 0x00, 0x00, 0xe1, 0xa9, 0xde, 0x41, + 0x00, 0x00, 0x00, 0x00, 0xe5, 0x4d, 0x1e, 0x76, 0x00, 0x00, 0xff, 0x2c, + 0x02, 0x58, 0x03, 0xd0, 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x04, 0x01, 0xfe, 0xed, + 0x00, 0x00, 0x03, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x02, 0x58, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x71, 0x00, 0x01, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x55, + 0x00, 0x06, 0x00, 0x4c, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0a, 0x00, 0x00, 0x02, 0x00, 0x00, 0xed, 0x00, 0x02, 0x00, 0x01, + 0x00, 0x04, 0x02, 0x58, 0x01, 0x90, 0x00, 0x05, 0x00, 0x00, 0x02, 0x8a, + 0x02, 0x58, 0x00, 0x00, 0x00, 0x4b, 0x02, 0x8a, 0x02, 0x58, 0x00, 0x00, + 0x01, 0x5e, 0x00, 0x3c, 0x01, 0x35, 0x08, 0x09, 0x02, 0x0b, 0x05, 0x09, + 0x05, 0x02, 0x03, 0x00, 0x02, 0x03, 0xa0, 0x00, 0x02, 0x6f, 0x40, 0x00, + 0x38, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x49, 0x42, + 0x4d, 0x20, 0x01, 0x40, 0x00, 0x00, 0x00, 0xff, 0x03, 0x0c, 0xff, 0x24, + 0x01, 0x2c, 0x04, 0x01, 0x01, 0x13, 0x60, 0x00, 0x01, 0x97, 0x00, 0x00, + 0x00, 0x00, 0x02, 0x04, 0x02, 0xba, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, + 0x03, 0xe8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x58, 0x00, 0x00, + 0x02, 0x58, 0x00, 0x00, 0x02, 0x58, 0x00, 0xe2, 0x02, 0x58, 0x00, 0xae, + 0x02, 0x58, 0x00, 0x10, 0x02, 0x58, 0x00, 0x32, 0x02, 0x58, 0x00, 0x12, + 0x02, 0x58, 0x00, 0x19, 0x02, 0x58, 0x01, 0x06, 0x02, 0x58, 0x00, 0xcd, + 0x02, 0x58, 0x00, 0x6a, 0x02, 0x58, 0x00, 0x2b, 0x02, 0x58, 0x00, 0x3e, + 0x02, 0x58, 0x00, 0xcc, 0x02, 0x58, 0x00, 0x9b, 0x02, 0x58, 0x00, 0xe2, + 0x02, 0x58, 0x00, 0x5a, 0x02, 0x58, 0x00, 0x38, 0x02, 0x58, 0x00, 0x35, + 0x02, 0x58, 0x00, 0x41, 0x02, 0x58, 0x00, 0x30, 0x02, 0x58, 0x00, 0x22, + 0x02, 0x58, 0x00, 0x49, 0x02, 0x58, 0x00, 0x40, 0x02, 0x58, 0x00, 0x41, + 0x02, 0x58, 0x00, 0x37, 0x02, 0x58, 0x00, 0x40, 0x02, 0x58, 0x00, 0xe2, + 0x02, 0x58, 0x00, 0xcc, 0x02, 0x58, 0x00, 0x55, 0x02, 0x58, 0x00, 0x3e, + 0x02, 0x58, 0x00, 0x55, 0x02, 0x58, 0x00, 0x4d, 0x02, 0x58, 0x00, 0x3e, + 0x02, 0x58, 0x00, 0x1f, 0x02, 0x58, 0x00, 0x58, 0x02, 0x58, 0x00, 0x46, + 0x02, 0x58, 0x00, 0x5f, 0x02, 0x58, 0x00, 0x5a, 0x02, 0x58, 0x00, 0x5a, + 0x02, 0x58, 0x00, 0x38, 0x02, 0x58, 0x00, 0x50, 0x02, 0x58, 0x00, 0x54, + 0x02, 0x58, 0x00, 0x4a, 0x02, 0x58, 0x00, 0x55, 0x02, 0x58, 0x00, 0x78, + 0x02, 0x58, 0x00, 0x44, 0x02, 0x58, 0x00, 0x50, 0x02, 0x58, 0x00, 0x38, + 0x02, 0x58, 0x00, 0x5a, 0x02, 0x58, 0x00, 0x38, 0x02, 0x58, 0x00, 0x5a, + 0x02, 0x58, 0x00, 0x2d, 0x02, 0x58, 0x00, 0x19, 0x02, 0x58, 0x00, 0x50, + 0x02, 0x58, 0x00, 0x24, 0x02, 0x58, 0x00, 0x23, 0x02, 0x58, 0x00, 0x1a, + 0x02, 0x58, 0x00, 0x11, 0x02, 0x58, 0x00, 0x30, 0x02, 0x58, 0x00, 0xe1, + 0x02, 0x58, 0x00, 0x5a, 0x02, 0x58, 0x00, 0x5f, 0x02, 0x58, 0x00, 0x2d, + 0x02, 0x58, 0x00, 0x3c, 0x02, 0x58, 0x00, 0xbb, 0x02, 0x58, 0x00, 0x42, + 0x02, 0x58, 0x00, 0x5f, 0x02, 0x58, 0x00, 0x54, 0x02, 0x58, 0x00, 0x3c, + 0x02, 0x58, 0x00, 0x43, 0x02, 0x58, 0x00, 0x49, 0x02, 0x58, 0x00, 0x43, + 0x02, 0x58, 0x00, 0x62, 0x02, 0x58, 0x00, 0x6a, 0x02, 0x58, 0x00, 0x5d, + 0x02, 0x58, 0x00, 0x69, 0x02, 0x58, 0x00, 0x50, 0x02, 0x58, 0x00, 0x36, + 0x02, 0x58, 0x00, 0x62, 0x02, 0x58, 0x00, 0x42, 0x02, 0x58, 0x00, 0x5f, + 0x02, 0x58, 0x00, 0x3c, 0x02, 0x58, 0x00, 0x4d, 0x02, 0x58, 0x00, 0x43, + 0x02, 0x58, 0x00, 0x27, 0x02, 0x58, 0x00, 0x5c, 0x02, 0x58, 0x00, 0x40, + 0x02, 0x58, 0x00, 0x1e, 0x02, 0x58, 0x00, 0x3d, 0x02, 0x58, 0x00, 0x35, + 0x02, 0x58, 0x00, 0x55, 0x02, 0x58, 0x00, 0x69, 0x02, 0x58, 0x01, 0x09, + 0x02, 0x58, 0x00, 0x69, 0x02, 0x58, 0x00, 0x34, 0x02, 0x58, 0x00, 0x00, + 0x02, 0x58, 0x00, 0xe2, 0x02, 0x58, 0x00, 0x54, 0x02, 0x58, 0x00, 0x34, + 0x02, 0x58, 0x00, 0x4c, 0x02, 0x58, 0x00, 0x16, 0x02, 0x58, 0x01, 0x09, + 0x02, 0x58, 0x00, 0x51, 0x02, 0x58, 0x00, 0x96, 0x02, 0x58, 0x00, 0x00, + 0x02, 0x58, 0x00, 0x8a, 0x02, 0x58, 0x00, 0x4a, 0x02, 0x58, 0x00, 0x3e, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x58, 0x00, 0x75, 0x00, 0xa0, 0x00, 0x81, + 0x00, 0x3e, 0x00, 0xa1, 0x00, 0x97, 0x00, 0xff, 0x00, 0x62, 0x00, 0x2d, + 0x00, 0xe2, 0x00, 0xd5, 0x00, 0x9a, 0x00, 0x8c, 0x00, 0x43, 0x00, 0x12, + 0x00, 0x12, 0x00, 0x12, 0x00, 0x5a, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, + 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x1f, 0x00, 0x14, 0x00, 0x46, 0x00, 0x5a, + 0x00, 0x5a, 0x00, 0x5a, 0x00, 0x5a, 0x00, 0x54, 0x00, 0x54, 0x00, 0x54, + 0x00, 0x54, 0x00, 0x16, 0x00, 0x50, 0x00, 0x38, 0x00, 0x38, 0x00, 0x38, + 0x00, 0x38, 0x00, 0x38, 0x00, 0x58, 0x00, 0x2f, 0x00, 0x50, 0x00, 0x50, + 0x00, 0x50, 0x00, 0x50, 0x00, 0x11, 0x00, 0x5a, 0x00, 0x66, 0x00, 0x42, + 0x00, 0x42, 0x00, 0x42, 0x00, 0x42, 0x00, 0x42, 0x00, 0x42, 0x00, 0x0a, + 0x00, 0x54, 0x00, 0x43, 0x00, 0x43, 0x00, 0x43, 0x00, 0x43, 0x00, 0x6a, + 0x00, 0x6a, 0x00, 0x6a, 0x00, 0x6a, 0x00, 0x42, 0x00, 0x62, 0x00, 0x42, + 0x00, 0x42, 0x00, 0x42, 0x00, 0x42, 0x00, 0x42, 0x00, 0x3e, 0x00, 0x2f, + 0x00, 0x5c, 0x00, 0x5c, 0x00, 0x5c, 0x00, 0x5c, 0x00, 0x35, 0x00, 0x5f, + 0x00, 0x35, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x00, 0x00, 0x1c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, + 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x38, + 0x00, 0x00, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x0d, 0x00, 0x7e, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x0d, 0x00, 0x20, 0x00, 0xa0, 0xff, 0xff, 0x00, 0x01, 0xff, 0xf5, + 0xff, 0xe3, 0xff, 0xc2, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, + 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, + 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, + 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, + 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x44, + 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, + 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, + 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x00, 0x86, 0x87, 0x89, 0x8b, 0x93, 0x98, + 0x9e, 0xa3, 0xa2, 0xa4, 0xa6, 0xa5, 0xa7, 0xa9, 0xab, 0xaa, 0xac, 0xad, + 0xaf, 0xae, 0xb0, 0xb1, 0xb3, 0xb5, 0xb4, 0xb6, 0xb8, 0xb7, 0xbc, 0xbb, + 0xbd, 0xbe, 0x00, 0x72, 0x64, 0x65, 0x69, 0x00, 0x78, 0xa1, 0x70, 0x6b, + 0x00, 0x76, 0x6a, 0x00, 0x88, 0x9a, 0x00, 0x73, 0x00, 0x00, 0x67, 0x77, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x7c, 0x00, 0xa8, 0xba, 0x81, 0x63, + 0x6e, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x7d, 0x00, 0x62, 0x82, 0x85, 0x97, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb9, 0x00, 0xc1, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x84, + 0x8c, 0x83, 0x8d, 0x8a, 0x8f, 0x90, 0x91, 0x8e, 0x95, 0x96, 0x00, 0x94, + 0x9c, 0x9d, 0x9b, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x7a, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x2c, 0x4b, 0xb8, 0x00, 0x09, + 0x50, 0x58, 0xb1, 0x01, 0x01, 0x8e, 0x59, 0xb8, 0x01, 0xff, 0x85, 0xb8, + 0x00, 0x44, 0x1d, 0xb9, 0x00, 0x09, 0x00, 0x03, 0x5f, 0x5e, 0x2d, 0xb8, + 0x00, 0x01, 0x2c, 0x20, 0x20, 0x45, 0x69, 0x44, 0xb0, 0x01, 0x60, 0x2d, + 0xb8, 0x00, 0x02, 0x2c, 0xb8, 0x00, 0x01, 0x2a, 0x21, 0x2d, 0xb8, 0x00, + 0x03, 0x2c, 0x20, 0x46, 0xb0, 0x03, 0x25, 0x46, 0x52, 0x58, 0x23, 0x59, + 0x20, 0x8a, 0x20, 0x8a, 0x49, 0x64, 0x8a, 0x20, 0x46, 0x20, 0x68, 0x61, + 0x64, 0xb0, 0x04, 0x25, 0x46, 0x20, 0x68, 0x61, 0x64, 0x52, 0x58, 0x23, + 0x65, 0x8a, 0x59, 0x2f, 0x20, 0xb0, 0x00, 0x53, 0x58, 0x69, 0x20, 0xb0, + 0x00, 0x54, 0x58, 0x21, 0xb0, 0x40, 0x59, 0x1b, 0x69, 0x20, 0xb0, 0x00, + 0x54, 0x58, 0x21, 0xb0, 0x40, 0x65, 0x59, 0x59, 0x3a, 0x2d, 0xb8, 0x00, + 0x04, 0x2c, 0x20, 0x46, 0xb0, 0x04, 0x25, 0x46, 0x52, 0x58, 0x23, 0x8a, + 0x59, 0x20, 0x46, 0x20, 0x6a, 0x61, 0x64, 0xb0, 0x04, 0x25, 0x46, 0x20, + 0x6a, 0x61, 0x64, 0x52, 0x58, 0x23, 0x8a, 0x59, 0x2f, 0xfd, 0x2d, 0xb8, + 0x00, 0x05, 0x2c, 0x4b, 0x20, 0xb0, 0x03, 0x26, 0x50, 0x58, 0x51, 0x58, + 0xb0, 0x80, 0x44, 0x1b, 0xb0, 0x40, 0x44, 0x59, 0x1b, 0x21, 0x21, 0x20, + 0x45, 0xb0, 0xc0, 0x50, 0x58, 0xb0, 0xc0, 0x44, 0x1b, 0x21, 0x59, 0x59, + 0x2d, 0xb8, 0x00, 0x06, 0x2c, 0x20, 0x20, 0x45, 0x69, 0x44, 0xb0, 0x01, + 0x60, 0x20, 0x20, 0x45, 0x7d, 0x69, 0x18, 0x44, 0xb0, 0x01, 0x60, 0x2d, + 0xb8, 0x00, 0x07, 0x2c, 0xb8, 0x00, 0x06, 0x2a, 0x2d, 0xb8, 0x00, 0x08, + 0x2c, 0x4b, 0x20, 0xb0, 0x03, 0x26, 0x53, 0x58, 0xb0, 0x40, 0x1b, 0xb0, + 0x00, 0x59, 0x8a, 0x8a, 0x20, 0xb0, 0x03, 0x26, 0x53, 0x58, 0x23, 0x21, + 0xb0, 0x80, 0x8a, 0x8a, 0x1b, 0x8a, 0x23, 0x59, 0x20, 0xb0, 0x03, 0x26, + 0x53, 0x58, 0x23, 0x21, 0xb8, 0x00, 0xc0, 0x8a, 0x8a, 0x1b, 0x8a, 0x23, + 0x59, 0x20, 0xb0, 0x03, 0x26, 0x53, 0x58, 0x23, 0x21, 0xb8, 0x01, 0x00, + 0x8a, 0x8a, 0x1b, 0x8a, 0x23, 0x59, 0x20, 0xb0, 0x03, 0x26, 0x53, 0x58, + 0x23, 0x21, 0xb8, 0x01, 0x40, 0x8a, 0x8a, 0x1b, 0x8a, 0x23, 0x59, 0x20, + 0xb8, 0x00, 0x03, 0x26, 0x53, 0x58, 0xb0, 0x03, 0x25, 0x45, 0xb8, 0x01, + 0x80, 0x50, 0x58, 0x23, 0x21, 0xb8, 0x01, 0x80, 0x23, 0x21, 0x1b, 0xb0, + 0x03, 0x25, 0x45, 0x23, 0x21, 0x23, 0x21, 0x59, 0x1b, 0x21, 0x59, 0x44, + 0x2d, 0xb8, 0x00, 0x09, 0x2c, 0x4b, 0x53, 0x58, 0x45, 0x44, 0x1b, 0x21, + 0x21, 0x59, 0x2d, 0x00, 0xb8, 0x00, 0x00, 0x2b, 0x00, 0xba, 0x00, 0x01, + 0x00, 0x0c, 0x00, 0x02, 0x2b, 0x01, 0xba, 0x00, 0x0d, 0x00, 0x02, 0x00, + 0x02, 0x2b, 0x01, 0xbf, 0x00, 0x0d, 0x00, 0x44, 0x00, 0x37, 0x00, 0x2b, + 0x00, 0x1f, 0x00, 0x13, 0x00, 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, 0x0e, + 0x00, 0x40, 0x00, 0x35, 0x00, 0x29, 0x00, 0x1e, 0x00, 0x12, 0x00, 0x00, + 0x00, 0x08, 0x2b, 0x00, 0xbf, 0x00, 0x01, 0x00, 0x5c, 0x00, 0x4b, 0x00, + 0x3b, 0x00, 0x2a, 0x00, 0x16, 0x00, 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, + 0x02, 0x00, 0x51, 0x00, 0x43, 0x00, 0x34, 0x00, 0x26, 0x00, 0x18, 0x00, + 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, 0x03, 0x00, 0x68, 0x00, 0x55, 0x00, + 0x43, 0x00, 0x2c, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, + 0x04, 0x00, 0x3e, 0x00, 0x32, 0x00, 0x2a, 0x00, 0x20, 0x00, 0x14, 0x00, + 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, 0x05, 0x00, 0x50, 0x00, 0x42, 0x00, + 0x33, 0x00, 0x25, 0x00, 0x16, 0x00, 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, + 0x06, 0x00, 0x2f, 0x00, 0x27, 0x00, 0x1e, 0x00, 0x17, 0x00, 0x0c, 0x00, + 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, 0x07, 0x00, 0x31, 0x00, 0x26, 0x00, + 0x23, 0x00, 0x15, 0x00, 0x10, 0x00, 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, + 0x08, 0x00, 0x4e, 0x00, 0x40, 0x00, 0x32, 0x00, 0x24, 0x00, 0x16, 0x00, + 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, 0x09, 0x00, 0x2a, 0x00, 0x22, 0x00, + 0x1a, 0x00, 0x13, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, + 0x0a, 0x00, 0x91, 0x00, 0x77, 0x00, 0x5d, 0x00, 0x42, 0x00, 0x28, 0x00, + 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, 0x0b, 0x00, 0x4b, 0x00, 0x3e, 0x00, + 0x30, 0x00, 0x24, 0x00, 0x16, 0x00, 0x00, 0x00, 0x08, 0x2b, 0xbf, 0x00, + 0x0c, 0x00, 0x23, 0x00, 0x1d, 0x00, 0x17, 0x00, 0x10, 0x00, 0x0a, 0x00, + 0x00, 0x00, 0x08, 0x2b, 0x00, 0xba, 0x00, 0x0f, 0x00, 0x0a, 0x00, 0x07, + 0x2b, 0xb8, 0x00, 0x00, 0x20, 0x45, 0x7d, 0x69, 0x18, 0x44, 0xba, 0x00, + 0x40, 0x00, 0x13, 0x00, 0x01, 0x75, 0xba, 0x00, 0x10, 0x00, 0x13, 0x00, + 0x01, 0x74, 0xba, 0x00, 0x3f, 0x00, 0x13, 0x00, 0x01, 0x74, 0xba, 0x00, + 0x40, 0x00, 0x13, 0x00, 0x01, 0x74, 0xba, 0x00, 0x70, 0x00, 0x13, 0x00, + 0x01, 0x74, 0xba, 0x00, 0xa0, 0x00, 0x13, 0x00, 0x01, 0x74, 0xba, 0x00, + 0x10, 0x00, 0x13, 0x00, 0x01, 0x75, 0xba, 0x00, 0x3f, 0x00, 0x13, 0x00, + 0x01, 0x75, 0xba, 0x00, 0x40, 0x00, 0x15, 0x00, 0x01, 0x74, 0xba, 0x00, + 0x3f, 0x00, 0x15, 0x00, 0x01, 0x74, 0xba, 0x00, 0x9f, 0x00, 0x15, 0x00, + 0x01, 0x74, 0xba, 0x00, 0xa0, 0x00, 0x15, 0x00, 0x01, 0x74, 0xba, 0x00, + 0xcf, 0x00, 0x15, 0x00, 0x01, 0x74, 0xba, 0x00, 0x70, 0x00, 0x15, 0x00, + 0x01, 0x74, 0xba, 0x00, 0x6f, 0x00, 0x17, 0x00, 0x01, 0x74, 0xba, 0x00, + 0x60, 0x00, 0x19, 0x00, 0x01, 0x73, 0xba, 0x00, 0x6f, 0x00, 0x19, 0x00, + 0x01, 0x74, 0xba, 0x00, 0x0f, 0x00, 0x19, 0x00, 0x01, 0x75, 0xba, 0x00, + 0x6f, 0x00, 0x19, 0x00, 0x01, 0x75, 0xba, 0x00, 0x9f, 0x00, 0x19, 0x00, + 0x01, 0x75, 0xba, 0x00, 0x70, 0x00, 0x21, 0x00, 0x01, 0x73, 0xba, 0x00, + 0xcf, 0x00, 0x21, 0x00, 0x01, 0x73, 0x00, 0x00, 0x00, 0x17, 0x00, 0x3c, + 0x00, 0x44, 0x00, 0x35, 0x00, 0x5a, 0x00, 0x42, 0x00, 0x76, 0x00, 0x72, + 0x00, 0x45, 0x00, 0x8a, 0x00, 0x26, 0x00, 0x49, 0x00, 0x9e, 0x00, 0x52, + 0x00, 0x56, 0x00, 0x00, 0x00, 0x0c, 0xff, 0x38, 0x00, 0x0c, 0x01, 0x49, + 0x00, 0x06, 0x01, 0x6b, 0x00, 0x06, 0x01, 0x4f, 0x00, 0x06, 0x01, 0x71, + 0x00, 0x06, 0x02, 0x04, 0x00, 0x0c, 0x02, 0xba, 0x00, 0x0c, 0x02, 0xe4, + 0x00, 0x0c, 0x02, 0x18, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x50, 0x00, 0xc4, + 0x01, 0x6c, 0x02, 0x20, 0x02, 0xda, 0x02, 0xf8, 0x03, 0x28, 0x03, 0x58, + 0x03, 0x7e, 0x03, 0xa6, 0x03, 0xbe, 0x03, 0xd6, 0x04, 0x00, 0x04, 0x1a, + 0x04, 0x98, 0x04, 0xdc, 0x05, 0x36, 0x05, 0xba, 0x06, 0x06, 0x06, 0x70, + 0x06, 0xe4, 0x07, 0x1c, 0x07, 0xae, 0x08, 0x22, 0x08, 0x2e, 0x08, 0x3a, + 0x08, 0x58, 0x08, 0x80, 0x08, 0x9e, 0x09, 0x04, 0x09, 0x9c, 0x09, 0xe8, + 0x0a, 0x56, 0x0a, 0xac, 0x0a, 0xf2, 0x0b, 0x34, 0x0b, 0x70, 0x0b, 0xe6, + 0x0c, 0x3e, 0x0c, 0x78, 0x0c, 0xbc, 0x0d, 0x0a, 0x0d, 0x34, 0x0d, 0x8c, + 0x0d, 0xd4, 0x0e, 0x32, 0x0e, 0x7e, 0x0e, 0xf2, 0x0f, 0x50, 0x0f, 0xc2, + 0x0f, 0xf4, 0x10, 0x40, 0x10, 0x7a, 0x10, 0xd8, 0x11, 0x34, 0x11, 0x7a, + 0x11, 0xba, 0x11, 0xe0, 0x11, 0xfa, 0x12, 0x20, 0x12, 0x44, 0x12, 0x5c, + 0x12, 0x7c, 0x13, 0x04, 0x13, 0x78, 0x13, 0xce, 0x14, 0x42, 0x14, 0xb6, + 0x15, 0x0e, 0x15, 0xe2, 0x16, 0x3e, 0x16, 0x98, 0x16, 0xec, 0x17, 0x38, + 0x17, 0x70, 0x17, 0xf8, 0x18, 0x54, 0x18, 0xa8, 0x19, 0x1c, 0x19, 0x90, + 0x19, 0xe8, 0x1a, 0x68, 0x1a, 0xb8, 0x1b, 0x14, 0x1b, 0x4c, 0x1b, 0xa8, + 0x1c, 0x04, 0x1c, 0x50, 0x1c, 0x90, 0x1d, 0x04, 0x1d, 0x1c, 0x1d, 0x92, + 0x1d, 0xe2, 0x1d, 0xe2, 0x1e, 0x1e, 0x1e, 0x92, 0x1f, 0x02, 0x1f, 0x82, + 0x1f, 0xde, 0x20, 0x06, 0x20, 0xb2, 0x20, 0xf2, 0x21, 0x88, 0x22, 0x12, + 0x22, 0x30, 0x22, 0x4c, 0x22, 0x4c, 0x23, 0x1a, 0x23, 0x4a, 0x23, 0x9c, + 0x23, 0xd8, 0x24, 0x30, 0x24, 0xa4, 0x24, 0xc4, 0x25, 0x2e, 0x25, 0x66, + 0x25, 0x8a, 0x25, 0xd0, 0x26, 0x14, 0x26, 0x68, 0x26, 0x86, 0x26, 0xbe, + 0x27, 0x04, 0x27, 0x62, 0x27, 0xbe, 0x27, 0xe0, 0x28, 0x04, 0x28, 0x2c, + 0x28, 0x6c, 0x28, 0xaa, 0x28, 0xf2, 0x29, 0x5a, 0x29, 0xec, 0x2a, 0x0c, + 0x2a, 0x2c, 0x2a, 0x50, 0x2a, 0x8c, 0x2a, 0xaa, 0x2a, 0xc8, 0x2a, 0xea, + 0x2b, 0x24, 0x2b, 0x4c, 0x2b, 0x88, 0x2b, 0xcc, 0x2c, 0x10, 0x2c, 0x58, + 0x2c, 0xba, 0x2d, 0x1a, 0x2d, 0x4c, 0x2d, 0xec, 0x2e, 0x1c, 0x2e, 0x4c, + 0x2e, 0x80, 0x2e, 0xcc, 0x2e, 0xee, 0x2f, 0x42, 0x2f, 0xba, 0x2f, 0xc6, + 0x2f, 0xd2, 0x30, 0x22, 0x30, 0x8c, 0x30, 0x98, 0x31, 0x08, 0x31, 0xd8, + 0x32, 0x68, 0x32, 0x74, 0x32, 0x80, 0x32, 0xcc, 0x32, 0xd8, 0x32, 0xf4, + 0x33, 0x10, 0x33, 0x32, 0x33, 0x6a, 0x33, 0xe6, 0x34, 0x32, 0x34, 0x3e, + 0x34, 0x4a, 0x34, 0x88, 0x34, 0xe0, 0x34, 0xec, 0x35, 0x3e, 0x35, 0xd6, + 0x35, 0xe2, 0x35, 0xee, 0x36, 0x22, 0x36, 0x2e, 0x36, 0x3a, 0x36, 0xae, + 0x36, 0xba, 0x00, 0x00, 0x00, 0x02, 0x00, 0xe2, 0xff, 0xf7, 0x01, 0x76, + 0x02, 0xba, 0x00, 0x05, 0x00, 0x13, 0x00, 0x43, 0xba, 0x00, 0x06, 0x00, + 0x14, 0x00, 0x15, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x06, 0x10, 0xb8, 0x00, + 0x00, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x02, 0x2f, + 0x1b, 0xb9, 0x00, 0x02, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, 0x0f, 0x3e, + 0x59, 0xb9, 0x00, 0x0d, 0x00, 0x09, 0xf4, 0xb9, 0x00, 0x05, 0x00, 0x07, + 0xf4, 0x30, 0x31, 0x25, 0x03, 0x35, 0x33, 0x15, 0x03, 0x07, 0x22, 0x26, + 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x01, + 0x1c, 0x1c, 0x58, 0x1c, 0x10, 0x29, 0x21, 0x21, 0x29, 0x29, 0x21, 0x21, + 0xe9, 0x01, 0x06, 0xcb, 0xcb, 0xfe, 0xfa, 0xf2, 0x22, 0x1a, 0x12, 0x1a, + 0x22, 0x22, 0x1a, 0x12, 0x1a, 0x22, 0x00, 0x00, 0xff, 0xff, 0x00, 0xae, + 0x01, 0xcf, 0x01, 0xab, 0x02, 0xe4, 0x12, 0x26, 0x00, 0x0a, 0xa8, 0x00, + 0x10, 0x06, 0x00, 0x0a, 0x59, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x10, + 0x00, 0x00, 0x02, 0x48, 0x02, 0xba, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x9d, + 0xba, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x17, 0x10, 0xb8, 0x00, 0x09, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, 0x1d, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0c, 0x2f, 0x1b, 0xb9, 0x00, + 0x0c, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x0b, 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x17, 0x2f, 0x1b, 0xb9, 0x00, 0x17, 0x00, + 0x0f, 0x3e, 0x59, 0xba, 0x00, 0x03, 0x00, 0x08, 0x00, 0x0b, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x03, 0x2f, 0xb9, 0x00, 0x00, 0x00, 0x08, 0xf4, 0xba, + 0x00, 0x04, 0x00, 0x08, 0x00, 0x0b, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x04, + 0x2f, 0xb9, 0x00, 0x07, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x0e, 0xd0, 0xb8, + 0x00, 0x04, 0x10, 0xb8, 0x00, 0x11, 0xd0, 0xb8, 0x00, 0x03, 0x10, 0xb8, + 0x00, 0x12, 0xd0, 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, 0x15, 0xd0, 0x30, + 0x31, 0x37, 0x23, 0x35, 0x33, 0x37, 0x23, 0x35, 0x33, 0x37, 0x33, 0x03, + 0x23, 0x01, 0x33, 0x07, 0x33, 0x15, 0x23, 0x07, 0x33, 0x15, 0x23, 0x07, + 0x23, 0x94, 0x84, 0x90, 0x17, 0x83, 0x8f, 0x26, 0x49, 0x7b, 0x49, 0x01, + 0x33, 0x49, 0x26, 0x84, 0x90, 0x17, 0x83, 0x8f, 0x26, 0x49, 0xd8, 0x42, + 0x86, 0x42, 0xd8, 0xfd, 0x46, 0x02, 0xba, 0xd8, 0x42, 0x86, 0x42, 0xd8, + 0x00, 0x03, 0x00, 0x32, 0xff, 0x8f, 0x02, 0x28, 0x03, 0x2b, 0x00, 0x27, + 0x00, 0x2e, 0x00, 0x35, 0x00, 0xa7, 0xba, 0x00, 0x07, 0x00, 0x36, 0x00, + 0x37, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x07, 0x10, 0xb8, 0x00, 0x2b, 0xd0, + 0xb8, 0x00, 0x07, 0x10, 0xb8, 0x00, 0x33, 0xd0, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x11, 0x2f, 0x1b, 0xb9, 0x00, 0x11, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x07, 0x00, 0x0b, + 0xf4, 0xb8, 0x00, 0x11, 0x10, 0xb9, 0x00, 0x2c, 0x00, 0x0b, 0xf4, 0xba, + 0x00, 0x08, 0x00, 0x2c, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x11, + 0x10, 0xb8, 0x00, 0x12, 0xdc, 0xb8, 0x00, 0x11, 0x10, 0xb8, 0x00, 0x14, + 0xd0, 0xb8, 0x00, 0x2c, 0x10, 0xb8, 0x00, 0x1b, 0xd0, 0xb8, 0x00, 0x07, + 0x10, 0xb8, 0x00, 0x33, 0xd0, 0xba, 0x00, 0x1c, 0x00, 0x14, 0x00, 0x33, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, 0x25, 0xd0, 0xb8, + 0x00, 0x00, 0x10, 0xb8, 0x00, 0x27, 0xdc, 0xba, 0x00, 0x2b, 0x00, 0x11, + 0x00, 0x07, 0x11, 0x12, 0x39, 0xba, 0x00, 0x32, 0x00, 0x1b, 0x00, 0x25, + 0x11, 0x12, 0x39, 0x30, 0x31, 0x05, 0x2e, 0x01, 0x27, 0x37, 0x1e, 0x01, + 0x17, 0x11, 0x27, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x37, 0x35, 0x33, 0x15, + 0x1e, 0x01, 0x17, 0x07, 0x2e, 0x01, 0x27, 0x15, 0x17, 0x1e, 0x03, 0x15, + 0x14, 0x06, 0x07, 0x15, 0x23, 0x03, 0x14, 0x16, 0x17, 0x35, 0x0e, 0x01, + 0x01, 0x34, 0x26, 0x27, 0x15, 0x3e, 0x01, 0x01, 0x17, 0x53, 0x6e, 0x24, + 0x3d, 0x24, 0x50, 0x35, 0x17, 0x34, 0x46, 0x2a, 0x12, 0x6d, 0x5f, 0x3e, + 0x45, 0x65, 0x26, 0x3f, 0x1b, 0x45, 0x32, 0x1e, 0x33, 0x46, 0x2b, 0x12, + 0x6d, 0x66, 0x3e, 0x7b, 0x39, 0x43, 0x3c, 0x40, 0x01, 0x3b, 0x3d, 0x46, + 0x3f, 0x44, 0x0b, 0x05, 0x43, 0x32, 0x32, 0x2d, 0x32, 0x05, 0x01, 0x05, + 0x04, 0x09, 0x25, 0x33, 0x3f, 0x22, 0x55, 0x61, 0x07, 0x66, 0x66, 0x05, + 0x39, 0x33, 0x2d, 0x24, 0x2c, 0x05, 0xf5, 0x05, 0x09, 0x24, 0x33, 0x40, + 0x23, 0x58, 0x6a, 0x08, 0x66, 0x02, 0x79, 0x31, 0x38, 0x0e, 0xec, 0x06, + 0x3b, 0xfe, 0x82, 0x36, 0x38, 0x0c, 0xfa, 0x07, 0x42, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x12, 0xff, 0xf4, 0x02, 0x46, 0x02, 0xc6, 0x00, 0x0b, + 0x00, 0x19, 0x00, 0x1d, 0x00, 0x21, 0x00, 0x2d, 0x00, 0x3b, 0x00, 0xb9, + 0xba, 0x00, 0x25, 0x00, 0x3c, 0x00, 0x3d, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x25, 0x10, 0xb8, 0x00, 0x09, 0xd0, 0xb8, 0x00, 0x25, 0x10, 0xb8, 0x00, + 0x0f, 0xd0, 0xb8, 0x00, 0x25, 0x10, 0xb8, 0x00, 0x1d, 0xd0, 0xb8, 0x00, + 0x25, 0x10, 0xb8, 0x00, 0x1f, 0xd0, 0xb8, 0x00, 0x25, 0x10, 0xb8, 0x00, + 0x39, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x06, 0x2f, + 0x1b, 0xb9, 0x00, 0x06, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x1a, 0x2f, 0x1b, 0xb9, 0x00, 0x1a, 0x00, 0x1d, 0x3e, + 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x21, 0x2f, 0x1b, 0xb9, + 0x00, 0x21, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x22, 0x2f, 0x1b, 0xb9, 0x00, 0x22, 0x00, 0x0f, 0x3e, 0x59, 0xba, + 0x00, 0x00, 0x00, 0x21, 0x00, 0x06, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x00, + 0x2f, 0xb9, 0x00, 0x0c, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x06, 0x10, 0xb9, + 0x00, 0x13, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x28, 0x00, 0x1a, 0x00, 0x22, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x28, 0x2f, 0xb8, 0x00, 0x22, 0x10, 0xb9, + 0x00, 0x2e, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x28, 0x10, 0xb9, 0x00, 0x35, + 0x00, 0x08, 0xf4, 0x30, 0x31, 0x13, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, + 0x32, 0x16, 0x15, 0x14, 0x06, 0x27, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, + 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x33, 0x03, 0x23, 0x07, + 0x33, 0x03, 0x23, 0x05, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, + 0x15, 0x14, 0x06, 0x27, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, + 0x06, 0x1d, 0x01, 0x14, 0x16, 0xa9, 0x42, 0x53, 0x53, 0x42, 0x42, 0x53, + 0x53, 0x42, 0x24, 0x2d, 0x2d, 0x24, 0x24, 0x2d, 0x2d, 0x01, 0x79, 0x48, + 0xa0, 0x48, 0xac, 0x48, 0xa0, 0x48, 0x01, 0x9d, 0x42, 0x53, 0x53, 0x42, + 0x42, 0x53, 0x53, 0x42, 0x24, 0x2d, 0x2d, 0x24, 0x24, 0x2d, 0x2d, 0x01, + 0x64, 0x59, 0x58, 0x58, 0x59, 0x59, 0x58, 0x58, 0x59, 0x36, 0x32, 0x30, + 0x32, 0x30, 0x32, 0x32, 0x30, 0x32, 0x30, 0x32, 0x01, 0x20, 0xfe, 0xd4, + 0x62, 0xfe, 0xd4, 0x0c, 0x59, 0x58, 0x58, 0x59, 0x59, 0x58, 0x58, 0x59, + 0x36, 0x32, 0x30, 0x32, 0x30, 0x32, 0x32, 0x30, 0x32, 0x30, 0x32, 0x00, + 0x00, 0x02, 0x00, 0x19, 0xff, 0xf4, 0x02, 0x3c, 0x02, 0xc6, 0x00, 0x38, + 0x00, 0x43, 0x00, 0xb6, 0xba, 0x00, 0x25, 0x00, 0x44, 0x00, 0x45, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x25, 0x10, 0xb8, 0x00, 0x39, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x12, 0x2f, 0x1b, 0xb9, 0x00, 0x12, + 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, + 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x34, 0x2f, 0x1b, 0xb9, 0x00, 0x34, 0x00, 0x0f, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x39, 0x00, 0x08, 0xf4, + 0xba, 0x00, 0x24, 0x00, 0x12, 0x00, 0x39, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x12, 0x10, 0xb9, 0x00, 0x1b, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x3d, 0x00, + 0x1b, 0x00, 0x00, 0x11, 0x12, 0x39, 0xba, 0x00, 0x0a, 0x00, 0x24, 0x00, + 0x3d, 0x11, 0x12, 0x39, 0xba, 0x00, 0x26, 0x00, 0x12, 0x00, 0x39, 0x11, + 0x12, 0x39, 0xba, 0x00, 0x2d, 0x00, 0x12, 0x00, 0x00, 0x11, 0x12, 0x39, + 0xb8, 0x00, 0x2d, 0x2f, 0xb9, 0x00, 0x2b, 0x00, 0x08, 0xf4, 0xba, 0x00, + 0x35, 0x00, 0x1b, 0x00, 0x00, 0x11, 0x12, 0x39, 0xba, 0x00, 0x32, 0x00, + 0x26, 0x00, 0x35, 0x11, 0x12, 0x39, 0xba, 0x00, 0x3c, 0x00, 0x26, 0x00, + 0x35, 0x11, 0x12, 0x39, 0x30, 0x31, 0x17, 0x22, 0x2e, 0x02, 0x35, 0x34, + 0x3e, 0x02, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, + 0x02, 0x17, 0x07, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x1e, + 0x02, 0x1f, 0x02, 0x33, 0x3e, 0x01, 0x37, 0x33, 0x15, 0x23, 0x0e, 0x03, + 0x07, 0x17, 0x23, 0x27, 0x23, 0x0e, 0x01, 0x27, 0x32, 0x36, 0x37, 0x27, + 0x0e, 0x01, 0x1d, 0x01, 0x14, 0x16, 0xd9, 0x2e, 0x47, 0x31, 0x1a, 0x0c, + 0x1e, 0x31, 0x26, 0x1c, 0x25, 0x1d, 0x31, 0x42, 0x25, 0x21, 0x37, 0x2a, + 0x1d, 0x07, 0x42, 0x0d, 0x34, 0x27, 0x2d, 0x35, 0x08, 0x11, 0x1b, 0x13, + 0x5a, 0x49, 0x05, 0x07, 0x04, 0x02, 0x8d, 0x4b, 0x03, 0x06, 0x08, 0x0a, + 0x09, 0x7a, 0x5f, 0x57, 0x05, 0x0e, 0x56, 0x2f, 0x2b, 0x42, 0x13, 0xae, + 0x2e, 0x26, 0x48, 0x0c, 0x1e, 0x35, 0x46, 0x28, 0x1a, 0x38, 0x35, 0x31, + 0x13, 0x24, 0x4c, 0x2d, 0x26, 0x3e, 0x2d, 0x18, 0x13, 0x1e, 0x26, 0x13, + 0x22, 0x1f, 0x29, 0x37, 0x2b, 0x08, 0x10, 0x1e, 0x21, 0x26, 0x18, 0x6f, + 0x5a, 0x27, 0x64, 0x30, 0x43, 0x18, 0x2a, 0x28, 0x29, 0x17, 0x90, 0x67, + 0x34, 0x3f, 0x47, 0x24, 0x20, 0xd2, 0x1d, 0x49, 0x2b, 0x0f, 0x36, 0x40, + 0x00, 0x01, 0x01, 0x06, 0x01, 0xcf, 0x01, 0x52, 0x02, 0xe4, 0x00, 0x03, + 0x00, 0x1e, 0xba, 0x00, 0x00, 0x00, 0x04, 0x00, 0x05, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, + 0x00, 0x01, 0x00, 0x1f, 0x3e, 0x59, 0x30, 0x31, 0x01, 0x11, 0x33, 0x11, + 0x01, 0x06, 0x4c, 0x01, 0xcf, 0x01, 0x15, 0xfe, 0xeb, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0xcd, 0xff, 0x76, 0x01, 0xee, 0x02, 0xf8, 0x00, 0x16, + 0x00, 0x15, 0xba, 0x00, 0x0c, 0x00, 0x17, 0x00, 0x18, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x05, 0x2f, 0xb8, 0x00, 0x12, 0x2f, 0x30, 0x31, 0x13, + 0x34, 0x3e, 0x02, 0x37, 0x33, 0x0e, 0x03, 0x1d, 0x01, 0x14, 0x1e, 0x02, + 0x17, 0x23, 0x2e, 0x03, 0xcd, 0x21, 0x39, 0x4c, 0x2a, 0x51, 0x2c, 0x4d, + 0x3b, 0x22, 0x22, 0x3b, 0x4d, 0x2c, 0x51, 0x2a, 0x4c, 0x39, 0x21, 0x01, + 0x37, 0x49, 0x87, 0x74, 0x5d, 0x20, 0x21, 0x57, 0x67, 0x77, 0x40, 0x56, + 0x40, 0x77, 0x67, 0x57, 0x21, 0x1f, 0x5e, 0x74, 0x87, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x6a, 0xff, 0x76, 0x01, 0x8b, 0x02, 0xf8, 0x00, 0x16, + 0x00, 0x15, 0xba, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x18, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x11, 0x2f, 0xb8, 0x00, 0x06, 0x2f, 0x30, 0x31, 0x01, + 0x14, 0x0e, 0x02, 0x07, 0x23, 0x3e, 0x03, 0x3d, 0x01, 0x34, 0x2e, 0x02, + 0x27, 0x33, 0x1e, 0x03, 0x01, 0x8b, 0x21, 0x39, 0x4c, 0x2a, 0x51, 0x2b, + 0x4e, 0x3b, 0x22, 0x22, 0x3b, 0x4e, 0x2b, 0x51, 0x2a, 0x4c, 0x39, 0x21, + 0x01, 0x37, 0x49, 0x87, 0x74, 0x5e, 0x1f, 0x21, 0x57, 0x67, 0x77, 0x40, + 0x56, 0x40, 0x77, 0x67, 0x57, 0x21, 0x20, 0x5d, 0x74, 0x87, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x2b, 0x00, 0x48, 0x02, 0x2d, 0x02, 0x38, 0x00, 0x0e, + 0x00, 0x11, 0xba, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x10, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x06, 0x2f, 0x30, 0x31, 0x37, 0x27, 0x37, 0x27, 0x37, + 0x17, 0x35, 0x33, 0x15, 0x37, 0x17, 0x07, 0x17, 0x07, 0x27, 0xaf, 0x39, + 0x7c, 0xc7, 0x15, 0xc7, 0x4a, 0xc7, 0x15, 0xc7, 0x7c, 0x39, 0x7d, 0x48, + 0x2a, 0xaa, 0x42, 0x42, 0x40, 0xd8, 0xd8, 0x40, 0x42, 0x42, 0xaa, 0x2a, + 0xac, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x3e, 0x00, 0x3e, 0x02, 0x1a, + 0x02, 0x24, 0x00, 0x0b, 0x00, 0x27, 0xba, 0x00, 0x00, 0x00, 0x0c, 0x00, + 0x0d, 0x11, 0x12, 0x39, 0x00, 0xbb, 0x00, 0x02, 0x00, 0x08, 0x00, 0x03, + 0x00, 0x04, 0x2b, 0xb8, 0x00, 0x03, 0x10, 0xb8, 0x00, 0x07, 0xd0, 0xb8, + 0x00, 0x02, 0x10, 0xb8, 0x00, 0x0a, 0xd0, 0x30, 0x31, 0x25, 0x35, 0x23, + 0x35, 0x33, 0x35, 0x33, 0x15, 0x33, 0x15, 0x23, 0x15, 0x01, 0x06, 0xc8, + 0xc8, 0x4c, 0xc8, 0xc8, 0x3e, 0xd1, 0x44, 0xd1, 0xd1, 0x44, 0xd1, 0x00, + 0x00, 0x01, 0x00, 0xcc, 0xff, 0x73, 0x01, 0x82, 0x00, 0x88, 0x00, 0x03, + 0x00, 0x15, 0xba, 0x00, 0x02, 0x00, 0x04, 0x00, 0x05, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x2f, 0xb8, 0x00, 0x03, 0x2f, 0x30, 0x31, 0x25, + 0x33, 0x03, 0x23, 0x01, 0x01, 0x81, 0x73, 0x43, 0x88, 0xfe, 0xeb, 0x00, + 0x00, 0x01, 0x00, 0x9b, 0x01, 0x06, 0x01, 0xbd, 0x01, 0x5a, 0x00, 0x03, + 0x00, 0x17, 0xba, 0x00, 0x00, 0x00, 0x04, 0x00, 0x05, 0x11, 0x12, 0x39, + 0x00, 0xbb, 0x00, 0x01, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x2b, 0x30, + 0x31, 0x13, 0x35, 0x21, 0x15, 0x9b, 0x01, 0x22, 0x01, 0x06, 0x54, 0x54, + 0x00, 0x01, 0x00, 0xe2, 0xff, 0xf7, 0x01, 0x76, 0x00, 0x81, 0x00, 0x0d, + 0x00, 0x24, 0xba, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x0f, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, + 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x07, 0x00, 0x09, 0xf4, + 0x30, 0x31, 0x05, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, + 0x1d, 0x01, 0x14, 0x06, 0x01, 0x2c, 0x29, 0x21, 0x21, 0x29, 0x29, 0x21, + 0x21, 0x09, 0x22, 0x1a, 0x12, 0x1a, 0x22, 0x22, 0x1a, 0x12, 0x1a, 0x22, + 0x00, 0x01, 0x00, 0x5a, 0xff, 0x76, 0x01, 0xfe, 0x02, 0xf8, 0x00, 0x03, + 0x00, 0x15, 0xba, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x01, 0x2f, 0xb8, 0x00, 0x00, 0x2f, 0x30, 0x31, 0x17, + 0x01, 0x33, 0x01, 0x5a, 0x01, 0x5c, 0x48, 0xfe, 0xa4, 0x8a, 0x03, 0x82, + 0xfc, 0x7e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x38, 0xff, 0xf4, 0x02, 0x20, + 0x02, 0xc6, 0x00, 0x13, 0x00, 0x29, 0x00, 0x37, 0x00, 0x5f, 0xba, 0x00, + 0x00, 0x00, 0x38, 0x00, 0x39, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x14, 0xd0, + 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, 0x2a, 0xd0, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x14, 0x00, 0x0b, + 0xf4, 0xb8, 0x00, 0x0a, 0x10, 0xb9, 0x00, 0x1f, 0x00, 0x0b, 0xf4, 0xba, + 0x00, 0x2a, 0x00, 0x1f, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x2a, + 0x2f, 0xb9, 0x00, 0x31, 0x00, 0x06, 0xf4, 0x30, 0x31, 0x05, 0x22, 0x2e, + 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, + 0x02, 0x27, 0x32, 0x3e, 0x02, 0x3d, 0x01, 0x34, 0x2e, 0x02, 0x23, 0x22, + 0x0e, 0x02, 0x1d, 0x01, 0x14, 0x1e, 0x02, 0x37, 0x22, 0x26, 0x3d, 0x01, + 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x01, 0x2c, 0x40, + 0x5c, 0x3c, 0x1c, 0x1c, 0x3c, 0x5c, 0x40, 0x40, 0x5c, 0x3c, 0x1c, 0x1c, + 0x3c, 0x5c, 0x40, 0x2a, 0x3c, 0x25, 0x12, 0x12, 0x25, 0x3c, 0x2a, 0x2a, + 0x3c, 0x25, 0x12, 0x12, 0x25, 0x3c, 0x2a, 0x23, 0x1b, 0x1b, 0x23, 0x23, + 0x1b, 0x1b, 0x0c, 0x31, 0x5c, 0x86, 0x56, 0x55, 0x87, 0x5c, 0x31, 0x31, + 0x5c, 0x87, 0x55, 0x56, 0x86, 0x5c, 0x31, 0x49, 0x21, 0x3c, 0x55, 0x35, + 0x72, 0x34, 0x56, 0x3c, 0x21, 0x21, 0x3c, 0x56, 0x34, 0x72, 0x35, 0x55, + 0x3c, 0x21, 0xe5, 0x1c, 0x14, 0x16, 0x14, 0x1c, 0x1c, 0x14, 0x16, 0x14, + 0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x35, 0x00, 0x00, 0x02, 0x29, + 0x02, 0xba, 0x00, 0x0b, 0x00, 0x5b, 0xba, 0x00, 0x02, 0x00, 0x0c, 0x00, + 0x0d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, + 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x01, 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x08, + 0x10, 0xb9, 0x00, 0x04, 0x00, 0x0b, 0xf4, 0xba, 0x00, 0x06, 0x00, 0x04, + 0x00, 0x01, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x06, 0x10, 0xb9, 0x00, 0x05, + 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x01, 0x10, 0xb8, 0x00, 0x09, 0xd0, 0x30, + 0x31, 0x33, 0x35, 0x33, 0x11, 0x23, 0x07, 0x27, 0x37, 0x33, 0x11, 0x33, + 0x15, 0x55, 0xc8, 0x07, 0xb0, 0x31, 0xb9, 0x83, 0xb8, 0x49, 0x02, 0x33, + 0xa4, 0x35, 0xad, 0xfd, 0x8f, 0x49, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, + 0x00, 0x00, 0x02, 0x19, 0x02, 0xc6, 0x00, 0x1f, 0x00, 0x53, 0xba, 0x00, + 0x03, 0x00, 0x20, 0x00, 0x21, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x13, 0x2f, 0x1b, 0xb9, 0x00, 0x13, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, + 0xb9, 0x00, 0x01, 0x00, 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x1e, 0x00, 0x0b, + 0xf4, 0xba, 0x00, 0x03, 0x00, 0x13, 0x00, 0x1e, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x13, 0x10, 0xb9, 0x00, 0x0a, 0x00, 0x0b, 0xf4, 0xba, 0x00, 0x1d, + 0x00, 0x0a, 0x00, 0x01, 0x11, 0x12, 0x39, 0x30, 0x31, 0x29, 0x01, 0x35, + 0x37, 0x3e, 0x01, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, + 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x0f, 0x01, + 0x21, 0x02, 0x19, 0xfe, 0x2e, 0xe9, 0x33, 0x42, 0x42, 0x41, 0x40, 0x45, + 0x11, 0x4b, 0x0a, 0x23, 0x36, 0x4d, 0x33, 0x34, 0x51, 0x37, 0x1d, 0x17, + 0x29, 0x39, 0x23, 0xc3, 0x01, 0x7b, 0x56, 0xd2, 0x2e, 0x61, 0x36, 0x0c, + 0x3f, 0x45, 0x41, 0x36, 0x1c, 0x1f, 0x3b, 0x2e, 0x1c, 0x1e, 0x36, 0x4a, + 0x2c, 0x28, 0x46, 0x40, 0x3d, 0x1e, 0xaa, 0x00, 0x00, 0x01, 0x00, 0x30, + 0xff, 0xf4, 0x02, 0x06, 0x02, 0xc6, 0x00, 0x39, 0x00, 0x6a, 0xba, 0x00, + 0x10, 0x00, 0x3a, 0x00, 0x3b, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x10, 0x2f, 0x1b, 0xb9, 0x00, 0x10, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x25, 0x2f, 0x1b, + 0xb9, 0x00, 0x25, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x10, 0x10, 0xb9, + 0x00, 0x07, 0x00, 0x0b, 0xf4, 0xba, 0x00, 0x38, 0x00, 0x10, 0x00, 0x25, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x38, 0x2f, 0x41, 0x03, 0x00, 0xe0, 0x00, + 0x38, 0x00, 0x01, 0x5d, 0xb9, 0x00, 0x39, 0x00, 0x0b, 0xf4, 0xba, 0x00, + 0x1a, 0x00, 0x39, 0x00, 0x38, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x25, 0x10, + 0xb9, 0x00, 0x30, 0x00, 0x0b, 0xf4, 0x30, 0x31, 0x01, 0x32, 0x36, 0x3d, + 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x03, 0x33, 0x32, + 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x07, 0x15, 0x1e, 0x03, 0x15, 0x14, + 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x27, 0x37, 0x1e, 0x03, 0x33, 0x32, + 0x36, 0x3d, 0x01, 0x34, 0x26, 0x2b, 0x01, 0x35, 0x01, 0x0e, 0x49, 0x49, + 0x47, 0x39, 0x38, 0x45, 0x16, 0x3f, 0x0d, 0x26, 0x33, 0x43, 0x2b, 0x2d, + 0x4e, 0x3a, 0x21, 0x15, 0x25, 0x32, 0x1c, 0x1d, 0x36, 0x2a, 0x19, 0x23, + 0x3f, 0x59, 0x36, 0x2e, 0x47, 0x37, 0x29, 0x10, 0x3f, 0x0e, 0x1e, 0x27, + 0x32, 0x21, 0x4a, 0x4f, 0x4d, 0x4d, 0x53, 0x01, 0x92, 0x41, 0x33, 0x07, + 0x38, 0x38, 0x31, 0x28, 0x30, 0x15, 0x29, 0x20, 0x14, 0x17, 0x2d, 0x42, + 0x2a, 0x22, 0x36, 0x28, 0x1c, 0x07, 0x04, 0x06, 0x1b, 0x2b, 0x3d, 0x27, + 0x2d, 0x4b, 0x35, 0x1e, 0x14, 0x22, 0x2a, 0x17, 0x30, 0x15, 0x22, 0x19, + 0x0e, 0x44, 0x3f, 0x08, 0x3e, 0x44, 0x48, 0x00, 0x00, 0x02, 0x00, 0x22, + 0x00, 0x00, 0x02, 0x32, 0x02, 0xba, 0x00, 0x0a, 0x00, 0x0e, 0x00, 0x5f, + 0xba, 0x00, 0x04, 0x00, 0x0f, 0x00, 0x10, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x04, 0x10, 0xb8, 0x00, 0x0e, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1d, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, + 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xba, 0x00, 0x01, 0x00, 0x05, 0x00, 0x00, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x01, 0x2f, 0xb9, 0x00, 0x0c, 0x00, 0x0b, + 0xf4, 0xb8, 0x00, 0x06, 0xd0, 0xb8, 0x00, 0x01, 0x10, 0xb8, 0x00, 0x09, + 0xd0, 0xb8, 0x00, 0x05, 0x10, 0xb8, 0x00, 0x0d, 0xd0, 0x30, 0x31, 0x21, + 0x35, 0x21, 0x35, 0x01, 0x33, 0x11, 0x33, 0x15, 0x23, 0x15, 0x25, 0x21, + 0x11, 0x23, 0x01, 0x7a, 0xfe, 0xa8, 0x01, 0x2e, 0x7a, 0x68, 0x68, 0xfe, + 0xa3, 0x01, 0x0d, 0x04, 0x89, 0x4a, 0x01, 0xe7, 0xfe, 0x14, 0x45, 0x89, + 0xce, 0x01, 0xab, 0x00, 0x00, 0x01, 0x00, 0x49, 0xff, 0xf4, 0x02, 0x15, + 0x02, 0xba, 0x00, 0x28, 0x00, 0x57, 0xba, 0x00, 0x1b, 0x00, 0x29, 0x00, + 0x2a, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x27, 0x2f, 0x1b, 0xb9, 0x00, 0x27, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x10, 0x2f, 0x1b, 0xb9, 0x00, 0x10, 0x00, + 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x27, 0x10, 0xb9, 0x00, 0x01, 0x00, 0x0b, + 0xf4, 0xba, 0x00, 0x22, 0x00, 0x10, 0x00, 0x27, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x22, 0x2f, 0xb9, 0x00, 0x06, 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x10, + 0x10, 0xb9, 0x00, 0x1b, 0x00, 0x0b, 0xf4, 0x30, 0x31, 0x01, 0x21, 0x03, + 0x33, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x23, + 0x22, 0x2e, 0x02, 0x27, 0x37, 0x1e, 0x03, 0x33, 0x32, 0x36, 0x3d, 0x01, + 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x13, 0x21, 0x01, 0xf5, 0xfe, + 0xc8, 0x14, 0x07, 0x1a, 0x40, 0x38, 0x2e, 0x4d, 0x38, 0x20, 0x20, 0x3e, + 0x58, 0x38, 0x2c, 0x45, 0x35, 0x28, 0x10, 0x3f, 0x0e, 0x1d, 0x26, 0x30, + 0x20, 0x48, 0x4d, 0x4e, 0x49, 0x32, 0x37, 0x17, 0x47, 0x19, 0x01, 0x7c, + 0x02, 0x71, 0xfe, 0xf5, 0x23, 0x29, 0x1d, 0x38, 0x4f, 0x33, 0x33, 0x55, + 0x3d, 0x22, 0x14, 0x22, 0x2a, 0x17, 0x30, 0x15, 0x22, 0x19, 0x0e, 0x4e, + 0x45, 0x08, 0x45, 0x4e, 0x22, 0x19, 0x0a, 0x01, 0x80, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x40, 0xff, 0xf4, 0x02, 0x18, 0x02, 0xba, 0x00, 0x1d, + 0x00, 0x2b, 0x00, 0x67, 0xba, 0x00, 0x1e, 0x00, 0x2c, 0x00, 0x2d, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x1e, 0x10, 0xb8, 0x00, 0x00, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, + 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, + 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xba, 0x00, 0x25, + 0x00, 0x0a, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x25, 0x2f, 0xb8, + 0x00, 0x00, 0x10, 0xb9, 0x00, 0x1e, 0x00, 0x0b, 0xf4, 0xba, 0x00, 0x11, + 0x00, 0x25, 0x00, 0x1e, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x11, 0x2f, 0xb8, + 0x00, 0x25, 0x10, 0xb9, 0x00, 0x14, 0x00, 0x0b, 0xf4, 0x30, 0x31, 0x05, + 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x33, 0x0e, 0x03, 0x07, + 0x17, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, + 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, + 0x16, 0x01, 0x2d, 0x37, 0x58, 0x3d, 0x21, 0x2f, 0x49, 0x5a, 0x2b, 0x6c, + 0x39, 0x59, 0x44, 0x2e, 0x0f, 0x05, 0x19, 0x52, 0x41, 0x2e, 0x4c, 0x38, + 0x1f, 0x22, 0x3d, 0x57, 0x36, 0x48, 0x4f, 0x4f, 0x48, 0x48, 0x4f, 0x4f, + 0x0c, 0x25, 0x45, 0x64, 0x3e, 0x4e, 0x89, 0x71, 0x57, 0x1b, 0x29, 0x4e, + 0x55, 0x61, 0x3d, 0x02, 0x2b, 0x39, 0x1e, 0x38, 0x50, 0x31, 0x33, 0x55, + 0x3d, 0x22, 0x47, 0x4e, 0x47, 0x08, 0x47, 0x4e, 0x4e, 0x47, 0x08, 0x47, + 0x4e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x41, 0x00, 0x00, 0x02, 0x13, + 0x02, 0xba, 0x00, 0x08, 0x00, 0x47, 0xba, 0x00, 0x08, 0x00, 0x09, 0x00, + 0x0a, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, + 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x05, 0x10, 0xb9, 0x00, 0x02, 0x00, 0x0b, + 0xf4, 0xba, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x04, 0x2f, 0x30, 0x31, 0x33, 0x01, 0x21, 0x15, 0x23, 0x35, 0x21, + 0x15, 0x01, 0xad, 0x01, 0x11, 0xfe, 0xce, 0x4b, 0x01, 0xd2, 0xfe, 0xf4, + 0x02, 0x72, 0x82, 0xca, 0x4a, 0xfd, 0x90, 0x00, 0x00, 0x03, 0x00, 0x37, + 0xff, 0xf4, 0x02, 0x21, 0x02, 0xc6, 0x00, 0x1d, 0x00, 0x2b, 0x00, 0x39, + 0x00, 0x80, 0xba, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x3b, 0x11, 0x12, 0x39, + 0xb8, 0x00, 0x1e, 0xd0, 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, 0x2c, 0xd0, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0f, 0x2f, 0x1b, 0xb9, + 0x00, 0x0f, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb8, + 0x00, 0x0f, 0x10, 0xb9, 0x00, 0x33, 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x00, + 0x10, 0xb9, 0x00, 0x1e, 0x00, 0x0b, 0xf4, 0xba, 0x00, 0x25, 0x00, 0x33, + 0x00, 0x1e, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x25, 0x2f, 0x41, 0x03, 0x00, + 0xe0, 0x00, 0x25, 0x00, 0x01, 0x5d, 0xb9, 0x00, 0x2c, 0x00, 0x0b, 0xf4, + 0xba, 0x00, 0x08, 0x00, 0x2c, 0x00, 0x25, 0x11, 0x12, 0x39, 0xba, 0x00, + 0x16, 0x00, 0x2c, 0x00, 0x25, 0x11, 0x12, 0x39, 0x30, 0x31, 0x05, 0x22, + 0x2e, 0x02, 0x35, 0x34, 0x36, 0x37, 0x35, 0x2e, 0x01, 0x35, 0x34, 0x36, + 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x15, 0x1e, 0x01, 0x15, 0x14, + 0x0e, 0x02, 0x27, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, + 0x1d, 0x01, 0x14, 0x16, 0x13, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, + 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x2c, 0x3d, 0x5c, 0x3d, 0x1f, + 0x4e, 0x40, 0x38, 0x41, 0x76, 0x6a, 0x6a, 0x76, 0x41, 0x38, 0x40, 0x4e, + 0x1f, 0x3e, 0x5b, 0x3d, 0x4a, 0x54, 0x53, 0x4b, 0x4b, 0x53, 0x54, 0x4a, + 0x44, 0x47, 0x49, 0x42, 0x42, 0x49, 0x47, 0x0c, 0x1f, 0x36, 0x4a, 0x2b, + 0x48, 0x54, 0x11, 0x08, 0x13, 0x55, 0x3c, 0x50, 0x5f, 0x5f, 0x50, 0x3c, + 0x55, 0x13, 0x08, 0x11, 0x54, 0x48, 0x2b, 0x4a, 0x36, 0x1f, 0x47, 0x42, + 0x3c, 0x16, 0x3c, 0x42, 0x42, 0x3c, 0x16, 0x3c, 0x42, 0x01, 0x56, 0x3a, + 0x36, 0x0e, 0x36, 0x3a, 0x3a, 0x36, 0x0e, 0x36, 0x3a, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x40, 0x00, 0x00, 0x02, 0x18, 0x02, 0xc6, 0x00, 0x1d, + 0x00, 0x2b, 0x00, 0x67, 0xba, 0x00, 0x1e, 0x00, 0x2c, 0x00, 0x2d, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x1e, 0x10, 0xb8, 0x00, 0x19, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x19, 0x2f, 0x1b, 0xb9, 0x00, 0x19, + 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x05, + 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x19, + 0x10, 0xb9, 0x00, 0x25, 0x00, 0x0b, 0xf4, 0xba, 0x00, 0x1e, 0x00, 0x19, + 0x00, 0x05, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x1e, 0x2f, 0xba, 0x00, 0x0c, + 0x00, 0x25, 0x00, 0x1e, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0c, 0x2f, 0xb8, + 0x00, 0x1e, 0x10, 0xb9, 0x00, 0x0f, 0x00, 0x0b, 0xf4, 0x30, 0x31, 0x01, + 0x14, 0x0e, 0x02, 0x07, 0x23, 0x3e, 0x03, 0x37, 0x27, 0x0e, 0x01, 0x23, + 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x07, + 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, + 0x16, 0x02, 0x18, 0x2f, 0x4a, 0x59, 0x2b, 0x6c, 0x39, 0x59, 0x44, 0x2e, + 0x0f, 0x05, 0x1a, 0x51, 0x41, 0x2e, 0x4d, 0x37, 0x1f, 0x21, 0x3e, 0x57, + 0x35, 0x37, 0x58, 0x3d, 0x21, 0xec, 0x48, 0x4f, 0x4f, 0x48, 0x48, 0x4f, + 0x4f, 0x01, 0xba, 0x4e, 0x89, 0x71, 0x57, 0x1b, 0x29, 0x4e, 0x55, 0x61, + 0x3d, 0x02, 0x2b, 0x39, 0x1e, 0x38, 0x4f, 0x32, 0x33, 0x55, 0x3d, 0x22, + 0x25, 0x45, 0x64, 0xab, 0x4e, 0x47, 0x08, 0x47, 0x4e, 0x4e, 0x47, 0x08, + 0x47, 0x4e, 0x00, 0x00, 0xff, 0xff, 0x00, 0xe2, 0xff, 0xf7, 0x01, 0x76, + 0x02, 0x0d, 0x12, 0x26, 0x00, 0x11, 0x00, 0x00, 0x10, 0x07, 0x00, 0x11, + 0x00, 0x00, 0x01, 0x8c, 0xff, 0xff, 0x00, 0xcc, 0xff, 0x73, 0x01, 0x82, + 0x02, 0x0d, 0x12, 0x26, 0x00, 0x0f, 0x00, 0x00, 0x10, 0x07, 0x00, 0x11, + 0x00, 0x00, 0x01, 0x8c, 0x00, 0x01, 0x00, 0x55, 0x00, 0x10, 0x02, 0x03, + 0x02, 0x52, 0x00, 0x07, 0x00, 0x15, 0xba, 0x00, 0x05, 0x00, 0x08, 0x00, + 0x09, 0x11, 0x12, 0x39, 0x00, 0xba, 0x00, 0x07, 0x00, 0x02, 0x00, 0x03, + 0x2b, 0x30, 0x31, 0x13, 0x35, 0x25, 0x15, 0x05, 0x15, 0x05, 0x15, 0x55, + 0x01, 0xae, 0xfe, 0x9d, 0x01, 0x63, 0x01, 0x09, 0x50, 0xf9, 0x53, 0xc9, + 0x08, 0xc9, 0x55, 0x00, 0x00, 0x02, 0x00, 0x3e, 0x00, 0xac, 0x02, 0x1a, + 0x01, 0xb8, 0x00, 0x03, 0x00, 0x07, 0x00, 0x29, 0xba, 0x00, 0x04, 0x00, + 0x08, 0x00, 0x09, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x04, 0x10, 0xb8, 0x00, + 0x00, 0xd0, 0x00, 0xbb, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, + 0x2b, 0xbb, 0x00, 0x05, 0x00, 0x08, 0x00, 0x04, 0x00, 0x04, 0x2b, 0x30, + 0x31, 0x13, 0x35, 0x21, 0x15, 0x05, 0x35, 0x21, 0x15, 0x3e, 0x01, 0xdc, + 0xfe, 0x24, 0x01, 0xdc, 0x01, 0x74, 0x44, 0x44, 0xc8, 0x44, 0x44, 0x00, + 0x00, 0x01, 0x00, 0x55, 0x00, 0x10, 0x02, 0x03, 0x02, 0x52, 0x00, 0x07, + 0x00, 0x15, 0xba, 0x00, 0x01, 0x00, 0x08, 0x00, 0x09, 0x11, 0x12, 0x39, + 0x00, 0xba, 0x00, 0x07, 0x00, 0x04, 0x00, 0x03, 0x2b, 0x30, 0x31, 0x37, + 0x25, 0x35, 0x25, 0x35, 0x05, 0x15, 0x05, 0x55, 0x01, 0x63, 0xfe, 0x9d, + 0x01, 0xae, 0xfe, 0x52, 0x63, 0xc9, 0x08, 0xc9, 0x55, 0xf9, 0x50, 0xf9, + 0x00, 0x02, 0x00, 0x4d, 0xff, 0xf7, 0x01, 0xfe, 0x02, 0xc6, 0x00, 0x1c, + 0x00, 0x2a, 0x00, 0x51, 0xba, 0x00, 0x11, 0x00, 0x2b, 0x00, 0x2c, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x11, 0x10, 0xb8, 0x00, 0x1d, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x11, 0x2f, 0x1b, 0xb9, 0x00, 0x11, + 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x1d, + 0x2f, 0x1b, 0xb9, 0x00, 0x1d, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x11, + 0x10, 0xb9, 0x00, 0x08, 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x1d, 0x10, 0xb9, + 0x00, 0x24, 0x00, 0x09, 0xf4, 0xb9, 0x00, 0x1c, 0x00, 0x07, 0xf4, 0x30, + 0x31, 0x37, 0x35, 0x3e, 0x01, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, + 0x07, 0x27, 0x3e, 0x03, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, + 0x07, 0x15, 0x07, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, + 0x1d, 0x01, 0x14, 0x06, 0xef, 0x56, 0x62, 0x43, 0x3a, 0x3c, 0x48, 0x0e, + 0x4b, 0x0a, 0x24, 0x37, 0x4b, 0x30, 0x30, 0x4d, 0x36, 0x1e, 0x22, 0x36, + 0x45, 0x23, 0x24, 0x29, 0x21, 0x21, 0x29, 0x29, 0x21, 0x21, 0xd7, 0x9d, + 0x04, 0x43, 0x44, 0x0e, 0x38, 0x38, 0x42, 0x33, 0x1c, 0x21, 0x3b, 0x2c, + 0x1a, 0x1b, 0x31, 0x46, 0x2b, 0x2f, 0x47, 0x32, 0x1f, 0x06, 0x65, 0xe0, + 0x22, 0x1a, 0x12, 0x1a, 0x22, 0x22, 0x1a, 0x12, 0x1a, 0x22, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x3e, 0xff, 0x90, 0x02, 0x0d, 0x02, 0xc6, 0x00, 0x31, + 0x00, 0x3f, 0x00, 0x86, 0xba, 0x00, 0x0b, 0x00, 0x40, 0x00, 0x41, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x0b, 0x10, 0xb8, 0x00, 0x3d, 0xd0, 0x00, 0xb8, + 0x00, 0x41, 0x2f, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0b, 0x2f, + 0x1b, 0xb9, 0x00, 0x0b, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x41, 0x10, + 0xb8, 0x00, 0x01, 0xdc, 0xba, 0x00, 0x11, 0x00, 0x0b, 0x00, 0x41, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x11, 0x2f, 0xb8, 0x00, 0x17, 0xd0, 0xb9, 0x00, + 0x32, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x1d, 0x00, 0x17, 0x00, 0x0b, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x1d, 0x2f, 0xb9, 0x00, 0x39, 0x00, 0x08, 0xf4, + 0xba, 0x00, 0x13, 0x00, 0x32, 0x00, 0x39, 0x11, 0x12, 0x39, 0xba, 0x00, + 0x22, 0x00, 0x39, 0x00, 0x32, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0b, 0x10, + 0xb9, 0x00, 0x27, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x01, 0x10, 0xb9, 0x00, + 0x30, 0x00, 0x08, 0xf4, 0x30, 0x31, 0x05, 0x23, 0x22, 0x2e, 0x02, 0x35, + 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x11, 0x23, 0x35, 0x23, + 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, + 0x17, 0x33, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x1e, + 0x02, 0x3b, 0x01, 0x27, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, + 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0xc6, 0x7b, 0x4c, 0x67, 0x3f, 0x1b, + 0x1f, 0x3c, 0x59, 0x3b, 0x3c, 0x55, 0x36, 0x19, 0x47, 0x05, 0x0a, 0x2e, + 0x2c, 0x3d, 0x48, 0x48, 0x3d, 0x16, 0x21, 0x18, 0x10, 0x05, 0x05, 0x47, + 0x50, 0x59, 0x4d, 0x10, 0x2b, 0x4b, 0x3c, 0x7b, 0x4f, 0x24, 0x2b, 0x2b, + 0x24, 0x2a, 0x2b, 0x2b, 0x70, 0x33, 0x67, 0x9a, 0x68, 0x74, 0x9d, 0x60, + 0x29, 0x26, 0x42, 0x5b, 0x34, 0xfe, 0x8c, 0x39, 0x1a, 0x2b, 0x67, 0x6f, + 0x6f, 0x68, 0x0c, 0x14, 0x18, 0x0d, 0x18, 0x55, 0x62, 0x89, 0x97, 0x81, + 0x3a, 0x65, 0x4b, 0x2b, 0xbb, 0x28, 0x26, 0x99, 0x26, 0x28, 0x39, 0x43, + 0x3d, 0x43, 0x39, 0x00, 0x00, 0x02, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x3a, + 0x02, 0xba, 0x00, 0x07, 0x00, 0x0b, 0x00, 0x64, 0xba, 0x00, 0x08, 0x00, + 0x0c, 0x00, 0x0d, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x08, 0x10, 0xb8, 0x00, + 0x05, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, + 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x04, 0x2f, 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x0f, 0x3e, + 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, + 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xba, 0x00, 0x0a, 0x00, 0x05, 0x00, + 0x04, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0a, 0x2f, 0xb9, 0x00, 0x02, 0x00, + 0x0b, 0xf4, 0xb8, 0x00, 0x05, 0x10, 0xb8, 0x00, 0x09, 0xd0, 0x30, 0x31, + 0x21, 0x27, 0x23, 0x07, 0x23, 0x13, 0x33, 0x13, 0x01, 0x23, 0x03, 0x33, + 0x01, 0xe1, 0x3b, 0xf5, 0x3b, 0x57, 0xd6, 0x6f, 0xd6, 0xfe, 0xf6, 0x09, + 0x62, 0xcd, 0xc7, 0xc7, 0x02, 0xba, 0xfd, 0x46, 0x02, 0x61, 0xfe, 0xaf, + 0x00, 0x03, 0x00, 0x58, 0x00, 0x00, 0x02, 0x1f, 0x02, 0xba, 0x00, 0x11, + 0x00, 0x1b, 0x00, 0x25, 0x00, 0x6d, 0xba, 0x00, 0x1c, 0x00, 0x26, 0x00, + 0x27, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x1c, 0x10, 0xb8, 0x00, 0x01, 0xd0, + 0xb8, 0x00, 0x1c, 0x10, 0xb8, 0x00, 0x12, 0xd0, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x11, 0x2f, 0x1b, + 0xb9, 0x00, 0x11, 0x00, 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x1b, 0x00, 0x0b, + 0xf4, 0xba, 0x00, 0x25, 0x00, 0x00, 0x00, 0x1b, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x25, 0x2f, 0xb9, 0x00, 0x1a, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x07, + 0x00, 0x25, 0x00, 0x1a, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x00, 0x10, 0xb9, + 0x00, 0x24, 0x00, 0x0b, 0xf4, 0x30, 0x31, 0x13, 0x33, 0x32, 0x16, 0x15, + 0x14, 0x06, 0x07, 0x15, 0x1e, 0x01, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x21, + 0x37, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x2b, 0x01, 0x15, 0x13, 0x32, + 0x36, 0x3d, 0x01, 0x34, 0x26, 0x2b, 0x01, 0x15, 0x58, 0xed, 0x5a, 0x66, + 0x3d, 0x30, 0x3b, 0x4c, 0x1c, 0x33, 0x45, 0x28, 0xfe, 0xf5, 0xf2, 0x3a, + 0x42, 0x42, 0x3a, 0x9e, 0x90, 0x35, 0x3c, 0x3c, 0x35, 0x90, 0x02, 0xba, + 0x62, 0x52, 0x3f, 0x48, 0x0f, 0x03, 0x0e, 0x4d, 0x49, 0x2a, 0x4a, 0x36, + 0x1f, 0x49, 0x34, 0x36, 0x29, 0x35, 0x35, 0xfd, 0x01, 0x42, 0x2f, 0x30, + 0x27, 0x30, 0x30, 0xe6, 0x00, 0x01, 0x00, 0x46, 0xff, 0xf4, 0x02, 0x1a, + 0x02, 0xc6, 0x00, 0x22, 0x00, 0x43, 0xba, 0x00, 0x00, 0x00, 0x23, 0x00, + 0x24, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, + 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x06, 0x10, 0xb9, 0x00, 0x11, 0x00, 0x0b, + 0xf4, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x18, 0x00, 0x0b, 0xf4, 0x30, + 0x31, 0x05, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x17, + 0x07, 0x2e, 0x03, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x33, 0x32, + 0x3e, 0x02, 0x37, 0x17, 0x0e, 0x03, 0x01, 0x43, 0x80, 0x7d, 0x7d, 0x80, + 0x30, 0x46, 0x32, 0x22, 0x0d, 0x48, 0x09, 0x18, 0x21, 0x2d, 0x20, 0x53, + 0x51, 0x51, 0x53, 0x20, 0x2d, 0x21, 0x18, 0x09, 0x48, 0x0d, 0x22, 0x32, + 0x46, 0x0c, 0xba, 0xaf, 0xaf, 0xba, 0x1a, 0x2c, 0x37, 0x1c, 0x21, 0x17, + 0x29, 0x1f, 0x12, 0x7e, 0x69, 0x72, 0x69, 0x7e, 0x12, 0x1f, 0x29, 0x17, + 0x21, 0x1d, 0x36, 0x2c, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5f, + 0x00, 0x00, 0x02, 0x20, 0x02, 0xba, 0x00, 0x08, 0x00, 0x12, 0x00, 0x4b, + 0xba, 0x00, 0x07, 0x00, 0x13, 0x00, 0x14, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x07, 0x10, 0xb8, 0x00, 0x09, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x1d, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, + 0x08, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x11, + 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x08, 0x10, 0xb9, 0x00, 0x12, 0x00, 0x0b, + 0xf4, 0x30, 0x31, 0x13, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x2b, 0x01, + 0x37, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x2b, 0x01, 0x11, 0x5f, 0xc3, + 0x80, 0x7e, 0x7e, 0x80, 0xc3, 0xbf, 0x54, 0x55, 0x55, 0x54, 0x6b, 0x02, + 0xba, 0xb0, 0xad, 0xad, 0xb0, 0x49, 0x74, 0x6a, 0x6c, 0x6a, 0x74, 0xfd, + 0xd8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x5a, 0x00, 0x00, 0x02, 0x08, + 0x02, 0xba, 0x00, 0x0b, 0x00, 0x57, 0xba, 0x00, 0x09, 0x00, 0x0c, 0x00, + 0x0d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, + 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x01, 0x10, 0xb9, 0x00, 0x04, 0x00, 0x0b, + 0xf4, 0xba, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x08, 0x2f, 0xb9, 0x00, 0x05, 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x00, + 0x10, 0xb9, 0x00, 0x09, 0x00, 0x0b, 0xf4, 0x30, 0x31, 0x33, 0x11, 0x21, + 0x15, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x5a, 0x01, 0xae, + 0xfe, 0xa6, 0x01, 0x4e, 0xfe, 0xb2, 0x01, 0x5a, 0x02, 0xba, 0x49, 0xeb, + 0x49, 0xf4, 0x49, 0x00, 0x00, 0x01, 0x00, 0x5a, 0x00, 0x00, 0x02, 0x12, + 0x02, 0xba, 0x00, 0x09, 0x00, 0x4d, 0xba, 0x00, 0x09, 0x00, 0x0a, 0x00, + 0x0b, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, + 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x01, 0x10, 0xb9, 0x00, 0x04, 0x00, 0x0b, + 0xf4, 0xba, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x08, 0x2f, 0xb9, 0x00, 0x05, 0x00, 0x0b, 0xf4, 0x30, 0x31, 0x33, + 0x11, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x21, 0x11, 0x5a, 0x01, 0xb8, + 0xfe, 0x9c, 0x01, 0x46, 0xfe, 0xba, 0x02, 0xba, 0x49, 0xeb, 0x49, 0xfe, + 0xc3, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x38, 0xff, 0xf4, 0x02, 0x0a, + 0x02, 0xc6, 0x00, 0x29, 0x00, 0x76, 0xba, 0x00, 0x20, 0x00, 0x2a, 0x00, + 0x2b, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x0c, 0x2f, 0x1b, 0xb9, 0x00, 0x0c, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, + 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x29, 0x2f, + 0x1b, 0xb9, 0x00, 0x29, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x0c, 0x10, + 0xb9, 0x00, 0x17, 0x00, 0x0b, 0xf4, 0xba, 0x00, 0x25, 0x00, 0x17, 0x00, + 0x06, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x25, 0x2f, 0xb8, 0x00, 0x06, 0x10, + 0xb9, 0x00, 0x20, 0x00, 0x0b, 0xf4, 0xba, 0x00, 0x00, 0x00, 0x25, 0x00, + 0x20, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x25, 0x10, 0xb9, 0x00, 0x26, 0x00, + 0x0b, 0xf4, 0x30, 0x31, 0x25, 0x23, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x35, + 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x07, 0x2e, 0x03, 0x23, 0x22, + 0x06, 0x1d, 0x01, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x3d, 0x01, 0x23, + 0x35, 0x33, 0x11, 0x23, 0x01, 0xbc, 0x05, 0x09, 0x18, 0x25, 0x34, 0x24, + 0x72, 0x6f, 0x7a, 0x7f, 0x31, 0x48, 0x33, 0x22, 0x0b, 0x48, 0x09, 0x17, + 0x21, 0x2e, 0x1f, 0x54, 0x4f, 0x10, 0x25, 0x3b, 0x2b, 0x44, 0x4c, 0x93, + 0xe1, 0x4e, 0x5d, 0x14, 0x26, 0x1d, 0x12, 0xb8, 0xac, 0xb4, 0xba, 0x1a, + 0x2c, 0x37, 0x1c, 0x21, 0x17, 0x29, 0x1f, 0x12, 0x7e, 0x69, 0x6c, 0x35, + 0x57, 0x40, 0x23, 0x52, 0x41, 0x48, 0x43, 0xfe, 0xa7, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x50, 0x00, 0x00, 0x02, 0x08, 0x02, 0xba, 0x00, 0x0b, + 0x00, 0x80, 0xba, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x0d, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x04, 0x2f, 0x1b, 0xb9, + 0x00, 0x04, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, 0x1d, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x03, 0x2f, 0x1b, 0xb9, 0x00, 0x03, + 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0b, + 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, 0x0f, 0x3e, 0x59, 0xba, 0x00, 0x01, + 0x00, 0x04, 0x00, 0x03, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x01, 0x2f, 0x41, + 0x03, 0x00, 0x8f, 0x00, 0x01, 0x00, 0x01, 0x71, 0x41, 0x03, 0x00, 0xbf, + 0x00, 0x01, 0x00, 0x01, 0x5d, 0x41, 0x03, 0x00, 0x8f, 0x00, 0x01, 0x00, + 0x01, 0x5d, 0xb9, 0x00, 0x06, 0x00, 0x0b, 0xf4, 0x30, 0x31, 0x01, 0x21, + 0x11, 0x23, 0x11, 0x33, 0x11, 0x21, 0x11, 0x33, 0x11, 0x23, 0x01, 0xb4, + 0xfe, 0xf0, 0x54, 0x54, 0x01, 0x10, 0x54, 0x54, 0x01, 0x3d, 0xfe, 0xc3, + 0x02, 0xba, 0xfe, 0xcc, 0x01, 0x34, 0xfd, 0x46, 0x00, 0x01, 0x00, 0x54, + 0x00, 0x00, 0x02, 0x04, 0x02, 0xba, 0x00, 0x0b, 0x00, 0x4b, 0xba, 0x00, + 0x02, 0x00, 0x0c, 0x00, 0x0d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x01, 0x00, 0x0b, + 0xf4, 0xb8, 0x00, 0x05, 0x10, 0xb9, 0x00, 0x04, 0x00, 0x0b, 0xf4, 0xb8, + 0x00, 0x08, 0xd0, 0xb8, 0x00, 0x01, 0x10, 0xb8, 0x00, 0x09, 0xd0, 0x30, + 0x31, 0x33, 0x35, 0x33, 0x11, 0x23, 0x35, 0x21, 0x15, 0x23, 0x11, 0x33, + 0x15, 0x54, 0xae, 0xae, 0x01, 0xb0, 0xae, 0xae, 0x43, 0x02, 0x34, 0x43, + 0x43, 0xfd, 0xcc, 0x43, 0x00, 0x01, 0x00, 0x4a, 0xff, 0xf4, 0x01, 0xe0, + 0x02, 0xba, 0x00, 0x15, 0x00, 0x3f, 0xba, 0x00, 0x0f, 0x00, 0x16, 0x00, + 0x17, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x15, 0x2f, 0x1b, 0xb9, 0x00, 0x15, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, + 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x0f, 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x15, + 0x10, 0xb9, 0x00, 0x14, 0x00, 0x0b, 0xf4, 0x30, 0x31, 0x01, 0x11, 0x14, + 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x37, 0x1e, 0x03, 0x33, 0x32, 0x36, + 0x35, 0x11, 0x23, 0x35, 0x01, 0xe0, 0x1e, 0x37, 0x4c, 0x2d, 0x50, 0x68, + 0x10, 0x50, 0x05, 0x11, 0x1d, 0x2a, 0x1d, 0x39, 0x3f, 0xfc, 0x02, 0xba, + 0xfd, 0xfb, 0x2c, 0x48, 0x32, 0x1b, 0x53, 0x4b, 0x11, 0x15, 0x25, 0x1b, + 0x10, 0x41, 0x45, 0x01, 0xad, 0x49, 0x00, 0x00, 0x00, 0x01, 0x00, 0x55, + 0x00, 0x00, 0x02, 0x42, 0x02, 0xba, 0x00, 0x0d, 0x00, 0x63, 0xba, 0x00, + 0x0b, 0x00, 0x0e, 0x00, 0x0f, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x04, 0x2f, 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x09, 0x2f, 0x1b, + 0xb9, 0x00, 0x09, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x03, 0x2f, 0x1b, 0xb9, 0x00, 0x03, 0x00, 0x0f, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0d, 0x2f, 0x1b, 0xb9, 0x00, + 0x0d, 0x00, 0x0f, 0x3e, 0x59, 0xba, 0x00, 0x06, 0x00, 0x04, 0x00, 0x03, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x06, 0x10, 0xb8, 0x00, 0x01, 0xd0, 0x30, + 0x31, 0x01, 0x07, 0x15, 0x23, 0x11, 0x33, 0x11, 0x33, 0x3f, 0x01, 0x33, + 0x03, 0x13, 0x23, 0x01, 0x0d, 0x64, 0x54, 0x54, 0x03, 0x5c, 0xce, 0x65, + 0xf5, 0xfc, 0x62, 0x01, 0x56, 0x76, 0xe0, 0x02, 0xba, 0xfe, 0x94, 0x74, + 0xf8, 0xfe, 0xda, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x78, + 0x00, 0x00, 0x02, 0x17, 0x02, 0xba, 0x00, 0x05, 0x00, 0x35, 0xba, 0x00, + 0x03, 0x00, 0x06, 0x00, 0x07, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x03, 0x00, 0x0b, + 0xf4, 0x30, 0x31, 0x33, 0x11, 0x33, 0x11, 0x21, 0x15, 0x78, 0x54, 0x01, + 0x4b, 0x02, 0xba, 0xfd, 0x8f, 0x49, 0x00, 0x00, 0x00, 0x01, 0x00, 0x44, + 0x00, 0x00, 0x02, 0x14, 0x02, 0xba, 0x00, 0x10, 0x00, 0x71, 0xba, 0x00, + 0x03, 0x00, 0x11, 0x00, 0x12, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x09, 0x2f, 0x1b, 0xb9, 0x00, 0x09, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0d, 0x2f, 0x1b, + 0xb9, 0x00, 0x0d, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, 0x0f, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x10, 0x2f, 0x1b, 0xb9, 0x00, + 0x10, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x0d, 0x10, 0xb8, 0x00, 0x02, + 0xd0, 0xb8, 0x00, 0x08, 0x10, 0xb8, 0x00, 0x03, 0xdc, 0xb8, 0x00, 0x09, + 0x10, 0xb8, 0x00, 0x05, 0xd0, 0xb8, 0x00, 0x03, 0x10, 0xb8, 0x00, 0x0b, + 0xd0, 0x30, 0x31, 0x01, 0x35, 0x23, 0x0b, 0x01, 0x23, 0x15, 0x11, 0x23, + 0x11, 0x33, 0x13, 0x33, 0x13, 0x33, 0x11, 0x23, 0x01, 0xc7, 0x08, 0x93, + 0x93, 0x08, 0x4d, 0x6c, 0x7b, 0x06, 0x7b, 0x68, 0x4d, 0x01, 0x5e, 0xdd, + 0xfe, 0x99, 0x01, 0x67, 0xdd, 0xfe, 0xa2, 0x02, 0xba, 0xfe, 0xcc, 0x01, + 0x34, 0xfd, 0x46, 0x00, 0x00, 0x01, 0x00, 0x50, 0x00, 0x00, 0x02, 0x08, + 0x02, 0xba, 0x00, 0x0b, 0x00, 0x61, 0xba, 0x00, 0x0b, 0x00, 0x0c, 0x00, + 0x0d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x04, 0x2f, 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, + 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x03, 0x2f, + 0x1b, 0xb9, 0x00, 0x03, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x0b, 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, 0x0f, 0x3e, + 0x59, 0xb8, 0x00, 0x04, 0x10, 0xb8, 0x00, 0x00, 0xd0, 0xb8, 0x00, 0x0b, + 0x10, 0xb8, 0x00, 0x07, 0xd0, 0x30, 0x31, 0x13, 0x23, 0x11, 0x23, 0x11, + 0x33, 0x13, 0x33, 0x11, 0x33, 0x11, 0x23, 0xa3, 0x07, 0x4c, 0x77, 0xee, + 0x07, 0x4c, 0x77, 0x02, 0x4c, 0xfd, 0xb4, 0x02, 0xba, 0xfd, 0xb4, 0x02, + 0x4c, 0xfd, 0x46, 0x00, 0x00, 0x02, 0x00, 0x38, 0xff, 0xf4, 0x02, 0x20, + 0x02, 0xc6, 0x00, 0x13, 0x00, 0x29, 0x00, 0x43, 0xba, 0x00, 0x00, 0x00, + 0x2a, 0x00, 0x2b, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x14, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, + 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, + 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x14, + 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x0a, 0x10, 0xb9, 0x00, 0x1f, 0x00, 0x0b, + 0xf4, 0x30, 0x31, 0x05, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, + 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, 0x3e, 0x02, 0x3d, + 0x01, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x1d, 0x01, 0x14, 0x1e, + 0x02, 0x01, 0x2c, 0x40, 0x5c, 0x3c, 0x1c, 0x1c, 0x3c, 0x5c, 0x40, 0x40, + 0x5c, 0x3c, 0x1c, 0x1c, 0x3c, 0x5c, 0x40, 0x2a, 0x3a, 0x26, 0x11, 0x11, + 0x26, 0x3a, 0x2a, 0x2a, 0x3a, 0x26, 0x11, 0x11, 0x26, 0x3a, 0x0c, 0x31, + 0x5c, 0x86, 0x56, 0x55, 0x87, 0x5c, 0x31, 0x31, 0x5c, 0x87, 0x55, 0x56, + 0x86, 0x5c, 0x31, 0x49, 0x21, 0x3c, 0x55, 0x35, 0x72, 0x34, 0x56, 0x3c, + 0x21, 0x21, 0x3c, 0x56, 0x34, 0x72, 0x35, 0x55, 0x3c, 0x21, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x5a, 0x00, 0x00, 0x02, 0x1f, 0x02, 0xba, 0x00, 0x0a, + 0x00, 0x14, 0x00, 0x55, 0xba, 0x00, 0x0c, 0x00, 0x15, 0x00, 0x16, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x0c, 0x10, 0xb8, 0x00, 0x08, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, + 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, + 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xba, 0x00, 0x0b, + 0x00, 0x01, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0b, 0x2f, 0xb9, + 0x00, 0x09, 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x01, 0x10, 0xb9, 0x00, 0x14, + 0x00, 0x0b, 0xf4, 0x30, 0x31, 0x33, 0x11, 0x33, 0x32, 0x16, 0x15, 0x14, + 0x06, 0x2b, 0x01, 0x19, 0x01, 0x33, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, + 0x2b, 0x01, 0x5a, 0xfe, 0x61, 0x66, 0x66, 0x61, 0xaa, 0xa8, 0x35, 0x3b, + 0x3b, 0x35, 0xa8, 0x02, 0xba, 0x6a, 0x5f, 0x5f, 0x6a, 0xfe, 0xd8, 0x01, + 0x71, 0x35, 0x31, 0x34, 0x31, 0x35, 0x00, 0x00, 0x00, 0x02, 0x00, 0x38, + 0xff, 0x5c, 0x02, 0x20, 0x02, 0xc6, 0x00, 0x19, 0x00, 0x2f, 0x00, 0x61, + 0xba, 0x00, 0x1a, 0x00, 0x30, 0x00, 0x31, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x1a, 0x10, 0xb8, 0x00, 0x0f, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x0f, 0x2f, 0x1b, 0xb9, 0x00, 0x0f, 0x00, 0x1d, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, + 0x05, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x18, 0xd0, 0xb8, 0x00, 0x18, + 0x2f, 0xb9, 0x00, 0x01, 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x05, 0x10, 0xb8, + 0x00, 0x17, 0xd0, 0xb8, 0x00, 0x05, 0x10, 0xb9, 0x00, 0x1a, 0x00, 0x0b, + 0xf4, 0xb8, 0x00, 0x0f, 0x10, 0xb9, 0x00, 0x25, 0x00, 0x0b, 0xf4, 0x30, + 0x31, 0x05, 0x23, 0x22, 0x26, 0x3d, 0x01, 0x2e, 0x03, 0x35, 0x34, 0x3e, + 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x06, 0x07, 0x15, 0x33, 0x27, + 0x32, 0x3e, 0x02, 0x3d, 0x01, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, + 0x1d, 0x01, 0x14, 0x1e, 0x02, 0x01, 0xeb, 0x75, 0x3b, 0x37, 0x35, 0x4d, + 0x32, 0x18, 0x1c, 0x3c, 0x5c, 0x40, 0x40, 0x5c, 0x3c, 0x1c, 0x62, 0x6a, + 0x97, 0xbf, 0x2a, 0x3a, 0x26, 0x11, 0x11, 0x26, 0x3a, 0x2a, 0x2a, 0x3a, + 0x26, 0x11, 0x11, 0x26, 0x3a, 0xa4, 0x42, 0x34, 0x25, 0x07, 0x37, 0x5b, + 0x7f, 0x4e, 0x55, 0x87, 0x5c, 0x31, 0x31, 0x5c, 0x87, 0x55, 0x9d, 0xbb, + 0x0e, 0x57, 0x9d, 0x21, 0x3c, 0x55, 0x35, 0x72, 0x34, 0x56, 0x3c, 0x21, + 0x21, 0x3c, 0x56, 0x34, 0x72, 0x35, 0x55, 0x3c, 0x21, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x5a, 0x00, 0x00, 0x02, 0x25, 0x02, 0xba, 0x00, 0x0d, + 0x00, 0x17, 0x00, 0x70, 0xba, 0x00, 0x0c, 0x00, 0x18, 0x00, 0x19, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x0c, 0x10, 0xb8, 0x00, 0x0e, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x02, 0x2f, 0x1b, 0xb9, 0x00, 0x02, + 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, + 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x0b, 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, 0x0f, + 0x3e, 0x59, 0xba, 0x00, 0x17, 0x00, 0x02, 0x00, 0x01, 0x11, 0x12, 0x39, + 0xb8, 0x00, 0x17, 0x2f, 0xb9, 0x00, 0x0d, 0x00, 0x08, 0xf4, 0xba, 0x00, + 0x09, 0x00, 0x17, 0x00, 0x0d, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x02, 0x10, + 0xb9, 0x00, 0x16, 0x00, 0x0b, 0xf4, 0x30, 0x31, 0x33, 0x23, 0x11, 0x33, + 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x13, 0x23, 0x03, 0x23, 0x37, 0x32, + 0x36, 0x3d, 0x01, 0x34, 0x26, 0x2b, 0x01, 0x11, 0xae, 0x54, 0xfe, 0x61, + 0x66, 0x58, 0x54, 0xb2, 0x5e, 0xaa, 0x6f, 0xa8, 0x35, 0x3b, 0x3b, 0x35, + 0xa8, 0x02, 0xba, 0x6a, 0x5f, 0x55, 0x66, 0x08, 0xfe, 0xd2, 0x01, 0x2a, + 0x47, 0x35, 0x31, 0x34, 0x31, 0x35, 0xff, 0x00, 0x00, 0x01, 0x00, 0x2d, + 0xff, 0xf4, 0x02, 0x1e, 0x02, 0xc6, 0x00, 0x2b, 0x00, 0x63, 0xba, 0x00, + 0x07, 0x00, 0x2c, 0x00, 0x2d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x16, 0x2f, 0x1b, 0xb9, 0x00, 0x16, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x07, 0x00, 0x0b, + 0xf4, 0xb8, 0x00, 0x16, 0x10, 0xb9, 0x00, 0x1d, 0x00, 0x0b, 0xf4, 0xba, + 0x00, 0x0e, 0x00, 0x1d, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0e, + 0x10, 0xb8, 0x00, 0x0d, 0xd0, 0xba, 0x00, 0x23, 0x00, 0x16, 0x00, 0x07, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x23, 0x10, 0xb8, 0x00, 0x24, 0xd0, 0x30, + 0x31, 0x05, 0x22, 0x26, 0x27, 0x37, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x35, + 0x34, 0x26, 0x2f, 0x01, 0x2e, 0x03, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, + 0x17, 0x07, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x1f, 0x01, + 0x1e, 0x03, 0x15, 0x14, 0x06, 0x01, 0x2a, 0x5e, 0x78, 0x27, 0x3d, 0x29, + 0x5b, 0x3f, 0x4c, 0x50, 0x3a, 0x48, 0x4e, 0x33, 0x45, 0x2a, 0x12, 0x7e, + 0x6b, 0x54, 0x73, 0x23, 0x3b, 0x1d, 0x52, 0x41, 0x47, 0x4c, 0x39, 0x4a, + 0x4b, 0x33, 0x46, 0x2b, 0x12, 0x7f, 0x0c, 0x45, 0x36, 0x32, 0x33, 0x32, + 0x46, 0x3f, 0x33, 0x39, 0x0c, 0x0d, 0x09, 0x24, 0x33, 0x3d, 0x21, 0x60, + 0x62, 0x38, 0x33, 0x33, 0x26, 0x30, 0x3c, 0x3c, 0x2f, 0x3b, 0x0d, 0x0d, + 0x09, 0x24, 0x32, 0x3e, 0x22, 0x61, 0x6e, 0x00, 0x00, 0x01, 0x00, 0x19, + 0x00, 0x00, 0x02, 0x3f, 0x02, 0xba, 0x00, 0x07, 0x00, 0x3d, 0xba, 0x00, + 0x02, 0x00, 0x08, 0x00, 0x09, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x02, 0x2f, 0x1b, + 0xb9, 0x00, 0x02, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x05, 0x10, 0xb9, + 0x00, 0x04, 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x00, 0xd0, 0x30, 0x31, 0x01, + 0x11, 0x23, 0x11, 0x23, 0x35, 0x21, 0x15, 0x01, 0x56, 0x54, 0xe9, 0x02, + 0x26, 0x02, 0x71, 0xfd, 0x8f, 0x02, 0x71, 0x49, 0x49, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x50, 0xff, 0xf4, 0x02, 0x08, 0x02, 0xba, 0x00, 0x19, + 0x00, 0x46, 0xba, 0x00, 0x13, 0x00, 0x1a, 0x00, 0x1b, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x19, 0x2f, 0x1b, 0xb9, + 0x00, 0x19, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x0c, 0x2f, 0x1b, 0xb9, 0x00, 0x0c, 0x00, 0x1d, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x13, 0x2f, 0x1b, 0xb9, 0x00, 0x13, + 0x00, 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x06, 0x00, 0x0b, 0xf4, 0x30, 0x31, + 0x13, 0x11, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x11, 0x33, + 0x11, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x11, 0xa4, 0x06, + 0x1a, 0x37, 0x31, 0x31, 0x37, 0x1a, 0x06, 0x54, 0x0f, 0x2f, 0x57, 0x47, + 0x47, 0x57, 0x2f, 0x0f, 0x02, 0xba, 0xfe, 0x5d, 0x33, 0x50, 0x39, 0x1e, + 0x1e, 0x39, 0x50, 0x33, 0x01, 0xa3, 0xfe, 0x71, 0x4e, 0x74, 0x4e, 0x27, + 0x27, 0x4e, 0x74, 0x4e, 0x01, 0x8f, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, + 0x00, 0x00, 0x02, 0x34, 0x02, 0xba, 0x00, 0x09, 0x00, 0x44, 0xba, 0x00, + 0x04, 0x00, 0x0a, 0x00, 0x0b, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x07, 0x2f, 0x1b, + 0xb9, 0x00, 0x07, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, + 0xb8, 0x00, 0x04, 0xd0, 0x30, 0x31, 0x33, 0x03, 0x33, 0x1b, 0x01, 0x33, + 0x1b, 0x01, 0x33, 0x03, 0xf3, 0xcf, 0x59, 0x63, 0x4b, 0x05, 0x4b, 0x63, + 0x56, 0xcf, 0x02, 0xba, 0xfe, 0xa3, 0xfe, 0xf8, 0x01, 0x08, 0x01, 0x5d, + 0xfd, 0x46, 0x00, 0x00, 0x00, 0x01, 0x00, 0x23, 0x00, 0x00, 0x02, 0x35, + 0x02, 0xba, 0x00, 0x11, 0x00, 0x77, 0xba, 0x00, 0x10, 0x00, 0x12, 0x00, + 0x13, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0b, 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, + 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, + 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x0e, 0x2f, 0x1b, 0xb9, 0x00, 0x0e, 0x00, 0x0f, 0x3e, + 0x59, 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, 0x04, 0xd0, 0xba, 0x00, 0x06, + 0x00, 0x01, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x06, 0x2f, 0xb8, + 0x00, 0x04, 0x10, 0xb8, 0x00, 0x08, 0xd0, 0xb8, 0x00, 0x06, 0x10, 0xb8, + 0x00, 0x10, 0xd0, 0x30, 0x31, 0x33, 0x03, 0x33, 0x13, 0x17, 0x33, 0x13, + 0x33, 0x13, 0x33, 0x37, 0x13, 0x33, 0x03, 0x23, 0x03, 0x23, 0x03, 0x5a, + 0x37, 0x4b, 0x1d, 0x0f, 0x08, 0x5c, 0x5e, 0x5c, 0x08, 0x0f, 0x1d, 0x49, + 0x37, 0x79, 0x55, 0x08, 0x55, 0x02, 0xba, 0xfe, 0x70, 0xd3, 0x01, 0xad, + 0xfe, 0x53, 0xd3, 0x01, 0x90, 0xfd, 0x46, 0x01, 0xa1, 0xfe, 0x5f, 0x00, + 0x00, 0x01, 0x00, 0x1a, 0x00, 0x00, 0x02, 0x3f, 0x02, 0xba, 0x00, 0x11, + 0x00, 0x77, 0xba, 0x00, 0x04, 0x00, 0x12, 0x00, 0x13, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x09, 0x2f, 0x1b, 0xb9, + 0x00, 0x09, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x0f, 0x2f, 0x1b, 0xb9, 0x00, 0x0f, 0x00, 0x1d, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x07, 0x2f, 0x1b, 0xb9, 0x00, 0x07, + 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, + 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x0f, 0x3e, 0x59, 0xba, 0x00, 0x04, + 0x00, 0x0f, 0x00, 0x01, 0x11, 0x12, 0x39, 0xba, 0x00, 0x0c, 0x00, 0x09, + 0x00, 0x07, 0x11, 0x12, 0x39, 0xba, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x04, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x08, 0x10, 0xb8, 0x00, 0x11, 0xd0, 0x30, + 0x31, 0x21, 0x23, 0x2f, 0x01, 0x23, 0x0f, 0x01, 0x23, 0x13, 0x03, 0x33, + 0x1f, 0x01, 0x33, 0x3f, 0x01, 0x33, 0x03, 0x02, 0x3f, 0x5f, 0x53, 0x5c, + 0x04, 0x5f, 0x58, 0x5c, 0xe4, 0xd7, 0x5f, 0x51, 0x57, 0x04, 0x56, 0x54, + 0x5c, 0xd8, 0x8b, 0x98, 0x98, 0x8b, 0x01, 0x64, 0x01, 0x56, 0x87, 0x8d, + 0x8d, 0x87, 0xfe, 0xab, 0x00, 0x01, 0x00, 0x11, 0x00, 0x00, 0x02, 0x47, + 0x02, 0xba, 0x00, 0x0b, 0x00, 0x5a, 0xba, 0x00, 0x05, 0x00, 0x0c, 0x00, + 0x0d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x02, 0x2f, 0x1b, 0xb9, 0x00, 0x02, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, + 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, + 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xba, 0x00, 0x05, 0x00, + 0x02, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x05, 0x2f, 0xb8, 0x00, + 0x01, 0xd0, 0xb8, 0x00, 0x05, 0x10, 0xb8, 0x00, 0x0a, 0xd0, 0x30, 0x31, + 0x21, 0x11, 0x03, 0x33, 0x1f, 0x01, 0x33, 0x3f, 0x01, 0x33, 0x03, 0x11, + 0x01, 0x02, 0xf1, 0x60, 0x64, 0x55, 0x04, 0x57, 0x64, 0x5e, 0xf1, 0x01, + 0x12, 0x01, 0xa8, 0xb6, 0x9f, 0x9f, 0xb6, 0xfe, 0x58, 0xfe, 0xee, 0x00, + 0x00, 0x01, 0x00, 0x30, 0x00, 0x00, 0x02, 0x28, 0x02, 0xba, 0x00, 0x09, + 0x00, 0x53, 0xba, 0x00, 0x03, 0x00, 0x0a, 0x00, 0x0b, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, + 0x00, 0x05, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x0f, 0x3e, 0x59, 0xb9, + 0x00, 0x08, 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x05, 0x10, 0xb9, 0x00, 0x04, + 0x00, 0x0b, 0xf4, 0xba, 0x00, 0x07, 0x00, 0x04, 0x00, 0x08, 0x11, 0x12, + 0x39, 0xba, 0x00, 0x02, 0x00, 0x08, 0x00, 0x07, 0x11, 0x12, 0x39, 0x30, + 0x31, 0x29, 0x01, 0x35, 0x01, 0x21, 0x35, 0x21, 0x15, 0x01, 0x21, 0x02, + 0x28, 0xfe, 0x08, 0x01, 0x8b, 0xfe, 0x86, 0x01, 0xd6, 0xfe, 0x74, 0x01, + 0x9d, 0x4b, 0x02, 0x26, 0x49, 0x4b, 0xfd, 0xda, 0x00, 0x01, 0x00, 0xe1, + 0xff, 0x76, 0x01, 0xf9, 0x02, 0xf8, 0x00, 0x07, 0x00, 0x29, 0xba, 0x00, + 0x05, 0x00, 0x08, 0x00, 0x09, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x01, + 0x2f, 0xb8, 0x00, 0x00, 0x2f, 0xb8, 0x00, 0x01, 0x10, 0xb9, 0x00, 0x04, + 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x05, 0x00, 0x08, + 0xf4, 0x30, 0x31, 0x17, 0x11, 0x21, 0x15, 0x23, 0x11, 0x33, 0x15, 0xe1, + 0x01, 0x18, 0xd3, 0xd3, 0x8a, 0x03, 0x82, 0x3e, 0xfc, 0xfa, 0x3e, 0x00, + 0x00, 0x01, 0x00, 0x5a, 0xff, 0x76, 0x01, 0xfe, 0x02, 0xf8, 0x00, 0x03, + 0x00, 0x15, 0xba, 0x00, 0x00, 0x00, 0x04, 0x00, 0x05, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x01, 0x2f, 0xb8, 0x00, 0x00, 0x2f, 0x30, 0x31, 0x05, + 0x01, 0x33, 0x01, 0x01, 0xb6, 0xfe, 0xa4, 0x48, 0x01, 0x5c, 0x8a, 0x03, + 0x82, 0xfc, 0x7e, 0x00, 0x00, 0x01, 0x00, 0x5f, 0xff, 0x76, 0x01, 0x77, + 0x02, 0xf8, 0x00, 0x07, 0x00, 0x25, 0xba, 0x00, 0x04, 0x00, 0x08, 0x00, + 0x09, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x07, 0x2f, 0xb8, 0x00, 0x02, + 0x2f, 0xb9, 0x00, 0x03, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x07, 0x10, 0xb9, + 0x00, 0x06, 0x00, 0x08, 0xf4, 0x30, 0x31, 0x01, 0x11, 0x21, 0x35, 0x33, + 0x11, 0x23, 0x35, 0x01, 0x77, 0xfe, 0xe8, 0xd3, 0xd3, 0x02, 0xf8, 0xfc, + 0x7e, 0x3e, 0x03, 0x06, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x2d, + 0x01, 0x1f, 0x02, 0x2b, 0x02, 0xba, 0x00, 0x07, 0x00, 0x1e, 0xba, 0x00, + 0x01, 0x00, 0x08, 0x00, 0x09, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1d, + 0x3e, 0x59, 0x30, 0x31, 0x01, 0x03, 0x23, 0x03, 0x27, 0x13, 0x33, 0x13, + 0x01, 0xe9, 0xbd, 0x04, 0xbd, 0x3e, 0xd2, 0x5a, 0xd2, 0x01, 0x1f, 0x01, + 0x56, 0xfe, 0xaa, 0x1f, 0x01, 0x7c, 0xfe, 0x84, 0x00, 0x01, 0x00, 0x3c, + 0xff, 0x57, 0x02, 0x1c, 0xff, 0xa1, 0x00, 0x03, 0x00, 0x17, 0xba, 0x00, + 0x01, 0x00, 0x04, 0x00, 0x05, 0x11, 0x12, 0x39, 0x00, 0xbb, 0x00, 0x01, + 0x00, 0x0b, 0x00, 0x00, 0x00, 0x04, 0x2b, 0x30, 0x31, 0x17, 0x35, 0x21, + 0x15, 0x3c, 0x01, 0xe0, 0xa9, 0x4a, 0x4a, 0x00, 0x00, 0x01, 0x00, 0xbb, + 0x02, 0x49, 0x01, 0x59, 0x03, 0x0b, 0x00, 0x03, 0x00, 0x23, 0xba, 0x00, + 0x03, 0x00, 0x04, 0x00, 0x05, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x03, + 0x2f, 0x41, 0x03, 0x00, 0x2f, 0x00, 0x03, 0x00, 0x01, 0x5d, 0x41, 0x03, + 0x00, 0x0f, 0x00, 0x03, 0x00, 0x01, 0x5d, 0x30, 0x31, 0x13, 0x37, 0x17, + 0x07, 0xbb, 0x49, 0x55, 0x34, 0x02, 0xe8, 0x23, 0xaa, 0x18, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x42, 0xff, 0xf4, 0x02, 0x26, 0x02, 0x10, 0x00, 0x21, + 0x00, 0x2f, 0x00, 0x8a, 0xba, 0x00, 0x29, 0x00, 0x30, 0x00, 0x31, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x29, 0x10, 0xb8, 0x00, 0x0d, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x1b, 0x2f, 0x1b, 0xb9, 0x00, 0x1b, + 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x07, + 0x2f, 0x1b, 0xb9, 0x00, 0x07, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x0f, + 0x3e, 0x59, 0xb8, 0x00, 0x07, 0x10, 0xb9, 0x00, 0x22, 0x00, 0x08, 0xf4, + 0xba, 0x00, 0x0d, 0x00, 0x07, 0x00, 0x1b, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x0d, 0x2f, 0xb9, 0x00, 0x29, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x04, 0x00, + 0x22, 0x00, 0x29, 0x11, 0x12, 0x39, 0x7c, 0xb8, 0x00, 0x04, 0x2f, 0x18, + 0xb8, 0x00, 0x1b, 0x10, 0xb9, 0x00, 0x12, 0x00, 0x08, 0xf4, 0xb8, 0x00, + 0x00, 0x10, 0xb9, 0x00, 0x1f, 0x00, 0x08, 0xf4, 0x30, 0x31, 0x21, 0x22, + 0x26, 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x3b, + 0x01, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x03, 0x33, + 0x32, 0x16, 0x15, 0x11, 0x33, 0x15, 0x25, 0x32, 0x3e, 0x02, 0x3d, 0x01, + 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0xef, 0x2f, 0x28, 0x05, + 0x05, 0x11, 0x4b, 0x3f, 0x51, 0x60, 0x69, 0x75, 0x6e, 0x40, 0x3b, 0x34, + 0x42, 0x14, 0x36, 0x0a, 0x22, 0x32, 0x40, 0x27, 0x5b, 0x6b, 0x48, 0xfe, + 0xdb, 0x1f, 0x33, 0x26, 0x15, 0x6e, 0x48, 0x42, 0x39, 0x30, 0x24, 0x2d, + 0x33, 0x54, 0x49, 0x48, 0x4e, 0x33, 0x39, 0x39, 0x29, 0x23, 0x28, 0x14, + 0x26, 0x1d, 0x11, 0x5c, 0x52, 0xfe, 0xe4, 0x46, 0x37, 0x0f, 0x19, 0x23, + 0x14, 0x55, 0x28, 0x26, 0x15, 0x28, 0x29, 0x00, 0x00, 0x02, 0x00, 0x5f, + 0xff, 0xf4, 0x02, 0x1c, 0x02, 0xe4, 0x00, 0x10, 0x00, 0x22, 0x00, 0x81, + 0xba, 0x00, 0x11, 0x00, 0x23, 0x00, 0x24, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x11, 0x10, 0xb8, 0x00, 0x0b, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1f, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, + 0x05, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x0b, 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0f, 0x2f, 0x1b, 0xb9, 0x00, 0x0f, 0x00, + 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x05, 0x10, 0xb9, 0x00, 0x18, 0x00, 0x08, + 0xf4, 0xb8, 0x00, 0x0b, 0x10, 0xb9, 0x00, 0x11, 0x00, 0x08, 0xf4, 0xba, + 0x00, 0x03, 0x00, 0x18, 0x00, 0x11, 0x11, 0x12, 0x39, 0xba, 0x00, 0x0d, + 0x00, 0x11, 0x00, 0x18, 0x11, 0x12, 0x39, 0x30, 0x31, 0x13, 0x33, 0x11, + 0x33, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, 0x22, 0x27, 0x23, + 0x15, 0x23, 0x37, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x0e, + 0x02, 0x1d, 0x01, 0x14, 0x1e, 0x02, 0x5f, 0x50, 0x04, 0x32, 0x6d, 0x5f, + 0x6b, 0x6b, 0x5f, 0x6d, 0x32, 0x04, 0x50, 0xd4, 0x46, 0x4d, 0x4d, 0x46, + 0x1b, 0x30, 0x24, 0x15, 0x15, 0x24, 0x30, 0x02, 0xe4, 0xfe, 0xcc, 0x60, + 0x8e, 0x80, 0x80, 0x8e, 0x60, 0x54, 0x3b, 0x55, 0x46, 0x58, 0x46, 0x55, + 0x0e, 0x1b, 0x27, 0x1a, 0xba, 0x1a, 0x27, 0x1b, 0x0e, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x54, 0xff, 0xf4, 0x02, 0x04, 0x02, 0x10, 0x00, 0x22, + 0x00, 0x43, 0xba, 0x00, 0x11, 0x00, 0x23, 0x00, 0x24, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, + 0x00, 0x0a, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb8, + 0x00, 0x0a, 0x10, 0xb9, 0x00, 0x11, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x00, + 0x10, 0xb9, 0x00, 0x1c, 0x00, 0x08, 0xf4, 0x30, 0x31, 0x05, 0x22, 0x2e, + 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x17, 0x07, 0x2e, 0x01, + 0x23, 0x22, 0x0e, 0x02, 0x1d, 0x01, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x36, + 0x37, 0x17, 0x0e, 0x01, 0x01, 0x3e, 0x38, 0x57, 0x3c, 0x1f, 0x20, 0x3c, + 0x56, 0x37, 0x4b, 0x5e, 0x16, 0x40, 0x0e, 0x41, 0x30, 0x23, 0x37, 0x26, + 0x13, 0x13, 0x26, 0x38, 0x24, 0x34, 0x44, 0x14, 0x39, 0x17, 0x61, 0x0c, + 0x27, 0x46, 0x64, 0x3d, 0x3d, 0x64, 0x47, 0x26, 0x42, 0x35, 0x22, 0x28, + 0x2c, 0x17, 0x2a, 0x3a, 0x22, 0x58, 0x22, 0x3a, 0x2a, 0x17, 0x30, 0x2a, + 0x27, 0x34, 0x44, 0x00, 0x00, 0x02, 0x00, 0x3c, 0xff, 0xf4, 0x01, 0xf9, + 0x02, 0xe4, 0x00, 0x10, 0x00, 0x22, 0x00, 0x81, 0xba, 0x00, 0x11, 0x00, + 0x23, 0x00, 0x24, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x11, 0x10, 0xb8, 0x00, + 0x03, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0e, 0x2f, + 0x1b, 0xb9, 0x00, 0x0e, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x09, 0x2f, 0x1b, 0xb9, 0x00, 0x09, 0x00, 0x1b, 0x3e, + 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x03, 0x2f, 0x1b, 0xb9, + 0x00, 0x03, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x10, 0x2f, 0x1b, 0xb9, 0x00, 0x10, 0x00, 0x0f, 0x3e, 0x59, 0xb8, + 0x00, 0x03, 0x10, 0xb9, 0x00, 0x11, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x09, + 0x10, 0xb9, 0x00, 0x1c, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x01, 0x00, 0x11, + 0x00, 0x1c, 0x11, 0x12, 0x39, 0xba, 0x00, 0x0b, 0x00, 0x1c, 0x00, 0x11, + 0x11, 0x12, 0x39, 0x30, 0x31, 0x25, 0x23, 0x06, 0x23, 0x22, 0x26, 0x35, + 0x34, 0x36, 0x33, 0x32, 0x17, 0x33, 0x11, 0x33, 0x11, 0x23, 0x27, 0x32, + 0x3e, 0x02, 0x3d, 0x01, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x06, 0x1d, 0x01, + 0x14, 0x16, 0x01, 0xa9, 0x04, 0x32, 0x6d, 0x5f, 0x6b, 0x6b, 0x5f, 0x6d, + 0x32, 0x04, 0x50, 0x50, 0x84, 0x1b, 0x30, 0x24, 0x15, 0x15, 0x24, 0x30, + 0x1b, 0x46, 0x4d, 0x4d, 0x54, 0x60, 0x8e, 0x80, 0x80, 0x8e, 0x60, 0x01, + 0x34, 0xfd, 0x1c, 0x3b, 0x0e, 0x1b, 0x27, 0x1a, 0xba, 0x1a, 0x27, 0x1b, + 0x0e, 0x55, 0x46, 0x58, 0x46, 0x55, 0x00, 0x00, 0x00, 0x02, 0x00, 0x43, + 0xff, 0xf4, 0x02, 0x15, 0x02, 0x10, 0x00, 0x1d, 0x00, 0x2a, 0x00, 0x6b, + 0xba, 0x00, 0x1e, 0x00, 0x2b, 0x00, 0x2c, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x1e, 0x10, 0xb8, 0x00, 0x0a, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, 0x00, 0x1b, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, + 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x17, 0x00, 0x08, 0xf4, 0xb8, + 0x00, 0x0a, 0x10, 0xb9, 0x00, 0x1e, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x11, + 0x00, 0x17, 0x00, 0x1e, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x11, 0x2f, 0xb8, + 0x00, 0x10, 0xd0, 0xb8, 0x00, 0x1a, 0xd0, 0xb8, 0x00, 0x1a, 0x2f, 0xb8, + 0x00, 0x11, 0x10, 0xb9, 0x00, 0x24, 0x00, 0x08, 0xf4, 0x30, 0x31, 0x05, + 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x1d, + 0x01, 0x21, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x37, 0x17, 0x0e, + 0x01, 0x03, 0x22, 0x0e, 0x02, 0x1d, 0x01, 0x21, 0x35, 0x34, 0x2e, 0x02, + 0x01, 0x35, 0x38, 0x59, 0x3f, 0x22, 0x23, 0x3e, 0x57, 0x35, 0x34, 0x55, + 0x3c, 0x20, 0xfe, 0x82, 0x16, 0x29, 0x3b, 0x24, 0x34, 0x4c, 0x14, 0x3b, + 0x17, 0x6b, 0x52, 0x21, 0x38, 0x29, 0x17, 0x01, 0x28, 0x15, 0x25, 0x35, + 0x0c, 0x26, 0x47, 0x63, 0x3d, 0x3e, 0x64, 0x47, 0x26, 0x26, 0x43, 0x5c, + 0x37, 0x26, 0x18, 0x22, 0x3a, 0x2a, 0x17, 0x30, 0x2a, 0x28, 0x34, 0x43, + 0x01, 0xda, 0x18, 0x2a, 0x39, 0x22, 0x07, 0x0b, 0x22, 0x38, 0x29, 0x16, + 0x00, 0x01, 0x00, 0x49, 0x00, 0x00, 0x02, 0x20, 0x02, 0xe4, 0x00, 0x14, + 0x00, 0x72, 0xba, 0x00, 0x11, 0x00, 0x15, 0x00, 0x16, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x09, 0x2f, 0x1b, 0xb9, + 0x00, 0x09, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x04, 0x2f, 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x1b, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x14, 0x2f, 0x1b, 0xb9, 0x00, 0x14, + 0x00, 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x00, 0x00, 0x08, 0xf4, 0xb8, 0x00, + 0x04, 0x10, 0xb9, 0x00, 0x03, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x09, 0x10, + 0xb9, 0x00, 0x0c, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x04, 0x10, 0xb8, 0x00, + 0x0d, 0xd0, 0xb8, 0x00, 0x03, 0x10, 0xb8, 0x00, 0x10, 0xd0, 0xb8, 0x00, + 0x00, 0x10, 0xb8, 0x00, 0x11, 0xd0, 0x30, 0x31, 0x37, 0x33, 0x11, 0x23, + 0x35, 0x33, 0x35, 0x34, 0x36, 0x3b, 0x01, 0x15, 0x23, 0x15, 0x33, 0x15, + 0x23, 0x11, 0x33, 0x15, 0x21, 0x53, 0xae, 0xb8, 0xb8, 0x37, 0x3b, 0xad, + 0xcf, 0xcf, 0xcf, 0xb8, 0xfe, 0x4a, 0x44, 0x01, 0x7c, 0x44, 0x6a, 0x34, + 0x42, 0x44, 0x9c, 0x44, 0xfe, 0x84, 0x44, 0x00, 0x00, 0x03, 0x00, 0x43, + 0xff, 0x2c, 0x02, 0x31, 0x02, 0x4a, 0x00, 0x39, 0x00, 0x46, 0x00, 0x54, + 0x00, 0xc6, 0xba, 0x00, 0x03, 0x00, 0x55, 0x00, 0x56, 0x11, 0x12, 0x39, + 0xb8, 0x00, 0x03, 0x10, 0xb8, 0x00, 0x44, 0xd0, 0xb8, 0x00, 0x03, 0x10, + 0xb8, 0x00, 0x47, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x19, 0x2f, 0x1b, 0xb9, 0x00, 0x19, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x21, 0x2f, 0x1b, 0xb9, 0x00, 0x21, 0x00, + 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x03, 0x2f, + 0x1b, 0xb9, 0x00, 0x03, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x21, 0x10, + 0xb9, 0x00, 0x20, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x2b, 0x00, 0x03, 0x00, + 0x19, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x2b, 0x2f, 0x41, 0x03, 0x00, 0x10, + 0x00, 0x2b, 0x00, 0x01, 0x72, 0x41, 0x05, 0x00, 0x60, 0x00, 0x2b, 0x00, + 0x70, 0x00, 0x2b, 0x00, 0x02, 0x5d, 0xba, 0x00, 0x3d, 0x00, 0x03, 0x00, + 0x2b, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x3d, 0x2f, 0x41, 0x05, 0x00, 0x9f, + 0x00, 0x3d, 0x00, 0xaf, 0x00, 0x3d, 0x00, 0x02, 0x71, 0x41, 0x03, 0x00, + 0xd0, 0x00, 0x3d, 0x00, 0x01, 0x5d, 0xb9, 0x00, 0x37, 0x00, 0x0b, 0xf4, + 0xb8, 0x00, 0x03, 0x10, 0xb9, 0x00, 0x43, 0x00, 0x08, 0xf4, 0xb8, 0x00, + 0x2b, 0x10, 0xb9, 0x00, 0x47, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x19, 0x10, + 0xb9, 0x00, 0x4e, 0x00, 0x08, 0xf4, 0x30, 0x31, 0x05, 0x14, 0x06, 0x23, + 0x22, 0x26, 0x35, 0x34, 0x36, 0x37, 0x35, 0x2e, 0x01, 0x35, 0x34, 0x36, + 0x37, 0x35, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x17, 0x35, + 0x34, 0x36, 0x3b, 0x01, 0x15, 0x23, 0x15, 0x1e, 0x01, 0x15, 0x14, 0x0e, + 0x02, 0x23, 0x22, 0x26, 0x27, 0x0e, 0x03, 0x15, 0x14, 0x16, 0x3b, 0x01, + 0x32, 0x16, 0x07, 0x34, 0x26, 0x2b, 0x01, 0x06, 0x15, 0x14, 0x16, 0x3b, + 0x01, 0x32, 0x36, 0x03, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, + 0x06, 0x1d, 0x01, 0x14, 0x16, 0x02, 0x31, 0x82, 0x82, 0x7d, 0x6d, 0x2c, + 0x28, 0x16, 0x18, 0x35, 0x28, 0x30, 0x35, 0x1c, 0x35, 0x4a, 0x2d, 0x3a, + 0x2c, 0x1c, 0x22, 0x5f, 0x74, 0x1c, 0x1e, 0x1d, 0x34, 0x4b, 0x2d, 0x0d, + 0x18, 0x0c, 0x0c, 0x1a, 0x16, 0x0e, 0x2e, 0x25, 0x72, 0x64, 0x5a, 0x4b, + 0x32, 0x3e, 0xb3, 0x34, 0x36, 0x3f, 0x4e, 0x46, 0x4e, 0xbd, 0x3c, 0x39, + 0x39, 0x3c, 0x3c, 0x38, 0x38, 0x3b, 0x4e, 0x4b, 0x42, 0x3e, 0x2a, 0x2e, + 0x0b, 0x0c, 0x0b, 0x22, 0x1a, 0x28, 0x28, 0x0a, 0x04, 0x15, 0x52, 0x37, + 0x27, 0x42, 0x2f, 0x1a, 0x15, 0x09, 0x1e, 0x28, 0x46, 0x23, 0x18, 0x42, + 0x29, 0x27, 0x42, 0x2f, 0x1a, 0x02, 0x02, 0x02, 0x09, 0x0f, 0x14, 0x0d, + 0x17, 0x0f, 0x4b, 0x43, 0x1f, 0x25, 0x15, 0x31, 0x22, 0x31, 0x2b, 0x01, + 0x53, 0x38, 0x2e, 0x1d, 0x2e, 0x37, 0x37, 0x2e, 0x1d, 0x2e, 0x38, 0x00, + 0x00, 0x01, 0x00, 0x62, 0x00, 0x00, 0x01, 0xfc, 0x02, 0xe4, 0x00, 0x18, + 0x00, 0x6b, 0xba, 0x00, 0x11, 0x00, 0x19, 0x00, 0x1a, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, + 0x00, 0x01, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, 0x1b, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x17, 0x2f, 0x1b, 0xb9, 0x00, 0x17, + 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0c, + 0x2f, 0x1b, 0xb9, 0x00, 0x0c, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x08, + 0x10, 0xb9, 0x00, 0x11, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x02, 0x00, 0x11, + 0x00, 0x17, 0x11, 0x12, 0x39, 0x7d, 0xb8, 0x00, 0x02, 0x2f, 0x18, 0x30, + 0x31, 0x13, 0x33, 0x11, 0x33, 0x3e, 0x03, 0x33, 0x32, 0x16, 0x15, 0x11, + 0x23, 0x11, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x11, 0x23, 0x62, + 0x50, 0x04, 0x08, 0x18, 0x23, 0x30, 0x20, 0x51, 0x62, 0x50, 0x3e, 0x3c, + 0x18, 0x2e, 0x24, 0x16, 0x50, 0x02, 0xe4, 0xfe, 0xcc, 0x13, 0x23, 0x1a, + 0x10, 0x67, 0x5e, 0xfe, 0xb5, 0x01, 0x3d, 0x47, 0x45, 0x0c, 0x18, 0x26, + 0x19, 0xfe, 0x9a, 0x00, 0x00, 0x02, 0x00, 0x6a, 0x00, 0x00, 0x02, 0x22, + 0x02, 0xec, 0x00, 0x0d, 0x00, 0x17, 0x00, 0x63, 0xba, 0x00, 0x0f, 0x00, + 0x18, 0x00, 0x19, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0f, 0x10, 0xb8, 0x00, + 0x03, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x12, 0x2f, + 0x1b, 0xb9, 0x00, 0x12, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x17, 0x2f, 0x1b, 0xb9, 0x00, 0x17, 0x00, 0x0f, 0x3e, + 0x59, 0xb8, 0x00, 0x12, 0x10, 0xb9, 0x00, 0x00, 0x00, 0x07, 0xf4, 0xb9, + 0x00, 0x07, 0x00, 0x06, 0xf4, 0xb8, 0x00, 0x17, 0x10, 0xb9, 0x00, 0x0e, + 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x12, 0x10, 0xb9, 0x00, 0x11, 0x00, 0x08, + 0xf4, 0xb8, 0x00, 0x0e, 0x10, 0xb8, 0x00, 0x14, 0xd0, 0x30, 0x31, 0x01, + 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, + 0x06, 0x01, 0x33, 0x11, 0x23, 0x35, 0x21, 0x11, 0x33, 0x15, 0x21, 0x01, + 0x4c, 0x23, 0x1c, 0x1c, 0x23, 0x23, 0x1c, 0x1c, 0xfe, 0xfb, 0xba, 0xba, + 0x01, 0x0a, 0xae, 0xfe, 0x48, 0x02, 0x76, 0x1d, 0x16, 0x10, 0x16, 0x1d, + 0x1d, 0x16, 0x10, 0x16, 0x1d, 0xfd, 0xce, 0x01, 0x7c, 0x44, 0xfe, 0x40, + 0x44, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5d, 0xff, 0x38, 0x01, 0xc7, + 0x02, 0xec, 0x00, 0x0a, 0x00, 0x18, 0x00, 0x57, 0xba, 0x00, 0x09, 0x00, + 0x19, 0x00, 0x1a, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x09, 0x10, 0xb8, 0x00, + 0x0e, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x04, 0x2f, + 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, 0x00, 0x11, 0x3e, + 0x59, 0xb9, 0x00, 0x00, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x04, 0x10, 0xb9, + 0x00, 0x03, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x04, 0x10, 0xb9, 0x00, 0x0b, + 0x00, 0x07, 0xf4, 0xb9, 0x00, 0x12, 0x00, 0x06, 0xf4, 0x30, 0x31, 0x17, + 0x33, 0x11, 0x21, 0x35, 0x21, 0x11, 0x14, 0x06, 0x2b, 0x01, 0x01, 0x22, + 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, + 0x66, 0xfa, 0xfe, 0xfd, 0x01, 0x53, 0x37, 0x3b, 0xd8, 0x01, 0x22, 0x23, + 0x1c, 0x1c, 0x23, 0x23, 0x1c, 0x1c, 0x84, 0x02, 0x44, 0x44, 0xfd, 0xaa, + 0x34, 0x42, 0x03, 0x3e, 0x1d, 0x16, 0x10, 0x16, 0x1d, 0x1d, 0x16, 0x10, + 0x16, 0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x69, 0x00, 0x00, 0x02, 0x3e, + 0x02, 0xe4, 0x00, 0x0d, 0x00, 0x63, 0xba, 0x00, 0x04, 0x00, 0x0e, 0x00, + 0x0f, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, + 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x09, 0x2f, + 0x1b, 0xb9, 0x00, 0x09, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x0d, 0x2f, 0x1b, 0xb9, 0x00, 0x0d, 0x00, 0x0f, 0x3e, + 0x59, 0xba, 0x00, 0x02, 0x00, 0x05, 0x00, 0x0d, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x02, 0x10, 0xb8, 0x00, 0x0b, 0xd0, 0x30, 0x31, 0x13, 0x33, 0x11, + 0x33, 0x3f, 0x01, 0x33, 0x07, 0x13, 0x23, 0x03, 0x07, 0x15, 0x23, 0x69, + 0x50, 0x04, 0x5a, 0xac, 0x62, 0xd6, 0xef, 0x63, 0xc9, 0x59, 0x50, 0x02, + 0xe4, 0xfe, 0x2d, 0x55, 0x9e, 0xca, 0xfe, 0xc6, 0x01, 0x0c, 0x51, 0xbb, + 0x00, 0x01, 0x00, 0x50, 0x00, 0x00, 0x02, 0x08, 0x02, 0xe4, 0x00, 0x09, + 0x00, 0x47, 0xba, 0x00, 0x01, 0x00, 0x0a, 0x00, 0x0b, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x04, 0x2f, 0x1b, 0xb9, + 0x00, 0x04, 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x09, 0x2f, 0x1b, 0xb9, 0x00, 0x09, 0x00, 0x0f, 0x3e, 0x59, 0xb9, + 0x00, 0x00, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x04, 0x10, 0xb9, 0x00, 0x03, + 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, 0x06, 0xd0, 0x30, + 0x31, 0x37, 0x33, 0x11, 0x23, 0x35, 0x21, 0x11, 0x33, 0x15, 0x21, 0x50, + 0xb4, 0xb4, 0x01, 0x04, 0xb4, 0xfe, 0x48, 0x44, 0x02, 0x5c, 0x44, 0xfd, + 0x60, 0x44, 0x00, 0x00, 0x00, 0x01, 0x00, 0x36, 0x00, 0x00, 0x02, 0x22, + 0x02, 0x10, 0x00, 0x24, 0x00, 0xa7, 0xba, 0x00, 0x0a, 0x00, 0x25, 0x00, + 0x26, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x07, 0x2f, 0x1b, 0xb9, 0x00, 0x07, 0x00, + 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0e, 0x2f, + 0x1b, 0xb9, 0x00, 0x0e, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, + 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x1c, 0x2f, 0x1b, 0xb9, + 0x00, 0x1c, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x13, 0x2f, 0x1b, 0xb9, 0x00, 0x13, 0x00, 0x0f, 0x3e, 0x59, 0xb8, + 0x00, 0x07, 0x10, 0xb9, 0x00, 0x20, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x03, + 0x00, 0x20, 0x00, 0x00, 0x11, 0x12, 0x39, 0x7d, 0xb8, 0x00, 0x03, 0x2f, + 0x18, 0xb8, 0x00, 0x0e, 0x10, 0xb9, 0x00, 0x17, 0x00, 0x08, 0xf4, 0xba, + 0x00, 0x0a, 0x00, 0x17, 0x00, 0x1c, 0x11, 0x12, 0x39, 0x7d, 0xb8, 0x00, + 0x0a, 0x2f, 0x18, 0x30, 0x31, 0x33, 0x11, 0x33, 0x15, 0x33, 0x3e, 0x01, + 0x33, 0x32, 0x16, 0x17, 0x33, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x11, + 0x23, 0x11, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x11, 0x23, 0x11, 0x34, + 0x26, 0x23, 0x22, 0x06, 0x15, 0x11, 0x36, 0x4a, 0x04, 0x0c, 0x2c, 0x2b, + 0x2d, 0x2c, 0x05, 0x03, 0x0e, 0x34, 0x2e, 0x3f, 0x2b, 0x4a, 0x1b, 0x24, + 0x20, 0x28, 0x4a, 0x1b, 0x23, 0x20, 0x29, 0x02, 0x04, 0x3c, 0x1e, 0x2a, + 0x2d, 0x24, 0x23, 0x2e, 0x58, 0x52, 0xfe, 0x9a, 0x01, 0x59, 0x42, 0x33, + 0x29, 0x2a, 0xfe, 0x85, 0x01, 0x59, 0x42, 0x33, 0x29, 0x2a, 0xfe, 0x85, + 0x00, 0x01, 0x00, 0x62, 0x00, 0x00, 0x01, 0xfc, 0x02, 0x10, 0x00, 0x18, + 0x00, 0x6b, 0xba, 0x00, 0x12, 0x00, 0x19, 0x00, 0x1a, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, + 0x00, 0x01, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x09, 0x2f, 0x1b, 0xb9, 0x00, 0x09, 0x00, 0x1b, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, + 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0e, + 0x2f, 0x1b, 0xb9, 0x00, 0x0e, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x09, + 0x10, 0xb9, 0x00, 0x12, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x03, 0x00, 0x12, + 0x00, 0x00, 0x11, 0x12, 0x39, 0x7d, 0xb8, 0x00, 0x03, 0x2f, 0x18, 0x30, + 0x31, 0x33, 0x11, 0x33, 0x15, 0x33, 0x3e, 0x03, 0x33, 0x32, 0x16, 0x15, + 0x11, 0x23, 0x11, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x11, 0x62, + 0x50, 0x04, 0x08, 0x18, 0x23, 0x30, 0x20, 0x51, 0x62, 0x50, 0x3e, 0x3c, + 0x18, 0x2e, 0x24, 0x16, 0x02, 0x04, 0x54, 0x13, 0x23, 0x1a, 0x10, 0x67, + 0x5e, 0xfe, 0xb5, 0x01, 0x3d, 0x47, 0x45, 0x0c, 0x18, 0x26, 0x19, 0xfe, + 0x9a, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x42, 0xff, 0xf4, 0x02, 0x16, + 0x02, 0x10, 0x00, 0x13, 0x00, 0x21, 0x00, 0x43, 0xba, 0x00, 0x00, 0x00, + 0x22, 0x00, 0x23, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x14, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, + 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, + 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x14, + 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x0a, 0x10, 0xb9, 0x00, 0x1b, 0x00, 0x08, + 0xf4, 0x30, 0x31, 0x05, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, + 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, 0x36, 0x3d, 0x01, + 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x2c, 0x36, + 0x57, 0x3d, 0x20, 0x20, 0x3d, 0x57, 0x36, 0x36, 0x57, 0x3d, 0x20, 0x20, + 0x3d, 0x57, 0x36, 0x43, 0x52, 0x52, 0x43, 0x43, 0x52, 0x52, 0x0c, 0x26, + 0x47, 0x63, 0x3e, 0x3d, 0x64, 0x47, 0x26, 0x26, 0x47, 0x64, 0x3d, 0x3e, + 0x63, 0x47, 0x26, 0x45, 0x50, 0x54, 0x4a, 0x54, 0x50, 0x50, 0x54, 0x4a, + 0x54, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5f, 0xff, 0x38, 0x02, 0x1c, + 0x02, 0x10, 0x00, 0x10, 0x00, 0x22, 0x00, 0x81, 0xba, 0x00, 0x11, 0x00, + 0x23, 0x00, 0x24, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x11, 0x10, 0xb8, 0x00, + 0x0b, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, + 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1b, 0x3e, + 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x10, 0x2f, 0x1b, 0xb9, + 0x00, 0x10, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x0b, 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, 0x0f, 0x3e, 0x59, 0xb8, + 0x00, 0x05, 0x10, 0xb9, 0x00, 0x18, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x0b, + 0x10, 0xb9, 0x00, 0x11, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x02, 0x00, 0x18, + 0x00, 0x11, 0x11, 0x12, 0x39, 0xba, 0x00, 0x0e, 0x00, 0x11, 0x00, 0x18, + 0x11, 0x12, 0x39, 0x30, 0x31, 0x13, 0x33, 0x15, 0x33, 0x36, 0x33, 0x32, + 0x16, 0x15, 0x14, 0x06, 0x23, 0x22, 0x27, 0x23, 0x11, 0x23, 0x13, 0x32, + 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x1d, 0x01, 0x14, + 0x1e, 0x02, 0x5f, 0x50, 0x04, 0x32, 0x6d, 0x5f, 0x6b, 0x6b, 0x5f, 0x6d, + 0x32, 0x04, 0x50, 0xd4, 0x46, 0x4d, 0x4d, 0x46, 0x1b, 0x30, 0x24, 0x15, + 0x15, 0x24, 0x30, 0x02, 0x04, 0x54, 0x60, 0x8e, 0x80, 0x80, 0x8e, 0x60, + 0xfe, 0xe4, 0x01, 0x03, 0x55, 0x46, 0x58, 0x46, 0x55, 0x0e, 0x1b, 0x27, + 0x1a, 0xba, 0x1a, 0x27, 0x1b, 0x0e, 0x00, 0x00, 0x00, 0x02, 0x00, 0x3c, + 0xff, 0x38, 0x01, 0xf9, 0x02, 0x10, 0x00, 0x10, 0x00, 0x22, 0x00, 0x81, + 0xba, 0x00, 0x11, 0x00, 0x23, 0x00, 0x24, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x11, 0x10, 0xb8, 0x00, 0x03, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x0d, 0x2f, 0x1b, 0xb9, 0x00, 0x0d, 0x00, 0x1b, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x09, 0x2f, 0x1b, 0xb9, 0x00, + 0x09, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x03, 0x2f, 0x1b, 0xb9, 0x00, 0x03, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x10, 0x2f, 0x1b, 0xb9, 0x00, 0x10, 0x00, + 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x03, 0x10, 0xb9, 0x00, 0x11, 0x00, 0x08, + 0xf4, 0xb8, 0x00, 0x09, 0x10, 0xb9, 0x00, 0x1c, 0x00, 0x08, 0xf4, 0xba, + 0x00, 0x00, 0x00, 0x11, 0x00, 0x1c, 0x11, 0x12, 0x39, 0xba, 0x00, 0x0c, + 0x00, 0x1c, 0x00, 0x11, 0x11, 0x12, 0x39, 0x30, 0x31, 0x25, 0x23, 0x06, + 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x17, 0x33, 0x35, 0x33, + 0x11, 0x23, 0x03, 0x32, 0x3e, 0x02, 0x3d, 0x01, 0x34, 0x2e, 0x02, 0x23, + 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0xa9, 0x04, 0x32, 0x6d, 0x5f, + 0x6b, 0x6b, 0x5f, 0x6d, 0x32, 0x04, 0x50, 0x50, 0x84, 0x1b, 0x30, 0x24, + 0x15, 0x15, 0x24, 0x30, 0x1b, 0x46, 0x4d, 0x4d, 0x54, 0x60, 0x8e, 0x80, + 0x80, 0x8e, 0x60, 0x54, 0xfd, 0x34, 0x01, 0x03, 0x0e, 0x1b, 0x27, 0x1a, + 0xba, 0x1a, 0x27, 0x1b, 0x0e, 0x55, 0x46, 0x58, 0x46, 0x55, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x4d, 0x00, 0x00, 0x02, 0x2f, 0x02, 0x04, 0x00, 0x14, + 0x00, 0x72, 0xba, 0x00, 0x11, 0x00, 0x15, 0x00, 0x16, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x04, 0x2f, 0x1b, 0xb9, + 0x00, 0x04, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, 0x00, 0x1b, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x14, 0x2f, 0x1b, 0xb9, 0x00, 0x14, + 0x00, 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x00, 0x00, 0x08, 0xf4, 0xb8, 0x00, + 0x04, 0x10, 0xb9, 0x00, 0x03, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x0a, 0x10, + 0xb9, 0x00, 0x0d, 0x00, 0x0b, 0xf4, 0xba, 0x00, 0x06, 0x00, 0x0d, 0x00, + 0x00, 0x11, 0x12, 0x39, 0x7d, 0xb8, 0x00, 0x06, 0x2f, 0x18, 0xb8, 0x00, + 0x00, 0x10, 0xb8, 0x00, 0x11, 0xd0, 0x30, 0x31, 0x37, 0x33, 0x11, 0x23, + 0x35, 0x33, 0x15, 0x33, 0x3e, 0x01, 0x3b, 0x01, 0x15, 0x23, 0x22, 0x06, + 0x1d, 0x01, 0x33, 0x15, 0x21, 0x4d, 0x97, 0x97, 0xe7, 0x05, 0x10, 0x59, + 0x45, 0x48, 0x61, 0x45, 0x55, 0xc8, 0xfe, 0x51, 0x44, 0x01, 0x7c, 0x44, + 0x82, 0x3d, 0x45, 0x50, 0x50, 0x41, 0xdf, 0x44, 0x00, 0x01, 0x00, 0x43, + 0xff, 0xf4, 0x02, 0x0c, 0x02, 0x10, 0x00, 0x33, 0x00, 0x6b, 0xba, 0x00, + 0x23, 0x00, 0x34, 0x00, 0x35, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x1a, 0x2f, 0x1b, 0xb9, 0x00, 0x1a, 0x00, 0x1b, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x1a, 0x10, 0xb9, + 0x00, 0x23, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x10, 0x00, 0x23, 0x00, 0x00, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x07, 0x00, 0x08, + 0xf4, 0xba, 0x00, 0x04, 0x00, 0x10, 0x00, 0x07, 0x11, 0x12, 0x39, 0xba, + 0x00, 0x2b, 0x00, 0x07, 0x00, 0x1a, 0x11, 0x12, 0x39, 0xba, 0x00, 0x1e, + 0x00, 0x23, 0x00, 0x2b, 0x11, 0x12, 0x39, 0x30, 0x31, 0x05, 0x22, 0x26, + 0x27, 0x37, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x35, 0x34, 0x2e, 0x02, 0x2f, + 0x01, 0x2e, 0x03, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x17, 0x07, + 0x2e, 0x03, 0x23, 0x22, 0x06, 0x15, 0x14, 0x1e, 0x02, 0x1f, 0x01, 0x1e, + 0x03, 0x15, 0x14, 0x06, 0x01, 0x32, 0x51, 0x75, 0x29, 0x36, 0x25, 0x58, + 0x3e, 0x3c, 0x4d, 0x0f, 0x1a, 0x20, 0x12, 0x51, 0x1b, 0x3f, 0x34, 0x23, + 0x1f, 0x38, 0x4c, 0x2d, 0x46, 0x67, 0x25, 0x34, 0x09, 0x1b, 0x27, 0x34, + 0x22, 0x3d, 0x41, 0x0f, 0x1a, 0x21, 0x11, 0x51, 0x1c, 0x3e, 0x34, 0x23, + 0x77, 0x0c, 0x37, 0x2e, 0x2f, 0x27, 0x2a, 0x2b, 0x2e, 0x14, 0x1b, 0x10, + 0x09, 0x03, 0x0c, 0x04, 0x0e, 0x1f, 0x34, 0x2a, 0x27, 0x39, 0x27, 0x13, + 0x2c, 0x27, 0x31, 0x0b, 0x17, 0x13, 0x0c, 0x2a, 0x28, 0x14, 0x1b, 0x10, + 0x09, 0x03, 0x0c, 0x04, 0x0e, 0x1f, 0x34, 0x2a, 0x4d, 0x54, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x27, 0x00, 0x00, 0x02, 0x0e, 0x02, 0xba, 0x00, 0x13, + 0x00, 0x64, 0xba, 0x00, 0x11, 0x00, 0x14, 0x00, 0x15, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0b, 0x2f, 0x1b, 0xb9, + 0x00, 0x0b, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, 0x1b, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, + 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x06, 0x10, 0xb9, 0x00, 0x05, 0x00, + 0x08, 0xf4, 0xb8, 0x00, 0x06, 0x10, 0xb8, 0x00, 0x0d, 0xd0, 0xb8, 0x00, + 0x05, 0x10, 0xb8, 0x00, 0x10, 0xd0, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, + 0x11, 0x00, 0x08, 0xf4, 0x30, 0x31, 0x21, 0x22, 0x26, 0x35, 0x11, 0x23, + 0x35, 0x33, 0x32, 0x36, 0x3d, 0x01, 0x33, 0x15, 0x33, 0x15, 0x23, 0x11, + 0x33, 0x15, 0x01, 0x45, 0x3b, 0x37, 0xac, 0x80, 0x1a, 0x15, 0x4d, 0xeb, + 0xeb, 0xeb, 0x42, 0x34, 0x01, 0x4a, 0x44, 0x15, 0x1a, 0x87, 0xb6, 0x44, + 0xfe, 0x84, 0x44, 0x00, 0x00, 0x01, 0x00, 0x5c, 0xff, 0xf4, 0x01, 0xf6, + 0x02, 0x04, 0x00, 0x18, 0x00, 0x69, 0xba, 0x00, 0x0f, 0x00, 0x19, 0x00, + 0x1a, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x15, 0x2f, 0x1b, 0xb9, 0x00, 0x15, 0x00, + 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x06, 0x2f, + 0x1b, 0xb9, 0x00, 0x06, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x18, 0x2f, 0x1b, 0xb9, 0x00, 0x18, 0x00, 0x0f, 0x3e, + 0x59, 0xb8, 0x00, 0x06, 0x10, 0xb9, 0x00, 0x0f, 0x00, 0x08, 0xf4, 0xba, + 0x00, 0x00, 0x00, 0x0f, 0x00, 0x0a, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x00, + 0x2f, 0x30, 0x31, 0x25, 0x23, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x35, 0x11, + 0x33, 0x11, 0x14, 0x16, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x11, 0x33, 0x11, + 0x23, 0x01, 0xa6, 0x04, 0x08, 0x18, 0x23, 0x30, 0x20, 0x51, 0x62, 0x50, + 0x3e, 0x3c, 0x18, 0x2e, 0x24, 0x16, 0x50, 0x50, 0x54, 0x13, 0x23, 0x1a, + 0x10, 0x67, 0x5e, 0x01, 0x4b, 0xfe, 0xc3, 0x47, 0x45, 0x0c, 0x18, 0x25, + 0x1a, 0x01, 0x66, 0xfd, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x40, + 0x00, 0x00, 0x02, 0x18, 0x02, 0x04, 0x00, 0x09, 0x00, 0x44, 0xba, 0x00, + 0x04, 0x00, 0x0a, 0x00, 0x0b, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1b, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, 0x1b, + 0xb9, 0x00, 0x08, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, + 0xb8, 0x00, 0x05, 0xd0, 0x30, 0x31, 0x33, 0x03, 0x33, 0x1f, 0x01, 0x33, + 0x3f, 0x01, 0x33, 0x03, 0xf9, 0xb9, 0x51, 0x4a, 0x50, 0x04, 0x50, 0x4a, + 0x4f, 0xb9, 0x02, 0x04, 0xd8, 0xe9, 0xe9, 0xd8, 0xfd, 0xfc, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x1e, 0x00, 0x00, 0x02, 0x3a, 0x02, 0x04, 0x00, 0x0f, + 0x00, 0x7a, 0xba, 0x00, 0x0d, 0x00, 0x10, 0x00, 0x11, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, + 0x00, 0x00, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x04, 0x2f, 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x1b, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, + 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0f, + 0x2f, 0x1b, 0xb9, 0x00, 0x0f, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x0b, 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, 0x0f, + 0x3e, 0x59, 0xb8, 0x00, 0x0f, 0x10, 0xb8, 0x00, 0x02, 0xd0, 0xb8, 0x00, + 0x02, 0x2f, 0xb8, 0x00, 0x06, 0xd0, 0xb8, 0x00, 0x04, 0x10, 0xb8, 0x00, + 0x0d, 0xd0, 0x30, 0x31, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, 0x13, 0x33, + 0x13, 0x33, 0x03, 0x23, 0x03, 0x23, 0x03, 0x23, 0x1e, 0x47, 0x3b, 0x09, + 0x58, 0x58, 0x58, 0x09, 0x3b, 0x45, 0x4f, 0x68, 0x52, 0x08, 0x54, 0x68, + 0x02, 0x04, 0xfe, 0x42, 0x01, 0xbe, 0xfe, 0x42, 0x01, 0xbe, 0xfd, 0xfc, + 0x01, 0xb0, 0xfe, 0x50, 0x00, 0x01, 0x00, 0x3d, 0x00, 0x00, 0x02, 0x1c, + 0x02, 0x04, 0x00, 0x11, 0x00, 0x77, 0xba, 0x00, 0x0e, 0x00, 0x12, 0x00, + 0x13, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x02, 0x2f, 0x1b, 0xb9, 0x00, 0x02, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, + 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, + 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x0c, 0x2f, 0x1b, 0xb9, 0x00, 0x0c, 0x00, 0x0f, 0x3e, + 0x59, 0xba, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x11, 0x12, 0x39, 0xba, + 0x00, 0x0e, 0x00, 0x08, 0x00, 0x0c, 0x11, 0x12, 0x39, 0xba, 0x00, 0x01, + 0x00, 0x05, 0x00, 0x0e, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x01, 0x10, 0xb8, + 0x00, 0x0a, 0xd0, 0x30, 0x31, 0x33, 0x13, 0x27, 0x33, 0x1f, 0x01, 0x33, + 0x3f, 0x01, 0x33, 0x07, 0x13, 0x23, 0x2f, 0x01, 0x23, 0x0f, 0x01, 0x3d, + 0xc0, 0xbb, 0x60, 0x4e, 0x3e, 0x04, 0x3c, 0x4d, 0x5c, 0xbd, 0xc2, 0x60, + 0x57, 0x3b, 0x04, 0x39, 0x54, 0x01, 0x06, 0xfe, 0x6d, 0x56, 0x56, 0x6d, + 0xfd, 0xfe, 0xf9, 0x79, 0x52, 0x52, 0x79, 0x00, 0x00, 0x01, 0x00, 0x35, + 0xff, 0x38, 0x02, 0x23, 0x02, 0x04, 0x00, 0x11, 0x00, 0x58, 0xba, 0x00, + 0x0f, 0x00, 0x12, 0x00, 0x13, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x0c, 0x2f, 0x1b, 0xb9, 0x00, 0x0c, 0x00, 0x1b, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x08, 0x2f, 0x1b, 0xb9, 0x00, 0x08, 0x00, 0x11, 0x3e, 0x59, + 0xb9, 0x00, 0x09, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x0f, 0x00, 0x0c, 0x00, + 0x08, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0f, 0x10, 0xb8, 0x00, 0x0b, 0xd0, + 0x30, 0x31, 0x01, 0x33, 0x01, 0x0e, 0x03, 0x2b, 0x01, 0x35, 0x33, 0x37, + 0x03, 0x33, 0x1f, 0x01, 0x33, 0x37, 0x01, 0xd3, 0x50, 0xff, 0x00, 0x09, + 0x16, 0x1e, 0x2a, 0x1d, 0x4c, 0x78, 0x3a, 0xd0, 0x52, 0x57, 0x4d, 0x04, + 0x4d, 0x02, 0x04, 0xfd, 0x8b, 0x16, 0x21, 0x15, 0x0b, 0x44, 0x8e, 0x01, + 0xfa, 0xd8, 0xc4, 0xc4, 0x00, 0x01, 0x00, 0x55, 0x00, 0x00, 0x02, 0x03, + 0x02, 0x04, 0x00, 0x09, 0x00, 0x53, 0xba, 0x00, 0x02, 0x00, 0x0a, 0x00, + 0x0b, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x04, 0x2f, 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x09, 0x2f, 0x1b, 0xb9, 0x00, 0x09, 0x00, + 0x0f, 0x3e, 0x59, 0xb9, 0x00, 0x08, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x04, + 0x10, 0xb9, 0x00, 0x03, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x01, 0x00, 0x08, + 0x00, 0x03, 0x11, 0x12, 0x39, 0xba, 0x00, 0x06, 0x00, 0x03, 0x00, 0x08, + 0x11, 0x12, 0x39, 0x30, 0x31, 0x33, 0x35, 0x01, 0x21, 0x35, 0x21, 0x15, + 0x01, 0x21, 0x15, 0x55, 0x01, 0x4d, 0xfe, 0xbe, 0x01, 0x99, 0xfe, 0xb3, + 0x01, 0x57, 0x4d, 0x01, 0x73, 0x44, 0x4d, 0xfe, 0x8d, 0x44, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x69, 0xff, 0x76, 0x01, 0xef, 0x02, 0xf8, 0x00, 0x3b, + 0x00, 0x47, 0xba, 0x00, 0x38, 0x00, 0x3c, 0x00, 0x3d, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x21, 0x2f, 0xb8, 0x00, 0x00, 0x2f, 0xb8, 0x00, 0x21, + 0x10, 0xb9, 0x00, 0x24, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x0f, 0x00, 0x24, + 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0f, 0x2f, 0xb9, 0x00, 0x12, + 0x00, 0x08, 0xf4, 0xba, 0x00, 0x2e, 0x00, 0x12, 0x00, 0x0f, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x39, 0x00, 0x08, 0xf4, 0x30, + 0x31, 0x05, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x01, + 0x35, 0x34, 0x26, 0x2b, 0x01, 0x35, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, + 0x27, 0x2e, 0x03, 0x3d, 0x01, 0x34, 0x36, 0x3b, 0x01, 0x15, 0x23, 0x15, + 0x14, 0x16, 0x17, 0x1e, 0x01, 0x15, 0x14, 0x06, 0x07, 0x15, 0x1e, 0x01, + 0x15, 0x14, 0x06, 0x07, 0x0e, 0x01, 0x1d, 0x01, 0x33, 0x15, 0x01, 0x3f, + 0x2a, 0x2a, 0x0b, 0x10, 0x14, 0x09, 0x11, 0x0d, 0x46, 0x44, 0x4e, 0x4e, + 0x44, 0x46, 0x0d, 0x11, 0x09, 0x14, 0x10, 0x0b, 0x2a, 0x2a, 0xb0, 0xbf, + 0x18, 0x10, 0x11, 0x1e, 0x3b, 0x33, 0x33, 0x3b, 0x1e, 0x11, 0x10, 0x18, + 0xbf, 0x8a, 0x2f, 0x23, 0x3f, 0x1b, 0x28, 0x20, 0x19, 0x0b, 0x14, 0x1d, + 0x10, 0x26, 0x23, 0x3e, 0x23, 0x26, 0x10, 0x1d, 0x14, 0x0b, 0x19, 0x1f, + 0x29, 0x1b, 0x3f, 0x23, 0x2f, 0x3e, 0x4d, 0x29, 0x2c, 0x15, 0x16, 0x2f, + 0x20, 0x2a, 0x34, 0x07, 0x04, 0x07, 0x34, 0x2a, 0x20, 0x2f, 0x16, 0x15, + 0x2c, 0x29, 0x4d, 0x3e, 0x00, 0x01, 0x01, 0x09, 0xff, 0x76, 0x01, 0x4f, + 0x02, 0xf8, 0x00, 0x03, 0x00, 0x15, 0xba, 0x00, 0x00, 0x00, 0x04, 0x00, + 0x05, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x01, 0x2f, 0xb8, 0x00, 0x00, + 0x2f, 0x30, 0x31, 0x05, 0x11, 0x33, 0x11, 0x01, 0x09, 0x46, 0x8a, 0x03, + 0x82, 0xfc, 0x7e, 0x00, 0x00, 0x01, 0x00, 0x69, 0xff, 0x76, 0x01, 0xef, + 0x02, 0xf8, 0x00, 0x3b, 0x00, 0x47, 0xba, 0x00, 0x25, 0x00, 0x3c, 0x00, + 0x3d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x3b, 0x2f, 0xb8, 0x00, 0x22, + 0x2f, 0xb8, 0x00, 0x3b, 0x10, 0xb9, 0x00, 0x3a, 0x00, 0x08, 0xf4, 0xba, + 0x00, 0x12, 0x00, 0x3a, 0x00, 0x22, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x12, + 0x2f, 0xb9, 0x00, 0x0f, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x22, 0x10, 0xb9, + 0x00, 0x23, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x2e, 0x00, 0x0f, 0x00, 0x12, + 0x11, 0x12, 0x39, 0x30, 0x31, 0x01, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x0e, + 0x02, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x16, 0x3b, 0x01, 0x15, 0x23, 0x22, + 0x06, 0x15, 0x14, 0x16, 0x17, 0x1e, 0x03, 0x1d, 0x01, 0x14, 0x06, 0x2b, + 0x01, 0x35, 0x33, 0x35, 0x34, 0x26, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, + 0x37, 0x35, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x01, 0x3d, 0x01, + 0x23, 0x35, 0x01, 0x19, 0x2a, 0x2a, 0x0b, 0x10, 0x14, 0x09, 0x11, 0x0d, + 0x46, 0x44, 0x4e, 0x4e, 0x44, 0x46, 0x0d, 0x11, 0x09, 0x14, 0x10, 0x0b, + 0x2a, 0x2a, 0xb0, 0xbf, 0x18, 0x10, 0x11, 0x1e, 0x3b, 0x33, 0x33, 0x3b, + 0x1e, 0x11, 0x10, 0x18, 0xbf, 0x02, 0xf8, 0x2f, 0x23, 0x3f, 0x1b, 0x29, + 0x1f, 0x19, 0x0b, 0x14, 0x1d, 0x10, 0x26, 0x23, 0x3e, 0x23, 0x26, 0x10, + 0x1d, 0x14, 0x0b, 0x19, 0x20, 0x28, 0x1b, 0x3f, 0x23, 0x2f, 0x3e, 0x4d, + 0x29, 0x2c, 0x15, 0x16, 0x2f, 0x20, 0x2a, 0x34, 0x07, 0x04, 0x07, 0x34, + 0x2a, 0x20, 0x2f, 0x16, 0x15, 0x2c, 0x29, 0x4d, 0x3e, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x34, 0x00, 0xc5, 0x02, 0x24, 0x01, 0x9d, 0x00, 0x19, + 0x00, 0x49, 0xba, 0x00, 0x10, 0x00, 0x1a, 0x00, 0x1b, 0x11, 0x12, 0x39, + 0x00, 0xbb, 0x00, 0x06, 0x00, 0x08, 0x00, 0x0d, 0x00, 0x04, 0x2b, 0xb8, + 0x00, 0x06, 0x10, 0xb8, 0x00, 0x00, 0xdc, 0xba, 0x00, 0x09, 0x00, 0x06, + 0x00, 0x00, 0x11, 0x12, 0x39, 0x7d, 0xb8, 0x00, 0x09, 0x2f, 0x18, 0xb8, + 0x00, 0x00, 0x10, 0xb9, 0x00, 0x13, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x16, + 0x00, 0x0d, 0x00, 0x13, 0x11, 0x12, 0x39, 0x7c, 0xb8, 0x00, 0x16, 0x2f, + 0x18, 0x30, 0x31, 0x25, 0x22, 0x26, 0x27, 0x2e, 0x01, 0x23, 0x22, 0x06, + 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x01, 0x33, 0x3e, + 0x01, 0x37, 0x17, 0x0e, 0x01, 0x01, 0x92, 0x26, 0x35, 0x1d, 0x1a, 0x28, + 0x13, 0x1d, 0x27, 0x10, 0x3d, 0x11, 0x46, 0x3b, 0x26, 0x34, 0x1c, 0x1c, + 0x28, 0x13, 0x21, 0x26, 0x0d, 0x3d, 0x16, 0x48, 0xc5, 0x2b, 0x22, 0x22, + 0x26, 0x3e, 0x4d, 0x0e, 0x5c, 0x64, 0x2a, 0x21, 0x24, 0x26, 0x01, 0x4b, + 0x3f, 0x0e, 0x6b, 0x55, 0x00, 0x02, 0x00, 0xe2, 0xff, 0x4a, 0x01, 0x76, + 0x02, 0x0d, 0x00, 0x05, 0x00, 0x13, 0x00, 0x32, 0xba, 0x00, 0x06, 0x00, + 0x14, 0x00, 0x15, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x06, 0x10, 0xb8, 0x00, + 0x02, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0d, 0x2f, + 0x1b, 0xb9, 0x00, 0x0d, 0x00, 0x1b, 0x3e, 0x59, 0xb9, 0x00, 0x06, 0x00, + 0x09, 0xf4, 0xb9, 0x00, 0x03, 0x00, 0x07, 0xf4, 0x30, 0x31, 0x05, 0x35, + 0x13, 0x33, 0x13, 0x15, 0x03, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, + 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x01, 0x00, 0x1c, 0x20, 0x1c, 0x2c, + 0x29, 0x21, 0x21, 0x29, 0x29, 0x21, 0x21, 0xb6, 0xcb, 0x01, 0x06, 0xfe, + 0xfa, 0xcb, 0x02, 0x39, 0x22, 0x1a, 0x12, 0x1a, 0x22, 0x22, 0x1a, 0x12, + 0x1a, 0x22, 0x00, 0x00, 0x00, 0x02, 0x00, 0x54, 0xff, 0x8e, 0x02, 0x04, + 0x02, 0x76, 0x00, 0x1a, 0x00, 0x22, 0x00, 0x73, 0xba, 0x00, 0x1e, 0x00, + 0x23, 0x00, 0x24, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x1e, 0x10, 0xb8, 0x00, + 0x01, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x07, 0x2f, + 0x1b, 0xb9, 0x00, 0x07, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x0f, 0x3e, + 0x59, 0xb8, 0x00, 0x07, 0x10, 0xb8, 0x00, 0x09, 0xdc, 0xb8, 0x00, 0x07, + 0x10, 0xb8, 0x00, 0x0a, 0xd0, 0xb8, 0x00, 0x07, 0x10, 0xb9, 0x00, 0x1f, + 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x11, 0xd0, 0xb8, 0x00, 0x01, 0x10, 0xb9, + 0x00, 0x1e, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x12, 0xd0, 0xb8, 0x00, 0x01, + 0x10, 0xb8, 0x00, 0x19, 0xd0, 0xb8, 0x00, 0x01, 0x10, 0xb8, 0x00, 0x1a, + 0xdc, 0x30, 0x31, 0x05, 0x35, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x35, + 0x33, 0x15, 0x1e, 0x01, 0x17, 0x07, 0x2e, 0x01, 0x27, 0x11, 0x3e, 0x01, + 0x37, 0x17, 0x0e, 0x01, 0x07, 0x15, 0x03, 0x14, 0x16, 0x17, 0x11, 0x0e, + 0x01, 0x15, 0x01, 0x17, 0x5e, 0x65, 0x66, 0x5d, 0x3e, 0x41, 0x52, 0x14, + 0x40, 0x0d, 0x34, 0x27, 0x2b, 0x3b, 0x11, 0x39, 0x15, 0x56, 0x44, 0xab, + 0x38, 0x36, 0x36, 0x38, 0x72, 0x69, 0x0d, 0x8e, 0x70, 0x70, 0x8e, 0x0d, + 0x69, 0x67, 0x05, 0x41, 0x30, 0x22, 0x23, 0x2b, 0x05, 0xfe, 0x70, 0x05, + 0x2e, 0x26, 0x27, 0x30, 0x42, 0x05, 0x67, 0x01, 0x48, 0x3b, 0x53, 0x0b, + 0x01, 0x8a, 0x0b, 0x53, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x34, + 0x00, 0x00, 0x02, 0x26, 0x02, 0xc6, 0x00, 0x2c, 0x00, 0x63, 0xba, 0x00, + 0x19, 0x00, 0x2d, 0x00, 0x2e, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x12, 0x2f, 0x1b, 0xb9, 0x00, 0x12, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x12, 0x10, 0xb9, + 0x00, 0x19, 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x2a, + 0x00, 0x0b, 0xf4, 0xba, 0x00, 0x08, 0x00, 0x19, 0x00, 0x2a, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x08, 0x2f, 0xb9, 0x00, 0x09, 0x00, 0x08, 0xf4, 0xb8, + 0x00, 0x1f, 0xd0, 0xb8, 0x00, 0x08, 0x10, 0xb8, 0x00, 0x22, 0xd0, 0x30, + 0x31, 0x33, 0x35, 0x3e, 0x01, 0x35, 0x34, 0x26, 0x27, 0x23, 0x35, 0x33, + 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x17, 0x07, 0x2e, + 0x01, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x17, 0x33, 0x15, 0x23, 0x16, + 0x15, 0x14, 0x0e, 0x02, 0x07, 0x15, 0x21, 0x15, 0x4b, 0x2a, 0x25, 0x03, + 0x02, 0x61, 0x4e, 0x0b, 0x15, 0x20, 0x3d, 0x57, 0x36, 0x50, 0x69, 0x21, + 0x3f, 0x1c, 0x4b, 0x39, 0x42, 0x4d, 0x13, 0x0b, 0xc9, 0xb6, 0x03, 0x0f, + 0x18, 0x1d, 0x0e, 0x01, 0x80, 0x69, 0x11, 0x44, 0x2f, 0x0d, 0x18, 0x0c, + 0x45, 0x22, 0x44, 0x2a, 0x2e, 0x4e, 0x38, 0x1f, 0x3f, 0x33, 0x2d, 0x29, + 0x2d, 0x42, 0x4d, 0x29, 0x42, 0x20, 0x45, 0x14, 0x13, 0x1f, 0x33, 0x29, + 0x1e, 0x09, 0x05, 0x50, 0x00, 0x02, 0x00, 0x4c, 0x00, 0x15, 0x02, 0x0c, + 0x02, 0xa5, 0x00, 0x1b, 0x00, 0x29, 0x00, 0x7f, 0xba, 0x00, 0x00, 0x00, + 0x2a, 0x00, 0x2b, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x1c, 0xd0, 0x00, 0xb8, + 0x00, 0x0e, 0x2f, 0xba, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x2a, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x00, 0x2f, 0xb8, 0x00, 0x0e, 0x10, 0xb9, 0x00, 0x23, + 0x00, 0x08, 0xf4, 0xba, 0x00, 0x02, 0x00, 0x00, 0x00, 0x23, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x02, 0x10, 0xb8, 0x00, 0x05, 0xd0, 0xb8, 0x00, 0x00, + 0x10, 0xb9, 0x00, 0x1c, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x0c, 0x00, 0x0e, + 0x00, 0x1c, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0c, 0x10, 0xb8, 0x00, 0x09, + 0xd0, 0xba, 0x00, 0x10, 0x00, 0x0e, 0x00, 0x1c, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x10, 0x10, 0xb8, 0x00, 0x13, 0xd0, 0xba, 0x00, 0x1a, 0x00, 0x00, + 0x00, 0x23, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x1a, 0x10, 0xb8, 0x00, 0x17, + 0xd0, 0x30, 0x31, 0x25, 0x22, 0x27, 0x07, 0x27, 0x37, 0x26, 0x35, 0x34, + 0x37, 0x27, 0x37, 0x17, 0x36, 0x33, 0x32, 0x17, 0x37, 0x17, 0x07, 0x16, + 0x15, 0x14, 0x07, 0x17, 0x07, 0x27, 0x06, 0x27, 0x32, 0x36, 0x3d, 0x01, + 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x2c, 0x34, + 0x2a, 0x45, 0x3d, 0x4a, 0x36, 0x36, 0x4a, 0x3d, 0x45, 0x2a, 0x34, 0x34, + 0x2a, 0x45, 0x3d, 0x4a, 0x36, 0x36, 0x4a, 0x3d, 0x45, 0x2a, 0x34, 0x36, + 0x41, 0x41, 0x36, 0x36, 0x41, 0x41, 0x77, 0x14, 0x76, 0x23, 0x7e, 0x3e, + 0x69, 0x69, 0x3e, 0x7e, 0x23, 0x76, 0x14, 0x14, 0x76, 0x23, 0x7e, 0x3e, + 0x69, 0x69, 0x3e, 0x7e, 0x23, 0x76, 0x14, 0x43, 0x41, 0x42, 0x40, 0x42, + 0x41, 0x41, 0x42, 0x40, 0x42, 0x41, 0x00, 0x00, 0x00, 0x01, 0x00, 0x16, + 0x00, 0x00, 0x02, 0x42, 0x02, 0xba, 0x00, 0x13, 0x00, 0x76, 0xba, 0x00, + 0x08, 0x00, 0x14, 0x00, 0x15, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, + 0xb9, 0x00, 0x0a, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x13, 0x2f, 0x1b, 0xb9, 0x00, 0x13, 0x00, 0x0f, 0x3e, 0x59, + 0xb9, 0x00, 0x00, 0x00, 0x0b, 0xf4, 0xba, 0x00, 0x03, 0x00, 0x06, 0x00, + 0x13, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x03, 0x2f, 0xb9, 0x00, 0x04, 0x00, + 0x0b, 0xf4, 0xb8, 0x00, 0x08, 0xd0, 0xb8, 0x00, 0x04, 0x10, 0xb8, 0x00, + 0x0c, 0xd0, 0xb8, 0x00, 0x03, 0x10, 0xb8, 0x00, 0x0f, 0xd0, 0xb8, 0x00, + 0x00, 0x10, 0xb8, 0x00, 0x10, 0xd0, 0x30, 0x31, 0x37, 0x33, 0x35, 0x23, + 0x35, 0x33, 0x03, 0x33, 0x13, 0x33, 0x13, 0x33, 0x03, 0x33, 0x15, 0x23, + 0x15, 0x33, 0x15, 0x21, 0x4b, 0xb9, 0xb9, 0x8d, 0xc2, 0x5d, 0xb8, 0x04, + 0xb8, 0x5b, 0xc2, 0x8d, 0xb9, 0xb9, 0xfe, 0x3e, 0x45, 0xba, 0x45, 0x01, + 0x76, 0xfe, 0x8a, 0x01, 0x76, 0xfe, 0x8a, 0x45, 0xba, 0x45, 0x00, 0x00, + 0x00, 0x02, 0x01, 0x09, 0xff, 0x76, 0x01, 0x4f, 0x02, 0xf8, 0x00, 0x03, + 0x00, 0x07, 0x00, 0x25, 0xba, 0x00, 0x04, 0x00, 0x08, 0x00, 0x09, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x04, 0x10, 0xb8, 0x00, 0x00, 0xd0, 0x00, 0xb8, + 0x00, 0x01, 0x2f, 0xb8, 0x00, 0x04, 0x2f, 0xba, 0x00, 0x00, 0x00, 0x05, + 0x00, 0x03, 0x2b, 0x30, 0x31, 0x01, 0x11, 0x33, 0x11, 0x03, 0x11, 0x33, + 0x11, 0x01, 0x09, 0x46, 0x46, 0x46, 0x01, 0x91, 0x01, 0x67, 0xfe, 0x99, + 0xfd, 0xe5, 0x01, 0x67, 0xfe, 0x99, 0x00, 0x00, 0x00, 0x02, 0x00, 0x51, + 0xff, 0x65, 0x02, 0x0b, 0x02, 0xc6, 0x00, 0x39, 0x00, 0x4b, 0x00, 0x7a, + 0xba, 0x00, 0x12, 0x00, 0x4c, 0x00, 0x4d, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x12, 0x10, 0xb8, 0x00, 0x46, 0xd0, 0x00, 0xb8, 0x00, 0x05, 0x2f, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x22, 0x2f, 0x1b, 0xb9, 0x00, 0x22, + 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x05, 0x10, 0xb9, 0x00, 0x0c, 0x00, + 0x08, 0xf4, 0xb8, 0x00, 0x22, 0x10, 0xb9, 0x00, 0x29, 0x00, 0x08, 0xf4, + 0xba, 0x00, 0x12, 0x00, 0x29, 0x00, 0x05, 0x11, 0x12, 0x39, 0xba, 0x00, + 0x2f, 0x00, 0x22, 0x00, 0x0c, 0x11, 0x12, 0x39, 0xba, 0x00, 0x40, 0x00, + 0x29, 0x00, 0x05, 0x11, 0x12, 0x39, 0xba, 0x00, 0x1a, 0x00, 0x2f, 0x00, + 0x40, 0x11, 0x12, 0x39, 0xba, 0x00, 0x49, 0x00, 0x22, 0x00, 0x0c, 0x11, + 0x12, 0x39, 0xba, 0x00, 0x36, 0x00, 0x49, 0x00, 0x12, 0x11, 0x12, 0x39, + 0x30, 0x31, 0x25, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x37, 0x1e, + 0x01, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x2f, 0x01, 0x2e, 0x01, 0x35, + 0x34, 0x36, 0x37, 0x35, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, + 0x16, 0x17, 0x07, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x1f, + 0x01, 0x1e, 0x01, 0x15, 0x14, 0x06, 0x07, 0x15, 0x1e, 0x01, 0x27, 0x34, + 0x26, 0x2f, 0x01, 0x26, 0x27, 0x0e, 0x01, 0x15, 0x14, 0x16, 0x1f, 0x01, + 0x16, 0x17, 0x3e, 0x01, 0x01, 0xe7, 0x1d, 0x35, 0x4a, 0x2d, 0x2e, 0x59, + 0x23, 0x2f, 0x18, 0x3e, 0x26, 0x39, 0x40, 0x37, 0x33, 0x40, 0x53, 0x4a, + 0x3a, 0x36, 0x27, 0x25, 0x1d, 0x35, 0x4a, 0x2d, 0x2e, 0x59, 0x23, 0x2f, + 0x18, 0x3e, 0x26, 0x39, 0x40, 0x37, 0x33, 0x40, 0x53, 0x4a, 0x3a, 0x36, + 0x27, 0x25, 0x2b, 0x3a, 0x3e, 0x3f, 0x11, 0x11, 0x1f, 0x24, 0x3a, 0x3e, + 0x3f, 0x11, 0x11, 0x1f, 0x24, 0x03, 0x24, 0x3a, 0x2a, 0x16, 0x1a, 0x1e, + 0x38, 0x14, 0x17, 0x2f, 0x29, 0x26, 0x2d, 0x0e, 0x12, 0x17, 0x51, 0x33, + 0x30, 0x4a, 0x15, 0x05, 0x18, 0x44, 0x28, 0x24, 0x3a, 0x2a, 0x16, 0x1a, + 0x1e, 0x38, 0x14, 0x17, 0x2f, 0x29, 0x26, 0x2d, 0x0e, 0x12, 0x17, 0x51, + 0x33, 0x30, 0x4a, 0x15, 0x05, 0x18, 0x44, 0xdc, 0x2b, 0x34, 0x11, 0x11, + 0x04, 0x07, 0x15, 0x37, 0x23, 0x2b, 0x34, 0x11, 0x11, 0x04, 0x07, 0x15, + 0x37, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x96, 0x02, 0x6a, 0x01, 0xc2, + 0x02, 0xd4, 0x00, 0x0d, 0x00, 0x1b, 0x00, 0x2d, 0xba, 0x00, 0x0b, 0x00, + 0x1c, 0x00, 0x1d, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0b, 0x10, 0xb8, 0x00, + 0x11, 0xd0, 0x00, 0xba, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x2b, 0xb8, + 0x00, 0x00, 0x10, 0xb8, 0x00, 0x0e, 0xd0, 0xb8, 0x00, 0x07, 0x10, 0xb8, + 0x00, 0x15, 0xd0, 0x30, 0x31, 0x13, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, + 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x33, 0x22, 0x26, 0x3d, 0x01, + 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0xcf, 0x1f, 0x1a, + 0x1a, 0x1f, 0x1f, 0x1a, 0x1a, 0x9b, 0x1f, 0x1a, 0x1a, 0x1f, 0x1f, 0x1a, + 0x1a, 0x02, 0x6a, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x1a, 0x14, 0x0e, 0x14, + 0x1a, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x00, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x12, 0x02, 0x58, 0x02, 0xa8, 0x00, 0x13, + 0x00, 0x29, 0x00, 0x44, 0x00, 0x6d, 0xba, 0x00, 0x00, 0x00, 0x45, 0x00, + 0x46, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x14, 0xd0, 0xb8, 0x00, 0x00, 0x10, + 0xb8, 0x00, 0x2a, 0xd0, 0x00, 0xb8, 0x00, 0x0a, 0x2f, 0xb8, 0x00, 0x00, + 0x2f, 0xb9, 0x00, 0x14, 0x00, 0x03, 0xf4, 0xb8, 0x00, 0x0a, 0x10, 0xb9, + 0x00, 0x1f, 0x00, 0x03, 0xf4, 0xb8, 0x00, 0x14, 0x10, 0xb8, 0x00, 0x2a, + 0xdc, 0xb8, 0x00, 0x1f, 0x10, 0xb8, 0x00, 0x30, 0xdc, 0xb9, 0x00, 0x37, + 0x00, 0x03, 0xf4, 0xb8, 0x00, 0x2a, 0x10, 0xb9, 0x00, 0x3e, 0x00, 0x03, + 0xf4, 0xba, 0x00, 0x34, 0x00, 0x37, 0x00, 0x3e, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x34, 0x2f, 0xba, 0x00, 0x41, 0x00, 0x37, 0x00, 0x3e, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x41, 0x2f, 0x30, 0x31, 0x25, 0x22, 0x2e, 0x02, 0x35, + 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, + 0x32, 0x3e, 0x02, 0x3d, 0x01, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, + 0x1d, 0x01, 0x14, 0x1e, 0x02, 0x37, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, + 0x32, 0x16, 0x17, 0x07, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, + 0x16, 0x33, 0x32, 0x36, 0x37, 0x17, 0x0e, 0x01, 0x01, 0x2c, 0x3f, 0x6d, + 0x51, 0x2f, 0x2f, 0x51, 0x6d, 0x3f, 0x3f, 0x6d, 0x51, 0x2f, 0x2f, 0x51, + 0x6d, 0x3f, 0x33, 0x57, 0x3f, 0x24, 0x24, 0x3f, 0x57, 0x33, 0x33, 0x57, + 0x3f, 0x24, 0x24, 0x3f, 0x57, 0x38, 0x49, 0x51, 0x52, 0x48, 0x30, 0x3d, + 0x11, 0x35, 0x0b, 0x22, 0x1c, 0x27, 0x2b, 0x2a, 0x29, 0x1e, 0x24, 0x0e, + 0x32, 0x11, 0x41, 0x12, 0x2e, 0x56, 0x7a, 0x4d, 0x4c, 0x7b, 0x56, 0x2e, + 0x2e, 0x56, 0x7b, 0x4c, 0x4d, 0x7a, 0x56, 0x2e, 0x37, 0x26, 0x43, 0x5a, + 0x33, 0x3c, 0x33, 0x5a, 0x43, 0x26, 0x26, 0x43, 0x5a, 0x33, 0x3c, 0x33, + 0x5a, 0x43, 0x26, 0x62, 0x61, 0x51, 0x52, 0x60, 0x2c, 0x24, 0x1d, 0x18, + 0x1c, 0x33, 0x29, 0x39, 0x2a, 0x33, 0x1e, 0x19, 0x1f, 0x23, 0x2e, 0x00, + 0x00, 0x02, 0x00, 0x8a, 0x01, 0x5d, 0x01, 0xcf, 0x02, 0xc6, 0x00, 0x20, + 0x00, 0x2b, 0x00, 0x9a, 0xba, 0x00, 0x0d, 0x00, 0x2c, 0x00, 0x2d, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x0d, 0x10, 0xb8, 0x00, 0x21, 0xd0, 0x00, 0xb8, + 0x00, 0x20, 0x2f, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x1a, 0x2f, + 0x1b, 0xb9, 0x00, 0x1a, 0x00, 0x1d, 0x3e, 0x59, 0x41, 0x03, 0x00, 0xa0, + 0x00, 0x20, 0x00, 0x01, 0x5d, 0x41, 0x03, 0x00, 0x10, 0x00, 0x20, 0x00, + 0x01, 0x5d, 0x41, 0x03, 0x00, 0x20, 0x00, 0x20, 0x00, 0x01, 0x71, 0x41, + 0x03, 0x00, 0xd0, 0x00, 0x20, 0x00, 0x01, 0x5d, 0xb8, 0x00, 0x20, 0x10, + 0xb9, 0x00, 0x1f, 0x00, 0x03, 0xf4, 0xba, 0x00, 0x03, 0x00, 0x1f, 0x00, + 0x20, 0x11, 0x12, 0x39, 0xba, 0x00, 0x27, 0x00, 0x1f, 0x00, 0x20, 0x11, + 0x12, 0x39, 0x7c, 0xb8, 0x00, 0x27, 0x2f, 0x18, 0xb9, 0x00, 0x07, 0x00, + 0x03, 0xf4, 0xba, 0x00, 0x0d, 0x00, 0x1a, 0x00, 0x1f, 0x11, 0x12, 0x39, + 0xb8, 0x00, 0x0d, 0x2f, 0xb8, 0x00, 0x1a, 0x10, 0xb9, 0x00, 0x11, 0x00, + 0x03, 0xf4, 0xb8, 0x00, 0x0d, 0x10, 0xb9, 0x00, 0x21, 0x00, 0x03, 0xf4, + 0x30, 0x31, 0x01, 0x22, 0x26, 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, + 0x35, 0x34, 0x36, 0x3b, 0x01, 0x35, 0x34, 0x23, 0x22, 0x06, 0x07, 0x27, + 0x3e, 0x03, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x33, 0x15, 0x27, 0x22, 0x06, + 0x1d, 0x01, 0x14, 0x33, 0x32, 0x36, 0x3d, 0x01, 0x01, 0xad, 0x21, 0x1c, + 0x02, 0x04, 0x0b, 0x37, 0x2f, 0x36, 0x39, 0x4f, 0x48, 0x49, 0x4d, 0x23, + 0x2f, 0x0b, 0x2a, 0x07, 0x19, 0x22, 0x2c, 0x1c, 0x40, 0x49, 0x26, 0xb0, + 0x2a, 0x2c, 0x3d, 0x28, 0x3c, 0x01, 0x65, 0x1c, 0x19, 0x17, 0x26, 0x36, + 0x2d, 0x36, 0x32, 0x1c, 0x4e, 0x1d, 0x17, 0x22, 0x0d, 0x19, 0x14, 0x0c, + 0x42, 0x3d, 0xaa, 0x38, 0x95, 0x18, 0x17, 0x0a, 0x31, 0x23, 0x1e, 0x29, + 0x00, 0x02, 0x00, 0x4a, 0x00, 0x38, 0x02, 0x16, 0x01, 0xe4, 0x00, 0x06, + 0x00, 0x0d, 0x00, 0x00, 0x25, 0x27, 0x35, 0x37, 0x17, 0x07, 0x17, 0x07, + 0x27, 0x35, 0x37, 0x17, 0x07, 0x17, 0x01, 0xfd, 0xce, 0xce, 0x19, 0x94, + 0x94, 0xfe, 0xce, 0xce, 0x19, 0x94, 0x94, 0x38, 0xae, 0x50, 0xae, 0x39, + 0x9d, 0x9d, 0x39, 0xae, 0x50, 0xae, 0x39, 0x9d, 0x9d, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x3e, 0x00, 0x4e, 0x02, 0x0a, 0x01, 0x53, 0x00, 0x05, + 0x00, 0x17, 0xba, 0x00, 0x00, 0x00, 0x06, 0x00, 0x07, 0x11, 0x12, 0x39, + 0x00, 0xbb, 0x00, 0x03, 0x00, 0x08, 0x00, 0x02, 0x00, 0x04, 0x2b, 0x30, + 0x31, 0x25, 0x35, 0x21, 0x35, 0x21, 0x11, 0x01, 0xc5, 0xfe, 0x79, 0x01, + 0xcc, 0x4e, 0xc1, 0x44, 0xfe, 0xfb, 0x00, 0x00, 0x00, 0x04, 0x00, 0x75, + 0x01, 0x5a, 0x01, 0xe3, 0x02, 0xc6, 0x00, 0x13, 0x00, 0x29, 0x00, 0x36, + 0x00, 0x3e, 0x00, 0xed, 0xba, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x40, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x14, 0xd0, 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, + 0x35, 0xd0, 0xb8, 0x00, 0x00, 0x10, 0xb8, 0x00, 0x37, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, + 0x00, 0x1d, 0x3e, 0x59, 0xb9, 0x00, 0x1f, 0x00, 0x0a, 0xf4, 0xba, 0x00, + 0x2b, 0x00, 0x1f, 0x00, 0x14, 0x11, 0x12, 0x39, 0x7c, 0xb8, 0x00, 0x2b, + 0x2f, 0x18, 0x41, 0x07, 0x00, 0xa0, 0x00, 0x2b, 0x00, 0xb0, 0x00, 0x2b, + 0x00, 0xc0, 0x00, 0x2b, 0x00, 0x03, 0x71, 0x41, 0x09, 0x00, 0xa0, 0x00, + 0x2b, 0x00, 0xb0, 0x00, 0x2b, 0x00, 0xc0, 0x00, 0x2b, 0x00, 0xd0, 0x00, + 0x2b, 0x00, 0x04, 0x5d, 0x41, 0x03, 0x00, 0x10, 0x00, 0x2b, 0x00, 0x01, + 0x72, 0x41, 0x03, 0x00, 0xf0, 0x00, 0x2b, 0x00, 0x01, 0x5d, 0x41, 0x05, + 0x00, 0x00, 0x00, 0x2b, 0x00, 0x10, 0x00, 0x2b, 0x00, 0x02, 0x71, 0x41, + 0x03, 0x00, 0x30, 0x00, 0x2b, 0x00, 0x01, 0x5d, 0xba, 0x00, 0x14, 0x00, + 0x2b, 0x00, 0x3f, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x14, 0x2f, 0x41, 0x03, + 0x00, 0x40, 0x00, 0x14, 0x00, 0x01, 0x71, 0xb9, 0x00, 0x00, 0x00, 0x0a, + 0xf4, 0xba, 0x00, 0x2c, 0x00, 0x1f, 0x00, 0x14, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x2c, 0x2f, 0xb9, 0x00, 0x3d, 0x00, 0x0a, 0xf4, 0xba, 0x00, 0x3e, + 0x00, 0x3d, 0x00, 0x2b, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x3e, 0x2f, 0xb9, + 0x00, 0x36, 0x00, 0x0a, 0xf4, 0xba, 0x00, 0x32, 0x00, 0x3e, 0x00, 0x36, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x2b, 0x10, 0xb8, 0x00, 0x34, 0xd0, 0x30, + 0x31, 0x01, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, + 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, 0x3e, 0x02, 0x3d, 0x01, 0x34, + 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x1d, 0x01, 0x14, 0x1e, 0x02, 0x27, + 0x23, 0x35, 0x33, 0x32, 0x16, 0x15, 0x14, 0x07, 0x17, 0x23, 0x27, 0x23, + 0x37, 0x32, 0x3d, 0x01, 0x34, 0x2b, 0x01, 0x15, 0x01, 0x2c, 0x26, 0x43, + 0x32, 0x1c, 0x1c, 0x32, 0x43, 0x26, 0x26, 0x43, 0x31, 0x1d, 0x1d, 0x31, + 0x43, 0x26, 0x1d, 0x31, 0x24, 0x15, 0x15, 0x24, 0x31, 0x1d, 0x1d, 0x31, + 0x24, 0x15, 0x15, 0x24, 0x31, 0x01, 0x28, 0x55, 0x1c, 0x1f, 0x25, 0x2e, + 0x2d, 0x27, 0x1d, 0x24, 0x1a, 0x1a, 0x24, 0x01, 0x5a, 0x1c, 0x30, 0x43, + 0x27, 0x27, 0x43, 0x30, 0x1c, 0x1c, 0x30, 0x43, 0x27, 0x27, 0x43, 0x30, + 0x1c, 0x29, 0x13, 0x22, 0x30, 0x1e, 0x14, 0x1e, 0x30, 0x22, 0x13, 0x13, + 0x22, 0x30, 0x1e, 0x14, 0x1e, 0x30, 0x22, 0x13, 0x31, 0xb9, 0x1f, 0x1a, + 0x27, 0x0d, 0x4c, 0x46, 0x1d, 0x18, 0x07, 0x18, 0x37, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0xa0, 0x02, 0x7d, 0x01, 0xb8, 0x02, 0xc1, 0x00, 0x03, + 0x00, 0x44, 0xba, 0x00, 0x03, 0x00, 0x04, 0x00, 0x05, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x03, 0x2f, 0x41, 0x03, 0x00, 0xc0, 0x00, 0x03, 0x00, + 0x01, 0x71, 0x41, 0x03, 0x00, 0xcf, 0x00, 0x03, 0x00, 0x01, 0x5d, 0x41, + 0x03, 0x00, 0x30, 0x00, 0x03, 0x00, 0x01, 0x5d, 0x41, 0x03, 0x00, 0x70, + 0x00, 0x03, 0x00, 0x01, 0x71, 0x41, 0x03, 0x00, 0x10, 0x00, 0x03, 0x00, + 0x01, 0x71, 0xb9, 0x00, 0x00, 0x00, 0x05, 0xf4, 0x30, 0x31, 0x13, 0x21, + 0x15, 0x21, 0xa0, 0x01, 0x18, 0xfe, 0xe8, 0x02, 0xc1, 0x44, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x81, 0x01, 0x70, 0x01, 0xd7, 0x02, 0xc6, 0x00, 0x13, + 0x00, 0x1f, 0x00, 0x43, 0xba, 0x00, 0x00, 0x00, 0x20, 0x00, 0x21, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x14, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x2f, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, 0x00, 0x0a, + 0x00, 0x1d, 0x3e, 0x59, 0x41, 0x03, 0x00, 0x60, 0x00, 0x00, 0x00, 0x01, + 0x5d, 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x14, 0x00, 0x03, 0xf4, 0xb8, + 0x00, 0x0a, 0x10, 0xb9, 0x00, 0x1a, 0x00, 0x03, 0xf4, 0x30, 0x31, 0x01, + 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, + 0x14, 0x0e, 0x02, 0x27, 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, + 0x15, 0x14, 0x16, 0x01, 0x2c, 0x24, 0x3e, 0x2f, 0x1a, 0x1a, 0x2f, 0x3e, + 0x24, 0x24, 0x3e, 0x2f, 0x1a, 0x1a, 0x2f, 0x3e, 0x24, 0x2e, 0x37, 0x37, + 0x2e, 0x2e, 0x37, 0x37, 0x01, 0x70, 0x1a, 0x2e, 0x3f, 0x24, 0x24, 0x3f, + 0x2e, 0x1a, 0x1a, 0x2e, 0x3f, 0x24, 0x24, 0x3f, 0x2e, 0x1a, 0x40, 0x3e, + 0x2d, 0x2d, 0x3e, 0x3e, 0x2d, 0x2d, 0x3e, 0x00, 0x00, 0x02, 0x00, 0x3e, + 0x00, 0x00, 0x02, 0x1a, 0x02, 0x6a, 0x00, 0x0b, 0x00, 0x0f, 0x00, 0x43, + 0xba, 0x00, 0x00, 0x00, 0x10, 0x00, 0x11, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x0c, 0xd0, 0x00, 0xbb, 0x00, 0x03, 0x00, 0x08, 0x00, 0x02, 0x00, 0x04, + 0x2b, 0xbb, 0x00, 0x0d, 0x00, 0x08, 0x00, 0x0c, 0x00, 0x04, 0x2b, 0xba, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x0d, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x00, + 0x2f, 0xb8, 0x00, 0x03, 0x10, 0xb8, 0x00, 0x07, 0xd0, 0xb8, 0x00, 0x02, + 0x10, 0xb8, 0x00, 0x0a, 0xd0, 0x30, 0x31, 0x25, 0x35, 0x23, 0x35, 0x33, + 0x35, 0x33, 0x15, 0x33, 0x15, 0x23, 0x15, 0x05, 0x35, 0x21, 0x15, 0x01, + 0x06, 0xc8, 0xc8, 0x4c, 0xc8, 0xc8, 0xfe, 0xec, 0x01, 0xdc, 0x98, 0xc7, + 0x44, 0xc7, 0xc7, 0x44, 0xc7, 0x98, 0x44, 0x44, 0x00, 0x01, 0x00, 0xa1, + 0x01, 0x49, 0x01, 0xb6, 0x02, 0xc0, 0x00, 0x1b, 0x00, 0x57, 0xba, 0x00, + 0x13, 0x00, 0x1c, 0x00, 0x1d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x13, 0x2f, 0x1b, 0xb9, 0x00, 0x13, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, + 0xb9, 0x00, 0x01, 0x00, 0x13, 0x3e, 0x59, 0xb9, 0x00, 0x1a, 0x00, 0x03, + 0xf4, 0xb8, 0x00, 0x02, 0xd0, 0xba, 0x00, 0x03, 0x00, 0x13, 0x00, 0x1a, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x13, 0x10, 0xb9, 0x00, 0x0a, 0x00, 0x03, + 0xf4, 0xba, 0x00, 0x19, 0x00, 0x0a, 0x00, 0x01, 0x11, 0x12, 0x39, 0x30, + 0x31, 0x01, 0x21, 0x35, 0x37, 0x3e, 0x01, 0x3d, 0x01, 0x34, 0x26, 0x23, + 0x22, 0x06, 0x07, 0x27, 0x3e, 0x03, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, + 0x0f, 0x01, 0x33, 0x01, 0xb6, 0xfe, 0xf0, 0x82, 0x1d, 0x21, 0x21, 0x20, + 0x23, 0x23, 0x08, 0x36, 0x06, 0x15, 0x21, 0x2e, 0x1e, 0x3e, 0x42, 0x35, + 0x2a, 0x61, 0xcd, 0x01, 0x49, 0x39, 0x69, 0x18, 0x2f, 0x1b, 0x06, 0x1a, + 0x1f, 0x22, 0x18, 0x14, 0x12, 0x20, 0x19, 0x0f, 0x3d, 0x30, 0x2c, 0x41, + 0x20, 0x4b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x97, 0x01, 0x43, 0x01, 0xae, + 0x02, 0xc0, 0x00, 0x2a, 0x00, 0x6e, 0xba, 0x00, 0x0e, 0x00, 0x2b, 0x00, + 0x2c, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x0e, 0x2f, 0x1b, 0xb9, 0x00, 0x0e, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x1b, 0x2f, 0x1b, 0xb9, 0x00, 0x1b, 0x00, + 0x13, 0x3e, 0x59, 0xba, 0x00, 0x28, 0x00, 0x0e, 0x00, 0x1b, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x28, 0x2f, 0x41, 0x05, 0x00, 0x40, 0x00, 0x28, 0x00, + 0x50, 0x00, 0x28, 0x00, 0x02, 0x72, 0xb9, 0x00, 0x00, 0x00, 0x03, 0xf4, + 0xb8, 0x00, 0x0e, 0x10, 0xb9, 0x00, 0x07, 0x00, 0x03, 0xf4, 0xba, 0x00, + 0x15, 0x00, 0x00, 0x00, 0x28, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x1b, 0x10, + 0xb9, 0x00, 0x22, 0x00, 0x03, 0xf4, 0x30, 0x31, 0x01, 0x32, 0x36, 0x3d, + 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, + 0x16, 0x15, 0x14, 0x06, 0x07, 0x15, 0x1e, 0x01, 0x15, 0x14, 0x06, 0x23, + 0x22, 0x26, 0x27, 0x37, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x3d, 0x01, 0x34, + 0x2b, 0x01, 0x35, 0x01, 0x1a, 0x26, 0x25, 0x23, 0x1e, 0x1d, 0x28, 0x0e, + 0x2b, 0x11, 0x3d, 0x32, 0x39, 0x49, 0x2e, 0x20, 0x22, 0x32, 0x4d, 0x42, + 0x37, 0x3e, 0x13, 0x2f, 0x0e, 0x28, 0x23, 0x26, 0x27, 0x4d, 0x2d, 0x02, + 0x22, 0x1d, 0x17, 0x04, 0x19, 0x1b, 0x18, 0x15, 0x22, 0x19, 0x24, 0x32, + 0x2d, 0x24, 0x2a, 0x07, 0x03, 0x06, 0x2c, 0x28, 0x31, 0x3b, 0x28, 0x1a, + 0x22, 0x16, 0x1c, 0x20, 0x1d, 0x06, 0x37, 0x33, 0x00, 0x01, 0x00, 0xff, + 0x02, 0x49, 0x01, 0x9d, 0x03, 0x0b, 0x00, 0x03, 0x00, 0x23, 0xba, 0x00, + 0x00, 0x00, 0x04, 0x00, 0x05, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x2f, 0x41, 0x03, 0x00, 0x2f, 0x00, 0x00, 0x00, 0x01, 0x5d, 0x41, 0x03, + 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x5d, 0x30, 0x31, 0x01, 0x27, 0x37, + 0x17, 0x01, 0x33, 0x34, 0x55, 0x49, 0x02, 0x49, 0x18, 0xaa, 0x23, 0x00, + 0x00, 0x01, 0x00, 0x62, 0xff, 0x38, 0x01, 0xf6, 0x02, 0x04, 0x00, 0x1a, + 0x00, 0x82, 0xba, 0x00, 0x05, 0x00, 0x1b, 0x00, 0x1c, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, + 0x00, 0x01, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x0b, 0x2f, 0x1b, 0xb9, 0x00, 0x0b, 0x00, 0x1b, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0e, 0x2f, 0x1b, 0xb9, 0x00, 0x0e, + 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, + 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, 0x11, 0x3e, 0x59, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x15, 0x2f, 0x1b, 0xb9, 0x00, 0x15, 0x00, 0x0f, + 0x3e, 0x59, 0xb9, 0x00, 0x05, 0x00, 0x08, 0xf4, 0xba, 0x00, 0x0f, 0x00, + 0x01, 0x00, 0x05, 0x11, 0x12, 0x39, 0x7c, 0xb8, 0x00, 0x0f, 0x2f, 0x18, + 0xba, 0x00, 0x17, 0x00, 0x05, 0x00, 0x15, 0x11, 0x12, 0x39, 0x30, 0x31, + 0x17, 0x11, 0x33, 0x11, 0x14, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x11, 0x33, + 0x11, 0x23, 0x35, 0x23, 0x0e, 0x03, 0x23, 0x22, 0x27, 0x23, 0x17, 0x15, + 0x62, 0x50, 0x77, 0x18, 0x2d, 0x23, 0x15, 0x50, 0x50, 0x04, 0x09, 0x17, + 0x21, 0x2d, 0x1e, 0x4b, 0x1c, 0x04, 0x07, 0xc8, 0x02, 0xcc, 0xfe, 0xc3, + 0x8c, 0x0c, 0x18, 0x25, 0x1a, 0x01, 0x66, 0xfd, 0xfc, 0x54, 0x14, 0x23, + 0x1a, 0x0f, 0x34, 0x54, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x2d, + 0xff, 0x6b, 0x01, 0xf8, 0x02, 0xba, 0x00, 0x11, 0x00, 0x34, 0xba, 0x00, + 0x11, 0x00, 0x12, 0x00, 0x13, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x11, + 0x2f, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0a, 0x2f, 0x1b, 0xb9, + 0x00, 0x0a, 0x00, 0x1d, 0x3e, 0x59, 0xb9, 0x00, 0x0f, 0x00, 0x08, 0xf4, + 0xb8, 0x00, 0x00, 0xdc, 0xb8, 0x00, 0x11, 0x10, 0xb8, 0x00, 0x0d, 0xd0, + 0x30, 0x31, 0x25, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x3b, 0x01, + 0x11, 0x23, 0x11, 0x23, 0x11, 0x23, 0x01, 0x0e, 0x2f, 0x51, 0x3e, 0x23, + 0x23, 0x3e, 0x51, 0x2f, 0xea, 0x48, 0x5a, 0x48, 0xf6, 0x22, 0x3c, 0x53, + 0x31, 0x31, 0x53, 0x3c, 0x22, 0xfc, 0xb1, 0x03, 0x0f, 0xfc, 0xf1, 0x00, + 0x00, 0x01, 0x00, 0xe2, 0x00, 0xeb, 0x01, 0x76, 0x01, 0x75, 0x00, 0x0d, + 0x00, 0x17, 0xba, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x0f, 0x11, 0x12, 0x39, + 0x00, 0xbb, 0x00, 0x07, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x2b, 0x30, + 0x31, 0x25, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, + 0x01, 0x14, 0x06, 0x01, 0x2c, 0x29, 0x21, 0x21, 0x29, 0x29, 0x21, 0x21, + 0xeb, 0x22, 0x1a, 0x12, 0x1a, 0x22, 0x22, 0x1a, 0x12, 0x1a, 0x22, 0x00, + 0x00, 0x01, 0x00, 0xd5, 0xff, 0x31, 0x01, 0xa7, 0x00, 0x14, 0x00, 0x1b, + 0x00, 0x34, 0xba, 0x00, 0x0d, 0x00, 0x1c, 0x00, 0x1d, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x10, 0x2f, 0xb8, 0x00, 0x14, 0xdc, 0x41, 0x07, 0x00, + 0x0f, 0x00, 0x14, 0x00, 0x1f, 0x00, 0x14, 0x00, 0x2f, 0x00, 0x14, 0x00, + 0x03, 0x5d, 0xb8, 0x00, 0x0d, 0xd0, 0xb8, 0x00, 0x07, 0xdc, 0xb9, 0x00, + 0x00, 0x00, 0x03, 0xf4, 0x30, 0x31, 0x05, 0x22, 0x26, 0x27, 0x37, 0x1e, + 0x01, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x2f, 0x01, 0x37, 0x33, 0x07, + 0x17, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x01, 0x38, 0x29, + 0x2f, 0x0b, 0x26, 0x09, 0x1e, 0x16, 0x13, 0x19, 0x1a, 0x2a, 0x1c, 0x13, + 0x32, 0x10, 0x03, 0x13, 0x14, 0x1d, 0x27, 0x12, 0x1f, 0x28, 0xcf, 0x1b, + 0x0e, 0x29, 0x0b, 0x11, 0x0f, 0x10, 0x0e, 0x15, 0x06, 0x04, 0x61, 0x51, + 0x03, 0x06, 0x22, 0x20, 0x15, 0x20, 0x14, 0x0a, 0x00, 0x01, 0x00, 0x9a, + 0x01, 0x49, 0x01, 0xbe, 0x02, 0xba, 0x00, 0x0a, 0x00, 0x5b, 0xba, 0x00, + 0x02, 0x00, 0x0b, 0x00, 0x0c, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x07, 0x2f, 0x1b, 0xb9, 0x00, 0x07, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, + 0xb9, 0x00, 0x00, 0x00, 0x13, 0x3e, 0x59, 0xb9, 0x00, 0x01, 0x00, 0x03, + 0xf4, 0xb8, 0x00, 0x07, 0x10, 0xb9, 0x00, 0x03, 0x00, 0x03, 0xf4, 0xba, + 0x00, 0x04, 0x00, 0x03, 0x00, 0x00, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x04, + 0x10, 0xb9, 0x00, 0x05, 0x00, 0x03, 0xf4, 0xb8, 0x00, 0x01, 0x10, 0xb8, + 0x00, 0x08, 0xd0, 0x30, 0x31, 0x13, 0x35, 0x33, 0x11, 0x07, 0x27, 0x37, + 0x33, 0x11, 0x33, 0x15, 0xb0, 0x6d, 0x6a, 0x19, 0x7e, 0x44, 0x62, 0x01, + 0x49, 0x32, 0x01, 0x09, 0x37, 0x2c, 0x41, 0xfe, 0xc1, 0x32, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x8c, 0x01, 0x5d, 0x01, 0xcc, 0x02, 0xc6, 0x00, 0x0b, + 0x00, 0x19, 0x00, 0x55, 0xba, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x1b, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x0c, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x2f, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x06, 0x2f, 0x1b, 0xb9, 0x00, 0x06, + 0x00, 0x1d, 0x3e, 0x59, 0x41, 0x03, 0x00, 0xff, 0x00, 0x00, 0x00, 0x01, + 0x5d, 0x41, 0x03, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x01, 0x5d, 0x41, 0x03, + 0x00, 0xd0, 0x00, 0x00, 0x00, 0x01, 0x5d, 0xb8, 0x00, 0x00, 0x10, 0xb9, + 0x00, 0x0c, 0x00, 0x03, 0xf4, 0xb8, 0x00, 0x06, 0x10, 0xb9, 0x00, 0x13, + 0x00, 0x03, 0xf4, 0x30, 0x31, 0x01, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, + 0x32, 0x16, 0x15, 0x14, 0x06, 0x27, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, + 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x2c, 0x4c, 0x54, 0x55, + 0x4b, 0x4b, 0x55, 0x55, 0x4b, 0x2d, 0x2e, 0x2e, 0x2d, 0x2d, 0x2e, 0x2e, + 0x01, 0x5d, 0x60, 0x55, 0x54, 0x60, 0x60, 0x54, 0x55, 0x60, 0x35, 0x37, + 0x2b, 0x3b, 0x2b, 0x37, 0x37, 0x2b, 0x3b, 0x2b, 0x37, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x43, 0x00, 0x38, 0x02, 0x0f, 0x01, 0xe4, 0x00, 0x06, + 0x00, 0x0d, 0x00, 0x00, 0x25, 0x37, 0x27, 0x37, 0x17, 0x15, 0x07, 0x27, + 0x37, 0x27, 0x37, 0x17, 0x15, 0x07, 0x01, 0x28, 0x94, 0x94, 0x19, 0xce, + 0xce, 0xfe, 0x94, 0x94, 0x19, 0xce, 0xce, 0x71, 0x9d, 0x9d, 0x39, 0xae, + 0x50, 0xae, 0x39, 0x9d, 0x9d, 0x39, 0xae, 0x50, 0xae, 0x00, 0x00, 0x00, + 0x00, 0x05, 0x00, 0x12, 0x00, 0x00, 0x02, 0x49, 0x02, 0xba, 0x00, 0x0a, + 0x00, 0x0e, 0x00, 0x19, 0x00, 0x1d, 0x00, 0x21, 0x00, 0x00, 0x25, 0x23, + 0x35, 0x37, 0x33, 0x15, 0x33, 0x15, 0x23, 0x15, 0x23, 0x3d, 0x01, 0x23, + 0x07, 0x01, 0x33, 0x35, 0x07, 0x27, 0x37, 0x33, 0x11, 0x33, 0x15, 0x23, + 0x01, 0x33, 0x03, 0x23, 0x07, 0x33, 0x03, 0x23, 0x01, 0xdd, 0xa3, 0x8e, + 0x52, 0x2f, 0x2f, 0x3d, 0x03, 0x72, 0xfe, 0xc0, 0x5e, 0x59, 0x18, 0x6c, + 0x44, 0x53, 0xf0, 0x01, 0xd6, 0x48, 0xa0, 0x48, 0xac, 0x48, 0xa0, 0x48, + 0x40, 0x3b, 0xd4, 0xdf, 0x30, 0x40, 0x70, 0xaa, 0xaa, 0x01, 0x2d, 0xe6, + 0x2d, 0x2c, 0x38, 0xfe, 0xe3, 0x32, 0x01, 0x4f, 0xfe, 0xd4, 0x62, 0xfe, + 0xd4, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x12, 0x00, 0x00, 0x02, 0x46, + 0x02, 0xba, 0x00, 0x18, 0x00, 0x23, 0x00, 0x27, 0x00, 0x2b, 0x00, 0x00, + 0x25, 0x37, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, + 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x0f, 0x01, 0x33, 0x15, + 0x23, 0x01, 0x33, 0x35, 0x07, 0x27, 0x37, 0x33, 0x11, 0x33, 0x15, 0x23, + 0x01, 0x33, 0x03, 0x23, 0x07, 0x33, 0x03, 0x23, 0x01, 0x49, 0x71, 0x36, + 0x1b, 0x1a, 0x1a, 0x1f, 0x0a, 0x35, 0x0b, 0x3d, 0x35, 0x39, 0x39, 0x35, + 0x25, 0x4d, 0xb4, 0xf6, 0xfe, 0xdf, 0x5e, 0x59, 0x18, 0x6c, 0x44, 0x53, + 0xf0, 0x01, 0xd6, 0x48, 0xa0, 0x48, 0xac, 0x48, 0xa0, 0x48, 0x3a, 0x5a, + 0x2b, 0x2f, 0x05, 0x13, 0x1b, 0x1d, 0x1a, 0x16, 0x22, 0x33, 0x39, 0x28, + 0x2a, 0x40, 0x1d, 0x3b, 0x32, 0x01, 0x9d, 0xe6, 0x2d, 0x2c, 0x38, 0xfe, + 0xe3, 0x32, 0x01, 0x4f, 0xfe, 0xd4, 0x62, 0xfe, 0xd4, 0x00, 0x00, 0x00, + 0x00, 0x05, 0x00, 0x12, 0x00, 0x00, 0x02, 0x49, 0x02, 0xc0, 0x00, 0x0a, + 0x00, 0x0e, 0x00, 0x39, 0x00, 0x3d, 0x00, 0x41, 0x00, 0x00, 0x25, 0x23, + 0x35, 0x37, 0x33, 0x15, 0x33, 0x15, 0x23, 0x15, 0x23, 0x3d, 0x01, 0x23, + 0x07, 0x27, 0x22, 0x26, 0x27, 0x37, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x3d, + 0x01, 0x34, 0x26, 0x2b, 0x01, 0x35, 0x33, 0x32, 0x36, 0x3d, 0x01, 0x34, + 0x26, 0x23, 0x22, 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x14, + 0x06, 0x07, 0x15, 0x1e, 0x01, 0x15, 0x14, 0x06, 0x01, 0x33, 0x03, 0x23, + 0x07, 0x33, 0x03, 0x23, 0x01, 0xdd, 0xa3, 0x8e, 0x52, 0x2f, 0x2f, 0x3d, + 0x03, 0x72, 0xd8, 0x34, 0x3a, 0x10, 0x2f, 0x0c, 0x23, 0x20, 0x1d, 0x21, + 0x24, 0x21, 0x23, 0x23, 0x20, 0x1f, 0x1e, 0x1a, 0x2f, 0x19, 0x2a, 0x12, + 0x36, 0x2c, 0x36, 0x40, 0x29, 0x1d, 0x20, 0x2c, 0x45, 0x01, 0x35, 0x48, + 0xa0, 0x48, 0xac, 0x48, 0xa0, 0x48, 0x40, 0x3b, 0xd4, 0xdf, 0x30, 0x40, + 0x70, 0xaa, 0xaa, 0xf5, 0x2b, 0x1c, 0x21, 0x17, 0x1e, 0x1b, 0x17, 0x07, + 0x17, 0x17, 0x32, 0x18, 0x11, 0x07, 0x14, 0x18, 0x29, 0x22, 0x1a, 0x20, + 0x2f, 0x28, 0x21, 0x27, 0x05, 0x04, 0x05, 0x28, 0x23, 0x2d, 0x36, 0x01, + 0x55, 0xfe, 0xd4, 0x62, 0xfe, 0xd4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5a, + 0xff, 0x3e, 0x02, 0x0b, 0x02, 0x0d, 0x00, 0x1c, 0x00, 0x2a, 0x00, 0x3c, + 0xba, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x2c, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x1d, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x2f, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x24, 0x2f, 0x1b, 0xb9, 0x00, 0x24, 0x00, 0x1b, 0x3e, 0x59, + 0xb9, 0x00, 0x1d, 0x00, 0x09, 0xf4, 0xb9, 0x00, 0x0c, 0x00, 0x07, 0xf4, + 0xb8, 0x00, 0x00, 0x10, 0xb9, 0x00, 0x14, 0x00, 0x0b, 0xf4, 0x30, 0x31, + 0x05, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x37, 0x35, 0x33, 0x15, + 0x0e, 0x01, 0x1d, 0x01, 0x14, 0x16, 0x33, 0x32, 0x36, 0x37, 0x17, 0x0e, + 0x03, 0x03, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, + 0x01, 0x14, 0x06, 0x01, 0x2b, 0x30, 0x4d, 0x36, 0x1e, 0x22, 0x36, 0x45, + 0x23, 0x4f, 0x56, 0x62, 0x43, 0x3a, 0x3c, 0x48, 0x0e, 0x4b, 0x0a, 0x24, + 0x37, 0x4b, 0x1d, 0x29, 0x21, 0x21, 0x29, 0x29, 0x21, 0x21, 0xc2, 0x1b, + 0x31, 0x46, 0x2b, 0x2f, 0x47, 0x32, 0x1f, 0x06, 0x65, 0x9d, 0x04, 0x43, + 0x44, 0x0e, 0x38, 0x38, 0x42, 0x33, 0x1c, 0x21, 0x3b, 0x2c, 0x1a, 0x02, + 0x45, 0x22, 0x1a, 0x12, 0x1a, 0x22, 0x22, 0x1a, 0x12, 0x1a, 0x22, 0x00, + 0x00, 0x03, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x3a, 0x03, 0xb5, 0x00, 0x03, + 0x00, 0x0b, 0x00, 0x0f, 0x00, 0x00, 0x13, 0x37, 0x17, 0x07, 0x13, 0x27, + 0x23, 0x07, 0x23, 0x13, 0x33, 0x13, 0x01, 0x23, 0x03, 0x33, 0xbb, 0x49, + 0x55, 0x34, 0xbc, 0x3b, 0xf5, 0x3b, 0x57, 0xd6, 0x6f, 0xd6, 0xfe, 0xf6, + 0x09, 0x62, 0xcd, 0x03, 0x92, 0x23, 0xaa, 0x18, 0xfd, 0x0d, 0xc7, 0xc7, + 0x02, 0xba, 0xfd, 0x46, 0x02, 0x61, 0xfe, 0xaf, 0x00, 0x03, 0x00, 0x1f, + 0x00, 0x00, 0x02, 0x3a, 0x03, 0xb5, 0x00, 0x03, 0x00, 0x0b, 0x00, 0x0f, + 0x00, 0x00, 0x01, 0x27, 0x37, 0x17, 0x13, 0x27, 0x23, 0x07, 0x23, 0x13, + 0x33, 0x13, 0x01, 0x23, 0x03, 0x33, 0x01, 0x33, 0x34, 0x55, 0x49, 0x44, + 0x3b, 0xf5, 0x3b, 0x57, 0xd6, 0x6f, 0xd6, 0xfe, 0xf6, 0x09, 0x62, 0xcd, + 0x02, 0xf3, 0x18, 0xaa, 0x23, 0xfc, 0x6e, 0xc7, 0xc7, 0x02, 0xba, 0xfd, + 0x46, 0x02, 0x61, 0xfe, 0xaf, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x1f, + 0x00, 0x00, 0x02, 0x3a, 0x03, 0xa7, 0x00, 0x06, 0x00, 0x0e, 0x00, 0x12, + 0x00, 0x00, 0x01, 0x17, 0x07, 0x27, 0x07, 0x27, 0x37, 0x13, 0x27, 0x23, + 0x07, 0x23, 0x13, 0x33, 0x13, 0x01, 0x23, 0x03, 0x33, 0x01, 0x5e, 0x6f, + 0x2d, 0x75, 0x75, 0x2b, 0x6f, 0xe7, 0x3b, 0xf5, 0x3b, 0x57, 0xd6, 0x6f, + 0xd6, 0xfe, 0xf6, 0x09, 0x62, 0xcd, 0x03, 0xa7, 0x8f, 0x1f, 0x75, 0x75, + 0x1f, 0x8f, 0xfc, 0x59, 0xc7, 0xc7, 0x02, 0xba, 0xfd, 0x46, 0x02, 0x61, + 0xfe, 0xaf, 0x00, 0x00, 0x00, 0x03, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x3a, + 0x03, 0x82, 0x00, 0x19, 0x00, 0x21, 0x00, 0x25, 0x00, 0x00, 0x01, 0x22, + 0x26, 0x27, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, 0x33, + 0x32, 0x16, 0x17, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x37, 0x17, 0x0e, 0x01, + 0x13, 0x27, 0x23, 0x07, 0x23, 0x13, 0x33, 0x13, 0x01, 0x23, 0x03, 0x33, + 0x01, 0x75, 0x1a, 0x26, 0x10, 0x18, 0x21, 0x0d, 0x11, 0x1a, 0x0f, 0x21, + 0x0e, 0x2e, 0x23, 0x1a, 0x26, 0x10, 0x18, 0x21, 0x0d, 0x11, 0x1a, 0x0f, + 0x21, 0x0e, 0x2e, 0x49, 0x3b, 0xf5, 0x3b, 0x57, 0xd6, 0x6f, 0xd6, 0xfe, + 0xf6, 0x09, 0x62, 0xcd, 0x03, 0x0e, 0x12, 0x08, 0x0d, 0x0b, 0x0e, 0x0d, + 0x28, 0x14, 0x21, 0x12, 0x08, 0x0d, 0x0b, 0x0e, 0x0d, 0x28, 0x14, 0x21, + 0xfc, 0xf2, 0xc7, 0xc7, 0x02, 0xba, 0xfd, 0x46, 0x02, 0x61, 0xfe, 0xaf, + 0x00, 0x04, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x3a, 0x03, 0x7e, 0x00, 0x0d, + 0x00, 0x1b, 0x00, 0x23, 0x00, 0x27, 0x00, 0x00, 0x13, 0x22, 0x26, 0x3d, + 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x33, 0x22, + 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, + 0x13, 0x27, 0x23, 0x07, 0x23, 0x13, 0x33, 0x13, 0x01, 0x23, 0x03, 0x33, + 0xcf, 0x1f, 0x1a, 0x1a, 0x1f, 0x1f, 0x1a, 0x1a, 0x9b, 0x1f, 0x1a, 0x1a, + 0x1f, 0x1f, 0x1a, 0x1a, 0x39, 0x3b, 0xf5, 0x3b, 0x57, 0xd6, 0x6f, 0xd6, + 0xfe, 0xf6, 0x09, 0x62, 0xcd, 0x03, 0x14, 0x1a, 0x14, 0x0e, 0x14, 0x1a, + 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x1a, 0x14, + 0x0e, 0x14, 0x1a, 0xfc, 0xec, 0xc7, 0xc7, 0x02, 0xba, 0xfd, 0x46, 0x02, + 0x61, 0xfe, 0xaf, 0x00, 0x00, 0x04, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x3a, + 0x03, 0xd0, 0x00, 0x13, 0x00, 0x21, 0x00, 0x29, 0x00, 0x2d, 0x00, 0x00, + 0x01, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, + 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, + 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x13, 0x27, 0x23, 0x07, 0x23, 0x13, + 0x33, 0x13, 0x01, 0x23, 0x03, 0x33, 0x01, 0x2c, 0x18, 0x2b, 0x1f, 0x12, + 0x12, 0x1f, 0x2b, 0x18, 0x18, 0x2b, 0x1f, 0x12, 0x12, 0x1f, 0x2b, 0x18, + 0x1b, 0x1f, 0x1f, 0x1b, 0x1b, 0x1f, 0x1f, 0xd0, 0x3b, 0xf5, 0x3b, 0x57, + 0xd6, 0x6f, 0xd6, 0xfe, 0xf6, 0x09, 0x62, 0xcd, 0x02, 0xea, 0x11, 0x1f, + 0x2a, 0x19, 0x19, 0x2a, 0x1f, 0x11, 0x11, 0x1f, 0x2a, 0x19, 0x19, 0x2a, + 0x1f, 0x11, 0x31, 0x1d, 0x1a, 0x16, 0x1a, 0x1d, 0x1d, 0x1a, 0x16, 0x1a, + 0x1d, 0xfc, 0xe5, 0xc7, 0xc7, 0x02, 0xba, 0xfd, 0x46, 0x02, 0x61, 0xfe, + 0xaf, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x14, 0x00, 0x00, 0x02, 0x30, + 0x02, 0xba, 0x00, 0x0f, 0x00, 0x13, 0x00, 0x8c, 0xba, 0x00, 0x0f, 0x00, + 0x14, 0x00, 0x15, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0f, 0x10, 0xb8, 0x00, + 0x12, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, + 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, + 0x58, 0xb8, 0x00, 0x0e, 0x2f, 0x1b, 0xb9, 0x00, 0x0e, 0x00, 0x0f, 0x3e, + 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x02, 0x2f, 0x1b, 0xb9, + 0x00, 0x02, 0x00, 0x0f, 0x3e, 0x59, 0xba, 0x00, 0x11, 0x00, 0x05, 0x00, + 0x0e, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x11, 0x2f, 0xb9, 0x00, 0x01, 0x00, + 0x0b, 0xf4, 0xb8, 0x00, 0x05, 0x10, 0xb9, 0x00, 0x06, 0x00, 0x0b, 0xf4, + 0xba, 0x00, 0x0b, 0x00, 0x06, 0x00, 0x0e, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x0b, 0x2f, 0xb9, 0x00, 0x08, 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x0e, 0x10, + 0xb9, 0x00, 0x0d, 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x06, 0x10, 0xb8, 0x00, + 0x13, 0xd0, 0x30, 0x31, 0x25, 0x23, 0x07, 0x23, 0x13, 0x21, 0x15, 0x23, + 0x15, 0x33, 0x15, 0x23, 0x15, 0x33, 0x15, 0x23, 0x0b, 0x01, 0x33, 0x11, + 0x01, 0x38, 0x98, 0x38, 0x54, 0xce, 0x01, 0x4e, 0xa8, 0x9c, 0x9c, 0xa8, + 0xf8, 0x1f, 0x67, 0x86, 0xc9, 0xc9, 0x02, 0xba, 0x45, 0xf1, 0x45, 0xfa, + 0x45, 0x02, 0x7e, 0xfe, 0x90, 0x01, 0x70, 0x00, 0x00, 0x01, 0x00, 0x46, + 0xff, 0x31, 0x02, 0x1a, 0x02, 0xc6, 0x00, 0x3d, 0x00, 0x72, 0xba, 0x00, + 0x2b, 0x00, 0x3e, 0x00, 0x3f, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x33, 0x2f, 0x1b, 0xb9, 0x00, 0x33, 0x00, 0x1d, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x12, 0x2f, 0x1b, + 0xb9, 0x00, 0x12, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x33, 0x10, 0xb9, + 0x00, 0x00, 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x12, 0x10, 0xb9, 0x00, 0x07, + 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x12, 0x10, 0xb8, 0x00, 0x16, 0xdc, 0x41, + 0x07, 0x00, 0x0f, 0x00, 0x16, 0x00, 0x1f, 0x00, 0x16, 0x00, 0x2f, 0x00, + 0x16, 0x00, 0x03, 0x5d, 0xb8, 0x00, 0x2b, 0xdc, 0xb8, 0x00, 0x25, 0xdc, + 0xb9, 0x00, 0x1e, 0x00, 0x03, 0xf4, 0xb8, 0x00, 0x12, 0x10, 0xb8, 0x00, + 0x2d, 0xd0, 0x30, 0x31, 0x01, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x33, + 0x32, 0x3e, 0x02, 0x37, 0x17, 0x0e, 0x03, 0x0f, 0x01, 0x17, 0x36, 0x33, + 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x37, 0x1e, + 0x01, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x2f, 0x01, 0x37, 0x2e, 0x01, + 0x35, 0x34, 0x36, 0x33, 0x32, 0x1e, 0x02, 0x17, 0x07, 0x2e, 0x03, 0x01, + 0x43, 0x53, 0x51, 0x51, 0x53, 0x20, 0x2d, 0x21, 0x18, 0x09, 0x48, 0x0d, + 0x21, 0x31, 0x43, 0x2e, 0x09, 0x03, 0x13, 0x14, 0x1d, 0x27, 0x12, 0x1f, + 0x28, 0x16, 0x29, 0x2f, 0x0b, 0x26, 0x09, 0x1e, 0x16, 0x13, 0x19, 0x1a, + 0x2a, 0x1c, 0x0d, 0x6b, 0x68, 0x7d, 0x80, 0x30, 0x46, 0x32, 0x22, 0x0d, + 0x48, 0x09, 0x18, 0x21, 0x2d, 0x02, 0x7d, 0x7e, 0x69, 0x72, 0x69, 0x7e, + 0x12, 0x1f, 0x29, 0x17, 0x21, 0x1c, 0x36, 0x2b, 0x1b, 0x01, 0x31, 0x03, + 0x06, 0x22, 0x20, 0x15, 0x20, 0x14, 0x0a, 0x1b, 0x0e, 0x29, 0x0b, 0x11, + 0x0f, 0x10, 0x0e, 0x15, 0x06, 0x04, 0x44, 0x0f, 0xb6, 0xa1, 0xaf, 0xba, + 0x1a, 0x2c, 0x37, 0x1c, 0x21, 0x17, 0x29, 0x1f, 0x12, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x5a, 0x00, 0x00, 0x02, 0x08, 0x03, 0xb5, 0x00, 0x03, + 0x00, 0x0f, 0x00, 0x00, 0x13, 0x37, 0x17, 0x07, 0x03, 0x11, 0x21, 0x15, + 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0xc0, 0x49, 0x55, 0x34, + 0xd0, 0x01, 0xae, 0xfe, 0xa6, 0x01, 0x4e, 0xfe, 0xb2, 0x01, 0x5a, 0x03, + 0x92, 0x23, 0xaa, 0x18, 0xfd, 0x0d, 0x02, 0xba, 0x49, 0xeb, 0x49, 0xf4, + 0x49, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5a, 0x00, 0x00, 0x02, 0x08, + 0x03, 0xb5, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x00, 0x01, 0x27, 0x37, 0x17, + 0x01, 0x11, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, + 0x01, 0x38, 0x34, 0x55, 0x49, 0xfe, 0xb8, 0x01, 0xae, 0xfe, 0xa6, 0x01, + 0x4e, 0xfe, 0xb2, 0x01, 0x5a, 0x02, 0xf3, 0x18, 0xaa, 0x23, 0xfc, 0x6e, + 0x02, 0xba, 0x49, 0xeb, 0x49, 0xf4, 0x49, 0x00, 0x00, 0x02, 0x00, 0x5a, + 0x00, 0x00, 0x02, 0x08, 0x03, 0xa7, 0x00, 0x06, 0x00, 0x12, 0x00, 0x00, + 0x01, 0x17, 0x07, 0x27, 0x07, 0x27, 0x37, 0x03, 0x11, 0x21, 0x15, 0x21, + 0x15, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x01, 0x63, 0x6f, 0x2d, 0x75, + 0x75, 0x2b, 0x6f, 0xa5, 0x01, 0xae, 0xfe, 0xa6, 0x01, 0x4e, 0xfe, 0xb2, + 0x01, 0x5a, 0x03, 0xa7, 0x8f, 0x1f, 0x75, 0x75, 0x1f, 0x8f, 0xfc, 0x59, + 0x02, 0xba, 0x49, 0xeb, 0x49, 0xf4, 0x49, 0x00, 0x00, 0x03, 0x00, 0x5a, + 0x00, 0x00, 0x02, 0x08, 0x03, 0x7e, 0x00, 0x0d, 0x00, 0x1b, 0x00, 0x27, + 0x00, 0x00, 0x13, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, + 0x1d, 0x01, 0x14, 0x06, 0x33, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, + 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x01, 0x11, 0x21, 0x15, 0x21, 0x15, + 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0xd4, 0x1f, 0x1a, 0x1a, 0x1f, 0x1f, + 0x1a, 0x1a, 0x9b, 0x1f, 0x1a, 0x1a, 0x1f, 0x1f, 0x1a, 0x1a, 0xfe, 0xad, + 0x01, 0xae, 0xfe, 0xa6, 0x01, 0x4e, 0xfe, 0xb2, 0x01, 0x5a, 0x03, 0x14, + 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x1a, 0x14, + 0x0e, 0x14, 0x1a, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0xfc, 0xec, 0x02, 0xba, + 0x49, 0xeb, 0x49, 0xf4, 0x49, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x54, + 0x00, 0x00, 0x02, 0x04, 0x03, 0xb5, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x00, + 0x13, 0x37, 0x17, 0x07, 0x03, 0x35, 0x33, 0x11, 0x23, 0x35, 0x21, 0x15, + 0x23, 0x11, 0x33, 0x15, 0xbb, 0x49, 0x55, 0x34, 0xd1, 0xae, 0xae, 0x01, + 0xb0, 0xae, 0xae, 0x03, 0x92, 0x23, 0xaa, 0x18, 0xfd, 0x0d, 0x43, 0x02, + 0x34, 0x43, 0x43, 0xfd, 0xcc, 0x43, 0x00, 0x00, 0x00, 0x02, 0x00, 0x54, + 0x00, 0x00, 0x02, 0x04, 0x03, 0xb5, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x00, + 0x01, 0x27, 0x37, 0x17, 0x01, 0x35, 0x33, 0x11, 0x23, 0x35, 0x21, 0x15, + 0x23, 0x11, 0x33, 0x15, 0x01, 0x33, 0x34, 0x55, 0x49, 0xfe, 0xb7, 0xae, + 0xae, 0x01, 0xb0, 0xae, 0xae, 0x02, 0xf3, 0x18, 0xaa, 0x23, 0xfc, 0x6e, + 0x43, 0x02, 0x34, 0x43, 0x43, 0xfd, 0xcc, 0x43, 0x00, 0x02, 0x00, 0x54, + 0x00, 0x00, 0x02, 0x04, 0x03, 0xa7, 0x00, 0x06, 0x00, 0x12, 0x00, 0x00, + 0x01, 0x17, 0x07, 0x27, 0x07, 0x27, 0x37, 0x03, 0x35, 0x33, 0x11, 0x23, + 0x35, 0x21, 0x15, 0x23, 0x11, 0x33, 0x15, 0x01, 0x5e, 0x6f, 0x2d, 0x75, + 0x75, 0x2b, 0x6f, 0xa6, 0xae, 0xae, 0x01, 0xb0, 0xae, 0xae, 0x03, 0xa7, + 0x8f, 0x1f, 0x75, 0x75, 0x1f, 0x8f, 0xfc, 0x59, 0x43, 0x02, 0x34, 0x43, + 0x43, 0xfd, 0xcc, 0x43, 0x00, 0x03, 0x00, 0x54, 0x00, 0x00, 0x02, 0x04, + 0x03, 0x7e, 0x00, 0x0d, 0x00, 0x1b, 0x00, 0x27, 0x00, 0x00, 0x13, 0x22, + 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, + 0x33, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, + 0x14, 0x06, 0x01, 0x35, 0x33, 0x11, 0x23, 0x35, 0x21, 0x15, 0x23, 0x11, + 0x33, 0x15, 0xcf, 0x1f, 0x1a, 0x1a, 0x1f, 0x1f, 0x1a, 0x1a, 0x9b, 0x1f, + 0x1a, 0x1a, 0x1f, 0x1f, 0x1a, 0x1a, 0xfe, 0xac, 0xae, 0xae, 0x01, 0xb0, + 0xae, 0xae, 0x03, 0x14, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x1a, 0x14, 0x0e, + 0x14, 0x1a, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x1a, 0x14, 0x0e, 0x14, 0x1a, + 0xfc, 0xec, 0x43, 0x02, 0x34, 0x43, 0x43, 0xfd, 0xcc, 0x43, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x16, 0x00, 0x00, 0x02, 0x20, 0x02, 0xba, 0x00, 0x0c, + 0x00, 0x1a, 0x00, 0x00, 0x13, 0x23, 0x35, 0x33, 0x11, 0x33, 0x32, 0x16, + 0x15, 0x14, 0x06, 0x2b, 0x01, 0x37, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, + 0x2b, 0x01, 0x15, 0x33, 0x15, 0x23, 0x11, 0x66, 0x50, 0x50, 0xbc, 0x80, + 0x7e, 0x7e, 0x80, 0xbc, 0xb8, 0x54, 0x55, 0x55, 0x54, 0x64, 0x8d, 0x8d, + 0x01, 0x50, 0x40, 0x01, 0x2a, 0xb0, 0xad, 0xad, 0xb0, 0x49, 0x74, 0x6a, + 0x6c, 0x6a, 0x74, 0xe1, 0x40, 0xfe, 0xf9, 0x00, 0x00, 0x02, 0x00, 0x50, + 0x00, 0x00, 0x02, 0x08, 0x03, 0x82, 0x00, 0x19, 0x00, 0x25, 0x00, 0x00, + 0x01, 0x22, 0x26, 0x27, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, + 0x01, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x37, 0x17, + 0x0e, 0x01, 0x07, 0x23, 0x11, 0x23, 0x11, 0x33, 0x13, 0x33, 0x11, 0x33, + 0x11, 0x23, 0x01, 0x75, 0x1a, 0x26, 0x10, 0x18, 0x21, 0x0d, 0x11, 0x1a, + 0x0f, 0x21, 0x0e, 0x2e, 0x23, 0x1a, 0x26, 0x10, 0x18, 0x21, 0x0d, 0x11, + 0x1a, 0x0f, 0x21, 0x0e, 0x2e, 0xf5, 0x07, 0x4c, 0x77, 0xee, 0x07, 0x4c, + 0x77, 0x03, 0x0e, 0x12, 0x08, 0x0d, 0x0b, 0x0e, 0x0d, 0x28, 0x14, 0x21, + 0x12, 0x08, 0x0d, 0x0b, 0x0e, 0x0d, 0x28, 0x14, 0x21, 0xc2, 0xfd, 0xb4, + 0x02, 0xba, 0xfd, 0xb4, 0x02, 0x4c, 0xfd, 0x46, 0x00, 0x03, 0x00, 0x38, + 0xff, 0xf4, 0x02, 0x20, 0x03, 0xb5, 0x00, 0x03, 0x00, 0x17, 0x00, 0x2d, + 0x00, 0x00, 0x13, 0x37, 0x17, 0x07, 0x13, 0x22, 0x2e, 0x02, 0x35, 0x34, + 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, + 0x3e, 0x02, 0x3d, 0x01, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x1d, + 0x01, 0x14, 0x1e, 0x02, 0xbb, 0x49, 0x55, 0x34, 0x07, 0x40, 0x5c, 0x3c, + 0x1c, 0x1c, 0x3c, 0x5c, 0x40, 0x40, 0x5c, 0x3c, 0x1c, 0x1c, 0x3c, 0x5c, + 0x40, 0x2a, 0x3a, 0x26, 0x11, 0x11, 0x26, 0x3a, 0x2a, 0x2a, 0x3a, 0x26, + 0x11, 0x11, 0x26, 0x3a, 0x03, 0x92, 0x23, 0xaa, 0x18, 0xfd, 0x01, 0x31, + 0x5c, 0x86, 0x56, 0x55, 0x87, 0x5c, 0x31, 0x31, 0x5c, 0x87, 0x55, 0x56, + 0x86, 0x5c, 0x31, 0x49, 0x21, 0x3c, 0x55, 0x35, 0x72, 0x34, 0x56, 0x3c, + 0x21, 0x21, 0x3c, 0x56, 0x34, 0x72, 0x35, 0x55, 0x3c, 0x21, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x38, 0xff, 0xf4, 0x02, 0x20, 0x03, 0xb5, 0x00, 0x03, + 0x00, 0x17, 0x00, 0x2d, 0x00, 0x00, 0x01, 0x27, 0x37, 0x17, 0x03, 0x22, + 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, + 0x0e, 0x02, 0x27, 0x32, 0x3e, 0x02, 0x3d, 0x01, 0x34, 0x2e, 0x02, 0x23, + 0x22, 0x0e, 0x02, 0x1d, 0x01, 0x14, 0x1e, 0x02, 0x01, 0x33, 0x34, 0x55, + 0x49, 0x71, 0x40, 0x5c, 0x3c, 0x1c, 0x1c, 0x3c, 0x5c, 0x40, 0x40, 0x5c, + 0x3c, 0x1c, 0x1c, 0x3c, 0x5c, 0x40, 0x2a, 0x3a, 0x26, 0x11, 0x11, 0x26, + 0x3a, 0x2a, 0x2a, 0x3a, 0x26, 0x11, 0x11, 0x26, 0x3a, 0x02, 0xf3, 0x18, + 0xaa, 0x23, 0xfc, 0x62, 0x31, 0x5c, 0x86, 0x56, 0x55, 0x87, 0x5c, 0x31, + 0x31, 0x5c, 0x87, 0x55, 0x56, 0x86, 0x5c, 0x31, 0x49, 0x21, 0x3c, 0x55, + 0x35, 0x72, 0x34, 0x56, 0x3c, 0x21, 0x21, 0x3c, 0x56, 0x34, 0x72, 0x35, + 0x55, 0x3c, 0x21, 0x00, 0x00, 0x03, 0x00, 0x38, 0xff, 0xf4, 0x02, 0x20, + 0x03, 0xa7, 0x00, 0x06, 0x00, 0x1a, 0x00, 0x30, 0x00, 0x00, 0x01, 0x17, + 0x07, 0x27, 0x07, 0x27, 0x37, 0x13, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, + 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, 0x3e, + 0x02, 0x3d, 0x01, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, 0x02, 0x1d, 0x01, + 0x14, 0x1e, 0x02, 0x01, 0x5e, 0x6f, 0x2d, 0x75, 0x75, 0x2b, 0x6f, 0x32, + 0x40, 0x5c, 0x3c, 0x1c, 0x1c, 0x3c, 0x5c, 0x40, 0x40, 0x5c, 0x3c, 0x1c, + 0x1c, 0x3c, 0x5c, 0x40, 0x2a, 0x3a, 0x26, 0x11, 0x11, 0x26, 0x3a, 0x2a, + 0x2a, 0x3a, 0x26, 0x11, 0x11, 0x26, 0x3a, 0x03, 0xa7, 0x8f, 0x1f, 0x75, + 0x75, 0x1f, 0x8f, 0xfc, 0x4d, 0x31, 0x5c, 0x86, 0x56, 0x55, 0x87, 0x5c, + 0x31, 0x31, 0x5c, 0x87, 0x55, 0x56, 0x86, 0x5c, 0x31, 0x49, 0x21, 0x3c, + 0x55, 0x35, 0x72, 0x34, 0x56, 0x3c, 0x21, 0x21, 0x3c, 0x56, 0x34, 0x72, + 0x35, 0x55, 0x3c, 0x21, 0x00, 0x03, 0x00, 0x38, 0xff, 0xf4, 0x02, 0x20, + 0x03, 0x82, 0x00, 0x19, 0x00, 0x2d, 0x00, 0x43, 0x00, 0x00, 0x01, 0x22, + 0x26, 0x27, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, 0x33, + 0x32, 0x16, 0x17, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x37, 0x17, 0x0e, 0x01, + 0x03, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, + 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, 0x3e, 0x02, 0x3d, 0x01, 0x34, 0x2e, + 0x02, 0x23, 0x22, 0x0e, 0x02, 0x1d, 0x01, 0x14, 0x1e, 0x02, 0x01, 0x75, + 0x1a, 0x26, 0x10, 0x18, 0x21, 0x0d, 0x11, 0x1a, 0x0f, 0x21, 0x0e, 0x2e, + 0x23, 0x1a, 0x26, 0x10, 0x18, 0x21, 0x0d, 0x11, 0x1a, 0x0f, 0x21, 0x0e, + 0x2e, 0x6c, 0x40, 0x5c, 0x3c, 0x1c, 0x1c, 0x3c, 0x5c, 0x40, 0x40, 0x5c, + 0x3c, 0x1c, 0x1c, 0x3c, 0x5c, 0x40, 0x2a, 0x3a, 0x26, 0x11, 0x11, 0x26, + 0x3a, 0x2a, 0x2a, 0x3a, 0x26, 0x11, 0x11, 0x26, 0x3a, 0x03, 0x0e, 0x12, + 0x08, 0x0d, 0x0b, 0x0e, 0x0d, 0x28, 0x14, 0x21, 0x12, 0x08, 0x0d, 0x0b, + 0x0e, 0x0d, 0x28, 0x14, 0x21, 0xfc, 0xe6, 0x31, 0x5c, 0x86, 0x56, 0x55, + 0x87, 0x5c, 0x31, 0x31, 0x5c, 0x87, 0x55, 0x56, 0x86, 0x5c, 0x31, 0x49, + 0x21, 0x3c, 0x55, 0x35, 0x72, 0x34, 0x56, 0x3c, 0x21, 0x21, 0x3c, 0x56, + 0x34, 0x72, 0x35, 0x55, 0x3c, 0x21, 0x00, 0x00, 0x00, 0x04, 0x00, 0x38, + 0xff, 0xf4, 0x02, 0x20, 0x03, 0x7e, 0x00, 0x0d, 0x00, 0x1b, 0x00, 0x2f, + 0x00, 0x45, 0x00, 0x00, 0x13, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, + 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x33, 0x22, 0x26, 0x3d, 0x01, 0x34, + 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x03, 0x22, 0x2e, 0x02, + 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, + 0x27, 0x32, 0x3e, 0x02, 0x3d, 0x01, 0x34, 0x2e, 0x02, 0x23, 0x22, 0x0e, + 0x02, 0x1d, 0x01, 0x14, 0x1e, 0x02, 0xcf, 0x1f, 0x1a, 0x1a, 0x1f, 0x1f, + 0x1a, 0x1a, 0x9b, 0x1f, 0x1a, 0x1a, 0x1f, 0x1f, 0x1a, 0x1a, 0x7c, 0x40, + 0x5c, 0x3c, 0x1c, 0x1c, 0x3c, 0x5c, 0x40, 0x40, 0x5c, 0x3c, 0x1c, 0x1c, + 0x3c, 0x5c, 0x40, 0x2a, 0x3a, 0x26, 0x11, 0x11, 0x26, 0x3a, 0x2a, 0x2a, + 0x3a, 0x26, 0x11, 0x11, 0x26, 0x3a, 0x03, 0x14, 0x1a, 0x14, 0x0e, 0x14, + 0x1a, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x1a, + 0x14, 0x0e, 0x14, 0x1a, 0xfc, 0xe0, 0x31, 0x5c, 0x86, 0x56, 0x55, 0x87, + 0x5c, 0x31, 0x31, 0x5c, 0x87, 0x55, 0x56, 0x86, 0x5c, 0x31, 0x49, 0x21, + 0x3c, 0x55, 0x35, 0x72, 0x34, 0x56, 0x3c, 0x21, 0x21, 0x3c, 0x56, 0x34, + 0x72, 0x35, 0x55, 0x3c, 0x21, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x58, + 0x00, 0x5d, 0x02, 0x00, 0x02, 0x05, 0x00, 0x0b, 0x00, 0x2f, 0xba, 0x00, + 0x00, 0x00, 0x0c, 0x00, 0x0d, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x05, 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1b, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x07, 0x2f, 0x1b, + 0xb9, 0x00, 0x07, 0x00, 0x1b, 0x3e, 0x59, 0x30, 0x31, 0x01, 0x07, 0x27, + 0x37, 0x27, 0x37, 0x17, 0x37, 0x17, 0x07, 0x17, 0x07, 0x01, 0x2c, 0xa3, + 0x31, 0xa3, 0xa3, 0x31, 0xa3, 0xa3, 0x31, 0xa3, 0xa3, 0x31, 0x01, 0x00, + 0xa3, 0x31, 0xa3, 0xa3, 0x31, 0xa3, 0xa3, 0x31, 0xa3, 0xa3, 0x31, 0x00, + 0x00, 0x03, 0x00, 0x2f, 0xff, 0xd4, 0x02, 0x29, 0x02, 0xe6, 0x00, 0x19, + 0x00, 0x26, 0x00, 0x33, 0x00, 0x9f, 0xba, 0x00, 0x00, 0x00, 0x34, 0x00, + 0x35, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x21, 0xd0, 0xb8, 0x00, 0x00, 0x10, + 0xb8, 0x00, 0x27, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, + 0x0d, 0x2f, 0x1b, 0xb9, 0x00, 0x0d, 0x00, 0x1d, 0x3e, 0x59, 0xb8, 0x00, + 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, 0x00, + 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x0d, 0x10, 0xb9, 0x00, 0x21, 0x00, 0x0b, + 0xf4, 0xba, 0x00, 0x02, 0x00, 0x00, 0x00, 0x21, 0x11, 0x12, 0x39, 0xba, + 0x00, 0x05, 0x00, 0x00, 0x00, 0x21, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x00, + 0x10, 0xb9, 0x00, 0x27, 0x00, 0x0b, 0xf4, 0xba, 0x00, 0x0f, 0x00, 0x0d, + 0x00, 0x27, 0x11, 0x12, 0x39, 0xba, 0x00, 0x12, 0x00, 0x0d, 0x00, 0x27, + 0x11, 0x12, 0x39, 0xba, 0x00, 0x1d, 0x00, 0x27, 0x00, 0x0d, 0x11, 0x12, + 0x39, 0xba, 0x00, 0x1e, 0x00, 0x21, 0x00, 0x00, 0x11, 0x12, 0x39, 0xba, + 0x00, 0x30, 0x00, 0x21, 0x00, 0x00, 0x11, 0x12, 0x39, 0xba, 0x00, 0x31, + 0x00, 0x27, 0x00, 0x0d, 0x11, 0x12, 0x39, 0x30, 0x31, 0x05, 0x22, 0x27, + 0x07, 0x27, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x17, + 0x37, 0x17, 0x07, 0x1e, 0x01, 0x15, 0x14, 0x0e, 0x02, 0x03, 0x14, 0x16, + 0x17, 0x13, 0x2e, 0x01, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x13, 0x32, 0x3e, + 0x02, 0x3d, 0x01, 0x34, 0x26, 0x27, 0x03, 0x1e, 0x01, 0x01, 0x2c, 0x5b, + 0x37, 0x2f, 0x3c, 0x3c, 0x1a, 0x19, 0x1c, 0x3c, 0x5c, 0x40, 0x5a, 0x38, + 0x2f, 0x3c, 0x3c, 0x1a, 0x19, 0x1c, 0x3c, 0x5c, 0xdb, 0x06, 0x08, 0xf8, + 0x13, 0x35, 0x23, 0x2a, 0x3a, 0x26, 0x11, 0x9b, 0x2a, 0x3a, 0x26, 0x11, + 0x06, 0x08, 0xf8, 0x13, 0x35, 0x0c, 0x30, 0x50, 0x24, 0x66, 0x2e, 0x80, + 0x51, 0x55, 0x87, 0x5c, 0x31, 0x30, 0x50, 0x24, 0x66, 0x2e, 0x80, 0x51, + 0x56, 0x86, 0x5c, 0x31, 0x01, 0x30, 0x22, 0x3b, 0x19, 0x01, 0xa1, 0x16, + 0x18, 0x21, 0x3c, 0x56, 0x34, 0xfe, 0xa7, 0x21, 0x3c, 0x55, 0x35, 0x72, + 0x22, 0x3b, 0x19, 0xfe, 0x5f, 0x16, 0x18, 0x00, 0x00, 0x02, 0x00, 0x50, + 0xff, 0xf4, 0x02, 0x08, 0x03, 0xb5, 0x00, 0x03, 0x00, 0x1d, 0x00, 0x00, + 0x13, 0x37, 0x17, 0x0f, 0x01, 0x11, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, + 0x02, 0x35, 0x11, 0x33, 0x11, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, + 0x35, 0x11, 0xbb, 0x49, 0x55, 0x34, 0x81, 0x06, 0x1a, 0x37, 0x31, 0x31, + 0x37, 0x1a, 0x06, 0x54, 0x0f, 0x2f, 0x57, 0x47, 0x47, 0x57, 0x2f, 0x0f, + 0x03, 0x92, 0x23, 0xaa, 0x18, 0x39, 0xfe, 0x5d, 0x33, 0x50, 0x39, 0x1e, + 0x1e, 0x39, 0x50, 0x33, 0x01, 0xa3, 0xfe, 0x71, 0x4e, 0x74, 0x4e, 0x27, + 0x27, 0x4e, 0x74, 0x4e, 0x01, 0x8f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x50, + 0xff, 0xf4, 0x02, 0x08, 0x03, 0xb5, 0x00, 0x03, 0x00, 0x1d, 0x00, 0x00, + 0x01, 0x27, 0x37, 0x17, 0x07, 0x11, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, + 0x02, 0x35, 0x11, 0x33, 0x11, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, + 0x35, 0x11, 0x01, 0x33, 0x34, 0x55, 0x49, 0xf9, 0x06, 0x1a, 0x37, 0x31, + 0x31, 0x37, 0x1a, 0x06, 0x54, 0x0f, 0x2f, 0x57, 0x47, 0x47, 0x57, 0x2f, + 0x0f, 0x02, 0xf3, 0x18, 0xaa, 0x23, 0xd8, 0xfe, 0x5d, 0x33, 0x50, 0x39, + 0x1e, 0x1e, 0x39, 0x50, 0x33, 0x01, 0xa3, 0xfe, 0x71, 0x4e, 0x74, 0x4e, + 0x27, 0x27, 0x4e, 0x74, 0x4e, 0x01, 0x8f, 0x00, 0x00, 0x02, 0x00, 0x50, + 0xff, 0xf4, 0x02, 0x08, 0x03, 0xa7, 0x00, 0x06, 0x00, 0x20, 0x00, 0x00, + 0x01, 0x17, 0x07, 0x27, 0x07, 0x27, 0x37, 0x07, 0x11, 0x14, 0x1e, 0x02, + 0x33, 0x32, 0x3e, 0x02, 0x35, 0x11, 0x33, 0x11, 0x14, 0x0e, 0x02, 0x23, + 0x22, 0x2e, 0x02, 0x35, 0x11, 0x01, 0x5e, 0x6f, 0x2d, 0x75, 0x75, 0x2b, + 0x6f, 0x56, 0x06, 0x1a, 0x37, 0x31, 0x31, 0x37, 0x1a, 0x06, 0x54, 0x0f, + 0x2f, 0x57, 0x47, 0x47, 0x57, 0x2f, 0x0f, 0x03, 0xa7, 0x8f, 0x1f, 0x75, + 0x75, 0x1f, 0x8f, 0xed, 0xfe, 0x5d, 0x33, 0x50, 0x39, 0x1e, 0x1e, 0x39, + 0x50, 0x33, 0x01, 0xa3, 0xfe, 0x71, 0x4e, 0x74, 0x4e, 0x27, 0x27, 0x4e, + 0x74, 0x4e, 0x01, 0x8f, 0x00, 0x03, 0x00, 0x50, 0xff, 0xf4, 0x02, 0x08, + 0x03, 0x7e, 0x00, 0x0d, 0x00, 0x1b, 0x00, 0x35, 0x00, 0x00, 0x13, 0x22, + 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, + 0x33, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, + 0x14, 0x06, 0x05, 0x11, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x3e, 0x02, 0x35, + 0x11, 0x33, 0x11, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x2e, 0x02, 0x35, 0x11, + 0xcf, 0x1f, 0x1a, 0x1a, 0x1f, 0x1f, 0x1a, 0x1a, 0x9b, 0x1f, 0x1a, 0x1a, + 0x1f, 0x1f, 0x1a, 0x1a, 0xfe, 0xfc, 0x06, 0x1a, 0x37, 0x31, 0x31, 0x37, + 0x1a, 0x06, 0x54, 0x0f, 0x2f, 0x57, 0x47, 0x47, 0x57, 0x2f, 0x0f, 0x03, + 0x14, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x1a, + 0x14, 0x0e, 0x14, 0x1a, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x5a, 0xfe, 0x5d, + 0x33, 0x50, 0x39, 0x1e, 0x1e, 0x39, 0x50, 0x33, 0x01, 0xa3, 0xfe, 0x71, + 0x4e, 0x74, 0x4e, 0x27, 0x27, 0x4e, 0x74, 0x4e, 0x01, 0x8f, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x11, 0x00, 0x00, 0x02, 0x47, 0x03, 0xb5, 0x00, 0x03, + 0x00, 0x0f, 0x00, 0x00, 0x01, 0x27, 0x37, 0x17, 0x03, 0x11, 0x03, 0x33, + 0x1f, 0x01, 0x33, 0x3f, 0x01, 0x33, 0x03, 0x11, 0x01, 0x33, 0x34, 0x55, + 0x49, 0x9b, 0xf1, 0x60, 0x64, 0x55, 0x04, 0x57, 0x64, 0x5e, 0xf1, 0x02, + 0xf3, 0x18, 0xaa, 0x23, 0xfc, 0x6e, 0x01, 0x12, 0x01, 0xa8, 0xb6, 0x9f, + 0x9f, 0xb6, 0xfe, 0x58, 0xfe, 0xee, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5a, + 0x00, 0x00, 0x02, 0x1f, 0x02, 0xba, 0x00, 0x0c, 0x00, 0x16, 0x00, 0x63, + 0xba, 0x00, 0x0a, 0x00, 0x17, 0x00, 0x18, 0x11, 0x12, 0x39, 0xb8, 0x00, + 0x0a, 0x10, 0xb8, 0x00, 0x0e, 0xd0, 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x01, 0x2f, 0x1b, 0xb9, 0x00, 0x01, 0x00, 0x1d, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, + 0x00, 0x00, 0x0f, 0x3e, 0x59, 0xba, 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x03, 0x2f, 0xba, 0x00, 0x0b, 0x00, 0x00, + 0x00, 0x01, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x0b, 0x2f, 0xb9, 0x00, 0x0d, + 0x00, 0x0b, 0xf4, 0xb8, 0x00, 0x03, 0x10, 0xb9, 0x00, 0x16, 0x00, 0x0b, + 0xf4, 0x30, 0x31, 0x33, 0x11, 0x33, 0x15, 0x33, 0x32, 0x16, 0x15, 0x14, + 0x06, 0x2b, 0x01, 0x15, 0x35, 0x33, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, + 0x2b, 0x01, 0x5a, 0x54, 0xaa, 0x61, 0x66, 0x66, 0x61, 0xaa, 0xaa, 0x35, + 0x3b, 0x3b, 0x35, 0xaa, 0x02, 0xba, 0x91, 0x6b, 0x5c, 0x5c, 0x6b, 0x9b, + 0xe4, 0x34, 0x30, 0x34, 0x30, 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x66, + 0xff, 0x38, 0x02, 0x3c, 0x02, 0xe4, 0x00, 0x22, 0x00, 0x8d, 0xba, 0x00, + 0x1d, 0x00, 0x23, 0x00, 0x24, 0x11, 0x12, 0x39, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x04, 0x2f, 0x1b, 0xb9, 0x00, 0x04, 0x00, 0x1f, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x08, 0x2f, 0x1b, + 0xb9, 0x00, 0x08, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, + 0xb8, 0x00, 0x13, 0x2f, 0x1b, 0xb9, 0x00, 0x13, 0x00, 0x11, 0x3e, 0x59, + 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x22, 0x2f, 0x1b, 0xb9, 0x00, + 0x22, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x04, 0x10, 0xb9, 0x00, 0x07, + 0x00, 0x08, 0xf4, 0xba, 0x00, 0x1f, 0x00, 0x08, 0x00, 0x22, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x1f, 0x2f, 0xb9, 0x00, 0x1e, 0x00, 0x08, 0xf4, 0xba, + 0x00, 0x0b, 0x00, 0x1f, 0x00, 0x1e, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x13, + 0x10, 0xb9, 0x00, 0x16, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x08, 0x10, 0xb9, + 0x00, 0x21, 0x00, 0x08, 0xf4, 0x30, 0x31, 0x33, 0x11, 0x34, 0x36, 0x3b, + 0x01, 0x15, 0x23, 0x15, 0x21, 0x15, 0x07, 0x1e, 0x01, 0x15, 0x14, 0x0e, + 0x02, 0x2b, 0x01, 0x35, 0x33, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x2b, + 0x01, 0x35, 0x37, 0x21, 0x11, 0x66, 0x37, 0x3b, 0x89, 0xab, 0x01, 0x57, + 0xad, 0x67, 0x75, 0x25, 0x44, 0x61, 0x3c, 0x42, 0x42, 0x5a, 0x57, 0x5d, + 0x66, 0x10, 0xb0, 0xfe, 0xf2, 0x02, 0x6e, 0x34, 0x42, 0x45, 0x9b, 0x4f, + 0xe1, 0x07, 0x60, 0x5f, 0x34, 0x50, 0x36, 0x1c, 0x44, 0x40, 0x47, 0x19, + 0x43, 0x39, 0x44, 0xe4, 0xfe, 0x40, 0x00, 0x00, 0xff, 0xff, 0x00, 0x42, + 0xff, 0xf4, 0x02, 0x26, 0x03, 0x0b, 0x12, 0x26, 0x00, 0x44, 0x00, 0x00, + 0x10, 0x06, 0x00, 0x43, 0xf0, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x42, + 0xff, 0xf4, 0x02, 0x26, 0x03, 0x0b, 0x12, 0x26, 0x00, 0x44, 0x00, 0x00, + 0x10, 0x06, 0x00, 0x76, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x42, + 0xff, 0xf4, 0x02, 0x26, 0x02, 0xfd, 0x00, 0x06, 0x00, 0x28, 0x00, 0x36, + 0x00, 0x00, 0x01, 0x17, 0x07, 0x27, 0x07, 0x27, 0x37, 0x01, 0x22, 0x26, + 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x3b, 0x01, + 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x03, 0x33, 0x32, + 0x16, 0x15, 0x11, 0x33, 0x15, 0x25, 0x32, 0x3e, 0x02, 0x3d, 0x01, 0x23, + 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x4e, 0x6f, 0x2d, 0x75, 0x75, + 0x2b, 0x6f, 0x01, 0x05, 0x2f, 0x28, 0x05, 0x05, 0x11, 0x4b, 0x3f, 0x51, + 0x60, 0x69, 0x75, 0x6e, 0x40, 0x3b, 0x34, 0x42, 0x14, 0x36, 0x0a, 0x22, + 0x32, 0x40, 0x27, 0x5b, 0x6b, 0x48, 0xfe, 0xdb, 0x1f, 0x33, 0x26, 0x15, + 0x6e, 0x48, 0x42, 0x39, 0x02, 0xfd, 0x8f, 0x1f, 0x75, 0x75, 0x1f, 0x8f, + 0xfd, 0x03, 0x30, 0x24, 0x2d, 0x33, 0x54, 0x49, 0x48, 0x4e, 0x33, 0x39, + 0x39, 0x29, 0x23, 0x28, 0x14, 0x26, 0x1d, 0x11, 0x5c, 0x52, 0xfe, 0xe4, + 0x46, 0x37, 0x0f, 0x19, 0x23, 0x14, 0x55, 0x28, 0x26, 0x15, 0x28, 0x29, + 0x00, 0x03, 0x00, 0x42, 0xff, 0xf4, 0x02, 0x26, 0x02, 0xd8, 0x00, 0x19, + 0x00, 0x3b, 0x00, 0x49, 0x00, 0x00, 0x01, 0x22, 0x26, 0x27, 0x2e, 0x01, + 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x17, 0x1e, + 0x01, 0x33, 0x32, 0x36, 0x37, 0x17, 0x0e, 0x01, 0x13, 0x22, 0x26, 0x27, + 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x3b, 0x01, 0x35, + 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x03, 0x33, 0x32, 0x16, + 0x15, 0x11, 0x33, 0x15, 0x25, 0x32, 0x3e, 0x02, 0x3d, 0x01, 0x23, 0x22, + 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x65, 0x1a, 0x26, 0x10, 0x18, 0x21, + 0x0d, 0x11, 0x1a, 0x0f, 0x21, 0x0e, 0x2e, 0x23, 0x1a, 0x26, 0x10, 0x18, + 0x21, 0x0d, 0x11, 0x1a, 0x0f, 0x21, 0x0e, 0x2e, 0x67, 0x2f, 0x28, 0x05, + 0x05, 0x11, 0x4b, 0x3f, 0x51, 0x60, 0x69, 0x75, 0x6e, 0x40, 0x3b, 0x34, + 0x42, 0x14, 0x36, 0x0a, 0x22, 0x32, 0x40, 0x27, 0x5b, 0x6b, 0x48, 0xfe, + 0xdb, 0x1f, 0x33, 0x26, 0x15, 0x6e, 0x48, 0x42, 0x39, 0x02, 0x64, 0x12, + 0x08, 0x0d, 0x0b, 0x0e, 0x0d, 0x28, 0x14, 0x21, 0x12, 0x08, 0x0d, 0x0b, + 0x0e, 0x0d, 0x28, 0x14, 0x21, 0xfd, 0x9c, 0x30, 0x24, 0x2d, 0x33, 0x54, + 0x49, 0x48, 0x4e, 0x33, 0x39, 0x39, 0x29, 0x23, 0x28, 0x14, 0x26, 0x1d, + 0x11, 0x5c, 0x52, 0xfe, 0xe4, 0x46, 0x37, 0x0f, 0x19, 0x23, 0x14, 0x55, + 0x28, 0x26, 0x15, 0x28, 0x29, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x42, + 0xff, 0xf4, 0x02, 0x26, 0x02, 0xd4, 0x12, 0x26, 0x00, 0x44, 0x00, 0x00, + 0x10, 0x06, 0x00, 0x6a, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x42, + 0xff, 0xf4, 0x02, 0x26, 0x03, 0x26, 0x00, 0x13, 0x00, 0x21, 0x00, 0x43, + 0x00, 0x51, 0x00, 0x00, 0x01, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, + 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, 0x36, 0x3d, + 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x13, 0x22, + 0x26, 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x3b, + 0x01, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x03, 0x33, + 0x32, 0x16, 0x15, 0x11, 0x33, 0x15, 0x25, 0x32, 0x3e, 0x02, 0x3d, 0x01, + 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x1c, 0x18, 0x2b, 0x1f, + 0x12, 0x12, 0x1f, 0x2b, 0x18, 0x18, 0x2b, 0x1f, 0x12, 0x12, 0x1f, 0x2b, + 0x18, 0x1b, 0x1f, 0x1f, 0x1b, 0x1b, 0x1f, 0x1f, 0xee, 0x2f, 0x28, 0x05, + 0x05, 0x11, 0x4b, 0x3f, 0x51, 0x60, 0x69, 0x75, 0x6e, 0x40, 0x3b, 0x34, + 0x42, 0x14, 0x36, 0x0a, 0x22, 0x32, 0x40, 0x27, 0x5b, 0x6b, 0x48, 0xfe, + 0xdb, 0x1f, 0x33, 0x26, 0x15, 0x6e, 0x48, 0x42, 0x39, 0x02, 0x40, 0x11, + 0x1f, 0x2a, 0x19, 0x19, 0x2a, 0x1f, 0x11, 0x11, 0x1f, 0x2a, 0x19, 0x19, + 0x2a, 0x1f, 0x11, 0x31, 0x1d, 0x1a, 0x16, 0x1a, 0x1d, 0x1d, 0x1a, 0x16, + 0x1a, 0x1d, 0xfd, 0x8f, 0x30, 0x24, 0x2d, 0x33, 0x54, 0x49, 0x48, 0x4e, + 0x33, 0x39, 0x39, 0x29, 0x23, 0x28, 0x14, 0x26, 0x1d, 0x11, 0x5c, 0x52, + 0xfe, 0xe4, 0x46, 0x37, 0x0f, 0x19, 0x23, 0x14, 0x55, 0x28, 0x26, 0x15, + 0x28, 0x29, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0a, 0xff, 0xf4, 0x02, 0x46, + 0x02, 0x10, 0x00, 0x35, 0x00, 0x43, 0x00, 0x4c, 0x00, 0xcd, 0xba, 0x00, + 0x18, 0x00, 0x4d, 0x00, 0x4e, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x18, 0x10, + 0xb8, 0x00, 0x3b, 0xd0, 0xb8, 0x00, 0x18, 0x10, 0xb8, 0x00, 0x48, 0xd0, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x14, 0x2f, 0x1b, 0xb9, + 0x00, 0x14, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x1b, 0x2f, 0x1b, 0xb9, 0x00, 0x1b, 0x00, 0x1b, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, + 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x2f, + 0x2f, 0x1b, 0xb9, 0x00, 0x2f, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x14, + 0x10, 0xb9, 0x00, 0x0b, 0x00, 0x01, 0xf4, 0xb8, 0x00, 0x00, 0x10, 0xb9, + 0x00, 0x36, 0x00, 0x01, 0xf4, 0xba, 0x00, 0x06, 0x00, 0x0b, 0x00, 0x36, + 0x11, 0x12, 0x39, 0xb8, 0x00, 0x06, 0x2f, 0xba, 0x00, 0x17, 0x00, 0x0b, + 0x00, 0x36, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x2f, 0x10, 0xb9, 0x00, 0x24, + 0x00, 0x01, 0xf4, 0xb8, 0x00, 0x1b, 0x10, 0xb9, 0x00, 0x44, 0x00, 0x01, + 0xf4, 0xba, 0x00, 0x1f, 0x00, 0x24, 0x00, 0x44, 0x11, 0x12, 0x39, 0xb8, + 0x00, 0x1f, 0x2f, 0xba, 0x00, 0x33, 0x00, 0x36, 0x00, 0x0b, 0x11, 0x12, + 0x39, 0xb8, 0x00, 0x06, 0x10, 0xb9, 0x00, 0x3d, 0x00, 0x01, 0xf4, 0xb8, + 0x00, 0x1f, 0x10, 0xb9, 0x00, 0x49, 0x00, 0x01, 0xf4, 0x30, 0x31, 0x17, + 0x22, 0x26, 0x35, 0x34, 0x36, 0x3b, 0x01, 0x35, 0x34, 0x26, 0x23, 0x22, + 0x06, 0x07, 0x27, 0x3e, 0x03, 0x33, 0x32, 0x16, 0x17, 0x33, 0x3e, 0x01, + 0x33, 0x32, 0x16, 0x1d, 0x01, 0x21, 0x15, 0x14, 0x16, 0x33, 0x32, 0x3e, + 0x02, 0x37, 0x17, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x27, 0x23, 0x0e, 0x01, + 0x27, 0x32, 0x3e, 0x02, 0x3d, 0x01, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, + 0x16, 0x01, 0x22, 0x06, 0x1d, 0x01, 0x33, 0x35, 0x34, 0x26, 0x8d, 0x39, + 0x4a, 0x5b, 0x57, 0x3f, 0x2b, 0x26, 0x26, 0x2b, 0x0e, 0x35, 0x08, 0x1b, + 0x25, 0x31, 0x1e, 0x2d, 0x3e, 0x11, 0x03, 0x14, 0x41, 0x27, 0x4e, 0x50, + 0xfe, 0xfe, 0x31, 0x2f, 0x13, 0x1f, 0x17, 0x11, 0x06, 0x3a, 0x08, 0x1b, + 0x27, 0x33, 0x1f, 0x33, 0x4a, 0x15, 0x03, 0x0e, 0x43, 0x21, 0x18, 0x24, + 0x18, 0x0c, 0x34, 0x37, 0x3d, 0x20, 0x01, 0x31, 0x2e, 0x32, 0xc0, 0x32, + 0x0c, 0x4c, 0x4a, 0x4e, 0x4f, 0x35, 0x43, 0x35, 0x2c, 0x23, 0x21, 0x14, + 0x26, 0x1e, 0x12, 0x28, 0x26, 0x2b, 0x23, 0x77, 0x75, 0x36, 0x19, 0x47, + 0x5a, 0x0f, 0x19, 0x20, 0x11, 0x1b, 0x17, 0x2d, 0x24, 0x16, 0x3c, 0x36, + 0x3b, 0x37, 0x3e, 0x11, 0x1d, 0x25, 0x15, 0x54, 0x28, 0x2e, 0x0f, 0x29, + 0x2e, 0x01, 0xa4, 0x45, 0x48, 0x22, 0x22, 0x48, 0x45, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x54, 0xff, 0x31, 0x02, 0x04, 0x02, 0x10, 0x00, 0x3b, + 0x00, 0x72, 0xba, 0x00, 0x32, 0x00, 0x3c, 0x00, 0x3d, 0x11, 0x12, 0x39, + 0x00, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, + 0x00, 0x00, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, + 0x00, 0x34, 0x2f, 0x1b, 0xb9, 0x00, 0x34, 0x00, 0x0f, 0x3e, 0x59, 0xb8, + 0x00, 0x00, 0x10, 0xb9, 0x00, 0x07, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x34, + 0x10, 0xb9, 0x00, 0x12, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x34, 0x10, 0xb8, + 0x00, 0x19, 0xd0, 0xb8, 0x00, 0x34, 0x10, 0xb8, 0x00, 0x1d, 0xdc, 0x41, + 0x07, 0x00, 0x0f, 0x00, 0x1d, 0x00, 0x1f, 0x00, 0x1d, 0x00, 0x2f, 0x00, + 0x1d, 0x00, 0x03, 0x5d, 0xb8, 0x00, 0x32, 0xdc, 0xb8, 0x00, 0x2c, 0xdc, + 0xb9, 0x00, 0x25, 0x00, 0x03, 0xf4, 0x30, 0x31, 0x01, 0x32, 0x16, 0x17, + 0x07, 0x2e, 0x01, 0x23, 0x22, 0x0e, 0x02, 0x1d, 0x01, 0x14, 0x1e, 0x02, + 0x33, 0x32, 0x36, 0x37, 0x17, 0x0e, 0x01, 0x0f, 0x01, 0x17, 0x36, 0x33, + 0x32, 0x16, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x37, 0x1e, + 0x01, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x2f, 0x01, 0x37, 0x2e, 0x01, + 0x35, 0x34, 0x3e, 0x02, 0x01, 0x3d, 0x4b, 0x5e, 0x16, 0x40, 0x0e, 0x41, + 0x30, 0x23, 0x37, 0x26, 0x13, 0x13, 0x26, 0x38, 0x24, 0x34, 0x44, 0x14, + 0x39, 0x17, 0x5c, 0x4b, 0x0a, 0x03, 0x13, 0x14, 0x1d, 0x27, 0x12, 0x1f, + 0x28, 0x16, 0x29, 0x2f, 0x0b, 0x26, 0x09, 0x1e, 0x16, 0x13, 0x19, 0x1a, + 0x2a, 0x1c, 0x0e, 0x5c, 0x65, 0x20, 0x3c, 0x56, 0x02, 0x10, 0x42, 0x35, + 0x22, 0x28, 0x2c, 0x17, 0x2a, 0x3a, 0x22, 0x58, 0x22, 0x3a, 0x2a, 0x17, + 0x30, 0x2a, 0x27, 0x33, 0x43, 0x02, 0x31, 0x03, 0x06, 0x22, 0x20, 0x15, + 0x20, 0x14, 0x0a, 0x1b, 0x0e, 0x29, 0x0b, 0x11, 0x0f, 0x10, 0x0e, 0x15, + 0x06, 0x04, 0x44, 0x0e, 0x8e, 0x6f, 0x3d, 0x64, 0x47, 0x26, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x43, 0xff, 0xf4, 0x02, 0x15, 0x03, 0x0b, 0x12, 0x26, + 0x00, 0x48, 0x00, 0x00, 0x10, 0x06, 0x00, 0x43, 0x02, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x43, 0xff, 0xf4, 0x02, 0x15, 0x03, 0x0b, 0x12, 0x26, + 0x00, 0x48, 0x00, 0x00, 0x10, 0x06, 0x00, 0x76, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x43, 0xff, 0xf4, 0x02, 0x15, 0x02, 0xfd, 0x00, 0x06, + 0x00, 0x24, 0x00, 0x31, 0x00, 0x00, 0x01, 0x17, 0x07, 0x27, 0x07, 0x27, + 0x37, 0x13, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x1e, + 0x02, 0x1d, 0x01, 0x21, 0x15, 0x14, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x37, + 0x17, 0x0e, 0x01, 0x03, 0x22, 0x0e, 0x02, 0x1d, 0x01, 0x21, 0x35, 0x34, + 0x2e, 0x02, 0x01, 0x60, 0x6f, 0x2d, 0x75, 0x75, 0x2b, 0x6f, 0x39, 0x38, + 0x59, 0x3f, 0x22, 0x23, 0x3e, 0x57, 0x35, 0x34, 0x55, 0x3c, 0x20, 0xfe, + 0x82, 0x16, 0x29, 0x3b, 0x24, 0x34, 0x4c, 0x14, 0x3b, 0x17, 0x6b, 0x52, + 0x21, 0x38, 0x29, 0x17, 0x01, 0x28, 0x15, 0x25, 0x35, 0x02, 0xfd, 0x8f, + 0x1f, 0x75, 0x75, 0x1f, 0x8f, 0xfc, 0xf7, 0x26, 0x47, 0x63, 0x3d, 0x3e, + 0x64, 0x47, 0x26, 0x26, 0x43, 0x5c, 0x37, 0x26, 0x18, 0x22, 0x3a, 0x2a, + 0x17, 0x30, 0x2a, 0x28, 0x34, 0x43, 0x01, 0xda, 0x18, 0x2a, 0x39, 0x22, + 0x07, 0x0b, 0x22, 0x38, 0x29, 0x16, 0x00, 0x00, 0xff, 0xff, 0x00, 0x43, + 0xff, 0xf4, 0x02, 0x15, 0x02, 0xd4, 0x12, 0x26, 0x00, 0x48, 0x00, 0x00, + 0x10, 0x06, 0x00, 0x6a, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x6a, + 0x00, 0x00, 0x02, 0x22, 0x03, 0x0b, 0x00, 0x09, 0x00, 0x0d, 0x00, 0x00, + 0x37, 0x33, 0x11, 0x23, 0x35, 0x21, 0x11, 0x33, 0x15, 0x21, 0x13, 0x37, + 0x17, 0x07, 0x6a, 0xba, 0xba, 0x01, 0x0a, 0xae, 0xfe, 0x48, 0x71, 0x49, + 0x55, 0x34, 0x44, 0x01, 0x7c, 0x44, 0xfe, 0x40, 0x44, 0x02, 0xe8, 0x23, + 0xaa, 0x18, 0x00, 0x00, 0x00, 0x02, 0x00, 0x6a, 0x00, 0x00, 0x02, 0x22, + 0x03, 0x0b, 0x00, 0x09, 0x00, 0x0d, 0x00, 0x00, 0x37, 0x33, 0x11, 0x23, + 0x35, 0x21, 0x11, 0x33, 0x15, 0x21, 0x13, 0x27, 0x37, 0x17, 0x6a, 0xba, + 0xba, 0x01, 0x0a, 0xae, 0xfe, 0x48, 0xe9, 0x34, 0x55, 0x49, 0x44, 0x01, + 0x7c, 0x44, 0xfe, 0x40, 0x44, 0x02, 0x49, 0x18, 0xaa, 0x23, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x6a, 0x00, 0x00, 0x02, 0x22, 0x02, 0xfd, 0x00, 0x06, + 0x00, 0x10, 0x00, 0x00, 0x01, 0x17, 0x07, 0x27, 0x07, 0x27, 0x37, 0x03, + 0x33, 0x11, 0x23, 0x35, 0x21, 0x11, 0x33, 0x15, 0x21, 0x01, 0x7e, 0x6f, + 0x2d, 0x75, 0x75, 0x2b, 0x6f, 0xb0, 0xba, 0xba, 0x01, 0x0a, 0xae, 0xfe, + 0x48, 0x02, 0xfd, 0x8f, 0x1f, 0x75, 0x75, 0x1f, 0x8f, 0xfd, 0x47, 0x01, + 0x7c, 0x44, 0xfe, 0x40, 0x44, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x6a, + 0x00, 0x00, 0x02, 0x22, 0x02, 0xd4, 0x00, 0x09, 0x00, 0x17, 0x00, 0x25, + 0x00, 0x00, 0x37, 0x33, 0x11, 0x23, 0x35, 0x21, 0x11, 0x33, 0x15, 0x21, + 0x13, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, + 0x14, 0x06, 0x33, 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, + 0x1d, 0x01, 0x14, 0x06, 0x6a, 0xba, 0xba, 0x01, 0x0a, 0xae, 0xfe, 0x48, + 0x85, 0x1f, 0x1a, 0x1a, 0x1f, 0x1f, 0x1a, 0x1a, 0x9b, 0x1f, 0x1a, 0x1a, + 0x1f, 0x1f, 0x1a, 0x1a, 0x44, 0x01, 0x7c, 0x44, 0xfe, 0x40, 0x44, 0x02, + 0x6a, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x1a, + 0x14, 0x0e, 0x14, 0x1a, 0x1a, 0x14, 0x0e, 0x14, 0x1a, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x42, 0xff, 0xf4, 0x02, 0x16, 0x02, 0xf1, 0x00, 0x25, + 0x00, 0x33, 0x00, 0x5f, 0xba, 0x00, 0x26, 0x00, 0x34, 0x00, 0x35, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x26, 0x10, 0xb8, 0x00, 0x09, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x20, 0x2f, 0x1b, 0xb9, 0x00, 0x20, + 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x09, + 0x2f, 0x1b, 0xb9, 0x00, 0x09, 0x00, 0x0f, 0x3e, 0x59, 0xba, 0x00, 0x13, + 0x00, 0x20, 0x00, 0x09, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x13, 0x2f, 0xb9, + 0x00, 0x2d, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x09, 0x10, 0xb9, 0x00, 0x26, + 0x00, 0x08, 0xf4, 0xba, 0x00, 0x16, 0x00, 0x2d, 0x00, 0x26, 0x11, 0x12, + 0x39, 0x30, 0x31, 0x01, 0x07, 0x1e, 0x03, 0x15, 0x14, 0x06, 0x23, 0x22, + 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x17, 0x37, 0x2e, + 0x01, 0x27, 0x07, 0x27, 0x37, 0x2e, 0x01, 0x27, 0x33, 0x1e, 0x01, 0x17, + 0x37, 0x03, 0x32, 0x36, 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, + 0x01, 0x14, 0x16, 0x01, 0xcb, 0x57, 0x1f, 0x3b, 0x2d, 0x1b, 0x7c, 0x6b, + 0x38, 0x58, 0x3d, 0x20, 0x20, 0x39, 0x4e, 0x2f, 0x3d, 0x50, 0x18, 0x04, + 0x19, 0x43, 0x2a, 0x63, 0x26, 0x5c, 0x21, 0x48, 0x26, 0x7e, 0x11, 0x25, + 0x14, 0x5e, 0x79, 0x43, 0x52, 0x52, 0x43, 0x43, 0x52, 0x52, 0x02, 0xc4, + 0x3d, 0x1f, 0x4e, 0x5e, 0x71, 0x41, 0x8c, 0x8a, 0x24, 0x44, 0x5f, 0x3b, + 0x3b, 0x5f, 0x44, 0x24, 0x38, 0x28, 0x02, 0x3e, 0x60, 0x28, 0x46, 0x2d, + 0x40, 0x1a, 0x2e, 0x15, 0x0b, 0x19, 0x10, 0x41, 0xfd, 0x48, 0x4c, 0x4e, + 0x46, 0x4e, 0x4c, 0x4c, 0x4e, 0x46, 0x4e, 0x4c, 0x00, 0x02, 0x00, 0x62, + 0x00, 0x00, 0x01, 0xfc, 0x02, 0xd8, 0x00, 0x19, 0x00, 0x32, 0x00, 0x00, + 0x01, 0x22, 0x26, 0x27, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, + 0x01, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x37, 0x17, + 0x0e, 0x01, 0x01, 0x11, 0x33, 0x15, 0x33, 0x3e, 0x03, 0x33, 0x32, 0x16, + 0x15, 0x11, 0x23, 0x11, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x02, 0x15, 0x11, + 0x01, 0x78, 0x1a, 0x26, 0x10, 0x18, 0x21, 0x0d, 0x11, 0x1a, 0x0f, 0x21, + 0x0e, 0x2e, 0x23, 0x1a, 0x26, 0x10, 0x18, 0x21, 0x0d, 0x11, 0x1a, 0x0f, + 0x21, 0x0e, 0x2e, 0xfe, 0xc7, 0x50, 0x04, 0x08, 0x18, 0x23, 0x30, 0x20, + 0x51, 0x62, 0x50, 0x3e, 0x3c, 0x18, 0x2e, 0x24, 0x16, 0x02, 0x64, 0x12, + 0x08, 0x0d, 0x0b, 0x0e, 0x0d, 0x28, 0x14, 0x21, 0x12, 0x08, 0x0d, 0x0b, + 0x0e, 0x0d, 0x28, 0x14, 0x21, 0xfd, 0x9c, 0x02, 0x04, 0x54, 0x13, 0x23, + 0x1a, 0x10, 0x67, 0x5e, 0xfe, 0xb5, 0x01, 0x3d, 0x47, 0x45, 0x0c, 0x18, + 0x26, 0x19, 0xfe, 0x9a, 0xff, 0xff, 0x00, 0x42, 0xff, 0xf4, 0x02, 0x16, + 0x03, 0x0b, 0x12, 0x26, 0x00, 0x52, 0x00, 0x00, 0x10, 0x06, 0x00, 0x43, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x42, 0xff, 0xf4, 0x02, 0x16, + 0x03, 0x0b, 0x12, 0x26, 0x00, 0x52, 0x00, 0x00, 0x10, 0x06, 0x00, 0x76, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x42, 0xff, 0xf4, 0x02, 0x16, + 0x02, 0xfd, 0x00, 0x06, 0x00, 0x1a, 0x00, 0x28, 0x00, 0x00, 0x01, 0x17, + 0x07, 0x27, 0x07, 0x27, 0x37, 0x13, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, + 0x02, 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, 0x36, + 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, + 0x5e, 0x6f, 0x2d, 0x75, 0x75, 0x2b, 0x6f, 0x32, 0x36, 0x57, 0x3d, 0x20, + 0x20, 0x3d, 0x57, 0x36, 0x36, 0x57, 0x3d, 0x20, 0x20, 0x3d, 0x57, 0x36, + 0x43, 0x52, 0x52, 0x43, 0x43, 0x52, 0x52, 0x02, 0xfd, 0x8f, 0x1f, 0x75, + 0x75, 0x1f, 0x8f, 0xfc, 0xf7, 0x26, 0x47, 0x63, 0x3e, 0x3d, 0x64, 0x47, + 0x26, 0x26, 0x47, 0x64, 0x3d, 0x3e, 0x63, 0x47, 0x26, 0x45, 0x50, 0x54, + 0x4a, 0x54, 0x50, 0x50, 0x54, 0x4a, 0x54, 0x50, 0x00, 0x03, 0x00, 0x42, + 0xff, 0xf4, 0x02, 0x16, 0x02, 0xd8, 0x00, 0x19, 0x00, 0x2d, 0x00, 0x3b, + 0x00, 0x00, 0x01, 0x22, 0x26, 0x27, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x07, + 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x17, 0x1e, 0x01, 0x33, 0x32, 0x36, + 0x37, 0x17, 0x0e, 0x01, 0x03, 0x22, 0x2e, 0x02, 0x35, 0x34, 0x3e, 0x02, + 0x33, 0x32, 0x1e, 0x02, 0x15, 0x14, 0x0e, 0x02, 0x27, 0x32, 0x36, 0x3d, + 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x14, 0x16, 0x01, 0x75, + 0x1a, 0x26, 0x10, 0x18, 0x21, 0x0d, 0x11, 0x1a, 0x0f, 0x21, 0x0e, 0x2e, + 0x23, 0x1a, 0x26, 0x10, 0x18, 0x21, 0x0d, 0x11, 0x1a, 0x0f, 0x21, 0x0e, + 0x2e, 0x6c, 0x36, 0x57, 0x3d, 0x20, 0x20, 0x3d, 0x57, 0x36, 0x36, 0x57, + 0x3d, 0x20, 0x20, 0x3d, 0x57, 0x36, 0x43, 0x52, 0x52, 0x43, 0x43, 0x52, + 0x52, 0x02, 0x64, 0x12, 0x08, 0x0d, 0x0b, 0x0e, 0x0d, 0x28, 0x14, 0x21, + 0x12, 0x08, 0x0d, 0x0b, 0x0e, 0x0d, 0x28, 0x14, 0x21, 0xfd, 0x90, 0x26, + 0x47, 0x63, 0x3e, 0x3d, 0x64, 0x47, 0x26, 0x26, 0x47, 0x64, 0x3d, 0x3e, + 0x63, 0x47, 0x26, 0x45, 0x50, 0x54, 0x4a, 0x54, 0x50, 0x50, 0x54, 0x4a, + 0x54, 0x50, 0x00, 0x00, 0xff, 0xff, 0x00, 0x42, 0xff, 0xf4, 0x02, 0x16, + 0x02, 0xd4, 0x12, 0x26, 0x00, 0x52, 0x00, 0x00, 0x10, 0x06, 0x00, 0x6a, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x3e, 0x00, 0x34, 0x02, 0x1a, + 0x02, 0x2e, 0x00, 0x03, 0x00, 0x11, 0x00, 0x1f, 0x00, 0x43, 0xba, 0x00, + 0x04, 0x00, 0x20, 0x00, 0x21, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x04, 0x10, + 0xb8, 0x00, 0x00, 0xd0, 0xb8, 0x00, 0x04, 0x10, 0xb8, 0x00, 0x12, 0xd0, + 0x00, 0xbb, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x04, 0x2b, 0xb8, + 0x00, 0x00, 0x10, 0xb8, 0x00, 0x0b, 0xdc, 0xb9, 0x00, 0x04, 0x00, 0x06, + 0xf4, 0xb8, 0x00, 0x01, 0x10, 0xb8, 0x00, 0x12, 0xdc, 0xb9, 0x00, 0x19, + 0x00, 0x06, 0xf4, 0x30, 0x31, 0x13, 0x35, 0x21, 0x15, 0x07, 0x22, 0x26, + 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, 0x06, 0x03, + 0x22, 0x26, 0x3d, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x1d, 0x01, 0x14, + 0x06, 0x3e, 0x01, 0xdc, 0xee, 0x23, 0x1b, 0x1b, 0x23, 0x23, 0x1b, 0x1b, + 0x23, 0x23, 0x1b, 0x1b, 0x23, 0x23, 0x1b, 0x1b, 0x01, 0x0f, 0x44, 0x44, + 0xdb, 0x1c, 0x14, 0x16, 0x14, 0x1c, 0x1c, 0x14, 0x16, 0x14, 0x1c, 0x01, + 0x84, 0x1c, 0x14, 0x16, 0x14, 0x1c, 0x1c, 0x14, 0x16, 0x14, 0x1c, 0x00, + 0x00, 0x03, 0x00, 0x2f, 0xff, 0xd8, 0x02, 0x29, 0x02, 0x2c, 0x00, 0x1b, + 0x00, 0x24, 0x00, 0x2d, 0x00, 0x9f, 0xba, 0x00, 0x17, 0x00, 0x2e, 0x00, + 0x2f, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x17, 0x10, 0xb8, 0x00, 0x1c, 0xd0, + 0xb8, 0x00, 0x17, 0x10, 0xb8, 0x00, 0x25, 0xd0, 0x00, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x09, 0x2f, 0x1b, 0xb9, 0x00, 0x09, 0x00, 0x1b, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x17, 0x2f, 0x1b, + 0xb9, 0x00, 0x17, 0x00, 0x0f, 0x3e, 0x59, 0xba, 0x00, 0x01, 0x00, 0x09, + 0x00, 0x17, 0x11, 0x12, 0x39, 0xb9, 0x00, 0x25, 0x00, 0x08, 0xf4, 0xba, + 0x00, 0x0c, 0x00, 0x09, 0x00, 0x25, 0x11, 0x12, 0x39, 0xba, 0x00, 0x0f, + 0x00, 0x09, 0x00, 0x25, 0x11, 0x12, 0x39, 0xba, 0x00, 0x1a, 0x00, 0x09, + 0x00, 0x17, 0x11, 0x12, 0x39, 0xb8, 0x00, 0x09, 0x10, 0xb9, 0x00, 0x1c, + 0x00, 0x08, 0xf4, 0xba, 0x00, 0x22, 0x00, 0x09, 0x00, 0x25, 0x11, 0x12, + 0x39, 0xba, 0x00, 0x23, 0x00, 0x1c, 0x00, 0x17, 0x11, 0x12, 0x39, 0xba, + 0x00, 0x2b, 0x00, 0x1c, 0x00, 0x17, 0x11, 0x12, 0x39, 0xba, 0x00, 0x2c, + 0x00, 0x09, 0x00, 0x25, 0x11, 0x12, 0x39, 0x30, 0x31, 0x17, 0x37, 0x2e, + 0x01, 0x35, 0x34, 0x3e, 0x02, 0x33, 0x32, 0x16, 0x17, 0x37, 0x17, 0x07, + 0x1e, 0x01, 0x15, 0x14, 0x0e, 0x02, 0x23, 0x22, 0x26, 0x27, 0x07, 0x13, + 0x22, 0x06, 0x1d, 0x01, 0x14, 0x17, 0x13, 0x26, 0x03, 0x32, 0x36, 0x3d, + 0x01, 0x34, 0x27, 0x03, 0x16, 0x2f, 0x45, 0x18, 0x1a, 0x20, 0x3d, 0x57, + 0x36, 0x2c, 0x48, 0x1d, 0x3f, 0x2d, 0x45, 0x18, 0x1a, 0x20, 0x3d, 0x57, + 0x36, 0x2c, 0x48, 0x1d, 0x3f, 0xd0, 0x43, 0x52, 0x0f, 0xeb, 0x25, 0x40, + 0x43, 0x52, 0x0f, 0xeb, 0x25, 0x06, 0x54, 0x23, 0x5b, 0x36, 0x3d, 0x64, + 0x47, 0x26, 0x1a, 0x17, 0x4d, 0x22, 0x54, 0x23, 0x5b, 0x36, 0x3e, 0x63, + 0x47, 0x26, 0x1a, 0x17, 0x4d, 0x01, 0xf3, 0x50, 0x54, 0x4a, 0x32, 0x21, + 0x01, 0x1f, 0x22, 0xfe, 0x6e, 0x50, 0x54, 0x4a, 0x32, 0x21, 0xfe, 0xe1, + 0x22, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xf4, 0x01, 0xf6, + 0x03, 0x0b, 0x12, 0x26, 0x00, 0x58, 0x00, 0x00, 0x10, 0x06, 0x00, 0x43, + 0xfe, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x5c, 0xff, 0xf4, 0x01, 0xf6, + 0x03, 0x0b, 0x12, 0x26, 0x00, 0x58, 0x00, 0x00, 0x10, 0x06, 0x00, 0x76, + 0xfe, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5c, 0xff, 0xf4, 0x01, 0xf6, + 0x02, 0xfd, 0x00, 0x06, 0x00, 0x1f, 0x00, 0x00, 0x01, 0x17, 0x07, 0x27, + 0x07, 0x27, 0x37, 0x13, 0x23, 0x0e, 0x03, 0x23, 0x22, 0x26, 0x35, 0x11, + 0x33, 0x11, 0x14, 0x16, 0x33, 0x32, 0x3e, 0x02, 0x35, 0x11, 0x33, 0x11, + 0x23, 0x01, 0x5c, 0x6f, 0x2d, 0x75, 0x75, 0x2b, 0x6f, 0xae, 0x04, 0x08, + 0x18, 0x23, 0x30, 0x20, 0x51, 0x62, 0x50, 0x3e, 0x3c, 0x18, 0x2e, 0x24, + 0x16, 0x50, 0x50, 0x02, 0xfd, 0x8f, 0x1f, 0x75, 0x75, 0x1f, 0x8f, 0xfd, + 0x57, 0x13, 0x23, 0x1a, 0x10, 0x67, 0x5e, 0x01, 0x4b, 0xfe, 0xc3, 0x47, + 0x45, 0x0c, 0x18, 0x25, 0x1a, 0x01, 0x66, 0xfd, 0xfc, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x5c, 0xff, 0xf4, 0x01, 0xf6, 0x02, 0xd4, 0x12, 0x26, + 0x00, 0x58, 0x00, 0x00, 0x10, 0x06, 0x00, 0x6a, 0xfe, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x35, 0xff, 0x38, 0x02, 0x23, 0x03, 0x0b, 0x12, 0x26, + 0x00, 0x5c, 0x00, 0x00, 0x10, 0x06, 0x00, 0x76, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x5f, 0xff, 0x38, 0x02, 0x1c, 0x02, 0xe4, 0x00, 0x10, + 0x00, 0x22, 0x00, 0x81, 0xba, 0x00, 0x11, 0x00, 0x23, 0x00, 0x24, 0x11, + 0x12, 0x39, 0xb8, 0x00, 0x11, 0x10, 0xb8, 0x00, 0x0b, 0xd0, 0x00, 0xb8, + 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x00, 0x2f, 0x1b, 0xb9, 0x00, 0x00, + 0x00, 0x1f, 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x05, + 0x2f, 0x1b, 0xb9, 0x00, 0x05, 0x00, 0x1b, 0x3e, 0x59, 0xb8, 0x00, 0x00, + 0x45, 0x58, 0xb8, 0x00, 0x10, 0x2f, 0x1b, 0xb9, 0x00, 0x10, 0x00, 0x11, + 0x3e, 0x59, 0xb8, 0x00, 0x00, 0x45, 0x58, 0xb8, 0x00, 0x0b, 0x2f, 0x1b, + 0xb9, 0x00, 0x0b, 0x00, 0x0f, 0x3e, 0x59, 0xb8, 0x00, 0x05, 0x10, 0xb9, + 0x00, 0x18, 0x00, 0x08, 0xf4, 0xb8, 0x00, 0x0b, 0x10, 0xb9, 0x00, 0x11, + 0x00, 0x08, 0xf4, 0xba, 0x00, 0x02, 0x00, 0x18, 0x00, 0x11, 0x11, 0x12, + 0x39, 0xba, 0x00, 0x0d, 0x00, 0x11, 0x00, 0x18, 0x11, 0x12, 0x39, 0x30, + 0x31, 0x13, 0x33, 0x11, 0x33, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, + 0x23, 0x22, 0x27, 0x23, 0x11, 0x23, 0x13, 0x32, 0x36, 0x3d, 0x01, 0x34, + 0x26, 0x23, 0x22, 0x0e, 0x02, 0x1d, 0x01, 0x14, 0x1e, 0x02, 0x5f, 0x50, + 0x04, 0x32, 0x6d, 0x5f, 0x6b, 0x6b, 0x5f, 0x6d, 0x32, 0x04, 0x50, 0xd4, + 0x46, 0x4d, 0x4d, 0x46, 0x1b, 0x30, 0x24, 0x15, 0x15, 0x24, 0x30, 0x02, + 0xe4, 0xfe, 0xcc, 0x60, 0x8e, 0x80, 0x80, 0x8e, 0x60, 0xfe, 0xe4, 0x01, + 0x03, 0x55, 0x46, 0x58, 0x46, 0x55, 0x0e, 0x1b, 0x27, 0x1a, 0xba, 0x1a, + 0x27, 0x1b, 0x0e, 0x00, 0xff, 0xff, 0x00, 0x35, 0xff, 0x38, 0x02, 0x23, + 0x02, 0xd4, 0x12, 0x26, 0x00, 0x5c, 0x00, 0x00, 0x10, 0x06, 0x00, 0x6a, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x04, 0x9e, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x5c, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0d, 0x00, 0xa6, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, 0x00, 0xc4, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x1e, 0x01, 0x0a, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0d, 0x01, 0x45, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0d, 0x01, 0x6f, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x0b, 0x01, 0x95, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x51, 0x02, 0x45, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x0b, 0x02, 0xaf, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x33, 0x03, 0x23, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x19, 0x03, 0x8b, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x12, 0x03, 0xcb, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x90, 0x05, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x1a, 0x05, 0xc7, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x00, 0x3a, 0x06, 0x58, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x12, 0x0c, 0x0a, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x18, 0x06, 0x93, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x12, 0x0b, 0xd1, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x11, 0x07, 0x1a, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x13, 0x0b, 0x97, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x09, 0x07, 0x51, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x00, 0x11, 0x0b, 0x5d, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x00, 0x0b, 0x07, 0x6d, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x1a, 0x0b, 0x1e, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x11, 0x07, 0x99, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x05, 0x00, 0x15, 0x0a, 0xd2, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x05, 0x00, 0x18, 0x08, 0x08, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x00, 0x09, 0x08, 0x6f, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x00, 0x18, 0x0a, 0x8d, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x00, 0x09, 0x08, 0xac, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x0c, 0x08, 0xea, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x09, 0x00, 0x12, 0x09, 0x32, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x0a, 0x00, 0x12, 0x09, 0x92, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x0b, 0x00, 0x12, 0x09, 0xf9, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x18, 0x06, 0xac, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x12, 0x07, 0x2c, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x09, 0x07, 0x5b, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x12, 0x07, 0x79, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x04, 0x00, 0x1f, 0x07, 0xab, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x05, 0x00, 0x1a, 0x08, 0x21, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x06, 0x00, 0x13, 0x08, 0x79, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x07, 0x00, 0x13, 0x08, 0xb6, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x08, 0x00, 0x10, 0x08, 0xf7, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x09, 0x00, 0x16, 0x09, 0x45, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x0a, 0x00, 0x1f, 0x09, 0xa5, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x0b, 0x00, 0x23, 0x0a, 0x0c, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x21, 0x06, 0xc5, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x04, 0x00, 0x17, 0x07, 0xcb, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x05, 0x00, 0x06, 0x08, 0x3c, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x06, 0x00, 0x0c, 0x08, 0x8d, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x07, 0x00, 0x0c, 0x08, 0xca, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x08, 0x00, 0x0b, 0x09, 0x08, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x09, 0x00, 0x10, 0x09, 0x5c, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x0a, 0x00, 0x10, 0x09, 0xc5, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x02, 0x01, 0x0b, 0x00, 0x0f, 0x0a, 0x30, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x15, 0x06, 0xe7, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x04, 0x00, 0x11, 0x07, 0xe3, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x05, 0x00, 0x11, 0x08, 0x43, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x06, 0x00, 0x05, 0x08, 0x9a, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x07, 0x00, 0x06, 0x08, 0xd7, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x08, 0x00, 0x10, 0x09, 0x14, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x09, 0x00, 0x12, 0x09, 0x6d, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x0a, 0x00, 0x13, 0x09, 0xd6, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x03, 0x01, 0x0b, 0x00, 0x0c, 0x0a, 0x40, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x1c, 0x06, 0xfd, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x01, 0x00, 0x11, 0x07, 0x3f, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x02, 0x00, 0x07, 0x07, 0x65, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x03, 0x00, 0x0c, 0x07, 0x8c, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x04, 0x00, 0x12, 0x07, 0xf5, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x05, 0x00, 0x19, 0x08, 0x55, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x06, 0x00, 0x0b, 0x08, 0xa0, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x07, 0x00, 0x0b, 0x08, 0xde, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x08, 0x00, 0x0c, 0x09, 0x25, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x09, 0x00, 0x11, 0x09, 0x80, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x0a, 0x00, 0x0e, 0x09, 0xea, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x04, 0x01, 0x0b, 0x00, 0x0d, 0x0a, 0x4d, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x01, 0x00, 0x1a, 0x00, 0x8a, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x02, 0x00, 0x0e, 0x00, 0xb4, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x03, 0x00, 0x3c, 0x00, 0xcc, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x04, 0x00, 0x1a, 0x01, 0x29, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x05, 0x00, 0x1a, 0x01, 0x53, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x06, 0x00, 0x16, 0x01, 0x7d, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x07, 0x00, 0xa2, 0x01, 0xa1, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x08, 0x00, 0x16, 0x02, 0x97, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x09, 0x00, 0x66, 0x02, 0xbb, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x0b, 0x00, 0x32, 0x03, 0x57, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x0c, 0x00, 0x24, 0x03, 0xa5, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x0d, 0x01, 0x20, 0x03, 0xde, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x0e, 0x00, 0x34, 0x05, 0x91, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x00, 0x13, 0x00, 0x74, 0x05, 0xe2, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x01, 0x00, 0x00, 0x24, 0x0b, 0xe4, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x01, 0x01, 0x00, 0x24, 0x0b, 0xab, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x01, 0x02, 0x00, 0x26, 0x0b, 0x6f, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x01, 0x03, 0x00, 0x22, 0x0b, 0x39, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x01, 0x04, 0x00, 0x34, 0x0a, 0xe8, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x01, 0x05, 0x00, 0x2a, 0x0a, 0xa6, 0x00, 0x03, + 0x00, 0x01, 0x04, 0x09, 0x01, 0x06, 0x00, 0x30, 0x0a, 0x5b, 0x00, 0x43, + 0x00, 0x6f, 0x00, 0x70, 0x00, 0x79, 0x00, 0x72, 0x00, 0x69, 0x00, 0x67, + 0x00, 0x68, 0x00, 0x74, 0x00, 0x20, 0x00, 0x32, 0x00, 0x30, 0x00, 0x31, + 0x00, 0x37, 0x00, 0x20, 0x00, 0x49, 0x00, 0x42, 0x00, 0x4d, 0x00, 0x20, + 0x00, 0x43, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x70, 0x00, 0x2e, 0x00, 0x20, + 0x00, 0x41, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x20, 0x00, 0x72, 0x00, 0x69, + 0x00, 0x67, 0x00, 0x68, 0x00, 0x74, 0x00, 0x73, 0x00, 0x20, 0x00, 0x72, + 0x00, 0x65, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00, 0x76, 0x00, 0x65, + 0x00, 0x64, 0x00, 0x2e, 0x00, 0x00, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, + 0x67, 0x68, 0x74, 0x20, 0x32, 0x30, 0x31, 0x37, 0x20, 0x49, 0x42, 0x4d, + 0x20, 0x43, 0x6f, 0x72, 0x70, 0x2e, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, + 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x2e, 0x00, 0x00, 0x49, 0x00, 0x42, 0x00, 0x4d, 0x00, 0x20, + 0x00, 0x50, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x78, 0x00, 0x20, 0x00, 0x4d, + 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x00, 0x49, 0x42, 0x4d, 0x20, + 0x50, 0x6c, 0x65, 0x78, 0x20, 0x4d, 0x6f, 0x6e, 0x6f, 0x00, 0x00, 0x52, + 0x00, 0x65, 0x00, 0x67, 0x00, 0x75, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x72, + 0x00, 0x00, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x00, 0x00, 0x32, + 0x00, 0x2e, 0x00, 0x30, 0x00, 0x30, 0x00, 0x34, 0x00, 0x3b, 0x00, 0x49, + 0x00, 0x42, 0x00, 0x4d, 0x00, 0x20, 0x00, 0x3b, 0x00, 0x49, 0x00, 0x42, + 0x00, 0x4d, 0x00, 0x50, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x78, 0x00, 0x4d, + 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x2d, 0x00, 0x52, 0x00, 0x65, + 0x00, 0x67, 0x00, 0x75, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x72, 0x00, 0x00, + 0x32, 0x2e, 0x30, 0x30, 0x34, 0x3b, 0x49, 0x42, 0x4d, 0x20, 0x3b, 0x49, + 0x42, 0x4d, 0x50, 0x6c, 0x65, 0x78, 0x4d, 0x6f, 0x6e, 0x6f, 0x2d, 0x52, + 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x00, 0x00, 0x49, 0x00, 0x42, 0x00, + 0x4d, 0x00, 0x20, 0x00, 0x50, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x78, 0x00, + 0x20, 0x00, 0x4d, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x00, 0x49, + 0x42, 0x4d, 0x20, 0x50, 0x6c, 0x65, 0x78, 0x20, 0x4d, 0x6f, 0x6e, 0x6f, + 0x00, 0x00, 0x56, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x69, 0x00, + 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x32, 0x00, 0x2e, 0x00, 0x30, 0x00, + 0x30, 0x00, 0x34, 0x00, 0x00, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x20, 0x32, 0x2e, 0x30, 0x30, 0x34, 0x00, 0x00, 0x49, 0x00, 0x42, 0x00, + 0x4d, 0x00, 0x50, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x78, 0x00, 0x4d, 0x00, + 0x6f, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x00, 0x49, 0x42, 0x4d, 0x50, 0x6c, + 0x65, 0x78, 0x4d, 0x6f, 0x6e, 0x6f, 0x00, 0x00, 0x49, 0x00, 0x42, 0x00, + 0x4d, 0x00, 0x20, 0x00, 0x50, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x78, 0x00, + 0xae, 0x00, 0x20, 0x00, 0x69, 0x00, 0x73, 0x00, 0x20, 0x00, 0x61, 0x00, + 0x20, 0x00, 0x74, 0x00, 0x72, 0x00, 0x61, 0x00, 0x64, 0x00, 0x65, 0x00, + 0x6d, 0x00, 0x61, 0x00, 0x72, 0x00, 0x6b, 0x00, 0x20, 0x00, 0x6f, 0x00, + 0x66, 0x00, 0x20, 0x00, 0x49, 0x00, 0x42, 0x00, 0x4d, 0x00, 0x20, 0x00, + 0x43, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x70, 0x00, 0x2c, 0x00, 0x20, 0x00, + 0x72, 0x00, 0x65, 0x00, 0x67, 0x00, 0x69, 0x00, 0x73, 0x00, 0x74, 0x00, + 0x65, 0x00, 0x72, 0x00, 0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x69, 0x00, + 0x6e, 0x00, 0x20, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x79, 0x00, + 0x20, 0x00, 0x6a, 0x00, 0x75, 0x00, 0x72, 0x00, 0x69, 0x00, 0x73, 0x00, + 0x64, 0x00, 0x69, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, + 0x6e, 0x00, 0x73, 0x00, 0x20, 0x00, 0x77, 0x00, 0x6f, 0x00, 0x72, 0x00, + 0x6c, 0x00, 0x64, 0x00, 0x77, 0x00, 0x69, 0x00, 0x64, 0x00, 0x65, 0x00, + 0x2e, 0x00, 0x00, 0x49, 0x42, 0x4d, 0x20, 0x50, 0x6c, 0x65, 0x78, 0xa8, + 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x74, 0x72, 0x61, 0x64, 0x65, 0x6d, + 0x61, 0x72, 0x6b, 0x20, 0x6f, 0x66, 0x20, 0x49, 0x42, 0x4d, 0x20, 0x43, + 0x6f, 0x72, 0x70, 0x2c, 0x20, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x6d, 0x61, 0x6e, 0x79, 0x20, + 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x77, 0x69, 0x64, 0x65, 0x2e, + 0x00, 0x00, 0x42, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x64, 0x00, 0x20, 0x00, + 0x4d, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x61, 0x00, 0x79, 0x00, + 0x00, 0x42, 0x6f, 0x6c, 0x64, 0x20, 0x4d, 0x6f, 0x6e, 0x64, 0x61, 0x79, + 0x00, 0x00, 0x4d, 0x00, 0x69, 0x00, 0x6b, 0x00, 0x65, 0x00, 0x20, 0x00, + 0x41, 0x00, 0x62, 0x00, 0x62, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x6b, 0x00, + 0x2c, 0x00, 0x20, 0x00, 0x50, 0x00, 0x61, 0x00, 0x75, 0x00, 0x6c, 0x00, + 0x20, 0x00, 0x76, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x64, 0x00, + 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x4c, 0x00, 0x61, 0x00, 0x61, 0x00, + 0x6e, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x50, 0x00, 0x69, 0x00, 0x65, 0x00, + 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x76, 0x00, 0x61, 0x00, + 0x6e, 0x00, 0x20, 0x00, 0x52, 0x00, 0x6f, 0x00, 0x73, 0x00, 0x6d, 0x00, + 0x61, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x00, 0x4d, 0x69, 0x6b, + 0x65, 0x20, 0x41, 0x62, 0x62, 0x69, 0x6e, 0x6b, 0x2c, 0x20, 0x50, 0x61, + 0x75, 0x6c, 0x20, 0x76, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x72, 0x20, 0x4c, + 0x61, 0x61, 0x6e, 0x2c, 0x20, 0x50, 0x69, 0x65, 0x74, 0x65, 0x72, 0x20, + 0x76, 0x61, 0x6e, 0x20, 0x52, 0x6f, 0x73, 0x6d, 0x61, 0x6c, 0x65, 0x6e, + 0x00, 0x00, 0x68, 0x00, 0x74, 0x00, 0x74, 0x00, 0x70, 0x00, 0x3a, 0x00, + 0x2f, 0x00, 0x2f, 0x00, 0x77, 0x00, 0x77, 0x00, 0x77, 0x00, 0x2e, 0x00, + 0x62, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x64, 0x00, 0x6d, 0x00, 0x6f, 0x00, + 0x6e, 0x00, 0x64, 0x00, 0x61, 0x00, 0x79, 0x00, 0x2e, 0x00, 0x63, 0x00, + 0x6f, 0x00, 0x6d, 0x00, 0x00, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, + 0x77, 0x77, 0x77, 0x2e, 0x62, 0x6f, 0x6c, 0x64, 0x6d, 0x6f, 0x6e, 0x64, + 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x00, 0x00, 0x68, 0x00, 0x74, 0x00, + 0x74, 0x00, 0x70, 0x00, 0x3a, 0x00, 0x2f, 0x00, 0x2f, 0x00, 0x77, 0x00, + 0x77, 0x00, 0x77, 0x00, 0x2e, 0x00, 0x69, 0x00, 0x62, 0x00, 0x6d, 0x00, + 0x2e, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x00, 0x68, 0x74, 0x74, + 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x62, 0x6d, 0x2e, + 0x63, 0x6f, 0x6d, 0x00, 0x00, 0x54, 0x00, 0x68, 0x00, 0x69, 0x00, 0x73, + 0x00, 0x20, 0x00, 0x46, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x20, + 0x00, 0x53, 0x00, 0x6f, 0x00, 0x66, 0x00, 0x74, 0x00, 0x77, 0x00, 0x61, + 0x00, 0x72, 0x00, 0x65, 0x00, 0x20, 0x00, 0x69, 0x00, 0x73, 0x00, 0x20, + 0x00, 0x6c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x73, + 0x00, 0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x64, + 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x74, 0x00, 0x68, 0x00, 0x65, + 0x00, 0x20, 0x00, 0x53, 0x00, 0x49, 0x00, 0x4c, 0x00, 0x20, 0x00, 0x4f, + 0x00, 0x70, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x46, 0x00, 0x6f, + 0x00, 0x6e, 0x00, 0x74, 0x00, 0x20, 0x00, 0x4c, 0x00, 0x69, 0x00, 0x63, + 0x00, 0x65, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x65, 0x00, 0x2c, 0x00, 0x20, + 0x00, 0x56, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, + 0x00, 0x6e, 0x00, 0x20, 0x00, 0x31, 0x00, 0x2e, 0x00, 0x31, 0x00, 0x2e, + 0x00, 0x20, 0x00, 0x54, 0x00, 0x68, 0x00, 0x69, 0x00, 0x73, 0x00, 0x20, + 0x00, 0x6c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x73, + 0x00, 0x65, 0x00, 0x20, 0x00, 0x69, 0x00, 0x73, 0x00, 0x20, 0x00, 0x61, + 0x00, 0x76, 0x00, 0x61, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x62, + 0x00, 0x6c, 0x00, 0x65, 0x00, 0x20, 0x00, 0x77, 0x00, 0x69, 0x00, 0x74, + 0x00, 0x68, 0x00, 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x46, 0x00, 0x41, + 0x00, 0x51, 0x00, 0x20, 0x00, 0x61, 0x00, 0x74, 0x00, 0x3a, 0x00, 0x20, + 0x00, 0x68, 0x00, 0x74, 0x00, 0x74, 0x00, 0x70, 0x00, 0x3a, 0x00, 0x2f, + 0x00, 0x2f, 0x00, 0x73, 0x00, 0x63, 0x00, 0x72, 0x00, 0x69, 0x00, 0x70, + 0x00, 0x74, 0x00, 0x73, 0x00, 0x2e, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6c, + 0x00, 0x2e, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x67, 0x00, 0x2f, 0x00, 0x4f, + 0x00, 0x46, 0x00, 0x4c, 0x00, 0x00, 0x54, 0x68, 0x69, 0x73, 0x20, 0x46, + 0x6f, 0x6e, 0x74, 0x20, 0x53, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, + 0x20, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x64, + 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x53, + 0x49, 0x4c, 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x46, 0x6f, 0x6e, 0x74, + 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x31, 0x2e, 0x31, 0x2e, 0x20, 0x54, + 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, + 0x69, 0x73, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x46, 0x41, 0x51, 0x20, + 0x61, 0x74, 0x3a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x73, 0x2e, 0x73, 0x69, 0x6c, 0x2e, 0x6f, + 0x72, 0x67, 0x2f, 0x4f, 0x46, 0x4c, 0x00, 0x00, 0x68, 0x00, 0x74, 0x00, + 0x74, 0x00, 0x70, 0x00, 0x3a, 0x00, 0x2f, 0x00, 0x2f, 0x00, 0x73, 0x00, + 0x63, 0x00, 0x72, 0x00, 0x69, 0x00, 0x70, 0x00, 0x74, 0x00, 0x73, 0x00, + 0x2e, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6c, 0x00, 0x2e, 0x00, 0x6f, 0x00, + 0x72, 0x00, 0x67, 0x00, 0x2f, 0x00, 0x4f, 0x00, 0x46, 0x00, 0x4c, 0x00, + 0x00, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x73, 0x2e, 0x73, 0x69, 0x6c, 0x2e, 0x6f, 0x72, 0x67, 0x2f, + 0x4f, 0x46, 0x4c, 0x00, 0x00, 0x48, 0x00, 0x6f, 0x00, 0x77, 0x00, 0x20, + 0x00, 0x72, 0x00, 0x61, 0x00, 0x7a, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x62, + 0x00, 0x61, 0x00, 0x63, 0x00, 0x6b, 0x00, 0x2d, 0x00, 0x6a, 0x00, 0x75, + 0x00, 0x6d, 0x00, 0x70, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x20, + 0x00, 0x66, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x67, 0x00, 0x73, 0x00, 0x20, + 0x00, 0x63, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x6c, 0x00, 0x65, + 0x00, 0x76, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x20, 0x00, 0x73, 0x00, 0x69, + 0x00, 0x78, 0x00, 0x20, 0x00, 0x70, 0x00, 0x69, 0x00, 0x71, 0x00, 0x75, + 0x00, 0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x67, 0x00, 0x79, 0x00, 0x6d, + 0x00, 0x6e, 0x00, 0x61, 0x00, 0x73, 0x00, 0x74, 0x00, 0x73, 0x00, 0x21, + 0x00, 0x00, 0x48, 0x6f, 0x77, 0x20, 0x72, 0x61, 0x7a, 0x6f, 0x72, 0x62, + 0x61, 0x63, 0x6b, 0x2d, 0x6a, 0x75, 0x6d, 0x70, 0x69, 0x6e, 0x67, 0x20, + 0x66, 0x72, 0x6f, 0x67, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x6c, 0x65, + 0x76, 0x65, 0x6c, 0x20, 0x73, 0x69, 0x78, 0x20, 0x70, 0x69, 0x71, 0x75, + 0x65, 0x64, 0x20, 0x67, 0x79, 0x6d, 0x6e, 0x61, 0x73, 0x74, 0x73, 0x21, + 0x00, 0x41, 0x6c, 0x6c, 0x20, 0x54, 0x79, 0x70, 0x6f, 0x67, 0x72, 0x61, + 0x70, 0x68, 0x69, 0x63, 0x20, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x73, 0x00, 0x46, 0x6f, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, + 0x74, 0x79, 0x70, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x71, 0x75, + 0x65, 0x73, 0x00, 0x41, 0x6c, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x6f, + 0x67, 0x72, 0x61, 0x66, 0x69, 0x73, 0x63, 0x68, 0x65, 0x6e, 0x20, 0x4d, + 0x9a, 0x67, 0x6c, 0x69, 0x63, 0x68, 0x6b, 0x65, 0x69, 0x74, 0x65, 0x6e, + 0x00, 0x46, 0x75, 0x6e, 0x7a, 0x69, 0x6f, 0x6e, 0x69, 0x20, 0x54, 0x69, + 0x70, 0x6f, 0x67, 0x72, 0x61, 0x66, 0x69, 0x63, 0x68, 0x65, 0x00, 0x41, + 0x6c, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x6f, 0x67, 0x72, 0x61, 0x66, + 0x69, 0x73, 0x63, 0x68, 0x65, 0x20, 0x6b, 0x65, 0x6e, 0x6d, 0x65, 0x72, + 0x6b, 0x65, 0x6e, 0x00, 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, + 0x20, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x50, 0x6f, + 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x56, 0x65, 0x72, 0x74, 0x69, + 0x63, 0x61, 0x6c, 0x65, 0x00, 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, + 0x6c, 0x65, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x65, 0x00, 0x46, + 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x00, 0x46, 0x72, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x00, 0x42, 0x72, 0x65, 0x75, 0x6b, + 0x65, 0x6e, 0x00, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x43, 0x61, + 0x73, 0x65, 0x00, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x20, 0x64, 0x65, 0x73, + 0x20, 0x43, 0x68, 0x69, 0x66, 0x66, 0x72, 0x65, 0x73, 0x00, 0x4e, 0x75, + 0x6d, 0x6d, 0x65, 0x72, 0x68, 0x6f, 0x6f, 0x67, 0x74, 0x65, 0x00, 0x41, + 0x6c, 0x6c, 0x20, 0x54, 0x79, 0x70, 0x65, 0x20, 0x46, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x73, 0x00, 0x54, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x20, + 0x66, 0x6f, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x79, + 0x70, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x71, 0x75, 0x65, 0x73, + 0x00, 0x41, 0x6c, 0x6c, 0x65, 0x20, 0x41, 0x75, 0x73, 0x7a, 0x65, 0x69, + 0x63, 0x68, 0x6e, 0x75, 0x6e, 0x67, 0x73, 0x61, 0x72, 0x74, 0x65, 0x6e, + 0x00, 0x54, 0x75, 0x74, 0x74, 0x65, 0x20, 0x6c, 0x65, 0x20, 0x46, 0x75, + 0x6e, 0x7a, 0x69, 0x6f, 0x6e, 0x69, 0x00, 0x41, 0x6c, 0x6c, 0x65, 0x20, + 0x74, 0x79, 0x70, 0x65, 0x6b, 0x65, 0x6e, 0x6d, 0x65, 0x72, 0x6b, 0x65, + 0x6e, 0x00, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x20, 0x56, 0x65, 0x72, + 0x74, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x00, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, + 0x56, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x4e, 0x6f, + 0x72, 0x6d, 0x61, 0x6c, 0x65, 0x00, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, + 0x00, 0x50, 0x6f, 0x73, 0x69, 0x7a, 0x69, 0x6f, 0x6e, 0x65, 0x20, 0x4e, + 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x65, 0x00, 0x4e, 0x6f, 0x72, 0x6d, 0x61, + 0x6c, 0x65, 0x20, 0x76, 0x65, 0x72, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x65, + 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x65, 0x00, 0x53, 0x75, 0x70, + 0x65, 0x72, 0x69, 0x6f, 0x72, 0x73, 0x00, 0x50, 0x6f, 0x73, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x20, 0x53, 0x75, 0x70, 0x8e, 0x72, 0x69, 0x65, 0x75, + 0x72, 0x65, 0x00, 0x48, 0x6f, 0x63, 0x68, 0x67, 0x65, 0x73, 0x74, 0x65, + 0x6c, 0x6c, 0x74, 0x00, 0x41, 0x70, 0x69, 0x63, 0x65, 0x00, 0x53, 0x75, + 0x70, 0x65, 0x72, 0x69, 0x65, 0x75, 0x72, 0x65, 0x6e, 0x00, 0x49, 0x6e, + 0x66, 0x65, 0x72, 0x69, 0x6f, 0x72, 0x73, 0x00, 0x50, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x49, 0x6e, 0x66, 0x8e, 0x72, 0x69, 0x65, + 0x75, 0x72, 0x65, 0x00, 0x54, 0x69, 0x65, 0x66, 0x67, 0x65, 0x73, 0x74, + 0x65, 0x6c, 0x6c, 0x74, 0x00, 0x50, 0x65, 0x64, 0x69, 0x63, 0x65, 0x00, + 0x49, 0x6e, 0x66, 0x65, 0x72, 0x69, 0x65, 0x75, 0x72, 0x65, 0x6e, 0x00, + 0x4e, 0x6f, 0x20, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x00, 0x50, 0x61, 0x73, 0x20, 0x64, 0x65, 0x20, 0x46, 0x72, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x00, 0x4b, 0x65, 0x69, 0x6e, 0x20, 0x42, + 0x72, 0x75, 0x63, 0x68, 0x65, 0x00, 0x4e, 0x65, 0x73, 0x73, 0x75, 0x6e, + 0x61, 0x20, 0x46, 0x72, 0x61, 0x7a, 0x69, 0x6f, 0x6e, 0x65, 0x00, 0x47, + 0x65, 0x65, 0x6e, 0x20, 0x62, 0x72, 0x65, 0x75, 0x6b, 0x65, 0x6e, 0x00, + 0x44, 0x69, 0x61, 0x67, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x46, 0x72, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x00, 0x46, 0x72, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x65, 0x6e, 0x20, 0x44, 0x69, 0x61, 0x67, + 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x00, 0x44, 0x69, 0x61, 0x67, 0x6f, 0x6e, + 0x61, 0x6c, 0x65, 0x72, 0x20, 0x42, 0x72, 0x75, 0x63, 0x68, 0x00, 0x46, + 0x72, 0x61, 0x7a, 0x69, 0x6f, 0x6e, 0x69, 0x20, 0x44, 0x69, 0x61, 0x67, + 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x00, 0x44, 0x69, 0x61, 0x67, 0x6f, 0x6e, + 0x61, 0x6c, 0x65, 0x20, 0x62, 0x72, 0x65, 0x75, 0x6b, 0x65, 0x6e, 0x00, + 0x4c, 0x6f, 0x77, 0x65, 0x72, 0x20, 0x43, 0x61, 0x73, 0x65, 0x20, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x00, 0x43, 0x68, 0x69, 0x66, 0x66, + 0x72, 0x65, 0x73, 0x20, 0x41, 0x6e, 0x63, 0x69, 0x65, 0x6e, 0x73, 0x20, + 0x28, 0x62, 0x61, 0x73, 0x20, 0x64, 0x65, 0x20, 0x63, 0x61, 0x73, 0x73, + 0x65, 0x29, 0x00, 0x4d, 0x65, 0x64, 0x69, 0xbe, 0x76, 0x61, 0x6c, 0x2d, + 0x5a, 0x69, 0x66, 0x66, 0x65, 0x72, 0x6e, 0x00, 0x53, 0x6f, 0x70, 0x72, + 0x61, 0x20, 0x6c, 0x61, 0x20, 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x20, 0x42, + 0x61, 0x73, 0x65, 0x00, 0x4b, 0x6c, 0x65, 0x69, 0x6e, 0x65, 0x20, 0x6e, + 0x75, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x00, 0x55, 0x70, 0x70, 0x65, 0x72, + 0x20, 0x43, 0x61, 0x73, 0x65, 0x20, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x00, 0x43, 0x68, 0x69, 0x66, 0x66, 0x72, 0x65, 0x73, 0x20, 0x43, + 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x6e, 0x65, 0x6c, + 0x73, 0x20, 0x28, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x61, 0x6e, 0x74, 0x73, + 0x29, 0x00, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x65, 0x20, 0x5a, 0x69, + 0x66, 0x66, 0x65, 0x72, 0x6e, 0x00, 0x54, 0x72, 0x61, 0x64, 0x69, 0x7a, + 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x65, 0x00, 0x47, 0x72, 0x6f, 0x74, 0x65, + 0x20, 0x6e, 0x75, 0x6d, 0x6d, 0x65, 0x72, 0x73, 0x00, 0x00, 0x42, 0x00, + 0x75, 0x00, 0x6c, 0x00, 0x67, 0x00, 0x61, 0x00, 0x72, 0x00, 0x69, 0x00, + 0x61, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x43, 0x00, 0x79, 0x00, 0x72, 0x00, + 0x69, 0x00, 0x6c, 0x00, 0x6c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x20, 0x00, + 0x66, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x6d, 0x00, 0x73, 0x00, 0x00, 0x42, + 0x75, 0x6c, 0x67, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x20, 0x43, 0x79, 0x72, + 0x69, 0x6c, 0x6c, 0x69, 0x63, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, + 0x00, 0x61, 0x00, 0x6c, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6e, + 0x00, 0x61, 0x00, 0x74, 0x00, 0x65, 0x00, 0x20, 0x00, 0x6e, 0x00, 0x75, + 0x00, 0x6d, 0x00, 0x62, 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x73, + 0x00, 0x69, 0x00, 0x67, 0x00, 0x6e, 0x00, 0x00, 0x61, 0x6c, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x74, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x20, 0x73, 0x69, 0x67, 0x6e, 0x00, 0x00, 0x61, 0x00, 0x6c, 0x00, 0x74, + 0x00, 0x65, 0x00, 0x72, 0x00, 0x6e, 0x00, 0x61, 0x00, 0x74, 0x00, 0x65, + 0x00, 0x20, 0x00, 0x6c, 0x00, 0x6f, 0x00, 0x77, 0x00, 0x65, 0x00, 0x72, + 0x00, 0x63, 0x00, 0x61, 0x00, 0x73, 0x00, 0x65, 0x00, 0x20, 0x00, 0x65, + 0x00, 0x73, 0x00, 0x7a, 0x00, 0x65, 0x00, 0x74, 0x00, 0x74, 0x00, 0x00, + 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x65, 0x20, 0x6c, 0x6f, + 0x77, 0x65, 0x72, 0x63, 0x61, 0x73, 0x65, 0x20, 0x65, 0x73, 0x7a, 0x65, + 0x74, 0x74, 0x00, 0x00, 0x70, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x69, 0x00, + 0x6e, 0x00, 0x20, 0x00, 0x6e, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x62, 0x00, + 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x7a, 0x00, 0x65, 0x00, 0x72, 0x00, + 0x6f, 0x00, 0x00, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x20, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x20, 0x7a, 0x65, 0x72, 0x6f, 0x00, 0x00, 0x73, 0x00, + 0x6c, 0x00, 0x61, 0x00, 0x73, 0x00, 0x68, 0x00, 0x65, 0x00, 0x64, 0x00, + 0x20, 0x00, 0x6e, 0x00, 0x75, 0x00, 0x6d, 0x00, 0x62, 0x00, 0x65, 0x00, + 0x72, 0x00, 0x20, 0x00, 0x7a, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6f, 0x00, + 0x00, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x65, 0x64, 0x20, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x20, 0x7a, 0x65, 0x72, 0x6f, 0x00, 0x00, 0x73, 0x00, + 0x69, 0x00, 0x6d, 0x00, 0x70, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x20, 0x00, + 0x6c, 0x00, 0x6f, 0x00, 0x77, 0x00, 0x65, 0x00, 0x72, 0x00, 0x63, 0x00, + 0x61, 0x00, 0x73, 0x00, 0x65, 0x00, 0x20, 0x00, 0x67, 0x00, 0x00, 0x73, + 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x63, + 0x61, 0x73, 0x65, 0x20, 0x67, 0x00, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6d, + 0x00, 0x70, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x20, 0x00, 0x6c, 0x00, 0x6f, + 0x00, 0x77, 0x00, 0x65, 0x00, 0x72, 0x00, 0x63, 0x00, 0x61, 0x00, 0x73, + 0x00, 0x65, 0x00, 0x20, 0x00, 0x61, 0x00, 0x00, 0x73, 0x69, 0x6d, 0x70, + 0x6c, 0x65, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x63, 0x61, 0x73, 0x65, + 0x20, 0x61, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0x74, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc2, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x03, 0x00, 0x04, + 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0a, + 0x00, 0x0b, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x10, + 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0x00, 0x14, 0x00, 0x15, 0x00, 0x16, + 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1c, + 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x20, 0x00, 0x21, 0x00, 0x22, + 0x00, 0x23, 0x00, 0x24, 0x00, 0x25, 0x00, 0x26, 0x00, 0x27, 0x00, 0x28, + 0x00, 0x29, 0x00, 0x2a, 0x00, 0x2b, 0x00, 0x2c, 0x00, 0x2d, 0x00, 0x2e, + 0x00, 0x2f, 0x00, 0x30, 0x00, 0x31, 0x00, 0x32, 0x00, 0x33, 0x00, 0x34, + 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, + 0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x40, + 0x00, 0x41, 0x00, 0x42, 0x00, 0x43, 0x00, 0x44, 0x00, 0x45, 0x00, 0x46, + 0x00, 0x47, 0x00, 0x48, 0x00, 0x49, 0x00, 0x4a, 0x00, 0x4b, 0x00, 0x4c, + 0x00, 0x4d, 0x00, 0x4e, 0x00, 0x4f, 0x00, 0x50, 0x00, 0x51, 0x00, 0x52, + 0x00, 0x53, 0x00, 0x54, 0x00, 0x55, 0x00, 0x56, 0x00, 0x57, 0x00, 0x58, + 0x00, 0x59, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x5c, 0x00, 0x5d, 0x00, 0x5e, + 0x00, 0x5f, 0x00, 0x60, 0x00, 0x61, 0x01, 0x03, 0x00, 0xa3, 0x00, 0x84, + 0x00, 0x85, 0x00, 0xbd, 0x00, 0x96, 0x00, 0xe8, 0x00, 0x86, 0x00, 0x8e, + 0x00, 0x8b, 0x00, 0x9d, 0x00, 0xa9, 0x00, 0xa4, 0x01, 0x04, 0x00, 0x8a, + 0x00, 0xda, 0x00, 0x83, 0x00, 0x93, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0x8d, + 0x00, 0x97, 0x00, 0x88, 0x00, 0xc3, 0x00, 0xde, 0x00, 0xf1, 0x00, 0x9e, + 0x00, 0xaa, 0x00, 0xf5, 0x00, 0xf4, 0x00, 0xf6, 0x00, 0xa2, 0x00, 0xad, + 0x00, 0xc9, 0x00, 0xc7, 0x00, 0xae, 0x00, 0x62, 0x00, 0x63, 0x00, 0x90, + 0x00, 0x64, 0x00, 0xcb, 0x00, 0x65, 0x00, 0xc8, 0x00, 0xca, 0x00, 0xcf, + 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xe9, 0x00, 0x66, 0x00, 0xd3, + 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xaf, 0x00, 0x67, 0x00, 0xf0, 0x00, 0x91, + 0x00, 0xd6, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0x68, 0x00, 0xeb, 0x00, 0xed, + 0x00, 0x89, 0x00, 0x6a, 0x00, 0x69, 0x00, 0x6b, 0x00, 0x6d, 0x00, 0x6c, + 0x00, 0x6e, 0x00, 0xa0, 0x00, 0x6f, 0x00, 0x71, 0x00, 0x70, 0x00, 0x72, + 0x00, 0x73, 0x00, 0x75, 0x00, 0x74, 0x00, 0x76, 0x00, 0x77, 0x00, 0xea, + 0x00, 0x78, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x7b, 0x00, 0x7d, 0x00, 0x7c, + 0x00, 0xb8, 0x00, 0xa1, 0x00, 0x7f, 0x00, 0x7e, 0x00, 0x80, 0x00, 0x81, + 0x00, 0xec, 0x00, 0xee, 0x00, 0xba, 0x07, 0x75, 0x6e, 0x69, 0x30, 0x30, + 0x30, 0x44, 0x07, 0x75, 0x6e, 0x69, 0x30, 0x30, 0x41, 0x30, 0x07, 0x75, + 0x6e, 0x69, 0x30, 0x30, 0x41, 0x44, 0x00, 0x00, 0x00, 0x01, 0x00, 0x03, + 0x00, 0x08, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x07, 0xff, 0xff, 0x00, 0x0f, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x0a, 0x00, 0x03, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x00, 0x01, 0x01, + 0x00, 0x0b, 0x00, 0x02, 0x00, 0x00, 0x00, 0x4c, 0xc0, 0x00, 0x01, 0x02, + 0x00, 0x15, 0x00, 0x02, 0x00, 0x00, 0x00, 0x54, 0xc0, 0x01, 0x01, 0x03, + 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x01, 0x05, 0x00, 0x01, 0x01, 0x06, + 0x00, 0x02, 0x01, 0x07, 0x00, 0x00, 0x01, 0x08, 0x00, 0x02, 0x01, 0x09, + 0x00, 0x00, 0x01, 0x0a, 0x00, 0x01, 0x01, 0x0b, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x04, 0x00, 0x0b, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfd, 0x00, 0x0b, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0xff, 0xff, 0x00, 0x0a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xe7, 0x00, 0x0a, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x08, 0xff, 0xff, 0xff, 0xef, 0x00, 0x0a, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x10, 0xff, 0xff, 0xff, 0xf7, 0x00, 0x15, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x20, 0xff, 0xff, 0xff, 0xff, 0x00, 0x15, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xdf, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x28, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, + 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0xb0, + 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x01, 0x04, 0x00, 0x00, 0x01, 0x16, + 0x00, 0x04, 0x00, 0x06, 0x00, 0x02, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x12, 0x00, 0x12, 0x00, 0x1e, 0x00, 0x17, 0x00, 0x14, 0x00, 0x20, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x04, 0x00, 0x05, 0x00, 0x06, + 0x00, 0x07, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, + 0x00, 0x02, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa0, 0x00, 0x00, 0x03, 0x00, 0x05, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xa0, 0x00, 0x00, 0x06, 0x3f, 0xff, 0xff, 0xeb, 0x3f, 0xff, 0xff, 0xef, + 0xbf, 0xff, 0xff, 0xee, 0x3f, 0xff, 0xff, 0xec, 0x3f, 0xff, 0xff, 0xf2, + 0xbf, 0xff, 0xff, 0xf1, 0x3f, 0xff, 0xff, 0xef, 0x3f, 0xff, 0xff, 0xf5, + 0xbf, 0xff, 0xff, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x7f, + 0x00, 0x7e, 0x00, 0x80, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x06, 0x00, 0x01, 0x00, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x00, 0x14, 0x00, 0x18, 0xff, 0xff, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x7b, 0x00, 0x74, 0x00, 0x75, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x20, + 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0xe5, 0x16, 0xe7, 0x6b, + 0x00, 0x00, 0x00, 0x00, 0xe1, 0xa9, 0xde, 0x41, 0x00, 0x00, 0x00, 0x00, + 0xe5, 0x4d, 0x1e, 0x76}; +unsigned int MwMonospaceTTFDataSize = 36184; +#endif diff --git a/widget/milsko/milskosrc/src/text/font/ttf.c b/widget/milsko/milskosrc/src/text/font/ttf.c new file mode 100644 index 0000000000..7eeea07b56 --- /dev/null +++ b/widget/milsko/milskosrc/src/text/font/ttf.c @@ -0,0 +1,2945 @@ +#include + +#if defined(USE_STB_TRUETYPE) || defined(USE_FREETYPE2) || defined(USE_GDI_TEXT) +unsigned char MwTTFData[] = { + 0x00, 0x01, 0x00, 0x00, 0x00, 0x12, 0x01, 0x00, 0x00, 0x04, 0x00, 0x20, + 0x46, 0x46, 0x54, 0x4d, 0x94, 0x92, 0x79, 0xd4, 0x00, 0x00, 0x89, 0xa4, + 0x00, 0x00, 0x00, 0x1c, 0x4f, 0x53, 0x2f, 0x32, 0xa1, 0x35, 0x9f, 0x72, + 0x00, 0x00, 0x01, 0xa8, 0x00, 0x00, 0x00, 0x60, 0x63, 0x6d, 0x61, 0x70, + 0x09, 0xe8, 0xe7, 0x70, 0x00, 0x00, 0x05, 0x10, 0x00, 0x00, 0x01, 0x4a, + 0x63, 0x76, 0x74, 0x20, 0x0f, 0x4d, 0x18, 0xa4, 0x00, 0x00, 0x0f, 0x1c, + 0x00, 0x00, 0x00, 0xa2, 0x66, 0x65, 0x61, 0x74, 0xc0, 0x1a, 0x05, 0x59, + 0x00, 0x00, 0x89, 0x74, 0x00, 0x00, 0x00, 0x30, 0x66, 0x70, 0x67, 0x6d, + 0x7e, 0x61, 0xb6, 0x11, 0x00, 0x00, 0x06, 0x5c, 0x00, 0x00, 0x07, 0xb4, + 0x67, 0x61, 0x73, 0x70, 0x00, 0x15, 0x00, 0x23, 0x00, 0x00, 0x88, 0xec, + 0x00, 0x00, 0x00, 0x10, 0x67, 0x6c, 0x79, 0x66, 0x65, 0x79, 0x59, 0xb7, + 0x00, 0x00, 0x11, 0x48, 0x00, 0x00, 0x52, 0x6c, 0x68, 0x65, 0x61, 0x64, + 0x15, 0x0d, 0x9f, 0xf2, 0x00, 0x00, 0x01, 0x2c, 0x00, 0x00, 0x00, 0x36, + 0x68, 0x68, 0x65, 0x61, 0x0f, 0x3c, 0x06, 0x13, 0x00, 0x00, 0x01, 0x64, + 0x00, 0x00, 0x00, 0x24, 0x68, 0x6d, 0x74, 0x78, 0x53, 0x6d, 0x50, 0x6f, + 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x03, 0x08, 0x6b, 0x65, 0x72, 0x6e, + 0x4a, 0x11, 0x58, 0x96, 0x00, 0x00, 0x63, 0xb4, 0x00, 0x00, 0x1a, 0x76, + 0x6c, 0x6f, 0x63, 0x61, 0x41, 0xac, 0x2d, 0xdc, 0x00, 0x00, 0x0f, 0xc0, + 0x00, 0x00, 0x01, 0x86, 0x6d, 0x61, 0x78, 0x70, 0x02, 0x48, 0x01, 0x4a, + 0x00, 0x00, 0x01, 0x88, 0x00, 0x00, 0x00, 0x20, 0x6d, 0x6f, 0x72, 0x78, + 0x00, 0x32, 0x00, 0xbb, 0x00, 0x00, 0x88, 0xfc, 0x00, 0x00, 0x00, 0x78, + 0x6e, 0x61, 0x6d, 0x65, 0x56, 0x44, 0xff, 0x7a, 0x00, 0x00, 0x7e, 0x2c, + 0x00, 0x00, 0x09, 0x08, 0x70, 0x6f, 0x73, 0x74, 0xb1, 0xe2, 0x4e, 0x7c, + 0x00, 0x00, 0x87, 0x34, 0x00, 0x00, 0x01, 0xb8, 0x70, 0x72, 0x65, 0x70, + 0x43, 0xb7, 0x96, 0xa4, 0x00, 0x00, 0x0e, 0x10, 0x00, 0x00, 0x01, 0x09, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x19, 0x9a, 0xf4, 0xa4, 0xd1, 0x4e, + 0x5f, 0x0f, 0x3c, 0xf5, 0x00, 0x1f, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xc9, 0x35, 0x31, 0x8b, 0x00, 0x00, 0x00, 0x00, 0xe5, 0xf9, 0x0a, 0x4d, + 0xff, 0x60, 0xfe, 0x10, 0x07, 0x4c, 0x07, 0x73, 0x00, 0x00, 0x00, 0x08, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x08, 0x8d, 0xfd, 0xa8, 0x00, 0x00, 0x08, 0x00, 0xff, 0x60, 0xff, 0xa8, + 0x07, 0x4c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0x00, 0x01, 0x00, 0x00, + 0x00, 0xc2, 0x00, 0x42, 0x00, 0x05, 0x00, 0x3d, 0x00, 0x04, 0x00, 0x02, + 0x00, 0x10, 0x00, 0x2f, 0x00, 0x5c, 0x00, 0x00, 0x01, 0x0e, 0x00, 0x99, + 0x00, 0x02, 0x00, 0x01, 0x00, 0x03, 0x04, 0x5f, 0x01, 0x90, 0x00, 0x05, + 0x00, 0x00, 0x05, 0x9a, 0x05, 0x33, 0x00, 0x00, 0x01, 0x1f, 0x05, 0x9a, + 0x05, 0x33, 0x00, 0x00, 0x03, 0xd1, 0x00, 0x66, 0x01, 0xf1, 0x08, 0x02, + 0x02, 0x0b, 0x06, 0x06, 0x03, 0x05, 0x04, 0x02, 0x02, 0x04, 0xe0, 0x00, + 0x02, 0xef, 0x40, 0x00, 0x20, 0x5b, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, + 0x00, 0x00, 0x31, 0x41, 0x53, 0x43, 0x00, 0x40, 0x00, 0x20, 0x00, 0xff, + 0x06, 0x1f, 0xfe, 0x14, 0x00, 0x84, 0x08, 0x8d, 0x02, 0x58, 0x20, 0x00, + 0x01, 0x9f, 0x00, 0x00, 0x00, 0x00, 0x04, 0x48, 0x05, 0xb6, 0x00, 0x00, + 0x00, 0x20, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x02, 0x14, 0x00, 0x00, 0x02, 0x23, 0x00, 0x98, + 0x03, 0x35, 0x00, 0x85, 0x05, 0x2b, 0x00, 0x33, 0x04, 0x93, 0x00, 0x83, + 0x06, 0x96, 0x00, 0x68, 0x05, 0xd7, 0x00, 0x71, 0x01, 0xc5, 0x00, 0x85, + 0x02, 0x5e, 0x00, 0x52, 0x02, 0x5e, 0x00, 0x3d, 0x04, 0x6a, 0x00, 0x56, + 0x04, 0x93, 0x00, 0x68, 0x01, 0xf6, 0x00, 0x3f, 0x02, 0x93, 0x00, 0x54, + 0x02, 0x21, 0x00, 0x98, 0x02, 0xf0, 0x00, 0x14, 0x04, 0x93, 0x00, 0x66, + 0x04, 0x93, 0x00, 0xbc, 0x04, 0x93, 0x00, 0x64, 0x04, 0x93, 0x00, 0x5e, + 0x04, 0x93, 0x00, 0x2b, 0x04, 0x93, 0x00, 0x85, 0x04, 0x93, 0x00, 0x75, + 0x04, 0x93, 0x00, 0x5e, 0x04, 0x93, 0x00, 0x68, 0x04, 0x93, 0x00, 0x6a, + 0x02, 0x21, 0x00, 0x98, 0x02, 0x21, 0x00, 0x3f, 0x04, 0x93, 0x00, 0x68, + 0x04, 0x93, 0x00, 0x77, 0x04, 0x93, 0x00, 0x68, 0x03, 0x6f, 0x00, 0x1b, + 0x07, 0x31, 0x00, 0x79, 0x05, 0x10, 0x00, 0x00, 0x05, 0x2f, 0x00, 0xc9, + 0x05, 0x0c, 0x00, 0x7d, 0x05, 0xd5, 0x00, 0xc9, 0x04, 0x73, 0x00, 0xc9, + 0x04, 0x21, 0x00, 0xc9, 0x05, 0xd3, 0x00, 0x7d, 0x05, 0xe7, 0x00, 0xc9, + 0x02, 0x3b, 0x00, 0xc9, 0x02, 0x23, 0xff, 0x60, 0x04, 0xe9, 0x00, 0xc9, + 0x04, 0x27, 0x00, 0xc9, 0x07, 0x39, 0x00, 0xc9, 0x06, 0x08, 0x00, 0xc9, + 0x06, 0x3b, 0x00, 0x7d, 0x04, 0xd1, 0x00, 0xc9, 0x06, 0x3b, 0x00, 0x7d, + 0x04, 0xf2, 0x00, 0xc9, 0x04, 0x64, 0x00, 0x6a, 0x04, 0x6d, 0x00, 0x12, + 0x05, 0xd3, 0x00, 0xba, 0x04, 0xc3, 0x00, 0x00, 0x07, 0x68, 0x00, 0x1b, + 0x04, 0x9e, 0x00, 0x08, 0x04, 0x7b, 0x00, 0x00, 0x04, 0x91, 0x00, 0x52, + 0x02, 0xa2, 0x00, 0xa6, 0x02, 0xf0, 0x00, 0x17, 0x02, 0xa2, 0x00, 0x33, + 0x04, 0x56, 0x00, 0x31, 0x03, 0x96, 0xff, 0xfc, 0x04, 0x9e, 0x01, 0x89, + 0x04, 0x73, 0x00, 0x5e, 0x04, 0xe7, 0x00, 0xb0, 0x03, 0xcf, 0x00, 0x73, + 0x04, 0xe7, 0x00, 0x73, 0x04, 0x7d, 0x00, 0x73, 0x02, 0xb6, 0x00, 0x1d, + 0x04, 0x62, 0x00, 0x27, 0x04, 0xe9, 0x00, 0xb0, 0x02, 0x06, 0x00, 0xa2, + 0x02, 0x06, 0xff, 0x91, 0x04, 0x33, 0x00, 0xb0, 0x02, 0x06, 0x00, 0xb0, + 0x07, 0x71, 0x00, 0xb0, 0x04, 0xe9, 0x00, 0xb0, 0x04, 0xd5, 0x00, 0x73, + 0x04, 0xe7, 0x00, 0xb0, 0x04, 0xe7, 0x00, 0x73, 0x03, 0x44, 0x00, 0xb0, + 0x03, 0xd1, 0x00, 0x6a, 0x02, 0xd3, 0x00, 0x1f, 0x04, 0xe9, 0x00, 0xa4, + 0x04, 0x02, 0x00, 0x00, 0x06, 0x39, 0x00, 0x17, 0x04, 0x31, 0x00, 0x27, + 0x04, 0x08, 0x00, 0x02, 0x03, 0xbe, 0x00, 0x52, 0x03, 0x08, 0x00, 0x3d, + 0x04, 0x68, 0x01, 0xee, 0x03, 0x08, 0x00, 0x48, 0x04, 0x93, 0x00, 0x68, + 0x02, 0x14, 0x00, 0x00, 0x02, 0x23, 0x00, 0x98, 0x04, 0x93, 0x00, 0xbe, + 0x04, 0x93, 0x00, 0x3f, 0x04, 0x93, 0x00, 0x7b, 0x04, 0x93, 0x00, 0x1f, + 0x04, 0x68, 0x01, 0xee, 0x04, 0x21, 0x00, 0x7b, 0x04, 0x9e, 0x01, 0x35, + 0x06, 0xa8, 0x00, 0x64, 0x02, 0xd5, 0x00, 0x46, 0x03, 0xfa, 0x00, 0x52, + 0x04, 0x93, 0x00, 0x68, 0x02, 0x93, 0x00, 0x54, 0x06, 0xa8, 0x00, 0x64, + 0x04, 0x00, 0xff, 0xfa, 0x03, 0x6d, 0x00, 0x7f, 0x04, 0x93, 0x00, 0x68, + 0x02, 0xc7, 0x00, 0x31, 0x02, 0xc7, 0x00, 0x21, 0x04, 0x9e, 0x01, 0x89, + 0x04, 0xf4, 0x00, 0xb0, 0x05, 0x3d, 0x00, 0x71, 0x02, 0x21, 0x00, 0x98, + 0x01, 0xd1, 0x00, 0x25, 0x02, 0xc7, 0x00, 0x4c, 0x03, 0x00, 0x00, 0x42, + 0x03, 0xfa, 0x00, 0x50, 0x06, 0x3d, 0x00, 0x4b, 0x06, 0x3d, 0x00, 0x2e, + 0x06, 0x3d, 0x00, 0x1a, 0x03, 0x6f, 0x00, 0x33, 0x05, 0x10, 0x00, 0x00, + 0x05, 0x10, 0x00, 0x00, 0x05, 0x10, 0x00, 0x00, 0x05, 0x10, 0x00, 0x00, + 0x05, 0x10, 0x00, 0x00, 0x05, 0x10, 0x00, 0x00, 0x06, 0xfc, 0xff, 0xfe, + 0x05, 0x0c, 0x00, 0x7d, 0x04, 0x73, 0x00, 0xc9, 0x04, 0x73, 0x00, 0xc9, + 0x04, 0x73, 0x00, 0xc9, 0x04, 0x73, 0x00, 0xc9, 0x02, 0x3b, 0x00, 0x05, + 0x02, 0x3b, 0x00, 0xb3, 0x02, 0x3b, 0xff, 0xc7, 0x02, 0x3b, 0x00, 0x05, + 0x05, 0xc7, 0x00, 0x2f, 0x06, 0x08, 0x00, 0xc9, 0x06, 0x3b, 0x00, 0x7d, + 0x06, 0x3b, 0x00, 0x7d, 0x06, 0x3b, 0x00, 0x7d, 0x06, 0x3b, 0x00, 0x7d, + 0x06, 0x3b, 0x00, 0x7d, 0x04, 0x93, 0x00, 0x85, 0x06, 0x3b, 0x00, 0x7d, + 0x05, 0xd3, 0x00, 0xba, 0x05, 0xd3, 0x00, 0xba, 0x05, 0xd3, 0x00, 0xba, + 0x05, 0xd3, 0x00, 0xba, 0x04, 0x7b, 0x00, 0x00, 0x04, 0xe3, 0x00, 0xc9, + 0x04, 0xfa, 0x00, 0xb0, 0x04, 0x73, 0x00, 0x5e, 0x04, 0x73, 0x00, 0x5e, + 0x04, 0x73, 0x00, 0x5e, 0x04, 0x73, 0x00, 0x5e, 0x04, 0x73, 0x00, 0x5e, + 0x04, 0x73, 0x00, 0x5e, 0x06, 0xdd, 0x00, 0x5e, 0x03, 0xcf, 0x00, 0x73, + 0x04, 0x7d, 0x00, 0x73, 0x04, 0x7d, 0x00, 0x73, 0x04, 0x7d, 0x00, 0x73, + 0x04, 0x7d, 0x00, 0x73, 0x02, 0x06, 0xff, 0xda, 0x02, 0x06, 0x00, 0xa9, + 0x02, 0x06, 0xff, 0xb3, 0x02, 0x06, 0xff, 0xec, 0x04, 0xc5, 0x00, 0x71, + 0x04, 0xe9, 0x00, 0xb0, 0x04, 0xd5, 0x00, 0x73, 0x04, 0xd5, 0x00, 0x73, + 0x04, 0xd5, 0x00, 0x73, 0x04, 0xd5, 0x00, 0x73, 0x04, 0xd5, 0x00, 0x73, + 0x04, 0x93, 0x00, 0x68, 0x04, 0xd5, 0x00, 0x73, 0x04, 0xe9, 0x00, 0xa4, + 0x04, 0xe9, 0x00, 0xa4, 0x04, 0xe9, 0x00, 0xa4, 0x04, 0xe9, 0x00, 0xa4, + 0x04, 0x08, 0x00, 0x02, 0x04, 0xe7, 0x00, 0xb0, 0x04, 0x08, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x1c, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x03, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x1c, 0x00, 0x04, 0x00, 0x28, 0x00, 0x00, 0x00, 0x06, + 0x00, 0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x7e, 0x00, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x20, 0x00, 0xa0, 0xff, 0xff, 0xff, 0xe3, 0xff, 0xc2, + 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x03, 0x04, + 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, + 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, + 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0x34, + 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 0x40, + 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, + 0x4d, 0x4e, 0x4f, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, + 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 0x60, 0x61, 0x00, 0x86, 0x87, + 0x89, 0x8b, 0x93, 0x98, 0x9e, 0xa3, 0xa2, 0xa4, 0xa6, 0xa5, 0xa7, 0xa9, + 0xab, 0xaa, 0xac, 0xad, 0xaf, 0xae, 0xb0, 0xb1, 0xb3, 0xb5, 0xb4, 0xb6, + 0xb8, 0xb7, 0xbc, 0xbb, 0xbd, 0xbe, 0x00, 0x72, 0x64, 0x65, 0x69, 0x00, + 0x78, 0xa1, 0x70, 0x6b, 0x00, 0x76, 0x6a, 0x00, 0x88, 0x9a, 0x00, 0x73, + 0x00, 0x00, 0x67, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x7c, 0x00, + 0xa8, 0xba, 0x81, 0x63, 0x6e, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x7d, 0x00, + 0x62, 0x82, 0x85, 0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xb9, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x79, + 0x00, 0x00, 0x00, 0x84, 0x8c, 0x83, 0x8d, 0x8a, 0x8f, 0x90, 0x91, 0x8e, + 0x95, 0x96, 0x00, 0x94, 0x9c, 0x9d, 0x9b, 0x00, 0x00, 0x00, 0x71, 0x00, + 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x47, 0x5b, 0x5a, + 0x59, 0x58, 0x55, 0x54, 0x53, 0x52, 0x51, 0x50, 0x4f, 0x4e, 0x4d, 0x4c, + 0x4b, 0x4a, 0x49, 0x48, 0x47, 0x46, 0x45, 0x44, 0x43, 0x42, 0x41, 0x40, + 0x3f, 0x3e, 0x3d, 0x3c, 0x3b, 0x3a, 0x39, 0x38, 0x37, 0x36, 0x35, 0x31, + 0x30, 0x2f, 0x2e, 0x2d, 0x2c, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, + 0x21, 0x1f, 0x18, 0x14, 0x11, 0x10, 0x0f, 0x0e, 0x0d, 0x0b, 0x0a, 0x09, + 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00, 0x2c, 0x20, 0xb0, + 0x01, 0x60, 0x45, 0xb0, 0x03, 0x25, 0x20, 0x11, 0x46, 0x61, 0x23, 0x45, + 0x23, 0x61, 0x48, 0x2d, 0x2c, 0x20, 0x45, 0x18, 0x68, 0x44, 0x2d, 0x2c, + 0x45, 0x23, 0x46, 0x60, 0xb0, 0x20, 0x61, 0x20, 0xb0, 0x46, 0x60, 0xb0, + 0x04, 0x26, 0x23, 0x48, 0x48, 0x2d, 0x2c, 0x45, 0x23, 0x46, 0x23, 0x61, + 0xb0, 0x20, 0x60, 0x20, 0xb0, 0x26, 0x61, 0xb0, 0x20, 0x61, 0xb0, 0x04, + 0x26, 0x23, 0x48, 0x48, 0x2d, 0x2c, 0x45, 0x23, 0x46, 0x60, 0xb0, 0x40, + 0x61, 0x20, 0xb0, 0x66, 0x60, 0xb0, 0x04, 0x26, 0x23, 0x48, 0x48, 0x2d, + 0x2c, 0x45, 0x23, 0x46, 0x23, 0x61, 0xb0, 0x40, 0x60, 0x20, 0xb0, 0x26, + 0x61, 0xb0, 0x40, 0x61, 0xb0, 0x04, 0x26, 0x23, 0x48, 0x48, 0x2d, 0x2c, + 0x01, 0x10, 0x20, 0x3c, 0x00, 0x3c, 0x2d, 0x2c, 0x20, 0x45, 0x23, 0x20, + 0xb0, 0xcd, 0x44, 0x23, 0x20, 0xb8, 0x01, 0x5a, 0x51, 0x58, 0x23, 0x20, + 0xb0, 0x8d, 0x44, 0x23, 0x59, 0x20, 0xb0, 0xed, 0x51, 0x58, 0x23, 0x20, + 0xb0, 0x4d, 0x44, 0x23, 0x59, 0x20, 0xb0, 0x04, 0x26, 0x51, 0x58, 0x23, + 0x20, 0xb0, 0x0d, 0x44, 0x23, 0x59, 0x21, 0x21, 0x2d, 0x2c, 0x20, 0x20, + 0x45, 0x18, 0x68, 0x44, 0x20, 0xb0, 0x01, 0x60, 0x20, 0x45, 0xb0, 0x46, + 0x76, 0x68, 0x8a, 0x45, 0x60, 0x44, 0x2d, 0x2c, 0x01, 0xb1, 0x0b, 0x0a, + 0x43, 0x23, 0x43, 0x65, 0x0a, 0x2d, 0x2c, 0x00, 0xb1, 0x0a, 0x0b, 0x43, + 0x23, 0x43, 0x0b, 0x2d, 0x2c, 0x00, 0xb0, 0x28, 0x23, 0x70, 0xb1, 0x01, + 0x28, 0x3e, 0x01, 0xb0, 0x28, 0x23, 0x70, 0xb1, 0x02, 0x28, 0x45, 0x3a, + 0xb1, 0x02, 0x00, 0x08, 0x0d, 0x2d, 0x2c, 0x20, 0x45, 0xb0, 0x03, 0x25, + 0x45, 0x61, 0x64, 0xb0, 0x50, 0x51, 0x58, 0x45, 0x44, 0x1b, 0x21, 0x21, + 0x59, 0x2d, 0x2c, 0x49, 0xb0, 0x0e, 0x23, 0x44, 0x2d, 0x2c, 0x20, 0x45, + 0xb0, 0x00, 0x43, 0x60, 0x44, 0x2d, 0x2c, 0x01, 0xb0, 0x06, 0x43, 0xb0, + 0x07, 0x43, 0x65, 0x0a, 0x2d, 0x2c, 0x20, 0x69, 0xb0, 0x40, 0x61, 0xb0, + 0x00, 0x8b, 0x20, 0xb1, 0x2c, 0xc0, 0x8a, 0x8c, 0xb8, 0x10, 0x00, 0x62, + 0x60, 0x2b, 0x0c, 0x64, 0x23, 0x64, 0x61, 0x5c, 0x58, 0xb0, 0x03, 0x61, + 0x59, 0x2d, 0x2c, 0x8a, 0x03, 0x45, 0x8a, 0x8a, 0x87, 0xb0, 0x11, 0x2b, + 0xb0, 0x29, 0x23, 0x44, 0xb0, 0x29, 0x7a, 0xe4, 0x18, 0x2d, 0x2c, 0x45, + 0x65, 0xb0, 0x2c, 0x23, 0x44, 0x45, 0xb0, 0x2b, 0x23, 0x44, 0x2d, 0x2c, + 0x4b, 0x52, 0x58, 0x45, 0x44, 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0x4b, + 0x51, 0x58, 0x45, 0x44, 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0x01, 0xb0, + 0x05, 0x25, 0x10, 0x23, 0x20, 0x8a, 0xf5, 0x00, 0xb0, 0x01, 0x60, 0x23, + 0xed, 0xec, 0x2d, 0x2c, 0x01, 0xb0, 0x05, 0x25, 0x10, 0x23, 0x20, 0x8a, + 0xf5, 0x00, 0xb0, 0x01, 0x61, 0x23, 0xed, 0xec, 0x2d, 0x2c, 0x01, 0xb0, + 0x06, 0x25, 0x10, 0xf5, 0x00, 0xed, 0xec, 0x2d, 0x2c, 0xb0, 0x02, 0x43, + 0xb0, 0x01, 0x52, 0x58, 0x21, 0x21, 0x21, 0x21, 0x21, 0x1b, 0x46, 0x23, + 0x46, 0x60, 0x8a, 0x8a, 0x46, 0x23, 0x20, 0x46, 0x8a, 0x60, 0x8a, 0x61, + 0xb8, 0xff, 0x80, 0x62, 0x23, 0x20, 0x10, 0x23, 0x8a, 0xb1, 0x0c, 0x0c, + 0x8a, 0x70, 0x45, 0x60, 0x20, 0xb0, 0x00, 0x50, 0x58, 0xb0, 0x01, 0x61, + 0xb8, 0xff, 0xba, 0x8b, 0x1b, 0xb0, 0x46, 0x8c, 0x59, 0xb0, 0x10, 0x60, + 0x68, 0x01, 0x3a, 0x59, 0x2d, 0x2c, 0x20, 0x45, 0xb0, 0x03, 0x25, 0x46, + 0x52, 0x4b, 0xb0, 0x13, 0x51, 0x5b, 0x58, 0xb0, 0x02, 0x25, 0x46, 0x20, + 0x68, 0x61, 0xb0, 0x03, 0x25, 0xb0, 0x03, 0x25, 0x3f, 0x23, 0x21, 0x38, + 0x1b, 0x21, 0x11, 0x59, 0x2d, 0x2c, 0x20, 0x45, 0xb0, 0x03, 0x25, 0x46, + 0x50, 0x58, 0xb0, 0x02, 0x25, 0x46, 0x20, 0x68, 0x61, 0xb0, 0x03, 0x25, + 0xb0, 0x03, 0x25, 0x3f, 0x23, 0x21, 0x38, 0x1b, 0x21, 0x11, 0x59, 0x2d, + 0x2c, 0x00, 0xb0, 0x07, 0x43, 0xb0, 0x06, 0x43, 0x0b, 0x2d, 0x2c, 0x21, + 0x21, 0x0c, 0x64, 0x23, 0x64, 0x8b, 0xb8, 0x40, 0x00, 0x62, 0x2d, 0x2c, + 0x21, 0xb0, 0x80, 0x51, 0x58, 0x0c, 0x64, 0x23, 0x64, 0x8b, 0xb8, 0x20, + 0x00, 0x62, 0x1b, 0xb2, 0x00, 0x40, 0x2f, 0x2b, 0x59, 0xb0, 0x02, 0x60, + 0x2d, 0x2c, 0x21, 0xb0, 0xc0, 0x51, 0x58, 0x0c, 0x64, 0x23, 0x64, 0x8b, + 0xb8, 0x15, 0x55, 0x62, 0x1b, 0xb2, 0x00, 0x80, 0x2f, 0x2b, 0x59, 0xb0, + 0x02, 0x60, 0x2d, 0x2c, 0x0c, 0x64, 0x23, 0x64, 0x8b, 0xb8, 0x40, 0x00, + 0x62, 0x60, 0x23, 0x21, 0x2d, 0x2c, 0x4b, 0x53, 0x58, 0x8a, 0xb0, 0x04, + 0x25, 0x49, 0x64, 0x23, 0x45, 0x69, 0xb0, 0x40, 0x8b, 0x61, 0xb0, 0x80, + 0x62, 0xb0, 0x20, 0x61, 0x6a, 0xb0, 0x0e, 0x23, 0x44, 0x23, 0x10, 0xb0, + 0x0e, 0xf6, 0x1b, 0x21, 0x23, 0x8a, 0x12, 0x11, 0x20, 0x39, 0x2f, 0x59, + 0x2d, 0x2c, 0x4b, 0x53, 0x58, 0x20, 0xb0, 0x03, 0x25, 0x49, 0x64, 0x69, + 0x20, 0xb0, 0x05, 0x26, 0xb0, 0x06, 0x25, 0x49, 0x64, 0x23, 0x61, 0xb0, + 0x80, 0x62, 0xb0, 0x20, 0x61, 0x6a, 0xb0, 0x0e, 0x23, 0x44, 0xb0, 0x04, + 0x26, 0x10, 0xb0, 0x0e, 0xf6, 0x8a, 0x10, 0xb0, 0x0e, 0x23, 0x44, 0xb0, + 0x0e, 0xf6, 0xb0, 0x0e, 0x23, 0x44, 0xb0, 0x0e, 0xed, 0x1b, 0x8a, 0xb0, + 0x04, 0x26, 0x11, 0x12, 0x20, 0x39, 0x23, 0x20, 0x39, 0x2f, 0x2f, 0x59, + 0x2d, 0x2c, 0x45, 0x23, 0x45, 0x60, 0x23, 0x45, 0x60, 0x23, 0x45, 0x60, + 0x23, 0x76, 0x68, 0x18, 0xb0, 0x80, 0x62, 0x20, 0x2d, 0x2c, 0xb0, 0x48, + 0x2b, 0x2d, 0x2c, 0x20, 0x45, 0xb0, 0x00, 0x54, 0x58, 0xb0, 0x40, 0x44, + 0x20, 0x45, 0xb0, 0x40, 0x61, 0x44, 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x2c, + 0x45, 0xb1, 0x30, 0x2f, 0x45, 0x23, 0x45, 0x61, 0x60, 0xb0, 0x01, 0x60, + 0x69, 0x44, 0x2d, 0x2c, 0x4b, 0x51, 0x58, 0xb0, 0x2f, 0x23, 0x70, 0xb0, + 0x14, 0x23, 0x42, 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0x4b, 0x51, 0x58, + 0x20, 0xb0, 0x03, 0x25, 0x45, 0x69, 0x53, 0x58, 0x44, 0x1b, 0x21, 0x21, + 0x59, 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0x45, 0xb0, 0x14, 0x43, 0xb0, + 0x00, 0x60, 0x63, 0xb0, 0x01, 0x60, 0x69, 0x44, 0x2d, 0x2c, 0xb0, 0x2f, + 0x45, 0x44, 0x2d, 0x2c, 0x45, 0x23, 0x20, 0x45, 0x8a, 0x60, 0x44, 0x2d, + 0x2c, 0x45, 0x23, 0x45, 0x60, 0x44, 0x2d, 0x2c, 0x4b, 0x23, 0x51, 0x58, + 0xb9, 0x00, 0x33, 0xff, 0xe0, 0xb1, 0x34, 0x20, 0x1b, 0xb3, 0x33, 0x00, + 0x34, 0x00, 0x59, 0x44, 0x44, 0x2d, 0x2c, 0xb0, 0x16, 0x43, 0x58, 0xb0, + 0x03, 0x26, 0x45, 0x8a, 0x58, 0x64, 0x66, 0xb0, 0x1f, 0x60, 0x1b, 0x64, + 0xb0, 0x20, 0x60, 0x66, 0x20, 0x58, 0x1b, 0x21, 0xb0, 0x40, 0x59, 0xb0, + 0x01, 0x61, 0x59, 0x23, 0x58, 0x65, 0x59, 0xb0, 0x29, 0x23, 0x44, 0x23, + 0x10, 0xb0, 0x29, 0xe0, 0x1b, 0x21, 0x21, 0x21, 0x21, 0x21, 0x59, 0x2d, + 0x2c, 0xb0, 0x02, 0x43, 0x54, 0x58, 0x4b, 0x53, 0x23, 0x4b, 0x51, 0x5a, + 0x58, 0x38, 0x1b, 0x21, 0x21, 0x59, 0x1b, 0x21, 0x21, 0x21, 0x21, 0x59, + 0x2d, 0x2c, 0xb0, 0x16, 0x43, 0x58, 0xb0, 0x04, 0x25, 0x45, 0x64, 0xb0, + 0x20, 0x60, 0x66, 0x20, 0x58, 0x1b, 0x21, 0xb0, 0x40, 0x59, 0xb0, 0x01, + 0x61, 0x23, 0x58, 0x1b, 0x65, 0x59, 0xb0, 0x29, 0x23, 0x44, 0xb0, 0x05, + 0x25, 0xb0, 0x08, 0x25, 0x08, 0x20, 0x58, 0x02, 0x1b, 0x03, 0x59, 0xb0, + 0x04, 0x25, 0x10, 0xb0, 0x05, 0x25, 0x20, 0x46, 0xb0, 0x04, 0x25, 0x23, + 0x42, 0x3c, 0xb0, 0x04, 0x25, 0xb0, 0x07, 0x25, 0x08, 0xb0, 0x07, 0x25, + 0x10, 0xb0, 0x06, 0x25, 0x20, 0x46, 0xb0, 0x04, 0x25, 0xb0, 0x01, 0x60, + 0x23, 0x42, 0x3c, 0x20, 0x58, 0x01, 0x1b, 0x00, 0x59, 0xb0, 0x04, 0x25, + 0x10, 0xb0, 0x05, 0x25, 0xb0, 0x29, 0xe0, 0xb0, 0x29, 0x20, 0x45, 0x65, + 0x44, 0xb0, 0x07, 0x25, 0x10, 0xb0, 0x06, 0x25, 0xb0, 0x29, 0xe0, 0xb0, + 0x05, 0x25, 0xb0, 0x08, 0x25, 0x08, 0x20, 0x58, 0x02, 0x1b, 0x03, 0x59, + 0xb0, 0x05, 0x25, 0xb0, 0x03, 0x25, 0x43, 0x48, 0xb0, 0x04, 0x25, 0xb0, + 0x07, 0x25, 0x08, 0xb0, 0x06, 0x25, 0xb0, 0x03, 0x25, 0xb0, 0x01, 0x60, + 0x43, 0x48, 0x1b, 0x21, 0x59, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x2d, 0x2c, 0x02, 0xb0, 0x04, 0x25, 0x20, 0x20, 0x46, 0xb0, 0x04, 0x25, + 0x23, 0x42, 0xb0, 0x05, 0x25, 0x08, 0xb0, 0x03, 0x25, 0x45, 0x48, 0x21, + 0x21, 0x21, 0x21, 0x2d, 0x2c, 0x02, 0xb0, 0x03, 0x25, 0x20, 0xb0, 0x04, + 0x25, 0x08, 0xb0, 0x02, 0x25, 0x43, 0x48, 0x21, 0x21, 0x21, 0x2d, 0x2c, + 0x45, 0x23, 0x20, 0x45, 0x18, 0x20, 0xb0, 0x00, 0x50, 0x20, 0x58, 0x23, + 0x65, 0x23, 0x59, 0x23, 0x68, 0x20, 0xb0, 0x40, 0x50, 0x58, 0x21, 0xb0, + 0x40, 0x59, 0x23, 0x58, 0x65, 0x59, 0x8a, 0x60, 0x44, 0x2d, 0x2c, 0x4b, + 0x53, 0x23, 0x4b, 0x51, 0x5a, 0x58, 0x20, 0x45, 0x8a, 0x60, 0x44, 0x1b, + 0x21, 0x21, 0x59, 0x2d, 0x2c, 0x4b, 0x54, 0x58, 0x20, 0x45, 0x8a, 0x60, + 0x44, 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0x4b, 0x53, 0x23, 0x4b, 0x51, + 0x5a, 0x58, 0x38, 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0xb0, 0x00, 0x21, + 0x4b, 0x54, 0x58, 0x38, 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0xb0, 0x02, + 0x43, 0x54, 0x58, 0xb0, 0x46, 0x2b, 0x1b, 0x21, 0x21, 0x21, 0x21, 0x59, + 0x2d, 0x2c, 0xb0, 0x02, 0x43, 0x54, 0x58, 0xb0, 0x47, 0x2b, 0x1b, 0x21, + 0x21, 0x21, 0x59, 0x2d, 0x2c, 0xb0, 0x02, 0x43, 0x54, 0x58, 0xb0, 0x48, + 0x2b, 0x1b, 0x21, 0x21, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0xb0, 0x02, 0x43, + 0x54, 0x58, 0xb0, 0x49, 0x2b, 0x1b, 0x21, 0x21, 0x21, 0x59, 0x2d, 0x2c, + 0x20, 0x8a, 0x08, 0x23, 0x4b, 0x53, 0x8a, 0x4b, 0x51, 0x5a, 0x58, 0x23, + 0x38, 0x1b, 0x21, 0x21, 0x59, 0x2d, 0x2c, 0x00, 0xb0, 0x02, 0x25, 0x49, + 0xb0, 0x00, 0x53, 0x58, 0x20, 0xb0, 0x40, 0x38, 0x11, 0x1b, 0x21, 0x59, + 0x2d, 0x2c, 0x01, 0x46, 0x23, 0x46, 0x60, 0x23, 0x46, 0x61, 0x23, 0x20, + 0x10, 0x20, 0x46, 0x8a, 0x61, 0xb8, 0xff, 0x80, 0x62, 0x8a, 0xb1, 0x40, + 0x40, 0x8a, 0x70, 0x45, 0x60, 0x68, 0x3a, 0x2d, 0x2c, 0x20, 0x8a, 0x23, + 0x49, 0x64, 0x8a, 0x23, 0x53, 0x58, 0x3c, 0x1b, 0x21, 0x59, 0x2d, 0x2c, + 0x4b, 0x52, 0x58, 0x7d, 0x1b, 0x7a, 0x59, 0x2d, 0x2c, 0xb0, 0x12, 0x00, + 0x4b, 0x01, 0x4b, 0x54, 0x42, 0x2d, 0x2c, 0xb1, 0x02, 0x00, 0x42, 0xb1, + 0x23, 0x01, 0x88, 0x51, 0xb1, 0x40, 0x01, 0x88, 0x53, 0x5a, 0x58, 0xb9, + 0x10, 0x00, 0x00, 0x20, 0x88, 0x54, 0x58, 0xb2, 0x02, 0x01, 0x02, 0x43, + 0x60, 0x42, 0x59, 0xb1, 0x24, 0x01, 0x88, 0x51, 0x58, 0xb9, 0x20, 0x00, + 0x00, 0x40, 0x88, 0x54, 0x58, 0xb2, 0x02, 0x02, 0x02, 0x43, 0x60, 0x42, + 0xb1, 0x24, 0x01, 0x88, 0x54, 0x58, 0xb2, 0x02, 0x20, 0x02, 0x43, 0x60, + 0x42, 0x00, 0x4b, 0x01, 0x4b, 0x52, 0x58, 0xb2, 0x02, 0x08, 0x02, 0x43, + 0x60, 0x42, 0x59, 0x1b, 0xb9, 0x40, 0x00, 0x00, 0x80, 0x88, 0x54, 0x58, + 0xb2, 0x02, 0x04, 0x02, 0x43, 0x60, 0x42, 0x59, 0xb9, 0x40, 0x00, 0x00, + 0x80, 0x63, 0xb8, 0x01, 0x00, 0x88, 0x54, 0x58, 0xb2, 0x02, 0x08, 0x02, + 0x43, 0x60, 0x42, 0x59, 0xb9, 0x40, 0x00, 0x01, 0x00, 0x63, 0xb8, 0x02, + 0x00, 0x88, 0x54, 0x58, 0xb2, 0x02, 0x10, 0x02, 0x43, 0x60, 0x42, 0x59, + 0xb1, 0x26, 0x01, 0x88, 0x51, 0x58, 0xb9, 0x40, 0x00, 0x02, 0x00, 0x63, + 0xb8, 0x04, 0x00, 0x88, 0x54, 0x58, 0xb2, 0x02, 0x40, 0x02, 0x43, 0x60, + 0x42, 0x59, 0xb9, 0x40, 0x00, 0x04, 0x00, 0x63, 0xb8, 0x08, 0x00, 0x88, + 0x54, 0x58, 0xb2, 0x02, 0x80, 0x02, 0x43, 0x60, 0x42, 0x59, 0x59, 0x59, + 0x59, 0x59, 0x59, 0xb1, 0x00, 0x02, 0x43, 0x54, 0x58, 0x40, 0x0a, 0x05, + 0x40, 0x08, 0x40, 0x09, 0x40, 0x0c, 0x02, 0x0d, 0x02, 0x1b, 0xb1, 0x01, + 0x02, 0x43, 0x54, 0x58, 0xb2, 0x05, 0x40, 0x08, 0xba, 0x01, 0x00, 0x00, + 0x09, 0x01, 0x00, 0xb3, 0x0c, 0x01, 0x0d, 0x01, 0x1b, 0xb1, 0x80, 0x02, + 0x43, 0x52, 0x58, 0xb2, 0x05, 0x40, 0x08, 0xb8, 0x01, 0x80, 0xb1, 0x09, + 0x40, 0x1b, 0xb2, 0x05, 0x40, 0x08, 0xba, 0x01, 0x80, 0x00, 0x09, 0x01, + 0x40, 0x59, 0xb9, 0x40, 0x00, 0x00, 0x80, 0x88, 0x55, 0xb9, 0x40, 0x00, + 0x02, 0x00, 0x63, 0xb8, 0x04, 0x00, 0x88, 0x55, 0x5a, 0x58, 0xb3, 0x0c, + 0x00, 0x0d, 0x01, 0x1b, 0xb3, 0x0c, 0x00, 0x0d, 0x01, 0x59, 0x59, 0x59, + 0x42, 0x42, 0x42, 0x42, 0x42, 0x2d, 0x2c, 0x45, 0x18, 0x68, 0x23, 0x4b, + 0x51, 0x58, 0x23, 0x20, 0x45, 0x20, 0x64, 0xb0, 0x40, 0x50, 0x58, 0x7c, + 0x59, 0x68, 0x8a, 0x60, 0x59, 0x44, 0x2d, 0x2c, 0xb0, 0x00, 0x16, 0xb0, + 0x02, 0x25, 0xb0, 0x02, 0x25, 0x01, 0xb0, 0x01, 0x23, 0x3e, 0x00, 0xb0, + 0x02, 0x23, 0x3e, 0xb1, 0x01, 0x02, 0x06, 0x0c, 0xb0, 0x0a, 0x23, 0x65, + 0x42, 0xb0, 0x0b, 0x23, 0x42, 0x01, 0xb0, 0x01, 0x23, 0x3f, 0x00, 0xb0, + 0x02, 0x23, 0x3f, 0xb1, 0x01, 0x02, 0x06, 0x0c, 0xb0, 0x06, 0x23, 0x65, + 0x42, 0xb0, 0x07, 0x23, 0x42, 0xb0, 0x01, 0x16, 0x01, 0x2d, 0x2c, 0xb0, + 0x80, 0xb0, 0x02, 0x43, 0x50, 0xb0, 0x01, 0xb0, 0x02, 0x43, 0x54, 0x5b, + 0x58, 0x21, 0x23, 0x10, 0xb0, 0x20, 0x1a, 0xc9, 0x1b, 0x8a, 0x10, 0xed, + 0x59, 0x2d, 0x2c, 0xb0, 0x59, 0x2b, 0x2d, 0x2c, 0x8a, 0x10, 0xe5, 0x2d, + 0x40, 0x99, 0x09, 0x21, 0x48, 0x20, 0x55, 0x20, 0x01, 0x1e, 0x55, 0x1f, + 0x48, 0x03, 0x55, 0x1f, 0x1e, 0x01, 0x0f, 0x1e, 0x3f, 0x1e, 0xaf, 0x1e, + 0x03, 0x4d, 0x4b, 0x26, 0x1f, 0x4c, 0x4b, 0x33, 0x1f, 0x4b, 0x46, 0x25, + 0x1f, 0x26, 0x34, 0x10, 0x55, 0x25, 0x33, 0x24, 0x55, 0x19, 0x13, 0xff, + 0x1f, 0x07, 0x04, 0xff, 0x1f, 0x06, 0x03, 0xff, 0x1f, 0x4a, 0x49, 0x33, + 0x1f, 0x49, 0x46, 0x25, 0x1f, 0x13, 0x33, 0x12, 0x55, 0x05, 0x01, 0x03, + 0x55, 0x04, 0x33, 0x03, 0x55, 0x1f, 0x03, 0x01, 0x0f, 0x03, 0x3f, 0x03, + 0xaf, 0x03, 0x03, 0x47, 0x46, 0x19, 0x1f, 0xeb, 0x46, 0x01, 0x23, 0x33, + 0x22, 0x55, 0x1c, 0x33, 0x1b, 0x55, 0x16, 0x33, 0x15, 0x55, 0x11, 0x01, + 0x0f, 0x55, 0x10, 0x33, 0x0f, 0x55, 0x0f, 0x0f, 0x4f, 0x0f, 0x02, 0x1f, + 0x0f, 0xcf, 0x0f, 0x02, 0x0f, 0x0f, 0xff, 0x0f, 0x02, 0x06, 0x02, 0x01, + 0x00, 0x55, 0x01, 0x33, 0x00, 0x55, 0x6f, 0x00, 0x7f, 0x00, 0xaf, 0x00, + 0xef, 0x00, 0x04, 0x10, 0x00, 0x01, 0x80, 0x16, 0x01, 0x05, 0x01, 0xb8, + 0x01, 0x90, 0xb1, 0x54, 0x53, 0x2b, 0x2b, 0x4b, 0xb8, 0x07, 0xff, 0x52, + 0x4b, 0xb0, 0x09, 0x50, 0x5b, 0xb0, 0x01, 0x88, 0xb0, 0x25, 0x53, 0xb0, + 0x01, 0x88, 0xb0, 0x40, 0x51, 0x5a, 0xb0, 0x06, 0x88, 0xb0, 0x00, 0x55, + 0x5a, 0x5b, 0x58, 0xb1, 0x01, 0x01, 0x8e, 0x59, 0x85, 0x8d, 0x8d, 0x00, + 0x42, 0x1d, 0x4b, 0xb0, 0x32, 0x53, 0x58, 0xb0, 0x20, 0x1d, 0x59, 0x4b, + 0xb0, 0x64, 0x53, 0x58, 0xb0, 0x10, 0x1d, 0xb1, 0x16, 0x00, 0x42, 0x59, + 0x73, 0x73, 0x2b, 0x2b, 0x5e, 0x73, 0x74, 0x75, 0x2b, 0x2b, 0x2b, 0x2b, + 0x2b, 0x74, 0x2b, 0x73, 0x74, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, + 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x73, 0x74, 0x2b, 0x2b, 0x2b, 0x18, + 0x5e, 0x00, 0x00, 0x00, 0x06, 0x14, 0x00, 0x17, 0x00, 0x4e, 0x05, 0xb6, + 0x00, 0x17, 0x00, 0x75, 0x05, 0xb6, 0x05, 0xcd, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x48, + 0x00, 0x14, 0x00, 0x91, 0x00, 0x00, 0xff, 0xec, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xec, 0x00, 0x00, 0x00, 0x00, 0xff, 0xec, 0x00, 0x00, 0xfe, 0x14, + 0xff, 0xec, 0x00, 0x00, 0x05, 0xb6, 0x00, 0x13, 0xfc, 0x94, 0xff, 0xed, + 0xfe, 0x85, 0xff, 0xea, 0xfe, 0xa9, 0xff, 0xec, 0x00, 0x18, 0xfe, 0xbc, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x8b, 0x00, 0x81, 0x00, 0xdd, 0x00, 0x98, 0x00, 0x8f, 0x00, 0x8e, + 0x00, 0x99, 0x00, 0x88, 0x00, 0x81, 0x01, 0x0f, 0x00, 0x8a, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, + 0x00, 0x58, 0x00, 0xe0, 0x01, 0x5c, 0x01, 0xce, 0x02, 0x4c, 0x02, 0x66, + 0x02, 0x92, 0x02, 0xbe, 0x02, 0xfa, 0x03, 0x26, 0x03, 0x44, 0x03, 0x5a, + 0x03, 0x7c, 0x03, 0x96, 0x03, 0xd8, 0x04, 0x02, 0x04, 0x44, 0x04, 0xa2, + 0x04, 0xe4, 0x05, 0x30, 0x05, 0x8e, 0x05, 0xb0, 0x06, 0x20, 0x06, 0x7e, + 0x06, 0xb4, 0x06, 0xe8, 0x07, 0x08, 0x07, 0x32, 0x07, 0x52, 0x07, 0xaa, + 0x08, 0x32, 0x08, 0x72, 0x08, 0xce, 0x09, 0x0c, 0x09, 0x48, 0x09, 0x7e, + 0x09, 0xac, 0x09, 0xfc, 0x0a, 0x2e, 0x0a, 0x44, 0x0a, 0x6c, 0x0a, 0x9c, + 0x0a, 0xba, 0x0a, 0xf8, 0x0b, 0x30, 0x0b, 0x76, 0x0b, 0xb4, 0x0c, 0x08, + 0x0c, 0x56, 0x0c, 0xaa, 0x0c, 0xce, 0x0d, 0x02, 0x0d, 0x2a, 0x0d, 0x6e, + 0x0d, 0x9e, 0x0d, 0xc6, 0x0d, 0xf2, 0x0e, 0x16, 0x0e, 0x30, 0x0e, 0x54, + 0x0e, 0x76, 0x0e, 0x8c, 0x0e, 0xac, 0x0f, 0x08, 0x0f, 0x5e, 0x0f, 0x9a, + 0x0f, 0xee, 0x10, 0x3c, 0x10, 0x7c, 0x11, 0x10, 0x11, 0x4e, 0x11, 0x7c, + 0x11, 0xba, 0x11, 0xf8, 0x12, 0x10, 0x12, 0x68, 0x12, 0xa2, 0x12, 0xe4, + 0x13, 0x3a, 0x13, 0x8e, 0x13, 0xc2, 0x14, 0x14, 0x14, 0x54, 0x14, 0x92, + 0x14, 0xba, 0x15, 0x06, 0x15, 0x36, 0x15, 0x70, 0x15, 0x9c, 0x15, 0xde, + 0x15, 0xf6, 0x16, 0x3c, 0x16, 0x76, 0x16, 0x76, 0x16, 0xa8, 0x16, 0xf4, + 0x17, 0x46, 0x17, 0x94, 0x17, 0xe8, 0x18, 0x0e, 0x18, 0x8a, 0x18, 0xc0, + 0x19, 0x3c, 0x19, 0x8a, 0x19, 0xc6, 0x19, 0xe4, 0x19, 0xec, 0x1a, 0x76, + 0x1a, 0x8c, 0x1a, 0xc4, 0x1a, 0xe2, 0x1b, 0x1c, 0x1b, 0x6c, 0x1b, 0x8c, + 0x1b, 0xcc, 0x1b, 0xfc, 0x1c, 0x1e, 0x1c, 0x50, 0x1c, 0x78, 0x1c, 0xb2, + 0x1c, 0xea, 0x1d, 0x28, 0x1d, 0x6a, 0x1d, 0xc4, 0x1e, 0x22, 0x1e, 0x34, + 0x1e, 0x46, 0x1e, 0x80, 0x1e, 0xc4, 0x1e, 0xd6, 0x1f, 0x1a, 0x1f, 0x68, + 0x1f, 0x74, 0x1f, 0x86, 0x1f, 0x98, 0x1f, 0xc8, 0x1f, 0xda, 0x1f, 0xec, + 0x1f, 0xfe, 0x20, 0x22, 0x20, 0x34, 0x20, 0x8c, 0x20, 0xce, 0x20, 0xe0, + 0x20, 0xf2, 0x21, 0x3c, 0x21, 0x90, 0x21, 0xa2, 0x21, 0xd0, 0x22, 0x3c, + 0x22, 0x4e, 0x22, 0x60, 0x22, 0x98, 0x22, 0xaa, 0x22, 0xbc, 0x22, 0xfe, + 0x23, 0x66, 0x23, 0x76, 0x23, 0x86, 0x23, 0xd6, 0x24, 0x30, 0x24, 0x42, + 0x24, 0x9c, 0x25, 0x28, 0x25, 0x34, 0x25, 0x44, 0x25, 0x54, 0x25, 0x9a, + 0x25, 0xac, 0x25, 0xc8, 0x25, 0xe4, 0x26, 0x08, 0x26, 0x36, 0x26, 0x9e, + 0x26, 0xe2, 0x26, 0xf2, 0x27, 0x02, 0x27, 0x46, 0x27, 0x94, 0x27, 0xa6, + 0x27, 0xec, 0x28, 0x52, 0x28, 0x62, 0x28, 0x72, 0x28, 0xaa, 0x28, 0xbc, + 0x28, 0xcc, 0x29, 0x24, 0x29, 0x36, 0x00, 0x00, 0x00, 0x02, 0x00, 0x98, + 0xff, 0xe3, 0x01, 0x89, 0x05, 0xb6, 0x00, 0x03, 0x00, 0x0e, 0x00, 0x2b, + 0x40, 0x14, 0x03, 0x09, 0x09, 0x02, 0x04, 0x04, 0x0f, 0x10, 0x01, 0x01, + 0x0c, 0x02, 0x0c, 0x06, 0x4f, 0x59, 0x0c, 0x16, 0x02, 0x03, 0x00, 0x3f, + 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x11, 0x12, 0x01, 0x39, + 0x11, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x23, 0x03, 0x33, 0x03, + 0x34, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, 0x01, 0x46, + 0x69, 0x33, 0xcf, 0xe1, 0x78, 0x3a, 0x3f, 0x40, 0x39, 0x34, 0x44, 0x01, + 0x93, 0x04, 0x23, 0xfa, 0xb4, 0x88, 0x46, 0x42, 0x40, 0x47, 0x3f, 0x00, + 0x00, 0x02, 0x00, 0x85, 0x03, 0xa6, 0x02, 0xb0, 0x05, 0xb6, 0x00, 0x03, + 0x00, 0x07, 0x00, 0x1f, 0x40, 0x0d, 0x00, 0x03, 0x07, 0x04, 0x03, 0x04, + 0x08, 0x09, 0x06, 0x02, 0x07, 0x03, 0x03, 0x00, 0x3f, 0x33, 0xcd, 0x32, + 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, + 0x03, 0x23, 0x03, 0x21, 0x03, 0x23, 0x03, 0x01, 0x3f, 0x28, 0x69, 0x29, + 0x02, 0x2b, 0x29, 0x68, 0x29, 0x05, 0xb6, 0xfd, 0xf0, 0x02, 0x10, 0xfd, + 0xf0, 0x02, 0x10, 0x00, 0x00, 0x02, 0x00, 0x33, 0x00, 0x00, 0x04, 0xf6, + 0x05, 0xb6, 0x00, 0x1b, 0x00, 0x1f, 0x00, 0x99, 0x40, 0x55, 0x08, 0x1f, + 0x1c, 0x15, 0x04, 0x14, 0x09, 0x11, 0x0c, 0x0c, 0x09, 0x12, 0x0f, 0x0e, + 0x0b, 0x04, 0x0a, 0x13, 0x13, 0x14, 0x16, 0x1d, 0x1e, 0x07, 0x04, 0x06, + 0x17, 0x04, 0x01, 0x00, 0x19, 0x04, 0x18, 0x05, 0x05, 0x06, 0x14, 0x06, + 0x0a, 0x21, 0x03, 0x1a, 0x17, 0x03, 0x18, 0x0a, 0x18, 0x20, 0x21, 0x08, + 0x04, 0x0c, 0x0d, 0x0c, 0x4e, 0x59, 0x1c, 0x01, 0x0d, 0x1f, 0x00, 0x10, + 0x11, 0x10, 0x4e, 0x59, 0x19, 0x15, 0x11, 0x4f, 0x0d, 0x01, 0x4f, 0x11, + 0x01, 0x0d, 0x11, 0x0d, 0x11, 0x05, 0x17, 0x13, 0x03, 0x0a, 0x05, 0x00, + 0x2f, 0x33, 0x3f, 0x33, 0x12, 0x39, 0x39, 0x2f, 0x2f, 0x5d, 0x5d, 0x11, + 0x33, 0x33, 0x2b, 0x11, 0x00, 0x33, 0x33, 0x11, 0x33, 0x33, 0x2b, 0x11, + 0x00, 0x33, 0x33, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x17, 0x33, 0x11, + 0x12, 0x39, 0x39, 0x11, 0x33, 0x11, 0x12, 0x17, 0x39, 0x11, 0x12, 0x17, + 0x39, 0x11, 0x33, 0x11, 0x12, 0x17, 0x39, 0x32, 0x32, 0x11, 0x33, 0x11, + 0x12, 0x17, 0x39, 0x31, 0x30, 0x01, 0x03, 0x21, 0x15, 0x21, 0x03, 0x23, + 0x13, 0x21, 0x03, 0x23, 0x13, 0x21, 0x35, 0x21, 0x13, 0x21, 0x35, 0x21, + 0x13, 0x33, 0x03, 0x21, 0x13, 0x33, 0x03, 0x21, 0x15, 0x01, 0x21, 0x13, + 0x21, 0x03, 0xd5, 0x42, 0x01, 0x1b, 0xfe, 0xcd, 0x54, 0x89, 0x54, 0xfe, + 0xd1, 0x52, 0x88, 0x50, 0xfe, 0xfa, 0x01, 0x1f, 0x44, 0xfe, 0xeb, 0x01, + 0x2b, 0x52, 0x8b, 0x52, 0x01, 0x31, 0x54, 0x86, 0x54, 0x01, 0x08, 0xfc, + 0xe5, 0x01, 0x2f, 0x42, 0xfe, 0xd1, 0x03, 0x83, 0xfe, 0xac, 0x81, 0xfe, + 0x52, 0x01, 0xae, 0xfe, 0x52, 0x01, 0xae, 0x81, 0x01, 0x54, 0x7f, 0x01, + 0xb4, 0xfe, 0x4c, 0x01, 0xb4, 0xfe, 0x4c, 0x7f, 0xfe, 0xac, 0x01, 0x54, + 0x00, 0x03, 0x00, 0x83, 0xff, 0x89, 0x04, 0x0c, 0x06, 0x12, 0x00, 0x20, + 0x00, 0x26, 0x00, 0x2d, 0x00, 0x66, 0x40, 0x35, 0x27, 0x11, 0x25, 0x1d, + 0x17, 0x04, 0x04, 0x2a, 0x14, 0x0d, 0x05, 0x21, 0x00, 0x00, 0x19, 0x05, + 0x11, 0x09, 0x05, 0x2e, 0x2f, 0x25, 0x0d, 0x06, 0x0d, 0x4d, 0x59, 0x03, + 0x06, 0x24, 0x0e, 0x2a, 0x0e, 0x4c, 0x59, 0x1d, 0x2a, 0x2b, 0x1c, 0x14, + 0x1c, 0x4d, 0x59, 0x17, 0x2a, 0x14, 0x06, 0x14, 0x06, 0x14, 0x05, 0x16, + 0x05, 0x00, 0x2f, 0x2f, 0x12, 0x39, 0x39, 0x2f, 0x2f, 0x12, 0x39, 0x32, + 0x2b, 0x11, 0x00, 0x33, 0x11, 0x33, 0x2b, 0x11, 0x00, 0x33, 0x11, 0x33, + 0x2b, 0x11, 0x00, 0x33, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x33, 0x33, 0x33, 0x11, 0x33, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, + 0x01, 0x14, 0x06, 0x07, 0x15, 0x23, 0x35, 0x22, 0x26, 0x27, 0x35, 0x1e, + 0x01, 0x33, 0x11, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x35, 0x33, 0x15, + 0x16, 0x17, 0x07, 0x26, 0x27, 0x11, 0x1e, 0x02, 0x07, 0x34, 0x26, 0x27, + 0x11, 0x36, 0x01, 0x14, 0x16, 0x17, 0x11, 0x0e, 0x01, 0x04, 0x0c, 0xcc, + 0xb7, 0x81, 0x70, 0xd2, 0x43, 0x53, 0xd9, 0x59, 0xcd, 0xa5, 0xcb, 0xa7, + 0x81, 0xb8, 0xab, 0x34, 0x95, 0x9a, 0x9d, 0x9c, 0x4a, 0xaa, 0x59, 0x80, + 0xd9, 0xfd, 0xdd, 0x5a, 0x6f, 0x63, 0x66, 0x01, 0xc1, 0x88, 0xb1, 0x17, + 0xe8, 0xdf, 0x23, 0x1f, 0x9c, 0x25, 0x2f, 0x01, 0xb8, 0x41, 0xac, 0x88, + 0x83, 0xa8, 0x12, 0xb6, 0xb4, 0x05, 0x45, 0x83, 0x3b, 0x0b, 0xfe, 0x4e, + 0x32, 0x5f, 0x7b, 0x65, 0x48, 0x59, 0x2c, 0xfe, 0x7b, 0x1e, 0x03, 0x07, + 0x4c, 0x5c, 0x29, 0x01, 0x83, 0x10, 0x5d, 0x00, 0x00, 0x05, 0x00, 0x68, + 0xff, 0xec, 0x06, 0x2d, 0x05, 0xcb, 0x00, 0x09, 0x00, 0x15, 0x00, 0x21, + 0x00, 0x2d, 0x00, 0x31, 0x00, 0x45, 0x40, 0x24, 0x00, 0x10, 0x05, 0x0a, + 0x16, 0x28, 0x1c, 0x22, 0x22, 0x2e, 0x28, 0x0a, 0x30, 0x10, 0x06, 0x32, + 0x33, 0x03, 0x0d, 0x1f, 0x2b, 0x0d, 0x2b, 0x0d, 0x2b, 0x30, 0x31, 0x06, + 0x30, 0x18, 0x19, 0x25, 0x19, 0x07, 0x13, 0x07, 0x00, 0x3f, 0x33, 0x3f, + 0x33, 0x3f, 0x3f, 0x12, 0x39, 0x39, 0x2f, 0x2f, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x13, 0x14, 0x16, 0x33, 0x32, 0x11, 0x10, 0x23, 0x22, + 0x06, 0x05, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, + 0x16, 0x01, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, + 0x06, 0x05, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, + 0x16, 0x09, 0x01, 0x23, 0x01, 0xf2, 0x4a, 0x53, 0xa4, 0xa4, 0x53, 0x4a, + 0x01, 0xca, 0x99, 0x94, 0x8c, 0x9b, 0x95, 0x92, 0x91, 0x9c, 0x01, 0xa6, + 0x4a, 0x54, 0x54, 0x50, 0x50, 0x54, 0x54, 0x4a, 0x01, 0xcb, 0x99, 0x94, + 0x8e, 0x99, 0x95, 0x92, 0x8e, 0x9f, 0xfe, 0xfe, 0xfc, 0xd5, 0x93, 0x03, + 0x2b, 0x04, 0x02, 0xaa, 0xaa, 0x01, 0x54, 0x01, 0x52, 0xa8, 0xaa, 0xe4, + 0xe9, 0xee, 0xdf, 0xe3, 0xe6, 0xee, 0xfc, 0xdb, 0xab, 0xa9, 0xa7, 0xad, + 0xab, 0xa5, 0xa5, 0xab, 0xe3, 0xe9, 0xee, 0xde, 0xe3, 0xe6, 0xeb, 0x03, + 0x20, 0xfa, 0x4a, 0x05, 0xb6, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x71, + 0xff, 0xec, 0x05, 0xd3, 0x05, 0xcd, 0x00, 0x0b, 0x00, 0x15, 0x00, 0x35, + 0x00, 0x51, 0x40, 0x30, 0x13, 0x16, 0x00, 0x1d, 0x06, 0x23, 0x2a, 0x2b, + 0x2e, 0x2b, 0x2d, 0x23, 0x0e, 0x26, 0x19, 0x1d, 0x16, 0x09, 0x36, 0x37, + 0x33, 0x0c, 0x49, 0x59, 0x33, 0x13, 0x0f, 0x27, 0x2d, 0x0e, 0x30, 0x05, + 0x2f, 0x03, 0x19, 0x26, 0x03, 0x2a, 0x2a, 0x20, 0x2f, 0x12, 0x20, 0x09, + 0x4a, 0x59, 0x20, 0x04, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x12, 0x39, + 0x2f, 0x17, 0x39, 0x12, 0x17, 0x39, 0x3f, 0x2b, 0x11, 0x12, 0x01, 0x17, + 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, + 0x14, 0x16, 0x17, 0x3e, 0x01, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x13, + 0x32, 0x37, 0x01, 0x0e, 0x02, 0x15, 0x14, 0x16, 0x25, 0x34, 0x36, 0x37, + 0x2e, 0x02, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, + 0x01, 0x3e, 0x01, 0x37, 0x33, 0x02, 0x07, 0x01, 0x23, 0x27, 0x0e, 0x01, + 0x23, 0x22, 0x26, 0x01, 0x9e, 0x48, 0x57, 0x81, 0x65, 0x67, 0x56, 0x59, + 0x6f, 0x9b, 0xf1, 0x9f, 0xfe, 0x4b, 0x6f, 0x5c, 0x2c, 0x9b, 0xfe, 0xb9, + 0x8b, 0xb4, 0x55, 0x3d, 0x24, 0xc4, 0xaf, 0xa2, 0xba, 0x88, 0x9d, 0x01, + 0x97, 0x38, 0x43, 0x17, 0xa8, 0x44, 0x89, 0x01, 0x2b, 0xe5, 0xb9, 0x76, + 0xf4, 0x96, 0xd7, 0xed, 0x04, 0x93, 0x45, 0x7d, 0x58, 0x4b, 0x7f, 0x53, + 0x4d, 0x61, 0x60, 0xfb, 0x9d, 0x9a, 0x01, 0xa8, 0x44, 0x59, 0x66, 0x41, + 0x75, 0x89, 0xfa, 0x82, 0xc8, 0x66, 0x5f, 0x62, 0x6a, 0x39, 0x96, 0xa8, + 0xa7, 0x95, 0x6b, 0xb5, 0x5d, 0xfe, 0x79, 0x3e, 0xa7, 0x63, 0xfe, 0xe2, + 0x94, 0xfe, 0xdd, 0xb2, 0x6a, 0x5c, 0xd4, 0x00, 0x00, 0x01, 0x00, 0x85, + 0x03, 0xa6, 0x01, 0x3f, 0x05, 0xb6, 0x00, 0x03, 0x00, 0x14, 0xb7, 0x00, + 0x03, 0x03, 0x04, 0x05, 0x02, 0x03, 0x03, 0x00, 0x3f, 0xcd, 0x11, 0x12, + 0x01, 0x39, 0x11, 0x33, 0x31, 0x30, 0x01, 0x03, 0x23, 0x03, 0x01, 0x3f, + 0x28, 0x69, 0x29, 0x05, 0xb6, 0xfd, 0xf0, 0x02, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x52, 0xfe, 0xbc, 0x02, 0x21, 0x05, 0xb6, 0x00, 0x0d, + 0x00, 0x1c, 0x40, 0x0c, 0x07, 0x00, 0x0a, 0x04, 0x00, 0x04, 0x0e, 0x0f, + 0x0b, 0x27, 0x03, 0x03, 0x00, 0x3f, 0x3f, 0x11, 0x12, 0x01, 0x39, 0x39, + 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, 0x10, 0x12, 0x37, 0x33, 0x06, + 0x02, 0x15, 0x14, 0x12, 0x17, 0x23, 0x26, 0x02, 0x52, 0x9b, 0x92, 0xa2, + 0x90, 0x91, 0x94, 0x8b, 0xa0, 0x93, 0x9a, 0x02, 0x31, 0x01, 0x09, 0x01, + 0xce, 0xae, 0xc1, 0xfe, 0x32, 0xf4, 0xf0, 0xfe, 0x36, 0xbd, 0xaa, 0x01, + 0xc6, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x3d, 0xfe, 0xbc, 0x02, 0x0c, + 0x05, 0xb6, 0x00, 0x0d, 0x00, 0x1c, 0x40, 0x0c, 0x04, 0x0a, 0x07, 0x00, + 0x0a, 0x00, 0x0e, 0x0f, 0x0a, 0x03, 0x04, 0x27, 0x00, 0x3f, 0x3f, 0x11, + 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x10, + 0x02, 0x07, 0x23, 0x36, 0x12, 0x35, 0x34, 0x02, 0x27, 0x33, 0x16, 0x12, + 0x02, 0x0c, 0x9b, 0x92, 0xa0, 0x8b, 0x94, 0x91, 0x90, 0xa2, 0x93, 0x9a, + 0x02, 0x31, 0xfe, 0xf9, 0xfe, 0x3a, 0xa8, 0xbc, 0x01, 0xcb, 0xf0, 0xf4, + 0x01, 0xce, 0xc1, 0xaf, 0xfe, 0x31, 0x00, 0x00, 0x00, 0x01, 0x00, 0x56, + 0x02, 0x7f, 0x04, 0x0e, 0x06, 0x14, 0x00, 0x0e, 0x00, 0x30, 0x40, 0x1b, + 0x03, 0x05, 0x04, 0x01, 0x07, 0x0d, 0x0a, 0x09, 0x0b, 0x09, 0x0f, 0x10, + 0x04, 0x0a, 0x01, 0x0d, 0x02, 0x0c, 0x0c, 0x0d, 0x0a, 0x07, 0x04, 0x06, + 0x08, 0x0e, 0x00, 0x00, 0x3f, 0xc4, 0x32, 0x17, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x11, 0x33, 0x11, 0x12, 0x01, 0x17, 0x39, 0x31, 0x30, 0x01, 0x03, + 0x25, 0x17, 0x05, 0x13, 0x07, 0x0b, 0x01, 0x27, 0x13, 0x25, 0x37, 0x05, + 0x03, 0x02, 0x91, 0x2b, 0x01, 0x8e, 0x1a, 0xfe, 0x83, 0xf8, 0xac, 0xb0, + 0xa0, 0xb0, 0xf2, 0xfe, 0x87, 0x1d, 0x01, 0x87, 0x2b, 0x06, 0x14, 0xfe, + 0x75, 0x6f, 0xb6, 0x1f, 0xfe, 0xba, 0x5e, 0x01, 0x6a, 0xfe, 0x96, 0x5e, + 0x01, 0x46, 0x1f, 0xb6, 0x6f, 0x01, 0x8b, 0x00, 0x00, 0x01, 0x00, 0x68, + 0x00, 0xe3, 0x04, 0x29, 0x04, 0xc3, 0x00, 0x0b, 0x00, 0x28, 0x40, 0x13, + 0x00, 0x04, 0x04, 0x09, 0x05, 0x05, 0x0c, 0x0d, 0x03, 0x07, 0x08, 0x07, + 0x50, 0x59, 0x00, 0x0f, 0x08, 0x01, 0x08, 0x00, 0x2f, 0x5d, 0x33, 0x2b, + 0x11, 0x00, 0x33, 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, + 0x31, 0x30, 0x01, 0x21, 0x15, 0x21, 0x11, 0x23, 0x11, 0x21, 0x35, 0x21, + 0x11, 0x33, 0x02, 0x8d, 0x01, 0x9c, 0xfe, 0x64, 0x8b, 0xfe, 0x66, 0x01, + 0x9a, 0x8b, 0x03, 0x17, 0x8a, 0xfe, 0x56, 0x01, 0xaa, 0x8a, 0x01, 0xac, + 0x00, 0x01, 0x00, 0x3f, 0xfe, 0xf8, 0x01, 0x6d, 0x00, 0xee, 0x00, 0x08, + 0x00, 0x11, 0xb5, 0x05, 0x00, 0x09, 0x0a, 0x05, 0x00, 0x00, 0x2f, 0xcd, + 0x11, 0x12, 0x01, 0x39, 0x39, 0x31, 0x30, 0x25, 0x17, 0x06, 0x02, 0x07, + 0x23, 0x36, 0x12, 0x37, 0x01, 0x5e, 0x0f, 0x1a, 0x62, 0x35, 0x7d, 0x1b, + 0x41, 0x0d, 0xee, 0x17, 0x64, 0xfe, 0xf7, 0x72, 0x68, 0x01, 0x32, 0x5c, + 0x00, 0x01, 0x00, 0x54, 0x01, 0xd9, 0x02, 0x3f, 0x02, 0x71, 0x00, 0x03, + 0x00, 0x11, 0xb5, 0x02, 0x00, 0x05, 0x04, 0x00, 0x01, 0x00, 0x2f, 0x33, + 0x11, 0x12, 0x01, 0x39, 0x39, 0x31, 0x30, 0x13, 0x35, 0x21, 0x15, 0x54, + 0x01, 0xeb, 0x01, 0xd9, 0x98, 0x98, 0x00, 0x00, 0x00, 0x01, 0x00, 0x98, + 0xff, 0xe3, 0x01, 0x89, 0x00, 0xf2, 0x00, 0x0b, 0x00, 0x18, 0x40, 0x0b, + 0x06, 0x00, 0x00, 0x0c, 0x0d, 0x09, 0x03, 0x4f, 0x59, 0x09, 0x16, 0x00, + 0x3f, 0x2b, 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x31, 0x30, 0x37, 0x34, + 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, 0x98, 0x3d, + 0x39, 0x3a, 0x41, 0x42, 0x39, 0x33, 0x43, 0x6a, 0x43, 0x45, 0x45, 0x43, + 0x41, 0x46, 0x3f, 0x00, 0x00, 0x01, 0x00, 0x14, 0x00, 0x00, 0x02, 0xdb, + 0x05, 0xb6, 0x00, 0x03, 0x00, 0x13, 0xb7, 0x02, 0x00, 0x04, 0x05, 0x03, + 0x03, 0x02, 0x12, 0x00, 0x3f, 0x3f, 0x11, 0x12, 0x01, 0x39, 0x39, 0x31, + 0x30, 0x09, 0x01, 0x23, 0x01, 0x02, 0xdb, 0xfd, 0xdf, 0xa6, 0x02, 0x21, + 0x05, 0xb6, 0xfa, 0x4a, 0x05, 0xb6, 0x00, 0x00, 0x00, 0x02, 0x00, 0x66, + 0xff, 0xec, 0x04, 0x2d, 0x05, 0xcd, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x28, + 0x40, 0x14, 0x12, 0x00, 0x0c, 0x06, 0x00, 0x06, 0x19, 0x18, 0x09, 0x15, + 0x4b, 0x59, 0x09, 0x07, 0x03, 0x0f, 0x4b, 0x59, 0x03, 0x19, 0x00, 0x3f, + 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x01, 0x10, 0x02, 0x23, 0x22, 0x02, 0x11, 0x10, + 0x12, 0x33, 0x32, 0x12, 0x01, 0x10, 0x12, 0x33, 0x32, 0x12, 0x11, 0x10, + 0x02, 0x23, 0x22, 0x02, 0x04, 0x2d, 0xef, 0xf6, 0xec, 0xf6, 0xee, 0xf4, + 0xee, 0xf7, 0xfc, 0xe1, 0x96, 0xa4, 0xa6, 0x95, 0x95, 0xa6, 0xa4, 0x96, + 0x02, 0xdd, 0xfe, 0x85, 0xfe, 0x8a, 0x01, 0x7f, 0x01, 0x72, 0x01, 0x7e, + 0x01, 0x72, 0xfe, 0x7e, 0xfe, 0x92, 0xfe, 0xc1, 0xfe, 0xdd, 0x01, 0x27, + 0x01, 0x3b, 0x01, 0x3b, 0x01, 0x25, 0xfe, 0xdf, 0x00, 0x01, 0x00, 0xbc, + 0x00, 0x00, 0x02, 0xcb, 0x05, 0xb6, 0x00, 0x0a, 0x00, 0x24, 0x40, 0x10, + 0x09, 0x00, 0x01, 0x08, 0x01, 0x0b, 0x0c, 0x04, 0x09, 0x07, 0x07, 0x01, + 0x09, 0x06, 0x01, 0x18, 0x00, 0x3f, 0x3f, 0x12, 0x39, 0x2f, 0x12, 0x39, + 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x33, 0x31, 0x30, 0x21, 0x23, + 0x11, 0x34, 0x37, 0x0e, 0x01, 0x07, 0x27, 0x01, 0x33, 0x02, 0xcb, 0xa2, + 0x08, 0x15, 0x34, 0xd4, 0x58, 0x01, 0x83, 0x8c, 0x04, 0x12, 0x82, 0x74, + 0x15, 0x2e, 0xac, 0x72, 0x01, 0x2b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x64, + 0x00, 0x00, 0x04, 0x25, 0x05, 0xcb, 0x00, 0x19, 0x00, 0x2b, 0x40, 0x17, + 0x18, 0x01, 0x07, 0x13, 0x00, 0x13, 0x0e, 0x01, 0x04, 0x1a, 0x1b, 0x10, + 0x0a, 0x4b, 0x59, 0x10, 0x07, 0x01, 0x18, 0x4c, 0x59, 0x01, 0x18, 0x00, + 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, + 0x33, 0x11, 0x33, 0x31, 0x30, 0x29, 0x01, 0x35, 0x01, 0x3e, 0x02, 0x35, + 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x36, 0x33, 0x32, 0x16, 0x15, + 0x14, 0x02, 0x07, 0x01, 0x15, 0x21, 0x04, 0x25, 0xfc, 0x3f, 0x01, 0x81, + 0xb0, 0x70, 0x38, 0x8e, 0x7e, 0x5b, 0xa3, 0x64, 0x58, 0xca, 0xee, 0xce, + 0xea, 0x9c, 0xd6, 0xfe, 0xc0, 0x02, 0xf0, 0x8f, 0x01, 0x83, 0xb2, 0x98, + 0x90, 0x53, 0x75, 0x89, 0x3c, 0x4f, 0x71, 0xa8, 0xd3, 0xb2, 0x8b, 0xfe, + 0xf0, 0xd0, 0xfe, 0xc7, 0x08, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x5e, + 0xff, 0xec, 0x04, 0x1b, 0x05, 0xcb, 0x00, 0x27, 0x00, 0x43, 0x40, 0x24, + 0x1b, 0x00, 0x13, 0x07, 0x07, 0x00, 0x03, 0x16, 0x22, 0x0d, 0x06, 0x28, + 0x29, 0x03, 0x17, 0x16, 0x17, 0x16, 0x4b, 0x59, 0x17, 0x17, 0x0a, 0x25, + 0x25, 0x1e, 0x4b, 0x59, 0x25, 0x07, 0x0a, 0x11, 0x4b, 0x59, 0x0a, 0x19, + 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, + 0x2f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, + 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x15, 0x1e, 0x01, + 0x15, 0x14, 0x04, 0x21, 0x22, 0x26, 0x27, 0x35, 0x1e, 0x01, 0x33, 0x20, + 0x11, 0x10, 0x21, 0x23, 0x35, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, + 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x03, 0xee, 0x9d, + 0x90, 0xb0, 0xaa, 0xfe, 0xde, 0xfe, 0xf5, 0x74, 0xc1, 0x5b, 0x5f, 0xd7, + 0x60, 0x01, 0x7b, 0xfe, 0x5e, 0x90, 0x92, 0xab, 0xc8, 0x93, 0x7e, 0x60, + 0xaa, 0x6d, 0x54, 0x5a, 0xeb, 0x82, 0xd5, 0xec, 0x04, 0x5e, 0x8c, 0xb2, + 0x1e, 0x08, 0x16, 0xb4, 0x92, 0xd1, 0xe1, 0x23, 0x2c, 0x9e, 0x2f, 0x31, + 0x01, 0x29, 0x01, 0x0a, 0x8f, 0x97, 0x86, 0x6b, 0x7a, 0x34, 0x46, 0x70, + 0x47, 0x51, 0xc3, 0x00, 0x00, 0x02, 0x00, 0x2b, 0x00, 0x00, 0x04, 0x6a, + 0x05, 0xbe, 0x00, 0x0a, 0x00, 0x12, 0x00, 0x3c, 0x40, 0x1e, 0x12, 0x05, + 0x09, 0x02, 0x02, 0x0b, 0x07, 0x03, 0x00, 0x03, 0x05, 0x03, 0x13, 0x14, + 0x01, 0x05, 0x12, 0x05, 0x4c, 0x59, 0x09, 0x0f, 0x07, 0x12, 0x12, 0x03, + 0x07, 0x06, 0x03, 0x18, 0x00, 0x3f, 0x3f, 0x12, 0x39, 0x2f, 0x12, 0x39, + 0x33, 0x2b, 0x11, 0x00, 0x33, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, + 0x33, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x23, 0x11, 0x23, + 0x11, 0x21, 0x35, 0x01, 0x33, 0x11, 0x33, 0x21, 0x11, 0x34, 0x37, 0x23, + 0x06, 0x07, 0x01, 0x04, 0x6a, 0xd9, 0x9f, 0xfd, 0x39, 0x02, 0xb6, 0xb0, + 0xd9, 0xfe, 0x88, 0x0a, 0x08, 0x30, 0x2a, 0xfe, 0x37, 0x01, 0x50, 0xfe, + 0xb0, 0x01, 0x50, 0x91, 0x03, 0xdd, 0xfc, 0x29, 0x01, 0xe6, 0x8f, 0xb4, + 0x60, 0x3f, 0xfd, 0x76, 0x00, 0x01, 0x00, 0x85, 0xff, 0xec, 0x04, 0x1d, + 0x05, 0xb6, 0x00, 0x1a, 0x00, 0x3a, 0x40, 0x1f, 0x0f, 0x03, 0x19, 0x14, + 0x08, 0x14, 0x17, 0x03, 0x04, 0x1c, 0x1b, 0x00, 0x11, 0x4b, 0x59, 0x00, + 0x00, 0x06, 0x15, 0x15, 0x18, 0x4c, 0x59, 0x15, 0x06, 0x06, 0x0c, 0x4b, + 0x59, 0x06, 0x19, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, + 0x00, 0x39, 0x18, 0x2f, 0x2b, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x01, 0x32, 0x04, 0x15, 0x14, 0x00, 0x23, 0x22, + 0x27, 0x35, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x35, 0x10, 0x21, 0x22, 0x07, + 0x27, 0x13, 0x21, 0x15, 0x21, 0x03, 0x36, 0x02, 0x2d, 0xe7, 0x01, 0x09, + 0xfe, 0xdf, 0xfe, 0xf7, 0x82, 0x46, 0xd0, 0x65, 0xb0, 0xc3, 0xfe, 0x89, + 0x5f, 0x9f, 0x56, 0x37, 0x02, 0xd7, 0xfd, 0xb7, 0x25, 0x73, 0x03, 0x7d, + 0xe5, 0xc7, 0xe3, 0xfe, 0xfe, 0x4f, 0xa0, 0x2d, 0x33, 0xa6, 0x9d, 0x01, + 0x32, 0x1d, 0x37, 0x02, 0xac, 0x99, 0xfe, 0x49, 0x17, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x75, 0xff, 0xec, 0x04, 0x2f, 0x05, 0xcb, 0x00, 0x16, + 0x00, 0x24, 0x00, 0x44, 0x40, 0x23, 0x1a, 0x11, 0x0b, 0x21, 0x21, 0x00, + 0x00, 0x06, 0x11, 0x03, 0x26, 0x25, 0x0c, 0x0b, 0x0e, 0x1d, 0x4d, 0x59, + 0x0b, 0x0e, 0x0e, 0x14, 0x03, 0x14, 0x17, 0x4b, 0x59, 0x14, 0x19, 0x03, + 0x08, 0x4d, 0x59, 0x03, 0x07, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, + 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x39, 0x2b, 0x11, 0x00, 0x33, 0x11, + 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, + 0x13, 0x10, 0x00, 0x21, 0x32, 0x17, 0x15, 0x26, 0x23, 0x22, 0x02, 0x03, + 0x33, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x02, 0x23, 0x22, 0x00, 0x05, + 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x0e, 0x01, 0x15, 0x14, 0x1e, + 0x01, 0x75, 0x01, 0x4f, 0x01, 0x48, 0x71, 0x41, 0x4d, 0x63, 0xeb, 0xf8, + 0x0c, 0x0c, 0x6e, 0xee, 0xc5, 0xe3, 0xf9, 0xd4, 0xe3, 0xfe, 0xf6, 0x01, + 0xeb, 0x8e, 0x9d, 0x92, 0x91, 0x5a, 0x96, 0x59, 0x50, 0x93, 0x02, 0x71, + 0x01, 0xaf, 0x01, 0xab, 0x13, 0x8f, 0x19, 0xfe, 0xdb, 0xfe, 0xc6, 0xac, + 0xee, 0xcc, 0xe4, 0xfe, 0xfb, 0x01, 0x55, 0xc8, 0xb3, 0xa9, 0x91, 0xa6, + 0x4a, 0x82, 0x46, 0x67, 0xb2, 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x5e, + 0x00, 0x00, 0x04, 0x2b, 0x05, 0xb6, 0x00, 0x06, 0x00, 0x1f, 0x40, 0x10, + 0x01, 0x05, 0x05, 0x00, 0x02, 0x03, 0x07, 0x08, 0x03, 0x02, 0x4c, 0x59, + 0x03, 0x06, 0x00, 0x18, 0x00, 0x3f, 0x3f, 0x2b, 0x11, 0x12, 0x01, 0x17, + 0x39, 0x11, 0x33, 0x31, 0x30, 0x21, 0x01, 0x21, 0x35, 0x21, 0x15, 0x01, + 0x01, 0x1d, 0x02, 0x5e, 0xfc, 0xe3, 0x03, 0xcd, 0xfd, 0xaa, 0x05, 0x1d, + 0x99, 0x85, 0xfa, 0xcf, 0x00, 0x03, 0x00, 0x68, 0xff, 0xec, 0x04, 0x29, + 0x05, 0xcb, 0x00, 0x16, 0x00, 0x22, 0x00, 0x2e, 0x00, 0x4d, 0x40, 0x29, + 0x17, 0x0f, 0x26, 0x14, 0x2c, 0x03, 0x1d, 0x09, 0x09, 0x03, 0x06, 0x11, + 0x14, 0x0f, 0x06, 0x2f, 0x30, 0x06, 0x11, 0x29, 0x20, 0x29, 0x20, 0x4b, + 0x59, 0x29, 0x29, 0x0c, 0x00, 0x0c, 0x1a, 0x4d, 0x59, 0x0c, 0x19, 0x00, + 0x23, 0x4d, 0x59, 0x00, 0x07, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, + 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x39, + 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x01, 0x32, 0x16, 0x15, 0x14, 0x06, 0x07, 0x1e, 0x01, + 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x25, 0x2e, 0x01, 0x35, + 0x34, 0x36, 0x03, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x27, + 0x0e, 0x01, 0x01, 0x22, 0x06, 0x15, 0x14, 0x16, 0x17, 0x3e, 0x01, 0x35, + 0x34, 0x26, 0x02, 0x48, 0xc8, 0xea, 0x86, 0x93, 0xb2, 0x96, 0xfe, 0xdd, + 0xea, 0xfc, 0x01, 0x32, 0x8a, 0x78, 0xeb, 0x77, 0xa7, 0x97, 0x95, 0xa6, + 0x9c, 0xc2, 0x95, 0x86, 0x01, 0x3a, 0x7d, 0x8e, 0x76, 0x9f, 0x8f, 0x77, + 0x91, 0x05, 0xcb, 0xba, 0xa4, 0x6c, 0xb2, 0x49, 0x55, 0xbb, 0x7b, 0xb6, + 0xd9, 0xcd, 0xbc, 0xfb, 0x8c, 0x4e, 0xb5, 0x70, 0x9f, 0xbd, 0xfb, 0xa6, + 0x78, 0x86, 0x8c, 0x7a, 0x61, 0x97, 0x47, 0x40, 0x9b, 0x03, 0x67, 0x78, + 0x64, 0x5c, 0x84, 0x42, 0x3c, 0x8a, 0x5c, 0x65, 0x77, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x6a, 0xff, 0xec, 0x04, 0x25, 0x05, 0xcb, 0x00, 0x17, + 0x00, 0x25, 0x00, 0x41, 0x40, 0x22, 0x1b, 0x11, 0x22, 0x0a, 0x0a, 0x00, + 0x00, 0x04, 0x11, 0x03, 0x26, 0x27, 0x0e, 0x1e, 0x4d, 0x59, 0x0b, 0x14, + 0x0e, 0x0e, 0x02, 0x14, 0x14, 0x18, 0x4b, 0x59, 0x14, 0x07, 0x02, 0x07, + 0x4d, 0x59, 0x02, 0x19, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, + 0x12, 0x00, 0x39, 0x18, 0x2f, 0x12, 0x39, 0x2b, 0x11, 0x12, 0x01, 0x17, + 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x10, 0x21, + 0x22, 0x27, 0x35, 0x16, 0x33, 0x32, 0x12, 0x13, 0x23, 0x0e, 0x01, 0x23, + 0x22, 0x26, 0x35, 0x34, 0x00, 0x33, 0x32, 0x16, 0x12, 0x01, 0x22, 0x06, + 0x15, 0x14, 0x16, 0x33, 0x32, 0x3e, 0x01, 0x35, 0x34, 0x2e, 0x01, 0x04, + 0x25, 0xfd, 0x68, 0x74, 0x44, 0x50, 0x66, 0xf0, 0xf5, 0x0b, 0x0c, 0x37, + 0xb6, 0x72, 0xc2, 0xe4, 0x00, 0xff, 0xd0, 0x95, 0xdf, 0x78, 0xfe, 0x14, + 0x8f, 0x9c, 0x90, 0x93, 0x5b, 0x99, 0x58, 0x52, 0x93, 0x03, 0x46, 0xfc, + 0xa6, 0x14, 0x8f, 0x1a, 0x01, 0x29, 0x01, 0x33, 0x53, 0x57, 0xe8, 0xd0, + 0xe4, 0x01, 0x08, 0x99, 0xfe, 0xdb, 0x01, 0x30, 0xb8, 0xa4, 0x90, 0xa5, + 0x4a, 0x80, 0x46, 0x69, 0xb2, 0x66, 0x00, 0x00, 0x00, 0x02, 0x00, 0x98, + 0xff, 0xe3, 0x01, 0x89, 0x04, 0x64, 0x00, 0x0b, 0x00, 0x15, 0x00, 0x28, + 0x40, 0x14, 0x10, 0x06, 0x06, 0x0c, 0x00, 0x00, 0x16, 0x17, 0x0e, 0x13, + 0x4f, 0x59, 0x0e, 0x10, 0x09, 0x03, 0x4f, 0x59, 0x09, 0x16, 0x00, 0x3f, + 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x37, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, + 0x06, 0x23, 0x22, 0x26, 0x11, 0x34, 0x33, 0x32, 0x15, 0x14, 0x06, 0x23, + 0x22, 0x26, 0x98, 0x3d, 0x39, 0x3a, 0x41, 0x42, 0x39, 0x33, 0x43, 0x76, + 0x7b, 0x42, 0x39, 0x33, 0x43, 0x6a, 0x43, 0x45, 0x45, 0x43, 0x41, 0x46, + 0x3f, 0x03, 0xbb, 0x87, 0x87, 0x41, 0x46, 0x3f, 0x00, 0x02, 0x00, 0x3f, + 0xfe, 0xf8, 0x01, 0x85, 0x04, 0x64, 0x00, 0x08, 0x00, 0x12, 0x00, 0x22, + 0x40, 0x10, 0x01, 0x0d, 0x0d, 0x05, 0x09, 0x09, 0x14, 0x13, 0x0b, 0x10, + 0x4f, 0x59, 0x0b, 0x10, 0x05, 0x00, 0x00, 0x2f, 0xcd, 0x3f, 0x2b, 0x11, + 0x12, 0x01, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, 0x25, 0x17, + 0x06, 0x02, 0x07, 0x23, 0x36, 0x12, 0x37, 0x03, 0x34, 0x33, 0x32, 0x15, + 0x14, 0x06, 0x23, 0x22, 0x26, 0x01, 0x5e, 0x0f, 0x1a, 0x62, 0x35, 0x7d, + 0x1b, 0x41, 0x0d, 0x15, 0x77, 0x7b, 0x42, 0x39, 0x3a, 0x3d, 0xee, 0x17, + 0x64, 0xfe, 0xf7, 0x72, 0x68, 0x01, 0x32, 0x5c, 0x02, 0xef, 0x87, 0x87, + 0x41, 0x46, 0x46, 0x00, 0x00, 0x01, 0x00, 0x68, 0x00, 0xf2, 0x04, 0x29, + 0x04, 0xd9, 0x00, 0x06, 0x00, 0x15, 0x40, 0x09, 0x04, 0x00, 0x05, 0x01, + 0x04, 0x07, 0x08, 0x03, 0x00, 0x00, 0x2f, 0x2f, 0x11, 0x12, 0x01, 0x17, + 0x39, 0x31, 0x30, 0x25, 0x01, 0x35, 0x01, 0x15, 0x09, 0x01, 0x04, 0x29, + 0xfc, 0x3f, 0x03, 0xc1, 0xfc, 0xf2, 0x03, 0x0e, 0xf2, 0x01, 0xa6, 0x62, + 0x01, 0xdf, 0x95, 0xfe, 0x8d, 0xfe, 0xb8, 0x00, 0x00, 0x02, 0x00, 0x77, + 0x01, 0xc1, 0x04, 0x19, 0x03, 0xe3, 0x00, 0x03, 0x00, 0x07, 0x00, 0x2a, + 0x40, 0x15, 0x07, 0x02, 0x04, 0x00, 0x02, 0x00, 0x09, 0x08, 0x04, 0x05, + 0x50, 0x59, 0x04, 0x01, 0x00, 0x50, 0x59, 0x0f, 0x01, 0x01, 0x01, 0x00, + 0x2f, 0x5d, 0x2b, 0x00, 0x18, 0x2f, 0x2b, 0x11, 0x12, 0x01, 0x39, 0x39, + 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, 0x35, 0x21, 0x15, 0x01, 0x35, + 0x21, 0x15, 0x77, 0x03, 0xa2, 0xfc, 0x5e, 0x03, 0xa2, 0x03, 0x5a, 0x89, + 0x89, 0xfe, 0x67, 0x89, 0x89, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, + 0x00, 0xf2, 0x04, 0x29, 0x04, 0xd9, 0x00, 0x06, 0x00, 0x15, 0x40, 0x09, + 0x05, 0x01, 0x02, 0x00, 0x04, 0x07, 0x08, 0x06, 0x03, 0x00, 0x2f, 0x2f, + 0x11, 0x12, 0x01, 0x17, 0x39, 0x31, 0x30, 0x13, 0x09, 0x01, 0x35, 0x01, + 0x15, 0x01, 0x68, 0x03, 0x0f, 0xfc, 0xf1, 0x03, 0xc1, 0xfc, 0x3f, 0x01, + 0x89, 0x01, 0x46, 0x01, 0x75, 0x95, 0xfe, 0x21, 0x62, 0xfe, 0x5a, 0x00, + 0x00, 0x02, 0x00, 0x1b, 0xff, 0xe3, 0x03, 0x39, 0x05, 0xcb, 0x00, 0x1b, + 0x00, 0x26, 0x00, 0x39, 0x40, 0x1d, 0x21, 0x1c, 0x1b, 0x00, 0x07, 0x13, + 0x13, 0x00, 0x1c, 0x0e, 0x04, 0x27, 0x28, 0x00, 0x00, 0x24, 0x10, 0x24, + 0x1e, 0x4f, 0x59, 0x24, 0x16, 0x10, 0x0a, 0x49, 0x59, 0x10, 0x04, 0x00, + 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, + 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, + 0x30, 0x01, 0x35, 0x34, 0x36, 0x37, 0x3e, 0x01, 0x35, 0x34, 0x26, 0x23, + 0x22, 0x06, 0x07, 0x27, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x0e, 0x01, + 0x07, 0x0e, 0x01, 0x1d, 0x01, 0x03, 0x34, 0x33, 0x32, 0x16, 0x15, 0x14, + 0x06, 0x23, 0x22, 0x26, 0x01, 0x21, 0x48, 0x62, 0x88, 0x47, 0x83, 0x7b, + 0x4f, 0x96, 0x61, 0x3b, 0xbd, 0xce, 0xbf, 0xd4, 0x27, 0x4c, 0x7e, 0x65, + 0x41, 0xb2, 0x78, 0x3a, 0x3f, 0x40, 0x39, 0x34, 0x44, 0x01, 0x93, 0x36, + 0x75, 0x97, 0x54, 0x73, 0x74, 0x52, 0x66, 0x6f, 0x25, 0x31, 0x87, 0x63, + 0xbc, 0xab, 0x49, 0x6f, 0x63, 0x6e, 0x56, 0x72, 0x5f, 0x21, 0xfe, 0xd7, + 0x88, 0x46, 0x42, 0x40, 0x47, 0x3f, 0x00, 0x00, 0x00, 0x02, 0x00, 0x79, + 0xff, 0x46, 0x06, 0xb8, 0x05, 0xb4, 0x00, 0x35, 0x00, 0x3f, 0x00, 0x45, + 0x40, 0x22, 0x23, 0x2e, 0x36, 0x0e, 0x3b, 0x07, 0x14, 0x1b, 0x00, 0x00, + 0x29, 0x14, 0x0e, 0x2e, 0x05, 0x40, 0x41, 0x18, 0x38, 0x38, 0x04, 0x3d, + 0x08, 0x11, 0x0b, 0x11, 0x0b, 0x11, 0x2b, 0x1f, 0x32, 0x03, 0x26, 0x2b, + 0x00, 0x2f, 0x33, 0x3f, 0x33, 0x12, 0x39, 0x39, 0x2f, 0x2f, 0x12, 0x39, + 0x32, 0x33, 0x33, 0x11, 0x33, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, + 0x11, 0x33, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x14, 0x0e, + 0x01, 0x23, 0x22, 0x26, 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, + 0x34, 0x12, 0x33, 0x32, 0x16, 0x17, 0x03, 0x15, 0x14, 0x33, 0x32, 0x36, + 0x35, 0x34, 0x02, 0x24, 0x23, 0x22, 0x04, 0x02, 0x15, 0x10, 0x00, 0x21, + 0x32, 0x37, 0x15, 0x06, 0x23, 0x20, 0x00, 0x11, 0x10, 0x12, 0x24, 0x21, + 0x32, 0x04, 0x12, 0x01, 0x14, 0x33, 0x32, 0x1b, 0x01, 0x26, 0x23, 0x22, + 0x06, 0x06, 0xb8, 0x58, 0xa0, 0x68, 0x56, 0x76, 0x0b, 0x08, 0x28, 0x95, + 0x66, 0x96, 0xa9, 0xec, 0xc0, 0x44, 0xac, 0x45, 0x19, 0x85, 0x5b, 0x72, + 0x94, 0xfe, 0xef, 0xb1, 0xdf, 0xfe, 0xb6, 0xae, 0x01, 0x42, 0x01, 0x2f, + 0xd2, 0xe2, 0xc0, 0xf4, 0xfe, 0x95, 0xfe, 0x6f, 0xd6, 0x01, 0x8c, 0x01, + 0x00, 0xd7, 0x01, 0x4f, 0xb7, 0xfb, 0xf6, 0xc3, 0xcf, 0x12, 0x0e, 0x48, + 0x55, 0x82, 0x93, 0x02, 0xd9, 0x8e, 0xec, 0x82, 0x68, 0x51, 0x57, 0x62, + 0xcd, 0xb0, 0xcc, 0x00, 0xff, 0x19, 0x16, 0xfe, 0x2a, 0x16, 0xb2, 0xd7, + 0xac, 0xb5, 0x01, 0x10, 0x93, 0xb9, 0xfe, 0xa9, 0xe1, 0xfe, 0xcf, 0xfe, + 0xb8, 0x56, 0x85, 0x54, 0x01, 0x8f, 0x01, 0x66, 0x01, 0x04, 0x01, 0x96, + 0xdf, 0xb5, 0xfe, 0xb3, 0xfe, 0xa4, 0xfe, 0x01, 0x39, 0x01, 0x05, 0x14, + 0xb4, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x05, 0x10, + 0x05, 0xbc, 0x00, 0x07, 0x00, 0x0e, 0x00, 0x39, 0x40, 0x1e, 0x02, 0x0e, + 0x0b, 0x08, 0x01, 0x05, 0x00, 0x03, 0x00, 0x07, 0x03, 0x04, 0x07, 0x04, + 0x10, 0x0f, 0x0e, 0x02, 0x49, 0x59, 0x0b, 0x05, 0x0e, 0x0e, 0x04, 0x05, + 0x03, 0x00, 0x04, 0x12, 0x00, 0x3f, 0x33, 0x3f, 0x12, 0x39, 0x2f, 0x12, + 0x39, 0x2b, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, + 0x12, 0x17, 0x39, 0x31, 0x30, 0x21, 0x03, 0x21, 0x03, 0x23, 0x01, 0x33, + 0x09, 0x01, 0x03, 0x26, 0x27, 0x06, 0x07, 0x03, 0x04, 0x60, 0xb6, 0xfd, + 0xb6, 0xb4, 0xac, 0x02, 0x42, 0x8f, 0x02, 0x3f, 0xfe, 0x65, 0xaa, 0x21, + 0x23, 0x16, 0x29, 0xac, 0x01, 0xd1, 0xfe, 0x2f, 0x05, 0xbc, 0xfa, 0x44, + 0x02, 0x6a, 0x01, 0xc5, 0x56, 0x7d, 0x60, 0x73, 0xfe, 0x3b, 0x00, 0x00, + 0x00, 0x03, 0x00, 0xc9, 0x00, 0x00, 0x04, 0xbe, 0x05, 0xb6, 0x00, 0x0e, + 0x00, 0x17, 0x00, 0x20, 0x00, 0x49, 0x40, 0x26, 0x13, 0x04, 0x1d, 0x0a, + 0x0f, 0x19, 0x19, 0x0e, 0x0a, 0x04, 0x07, 0x0e, 0x04, 0x21, 0x22, 0x08, + 0x0f, 0x18, 0x0f, 0x18, 0x4a, 0x59, 0x0f, 0x0f, 0x0e, 0x00, 0x0e, 0x19, + 0x4a, 0x59, 0x0e, 0x12, 0x00, 0x17, 0x4a, 0x59, 0x00, 0x03, 0x00, 0x3f, + 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x2b, + 0x11, 0x12, 0x00, 0x39, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, 0x21, 0x20, 0x04, 0x15, + 0x14, 0x06, 0x07, 0x15, 0x04, 0x11, 0x14, 0x04, 0x23, 0x21, 0x13, 0x21, + 0x32, 0x36, 0x35, 0x34, 0x26, 0x2b, 0x01, 0x19, 0x01, 0x21, 0x32, 0x36, + 0x35, 0x34, 0x26, 0x23, 0xc9, 0x01, 0x9d, 0x01, 0x23, 0x01, 0x04, 0x91, + 0x8b, 0x01, 0x4d, 0xfe, 0xf7, 0xee, 0xfe, 0x02, 0xaa, 0x01, 0x18, 0xb4, + 0x9e, 0xb0, 0xc0, 0xfa, 0x01, 0x31, 0xb1, 0xb3, 0xb7, 0xbb, 0x05, 0xb6, + 0xae, 0xbc, 0x82, 0xa9, 0x19, 0x0a, 0x39, 0xfe, 0xdb, 0xc4, 0xdc, 0x03, + 0x44, 0x71, 0x86, 0x7b, 0x6d, 0xfd, 0x91, 0xfd, 0xdd, 0x89, 0x92, 0x88, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x7d, 0xff, 0xec, 0x04, 0xcf, + 0x05, 0xcb, 0x00, 0x16, 0x00, 0x26, 0x40, 0x14, 0x03, 0x0e, 0x14, 0x09, + 0x0e, 0x03, 0x17, 0x18, 0x12, 0x00, 0x49, 0x59, 0x12, 0x04, 0x0b, 0x06, + 0x49, 0x59, 0x0b, 0x13, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, + 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x31, 0x30, 0x01, 0x22, 0x00, 0x11, + 0x10, 0x00, 0x33, 0x32, 0x37, 0x15, 0x06, 0x23, 0x20, 0x00, 0x11, 0x34, + 0x12, 0x24, 0x33, 0x32, 0x17, 0x07, 0x26, 0x03, 0x3b, 0xf1, 0xfe, 0xe9, + 0x01, 0x0d, 0xf9, 0x99, 0xc4, 0x98, 0xdf, 0xfe, 0xbd, 0xfe, 0xa1, 0xa9, + 0x01, 0x3f, 0xd8, 0xe6, 0xac, 0x48, 0xa6, 0x05, 0x33, 0xfe, 0xbf, 0xfe, + 0xe9, 0xfe, 0xe1, 0xfe, 0xc7, 0x37, 0x95, 0x39, 0x01, 0x88, 0x01, 0x69, + 0xe2, 0x01, 0x54, 0xb8, 0x54, 0x92, 0x4e, 0x00, 0x00, 0x02, 0x00, 0xc9, + 0x00, 0x00, 0x05, 0x58, 0x05, 0xb6, 0x00, 0x08, 0x00, 0x11, 0x00, 0x28, + 0x40, 0x14, 0x0e, 0x04, 0x09, 0x00, 0x04, 0x00, 0x12, 0x13, 0x05, 0x0d, + 0x4a, 0x59, 0x05, 0x03, 0x04, 0x0e, 0x4a, 0x59, 0x04, 0x12, 0x00, 0x3f, + 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x01, 0x10, 0x00, 0x29, 0x01, 0x11, 0x21, 0x20, + 0x00, 0x03, 0x10, 0x00, 0x21, 0x23, 0x11, 0x33, 0x20, 0x00, 0x05, 0x58, + 0xfe, 0x77, 0xfe, 0x8f, 0xfe, 0x6b, 0x01, 0xc0, 0x01, 0x55, 0x01, 0x7a, + 0xb4, 0xfe, 0xe1, 0xfe, 0xe5, 0xf7, 0xcf, 0x01, 0x30, 0x01, 0x32, 0x02, + 0xe9, 0xfe, 0x96, 0xfe, 0x81, 0x05, 0xb6, 0xfe, 0x86, 0xfe, 0xa7, 0x01, + 0x1e, 0x01, 0x22, 0xfb, 0x70, 0x01, 0x2b, 0x00, 0x00, 0x01, 0x00, 0xc9, + 0x00, 0x00, 0x03, 0xf8, 0x05, 0xb6, 0x00, 0x0b, 0x00, 0x3a, 0x40, 0x1f, + 0x06, 0x0a, 0x0a, 0x01, 0x04, 0x00, 0x08, 0x01, 0x04, 0x0c, 0x0d, 0x06, + 0x09, 0x49, 0x59, 0x06, 0x06, 0x01, 0x02, 0x02, 0x05, 0x49, 0x59, 0x02, + 0x03, 0x01, 0x0a, 0x49, 0x59, 0x01, 0x12, 0x00, 0x3f, 0x2b, 0x00, 0x18, + 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x2b, 0x11, 0x12, 0x01, + 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x29, 0x01, 0x11, 0x21, + 0x15, 0x21, 0x11, 0x21, 0x15, 0x21, 0x11, 0x21, 0x03, 0xf8, 0xfc, 0xd1, + 0x03, 0x2f, 0xfd, 0x7b, 0x02, 0x5e, 0xfd, 0xa2, 0x02, 0x85, 0x05, 0xb6, + 0x97, 0xfe, 0x29, 0x96, 0xfd, 0xe6, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc9, + 0x00, 0x00, 0x03, 0xf8, 0x05, 0xb6, 0x00, 0x09, 0x00, 0x32, 0x40, 0x1a, + 0x06, 0x00, 0x00, 0x01, 0x03, 0x08, 0x01, 0x03, 0x0a, 0x0b, 0x06, 0x09, + 0x49, 0x59, 0x06, 0x06, 0x01, 0x02, 0x02, 0x05, 0x49, 0x59, 0x02, 0x03, + 0x01, 0x12, 0x00, 0x3f, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, + 0x2b, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, + 0x21, 0x23, 0x11, 0x21, 0x15, 0x21, 0x11, 0x21, 0x15, 0x21, 0x01, 0x73, + 0xaa, 0x03, 0x2f, 0xfd, 0x7b, 0x02, 0x5e, 0xfd, 0xa2, 0x05, 0xb6, 0x97, + 0xfd, 0xe9, 0x97, 0x00, 0x00, 0x01, 0x00, 0x7d, 0xff, 0xec, 0x05, 0x3d, + 0x05, 0xcb, 0x00, 0x1b, 0x00, 0x3a, 0x40, 0x1f, 0x14, 0x08, 0x19, 0x02, + 0x02, 0x0e, 0x1b, 0x08, 0x04, 0x1c, 0x1d, 0x00, 0x1b, 0x49, 0x59, 0x00, + 0x00, 0x05, 0x0c, 0x0c, 0x11, 0x49, 0x59, 0x0c, 0x04, 0x05, 0x17, 0x49, + 0x59, 0x05, 0x13, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, + 0x00, 0x39, 0x18, 0x2f, 0x2b, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x01, 0x21, 0x11, 0x0e, 0x01, 0x23, 0x20, 0x00, + 0x11, 0x34, 0x12, 0x24, 0x33, 0x32, 0x17, 0x07, 0x26, 0x23, 0x20, 0x00, + 0x11, 0x10, 0x00, 0x21, 0x32, 0x37, 0x11, 0x21, 0x03, 0x4c, 0x01, 0xf1, + 0x74, 0xf0, 0x9e, 0xfe, 0xb4, 0xfe, 0x8e, 0xb7, 0x01, 0x58, 0xe7, 0xea, + 0xca, 0x42, 0xc6, 0xb7, 0xfe, 0xf5, 0xfe, 0xd4, 0x01, 0x21, 0x01, 0x18, + 0x98, 0x91, 0xfe, 0xb9, 0x02, 0xfe, 0xfd, 0x39, 0x25, 0x26, 0x01, 0x8b, + 0x01, 0x64, 0xe4, 0x01, 0x57, 0xb5, 0x56, 0x96, 0x54, 0xfe, 0xc2, 0xfe, + 0xe6, 0xfe, 0xd8, 0xfe, 0xce, 0x23, 0x01, 0xc2, 0x00, 0x01, 0x00, 0xc9, + 0x00, 0x00, 0x05, 0x1f, 0x05, 0xb6, 0x00, 0x0b, 0x00, 0x33, 0x40, 0x19, + 0x09, 0x01, 0x01, 0x00, 0x08, 0x04, 0x04, 0x05, 0x00, 0x05, 0x0d, 0x0c, + 0x08, 0x03, 0x49, 0x59, 0x08, 0x08, 0x05, 0x0a, 0x06, 0x03, 0x01, 0x05, + 0x12, 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x12, 0x39, 0x2f, 0x2b, 0x11, 0x12, + 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, + 0x30, 0x21, 0x23, 0x11, 0x21, 0x11, 0x23, 0x11, 0x33, 0x11, 0x21, 0x11, + 0x33, 0x05, 0x1f, 0xaa, 0xfc, 0xfe, 0xaa, 0xaa, 0x03, 0x02, 0xaa, 0x02, + 0xb0, 0xfd, 0x50, 0x05, 0xb6, 0xfd, 0x92, 0x02, 0x6e, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0xc9, 0x00, 0x00, 0x01, 0x73, 0x05, 0xb6, 0x00, 0x03, + 0x00, 0x11, 0xb6, 0x00, 0x04, 0x05, 0x01, 0x03, 0x00, 0x12, 0x00, 0x3f, + 0x3f, 0x11, 0x12, 0x01, 0x39, 0x31, 0x30, 0x33, 0x11, 0x33, 0x11, 0xc9, + 0xaa, 0x05, 0xb6, 0xfa, 0x4a, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x60, + 0xfe, 0x7f, 0x01, 0x68, 0x05, 0xb6, 0x00, 0x0d, 0x00, 0x1d, 0x40, 0x0d, + 0x0b, 0x08, 0x08, 0x0e, 0x0f, 0x09, 0x03, 0x00, 0x05, 0x49, 0x59, 0x00, + 0x22, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x11, 0x12, 0x01, 0x39, 0x11, + 0x33, 0x31, 0x30, 0x03, 0x22, 0x27, 0x35, 0x16, 0x33, 0x32, 0x36, 0x35, + 0x11, 0x33, 0x11, 0x14, 0x06, 0x0c, 0x5e, 0x36, 0x47, 0x4d, 0x63, 0x67, + 0xaa, 0xc0, 0xfe, 0x7f, 0x1b, 0x91, 0x14, 0x78, 0x71, 0x05, 0xb6, 0xfa, + 0x58, 0xbe, 0xd1, 0x00, 0x00, 0x01, 0x00, 0xc9, 0x00, 0x00, 0x04, 0xe9, + 0x05, 0xb6, 0x00, 0x0b, 0x00, 0x2a, 0x40, 0x15, 0x08, 0x04, 0x04, 0x05, + 0x05, 0x02, 0x0b, 0x0a, 0x00, 0x05, 0x0d, 0x0c, 0x02, 0x08, 0x05, 0x09, + 0x06, 0x03, 0x01, 0x05, 0x12, 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x12, 0x39, + 0x39, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, + 0x21, 0x23, 0x01, 0x07, 0x11, 0x23, 0x11, 0x33, 0x11, 0x01, 0x33, 0x01, + 0x04, 0xe9, 0xc8, 0xfd, 0xeb, 0x99, 0xaa, 0xaa, 0x02, 0x97, 0xc9, 0xfd, + 0xb4, 0x02, 0xc5, 0x88, 0xfd, 0xc3, 0x05, 0xb6, 0xfd, 0x2b, 0x02, 0xd5, + 0xfd, 0x85, 0x00, 0x00, 0x00, 0x01, 0x00, 0xc9, 0x00, 0x00, 0x03, 0xf8, + 0x05, 0xb6, 0x00, 0x05, 0x00, 0x1f, 0x40, 0x0e, 0x03, 0x00, 0x00, 0x04, + 0x06, 0x07, 0x01, 0x03, 0x00, 0x03, 0x49, 0x59, 0x00, 0x12, 0x00, 0x3f, + 0x2b, 0x00, 0x18, 0x3f, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x31, + 0x30, 0x33, 0x11, 0x33, 0x11, 0x21, 0x15, 0xc9, 0xaa, 0x02, 0x85, 0x05, + 0xb6, 0xfa, 0xe4, 0x9a, 0x00, 0x01, 0x00, 0xc9, 0x00, 0x00, 0x06, 0x71, + 0x05, 0xb6, 0x00, 0x13, 0x00, 0x32, 0x40, 0x18, 0x08, 0x05, 0x05, 0x06, + 0x0b, 0x0e, 0x0e, 0x0d, 0x06, 0x0d, 0x14, 0x15, 0x01, 0x0a, 0x11, 0x03, + 0x06, 0x0b, 0x07, 0x03, 0x0e, 0x00, 0x06, 0x12, 0x00, 0x3f, 0x33, 0x33, + 0x3f, 0x33, 0x12, 0x17, 0x39, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x21, 0x01, 0x23, 0x16, + 0x15, 0x11, 0x23, 0x11, 0x21, 0x01, 0x33, 0x01, 0x33, 0x11, 0x23, 0x11, + 0x34, 0x37, 0x23, 0x01, 0x03, 0x50, 0xfe, 0x10, 0x08, 0x0e, 0x9d, 0x01, + 0x00, 0x01, 0xcf, 0x08, 0x01, 0xd3, 0xfe, 0xaa, 0x0e, 0x08, 0xfe, 0x0c, + 0x05, 0x10, 0x9a, 0xd4, 0xfc, 0x5e, 0x05, 0xb6, 0xfb, 0x4a, 0x04, 0xb6, + 0xfa, 0x4a, 0x03, 0xae, 0xa2, 0xbe, 0xfa, 0xf2, 0x00, 0x01, 0x00, 0xc9, + 0x00, 0x00, 0x05, 0x3f, 0x05, 0xb6, 0x00, 0x10, 0x00, 0x2e, 0x40, 0x15, + 0x09, 0x06, 0x06, 0x07, 0x01, 0x0f, 0x0f, 0x00, 0x07, 0x00, 0x11, 0x12, + 0x0b, 0x03, 0x07, 0x0f, 0x08, 0x03, 0x01, 0x07, 0x12, 0x00, 0x3f, 0x33, + 0x3f, 0x33, 0x12, 0x39, 0x39, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x21, 0x23, 0x01, 0x23, + 0x16, 0x15, 0x11, 0x23, 0x11, 0x33, 0x01, 0x33, 0x26, 0x02, 0x37, 0x11, + 0x33, 0x05, 0x3f, 0xc2, 0xfc, 0xe1, 0x08, 0x10, 0x9d, 0xc0, 0x03, 0x1d, + 0x08, 0x02, 0x0e, 0x02, 0x9f, 0x04, 0xcb, 0xd8, 0xb4, 0xfc, 0xc1, 0x05, + 0xb6, 0xfb, 0x3a, 0x1b, 0x01, 0x25, 0x3f, 0x03, 0x47, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x7d, 0xff, 0xec, 0x05, 0xbe, 0x05, 0xcd, 0x00, 0x0b, + 0x00, 0x17, 0x00, 0x28, 0x40, 0x14, 0x12, 0x00, 0x0c, 0x06, 0x00, 0x06, + 0x19, 0x18, 0x09, 0x15, 0x49, 0x59, 0x09, 0x04, 0x03, 0x0f, 0x49, 0x59, + 0x03, 0x13, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x01, + 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x10, 0x00, 0x21, + 0x20, 0x00, 0x11, 0x10, 0x00, 0x21, 0x20, 0x00, 0x01, 0x10, 0x12, 0x33, + 0x32, 0x12, 0x11, 0x10, 0x02, 0x23, 0x22, 0x02, 0x05, 0xbe, 0xfe, 0x9d, + 0xfe, 0xc4, 0xfe, 0xbd, 0xfe, 0xa1, 0x01, 0x60, 0x01, 0x44, 0x01, 0x3b, + 0x01, 0x62, 0xfb, 0x73, 0xfd, 0xf1, 0xf3, 0xf8, 0xf7, 0xf2, 0xf3, 0xfd, + 0x02, 0xdd, 0xfe, 0xa1, 0xfe, 0x6e, 0x01, 0x8b, 0x01, 0x68, 0x01, 0x65, + 0x01, 0x89, 0xfe, 0x70, 0xfe, 0xa0, 0xfe, 0xd7, 0xfe, 0xcd, 0x01, 0x32, + 0x01, 0x2a, 0x01, 0x27, 0x01, 0x31, 0xfe, 0xcd, 0x00, 0x02, 0x00, 0xc9, + 0x00, 0x00, 0x04, 0x68, 0x05, 0xb6, 0x00, 0x09, 0x00, 0x12, 0x00, 0x34, + 0x40, 0x1a, 0x0a, 0x05, 0x05, 0x06, 0x0e, 0x00, 0x06, 0x00, 0x13, 0x14, + 0x0a, 0x04, 0x4a, 0x59, 0x0a, 0x0a, 0x06, 0x07, 0x07, 0x12, 0x4a, 0x59, + 0x07, 0x03, 0x06, 0x12, 0x00, 0x3f, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, + 0x18, 0x2f, 0x2b, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x01, 0x14, 0x04, 0x21, 0x23, 0x11, 0x23, 0x11, + 0x21, 0x20, 0x01, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x2b, 0x01, 0x04, + 0x68, 0xfe, 0xd1, 0xfe, 0xe6, 0xac, 0xaa, 0x01, 0x7b, 0x02, 0x24, 0xfd, + 0x0b, 0x99, 0xe2, 0xca, 0xbe, 0xc9, 0xbe, 0x04, 0x0c, 0xde, 0xef, 0xfd, + 0xc1, 0x05, 0xb6, 0xfd, 0x1b, 0x92, 0xa1, 0x91, 0x8e, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x7d, 0xfe, 0xa4, 0x05, 0xbe, 0x05, 0xcd, 0x00, 0x0f, + 0x00, 0x1b, 0x00, 0x34, 0x40, 0x1b, 0x10, 0x0a, 0x16, 0x00, 0x00, 0x04, + 0x03, 0x0a, 0x04, 0x1c, 0x1d, 0x03, 0x0d, 0x07, 0x0d, 0x19, 0x49, 0x59, + 0x0d, 0x04, 0x07, 0x13, 0x49, 0x59, 0x05, 0x07, 0x13, 0x00, 0x3f, 0xc6, + 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x11, 0x12, 0x01, + 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x10, 0x02, 0x07, + 0x01, 0x23, 0x01, 0x07, 0x20, 0x00, 0x11, 0x10, 0x00, 0x21, 0x20, 0x00, + 0x01, 0x10, 0x12, 0x33, 0x32, 0x12, 0x11, 0x10, 0x02, 0x23, 0x22, 0x02, + 0x05, 0xbe, 0xe2, 0xce, 0x01, 0x5c, 0xf7, 0xfe, 0xe3, 0x37, 0xfe, 0xbd, + 0xfe, 0xa1, 0x01, 0x60, 0x01, 0x44, 0x01, 0x3b, 0x01, 0x62, 0xfb, 0x73, + 0xfd, 0xf1, 0xf3, 0xf8, 0xf7, 0xf2, 0xf3, 0xfd, 0x02, 0xdd, 0xfe, 0xe7, + 0xfe, 0x8c, 0x42, 0xfe, 0x96, 0x01, 0x4a, 0x02, 0x01, 0x8b, 0x01, 0x68, + 0x01, 0x65, 0x01, 0x89, 0xfe, 0x70, 0xfe, 0xa0, 0xfe, 0xd7, 0xfe, 0xcd, + 0x01, 0x32, 0x01, 0x2a, 0x01, 0x27, 0x01, 0x31, 0xfe, 0xcd, 0x00, 0x00, + 0x00, 0x02, 0x00, 0xc9, 0x00, 0x00, 0x04, 0xcf, 0x05, 0xb6, 0x00, 0x0c, + 0x00, 0x15, 0x00, 0x48, 0x40, 0x25, 0x0d, 0x01, 0x01, 0x02, 0x0c, 0x09, + 0x11, 0x07, 0x0b, 0x0a, 0x0a, 0x07, 0x09, 0x02, 0x04, 0x16, 0x17, 0x09, + 0x0d, 0x00, 0x0d, 0x00, 0x4a, 0x59, 0x0d, 0x0d, 0x02, 0x03, 0x03, 0x15, + 0x49, 0x59, 0x03, 0x03, 0x0b, 0x02, 0x12, 0x00, 0x3f, 0x33, 0x3f, 0x2b, + 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x11, + 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x01, 0x11, 0x23, 0x11, 0x21, 0x20, 0x04, 0x15, + 0x10, 0x05, 0x01, 0x23, 0x01, 0x25, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, + 0x2b, 0x01, 0x01, 0x73, 0xaa, 0x01, 0x91, 0x01, 0x0d, 0x01, 0x01, 0xfe, + 0xda, 0x01, 0x8d, 0xc9, 0xfe, 0x9e, 0xfe, 0xcf, 0xe9, 0xb4, 0xa8, 0xab, + 0xbd, 0xdd, 0x02, 0x60, 0xfd, 0xa0, 0x05, 0xb6, 0xce, 0xcf, 0xfe, 0xde, + 0x66, 0xfd, 0x6f, 0x02, 0x60, 0x92, 0x8f, 0x8f, 0x91, 0x80, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x6a, 0xff, 0xec, 0x04, 0x02, 0x05, 0xcb, 0x00, 0x24, + 0x00, 0x34, 0x40, 0x1b, 0x1e, 0x13, 0x0c, 0x00, 0x00, 0x18, 0x13, 0x05, + 0x04, 0x25, 0x26, 0x0c, 0x1e, 0x03, 0x16, 0x16, 0x1b, 0x49, 0x59, 0x16, + 0x04, 0x03, 0x09, 0x49, 0x59, 0x03, 0x13, 0x00, 0x3f, 0x2b, 0x00, 0x18, + 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x39, 0x11, 0x12, 0x01, 0x17, 0x39, + 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x14, 0x04, 0x23, 0x20, 0x27, + 0x35, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x35, 0x34, 0x2e, 0x01, 0x27, 0x2e, + 0x01, 0x35, 0x34, 0x36, 0x33, 0x32, 0x17, 0x07, 0x26, 0x23, 0x22, 0x06, + 0x15, 0x14, 0x1e, 0x01, 0x17, 0x1e, 0x01, 0x04, 0x02, 0xfe, 0xe8, 0xf0, + 0xfe, 0xfc, 0x8c, 0x5a, 0xd4, 0x68, 0xaa, 0xac, 0x3d, 0x8f, 0x92, 0xcc, + 0xaf, 0xfe, 0xd1, 0xda, 0xb7, 0x35, 0xb5, 0xab, 0x87, 0x98, 0x38, 0x85, + 0x89, 0xe6, 0xad, 0x01, 0x85, 0xc1, 0xd8, 0x43, 0xa4, 0x26, 0x2c, 0x81, + 0x73, 0x4c, 0x61, 0x52, 0x34, 0x49, 0xc8, 0xa1, 0xa9, 0xc8, 0x50, 0x94, + 0x4c, 0x74, 0x67, 0x4c, 0x61, 0x51, 0x31, 0x52, 0xbc, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x12, 0x00, 0x00, 0x04, 0x5a, 0x05, 0xb6, 0x00, 0x07, + 0x00, 0x24, 0x40, 0x12, 0x00, 0x01, 0x05, 0x01, 0x03, 0x03, 0x08, 0x09, + 0x07, 0x03, 0x04, 0x03, 0x49, 0x59, 0x04, 0x03, 0x01, 0x12, 0x00, 0x3f, + 0x3f, 0x2b, 0x11, 0x00, 0x33, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, + 0x31, 0x30, 0x21, 0x23, 0x11, 0x21, 0x35, 0x21, 0x15, 0x21, 0x02, 0x8b, + 0xaa, 0xfe, 0x31, 0x04, 0x48, 0xfe, 0x31, 0x05, 0x1f, 0x97, 0x97, 0x00, + 0x00, 0x01, 0x00, 0xba, 0xff, 0xec, 0x05, 0x19, 0x05, 0xb6, 0x00, 0x11, + 0x00, 0x25, 0x40, 0x11, 0x10, 0x01, 0x0a, 0x07, 0x01, 0x07, 0x13, 0x12, + 0x11, 0x08, 0x03, 0x04, 0x0d, 0x49, 0x59, 0x04, 0x13, 0x00, 0x3f, 0x2b, + 0x00, 0x18, 0x3f, 0x33, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x01, 0x11, 0x14, 0x00, 0x21, 0x20, 0x00, 0x35, 0x11, + 0x33, 0x11, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x11, 0x05, 0x19, 0xfe, + 0xd2, 0xfe, 0xf8, 0xfe, 0xf8, 0xfe, 0xdf, 0xaa, 0xc8, 0xc2, 0xb9, 0xc8, + 0x05, 0xb6, 0xfc, 0x4e, 0xfa, 0xfe, 0xe2, 0x01, 0x20, 0xfc, 0x03, 0xae, + 0xfc, 0x46, 0xb7, 0xc4, 0xc5, 0xb8, 0x03, 0xb8, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x04, 0xc3, 0x05, 0xb6, 0x00, 0x0a, 0x00, 0x1a, 0x40, 0x0b, + 0x01, 0x04, 0x0c, 0x0b, 0x08, 0x03, 0x00, 0x04, 0x03, 0x03, 0x12, 0x00, + 0x3f, 0x3f, 0x33, 0x12, 0x39, 0x11, 0x12, 0x01, 0x39, 0x39, 0x31, 0x30, + 0x01, 0x33, 0x01, 0x23, 0x01, 0x33, 0x01, 0x16, 0x17, 0x36, 0x37, 0x04, + 0x0c, 0xb7, 0xfd, 0xf1, 0xa8, 0xfd, 0xf4, 0xb4, 0x01, 0x50, 0x3a, 0x22, + 0x24, 0x3a, 0x05, 0xb6, 0xfa, 0x4a, 0x05, 0xb6, 0xfc, 0x4e, 0xa3, 0x9a, + 0xa2, 0xa1, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1b, 0x00, 0x00, 0x07, 0x4c, + 0x05, 0xb6, 0x00, 0x19, 0x00, 0x24, 0x40, 0x10, 0x19, 0x0a, 0x1b, 0x1a, + 0x15, 0x0e, 0x0e, 0x05, 0x09, 0x18, 0x11, 0x0a, 0x03, 0x01, 0x09, 0x12, + 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x33, 0x12, 0x39, 0x39, 0x11, 0x33, 0x11, + 0x12, 0x01, 0x39, 0x39, 0x31, 0x30, 0x21, 0x23, 0x01, 0x2e, 0x01, 0x27, + 0x06, 0x07, 0x01, 0x23, 0x01, 0x33, 0x13, 0x16, 0x17, 0x36, 0x37, 0x01, + 0x33, 0x01, 0x16, 0x17, 0x36, 0x37, 0x13, 0x33, 0x05, 0xc5, 0xa8, 0xfe, + 0xd9, 0x15, 0x34, 0x01, 0x16, 0x30, 0xfe, 0xe2, 0xa8, 0xfe, 0x7b, 0xb4, + 0xe7, 0x30, 0x16, 0x1b, 0x35, 0x01, 0x06, 0xb4, 0x01, 0x13, 0x30, 0x21, + 0x13, 0x35, 0xe6, 0xb4, 0x03, 0xd3, 0x41, 0xc6, 0x14, 0x84, 0x9d, 0xfc, + 0x33, 0x05, 0xb6, 0xfc, 0x79, 0xbe, 0x9a, 0xb7, 0xaf, 0x03, 0x79, 0xfc, + 0x7f, 0x9b, 0xc3, 0x8e, 0xcc, 0x03, 0x85, 0x00, 0x00, 0x01, 0x00, 0x08, + 0x00, 0x00, 0x04, 0x96, 0x05, 0xb6, 0x00, 0x0b, 0x00, 0x23, 0x40, 0x12, + 0x04, 0x06, 0x05, 0x0b, 0x0a, 0x00, 0x06, 0x0d, 0x0c, 0x02, 0x08, 0x04, + 0x09, 0x06, 0x03, 0x01, 0x04, 0x12, 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x12, + 0x39, 0x39, 0x11, 0x12, 0x01, 0x17, 0x39, 0x31, 0x30, 0x21, 0x23, 0x09, + 0x01, 0x23, 0x09, 0x01, 0x33, 0x09, 0x01, 0x33, 0x01, 0x04, 0x96, 0xc1, + 0xfe, 0x77, 0xfe, 0x70, 0xb4, 0x01, 0xe6, 0xfe, 0x3b, 0xbc, 0x01, 0x6b, + 0x01, 0x6e, 0xb5, 0xfe, 0x3b, 0x02, 0x83, 0xfd, 0x7d, 0x02, 0xfc, 0x02, + 0xba, 0xfd, 0xbd, 0x02, 0x43, 0xfd, 0x4c, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x7b, 0x05, 0xb6, 0x00, 0x08, 0x00, 0x20, 0x40, 0x0f, + 0x04, 0x05, 0x02, 0x05, 0x07, 0x03, 0x09, 0x0a, 0x00, 0x05, 0x01, 0x07, + 0x03, 0x05, 0x12, 0x00, 0x3f, 0x3f, 0x33, 0x12, 0x39, 0x11, 0x12, 0x01, + 0x17, 0x39, 0x11, 0x33, 0x31, 0x30, 0x09, 0x01, 0x33, 0x01, 0x11, 0x23, + 0x11, 0x01, 0x33, 0x02, 0x3d, 0x01, 0x86, 0xb8, 0xfe, 0x18, 0xac, 0xfe, + 0x19, 0xba, 0x02, 0xdb, 0x02, 0xdb, 0xfc, 0x81, 0xfd, 0xc9, 0x02, 0x2f, + 0x03, 0x87, 0x00, 0x00, 0x00, 0x01, 0x00, 0x52, 0x00, 0x00, 0x04, 0x3f, + 0x05, 0xb6, 0x00, 0x09, 0x00, 0x2b, 0x40, 0x17, 0x08, 0x01, 0x03, 0x07, + 0x00, 0x07, 0x04, 0x01, 0x04, 0x0a, 0x0b, 0x05, 0x04, 0x49, 0x59, 0x05, + 0x03, 0x01, 0x08, 0x49, 0x59, 0x01, 0x12, 0x00, 0x3f, 0x2b, 0x00, 0x18, + 0x3f, 0x2b, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, + 0x30, 0x29, 0x01, 0x35, 0x01, 0x21, 0x35, 0x21, 0x15, 0x01, 0x21, 0x04, + 0x3f, 0xfc, 0x13, 0x03, 0x08, 0xfd, 0x10, 0x03, 0xbf, 0xfc, 0xf8, 0x03, + 0x1e, 0x85, 0x04, 0x98, 0x99, 0x85, 0xfb, 0x69, 0x00, 0x01, 0x00, 0xa6, + 0xfe, 0xbc, 0x02, 0x6f, 0x05, 0xb6, 0x00, 0x07, 0x00, 0x20, 0x40, 0x0e, + 0x06, 0x01, 0x04, 0x00, 0x01, 0x00, 0x08, 0x09, 0x05, 0x02, 0x03, 0x06, + 0x01, 0x27, 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x11, 0x12, 0x01, 0x39, 0x39, + 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x21, 0x11, 0x21, 0x15, 0x21, + 0x11, 0x21, 0x02, 0x6f, 0xfe, 0x37, 0x01, 0xc9, 0xfe, 0xdf, 0x01, 0x21, + 0xfe, 0xbc, 0x06, 0xfa, 0x8d, 0xfa, 0x21, 0x00, 0x00, 0x01, 0x00, 0x17, + 0x00, 0x00, 0x02, 0xdd, 0x05, 0xb6, 0x00, 0x03, 0x00, 0x13, 0xb7, 0x03, + 0x01, 0x04, 0x05, 0x03, 0x03, 0x02, 0x12, 0x00, 0x3f, 0x3f, 0x11, 0x12, + 0x01, 0x39, 0x39, 0x31, 0x30, 0x13, 0x01, 0x23, 0x01, 0xba, 0x02, 0x23, + 0xa6, 0xfd, 0xe0, 0x05, 0xb6, 0xfa, 0x4a, 0x05, 0xb6, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x33, 0xfe, 0xbc, 0x01, 0xfc, 0x05, 0xb6, 0x00, 0x07, + 0x00, 0x20, 0x40, 0x0e, 0x03, 0x00, 0x01, 0x06, 0x00, 0x06, 0x08, 0x09, + 0x00, 0x07, 0x27, 0x03, 0x04, 0x03, 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x11, + 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x17, 0x21, + 0x11, 0x21, 0x35, 0x21, 0x11, 0x21, 0x33, 0x01, 0x21, 0xfe, 0xdf, 0x01, + 0xc9, 0xfe, 0x37, 0xb6, 0x05, 0xdf, 0x8d, 0xf9, 0x06, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x31, 0x02, 0x27, 0x04, 0x23, 0x05, 0xc1, 0x00, 0x06, + 0x00, 0x18, 0x40, 0x09, 0x00, 0x03, 0x07, 0x08, 0x05, 0x02, 0x00, 0x04, + 0x02, 0x00, 0x2f, 0x2f, 0x33, 0x12, 0x39, 0x11, 0x12, 0x01, 0x39, 0x39, + 0x31, 0x30, 0x13, 0x01, 0x33, 0x01, 0x23, 0x09, 0x01, 0x31, 0x01, 0xb2, + 0x63, 0x01, 0xdd, 0x98, 0xfe, 0x8c, 0xfe, 0xb2, 0x02, 0x27, 0x03, 0x9a, + 0xfc, 0x66, 0x02, 0xe9, 0xfd, 0x17, 0x00, 0x00, 0x00, 0x01, 0xff, 0xfc, + 0xfe, 0xc5, 0x03, 0x9a, 0xff, 0x48, 0x00, 0x03, 0x00, 0x11, 0xb5, 0x00, + 0x05, 0x01, 0x04, 0x01, 0x02, 0x00, 0x2f, 0x33, 0x11, 0x01, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x01, 0x21, 0x35, 0x21, 0x03, 0x9a, 0xfc, 0x62, 0x03, + 0x9e, 0xfe, 0xc5, 0x83, 0x00, 0x01, 0x01, 0x89, 0x04, 0xd9, 0x03, 0x12, + 0x06, 0x21, 0x00, 0x09, 0x00, 0x13, 0xb6, 0x00, 0x04, 0x0b, 0x0a, 0x06, + 0x80, 0x01, 0x00, 0x2f, 0x1a, 0xcd, 0x11, 0x12, 0x01, 0x39, 0x39, 0x31, + 0x30, 0x01, 0x23, 0x2e, 0x01, 0x27, 0x35, 0x33, 0x1e, 0x01, 0x17, 0x03, + 0x12, 0x6e, 0x41, 0xb2, 0x28, 0xcb, 0x20, 0x72, 0x2c, 0x04, 0xd9, 0x34, + 0xc0, 0x3f, 0x15, 0x45, 0xb5, 0x35, 0x00, 0x00, 0x00, 0x02, 0x00, 0x5e, + 0xff, 0xec, 0x03, 0xcd, 0x04, 0x5a, 0x00, 0x19, 0x00, 0x24, 0x00, 0x47, + 0x40, 0x25, 0x22, 0x08, 0x0b, 0x1e, 0x1e, 0x19, 0x19, 0x12, 0x08, 0x03, + 0x25, 0x26, 0x01, 0x02, 0x0b, 0x1e, 0x47, 0x59, 0x02, 0x0b, 0x0b, 0x00, + 0x15, 0x15, 0x0f, 0x46, 0x59, 0x15, 0x10, 0x05, 0x1a, 0x46, 0x59, 0x05, + 0x16, 0x00, 0x15, 0x00, 0x3f, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, + 0x12, 0x00, 0x39, 0x18, 0x2f, 0x39, 0x2b, 0x11, 0x00, 0x33, 0x11, 0x12, + 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x21, + 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x10, 0x25, 0x37, 0x35, + 0x34, 0x26, 0x23, 0x22, 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, + 0x11, 0x25, 0x32, 0x36, 0x3d, 0x01, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x16, + 0x03, 0x52, 0x21, 0x08, 0x52, 0xa3, 0x7a, 0xa3, 0xb9, 0x02, 0x13, 0xba, + 0x6f, 0x7a, 0x89, 0xad, 0x33, 0x51, 0xc1, 0x61, 0xc4, 0xbd, 0xfe, 0x0e, + 0x9b, 0xb1, 0xa6, 0xc6, 0xaf, 0x6d, 0x9c, 0x67, 0x49, 0xa8, 0x9b, 0x01, + 0x4c, 0x10, 0x06, 0x44, 0x81, 0x7b, 0x54, 0x7f, 0x2c, 0x32, 0xae, 0xc0, + 0xfd, 0x14, 0x75, 0xaa, 0x99, 0x63, 0x07, 0x07, 0x6d, 0x73, 0x5a, 0x5e, + 0x00, 0x02, 0x00, 0xb0, 0xff, 0xec, 0x04, 0x75, 0x06, 0x14, 0x00, 0x13, + 0x00, 0x1f, 0x00, 0x44, 0x40, 0x22, 0x0a, 0x17, 0x17, 0x0f, 0x0f, 0x0c, + 0x1d, 0x03, 0x0c, 0x03, 0x20, 0x21, 0x0d, 0x00, 0x0c, 0x15, 0x12, 0x11, + 0x0a, 0x11, 0x06, 0x00, 0x06, 0x1a, 0x46, 0x59, 0x06, 0x16, 0x00, 0x14, + 0x46, 0x59, 0x00, 0x10, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, + 0x12, 0x00, 0x39, 0x39, 0x11, 0x33, 0x18, 0x3f, 0x3f, 0x11, 0x12, 0x01, + 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, + 0x01, 0x32, 0x12, 0x11, 0x10, 0x02, 0x23, 0x22, 0x26, 0x27, 0x23, 0x07, + 0x23, 0x11, 0x33, 0x11, 0x14, 0x07, 0x33, 0x36, 0x17, 0x22, 0x06, 0x15, + 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x02, 0xae, 0xd8, 0xef, + 0xf1, 0xd6, 0x6b, 0xb1, 0x3c, 0x0c, 0x23, 0x77, 0xa6, 0x08, 0x08, 0x74, + 0xcc, 0xaa, 0x96, 0x9a, 0xaa, 0x99, 0x96, 0x96, 0x04, 0x5a, 0xfe, 0xd9, + 0xfe, 0xf2, 0xfe, 0xf2, 0xfe, 0xd5, 0x4f, 0x52, 0x8d, 0x06, 0x14, 0xfe, + 0x86, 0x7f, 0x65, 0xa4, 0x8b, 0xc3, 0xe7, 0xe7, 0xc7, 0xdf, 0xd1, 0xd6, + 0xd2, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x73, 0xff, 0xec, 0x03, 0x8b, + 0x04, 0x5c, 0x00, 0x16, 0x00, 0x26, 0x40, 0x14, 0x0f, 0x03, 0x03, 0x15, + 0x09, 0x03, 0x18, 0x17, 0x06, 0x0d, 0x46, 0x59, 0x06, 0x10, 0x00, 0x12, + 0x46, 0x59, 0x00, 0x16, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, + 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x31, 0x30, 0x05, 0x22, 0x00, 0x11, + 0x10, 0x00, 0x33, 0x32, 0x16, 0x17, 0x07, 0x2e, 0x01, 0x23, 0x20, 0x11, + 0x14, 0x16, 0x33, 0x32, 0x37, 0x15, 0x06, 0x02, 0x66, 0xee, 0xfe, 0xfb, + 0x01, 0x09, 0xf5, 0x4f, 0x9e, 0x2d, 0x33, 0x37, 0x82, 0x32, 0xfe, 0xb2, + 0xa3, 0xa0, 0x89, 0x90, 0x6e, 0x14, 0x01, 0x25, 0x01, 0x0c, 0x01, 0x13, + 0x01, 0x2c, 0x22, 0x17, 0x8d, 0x16, 0x1d, 0xfe, 0x56, 0xca, 0xd8, 0x3b, + 0x93, 0x39, 0x00, 0x00, 0x00, 0x02, 0x00, 0x73, 0xff, 0xec, 0x04, 0x37, + 0x06, 0x14, 0x00, 0x12, 0x00, 0x1f, 0x00, 0x42, 0x40, 0x21, 0x1d, 0x06, + 0x17, 0x00, 0x0e, 0x0e, 0x11, 0x06, 0x11, 0x20, 0x21, 0x12, 0x15, 0x0f, + 0x00, 0x00, 0x01, 0x01, 0x0c, 0x03, 0x09, 0x09, 0x1a, 0x46, 0x59, 0x09, + 0x10, 0x03, 0x13, 0x46, 0x59, 0x03, 0x16, 0x00, 0x3f, 0x2b, 0x00, 0x18, + 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x39, 0x11, 0x33, 0x18, 0x3f, 0x3f, + 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x33, 0x11, 0x33, + 0x31, 0x30, 0x25, 0x23, 0x06, 0x23, 0x22, 0x02, 0x11, 0x10, 0x12, 0x33, + 0x32, 0x17, 0x33, 0x2f, 0x01, 0x11, 0x33, 0x11, 0x23, 0x25, 0x32, 0x36, + 0x3d, 0x01, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x03, 0x9a, + 0x09, 0x73, 0xe5, 0xd7, 0xef, 0xf0, 0xd6, 0xdf, 0x77, 0x0d, 0x07, 0x04, + 0xa6, 0x87, 0xfe, 0x9e, 0xaa, 0x99, 0x9b, 0xaa, 0x92, 0x9b, 0x9a, 0x93, + 0xa7, 0x01, 0x26, 0x01, 0x0f, 0x01, 0x0f, 0x01, 0x2c, 0xa2, 0x4f, 0x4d, + 0x01, 0xbe, 0xf9, 0xec, 0x77, 0xb9, 0xce, 0x23, 0xe9, 0xc7, 0xe3, 0xcf, + 0xd2, 0xd6, 0x00, 0x00, 0x00, 0x02, 0x00, 0x73, 0xff, 0xec, 0x04, 0x12, + 0x04, 0x5c, 0x00, 0x13, 0x00, 0x1a, 0x00, 0x3b, 0x40, 0x1f, 0x18, 0x0a, + 0x17, 0x0b, 0x03, 0x03, 0x11, 0x0a, 0x03, 0x1c, 0x1b, 0x17, 0x0b, 0x46, + 0x59, 0x17, 0x17, 0x00, 0x06, 0x06, 0x14, 0x46, 0x59, 0x06, 0x10, 0x00, + 0x0e, 0x46, 0x59, 0x00, 0x16, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, + 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x2b, 0x11, 0x12, 0x01, 0x17, 0x39, + 0x11, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, 0x05, 0x22, 0x00, 0x11, 0x10, + 0x00, 0x33, 0x32, 0x12, 0x1d, 0x01, 0x21, 0x1e, 0x01, 0x33, 0x32, 0x37, + 0x15, 0x0e, 0x01, 0x03, 0x22, 0x06, 0x07, 0x21, 0x34, 0x26, 0x02, 0x7f, + 0xf3, 0xfe, 0xe7, 0x01, 0x05, 0xdc, 0xce, 0xf0, 0xfd, 0x0d, 0x05, 0xb9, + 0xa8, 0xb1, 0xad, 0x58, 0x9d, 0x9c, 0x84, 0x9d, 0x0e, 0x02, 0x3d, 0x8c, + 0x14, 0x01, 0x28, 0x01, 0x07, 0x01, 0x09, 0x01, 0x38, 0xfe, 0xf1, 0xde, + 0x69, 0xc1, 0xc8, 0x4a, 0x94, 0x26, 0x21, 0x03, 0xe5, 0xac, 0x98, 0x9d, + 0xa7, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x1d, 0x00, 0x00, 0x03, 0x0e, + 0x06, 0x1f, 0x00, 0x14, 0x00, 0x39, 0x40, 0x1d, 0x14, 0x0c, 0x0c, 0x13, + 0x02, 0x02, 0x07, 0x03, 0x05, 0x03, 0x15, 0x16, 0x0a, 0x0f, 0x46, 0x59, + 0x0a, 0x00, 0x01, 0x05, 0x07, 0x05, 0x46, 0x59, 0x13, 0x07, 0x0f, 0x03, + 0x15, 0x00, 0x3f, 0x3f, 0x33, 0x2b, 0x11, 0x00, 0x33, 0x18, 0x3f, 0x2b, + 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x33, 0x12, + 0x39, 0x31, 0x30, 0x01, 0x21, 0x11, 0x23, 0x11, 0x23, 0x35, 0x37, 0x35, + 0x10, 0x21, 0x32, 0x17, 0x07, 0x26, 0x23, 0x22, 0x06, 0x1d, 0x01, 0x21, + 0x02, 0x9e, 0xfe, 0xe9, 0xa6, 0xc4, 0xc4, 0x01, 0x61, 0x57, 0x75, 0x2b, + 0x60, 0x44, 0x5e, 0x5a, 0x01, 0x17, 0x03, 0xc7, 0xfc, 0x39, 0x03, 0xc7, + 0x4b, 0x3c, 0x3d, 0x01, 0x94, 0x23, 0x85, 0x1f, 0x7d, 0x8a, 0x47, 0x00, + 0x00, 0x03, 0x00, 0x27, 0xfe, 0x14, 0x04, 0x31, 0x04, 0x5c, 0x00, 0x2a, + 0x00, 0x37, 0x00, 0x41, 0x00, 0x6e, 0x40, 0x3e, 0x2b, 0x19, 0x38, 0x25, + 0x0c, 0x1f, 0x3d, 0x05, 0x31, 0x13, 0x01, 0x13, 0x05, 0x02, 0x2a, 0x22, + 0x1c, 0x1f, 0x25, 0x19, 0x0a, 0x42, 0x43, 0x1c, 0x0f, 0x35, 0x0f, 0x35, + 0x46, 0x59, 0x08, 0x3b, 0x47, 0x59, 0x0a, 0x22, 0x08, 0x2a, 0x0f, 0x08, + 0x0f, 0x08, 0x16, 0x2a, 0x2a, 0x02, 0x47, 0x59, 0x2a, 0x0f, 0x28, 0x3f, + 0x47, 0x59, 0x28, 0x10, 0x16, 0x2e, 0x47, 0x59, 0x16, 0x1b, 0x00, 0x3f, + 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, + 0x39, 0x39, 0x18, 0x2f, 0x2f, 0x11, 0x12, 0x39, 0x39, 0x2b, 0x2b, 0x11, + 0x12, 0x00, 0x39, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x15, 0x07, 0x1e, + 0x01, 0x15, 0x14, 0x06, 0x23, 0x22, 0x27, 0x06, 0x15, 0x14, 0x16, 0x3b, + 0x01, 0x32, 0x16, 0x15, 0x14, 0x04, 0x21, 0x22, 0x26, 0x35, 0x34, 0x36, + 0x37, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x36, + 0x33, 0x32, 0x17, 0x01, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, + 0x2b, 0x01, 0x22, 0x06, 0x13, 0x14, 0x16, 0x33, 0x32, 0x35, 0x34, 0x23, + 0x22, 0x06, 0x04, 0x31, 0xcb, 0x1c, 0x2c, 0xdc, 0xc0, 0x31, 0x2b, 0x6a, + 0x4a, 0x5a, 0xc2, 0xb2, 0xbf, 0xfe, 0xdc, 0xfe, 0xe8, 0xd7, 0xe9, 0x80, + 0x74, 0x2a, 0x39, 0x40, 0x45, 0x55, 0x6b, 0xd8, 0xc6, 0x56, 0x45, 0xfe, + 0x11, 0x96, 0x8c, 0xd1, 0xc9, 0x6e, 0x98, 0xc7, 0x71, 0x7e, 0x5a, 0x82, + 0x74, 0xf3, 0xf6, 0x75, 0x7e, 0x04, 0x48, 0x69, 0x18, 0x23, 0x71, 0x47, + 0xa1, 0xc0, 0x08, 0x38, 0x55, 0x2d, 0x2b, 0x96, 0x8f, 0xb6, 0xbf, 0xa0, + 0x92, 0x64, 0x92, 0x1a, 0x13, 0x50, 0x35, 0x3c, 0x5a, 0x2a, 0x23, 0xa8, + 0x6c, 0xb4, 0xc3, 0x14, 0xfb, 0x00, 0x59, 0x5c, 0x7d, 0x6b, 0x59, 0x45, + 0x6c, 0x03, 0x3c, 0x73, 0x76, 0xec, 0xf7, 0x7e, 0x00, 0x01, 0x00, 0xb0, + 0x00, 0x00, 0x04, 0x44, 0x06, 0x14, 0x00, 0x16, 0x00, 0x33, 0x40, 0x19, + 0x0e, 0x0c, 0x08, 0x08, 0x09, 0x00, 0x16, 0x09, 0x16, 0x17, 0x18, 0x0e, + 0x09, 0x12, 0x12, 0x04, 0x46, 0x59, 0x12, 0x10, 0x0a, 0x00, 0x00, 0x09, + 0x15, 0x00, 0x3f, 0x33, 0x3f, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x11, + 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x33, 0x31, + 0x30, 0x21, 0x11, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x11, 0x23, 0x11, + 0x33, 0x11, 0x14, 0x07, 0x33, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x11, + 0x03, 0x9e, 0x7a, 0x82, 0xad, 0x9f, 0xa6, 0xa6, 0x08, 0x0a, 0x31, 0xb5, + 0x74, 0xc9, 0xc9, 0x02, 0xc5, 0x86, 0x84, 0xbc, 0xd6, 0xfd, 0xc3, 0x06, + 0x14, 0xfe, 0x29, 0x55, 0x38, 0x4f, 0x5b, 0xbf, 0xd0, 0xfd, 0x35, 0x00, + 0x00, 0x02, 0x00, 0xa2, 0x00, 0x00, 0x01, 0x66, 0x05, 0xdf, 0x00, 0x03, + 0x00, 0x0f, 0x00, 0x23, 0x40, 0x11, 0x0a, 0x00, 0x00, 0x04, 0x01, 0x01, + 0x10, 0x11, 0x0d, 0x07, 0x48, 0x59, 0x0d, 0x02, 0x0f, 0x01, 0x15, 0x00, + 0x3f, 0x3f, 0xce, 0x2b, 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x21, 0x23, 0x11, 0x33, 0x03, 0x34, 0x36, 0x33, 0x32, + 0x16, 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, 0x01, 0x56, 0xa6, 0xa6, 0xb4, + 0x38, 0x2a, 0x28, 0x3a, 0x3a, 0x28, 0x2a, 0x38, 0x04, 0x48, 0x01, 0x29, + 0x39, 0x35, 0x36, 0x38, 0x38, 0x37, 0x37, 0x00, 0x00, 0x02, 0xff, 0x91, + 0xfe, 0x14, 0x01, 0x66, 0x05, 0xdf, 0x00, 0x0c, 0x00, 0x18, 0x00, 0x2c, + 0x40, 0x16, 0x13, 0x0b, 0x0b, 0x0d, 0x08, 0x08, 0x19, 0x1a, 0x16, 0x10, + 0x48, 0x59, 0x16, 0x40, 0x09, 0x0f, 0x00, 0x05, 0x46, 0x59, 0x00, 0x1b, + 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x1a, 0xce, 0x2b, 0x11, 0x12, 0x01, + 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, 0x22, 0x27, 0x35, + 0x16, 0x33, 0x32, 0x36, 0x35, 0x11, 0x33, 0x11, 0x10, 0x03, 0x34, 0x36, + 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, 0x2b, 0x5f, 0x3b, + 0x45, 0x43, 0x4e, 0x49, 0xa6, 0xb4, 0x38, 0x2a, 0x28, 0x3a, 0x3a, 0x28, + 0x2a, 0x38, 0xfe, 0x14, 0x19, 0x87, 0x14, 0x55, 0x57, 0x04, 0xfc, 0xfb, + 0x10, 0xfe, 0xbc, 0x07, 0x5d, 0x39, 0x35, 0x36, 0x38, 0x38, 0x37, 0x37, + 0x00, 0x01, 0x00, 0xb0, 0x00, 0x00, 0x04, 0x1d, 0x06, 0x14, 0x00, 0x10, + 0x00, 0x36, 0x40, 0x1b, 0x10, 0x0e, 0x0a, 0x0a, 0x0b, 0x0b, 0x08, 0x06, + 0x04, 0x05, 0x08, 0x04, 0x11, 0x12, 0x0c, 0x00, 0x00, 0x10, 0x10, 0x08, + 0x08, 0x03, 0x07, 0x0b, 0x15, 0x03, 0x0f, 0x00, 0x3f, 0x3f, 0x33, 0x12, + 0x39, 0x2f, 0x39, 0x11, 0x33, 0x3f, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, + 0x39, 0x11, 0x33, 0x11, 0x33, 0x33, 0x31, 0x30, 0x01, 0x36, 0x37, 0x01, + 0x33, 0x09, 0x01, 0x23, 0x01, 0x07, 0x11, 0x23, 0x11, 0x33, 0x11, 0x14, + 0x07, 0x01, 0x54, 0x2b, 0x58, 0x01, 0x62, 0xc5, 0xfe, 0x44, 0x01, 0xdb, + 0xc9, 0xfe, 0x7d, 0x7d, 0xa4, 0xa4, 0x08, 0x02, 0x31, 0x3d, 0x63, 0x01, + 0x77, 0xfe, 0x2d, 0xfd, 0x8b, 0x02, 0x06, 0x6c, 0xfe, 0x66, 0x06, 0x14, + 0xfc, 0xc7, 0x37, 0x73, 0x00, 0x01, 0x00, 0xb0, 0x00, 0x00, 0x01, 0x56, + 0x06, 0x14, 0x00, 0x03, 0x00, 0x16, 0x40, 0x09, 0x00, 0x01, 0x01, 0x04, + 0x05, 0x02, 0x00, 0x01, 0x15, 0x00, 0x3f, 0x3f, 0x11, 0x12, 0x01, 0x39, + 0x11, 0x33, 0x31, 0x30, 0x21, 0x23, 0x11, 0x33, 0x01, 0x56, 0xa6, 0xa6, + 0x06, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0xb0, 0x00, 0x00, 0x06, 0xcb, + 0x04, 0x5c, 0x00, 0x23, 0x00, 0x46, 0x40, 0x23, 0x15, 0x11, 0x11, 0x12, + 0x08, 0x09, 0x00, 0x23, 0x09, 0x12, 0x23, 0x03, 0x24, 0x25, 0x1c, 0x16, + 0x15, 0x15, 0x12, 0x19, 0x04, 0x0d, 0x19, 0x0d, 0x46, 0x59, 0x1f, 0x19, + 0x10, 0x13, 0x0f, 0x09, 0x00, 0x12, 0x15, 0x00, 0x3f, 0x33, 0x33, 0x3f, + 0x3f, 0x33, 0x2b, 0x11, 0x00, 0x33, 0x11, 0x12, 0x39, 0x18, 0x2f, 0x33, + 0x33, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x21, 0x11, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, + 0x11, 0x23, 0x11, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x11, 0x23, 0x11, + 0x33, 0x17, 0x33, 0x3e, 0x01, 0x33, 0x20, 0x17, 0x33, 0x3e, 0x01, 0x33, + 0x32, 0x16, 0x15, 0x11, 0x06, 0x25, 0x70, 0x76, 0x9b, 0x94, 0xa6, 0x70, + 0x77, 0x9c, 0x91, 0xa6, 0x87, 0x1b, 0x08, 0x2f, 0xab, 0x6a, 0x01, 0x01, + 0x4f, 0x08, 0x31, 0xba, 0x77, 0xba, 0xb9, 0x02, 0xc9, 0x83, 0x83, 0xb2, + 0xb9, 0xfd, 0x9c, 0x02, 0xc9, 0x83, 0x83, 0xbb, 0xd5, 0xfd, 0xc1, 0x04, + 0x48, 0x96, 0x50, 0x5a, 0xba, 0x56, 0x64, 0xbf, 0xd2, 0xfd, 0x35, 0x00, + 0x00, 0x01, 0x00, 0xb0, 0x00, 0x00, 0x04, 0x44, 0x04, 0x5c, 0x00, 0x14, + 0x00, 0x31, 0x40, 0x18, 0x00, 0x14, 0x0c, 0x08, 0x08, 0x09, 0x14, 0x09, + 0x16, 0x15, 0x0c, 0x09, 0x10, 0x10, 0x04, 0x46, 0x59, 0x10, 0x10, 0x0a, + 0x0f, 0x00, 0x09, 0x15, 0x00, 0x3f, 0x33, 0x3f, 0x3f, 0x2b, 0x11, 0x12, + 0x00, 0x39, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x21, 0x11, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x11, + 0x23, 0x11, 0x33, 0x17, 0x33, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x15, 0x11, + 0x03, 0x9e, 0x7a, 0x82, 0xac, 0xa0, 0xa6, 0x87, 0x1b, 0x08, 0x33, 0xb8, + 0x71, 0xc6, 0xc8, 0x02, 0xc5, 0x86, 0x84, 0xba, 0xd6, 0xfd, 0xc1, 0x04, + 0x48, 0x96, 0x51, 0x59, 0xbf, 0xd2, 0xfd, 0x35, 0x00, 0x02, 0x00, 0x73, + 0xff, 0xec, 0x04, 0x62, 0x04, 0x5c, 0x00, 0x0c, 0x00, 0x18, 0x00, 0x28, + 0x40, 0x14, 0x13, 0x00, 0x0d, 0x07, 0x00, 0x07, 0x1a, 0x19, 0x0a, 0x16, + 0x46, 0x59, 0x0a, 0x10, 0x03, 0x10, 0x46, 0x59, 0x03, 0x16, 0x00, 0x3f, + 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x01, 0x10, 0x00, 0x23, 0x22, 0x26, 0x02, 0x35, + 0x10, 0x00, 0x33, 0x32, 0x00, 0x01, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, + 0x34, 0x26, 0x23, 0x22, 0x06, 0x04, 0x62, 0xfe, 0xf2, 0xee, 0x93, 0xe4, + 0x7c, 0x01, 0x0c, 0xee, 0xe6, 0x01, 0x0f, 0xfc, 0xbd, 0xa8, 0xa3, 0xa3, + 0xa9, 0xa9, 0xa5, 0xa3, 0xa6, 0x02, 0x25, 0xfe, 0xf4, 0xfe, 0xd3, 0x8a, + 0x01, 0x02, 0xad, 0x01, 0x0c, 0x01, 0x2b, 0xfe, 0xce, 0xfe, 0xfb, 0xd2, + 0xdc, 0xdb, 0xd3, 0xd1, 0xd9, 0xd6, 0x00, 0x00, 0x00, 0x02, 0x00, 0xb0, + 0xfe, 0x14, 0x04, 0x75, 0x04, 0x5c, 0x00, 0x14, 0x00, 0x21, 0x00, 0x3f, + 0x40, 0x20, 0x19, 0x0b, 0x04, 0x07, 0x07, 0x08, 0x1f, 0x12, 0x08, 0x12, + 0x22, 0x23, 0x04, 0x0b, 0x00, 0x0f, 0x0f, 0x15, 0x46, 0x59, 0x0f, 0x10, + 0x09, 0x0f, 0x08, 0x1b, 0x00, 0x1c, 0x46, 0x59, 0x00, 0x16, 0x00, 0x3f, + 0x2b, 0x00, 0x18, 0x3f, 0x3f, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x39, + 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x33, + 0x33, 0x31, 0x30, 0x05, 0x22, 0x26, 0x27, 0x23, 0x16, 0x15, 0x11, 0x23, + 0x11, 0x33, 0x17, 0x33, 0x3e, 0x01, 0x33, 0x32, 0x12, 0x11, 0x10, 0x02, + 0x03, 0x22, 0x06, 0x07, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, + 0x26, 0x02, 0xae, 0x6b, 0xb1, 0x3c, 0x0c, 0x0c, 0xa6, 0x87, 0x17, 0x08, + 0x40, 0xaa, 0x6e, 0xda, 0xed, 0xf1, 0xee, 0xa8, 0x96, 0x02, 0x9a, 0xaa, + 0x8e, 0xa1, 0xa1, 0x14, 0x4f, 0x52, 0x60, 0x56, 0xfe, 0x3d, 0x06, 0x34, + 0x96, 0x5a, 0x50, 0xfe, 0xd6, 0xfe, 0xf3, 0xfe, 0xf2, 0xfe, 0xd5, 0x03, + 0xe3, 0xba, 0xcb, 0x25, 0xe7, 0xc7, 0xe6, 0xca, 0xcd, 0xdb, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x73, 0xfe, 0x14, 0x04, 0x37, 0x04, 0x5c, 0x00, 0x0c, + 0x00, 0x1f, 0x00, 0x44, 0x40, 0x22, 0x0a, 0x10, 0x1d, 0x16, 0x03, 0x1a, + 0x1a, 0x19, 0x10, 0x19, 0x20, 0x21, 0x1a, 0x1b, 0x17, 0x0f, 0x1d, 0x1e, + 0x1e, 0x16, 0x0d, 0x13, 0x13, 0x07, 0x46, 0x59, 0x13, 0x10, 0x0d, 0x00, + 0x46, 0x59, 0x0d, 0x16, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, + 0x12, 0x00, 0x39, 0x39, 0x11, 0x33, 0x18, 0x3f, 0x3f, 0x11, 0x12, 0x01, + 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, + 0x25, 0x32, 0x36, 0x37, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, + 0x16, 0x17, 0x22, 0x02, 0x11, 0x10, 0x12, 0x33, 0x32, 0x17, 0x33, 0x37, + 0x33, 0x11, 0x23, 0x11, 0x34, 0x37, 0x23, 0x06, 0x02, 0x4e, 0xa6, 0x98, + 0x05, 0x9c, 0xa9, 0x92, 0x9b, 0x99, 0x7d, 0xd4, 0xee, 0xf0, 0xd6, 0xe1, + 0x79, 0x09, 0x18, 0x83, 0xa6, 0x0b, 0x0d, 0x73, 0x77, 0xb2, 0xd3, 0x25, + 0xe6, 0xca, 0xe3, 0xcf, 0xcf, 0xd9, 0x8b, 0x01, 0x2a, 0x01, 0x0b, 0x01, + 0x0d, 0x01, 0x2e, 0xaa, 0x96, 0xf9, 0xcc, 0x01, 0xd5, 0x64, 0x46, 0xa7, + 0x00, 0x01, 0x00, 0xb0, 0x00, 0x00, 0x03, 0x27, 0x04, 0x5c, 0x00, 0x10, + 0x00, 0x2a, 0x40, 0x14, 0x0d, 0x09, 0x09, 0x0a, 0x0a, 0x02, 0x11, 0x12, + 0x0b, 0x0f, 0x0d, 0x00, 0x0a, 0x15, 0x00, 0x05, 0x46, 0x59, 0x00, 0x10, + 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x12, 0x39, 0x3f, 0x11, 0x12, 0x01, + 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x32, 0x17, 0x07, + 0x26, 0x23, 0x22, 0x06, 0x15, 0x11, 0x23, 0x11, 0x33, 0x17, 0x33, 0x3e, + 0x01, 0x02, 0xa4, 0x49, 0x3a, 0x17, 0x44, 0x34, 0x85, 0xbd, 0xa6, 0x89, + 0x13, 0x08, 0x3d, 0xac, 0x04, 0x5c, 0x0c, 0x9a, 0x0f, 0xd8, 0xa1, 0xfd, + 0xb4, 0x04, 0x48, 0xcb, 0x6b, 0x74, 0x00, 0x00, 0x00, 0x01, 0x00, 0x6a, + 0xff, 0xec, 0x03, 0x73, 0x04, 0x5c, 0x00, 0x24, 0x00, 0x36, 0x40, 0x1c, + 0x1e, 0x13, 0x0c, 0x00, 0x00, 0x18, 0x05, 0x13, 0x04, 0x25, 0x26, 0x0c, + 0x1e, 0x03, 0x16, 0x16, 0x1b, 0x46, 0x59, 0x16, 0x10, 0x06, 0x03, 0x09, + 0x46, 0x59, 0x03, 0x16, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x2f, 0x3f, 0x2b, + 0x11, 0x12, 0x00, 0x39, 0x39, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, + 0x11, 0x33, 0x31, 0x30, 0x01, 0x14, 0x06, 0x23, 0x22, 0x27, 0x35, 0x1e, + 0x01, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x27, 0x2e, 0x02, 0x35, 0x34, + 0x36, 0x33, 0x32, 0x17, 0x07, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x1e, + 0x01, 0x17, 0x1e, 0x01, 0x03, 0x73, 0xe4, 0xce, 0xda, 0x7a, 0x4f, 0xb5, + 0x54, 0x82, 0x8c, 0x6f, 0xa1, 0x99, 0x81, 0x3f, 0xda, 0xbe, 0xb1, 0xa9, + 0x3b, 0xa5, 0x86, 0x76, 0x78, 0x2d, 0x64, 0x8e, 0xc3, 0x89, 0x01, 0x2b, + 0x99, 0xa6, 0x45, 0x9a, 0x28, 0x2e, 0x53, 0x55, 0x40, 0x5b, 0x3e, 0x39, + 0x55, 0x6c, 0x4b, 0x86, 0x9b, 0x48, 0x87, 0x44, 0x4a, 0x41, 0x2c, 0x3e, + 0x38, 0x35, 0x47, 0x90, 0x00, 0x01, 0x00, 0x1f, 0xff, 0xec, 0x02, 0xa8, + 0x05, 0x46, 0x00, 0x16, 0x00, 0x34, 0x40, 0x1b, 0x10, 0x14, 0x14, 0x09, + 0x0b, 0x09, 0x12, 0x03, 0x04, 0x18, 0x17, 0x0a, 0x13, 0x10, 0x13, 0x47, + 0x59, 0x0e, 0x40, 0x10, 0x0f, 0x07, 0x00, 0x46, 0x59, 0x07, 0x16, 0x00, + 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x1a, 0xcd, 0x2b, 0x11, 0x00, 0x33, 0x11, + 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x25, 0x32, + 0x36, 0x37, 0x15, 0x0e, 0x01, 0x23, 0x20, 0x19, 0x01, 0x23, 0x35, 0x3f, + 0x01, 0x33, 0x15, 0x21, 0x15, 0x21, 0x11, 0x14, 0x16, 0x02, 0x12, 0x2c, + 0x52, 0x18, 0x1b, 0x69, 0x2a, 0xfe, 0xc2, 0x9d, 0x9d, 0x46, 0x60, 0x01, + 0x3e, 0xfe, 0xc2, 0x5e, 0x75, 0x0d, 0x07, 0x7f, 0x0d, 0x11, 0x01, 0x4f, + 0x02, 0x8c, 0x50, 0x45, 0xea, 0xfe, 0x81, 0xfd, 0x7b, 0x63, 0x6a, 0x00, + 0x00, 0x01, 0x00, 0xa4, 0xff, 0xec, 0x04, 0x39, 0x04, 0x48, 0x00, 0x14, + 0x00, 0x34, 0x40, 0x19, 0x01, 0x13, 0x07, 0x0c, 0x0c, 0x0a, 0x13, 0x0a, + 0x15, 0x16, 0x0c, 0x0d, 0x0d, 0x10, 0x08, 0x14, 0x0f, 0x10, 0x04, 0x46, + 0x59, 0x10, 0x16, 0x0b, 0x15, 0x00, 0x3f, 0x3f, 0x2b, 0x00, 0x18, 0x3f, + 0x33, 0x12, 0x39, 0x11, 0x33, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x11, 0x14, 0x16, 0x33, 0x32, + 0x36, 0x35, 0x11, 0x33, 0x11, 0x23, 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, + 0x26, 0x35, 0x11, 0x01, 0x4c, 0x7a, 0x82, 0xac, 0x9f, 0xa6, 0x89, 0x18, + 0x09, 0x33, 0xb5, 0x74, 0xc8, 0xc7, 0x04, 0x48, 0xfd, 0x39, 0x86, 0x84, + 0xbc, 0xd5, 0x02, 0x40, 0xfb, 0xb8, 0x93, 0x51, 0x56, 0xbe, 0xd1, 0x02, + 0xcd, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, + 0x04, 0x48, 0x00, 0x0b, 0x00, 0x18, 0x40, 0x0a, 0x01, 0x0a, 0x0c, 0x0d, + 0x05, 0x09, 0x01, 0x0f, 0x00, 0x15, 0x00, 0x3f, 0x3f, 0x33, 0x39, 0x11, + 0x12, 0x01, 0x39, 0x39, 0x31, 0x30, 0x21, 0x01, 0x33, 0x13, 0x16, 0x17, + 0x33, 0x36, 0x12, 0x13, 0x33, 0x01, 0x01, 0xa0, 0xfe, 0x60, 0xb2, 0xec, + 0x50, 0x0e, 0x08, 0x0b, 0x75, 0xcc, 0xb2, 0xfe, 0x60, 0x04, 0x48, 0xfd, + 0x76, 0xe4, 0x44, 0x35, 0x01, 0x4d, 0x02, 0x30, 0xfb, 0xb8, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x17, 0x00, 0x00, 0x06, 0x23, 0x04, 0x48, 0x00, 0x1c, + 0x00, 0x2c, 0x40, 0x14, 0x09, 0x1b, 0x1d, 0x1e, 0x17, 0x16, 0x0e, 0x0d, + 0x03, 0x04, 0x0d, 0x04, 0x08, 0x1a, 0x12, 0x09, 0x0f, 0x00, 0x08, 0x15, + 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x33, 0x12, 0x39, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x33, 0x33, 0x11, 0x12, 0x01, 0x39, 0x39, 0x31, 0x30, 0x21, 0x03, + 0x26, 0x27, 0x23, 0x06, 0x07, 0x03, 0x23, 0x01, 0x33, 0x1a, 0x01, 0x17, + 0x33, 0x3e, 0x01, 0x37, 0x13, 0x33, 0x13, 0x16, 0x17, 0x33, 0x3e, 0x01, + 0x13, 0x33, 0x01, 0x04, 0x2f, 0xc9, 0x13, 0x34, 0x08, 0x28, 0x1e, 0xcf, + 0xc0, 0xfe, 0xd5, 0xae, 0x6a, 0x6f, 0x08, 0x08, 0x0b, 0x31, 0x12, 0xc9, + 0xb4, 0xc4, 0x38, 0x14, 0x08, 0x04, 0x23, 0xbf, 0xac, 0xfe, 0xd1, 0x02, + 0x83, 0x3b, 0xd1, 0xaf, 0x5f, 0xfd, 0x7f, 0x04, 0x48, 0xfe, 0x63, 0xfe, + 0x50, 0x4b, 0x39, 0xb5, 0x35, 0x02, 0x75, 0xfd, 0x8b, 0xac, 0x75, 0x24, + 0x96, 0x02, 0xdc, 0xfb, 0xb8, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x27, + 0x00, 0x00, 0x04, 0x08, 0x04, 0x48, 0x00, 0x0b, 0x00, 0x22, 0x40, 0x11, + 0x07, 0x05, 0x06, 0x00, 0x01, 0x05, 0x0c, 0x0d, 0x09, 0x03, 0x01, 0x08, + 0x0b, 0x15, 0x04, 0x01, 0x0f, 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x12, 0x39, + 0x39, 0x11, 0x12, 0x01, 0x17, 0x39, 0x31, 0x30, 0x09, 0x01, 0x33, 0x09, + 0x01, 0x33, 0x09, 0x01, 0x23, 0x09, 0x01, 0x23, 0x01, 0xb8, 0xfe, 0x83, + 0xbd, 0x01, 0x21, 0x01, 0x20, 0xbb, 0xfe, 0x83, 0x01, 0x91, 0xbc, 0xfe, + 0xcd, 0xfe, 0xca, 0xbc, 0x02, 0x31, 0x02, 0x17, 0xfe, 0x5c, 0x01, 0xa4, + 0xfd, 0xe9, 0xfd, 0xcf, 0x01, 0xbc, 0xfe, 0x44, 0x00, 0x01, 0x00, 0x02, + 0xfe, 0x14, 0x04, 0x06, 0x04, 0x48, 0x00, 0x15, 0x00, 0x24, 0x40, 0x12, + 0x09, 0x0f, 0x00, 0x03, 0x16, 0x17, 0x04, 0x0d, 0x00, 0x0d, 0x12, 0x46, + 0x59, 0x0d, 0x1b, 0x08, 0x00, 0x0f, 0x00, 0x3f, 0x32, 0x3f, 0x2b, 0x11, + 0x12, 0x00, 0x39, 0x11, 0x12, 0x01, 0x17, 0x39, 0x31, 0x30, 0x13, 0x33, + 0x13, 0x16, 0x17, 0x33, 0x3e, 0x01, 0x13, 0x33, 0x01, 0x0e, 0x01, 0x23, + 0x22, 0x27, 0x35, 0x16, 0x33, 0x32, 0x3f, 0x01, 0x02, 0xb2, 0xf0, 0x4f, + 0x13, 0x08, 0x0d, 0x53, 0xe6, 0xb2, 0xfe, 0x29, 0x46, 0xbb, 0x88, 0x4c, + 0x4a, 0x37, 0x44, 0xab, 0x49, 0x3d, 0x04, 0x48, 0xfd, 0x8f, 0xd6, 0x5f, + 0x33, 0xf7, 0x02, 0x7c, 0xfb, 0x20, 0xb9, 0x9b, 0x11, 0x85, 0x0c, 0xc0, + 0x9c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x52, 0x00, 0x00, 0x03, 0x6d, + 0x04, 0x48, 0x00, 0x09, 0x00, 0x2b, 0x40, 0x17, 0x08, 0x01, 0x03, 0x07, + 0x00, 0x07, 0x04, 0x01, 0x04, 0x0a, 0x0b, 0x05, 0x04, 0x47, 0x59, 0x05, + 0x0f, 0x01, 0x08, 0x47, 0x59, 0x01, 0x15, 0x00, 0x3f, 0x2b, 0x00, 0x18, + 0x3f, 0x2b, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, + 0x30, 0x29, 0x01, 0x35, 0x01, 0x21, 0x35, 0x21, 0x15, 0x01, 0x21, 0x03, + 0x6d, 0xfc, 0xe5, 0x02, 0x56, 0xfd, 0xcf, 0x02, 0xe7, 0xfd, 0xb2, 0x02, + 0x5d, 0x71, 0x03, 0x56, 0x81, 0x81, 0xfc, 0xba, 0x00, 0x01, 0x00, 0x3d, + 0xfe, 0xbc, 0x02, 0xc1, 0x05, 0xb6, 0x00, 0x1c, 0x00, 0x2c, 0x40, 0x15, + 0x19, 0x1a, 0x1a, 0x0b, 0x17, 0x00, 0x00, 0x0f, 0x07, 0x14, 0x03, 0x03, + 0x07, 0x0b, 0x03, 0x1d, 0x1e, 0x13, 0x03, 0x04, 0x27, 0x00, 0x3f, 0x3f, + 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x33, 0x11, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x25, 0x14, 0x16, 0x17, 0x15, 0x2e, + 0x01, 0x35, 0x11, 0x34, 0x26, 0x23, 0x35, 0x3e, 0x01, 0x35, 0x11, 0x34, + 0x36, 0x33, 0x15, 0x06, 0x15, 0x11, 0x14, 0x07, 0x15, 0x16, 0x15, 0x01, + 0xdb, 0x75, 0x71, 0xbe, 0xd0, 0x7e, 0x78, 0x82, 0x74, 0xd8, 0xb6, 0xe6, + 0xdf, 0xdf, 0x0c, 0x66, 0x5c, 0x02, 0x8c, 0x02, 0xaa, 0x9a, 0x01, 0x2f, + 0x68, 0x59, 0x8d, 0x02, 0x5c, 0x60, 0x01, 0x32, 0x9b, 0xac, 0x8b, 0x06, + 0xc1, 0xfe, 0xd9, 0xd7, 0x27, 0x0c, 0x27, 0xd7, 0x00, 0x01, 0x01, 0xee, + 0xfe, 0x10, 0x02, 0x7b, 0x06, 0x14, 0x00, 0x03, 0x00, 0x16, 0x40, 0x09, + 0x02, 0x03, 0x03, 0x04, 0x05, 0x03, 0x1b, 0x00, 0x00, 0x00, 0x3f, 0x3f, + 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x31, 0x30, 0x01, 0x33, 0x11, 0x23, + 0x01, 0xee, 0x8d, 0x8d, 0x06, 0x14, 0xf7, 0xfc, 0x00, 0x01, 0x00, 0x48, + 0xfe, 0xbc, 0x02, 0xcb, 0x05, 0xb6, 0x00, 0x1d, 0x00, 0x2c, 0x40, 0x15, + 0x15, 0x05, 0x0a, 0x12, 0x12, 0x02, 0x19, 0x00, 0x1d, 0x1d, 0x0e, 0x0e, + 0x19, 0x05, 0x03, 0x1e, 0x1f, 0x15, 0x27, 0x06, 0x03, 0x00, 0x3f, 0x3f, + 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x26, 0x35, 0x11, 0x34, 0x27, + 0x35, 0x32, 0x16, 0x15, 0x11, 0x14, 0x16, 0x17, 0x15, 0x22, 0x06, 0x15, + 0x11, 0x14, 0x06, 0x07, 0x35, 0x3e, 0x01, 0x35, 0x11, 0x34, 0x36, 0x37, + 0x02, 0x0a, 0xdf, 0xe3, 0xb8, 0xd3, 0x76, 0x82, 0x7a, 0x7e, 0xcd, 0xbe, + 0x6f, 0x74, 0x6e, 0x71, 0x02, 0x3f, 0x27, 0xd7, 0x01, 0x27, 0xc1, 0x06, + 0x8b, 0xae, 0x99, 0xfe, 0xce, 0x61, 0x5b, 0x02, 0x8d, 0x59, 0x68, 0xfe, + 0xd1, 0x99, 0xab, 0x02, 0x8c, 0x02, 0x5c, 0x66, 0x01, 0x29, 0x72, 0x78, + 0x14, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, 0x02, 0x50, 0x04, 0x29, + 0x03, 0x54, 0x00, 0x17, 0x00, 0x24, 0x40, 0x11, 0x03, 0x0f, 0x18, 0x19, + 0x12, 0x0c, 0x50, 0x59, 0x03, 0x12, 0x0f, 0x06, 0x06, 0x00, 0x50, 0x59, + 0x06, 0x00, 0x2f, 0x2b, 0x00, 0x10, 0x18, 0xc4, 0x2f, 0xc4, 0x2b, 0x11, + 0x12, 0x01, 0x39, 0x39, 0x31, 0x30, 0x01, 0x22, 0x06, 0x07, 0x35, 0x36, + 0x33, 0x32, 0x16, 0x17, 0x1e, 0x01, 0x33, 0x32, 0x36, 0x37, 0x15, 0x06, + 0x23, 0x22, 0x26, 0x27, 0x2e, 0x01, 0x01, 0x52, 0x35, 0x7f, 0x36, 0x64, + 0x90, 0x44, 0x71, 0x59, 0x42, 0x62, 0x2f, 0x36, 0x80, 0x36, 0x66, 0x8e, + 0x48, 0x7e, 0x48, 0x4b, 0x5a, 0x02, 0xc9, 0x43, 0x36, 0x97, 0x6d, 0x1c, + 0x26, 0x1c, 0x1b, 0x40, 0x39, 0x96, 0x6e, 0x21, 0x20, 0x20, 0x18, 0x00, + 0x00, 0x02, 0x00, 0x98, 0xfe, 0x8b, 0x01, 0x89, 0x04, 0x5e, 0x00, 0x03, + 0x00, 0x0e, 0x00, 0x2b, 0x40, 0x14, 0x02, 0x04, 0x04, 0x03, 0x09, 0x09, + 0x0f, 0x10, 0x00, 0x00, 0x03, 0x0c, 0x0c, 0x06, 0x4f, 0x59, 0x0c, 0x10, + 0x03, 0x22, 0x00, 0x3f, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, + 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, + 0x33, 0x13, 0x23, 0x13, 0x14, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, + 0x32, 0x16, 0xdb, 0x69, 0x33, 0xcf, 0xe1, 0x79, 0x3c, 0x3c, 0x3f, 0x39, + 0x33, 0x46, 0x02, 0xac, 0xfb, 0xdf, 0x05, 0x4c, 0x87, 0x47, 0x40, 0x3f, + 0x48, 0x40, 0x00, 0x00, 0x00, 0x01, 0x00, 0xbe, 0xff, 0xec, 0x03, 0xdb, + 0x05, 0xcb, 0x00, 0x1b, 0x00, 0x3e, 0x40, 0x1e, 0x16, 0x08, 0x0d, 0x03, + 0x03, 0x0a, 0x04, 0x00, 0x10, 0x10, 0x04, 0x08, 0x03, 0x1c, 0x1d, 0x19, + 0x05, 0x02, 0x13, 0x0a, 0x0d, 0x02, 0x0d, 0x02, 0x0d, 0x04, 0x0b, 0x07, + 0x04, 0x19, 0x00, 0x3f, 0x3f, 0x12, 0x39, 0x39, 0x2f, 0x2f, 0x11, 0x33, + 0x33, 0x11, 0x33, 0x33, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x25, 0x06, 0x07, 0x15, + 0x23, 0x35, 0x26, 0x02, 0x35, 0x10, 0x25, 0x35, 0x33, 0x15, 0x1e, 0x01, + 0x17, 0x07, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x37, + 0x03, 0xcb, 0x69, 0x93, 0x85, 0xcb, 0xc1, 0x01, 0x8c, 0x87, 0x4b, 0x8e, + 0x31, 0x31, 0x85, 0x6d, 0xac, 0xa2, 0x9f, 0xa7, 0x8d, 0x8e, 0xf0, 0x36, + 0x06, 0xc8, 0xce, 0x20, 0x01, 0x11, 0xfa, 0x01, 0xfc, 0x3e, 0xac, 0xa4, + 0x03, 0x21, 0x17, 0x8c, 0x33, 0xd3, 0xd9, 0xd4, 0xcb, 0x3b, 0x00, 0x00, + 0x00, 0x01, 0x00, 0x3f, 0x00, 0x00, 0x04, 0x44, 0x05, 0xc9, 0x00, 0x1d, + 0x00, 0x48, 0x40, 0x26, 0x18, 0x13, 0x09, 0x0d, 0x0d, 0x1a, 0x16, 0x11, + 0x02, 0x0b, 0x16, 0x13, 0x05, 0x1e, 0x1f, 0x0c, 0x18, 0x19, 0x18, 0x4e, + 0x59, 0x09, 0x19, 0x19, 0x13, 0x00, 0x13, 0x10, 0x4c, 0x59, 0x13, 0x18, + 0x00, 0x05, 0x4b, 0x59, 0x00, 0x07, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, + 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, 0x33, 0x2b, 0x11, 0x00, 0x33, + 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x11, 0x33, + 0x31, 0x30, 0x01, 0x32, 0x17, 0x07, 0x26, 0x23, 0x22, 0x06, 0x15, 0x11, + 0x21, 0x15, 0x21, 0x15, 0x14, 0x06, 0x07, 0x21, 0x15, 0x21, 0x35, 0x36, + 0x3d, 0x01, 0x23, 0x35, 0x33, 0x11, 0x34, 0x36, 0x02, 0xaa, 0xbe, 0xaa, + 0x3d, 0x9a, 0x8f, 0x7b, 0x7d, 0x01, 0xa6, 0xfe, 0x5a, 0x41, 0x4a, 0x03, + 0x1b, 0xfb, 0xfb, 0xcd, 0xc6, 0xc6, 0xe0, 0x05, 0xc9, 0x54, 0x85, 0x4d, + 0x7c, 0x8c, 0xfe, 0xd9, 0x7f, 0xdd, 0x64, 0x88, 0x2c, 0x9a, 0x8d, 0x2f, + 0xf4, 0xdf, 0x7f, 0x01, 0x3c, 0xb2, 0xcd, 0x00, 0x00, 0x02, 0x00, 0x7b, + 0x01, 0x06, 0x04, 0x17, 0x04, 0xa0, 0x00, 0x1b, 0x00, 0x27, 0x00, 0x20, + 0x40, 0x0d, 0x1c, 0x00, 0x22, 0x0e, 0x00, 0x0e, 0x28, 0x29, 0x1f, 0x15, + 0x15, 0x25, 0x07, 0x00, 0x2f, 0x33, 0x33, 0x2f, 0x33, 0x11, 0x12, 0x01, + 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, 0x34, 0x37, 0x27, + 0x37, 0x17, 0x36, 0x33, 0x32, 0x17, 0x37, 0x17, 0x07, 0x16, 0x15, 0x14, + 0x07, 0x17, 0x07, 0x27, 0x06, 0x23, 0x22, 0x27, 0x07, 0x27, 0x37, 0x26, + 0x37, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, + 0xb8, 0x4a, 0x87, 0x5e, 0x87, 0x68, 0x82, 0x7f, 0x66, 0x89, 0x5f, 0x86, + 0x4a, 0x4a, 0x83, 0x5c, 0x89, 0x66, 0x7f, 0x86, 0x64, 0x87, 0x5c, 0x85, + 0x4a, 0x81, 0x9d, 0x74, 0x74, 0x9e, 0xa0, 0x72, 0x74, 0x9d, 0x02, 0xd3, + 0x7a, 0x6b, 0x8c, 0x5c, 0x85, 0x49, 0x49, 0x85, 0x5c, 0x8a, 0x71, 0x76, + 0x83, 0x67, 0x87, 0x5c, 0x85, 0x47, 0x49, 0x85, 0x5c, 0x88, 0x6b, 0x7c, + 0x70, 0xa0, 0x9f, 0x71, 0x72, 0xa2, 0xa4, 0x00, 0x00, 0x01, 0x00, 0x1f, + 0x00, 0x00, 0x04, 0x71, 0x05, 0xb6, 0x00, 0x16, 0x00, 0x56, 0x40, 0x2e, + 0x12, 0x0e, 0x07, 0x0b, 0x0b, 0x10, 0x0c, 0x05, 0x09, 0x02, 0x09, 0x03, + 0x0c, 0x14, 0x0e, 0x15, 0x07, 0x17, 0x18, 0x0a, 0x0e, 0x0e, 0x07, 0x0f, + 0x06, 0x12, 0x12, 0x03, 0x00, 0x13, 0x15, 0x0f, 0x13, 0x1f, 0x13, 0x02, + 0x0f, 0x13, 0x0f, 0x13, 0x0c, 0x01, 0x15, 0x06, 0x0c, 0x18, 0x00, 0x3f, + 0x3f, 0x33, 0x12, 0x39, 0x39, 0x2f, 0x2f, 0x5d, 0x11, 0x12, 0x39, 0x32, + 0x32, 0x11, 0x33, 0x11, 0x33, 0x33, 0x11, 0x33, 0x11, 0x12, 0x01, 0x17, + 0x39, 0x11, 0x33, 0x11, 0x33, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, + 0x09, 0x01, 0x33, 0x01, 0x21, 0x15, 0x21, 0x15, 0x21, 0x15, 0x21, 0x11, + 0x23, 0x11, 0x21, 0x35, 0x21, 0x35, 0x21, 0x35, 0x21, 0x01, 0x33, 0x02, + 0x48, 0x01, 0x7b, 0xae, 0xfe, 0x60, 0x01, 0x06, 0xfe, 0xc3, 0x01, 0x3d, + 0xfe, 0xc3, 0xa4, 0xfe, 0xc4, 0x01, 0x3c, 0xfe, 0xc4, 0x01, 0x00, 0xfe, + 0x65, 0xb2, 0x02, 0xdf, 0x02, 0xd7, 0xfc, 0xfe, 0x7f, 0xaa, 0x7f, 0xfe, + 0xf4, 0x01, 0x0c, 0x7f, 0xaa, 0x7f, 0x03, 0x02, 0x00, 0x02, 0x01, 0xee, + 0xfe, 0x10, 0x02, 0x7b, 0x06, 0x14, 0x00, 0x03, 0x00, 0x07, 0x00, 0x24, + 0x40, 0x10, 0x02, 0x06, 0x06, 0x03, 0x07, 0x07, 0x08, 0x09, 0x04, 0x03, + 0x04, 0x03, 0x07, 0x1b, 0x00, 0x00, 0x00, 0x3f, 0x3f, 0x39, 0x39, 0x2f, + 0x2f, 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, + 0x01, 0x33, 0x11, 0x23, 0x11, 0x33, 0x11, 0x23, 0x01, 0xee, 0x8d, 0x8d, + 0x8d, 0x8d, 0x06, 0x14, 0xfc, 0xf8, 0xfe, 0x0d, 0xfc, 0xf7, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x7b, 0xff, 0xf8, 0x03, 0x96, 0x06, 0x1d, 0x00, 0x31, + 0x00, 0x3d, 0x00, 0x43, 0x40, 0x26, 0x32, 0x00, 0x13, 0x06, 0x2a, 0x1e, + 0x38, 0x19, 0x19, 0x1e, 0x0c, 0x06, 0x00, 0x23, 0x06, 0x3e, 0x3f, 0x15, + 0x03, 0x3b, 0x36, 0x1c, 0x2d, 0x06, 0x21, 0x09, 0x21, 0x27, 0x47, 0x59, + 0x21, 0x15, 0x09, 0x10, 0x47, 0x59, 0x09, 0x00, 0x00, 0x3f, 0x2b, 0x00, + 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x17, 0x39, 0x11, 0x12, 0x01, 0x17, + 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, + 0x34, 0x36, 0x37, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x17, + 0x07, 0x2e, 0x01, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x17, 0x1e, 0x01, + 0x15, 0x14, 0x06, 0x07, 0x16, 0x15, 0x14, 0x06, 0x23, 0x22, 0x27, 0x35, + 0x1e, 0x01, 0x33, 0x32, 0x36, 0x35, 0x34, 0x2e, 0x01, 0x27, 0x2e, 0x02, + 0x37, 0x14, 0x16, 0x1f, 0x01, 0x36, 0x35, 0x34, 0x26, 0x27, 0x0e, 0x01, + 0x8b, 0x56, 0x4e, 0x4a, 0x54, 0xcf, 0xc5, 0x5e, 0x9f, 0x61, 0x35, 0x62, + 0x87, 0x4c, 0x74, 0x74, 0x7b, 0x9a, 0xba, 0x96, 0x52, 0x4a, 0x99, 0xea, + 0xd4, 0xda, 0x80, 0x4e, 0xc2, 0x52, 0x86, 0x8d, 0x30, 0x6c, 0x73, 0x8e, + 0x86, 0x42, 0x92, 0x84, 0xa7, 0x31, 0x89, 0x93, 0xb9, 0x44, 0x55, 0x03, + 0x29, 0x56, 0x89, 0x25, 0x28, 0x6f, 0x55, 0x79, 0x8b, 0x1d, 0x27, 0x83, + 0x27, 0x1b, 0x3b, 0x40, 0x3c, 0x54, 0x37, 0x44, 0x97, 0x6b, 0x5a, 0x8d, + 0x29, 0x51, 0x92, 0x8c, 0x99, 0x41, 0x94, 0x25, 0x2d, 0x4c, 0x47, 0x2e, + 0x3a, 0x3a, 0x2b, 0x34, 0x5a, 0x72, 0x62, 0x4d, 0x69, 0x3d, 0x13, 0x50, + 0x6f, 0x53, 0x70, 0x39, 0x13, 0x64, 0x00, 0x00, 0x00, 0x02, 0x01, 0x35, + 0x05, 0x0e, 0x03, 0x68, 0x05, 0xd3, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x1e, + 0x40, 0x0c, 0x06, 0x00, 0x0c, 0x12, 0x00, 0x12, 0x18, 0x19, 0x0f, 0x03, + 0x15, 0x09, 0x00, 0x2f, 0x33, 0xcd, 0x32, 0x11, 0x12, 0x01, 0x39, 0x39, + 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, + 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, 0x25, 0x34, 0x36, 0x33, 0x32, 0x16, + 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, 0x01, 0x35, 0x35, 0x25, 0x26, 0x37, + 0x37, 0x26, 0x25, 0x35, 0x01, 0x7d, 0x35, 0x25, 0x25, 0x37, 0x37, 0x25, + 0x25, 0x35, 0x05, 0x71, 0x34, 0x2e, 0x2e, 0x34, 0x32, 0x31, 0x31, 0x32, + 0x34, 0x2e, 0x2e, 0x34, 0x32, 0x31, 0x31, 0x00, 0x00, 0x03, 0x00, 0x64, + 0xff, 0xec, 0x06, 0x44, 0x05, 0xcb, 0x00, 0x16, 0x00, 0x26, 0x00, 0x36, + 0x00, 0x46, 0x40, 0x27, 0x27, 0x17, 0x03, 0x0f, 0x2f, 0x1f, 0x1f, 0x14, + 0x09, 0x0f, 0x17, 0x05, 0x37, 0x38, 0x06, 0x0c, 0x00, 0x12, 0x0f, 0x0c, + 0x1f, 0x0c, 0x02, 0x00, 0x12, 0x10, 0x12, 0x02, 0x0c, 0x12, 0x0c, 0x12, + 0x1b, 0x2b, 0x23, 0x13, 0x33, 0x1b, 0x04, 0x00, 0x3f, 0x33, 0x3f, 0x33, + 0x12, 0x39, 0x39, 0x2f, 0x2f, 0x5d, 0x5d, 0x11, 0x33, 0x11, 0x33, 0x11, + 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, + 0x01, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x37, 0x15, 0x0e, 0x01, + 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x17, 0x07, 0x26, 0x01, + 0x34, 0x12, 0x24, 0x33, 0x32, 0x04, 0x12, 0x15, 0x14, 0x02, 0x04, 0x23, + 0x22, 0x24, 0x02, 0x37, 0x14, 0x12, 0x04, 0x33, 0x32, 0x24, 0x12, 0x35, + 0x34, 0x02, 0x24, 0x23, 0x22, 0x04, 0x02, 0x03, 0x7d, 0x7d, 0x87, 0x7f, + 0x83, 0x56, 0x7d, 0x30, 0x65, 0x46, 0xc2, 0xd0, 0xdd, 0xbf, 0x80, 0x76, + 0x3a, 0x6c, 0xfc, 0x97, 0xc8, 0x01, 0x5e, 0xca, 0xc8, 0x01, 0x5e, 0xca, + 0xc2, 0xfe, 0xa2, 0xd0, 0xcf, 0xfe, 0xa2, 0xc3, 0x69, 0xae, 0x01, 0x2d, + 0xac, 0xae, 0x01, 0x2a, 0xaf, 0xae, 0xfe, 0xd7, 0xb0, 0xae, 0xfe, 0xd6, + 0xaf, 0x04, 0x23, 0xae, 0x9a, 0xa8, 0xa2, 0x2d, 0x7c, 0x14, 0x1c, 0xf1, + 0xd8, 0xd1, 0xf6, 0x3c, 0x76, 0x33, 0xfe, 0xb8, 0xc8, 0x01, 0x5e, 0xca, + 0xc8, 0xfe, 0xa2, 0xca, 0xc5, 0xfe, 0xa6, 0xd0, 0xcf, 0x01, 0x5a, 0xc6, + 0xad, 0xfe, 0xd3, 0xad, 0xae, 0x01, 0x29, 0xb0, 0xae, 0x01, 0x2a, 0xaf, + 0xae, 0xfe, 0xd7, 0x00, 0x00, 0x02, 0x00, 0x46, 0x03, 0x14, 0x02, 0x71, + 0x05, 0xc7, 0x00, 0x16, 0x00, 0x1f, 0x00, 0x37, 0x40, 0x1c, 0x17, 0x06, + 0x1b, 0x0a, 0x01, 0x01, 0x16, 0x16, 0x10, 0x06, 0x03, 0x20, 0x21, 0x1c, + 0x0a, 0x0a, 0x12, 0x19, 0x16, 0x00, 0x03, 0x10, 0x03, 0x02, 0x03, 0x0d, + 0x12, 0x1f, 0x00, 0x3f, 0x33, 0xd4, 0x5d, 0xc4, 0x33, 0x12, 0x39, 0x2f, + 0x33, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x01, 0x27, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, + 0x3f, 0x01, 0x35, 0x34, 0x23, 0x22, 0x07, 0x27, 0x36, 0x33, 0x32, 0x16, + 0x15, 0x11, 0x25, 0x14, 0x33, 0x32, 0x3d, 0x01, 0x07, 0x0e, 0x01, 0x02, + 0x14, 0x18, 0x5c, 0x8c, 0x5f, 0x6f, 0x9a, 0xa5, 0x75, 0x94, 0x64, 0x68, + 0x2b, 0x72, 0x85, 0x82, 0x89, 0xfe, 0x50, 0x70, 0xc9, 0x62, 0x70, 0x67, + 0x03, 0x21, 0x54, 0x61, 0x63, 0x66, 0x66, 0x69, 0x06, 0x04, 0x27, 0x85, + 0x33, 0x60, 0x38, 0x69, 0x79, 0xfe, 0x3c, 0xbc, 0x64, 0xb4, 0x31, 0x04, + 0x04, 0x39, 0x00, 0x00, 0x00, 0x02, 0x00, 0x52, 0x00, 0x75, 0x03, 0xaa, + 0x03, 0xbe, 0x00, 0x06, 0x00, 0x0d, 0x00, 0x29, 0x40, 0x13, 0x03, 0x06, + 0x0a, 0x0d, 0x02, 0x04, 0x0b, 0x09, 0x09, 0x04, 0x0d, 0x06, 0x04, 0x0e, + 0x0f, 0x0c, 0x05, 0x08, 0x01, 0x00, 0x2f, 0x33, 0x2f, 0x33, 0x11, 0x12, + 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, + 0x30, 0x13, 0x01, 0x17, 0x09, 0x01, 0x07, 0x01, 0x25, 0x01, 0x17, 0x09, + 0x01, 0x07, 0x01, 0x52, 0x01, 0x56, 0x77, 0xfe, 0xdf, 0x01, 0x21, 0x77, + 0xfe, 0xaa, 0x01, 0x8b, 0x01, 0x58, 0x75, 0xfe, 0xe1, 0x01, 0x1f, 0x75, + 0xfe, 0xa8, 0x02, 0x27, 0x01, 0x97, 0x45, 0xfe, 0xa2, 0xfe, 0xa1, 0x47, + 0x01, 0x97, 0x1b, 0x01, 0x97, 0x45, 0xfe, 0xa2, 0xfe, 0xa1, 0x47, 0x01, + 0x97, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x68, 0x01, 0x08, 0x04, 0x29, + 0x03, 0x17, 0x00, 0x05, 0x00, 0x1b, 0x40, 0x0c, 0x02, 0x01, 0x04, 0x01, + 0x06, 0x07, 0x05, 0x04, 0x50, 0x59, 0x05, 0x02, 0x00, 0x2f, 0x2f, 0x2b, + 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x31, 0x30, 0x01, 0x11, 0x23, + 0x11, 0x21, 0x35, 0x04, 0x29, 0x89, 0xfc, 0xc8, 0x03, 0x17, 0xfd, 0xf1, + 0x01, 0x85, 0x8a, 0x00, 0xff, 0xff, 0x00, 0x54, 0x01, 0xd9, 0x02, 0x3f, + 0x02, 0x71, 0x12, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x64, + 0xff, 0xec, 0x06, 0x44, 0x05, 0xcb, 0x00, 0x08, 0x00, 0x16, 0x00, 0x26, + 0x00, 0x36, 0x00, 0x5d, 0x40, 0x33, 0x27, 0x17, 0x00, 0x11, 0x11, 0x12, + 0x04, 0x09, 0x2f, 0x1f, 0x1f, 0x0d, 0x09, 0x0c, 0x12, 0x17, 0x06, 0x37, + 0x38, 0x0c, 0x10, 0x10, 0x00, 0x00, 0x0e, 0x13, 0x0e, 0x12, 0x08, 0x13, + 0x0f, 0x12, 0x1f, 0x12, 0x02, 0x00, 0x13, 0x10, 0x13, 0x02, 0x12, 0x13, + 0x12, 0x13, 0x1b, 0x2b, 0x23, 0x13, 0x33, 0x1b, 0x04, 0x00, 0x3f, 0x33, + 0x3f, 0x33, 0x12, 0x39, 0x39, 0x2f, 0x2f, 0x5d, 0x5d, 0x11, 0x33, 0x11, + 0x33, 0x11, 0x12, 0x39, 0x2f, 0x33, 0x11, 0x33, 0x11, 0x12, 0x01, 0x17, + 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, + 0x30, 0x01, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x2b, 0x01, 0x05, 0x14, + 0x06, 0x07, 0x13, 0x23, 0x03, 0x23, 0x11, 0x23, 0x11, 0x21, 0x32, 0x16, + 0x01, 0x34, 0x12, 0x24, 0x33, 0x32, 0x04, 0x12, 0x15, 0x14, 0x02, 0x04, + 0x23, 0x22, 0x24, 0x02, 0x37, 0x14, 0x12, 0x04, 0x33, 0x32, 0x24, 0x12, + 0x35, 0x34, 0x02, 0x24, 0x23, 0x22, 0x04, 0x02, 0x02, 0xd3, 0x6c, 0x50, + 0x61, 0x56, 0x5d, 0x6a, 0x01, 0xb2, 0x55, 0x4d, 0xee, 0xa8, 0xcf, 0x87, + 0x94, 0x01, 0x05, 0xa6, 0x9b, 0xfb, 0xdf, 0xc8, 0x01, 0x5e, 0xca, 0xc8, + 0x01, 0x5e, 0xca, 0xc2, 0xfe, 0xa2, 0xd0, 0xcf, 0xfe, 0xa2, 0xc3, 0x69, + 0xae, 0x01, 0x2d, 0xac, 0xae, 0x01, 0x2a, 0xaf, 0xae, 0xfe, 0xd7, 0xb0, + 0xae, 0xfe, 0xd6, 0xaf, 0x02, 0xfa, 0x53, 0x40, 0x4b, 0x41, 0x88, 0x50, + 0x7b, 0x1e, 0xfe, 0x75, 0x01, 0x62, 0xfe, 0x9e, 0x03, 0x7b, 0x82, 0xfe, + 0xc5, 0xc8, 0x01, 0x5e, 0xca, 0xc8, 0xfe, 0xa2, 0xca, 0xc5, 0xfe, 0xa6, + 0xd0, 0xcf, 0x01, 0x5a, 0xc6, 0xad, 0xfe, 0xd3, 0xad, 0xae, 0x01, 0x29, + 0xb0, 0xae, 0x01, 0x2a, 0xaf, 0xae, 0xfe, 0xd7, 0x00, 0x01, 0xff, 0xfa, + 0x06, 0x14, 0x04, 0x06, 0x06, 0x93, 0x00, 0x03, 0x00, 0x11, 0xb5, 0x00, + 0x05, 0x01, 0x04, 0x01, 0x02, 0x00, 0x2f, 0x33, 0x11, 0x01, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x01, 0x21, 0x35, 0x21, 0x04, 0x06, 0xfb, 0xf4, 0x04, + 0x0c, 0x06, 0x14, 0x7f, 0x00, 0x02, 0x00, 0x7f, 0x03, 0x5c, 0x02, 0xee, + 0x05, 0xcb, 0x00, 0x0c, 0x00, 0x18, 0x00, 0x21, 0x40, 0x0e, 0x0d, 0x00, + 0x13, 0x06, 0x00, 0x06, 0x19, 0x1a, 0x10, 0x0a, 0xc0, 0x16, 0x03, 0x04, + 0x00, 0x3f, 0x33, 0x1a, 0xcc, 0x32, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, + 0x33, 0x11, 0x33, 0x31, 0x30, 0x13, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, + 0x14, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x37, 0x14, 0x16, 0x33, 0x32, 0x36, + 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x7f, 0xb5, 0x82, 0x82, 0xb6, 0x52, + 0x92, 0x54, 0x82, 0xb5, 0x73, 0x75, 0x51, 0x50, 0x73, 0x71, 0x52, 0x53, + 0x73, 0x04, 0x93, 0x82, 0xb6, 0xb5, 0x83, 0x54, 0x8f, 0x54, 0xb4, 0x83, + 0x52, 0x72, 0x71, 0x53, 0x54, 0x71, 0x72, 0x00, 0x00, 0x02, 0x00, 0x68, + 0x00, 0x01, 0x04, 0x29, 0x04, 0xc3, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x00, + 0x37, 0x35, 0x21, 0x15, 0x01, 0x21, 0x15, 0x21, 0x11, 0x23, 0x11, 0x21, + 0x35, 0x21, 0x11, 0x33, 0x68, 0x03, 0xc1, 0xfe, 0x64, 0x01, 0x9c, 0xfe, + 0x64, 0x8b, 0xfe, 0x66, 0x01, 0x9a, 0x8b, 0x01, 0x8a, 0x8a, 0x03, 0x16, + 0x8a, 0xfe, 0x56, 0x01, 0xaa, 0x8a, 0x01, 0xac, 0x00, 0x01, 0x00, 0x31, + 0x02, 0x4a, 0x02, 0x8d, 0x05, 0xc9, 0x00, 0x18, 0x00, 0x23, 0x40, 0x11, + 0x07, 0x13, 0x17, 0x01, 0x01, 0x0e, 0x13, 0x00, 0x04, 0x1a, 0x19, 0x0a, + 0x10, 0x1f, 0x17, 0x01, 0x20, 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x11, 0x12, + 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x21, 0x35, + 0x37, 0x3e, 0x02, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x36, + 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x0f, 0x01, 0x21, 0x02, 0x8d, 0xfd, + 0xa4, 0xec, 0x59, 0x52, 0x21, 0x50, 0x3f, 0x34, 0x62, 0x45, 0x42, 0x83, + 0x98, 0x84, 0x93, 0x59, 0x93, 0xae, 0x01, 0xb8, 0x02, 0x4a, 0x68, 0xe6, + 0x56, 0x61, 0x4c, 0x36, 0x44, 0x45, 0x26, 0x32, 0x58, 0x6f, 0x82, 0x70, + 0x50, 0x97, 0x8a, 0xa5, 0x00, 0x01, 0x00, 0x21, 0x02, 0x39, 0x02, 0x8d, + 0x05, 0xc9, 0x00, 0x23, 0x00, 0x39, 0x40, 0x22, 0x0f, 0x05, 0x05, 0x00, + 0x03, 0x12, 0x1e, 0x0a, 0x06, 0x24, 0x25, 0x12, 0x5d, 0x13, 0x6d, 0x13, + 0x02, 0x4c, 0x13, 0x01, 0x0b, 0x13, 0x1b, 0x13, 0x02, 0x13, 0x13, 0x08, + 0x1a, 0x21, 0x1f, 0x0d, 0x08, 0x21, 0x00, 0x3f, 0x33, 0x3f, 0x33, 0x12, + 0x39, 0x2f, 0x5d, 0x5d, 0x5d, 0x33, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, + 0x33, 0x31, 0x30, 0x01, 0x14, 0x06, 0x07, 0x16, 0x15, 0x14, 0x06, 0x23, + 0x22, 0x27, 0x35, 0x16, 0x33, 0x32, 0x35, 0x34, 0x2b, 0x01, 0x35, 0x33, + 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, + 0x33, 0x32, 0x16, 0x02, 0x73, 0x52, 0x44, 0xb0, 0xb8, 0xa8, 0x98, 0x74, + 0x93, 0x7b, 0xd3, 0xe7, 0x75, 0x77, 0x67, 0x63, 0x50, 0x43, 0x42, 0x70, + 0x38, 0x45, 0x3f, 0x8c, 0x5e, 0x88, 0x9d, 0x04, 0xe7, 0x50, 0x67, 0x17, + 0x2f, 0xa2, 0x80, 0x8f, 0x38, 0x7b, 0x44, 0xa2, 0x91, 0x6b, 0x4f, 0x44, + 0x3d, 0x44, 0x2b, 0x23, 0x5a, 0x2d, 0x36, 0x77, 0x00, 0x01, 0x01, 0x89, + 0x04, 0xd9, 0x03, 0x12, 0x06, 0x21, 0x00, 0x09, 0x00, 0x13, 0xb6, 0x09, + 0x04, 0x0a, 0x0b, 0x04, 0x80, 0x09, 0x00, 0x2f, 0x1a, 0xcd, 0x11, 0x12, + 0x01, 0x39, 0x39, 0x31, 0x30, 0x01, 0x3e, 0x01, 0x37, 0x33, 0x15, 0x0e, + 0x01, 0x07, 0x23, 0x01, 0x89, 0x30, 0x6f, 0x20, 0xca, 0x2c, 0xae, 0x40, + 0x6f, 0x04, 0xf2, 0x3e, 0xb0, 0x41, 0x15, 0x41, 0xbe, 0x34, 0x00, 0x00, + 0x00, 0x01, 0x00, 0xb0, 0xfe, 0x14, 0x04, 0x44, 0x04, 0x48, 0x00, 0x16, + 0x00, 0x35, 0x40, 0x1a, 0x05, 0x0a, 0x0a, 0x08, 0x10, 0x00, 0x13, 0x13, + 0x14, 0x08, 0x14, 0x18, 0x17, 0x06, 0x15, 0x0f, 0x14, 0x1b, 0x0d, 0x02, + 0x46, 0x59, 0x0d, 0x16, 0x09, 0x15, 0x00, 0x3f, 0x3f, 0x2b, 0x00, 0x18, + 0x3f, 0x3f, 0x33, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, + 0x33, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x10, 0x33, 0x32, 0x36, + 0x35, 0x11, 0x33, 0x11, 0x23, 0x27, 0x23, 0x06, 0x23, 0x22, 0x27, 0x23, + 0x16, 0x15, 0x11, 0x23, 0x11, 0x33, 0x01, 0x56, 0xfe, 0xab, 0x9f, 0xa6, + 0x88, 0x1a, 0x0a, 0x6f, 0xe5, 0x96, 0x58, 0x0a, 0x0a, 0xa6, 0xa6, 0x01, + 0x7d, 0xfe, 0xfa, 0xbd, 0xd4, 0x02, 0x40, 0xfb, 0xb8, 0x93, 0xa7, 0x5c, + 0x54, 0xa0, 0xfe, 0xc0, 0x06, 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x71, + 0xfe, 0xfc, 0x04, 0x60, 0x06, 0x14, 0x00, 0x0f, 0x00, 0x27, 0x40, 0x12, + 0x04, 0x05, 0x01, 0x00, 0x00, 0x05, 0x0b, 0x03, 0x10, 0x11, 0x08, 0x08, + 0x05, 0x03, 0x0f, 0x05, 0x01, 0x05, 0x00, 0x2f, 0x33, 0x3f, 0x33, 0x12, + 0x39, 0x2f, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, + 0x30, 0x01, 0x23, 0x11, 0x23, 0x11, 0x23, 0x11, 0x06, 0x23, 0x22, 0x26, + 0x35, 0x10, 0x36, 0x33, 0x21, 0x04, 0x60, 0x72, 0xd5, 0x73, 0x3e, 0x54, + 0xd8, 0xcb, 0xda, 0xe8, 0x02, 0x2d, 0xfe, 0xfc, 0x06, 0xb0, 0xf9, 0x50, + 0x03, 0x33, 0x12, 0xfa, 0xfb, 0x01, 0x04, 0xfe, 0x00, 0x01, 0x00, 0x98, + 0x02, 0x4c, 0x01, 0x89, 0x03, 0x5a, 0x00, 0x0b, 0x00, 0x17, 0x40, 0x0a, + 0x06, 0x00, 0x00, 0x0d, 0x0c, 0x03, 0x09, 0x4f, 0x59, 0x03, 0x00, 0x2f, + 0x2b, 0x11, 0x12, 0x01, 0x39, 0x11, 0x33, 0x31, 0x30, 0x13, 0x34, 0x36, + 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, 0x22, 0x26, 0x98, 0x3e, 0x38, + 0x3a, 0x41, 0x42, 0x39, 0x33, 0x43, 0x02, 0xd3, 0x42, 0x45, 0x45, 0x42, + 0x41, 0x46, 0x3f, 0x00, 0x00, 0x01, 0x00, 0x25, 0xfe, 0x14, 0x01, 0xb4, + 0x00, 0x00, 0x00, 0x12, 0x00, 0x24, 0x40, 0x10, 0x11, 0x0e, 0x0b, 0x00, + 0x00, 0x0e, 0x05, 0x03, 0x13, 0x14, 0x0e, 0x11, 0x11, 0x08, 0x03, 0x10, + 0x00, 0x2f, 0xcc, 0x32, 0x39, 0x2f, 0x33, 0x11, 0x12, 0x01, 0x17, 0x39, + 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x14, 0x06, 0x23, 0x22, 0x27, + 0x35, 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x27, 0x37, 0x33, 0x07, + 0x16, 0x01, 0xb4, 0x99, 0x96, 0x33, 0x2d, 0x2d, 0x3b, 0x4f, 0x51, 0x4f, + 0x6d, 0x58, 0x6e, 0x37, 0xb4, 0xfe, 0xdf, 0x61, 0x6a, 0x09, 0x6a, 0x08, + 0x28, 0x36, 0x2b, 0x35, 0x11, 0xb2, 0x73, 0x27, 0x00, 0x01, 0x00, 0x4c, + 0x02, 0x4a, 0x01, 0xe1, 0x05, 0xb6, 0x00, 0x0a, 0x00, 0x20, 0x40, 0x0e, + 0x02, 0x00, 0x03, 0x03, 0x0a, 0x0c, 0x0b, 0x09, 0x09, 0x03, 0x20, 0x06, + 0x00, 0x1e, 0x00, 0x3f, 0x32, 0x3f, 0x39, 0x2f, 0x11, 0x12, 0x01, 0x39, + 0x39, 0x11, 0x33, 0x33, 0x31, 0x30, 0x01, 0x33, 0x11, 0x23, 0x11, 0x34, + 0x37, 0x0e, 0x01, 0x07, 0x27, 0x01, 0x52, 0x8f, 0x85, 0x06, 0x16, 0x36, + 0x87, 0x43, 0x05, 0xb6, 0xfc, 0x94, 0x02, 0x43, 0x5b, 0x5a, 0x16, 0x2d, + 0x5f, 0x60, 0x00, 0x00, 0x00, 0x02, 0x00, 0x42, 0x03, 0x14, 0x02, 0xbe, + 0x05, 0xc7, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x25, 0x40, 0x12, 0x0c, 0x06, + 0x12, 0x00, 0x06, 0x00, 0x18, 0x19, 0x0f, 0x00, 0x03, 0x10, 0x03, 0x02, + 0x03, 0x15, 0x09, 0x1f, 0x00, 0x3f, 0x33, 0xc4, 0x5d, 0x32, 0x11, 0x12, + 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x14, 0x06, + 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x05, 0x14, 0x16, + 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x02, 0xbe, 0xab, + 0x96, 0x92, 0xa9, 0xa8, 0x97, 0x98, 0xa5, 0xfd, 0xfe, 0x5b, 0x68, 0x69, + 0x5c, 0x5c, 0x69, 0x67, 0x5c, 0x04, 0x6f, 0xa4, 0xb7, 0xba, 0xa1, 0xa3, + 0xb5, 0xb6, 0xa2, 0x7a, 0x7a, 0x7a, 0x7a, 0x7b, 0x76, 0x76, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x50, 0x00, 0x75, 0x03, 0xa8, 0x03, 0xbe, 0x00, 0x06, + 0x00, 0x0d, 0x00, 0x23, 0x40, 0x11, 0x0b, 0x09, 0x04, 0x02, 0x00, 0x03, + 0x07, 0x02, 0x0a, 0x09, 0x06, 0x0e, 0x0f, 0x0c, 0x05, 0x08, 0x01, 0x00, + 0x2f, 0x33, 0x2f, 0x33, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x09, 0x01, 0x27, 0x09, 0x01, 0x37, 0x01, 0x05, 0x01, + 0x27, 0x09, 0x01, 0x37, 0x01, 0x03, 0xa8, 0xfe, 0xa8, 0x75, 0x01, 0x1f, + 0xfe, 0xe1, 0x75, 0x01, 0x58, 0xfe, 0x75, 0xfe, 0xa8, 0x75, 0x01, 0x1f, + 0xfe, 0xe1, 0x75, 0x01, 0x58, 0x02, 0x0c, 0xfe, 0x69, 0x47, 0x01, 0x5f, + 0x01, 0x5e, 0x45, 0xfe, 0x69, 0x1b, 0xfe, 0x69, 0x47, 0x01, 0x5f, 0x01, + 0x5e, 0x45, 0xfe, 0x69, 0x00, 0x04, 0x00, 0x4b, 0x00, 0x00, 0x05, 0xd1, + 0x05, 0xb6, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x18, 0x00, 0x23, 0x00, 0x00, + 0x25, 0x23, 0x15, 0x23, 0x35, 0x21, 0x35, 0x01, 0x33, 0x11, 0x33, 0x21, + 0x35, 0x34, 0x37, 0x0e, 0x03, 0x0f, 0x01, 0x09, 0x01, 0x23, 0x01, 0x21, + 0x33, 0x11, 0x23, 0x11, 0x34, 0x37, 0x0e, 0x01, 0x07, 0x27, 0x05, 0xd1, + 0x7d, 0x91, 0xfe, 0x6e, 0x01, 0x98, 0x8b, 0x7d, 0xfe, 0xf2, 0x06, 0x05, + 0x18, 0x1e, 0x1e, 0x0b, 0xa8, 0x01, 0x55, 0xfc, 0x79, 0x8f, 0x03, 0x87, + 0xfc, 0xce, 0x8f, 0x85, 0x06, 0x16, 0x36, 0x87, 0x43, 0xcb, 0xca, 0xca, + 0x65, 0x02, 0x43, 0xfd, 0xcd, 0xc3, 0x86, 0x4b, 0x0c, 0x27, 0x2d, 0x2d, + 0x11, 0xf6, 0x04, 0x76, 0xfa, 0x4a, 0x05, 0xb6, 0xfc, 0x94, 0x02, 0x43, + 0x5b, 0x5a, 0x16, 0x2d, 0x5f, 0x60, 0x00, 0x00, 0x00, 0x03, 0x00, 0x2e, + 0x00, 0x00, 0x05, 0xdb, 0x05, 0xb6, 0x00, 0x03, 0x00, 0x0e, 0x00, 0x27, + 0x00, 0x00, 0x09, 0x01, 0x23, 0x01, 0x21, 0x33, 0x11, 0x23, 0x11, 0x34, + 0x37, 0x0e, 0x01, 0x07, 0x27, 0x01, 0x21, 0x35, 0x37, 0x3e, 0x02, 0x35, + 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x36, 0x33, 0x32, 0x16, 0x15, + 0x14, 0x06, 0x0f, 0x01, 0x21, 0x04, 0xce, 0xfc, 0x79, 0x8f, 0x03, 0x87, + 0xfc, 0xf5, 0x8f, 0x85, 0x06, 0x16, 0x36, 0x87, 0x43, 0x05, 0xad, 0xfd, + 0xa4, 0xec, 0x59, 0x52, 0x21, 0x50, 0x3f, 0x34, 0x62, 0x45, 0x42, 0x83, + 0x98, 0x84, 0x93, 0x59, 0x93, 0xae, 0x01, 0xb8, 0x05, 0xb6, 0xfa, 0x4a, + 0x05, 0xb6, 0xfc, 0x94, 0x02, 0x43, 0x5b, 0x5a, 0x16, 0x2d, 0x5f, 0x60, + 0xfb, 0x01, 0x68, 0xe6, 0x56, 0x61, 0x4c, 0x36, 0x44, 0x45, 0x26, 0x32, + 0x58, 0x6f, 0x82, 0x70, 0x50, 0x97, 0x8a, 0xa5, 0x00, 0x04, 0x00, 0x1a, + 0x00, 0x00, 0x06, 0x21, 0x05, 0xc9, 0x00, 0x0a, 0x00, 0x14, 0x00, 0x18, + 0x00, 0x3c, 0x00, 0x00, 0x25, 0x23, 0x15, 0x23, 0x35, 0x21, 0x35, 0x01, + 0x33, 0x11, 0x33, 0x21, 0x35, 0x34, 0x37, 0x0e, 0x03, 0x0f, 0x01, 0x09, + 0x01, 0x23, 0x01, 0x05, 0x14, 0x06, 0x07, 0x16, 0x15, 0x14, 0x06, 0x23, + 0x22, 0x27, 0x35, 0x16, 0x33, 0x32, 0x35, 0x34, 0x2b, 0x01, 0x35, 0x33, + 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x07, 0x27, 0x3e, 0x01, + 0x33, 0x32, 0x16, 0x06, 0x21, 0x7d, 0x91, 0xfe, 0x6e, 0x01, 0x98, 0x8b, + 0x7d, 0xfe, 0xf2, 0x06, 0x05, 0x18, 0x1e, 0x1e, 0x0b, 0xa8, 0x01, 0x61, + 0xfc, 0x79, 0x8f, 0x03, 0x87, 0xfd, 0x8d, 0x52, 0x44, 0xb0, 0xb8, 0xa8, + 0x98, 0x74, 0x93, 0x7b, 0xd3, 0xe7, 0x75, 0x77, 0x67, 0x63, 0x50, 0x43, + 0x42, 0x70, 0x38, 0x45, 0x3f, 0x8c, 0x5e, 0x88, 0x9d, 0xcb, 0xca, 0xca, + 0x65, 0x02, 0x43, 0xfd, 0xcd, 0xc3, 0x86, 0x4b, 0x0c, 0x27, 0x2d, 0x2d, + 0x11, 0xf6, 0x04, 0x76, 0xfa, 0x4a, 0x05, 0xb6, 0xcf, 0x50, 0x67, 0x17, + 0x2f, 0xa2, 0x80, 0x8f, 0x38, 0x7b, 0x44, 0xa2, 0x91, 0x6b, 0x4f, 0x44, + 0x3d, 0x44, 0x2b, 0x23, 0x5a, 0x2d, 0x36, 0x77, 0x00, 0x02, 0x00, 0x33, + 0xfe, 0x77, 0x03, 0x54, 0x04, 0x5e, 0x00, 0x1d, 0x00, 0x28, 0x00, 0x41, + 0x40, 0x22, 0x08, 0x14, 0x1e, 0x23, 0x01, 0x1c, 0x0f, 0x1c, 0x23, 0x14, + 0x04, 0x29, 0x2a, 0x00, 0x1d, 0x01, 0x0c, 0x03, 0x1d, 0x1d, 0x11, 0x26, + 0x26, 0x20, 0x4f, 0x59, 0x26, 0x10, 0x11, 0x0b, 0x49, 0x59, 0x11, 0x23, + 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, + 0x2f, 0x5f, 0x5e, 0x5d, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x15, 0x14, 0x06, 0x07, 0x0e, 0x02, + 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, 0x37, 0x17, 0x06, 0x23, 0x22, 0x26, + 0x35, 0x34, 0x3e, 0x02, 0x37, 0x3e, 0x01, 0x3d, 0x01, 0x13, 0x14, 0x23, + 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, 0x02, 0x4e, 0x4b, 0x61, + 0x79, 0x3d, 0x19, 0x84, 0x7a, 0x50, 0x96, 0x62, 0x3b, 0xc5, 0xc6, 0xbe, + 0xd8, 0x23, 0x40, 0x59, 0x36, 0x65, 0x41, 0xb4, 0x79, 0x3b, 0x3e, 0x42, + 0x37, 0x33, 0x46, 0x02, 0xac, 0x33, 0x7a, 0x94, 0x54, 0x6a, 0x4b, 0x4d, + 0x38, 0x64, 0x71, 0x26, 0x30, 0x87, 0x60, 0xba, 0xaa, 0x46, 0x69, 0x59, + 0x52, 0x2f, 0x58, 0x74, 0x5d, 0x1f, 0x01, 0x2b, 0x87, 0x45, 0x42, 0x40, + 0x47, 0x40, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x05, 0x10, + 0x07, 0x73, 0x12, 0x26, 0x00, 0x24, 0x00, 0x00, 0x11, 0x07, 0x00, 0x43, + 0xff, 0xc2, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x02, 0x10, 0x05, 0x26, 0x00, + 0x2b, 0x35, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x05, 0x10, + 0x07, 0x73, 0x12, 0x26, 0x00, 0x24, 0x00, 0x00, 0x11, 0x07, 0x00, 0x76, + 0x00, 0x85, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x02, 0x18, 0x05, 0x26, 0x00, + 0x2b, 0x35, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x05, 0x10, + 0x07, 0x73, 0x00, 0x0e, 0x00, 0x16, 0x00, 0x1d, 0x00, 0x00, 0x01, 0x3e, + 0x01, 0x37, 0x33, 0x1e, 0x01, 0x17, 0x15, 0x23, 0x26, 0x27, 0x06, 0x07, + 0x23, 0x01, 0x03, 0x21, 0x03, 0x23, 0x01, 0x33, 0x09, 0x01, 0x03, 0x26, + 0x27, 0x06, 0x07, 0x03, 0x01, 0x2f, 0x7f, 0x66, 0x17, 0xa6, 0x16, 0x6d, + 0x7d, 0x77, 0x58, 0x85, 0x88, 0x53, 0x73, 0x03, 0x31, 0xb6, 0xfd, 0xb6, + 0xb4, 0xac, 0x02, 0x42, 0x8f, 0x02, 0x3f, 0xfe, 0x65, 0xaa, 0x21, 0x23, + 0x16, 0x29, 0xac, 0x06, 0x42, 0x88, 0x80, 0x29, 0x2a, 0x85, 0x82, 0x17, + 0x37, 0x83, 0x86, 0x34, 0xf9, 0xd5, 0x01, 0xd1, 0xfe, 0x2f, 0x05, 0xbc, + 0xfa, 0x44, 0x02, 0x6a, 0x01, 0xc5, 0x56, 0x7d, 0x60, 0x73, 0xfe, 0x3b, + 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x05, 0x10, 0x07, 0x2f, 0x00, 0x17, + 0x00, 0x1f, 0x00, 0x26, 0x00, 0x00, 0x01, 0x22, 0x2e, 0x02, 0x23, 0x22, + 0x06, 0x07, 0x23, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x36, + 0x37, 0x33, 0x0e, 0x01, 0x13, 0x03, 0x21, 0x03, 0x23, 0x01, 0x33, 0x09, + 0x01, 0x03, 0x26, 0x27, 0x06, 0x07, 0x03, 0x03, 0x18, 0x2b, 0x52, 0x4f, + 0x49, 0x22, 0x32, 0x33, 0x0e, 0x62, 0x0d, 0x73, 0x5b, 0x2e, 0x56, 0x4e, + 0x48, 0x20, 0x31, 0x30, 0x0f, 0x63, 0x0d, 0x71, 0xea, 0xb6, 0xfd, 0xb6, + 0xb4, 0xac, 0x02, 0x42, 0x8f, 0x02, 0x3f, 0xfe, 0x65, 0xaa, 0x21, 0x23, + 0x16, 0x29, 0xac, 0x06, 0x2d, 0x25, 0x2d, 0x25, 0x3c, 0x3d, 0x79, 0x89, + 0x25, 0x2d, 0x25, 0x3b, 0x3e, 0x79, 0x89, 0xf9, 0xd3, 0x01, 0xd1, 0xfe, + 0x2f, 0x05, 0xbc, 0xfa, 0x44, 0x02, 0x6a, 0x01, 0xc5, 0x56, 0x7d, 0x60, + 0x73, 0xfe, 0x3b, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x05, 0x10, + 0x07, 0x25, 0x12, 0x26, 0x00, 0x24, 0x00, 0x00, 0x11, 0x07, 0x00, 0x6a, + 0x00, 0x37, 0x01, 0x52, 0x00, 0x0a, 0xb4, 0x03, 0x02, 0x24, 0x05, 0x26, + 0x00, 0x2b, 0x35, 0x35, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x05, 0x10, + 0x07, 0x06, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x1f, 0x00, 0x26, 0x00, 0x00, + 0x01, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, 0x36, 0x33, 0x32, 0x16, + 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, 0x16, 0x33, 0x32, 0x36, + 0x01, 0x03, 0x21, 0x03, 0x23, 0x01, 0x33, 0x09, 0x01, 0x03, 0x26, 0x27, + 0x06, 0x07, 0x03, 0x03, 0x66, 0x7b, 0x66, 0x65, 0x78, 0x79, 0x64, 0x65, + 0x7c, 0x6c, 0x42, 0x33, 0x33, 0x42, 0x3c, 0x39, 0x34, 0x41, 0x01, 0x66, + 0xb6, 0xfd, 0xb6, 0xb4, 0xac, 0x02, 0x42, 0x8f, 0x02, 0x3f, 0xfe, 0x65, + 0xaa, 0x21, 0x23, 0x16, 0x29, 0xac, 0x06, 0x33, 0x62, 0x77, 0x75, 0x62, + 0x62, 0x73, 0x77, 0x5e, 0x38, 0x3d, 0x3d, 0x38, 0x38, 0x3d, 0x3d, 0xfa, + 0x07, 0x01, 0xd1, 0xfe, 0x2f, 0x05, 0xbc, 0xfa, 0x44, 0x02, 0x6a, 0x01, + 0xc5, 0x56, 0x7d, 0x60, 0x73, 0xfe, 0x3b, 0x00, 0x00, 0x02, 0xff, 0xfe, + 0x00, 0x00, 0x06, 0x81, 0x05, 0xb6, 0x00, 0x0f, 0x00, 0x13, 0x00, 0x4e, + 0x40, 0x2c, 0x0a, 0x0e, 0x0e, 0x11, 0x01, 0x00, 0x08, 0x0c, 0x01, 0x10, + 0x05, 0x05, 0x15, 0x05, 0x14, 0x09, 0x13, 0x06, 0x13, 0x49, 0x59, 0x10, + 0x03, 0x49, 0x59, 0x0a, 0x0d, 0x49, 0x59, 0x10, 0x0a, 0x10, 0x0a, 0x01, + 0x06, 0x03, 0x05, 0x12, 0x01, 0x0e, 0x49, 0x59, 0x01, 0x12, 0x00, 0x3f, + 0x2b, 0x00, 0x18, 0x3f, 0x3f, 0x12, 0x39, 0x39, 0x2f, 0x2f, 0x2b, 0x2b, + 0x2b, 0x11, 0x00, 0x33, 0x11, 0x01, 0x33, 0x11, 0x12, 0x17, 0x39, 0x11, + 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, 0x29, 0x01, 0x11, 0x21, 0x03, 0x23, + 0x01, 0x21, 0x15, 0x21, 0x11, 0x21, 0x15, 0x21, 0x11, 0x21, 0x01, 0x21, + 0x11, 0x23, 0x06, 0x81, 0xfd, 0x12, 0xfd, 0xfe, 0xe3, 0xb0, 0x02, 0xba, + 0x03, 0xc9, 0xfd, 0xbc, 0x02, 0x1d, 0xfd, 0xe3, 0x02, 0x44, 0xfb, 0x54, + 0x01, 0xbe, 0x76, 0x01, 0xd1, 0xfe, 0x2f, 0x05, 0xb6, 0x97, 0xfe, 0x29, + 0x96, 0xfd, 0xe6, 0x01, 0xd2, 0x02, 0xb5, 0x00, 0xff, 0xff, 0x00, 0x7d, + 0xfe, 0x14, 0x04, 0xcf, 0x05, 0xcb, 0x12, 0x26, 0x00, 0x26, 0x00, 0x00, + 0x10, 0x07, 0x00, 0x7a, 0x02, 0x02, 0x00, 0x00, 0xff, 0xff, 0x00, 0xc9, + 0x00, 0x00, 0x03, 0xf8, 0x07, 0x73, 0x12, 0x26, 0x00, 0x28, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x43, 0xff, 0xb7, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x01, + 0x0d, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, 0xff, 0xff, 0x00, 0xc9, + 0x00, 0x00, 0x03, 0xf8, 0x07, 0x73, 0x12, 0x26, 0x00, 0x28, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x76, 0x00, 0x3f, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x01, + 0x15, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc9, + 0x00, 0x00, 0x03, 0xf8, 0x07, 0x73, 0x00, 0x0e, 0x00, 0x1a, 0x00, 0x00, + 0x01, 0x3e, 0x01, 0x37, 0x33, 0x1e, 0x01, 0x17, 0x15, 0x23, 0x26, 0x27, + 0x06, 0x07, 0x23, 0x01, 0x21, 0x11, 0x21, 0x15, 0x21, 0x11, 0x21, 0x15, + 0x21, 0x11, 0x21, 0x01, 0x07, 0x7f, 0x66, 0x17, 0xa6, 0x16, 0x6d, 0x7d, + 0x77, 0x58, 0x85, 0x88, 0x53, 0x73, 0x02, 0xf1, 0xfc, 0xd1, 0x03, 0x2f, + 0xfd, 0x7b, 0x02, 0x5e, 0xfd, 0xa2, 0x02, 0x85, 0x06, 0x42, 0x88, 0x80, + 0x29, 0x2a, 0x85, 0x82, 0x17, 0x37, 0x83, 0x86, 0x34, 0xf9, 0xd5, 0x05, + 0xb6, 0x97, 0xfe, 0x29, 0x96, 0xfd, 0xe6, 0x00, 0xff, 0xff, 0x00, 0xc9, + 0x00, 0x00, 0x03, 0xf8, 0x07, 0x25, 0x12, 0x26, 0x00, 0x28, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x6a, 0x00, 0x12, 0x01, 0x52, 0x00, 0x0a, 0xb4, 0x02, + 0x01, 0x21, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x35, 0xff, 0xff, 0x00, 0x05, + 0x00, 0x00, 0x01, 0x8e, 0x07, 0x73, 0x12, 0x26, 0x00, 0x2c, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x43, 0xfe, 0x7c, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x01, + 0x05, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, 0xff, 0xff, 0x00, 0xb3, + 0x00, 0x00, 0x02, 0x3c, 0x07, 0x73, 0x12, 0x26, 0x00, 0x2c, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x76, 0xff, 0x2a, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x01, + 0x0d, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc7, + 0x00, 0x00, 0x02, 0x69, 0x07, 0x73, 0x00, 0x0e, 0x00, 0x12, 0x00, 0x00, + 0x03, 0x3e, 0x01, 0x37, 0x33, 0x1e, 0x01, 0x17, 0x15, 0x23, 0x26, 0x27, + 0x06, 0x07, 0x23, 0x01, 0x11, 0x33, 0x11, 0x39, 0x7f, 0x66, 0x17, 0xa6, + 0x16, 0x6d, 0x7d, 0x77, 0x58, 0x85, 0x88, 0x53, 0x73, 0x01, 0x02, 0xaa, + 0x06, 0x42, 0x88, 0x80, 0x29, 0x2a, 0x85, 0x82, 0x17, 0x37, 0x83, 0x86, + 0x34, 0xf9, 0xd5, 0x05, 0xb6, 0xfa, 0x4a, 0x00, 0xff, 0xff, 0x00, 0x05, + 0x00, 0x00, 0x02, 0x38, 0x07, 0x25, 0x12, 0x26, 0x00, 0x2c, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x6a, 0xfe, 0xd0, 0x01, 0x52, 0x00, 0x0a, 0xb4, 0x02, + 0x01, 0x19, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x35, 0x00, 0x02, 0x00, 0x2f, + 0x00, 0x00, 0x05, 0x48, 0x05, 0xb6, 0x00, 0x0c, 0x00, 0x17, 0x00, 0x57, + 0x40, 0x32, 0x11, 0x15, 0x15, 0x08, 0x04, 0x0d, 0x00, 0x00, 0x13, 0x04, + 0x06, 0x04, 0x18, 0x19, 0x14, 0x06, 0x07, 0x06, 0x49, 0x59, 0x11, 0x0f, + 0x07, 0x3f, 0x07, 0xaf, 0x07, 0xcf, 0x07, 0xdf, 0x07, 0x05, 0x0b, 0x03, + 0x07, 0x07, 0x04, 0x09, 0x09, 0x10, 0x4a, 0x59, 0x09, 0x03, 0x04, 0x15, + 0x4a, 0x59, 0x04, 0x12, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, 0x11, + 0x12, 0x00, 0x39, 0x18, 0x2f, 0x5f, 0x5e, 0x5d, 0x33, 0x2b, 0x11, 0x00, + 0x33, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x01, 0x10, 0x00, 0x29, 0x01, 0x11, 0x23, 0x35, 0x33, + 0x11, 0x21, 0x20, 0x00, 0x03, 0x10, 0x21, 0x23, 0x11, 0x21, 0x15, 0x21, + 0x11, 0x33, 0x20, 0x05, 0x48, 0xfe, 0x77, 0xfe, 0x8f, 0xfe, 0x7b, 0x9a, + 0x9a, 0x01, 0xb2, 0x01, 0x51, 0x01, 0x7c, 0xb5, 0xfd, 0xc7, 0xe7, 0x01, + 0x7b, 0xfe, 0x85, 0xbe, 0x02, 0x62, 0x02, 0xe9, 0xfe, 0x96, 0xfe, 0x81, + 0x02, 0x89, 0x96, 0x02, 0x97, 0xfe, 0x89, 0xfe, 0xa4, 0x02, 0x40, 0xfd, + 0xfc, 0x96, 0xfe, 0x0a, 0x00, 0x02, 0x00, 0xc9, 0x00, 0x00, 0x05, 0x3f, + 0x07, 0x2f, 0x00, 0x17, 0x00, 0x28, 0x00, 0x00, 0x01, 0x22, 0x2e, 0x02, + 0x23, 0x22, 0x06, 0x07, 0x23, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x33, + 0x32, 0x36, 0x37, 0x33, 0x0e, 0x01, 0x01, 0x23, 0x01, 0x23, 0x16, 0x15, + 0x11, 0x23, 0x11, 0x33, 0x01, 0x33, 0x26, 0x02, 0x37, 0x11, 0x33, 0x03, + 0xa7, 0x2b, 0x52, 0x4f, 0x49, 0x22, 0x32, 0x33, 0x0e, 0x62, 0x0d, 0x73, + 0x5b, 0x2e, 0x56, 0x4e, 0x48, 0x20, 0x31, 0x30, 0x0f, 0x63, 0x0d, 0x71, + 0x01, 0x3a, 0xc2, 0xfc, 0xe1, 0x08, 0x10, 0x9d, 0xc0, 0x03, 0x1d, 0x08, + 0x02, 0x0e, 0x02, 0x9f, 0x06, 0x2d, 0x25, 0x2d, 0x25, 0x3c, 0x3d, 0x79, + 0x89, 0x25, 0x2d, 0x25, 0x3b, 0x3e, 0x79, 0x89, 0xf9, 0xd3, 0x04, 0xcb, + 0xd8, 0xb4, 0xfc, 0xc1, 0x05, 0xb6, 0xfb, 0x3a, 0x1b, 0x01, 0x25, 0x3f, + 0x03, 0x47, 0x00, 0x00, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xec, 0x05, 0xbe, + 0x07, 0x73, 0x12, 0x26, 0x00, 0x32, 0x00, 0x00, 0x11, 0x07, 0x00, 0x43, + 0x00, 0x79, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x02, 0x19, 0x05, 0x26, 0x00, + 0x2b, 0x35, 0x00, 0x00, 0xff, 0xff, 0x00, 0x7d, 0xff, 0xec, 0x05, 0xbe, + 0x07, 0x73, 0x12, 0x26, 0x00, 0x32, 0x00, 0x00, 0x11, 0x07, 0x00, 0x76, + 0x01, 0x0a, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x02, 0x21, 0x05, 0x26, 0x00, + 0x2b, 0x35, 0x00, 0x00, 0x00, 0x03, 0x00, 0x7d, 0xff, 0xec, 0x05, 0xbe, + 0x07, 0x73, 0x00, 0x0e, 0x00, 0x1a, 0x00, 0x26, 0x00, 0x00, 0x01, 0x3e, + 0x01, 0x37, 0x33, 0x1e, 0x01, 0x17, 0x15, 0x23, 0x26, 0x27, 0x06, 0x07, + 0x23, 0x01, 0x10, 0x00, 0x21, 0x20, 0x00, 0x11, 0x10, 0x00, 0x21, 0x20, + 0x00, 0x01, 0x10, 0x12, 0x33, 0x32, 0x12, 0x11, 0x10, 0x02, 0x23, 0x22, + 0x02, 0x01, 0xc0, 0x7f, 0x66, 0x17, 0xa6, 0x16, 0x6d, 0x7d, 0x77, 0x58, + 0x85, 0x88, 0x53, 0x73, 0x03, 0xfe, 0xfe, 0x9d, 0xfe, 0xc4, 0xfe, 0xbd, + 0xfe, 0xa1, 0x01, 0x60, 0x01, 0x44, 0x01, 0x3b, 0x01, 0x62, 0xfb, 0x73, + 0xfd, 0xf1, 0xf3, 0xf8, 0xf7, 0xf2, 0xf3, 0xfd, 0x06, 0x42, 0x88, 0x80, + 0x29, 0x2a, 0x85, 0x82, 0x17, 0x37, 0x83, 0x86, 0x34, 0xfc, 0xb2, 0xfe, + 0xa1, 0xfe, 0x6e, 0x01, 0x8b, 0x01, 0x68, 0x01, 0x65, 0x01, 0x89, 0xfe, + 0x70, 0xfe, 0xa0, 0xfe, 0xd7, 0xfe, 0xcd, 0x01, 0x32, 0x01, 0x2a, 0x01, + 0x27, 0x01, 0x31, 0xfe, 0xcd, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x7d, + 0xff, 0xec, 0x05, 0xbe, 0x07, 0x2f, 0x00, 0x17, 0x00, 0x23, 0x00, 0x2f, + 0x00, 0x00, 0x01, 0x22, 0x2e, 0x02, 0x23, 0x22, 0x06, 0x07, 0x23, 0x3e, + 0x01, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x37, 0x33, 0x0e, 0x01, + 0x01, 0x10, 0x00, 0x21, 0x20, 0x00, 0x11, 0x10, 0x00, 0x21, 0x20, 0x00, + 0x01, 0x10, 0x12, 0x33, 0x32, 0x12, 0x11, 0x10, 0x02, 0x23, 0x22, 0x02, + 0x03, 0xae, 0x2b, 0x52, 0x4f, 0x49, 0x22, 0x32, 0x33, 0x0e, 0x62, 0x0d, + 0x73, 0x5b, 0x2e, 0x56, 0x4e, 0x48, 0x20, 0x31, 0x30, 0x0f, 0x63, 0x0d, + 0x71, 0x01, 0xb2, 0xfe, 0x9d, 0xfe, 0xc4, 0xfe, 0xbd, 0xfe, 0xa1, 0x01, + 0x60, 0x01, 0x44, 0x01, 0x3b, 0x01, 0x62, 0xfb, 0x73, 0xfd, 0xf1, 0xf3, + 0xf8, 0xf7, 0xf2, 0xf3, 0xfd, 0x06, 0x2d, 0x25, 0x2d, 0x25, 0x3c, 0x3d, + 0x79, 0x89, 0x25, 0x2d, 0x25, 0x3b, 0x3e, 0x79, 0x89, 0xfc, 0xb0, 0xfe, + 0xa1, 0xfe, 0x6e, 0x01, 0x8b, 0x01, 0x68, 0x01, 0x65, 0x01, 0x89, 0xfe, + 0x70, 0xfe, 0xa0, 0xfe, 0xd7, 0xfe, 0xcd, 0x01, 0x32, 0x01, 0x2a, 0x01, + 0x27, 0x01, 0x31, 0xfe, 0xcd, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x7d, + 0xff, 0xec, 0x05, 0xbe, 0x07, 0x25, 0x12, 0x26, 0x00, 0x32, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x6a, 0x00, 0xd5, 0x01, 0x52, 0x00, 0x0a, 0xb4, 0x03, + 0x02, 0x2d, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x35, 0x00, 0x01, 0x00, 0x85, + 0x01, 0x10, 0x04, 0x0c, 0x04, 0x98, 0x00, 0x0b, 0x00, 0x19, 0x40, 0x09, + 0x07, 0x09, 0x03, 0x01, 0x09, 0x01, 0x0c, 0x0d, 0x08, 0x00, 0x19, 0x2f, + 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, + 0x17, 0x09, 0x01, 0x07, 0x09, 0x01, 0x27, 0x09, 0x01, 0x37, 0x01, 0x03, + 0xac, 0x60, 0xfe, 0xa0, 0x01, 0x5e, 0x60, 0xfe, 0x9e, 0xfe, 0xa4, 0x65, + 0x01, 0x5e, 0xfe, 0xa0, 0x64, 0x01, 0x61, 0x04, 0x98, 0x63, 0xfe, 0x9e, + 0xfe, 0xa0, 0x63, 0x01, 0x5f, 0xfe, 0xa1, 0x63, 0x01, 0x60, 0x01, 0x60, + 0x65, 0xfe, 0x9d, 0x00, 0x00, 0x03, 0x00, 0x7d, 0xff, 0xc3, 0x05, 0xbe, + 0x05, 0xf6, 0x00, 0x13, 0x00, 0x1b, 0x00, 0x23, 0x00, 0x4e, 0x40, 0x2c, + 0x16, 0x1f, 0x17, 0x1e, 0x04, 0x1c, 0x14, 0x1c, 0x0a, 0x14, 0x00, 0x00, + 0x12, 0x0f, 0x05, 0x08, 0x0a, 0x06, 0x24, 0x25, 0x16, 0x1e, 0x21, 0x19, + 0x0d, 0x21, 0x49, 0x59, 0x0f, 0x12, 0x08, 0x05, 0x04, 0x03, 0x10, 0x0d, + 0x04, 0x03, 0x19, 0x49, 0x59, 0x06, 0x03, 0x13, 0x00, 0x3f, 0xc6, 0x2b, + 0x00, 0x18, 0x3f, 0xc6, 0x12, 0x17, 0x39, 0x2b, 0x11, 0x12, 0x00, 0x39, + 0x39, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x12, + 0x17, 0x39, 0x31, 0x30, 0x01, 0x10, 0x00, 0x21, 0x22, 0x27, 0x07, 0x27, + 0x37, 0x26, 0x11, 0x10, 0x00, 0x21, 0x32, 0x17, 0x37, 0x17, 0x07, 0x16, + 0x03, 0x10, 0x27, 0x01, 0x16, 0x33, 0x32, 0x12, 0x01, 0x10, 0x17, 0x01, + 0x26, 0x23, 0x22, 0x02, 0x05, 0xbe, 0xfe, 0x9d, 0xfe, 0xc4, 0xeb, 0x94, + 0x65, 0x78, 0x6c, 0xb2, 0x01, 0x60, 0x01, 0x44, 0xd1, 0x9d, 0x61, 0x78, + 0x6a, 0xc0, 0xb4, 0x6e, 0xfd, 0x60, 0x73, 0xb0, 0xf3, 0xf8, 0xfc, 0x27, + 0x65, 0x02, 0x9d, 0x6a, 0xa8, 0xf3, 0xfd, 0x02, 0xdd, 0xfe, 0xa1, 0xfe, + 0x6e, 0x64, 0x8d, 0x4f, 0x9a, 0xc6, 0x01, 0x6d, 0x01, 0x65, 0x01, 0x89, + 0x5e, 0x87, 0x50, 0x94, 0xca, 0xfe, 0x95, 0x01, 0x10, 0x9a, 0xfc, 0x4c, + 0x52, 0x01, 0x32, 0x01, 0x2a, 0xfe, 0xfa, 0x9a, 0x03, 0xaf, 0x49, 0xfe, + 0xcd, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0xba, 0xff, 0xec, 0x05, 0x19, + 0x07, 0x73, 0x12, 0x26, 0x00, 0x38, 0x00, 0x00, 0x11, 0x07, 0x00, 0x43, + 0x00, 0x46, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x01, 0x13, 0x05, 0x26, 0x00, + 0x2b, 0x35, 0x00, 0x00, 0xff, 0xff, 0x00, 0xba, 0xff, 0xec, 0x05, 0x19, + 0x07, 0x73, 0x12, 0x26, 0x00, 0x38, 0x00, 0x00, 0x11, 0x07, 0x00, 0x76, + 0x00, 0xcf, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x01, 0x1b, 0x05, 0x26, 0x00, + 0x2b, 0x35, 0x00, 0x00, 0x00, 0x02, 0x00, 0xba, 0xff, 0xec, 0x05, 0x19, + 0x07, 0x73, 0x00, 0x0e, 0x00, 0x20, 0x00, 0x00, 0x01, 0x3e, 0x01, 0x37, + 0x33, 0x1e, 0x01, 0x17, 0x15, 0x23, 0x26, 0x27, 0x06, 0x07, 0x23, 0x05, + 0x11, 0x14, 0x00, 0x21, 0x20, 0x00, 0x35, 0x11, 0x33, 0x11, 0x14, 0x16, + 0x33, 0x32, 0x36, 0x35, 0x11, 0x01, 0x89, 0x7f, 0x66, 0x17, 0xa6, 0x16, + 0x6d, 0x7d, 0x77, 0x58, 0x85, 0x88, 0x53, 0x73, 0x03, 0x90, 0xfe, 0xd2, + 0xfe, 0xf8, 0xfe, 0xf8, 0xfe, 0xdf, 0xaa, 0xc8, 0xc2, 0xb9, 0xc8, 0x06, + 0x42, 0x88, 0x80, 0x29, 0x2a, 0x85, 0x82, 0x17, 0x37, 0x83, 0x86, 0x34, + 0x75, 0xfc, 0x4e, 0xfa, 0xfe, 0xe2, 0x01, 0x20, 0xfc, 0x03, 0xae, 0xfc, + 0x46, 0xb7, 0xc4, 0xc5, 0xb8, 0x03, 0xb8, 0x00, 0xff, 0xff, 0x00, 0xba, + 0xff, 0xec, 0x05, 0x19, 0x07, 0x25, 0x12, 0x26, 0x00, 0x38, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x6a, 0x00, 0x98, 0x01, 0x52, 0x00, 0x0a, 0xb4, 0x02, + 0x01, 0x27, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x35, 0xff, 0xff, 0x00, 0x00, + 0x00, 0x00, 0x04, 0x7b, 0x07, 0x73, 0x12, 0x26, 0x00, 0x3c, 0x00, 0x00, + 0x11, 0x07, 0x00, 0x76, 0x00, 0x31, 0x01, 0x52, 0x00, 0x08, 0xb3, 0x01, + 0x12, 0x05, 0x26, 0x00, 0x2b, 0x35, 0x00, 0x00, 0x00, 0x02, 0x00, 0xc9, + 0x00, 0x00, 0x04, 0x79, 0x05, 0xb6, 0x00, 0x0c, 0x00, 0x15, 0x00, 0x36, + 0x40, 0x1c, 0x0d, 0x09, 0x05, 0x05, 0x06, 0x11, 0x00, 0x06, 0x00, 0x16, + 0x17, 0x0d, 0x04, 0x4a, 0x59, 0x09, 0x15, 0x4a, 0x59, 0x0d, 0x09, 0x0d, + 0x09, 0x06, 0x07, 0x03, 0x06, 0x12, 0x00, 0x3f, 0x3f, 0x12, 0x39, 0x39, + 0x2f, 0x2f, 0x2b, 0x2b, 0x11, 0x12, 0x01, 0x39, 0x39, 0x11, 0x33, 0x11, + 0x33, 0x11, 0x33, 0x33, 0x31, 0x30, 0x01, 0x14, 0x04, 0x21, 0x23, 0x11, + 0x23, 0x11, 0x33, 0x11, 0x33, 0x20, 0x04, 0x01, 0x33, 0x32, 0x36, 0x35, + 0x34, 0x26, 0x2b, 0x01, 0x04, 0x79, 0xfe, 0xd1, 0xfe, 0xe1, 0xb8, 0xaa, + 0xaa, 0xd7, 0x01, 0x19, 0x01, 0x16, 0xfc, 0xfa, 0xa8, 0xe2, 0xca, 0xbe, + 0xca, 0xcc, 0x03, 0x10, 0xe3, 0xee, 0xfe, 0xc1, 0x05, 0xb6, 0xff, 0x00, + 0xcf, 0xfd, 0xea, 0x8f, 0xa4, 0x95, 0x8a, 0x00, 0x00, 0x01, 0x00, 0xb0, + 0xff, 0xec, 0x04, 0x9c, 0x06, 0x1f, 0x00, 0x30, 0x00, 0x41, 0x40, 0x22, + 0x29, 0x2a, 0x05, 0x1d, 0x23, 0x00, 0x17, 0x0c, 0x0c, 0x00, 0x1d, 0x11, + 0x2a, 0x05, 0x31, 0x32, 0x12, 0x12, 0x2a, 0x2e, 0x2e, 0x26, 0x46, 0x59, + 0x2e, 0x00, 0x2a, 0x15, 0x0f, 0x15, 0x46, 0x59, 0x0f, 0x16, 0x00, 0x3f, + 0x2b, 0x00, 0x18, 0x3f, 0x3f, 0x2b, 0x11, 0x12, 0x00, 0x39, 0x18, 0x2f, + 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x11, 0x33, 0x11, 0x33, 0x11, + 0x33, 0x31, 0x30, 0x01, 0x14, 0x07, 0x0e, 0x01, 0x15, 0x14, 0x1e, 0x01, + 0x17, 0x1e, 0x01, 0x15, 0x14, 0x06, 0x23, 0x22, 0x27, 0x35, 0x1e, 0x01, + 0x33, 0x32, 0x35, 0x34, 0x26, 0x27, 0x2e, 0x01, 0x35, 0x34, 0x36, 0x37, + 0x3e, 0x01, 0x35, 0x34, 0x26, 0x23, 0x20, 0x15, 0x11, 0x23, 0x11, 0x34, + 0x36, 0x33, 0x32, 0x16, 0x04, 0x19, 0x8f, 0x58, 0x38, 0x1b, 0x47, 0x4e, + 0x8c, 0x66, 0xc2, 0xb3, 0xbc, 0x6b, 0x3f, 0x9c, 0x48, 0xd7, 0x53, 0x6e, + 0x7f, 0x60, 0x45, 0x47, 0x4b, 0x40, 0x88, 0x7f, 0xfe, 0xec, 0xa6, 0xdc, + 0xde, 0xce, 0xe1, 0x04, 0xf2, 0x87, 0x73, 0x46, 0x43, 0x21, 0x20, 0x2a, + 0x39, 0x33, 0x5f, 0x9d, 0x65, 0xa0, 0xab, 0x45, 0x9a, 0x27, 0x2f, 0xb6, + 0x4b, 0x6b, 0x46, 0x52, 0x7b, 0x54, 0x3f, 0x6a, 0x35, 0x39, 0x5a, 0x35, + 0x50, 0x55, 0xdf, 0xfb, 0x4c, 0x04, 0xb2, 0xb2, 0xbb, 0x9d, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x5e, 0xff, 0xec, 0x03, 0xcd, 0x06, 0x21, 0x12, 0x26, + 0x00, 0x44, 0x00, 0x00, 0x11, 0x06, 0x00, 0x43, 0x8e, 0x00, 0x00, 0x08, + 0xb3, 0x02, 0x26, 0x11, 0x26, 0x00, 0x2b, 0x35, 0xff, 0xff, 0x00, 0x5e, + 0xff, 0xec, 0x03, 0xcd, 0x06, 0x21, 0x12, 0x26, 0x00, 0x44, 0x00, 0x00, + 0x11, 0x06, 0x00, 0x76, 0x2b, 0x00, 0x00, 0x08, 0xb3, 0x02, 0x2e, 0x11, + 0x26, 0x00, 0x2b, 0x35, 0x00, 0x03, 0x00, 0x5e, 0xff, 0xec, 0x03, 0xcd, + 0x06, 0x21, 0x00, 0x0e, 0x00, 0x28, 0x00, 0x33, 0x00, 0x00, 0x13, 0x3e, + 0x01, 0x37, 0x33, 0x1e, 0x01, 0x17, 0x15, 0x23, 0x26, 0x27, 0x06, 0x07, + 0x23, 0x01, 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x10, 0x25, + 0x37, 0x35, 0x34, 0x26, 0x23, 0x22, 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, + 0x16, 0x15, 0x11, 0x25, 0x32, 0x36, 0x3d, 0x01, 0x07, 0x0e, 0x01, 0x15, + 0x14, 0x16, 0xe4, 0x7f, 0x66, 0x17, 0xa6, 0x16, 0x6d, 0x7d, 0x77, 0x58, + 0x85, 0x88, 0x53, 0x73, 0x02, 0x6e, 0x21, 0x08, 0x52, 0xa3, 0x7a, 0xa3, + 0xb9, 0x02, 0x13, 0xba, 0x6f, 0x7a, 0x89, 0xad, 0x33, 0x51, 0xc1, 0x61, + 0xc4, 0xbd, 0xfe, 0x0e, 0x9b, 0xb1, 0xa6, 0xc6, 0xaf, 0x6d, 0x04, 0xf0, + 0x88, 0x80, 0x29, 0x2a, 0x85, 0x82, 0x17, 0x37, 0x83, 0x86, 0x34, 0xfb, + 0x27, 0x9c, 0x67, 0x49, 0xa8, 0x9b, 0x01, 0x4c, 0x10, 0x06, 0x44, 0x81, + 0x7b, 0x54, 0x7f, 0x2c, 0x32, 0xae, 0xc0, 0xfd, 0x14, 0x75, 0xaa, 0x99, + 0x63, 0x07, 0x07, 0x6d, 0x73, 0x5a, 0x5e, 0x00, 0x00, 0x03, 0x00, 0x5e, + 0xff, 0xec, 0x03, 0xcd, 0x05, 0xdd, 0x00, 0x17, 0x00, 0x31, 0x00, 0x3c, + 0x00, 0x00, 0x01, 0x22, 0x2e, 0x02, 0x23, 0x22, 0x06, 0x07, 0x23, 0x3e, + 0x01, 0x33, 0x32, 0x1e, 0x02, 0x33, 0x32, 0x36, 0x37, 0x33, 0x0e, 0x01, + 0x13, 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x10, 0x25, 0x37, + 0x35, 0x34, 0x26, 0x23, 0x22, 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, + 0x15, 0x11, 0x25, 0x32, 0x36, 0x3d, 0x01, 0x07, 0x0e, 0x01, 0x15, 0x14, + 0x16, 0x02, 0xd1, 0x2b, 0x52, 0x4f, 0x49, 0x22, 0x32, 0x33, 0x0e, 0x62, + 0x0d, 0x73, 0x5b, 0x2e, 0x56, 0x4e, 0x48, 0x20, 0x31, 0x30, 0x0f, 0x63, + 0x0d, 0x71, 0x23, 0x21, 0x08, 0x52, 0xa3, 0x7a, 0xa3, 0xb9, 0x02, 0x13, + 0xba, 0x6f, 0x7a, 0x89, 0xad, 0x33, 0x51, 0xc1, 0x61, 0xc4, 0xbd, 0xfe, + 0x0e, 0x9b, 0xb1, 0xa6, 0xc6, 0xaf, 0x6d, 0x04, 0xdb, 0x25, 0x2d, 0x25, + 0x3c, 0x3d, 0x79, 0x89, 0x25, 0x2d, 0x25, 0x3b, 0x3e, 0x79, 0x89, 0xfb, + 0x25, 0x9c, 0x67, 0x49, 0xa8, 0x9b, 0x01, 0x4c, 0x10, 0x06, 0x44, 0x81, + 0x7b, 0x54, 0x7f, 0x2c, 0x32, 0xae, 0xc0, 0xfd, 0x14, 0x75, 0xaa, 0x99, + 0x63, 0x07, 0x07, 0x6d, 0x73, 0x5a, 0x5e, 0x00, 0xff, 0xff, 0x00, 0x5e, + 0xff, 0xec, 0x03, 0xcd, 0x05, 0xd3, 0x12, 0x26, 0x00, 0x44, 0x00, 0x00, + 0x11, 0x06, 0x00, 0x6a, 0xe2, 0x00, 0x00, 0x0a, 0xb4, 0x03, 0x02, 0x3a, + 0x11, 0x26, 0x00, 0x2b, 0x35, 0x35, 0x00, 0x00, 0x00, 0x04, 0x00, 0x5e, + 0xff, 0xec, 0x03, 0xcd, 0x06, 0x85, 0x00, 0x0b, 0x00, 0x17, 0x00, 0x31, + 0x00, 0x3c, 0x00, 0x00, 0x01, 0x14, 0x06, 0x23, 0x22, 0x26, 0x35, 0x34, + 0x36, 0x33, 0x32, 0x16, 0x07, 0x34, 0x26, 0x23, 0x22, 0x06, 0x15, 0x14, + 0x16, 0x33, 0x32, 0x36, 0x13, 0x27, 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, + 0x35, 0x10, 0x25, 0x37, 0x35, 0x34, 0x26, 0x23, 0x22, 0x07, 0x27, 0x3e, + 0x01, 0x33, 0x32, 0x16, 0x15, 0x11, 0x25, 0x32, 0x36, 0x3d, 0x01, 0x07, + 0x0e, 0x01, 0x15, 0x14, 0x16, 0x03, 0x24, 0x7b, 0x66, 0x65, 0x78, 0x79, + 0x64, 0x65, 0x7c, 0x6c, 0x42, 0x33, 0x33, 0x42, 0x3c, 0x39, 0x34, 0x41, + 0x9a, 0x21, 0x08, 0x52, 0xa3, 0x7a, 0xa3, 0xb9, 0x02, 0x13, 0xba, 0x6f, + 0x7a, 0x89, 0xad, 0x33, 0x51, 0xc1, 0x61, 0xc4, 0xbd, 0xfe, 0x0e, 0x9b, + 0xb1, 0xa6, 0xc6, 0xaf, 0x6d, 0x05, 0xb2, 0x62, 0x77, 0x75, 0x62, 0x62, + 0x73, 0x77, 0x5e, 0x38, 0x3d, 0x3d, 0x38, 0x38, 0x3d, 0x3d, 0xfa, 0x88, + 0x9c, 0x67, 0x49, 0xa8, 0x9b, 0x01, 0x4c, 0x10, 0x06, 0x44, 0x81, 0x7b, + 0x54, 0x7f, 0x2c, 0x32, 0xae, 0xc0, 0xfd, 0x14, 0x75, 0xaa, 0x99, 0x63, + 0x07, 0x07, 0x6d, 0x73, 0x5a, 0x5e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x5e, + 0xff, 0xec, 0x06, 0x73, 0x04, 0x5c, 0x00, 0x29, 0x00, 0x34, 0x00, 0x3b, + 0x00, 0x61, 0x40, 0x33, 0x2a, 0x00, 0x24, 0x11, 0x30, 0x38, 0x19, 0x19, + 0x04, 0x30, 0x39, 0x18, 0x18, 0x1f, 0x30, 0x0b, 0x00, 0x05, 0x3c, 0x3d, + 0x1b, 0x2d, 0x27, 0x2d, 0x46, 0x59, 0x19, 0x31, 0x04, 0x31, 0x47, 0x59, + 0x38, 0x24, 0x27, 0x11, 0x04, 0x04, 0x0e, 0x22, 0x27, 0x16, 0x35, 0x08, + 0x0e, 0x08, 0x46, 0x59, 0x14, 0x0e, 0x10, 0x00, 0x3f, 0x33, 0x2b, 0x11, + 0x00, 0x33, 0x18, 0x3f, 0x33, 0x12, 0x39, 0x2f, 0x39, 0x12, 0x39, 0x33, + 0x2b, 0x11, 0x00, 0x33, 0x2b, 0x11, 0x00, 0x33, 0x11, 0x12, 0x01, 0x17, + 0x39, 0x11, 0x33, 0x11, 0x33, 0x33, 0x11, 0x33, 0x12, 0x39, 0x39, 0x11, + 0x33, 0x31, 0x30, 0x13, 0x34, 0x36, 0x3f, 0x01, 0x35, 0x34, 0x26, 0x23, + 0x22, 0x07, 0x27, 0x3e, 0x01, 0x33, 0x32, 0x16, 0x17, 0x3e, 0x01, 0x33, + 0x32, 0x12, 0x1d, 0x01, 0x21, 0x12, 0x21, 0x32, 0x36, 0x37, 0x15, 0x0e, + 0x01, 0x23, 0x20, 0x27, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x37, 0x14, 0x16, + 0x33, 0x32, 0x36, 0x3d, 0x01, 0x07, 0x0e, 0x01, 0x01, 0x22, 0x06, 0x07, + 0x21, 0x34, 0x26, 0x5e, 0xf8, 0xfe, 0xb8, 0x74, 0x77, 0x90, 0xa3, 0x34, + 0x4a, 0xc7, 0x62, 0x82, 0xa5, 0x29, 0x35, 0xab, 0x6e, 0xc0, 0xe8, 0xfd, + 0x43, 0x08, 0x01, 0x3a, 0x5b, 0x9d, 0x54, 0x56, 0x95, 0x65, 0xfe, 0xdf, + 0x7d, 0x51, 0xc5, 0x86, 0xa3, 0xb9, 0xae, 0x6b, 0x58, 0x91, 0xa8, 0x9e, + 0xba, 0xa4, 0x03, 0xbd, 0x79, 0x8b, 0x0b, 0x02, 0x07, 0x80, 0x01, 0x2f, + 0xa1, 0xb3, 0x08, 0x06, 0x44, 0x81, 0x7b, 0x54, 0x7f, 0x29, 0x35, 0x57, + 0x5f, 0x58, 0x60, 0xfe, 0xf5, 0xde, 0x6b, 0xfe, 0x75, 0x23, 0x27, 0x94, + 0x26, 0x21, 0xe9, 0x7f, 0x6a, 0xaa, 0x97, 0x5f, 0x59, 0xa9, 0x9a, 0x63, + 0x07, 0x08, 0x6d, 0x02, 0x32, 0xa6, 0x9e, 0x9c, 0xa8, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x73, 0xfe, 0x14, 0x03, 0x8b, 0x04, 0x5c, 0x12, 0x26, + 0x00, 0x46, 0x00, 0x00, 0x10, 0x07, 0x00, 0x7a, 0x01, 0x46, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x73, 0xff, 0xec, 0x04, 0x12, 0x06, 0x21, 0x12, 0x26, + 0x00, 0x48, 0x00, 0x00, 0x11, 0x06, 0x00, 0x43, 0xb5, 0x00, 0x00, 0x08, + 0xb3, 0x02, 0x1c, 0x11, 0x26, 0x00, 0x2b, 0x35, 0xff, 0xff, 0x00, 0x73, + 0xff, 0xec, 0x04, 0x12, 0x06, 0x21, 0x12, 0x26, 0x00, 0x48, 0x00, 0x00, + 0x11, 0x06, 0x00, 0x76, 0x4e, 0x00, 0x00, 0x08, 0xb3, 0x02, 0x24, 0x11, + 0x26, 0x00, 0x2b, 0x35, 0x00, 0x03, 0x00, 0x73, 0xff, 0xec, 0x04, 0x12, + 0x06, 0x21, 0x00, 0x0e, 0x00, 0x22, 0x00, 0x29, 0x00, 0x00, 0x01, 0x3e, + 0x01, 0x37, 0x33, 0x1e, 0x01, 0x17, 0x15, 0x23, 0x26, 0x27, 0x06, 0x07, + 0x23, 0x01, 0x22, 0x00, 0x11, 0x10, 0x00, 0x33, 0x32, 0x12, 0x1d, 0x01, + 0x21, 0x1e, 0x01, 0x33, 0x32, 0x37, 0x15, 0x0e, 0x01, 0x03, 0x22, 0x06, + 0x07, 0x21, 0x34, 0x26, 0x01, 0x03, 0x7f, 0x66, 0x17, 0xa6, 0x16, 0x6d, + 0x7d, 0x77, 0x58, 0x85, 0x88, 0x53, 0x73, 0x01, 0x7c, 0xf3, 0xfe, 0xe7, + 0x01, 0x05, 0xdc, 0xce, 0xf0, 0xfd, 0x0d, 0x05, 0xb9, 0xa8, 0xb1, 0xad, + 0x58, 0x9d, 0x9c, 0x84, 0x9d, 0x0e, 0x02, 0x3d, 0x8c, 0x04, 0xf0, 0x88, + 0x80, 0x29, 0x2a, 0x85, 0x82, 0x17, 0x37, 0x83, 0x86, 0x34, 0xfb, 0x13, + 0x01, 0x28, 0x01, 0x07, 0x01, 0x09, 0x01, 0x38, 0xfe, 0xf1, 0xde, 0x69, + 0xc1, 0xc8, 0x4a, 0x94, 0x26, 0x21, 0x03, 0xe5, 0xac, 0x98, 0x9d, 0xa7, + 0xff, 0xff, 0x00, 0x73, 0xff, 0xec, 0x04, 0x12, 0x05, 0xd3, 0x12, 0x26, + 0x00, 0x48, 0x00, 0x00, 0x11, 0x06, 0x00, 0x6a, 0x0a, 0x00, 0x00, 0x0a, + 0xb4, 0x03, 0x02, 0x30, 0x11, 0x26, 0x00, 0x2b, 0x35, 0x35, 0x00, 0x00, + 0x00, 0x02, 0xff, 0xda, 0x00, 0x00, 0x01, 0x63, 0x06, 0x21, 0x00, 0x03, + 0x00, 0x0d, 0x00, 0x00, 0x21, 0x23, 0x11, 0x33, 0x37, 0x23, 0x2e, 0x01, + 0x27, 0x35, 0x33, 0x1e, 0x01, 0x17, 0x01, 0x56, 0xa6, 0xa6, 0x0d, 0x6e, + 0x41, 0xb2, 0x28, 0xcb, 0x20, 0x72, 0x2c, 0x04, 0x48, 0x91, 0x34, 0xc0, + 0x3f, 0x15, 0x45, 0xb5, 0x35, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0xa9, + 0x00, 0x00, 0x02, 0x32, 0x06, 0x21, 0x00, 0x03, 0x00, 0x0d, 0x00, 0x00, + 0x21, 0x23, 0x11, 0x33, 0x27, 0x3e, 0x01, 0x37, 0x33, 0x15, 0x0e, 0x01, + 0x07, 0x23, 0x01, 0x56, 0xa6, 0xa6, 0xad, 0x30, 0x6f, 0x20, 0xca, 0x2c, + 0xae, 0x40, 0x6f, 0x04, 0x48, 0xaa, 0x3e, 0xb0, 0x41, 0x15, 0x41, 0xbe, + 0x34, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb3, 0x00, 0x00, 0x02, 0x55, + 0x06, 0x21, 0x00, 0x0e, 0x00, 0x12, 0x00, 0x00, 0x03, 0x3e, 0x01, 0x37, + 0x33, 0x1e, 0x01, 0x17, 0x15, 0x23, 0x26, 0x27, 0x06, 0x07, 0x23, 0x01, + 0x23, 0x11, 0x33, 0x4d, 0x7f, 0x66, 0x17, 0xa6, 0x16, 0x6d, 0x7d, 0x77, + 0x58, 0x85, 0x88, 0x53, 0x73, 0x01, 0xa3, 0xa6, 0xa6, 0x04, 0xf0, 0x88, + 0x80, 0x29, 0x2a, 0x85, 0x82, 0x17, 0x37, 0x83, 0x86, 0x34, 0xfb, 0x27, + 0x04, 0x48, 0x00, 0x00, 0x00, 0x03, 0xff, 0xec, 0x00, 0x00, 0x02, 0x1f, + 0x05, 0xd3, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x1b, 0x00, 0x00, 0x21, 0x23, + 0x11, 0x33, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, + 0x22, 0x26, 0x25, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, 0x14, 0x06, 0x23, + 0x22, 0x26, 0x01, 0x56, 0xa6, 0xa6, 0xfe, 0x96, 0x35, 0x25, 0x26, 0x37, + 0x37, 0x26, 0x25, 0x35, 0x01, 0x7d, 0x35, 0x25, 0x25, 0x37, 0x37, 0x25, + 0x25, 0x35, 0x04, 0x48, 0x01, 0x29, 0x34, 0x2e, 0x2e, 0x34, 0x32, 0x31, + 0x31, 0x32, 0x34, 0x2e, 0x2e, 0x34, 0x32, 0x31, 0x31, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x71, 0xff, 0xec, 0x04, 0x62, 0x06, 0x21, 0x00, 0x1b, + 0x00, 0x26, 0x00, 0x4a, 0x40, 0x2b, 0x21, 0x06, 0x0c, 0x1c, 0x1c, 0x00, + 0x00, 0x18, 0x19, 0x16, 0x0e, 0x11, 0x13, 0x10, 0x06, 0x09, 0x27, 0x28, + 0x09, 0x1f, 0x46, 0x59, 0x0b, 0x03, 0x16, 0x11, 0x19, 0x0e, 0x0f, 0x05, + 0x14, 0x09, 0x09, 0x03, 0x17, 0x14, 0x01, 0x03, 0x24, 0x46, 0x59, 0x03, + 0x16, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x33, 0x12, 0x39, 0x2f, 0x12, + 0x17, 0x39, 0x12, 0x39, 0x2b, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, + 0x11, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x10, 0x00, 0x23, 0x22, 0x00, + 0x35, 0x34, 0x00, 0x33, 0x32, 0x17, 0x37, 0x26, 0x27, 0x05, 0x27, 0x37, + 0x26, 0x27, 0x37, 0x16, 0x17, 0x37, 0x17, 0x07, 0x16, 0x12, 0x03, 0x34, + 0x26, 0x23, 0x20, 0x11, 0x14, 0x16, 0x33, 0x32, 0x36, 0x04, 0x62, 0xfe, + 0xfb, 0xf7, 0xde, 0xfe, 0xe9, 0x01, 0x07, 0xdc, 0xe2, 0x64, 0x08, 0x39, + 0xcd, 0xfe, 0xf1, 0x49, 0xe9, 0x5c, 0x5e, 0x45, 0x9c, 0x66, 0xee, 0x4c, + 0xcf, 0x98, 0xa5, 0xa8, 0xb4, 0x9c, 0xfe, 0xaf, 0xaf, 0xa2, 0xaf, 0xa1, + 0x02, 0x33, 0xfe, 0xe7, 0xfe, 0xd2, 0x01, 0x0d, 0xe2, 0xe6, 0x01, 0x06, + 0x79, 0x04, 0xd6, 0xbf, 0x9b, 0x6c, 0x85, 0x3e, 0x31, 0x75, 0x49, 0x4b, + 0x8a, 0x6b, 0x77, 0x8f, 0xfe, 0x72, 0xfe, 0xe8, 0x93, 0xaa, 0xfe, 0x98, + 0xa7, 0xb7, 0xc9, 0x00, 0x00, 0x02, 0x00, 0xb0, 0x00, 0x00, 0x04, 0x44, + 0x05, 0xdd, 0x00, 0x17, 0x00, 0x2c, 0x00, 0x00, 0x01, 0x22, 0x2e, 0x02, + 0x23, 0x22, 0x06, 0x07, 0x23, 0x3e, 0x01, 0x33, 0x32, 0x1e, 0x02, 0x33, + 0x32, 0x36, 0x37, 0x33, 0x0e, 0x01, 0x13, 0x11, 0x34, 0x26, 0x23, 0x22, + 0x06, 0x15, 0x11, 0x23, 0x11, 0x33, 0x17, 0x33, 0x3e, 0x01, 0x33, 0x32, + 0x16, 0x15, 0x11, 0x03, 0x22, 0x2b, 0x52, 0x4f, 0x49, 0x22, 0x32, 0x33, + 0x0e, 0x62, 0x0d, 0x73, 0x5b, 0x2e, 0x56, 0x4e, 0x48, 0x20, 0x31, 0x30, + 0x0f, 0x63, 0x0d, 0x71, 0x1e, 0x7a, 0x82, 0xac, 0xa0, 0xa6, 0x87, 0x1b, + 0x08, 0x33, 0xb8, 0x71, 0xc6, 0xc8, 0x04, 0xdb, 0x25, 0x2d, 0x25, 0x3c, + 0x3d, 0x79, 0x89, 0x25, 0x2d, 0x25, 0x3b, 0x3e, 0x79, 0x89, 0xfb, 0x25, + 0x02, 0xc5, 0x86, 0x84, 0xba, 0xd6, 0xfd, 0xc1, 0x04, 0x48, 0x96, 0x51, + 0x59, 0xbf, 0xd2, 0xfd, 0x35, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x73, + 0xff, 0xec, 0x04, 0x62, 0x06, 0x21, 0x12, 0x26, 0x00, 0x52, 0x00, 0x00, + 0x11, 0x06, 0x00, 0x43, 0xd4, 0x00, 0x00, 0x08, 0xb3, 0x02, 0x1a, 0x11, + 0x26, 0x00, 0x2b, 0x35, 0xff, 0xff, 0x00, 0x73, 0xff, 0xec, 0x04, 0x62, + 0x06, 0x21, 0x12, 0x26, 0x00, 0x52, 0x00, 0x00, 0x11, 0x06, 0x00, 0x76, + 0x56, 0x00, 0x00, 0x08, 0xb3, 0x02, 0x22, 0x11, 0x26, 0x00, 0x2b, 0x35, + 0x00, 0x03, 0x00, 0x73, 0xff, 0xec, 0x04, 0x62, 0x06, 0x21, 0x00, 0x0e, + 0x00, 0x1b, 0x00, 0x27, 0x00, 0x00, 0x01, 0x3e, 0x01, 0x37, 0x33, 0x1e, + 0x01, 0x17, 0x15, 0x23, 0x26, 0x27, 0x06, 0x07, 0x23, 0x01, 0x10, 0x00, + 0x23, 0x22, 0x26, 0x02, 0x35, 0x10, 0x00, 0x33, 0x32, 0x00, 0x01, 0x14, + 0x16, 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x01, 0x1a, + 0x7f, 0x66, 0x17, 0xa6, 0x16, 0x6d, 0x7d, 0x77, 0x58, 0x85, 0x88, 0x53, + 0x73, 0x03, 0x48, 0xfe, 0xf2, 0xee, 0x93, 0xe4, 0x7c, 0x01, 0x0c, 0xee, + 0xe6, 0x01, 0x0f, 0xfc, 0xbd, 0xa8, 0xa3, 0xa3, 0xa9, 0xa9, 0xa5, 0xa3, + 0xa6, 0x04, 0xf0, 0x88, 0x80, 0x29, 0x2a, 0x85, 0x82, 0x17, 0x37, 0x83, + 0x86, 0x34, 0xfd, 0x4c, 0xfe, 0xf4, 0xfe, 0xd3, 0x8a, 0x01, 0x02, 0xad, + 0x01, 0x0c, 0x01, 0x2b, 0xfe, 0xce, 0xfe, 0xfb, 0xd2, 0xdc, 0xdb, 0xd3, + 0xd1, 0xd9, 0xd6, 0x00, 0x00, 0x03, 0x00, 0x73, 0xff, 0xec, 0x04, 0x62, + 0x05, 0xdd, 0x00, 0x17, 0x00, 0x24, 0x00, 0x30, 0x00, 0x00, 0x01, 0x22, + 0x2e, 0x02, 0x23, 0x22, 0x06, 0x07, 0x23, 0x3e, 0x01, 0x33, 0x32, 0x1e, + 0x02, 0x33, 0x32, 0x36, 0x37, 0x33, 0x0e, 0x01, 0x01, 0x10, 0x00, 0x23, + 0x22, 0x26, 0x02, 0x35, 0x10, 0x00, 0x33, 0x32, 0x00, 0x01, 0x14, 0x16, + 0x33, 0x32, 0x36, 0x35, 0x34, 0x26, 0x23, 0x22, 0x06, 0x03, 0x05, 0x2b, + 0x52, 0x4f, 0x49, 0x22, 0x32, 0x33, 0x0e, 0x62, 0x0d, 0x73, 0x5b, 0x2e, + 0x56, 0x4e, 0x48, 0x20, 0x31, 0x30, 0x0f, 0x63, 0x0d, 0x71, 0x00, 0xff, + 0xfe, 0xf2, 0xee, 0x93, 0xe4, 0x7c, 0x01, 0x0c, 0xee, 0xe6, 0x01, 0x0f, + 0xfc, 0xbd, 0xa8, 0xa3, 0xa3, 0xa9, 0xa9, 0xa5, 0xa3, 0xa6, 0x04, 0xdb, + 0x25, 0x2d, 0x25, 0x3c, 0x3d, 0x79, 0x89, 0x25, 0x2d, 0x25, 0x3b, 0x3e, + 0x79, 0x89, 0xfd, 0x4a, 0xfe, 0xf4, 0xfe, 0xd3, 0x8a, 0x01, 0x02, 0xad, + 0x01, 0x0c, 0x01, 0x2b, 0xfe, 0xce, 0xfe, 0xfb, 0xd2, 0xdc, 0xdb, 0xd3, + 0xd1, 0xd9, 0xd6, 0x00, 0xff, 0xff, 0x00, 0x73, 0xff, 0xec, 0x04, 0x62, + 0x05, 0xd3, 0x12, 0x26, 0x00, 0x52, 0x00, 0x00, 0x11, 0x06, 0x00, 0x6a, + 0x1b, 0x00, 0x00, 0x0a, 0xb4, 0x03, 0x02, 0x2e, 0x11, 0x26, 0x00, 0x2b, + 0x35, 0x35, 0x00, 0x00, 0x00, 0x03, 0x00, 0x68, 0x00, 0xfc, 0x04, 0x29, + 0x04, 0xa8, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x1b, 0x00, 0x33, 0x40, 0x18, + 0x16, 0x0a, 0x0a, 0x10, 0x04, 0x02, 0x04, 0x01, 0x03, 0x1c, 0x1d, 0x19, + 0x13, 0x13, 0x01, 0x07, 0x0d, 0x0d, 0x01, 0x01, 0x00, 0x50, 0x59, 0x01, + 0x00, 0x2f, 0x2b, 0x11, 0x00, 0x33, 0x18, 0x2f, 0x33, 0x11, 0x33, 0x2f, + 0x33, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, 0x33, 0x33, 0x11, 0x33, 0x31, + 0x30, 0x13, 0x35, 0x21, 0x15, 0x01, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, + 0x14, 0x06, 0x23, 0x22, 0x26, 0x11, 0x34, 0x36, 0x33, 0x32, 0x16, 0x15, + 0x14, 0x06, 0x23, 0x22, 0x26, 0x68, 0x03, 0xc1, 0xfd, 0xae, 0x3b, 0x36, + 0x34, 0x3a, 0x3b, 0x33, 0x34, 0x3d, 0x3b, 0x36, 0x34, 0x3a, 0x3b, 0x33, + 0x34, 0x3d, 0x02, 0x8d, 0x8a, 0x8a, 0xfe, 0xe8, 0x3c, 0x3d, 0x3f, 0x3a, + 0x39, 0x40, 0x3f, 0x02, 0xf4, 0x3c, 0x3d, 0x3f, 0x3a, 0x39, 0x40, 0x3f, + 0x00, 0x03, 0x00, 0x73, 0xff, 0xbc, 0x04, 0x62, 0x04, 0x87, 0x00, 0x13, + 0x00, 0x1b, 0x00, 0x23, 0x00, 0x4b, 0x40, 0x29, 0x17, 0x1f, 0x1c, 0x14, + 0x14, 0x0a, 0x1c, 0x00, 0x00, 0x12, 0x0f, 0x05, 0x08, 0x0a, 0x06, 0x24, + 0x25, 0x16, 0x1e, 0x21, 0x19, 0x0d, 0x19, 0x46, 0x59, 0x0f, 0x12, 0x08, + 0x05, 0x04, 0x03, 0x10, 0x0d, 0x10, 0x03, 0x21, 0x46, 0x59, 0x06, 0x03, + 0x16, 0x00, 0x3f, 0xc6, 0x2b, 0x00, 0x18, 0x3f, 0xc6, 0x12, 0x17, 0x39, + 0x2b, 0x11, 0x12, 0x00, 0x39, 0x39, 0x11, 0x12, 0x01, 0x17, 0x39, 0x11, + 0x33, 0x11, 0x33, 0x11, 0x12, 0x39, 0x39, 0x31, 0x30, 0x01, 0x10, 0x00, + 0x23, 0x22, 0x27, 0x07, 0x27, 0x37, 0x26, 0x11, 0x10, 0x00, 0x33, 0x32, + 0x17, 0x37, 0x17, 0x07, 0x16, 0x05, 0x14, 0x17, 0x01, 0x26, 0x23, 0x22, + 0x06, 0x05, 0x34, 0x27, 0x01, 0x16, 0x33, 0x32, 0x36, 0x04, 0x62, 0xfe, + 0xf2, 0xee, 0x9a, 0x70, 0x54, 0x72, 0x5e, 0x81, 0x01, 0x0c, 0xee, 0x9a, + 0x74, 0x54, 0x75, 0x61, 0x7f, 0xfc, 0xbd, 0x35, 0x01, 0xd1, 0x4b, 0x72, + 0xa3, 0xa6, 0x02, 0x97, 0x33, 0xfe, 0x2f, 0x47, 0x71, 0xa3, 0xa9, 0x02, + 0x25, 0xfe, 0xf4, 0xfe, 0xd3, 0x45, 0x75, 0x4e, 0x83, 0x98, 0x01, 0x00, + 0x01, 0x0c, 0x01, 0x2b, 0x4c, 0x77, 0x4c, 0x85, 0x98, 0xf9, 0xab, 0x66, + 0x02, 0x86, 0x35, 0xd6, 0xd4, 0xa4, 0x64, 0xfd, 0x7d, 0x33, 0xdb, 0x00, + 0xff, 0xff, 0x00, 0xa4, 0xff, 0xec, 0x04, 0x39, 0x06, 0x21, 0x12, 0x26, + 0x00, 0x58, 0x00, 0x00, 0x11, 0x06, 0x00, 0x43, 0xc4, 0x00, 0x00, 0x08, + 0xb3, 0x01, 0x16, 0x11, 0x26, 0x00, 0x2b, 0x35, 0xff, 0xff, 0x00, 0xa4, + 0xff, 0xec, 0x04, 0x39, 0x06, 0x21, 0x12, 0x26, 0x00, 0x58, 0x00, 0x00, + 0x11, 0x06, 0x00, 0x76, 0x71, 0x00, 0x00, 0x08, 0xb3, 0x01, 0x1e, 0x11, + 0x26, 0x00, 0x2b, 0x35, 0x00, 0x02, 0x00, 0xa4, 0xff, 0xec, 0x04, 0x39, + 0x06, 0x21, 0x00, 0x0e, 0x00, 0x23, 0x00, 0x00, 0x01, 0x3e, 0x01, 0x37, + 0x33, 0x1e, 0x01, 0x17, 0x15, 0x23, 0x26, 0x27, 0x06, 0x07, 0x23, 0x17, + 0x11, 0x14, 0x16, 0x33, 0x32, 0x36, 0x35, 0x11, 0x33, 0x11, 0x23, 0x27, + 0x23, 0x0e, 0x01, 0x23, 0x22, 0x26, 0x35, 0x11, 0x01, 0x1e, 0x7f, 0x66, + 0x17, 0xa6, 0x16, 0x6d, 0x7d, 0x77, 0x58, 0x85, 0x88, 0x53, 0x73, 0x2e, + 0x7a, 0x82, 0xac, 0x9f, 0xa6, 0x89, 0x18, 0x09, 0x33, 0xb5, 0x74, 0xc8, + 0xc7, 0x04, 0xf0, 0x88, 0x80, 0x29, 0x2a, 0x85, 0x82, 0x17, 0x37, 0x83, + 0x86, 0x34, 0x91, 0xfd, 0x39, 0x86, 0x84, 0xbc, 0xd5, 0x02, 0x40, 0xfb, + 0xb8, 0x93, 0x51, 0x56, 0xbe, 0xd1, 0x02, 0xcd, 0xff, 0xff, 0x00, 0xa4, + 0xff, 0xec, 0x04, 0x39, 0x05, 0xd3, 0x12, 0x26, 0x00, 0x58, 0x00, 0x00, + 0x11, 0x06, 0x00, 0x6a, 0x21, 0x00, 0x00, 0x0a, 0xb4, 0x02, 0x01, 0x2a, + 0x11, 0x26, 0x00, 0x2b, 0x35, 0x35, 0x00, 0x00, 0xff, 0xff, 0x00, 0x02, + 0xfe, 0x14, 0x04, 0x06, 0x06, 0x21, 0x12, 0x26, 0x00, 0x5c, 0x00, 0x00, + 0x11, 0x06, 0x00, 0x76, 0x12, 0x00, 0x00, 0x08, 0xb3, 0x01, 0x1f, 0x11, + 0x26, 0x00, 0x2b, 0x35, 0x00, 0x02, 0x00, 0xb0, 0xfe, 0x14, 0x04, 0x75, + 0x06, 0x14, 0x00, 0x16, 0x00, 0x22, 0x00, 0x3e, 0x40, 0x1f, 0x20, 0x06, + 0x1b, 0x14, 0x10, 0x10, 0x11, 0x06, 0x11, 0x24, 0x23, 0x12, 0x00, 0x11, + 0x1b, 0x0c, 0x16, 0x09, 0x03, 0x09, 0x1e, 0x46, 0x59, 0x09, 0x16, 0x03, + 0x17, 0x46, 0x59, 0x03, 0x10, 0x00, 0x3f, 0x2b, 0x00, 0x18, 0x3f, 0x2b, + 0x11, 0x12, 0x00, 0x39, 0x39, 0x18, 0x3f, 0x3f, 0x11, 0x12, 0x01, 0x39, + 0x39, 0x11, 0x33, 0x11, 0x33, 0x33, 0x11, 0x33, 0x31, 0x30, 0x01, 0x3e, + 0x01, 0x33, 0x32, 0x12, 0x11, 0x10, 0x02, 0x23, 0x22, 0x27, 0x23, 0x17, + 0x16, 0x15, 0x11, 0x23, 0x11, 0x33, 0x11, 0x14, 0x07, 0x25, 0x22, 0x06, + 0x07, 0x15, 0x14, 0x16, 0x33, 0x20, 0x11, 0x34, 0x26, 0x01, 0x58, 0x42, + 0xaa, 0x6a, 0xd7, 0xf0, 0xf1, 0xd6, 0xde, 0x7a, 0x0c, 0x04, 0x08, 0xa6, + 0xa6, 0x06, 0x01, 0x48, 0xa8, 0x98, 0x02, 0x9a, 0xaa, 0x01, 0x2f, 0x94, + 0x03, 0xb4, 0x59, 0x4f, 0xfe, 0xd4, 0xfe, 0xf5, 0xfe, 0xf4, 0xfe, 0xd3, + 0xa1, 0x22, 0x4d, 0x3f, 0xfe, 0x35, 0x08, 0x00, 0xfe, 0x2e, 0x34, 0x5a, + 0x1b, 0xb8, 0xc9, 0x29, 0xe7, 0xc7, 0x01, 0xb0, 0xd7, 0xd1, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x02, 0xfe, 0x14, 0x04, 0x06, 0x05, 0xd3, 0x12, 0x26, + 0x00, 0x5c, 0x00, 0x00, 0x11, 0x06, 0x00, 0x6a, 0xb5, 0x00, 0x00, 0x0a, + 0xb4, 0x02, 0x01, 0x2b, 0x11, 0x26, 0x00, 0x2b, 0x35, 0x35, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x1a, 0x72, 0x00, 0x01, 0x04, 0x66, + 0x18, 0x00, 0x00, 0x0a, 0x02, 0x64, 0x00, 0x05, 0x00, 0x24, 0xff, 0x71, + 0x00, 0x05, 0x00, 0x37, 0x00, 0x29, 0x00, 0x05, 0x00, 0x39, 0x00, 0x29, + 0x00, 0x05, 0x00, 0x3a, 0x00, 0x29, 0x00, 0x05, 0x00, 0x3c, 0x00, 0x14, + 0x00, 0x05, 0x00, 0x44, 0xff, 0xae, 0x00, 0x05, 0x00, 0x46, 0xff, 0x85, + 0x00, 0x05, 0x00, 0x47, 0xff, 0x85, 0x00, 0x05, 0x00, 0x48, 0xff, 0x85, + 0x00, 0x05, 0x00, 0x4a, 0xff, 0xc3, 0x00, 0x05, 0x00, 0x50, 0xff, 0xc3, + 0x00, 0x05, 0x00, 0x51, 0xff, 0xc3, 0x00, 0x05, 0x00, 0x52, 0xff, 0x85, + 0x00, 0x05, 0x00, 0x53, 0xff, 0xc3, 0x00, 0x05, 0x00, 0x54, 0xff, 0x85, + 0x00, 0x05, 0x00, 0x55, 0xff, 0xc3, 0x00, 0x05, 0x00, 0x56, 0xff, 0xc3, + 0x00, 0x05, 0x00, 0x58, 0xff, 0xc3, 0x00, 0x05, 0x00, 0x82, 0xff, 0x71, + 0x00, 0x05, 0x00, 0x83, 0xff, 0x71, 0x00, 0x05, 0x00, 0x84, 0xff, 0x71, + 0x00, 0x05, 0x00, 0x85, 0xff, 0x71, 0x00, 0x05, 0x00, 0x86, 0xff, 0x71, + 0x00, 0x05, 0x00, 0x87, 0xff, 0x71, 0x00, 0x05, 0x00, 0x9f, 0x00, 0x14, + 0x00, 0x05, 0x00, 0xa2, 0xff, 0x85, 0x00, 0x05, 0x00, 0xa3, 0xff, 0xae, + 0x00, 0x05, 0x00, 0xa4, 0xff, 0xae, 0x00, 0x05, 0x00, 0xa5, 0xff, 0xae, + 0x00, 0x05, 0x00, 0xa6, 0xff, 0xae, 0x00, 0x05, 0x00, 0xa7, 0xff, 0xae, + 0x00, 0x05, 0x00, 0xa8, 0xff, 0xae, 0x00, 0x05, 0x00, 0xa9, 0xff, 0x85, + 0x00, 0x05, 0x00, 0xaa, 0xff, 0x85, 0x00, 0x05, 0x00, 0xab, 0xff, 0x85, + 0x00, 0x05, 0x00, 0xac, 0xff, 0x85, 0x00, 0x05, 0x00, 0xad, 0xff, 0x85, + 0x00, 0x05, 0x00, 0xb4, 0xff, 0x85, 0x00, 0x05, 0x00, 0xb5, 0xff, 0x85, + 0x00, 0x05, 0x00, 0xb6, 0xff, 0x85, 0x00, 0x05, 0x00, 0xb7, 0xff, 0x85, + 0x00, 0x05, 0x00, 0xb8, 0xff, 0x85, 0x00, 0x05, 0x00, 0xba, 0xff, 0x85, + 0x00, 0x05, 0x00, 0xbb, 0xff, 0xc3, 0x00, 0x05, 0x00, 0xbc, 0xff, 0xc3, + 0x00, 0x05, 0x00, 0xbd, 0xff, 0xc3, 0x00, 0x05, 0x00, 0xbe, 0xff, 0xc3, + 0x00, 0x0a, 0x00, 0x24, 0xff, 0x71, 0x00, 0x0a, 0x00, 0x37, 0x00, 0x29, + 0x00, 0x0a, 0x00, 0x39, 0x00, 0x29, 0x00, 0x0a, 0x00, 0x3a, 0x00, 0x29, + 0x00, 0x0a, 0x00, 0x3c, 0x00, 0x14, 0x00, 0x0a, 0x00, 0x44, 0xff, 0xae, + 0x00, 0x0a, 0x00, 0x46, 0xff, 0x85, 0x00, 0x0a, 0x00, 0x47, 0xff, 0x85, + 0x00, 0x0a, 0x00, 0x48, 0xff, 0x85, 0x00, 0x0a, 0x00, 0x4a, 0xff, 0xc3, + 0x00, 0x0a, 0x00, 0x50, 0xff, 0xc3, 0x00, 0x0a, 0x00, 0x51, 0xff, 0xc3, + 0x00, 0x0a, 0x00, 0x52, 0xff, 0x85, 0x00, 0x0a, 0x00, 0x53, 0xff, 0xc3, + 0x00, 0x0a, 0x00, 0x54, 0xff, 0x85, 0x00, 0x0a, 0x00, 0x55, 0xff, 0xc3, + 0x00, 0x0a, 0x00, 0x56, 0xff, 0xc3, 0x00, 0x0a, 0x00, 0x58, 0xff, 0xc3, + 0x00, 0x0a, 0x00, 0x82, 0xff, 0x71, 0x00, 0x0a, 0x00, 0x83, 0xff, 0x71, + 0x00, 0x0a, 0x00, 0x84, 0xff, 0x71, 0x00, 0x0a, 0x00, 0x85, 0xff, 0x71, + 0x00, 0x0a, 0x00, 0x86, 0xff, 0x71, 0x00, 0x0a, 0x00, 0x87, 0xff, 0x71, + 0x00, 0x0a, 0x00, 0x9f, 0x00, 0x14, 0x00, 0x0a, 0x00, 0xa2, 0xff, 0x85, + 0x00, 0x0a, 0x00, 0xa3, 0xff, 0xae, 0x00, 0x0a, 0x00, 0xa4, 0xff, 0xae, + 0x00, 0x0a, 0x00, 0xa5, 0xff, 0xae, 0x00, 0x0a, 0x00, 0xa6, 0xff, 0xae, + 0x00, 0x0a, 0x00, 0xa7, 0xff, 0xae, 0x00, 0x0a, 0x00, 0xa8, 0xff, 0xae, + 0x00, 0x0a, 0x00, 0xa9, 0xff, 0x85, 0x00, 0x0a, 0x00, 0xaa, 0xff, 0x85, + 0x00, 0x0a, 0x00, 0xab, 0xff, 0x85, 0x00, 0x0a, 0x00, 0xac, 0xff, 0x85, + 0x00, 0x0a, 0x00, 0xad, 0xff, 0x85, 0x00, 0x0a, 0x00, 0xb4, 0xff, 0x85, + 0x00, 0x0a, 0x00, 0xb5, 0xff, 0x85, 0x00, 0x0a, 0x00, 0xb6, 0xff, 0x85, + 0x00, 0x0a, 0x00, 0xb7, 0xff, 0x85, 0x00, 0x0a, 0x00, 0xb8, 0xff, 0x85, + 0x00, 0x0a, 0x00, 0xba, 0xff, 0x85, 0x00, 0x0a, 0x00, 0xbb, 0xff, 0xc3, + 0x00, 0x0a, 0x00, 0xbc, 0xff, 0xc3, 0x00, 0x0a, 0x00, 0xbd, 0xff, 0xc3, + 0x00, 0x0a, 0x00, 0xbe, 0xff, 0xc3, 0x00, 0x0b, 0x00, 0x2d, 0x00, 0xb8, + 0x00, 0x0f, 0x00, 0x26, 0xff, 0x9a, 0x00, 0x0f, 0x00, 0x2a, 0xff, 0x9a, + 0x00, 0x0f, 0x00, 0x32, 0xff, 0x9a, 0x00, 0x0f, 0x00, 0x34, 0xff, 0x9a, + 0x00, 0x0f, 0x00, 0x37, 0xff, 0x71, 0x00, 0x0f, 0x00, 0x38, 0xff, 0xd7, + 0x00, 0x0f, 0x00, 0x39, 0xff, 0x85, 0x00, 0x0f, 0x00, 0x3a, 0xff, 0x85, + 0x00, 0x0f, 0x00, 0x3c, 0xff, 0x85, 0x00, 0x0f, 0x00, 0x89, 0xff, 0x9a, + 0x00, 0x0f, 0x00, 0x94, 0xff, 0x9a, 0x00, 0x0f, 0x00, 0x95, 0xff, 0x9a, + 0x00, 0x0f, 0x00, 0x96, 0xff, 0x9a, 0x00, 0x0f, 0x00, 0x97, 0xff, 0x9a, + 0x00, 0x0f, 0x00, 0x98, 0xff, 0x9a, 0x00, 0x0f, 0x00, 0x9a, 0xff, 0x9a, + 0x00, 0x0f, 0x00, 0x9b, 0xff, 0xd7, 0x00, 0x0f, 0x00, 0x9c, 0xff, 0xd7, + 0x00, 0x0f, 0x00, 0x9d, 0xff, 0xd7, 0x00, 0x0f, 0x00, 0x9e, 0xff, 0xd7, + 0x00, 0x0f, 0x00, 0x9f, 0xff, 0x85, 0x00, 0x10, 0x00, 0x37, 0xff, 0xae, + 0x00, 0x11, 0x00, 0x26, 0xff, 0x9a, 0x00, 0x11, 0x00, 0x2a, 0xff, 0x9a, + 0x00, 0x11, 0x00, 0x32, 0xff, 0x9a, 0x00, 0x11, 0x00, 0x34, 0xff, 0x9a, + 0x00, 0x11, 0x00, 0x37, 0xff, 0x71, 0x00, 0x11, 0x00, 0x38, 0xff, 0xd7, + 0x00, 0x11, 0x00, 0x39, 0xff, 0x85, 0x00, 0x11, 0x00, 0x3a, 0xff, 0x85, + 0x00, 0x11, 0x00, 0x3c, 0xff, 0x85, 0x00, 0x11, 0x00, 0x89, 0xff, 0x9a, + 0x00, 0x11, 0x00, 0x94, 0xff, 0x9a, 0x00, 0x11, 0x00, 0x95, 0xff, 0x9a, + 0x00, 0x11, 0x00, 0x96, 0xff, 0x9a, 0x00, 0x11, 0x00, 0x97, 0xff, 0x9a, + 0x00, 0x11, 0x00, 0x98, 0xff, 0x9a, 0x00, 0x11, 0x00, 0x9a, 0xff, 0x9a, + 0x00, 0x11, 0x00, 0x9b, 0xff, 0xd7, 0x00, 0x11, 0x00, 0x9c, 0xff, 0xd7, + 0x00, 0x11, 0x00, 0x9d, 0xff, 0xd7, 0x00, 0x11, 0x00, 0x9e, 0xff, 0xd7, + 0x00, 0x11, 0x00, 0x9f, 0xff, 0x85, 0x00, 0x24, 0x00, 0x05, 0xff, 0x71, + 0x00, 0x24, 0x00, 0x0a, 0xff, 0x71, 0x00, 0x24, 0x00, 0x26, 0xff, 0xd7, + 0x00, 0x24, 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x24, 0x00, 0x2d, 0x01, 0x0a, + 0x00, 0x24, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x24, 0x00, 0x34, 0xff, 0xd7, + 0x00, 0x24, 0x00, 0x37, 0xff, 0x71, 0x00, 0x24, 0x00, 0x39, 0xff, 0xae, + 0x00, 0x24, 0x00, 0x3a, 0xff, 0xae, 0x00, 0x24, 0x00, 0x3c, 0xff, 0x85, + 0x00, 0x24, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x24, 0x00, 0x94, 0xff, 0xd7, + 0x00, 0x24, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x24, 0x00, 0x96, 0xff, 0xd7, + 0x00, 0x24, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x24, 0x00, 0x98, 0xff, 0xd7, + 0x00, 0x24, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x24, 0x00, 0x9f, 0xff, 0x85, + 0x00, 0x25, 0x00, 0x0f, 0xff, 0xae, 0x00, 0x25, 0x00, 0x11, 0xff, 0xae, + 0x00, 0x25, 0x00, 0x24, 0xff, 0xd7, 0x00, 0x25, 0x00, 0x37, 0xff, 0xc3, + 0x00, 0x25, 0x00, 0x39, 0xff, 0xec, 0x00, 0x25, 0x00, 0x3a, 0xff, 0xec, + 0x00, 0x25, 0x00, 0x3b, 0xff, 0xd7, 0x00, 0x25, 0x00, 0x3c, 0xff, 0xec, + 0x00, 0x25, 0x00, 0x3d, 0xff, 0xec, 0x00, 0x25, 0x00, 0x82, 0xff, 0xd7, + 0x00, 0x25, 0x00, 0x83, 0xff, 0xd7, 0x00, 0x25, 0x00, 0x84, 0xff, 0xd7, + 0x00, 0x25, 0x00, 0x85, 0xff, 0xd7, 0x00, 0x25, 0x00, 0x86, 0xff, 0xd7, + 0x00, 0x25, 0x00, 0x87, 0xff, 0xd7, 0x00, 0x25, 0x00, 0x9f, 0xff, 0xec, + 0x00, 0x26, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x26, 0x00, 0x2a, 0xff, 0xd7, + 0x00, 0x26, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x26, 0x00, 0x34, 0xff, 0xd7, + 0x00, 0x26, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x26, 0x00, 0x94, 0xff, 0xd7, + 0x00, 0x26, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x26, 0x00, 0x96, 0xff, 0xd7, + 0x00, 0x26, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x26, 0x00, 0x98, 0xff, 0xd7, + 0x00, 0x26, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x27, 0x00, 0x0f, 0xff, 0xae, + 0x00, 0x27, 0x00, 0x11, 0xff, 0xae, 0x00, 0x27, 0x00, 0x24, 0xff, 0xd7, + 0x00, 0x27, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x27, 0x00, 0x39, 0xff, 0xec, + 0x00, 0x27, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x27, 0x00, 0x3b, 0xff, 0xd7, + 0x00, 0x27, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x27, 0x00, 0x3d, 0xff, 0xec, + 0x00, 0x27, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x27, 0x00, 0x83, 0xff, 0xd7, + 0x00, 0x27, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x27, 0x00, 0x85, 0xff, 0xd7, + 0x00, 0x27, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x27, 0x00, 0x87, 0xff, 0xd7, + 0x00, 0x27, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x28, 0x00, 0x2d, 0x00, 0x7b, + 0x00, 0x29, 0x00, 0x0f, 0xff, 0x85, 0x00, 0x29, 0x00, 0x11, 0xff, 0x85, + 0x00, 0x29, 0x00, 0x22, 0x00, 0x29, 0x00, 0x29, 0x00, 0x24, 0xff, 0xd7, + 0x00, 0x29, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x29, 0x00, 0x83, 0xff, 0xd7, + 0x00, 0x29, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x29, 0x00, 0x85, 0xff, 0xd7, + 0x00, 0x29, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x29, 0x00, 0x87, 0xff, 0xd7, + 0x00, 0x2e, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x2e, 0x00, 0x2a, 0xff, 0xd7, + 0x00, 0x2e, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x2e, 0x00, 0x34, 0xff, 0xd7, + 0x00, 0x2e, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x2e, 0x00, 0x94, 0xff, 0xd7, + 0x00, 0x2e, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x2e, 0x00, 0x96, 0xff, 0xd7, + 0x00, 0x2e, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x2e, 0x00, 0x98, 0xff, 0xd7, + 0x00, 0x2e, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x2f, 0x00, 0x05, 0xff, 0x5c, + 0x00, 0x2f, 0x00, 0x0a, 0xff, 0x5c, 0x00, 0x2f, 0x00, 0x26, 0xff, 0xd7, + 0x00, 0x2f, 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x2f, 0x00, 0x32, 0xff, 0xd7, + 0x00, 0x2f, 0x00, 0x34, 0xff, 0xd7, 0x00, 0x2f, 0x00, 0x37, 0xff, 0xd7, + 0x00, 0x2f, 0x00, 0x38, 0xff, 0xec, 0x00, 0x2f, 0x00, 0x39, 0xff, 0xd7, + 0x00, 0x2f, 0x00, 0x3a, 0xff, 0xd7, 0x00, 0x2f, 0x00, 0x3c, 0xff, 0xc3, + 0x00, 0x2f, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x2f, 0x00, 0x94, 0xff, 0xd7, + 0x00, 0x2f, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x2f, 0x00, 0x96, 0xff, 0xd7, + 0x00, 0x2f, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x2f, 0x00, 0x98, 0xff, 0xd7, + 0x00, 0x2f, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x2f, 0x00, 0x9b, 0xff, 0xec, + 0x00, 0x2f, 0x00, 0x9c, 0xff, 0xec, 0x00, 0x2f, 0x00, 0x9d, 0xff, 0xec, + 0x00, 0x2f, 0x00, 0x9e, 0xff, 0xec, 0x00, 0x2f, 0x00, 0x9f, 0xff, 0xc3, + 0x00, 0x32, 0x00, 0x0f, 0xff, 0xae, 0x00, 0x32, 0x00, 0x11, 0xff, 0xae, + 0x00, 0x32, 0x00, 0x24, 0xff, 0xd7, 0x00, 0x32, 0x00, 0x37, 0xff, 0xc3, + 0x00, 0x32, 0x00, 0x39, 0xff, 0xec, 0x00, 0x32, 0x00, 0x3a, 0xff, 0xec, + 0x00, 0x32, 0x00, 0x3b, 0xff, 0xd7, 0x00, 0x32, 0x00, 0x3c, 0xff, 0xec, + 0x00, 0x32, 0x00, 0x3d, 0xff, 0xec, 0x00, 0x32, 0x00, 0x82, 0xff, 0xd7, + 0x00, 0x32, 0x00, 0x83, 0xff, 0xd7, 0x00, 0x32, 0x00, 0x84, 0xff, 0xd7, + 0x00, 0x32, 0x00, 0x85, 0xff, 0xd7, 0x00, 0x32, 0x00, 0x86, 0xff, 0xd7, + 0x00, 0x32, 0x00, 0x87, 0xff, 0xd7, 0x00, 0x32, 0x00, 0x9f, 0xff, 0xec, + 0x00, 0x33, 0x00, 0x0f, 0xfe, 0xf6, 0x00, 0x33, 0x00, 0x11, 0xfe, 0xf6, + 0x00, 0x33, 0x00, 0x24, 0xff, 0x9a, 0x00, 0x33, 0x00, 0x3b, 0xff, 0xd7, + 0x00, 0x33, 0x00, 0x3d, 0xff, 0xec, 0x00, 0x33, 0x00, 0x82, 0xff, 0x9a, + 0x00, 0x33, 0x00, 0x83, 0xff, 0x9a, 0x00, 0x33, 0x00, 0x84, 0xff, 0x9a, + 0x00, 0x33, 0x00, 0x85, 0xff, 0x9a, 0x00, 0x33, 0x00, 0x86, 0xff, 0x9a, + 0x00, 0x33, 0x00, 0x87, 0xff, 0x9a, 0x00, 0x34, 0x00, 0x0f, 0xff, 0xae, + 0x00, 0x34, 0x00, 0x11, 0xff, 0xae, 0x00, 0x34, 0x00, 0x24, 0xff, 0xd7, + 0x00, 0x34, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x34, 0x00, 0x39, 0xff, 0xec, + 0x00, 0x34, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x34, 0x00, 0x3b, 0xff, 0xd7, + 0x00, 0x34, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x34, 0x00, 0x3d, 0xff, 0xec, + 0x00, 0x34, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x34, 0x00, 0x83, 0xff, 0xd7, + 0x00, 0x34, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x34, 0x00, 0x85, 0xff, 0xd7, + 0x00, 0x34, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x34, 0x00, 0x87, 0xff, 0xd7, + 0x00, 0x34, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x37, 0x00, 0x0f, 0xff, 0x85, + 0x00, 0x37, 0x00, 0x10, 0xff, 0xae, 0x00, 0x37, 0x00, 0x11, 0xff, 0x85, + 0x00, 0x37, 0x00, 0x22, 0x00, 0x29, 0x00, 0x37, 0x00, 0x24, 0xff, 0x71, + 0x00, 0x37, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x37, 0x00, 0x2a, 0xff, 0xd7, + 0x00, 0x37, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x37, 0x00, 0x34, 0xff, 0xd7, + 0x00, 0x37, 0x00, 0x37, 0x00, 0x29, 0x00, 0x37, 0x00, 0x44, 0xff, 0x5c, + 0x00, 0x37, 0x00, 0x46, 0xff, 0x71, 0x00, 0x37, 0x00, 0x47, 0xff, 0x71, + 0x00, 0x37, 0x00, 0x48, 0xff, 0x71, 0x00, 0x37, 0x00, 0x4a, 0xff, 0x71, + 0x00, 0x37, 0x00, 0x50, 0xff, 0x9a, 0x00, 0x37, 0x00, 0x51, 0xff, 0x9a, + 0x00, 0x37, 0x00, 0x52, 0xff, 0x71, 0x00, 0x37, 0x00, 0x53, 0xff, 0x9a, + 0x00, 0x37, 0x00, 0x54, 0xff, 0x71, 0x00, 0x37, 0x00, 0x55, 0xff, 0x9a, + 0x00, 0x37, 0x00, 0x56, 0xff, 0x85, 0x00, 0x37, 0x00, 0x58, 0xff, 0x9a, + 0x00, 0x37, 0x00, 0x59, 0xff, 0xd7, 0x00, 0x37, 0x00, 0x5a, 0xff, 0xd7, + 0x00, 0x37, 0x00, 0x5b, 0xff, 0xd7, 0x00, 0x37, 0x00, 0x5c, 0xff, 0xd7, + 0x00, 0x37, 0x00, 0x5d, 0xff, 0xae, 0x00, 0x37, 0x00, 0x82, 0xff, 0x71, + 0x00, 0x37, 0x00, 0x83, 0xff, 0x71, 0x00, 0x37, 0x00, 0x84, 0xff, 0x71, + 0x00, 0x37, 0x00, 0x85, 0xff, 0x71, 0x00, 0x37, 0x00, 0x86, 0xff, 0x71, + 0x00, 0x37, 0x00, 0x87, 0xff, 0x71, 0x00, 0x37, 0x00, 0x89, 0xff, 0xd7, + 0x00, 0x37, 0x00, 0x94, 0xff, 0xd7, 0x00, 0x37, 0x00, 0x95, 0xff, 0xd7, + 0x00, 0x37, 0x00, 0x96, 0xff, 0xd7, 0x00, 0x37, 0x00, 0x97, 0xff, 0xd7, + 0x00, 0x37, 0x00, 0x98, 0xff, 0xd7, 0x00, 0x37, 0x00, 0x9a, 0xff, 0xd7, + 0x00, 0x37, 0x00, 0xa2, 0xff, 0x71, 0x00, 0x37, 0x00, 0xa3, 0xff, 0x5c, + 0x00, 0x37, 0x00, 0xa4, 0xff, 0x5c, 0x00, 0x37, 0x00, 0xa5, 0xff, 0x5c, + 0x00, 0x37, 0x00, 0xa6, 0xff, 0x5c, 0x00, 0x37, 0x00, 0xa7, 0xff, 0x5c, + 0x00, 0x37, 0x00, 0xa8, 0xff, 0x5c, 0x00, 0x37, 0x00, 0xa9, 0xff, 0x71, + 0x00, 0x37, 0x00, 0xaa, 0xff, 0x71, 0x00, 0x37, 0x00, 0xab, 0xff, 0x71, + 0x00, 0x37, 0x00, 0xac, 0xff, 0x71, 0x00, 0x37, 0x00, 0xad, 0xff, 0x71, + 0x00, 0x37, 0x00, 0xb4, 0xff, 0x71, 0x00, 0x37, 0x00, 0xb5, 0xff, 0x71, + 0x00, 0x37, 0x00, 0xb6, 0xff, 0x71, 0x00, 0x37, 0x00, 0xb7, 0xff, 0x71, + 0x00, 0x37, 0x00, 0xb8, 0xff, 0x71, 0x00, 0x37, 0x00, 0xba, 0xff, 0x71, + 0x00, 0x37, 0x00, 0xbb, 0xff, 0x9a, 0x00, 0x37, 0x00, 0xbc, 0xff, 0x9a, + 0x00, 0x37, 0x00, 0xbd, 0xff, 0x9a, 0x00, 0x37, 0x00, 0xbe, 0xff, 0x9a, + 0x00, 0x37, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0x38, 0x00, 0x0f, 0xff, 0xd7, + 0x00, 0x38, 0x00, 0x11, 0xff, 0xd7, 0x00, 0x38, 0x00, 0x24, 0xff, 0xec, + 0x00, 0x38, 0x00, 0x82, 0xff, 0xec, 0x00, 0x38, 0x00, 0x83, 0xff, 0xec, + 0x00, 0x38, 0x00, 0x84, 0xff, 0xec, 0x00, 0x38, 0x00, 0x85, 0xff, 0xec, + 0x00, 0x38, 0x00, 0x86, 0xff, 0xec, 0x00, 0x38, 0x00, 0x87, 0xff, 0xec, + 0x00, 0x39, 0x00, 0x0f, 0xff, 0x9a, 0x00, 0x39, 0x00, 0x11, 0xff, 0x9a, + 0x00, 0x39, 0x00, 0x22, 0x00, 0x29, 0x00, 0x39, 0x00, 0x24, 0xff, 0xae, + 0x00, 0x39, 0x00, 0x26, 0xff, 0xec, 0x00, 0x39, 0x00, 0x2a, 0xff, 0xec, + 0x00, 0x39, 0x00, 0x32, 0xff, 0xec, 0x00, 0x39, 0x00, 0x34, 0xff, 0xec, + 0x00, 0x39, 0x00, 0x44, 0xff, 0xd7, 0x00, 0x39, 0x00, 0x46, 0xff, 0xd7, + 0x00, 0x39, 0x00, 0x47, 0xff, 0xd7, 0x00, 0x39, 0x00, 0x48, 0xff, 0xd7, + 0x00, 0x39, 0x00, 0x4a, 0xff, 0xec, 0x00, 0x39, 0x00, 0x50, 0xff, 0xec, + 0x00, 0x39, 0x00, 0x51, 0xff, 0xec, 0x00, 0x39, 0x00, 0x52, 0xff, 0xd7, + 0x00, 0x39, 0x00, 0x53, 0xff, 0xec, 0x00, 0x39, 0x00, 0x54, 0xff, 0xd7, + 0x00, 0x39, 0x00, 0x55, 0xff, 0xec, 0x00, 0x39, 0x00, 0x56, 0xff, 0xec, + 0x00, 0x39, 0x00, 0x58, 0xff, 0xec, 0x00, 0x39, 0x00, 0x82, 0xff, 0xae, + 0x00, 0x39, 0x00, 0x83, 0xff, 0xae, 0x00, 0x39, 0x00, 0x84, 0xff, 0xae, + 0x00, 0x39, 0x00, 0x85, 0xff, 0xae, 0x00, 0x39, 0x00, 0x86, 0xff, 0xae, + 0x00, 0x39, 0x00, 0x87, 0xff, 0xae, 0x00, 0x39, 0x00, 0x89, 0xff, 0xec, + 0x00, 0x39, 0x00, 0x94, 0xff, 0xec, 0x00, 0x39, 0x00, 0x95, 0xff, 0xec, + 0x00, 0x39, 0x00, 0x96, 0xff, 0xec, 0x00, 0x39, 0x00, 0x97, 0xff, 0xec, + 0x00, 0x39, 0x00, 0x98, 0xff, 0xec, 0x00, 0x39, 0x00, 0x9a, 0xff, 0xec, + 0x00, 0x39, 0x00, 0xa2, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xa3, 0xff, 0xd7, + 0x00, 0x39, 0x00, 0xa4, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xa5, 0xff, 0xd7, + 0x00, 0x39, 0x00, 0xa6, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xa7, 0xff, 0xd7, + 0x00, 0x39, 0x00, 0xa8, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xa9, 0xff, 0xd7, + 0x00, 0x39, 0x00, 0xaa, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xab, 0xff, 0xd7, + 0x00, 0x39, 0x00, 0xac, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xad, 0xff, 0xd7, + 0x00, 0x39, 0x00, 0xb4, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xb5, 0xff, 0xd7, + 0x00, 0x39, 0x00, 0xb6, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xb7, 0xff, 0xd7, + 0x00, 0x39, 0x00, 0xb8, 0xff, 0xd7, 0x00, 0x39, 0x00, 0xba, 0xff, 0xd7, + 0x00, 0x39, 0x00, 0xbb, 0xff, 0xec, 0x00, 0x39, 0x00, 0xbc, 0xff, 0xec, + 0x00, 0x39, 0x00, 0xbd, 0xff, 0xec, 0x00, 0x39, 0x00, 0xbe, 0xff, 0xec, + 0x00, 0x3a, 0x00, 0x0f, 0xff, 0x9a, 0x00, 0x3a, 0x00, 0x11, 0xff, 0x9a, + 0x00, 0x3a, 0x00, 0x22, 0x00, 0x29, 0x00, 0x3a, 0x00, 0x24, 0xff, 0xae, + 0x00, 0x3a, 0x00, 0x26, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x2a, 0xff, 0xec, + 0x00, 0x3a, 0x00, 0x32, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x34, 0xff, 0xec, + 0x00, 0x3a, 0x00, 0x44, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0x46, 0xff, 0xd7, + 0x00, 0x3a, 0x00, 0x47, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0x48, 0xff, 0xd7, + 0x00, 0x3a, 0x00, 0x4a, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x50, 0xff, 0xec, + 0x00, 0x3a, 0x00, 0x51, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x52, 0xff, 0xd7, + 0x00, 0x3a, 0x00, 0x53, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x54, 0xff, 0xd7, + 0x00, 0x3a, 0x00, 0x55, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x56, 0xff, 0xec, + 0x00, 0x3a, 0x00, 0x58, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x82, 0xff, 0xae, + 0x00, 0x3a, 0x00, 0x83, 0xff, 0xae, 0x00, 0x3a, 0x00, 0x84, 0xff, 0xae, + 0x00, 0x3a, 0x00, 0x85, 0xff, 0xae, 0x00, 0x3a, 0x00, 0x86, 0xff, 0xae, + 0x00, 0x3a, 0x00, 0x87, 0xff, 0xae, 0x00, 0x3a, 0x00, 0x89, 0xff, 0xec, + 0x00, 0x3a, 0x00, 0x94, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x95, 0xff, 0xec, + 0x00, 0x3a, 0x00, 0x96, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x97, 0xff, 0xec, + 0x00, 0x3a, 0x00, 0x98, 0xff, 0xec, 0x00, 0x3a, 0x00, 0x9a, 0xff, 0xec, + 0x00, 0x3a, 0x00, 0xa2, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xa3, 0xff, 0xd7, + 0x00, 0x3a, 0x00, 0xa4, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xa5, 0xff, 0xd7, + 0x00, 0x3a, 0x00, 0xa6, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xa7, 0xff, 0xd7, + 0x00, 0x3a, 0x00, 0xa8, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xa9, 0xff, 0xd7, + 0x00, 0x3a, 0x00, 0xaa, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xab, 0xff, 0xd7, + 0x00, 0x3a, 0x00, 0xac, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xad, 0xff, 0xd7, + 0x00, 0x3a, 0x00, 0xb4, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xb5, 0xff, 0xd7, + 0x00, 0x3a, 0x00, 0xb6, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xb7, 0xff, 0xd7, + 0x00, 0x3a, 0x00, 0xb8, 0xff, 0xd7, 0x00, 0x3a, 0x00, 0xba, 0xff, 0xd7, + 0x00, 0x3a, 0x00, 0xbb, 0xff, 0xec, 0x00, 0x3a, 0x00, 0xbc, 0xff, 0xec, + 0x00, 0x3a, 0x00, 0xbd, 0xff, 0xec, 0x00, 0x3a, 0x00, 0xbe, 0xff, 0xec, + 0x00, 0x3b, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x3b, 0x00, 0x2a, 0xff, 0xd7, + 0x00, 0x3b, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x3b, 0x00, 0x34, 0xff, 0xd7, + 0x00, 0x3b, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x3b, 0x00, 0x94, 0xff, 0xd7, + 0x00, 0x3b, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x3b, 0x00, 0x96, 0xff, 0xd7, + 0x00, 0x3b, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x3b, 0x00, 0x98, 0xff, 0xd7, + 0x00, 0x3b, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x3c, 0x00, 0x0f, 0xff, 0x85, + 0x00, 0x3c, 0x00, 0x11, 0xff, 0x85, 0x00, 0x3c, 0x00, 0x22, 0x00, 0x29, + 0x00, 0x3c, 0x00, 0x24, 0xff, 0x85, 0x00, 0x3c, 0x00, 0x26, 0xff, 0xd7, + 0x00, 0x3c, 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x3c, 0x00, 0x32, 0xff, 0xd7, + 0x00, 0x3c, 0x00, 0x34, 0xff, 0xd7, 0x00, 0x3c, 0x00, 0x44, 0xff, 0x9a, + 0x00, 0x3c, 0x00, 0x46, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0x47, 0xff, 0x9a, + 0x00, 0x3c, 0x00, 0x48, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0x4a, 0xff, 0xd7, + 0x00, 0x3c, 0x00, 0x50, 0xff, 0xc3, 0x00, 0x3c, 0x00, 0x51, 0xff, 0xc3, + 0x00, 0x3c, 0x00, 0x52, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0x53, 0xff, 0xc3, + 0x00, 0x3c, 0x00, 0x54, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0x55, 0xff, 0xc3, + 0x00, 0x3c, 0x00, 0x56, 0xff, 0xae, 0x00, 0x3c, 0x00, 0x58, 0xff, 0xc3, + 0x00, 0x3c, 0x00, 0x5d, 0xff, 0xd7, 0x00, 0x3c, 0x00, 0x82, 0xff, 0x85, + 0x00, 0x3c, 0x00, 0x83, 0xff, 0x85, 0x00, 0x3c, 0x00, 0x84, 0xff, 0x85, + 0x00, 0x3c, 0x00, 0x85, 0xff, 0x85, 0x00, 0x3c, 0x00, 0x86, 0xff, 0x85, + 0x00, 0x3c, 0x00, 0x87, 0xff, 0x85, 0x00, 0x3c, 0x00, 0x89, 0xff, 0xd7, + 0x00, 0x3c, 0x00, 0x94, 0xff, 0xd7, 0x00, 0x3c, 0x00, 0x95, 0xff, 0xd7, + 0x00, 0x3c, 0x00, 0x96, 0xff, 0xd7, 0x00, 0x3c, 0x00, 0x97, 0xff, 0xd7, + 0x00, 0x3c, 0x00, 0x98, 0xff, 0xd7, 0x00, 0x3c, 0x00, 0x9a, 0xff, 0xd7, + 0x00, 0x3c, 0x00, 0xa2, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xa3, 0xff, 0x9a, + 0x00, 0x3c, 0x00, 0xa4, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xa5, 0xff, 0x9a, + 0x00, 0x3c, 0x00, 0xa6, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xa7, 0xff, 0x9a, + 0x00, 0x3c, 0x00, 0xa8, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xa9, 0xff, 0x9a, + 0x00, 0x3c, 0x00, 0xaa, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xab, 0xff, 0x9a, + 0x00, 0x3c, 0x00, 0xac, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xad, 0xff, 0x9a, + 0x00, 0x3c, 0x00, 0xb4, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xb5, 0xff, 0x9a, + 0x00, 0x3c, 0x00, 0xb6, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xb7, 0xff, 0x9a, + 0x00, 0x3c, 0x00, 0xb8, 0xff, 0x9a, 0x00, 0x3c, 0x00, 0xba, 0xff, 0x9a, + 0x00, 0x3c, 0x00, 0xbb, 0xff, 0xc3, 0x00, 0x3c, 0x00, 0xbc, 0xff, 0xc3, + 0x00, 0x3c, 0x00, 0xbd, 0xff, 0xc3, 0x00, 0x3c, 0x00, 0xbe, 0xff, 0xc3, + 0x00, 0x3d, 0x00, 0x26, 0xff, 0xec, 0x00, 0x3d, 0x00, 0x2a, 0xff, 0xec, + 0x00, 0x3d, 0x00, 0x32, 0xff, 0xec, 0x00, 0x3d, 0x00, 0x34, 0xff, 0xec, + 0x00, 0x3d, 0x00, 0x89, 0xff, 0xec, 0x00, 0x3d, 0x00, 0x94, 0xff, 0xec, + 0x00, 0x3d, 0x00, 0x95, 0xff, 0xec, 0x00, 0x3d, 0x00, 0x96, 0xff, 0xec, + 0x00, 0x3d, 0x00, 0x97, 0xff, 0xec, 0x00, 0x3d, 0x00, 0x98, 0xff, 0xec, + 0x00, 0x3d, 0x00, 0x9a, 0xff, 0xec, 0x00, 0x3e, 0x00, 0x2d, 0x00, 0xb8, + 0x00, 0x44, 0x00, 0x05, 0xff, 0xec, 0x00, 0x44, 0x00, 0x0a, 0xff, 0xec, + 0x00, 0x45, 0x00, 0x05, 0xff, 0xec, 0x00, 0x45, 0x00, 0x0a, 0xff, 0xec, + 0x00, 0x45, 0x00, 0x59, 0xff, 0xd7, 0x00, 0x45, 0x00, 0x5a, 0xff, 0xd7, + 0x00, 0x45, 0x00, 0x5b, 0xff, 0xd7, 0x00, 0x45, 0x00, 0x5c, 0xff, 0xd7, + 0x00, 0x45, 0x00, 0x5d, 0xff, 0xec, 0x00, 0x45, 0x00, 0xbf, 0xff, 0xd7, + 0x00, 0x46, 0x00, 0x05, 0x00, 0x29, 0x00, 0x46, 0x00, 0x0a, 0x00, 0x29, + 0x00, 0x48, 0x00, 0x05, 0xff, 0xec, 0x00, 0x48, 0x00, 0x0a, 0xff, 0xec, + 0x00, 0x48, 0x00, 0x59, 0xff, 0xd7, 0x00, 0x48, 0x00, 0x5a, 0xff, 0xd7, + 0x00, 0x48, 0x00, 0x5b, 0xff, 0xd7, 0x00, 0x48, 0x00, 0x5c, 0xff, 0xd7, + 0x00, 0x48, 0x00, 0x5d, 0xff, 0xec, 0x00, 0x48, 0x00, 0xbf, 0xff, 0xd7, + 0x00, 0x49, 0x00, 0x05, 0x00, 0x7b, 0x00, 0x49, 0x00, 0x0a, 0x00, 0x7b, + 0x00, 0x4b, 0x00, 0x05, 0xff, 0xec, 0x00, 0x4b, 0x00, 0x0a, 0xff, 0xec, + 0x00, 0x4e, 0x00, 0x46, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0x47, 0xff, 0xd7, + 0x00, 0x4e, 0x00, 0x48, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0x52, 0xff, 0xd7, + 0x00, 0x4e, 0x00, 0x54, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0xa2, 0xff, 0xd7, + 0x00, 0x4e, 0x00, 0xa9, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0xaa, 0xff, 0xd7, + 0x00, 0x4e, 0x00, 0xab, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0xac, 0xff, 0xd7, + 0x00, 0x4e, 0x00, 0xad, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0xb4, 0xff, 0xd7, + 0x00, 0x4e, 0x00, 0xb5, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0xb6, 0xff, 0xd7, + 0x00, 0x4e, 0x00, 0xb7, 0xff, 0xd7, 0x00, 0x4e, 0x00, 0xb8, 0xff, 0xd7, + 0x00, 0x4e, 0x00, 0xba, 0xff, 0xd7, 0x00, 0x50, 0x00, 0x05, 0xff, 0xec, + 0x00, 0x50, 0x00, 0x0a, 0xff, 0xec, 0x00, 0x51, 0x00, 0x05, 0xff, 0xec, + 0x00, 0x51, 0x00, 0x0a, 0xff, 0xec, 0x00, 0x52, 0x00, 0x05, 0xff, 0xec, + 0x00, 0x52, 0x00, 0x0a, 0xff, 0xec, 0x00, 0x52, 0x00, 0x59, 0xff, 0xd7, + 0x00, 0x52, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0x52, 0x00, 0x5b, 0xff, 0xd7, + 0x00, 0x52, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0x52, 0x00, 0x5d, 0xff, 0xec, + 0x00, 0x52, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0x53, 0x00, 0x05, 0xff, 0xec, + 0x00, 0x53, 0x00, 0x0a, 0xff, 0xec, 0x00, 0x53, 0x00, 0x59, 0xff, 0xd7, + 0x00, 0x53, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0x53, 0x00, 0x5b, 0xff, 0xd7, + 0x00, 0x53, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0x53, 0x00, 0x5d, 0xff, 0xec, + 0x00, 0x53, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0x55, 0x00, 0x05, 0x00, 0x52, + 0x00, 0x55, 0x00, 0x0a, 0x00, 0x52, 0x00, 0x55, 0x00, 0x44, 0xff, 0xd7, + 0x00, 0x55, 0x00, 0x46, 0xff, 0xd7, 0x00, 0x55, 0x00, 0x47, 0xff, 0xd7, + 0x00, 0x55, 0x00, 0x48, 0xff, 0xd7, 0x00, 0x55, 0x00, 0x4a, 0xff, 0xec, + 0x00, 0x55, 0x00, 0x52, 0xff, 0xd7, 0x00, 0x55, 0x00, 0x54, 0xff, 0xd7, + 0x00, 0x55, 0x00, 0xa2, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xa3, 0xff, 0xd7, + 0x00, 0x55, 0x00, 0xa4, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xa5, 0xff, 0xd7, + 0x00, 0x55, 0x00, 0xa6, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xa7, 0xff, 0xd7, + 0x00, 0x55, 0x00, 0xa8, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xa9, 0xff, 0xd7, + 0x00, 0x55, 0x00, 0xaa, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xab, 0xff, 0xd7, + 0x00, 0x55, 0x00, 0xac, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xad, 0xff, 0xd7, + 0x00, 0x55, 0x00, 0xb4, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xb5, 0xff, 0xd7, + 0x00, 0x55, 0x00, 0xb6, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xb7, 0xff, 0xd7, + 0x00, 0x55, 0x00, 0xb8, 0xff, 0xd7, 0x00, 0x55, 0x00, 0xba, 0xff, 0xd7, + 0x00, 0x57, 0x00, 0x05, 0x00, 0x29, 0x00, 0x57, 0x00, 0x0a, 0x00, 0x29, + 0x00, 0x59, 0x00, 0x05, 0x00, 0x52, 0x00, 0x59, 0x00, 0x0a, 0x00, 0x52, + 0x00, 0x59, 0x00, 0x0f, 0xff, 0xae, 0x00, 0x59, 0x00, 0x11, 0xff, 0xae, + 0x00, 0x59, 0x00, 0x22, 0x00, 0x29, 0x00, 0x5a, 0x00, 0x05, 0x00, 0x52, + 0x00, 0x5a, 0x00, 0x0a, 0x00, 0x52, 0x00, 0x5a, 0x00, 0x0f, 0xff, 0xae, + 0x00, 0x5a, 0x00, 0x11, 0xff, 0xae, 0x00, 0x5a, 0x00, 0x22, 0x00, 0x29, + 0x00, 0x5b, 0x00, 0x46, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0x47, 0xff, 0xd7, + 0x00, 0x5b, 0x00, 0x48, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0x52, 0xff, 0xd7, + 0x00, 0x5b, 0x00, 0x54, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0xa2, 0xff, 0xd7, + 0x00, 0x5b, 0x00, 0xa9, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0xaa, 0xff, 0xd7, + 0x00, 0x5b, 0x00, 0xab, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0xac, 0xff, 0xd7, + 0x00, 0x5b, 0x00, 0xad, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0xb4, 0xff, 0xd7, + 0x00, 0x5b, 0x00, 0xb5, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0xb6, 0xff, 0xd7, + 0x00, 0x5b, 0x00, 0xb7, 0xff, 0xd7, 0x00, 0x5b, 0x00, 0xb8, 0xff, 0xd7, + 0x00, 0x5b, 0x00, 0xba, 0xff, 0xd7, 0x00, 0x5c, 0x00, 0x05, 0x00, 0x52, + 0x00, 0x5c, 0x00, 0x0a, 0x00, 0x52, 0x00, 0x5c, 0x00, 0x0f, 0xff, 0xae, + 0x00, 0x5c, 0x00, 0x11, 0xff, 0xae, 0x00, 0x5c, 0x00, 0x22, 0x00, 0x29, + 0x00, 0x5e, 0x00, 0x2d, 0x00, 0xb8, 0x00, 0x82, 0x00, 0x05, 0xff, 0x71, + 0x00, 0x82, 0x00, 0x0a, 0xff, 0x71, 0x00, 0x82, 0x00, 0x26, 0xff, 0xd7, + 0x00, 0x82, 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x82, 0x00, 0x2d, 0x01, 0x0a, + 0x00, 0x82, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x82, 0x00, 0x34, 0xff, 0xd7, + 0x00, 0x82, 0x00, 0x37, 0xff, 0x71, 0x00, 0x82, 0x00, 0x39, 0xff, 0xae, + 0x00, 0x82, 0x00, 0x3a, 0xff, 0xae, 0x00, 0x82, 0x00, 0x3c, 0xff, 0x85, + 0x00, 0x82, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x82, 0x00, 0x94, 0xff, 0xd7, + 0x00, 0x82, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x82, 0x00, 0x96, 0xff, 0xd7, + 0x00, 0x82, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x82, 0x00, 0x98, 0xff, 0xd7, + 0x00, 0x82, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x82, 0x00, 0x9f, 0xff, 0x85, + 0x00, 0x83, 0x00, 0x05, 0xff, 0x71, 0x00, 0x83, 0x00, 0x0a, 0xff, 0x71, + 0x00, 0x83, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x83, 0x00, 0x2a, 0xff, 0xd7, + 0x00, 0x83, 0x00, 0x2d, 0x01, 0x0a, 0x00, 0x83, 0x00, 0x32, 0xff, 0xd7, + 0x00, 0x83, 0x00, 0x34, 0xff, 0xd7, 0x00, 0x83, 0x00, 0x37, 0xff, 0x71, + 0x00, 0x83, 0x00, 0x39, 0xff, 0xae, 0x00, 0x83, 0x00, 0x3a, 0xff, 0xae, + 0x00, 0x83, 0x00, 0x3c, 0xff, 0x85, 0x00, 0x83, 0x00, 0x89, 0xff, 0xd7, + 0x00, 0x83, 0x00, 0x94, 0xff, 0xd7, 0x00, 0x83, 0x00, 0x95, 0xff, 0xd7, + 0x00, 0x83, 0x00, 0x96, 0xff, 0xd7, 0x00, 0x83, 0x00, 0x97, 0xff, 0xd7, + 0x00, 0x83, 0x00, 0x98, 0xff, 0xd7, 0x00, 0x83, 0x00, 0x9a, 0xff, 0xd7, + 0x00, 0x83, 0x00, 0x9f, 0xff, 0x85, 0x00, 0x84, 0x00, 0x05, 0xff, 0x71, + 0x00, 0x84, 0x00, 0x0a, 0xff, 0x71, 0x00, 0x84, 0x00, 0x26, 0xff, 0xd7, + 0x00, 0x84, 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x84, 0x00, 0x2d, 0x01, 0x0a, + 0x00, 0x84, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x84, 0x00, 0x34, 0xff, 0xd7, + 0x00, 0x84, 0x00, 0x37, 0xff, 0x71, 0x00, 0x84, 0x00, 0x39, 0xff, 0xae, + 0x00, 0x84, 0x00, 0x3a, 0xff, 0xae, 0x00, 0x84, 0x00, 0x3c, 0xff, 0x85, + 0x00, 0x84, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x84, 0x00, 0x94, 0xff, 0xd7, + 0x00, 0x84, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x84, 0x00, 0x96, 0xff, 0xd7, + 0x00, 0x84, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x84, 0x00, 0x98, 0xff, 0xd7, + 0x00, 0x84, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x84, 0x00, 0x9f, 0xff, 0x85, + 0x00, 0x85, 0x00, 0x05, 0xff, 0x71, 0x00, 0x85, 0x00, 0x0a, 0xff, 0x71, + 0x00, 0x85, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x85, 0x00, 0x2a, 0xff, 0xd7, + 0x00, 0x85, 0x00, 0x2d, 0x01, 0x0a, 0x00, 0x85, 0x00, 0x32, 0xff, 0xd7, + 0x00, 0x85, 0x00, 0x34, 0xff, 0xd7, 0x00, 0x85, 0x00, 0x37, 0xff, 0x71, + 0x00, 0x85, 0x00, 0x39, 0xff, 0xae, 0x00, 0x85, 0x00, 0x3a, 0xff, 0xae, + 0x00, 0x85, 0x00, 0x3c, 0xff, 0x85, 0x00, 0x85, 0x00, 0x89, 0xff, 0xd7, + 0x00, 0x85, 0x00, 0x94, 0xff, 0xd7, 0x00, 0x85, 0x00, 0x95, 0xff, 0xd7, + 0x00, 0x85, 0x00, 0x96, 0xff, 0xd7, 0x00, 0x85, 0x00, 0x97, 0xff, 0xd7, + 0x00, 0x85, 0x00, 0x98, 0xff, 0xd7, 0x00, 0x85, 0x00, 0x9a, 0xff, 0xd7, + 0x00, 0x85, 0x00, 0x9f, 0xff, 0x85, 0x00, 0x86, 0x00, 0x05, 0xff, 0x71, + 0x00, 0x86, 0x00, 0x0a, 0xff, 0x71, 0x00, 0x86, 0x00, 0x26, 0xff, 0xd7, + 0x00, 0x86, 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x86, 0x00, 0x2d, 0x01, 0x0a, + 0x00, 0x86, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x86, 0x00, 0x34, 0xff, 0xd7, + 0x00, 0x86, 0x00, 0x37, 0xff, 0x71, 0x00, 0x86, 0x00, 0x39, 0xff, 0xae, + 0x00, 0x86, 0x00, 0x3a, 0xff, 0xae, 0x00, 0x86, 0x00, 0x3c, 0xff, 0x85, + 0x00, 0x86, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x86, 0x00, 0x94, 0xff, 0xd7, + 0x00, 0x86, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x86, 0x00, 0x96, 0xff, 0xd7, + 0x00, 0x86, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x86, 0x00, 0x98, 0xff, 0xd7, + 0x00, 0x86, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x86, 0x00, 0x9f, 0xff, 0x85, + 0x00, 0x87, 0x00, 0x05, 0xff, 0x71, 0x00, 0x87, 0x00, 0x0a, 0xff, 0x71, + 0x00, 0x87, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x87, 0x00, 0x2a, 0xff, 0xd7, + 0x00, 0x87, 0x00, 0x2d, 0x01, 0x0a, 0x00, 0x87, 0x00, 0x32, 0xff, 0xd7, + 0x00, 0x87, 0x00, 0x34, 0xff, 0xd7, 0x00, 0x87, 0x00, 0x37, 0xff, 0x71, + 0x00, 0x87, 0x00, 0x39, 0xff, 0xae, 0x00, 0x87, 0x00, 0x3a, 0xff, 0xae, + 0x00, 0x87, 0x00, 0x3c, 0xff, 0x85, 0x00, 0x87, 0x00, 0x89, 0xff, 0xd7, + 0x00, 0x87, 0x00, 0x94, 0xff, 0xd7, 0x00, 0x87, 0x00, 0x95, 0xff, 0xd7, + 0x00, 0x87, 0x00, 0x96, 0xff, 0xd7, 0x00, 0x87, 0x00, 0x97, 0xff, 0xd7, + 0x00, 0x87, 0x00, 0x98, 0xff, 0xd7, 0x00, 0x87, 0x00, 0x9a, 0xff, 0xd7, + 0x00, 0x87, 0x00, 0x9f, 0xff, 0x85, 0x00, 0x88, 0x00, 0x2d, 0x00, 0x7b, + 0x00, 0x89, 0x00, 0x26, 0xff, 0xd7, 0x00, 0x89, 0x00, 0x2a, 0xff, 0xd7, + 0x00, 0x89, 0x00, 0x32, 0xff, 0xd7, 0x00, 0x89, 0x00, 0x34, 0xff, 0xd7, + 0x00, 0x89, 0x00, 0x89, 0xff, 0xd7, 0x00, 0x89, 0x00, 0x94, 0xff, 0xd7, + 0x00, 0x89, 0x00, 0x95, 0xff, 0xd7, 0x00, 0x89, 0x00, 0x96, 0xff, 0xd7, + 0x00, 0x89, 0x00, 0x97, 0xff, 0xd7, 0x00, 0x89, 0x00, 0x98, 0xff, 0xd7, + 0x00, 0x89, 0x00, 0x9a, 0xff, 0xd7, 0x00, 0x8a, 0x00, 0x2d, 0x00, 0x7b, + 0x00, 0x8b, 0x00, 0x2d, 0x00, 0x7b, 0x00, 0x8c, 0x00, 0x2d, 0x00, 0x7b, + 0x00, 0x8d, 0x00, 0x2d, 0x00, 0x7b, 0x00, 0x92, 0x00, 0x0f, 0xff, 0xae, + 0x00, 0x92, 0x00, 0x11, 0xff, 0xae, 0x00, 0x92, 0x00, 0x24, 0xff, 0xd7, + 0x00, 0x92, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x92, 0x00, 0x39, 0xff, 0xec, + 0x00, 0x92, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x92, 0x00, 0x3b, 0xff, 0xd7, + 0x00, 0x92, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x92, 0x00, 0x3d, 0xff, 0xec, + 0x00, 0x92, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x92, 0x00, 0x83, 0xff, 0xd7, + 0x00, 0x92, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x92, 0x00, 0x85, 0xff, 0xd7, + 0x00, 0x92, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x92, 0x00, 0x87, 0xff, 0xd7, + 0x00, 0x92, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x94, 0x00, 0x0f, 0xff, 0xae, + 0x00, 0x94, 0x00, 0x11, 0xff, 0xae, 0x00, 0x94, 0x00, 0x24, 0xff, 0xd7, + 0x00, 0x94, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x94, 0x00, 0x39, 0xff, 0xec, + 0x00, 0x94, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x94, 0x00, 0x3b, 0xff, 0xd7, + 0x00, 0x94, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x94, 0x00, 0x3d, 0xff, 0xec, + 0x00, 0x94, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x94, 0x00, 0x83, 0xff, 0xd7, + 0x00, 0x94, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x94, 0x00, 0x85, 0xff, 0xd7, + 0x00, 0x94, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x94, 0x00, 0x87, 0xff, 0xd7, + 0x00, 0x94, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x95, 0x00, 0x0f, 0xff, 0xae, + 0x00, 0x95, 0x00, 0x11, 0xff, 0xae, 0x00, 0x95, 0x00, 0x24, 0xff, 0xd7, + 0x00, 0x95, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x95, 0x00, 0x39, 0xff, 0xec, + 0x00, 0x95, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x95, 0x00, 0x3b, 0xff, 0xd7, + 0x00, 0x95, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x95, 0x00, 0x3d, 0xff, 0xec, + 0x00, 0x95, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x95, 0x00, 0x83, 0xff, 0xd7, + 0x00, 0x95, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x95, 0x00, 0x85, 0xff, 0xd7, + 0x00, 0x95, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x95, 0x00, 0x87, 0xff, 0xd7, + 0x00, 0x95, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x96, 0x00, 0x0f, 0xff, 0xae, + 0x00, 0x96, 0x00, 0x11, 0xff, 0xae, 0x00, 0x96, 0x00, 0x24, 0xff, 0xd7, + 0x00, 0x96, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x96, 0x00, 0x39, 0xff, 0xec, + 0x00, 0x96, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x96, 0x00, 0x3b, 0xff, 0xd7, + 0x00, 0x96, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x96, 0x00, 0x3d, 0xff, 0xec, + 0x00, 0x96, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x96, 0x00, 0x83, 0xff, 0xd7, + 0x00, 0x96, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x96, 0x00, 0x85, 0xff, 0xd7, + 0x00, 0x96, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x96, 0x00, 0x87, 0xff, 0xd7, + 0x00, 0x96, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x97, 0x00, 0x0f, 0xff, 0xae, + 0x00, 0x97, 0x00, 0x11, 0xff, 0xae, 0x00, 0x97, 0x00, 0x24, 0xff, 0xd7, + 0x00, 0x97, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x97, 0x00, 0x39, 0xff, 0xec, + 0x00, 0x97, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x97, 0x00, 0x3b, 0xff, 0xd7, + 0x00, 0x97, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x97, 0x00, 0x3d, 0xff, 0xec, + 0x00, 0x97, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x97, 0x00, 0x83, 0xff, 0xd7, + 0x00, 0x97, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x97, 0x00, 0x85, 0xff, 0xd7, + 0x00, 0x97, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x97, 0x00, 0x87, 0xff, 0xd7, + 0x00, 0x97, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x98, 0x00, 0x0f, 0xff, 0xae, + 0x00, 0x98, 0x00, 0x11, 0xff, 0xae, 0x00, 0x98, 0x00, 0x24, 0xff, 0xd7, + 0x00, 0x98, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x98, 0x00, 0x39, 0xff, 0xec, + 0x00, 0x98, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x98, 0x00, 0x3b, 0xff, 0xd7, + 0x00, 0x98, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x98, 0x00, 0x3d, 0xff, 0xec, + 0x00, 0x98, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x98, 0x00, 0x83, 0xff, 0xd7, + 0x00, 0x98, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x98, 0x00, 0x85, 0xff, 0xd7, + 0x00, 0x98, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x98, 0x00, 0x87, 0xff, 0xd7, + 0x00, 0x98, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x9a, 0x00, 0x0f, 0xff, 0xae, + 0x00, 0x9a, 0x00, 0x11, 0xff, 0xae, 0x00, 0x9a, 0x00, 0x24, 0xff, 0xd7, + 0x00, 0x9a, 0x00, 0x37, 0xff, 0xc3, 0x00, 0x9a, 0x00, 0x39, 0xff, 0xec, + 0x00, 0x9a, 0x00, 0x3a, 0xff, 0xec, 0x00, 0x9a, 0x00, 0x3b, 0xff, 0xd7, + 0x00, 0x9a, 0x00, 0x3c, 0xff, 0xec, 0x00, 0x9a, 0x00, 0x3d, 0xff, 0xec, + 0x00, 0x9a, 0x00, 0x82, 0xff, 0xd7, 0x00, 0x9a, 0x00, 0x83, 0xff, 0xd7, + 0x00, 0x9a, 0x00, 0x84, 0xff, 0xd7, 0x00, 0x9a, 0x00, 0x85, 0xff, 0xd7, + 0x00, 0x9a, 0x00, 0x86, 0xff, 0xd7, 0x00, 0x9a, 0x00, 0x87, 0xff, 0xd7, + 0x00, 0x9a, 0x00, 0x9f, 0xff, 0xec, 0x00, 0x9b, 0x00, 0x0f, 0xff, 0xd7, + 0x00, 0x9b, 0x00, 0x11, 0xff, 0xd7, 0x00, 0x9b, 0x00, 0x24, 0xff, 0xec, + 0x00, 0x9b, 0x00, 0x82, 0xff, 0xec, 0x00, 0x9b, 0x00, 0x83, 0xff, 0xec, + 0x00, 0x9b, 0x00, 0x84, 0xff, 0xec, 0x00, 0x9b, 0x00, 0x85, 0xff, 0xec, + 0x00, 0x9b, 0x00, 0x86, 0xff, 0xec, 0x00, 0x9b, 0x00, 0x87, 0xff, 0xec, + 0x00, 0x9c, 0x00, 0x0f, 0xff, 0xd7, 0x00, 0x9c, 0x00, 0x11, 0xff, 0xd7, + 0x00, 0x9c, 0x00, 0x24, 0xff, 0xec, 0x00, 0x9c, 0x00, 0x82, 0xff, 0xec, + 0x00, 0x9c, 0x00, 0x83, 0xff, 0xec, 0x00, 0x9c, 0x00, 0x84, 0xff, 0xec, + 0x00, 0x9c, 0x00, 0x85, 0xff, 0xec, 0x00, 0x9c, 0x00, 0x86, 0xff, 0xec, + 0x00, 0x9c, 0x00, 0x87, 0xff, 0xec, 0x00, 0x9d, 0x00, 0x0f, 0xff, 0xd7, + 0x00, 0x9d, 0x00, 0x11, 0xff, 0xd7, 0x00, 0x9d, 0x00, 0x24, 0xff, 0xec, + 0x00, 0x9d, 0x00, 0x82, 0xff, 0xec, 0x00, 0x9d, 0x00, 0x83, 0xff, 0xec, + 0x00, 0x9d, 0x00, 0x84, 0xff, 0xec, 0x00, 0x9d, 0x00, 0x85, 0xff, 0xec, + 0x00, 0x9d, 0x00, 0x86, 0xff, 0xec, 0x00, 0x9d, 0x00, 0x87, 0xff, 0xec, + 0x00, 0x9e, 0x00, 0x0f, 0xff, 0xd7, 0x00, 0x9e, 0x00, 0x11, 0xff, 0xd7, + 0x00, 0x9e, 0x00, 0x24, 0xff, 0xec, 0x00, 0x9e, 0x00, 0x82, 0xff, 0xec, + 0x00, 0x9e, 0x00, 0x83, 0xff, 0xec, 0x00, 0x9e, 0x00, 0x84, 0xff, 0xec, + 0x00, 0x9e, 0x00, 0x85, 0xff, 0xec, 0x00, 0x9e, 0x00, 0x86, 0xff, 0xec, + 0x00, 0x9e, 0x00, 0x87, 0xff, 0xec, 0x00, 0x9f, 0x00, 0x0f, 0xff, 0x85, + 0x00, 0x9f, 0x00, 0x11, 0xff, 0x85, 0x00, 0x9f, 0x00, 0x22, 0x00, 0x29, + 0x00, 0x9f, 0x00, 0x24, 0xff, 0x85, 0x00, 0x9f, 0x00, 0x26, 0xff, 0xd7, + 0x00, 0x9f, 0x00, 0x2a, 0xff, 0xd7, 0x00, 0x9f, 0x00, 0x32, 0xff, 0xd7, + 0x00, 0x9f, 0x00, 0x34, 0xff, 0xd7, 0x00, 0x9f, 0x00, 0x44, 0xff, 0x9a, + 0x00, 0x9f, 0x00, 0x46, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0x47, 0xff, 0x9a, + 0x00, 0x9f, 0x00, 0x48, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0x4a, 0xff, 0xd7, + 0x00, 0x9f, 0x00, 0x50, 0xff, 0xc3, 0x00, 0x9f, 0x00, 0x51, 0xff, 0xc3, + 0x00, 0x9f, 0x00, 0x52, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0x53, 0xff, 0xc3, + 0x00, 0x9f, 0x00, 0x54, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0x55, 0xff, 0xc3, + 0x00, 0x9f, 0x00, 0x56, 0xff, 0xae, 0x00, 0x9f, 0x00, 0x58, 0xff, 0xc3, + 0x00, 0x9f, 0x00, 0x5d, 0xff, 0xd7, 0x00, 0x9f, 0x00, 0x82, 0xff, 0x85, + 0x00, 0x9f, 0x00, 0x83, 0xff, 0x85, 0x00, 0x9f, 0x00, 0x84, 0xff, 0x85, + 0x00, 0x9f, 0x00, 0x85, 0xff, 0x85, 0x00, 0x9f, 0x00, 0x86, 0xff, 0x85, + 0x00, 0x9f, 0x00, 0x87, 0xff, 0x85, 0x00, 0x9f, 0x00, 0x89, 0xff, 0xd7, + 0x00, 0x9f, 0x00, 0x94, 0xff, 0xd7, 0x00, 0x9f, 0x00, 0x95, 0xff, 0xd7, + 0x00, 0x9f, 0x00, 0x96, 0xff, 0xd7, 0x00, 0x9f, 0x00, 0x97, 0xff, 0xd7, + 0x00, 0x9f, 0x00, 0x98, 0xff, 0xd7, 0x00, 0x9f, 0x00, 0x9a, 0xff, 0xd7, + 0x00, 0x9f, 0x00, 0xa2, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xa3, 0xff, 0x9a, + 0x00, 0x9f, 0x00, 0xa4, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xa5, 0xff, 0x9a, + 0x00, 0x9f, 0x00, 0xa6, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xa7, 0xff, 0x9a, + 0x00, 0x9f, 0x00, 0xa8, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xa9, 0xff, 0x9a, + 0x00, 0x9f, 0x00, 0xaa, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xab, 0xff, 0x9a, + 0x00, 0x9f, 0x00, 0xac, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xad, 0xff, 0x9a, + 0x00, 0x9f, 0x00, 0xb4, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xb5, 0xff, 0x9a, + 0x00, 0x9f, 0x00, 0xb6, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xb7, 0xff, 0x9a, + 0x00, 0x9f, 0x00, 0xb8, 0xff, 0x9a, 0x00, 0x9f, 0x00, 0xba, 0xff, 0x9a, + 0x00, 0x9f, 0x00, 0xbb, 0xff, 0xc3, 0x00, 0x9f, 0x00, 0xbc, 0xff, 0xc3, + 0x00, 0x9f, 0x00, 0xbd, 0xff, 0xc3, 0x00, 0x9f, 0x00, 0xbe, 0xff, 0xc3, + 0x00, 0xa0, 0x00, 0x0f, 0xfe, 0xf6, 0x00, 0xa0, 0x00, 0x11, 0xfe, 0xf6, + 0x00, 0xa0, 0x00, 0x24, 0xff, 0x9a, 0x00, 0xa0, 0x00, 0x3b, 0xff, 0xd7, + 0x00, 0xa0, 0x00, 0x3d, 0xff, 0xec, 0x00, 0xa0, 0x00, 0x82, 0xff, 0x9a, + 0x00, 0xa0, 0x00, 0x83, 0xff, 0x9a, 0x00, 0xa0, 0x00, 0x84, 0xff, 0x9a, + 0x00, 0xa0, 0x00, 0x85, 0xff, 0x9a, 0x00, 0xa0, 0x00, 0x86, 0xff, 0x9a, + 0x00, 0xa0, 0x00, 0x87, 0xff, 0x9a, 0x00, 0xa2, 0x00, 0x05, 0xff, 0xec, + 0x00, 0xa2, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xa3, 0x00, 0x05, 0xff, 0xec, + 0x00, 0xa3, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xa4, 0x00, 0x05, 0xff, 0xec, + 0x00, 0xa4, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xa5, 0x00, 0x05, 0xff, 0xec, + 0x00, 0xa5, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xa6, 0x00, 0x05, 0xff, 0xec, + 0x00, 0xa6, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xa7, 0x00, 0x05, 0xff, 0xec, + 0x00, 0xa7, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xaa, 0x00, 0x05, 0xff, 0xec, + 0x00, 0xaa, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xaa, 0x00, 0x59, 0xff, 0xd7, + 0x00, 0xaa, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xaa, 0x00, 0x5b, 0xff, 0xd7, + 0x00, 0xaa, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xaa, 0x00, 0x5d, 0xff, 0xec, + 0x00, 0xaa, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xab, 0x00, 0x05, 0xff, 0xec, + 0x00, 0xab, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xab, 0x00, 0x59, 0xff, 0xd7, + 0x00, 0xab, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xab, 0x00, 0x5b, 0xff, 0xd7, + 0x00, 0xab, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xab, 0x00, 0x5d, 0xff, 0xec, + 0x00, 0xab, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xac, 0x00, 0x05, 0xff, 0xec, + 0x00, 0xac, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xac, 0x00, 0x59, 0xff, 0xd7, + 0x00, 0xac, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xac, 0x00, 0x5b, 0xff, 0xd7, + 0x00, 0xac, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xac, 0x00, 0x5d, 0xff, 0xec, + 0x00, 0xac, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xad, 0x00, 0x05, 0xff, 0xec, + 0x00, 0xad, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xad, 0x00, 0x59, 0xff, 0xd7, + 0x00, 0xad, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xad, 0x00, 0x5b, 0xff, 0xd7, + 0x00, 0xad, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xad, 0x00, 0x5d, 0xff, 0xec, + 0x00, 0xad, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xb2, 0x00, 0x05, 0xff, 0xec, + 0x00, 0xb2, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xb2, 0x00, 0x59, 0xff, 0xd7, + 0x00, 0xb2, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xb2, 0x00, 0x5b, 0xff, 0xd7, + 0x00, 0xb2, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xb2, 0x00, 0x5d, 0xff, 0xec, + 0x00, 0xb2, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xb4, 0x00, 0x05, 0xff, 0xec, + 0x00, 0xb4, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xb4, 0x00, 0x59, 0xff, 0xd7, + 0x00, 0xb4, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xb4, 0x00, 0x5b, 0xff, 0xd7, + 0x00, 0xb4, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xb4, 0x00, 0x5d, 0xff, 0xec, + 0x00, 0xb4, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xb5, 0x00, 0x05, 0xff, 0xec, + 0x00, 0xb5, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xb5, 0x00, 0x59, 0xff, 0xd7, + 0x00, 0xb5, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xb5, 0x00, 0x5b, 0xff, 0xd7, + 0x00, 0xb5, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xb5, 0x00, 0x5d, 0xff, 0xec, + 0x00, 0xb5, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xb6, 0x00, 0x05, 0xff, 0xec, + 0x00, 0xb6, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xb6, 0x00, 0x59, 0xff, 0xd7, + 0x00, 0xb6, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xb6, 0x00, 0x5b, 0xff, 0xd7, + 0x00, 0xb6, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xb6, 0x00, 0x5d, 0xff, 0xec, + 0x00, 0xb6, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xb8, 0x00, 0x05, 0xff, 0xd7, + 0x00, 0xb8, 0x00, 0x0a, 0xff, 0xd7, 0x00, 0xba, 0x00, 0x05, 0xff, 0xec, + 0x00, 0xba, 0x00, 0x0a, 0xff, 0xec, 0x00, 0xba, 0x00, 0x59, 0xff, 0xd7, + 0x00, 0xba, 0x00, 0x5a, 0xff, 0xd7, 0x00, 0xba, 0x00, 0x5b, 0xff, 0xd7, + 0x00, 0xba, 0x00, 0x5c, 0xff, 0xd7, 0x00, 0xba, 0x00, 0x5d, 0xff, 0xec, + 0x00, 0xba, 0x00, 0xbf, 0xff, 0xd7, 0x00, 0xbf, 0x00, 0x05, 0x00, 0x52, + 0x00, 0xbf, 0x00, 0x0a, 0x00, 0x52, 0x00, 0xbf, 0x00, 0x0f, 0xff, 0xae, + 0x00, 0xbf, 0x00, 0x11, 0xff, 0xae, 0x00, 0xbf, 0x00, 0x22, 0x00, 0x29, + 0x00, 0xc0, 0x00, 0x05, 0xff, 0xec, 0x00, 0xc0, 0x00, 0x0a, 0xff, 0xec, + 0x00, 0xc0, 0x00, 0x59, 0xff, 0xd7, 0x00, 0xc0, 0x00, 0x5a, 0xff, 0xd7, + 0x00, 0xc0, 0x00, 0x5b, 0xff, 0xd7, 0x00, 0xc0, 0x00, 0x5c, 0xff, 0xd7, + 0x00, 0xc0, 0x00, 0x5d, 0xff, 0xec, 0x00, 0xc0, 0x00, 0xbf, 0xff, 0xd7, + 0x00, 0xc1, 0x00, 0x05, 0x00, 0x52, 0x00, 0xc1, 0x00, 0x0a, 0x00, 0x52, + 0x00, 0xc1, 0x00, 0x0f, 0xff, 0xae, 0x00, 0xc1, 0x00, 0x11, 0xff, 0xae, + 0x00, 0xc1, 0x00, 0x22, 0x00, 0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, + 0x02, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, + 0x00, 0x74, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, + 0x00, 0xc2, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x07, + 0x00, 0xdc, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x1e, + 0x01, 0x22, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x09, + 0x01, 0x55, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x0c, + 0x01, 0x79, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x08, + 0x01, 0x98, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x52, + 0x02, 0x47, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x14, + 0x02, 0xc4, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x1c, + 0x03, 0x13, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x2e, + 0x03, 0x8e, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x2e, + 0x04, 0x1b, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x2a, + 0x04, 0xa0, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x18, + 0x04, 0xcb, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0b, + 0x05, 0x52, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x00, 0x11, + 0x05, 0x7e, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x00, 0x12, + 0x05, 0xed, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00, 0x12, + 0x06, 0x54, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x18, + 0x04, 0xe4, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x12, + 0x05, 0x5e, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x1f, + 0x05, 0x90, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x00, 0x1f, + 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x04, 0x00, 0x23, + 0x06, 0x67, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x21, + 0x04, 0xfd, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x01, 0x02, 0x00, 0x17, + 0x05, 0xb0, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x01, 0x03, 0x00, 0x10, + 0x06, 0x20, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x01, 0x04, 0x00, 0x0f, + 0x06, 0x8b, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x15, + 0x05, 0x1f, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x01, 0x02, 0x00, 0x11, + 0x05, 0xc8, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x01, 0x03, 0x00, 0x13, + 0x06, 0x31, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x01, 0x04, 0x00, 0x0c, + 0x06, 0x9b, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x1c, + 0x05, 0x35, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x01, 0x01, 0x00, 0x0c, + 0x05, 0x71, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x01, 0x02, 0x00, 0x12, + 0x05, 0xda, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x01, 0x03, 0x00, 0x0e, + 0x06, 0x45, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x01, 0x04, 0x00, 0x0d, + 0x06, 0xa8, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x00, 0x00, 0x72, + 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x01, 0x00, 0x12, + 0x00, 0xae, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x02, 0x00, 0x0e, + 0x00, 0xcc, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x03, 0x00, 0x3c, + 0x00, 0xe4, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x04, 0x00, 0x12, + 0x01, 0x41, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x05, 0x00, 0x18, + 0x01, 0x5f, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x06, 0x00, 0x10, + 0x01, 0x86, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x07, 0x00, 0xa4, + 0x01, 0xa1, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x08, 0x00, 0x28, + 0x02, 0x9a, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x0b, 0x00, 0x38, + 0x02, 0xd9, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x0c, 0x00, 0x5c, + 0x03, 0x30, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x0d, 0x00, 0x5c, + 0x03, 0xbd, 0x00, 0x03, 0x00, 0x01, 0x04, 0x09, 0x00, 0x0e, 0x00, 0x54, + 0x04, 0x4a, 0x00, 0x44, 0x00, 0x69, 0x00, 0x67, 0x00, 0x69, 0x00, 0x74, + 0x00, 0x69, 0x00, 0x7a, 0x00, 0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x64, + 0x00, 0x61, 0x00, 0x74, 0x00, 0x61, 0x00, 0x20, 0x00, 0x63, 0x00, 0x6f, + 0x00, 0x70, 0x00, 0x79, 0x00, 0x72, 0x00, 0x69, 0x00, 0x67, 0x00, 0x68, + 0x00, 0x74, 0x00, 0x20, 0x00, 0xa9, 0x00, 0x20, 0x00, 0x32, 0x00, 0x30, + 0x00, 0x31, 0x00, 0x30, 0x00, 0x2d, 0x00, 0x32, 0x00, 0x30, 0x00, 0x31, + 0x00, 0x31, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x47, 0x00, 0x6f, 0x00, 0x6f, + 0x00, 0x67, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x20, 0x00, 0x43, 0x00, 0x6f, + 0x00, 0x72, 0x00, 0x70, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, + 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x2e, 0x00, 0x00, 0x44, 0x69, + 0x67, 0x69, 0x74, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x64, 0x61, 0x74, 0x61, + 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0xa9, + 0x20, 0x32, 0x30, 0x31, 0x30, 0x2d, 0x32, 0x30, 0x31, 0x31, 0x2c, 0x20, + 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x43, 0x6f, 0x72, 0x70, 0x6f, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x00, 0x00, 0x4f, 0x00, 0x70, + 0x00, 0x65, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x53, 0x00, 0x61, 0x00, 0x6e, + 0x00, 0x73, 0x00, 0x00, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x53, 0x61, 0x6e, + 0x73, 0x00, 0x00, 0x52, 0x00, 0x65, 0x00, 0x67, 0x00, 0x75, 0x00, 0x6c, + 0x00, 0x61, 0x00, 0x72, 0x00, 0x00, 0x52, 0x65, 0x67, 0x75, 0x6c, 0x61, + 0x72, 0x00, 0x00, 0x41, 0x00, 0x73, 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, + 0x00, 0x64, 0x00, 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x2d, 0x00, 0x20, + 0x00, 0x4f, 0x00, 0x70, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x53, + 0x00, 0x61, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x20, 0x00, 0x42, 0x00, 0x75, + 0x00, 0x69, 0x00, 0x6c, 0x00, 0x64, 0x00, 0x20, 0x00, 0x31, 0x00, 0x30, + 0x00, 0x30, 0x00, 0x00, 0x41, 0x73, 0x63, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x20, 0x2d, 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x53, 0x61, 0x6e, 0x73, + 0x20, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x20, 0x31, 0x30, 0x30, 0x00, 0x00, + 0x4f, 0x00, 0x70, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x53, 0x00, + 0x61, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x00, 0x4f, 0x70, 0x65, 0x6e, 0x20, + 0x53, 0x61, 0x6e, 0x73, 0x00, 0x00, 0x56, 0x00, 0x65, 0x00, 0x72, 0x00, + 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x31, 0x00, + 0x2e, 0x00, 0x31, 0x00, 0x30, 0x00, 0x00, 0x56, 0x65, 0x72, 0x73, 0x69, + 0x6f, 0x6e, 0x20, 0x31, 0x2e, 0x31, 0x30, 0x00, 0x00, 0x4f, 0x00, 0x70, + 0x00, 0x65, 0x00, 0x6e, 0x00, 0x53, 0x00, 0x61, 0x00, 0x6e, 0x00, 0x73, + 0x00, 0x00, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x61, 0x6e, 0x73, 0x00, 0x00, + 0x4f, 0x00, 0x70, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x20, 0x00, 0x53, 0x00, + 0x61, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x20, 0x00, 0x69, 0x00, 0x73, 0x00, + 0x20, 0x00, 0x61, 0x00, 0x20, 0x00, 0x74, 0x00, 0x72, 0x00, 0x61, 0x00, + 0x64, 0x00, 0x65, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x72, 0x00, 0x6b, 0x00, + 0x20, 0x00, 0x6f, 0x00, 0x66, 0x00, 0x20, 0x00, 0x47, 0x00, 0x6f, 0x00, + 0x6f, 0x00, 0x67, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x20, 0x00, 0x61, 0x00, + 0x6e, 0x00, 0x64, 0x00, 0x20, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x79, 0x00, + 0x20, 0x00, 0x62, 0x00, 0x65, 0x00, 0x20, 0x00, 0x72, 0x00, 0x65, 0x00, + 0x67, 0x00, 0x69, 0x00, 0x73, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, + 0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x20, 0x00, + 0x63, 0x00, 0x65, 0x00, 0x72, 0x00, 0x74, 0x00, 0x61, 0x00, 0x69, 0x00, + 0x6e, 0x00, 0x20, 0x00, 0x6a, 0x00, 0x75, 0x00, 0x72, 0x00, 0x69, 0x00, + 0x73, 0x00, 0x64, 0x00, 0x69, 0x00, 0x63, 0x00, 0x74, 0x00, 0x69, 0x00, + 0x6f, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x2e, 0x00, 0x00, 0x4f, 0x70, 0x65, + 0x6e, 0x20, 0x53, 0x61, 0x6e, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, + 0x74, 0x72, 0x61, 0x64, 0x65, 0x6d, 0x61, 0x72, 0x6b, 0x20, 0x6f, 0x66, + 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, + 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x63, 0x65, 0x72, + 0x74, 0x61, 0x69, 0x6e, 0x20, 0x6a, 0x75, 0x72, 0x69, 0x73, 0x64, 0x69, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x00, 0x00, 0x41, 0x00, 0x73, + 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x65, 0x00, 0x72, + 0x00, 0x20, 0x00, 0x43, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x70, 0x00, 0x6f, + 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, + 0x00, 0x00, 0x41, 0x73, 0x63, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x43, + 0x6f, 0x72, 0x70, 0x6f, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, + 0x68, 0x00, 0x74, 0x00, 0x74, 0x00, 0x70, 0x00, 0x3a, 0x00, 0x2f, 0x00, + 0x2f, 0x00, 0x77, 0x00, 0x77, 0x00, 0x77, 0x00, 0x2e, 0x00, 0x61, 0x00, + 0x73, 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x64, 0x00, 0x65, 0x00, + 0x72, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x70, 0x00, 0x2e, 0x00, + 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2f, 0x00, 0x00, 0x68, 0x74, 0x74, + 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x61, 0x73, 0x63, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x63, 0x6f, 0x72, 0x70, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x00, 0x00, 0x68, 0x00, 0x74, 0x00, 0x74, 0x00, 0x70, 0x00, 0x3a, + 0x00, 0x2f, 0x00, 0x2f, 0x00, 0x77, 0x00, 0x77, 0x00, 0x77, 0x00, 0x2e, + 0x00, 0x61, 0x00, 0x73, 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x64, + 0x00, 0x65, 0x00, 0x72, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x70, + 0x00, 0x2e, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6d, 0x00, 0x2f, 0x00, 0x74, + 0x00, 0x79, 0x00, 0x70, 0x00, 0x65, 0x00, 0x64, 0x00, 0x65, 0x00, 0x73, + 0x00, 0x69, 0x00, 0x67, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x72, 0x00, 0x73, + 0x00, 0x2e, 0x00, 0x68, 0x00, 0x74, 0x00, 0x6d, 0x00, 0x6c, 0x00, 0x00, + 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x61, + 0x73, 0x63, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x63, 0x6f, 0x72, 0x70, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x64, 0x65, 0x73, 0x69, + 0x67, 0x6e, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x00, 0x00, + 0x4c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x73, 0x00, + 0x65, 0x00, 0x64, 0x00, 0x20, 0x00, 0x75, 0x00, 0x6e, 0x00, 0x64, 0x00, + 0x65, 0x00, 0x72, 0x00, 0x20, 0x00, 0x74, 0x00, 0x68, 0x00, 0x65, 0x00, + 0x20, 0x00, 0x41, 0x00, 0x70, 0x00, 0x61, 0x00, 0x63, 0x00, 0x68, 0x00, + 0x65, 0x00, 0x20, 0x00, 0x4c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x65, 0x00, + 0x6e, 0x00, 0x73, 0x00, 0x65, 0x00, 0x2c, 0x00, 0x20, 0x00, 0x56, 0x00, + 0x65, 0x00, 0x72, 0x00, 0x73, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, + 0x20, 0x00, 0x32, 0x00, 0x2e, 0x00, 0x30, 0x00, 0x00, 0x4c, 0x69, 0x63, + 0x65, 0x6e, 0x73, 0x65, 0x64, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x20, 0x4c, + 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x20, 0x32, 0x2e, 0x30, 0x00, 0x00, 0x68, 0x00, 0x74, + 0x00, 0x74, 0x00, 0x70, 0x00, 0x3a, 0x00, 0x2f, 0x00, 0x2f, 0x00, 0x77, + 0x00, 0x77, 0x00, 0x77, 0x00, 0x2e, 0x00, 0x61, 0x00, 0x70, 0x00, 0x61, + 0x00, 0x63, 0x00, 0x68, 0x00, 0x65, 0x00, 0x2e, 0x00, 0x6f, 0x00, 0x72, + 0x00, 0x67, 0x00, 0x2f, 0x00, 0x6c, 0x00, 0x69, 0x00, 0x63, 0x00, 0x65, + 0x00, 0x6e, 0x00, 0x73, 0x00, 0x65, 0x00, 0x73, 0x00, 0x2f, 0x00, 0x4c, + 0x00, 0x49, 0x00, 0x43, 0x00, 0x45, 0x00, 0x4e, 0x00, 0x53, 0x00, 0x45, + 0x00, 0x2d, 0x00, 0x32, 0x00, 0x2e, 0x00, 0x30, 0x00, 0x00, 0x68, 0x74, + 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x61, 0x70, 0x61, + 0x63, 0x68, 0x65, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x69, 0x63, 0x65, + 0x6e, 0x73, 0x65, 0x73, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, + 0x2d, 0x32, 0x2e, 0x30, 0x00, 0x41, 0x6c, 0x6c, 0x20, 0x54, 0x79, 0x70, + 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, 0x69, 0x63, 0x20, 0x46, 0x65, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x73, 0x00, 0x46, 0x6f, 0x6e, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x79, 0x70, 0x6f, 0x67, 0x72, 0x61, 0x70, + 0x68, 0x69, 0x71, 0x75, 0x65, 0x73, 0x00, 0x41, 0x6c, 0x6c, 0x65, 0x20, + 0x74, 0x79, 0x70, 0x6f, 0x67, 0x72, 0x61, 0x66, 0x69, 0x73, 0x63, 0x68, + 0x65, 0x6e, 0x20, 0x4d, 0x9a, 0x67, 0x6c, 0x69, 0x63, 0x68, 0x6b, 0x65, + 0x69, 0x74, 0x65, 0x6e, 0x00, 0x46, 0x75, 0x6e, 0x7a, 0x69, 0x6f, 0x6e, + 0x69, 0x20, 0x54, 0x69, 0x70, 0x6f, 0x67, 0x72, 0x61, 0x66, 0x69, 0x63, + 0x68, 0x65, 0x00, 0x41, 0x6c, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x6f, + 0x67, 0x72, 0x61, 0x66, 0x69, 0x73, 0x63, 0x68, 0x65, 0x20, 0x6b, 0x65, + 0x6e, 0x6d, 0x65, 0x72, 0x6b, 0x65, 0x6e, 0x00, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x20, 0x43, 0x61, 0x73, 0x65, 0x00, 0x53, 0x74, 0x79, 0x6c, + 0x65, 0x20, 0x64, 0x65, 0x73, 0x20, 0x43, 0x68, 0x69, 0x66, 0x66, 0x72, + 0x65, 0x73, 0x00, 0x4e, 0x75, 0x6d, 0x6d, 0x65, 0x72, 0x68, 0x6f, 0x6f, + 0x67, 0x74, 0x65, 0x00, 0x41, 0x6c, 0x6c, 0x20, 0x54, 0x79, 0x70, 0x65, + 0x20, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x00, 0x54, 0x6f, + 0x75, 0x74, 0x65, 0x73, 0x20, 0x66, 0x6f, 0x6e, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x20, 0x74, 0x79, 0x70, 0x6f, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x69, 0x71, 0x75, 0x65, 0x73, 0x00, 0x41, 0x6c, 0x6c, 0x65, 0x20, 0x41, + 0x75, 0x73, 0x7a, 0x65, 0x69, 0x63, 0x68, 0x6e, 0x75, 0x6e, 0x67, 0x73, + 0x61, 0x72, 0x74, 0x65, 0x6e, 0x00, 0x54, 0x75, 0x74, 0x74, 0x65, 0x20, + 0x6c, 0x65, 0x20, 0x46, 0x75, 0x6e, 0x7a, 0x69, 0x6f, 0x6e, 0x69, 0x00, + 0x41, 0x6c, 0x6c, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x6b, 0x65, 0x6e, + 0x6d, 0x65, 0x72, 0x6b, 0x65, 0x6e, 0x00, 0x4c, 0x6f, 0x77, 0x65, 0x72, + 0x20, 0x43, 0x61, 0x73, 0x65, 0x20, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x73, 0x00, 0x43, 0x68, 0x69, 0x66, 0x66, 0x72, 0x65, 0x73, 0x20, 0x41, + 0x6e, 0x63, 0x69, 0x65, 0x6e, 0x73, 0x20, 0x28, 0x62, 0x61, 0x73, 0x20, + 0x64, 0x65, 0x20, 0x63, 0x61, 0x73, 0x73, 0x65, 0x29, 0x00, 0x4d, 0x65, + 0x64, 0x69, 0xbe, 0x76, 0x61, 0x6c, 0x2d, 0x5a, 0x69, 0x66, 0x66, 0x65, + 0x72, 0x6e, 0x00, 0x53, 0x6f, 0x70, 0x72, 0x61, 0x20, 0x6c, 0x61, 0x20, + 0x4c, 0x69, 0x6e, 0x65, 0x61, 0x20, 0x42, 0x61, 0x73, 0x65, 0x00, 0x4b, + 0x6c, 0x65, 0x69, 0x6e, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x6d, 0x65, 0x72, + 0x73, 0x00, 0x55, 0x70, 0x70, 0x65, 0x72, 0x20, 0x43, 0x61, 0x73, 0x65, + 0x20, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x00, 0x43, 0x68, 0x69, + 0x66, 0x66, 0x72, 0x65, 0x73, 0x20, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x6e, + 0x74, 0x69, 0x6f, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x20, 0x28, 0x61, 0x6c, + 0x69, 0x67, 0x6e, 0x61, 0x6e, 0x74, 0x73, 0x29, 0x00, 0x4e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x65, 0x20, 0x5a, 0x69, 0x66, 0x66, 0x65, 0x72, 0x6e, + 0x00, 0x54, 0x72, 0x61, 0x64, 0x69, 0x7a, 0x69, 0x6f, 0x6e, 0x61, 0x6c, + 0x65, 0x00, 0x47, 0x72, 0x6f, 0x74, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x6d, + 0x65, 0x72, 0x73, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0x66, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0xc2, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x04, + 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x08, 0x00, 0x09, 0x00, 0x0a, + 0x00, 0x0b, 0x00, 0x0c, 0x00, 0x0d, 0x00, 0x0e, 0x00, 0x0f, 0x00, 0x10, + 0x00, 0x11, 0x00, 0x12, 0x00, 0x13, 0x00, 0x14, 0x00, 0x15, 0x00, 0x16, + 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, 0x1a, 0x00, 0x1b, 0x00, 0x1c, + 0x00, 0x1d, 0x00, 0x1e, 0x00, 0x1f, 0x00, 0x20, 0x00, 0x21, 0x00, 0x22, + 0x00, 0x23, 0x00, 0x24, 0x00, 0x25, 0x00, 0x26, 0x00, 0x27, 0x00, 0x28, + 0x00, 0x29, 0x00, 0x2a, 0x00, 0x2b, 0x00, 0x2c, 0x00, 0x2d, 0x00, 0x2e, + 0x00, 0x2f, 0x00, 0x30, 0x00, 0x31, 0x00, 0x32, 0x00, 0x33, 0x00, 0x34, + 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3a, + 0x00, 0x3b, 0x00, 0x3c, 0x00, 0x3d, 0x00, 0x3e, 0x00, 0x3f, 0x00, 0x40, + 0x00, 0x41, 0x00, 0x42, 0x00, 0x43, 0x00, 0x44, 0x00, 0x45, 0x00, 0x46, + 0x00, 0x47, 0x00, 0x48, 0x00, 0x49, 0x00, 0x4a, 0x00, 0x4b, 0x00, 0x4c, + 0x00, 0x4d, 0x00, 0x4e, 0x00, 0x4f, 0x00, 0x50, 0x00, 0x51, 0x00, 0x52, + 0x00, 0x53, 0x00, 0x54, 0x00, 0x55, 0x00, 0x56, 0x00, 0x57, 0x00, 0x58, + 0x00, 0x59, 0x00, 0x5a, 0x00, 0x5b, 0x00, 0x5c, 0x00, 0x5d, 0x00, 0x5e, + 0x00, 0x5f, 0x00, 0x60, 0x00, 0x61, 0x00, 0xac, 0x00, 0xa3, 0x00, 0x84, + 0x00, 0x85, 0x00, 0xbd, 0x00, 0x96, 0x00, 0xe8, 0x00, 0x86, 0x00, 0x8e, + 0x00, 0x8b, 0x00, 0x9d, 0x00, 0xa9, 0x00, 0xa4, 0x01, 0x02, 0x00, 0x8a, + 0x01, 0x03, 0x00, 0x83, 0x00, 0x93, 0x00, 0xf2, 0x00, 0xf3, 0x00, 0x8d, + 0x00, 0x97, 0x00, 0x88, 0x00, 0xc3, 0x00, 0xde, 0x00, 0xf1, 0x00, 0x9e, + 0x00, 0xaa, 0x00, 0xf5, 0x00, 0xf4, 0x00, 0xf6, 0x00, 0xa2, 0x00, 0xad, + 0x00, 0xc9, 0x00, 0xc7, 0x00, 0xae, 0x00, 0x62, 0x00, 0x63, 0x00, 0x90, + 0x00, 0x64, 0x00, 0xcb, 0x00, 0x65, 0x00, 0xc8, 0x00, 0xca, 0x00, 0xcf, + 0x00, 0xcc, 0x00, 0xcd, 0x00, 0xce, 0x00, 0xe9, 0x00, 0x66, 0x00, 0xd3, + 0x00, 0xd0, 0x00, 0xd1, 0x00, 0xaf, 0x00, 0x67, 0x00, 0xf0, 0x00, 0x91, + 0x00, 0xd6, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0x68, 0x00, 0xeb, 0x00, 0xed, + 0x00, 0x89, 0x00, 0x6a, 0x00, 0x69, 0x00, 0x6b, 0x00, 0x6d, 0x00, 0x6c, + 0x00, 0x6e, 0x00, 0xa0, 0x00, 0x6f, 0x00, 0x71, 0x00, 0x70, 0x00, 0x72, + 0x00, 0x73, 0x00, 0x75, 0x00, 0x74, 0x00, 0x76, 0x00, 0x77, 0x00, 0xea, + 0x00, 0x78, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x7b, 0x00, 0x7d, 0x00, 0x7c, + 0x00, 0xb8, 0x00, 0xa1, 0x00, 0x7f, 0x00, 0x7e, 0x00, 0x80, 0x00, 0x81, + 0x00, 0xec, 0x00, 0xee, 0x00, 0xba, 0x07, 0x75, 0x6e, 0x69, 0x30, 0x30, + 0x41, 0x44, 0x09, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, + 0x00, 0x01, 0x00, 0x03, 0x00, 0x08, 0x00, 0x0a, 0x00, 0x0d, 0x00, 0x07, + 0xff, 0xff, 0x00, 0x0f, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x02, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x15, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x24, + 0x00, 0x00, 0x01, 0x00, 0x00, 0x15, 0x00, 0x02, 0x00, 0x00, 0x00, 0x28, + 0xc0, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x02, 0x00, 0x00, 0x01, 0x03, + 0x00, 0x01, 0x01, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + 0xe5, 0x64, 0x3d, 0xfb, 0x00, 0x00, 0x00, 0x00, 0xc9, 0x35, 0x31, 0x8b, + 0x00, 0x00, 0x00, 0x00, 0xe5, 0xf9, 0x0a, 0x4d}; +unsigned int MwTTFDataSize = 35264; +#endif diff --git a/widget/milsko/milskosrc/src/text/ft2.c b/widget/milsko/milskosrc/src/text/ft2.c new file mode 100644 index 0000000000..13e8208c14 --- /dev/null +++ b/widget/milsko/milskosrc/src/text/ft2.c @@ -0,0 +1,188 @@ +#ifdef USE_FREETYPE2 +#include + +#include +#include FT_FREETYPE_H + +static struct ft_table { + FT_Error (*FT_Init_FreeType)(FT_Library* alibrary); + FT_Error (*FT_New_Memory_Face)(FT_Library library, + const FT_Byte* file_base, + FT_Long file_size, + FT_Long face_index, + FT_Face* aface); + FT_Error (*FT_Set_Pixel_Sizes)(FT_Face face, + FT_UInt pixel_width, + FT_UInt pixel_height); + FT_Error (*FT_Load_Char)(FT_Face face, + FT_ULong char_code, + FT_Int32 load_flags); + FT_Error (*FT_Get_Kerning)(FT_Face face, + FT_UInt left_glyph, + FT_UInt right_glyph, + FT_UInt kern_mode, + FT_Vector* akerning); + FT_Error (*FT_Done_Face)(FT_Face face); + FT_Error (*FT_Done_FreeType)(FT_Library library); + +} ft_table; + +struct _MwFLFont { + FT_Library library; + FT_Face face; + void* data; + int px; +}; +static int ft2_MwDrawText(MwWidget handle, MwFLFont ttf, MwPoint* point, const char* text, MwLLColor color) { + int tw, th; + unsigned char* px; + MwLLPixmap p; + MwRect r; + int x = 0, y = 0; + + tw = MwTextWidth(handle, ttf, text); + th = MwTextHeight(handle, ttf, text); + px = malloc(tw * th * 4); + + memset(px, 0, tw * th * 4); + while(text[0] != 0) { + FT_Bitmap* bmp; + int cy, cx; + int c, c2; + FT_Vector vec; + const char* old_text; + + text += MwUTF8ToUTF32(text, &c); + + ft_table.FT_Load_Char(ttf->face, c, FT_LOAD_RENDER); + bmp = &ttf->face->glyph->bitmap; + + for(cy = 0; cy < bmp->rows; cy++) { + for(cx = 0; cx < bmp->width; cx++) { + int ox = x + cx + ttf->face->glyph->bitmap_left; + int oy = y + (ttf->face->height * ttf->px / ttf->face->units_per_EM) - ttf->face->glyph->bitmap_top + cy + (ttf->face->descender * ttf->px / ttf->face->units_per_EM); + unsigned char* opx = &px[(oy * tw + ox) * 4]; + opx[0] = color->common.red; + opx[1] = color->common.green; + opx[2] = color->common.blue; + /* overflow check */ + if(opx[3] + bmp->buffer[cy * bmp->pitch + cx] < opx[3]) { + opx[3] = 255; + } else { + opx[3] = bmp->buffer[cy * bmp->pitch + cx]; + } + } + } + + x += (ttf->face->glyph->advance.x >> 6); + + old_text = text; + text += MwUTF8ToUTF32(text, &c2); + + ft_table.FT_Get_Kerning(ttf->face, c, c2, FT_KERNING_DEFAULT, &vec); + + x += vec.x >> 6; + + text = old_text; + } + + p = MwLoadRaw(handle, px, tw, th); + r.x = point->x; + r.y = point->y - th / 2; + r.width = tw; + r.height = th; + + MwLLDrawPixmap(handle->lowlevel, &r, p); + MwLLDestroyPixmap(p); + free(px); + + return 0; +} + +static int ft2_MwTextWidth(MwFLFont ttf, const char* text) { + int tw = 0; + FT_Vector vec; + + while(text[0] != 0) { + int c, c2; + const char* old_text; + + text += MwUTF8ToUTF32(text, &c); + + ft_table.FT_Load_Char(ttf->face, c, FT_LOAD_DEFAULT); + + tw += ttf->face->glyph->advance.x >> 6; + + old_text = text; + text += MwUTF8ToUTF32(text, &c2); + + ft_table.FT_Get_Kerning(ttf->face, c, c2, FT_KERNING_DEFAULT, &vec); + + tw += vec.x >> 6; + + text = old_text; + } + + if(tw > 0) { + tw -= vec.x >> 6; + tw -= ttf->face->glyph->advance.x >> 6; + tw += ttf->face->glyph->bitmap_left + ttf->face->glyph->bitmap.width; + } + + return tw + 1; +} + +static int ft2_MwTextHeight(MwFLFont ttf, int count) { + return ceil((ttf->face->height * ttf->px / ttf->face->units_per_EM) * count); +} + +static void* ft2_MwFontLoad(unsigned char* data, unsigned int size, int px) { + MwFLFont ttf = malloc(sizeof(*ttf)); + ttf->data = malloc(size); + memcpy(ttf->data, data, size); + ft_table.FT_Init_FreeType(&ttf->library); + ft_table.FT_New_Memory_Face(ttf->library, ttf->data, size, 0, &ttf->face); + + ttf->px = px; + ft_table.FT_Set_Pixel_Sizes(ttf->face, 0, ttf->px); + + return ttf; +} + +static void ft2_MwFontFree(void* handle) { + MwFLFont ttf = handle; + + ft_table.FT_Done_Face(ttf->face); + ft_table.FT_Done_FreeType(ttf->library); + + free(ttf->data); + free(ttf); +} + +int MwFL_FT2Setup(void) { + /* Try and load FreeType2. If it fails, return 1, signifying we default to stbtt. */ + void* ftlib; +#ifdef __APPLE__ + if(!(ftlib = MwDynamicOpen("libfreetype.dylib"))) { +#else + if(!(ftlib = MwDynamicOpen("libfreetype.so"))) { +#endif + return 1; + } + + ft_table.FT_Init_FreeType = MwDynamicSymbol(ftlib, "FT_Init_FreeType"); + ft_table.FT_New_Memory_Face = MwDynamicSymbol(ftlib, "FT_New_Memory_Face"); + ft_table.FT_Set_Pixel_Sizes = MwDynamicSymbol(ftlib, "FT_Set_Pixel_Sizes"); + ft_table.FT_Load_Char = MwDynamicSymbol(ftlib, "FT_Load_Char"); + ft_table.FT_Get_Kerning = MwDynamicSymbol(ftlib, "FT_Get_Kerning"); + ft_table.FT_Done_Face = MwDynamicSymbol(ftlib, "FT_Done_Face"); + ft_table.FT_Done_FreeType = MwDynamicSymbol(ftlib, "FT_Done_FreeType"); + + MwFLDrawText = ft2_MwDrawText; + MwFLTextWidth = ft2_MwTextWidth; + MwFLTextHeight = ft2_MwTextHeight; + MwFLFontLoad = ft2_MwFontLoad; + MwFLFontFree = ft2_MwFontFree; + return 0; +} +#endif diff --git a/widget/milsko/milskosrc/src/text/gdi.c b/widget/milsko/milskosrc/src/text/gdi.c new file mode 100644 index 0000000000..b764353d7a --- /dev/null +++ b/widget/milsko/milskosrc/src/text/gdi.c @@ -0,0 +1,269 @@ +#ifdef USE_GDI_TEXT +#include + +static HANDLE(WINAPI* _AddFontMemResourceEx)(PVOID pFileView, DWORD cjSize, PVOID pvResrved, DWORD* pNumFonts) = NULL; +static BOOL(WINAPI* _RemoveFontMemResourceEx)(HANDLE h) = NULL; +static HANDLE WINAPI _AddFontMemResourceExPolyFill(PVOID pFileView, DWORD cjSize, PVOID pvResrved, DWORD* pNumFonts); +static BOOL WINAPI _RemoveFontMemResourceExPolyFill(HANDLE h); + +struct _MwFLFont { + HANDLE handle; + HFONT font; + HDC dc; +}; + +static int GDI_MwDrawText(MwWidget handle, MwFLFont ttf, MwPoint* point, const char* text, MwLLColor color) { + BITMAPINFOHEADER bmih; + int tw; + int th; + HBITMAP hbm; + RGBQUAD* bits = NULL; + HDC hmdc; + char* t = MwUTF8ToACP(text); + unsigned char* px; + int y, x; + MwRect r; + MwLLPixmap p; + + tw = MwTextWidth(handle, ttf, text); + th = MwTextHeight(handle, ttf, text); + + if(handle->lowlevel->common.type == MwLLBackendGDI && MwGetInteger(handle, MwNmodernLook) == MwFALSE) { + HFONT old_font = SelectObject(handle->lowlevel->gdi.hDC, ttf->font); + int old_bkmode = SetBkMode(handle->lowlevel->gdi.hDC, TRANSPARENT); + COLORREF old_color = SetTextColor(handle->lowlevel->gdi.hDC, color->gdi.color); + + TextOut(handle->lowlevel->gdi.hDC, point->x, point->y - th / 2, t, strlen(t)); + + SetTextColor(handle->lowlevel->gdi.hDC, old_color); + SetBkMode(handle->lowlevel->gdi.hDC, old_bkmode); + SelectObject(handle->lowlevel->gdi.hDC, old_font); + + free(t); + + return 0; + } + + px = malloc(tw * th * 4); + + bmih.biSize = sizeof(bmih); + bmih.biWidth = tw; + bmih.biHeight = -(LONG)th; + bmih.biPlanes = 1; + bmih.biBitCount = 32; + bmih.biCompression = BI_RGB; + bmih.biSizeImage = 0; + bmih.biXPelsPerMeter = 0; + bmih.biYPelsPerMeter = 0; + bmih.biClrUsed = 0; + bmih.biClrImportant = 0; + + hbm = CreateDIBSection(ttf->dc, (BITMAPINFO*)&bmih, DIB_RGB_COLORS, (void**)&bits, NULL, 0); + + hmdc = CreateCompatibleDC(ttf->dc); + SelectObject(hmdc, hbm); + SelectObject(hmdc, ttf->font); + + TextOut(hmdc, 0, 0, t, strlen(t)); + + DeleteDC(hmdc); + + for(y = 0; y < th; y++) { + for(x = 0; x < tw; x++) { + unsigned char* opx = &px[(y * tw + x) * 4]; + + opx[0] = color->common.red; + opx[1] = color->common.green; + opx[2] = color->common.blue; + opx[3] = 255 - bits[y * tw + x].rgbRed; + } + } + + p = MwLoadRaw(handle, px, tw, th); + r.x = point->x; + r.y = point->y - th / 2; + r.width = tw; + r.height = th; + + MwLLDrawPixmap(handle->lowlevel, &r, p); + MwLLDestroyPixmap(p); + free(px); + + DeleteObject(hbm); + free(t); + + return 0; +} + +static int GDI_MwTextWidth(MwFLFont ttf, const char* text) { + char* t = MwUTF8ToACP(text); + SIZE sz; + + GetTextExtentPoint32(ttf->dc, t, strlen(t), &sz); + + free(t); + + return sz.cx; +} + +static int GDI_MwTextHeight(MwFLFont ttf, int count) { + TEXTMETRIC tm; + + GetTextMetrics(ttf->dc, &tm); + + return tm.tmHeight * count; +} + +static void* GDI_MwFontLoad(unsigned char* data, unsigned int size, int px) { + MwFLFont ttf = malloc(sizeof(*ttf)); + DWORD c; + MwTTFInfo info; + + if((info = MwTTFGetInfo(data, size)) == NULL) { + free(ttf); + return NULL; + } + + ttf->dc = GetDC(NULL); + + ttf->handle = NULL; + + if(_AddFontMemResourceEx) { + if((ttf->handle = _AddFontMemResourceEx(data, size, 0, &c)) == NULL) { + ReleaseDC(NULL, ttf->dc); + MwTTFFreeInfo(info); + free(ttf); + return NULL; + } + } /*else { + if((ttf->handle = _AddFontMemResourceExPolyFill(data, size, 0, &c)) == NULL) { + ReleaseDC(NULL, ttf->dc); + MwTTFFreeInfo(info); + free(ttf); + return NULL; + } + }*/ + + if((ttf->font = CreateFont(-px, 0, 0, 0, info->weight, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, ttf->handle ? info->family : "Sans Serif")) == NULL) { + if(_RemoveFontMemResourceEx) { + _RemoveFontMemResourceEx(ttf->handle); + } else { + _RemoveFontMemResourceExPolyFill(ttf->handle); + } + ReleaseDC(NULL, ttf->dc); + MwTTFFreeInfo(info); + free(ttf); + return NULL; + } + + MwTTFFreeInfo(info); + + SelectObject(ttf->dc, ttf->font); + + return ttf; +} + +static void GDI_MwFontFree(void* handle) { + MwFLFont ttf = handle; + + DeleteObject(ttf->font); + if(_RemoveFontMemResourceEx) { + _RemoveFontMemResourceEx(ttf->handle); + } else { + _RemoveFontMemResourceExPolyFill(ttf->handle); + } + ReleaseDC(NULL, ttf->dc); + free(ttf); +} + +static HANDLE WINAPI _AddFontMemResourceExPolyFill(PVOID pFileView, DWORD cjSize, PVOID pvResrved, DWORD* pNumFonts) { + CHAR temp_path_dir[MAX_PATH]; + CHAR temp_path_name[MAX_PATH]; + HANDLE tempFile = NULL; + int hr; + + (void)pvResrved; + + hr = GetTempPathA(MAX_PATH, temp_path_dir); + if(hr == 0) { + printf("GetTempPathA error %08lX\n", hr); + return hr; + } + hr = GetTempFileNameA(temp_path_dir, TEXT("MILSKO"), 0, temp_path_name); + if(hr == 0) { + printf("GetTempFileNameA error %08lX\n", hr); + return hr; + } + + printf("extracting mem font to %s\n", temp_path_name); + + tempFile = CreateFileA(temp_path_name, + GENERIC_WRITE, + 0, + NULL, + CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, + NULL); + + if(tempFile == INVALID_HANDLE_VALUE) { + DWORD err = GetLastError(); + if(err == ERROR_ALREADY_EXISTS) { + tempFile = CreateFileA(temp_path_name, + GENERIC_WRITE, + 0, + NULL, + OPEN_ALWAYS, + FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, + NULL); + printf("%d\n", tempFile); + if(tempFile != INVALID_HANDLE_VALUE) { + goto success; + } else { + err = GetLastError(); + } + } + printf("CreateFileA error %08lX\n", err); + return hr; + } + +success: + hr = WriteFile(tempFile, pFileView, cjSize, NULL, NULL); + if(hr != 0) { + printf("WriteFile error %08lX\n", hr); + return 0; + } + + *pNumFonts = AddFontResource(temp_path_name); + + return tempFile; +}; +static BOOL WINAPI _RemoveFontMemResourceExPolyFill(HANDLE h) { + if(h) + CloseHandle(h); + return TRUE; +}; + +int MwFL_GDISetup(void) { + void* gdilib = LoadLibrary("gdi32.dll"); + if(!gdilib) { + printf("gdi32.dll not found(?????)\n"); + } else { + _AddFontMemResourceEx = (void*)GetProcAddress(gdilib, "AddFontMemResourceEx"); + if(!_AddFontMemResourceEx) { + _AddFontMemResourceEx = _AddFontMemResourceExPolyFill; + } + _RemoveFontMemResourceEx = (void*)GetProcAddress(gdilib, "RemoveFontMemResourceEx"); + if(!_RemoveFontMemResourceEx) { + _RemoveFontMemResourceEx = _RemoveFontMemResourceExPolyFill; + } + } + + MwFLDrawText = GDI_MwDrawText; + MwFLTextWidth = GDI_MwTextWidth; + MwFLTextHeight = GDI_MwTextHeight; + MwFLFontLoad = GDI_MwFontLoad; + MwFLFontFree = GDI_MwFontFree; + return 0; +} + +#endif diff --git a/widget/milsko/milskosrc/src/text/stbtt.c b/widget/milsko/milskosrc/src/text/stbtt.c new file mode 100644 index 0000000000..bd26741455 --- /dev/null +++ b/widget/milsko/milskosrc/src/text/stbtt.c @@ -0,0 +1,159 @@ +#ifdef USE_STB_TRUETYPE +#include + +#include "../../external/stb_truetype.h" + +struct _MwFLFont { + stbtt_fontinfo font; + void* data; + float scale; + int ascent; + int descent; +}; + +static int stbtt_MwDrawText(MwWidget handle, MwFLFont ttf, MwPoint* point, const char* text, MwLLColor color) { + unsigned char* px; + int tw, th; + MwRect r; + MwLLPixmap p; + int ax, lsb; + int x = 0, y = 0; + + tw = MwTextWidth(handle, ttf, text); + th = MwTextHeight(handle, ttf, text); + px = malloc(tw * th * 4); + + memset(px, 0, tw * th * 4); + while(text[0] != 0) { + int c, c2; + int x0, y0, x1, y1, cx, cy; + int ow, oh; + unsigned char* out; + int kern; + const char* old_text; + + text += MwUTF8ToUTF32(text, &c); + + stbtt_GetCodepointHMetrics(&ttf->font, c, &ax, &lsb); + + stbtt_GetCodepointBitmapBox(&ttf->font, c, ttf->scale, ttf->scale, &x0, &y0, &x1, &y1); + ow = x1 - x0; + oh = y1 - y0; + out = malloc(ow * oh); + stbtt_MakeCodepointBitmap(&ttf->font, out, ow, oh, ow, ttf->scale, ttf->scale, c); + + for(cy = 0; cy < oh; cy++) { + for(cx = 0; cx < ow; cx++) { + int ox = x + ceil(lsb * ttf->scale) + cx; + int oy = y + ceil(ttf->ascent * ttf->scale) + y0 + cy; + unsigned char* opx = &px[(oy * tw + ox) * 4]; + opx[0] = color->common.red; + opx[1] = color->common.green; + opx[2] = color->common.blue; + /* overflow check */ + if(opx[3] + out[cy * ow + cx] < opx[3]) { + opx[3] = 255; + } else { + opx[3] = out[cy * ow + cx]; + } + } + } + + x += ceil(ax * ttf->scale); + + old_text = text; + text += MwUTF8ToUTF32(text, &c2); + + kern = stbtt_GetCodepointKernAdvance(&ttf->font, c, c2); + + x += ceil(kern * ttf->scale); + + text = old_text; + + free(out); + } + + p = MwLoadRaw(handle, px, tw, th); + r.x = point->x; + r.y = point->y - th / 2; + r.width = tw; + r.height = th; + + MwLLDrawPixmap(handle->lowlevel, &r, p); + MwLLDestroyPixmap(p); + free(px); + + return 0; +} + +static int stbtt_MwTextWidth(MwFLFont ttf, const char* text) { + int ax, lsb; + int tw = 0; + int c; + int x0, y0, x1, y1; + int kern; + + while(text[0] != 0) { + int c2; + const char* old_text; + + text += MwUTF8ToUTF32(text, &c); + + stbtt_GetCodepointHMetrics(&ttf->font, c, &ax, &lsb); + + tw += ceil(ax * ttf->scale); + + old_text = text; + text += MwUTF8ToUTF32(text, &c2); + + kern = stbtt_GetCodepointKernAdvance(&ttf->font, c, c2); + + tw += ceil(kern * ttf->scale); + + text = old_text; + } + + if(tw > 0) { + tw -= ceil(kern * ttf->scale); + tw -= ceil(ax * ttf->scale); + stbtt_GetCodepointBitmapBox(&ttf->font, c, ttf->scale, ttf->scale, &x0, &y0, &x1, &y1); + tw += ceil(lsb * ttf->scale); + tw += x1 - x0; + } + + return tw + 1; +} + +static int stbtt_MwTextHeight(MwFLFont ttf, int count) { + return ceil((ttf->ascent - ttf->descent) * ttf->scale * count); +} + +static void* stbtt_MwFontLoad(unsigned char* data, unsigned int size, int px) { + MwFLFont ttf = malloc(sizeof(*ttf)); + ttf->data = malloc(size); + memcpy(ttf->data, data, size); + stbtt_InitFont(&ttf->font, ttf->data, 0); + + ttf->scale = stbtt_ScaleForMappingEmToPixels(&ttf->font, px); + stbtt_GetFontVMetrics(&ttf->font, &ttf->ascent, &ttf->descent, 0); + + return ttf; +} + +static void stbtt_MwFontFree(void* handle) { + MwFLFont ttf = handle; + + free(ttf->data); + free(ttf); +} + +int MwFL_STBTTSetup(void) { + MwFLDrawText = stbtt_MwDrawText; + MwFLTextWidth = stbtt_MwTextWidth; + MwFLTextHeight = stbtt_MwTextHeight; + MwFLFontLoad = stbtt_MwFontLoad; + MwFLFontFree = stbtt_MwFontFree; + return 0; +} + +#endif diff --git a/widget/milsko/milskosrc/src/text/text.c b/widget/milsko/milskosrc/src/text/text.c new file mode 100644 index 0000000000..9ad1e940f9 --- /dev/null +++ b/widget/milsko/milskosrc/src/text/text.c @@ -0,0 +1,318 @@ +#include + +int (*MwFLDrawText)(MwWidget handle, MwFLFont font, MwPoint* point, const char* text, MwLLColor color) = NULL; +int (*MwFLTextWidth)(MwFLFont font, const char* text) = NULL; +int (*MwFLTextHeight)(MwFLFont font, int count) = NULL; +int (*MwFLTextHeightWithText)(MwFLFont ttf, const char* text) = NULL; +void* (*MwFLFontLoad)(unsigned char* data, unsigned int size, int px) = NULL; +void (*MwFLFontFree)(void* handle) = NULL; + +#if defined(USE_FREETYPE2) || defined(USE_STB_TRUETYPE) || defined(USE_GDI_TEXT) +#define TTF +#endif + +#define FontWidth 7 +#define FontHeight 14 + +static void bitmap_MwDrawText(MwWidget handle, MwPoint* point, const char* text, int bold, MwLLColor color); + +static int count_nl(const char* text) { + int c = 1; + int i = 0; + while(text[i] != 0) { + int out; + int l = MwUTF8ToUTF32(text + i, &out); + if(l == 0) break; + i += l; + + if(out == '\n') c++; + } + + return c; +} + +static int is_bold(MwWidget handle, MwFLFont ttf) { + size_t u = (size_t)ttf; + int s; + + if(u & MwFLFlagBold) return 1; + + s = MwGetInteger(handle, MwNbold); + if(s == MwDEFAULT) return 0; + return s; +} + +#ifdef TTF +static int is_bitmap(MwWidget handle, MwFLFont ttf) { + size_t u = (size_t)ttf; + int s; + + if(u & MwFLFlagBitmap) return 1; + + s = MwGetInteger(handle, MwNbitmapFont); + if(s == MwDEFAULT) return 0; + return s; +} + +static int is_monospace(MwWidget handle, MwFLFont ttf) { + size_t u = (size_t)ttf; + int s; + + if(u & MwFLFlagMonospace) return 1; + + s = MwGetInteger(handle, MwNuseMonospace); + if(s == MwDEFAULT) return 0; + return s; +} +#endif + +#ifdef TTF + +static MwFLFont assume_ttf(MwWidget handle, MwFLFont ttf) { + if(is_bitmap(handle, ttf)) return NULL; + + if(is_monospace(handle, ttf)) return is_bold(handle, ttf) ? MwGetVoid(handle, MwNboldMonospaceFont) : MwGetVoid(handle, MwNmonospaceFont); + return is_bold(handle, ttf) ? MwGetVoid(handle, MwNboldFont) : MwGetVoid(handle, MwNfont); +} +#endif + +void MwDrawText(MwWidget handle, MwFLFont ttf, MwPoint* point, const char* text, int align, MwLLColor color) { + MwPoint p = *point; + char* input = (char*)text; + char* last = input; + int cp; + MwLLColor fadedColor = NULL; + + if(MwGetInteger(handle, MwNdisabled) == 1) { + MwLLColor c = handle->parent == NULL ? NULL : MwParseColor(handle->parent, MwGetText(handle->parent, MwNbackground)); + + if(c != NULL) { + fadedColor = MwLLAllocColor(handle->lowlevel, color->common.red, color->common.blue, color->common.green); + fadedColor->common.red = fadedColor->common.red + (c->common.red - fadedColor->common.red) * 0.5; + fadedColor->common.green = fadedColor->common.green + (c->common.green - fadedColor->common.green) * 0.5; + fadedColor->common.blue = fadedColor->common.blue + (c->common.blue - fadedColor->common.blue) * 0.5; + + MwLLFreeColor(c); + } + } + +#ifdef TTF + if(ttf <= MwFLBuildFont(0xff) && !is_bitmap(handle, ttf)) ttf = assume_ttf(handle, ttf); +#endif + + p.y -= (MwTextHeight(handle, ttf, text) - (MwTextHeight(handle, ttf, text) / count_nl(text))) / 2; + + while(*input != 0) { + input += MwUTF8ToUTF32(input, &cp); + + if(*input == 0 || cp == '\n') { + char* line = malloc(input - last + 1); + int i; + + memcpy(line, last, input - last); + + line[input - last] = 0; + + for(i = 0; line[i] != 0; i++) { + if(line[i] == '\r' || line[i] == '\n') { + line[i] = 0; + break; + } + } + + if(strlen(line) == 0) { + free(line); + + last = input; + + continue; + } + + p.x = point->x; + if(align == MwALIGNMENT_CENTER) { + p.x -= MwTextWidth(handle, ttf, line) / 2; + } else if(align == MwALIGNMENT_END) { + p.x -= MwTextWidth(handle, ttf, line); + } + +#ifdef TTF + if(MwFLDrawText) + if(is_bitmap(handle, ttf) || ttf == NULL || MwFLDrawText(handle, ttf, &p, line, fadedColor ? fadedColor : color)) +#endif + bitmap_MwDrawText(handle, &p, line, is_bold(handle, ttf), fadedColor ? fadedColor : color); + + p.y += MwTextHeight(handle, ttf, line); + + free(line); + + last = input; + } + } + + if(fadedColor) { + MwLLFreeColor(fadedColor); + } +} + +int MwTextWidth(MwWidget handle, MwFLFont ttf, const char* text) { + int len = 0; + int st; + int cp; + char* input = (char*)text; + char* last = input; +#ifndef TTF + (void)handle; + (void)ttf; +#endif + +#ifdef TTF + if(ttf <= MwFLBuildFont(0xff)) ttf = assume_ttf(handle, ttf); +#endif + + while(*input != 0) { + input += MwUTF8ToUTF32(input, &cp); + + if(*input == 0 || cp == '\n') { + char* line = malloc(input - last + 1); + int i; + + memcpy(line, last, input - last); + + line[input - last] = 0; + + for(i = 0; line[i] != 0; i++) { + if(line[i] == '\r' || line[i] == '\n') { + line[i] = 0; + break; + } + } + +#ifdef TTF + if(MwFLTextWidth && !MwGetInteger(handle, MwNbitmapFont) && ttf != NULL && (st = MwFLTextWidth(ttf, line)) != -1) { + } else +#endif + st = MwUTF8Length(line) * FontWidth; + + if(st > len) len = st; + + free(line); + + last = input; + } + } + + return len; +} + +int MwTextHeight(MwWidget handle, MwFLFont ttf, const char* text) { + int c = count_nl(text); +#ifdef TTF + int st; +#endif + +#ifdef TTF + if(ttf <= MwFLBuildFont(0xff)) ttf = assume_ttf(handle, ttf); +#else + (void)handle; + (void)text; + (void)ttf; +#endif + +#ifdef TTF + if(MwFLTextHeight) + if(!MwGetInteger(handle, MwNbitmapFont) && ttf != NULL && (st = MwFLTextHeight(ttf, c)) != -1) return st; + if(MwFLTextHeightWithText) + if(!MwGetInteger(handle, MwNbitmapFont) && ttf != NULL && (st = MwFLTextHeightWithText(ttf, text)) != -1) return st; +#endif + return FontHeight * c; +} + +void* MwFontLoad(unsigned char* data, unsigned int size) { + if(MwFLFontLoad) + return MwFLFontLoad(data, size, 14); + return NULL; +} + +void MwFontFree(void* handle) { + if(MwFLFontFree) MwFLFontFree(handle); +} + +static void bitmap_MwDrawText(MwWidget handle, MwPoint* point, const char* text, int bold, MwLLColor color) { + int i = 0, x, y, sx, sy; + int tw, th; + unsigned char* px; + MwRect r; + MwLLPixmap p; + + if(strlen(text) == 0) text = " "; + tw = MwTextWidth(handle, NULL, text); + th = MwTextHeight(handle, NULL, text); + px = malloc(tw * th * 4); + + memset(px, 0, tw * th * 4); + + sx = 0; + sy = 0; + + while(text[i] != 0) { + int out; + i += MwUTF8ToUTF32(text + i, &out); + + if(out > 0xff) { + out = 0; + } + + if(out == '\n') { + sx = 0; + sy += FontHeight; + } else { + for(y = 0; y < FontHeight; y++) { + for(x = 0; x < FontWidth; x++) { + unsigned char* ppx = &px[((sy + y) * tw + sx + x) * 4]; + if((bold ? MwBoldFontData : MwFontData)[out].data[y] & (1 << ((FontWidth - 1) - x))) { + ppx[0] = color->common.red; + ppx[1] = color->common.green; + ppx[2] = color->common.blue; + ppx[3] = 255; + } else { + ppx[0] = 0; + ppx[1] = 0; + ppx[2] = 0; + ppx[3] = 0; + } + } + } + sx += FontWidth; + } + } + + p = MwLoadRaw(handle, px, tw, th); + r.x = point->x; + r.y = point->y - th / 2; + r.width = tw; + r.height = th; + + MwLLDrawPixmap(handle->lowlevel, &r, p); + MwLLDestroyPixmap(p); + free(px); +} + +typedef int (*call_t)(void); +void MwFLSetup(void) { + call_t calls[] = { +#ifdef USE_GDI_TEXT + MwFL_GDISetup, +#endif +#ifdef USE_FREETYPE2 + MwFL_FT2Setup, +#endif +#ifdef USE_STB_TRUETYPE + MwFL_STBTTSetup, +#endif + NULL}; + int i; + + for(i = 0; calls[i] != NULL; i++) { + if(calls[i]() == 0) return; + } +} diff --git a/widget/milsko/milskosrc/src/truetype.c b/widget/milsko/milskosrc/src/truetype.c new file mode 100644 index 0000000000..4f2c8196dc --- /dev/null +++ b/widget/milsko/milskosrc/src/truetype.c @@ -0,0 +1,142 @@ +#include + +#define REMAIN (size - (data - old)) + +MwTTFInfo MwTTFGetInfo(unsigned char* data, int size) { + unsigned short n = 0; + int i; + unsigned char* old = data; + MwTTFInfo info = malloc(sizeof(*info)); + + memset(info, 0, sizeof(*info)); + + if(size < 12) { + MwTTFFreeInfo(info); + return NULL; + } + n |= data[4 + 0]; + n = n << 8; + n |= data[4 + 1]; + + data += 12; + for(i = 0; REMAIN > 0 && i < n; i++) { + unsigned int offset = 0; + unsigned int length = 0; + int j; + + if(REMAIN < (4 + 4 + 4 + 4)) { + MwTTFFreeInfo(info); + return NULL; + } + + for(j = 0; j < 4; j++) { + offset = offset << 8; + offset |= data[4 + 4 + j]; + + length = length << 8; + length |= data[4 + 4 + 4 + j]; + } + + if(memcmp(data, "OS/2", 4) == 0) { + if(length >= 68) { + unsigned char* rev = data; + unsigned short us_weight = 0; + + data = old + offset; + if(REMAIN < 68) { + MwTTFFreeInfo(info); + return NULL; + } + + for(j = 0; j < 2; j++) { + us_weight = us_weight << 8; + us_weight |= data[0x4 + j]; + } + + info->weight = us_weight; + + data = rev; + } + } else if(memcmp(data, "name", 4) == 0) { + if(length >= 6) { + unsigned short count = 0; + unsigned char* rev = data; + unsigned short str_off = 0; + unsigned char* beg; + + data = old + offset; + if(REMAIN < (2 + 2 + 2)) { + MwTTFFreeInfo(info); + return NULL; + } + + beg = data; + + for(j = 0; j < 2; j++) { + count = count << 8; + count |= data[2 + j]; + + str_off = str_off << 8; + str_off |= data[2 + 2 + j]; + } + + data += 2 + 2 + 2; + for(j = 0; j < count; j++) { + unsigned short platform = 0; + unsigned short name = 0; + unsigned short nam_len = 0; + unsigned short nam_off = 0; + int k; + + if(REMAIN < (2 + 2 + 2 + 2 + 2 + 2)) { + MwTTFFreeInfo(info); + return NULL; + } + + for(k = 0; k < 2; k++) { + platform = platform << 8; + platform |= data[0 + k]; + + name = name << 8; + name |= data[2 + 2 + 2 + k]; + + nam_len = nam_len << 8; + nam_len |= data[2 + 2 + 2 + 2 + k]; + + nam_off = nam_off << 8; + nam_off |= data[2 + 2 + 2 + 2 + 2 + k]; + } + + /* FIXME: this does not work with surrogate */ + if((platform == 0 || platform == 3) && name == 1) { + data = beg + str_off + nam_off; + if(REMAIN < nam_len) { + MwTTFFreeInfo(info); + return NULL; + } + + if(info->family != NULL) free(info->family); + + info->family = malloc(nam_len / 2 + 1); + + for(k = 0; k < nam_len / 2; k++) info->family[k] = data[k * 2 + 1]; + info->family[k] = 0; + } + + data += 2 + 2 + 2 + 2 + 2 + 2; + } + + data = rev; + } + } + + data += 4 + 4 + 4 + 4; + } + + return info; +} + +void MwTTFFreeInfo(MwTTFInfo info) { + if(info->family != NULL) free(info->family); + free(info); +} diff --git a/widget/milsko/milskosrc/src/unicode.c b/widget/milsko/milskosrc/src/unicode.c new file mode 100644 index 0000000000..f6c7685482 --- /dev/null +++ b/widget/milsko/milskosrc/src/unicode.c @@ -0,0 +1,120 @@ +#include + +/* this code was taken from my old code... :) */ + +#define CAST_I32(x) ((int)(x)) + +static int utf8_count(unsigned char c) { + if(c < 0x80) { + return 1; + } + if(0xc2 <= c && c < 0xe0) { + return 2; + } + if(0xe0 <= c && c < 0xf0) { + return 3; + } + if(0xf0 <= c && c < 0xf8) { + return 4; + } + return 0; +} + +static int utf8_later(unsigned char c) { + return 0x80 <= c && c < 0xc0; +} + +int MwUTF8ToUTF32(const char* input, int* output) { + const unsigned char* inbuf = (const unsigned char*)input; + int b = utf8_count(inbuf[0]); + if(b == 0) return 0; + + if(b == 1) *output = inbuf[0]; + if(b == 2) { + if(!utf8_later(inbuf[1])) return 0; + if((inbuf[0] & 0x1e) == 0) return 0; + + *output = CAST_I32(inbuf[0] & 0x1f) << 6; + *output |= CAST_I32(inbuf[1] & 0x3f); + } + if(b == 3) { + if(!utf8_later(inbuf[1]) || !utf8_later(inbuf[2])) return 0; + if((inbuf[0] & 0x0f) == 0 && (inbuf[1] & 0x20) == 0) return 0; + + *output = CAST_I32(inbuf[0] & 0x0f) << 12; + *output |= CAST_I32(inbuf[1] & 0x3f) << 6; + *output |= CAST_I32(inbuf[2] & 0x3f); + } + if(b == 4) { + if(!utf8_later(inbuf[1]) || !utf8_later(inbuf[2]) || !utf8_later(inbuf[3])) return 0; + if((inbuf[0] & 0x07) == 0 && (inbuf[1] & 0x30) == 0) return 0; + + *output = CAST_I32(inbuf[0] & 0x07) << 18; + *output |= CAST_I32(inbuf[1] & 0x3f) << 12; + *output |= CAST_I32(inbuf[2] & 0x3f) << 6; + *output |= CAST_I32(inbuf[3] & 0x3f); + } + + return b; +} + +int MwUTF8Length(const char* input) { + int out; + int len = 0; + + while(input[0] != 0) { + int new; + + input += (new = MwUTF8ToUTF32(input, &out)); + len++; + + if(new == 0) return -1; + } + + return len; +} + +int MwUTF8Copy(const char* src, int srcskip, char* dst, int dstskip, int len) { + int i; + int out; + int total = 0; + for(i = 0; i < srcskip; i++) src += MwUTF8ToUTF32(src, &out); + for(i = 0; i < dstskip; i++) dst += MwUTF8ToUTF32(dst, &out); + for(i = 0; i < len; i++) { + int len; + if(src[0] == 0) break; + + len = MwUTF8ToUTF32(src, &out); + + memcpy(dst, src, len); + + src += len; + dst += len; + total += len; + } + dst[0] = 0; + + return total; +} + +int MwUTF32ToUTF8(int input, char* output) { + if(input < 128) { + output[0] = input; + return 1; + } else if(input < 2048) { + output[0] = 0xc0 | (input >> 6); + output[1] = 0x80 | (input & 0x3f); + return 2; + } else if(input < 65536) { + output[0] = 0xe0 | (input >> 12); + output[1] = 0x80 | ((input >> 6) & 0x3f); + output[2] = 0x80 | (input & 0x3f); + return 3; + } else { + output[0] = 0xf0 | (input >> 18); + output[1] = 0x80 | ((input >> 12) & 0x3f); + output[2] = 0x80 | ((input >> 6) & 0x3f); + output[3] = 0x80 | (input & 0x3f); + return 4; + } +} diff --git a/widget/milsko/milskosrc/src/widget/box.c b/widget/milsko/milskosrc/src/widget/box.c new file mode 100644 index 0000000000..00b5723e74 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/box.c @@ -0,0 +1,166 @@ +#include + +#include "../../external/stb_ds.h" + +static int wcreate(MwWidget handle) { + MwBox b = malloc(sizeof(*b)); + memset(b, 0, sizeof(*b)); + + handle->internal = b; + + MwSetDefault(handle); + + MwSetInteger(handle, MwNorientation, MwHORIZONTAL); + MwSetInteger(handle, MwNmargin, 0); + MwSetInteger(handle, MwNpadding, 0); + MwSetInteger(handle, MwNhasBorder, 0); + MwSetInteger(handle, MwNinverted, 1); + MwSetInteger(handle, MwNwaitLayout, 0); + + b->layout = 0; + + return 0; +} + +static void destroy(MwWidget handle) { + MwBox b = handle->internal; + free(b); +} + +#define Margin ((i != (arrlen(handle->children) - 1)) ? MwGetInteger(handle, MwNmargin) : 0) + +static void layout(MwWidget handle) { + int i; + int sum = 0; + int horiz = MwGetInteger(handle, MwNorientation) == MwHORIZONTAL ? 1 : 0; + int sz = MwGetInteger(handle, horiz ? MwNwidth : MwNheight) - (MwGetInteger(handle, MwNpadding) + (MwGetInteger(handle, MwNhasBorder) ? MwDefaultBorderWidth(handle) : 0)) * 2; + int fsz = MwGetInteger(handle, horiz ? MwNheight : MwNwidth) - (MwGetInteger(handle, MwNpadding) + (MwGetInteger(handle, MwNhasBorder) ? MwDefaultBorderWidth(handle) : 0)) * 2; + int sk = MwGetInteger(handle, MwNpadding) + (MwGetInteger(handle, MwNhasBorder) ? MwDefaultBorderWidth(handle) : 0); + + for(i = 0; i < arrlen(handle->children); i++) { + int n = MwGetInteger(handle->children[i], MwNratio); + int s = MwGetInteger(handle->children[i], MwNfixedSize); + if(n == MwDEFAULT) n = 1; + + if(handle->children[i]->destroyed) continue; + + if(s != MwDEFAULT) { + sz -= s + Margin; + } else { + sum += n; + sz -= Margin; + } + } + + for(i = 0; i < arrlen(handle->children); i++) { + int n = MwGetInteger(handle->children[i], MwNratio); + int s = MwGetInteger(handle->children[i], MwNfixedSize); + int wsz; + if(n == MwDEFAULT) n = 1; + + if(handle->children[i]->destroyed) continue; + + if(s != MwDEFAULT) { + wsz = s; + } else { + wsz = sz * n / sum; + } + + MwVaApply(handle->children[i], + horiz ? MwNx : MwNy, sk, /* this is what gets changed */ + horiz ? MwNy : MwNx, MwGetInteger(handle, MwNpadding) + (MwGetInteger(handle, MwNhasBorder) ? MwDefaultBorderWidth(handle) : 0), /* fixed between widgets */ + horiz ? MwNwidth : MwNheight, wsz, /* this is what gets changed */ + horiz ? MwNheight : MwNwidth, fsz, /* fixed between widgets */ + NULL); + sk += wsz + Margin; + } +} + +static void draw(MwWidget handle) { + MwRect r; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + + if(MwGetInteger(handle, MwNhasBorder)) { + MwDrawFrame(handle, &r, base, MwGetInteger(handle, MwNinverted)); + } + + MwDrawRect(handle, &r, base); + + MwLLFreeColor(base); +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNorientation) == 0 || strcmp(key, MwNhasBorder) == 0 || strcmp(key, MwNinverted) == 0 || strcmp(key, MwNpadding) == 0 || strcmp(key, MwNmargin) == 0) { + MwBox b = handle->internal; + b->layout = 1; + + MwForceRender(handle); + } +} + +static void tick(MwWidget handle) { + MwBox b = handle->internal; + + if(b->layout && !MwGetInteger(handle, MwNwaitLayout)) { + layout(handle); + + b->layout = 0; + } +} + +static void resize(MwWidget handle) { + MwBox b = handle->internal; + b->layout = 1; + + MwForceRender(handle); +} + +static void children_update(MwWidget handle, MwWidget child, int new_child) { + MwBox b = handle->internal; + + (void)child; + (void)new_child; + + b->layout = 1; + + MwForceRender(handle); +} + +static void children_prop_change(MwWidget handle, MwWidget child, const char* key) { + (void)child; + + if(strcmp(key, MwNratio) == 0 || strcmp(key, MwNfixedSize) == 0) { + MwBox b = handle->internal; + b->layout = 1; + + MwForceRender(handle); + } +} + +MwClassRec MwBoxClassRec = { + wcreate, /* create */ + destroy, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + NULL, /* execute */ + tick, /* tick */ + resize, /* resize */ + children_update, /* children_update */ + children_prop_change, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwBoxClass = &MwBoxClassRec; diff --git a/widget/milsko/milskosrc/src/widget/button.c b/widget/milsko/milskosrc/src/widget/button.c new file mode 100644 index 0000000000..51337e69db --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/button.c @@ -0,0 +1,115 @@ +#include + +#include "../../external/stb_ds.h" + +static int wcreate(MwWidget handle) { + MwSetDefault(handle); + + MwSetInteger(handle, MwNflat, 0); + MwSetInteger(handle, MwNpadding, 0); + MwSetInteger(handle, MwNfillArea, 1); + + return 0; +} + +static void draw(MwWidget handle) { + MwRect r; + MwPoint point; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground)); + const char* str = MwGetText(handle, MwNtext); + MwLLPixmap px = MwGetVoid(handle, MwNpixmap); + MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap); + int inv; + + if(str == NULL) str = ""; + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + + if(MwGetInteger(handle, MwNflat)) { + if(handle->pressed || ((inv = MwGetInteger(handle, MwNforceInverted)) != MwDEFAULT && inv)) { + MwDrawWidgetBack(handle, &r, base, handle->pressed, MwDEFAULT); + } else { + MwDrawRect(handle, &r, base); + } + } else { + MwDrawWidgetBack(handle, &r, base, handle->pressed, MwDEFAULT); + } + if(bgpx != NULL) MwLLDrawPixmap(handle->lowlevel, &r, bgpx); + if(MwGetInteger(handle, MwNflat) && !(handle->pressed || ((inv = MwGetInteger(handle, MwNforceInverted)) != MwDEFAULT && inv))) { + r.x += MwDefaultBorderWidth(handle); + r.y += MwDefaultBorderWidth(handle); + r.width -= MwDefaultBorderWidth(handle) * 2; + r.height -= MwDefaultBorderWidth(handle) * 2; + } + + if(px != NULL) { + int ow = r.width; + int oh = r.height; + + if(MwGetInteger(handle, MwNfillArea)) { + double sw = (double)ow / px->common.width; + double sh = (double)oh / px->common.height; + + if(sw < sh) { + r.width = px->common.width * sw; + r.height = px->common.height * sw; + } else { + r.width = px->common.width * sh; + r.height = px->common.height * sh; + } + r.width -= MwGetInteger(handle, MwNpadding) * 2; + r.height -= MwGetInteger(handle, MwNpadding) * 2; + } else { + r.width = px->common.width; + r.height = px->common.height; + } + + r.x += (double)(ow - r.width) / 2; + r.y += (double)(oh - r.height) / 2; + + MwLLDrawPixmap(handle->lowlevel, &r, px); + } else { + point.x = r.x + r.width / 2; + point.y = r.x + r.height / 2; + + MwDrawText(handle, NULL, &point, str, MwALIGNMENT_CENTER, text); + } + + MwLLFreeColor(text); + MwLLFreeColor(base); +} + +static void click(MwWidget handle) { + MwDispatchUserHandler(handle, MwNactivateHandler, NULL); +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNtext) == 0 || strcmp(key, MwNpixmap) == 0 || strcmp(key, MwNflat) == 0 || strcmp(key, MwNpadding) == 0 || strcmp(key, MwNfillArea) == 0) MwForceRender(handle); +} + +MwClassRec MwButtonClassRec = { + wcreate, /* create */ + NULL, /* destroy */ + draw, /* draw */ + click, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + MwForceRender2, /* mouse_up */ + MwForceRender2, /* mouse_down */ + NULL, /* key */ + NULL, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwButtonClass = &MwButtonClassRec; diff --git a/widget/milsko/milskosrc/src/widget/calendar.c b/widget/milsko/milskosrc/src/widget/calendar.c new file mode 100644 index 0000000000..3fa304b98d --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/calendar.c @@ -0,0 +1,248 @@ +#include + +static unsigned int font[] = { + 0x00000000, 0x00401084, 0x0000014a, 0x00afabea, 0x01fa7cbf, 0x01111111, + 0x0126c8a2, 0x00000084, 0x00821088, 0x00221082, 0x015711d5, 0x00427c84, + 0x00220000, 0x00007c00, 0x00400000, 0x00111110, 0x00e9d72e, 0x00421084, + 0x01f2222e, 0x00e8b22e, 0x008fa54c, 0x01f87c3f, 0x00e8bc2e, 0x0042221f, + 0x00e8ba2e, 0x00e87a2e, 0x00020080, 0x00220080, 0x00820888, 0x000f83e0, + 0x00222082, 0x0042222e, 0x00ead72e, 0x011fc544, 0x00f8be2f, 0x00e8862e, + 0x00f8c62f, 0x01f0fc3f, 0x0010bc3f, 0x00e8e42e, 0x0118fe31, 0x00e2108e, + 0x00e8c210, 0x01149d31, 0x01f08421, 0x0118d771, 0x011cd671, 0x00e8c62e, + 0x0010be2f, 0x01ecc62e, 0x0114be2f, 0x00f8383e, 0x0042109f, 0x00e8c631, + 0x00454631, 0x00aad6b5, 0x01151151, 0x00421151, 0x01f1111f, 0x00e1084e, + 0x01041041, 0x00e4210e, 0x00000144, 0x01f00000, 0x00000082, 0x0164a4c0, + 0x00749c20, 0x00e085c0, 0x00e4b908, 0x0060bd26, 0x0042388c, 0x00c8724c, + 0x00a51842, 0x00420080, 0x00621004, 0x00a32842, 0x00421086, 0x015ab800, + 0x00949800, 0x0064a4c0, 0x0013a4c0, 0x008724c0, 0x00108da0, 0x0064104c, + 0x00c23880, 0x0164a520, 0x00452800, 0x00aad400, 0x00a22800, 0x00111140, + 0x00e221c0, 0x00c2088c, 0x00421084, 0x00622086, 0x000022a2}; + +static int wcreate(MwWidget handle) { + MwSetDefault(handle); + + MwSetInteger(handle, MwNyear, 1970); + MwSetInteger(handle, MwNmonth, 0); + MwSetInteger(handle, MwNdate, 1); + MwSetInteger(handle, MwNday, 3); + MwSetInteger(handle, MwNscale, 1); + return 0; +} + +static MwLLPixmap blit(MwWidget handle, const char* str, MwLLColor bg, MwLLColor fg, int scale) { + int i; + unsigned char* buf; + MwLLPixmap px; + int w = (5 * strlen(str) + (strlen(str) - 1)) * scale; + int h = 5 * scale; + int y, x, s; + int r, g, b; + + MwColorGet(bg, &r, &g, &b); + + buf = malloc(w * h * 4); + for(i = 0; i < w * h; i++) { + buf[4 * i + 0] = r; + buf[4 * i + 1] = g; + buf[4 * i + 2] = b; + buf[4 * i + 3] = 255; + } + + MwColorGet(fg, &r, &g, &b); + + for(y = 0; y < h; y++) { + for(i = 0; str[i] != 0; i++) { + unsigned int n = font[str[i] - 0x20]; + + n = n >> (5 * (y / scale)); + + for(x = 0; x < 5; x++) { + for(s = 0; s < scale; s++) { + if(n & 1) { + unsigned char* opx = &buf[(y * w + i * (6 * scale) + x * scale + s) * 4]; + + opx[0] = r; + opx[1] = g; + opx[2] = b; + opx[3] = 255; + } + } + + n = n >> 1; + } + } + } + + px = MwLoadRaw(handle, buf, w, h); + + free(buf); + + return px; +} + +static void draw(MwWidget handle) { + MwLLColor c = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor cf = MwParseColor(handle, MwGetText(handle, MwNforeground)); + MwLLColor cb = MwParseColor(handle, "#fff"); + MwLLColor cb_g = MwParseColor(handle, "#666"); + MwLLColor ct = MwParseColor(handle, "#000"); + MwRect r, r2, r3; + MwPoint p[6]; + int h = 32 * MwGetInteger(handle, MwNscale); + int pw = h / 16; /* parallelogram width */ + int ph = pw * 3; /* parallelogram height */ + int gh = h / 32; /* gray area height */ + int sh = gh * 5 + gh * 2; /* shift height for year */ + char buf[5]; + const char* months[] = { + "JAN", + "FEB", + "MAR", + "APR", + "MAY", + "JUN", + "JUL", + "AUG", + "SEP", + "OCT", + "NOV", + "DEC"}; + const char* days[] = { + "SUN", + "MON", + "TUE", + "WED", + "THU", + "FRI", + "SAT"}; + MwLLPixmap px; + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + MwDrawRect(handle, &r, c); + + p[0].x = (r.width - h) / 2; + p[0].y = (r.height - h - sh) / 2; + p[1].x = p[0].x; + p[1].y = p[0].y + h + gh; + p[2].x = p[1].x + gh * 3; + p[2].y = p[1].y + gh * 3; + p[3].x = p[1].x + h + gh * 7; + p[3].y = p[2].y; + p[4].x = p[3].x; + p[4].y = p[0].y + gh * 7; + p[5].x = p[0].x + h; + p[5].y = p[0].y; + MwLLPolygon(handle->lowlevel, p, 6, cb_g); + + p[0].x = (r.width - h) / 2; + p[0].y = (r.height - h - sh) / 2; + p[1].x = p[0].x; + p[1].y = p[0].y + h + gh; + p[2].x = p[1].x + gh * 2; + p[2].y = p[1].y + gh * 2; + p[3].x = p[1].x + h + gh * 3; + p[3].y = p[2].y; + p[4].x = p[3].x; + p[4].y = p[0].y + gh * 3; + p[5].x = p[0].x + h; + p[5].y = p[0].y; + MwLLPolygon(handle->lowlevel, p, 6, ct); + + r2.width = h; + r2.height = h - ph - gh; + r2.x = (r.width - r2.width) / 2; + r2.y = (r.height - r2.height - ph - gh - sh) / 2; + MwDrawRect(handle, &r2, cb); + + r3.x = r2.x; + r3.y = r2.y + r2.height; + r3.width = r2.width; + r3.height = ph + gh; + MwDrawRect(handle, &r3, cb_g); + + r3.y += r3.height; + r3.height = gh; + MwDrawRect(handle, &r3, cb); + + p[0].x = r2.x; + p[0].y = r2.y + r2.height; + p[1].x = r2.x - pw; + p[1].y = r2.y + r2.height + ph; + p[2].x = r2.x + r2.width - pw; + p[2].y = r2.y + r2.height + ph; + p[3].x = r2.x + r2.width; + p[3].y = r2.y + r2.height; + MwLLPolygon(handle->lowlevel, p, 4, cb); + + p[0].x = r.width / 2; + p[0].y = (r.height - sh) / 2; + MwStringPrintIntoBuffer(buf, 3, "%d", MwGetInteger(handle, MwNdate)); + MwDrawText(handle, MwFLBuildFont(MwFLFlagBold), p, buf, MwALIGNMENT_CENTER, ct); + + r3 = r2; + + px = blit(handle, days[MwGetInteger(handle, MwNday)], cb, ct, gh); + r2 = r3; + r2.width = px->common.width; + r2.height = px->common.height; + r2.x = (r.width - r2.width) / 2; + r2.y = r2.y + gh * 2; + MwLLDrawPixmap(handle->lowlevel, &r2, px); + MwLLDestroyPixmap(px); + + px = blit(handle, months[MwGetInteger(handle, MwNmonth)], cb, ct, gh); + r2 = r3; + r2.width = px->common.width; + r2.height = px->common.height; + r2.x = (r.width - r2.width) / 2; + r2.y = r2.y + h - gh * 2 - r2.height; + MwLLDrawPixmap(handle->lowlevel, &r2, px); + MwLLDestroyPixmap(px); + + MwStringPrintIntoBuffer(buf, 5, "%d", MwGetInteger(handle, MwNyear)); + + px = blit(handle, buf, c, cf, gh); + r2 = r3; + r2.width = px->common.width; + r2.height = px->common.height; + r2.x = (r.width - r2.width) / 2; + r2.y = r2.y + h + gh * 6; + MwLLDrawPixmap(handle->lowlevel, &r2, px); + MwLLDestroyPixmap(px); + + MwLLFreeColor(cf); + MwLLFreeColor(ct); + MwLLFreeColor(cb_g); + MwLLFreeColor(cb); + MwLLFreeColor(c); +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNmonth) == 0 || strcmp(key, MwNdate) == 0 || strcmp(key, MwNday) == 0) MwForceRender(handle); +} + +MwClassRec MwCalendarClassRec = { + wcreate, /* create */ + NULL, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + NULL, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwCalendarClass = &MwCalendarClassRec; diff --git a/widget/milsko/milskosrc/src/widget/checkbox.c b/widget/milsko/milskosrc/src/widget/checkbox.c new file mode 100644 index 0000000000..f196954d34 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/checkbox.c @@ -0,0 +1,70 @@ +#include + +static int wcreate(MwWidget handle) { + MwSetDefault(handle); + + MwSetInteger(handle, MwNchecked, 0); + + return 0; +} + +static void draw(MwWidget handle) { + MwRect r; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap); + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + MwDrawRect(handle, &r, base); + + if(r.width < r.height) { + r.height = r.width; + } else { + r.width = r.height; + } + r.x = (MwGetInteger(handle, MwNwidth) - r.width) / 2; + r.y = (MwGetInteger(handle, MwNheight) - r.height) / 2; + + MwDrawWidgetBack(handle, &r, base, (handle->pressed || MwGetInteger(handle, MwNchecked)) ? 1 : 0, MwDEFAULT); + if(bgpx != NULL) MwLLDrawPixmap(handle->lowlevel, &r, bgpx); + if(handle->pressed || MwGetInteger(handle, MwNchecked)) { + /* TODO: write check mark */ + } + + MwLLFreeColor(base); +} + +static void click(MwWidget handle) { + MwSetInteger(handle, MwNchecked, MwGetInteger(handle, MwNchecked) ? 0 : 1); + + MwDispatchUserHandler(handle, MwNchangedHandler, NULL); +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNchecked) == 0) MwForceRender(handle); +} + +MwClassRec MwCheckBoxClassRec = { + wcreate, /* create */ + NULL, /* destroy */ + draw, /* draw */ + click, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + MwForceRender2, /* mouse_up */ + MwForceRender2, /* mouse_down */ + NULL, /* key */ + NULL, /* execute */ + NULL, /* tick */ + MwForceRender, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwCheckBoxClass = &MwCheckBoxClassRec; diff --git a/widget/milsko/milskosrc/src/widget/combobox.c b/widget/milsko/milskosrc/src/widget/combobox.c new file mode 100644 index 0000000000..e53647dde4 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/combobox.c @@ -0,0 +1,205 @@ +#include + +#include "../../external/stb_ds.h" + +static int wcreate(MwWidget handle) { + MwComboBox cb = malloc(sizeof(*cb)); + + cb->list = NULL; + cb->opened = 0; + cb->listbox = NULL; + handle->internal = cb; + + MwSetDefault(handle); + + MwSetInteger(handle, MwNareaShown, 6); + MwSetInteger(handle, MwNvalue, 0); + + return 0; +} + +static void destroy(MwWidget handle) { + MwComboBox cb = handle->internal; + int i; + + for(i = 0; i < arrlen(cb->list); i++) { + free(cb->list[i]); + } + arrfree(cb->list); + free(handle->internal); +} + +static void draw(MwWidget handle) { + MwRect r, rc; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground)); + MwComboBox cb = handle->internal; + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + + MwDrawWidgetBack(handle, &r, base, 0, MwDEFAULT); + + rc = r; + + /* draw text */ + if(arrlen(cb->list) > MwGetInteger(handle, MwNvalue)) { + MwPoint p; + + p.x = MwDefaultBorderWidth(handle) * 2 + 4; + p.y = MwGetInteger(handle, MwNheight) / 2; + + MwDrawText(handle, NULL, &p, cb->list[MwGetInteger(handle, MwNvalue)], MwALIGNMENT_BEGINNING, text); + } + + r = rc; + r.width = r.height * 3 / 5; + r.height = r.width - MwDefaultBorderWidth(handle) * 2; + r.x = MwGetInteger(handle, MwNwidth) - MwDefaultBorderWidth(handle) - r.width - MwDefaultBorderWidth(handle) * 2; + r.y = (MwGetInteger(handle, MwNheight) - (r.height + MwDefaultBorderWidth(handle) * 2)) / 2; + MwDrawTriangle(handle, &r, base, cb->opened, MwSOUTH); + + r.y += r.height; + r.height = MwDefaultBorderWidth(handle) * 2; + MwDrawFrame(handle, &r, base, 0); + + MwLLFreeColor(text); + MwLLFreeColor(base); +} + +static void MWAPI listbox_activate(MwWidget handle, void* user, void* client) { + MwComboBox cb = handle->parent->internal; + + (void)user; + + MwSetInteger(handle->parent, MwNvalue, *(int*)client); + cb->opened = 0; + cb->listbox = NULL; + + MwForceRender(handle->parent); + + MwDispatchUserHandler(handle->parent, MwNcomboBoxChangedHandler, client); + + MwDestroyWidget(handle); +} + +static void click(MwWidget handle) { + MwComboBox cb = handle->internal; + + cb->opened = cb->opened ? 0 : 1; + if(cb->opened) { + MwPoint p; + int i; + int width = MwGetInteger(handle, MwNwidth); + int ent = MwGetInteger(handle, MwNareaShown); + + if(arrlen(cb->list) == 0) { + cb->opened = 0; + return; + } + + if(ent > arrlen(cb->list)) ent = arrlen(cb->list); + + MwLLSetCursor(handle->lowlevel, &MwCursorArrow, &MwCursorArrowMask); + + for(i = 0; i < arrlen(cb->list); i++) { + int l = MwTextWidth(handle, NULL, cb->list[i]) + MwDefaultBorderWidth(handle) * 2; + if(l > width) width = l; + } + + cb->listbox = MwVaCreateWidget(MwListBoxClass, "listbox", handle, 0, MwGetInteger(handle, MwNheight), width, MwTextHeight(handle, NULL, "M") * ent + MwDefaultBorderWidth(handle) * 2 + MwTextHeight(handle, NULL, "M") / 4, + MwNsingleClickSelectable, 1, + NULL); + + MwLLSetCursor(((MwListBox)cb->listbox->internal)->frame->lowlevel, &MwCursorArrow, &MwCursorArrowMask); + + for(i = 0; i < arrlen(cb->list); i++) { + MwListBoxSet(cb->listbox, -1, 0, cb->list[i]); + } + + MwAddUserHandler(cb->listbox, MwNlistBoxActivateHandler, listbox_activate, NULL); + + p.x = 0; + p.y = MwGetInteger(handle, MwNheight); + MwLLBeginStateChange(cb->listbox->lowlevel); + MwLLDetach(cb->listbox->lowlevel, &p); + MwLLMakeToolWindow(cb->listbox->lowlevel); + MwLLEndStateChange(cb->listbox->lowlevel); + } else { + MwLLSetCursor(handle->lowlevel, &MwCursorDefault, &MwCursorDefaultMask); + + if(cb->listbox != NULL) { + MwDestroyWidget(cb->listbox); + cb->listbox = NULL; + } + } + + MwForceRender(handle); +} + +static void prop_change(MwWidget handle, const char* prop) { + if(strcmp(prop, MwNvalue) == 0) { + MwForceRender(handle); + } +} + +static void mwComboBoxAddImpl(MwWidget handle, int index, const char* text) { + MwComboBox cb = handle->internal; + char* t = MwStringDuplicate(text); + + if(index == -1) index = arrlen(cb->list); + + arrins(cb->list, index, t); + + if(index <= MwGetInteger(handle, MwNvalue)) MwForceRender(handle); +} + +static const char* mwComboBoxGetImpl(MwWidget handle, int index) { + MwComboBox cb = handle->internal; + + return cb->list[index]; +} + +static void func_handler(MwWidget handle, const char* name, void* out, va_list va) { + if(strcmp(name, "mwComboBoxAdd") == 0) { + int index = va_arg(va, int); + const char* text = va_arg(va, const char*); + mwComboBoxAddImpl(handle, index, text); + } + if(strcmp(name, "mwComboBoxGet") == 0) { + int index = va_arg(va, int); + *(const char**)out = mwComboBoxGetImpl(handle, index); + } +} + +static void parent_resize(MwWidget handle) { + MwComboBox cb = handle->internal; + if(cb->opened) { + click(handle); + } +} + +MwClassRec MwComboBoxClassRec = { + wcreate, /* create */ + destroy, /* destroy */ + draw, /* draw */ + click, /* click */ + parent_resize, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + MwForceRender2, /* mouse_up */ + MwForceRender2, /* mouse_down */ + NULL, /* key */ + func_handler, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwComboBoxClass = &MwComboBoxClassRec; diff --git a/widget/milsko/milskosrc/src/widget/entry.c b/widget/milsko/milskosrc/src/widget/entry.c new file mode 100644 index 0000000000..65cd90382e --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/entry.c @@ -0,0 +1,253 @@ +#include +#include "../../external/stb_ds.h" + +static int wcreate(MwWidget handle) { + MwEntry t = malloc(sizeof(*t)); + MwWidget topmost_parent = handle->parent; + + t->cursor = 0; + t->right = 0; + t->length = 0; + t->cursor_blink_timer = 0; + handle->internal = t; + + while(topmost_parent->parent) topmost_parent = topmost_parent->parent; + arrpush(topmost_parent->monitored_entries, handle); + + MwSetDefault(handle); + + MwLLSetCursor(handle->lowlevel, &MwCursorText, &MwCursorTextMask); + + return 0; +} + +static void destroy(MwWidget handle) { + int i; + MwWidget topmost_parent = handle->parent; + + while(topmost_parent->parent) topmost_parent = topmost_parent->parent; + for(i = 0; i < arrlen(topmost_parent->monitored_entries); i++) { + if(topmost_parent->monitored_entries[i] == handle) { + arrdel(topmost_parent->monitored_entries, i); + break; + } + } + free(handle->internal); +} +static void tick(MwWidget handle) { + MwEntry t = handle->internal; + if(t->active) { + if(++t->cursor_blink_timer >= 30) { + t->cursor_blink_timer = 0; + } + MwDispatch(handle, draw); + } +} +static void draw(MwWidget handle) { + MwRect r; + MwEntry t = handle->internal; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground)); + const char* str = MwGetText(handle, MwNtext); + MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap); + MwFLFont font = MwFLBuildFont(MwFLFlagMonospace); + if(str == NULL) str = ""; + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth) - t->right; + r.height = MwGetInteger(handle, MwNheight); + + MwDrawWidgetBack(handle, &r, base, 1, MwDEFAULT); + if(bgpx != NULL) MwLLDrawPixmap(handle->lowlevel, &r, bgpx); + if(str != NULL) { + int w = MwTextWidth(handle, font, "M"); + int h = MwTextHeight(handle, font, "M"); + MwPoint p; + char* show; + int len; + int i; + int start; + int textlen; + int attr; + MwRect currc; + + p.x = (r.width - (r.width / w * w)) / 2; + p.y = r.height / 2; + + len = (r.width - p.x * 2) / w; + + if(len > 0) { + show = malloc(len * 4 + 1); + memset(show, 0, len * 4 + 1); + + start = (t->cursor - 1) / len; + start *= len; + if((attr = MwGetInteger(handle, MwNhideInput)) == MwDEFAULT || !attr) { + MwUTF8Copy(str, start, show, 0, len); + } else { + for(i = 0; i < MwUTF8Length(str) - start; i++) show[i] = '*'; + } + + MwDrawText(handle, font, &p, show, MwALIGNMENT_BEGINNING, text); + + textlen = (t->cursor - 1) % len + 1; + for(i = 0; i < textlen; i++) show[i] = 'M'; + show[i] = 0; + + if(t->active && t->cursor_blink_timer <= 15) { + currc.x = p.x + MwTextWidth(handle, font, show); + currc.y = (r.height - h) / 2 + MwDefaultBorderWidth(handle); + currc.width = 1; + currc.height = h; + MwDrawRect(handle, &currc, text); + } + + free(show); + } + } + + MwLLFreeColor(text); + MwLLFreeColor(base); +} + +static void key(MwWidget handle, int code) { + MwEntry t = handle->internal; + const char* str = MwGetText(handle, MwNtext); + char* out; + if(str == NULL) str = ""; + + if(code == MwKEY_BACKSPACE) { + if(t->cursor == 0) return; + out = malloc(strlen(str) + 1); + + t->cursor--; + + MwUTF8Copy(str, 0, out, 0, t->cursor); + MwUTF8Copy(str, t->cursor + 1, out, t->cursor, MwUTF8Length(str) - (t->cursor + 1)); + + MwSetText(handle, MwNtext, out); + MwDispatchUserHandler(handle, MwNchangedHandler, NULL); + + free(out); + } else if(code == MwKEY_LEFT) { + if(t->cursor == 0) return; + t->cursor--; + } else if(code == MwKEY_RIGHT) { + if(t->cursor == MwUTF8Length(str)) return; + t->cursor++; + } else if(code == MwKEY_ENTER) { + MwDispatchUserHandler(handle, MwNactivateHandler, NULL); + } else if(code == (MwKEY_CONTROL_FLAG | 'v')) { + MwLLGetClipboard(handle->lowlevel, MwCLIPBOARD_MAIN); + } else if(!(code & MwKEY_FLAG)) { + int incr = 0; + out = malloc(strlen(str) + 5 + 1); + incr += MwUTF8Copy(str, 0, out, 0, t->cursor); + MwUTF32ToUTF8(code, out + incr); + MwUTF8Copy(str, t->cursor, out, t->cursor + 1, MwUTF8Length(str) - t->cursor); + + t->cursor++; + + MwSetText(handle, MwNtext, out); + MwDispatchUserHandler(handle, MwNchangedHandler, NULL); + + free(out); + } + + if(MwGetText(handle, MwNtext) != NULL) t->length = MwUTF8Length(MwGetText(handle, MwNtext)); + + MwForceRender(handle); +} + +#if defined(USE_X11) || defined(USE_WAYLAND) +static void mouse_up(MwWidget handle, void* ptr) { + if(handle->lowlevel->common.type == MwLLBackendWayland || handle->lowlevel->common.type == MwLLBackendX11) { + MwMouse* mouse = ptr; + if(mouse->button == MwMOUSE_MIDDLE) { + MwLLGetClipboard(handle->lowlevel, MwCLIPBOARD_PRIMARY); + } + } + MwForceRender2(handle, NULL); +} +#else +#define mouse_up MwForceRender2 +#endif + +static void mouse_down(MwWidget handle, void* ptr) { + int i = 0; + MwEntry t = handle->internal; + MwWidget topmost_parent = handle->parent; + + while(topmost_parent->parent) topmost_parent = topmost_parent->parent; + + for(i = 0; i < arrlen(topmost_parent->monitored_entries); i++) { + MwEntry t = topmost_parent->monitored_entries[i]->internal; + t->active = MwFALSE; + t->cursor_blink_timer = 0; + MwDispatch(topmost_parent->monitored_entries[i], draw); + } + t->active = MwTRUE; + MwForceRender2(handle, NULL); +} + +static void prop_change(MwWidget handle, const char* prop) { + if(strcmp(prop, MwNtext) == 0 || strcmp(prop, MwNhideInput) == 0) MwForceRender(handle); + + if(strcmp(prop, MwNtext) == 0) { + MwEntry t = handle->internal; + int len = MwUTF8Length(MwGetText(handle, MwNtext)); + if(len < t->cursor) { + t->cursor = len; + } else if(t->length == t->cursor) { + t->cursor = len; + } + t->length = len; + } +} + +static void clipboard(MwWidget handle, const char* data) { + MwEntry t = handle->internal; + const char* str = MwGetText(handle, MwNtext); + char* out; + if(!str) { + str = ""; + } + out = malloc(strlen(str) + strlen(data) + 1); + + if(str == NULL) str = ""; + + MwUTF8Copy(str, 0, out, 0, t->cursor); + MwUTF8Copy(data, 0, out, t->cursor, MwUTF8Length(data)); + MwUTF8Copy(str, t->cursor, out, t->cursor + MwUTF8Length(data), MwUTF8Length(str) - t->cursor); + + t->cursor += MwUTF8Length(data); + + MwSetText(handle, MwNtext, out); + free(out); + + MwForceRender(handle); +} + +MwClassRec MwEntryClassRec = { + wcreate, /* create */ + destroy, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + mouse_up, /* mouse_up */ + mouse_down, /* mouse_down */ + key, /* key */ + NULL, /* execute */ + tick, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + clipboard, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwEntryClass = &MwEntryClassRec; diff --git a/widget/milsko/milskosrc/src/widget/frame.c b/widget/milsko/milskosrc/src/widget/frame.c new file mode 100644 index 0000000000..f2af108026 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/frame.c @@ -0,0 +1,69 @@ +#include + +static int wcreate(MwWidget handle) { + MwSetDefault(handle); + + MwSetInteger(handle, MwNhasBorder, 0); + MwSetInteger(handle, MwNinverted, 1); + + return 0; +} + +static void draw(MwWidget handle) { + MwRect fr; + MwRect rr; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + int inverted; + MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap); + + if(MwGetInteger(handle, MwNhasBorder)) { + inverted = MwGetInteger(handle, MwNinverted); + fr.x = 0; + fr.y = 0; + fr.width = MwGetInteger(handle, MwNwidth); + fr.height = MwGetInteger(handle, MwNheight); + MwDrawFrame(handle, &fr, base, inverted); + + rr.x = MwDefaultBorderWidth(handle); + rr.y = MwDefaultBorderWidth(handle); + rr.width = MwGetInteger(handle, MwNwidth) - (MwDefaultBorderWidth(handle) * 2); + rr.height = MwGetInteger(handle, MwNheight) - (MwDefaultBorderWidth(handle) * 2); + } else { + rr.x = 0; + rr.y = 0; + rr.width = MwGetInteger(handle, MwNwidth); + rr.height = MwGetInteger(handle, MwNheight); + } + + MwDrawRect(handle, &rr, base); + if(bgpx != NULL) MwLLDrawPixmap(handle->lowlevel, &rr, bgpx); + + MwLLFreeColor(base); +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNhasBorder) == 0 || strcmp(key, MwNinverted) == 0) MwForceRender(handle); +} + +MwClassRec MwFrameClassRec = { + wcreate, /* create */ + NULL, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + NULL, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwFrameClass = &MwFrameClassRec; diff --git a/widget/milsko/milskosrc/src/widget/image.c b/widget/milsko/milskosrc/src/widget/image.c new file mode 100644 index 0000000000..c8e0680021 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/image.c @@ -0,0 +1,65 @@ +#include + +static int wcreate(MwWidget handle) { + MwSetDefault(handle); + + MwSetInteger(handle, MwNhasBorder, 0); + MwSetInteger(handle, MwNinverted, 1); + MwSetInteger(handle, MwNfillArea, 1); + + return 0; +} + +static void draw(MwWidget handle) { + MwRect r; + MwLLPixmap px = MwGetVoid(handle, MwNpixmap); + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + + if(MwGetInteger(handle, MwNhasBorder)) MwDrawFrame(handle, &r, base, MwGetInteger(handle, MwNinverted)); + + MwDrawRect(handle, &r, base); + if(px != NULL) { + if(!MwGetInteger(handle, MwNfillArea)) { + r.x = (r.width - px->common.width) / 2; + r.y = (r.height - px->common.height) / 2; + r.width = px->common.width; + r.height = px->common.height; + } + + MwLLDrawPixmap(handle->lowlevel, &r, px); + } + + MwLLFreeColor(base); +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNpixmap) == 0 || strcmp(key, MwNhasBorder) == 0 || strcmp(key, MwNinverted) == 0) MwForceRender(handle); +} + +MwClassRec MwImageClassRec = { + wcreate, /* create */ + NULL, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + NULL, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwImageClass = &MwImageClassRec; diff --git a/widget/milsko/milskosrc/src/widget/label.c b/widget/milsko/milskosrc/src/widget/label.c new file mode 100644 index 0000000000..a0be9ca586 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/label.c @@ -0,0 +1,425 @@ +#include + +#include "../../external/stb_ds.h" + +#define Spacing 1 + +static int wcreate(MwWidget handle) { + MwLabel lab = malloc(sizeof(*lab)); + memset(lab, 0, sizeof(*lab)); + + handle->internal = lab; + + MwSetDefault(handle); + MwSetInteger(handle, MwNalignment, MwALIGNMENT_CENTER); + MwSetInteger(handle, MwNbold, 0); + MwSetInteger(handle, MwNsevenSegment, 0); + MwSetInteger(handle, MwNlength, 4); + MwSetInteger(handle, MwNleftPadding, 0); + + return 0; +} + +static void destroy(MwWidget handle) { + MwLabel lab = handle->internal; + + hmfree(lab->segment); + + free(handle->internal); +} + +static void draw_v(MwWidget handle, unsigned char* raw, int x, int y, int stride, MwLLColor text) { + int cy, cx, b; + + int l_one = MwGetInteger(handle, MwNlength) - (MwGetInteger(handle, MwNlength) % 2); + int s_one = (l_one * 3 / 4) - ((l_one * 3 / 4) % 2) + 1; + + for(cy = y; cy < y + l_one; cy++) { + for(cx = x; cx < x + s_one; cx++) { + unsigned char* px = &raw[(cy * stride + cx) * 4]; + px[0] = text->common.red; + px[1] = text->common.green; + px[2] = text->common.blue; + px[3] = 255; + } + } + + b = y - (s_one - 1) / 2; + for(cy = b; cy < b + (s_one - 1) / 2; cy++) { + int w = (cy - b) * 2 + 1; + int b2 = x + (s_one - w) / 2; + for(cx = b2; cx < b2 + w; cx++) { + unsigned char* px; + + px = &raw[(cy * stride + cx) * 4]; + px[0] = text->common.red; + px[1] = text->common.green; + px[2] = text->common.blue; + px[3] = 255; + } + } + + b = y + l_one; + for(cy = b; cy < b + (s_one - 1) / 2; cy++) { + int w = ((s_one - 1) / 2 - 1 - (cy - b)) * 2 + 1; + int b2 = x + (s_one - w) / 2; + for(cx = b2; cx < b2 + w; cx++) { + unsigned char* px; + + px = &raw[(cy * stride + cx) * 4]; + px[0] = text->common.red; + px[1] = text->common.green; + px[2] = text->common.blue; + px[3] = 255; + } + } +} + +static void draw_h(MwWidget handle, unsigned char* raw, int x, int y, int stride, MwLLColor text) { + int cy, cx, b; + + int l_one = MwGetInteger(handle, MwNlength) - (MwGetInteger(handle, MwNlength) % 2); + int s_one = (l_one * 3 / 4) - ((l_one * 3 / 4) % 2) + 1; + + for(cx = x; cx < x + l_one; cx++) { + for(cy = y; cy < y + s_one; cy++) { + unsigned char* px = &raw[(cy * stride + cx) * 4]; + px[0] = text->common.red; + px[1] = text->common.green; + px[2] = text->common.blue; + px[3] = 255; + } + } + + b = x - (s_one - 1) / 2; + for(cx = b; cx < b + (s_one - 1) / 2; cx++) { + int w = (cx - b) * 2 + 1; + int b2 = y + (s_one - w) / 2; + for(cy = b2; cy < b2 + w; cy++) { + unsigned char* px; + + px = &raw[(cy * stride + cx) * 4]; + px[0] = text->common.red; + px[1] = text->common.green; + px[2] = text->common.blue; + px[3] = 255; + } + } + + b = x + l_one; + for(cx = b; cx < b + (s_one - 1) / 2; cx++) { + int w = ((s_one - 1) / 2 - 1 - (cx - b)) * 2 + 1; + int b2 = y + (s_one - w) / 2; + for(cy = b2; cy < b2 + w; cy++) { + unsigned char* px; + + px = &raw[(cy * stride + cx) * 4]; + px[0] = text->common.red; + px[1] = text->common.green; + px[2] = text->common.blue; + px[3] = 255; + } + } +} + +static void draw_seven_segment(MwWidget handle) { + MwRect r; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground)); + MwLLColor shadow = MwLightenColor(handle, base, MwDefaultShadow, MwDefaultShadow, MwDefaultShadow); + int align; + const char* str = MwGetText(handle, MwNtext); + MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap); + MwLabel lab = handle->internal; + int l_one = MwGetInteger(handle, MwNlength) - (MwGetInteger(handle, MwNlength) % 2); + int s_one = (l_one * 3 / 4) - ((l_one * 3 / 4) % 2) + 1; + MwLLPixmap px; + unsigned char* raw; + int w = 0, h = s_one * 3 + l_one * 2, i; + int x = 0; + + if(str == NULL) str = ""; + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + + MwDrawRect(handle, &r, base); + if(bgpx != NULL) MwLLDrawPixmap(handle->lowlevel, &r, bgpx); + + align = MwGetInteger(handle, MwNalignment); + + /* so - this mode cannot do unicode. + * but you wouldn't show unicode on 7 segment anyways + */ + + /* L + * S <---> + * + * S + * ^ + * | + * L | + * | + * v + */ + + for(i = 0; (hmgeti(lab->segment, i) != -1) || str[i] != 0; i++) { + if(i > 0 && ((hmgeti(lab->segment, i) != -1) || str[i] != '.')) w += Spacing; + if(hmgeti(lab->segment, i) != -1 || ('0' <= str[i] && str[i] <= '9') || ('A' <= str[i] && str[i] <= 'F') || ('a' <= str[i] && str[i] <= 'f')) { + w += l_one + s_one * 2; + } else if(str[i] == ':' || str[i] == ' ') { + w += s_one; + } + } + + w++; + h++; + + raw = malloc(w * h * 4); + memset(raw, 0, w * h * 4); + + for(i = 0; (hmgeti(lab->segment, i) != -1) || str[i] != 0; i++) { + if((hmgeti(lab->segment, i) != -1) || ('0' <= str[i] && str[i] <= '9') || ('A' <= str[i] && str[i] <= 'F') || ('a' <= str[i] && str[i] <= 'f')) { + int la = 0, lb = 0, lc = 0, ld = 0, le = 0, lf = 0, lg = 0; + int j; + + /* https://en.wikipedia.org/wiki/File:7_Segment_Display_with_Labeled_Segments.svg */ + + if(hmgeti(lab->segment, i) != -1) { + unsigned char c = hmget(lab->segment, i); + + if(c & (1 << 0)) la = 1; + if(c & (1 << 1)) lb = 1; + if(c & (1 << 2)) lc = 1; + if(c & (1 << 3)) ld = 1; + if(c & (1 << 4)) le = 1; + if(c & (1 << 5)) lf = 1; + if(c & (1 << 6)) lg = 1; + } else { + if(str[i] == '0') { + la = lb = lc = ld = le = lf = 1; + } else if(str[i] == '1') { + lb = lc = 1; + } else if(str[i] == '2') { + la = lb = ld = le = lg = 1; + } else if(str[i] == '3') { + la = lb = lc = ld = lg = 1; + } else if(str[i] == '4') { + lb = lc = lf = lg = 1; + } else if(str[i] == '5') { + la = lc = ld = lf = lg = 1; + } else if(str[i] == '6') { + la = lc = ld = le = lf = lg = 1; + } else if(str[i] == '7') { + la = lb = lc = 1; + } else if(str[i] == '8') { + la = lb = lc = ld = le = lf = lg = 1; + } else if(str[i] == '9') { + la = lb = lc = ld = lf = lg = 1; + } else if(str[i] == 'A' || str[i] == 'a') { + la = lb = lc = le = lf = lg = 1; + } else if(str[i] == 'B' || str[i] == 'b') { + lc = ld = le = lf = lg = 1; + } else if(str[i] == 'C' || str[i] == 'c') { + ld = le = lg = 1; + } else if(str[i] == 'D' || str[i] == 'd') { + lb = lc = ld = le = lg = 1; + } else if(str[i] == 'E' || str[i] == 'e') { + la = ld = le = lf = lg = 1; + } else if(str[i] == 'F' || str[i] == 'f') { + la = le = lf = lg = 1; + } + } + + for(j = 1; j >= 0; j--) { + MwLLColor cl = j == 1 ? shadow : text; + + if(la) draw_h(handle, raw, x + s_one + j, j, w, cl); + if(lb) draw_v(handle, raw, x + s_one + l_one + j, s_one + j, w, cl); + if(lc) draw_v(handle, raw, x + s_one + l_one + j, s_one * 2 + l_one + j, w, cl); + if(ld) draw_h(handle, raw, x + s_one + j, s_one * 2 + l_one * 2 + j, w, cl); + if(le) draw_v(handle, raw, x + j, s_one * 2 + l_one + j, w, cl); + if(lf) draw_v(handle, raw, x + j, s_one + j, w, cl); + if(lg) draw_h(handle, raw, x + s_one + j, s_one + l_one + j, w, cl); + } + + x += l_one + s_one * 2; + } else if(str[i] == ':') { + int cy, cx; + int j; + for(j = 1; j >= 0; j--) { + MwLLColor cl = j == 1 ? shadow : text; + for(cy = 1; cy < h - 1; cy++) { + int h = s_one / 2; + int c = (l_one - h) / 2 + s_one; + + int c1 = (c <= cy && cy <= (c + h)) ? 1 : 0; + int c2 = ((s_one + l_one + c) <= cy && cy <= (s_one + l_one + c + h)) ? 1 : 0; + + if(c1 || c2) { + for(cx = x; cx < x + s_one; cx++) { + unsigned char* px = &raw[((cy + j) * w + (cx + j)) * 4]; + px[0] = cl->common.red; + px[1] = cl->common.green; + px[2] = cl->common.blue; + px[3] = 255; + } + } + } + } + x += s_one; + } else if(str[i] == ' ') { + x += s_one; + } else if(str[i] == '.') { + int cy, cx; + int j; + for(j = 1; j >= 0; j--) { + MwLLColor cl = j == 1 ? shadow : text; + for(cy = h - (s_one - 1) / 2 - 1; cy < h; cy++) { + for(cx = x - Spacing - (s_one - 1) / 2 - 1; cx < (x - Spacing); cx++) { + unsigned char* px = &raw[((cy + j) * w + (cx + j)) * 4]; + px[0] = cl->common.red; + px[1] = cl->common.green; + px[2] = cl->common.blue; + px[3] = 255; + } + } + } + continue; + } + + x += Spacing; + } + + px = MwLoadRaw(handle, raw, w, h); + + r.y = (r.height - h) / 2; + r.height = h; + if(align == MwALIGNMENT_CENTER) { + r.x = (r.width - w) / 2; + } else if(align == MwALIGNMENT_BEGINNING) { + r.x = 0; + } else if(align == MwALIGNMENT_END) { + r.x = r.width - w; + } + r.width = w; + MwLLDrawPixmap(handle->lowlevel, &r, px); + + free(raw); + + MwLLDestroyPixmap(px); +} + +static void draw_normal(MwWidget handle) { + MwRect r; + MwPoint p; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground)); + MwLLColor shadow = MwLightenColor(handle, base, MwDefaultShadow, MwDefaultShadow, MwDefaultShadow); + int align; + const char* str = MwGetText(handle, MwNtext); + MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap); + + if(str == NULL) str = ""; + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + + MwDrawRect(handle, &r, base); + if(bgpx != NULL) MwLLDrawPixmap(handle->lowlevel, &r, bgpx); + + align = MwGetInteger(handle, MwNalignment); + + r.width -= MwGetInteger(handle, MwNleftPadding); + +#if 1 + if(align == MwALIGNMENT_CENTER) { + p.x = r.width / 2; + } else if(align == MwALIGNMENT_BEGINNING) { + p.x = MwTextWidth(handle, NULL, str) / 2; + } else if(align == MwALIGNMENT_END) { + p.x = r.width - MwTextWidth(handle, NULL, str) / 2; + } +#else + p.x = 0; +#endif + p.y = r.height / 2; + + p.x += MwGetInteger(handle, MwNleftPadding); + + p.x += 1; + p.y += 1; + MwDrawText(handle, NULL, &p, str, MwALIGNMENT_CENTER, shadow); + + p.x -= 1; + p.y -= 1; + MwDrawText(handle, NULL, &p, str, MwALIGNMENT_CENTER, text); + + MwLLFreeColor(shadow); + MwLLFreeColor(text); + MwLLFreeColor(base); +} + +static void draw(MwWidget handle) { + MwLabel lab = handle->internal; + if(!lab->draw) { + lab->draw = draw_normal; + } + lab->draw(handle); +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNtext) == 0 || strcmp(key, MwNalignment) == 0 || strcmp(key, MwNsevenSegment) == 0 || strcmp(key, MwNlength) == 0 || strcmp(key, MwNleftPadding) == 0) MwForceRender(handle); + + if(strcmp(key, MwNsevenSegment) == 0) { + MwLabel lab = handle->internal; + if(MwGetInteger(handle, MwNsevenSegment)) + lab->draw = draw_seven_segment; + else + lab->draw = draw_normal; + } +} + +static void mwLabelSetSevenSegmentImpl(MwWidget handle, int index, unsigned char data) { + MwLabel lab = handle->internal; + + hmput(lab->segment, index, data); +} + +static void func_handler(MwWidget handle, const char* name, void* out, va_list va) { + (void)out; + + if(strcmp(name, "mwLabelSetSevenSegment") == 0) { + int index = va_arg(va, int); + int data = va_arg(va, int); + + mwLabelSetSevenSegmentImpl(handle, index, data); + } +} + +MwClassRec MwLabelClassRec = { + wcreate, /* create */ + destroy, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + func_handler, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwLabelClass = &MwLabelClassRec; diff --git a/widget/milsko/milskosrc/src/widget/listbox.c b/widget/milsko/milskosrc/src/widget/listbox.c new file mode 100644 index 0000000000..32be8875bd --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/listbox.c @@ -0,0 +1,625 @@ +#include + +#include "../../external/stb_ds.h" + +#define Padding 2 + +#define Font MwFLBuildFont(MwFLFlagMonospace) + +static int get_first_entry(MwWidget handle, MwListBox lb) { + int st = 0; + int y = MwGetInteger(handle, MwNhasHeading) ? 1 : 0; + + st = MwGetInteger(lb->vscroll, MwNvalue); + st = st * (MwGetInteger(lb->vscroll, MwNmaxValue) - MwGetInteger(lb->vscroll, MwNareaShown)) / MwGetInteger(lb->vscroll, MwNmaxValue); + if(st < y) st = y; + + return st; +} + +static int get_col_width(MwListBox lb, int ind) { + int total = MwGetInteger(lb->frame, MwNwidth); + int wid, i; + if(arrlen(lb->width) <= ind) { + wid = 0; + } else { + wid = lb->width[ind]; + } + if(wid > 0) return wid; + + if(wid == 0) { + for(i = 0; i < arrlen(lb->width) && i < ind; i++) { + int w = lb->width[i]; + if(w < 0) { + total -= total + w; + } else if(wid > 0) { + total -= w; + } + } + return total; + } + + if(wid < 0) { + for(i = 0; i < arrlen(lb->width) && i < ind; i++) { + int w = lb->width[i]; + if(w < 0) { + total -= total + w; + } else if(wid > 0) { + total -= w; + } + } + return total + wid; + } + + return 0; +} + +static void MWAPI vscroll_changed(MwWidget handle, void* user, void* call) { + MwListBox lb = handle->parent->internal; + + (void)user; + (void)call; + + lb->changed = 1; +} + +static void MWAPI frame_mouse_down(MwWidget handle, void* user, void* call) { + MwListBox lb = handle->parent->internal; + MwMouse* m = call; + + (void)user; + + if(m->button == MwMOUSE_LEFT) { + int st = 0; + int i; + int y = MwDefaultBorderWidth(handle); + int h = MwGetInteger(handle, MwNheight); + + st = get_first_entry(handle->parent, lb); + for(i = 0; (st + i) < arrlen(lb->list) && i < (h - MwDefaultBorderWidth(handle) * 2) / (MwTextHeight(handle, Font, "M") + Padding) + 2; i++) { + if(y <= m->point.y && m->point.y <= (y + MwTextHeight(handle, Font, "M") + Padding)) { + unsigned long t; + int old = MwGetInteger(handle->parent, MwNvalue); + + MwSetInteger(handle->parent, MwNvalue, st + i); + + if((((t = MwTimeGetTick()) - lb->click_time) < MwDoubleClickTimeout && old == st + i) || MwGetInteger(handle->parent, MwNsingleClickSelectable)) { + int n = MwGetInteger(handle->parent, MwNvalue); + MwDispatchUserHandler(handle->parent, MwNlistBoxActivateHandler, &n); + } + + lb->click_time = t; + } + y += MwTextHeight(handle, Font, "M") + Padding; + } + + MwForceRender(lb->frame); + lb->pressed = 1; + } +} + +static void MWAPI frame_mouse_up(MwWidget handle, void* user, void* call) { + MwListBox lb = handle->parent->internal; + MwMouse* m = call; + + (void)user; + + if(m->button == MwMOUSE_LEFT) { + lb->pressed = 0; + } +} + +static void MWAPI frame_mouse_move(MwWidget handle, void* user, void* call) { + MwListBox lb = handle->parent->internal; + MwPoint* p = call; + + (void)user; + + if(lb->pressed) { + int st = 0; + int i; + int y = MwDefaultBorderWidth(handle); + int h = MwGetInteger(handle, MwNheight); + + st = get_first_entry(handle->parent, lb); + for(i = 0; (st + i) < arrlen(lb->list) && i < (h - MwDefaultBorderWidth(handle) * 2) / (MwTextHeight(handle, Font, "M") + Padding) + 2; i++) { + if(y <= p->y && p->y <= (y + MwTextHeight(handle, Font, "M") + Padding)) { + MwSetInteger(handle->parent, MwNvalue, st + i); + } + y += MwTextHeight(handle, Font, "M") + Padding; + } + + MwForceRender(lb->frame); + } +} + +static void frame_draw(MwWidget handle) { + MwRect r, r2; + MwListBox lb = handle->parent->internal; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor base2 = MwParseColor(handle, MwGetText(handle, MwNsubBackground)); + MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground)); + MwLLColor text2 = MwParseColor(handle, MwGetText(handle, MwNsubForeground)); + int i; + MwPoint p; + int st = 0; + int ent; + int area; + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + r2 = r; + + p.x = MwDefaultBorderWidth(handle); + p.y = MwDefaultBorderWidth(handle); + + MwDrawFrame(handle, &r, base, 1); + MwDrawRect(handle, &r, base2); + + r = r2; + + st = get_first_entry(handle->parent, lb); + + area = r.height - MwDefaultBorderWidth(handle) * 2; + ent = area / (MwTextHeight(handle, Font, "M") + Padding) + 2; + + for(i = st; i < arrlen(lb->list) && i < st + ent; i++) { + int selected = MwGetInteger(handle->parent, MwNvalue) == i ? 1 : 0; + int j; + + if(selected) { + MwRect r2; + r2.x = MwDefaultBorderWidth(handle) + MwGetInteger(handle->parent, MwNleftPadding); + r2.y = p.y; + r2.width = r.width - r2.x; + r2.height = MwTextHeight(handle, Font, "M") + Padding; + MwDrawRect(handle, &r2, text2); + handle->bgcolor = text2; + } + if(lb->list[i].pixmap != NULL) { + MwRect r2; + int h = (lb->list[i].pixmap->common.height > (MwTextHeight(handle, Font, "M") + Padding)) ? (MwTextHeight(handle, Font, "M") + Padding) : lb->list[i].pixmap->common.height; + r2.x = MwDefaultBorderWidth(handle); + r2.y = p.y + (MwTextHeight(handle, Font, "M") + Padding - h) / 2; + r2.width = h * lb->list[i].pixmap->common.width / lb->list[i].pixmap->common.height; + r2.height = h; + MwLLDrawPixmap(handle->lowlevel, &r2, lb->list[i].pixmap); + } + p.x = MwDefaultBorderWidth(handle) + MwGetInteger(handle->parent, MwNleftPadding); + for(j = 0; j < arrlen(lb->list[i].name); j++) { + char* t = lb->list[i].name[j]; + char* str; + int l = (j == 0 ? MwGetInteger(handle->parent, MwNleftPadding) : 0); + MwPoint p2 = p; + p2.y += (MwTextHeight(handle, Font, "M") + Padding) / 2; + + if(t == NULL) t = ""; + + str = MwStringDuplicate(t); + if(MwUTF8Length(str) > (get_col_width(lb, j) - l) / MwTextWidth(handle, Font, "M")) { + int ind = (get_col_width(lb, j) - l) / MwTextWidth(handle, Font, "M") - 3; + int seek = 0; + int l = 0; + char* old = str; + + if(ind < 0) ind = 0; + + str = malloc(strlen(old) + 5); + strcpy(str, old); + free(old); + + while(str[seek] != 0) { + int cp; + if(l == ind) break; + + seek += MwUTF8ToUTF32(str + seek, &cp); + + l++; + } + + memset(str + seek, '.', 3); + str[seek + 3] = 0; + } + + if(j == (arrlen(lb->list[i].name) - 1)) p.x -= MwDefaultBorderWidth(handle); + if(arrlen(lb->alignment) <= j || lb->alignment[j] == MwALIGNMENT_BEGINNING) { + p.x += 4; + p2.x = p.x; + MwDrawText(handle, Font, &p2, str, MwALIGNMENT_BEGINNING, selected ? base2 : text2); + p.x -= 4; + p.x += get_col_width(lb, j); + + } else if(lb->alignment[j] == MwALIGNMENT_CENTER) { + p.x += (get_col_width(lb, j) - l) / 2; + p2.x = p.x; + MwDrawText(handle, Font, &p2, str, MwALIGNMENT_CENTER, selected ? base2 : text2); + p.x += (get_col_width(lb, j) - l) / 2; + p.x += l; + } else if(lb->alignment[j] == MwALIGNMENT_END) { + p.x += get_col_width(lb, j); + p.x -= 4; + p2.x = p.x; + MwDrawText(handle, Font, &p2, str, MwALIGNMENT_END, selected ? base2 : text2); + p.x += 4; + } + free(str); + + if(j == 0) p.x -= MwGetInteger(handle->parent, MwNleftPadding); + } + p.y += MwTextHeight(handle, Font, "M") + Padding; + handle->bgcolor = NULL; + } + + MwDrawFrame(handle, &r, base, 1); + + MwLLFreeColor(text2); + MwLLFreeColor(text); + MwLLFreeColor(base2); + MwLLFreeColor(base); +} + +static void resize(MwWidget handle, int no_resize) { + MwListBox lb = handle->internal; + int w = MwGetInteger(handle, MwNwidth); + int h = MwGetInteger(handle, MwNheight); + int ih, y; + int m = 0; + + y = MwGetInteger(handle, MwNhasHeading) ? (MwTextHeight(handle, Font, "M") + MwDefaultBorderWidth(handle) * 2) : 0; + + if(lb->vscroll == NULL) { + lb->vscroll = MwVaCreateWidget(MwScrollBarClass, "vscroll", handle, w - 16, 0, 16, h, NULL); + MwAddUserHandler(lb->vscroll, MwNchangedHandler, vscroll_changed, NULL); + } else if(!no_resize) { + MwVaApply(lb->vscroll, + MwNx, w - 16, + MwNy, 0, + MwNwidth, 16, + MwNheight, h, + NULL); + } + + ih = arrlen(lb->list); + if(ih == 0) ih = 1; + + h -= y; + + if(ih <= (h / (MwTextHeight(handle, Font, "M") + Padding))) { + MwLLShow(lb->vscroll->lowlevel, 0); + } else { + MwLLShow(lb->vscroll->lowlevel, 1); + m = 16; + } + + if(lb->frame == NULL) { + lb->frame = MwVaCreateWidget(MwFrameClass, "frame", handle, 0, y, w - m, h, NULL); + lb->frame->draw_inject = frame_draw; + MwAddUserHandler(lb->frame, MwNmouseDownHandler, frame_mouse_down, NULL); + MwAddUserHandler(lb->frame, MwNmouseUpHandler, frame_mouse_up, NULL); + MwAddUserHandler(lb->frame, MwNmouseMoveHandler, frame_mouse_move, NULL); + } else if(!no_resize || MwGetInteger(lb->frame, MwNwidth) != (w - m)) { + MwVaApply(lb->frame, + MwNx, 0, + MwNy, y, + MwNwidth, w - m, + MwNheight, h, + NULL); + } + h -= MwDefaultBorderWidth(handle) * 2; + + MwVaApply(lb->vscroll, + MwNareaShown, h / (MwTextHeight(handle, Font, "M") + Padding), + MwNmaxValue, ih, + NULL); +} + +static int wcreate(MwWidget handle) { + MwListBox lb = malloc(sizeof(*lb)); + memset(lb, 0, sizeof(*lb)); + + handle->internal = lb; + + MwSetDefault(handle); + + MwSetInteger(handle, MwNsingleClickSelectable, 0); + MwSetInteger(handle, MwNhasHeading, 0); + MwSetInteger(handle, MwNleftPadding, 0); + MwSetInteger(handle, MwNvalue, -1); + + resize(handle, 0); + lb->list = NULL; + lb->click_time = 0; + lb->width = NULL; + lb->alignment = NULL; + lb->changed = 0; + + return 0; +} + +static void destroy(MwWidget handle) { + MwListBox lb = handle->internal; + MwListBoxReset(handle); + arrfree(lb->list); + arrfree(lb->width); + arrfree(lb->alignment); + free(handle->internal); +} + +static void draw(MwWidget handle) { + MwRect r; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground)); + MwListBox lb = handle->internal; + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + + MwDrawRect(handle, &r, base); + if(MwGetInteger(handle, MwNhasHeading) && arrlen(lb->list) > 0) { + MwPoint p; + int i; + int x = 0; + + r.width -= 16; + + for(i = 0; i < arrlen(lb->list[0].name); i++) { + r.x = x; + r.y = 0; + r.width = get_col_width(lb, i); + r.height = MwDefaultBorderWidth(handle) * 2 + MwTextHeight(handle, Font, "M"); + MwDrawFrame(handle, &r, base, 0); + + x += MwDefaultBorderWidth(handle); + + if(arrlen(lb->alignment) <= i || lb->alignment[i] == MwALIGNMENT_BEGINNING) { + p.x = 4 + x; + p.y = r.y + r.height / 2; + MwDrawText(handle, NULL, &p, lb->list[0].name[i], MwALIGNMENT_BEGINNING, text); + } else if(lb->alignment[i] == MwALIGNMENT_CENTER) { + p.x = x + r.width / 2; + p.y = r.y + r.height / 2; + MwDrawText(handle, NULL, &p, lb->list[0].name[i], MwALIGNMENT_CENTER, text); + } else if(lb->alignment[i] == MwALIGNMENT_END) { + p.x = x + r.width - 4; + p.y = r.y + r.height / 2; + MwDrawText(handle, NULL, &p, lb->list[0].name[i], MwALIGNMENT_END, text); + } + + x += r.width; + + x += MwDefaultBorderWidth(handle); + } + } + + MwLLFreeColor(text); + MwLLFreeColor(base); +} + +static void prop_change(MwWidget handle, const char* prop) { + MwListBox lb = handle->internal; + if(strcmp(prop, MwNleftPadding) == 0) { + MwForceRender(lb->frame); + } + if(strcmp(prop, MwNhasHeading) == 0) { + MwForceRender(handle); + } +} + +static void redrawIfNeeded(MwWidget handle, int row) { + MwListBox lb = handle->internal; + + if(MwGetInteger(lb->vscroll, MwNvalue) <= row && row <= (MwGetInteger(lb->vscroll, MwNvalue) + MwGetInteger(lb->vscroll, MwNareaShown))) { + MwForceRender(lb->frame); + } +} + +static int mwListBoxSetImpl(MwWidget handle, int row, int col, const char* text) { + MwListBox lb = handle->internal; + MwListBoxEntry entry; + char* t = text == NULL ? NULL : MwStringDuplicate(text); + int new = 0; + if(row == -1) row = arrlen(lb->list); + + entry.name = NULL; + entry.pixmap = NULL; + if(row < arrlen(lb->list)) { + entry = lb->list[row]; + } + + if(col == -1) col = arrlen(entry.name); + arrins(entry.name, col, t); + + if(row < arrlen(lb->list)) { + lb->list[row] = entry; + } else { + arrins(lb->list, row, entry); + new = 1; + } + + if(new) resize(handle, 1); + redrawIfNeeded(handle, row); + + return row; +} + +static void mwListBoxSetIconImpl(MwWidget handle, int index, MwLLPixmap icon) { + MwListBox lb = handle->internal; + MwListBoxEntry entry; + int new = 0; + if(index == -1) index = arrlen(lb->list); + + entry.name = NULL; + entry.pixmap = NULL; + if(index < arrlen(lb->list)) { + entry = lb->list[index]; + } + + entry.pixmap = icon; + + if(index < arrlen(lb->list)) { + lb->list[index] = entry; + } else { + arrins(lb->list, index, entry); + new = 1; + } + + if(new) resize(handle, 1); + redrawIfNeeded(handle, index); +} + +static void mwListBoxDeleteImpl(MwWidget handle, int index) { + MwListBox lb = handle->internal; + int i; + + if(index == -1) index = arrlen(lb->list) - 1; + for(i = 0; i < arrlen(lb->list[index].name); i++) { + free(lb->list[index].name[i]); + } + arrfree(lb->list[index].name); + arrdel(lb->list, index); + + if(MwGetInteger(handle, MwNvalue) >= arrlen(lb->list)) { + MwSetInteger(handle, MwNvalue, arrlen(lb->list) - 1); + } + if(MwGetInteger(handle, MwNvalue) < (MwGetInteger(handle, MwNhasHeading) ? 1 : 0)) { + MwSetInteger(handle, MwNvalue, -1); + } + + resize(handle, 1); + if(index < (MwGetInteger(lb->vscroll, MwNvalue) + MwGetInteger(lb->vscroll, MwNareaShown))) { + MwForceRender(lb->frame); + } +} + +static void mwListBoxResetImpl(MwWidget handle) { + MwListBox lb = handle->internal; + int i; + + while(arrlen(lb->list) > 0) { + for(i = 0; i < arrlen(lb->list[0].name); i++) { + if(lb->list[0].name[i] != NULL) free(lb->list[0].name[i]); + } + arrfree(lb->list[0].name); + arrdel(lb->list, 0); + } + + MwSetInteger(handle, MwNvalue, -1); + + MwSetInteger(lb->vscroll, MwNvalue, 0); + + resize(handle, 0); + MwForceRender(lb->frame); +} + +static const char* mwListBoxGetImpl(MwWidget handle, int index) { + MwListBox lb = handle->internal; + + if(index < 0) return NULL; + if(index >= arrlen(lb->list)) return NULL; + + return lb->list[index].name[0]; +} + +static void mwListBoxSetWidthImpl(MwWidget handle, int index, int width) { + MwListBox lb = handle->internal; + + while(((index + 1) - arrlen(lb->width)) > 0) arrput(lb->width, 0); + + lb->width[index] = width; + + MwForceRender(handle); + MwForceRender(lb->frame); +} + +static void mwListBoxSetAlignmentImpl(MwWidget handle, int index, int alignment) { + MwListBox lb = handle->internal; + + while(((index + 1) - arrlen(lb->alignment)) > 0) arrput(lb->alignment, MwALIGNMENT_BEGINNING); + + lb->alignment[index] = alignment; + + MwForceRender(handle); + MwForceRender(lb->frame); +} + +static void func_handler(MwWidget handle, const char* name, void* out, va_list va) { + if(strcmp(name, "mwListBoxDelete") == 0) { + int index = va_arg(va, int); + mwListBoxDeleteImpl(handle, index); + } + if(strcmp(name, "mwListBoxReset") == 0) { + mwListBoxResetImpl(handle); + } + if(strcmp(name, "mwListBoxGet") == 0) { + int index = va_arg(va, int); + *(const char**)out = mwListBoxGetImpl(handle, index); + } + if(strcmp(name, "mwListBoxSetWidth") == 0) { + int index = va_arg(va, int); + int width = va_arg(va, int); + mwListBoxSetWidthImpl(handle, index, width); + } + if(strcmp(name, "mwListBoxSetAlignment") == 0) { + int index = va_arg(va, int); + int alignment = va_arg(va, int); + mwListBoxSetAlignmentImpl(handle, index, alignment); + } + if(strcmp(name, "mwListBoxSet") == 0) { + int row = va_arg(va, int); + int col = va_arg(va, int); + const char* text = va_arg(va, const char*); + *(int*)out = mwListBoxSetImpl(handle, row, col, text); + } + if(strcmp(name, "mwListBoxSetIcon") == 0) { + int index = va_arg(va, int); + MwLLPixmap icon = va_arg(va, MwLLPixmap); + mwListBoxSetIconImpl(handle, index, icon); + } +} + +static void tick(MwWidget handle) { + MwListBox lb = handle->internal; + + if(lb->changed) { + lb->changed = 0; + MwForceRender(lb->frame); + } +} + +static void props_change(MwWidget handle, char** props) { + int i; + int rsz = 0; + + for(i = 0; props[i] != NULL; i++) { + if(strcmp(props[i], MwNwidth) == 0 || strcmp(props[i], MwNheight) == 0 || strcmp(props[i], MwNhasHeading) == 0) rsz = 1; + } + + if(rsz) resize(handle, 0); +} + +MwClassRec MwListBoxClassRec = { + wcreate, /* create */ + destroy, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + func_handler, /* execute */ + tick, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + props_change, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwListBoxClass = &MwListBoxClassRec; diff --git a/widget/milsko/milskosrc/src/widget/menu.c b/widget/milsko/milskosrc/src/widget/menu.c new file mode 100644 index 0000000000..8dd3d7a997 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/menu.c @@ -0,0 +1,265 @@ +#include + +#include "../../external/stb_ds.h" + +static void set_xywh(MwWidget handle) { + int height = 0; + int diff = MwDefaultBorderWidth(handle); + diff = 0; + + height = MwTextHeight(handle, NULL, "M") + 10; + + MwVaApply(handle, + MwNx, -diff, + MwNy, -diff, + MwNwidth, MwGetInteger(handle->parent, MwNwidth) + diff * 2, + MwNheight, height + diff, + NULL); +} + +static int wcreate(MwWidget handle) { + MwMenu m = malloc(sizeof(*m)); + + m->name = NULL; + m->wsub = NULL; + m->sub = NULL; + handle->internal = m; + handle->is_menu = MwTRUE; + + MwSetDefault(handle); + + set_xywh(handle); + + return 0; +} + +static void recursive_free(MwMenu m) { + int i; + + for(i = 0; i < arrlen(m->sub); i++) { + recursive_free(m->sub[i]); + } + + if(m->sub != NULL) arrfree(m->sub); + if(m->name != NULL) free(m->name); + free(m); +} + +static void destroy(MwWidget handle) { + MwMenu m = handle->internal; + + recursive_free(m); +} + +#define MENU_LOOP_DECL \ + int i; \ + MwMenu m = handle->internal; \ + MwPoint p; \ + MwRect r; \ + int rx; \ + int in_area; + +#define MENU_LOOP_INIT \ + p.x = 0; \ + p.y = (MwGetInteger(handle, MwNheight) - MwDefaultBorderWidth(handle)) / 2 + MwDefaultBorderWidth(handle); \ +\ + r.x = 0; \ + r.y = 0; \ + r.width = MwGetInteger(handle, MwNwidth); \ + r.height = MwGetInteger(handle, MwNheight); \ +\ + rx = r.width; + +#define BEGIN_MENU_LOOP \ + for(i = 0; i < arrlen(m->sub); i++) { \ + int incr = m->sub[i]->name[0] == '?' ? 1 : 0; \ + int tw = MwTextWidth(handle, MwFLBuildFont(MwFLFlagBold), m->sub[i]->name + incr); \ + int th = MwTextHeight(handle, MwFLBuildFont(MwFLFlagBold), m->sub[i]->name + incr); \ +\ + if(incr) { \ + p.x = rx -= 10 + tw; \ + } \ +\ + r.x = p.x; \ + r.y = p.y + ((MwGetInteger(handle, MwNheight) - p.y * 2) - (th + 10)) / 2; \ + r.width = tw + 10; \ + r.height = th + 10; \ +\ + in_area = (r.x <= handle->mouse_point.x && r.y <= handle->mouse_point.y && handle->mouse_point.x <= (int)(r.x + r.width) && handle->mouse_point.y <= (int)(r.y + r.height)) ? 1 : 0; \ + p.x += 5 + tw / 2; + +#define END_MENU_LOOP \ + p.x += tw / 2 + 5; \ + } + +#define NEW_SUBMENU \ + MwPoint p2; \ +\ + p2.x = p.x - 5 - tw / 2; \ + p2.y = p.y + th / 2 + 5; \ +\ + m->sub[i]->wsub = MwCreateWidget(MwSubMenuClass, "submenu", handle, 0, MwGetInteger(handle, MwNheight), 0, 0); \ + MwSubMenuAppear(m->sub[i]->wsub, m->sub[i], &p2, 0); \ + m->sub[i]->cleaned = 0; + +static void draw(MwWidget handle) { + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground)); + MENU_LOOP_DECL; + + MENU_LOOP_INIT; + + MwDrawWidgetBack(handle, &r, base, 0, MwDEFAULT); + + BEGIN_MENU_LOOP; + if(m->sub[i]->wsub != NULL || (in_area && handle->pressed)) { + MwDrawFrame(handle, &r, base, MwFALSE); + MwDrawWidgetBack(handle, &r, base, 0, 0); + } + + MwDrawText(handle, MwFLBuildFont((m->sub[i]->wsub != NULL || (in_area && handle->pressed)) ? MwFLFlagBold : 0), &p, m->sub[i]->name + incr, MwALIGNMENT_CENTER, text); + END_MENU_LOOP; + + MwLLFreeColor(text); + MwLLFreeColor(base); +} + +static void parent_resize(MwWidget handle) { + set_xywh(handle); +} + +static void mouse_down(MwWidget handle, void* ptr) { + MENU_LOOP_DECL; + + MENU_LOOP_INIT; + + if(((MwMouse*)ptr)->button != MwMOUSE_LEFT) return; + + BEGIN_MENU_LOOP; + if(in_area) { + if(m->sub[i]->wsub == NULL && arrlen(m->sub[i]->sub) > 0) { + NEW_SUBMENU; + } else if(m->sub[i]->wsub != NULL && m->sub[i]->keep) { + MwDestroyWidget(m->sub[i]->wsub); + m->sub[i]->wsub = NULL; + m->sub[i]->keep = 0; + m->sub[i]->cleaned = 1; + } + } else if(m->sub[i]->keep && m->sub[i]->wsub != NULL) { + MwDestroyWidget(m->sub[i]->wsub); + m->sub[i]->wsub = NULL; + m->sub[i]->keep = 0; + m->sub[i]->cleaned = 1; + } + END_MENU_LOOP; + + MwForceRender(handle); +} + +static void mouse_move(MwWidget handle) { + int matched = 0; + MENU_LOOP_DECL; + + MENU_LOOP_INIT; + + if(!handle->pressed) return; + + BEGIN_MENU_LOOP; + if(in_area && m->sub[i]->wsub == NULL) { + matched = 1; + } + END_MENU_LOOP; + + MENU_LOOP_INIT; + BEGIN_MENU_LOOP; + if(matched && m->sub[i]->wsub != NULL) { + MwDestroyWidget(m->sub[i]->wsub); + m->sub[i]->wsub = NULL; + m->sub[i]->keep = 0; + m->sub[i]->cleaned = 0; + } + END_MENU_LOOP; + + MENU_LOOP_INIT; + BEGIN_MENU_LOOP; + if(matched && in_area) { + if(m->sub[i]->wsub == NULL && arrlen(m->sub[i]->sub) > 0 && !m->sub[i]->cleaned) { + NEW_SUBMENU; + } + } + END_MENU_LOOP; + + if(matched) MwForceRender(handle); +} + +static void mouse_up(MwWidget handle, void* ptr) { + MENU_LOOP_DECL; + + MENU_LOOP_INIT; + + if(((MwMouse*)ptr)->button != MwMOUSE_LEFT) return; + + BEGIN_MENU_LOOP; + if(in_area && m->sub[i]->wsub != NULL) { + m->sub[i]->keep = 1; + } else if(in_area) { + if(arrlen(m->sub[i]->sub) == 0) { + MwDispatchUserHandler(handle, MwNmenuHandler, m->sub[i]); + } + } else if(m->sub[i]->wsub != NULL) { + MwDestroyWidget(m->sub[i]->wsub); + m->sub[i]->wsub = NULL; + m->sub[i]->keep = 0; + m->sub[i]->cleaned = 0; + } + END_MENU_LOOP; + + MwForceRender(handle); +} + +static MwMenu mwMenuAddImpl(MwWidget handle, MwMenu menu, const char* name) { + MwMenu m = menu == NULL ? handle->internal : menu; + MwMenu new = malloc(sizeof(*new)); + new->name = MwStringDuplicate(name); + new->sub = NULL; + new->wsub = NULL; + new->keep = 0; + new->cleaned = 0; + + arrput(m->sub, new); + + set_xywh(handle); + + return new; +} + +static void func_handler(MwWidget handle, const char* name, void* out, va_list va) { + if(strcmp(name, "mwMenuAdd") == 0) { + MwMenu menu = va_arg(va, MwMenu); + const char* name = va_arg(va, const char*); + *(MwMenu*)out = mwMenuAddImpl(handle, menu, name); + } +} + +MwClassRec MwMenuClassRec = { + wcreate, /* create */ + destroy, /* destroy */ + draw, /* draw */ + NULL, /* click */ + parent_resize, /* parent_resize */ + NULL, /* prop_change */ + mouse_move, /* mouse_move */ + mouse_up, /* mouse_up */ + mouse_down, /* mouse_down */ + NULL, /* key */ + func_handler, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwMenuClass = &MwMenuClassRec; diff --git a/widget/milsko/milskosrc/src/widget/numberentry.c b/widget/milsko/milskosrc/src/widget/numberentry.c new file mode 100644 index 0000000000..f3a80e94c7 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/numberentry.c @@ -0,0 +1,153 @@ +#include + +static int wcreate(MwWidget handle) { + int st; + MwEntry e; + + if((st = MwEntryClass->create(handle)) != 0) return st; + + e = handle->internal; + e->right = 32; + + MwSetText(handle, MwNtext, "0"); + + return 0; +} + +static void destroy(MwWidget handle) { + MwEntryClass->destroy(handle); +} + +static void draw(MwWidget handle) { + int w = MwGetInteger(handle, MwNwidth); + int h = MwGetInteger(handle, MwNheight); + MwEntry e = handle->internal; + MwRect r; + int pr; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + + MwEntryClass->draw(handle); + + pr = (handle->pressed && e->mouse.x >= (w - e->right) && e->mouse.y < (h / 2)) ? 1 : 0; + r.x = w - e->right; + r.y = 0; + r.width = e->right; + r.height = h / 2; + MwDrawWidgetBack(handle, &r, base, pr, MwDEFAULT); + + if(r.width > r.height) { + r.width = r.height; + } else { + r.height = r.width; + } + r.x = r.x + (e->right - r.width) / 2; + r.y = r.y + (h / 2 - r.height) / 2; + MwDrawTriangle(handle, &r, base, pr, MwNORTH); + + pr = (handle->pressed && e->mouse.x >= (w - e->right) && e->mouse.y >= (h / 2)) ? 1 : 0; + r.x = w - e->right; + r.y = h / 2; + r.width = e->right; + r.height = h / 2; + MwDrawWidgetBack(handle, &r, base, pr, MwDEFAULT); + + if(r.width > r.height) { + r.width = r.height; + } else { + r.height = r.width; + } + r.x = r.x + (e->right - r.width) / 2; + r.y = r.y + (h / 2 - r.height) / 2; + MwDrawTriangle(handle, &r, base, pr, MwSOUTH); + + MwLLFreeColor(base); +} + +static void key(MwWidget handle, int code) { + MwEntry e = handle->internal; + const char* str = MwGetText(handle, MwNtext); + int ok = 0; + if(str == NULL) str = ""; + + if(code == '-' && e->cursor == 0 && strchr(str, (int)'-') == NULL) { + ok = 1; + } else if('0' <= code && code <= '9') { + ok = 1; + } else if(code == '.' && strchr(str, (int)'.') == NULL) { + ok = 1; + } else if(code == MwKEY_BACKSPACE || code == MwKEY_LEFT || code == MwKEY_RIGHT) { + ok = 1; + } + + if(ok) MwEntryClass->key(handle, code); +} + +static void mouse_move(MwWidget handle) { + MwEntry e = handle->internal; + int w = MwGetInteger(handle, MwNwidth); + if(handle->mouse_point.x >= (w - e->right)) { + MwLLSetCursor(handle->lowlevel, &MwCursorDefault, &MwCursorDefaultMask); + } else { + MwLLSetCursor(handle->lowlevel, &MwCursorText, &MwCursorTextMask); + } +} + +static void mouse_up(MwWidget handle, void* ptr) { + MwEntry e = handle->internal; + int w = MwGetInteger(handle, MwNwidth); + int h = MwGetInteger(handle, MwNheight); + const char* str = MwGetText(handle, MwNtext); + + if(((MwMouse*)ptr)->button != MwMOUSE_LEFT) return; + + if(e->mouse.x >= (w - e->right)) { + char s[512]; + if(e->mouse.y >= (h / 2)) { + MwStringPrintIntoBuffer(s, 512, "%g", atof(str) - 1); + } else { + MwStringPrintIntoBuffer(s, 512, "%g", atof(str) + 1); + } + MwSetText(handle, MwNtext, s); + + MwDispatchUserHandler(handle, MwNchangedHandler, NULL); + } + + MwForceRender(handle); +} + +static void mouse_down(MwWidget handle, void* ptr) { + MwEntry e = handle->internal; + + if(((MwMouse*)ptr)->button != MwMOUSE_LEFT) return; + + e->mouse = handle->mouse_point; + + MwForceRender(handle); +} + +static void prop_change(MwWidget handle, const char* prop) { + if(strcmp(prop, MwNtext) == 0) MwForceRender(handle); +} + +MwClassRec MwNumberEntryClassRec = { + wcreate, /* create */ + destroy, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + mouse_move, /* mouse_move */ + mouse_up, /* mouse_up */ + mouse_down, /* mouse_down */ + key, /* key */ + NULL, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwNumberEntryClass = &MwNumberEntryClassRec; diff --git a/widget/milsko/milskosrc/src/widget/opengl.c b/widget/milsko/milskosrc/src/widget/opengl.c new file mode 100644 index 0000000000..30a1cee896 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/opengl.c @@ -0,0 +1,685 @@ +#ifndef __APPLE__ + +#include + +#ifndef MW_OPENGL +#define MW_OPENGL_NO_INCLUDE +#endif +#include + +#ifdef MW_OPENGL +#ifdef USE_GDI +typedef HGLRC(WINAPI* MWwglCreateContext)(HDC); +typedef BOOL(WINAPI* MWwglMakeCurrent)(HDC, HGLRC); +typedef PROC(WINAPI* MWwglGetProcAddress)(LPCSTR); +typedef BOOL(WINAPI* MWwglDeleteContext)(HGLRC); + +typedef struct gdiopengl { + HDC dc; + HGLRC gl; + + void* lib; + + MWwglCreateContext wglCreateContext; + MWwglMakeCurrent wglMakeCurrent; + MWwglDeleteContext wglDeleteContext; + MWwglGetProcAddress wglGetProcAddress; +} gdiopengl_t; +#endif +#ifdef USE_X11 +typedef XVisualInfo* (*MWglXChooseVisual)(Display* dpy, int screen, + int* attribList); +typedef GLXContext (*MWglXCreateContext)(Display* dpy, XVisualInfo* vis, + GLXContext shareList, Bool direct); +typedef void (*MWglXDestroyContext)(Display* dpy, GLXContext ctx); +typedef Bool (*MWglXMakeCurrent)(Display* dpy, GLXDrawable drawable, + GLXContext ctx); +typedef void (*MWglXSwapBuffers)(Display* dpy, GLXDrawable drawable); +typedef void* (*MWglXGetProcAddress)(const GLubyte* procname); + +typedef struct x11opengl { + XVisualInfo* visual; + GLXContext gl; + + void* lib; + + MWglXChooseVisual glXChooseVisual; + MWglXCreateContext glXCreateContext; + MWglXDestroyContext glXDestroyContext; + MWglXMakeCurrent glXMakeCurrent; + MWglXSwapBuffers glXSwapBuffers; + MWglXGetProcAddress glXGetProcAddress; +} x11opengl_t; +#endif + +#ifdef USE_WAYLAND +#include +#include +#include +#include + +/* +Note that for Wayland we create a GBM buffer manually and handle blitting it ourselves instead of using wayland-egl. Doing this allows us greater freedom over event handling; wayland-egl constantly pumps events, making us have to add a weird exception to wayland.c to make this work. Doing this also allows us to clip the OpenGL widget, something that was harder (impossible) with egl wayland. +*/ +typedef struct waylandopengl { + EGLDisplay egl_display; + EGLContext egl_context; + EGLSurface egl_surface; + EGLConfig egl_config; + struct gbm_device* gbm; + struct gbm_surface* gbm_surface; + struct gbm_bo* previous_bo; + int drm_fd; + MwLLPixmap frontbuffer; + MwU8* frontbuffer_data; + + void* gllib; + void* gbmlib; + EGLBoolean (*eglGetConfigs)(EGLDisplay display, + EGLConfig* configs, + EGLint config_size, + EGLint* num_config); + EGLBoolean (*eglInitialize)(EGLDisplay display, + EGLint* major, + EGLint* minor); + EGLContext (*eglCreateContext)(EGLDisplay display, + EGLConfig config, + EGLContext share_context, + EGLint const* attrib_list); + EGLBoolean (*eglMakeCurrent)(EGLDisplay display, + EGLSurface draw, + EGLSurface read, + EGLContext context); + void* (*eglGetProcAddress)(char const* procname); + EGLBoolean (*eglSwapBuffers)(EGLDisplay display, + EGLSurface surface); + EGLBoolean (*eglSwapInterval)(EGLDisplay display, + EGLint interval); + EGLint (*eglGetError)(void); + EGLBoolean (*eglBindAPI)(EGLenum api); + EGLDisplay (*eglGetDisplay)(NativeDisplayType native_display); + EGLDisplay (*eglGetPlatformDisplay)(EGLenum platform, void* native_display, const EGLAttrib* attrib_list); + EGLSurface (*eglCreatePlatformWindowSurface)(EGLDisplay display, + EGLConfig config, + void* native_window, + EGLint const* attrib_list); + EGLBoolean (*eglChooseConfig)(EGLDisplay display, + EGLint const* attrib_list, + EGLConfig* configs, + EGLint config_size, + EGLint* num_config); + EGLBoolean (*eglGetConfigAttrib)(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint* value); + EGLBoolean (*eglDestroySurface)(EGLDisplay dpy, EGLSurface surface); + + struct gbm_device* (*gbm_create_device)(int fd); + struct gbm_surface* (*gbm_surface_create)(struct gbm_device* gbm, uint32_t width, uint32_t height, uint32_t format, uint32_t flags); + void (*gbm_surface_destroy)(struct gbm_surface* surface); + + struct gbm_bo* (*gbm_surface_lock_front_buffer)(struct gbm_surface* surface); + union gbm_bo_handle (*gbm_bo_get_handle)(struct gbm_bo* bo); + uint32_t (*gbm_bo_get_stride)(struct gbm_bo* bo); + uint32_t (*gbm_bo_get_width)(struct gbm_bo* bo); + uint32_t (*gbm_bo_get_height)(struct gbm_bo* bo); + void (*gbm_surface_release_buffer)(struct gbm_surface* surface, struct gbm_bo* bo); + void* (*gbm_bo_map)(struct gbm_bo* bo, uint32_t x, uint32_t y, uint32_t width, uint32_t height, uint32_t flags, uint32_t* stride, void** map_data); + void (*gbm_bo_unmap)(struct gbm_bo* bo, void* map_data); + +} waylandopengl_t; +#endif + +static int wcreate(MwWidget handle) { + void* r = NULL; + MwWidget w = handle; + +#ifdef USE_GDI + if(handle->lowlevel->common.type == MwLLBackendGDI) { + PIXELFORMATDESCRIPTOR pfd; + int pf; + gdiopengl_t* o = r = malloc(sizeof(*o)); + + memset(&pfd, 0, sizeof(pfd)); + pfd.nSize = sizeof(pfd); + pfd.nVersion = 1; + pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; + pfd.cDepthBits = 32; + pfd.cColorBits = 32; + + o->dc = GetDC(handle->lowlevel->gdi.hWnd); + + pf = ChoosePixelFormat(o->dc, &pfd); + SetPixelFormat(o->dc, pf, &pfd); + + o->lib = MwDynamicOpen("opengl32.dll"); + if(!o->lib) { + printf("Could not load OpenGL widget under WGL!\n"); + return 1; + } + +#define WGL_FUNC(x) \ + o->x = MwDynamicSymbol(o->lib, #x); \ + if(o->x == NULL) { \ + printf("Could not load OpenGL widget under WGL! " #x " missing.\n"); \ + return 1; \ + } + + WGL_FUNC(wglCreateContext); + WGL_FUNC(wglMakeCurrent); + WGL_FUNC(wglDeleteContext); + WGL_FUNC(wglGetProcAddress); + + o->gl = o->wglCreateContext(o->dc); + } +#endif +#ifdef USE_X11 + if(handle->lowlevel->common.type == MwLLBackendX11) { + int attribs[5]; + const char* glpath[] = {"libGL.so", "/usr/local/lib/libGL.so", + "/usr/X11R7/lib/libGL.so", "/usr/pkg/lib/libGL.so"}; + int glincr = 0; + x11opengl_t* o = r = malloc(sizeof(*o)); + + attribs[0] = GLX_RGBA; + attribs[1] = GLX_DOUBLEBUFFER; + attribs[2] = GLX_DEPTH_SIZE; + attribs[3] = 24; + attribs[4] = None; + + while(glpath[glincr] != NULL && + (o->lib = MwDynamicOpen(glpath[glincr++])) == NULL); + + o->glXChooseVisual = + (MWglXChooseVisual)MwDynamicSymbol(o->lib, "glXChooseVisual"); + o->glXCreateContext = + (MWglXCreateContext)MwDynamicSymbol(o->lib, "glXCreateContext"); + o->glXDestroyContext = + (MWglXDestroyContext)MwDynamicSymbol(o->lib, "glXDestroyContext"); + o->glXMakeCurrent = + (MWglXMakeCurrent)MwDynamicSymbol(o->lib, "glXMakeCurrent"); + o->glXSwapBuffers = + (MWglXSwapBuffers)MwDynamicSymbol(o->lib, "glXSwapBuffers"); + o->glXGetProcAddress = + (MWglXGetProcAddress)MwDynamicSymbol(o->lib, "glXGetProcAddress"); + + /* XXX: fix this */ + o->visual = o->glXChooseVisual(handle->lowlevel->x11.display, + DefaultScreen(handle->lowlevel->x11.display), + attribs); + o->gl = o->glXCreateContext(handle->lowlevel->x11.display, o->visual, NULL, + GL_TRUE); + } +#endif +#ifdef USE_WAYLAND + if(handle->lowlevel->common.type == MwLLBackendWayland) { + EGLint numConfigs; + EGLint numConfigsMatched; + EGLint majorVersion; + EGLint minorVersion; + EGLContext context; + EGLSurface surface; + EGLint fbAttribs[] = {EGL_SURFACE_TYPE, + EGL_WINDOW_BIT, + EGL_RENDERABLE_TYPE, + EGL_OPENGL_BIT, + EGL_RED_SIZE, + 8, + EGL_GREEN_SIZE, + 8, + EGL_BLUE_SIZE, + 8, + EGL_DEPTH_SIZE, + 24, + EGL_NONE}; + EGLint contextAttribs[] = {EGL_CONTEXT_CLIENT_VERSION, + 1, + EGL_CONTEXT_MAJOR_VERSION, + 1, + EGL_CONTEXT_MINOR_VERSION, + 1, + EGL_NONE}; + EGLDisplay display; + waylandopengl_t* o = r = malloc(sizeof(*o)); + int gbm_format = 0; + EGLConfig egl_configs[1024]; + memset(o, 0, sizeof(waylandopengl_t)); + + o->gllib = MwDynamicOpen("libEGL.so"); + if(!o->gllib) { + printf("Could not load OpenGL widget under Wayland! libEGL.so missing.\n"); + return 1; + } + o->gbmlib = MwDynamicOpen("libgbm.so"); + if(!o->gbmlib) { + printf("Could not load OpenGL widget under Wayland! libgbm.so missing.\n"); + return 1; + } +#define EGL_FUNC(x) \ + o->x = MwDynamicSymbol(o->gllib, #x); \ + if(!o->x) { \ + printf("Could not load OpenGL widget under Wayland! " #x " missing.\n"); \ + return 1; \ + }; +#define GBM_FUNC(x) \ + o->x = MwDynamicSymbol(o->gbmlib, #x); \ + if(!o->x) { \ + printf("Could not load OpenGL widget under Wayland! " #x " missing.\n"); \ + return 1; \ + }; + EGL_FUNC(eglGetConfigs) + EGL_FUNC(eglInitialize) + EGL_FUNC(eglCreateContext) + EGL_FUNC(eglMakeCurrent) + EGL_FUNC(eglGetProcAddress) + EGL_FUNC(eglSwapBuffers) + EGL_FUNC(eglSwapInterval) + EGL_FUNC(eglGetError) + EGL_FUNC(eglBindAPI) + EGL_FUNC(eglGetDisplay) + EGL_FUNC(eglCreatePlatformWindowSurface) + EGL_FUNC(eglChooseConfig) + EGL_FUNC(eglGetPlatformDisplay) + EGL_FUNC(eglGetConfigAttrib) + EGL_FUNC(eglDestroySurface) + GBM_FUNC(gbm_create_device) + GBM_FUNC(gbm_surface_create) + GBM_FUNC(gbm_surface_destroy) + GBM_FUNC(gbm_surface_lock_front_buffer) + GBM_FUNC(gbm_bo_get_handle) + GBM_FUNC(gbm_bo_get_stride) + GBM_FUNC(gbm_bo_get_width) + GBM_FUNC(gbm_bo_get_height) + GBM_FUNC(gbm_surface_release_buffer) + GBM_FUNC(gbm_bo_map) + GBM_FUNC(gbm_bo_unmap) + +#define eglGetConfigs o->eglGetConfigs +#define eglInitialize o->eglInitialize +#define eglCreateContext o->eglCreateContext +#define eglMakeCurrent o->eglMakeCurrent +#define eglGetProcAddress o->eglGetProcAddress +#define eglSwapBuffers o->eglSwapBuffers +#define eglSwapInterval o->eglSwapInterval +#define eglGetError o->eglGetError +#define eglBindAPI o->eglBindAPI +#define eglGetDisplay o->eglGetDisplay +#define eglCreatePlatformWindowSurface o->eglCreatePlatformWindowSurface +#define eglDestroySurface o->eglDestroySurface +#define eglChooseConfig o->eglChooseConfig +#define eglGetPlatformDisplay o->eglGetPlatformDisplay + + o->drm_fd = open("/dev/dri/renderD128", O_RDWR); + assert(o->drm_fd > 0); + o->gbm = o->gbm_create_device(o->drm_fd); + assert(o->gbm != NULL); + + display = eglGetPlatformDisplay(0x31D7, o->gbm, NULL); + if(display == EGL_NO_DISPLAY) { + printf("ERROR: eglGetDisplay, %0X\n", eglGetError()); + return 1; + } + + /* Initialize EGL */ + if(!eglInitialize(display, &majorVersion, &minorVersion)) { + printf("ERROR: eglInitialize, %0X\n", eglGetError()); + return 1; + } + + eglBindAPI(EGL_OPENGL_API); + + /* Get configs */ + if((eglGetConfigs(display, NULL, 0, &numConfigs) != EGL_TRUE)) { + printf("ERROR: eglGetConfigs, %0X\n", eglGetError()); + return 1; + } + + /* Choose config */ + if((eglChooseConfig(display, fbAttribs, egl_configs, numConfigs, &numConfigsMatched) != + EGL_TRUE)) { + printf("ERROR: eglChooseConfig, %0X\n", eglGetError()); + return 1; + } + + for(int i = 0; i < numConfigsMatched; i++) { + if(o->eglGetConfigAttrib(display, egl_configs[i], + EGL_NATIVE_VISUAL_ID, + &gbm_format) == EGL_FALSE) { + printf("ERROR: eglGetConfigAttrib, %0X\n", eglGetError()); + } else { + if(gbm_format == GBM_FORMAT_ARGB8888) { + o->egl_config = egl_configs[i]; + break; + } + } + } + + /* Create a GL context */ + context = eglCreateContext(display, o->egl_config, EGL_NO_CONTEXT, + contextAttribs); + if(context == EGL_NO_CONTEXT) { + printf("ERROR: eglCreateContext, %0X\n", eglGetError()); + return 1; + } + + o->gbm_surface = o->gbm_surface_create(o->gbm, handle->lowlevel->wayland.ww, handle->lowlevel->wayland.wh, GBM_FORMAT_ARGB8888, GBM_BO_USE_LINEAR | GBM_BO_USE_RENDERING); + + /* Create a surface */ + surface = eglCreatePlatformWindowSurface(display, o->egl_config, + o->gbm_surface, NULL); + if(surface == EGL_NO_SURFACE) { + printf("ERROR: eglCreatePlatformWindowSurface, %0X\n", eglGetError()); + return 1; + } + + if(!eglMakeCurrent(display, surface, surface, context)) { + printf("ERROR: eglMakeCurrent (setup): %0X\n", eglGetError()); + } + + o->frontbuffer_data = malloc(handle->lowlevel->wayland.ww * handle->lowlevel->wayland.wh * 4); + memset(o->frontbuffer_data, 255, handle->lowlevel->wayland.ww * handle->lowlevel->wayland.wh * 4); + + o->frontbuffer = MwLoadRaw(handle, o->frontbuffer_data, handle->lowlevel->wayland.ww, handle->lowlevel->wayland.wh); + + MwVaApply(handle, MwNpixmap, o->frontbuffer, NULL); + + o->egl_display = display; + o->egl_surface = surface; + o->egl_context = context; + } +#endif + + handle->internal = r; + handle->lowlevel->common.copy_buffer = 0; + + MwSetDefault(handle); + + while(w->parent != NULL) + w = w->parent; + + w->berserk++; + + return 0; +} + +static void destroy(MwWidget handle) { + MwWidget w = handle; + +#ifdef USE_GDI + if(handle->lowlevel->common.type == MwLLBackendGDI) { + gdiopengl_t* o = handle->internal; + + o->wglMakeCurrent(NULL, NULL); + DeleteDC(o->dc); + o->wglDeleteContext(o->gl); + + MwDynamicClose(o->lib); + } +#endif +#ifdef USE_X11 + if(handle->lowlevel->common.type == MwLLBackendX11) { + x11opengl_t* o = handle->internal; + + o->glXMakeCurrent(handle->lowlevel->x11.display, None, NULL); + o->glXDestroyContext(handle->lowlevel->x11.display, o->gl); + + MwDynamicClose(o->lib); + } +#endif +#ifdef USE_WAYLAND + if(handle->lowlevel->common.type == MwLLBackendWayland) { + /* todo */ + } +#endif + + while(w->parent != NULL) + w = w->parent; + + w->berserk--; + + free(handle->internal); +} + +static void mwOpenGLMakeCurrentImpl(MwWidget handle) { + /* these swap interval functions belonging here actually stink! */ + +#ifdef USE_GDI + if(handle->lowlevel->common.type == MwLLBackendGDI) { + gdiopengl_t* o = handle->internal; + BOOL(APIENTRY * swap_interval_ext)(int) = NULL; + + o->wglMakeCurrent(o->dc, o->gl); + + if((swap_interval_ext = + MwOpenGLGetProcAddress(handle, "wglSwapIntervalEXT")) != NULL) { + swap_interval_ext(1); + } + } +#endif +#ifdef USE_X11 + if(handle->lowlevel->common.type == MwLLBackendX11) { + x11opengl_t* o = handle->internal; + void (*swap_interval_ext)(Display*, GLXDrawable, int) = NULL; + void (*swap_interval_mesa)(unsigned int) = NULL; + void (*swap_interval_sgi)(int) = NULL; + + o->glXMakeCurrent(handle->lowlevel->x11.display, + handle->lowlevel->x11.window, o->gl); + + if((swap_interval_ext = + MwOpenGLGetProcAddress(handle, "glXSwapIntervalEXT")) != NULL) { + swap_interval_ext(handle->lowlevel->x11.display, + handle->lowlevel->x11.window, 1); + } + + if((swap_interval_mesa = + MwOpenGLGetProcAddress(handle, "glXSwapIntervalMESA")) != NULL) { + swap_interval_mesa(1); + } + + if((swap_interval_sgi = + MwOpenGLGetProcAddress(handle, "glXSwapIntervalSGI")) != NULL) { + swap_interval_sgi(1); + } + } +#endif +#ifdef USE_WAYLAND + if(handle->lowlevel->common.type == MwLLBackendWayland) { + waylandopengl_t* o = handle->internal; + + if(!eglMakeCurrent(o->egl_display, o->egl_surface, o->egl_surface, + o->egl_context)) { + printf("ERROR: eglMakeCurrent, %0X\n", eglGetError()); + } + + MwLLForceRender(handle->lowlevel); + } +#endif +} + +static void mwOpenGLSwapBufferImpl(MwWidget handle) { +#ifdef USE_GDI + if(handle->lowlevel->common.type == MwLLBackendGDI) { + gdiopengl_t* o = handle->internal; + + SwapBuffers(o->dc); + } +#endif +#ifdef USE_X11 + if(handle->lowlevel->common.type == MwLLBackendX11) { + x11opengl_t* o = handle->internal; + + o->glXSwapBuffers(handle->lowlevel->x11.display, + handle->lowlevel->x11.window); + } +#endif +#ifdef USE_WAYLAND + if(handle->lowlevel->common.type == MwLLBackendWayland) { + waylandopengl_t* o = handle->internal; + struct gbm_bo* bo; + eglSwapInterval(o->egl_display, 0); + if(!eglSwapBuffers(o->egl_display, o->egl_surface)) { + printf("ERROR: eglSwapBuffers, %0X\n", eglGetError()); + } + bo = o->gbm_surface_lock_front_buffer(o->gbm_surface); + if(bo) { + void* gbmBoMapData = NULL; // Needed for unmapping if gbm_bo_map is used + MwU32 width = o->gbm_bo_get_width(bo); + MwU32 height = o->gbm_bo_get_height(bo); + MwU32 stride = o->gbm_bo_get_stride(bo); + void* map = o->gbm_bo_map(bo, 0, 0, width, height, GBM_BO_TRANSFER_READ, &stride, &gbmBoMapData); + MwU32 size = height * stride; + + if(map) { + for(int y = 0; y < height; y++) { + const MwU8* row = map + y * stride; + for(int x = 0; x < width; x++) { + /* Memory layout per pixel: [B][G][R][A] */ + MwU8 b = row[x * 4 + 0]; + MwU8 g = row[x * 4 + 1]; + MwU8 r = row[x * 4 + 2]; + + int out = (y * width + x) * 4; + o->frontbuffer_data[out + 0] = r; + o->frontbuffer_data[out + 1] = g; + o->frontbuffer_data[out + 2] = b; + o->frontbuffer_data[out + 3] = 255; + } + } + + MwPixmapReloadRaw( + o->frontbuffer, o->frontbuffer_data); + } + o->gbm_bo_unmap(bo, gbmBoMapData); + } + if(o->previous_bo) { + o->gbm_surface_release_buffer(o->gbm_surface, o->previous_bo); + } + o->previous_bo = bo; + + MwForceRender(handle); + } +#endif +} + +static void* mwOpenGLGetProcAddressImpl(MwWidget handle, const char* name) { +#ifdef USE_GDI + if(handle->lowlevel->common.type == MwLLBackendGDI) { + gdiopengl_t* o = handle->internal; + + return o->wglGetProcAddress(name); + } +#endif +#ifdef USE_X11 + if(handle->lowlevel->common.type == MwLLBackendX11) { + x11opengl_t* o = handle->internal; + + return o->glXGetProcAddress((const GLubyte*)name); + } +#endif +#ifdef USE_WAYLAND + if(handle->lowlevel->common.type == MwLLBackendWayland) { + waylandopengl_t* o = handle->internal; + return eglGetProcAddress(name); + } +#endif + return NULL; +} + +static void func_handler(MwWidget handle, const char* name, void* out, + va_list va) { + if(strcmp(name, "mwOpenGLMakeCurrent") == 0) { + mwOpenGLMakeCurrentImpl(handle); + } + if(strcmp(name, "mwOpenGLSwapBuffer") == 0) { + mwOpenGLSwapBufferImpl(handle); + } + if(strcmp(name, "mwOpenGLGetProcAddress") == 0) { + const char* _name = va_arg(va, const char*); + *(void**)out = mwOpenGLGetProcAddressImpl(handle, _name); + } +} + +#ifdef USE_WAYLAND +static void frontbuffer_draw(MwWidget handle) { + if(handle->lowlevel->common.type == MwLLBackendWayland) { + waylandopengl_t* o = handle->internal; + MwRect r; + r.x = 0; + r.y = 0; + r.width = handle->lowlevel->wayland.ww; + r.height = handle->lowlevel->wayland.wh; + MwLLDrawPixmap(handle->lowlevel, &r, o->frontbuffer); + } +} +static void frontbuffer_resize(MwWidget handle) { + if(handle->lowlevel->common.type == MwLLBackendWayland) { + waylandopengl_t* o = handle->internal; + if(o->frontbuffer_data) { + free(o->frontbuffer_data); + } + if(o->frontbuffer) { + MwLLDestroyPixmap(o->frontbuffer); + } + if(o->gbm_surface) { + o->gbm_surface_destroy(o->gbm_surface); + } + if(o->egl_surface) { + eglDestroySurface(o->egl_display, o->egl_surface); + } + + o->gbm_surface = o->gbm_surface_create(o->gbm, handle->lowlevel->wayland.ww, handle->lowlevel->wayland.wh, GBM_FORMAT_ARGB8888, GBM_BO_USE_LINEAR | GBM_BO_USE_RENDERING); + + /* Create a surface */ + o->egl_surface = eglCreatePlatformWindowSurface(o->egl_display, o->egl_config, + o->gbm_surface, NULL); + if(o->egl_surface == EGL_NO_SURFACE) { + printf("ERROR: eglCreatePlatformWindowSurface, %0X\n", eglGetError()); + } else { + } + + if(!eglMakeCurrent(o->egl_display, o->egl_surface, o->egl_surface, o->egl_context)) { + printf("ERROR: eglMakeCurrent (setup): %0X\n", eglGetError()); + } + + o->frontbuffer_data = malloc(handle->lowlevel->wayland.ww * handle->lowlevel->wayland.wh * 4); + memset(o->frontbuffer_data, 255, handle->lowlevel->wayland.ww * handle->lowlevel->wayland.wh * 4); + + o->frontbuffer = MwLoadRaw(handle, o->frontbuffer_data, handle->lowlevel->wayland.ww, handle->lowlevel->wayland.wh); + + MwVaApply(handle, MwNpixmap, o->frontbuffer, NULL); + } +} +#endif + +MwClassRec MwOpenGLClassRec = {wcreate, /* create */ + destroy, /* destroy */ +#ifdef USE_WAYLAND + frontbuffer_draw, /* draw */ +#else + NULL, /* draw */ +#endif + NULL, /* click */ + NULL, /* parent_resize */ + NULL, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + func_handler, /* execute */ + NULL, /* tick */ +#ifdef USE_WAYLAND + frontbuffer_resize, /* resize */ +#else + NULL, /* resize */ +#endif + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, NULL, NULL}; +MwClass MwOpenGLClass = &MwOpenGLClassRec; +#else +MWDECL MwClass MwOpenGLClass; + +MwClass MwOpenGLClass = NULL; +#endif + +#endif diff --git a/widget/milsko/milskosrc/src/widget/opengl_cocoa.m b/widget/milsko/milskosrc/src/widget/opengl_cocoa.m new file mode 100644 index 0000000000..a4d2bfa2f7 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/opengl_cocoa.m @@ -0,0 +1,131 @@ +#include "Mw/BaseTypes.h" +#include "Mw/Core.h" +#include "Mw/LowLevel/Cocoa.h" +#include "Mw/StringDefs.h" +#include +#include +#import + +@interface MacOpenGLWidget : NSObject { + NSOpenGLPixelFormat* pixelFormat; + NSOpenGLContext* glc; + MilskoCocoa* _win; +} + +- (MacOpenGLWidget*)initWithWindow:(MilskoCocoa*)w; +- (void)destroy; +- (void)makeCurrent; +- (void)swapBuffer; +- (void*)getProcAddressWithName:(const char*)name; + +@end + +static int wcreate(MwWidget handle) { + void* r = NULL; + MwWidget w = handle; + + int x = MwGetInteger(w, MwNx); + int y = MwGetInteger(w, MwNy); + int width = MwGetInteger(w, MwNwidth); + int height = MwGetInteger(w, MwNheight); + + printf("%d %d\n", width, height); + + handle->internal = + [[MacOpenGLWidget alloc] initWithWindow:handle->lowlevel->cocoa.real]; + handle->lowlevel->common.copy_buffer = 0; + + MwSetDefault(handle); + + while(w->parent != NULL) + w = w->parent; + + w->berserk++; + + return 0; +} + +static void destroy(MwWidget handle) { + [(MacOpenGLWidget*)handle->internal destroy]; +} + +static void mwOpenGLMakeCurrentImpl(MwWidget handle) { + [(MacOpenGLWidget*)handle->internal makeCurrent]; +} + +static void mwOpenGLSwapBufferImpl(MwWidget handle) { + [(MacOpenGLWidget*)handle->internal swapBuffer]; +} + +static void* mwOpenGLGetProcAddressImpl(MwWidget handle, const char* name) { + return [(MacOpenGLWidget*)handle->internal getProcAddressWithName:name]; +} + +static void func_handler(MwWidget handle, const char* name, void* out, + va_list va) { + if(strcmp(name, "mwOpenGLMakeCurrent") == 0) { + mwOpenGLMakeCurrentImpl(handle); + } + if(strcmp(name, "mwOpenGLSwapBuffer") == 0) { + mwOpenGLSwapBufferImpl(handle); + } + if(strcmp(name, "mwOpenGLGetProcAddress") == 0) { + const char* _name = va_arg(va, const char*); + *(void**)out = mwOpenGLGetProcAddressImpl(handle, _name); + } +} + +@implementation MacOpenGLWidget + +- (MacOpenGLWidget*)initWithWindow:(MilskoCocoa*)w { + NSOpenGLPixelFormatAttribute pixelFormatAttributes[] = { + NSOpenGLPFAColorSize, 24, + NSOpenGLPFAStencilSize, 8, + NSOpenGLPFAAlphaSize, 8, + NSOpenGLPFADoubleBuffer, NSOpenGLPFAAccelerated, + NSOpenGLPFANoRecovery, 0}; + self->pixelFormat = + [[NSOpenGLPixelFormat alloc] initWithAttributes:pixelFormatAttributes]; + self->glc = + [[NSOpenGLContext alloc] initWithFormat:pixelFormat + shareContext:nil]; + [self->glc setView:[w getView]]; + self->_win = w; + return self; +}; +- (void)destroy { +}; +- (void)makeCurrent { + [self->glc makeCurrentContext]; +}; +- (void)swapBuffer { + [self->glc flushBuffer]; +}; +- (void*)getProcAddressWithName:(const char*)name { + if(NSIsSymbolNameDefined(name)) { + return NSAddressOfSymbol(NSLookupAndBindSymbol(name)); + } else { + return NULL; + } +}; + +@end + +MwClassRec MwOpenGLClassRec = {wcreate, /* create */ + destroy, /* destroy */ + NULL, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + NULL, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + func_handler, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, NULL, NULL, NULL}; +MwClass MwOpenGLClass = &MwOpenGLClassRec; diff --git a/widget/milsko/milskosrc/src/widget/progressbar.c b/widget/milsko/milskosrc/src/widget/progressbar.c new file mode 100644 index 0000000000..3185c233b8 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/progressbar.c @@ -0,0 +1,69 @@ +#include + +static int wcreate(MwWidget handle) { + MwSetDefault(handle); + MwVaApply(handle, + MwNminValue, 0, + MwNmaxValue, 100, + MwNvalue, 0, + NULL); + + return 0; +} + +static void draw(MwWidget handle) { + MwRect r; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor fill = MwParseColor(handle, MwGetText(handle, MwNforeground)); + double w; + MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap); + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + + w = MwGetInteger(handle, MwNvalue) - MwGetInteger(handle, MwNminValue); + w = w / (MwGetInteger(handle, MwNmaxValue) - MwGetInteger(handle, MwNminValue)); + + MwDrawWidgetBack(handle, &r, base, 1, MwDEFAULT); + if(bgpx != NULL) MwLLDrawPixmap(handle->lowlevel, &r, bgpx); + + r.x += MwDefaultBorderWidth(handle); + r.y += MwDefaultBorderWidth(handle); + r.width -= MwDefaultBorderWidth(handle) * 2; + r.height -= MwDefaultBorderWidth(handle) * 2; + + r.width = r.width * w; + MwDrawRect(handle, &r, fill); + + MwLLFreeColor(fill); + MwLLFreeColor(base); +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNminValue) == 0 || strcmp(key, MwNmaxValue) == 0 || strcmp(key, MwNvalue) == 0) MwForceRender(handle); +} + +MwClassRec MwProgressBarClassRec = { + wcreate, /* create */ + NULL, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + NULL, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwProgressBarClass = &MwProgressBarClassRec; diff --git a/widget/milsko/milskosrc/src/widget/radiobox.c b/widget/milsko/milskosrc/src/widget/radiobox.c new file mode 100644 index 0000000000..c93e054b4f --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/radiobox.c @@ -0,0 +1,78 @@ +#include + +#include "../../external/stb_ds.h" + +static int wcreate(MwWidget handle) { + MwSetDefault(handle); + + MwSetInteger(handle, MwNchecked, 0); + + return 0; +} + +static void draw(MwWidget handle) { + MwRect r; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap); + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + MwDrawRect(handle, &r, base); + if(bgpx != NULL) MwLLDrawPixmap(handle->lowlevel, &r, bgpx); + + if(r.width < r.height) { + r.height = r.width; + } else { + r.width = r.height; + } + r.x = (MwGetInteger(handle, MwNwidth) - r.width) / 2; + r.y = (MwGetInteger(handle, MwNheight) - r.height) / 2; + + MwDrawDiamond(handle, &r, base, (handle->pressed || MwGetInteger(handle, MwNchecked)) ? 1 : 0); + + MwLLFreeColor(base); +} + +static void click(MwWidget handle) { + if(!MwGetInteger(handle, MwNchecked)) MwSetInteger(handle, MwNchecked, 1); + if(MwGetInteger(handle, MwNchecked) && handle->parent != NULL) { + int i; + for(i = 0; i < arrlen(handle->parent->children); i++) { + MwWidget w = handle->parent->children[i]; + if(w != handle && w->widget_class == MwRadioBoxClass && MwGetInteger(w, MwNchecked)) { + MwSetInteger(w, MwNchecked, 0); + } + } + } + + MwDispatchUserHandler(handle, MwNchangedHandler, NULL); +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNchecked) == 0) MwForceRender(handle); +} + +MwClassRec MwRadioBoxClassRec = { + wcreate, /* create */ + NULL, /* destroy */ + draw, /* draw */ + click, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + MwForceRender2, /* mouse_up */ + MwForceRender2, /* mouse_down */ + NULL, /* key */ + NULL, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwRadioBoxClass = &MwRadioBoxClassRec; diff --git a/widget/milsko/milskosrc/src/widget/scrollbar.c b/widget/milsko/milskosrc/src/widget/scrollbar.c new file mode 100644 index 0000000000..346f818aba --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/scrollbar.c @@ -0,0 +1,280 @@ +#include + +static int wcreate(MwWidget handle) { + MwScrollBar scr = malloc(sizeof(*scr)); + + handle->internal = scr; + + MwSetDefault(handle); + MwVaApply(handle, + MwNminValue, 0, + MwNmaxValue, 100, + MwNvalue, 0, + MwNareaShown, 50, + MwNorientation, MwVERTICAL, + MwNshowArrows, 1, + NULL); + + return 0; +} + +static void destroy(MwWidget handle) { + free(handle->internal); +} + +static int calc_length(MwWidget handle) { + int max = MwScrollBarGetVisibleLength(handle); + int len = MwGetInteger(handle, MwNmaxValue) - MwGetInteger(handle, MwNminValue); + int area = MwGetInteger(handle, MwNareaShown); + if(area > len) area = len; + + return max * (double)area / len; +} + +static int calc_position(MwWidget handle) { + int max = MwScrollBarGetVisibleLength(handle); + int len = MwGetInteger(handle, MwNmaxValue) - MwGetInteger(handle, MwNminValue); + int val = MwGetInteger(handle, MwNvalue); + + return (max - calc_length(handle)) * (double)val / len; +} + +static void add_value(MwWidget handle, int mul) { + int val = MwGetInteger(handle, MwNvalue); + int min = MwGetInteger(handle, MwNminValue); + int max = MwGetInteger(handle, MwNmaxValue); + + val += mul * MwGetInteger(handle, MwNareaShown); + + if(val < min) val = min; + if(val > max) val = max; + + MwSetInteger(handle, MwNvalue, val); + MwDispatchUserHandler(handle, MwNchangedHandler, NULL); +} + +static void draw(MwWidget handle) { + MwRect r, rt, rbar; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor dark = MwLightenColor(handle, base, -64, -64, -64); + MwScrollBar scr = handle->internal; + int or ; + int uy, dy, ux, dx; + MwLLPixmap bgpx = MwGetVoid(handle, MwNbackgroundPixmap); + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + + uy = r.width; + dy = r.height - r.width; + + ux = r.height; + dx = r.width - r.height; + + MwDrawWidgetBack(handle, &r, dark, 1, MwDEFAULT); + if(bgpx != NULL) MwLLDrawPixmap(handle->lowlevel, &r, bgpx); + + rt = r; + + or = MwGetInteger(handle, MwNorientation); + if(or == MwVERTICAL) { + rt.height = rt.width; + + rt.y = r.y; + if(MwGetInteger(handle, MwNshowArrows)) { + MwDrawTriangle(handle, &rt, base, (handle->pressed && scr->point.y <= uy) ? 1 : 0, MwNORTH); + if(handle->pressed && scr->point.y <= uy) { + add_value(handle, -1); + } + } else { + rt.height = 0; + } + + rbar.width = r.width; + rbar.height = calc_length(handle); + rbar.x = r.x; + rbar.y = r.y + rt.height + calc_position(handle); + + rt.y = r.y + r.height - rt.height; + if(MwGetInteger(handle, MwNshowArrows)) { + MwDrawTriangle(handle, &rt, base, (handle->pressed && scr->point.y >= dy) ? 1 : 0, MwSOUTH); + if(handle->pressed && scr->point.y >= dy) { + add_value(handle, 1); + } + } + } else if(or == MwHORIZONTAL) { + rt.width = rt.height; + + rt.x = r.x; + if(MwGetInteger(handle, MwNshowArrows)) { + MwDrawTriangle(handle, &rt, base, (handle->pressed && scr->point.x <= ux) ? 1 : 0, MwWEST); + if(handle->pressed && scr->point.x <= ux) { + add_value(handle, -1); + } + } else { + rt.width = 0; + } + + rbar.width = calc_length(handle); + rbar.height = r.height; + rbar.x = r.x + rt.width + calc_position(handle); + rbar.y = r.y; + + rt.x = r.x + r.width - rt.width; + if(MwGetInteger(handle, MwNshowArrows)) { + MwDrawTriangle(handle, &rt, base, (handle->pressed && scr->point.x >= dx) ? 1 : 0, MwEAST); + if(handle->pressed && scr->point.x >= dx) { + add_value(handle, 1); + } + } + } + + if(rbar.height >= 0) MwDrawWidgetBack(handle, &rbar, base, 0, MwDEFAULT); + + MwLLFreeColor(dark); + MwLLFreeColor(base); +} + +static void mouse_move(MwWidget handle) { + int or = MwGetInteger(handle, MwNorientation); + MwScrollBar scr = handle->internal; + + if(!handle->pressed) return; + + if(scr->drag) { + int l = 0; + double len = MwScrollBarGetVisibleLength(handle) - calc_length(handle); + int min = MwGetInteger(handle, MwNminValue); + int max = MwGetInteger(handle, MwNmaxValue); + + if(or == MwVERTICAL) { + l = handle->mouse_point.y + scr->pos; + } else if(or == MwHORIZONTAL) { + l = handle->mouse_point.x + scr->pos; + } + + len = l / len; + if(len < 0) len = 0; + if(len > 1) len = 1; + MwSetInteger(handle, MwNvalue, (int)((max - min) * len - min)); + MwDispatchUserHandler(handle, MwNchangedHandler, NULL); + + MwForceRender(handle); + } +} + +static void mouse_down(MwWidget handle, void* ptr) { + int ww = MwGetInteger(handle, MwNwidth); + int wh = MwGetInteger(handle, MwNheight); + int or = MwGetInteger(handle, MwNorientation); + MwScrollBar scr = handle->internal; + MwMouse* m = ptr; + + if(m->button == MwMOUSE_WHEELUP) { + int min = MwGetInteger(handle, MwNminValue); + int val = MwGetInteger(handle, MwNvalue); + int diff = MwGetInteger(handle, MwNareaShown); + + val -= diff; + + if(val < min) val = min; + + MwSetInteger(handle, MwNvalue, val); + MwSetInteger(handle, MwNchangedBy, -diff); + MwDispatchUserHandler(handle, MwNchangedHandler, NULL); + } else if(m->button == MwMOUSE_WHEELDOWN) { + int max = MwGetInteger(handle, MwNmaxValue); + int val = MwGetInteger(handle, MwNvalue); + int diff = MwGetInteger(handle, MwNareaShown); + + val += diff; + + if(val > max) val = max; + + MwSetInteger(handle, MwNvalue, val); + MwSetInteger(handle, MwNchangedBy, diff); + MwDispatchUserHandler(handle, MwNchangedHandler, NULL); + } + if(m->button != MwMOUSE_LEFT) return; + + scr->point = handle->mouse_point; + scr->drag = 0; + if(or == MwVERTICAL) { + int tri = (ww - MwDefaultBorderWidth(handle) * 2) + MwDefaultBorderWidth(handle); + if(!MwGetInteger(handle, MwNshowArrows)) tri = 0; + if(tri <= scr->point.y && scr->point.y <= (wh - tri)) { + scr->drag = 1; + scr->pos = calc_position(handle) - scr->point.y; + } + } else if(or == MwHORIZONTAL) { + int tri = (wh - MwDefaultBorderWidth(handle) * 2) + MwDefaultBorderWidth(handle); + if(!MwGetInteger(handle, MwNshowArrows)) tri = 0; + if(tri <= scr->point.x && scr->point.x <= (ww - tri)) { + scr->drag = 1; + scr->pos = calc_position(handle) - scr->point.x; + } + } + + MwForceRender(handle); +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNminValue) == 0 || strcmp(key, MwNvalue) == 0 || strcmp(key, MwNmaxValue) == 0) { + if(MwGetInteger(handle, MwNvalue) > MwGetInteger(handle, MwNmaxValue)) MwSetInteger(handle, MwNvalue, MwGetInteger(handle, MwNmaxValue)); + MwForceRender(handle); + } + if(strcmp(key, MwNshowArrows) == 0 || strcmp(key, MwNareaShown) == 0) { + MwForceRender(handle); + } +} + +static int mwScrollBarGetVisibleLengthImpl(MwWidget handle) { + int ww = MwGetInteger(handle, MwNwidth); + int wh = MwGetInteger(handle, MwNheight); + int or = MwGetInteger(handle, MwNorientation); + int tri = 0; + int s = 0; + + if(or == MwVERTICAL) { + tri = (ww - MwDefaultBorderWidth(handle) * 2) * 2; + s = wh; + } else if(or == MwHORIZONTAL) { + tri = (wh - MwDefaultBorderWidth(handle) * 2) * 2; + s = ww; + } + if(!MwGetInteger(handle, MwNshowArrows)) tri = 0; + return s - tri - MwDefaultBorderWidth(handle) * 2; +} + +static void func_handler(MwWidget handle, const char* name, void* out, va_list va) { + (void)va; + + if(strcmp(name, "mwScrollBarGetVisibleLength") == 0) { + *(int*)out = mwScrollBarGetVisibleLengthImpl(handle); + } +} + +MwClassRec MwScrollBarClassRec = { + wcreate, /* create */ + destroy, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + mouse_move, /* mouse_move */ + MwForceRender2, /* mouse_up */ + mouse_down, /* mouse_down */ + NULL, /* key */ + func_handler, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwScrollBarClass = &MwScrollBarClassRec; diff --git a/widget/milsko/milskosrc/src/widget/separator.c b/widget/milsko/milskosrc/src/widget/separator.c new file mode 100644 index 0000000000..4e70ccc7b5 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/separator.c @@ -0,0 +1,58 @@ +#include + +static int wcreate(MwWidget handle) { + MwSetDefault(handle); + + MwSetInteger(handle, MwNorientation, MwHORIZONTAL); + + return 0; +} + +static void draw(MwWidget handle) { + MwRect r; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + MwDrawRect(handle, &r, base); + + if(MwGetInteger(handle, MwNorientation) == MwVERTICAL) { + r.x = (r.width - 2) / 2; + r.width = 2; + } else if(MwGetInteger(handle, MwNorientation) == MwHORIZONTAL) { + r.y = (r.height - 2) / 2; + r.height = 2; + } + MwDrawFrameEx(handle, &r, base, 1, 1, 0, 0); + + MwLLFreeColor(base); +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNorientation) == 0) MwForceRender(handle); +} + +MwClassRec MwSeparatorClassRec = { + wcreate, /* create */ + NULL, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + NULL, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwSeparatorClass = &MwSeparatorClassRec; diff --git a/widget/milsko/milskosrc/src/widget/submenu.c b/widget/milsko/milskosrc/src/widget/submenu.c new file mode 100644 index 0000000000..6bc5d550ce --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/submenu.c @@ -0,0 +1,264 @@ +#include + +#include "../../external/stb_ds.h" + +static int wcreate(MwWidget handle) { + MwLLBeginStateChange(handle->lowlevel); + + MwSetDefault(handle); + MwSetInteger(handle, MwNleftPadding, 0); + + handle->internal = NULL; + + return 0; +} + +static void null_all(MwMenu menu) { + int i; + for(i = 0; i < arrlen(menu->sub); i++) { + null_all(menu->sub[i]); + } + menu->wsub = NULL; +} + +static void destroy(MwWidget handle) { + MwMenu menu = handle->internal; + + menu->wsub = NULL; + null_all(menu); +} + +static void draw(MwWidget handle) { + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground)); + MwRect r; + MwMenu menu = handle->internal; + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + + MwDrawWidgetBack(handle, &r, base, 0, MwDEFAULT); + + if(menu != NULL) { + MwPoint p; + int i; + + p.x = 0; + p.y = 3; + + for(i = 0; i < arrlen(menu->sub); i++) { + if(strcmp(menu->sub[i]->name, "----") == 0) { + MwRect rc; + + p.y += 1; + + rc.x = MwDefaultBorderWidth(handle) * 2; + rc.y = p.y; + rc.width = r.width - (rc.x * 2) - MwGetInteger(handle, MwNleftPadding); + rc.height = 2; + + rc.x += MwGetInteger(handle, MwNleftPadding); + + MwDrawFrameEx(handle, &rc, base, 1, 1, 0, 0); + + p.y += 2 + 1; + } else { + int tw = MwTextWidth(handle, NULL, menu->sub[i]->name); + int th = MwTextHeight(handle, NULL, menu->sub[i]->name); + + if(menu->sub[i]->wsub != NULL) { + r.x = MwGetInteger(handle, MwNleftPadding); + r.y = p.y - 3; + r.width = MwGetInteger(handle, MwNwidth) - MwGetInteger(handle, MwNleftPadding); + r.height = th + 3 * 2; + MwDrawWidgetBack(handle, &r, base, 0, MwDEFAULT); + } + + p.x = 5 + tw / 2 + MwGetInteger(handle, MwNleftPadding); + + p.y += th / 2; + MwDrawText(handle, MwFLBuildFont(menu->sub[i]->wsub != NULL ? MwFLFlagBold : 0), &p, menu->sub[i]->name, MwALIGNMENT_CENTER, text); + + if(arrlen(menu->sub[i]->sub) > 0) { + MwRect tr; + + tr.x = MwGetInteger(handle, MwNwidth) - MwDefaultBorderWidth(handle) - 11 - 2; + tr.y = p.y - th / 2 + 2; + tr.width = tr.height = 11; + + MwDrawTriangle(handle, &tr, base, menu->sub[i]->wsub != NULL ? 1 : 0, MwEAST); + } + + p.y += th / 2 + 3; + } + } + } + + MwLLFreeColor(text); + MwLLFreeColor(base); +} + +static void click(MwWidget handle) { + MwWidget w = handle; + MwMenu menu = handle->internal; + + if(arrlen(menu->sub) > 0) { + int ww = 0, i; + MwRect rc; + + rc.x = 5; + rc.y = 3; + for(i = 0; i < arrlen(menu->sub); i++) { + int tw = MwTextWidth(handle, NULL, menu->sub[i]->name); + if(tw > ww) ww = tw; + } + + rc.width = ww + 15; + for(i = 0; i < arrlen(menu->sub); i++) { + int th = MwTextHeight(handle, NULL, menu->sub[i]->name); + rc.height = th; + + if(strcmp(menu->sub[i]->name, "----") == 0) { + rc.height = 2 - 1; + } + + if(MwGetInteger(handle, MwNleftPadding) <= handle->mouse_point.x && rc.y <= handle->mouse_point.y && handle->mouse_point.y <= (int)(rc.y + rc.height)) { + if(menu->sub[i]->wsub == NULL && arrlen(menu->sub[i]->sub) > 0) { + MwPoint p; + int j; + + for(j = 0; j < arrlen(menu->sub); j++) { + if(menu->sub[j]->wsub != NULL) MwDestroyWidget(menu->sub[j]->wsub); + menu->sub[j]->wsub = NULL; + } + + p.x = MwGetInteger(handle, MwNwidth); + p.y = rc.y - 3; + + menu->sub[i]->wsub = MwCreateWidget(MwSubMenuClass, "submenu", handle, 0, 0, 0, 0); + MwSubMenuAppear(menu->sub[i]->wsub, menu->sub[i], &p, 0); + i = -1; + } else if(menu->sub[i]->wsub != NULL && arrlen(menu->sub[i]->sub) > 0) { + while(w->parent->widget_class == MwSubMenuClass) w = w->parent; + + MwDestroyWidget(menu->sub[i]->wsub); + menu->sub[i]->wsub = NULL; + + MwForceRender(w->parent); + + MwForceRender(handle); + } else if(strcmp(menu->sub[i]->name, "----") != 0 && arrlen(menu->sub[i]->sub) == 0) { + while(w->parent->widget_class == MwSubMenuClass) w = w->parent; + + MwDestroyWidget(w); + ((MwMenu)w->internal)->wsub = NULL; + + MwForceRender(w->parent); + + MwDispatchUserHandler(w->parent, MwNmenuHandler, menu->sub[i]); + } + } + + rc.y += rc.height + 3; + } + } +} + +static void mwSubMenuAppearImpl(MwWidget handle, MwMenu menu, MwPoint* point, int diff_calc) { + MwRect rc, sz; + MwPoint p = *point; + + MwSubMenuGetSize(handle, menu, &sz); + + MwGetScreenSize(handle, &rc); + + handle->internal = menu; + + if(diff_calc) { + p.y = p.y - sz.height; + } + + MwLLMakeToolWindow(handle->lowlevel); + MwLLDetach(handle->lowlevel, &p); + + if(handle->lowlevel->common.coordinate_type == MwCOORDINATE_GLOBAL) { + if(MwGetInteger(handle, MwNy) + sz.height > rc.height) { + MwVaApply(handle, + MwNy, rc.height - sz.height, + NULL); + } + } + + MwLLEndStateChange(handle->lowlevel); + + MwVaApply(handle, + MwNwidth, sz.width, + MwNheight, sz.height, + NULL); +} + +static void mwSubMenuGetSizeImpl(MwWidget handle, MwMenu menu, MwRect* rect) { + int i; + + rect->width = 0; + rect->height = 0; + + for(i = 0; i < arrlen(menu->sub); i++) { + if(strcmp(menu->sub[i]->name, "----") == 0) { + rect->height += 2 + 2; + } else { + int tw = MwTextWidth(handle, NULL, menu->sub[i]->name); + rect->height += MwTextHeight(handle, NULL, menu->sub[i]->name) + 3; + if(tw > rect->width) { + rect->width = tw; + } + } + } + + rect->width += MwGetInteger(handle, MwNleftPadding); + + rect->width += 10 + 15; + rect->height += 3; + + rect->width += 16; +} + +static void func_handler(MwWidget handle, const char* name, void* out, va_list va) { + (void)out; + + if(strcmp(name, "mwSubMenuAppear") == 0) { + MwMenu menu = va_arg(va, MwMenu); + MwPoint* point = va_arg(va, MwPoint*); + int diff_calc = va_arg(va, int); + mwSubMenuAppearImpl(handle, menu, point, diff_calc); + } else if(strcmp(name, "mwSubMenuGetSize") == 0) { + MwMenu menu = va_arg(va, MwMenu); + MwRect* rect = va_arg(va, MwRect*); + mwSubMenuGetSizeImpl(handle, menu, rect); + } +} + +MwClassRec MwSubMenuClassRec = { + wcreate, /* create */ + destroy, /* destroy */ + draw, /* draw */ + click, /* click */ + NULL, /* parent_resize */ + NULL, /* prop_change */ + NULL, /* mouse_move */ + MwForceRender2, /* mouse_up */ + MwForceRender2, /* mouse_down */ + NULL, /* key */ + func_handler, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwSubMenuClass = &MwSubMenuClassRec; diff --git a/widget/milsko/milskosrc/src/widget/subwindow.c b/widget/milsko/milskosrc/src/widget/subwindow.c new file mode 100644 index 0000000000..81b5392181 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/subwindow.c @@ -0,0 +1,425 @@ +#include + +#include "../../external/stb_ds.h" + +#define TitleHeight 20 +#define ButtonSize 14 + +static void resize(MwWidget handle); + +static void close_draw(MwWidget handle) { + int w = MwGetInteger(handle, MwNwidth); + int h = MwGetInteger(handle, MwNheight); + MwPoint p[2]; + MwLLColor c = MwParseColor(handle, MwGetText(handle, MwNforeground)); + int bw = MwDefaultBorderWidth(handle); + + p[0].x = bw * 2; + p[0].y = bw * 2; + p[1].x = w - bw * 2 - 1; + p[1].y = h - bw * 2 - 1; + MwLLLine(handle->lowlevel, p, c); + + p[0].x++; + p[1].x--; + MwLLLine(handle->lowlevel, p, c); + + p[0].x = w - bw * 2 - 1; + p[0].y = bw * 2; + p[1].x = bw * 2; + p[1].y = h - bw * 2 - 1; + MwLLLine(handle->lowlevel, p, c); + + p[0].x--; + p[1].x++; + MwLLLine(handle->lowlevel, p, c); + + MwLLFreeColor(c); +} + +static void MWAPI close_activate(MwWidget handle, void* user, void* client) { + MwWidget w = user; + + (void)handle; + (void)client; + + MwDispatchUserHandler(w, MwNcloseHandler, NULL); + + MwLLRaise(w->lowlevel); +} + +static void maximize_draw(MwWidget handle) { + int w = MwGetInteger(handle, MwNwidth); + int h = MwGetInteger(handle, MwNheight); + MwPoint p[2]; + MwLLColor c = MwParseColor(handle, MwGetText(handle, MwNforeground)); + int bw = MwDefaultBorderWidth(handle); + + p[0].x = bw * 2; + p[0].y = bw * 2; + p[1].x = w - bw * 2 - 1; + p[1].y = bw * 2; + MwLLLine(handle->lowlevel, p, c); + + p[0].y = p[1].y = h - bw * 2 - 1; + MwLLLine(handle->lowlevel, p, c); + + p[0].y = p[1].y = bw * 2 + 1; + MwLLLine(handle->lowlevel, p, c); + + p[0].x = bw * 2; + p[0].y = bw * 2; + p[1].x = bw * 2; + p[1].y = h - bw * 2 - 1; + MwLLLine(handle->lowlevel, p, c); + + p[0].x = p[1].x = w - bw * 2 - 1; + MwLLLine(handle->lowlevel, p, c); + + MwLLFreeColor(c); +} + +static void MWAPI maximize_activate(MwWidget handle, void* user, void* client) { + MwWidget w = user; + MwSubWindow sw = w->internal; + + (void)handle; + (void)client; + + if(sw->minimized) return; + + if(sw->maximized) { + MwVaApply(user, + MwNx, sw->x, + MwNy, sw->y, + MwNwidth, sw->width, + MwNheight, sw->height, + NULL); + } else { + sw->x = MwGetInteger(w, MwNx); + sw->y = MwGetInteger(w, MwNy); + sw->width = MwGetInteger(w, MwNwidth); + sw->height = MwGetInteger(w, MwNheight); + + MwVaApply(user, + MwNx, 0, + MwNy, 0, + MwNwidth, MwGetInteger(w->parent, MwNwidth), + MwNheight, MwGetInteger(w->parent, MwNheight), + NULL); + } + sw->maximized = !sw->maximized; + + MwLLRaise(w->lowlevel); +} + +static void minimize_draw(MwWidget handle) { + int w = MwGetInteger(handle, MwNwidth); + int h = MwGetInteger(handle, MwNheight); + MwPoint p[2]; + MwLLColor c = MwParseColor(handle, MwGetText(handle, MwNforeground)); + int bw = MwDefaultBorderWidth(handle); + + p[0].x = bw * 2; + p[0].y = h - bw * 2 - 1; + p[1].x = w - bw * 2 - 1; + p[1].y = h - bw * 2 - 1; + MwLLLine(handle->lowlevel, p, c); + + p[0].y--; + p[1].y--; + MwLLLine(handle->lowlevel, p, c); + + MwLLFreeColor(c); +} + +static int sort_subwindow(const void* _a, const void* _b) { + MwWidget a = *(MwWidget*)_a; + MwWidget b = *(MwWidget*)_b; + int ax = MwGetInteger(a, MwNx); + int bx = MwGetInteger(b, MwNx); + + if(ax < bx) return -1; + if(ax > bx) return 1; + return 0; +} + +static void MWAPI minimize_activate(MwWidget handle, void* user, void* client) { + MwWidget w = user; + MwSubWindow sw = w->internal; + + (void)handle; + (void)client; + + if(sw->maximized) return; + + if(sw->minimized) { + int i; + MwWidget* ws = NULL; + int p = 0; + + for(i = 0; i < arrlen(w->parent->children); i++) { + MwWidget c = w->parent->children[i]; + if(c->widget_class == MwSubWindowClass) { + MwSubWindow csw = c->internal; + + if(!csw->minimized) continue; + + arrput(ws, c); + } + } + + if(ws != NULL) { + qsort(ws, arrlen(ws), sizeof(*ws), sort_subwindow); + + for(i = 0; i < arrlen(ws); i++) { + if(p) { + MwVaApply(ws[i], + MwNx, MwGetInteger(ws[i], MwNx) - MwGetInteger(w, MwNwidth), + NULL); + } else if(ws[i] == w) { + p = 1; + } + } + } + arrfree(ws); + + MwVaApply(user, + MwNx, sw->x, + MwNy, sw->y, + NULL); + } else { + int x = 0; + int i; + + for(i = 0; i < arrlen(w->parent->children); i++) { + MwWidget c = w->parent->children[i]; + + if(c->widget_class == MwSubWindowClass) { + MwSubWindow cw = c->internal; + + if(cw->minimized) x += MwGetInteger(c, MwNwidth); + } + } + + sw->x = MwGetInteger(w, MwNx); + sw->y = MwGetInteger(w, MwNy); + + MwVaApply(user, + MwNx, x, + MwNy, MwGetInteger(w->parent, MwNheight) - TitleHeight - MwDefaultBorderWidth(handle), + NULL); + } + sw->minimized = !sw->minimized; + + MwLLRaise(w->lowlevel); +} + +static void resize(MwWidget handle) { + MwSubWindow sw = handle->internal; + int x, y, w, h; + int ww = MwGetInteger(handle, MwNwidth); + int wh = MwGetInteger(handle, MwNheight); + int bw = MwDefaultBorderWidth(handle); + int p; + + x = bw * 2; + y = bw * 2 + TitleHeight; + w = ww - bw * 4; + h = wh - bw * 4 - TitleHeight; + if(sw->frame == NULL) { + sw->frame = MwCreateWidget(MwFrameClass, "frame", handle, x, y, w, h); + } else { + MwVaApply(sw->frame, + MwNx, x, + MwNy, y, + MwNwidth, w, + MwNheight, h, + NULL); + } + + p = (TitleHeight - ButtonSize) / 2; + x = ww - bw - p; + y = bw + p; + w = ButtonSize; + h = ButtonSize; + +#define BUTTON(name) \ + x -= ButtonSize; \ + if(sw->name == NULL) { \ + sw->name = MwCreateWidget(MwButtonClass, #name, handle, x, y, w, h); \ + sw->name->draw_inject = name##_draw; \ + MwAddUserHandler(sw->name, MwNactivateHandler, name##_activate, handle); \ + } else { \ + MwVaApply(sw->name, \ + MwNx, x, \ + MwNy, y, \ + MwNwidth, w, \ + MwNheight, h, \ + NULL); \ + } \ + x -= p; + + BUTTON(close); + BUTTON(maximize); + BUTTON(minimize); +} + +static int wcreate(MwWidget handle) { + MwSubWindow sw = malloc(sizeof(*sw)); + memset(sw, 0, sizeof(*sw)); + + sw->maximized = 0; + sw->minimized = 0; + handle->internal = sw; + + resize(handle); + + MwSetDefault(handle); + + return 0; +} + +static void destroy(MwWidget handle) { + free(handle->internal); +} + +static void draw(MwWidget handle) { + MwLLColor c = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor tb = MwParseColor(handle, MwGetText(handle, MwNtitleBackground)); + MwLLColor tf = MwParseColor(handle, MwGetText(handle, MwNtitleForeground)); + MwRect r, r2, r3; + const char* title = MwGetText(handle, MwNtitle); + int incr = 0; + MwLLPixmap px = MwGetVoid(handle, MwNiconPixmap); + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + + MwDrawFrame(handle, &r, c, 0); + MwDrawRect(handle, &r, c); + + r2 = r; + r2.height = TitleHeight; + MwDrawRect(handle, &r2, tb); + + if(px != NULL) { + r3 = r2; + incr = (TitleHeight - ButtonSize) / 2; + + r3.x += incr; + r3.y += incr; + r3.width = ButtonSize; + r3.height = ButtonSize; + MwLLDrawPixmap(handle->lowlevel, &r3, px); + + incr += ButtonSize; + } + + if(title != NULL) { + MwPoint p; + p.x = r2.x + (TitleHeight - ButtonSize) / 2 + incr; + p.y = r2.y + TitleHeight / 2; + handle->bgcolor = tb; + MwDrawText(handle, NULL, &p, title, MwALIGNMENT_BEGINNING, tf); + handle->bgcolor = NULL; + } + + r2.width = ButtonSize * 3 + (TitleHeight - ButtonSize) / 2 * 4; + r2.x = r.width - r2.width; + MwDrawRect(handle, &r2, tb); + + r.y += TitleHeight; + r.height -= TitleHeight; + MwDrawFrame(handle, &r, c, 1); + + MwLLFreeColor(tf); + MwLLFreeColor(tb); + MwLLFreeColor(c); +} + +static void parent_resize(MwWidget handle) { + MwSubWindow sw = handle->internal; + + if(sw->maximized) { + MwVaApply(handle, + MwNwidth, MwGetInteger(handle->parent, MwNwidth), + MwNheight, MwGetInteger(handle->parent, MwNheight), + NULL); + } else if(sw->minimized) { + MwVaApply(handle, + MwNy, MwGetInteger(handle->parent, MwNheight) - TitleHeight - MwDefaultBorderWidth(handle), + NULL); + } +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNtitle) == 0 || strcmp(key, MwNiconPixmap) == 0) MwForceRender(handle); +} + +static MwWidget mwSubWindowGetFrameImpl(MwWidget handle) { + MwSubWindow sw = handle->internal; + + return sw->frame; +} + +static void mouse_down(MwWidget handle, void* ptr) { + MwSubWindow sw = handle->internal; + MwMouse* m = ptr; + + if(m->button == MwMOUSE_LEFT && !sw->minimized && !sw->maximized) { + MwGetCursorCoord(handle, &sw->cursor_start); + sw->base.x = MwGetInteger(handle, MwNx); + sw->base.y = MwGetInteger(handle, MwNy); + } + + MwLLRaise(handle->lowlevel); +} + +static void func_handler(MwWidget handle, const char* name, void* out, va_list va) { + (void)va; + + if(strcmp(name, "mwSubWindowGetFrame") == 0) { + *(MwWidget*)out = mwSubWindowGetFrameImpl(handle); + } +} + +static void tick(MwWidget handle) { + MwSubWindow sw = handle->internal; + + if(handle->pressed && !sw->minimized && !sw->maximized) { + MwPoint p; + + MwGetCursorCoord(handle, &p); + + MwVaApply(handle, + MwNx, sw->base.x + p.x - sw->cursor_start.x, + MwNy, sw->base.y + p.y - sw->cursor_start.y, + NULL); + } +} + +MwClassRec MwSubWindowClassRec = { + wcreate, /* create */ + destroy, /* destroy */ + draw, /* draw */ + NULL, /* click */ + parent_resize, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + mouse_down, /* mouse_down */ + NULL, /* key */ + func_handler, /* execute */ + tick, /* tick */ + resize, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwSubWindowClass = &MwSubWindowClassRec; diff --git a/widget/milsko/milskosrc/src/widget/tab.c b/widget/milsko/milskosrc/src/widget/tab.c new file mode 100644 index 0000000000..e5d2a3eae9 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/tab.c @@ -0,0 +1,375 @@ +#include + +#include "../../external/stb_ds.h" + +static void resize(MwWidget handle); + +static int wcreate(MwWidget handle) { + MwTab t = malloc(sizeof(*t)); + memset(t, 0, sizeof(*t)); + + handle->internal = t; + + MwSetDefault(handle); + + MwSetInteger(handle, MwNvalue, -1); + + return 0; +} + +static void destroy(MwWidget handle) { + MwTab t = handle->internal; + int i; + + for(i = 0; i < arrlen(t->names); i++) { + free(t->names[i]); + } + + arrfree(t->names); + arrfree(t->frames); + + free(handle->internal); +} + +static int tab_width(MwWidget handle, const char* text) { + return MwTextWidth(handle, NULL, text) + 20; +} + +static int tab_height(MwWidget handle) { + return MwTextHeight(handle, NULL, "M") + 10; +} + +static int icon_width(MwWidget handle, const char* text) { + MwTab t = handle->internal; + int i; + + for(i = 0; i < arrlen(t->names); i++) { + if(strcmp(t->names[i], text) == 0) { + MwLLPixmap px = MwGetVoid(t->frames[i], MwNiconPixmap); + + if(px == NULL) return 0; + + return px->common.width * tab_height(handle) / px->common.height; + } + } + + return 0; +} + +static void draw(MwWidget handle) { + MwTab t = handle->internal; + MwLLColor c = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor ct = MwParseColor(handle, MwGetText(handle, MwNforeground)); + MwRect r, r2; + int h = tab_height(handle); + int i; + int n; + int x = 0; + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + + MwDrawRect(handle, &r, c); + + for(n = 0; n < 2; n++) { + x = 0; + for(i = 0; i < arrlen(t->names); i++) { + int render = 0; + int iw = icon_width(handle, t->names[i]); + + if(i == MwGetInteger(handle, MwNvalue) && n == 1) { + r.y += h; + r.height -= h; + MwDrawFrame(handle, &r, c, 0); + + render = 1; + } else if(n == 0) { + render = 1; + } + + r2.x = x; + r2.y = 0; + r2.width = tab_width(handle, t->names[i]) + iw; + r2.height = tab_height(handle) + MwDefaultBorderWidth(handle); + + x += r2.width; + + if(iw > 0) { + MwLLPixmap px = MwGetVoid(t->frames[i], MwNiconPixmap); + MwRect rp; + + rp = r2; + + rp.x += 5; + rp.y += 5; + + rp.width = iw - 10; + rp.height = rp.height * (iw - 10) / iw; + + MwLLDrawPixmap(handle->lowlevel, &rp, px); + } + + if(render) { + MwPoint p; + + if(n == 1 && i > 0) { + MwRect r3 = r2; + + r3.y = tab_height(handle); + r3.width = r3.height = MwDefaultBorderWidth(handle); + + MwLLClip(handle->lowlevel, &r3); + + r3.x -= r3.width; + r3.y -= r3.height; + r3.width *= 2; + r3.height *= 2; + MwDrawFrame(handle, &r3, c, 1); + + MwLLClip(handle->lowlevel, NULL); + } else if(n == 1 && i == 0) { + MwRect r3 = r2; + + r3.y = tab_height(handle); + r3.width = r3.height = MwDefaultBorderWidth(handle); + + MwLLClip(handle->lowlevel, &r3); + + r3.x -= r3.width; + r3.y -= r3.height; + r3.width *= 2; + r3.height *= 3; + MwDrawFrame(handle, &r3, c, 1); + + MwLLClip(handle->lowlevel, NULL); + } + + if(n == 1 && i < (arrlen(t->names) - 1)) { + MwRect r3 = r2; + + r3.x += r2.width - MwDefaultBorderWidth(handle); + r3.y = tab_height(handle); + r3.width = r3.height = MwDefaultBorderWidth(handle); + + MwLLClip(handle->lowlevel, &r3); + + r3.y -= r3.height; + r3.width *= 2; + r3.height *= 2; + MwDrawFrame(handle, &r3, c, 1); + + MwLLClip(handle->lowlevel, NULL); + } + + if(n == 1) { + MwRect r3 = r2; + + r3.height -= MwDefaultBorderWidth(handle); + + MwLLClip(handle->lowlevel, &r3); + } + + MwDrawFrame(handle, &r2, c, 0); + + MwLLClip(handle->lowlevel, NULL); + + if(n == 1) { + MwRect r3 = r2; + + r3.y += r3.height; + r3.height = MwDefaultBorderWidth(handle); + + MwDrawRect(handle, &r3, c); + } + + p.x = r2.x + (r2.width + iw / 2) / 2; + p.y = r2.y + r2.height / 2; + MwDrawText(handle, NULL, &p, t->names[i], MwALIGNMENT_CENTER, ct); + } + } + } + + MwLLFreeColor(ct); + MwLLFreeColor(c); +} + +static void show_frame(MwWidget handle) { + resize(handle); + + MwForceRender(handle); + + MwDispatchUserHandler(handle, MwNchangedHandler, NULL); +} + +static void click(MwWidget handle) { + MwTab t = handle->internal; + int i; + int x = 0; + int h = tab_height(handle); + + for(i = 0; i < arrlen(t->names); i++) { + int w = tab_width(handle, t->names[i]); + int iw = icon_width(handle, t->names[i]); + + w += iw; + + if(MwGetInteger(handle, MwNvalue) != i && x <= handle->mouse_point.x && handle->mouse_point.x <= (x + w) && 0 <= handle->mouse_point.y && handle->mouse_point.y <= h) { + MwSetInteger(handle, MwNvalue, i); + show_frame(handle); + } + + x += w; + } +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNvalue) == 0) { + show_frame(handle); + } +} + +static MwWidget mwTabAddImpl(MwWidget handle, const char* name) { + MwTab t = handle->internal; + MwWidget f = MwCreateWidget(MwFrameClass, "tabframe", handle, MwDefaultBorderWidth(handle), tab_height(handle) + MwDefaultBorderWidth(handle), MwGetInteger(handle, MwNwidth) - MwDefaultBorderWidth(handle) * 2, MwGetInteger(handle, MwNheight) - tab_height(handle) - MwDefaultBorderWidth(handle) * 2); + char* n = MwStringDuplicate(name); + + arrput(t->frames, f); + arrput(t->names, n); + + MwForceRender(handle); + + if(MwGetInteger(handle, MwNvalue) == -1) { + MwSetInteger(handle, MwNvalue, arrlen(t->frames) - 1); + show_frame(handle); + } else { + MwLLShow(f->lowlevel, 0); + } + + return f; +} + +static MwWidget mwTabGetFrameImpl(MwWidget handle, const char* name) { + MwTab t = handle->internal; + int i; + + for(i = 0; i < arrlen(t->names); i++) { + if(strcmp(t->names[i], name) == 0) return t->frames[i]; + } + + return NULL; +} + +static void mwTabFocusImpl(MwWidget handle, const char* name) { + MwTab t = handle->internal; + int i; + + for(i = 0; i < arrlen(t->names); i++) { + if(strcmp(t->names[i], name) == 0) { + MwSetInteger(handle, MwNvalue, i); + show_frame(handle); + break; + } + } +} + +static void func_handler(MwWidget handle, const char* name, void* out, va_list va) { + if(strcmp(name, "mwTabAdd") == 0) { + const char* name = va_arg(va, const char*); + + *(MwWidget*)out = mwTabAddImpl(handle, name); + } else if(strcmp(name, "mwTabGetFrame") == 0) { + const char* name = va_arg(va, const char*); + + *(MwWidget*)out = mwTabGetFrameImpl(handle, name); + } else if(strcmp(name, "mwTabFocus") == 0) { + const char* name = va_arg(va, const char*); + + mwTabFocusImpl(handle, name); + } +} + +static void resize(MwWidget handle) { + MwTab t = handle->internal; + int v = MwGetInteger(handle, MwNvalue); + int i; + + for(i = 0; i < arrlen(t->frames); i++) { + int y = MwGetInteger(handle, MwNheight); + + MwLLShow(t->frames[i]->lowlevel, i == v); + if(i == v) y = tab_height(handle) + MwDefaultBorderWidth(handle); + + MwVaApply(t->frames[i], + MwNx, MwDefaultBorderWidth(handle), + MwNy, y, + MwNwidth, MwGetInteger(handle, MwNwidth) - MwDefaultBorderWidth(handle) * 2, + MwNheight, MwGetInteger(handle, MwNheight) - tab_height(handle) - MwDefaultBorderWidth(handle) * 2, + NULL); + } +} + +static void children_update(MwWidget handle, MwWidget child, int new_child) { + MwTab t = handle->internal; + int v = MwGetInteger(handle, MwNvalue); + int n; + int i; + + if(new_child) return; + + for(i = 0; i < arrlen(t->frames); i++) { + if(t->frames[i] == child) { + n = i; + break; + } + } + + free(t->names[n]); + + arrdel(t->frames, n); + arrdel(t->names, n); + + if(n <= v) { + if(v > 0) v--; + + MwSetInteger(handle, MwNvalue, v); + show_frame(handle); + } else { + MwSetInteger(handle, MwNvalue, v); + show_frame(handle); + } + + MwForceRender(handle); +} + +static void children_prop_change(MwWidget handle, MwWidget child, const char* key) { + (void)child; + + if(strcmp(key, MwNiconPixmap) == 0) { + MwForceRender(handle); + } +} + +MwClassRec MwTabClassRec = { + wcreate, /* create */ + destroy, /* destroy */ + draw, /* draw */ + click, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + func_handler, /* execute */ + NULL, /* tick */ + resize, /* resize */ + children_update, /* children_update */ + children_prop_change, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwTabClass = &MwTabClassRec; diff --git a/widget/milsko/milskosrc/src/widget/table.c b/widget/milsko/milskosrc/src/widget/table.c new file mode 100644 index 0000000000..788d5cc811 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/table.c @@ -0,0 +1,227 @@ +#include + +#include "../../external/stb_ds.h" + +static int wcreate(MwWidget handle) { + MwTable t = malloc(sizeof(*t)); + memset(t, 0, sizeof(*t)); + + handle->internal = t; + + MwSetDefault(handle); + + MwSetInteger(handle, MwNcolumns, 1); + MwSetInteger(handle, MwNmargin, 0); + MwSetInteger(handle, MwNpadding, 0); + MwSetInteger(handle, MwNhasBorder, 0); + MwSetInteger(handle, MwNinverted, 1); + MwSetInteger(handle, MwNwaitLayout, 0); + + t->layout = 0; + + return 0; +} + +static void destroy(MwWidget handle) { + MwTable t = handle->internal; + + arrfree(t->widgets); + + free(t); +} + +typedef struct intkv { + int key; + int value; +} intkv_t; + +static void put_intkv(intkv_t** kv, int x, int y, int c, int r) { + int k = (x << 16) | y; + int v = (c << 16) | r; + + hmput(*kv, k, v); +} + +static int get_intkv(intkv_t* kv, int x, int y) { + int k = (x << 16) | y; + + return hmget(kv, k); +} + +#define LAYOUT_BEGIN \ + hmfree(kv); \ + hmdefault(kv, 0); \ + n = 0; \ + x = bw; \ + y = bw; \ + for(i = 0; i < arrlen(handle->children); i++) { \ + MwRect rc; \ + MwWidget hc = handle->children[i]; \ + int cs = MwGetInteger(hc, MwNcolumnSpan); \ + int rs = MwGetInteger(hc, MwNrowSpan); \ + int w, h; \ + int cy; \ + int s = MwGetInteger(handle, MwNmargin); \ + int v = n; \ +\ + if(cs == MwDEFAULT) cs = 1; \ + if(rs == MwDEFAULT) rs = 1; \ +\ + w = cs * cw + (cs - 1) * s; \ + h = rs * ch + (rs - 1) * s; \ +\ + MwGetFrame(hc, &rc); \ +\ + if(hc == child || rc.x != x || rc.y != y || rc.width != w || rc.height != h) { + +#define LAYOUT_END(label) \ + } \ +\ + put_intkv(&kv, n % c, n / c, cs, rs); \ +\ + n += cs; \ + repeat_##label :; \ + if((n % c) == 0) { \ + x = bw; \ + y += ch + s; \ + } else { \ + for(; v < n; v++) { \ + x += cw + s; \ + } \ + } \ +\ + for(cy = (n / c); cy >= 0; cy--) { \ + int v = get_intkv(kv, n % c, cy) & 0xffff; \ +\ + if(cy <= (n / c) && (n / c) <= (cy + v - 1)) { \ + v = n; \ + n += get_intkv(kv, n % c, cy) >> 16; \ + goto repeat_##label; \ + } \ + } \ + } + +static void layout_widget(MwWidget handle, MwWidget child) { + int i; + int c = MwGetInteger(handle, MwNcolumns); + int bw = (MwGetInteger(handle, MwNhasBorder) ? MwDefaultBorderWidth(handle) : 0) + MwGetInteger(handle, MwNpadding); + int m = MwGetInteger(handle, MwNmargin); + int n, x, y, cw = 0, ch = 0; + int gcs; + intkv_t* kv = NULL; + + LAYOUT_BEGIN; + LAYOUT_END(1); + + gcs = (n + c - 1) / c; + cw = (MwGetInteger(handle, MwNwidth) - bw * 2 - (m * (c - 1))) / c; + ch = (MwGetInteger(handle, MwNheight) - m * (gcs - 1) - bw * 2) / gcs; + + LAYOUT_BEGIN; + MwVaApply(hc, + MwNx, x, + MwNy, y, + MwNwidth, w, + MwNheight, h, + NULL); + LAYOUT_END(2); + + hmfree(kv); +} + +static void layout(MwWidget handle) { + MwTable t = handle->internal; + int i; + + if(arrlen(t->widgets) > 0) { + for(i = 0; i < arrlen(t->widgets); i++) layout_widget(handle, t->widgets[i]); + } else { + for(i = 0; i < arrlen(handle->children[i]); i++) layout_widget(handle, handle->children[i]); + } +} + +static void draw(MwWidget handle) { + MwBoxClass->draw(handle); +} + +static void tick(MwWidget handle) { + MwTable t = handle->internal; + + if(t->layout && !MwGetInteger(handle, MwNwaitLayout)) { + layout(handle); + + t->layout = 0; + } +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNcolumns) == 0 || strcmp(key, MwNhasBorder) == 0 || strcmp(key, MwNinverted) == 0 || strcmp(key, MwNpadding) == 0 || strcmp(key, MwNmargin) == 0) { + MwTable t = handle->internal; + t->layout = 1; + + MwForceRender(handle); + } +} + +static void resize(MwWidget handle) { + MwTable t = handle->internal; + t->layout = 1; + + MwForceRender(handle); +} + +static void children_update(MwWidget handle, MwWidget child, int new_child) { + MwTable t = handle->internal; + t->layout = 1; + + if(new_child) { + arrput(t->widgets, child); + } else { + int i; + + for(i = 0; i < arrlen(t->widgets); i++) { + if(t->widgets[i] == child) { + arrdel(t->widgets, i); + i = -1; + } + } + } + + MwForceRender(handle); +} + +static void children_prop_change(MwWidget handle, MwWidget child, const char* key) { + (void)child; + + if(strcmp(key, MwNcolumnSpan) == 0 || strcmp(key, MwNrowSpan) == 0) { + MwTable t = handle->internal; + t->layout = 1; + + arrput(t->widgets, child); + + MwForceRender(handle); + } +} + +MwClassRec MwTableClassRec = { + wcreate, /* create */ + destroy, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + NULL, /* execute */ + tick, /* tick */ + resize, /* resize */ + children_update, /* children_update */ + children_prop_change, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwTableClass = &MwTableClassRec; diff --git a/widget/milsko/milskosrc/src/widget/treeview.c b/widget/milsko/milskosrc/src/widget/treeview.c new file mode 100644 index 0000000000..3fba309e53 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/treeview.c @@ -0,0 +1,526 @@ +#include + +#include "../../external/stb_ds.h" + +#define OpenerSize 11 +#define LineSpace 16 +#define LinePadding 4 + +#define Font MwFLBuildFont(MwFLFlagMonospace) + +static void MWAPI vscroll_changed(MwWidget handle, void* user, void* call) { + MwTreeView tv = handle->parent->internal; + + (void)user; + (void)call; + + tv->changed = 1; +} + +static void set_all(MwTreeViewEntry** root, int v) { + int i; + for(i = 0; i < arrlen(root); i++) { + root[i]->selected = v; + set_all(root[i]->tree, v); + } +} + +static void recursion(MwWidget handle, MwTreeViewEntry* tree, MwTreeViewEntry** root, MwLLColor base, MwLLColor text, MwLLColor base2, MwLLColor text2, MwPoint* p, int next, int shift, int* skip, int* shared, int draw, MwPoint* mouse) { + int i; + MwPoint l[2]; + int skipped = 0; + if((*skip) > 0) { + (*skip)--; + skipped = 1; + if(p->y == MwDefaultBorderWidth(handle)) p->y -= MwTextHeight(handle, Font, "M"); + } else if((*shared) < (MwGetInteger(handle, MwNheight) / MwTextHeight(handle, Font, "M") + 2)) { + MwRect r; + p->x += shift; + p->y += MwTextHeight(handle, Font, "M") / 2 + LinePadding; + + if(tree->tree != NULL || shift > LineSpace) { + l[0] = *p; + l[0].x -= LineSpace / 2; + l[1] = *p; + if(draw) MwLLLine(handle->lowlevel, &l[0], text2); + } + + if(shift > LineSpace) { + l[0] = *p; + l[0].x -= LineSpace / 2; + l[1] = l[0]; + l[0].y -= MwTextHeight(handle, Font, "M") / 2 + LinePadding; + if(next) { + l[1].y += MwTextHeight(handle, Font, "M") / 2; + } + if(draw) MwLLLine(handle->lowlevel, &l[0], text2); + } + if(tree->tree != NULL) { + r.width = OpenerSize; + r.height = OpenerSize; + r.x = p->x - LineSpace + (LineSpace - r.width) / 2; + r.y = p->y - MwTextHeight(handle, Font, "M") / 2 + (MwTextHeight(handle, Font, "M") - r.height) / 2; + if(draw) { + MwLLColor col = tree->opened ? MwLightenColor(handle, base, -8, -8, -8) : base; + MwRect r2 = r; + const int len = 4; + + MwDrawRect(handle, &r, col); + MwDrawFrame(handle, &r, base, tree->opened); + if(tree->opened) { + l[0].x = r.x + (r.width - 1 - len) / 2; + l[0].y = r.y + r.height / 2; + + l[1].x = l[0].x + len; + l[1].y = l[0].y; + + MwLLLine(handle->lowlevel, &l[0], text); + } else { + l[0].x = r.x + (r.width - len) / 2; + l[0].y = r.y + r.height / 2; + + l[1].x = l[0].x + len; + l[1].y = l[0].y; + + MwLLLine(handle->lowlevel, &l[0], text); + + l[0].x = r.x + r.width / 2; + l[0].y = r.y + (r.height - len) / 2; + + l[1].x = l[0].x; + l[1].y = l[0].y + len; + + MwLLLine(handle->lowlevel, &l[0], text); + } + r = r2; + MwDrawFrame(handle, &r, base, tree->opened); + + if(col != base) MwLLFreeColor(col); + } else { + if(r.x <= mouse->x && mouse->x <= (r.x + r.width) && r.y <= mouse->y && mouse->y <= (r.y + r.height)) { + tree->opened = tree->opened ? 0 : 1; + } + } + } + if(tree->pixmap != NULL) { + r.height = MwTextHeight(handle, Font, "M"); + r.width = r.height * tree->pixmap->common.width / tree->pixmap->common.height; + + r.x = p->x + (MwGetInteger(handle->parent, MwNleftPadding) - r.width) / 2; + r.y = p->y - MwTextHeight(handle, Font, "M") / 2; + + if(draw) MwLLDrawPixmap(handle->lowlevel, &r, tree->pixmap); + } + p->x += MwGetInteger(handle->parent, MwNleftPadding); + if(draw) { + if(tree->selected) { + r.x = p->x; + r.y = p->y - MwTextHeight(handle, Font, "M") / 2; + r.width = MwGetInteger(handle, MwNwidth) - MwGetInteger(handle->parent, MwNleftPadding) - shift; + r.height = MwTextHeight(handle, Font, "M"); + MwDrawRect(handle, &r, text2); + } + handle->bgcolor = tree->selected ? text2 : base2; + MwDrawText(handle, Font, p, tree->label, MwALIGNMENT_BEGINNING, tree->selected ? base2 : text2); + handle->bgcolor = NULL; + } else { + if(p->x <= mouse->x && mouse->x <= (p->x + MwTextWidth(handle, Font, tree->label)) && (p->y - MwTextHeight(handle, Font, "M") / 2) <= mouse->y && mouse->y <= (p->y + MwTextHeight(handle, Font, "M") / 2)) { + unsigned long t; + + set_all(root, 0); + tree->selected = 1; + if(((t = MwTimeGetTick()) - tree->click_time) < MwDoubleClickTimeout || MwGetInteger(handle->parent, MwNsingleClickSelectable)) { + MwDispatchUserHandler(handle->parent, MwNtreeViewActivateHandler, tree); + } + + tree->click_time = t; + } + } + p->x -= MwGetInteger(handle->parent, MwNleftPadding); + + p->y += MwTextHeight(handle, Font, "M") / 2; + p->x -= shift; + + (*shared)++; + } + if(!tree->opened) return; + for(i = 0; i < arrlen(tree->tree); i++) { + l[0] = *p; + l[0].x += shift + LineSpace / 2; + l[0].y += MwTextHeight(handle, Font, "M") - (MwTextHeight(handle, Font, "M") - OpenerSize) / 2; + if(tree->tree[i]->tree != NULL) { + l[0].y += OpenerSize / 2; + } + + recursion(handle, tree->tree[i], root, base, text, base2, text2, p, i != (arrlen(tree->tree) - 1) ? 1 : 0, shift + LineSpace, skip, shared, draw, mouse); + + l[1] = *p; + l[1].x += shift + LineSpace / 2; + + if(skipped && p->y > l[0].y) { + skipped = 0; + } + if(draw && !skipped && i != (arrlen(tree->tree) - 1)) MwLLLine(handle->lowlevel, &l[0], text); + } +} + +static void frame_draw(MwWidget handle) { + MwRect r, r2; + MwTreeView tv = handle->parent->internal; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwLLColor base2 = MwParseColor(handle, MwGetText(handle, MwNsubBackground)); + MwLLColor text = MwParseColor(handle, MwGetText(handle, MwNforeground)); + MwLLColor text2 = MwParseColor(handle, MwGetText(handle, MwNsubForeground)); + MwPoint p; + int shared = 0; + int i; + int skip = MwGetInteger(tv->vscroll, MwNvalue) * (MwGetInteger(tv->vscroll, MwNmaxValue) - MwGetInteger(tv->vscroll, MwNareaShown)) / MwGetInteger(tv->vscroll, MwNmaxValue); + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + r2 = r; + + p.x = MwDefaultBorderWidth(handle); + p.y = MwDefaultBorderWidth(handle); + + MwDrawFrame(handle, &r, base, 1); + MwDrawRect(handle, &r, base2); + + r = r2; + + for(i = 0; i < arrlen(tv->tree); i++) { + if(shared > (r.height / MwTextHeight(handle, Font, "M"))) break; + recursion(handle, tv->tree[i], tv->tree, base, text, base2, text2, &p, 0, LineSpace, &skip, &shared, 1, NULL); + } + + MwDrawFrame(handle, &r, base, 1); + + MwLLFreeColor(text2); + MwLLFreeColor(text); + MwLLFreeColor(base2); + MwLLFreeColor(base); +} + +static int recursive_length(MwTreeViewEntry** e) { + int l = 0; + int i; + for(i = 0; i < arrlen(e); i++) { + if(e[i]->opened && e[i]->tree != NULL) l += recursive_length(e[i]->tree); + l++; + } + return l; +} + +static void MWAPI frame_mouse_down(MwWidget handle, void* user, void* call) { + MwTreeView tv = handle->parent->internal; + MwMouse* mouse = call; + + (void)user; + + if(mouse->button == MwMOUSE_LEFT) tv->pressed = mouse->point; +} + +static void resize(MwWidget handle, int no_resize); + +static void MWAPI frame_mouse_up(MwWidget handle, void* user, void* call) { + MwTreeView tv = handle->parent->internal; + int shared = 0; + int skip = MwGetInteger(tv->vscroll, MwNvalue) * (MwGetInteger(tv->vscroll, MwNmaxValue) - MwGetInteger(tv->vscroll, MwNareaShown)) / MwGetInteger(tv->vscroll, MwNmaxValue); + MwPoint p; + MwMouse* mouse = call; + + (void)user; + + if(mouse->button == MwMOUSE_LEFT) { + int i; + p.x = MwDefaultBorderWidth(tv->frame); + p.y = MwDefaultBorderWidth(tv->frame); + for(i = 0; i < arrlen(tv->tree); i++) { + if(shared > (MwGetInteger(tv->frame, MwNheight) / MwTextHeight(tv->frame, Font, "M"))) break; + recursion(tv->frame, tv->tree[i], tv->tree, NULL, NULL, NULL, NULL, &p, 0, LineSpace, &skip, &shared, 0, &tv->pressed); + } + resize(handle->parent, 1); + MwForceRender(tv->frame); + } +} + +static void resize(MwWidget handle, int no_resize) { + MwTreeView tv = handle->internal; + int w = MwGetInteger(handle, MwNwidth); + int h = MwGetInteger(handle, MwNheight); + int ih = 0; + int m = 0; + + if(tv->vscroll == NULL) { + tv->vscroll = MwCreateWidget(MwScrollBarClass, "vscroll", handle, w - 16, 0, 16, h); + MwAddUserHandler(tv->vscroll, MwNchangedHandler, vscroll_changed, NULL); + MwSetInteger(tv->vscroll, MwNvalue, 5); + } else if(!no_resize) { + MwVaApply(tv->vscroll, + MwNx, w - 16, + MwNy, 0, + MwNwidth, 16, + MwNheight, h, + NULL); + } + + ih = recursive_length(tv->tree); + if(ih == 0) ih = 1; + + if(ih <= (h / (LinePadding + MwTextHeight(handle, Font, "M")))) { + MwLLShow(tv->vscroll->lowlevel, 0); + } else { + MwLLShow(tv->vscroll->lowlevel, 1); + m = 16; + } + + if(tv->frame == NULL) { + tv->frame = MwVaCreateWidget(MwFrameClass, "frame", handle, 0, 0, w - m, h, + MwNhasBorder, 1, + MwNinverted, 1, + NULL); + tv->frame->draw_inject = frame_draw; + MwAddUserHandler(tv->frame, MwNmouseDownHandler, frame_mouse_down, NULL); + MwAddUserHandler(tv->frame, MwNmouseUpHandler, frame_mouse_up, NULL); + } else if(!no_resize || MwGetInteger(tv->frame, MwNwidth) != (w - m)) { + MwVaApply(tv->frame, + MwNx, 0, + MwNy, 0, + MwNwidth, w - m, + MwNheight, h, + NULL); + } + + MwVaApply(tv->vscroll, + MwNareaShown, h / (LinePadding + MwTextHeight(handle, Font, "M")), + MwNmaxValue, ih, + NULL); +} + +static int wcreate(MwWidget handle) { + MwTreeView tv = malloc(sizeof(*tv)); + memset(tv, 0, sizeof(*tv)); + + handle->internal = tv; + + MwSetDefault(handle); + + MwSetInteger(handle, MwNsingleClickSelectable, 0); + MwSetInteger(handle, MwNleftPadding, 0); + + resize(handle, 0); + tv->changed = 0; + + return 0; +} + +static void destroy(MwWidget handle) { + free(handle->internal); +} + +static void draw(MwWidget handle) { + MwLLColor c = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwRect r; + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + MwDrawRect(handle, &r, c); + + MwLLFreeColor(c); +} + +static void* mwTreeViewAddImpl(MwWidget handle, void* parent, MwLLPixmap pixmap, const char* item) { + MwTreeView tv = handle->internal; + MwTreeViewEntry* t = malloc(sizeof(*t)); + + t->label = MwStringDuplicate(item); + t->pixmap = pixmap; + t->selected = 0; + t->opened = 1; + t->click_time = 0; + t->tree = NULL; + t->parent = parent; + + if(parent == NULL) { + arrput(tv->tree, t); + } else { + MwTreeViewEntry* e = parent; + + arrput(e->tree, t); + } + resize(handle, 1); + MwForceRender(tv->frame); + + return t; +} + +static void free_all(MwTreeViewEntry** tree) { + int i; + for(i = 0; i < arrlen(tree); i++) { + free(tree[i]->label); + free_all(tree[i]->tree); + free(tree[i]); + } + arrfree(tree); +} + +static void mwTreeViewDeleteImpl(MwWidget handle, void* item) { + MwTreeView tv = handle->internal; + MwTreeViewEntry* e = item; + MwTreeViewEntry* p = e->parent; + + (void)handle; + + free_all(p->tree); + p->tree = NULL; + resize(handle, 1); + MwForceRender(tv->frame); +} + +static void mwTreeViewResetImpl(MwWidget handle) { + MwTreeView tv = handle->internal; + + free_all(tv->tree); + tv->tree = NULL; + resize(handle, 1); + MwForceRender(tv->frame); +} + +static const char* mwTreeViewGetImpl(MwWidget handle, void* item) { + MwTreeViewEntry* e = item; + + (void)handle; + + return e->label; +} + +static void mwTreeViewSetLabelImpl(MwWidget handle, void* item, const char* label) { + MwTreeView tv = handle->internal; + MwTreeViewEntry* e = item; + + free(e->label); + e->label = MwStringDuplicate(label); + + if(e->parent == NULL || (e->parent != NULL && e->parent->opened)) { + resize(handle, 1); + MwForceRender(tv->frame); + } +} + +static void mwTreeViewSetPixmapImpl(MwWidget handle, void* item, MwLLPixmap pixmap) { + MwTreeView tv = handle->internal; + MwTreeViewEntry* e = item; + + e->pixmap = pixmap; + + if(e->parent == NULL || (e->parent != NULL && e->parent->opened)) { + resize(handle, 1); + MwForceRender(tv->frame); + } +} + +static void mwTreeViewSetOpenedImpl(MwWidget handle, void* item, int opened) { + MwTreeView tv = handle->internal; + MwTreeViewEntry* e = item; + + e->opened = opened; + + if(e->parent == NULL || (e->parent != NULL && e->parent->opened)) { + resize(handle, 1); + MwForceRender(tv->frame); + } +} + +static int mwTreeViewGetOpenedImpl(MwWidget handle, void* item) { + MwTreeViewEntry* e = item; + + (void)handle; + + return e->opened; +} + +static void func_handler(MwWidget handle, const char* name, void* out, va_list va) { + if(strcmp(name, "mwTreeViewAdd") == 0) { + void* parent = va_arg(va, void*); + MwLLPixmap pixmap = va_arg(va, MwLLPixmap); + const char* item = va_arg(va, const char*); + *(void**)out = mwTreeViewAddImpl(handle, parent, pixmap, item); + } + if(strcmp(name, "mwTreeViewDelete") == 0) { + void* item = va_arg(va, void*); + mwTreeViewDeleteImpl(handle, item); + } + if(strcmp(name, "mwTreeViewReset") == 0) { + mwTreeViewResetImpl(handle); + } + if(strcmp(name, "mwTreeViewGet") == 0) { + void* item = va_arg(va, void*); + *(const char**)out = mwTreeViewGetImpl(handle, item); + } + if(strcmp(name, "mwTreeViewSetLabel") == 0) { + void* item = va_arg(va, void*); + const char* label = va_arg(va, const char*); + mwTreeViewSetLabelImpl(handle, item, label); + } + if(strcmp(name, "mwTreeViewSetPixmap") == 0) { + void* item = va_arg(va, void*); + MwLLPixmap pixmap = va_arg(va, MwLLPixmap); + mwTreeViewSetPixmapImpl(handle, item, pixmap); + } + if(strcmp(name, "mwTreeViewSetOpened") == 0) { + void* item = va_arg(va, void*); + int opened = va_arg(va, int); + mwTreeViewSetOpenedImpl(handle, item, opened); + } + if(strcmp(name, "mwTreeViewGetOpened") == 0) { + void* item = va_arg(va, void*); + *(int*)out = mwTreeViewGetOpenedImpl(handle, item); + } +} + +static void tick(MwWidget handle) { + MwTreeView tv = handle->internal; + + if(tv->changed) { + tv->changed = 0; + MwForceRender(tv->frame); + } +} + +static void props_change(MwWidget handle, char** props) { + int i; + int rsz = 0; + + for(i = 0; props[i] != NULL; i++) { + if(strcmp(props[i], MwNwidth) == 0 || strcmp(props[i], MwNheight) == 0) rsz = 1; + } + + if(rsz) resize(handle, 0); +} + +MwClassRec MwTreeViewClassRec = { + wcreate, /* create */ + destroy, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + NULL, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + func_handler, /* execute */ + tick, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + props_change, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwTreeViewClass = &MwTreeViewClassRec; diff --git a/widget/milsko/milskosrc/src/widget/viewport.c b/widget/milsko/milskosrc/src/widget/viewport.c new file mode 100644 index 0000000000..2541b65d23 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/viewport.c @@ -0,0 +1,199 @@ +#include + +static void MWAPI vscroll_changed(MwWidget handle, void* user, void* call) { + MwViewport vp = user; + + (void)handle; + (void)call; + + vp->vchanged = 1; +} + +static void MWAPI hscroll_changed(MwWidget handle, void* user, void* call) { + MwViewport vp = user; + + (void)handle; + (void)call; + + vp->hchanged = 1; +} + +static void resize(MwWidget handle) { + MwViewport vp = handle->internal; + int w = MwGetInteger(handle, MwNwidth); + int h = MwGetInteger(handle, MwNheight); + int iw; + int ih; + if(vp->vscroll == NULL) { + vp->vscroll = MwVaCreateWidget(MwScrollBarClass, "vscroll", handle, w - 16, 0, 16, h - 16, NULL); + MwAddUserHandler(vp->vscroll, MwNchangedHandler, vscroll_changed, vp); + } else { + MwVaApply(vp->vscroll, + MwNx, w - 16, + MwNy, 0, + MwNwidth, 16, + MwNheight, h - 16, + NULL); + } + if(vp->hscroll == NULL) { + vp->hscroll = MwVaCreateWidget(MwScrollBarClass, "hscroll", handle, 0, h - 16, w - 16, 16, MwNorientation, MwHORIZONTAL, NULL); + MwAddUserHandler(vp->hscroll, MwNchangedHandler, hscroll_changed, vp); + } else { + MwVaApply(vp->hscroll, + MwNx, 0, + MwNy, h - 16, + MwNwidth, w - 16, + MwNheight, 16, + NULL); + } + if(vp->frame == NULL) { + vp->frame = MwCreateWidget(MwFrameClass, "frame", handle, 0, 0, w - 16, h - 16); + } else { + MwVaApply(vp->frame, + MwNx, 0, + MwNy, 0, + MwNwidth, w - 16, + MwNheight, h - 16, + NULL); + } + if(vp->inframe == NULL) { + vp->inframe = MwCreateWidget(MwFrameClass, "inframe", vp->frame, 0, 0, w - 16, h - 16); + } + + iw = MwGetInteger(vp->inframe, MwNwidth); + ih = MwGetInteger(vp->inframe, MwNheight); + + MwVaApply(vp->vscroll, + MwNareaShown, h - 16, + MwNmaxValue, ih, + NULL); + + MwVaApply(vp->hscroll, + MwNareaShown, w - 16, + MwNmaxValue, iw, + NULL); +} + +static int wcreate(MwWidget handle) { + MwViewport vp = malloc(sizeof(*vp)); + memset(vp, 0, sizeof(*vp)); + + handle->internal = vp; + + MwSetDefault(handle); + + vp->vchanged = 0; + vp->hchanged = 0; + + resize(handle); + + return 0; +} + +static void destroy(MwWidget handle) { + free(handle->internal); +} + +static void draw(MwWidget handle) { + MwRect r; + MwLLColor base = MwParseColor(handle, MwGetText(handle, MwNbackground)); + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + + MwDrawRect(handle, &r, base); + + MwLLFreeColor(base); +} + +static void prop_change(MwWidget handle, const char* prop) { + if(strcmp(prop, MwNwidth) == 0 || strcmp(prop, MwNheight) == 0) resize(handle); +} + +static MwWidget mwViewportGetViewportImpl(MwWidget handle) { + MwViewport vp = handle->internal; + + return vp->inframe; +} + +static void mwViewportSetSizeImpl(MwWidget handle, int w, int h) { + MwViewport vp = handle->internal; + + MwVaApply(vp->inframe, + MwNwidth, w, + MwNheight, h, + NULL); + + resize(handle); +} + +static void func_handler(MwWidget handle, const char* name, void* out, va_list va) { + if(strcmp(name, "mwViewportGetViewport") == 0) { + *(MwWidget*)out = mwViewportGetViewportImpl(handle); + } + if(strcmp(name, "mwViewportSetSize") == 0) { + int w = va_arg(va, int); + int h = va_arg(va, int); + mwViewportSetSizeImpl(handle, w, h); + } +} + +static void tick(MwWidget handle) { + MwViewport vp = handle->internal; + + if(vp->vchanged) { + int v, mv, l; + + vp->vchanged = 0; + + v = MwGetInteger(vp->vscroll, MwNvalue); + mv = MwGetInteger(vp->vscroll, MwNmaxValue); + l = MwGetInteger(vp->frame, MwNheight); + v = (mv - l) * (double)v / mv; + + if(v < 0) v = 0; + MwVaApply(vp->inframe, + MwNy, -v, + NULL); + } + if(vp->hchanged) { + int v, mv, l; + + vp->vchanged = 0; + + v = MwGetInteger(vp->hscroll, MwNvalue); + mv = MwGetInteger(vp->hscroll, MwNmaxValue); + l = MwGetInteger(vp->frame, MwNwidth); + v = (mv - l) * (double)v / mv; + + if(v < 0) v = 0; + MwVaApply(vp->inframe, + MwNx, -v, + NULL); + } +} + +MwClassRec MwViewportClassRec = { + wcreate, /* create */ + destroy, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + func_handler, /* execute */ + tick, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwViewportClass = &MwViewportClassRec; diff --git a/widget/milsko/milskosrc/src/widget/vulkan.c b/widget/milsko/milskosrc/src/widget/vulkan.c new file mode 100644 index 0000000000..f4c5340298 --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/vulkan.c @@ -0,0 +1,612 @@ +#include + +/** + * ioixd maintains this file. nishi doesn't know vulkan at all + */ + +#ifndef MW_VULKAN +#define MW_VULKAN_NO_INCLUDE +#endif +#include + +#ifdef MW_VULKAN +#ifdef USE_GDI +#define VK_USE_PLATFORM_WIN32_KHR 1 +#endif +#ifdef USE_X11 +#define VK_USE_PLATFORM_XLIB_KHR 1 +#endif +#ifdef USE_WAYLAND +#define VK_USE_PLATFORM_WAYLAND_KHR 1 +#endif +#include +#include + +#ifdef USE_GDI +#include +#endif +#ifdef USE_X11 +#include +#endif +#ifdef USE_WAYLAND +#include +#endif +#ifdef USE_COCOA +#include +#endif + +#ifdef HAS_VK_ENUM_STRING_HELPER +#include +#endif + +#include +#include + +#include "../../external/stb_ds.h" + +/* convienence macro for handling vulkan errors */ +#ifdef HAS_VK_ENUM_STRING_HELPER +#define VK_CMD(func) \ + vk_res = func; \ + if(vk_res != VK_SUCCESS) { \ + char buf[1024]; \ + MwStringPrintIntoBuffer(buf, 1024, "Vulkan error (%s:%d): %s\n", __FILE__, __LINE__, string_VkResult(vk_res)); \ + MwDispatchError(1, buf); \ + return 1; \ + } +#else +#define VK_CMD(func) \ + vk_res = func; \ + if(vk_res != VK_SUCCESS) { \ + char buf[1024]; \ + MwStringPrintIntoBuffer(buf, 1024, "Vulkan error (%s:%d): (error %d)\n", __FILE__, __LINE__, vk_res); \ + MwDispatchError(1, buf); \ + return 1; \ + } +#endif + +/* convienence macro for loading a vulkan function pointer into memory */ +#define LOAD_VK_FUNCTION(name) \ + PFN_##name _##name = (PFN_##name)o->vkGetInstanceProcAddr(o->vkInstance, #name); \ + VK_ASSERT(_##name); + +/* convienence macro to return an error if an assert goes wrong */ +#define VK_ASSERT(val) \ + if(!val) { \ + char buf[1024]; \ + MwStringPrintIntoBuffer(buf, 1024, "Vulkan error (%s:%d): Assertion Failed (%s != NULL)\n", __FILE__, __LINE__, #val); \ + MwDispatchError(1, buf); \ + return 1; \ + } + +typedef enum vulkan_supported_state_t { + VULKAN_SUPPORTED_UNKNOWN, + VULKAN_SUPPORTED_YES, + VULKAN_SUPPORTED_NO, +} vulkan_supported_state; + +vulkan_supported_state vulkan_supported = VULKAN_SUPPORTED_UNKNOWN; + +typedef struct vulkan { + void* vulkanLibrary; + PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr; + VkInstance vkInstance; + VkSurfaceKHR vkSurface; + + MwVulkanConfig vulkan_config; + + VkPhysicalDevice vkPhysicalDevice; + VkDevice vkLogicalDevice; + VkQueue vkGraphicsQueue; + VkQueue vkPresentQueue; + uint32_t vkGraphicsFamilyIDX; + uint32_t vkPresentFamilyIDX; + + const char** vkInstanceExtensions; + const char** vkDeviceExtensions; + const char** vkLayers; + int vkInstanceExtensionCount; + int vkDeviceExtensionCount; + int vkLayerCount; + + const char** enabledExtensions; + const char** enabledLayers; + +} vulkan_t; + +static int vulkan_instance_setup(MwWidget handle, vulkan_t* o); +static int vulkan_surface_setup(MwWidget handle, vulkan_t* o); +static int vulkan_devices_setup(MwWidget handle, vulkan_t* o); + +static int wcreate(MwWidget handle) { + int err; + if(!handle->internal) { + vulkan_t* o; + handle->internal = malloc(sizeof(vulkan_t)); + memset(handle->internal, 0, sizeof(vulkan_t)); + + o = handle->internal; + o->vulkan_config.api_version = VK_API_VERSION_1_0; + o->vulkan_config.vk_version = VK_VERSION_1_0; + o->vulkan_config.validation_layers = VK_FALSE; + } + + err = vulkan_instance_setup(handle, handle->internal); + if(err != 0) { + return 1; + } + err = vulkan_surface_setup(handle, handle->internal); + if(err != 0) { + return 1; + } + err = vulkan_devices_setup(handle, handle->internal); + if(err != 0) { + return 1; + } + + handle->lowlevel->common.copy_buffer = 0; + + MwSetDefault(handle); + + return 0; +} + +static int _destroy(MwWidget handle) { + vulkan_t* o = (vulkan_t*)handle->internal; + + LOAD_VK_FUNCTION(vkDestroyInstance); + LOAD_VK_FUNCTION(vkDestroySurfaceKHR); + LOAD_VK_FUNCTION(vkDestroyDevice); + + free(o->vkLayers); + free(o->vkDeviceExtensions); + free(o->vkInstanceExtensions); + _vkDestroyDevice(o->vkLogicalDevice, NULL); + _vkDestroySurfaceKHR(o->vkInstance, o->vkSurface, NULL); + _vkDestroyInstance(o->vkInstance, NULL); + MwDynamicClose(o->vulkanLibrary); + + free(o); + + return 0; +} + +static void destroy(MwWidget handle) { + int err = _destroy(handle); + + (void)err; +} + +static void* vulkan_lib_load() { +#ifdef _WIN32 + return MwDynamicOpen("vulkan-1.dll"); +#elif defined(__APPLE__) + return MwDynamicOpen("libvulkan.dylib"); +#else + return MwDynamicOpen("libvulkan.so"); +#endif +} + +static int vulkan_instance_setup(MwWidget handle, vulkan_t* o) { + uint32_t vulkan_version = o->vulkan_config.vk_version; + uint32_t api_version = o->vulkan_config.api_version; + uint32_t extension_count = 0; + uint32_t layer_count = 0; + unsigned long i = 0; + unsigned long n = 0; + + PFN_vkEnumerateInstanceExtensionProperties + _vkEnumerateInstanceExtensionProperties; + PFN_vkEnumerateInstanceLayerProperties _vkEnumerateInstanceLayerProperties; + PFN_vkCreateInstance _vkCreateInstance; + + VkApplicationInfo app_info; + VkInstanceCreateInfo instance_create_info; + + VkExtensionProperties* ext_props; + VkLayerProperties* layer_props; + + VkResult vk_res; + + /* Load Vulkan and any other function pointers we need. */ + o->vulkanLibrary = vulkan_lib_load(); + if(!o->vulkanLibrary) { + vulkan_supported = VULKAN_SUPPORTED_NO; + MwDispatchError(1, "Vulkan not found."); + } else { + vulkan_supported = VULKAN_SUPPORTED_YES; + } + + o->vkGetInstanceProcAddr = MwDynamicSymbol(o->vulkanLibrary, "vkGetInstanceProcAddr"); + VK_ASSERT(o->vkGetInstanceProcAddr); + _vkEnumerateInstanceExtensionProperties = MwDynamicSymbol(o->vulkanLibrary, "vkEnumerateInstanceExtensionProperties"); + VK_ASSERT(_vkEnumerateInstanceExtensionProperties); + _vkEnumerateInstanceLayerProperties = MwDynamicSymbol(o->vulkanLibrary, "vkEnumerateInstanceLayerProperties"); + VK_ASSERT(_vkEnumerateInstanceLayerProperties); + _vkCreateInstance = MwDynamicSymbol(o->vulkanLibrary, "vkCreateInstance"); + VK_ASSERT(_vkCreateInstance); + + /* setup enabled extensions */ + arrput(o->enabledExtensions, VK_KHR_SURFACE_EXTENSION_NAME); +#ifdef USE_GDI + if(handle->lowlevel->common.type == MwLLBackendGDI) { + arrput(o->enabledExtensions, VK_KHR_WIN32_SURFACE_EXTENSION_NAME); + } +#endif +#ifdef USE_X11 + if(handle->lowlevel->common.type == MwLLBackendX11) { + arrput(o->enabledExtensions, VK_KHR_XLIB_SURFACE_EXTENSION_NAME); + } +#endif +#ifdef USE_WAYLAND + if(handle->lowlevel->common.type == MwLLBackendWayland) { + arrput(o->enabledExtensions, VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME); + /* take this opprutunity to set the widget to always render */ + MwWaylandVulkan = MwTRUE; + } +#endif +#ifdef USE_COCOA + if(handle->lowlevel->common.type == MwLLBackendCocoa) { + arrput(o->enabledExtensions, VK_EXT_METAL_SURFACE_EXTENSION_NAME); + } +#endif + + /* passing null gives us all the extensions provided by the current vulkan implementation */ + VK_CMD(_vkEnumerateInstanceExtensionProperties(NULL, &extension_count, NULL)); + ext_props = malloc(sizeof(VkExtensionProperties) * extension_count); + VK_CMD(_vkEnumerateInstanceExtensionProperties(NULL, &extension_count, ext_props)); + o->vkInstanceExtensions = malloc(sizeof(const char*) * (arrlen(o->enabledExtensions) + 1)); + + for(i = 0; i < extension_count; i++) { + for(n = 0; n < (unsigned long)arrlen(o->enabledExtensions); n++) { + if(strcmp(ext_props[i].extensionName, o->enabledExtensions[n]) == 0) { + printf("[Vulkan Widget] Enabling extension %s\n", ext_props[i].extensionName); + o->vkInstanceExtensions[o->vkInstanceExtensionCount] = ext_props[i].extensionName; + o->vkInstanceExtensionCount++; + break; + } + } + } + + app_info = (VkApplicationInfo){ + .sType = VK_STRUCTURE_TYPE_APPLICATION_INFO, + .pNext = NULL, + .pApplicationName = "", + .applicationVersion = vulkan_version, + .pEngineName = "", + .engineVersion = vulkan_version, + .apiVersion = api_version, + }; + + VK_CMD(_vkEnumerateInstanceLayerProperties(&layer_count, NULL)); + layer_props = malloc(sizeof(VkLayerProperties) * layer_count); + VK_CMD(_vkEnumerateInstanceLayerProperties(&layer_count, layer_props)); + o->vkLayers = malloc(256 * (arrlen(o->enabledLayers) + 1)); + + if(o->vulkan_config.validation_layers) { + arrput(o->enabledLayers, "VK_LAYER_KHRONOS_validation"); + } + for(i = 0; i < layer_count; i++) { + for(n = 0; n < (unsigned long)arrlen(o->enabledLayers); n++) { + if(strcmp(layer_props[i].layerName, o->enabledLayers[n]) == 0) { + printf("[Vulkan Widget] Enabling layer %s\n", layer_props[i].layerName); + o->vkLayers[o->vkLayerCount] = layer_props[i].layerName; + o->vkLayerCount++; + break; + } + } + } + o->vkLayers[i++] = NULL; + + instance_create_info = (VkInstanceCreateInfo){ + .sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, + .flags = 0, + .pApplicationInfo = &app_info, + .enabledExtensionCount = o->vkInstanceExtensionCount, + .enabledLayerCount = o->vkLayerCount, + .ppEnabledExtensionNames = o->vkInstanceExtensions, + .ppEnabledLayerNames = o->vkLayers, + }; + instance_create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; + + VK_CMD(_vkCreateInstance(&instance_create_info, NULL, &o->vkInstance)); + return 0; +} + +static int vulkan_surface_setup(MwWidget handle, vulkan_t* o) { + int vk_res; +#ifdef USE_GDI + if(handle->lowlevel->common.type == MwLLBackendGDI) { + LOAD_VK_FUNCTION(vkCreateWin32SurfaceKHR); + + VkWin32SurfaceCreateInfoKHR createInfo = { + .sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR, + .pNext = NULL, + .flags = 0, + .hinstance = handle->lowlevel->gdi.hInstance, + .hwnd = handle->lowlevel->gdi.hWnd, + }; + + VK_CMD(_vkCreateWin32SurfaceKHR(o->vkInstance, &createInfo, NULL, + &o->vkSurface)); + } +#endif +#ifdef USE_X11 + if(handle->lowlevel->common.type == MwLLBackendX11) { + LOAD_VK_FUNCTION(vkCreateXlibSurfaceKHR); + + VkXlibSurfaceCreateInfoKHR createInfo = { + .sType = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR, + .pNext = NULL, + .flags = 0, + .dpy = handle->lowlevel->x11.display, + .window = handle->lowlevel->x11.window, + }; + VK_CMD(_vkCreateXlibSurfaceKHR(o->vkInstance, &createInfo, NULL, &o->vkSurface)); + } +#endif +#ifdef USE_WAYLAND + if(handle->lowlevel->common.type == MwLLBackendWayland) { + LOAD_VK_FUNCTION(vkCreateWaylandSurfaceKHR); + + VkWaylandSurfaceCreateInfoKHR createInfo = { + .sType = VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR, + .pNext = NULL, + .flags = 0, + .display = handle->lowlevel->wayland.display, + .surface = handle->lowlevel->wayland.framebuffer.surface, + }; + VK_CMD(_vkCreateWaylandSurfaceKHR(o->vkInstance, &createInfo, NULL, &o->vkSurface)); + } +#endif +#ifdef USE_COCOA + if(handle->lowlevel->common.type == MwLLBackendCocoa) { + VkMetalSurfaceCreateInfoEXT MwCocoaGetMetalSurfaceCreateInfo(MwWidget handle); + VkMetalSurfaceCreateInfoEXT inf = MwCocoaGetMetalSurfaceCreateInfo(handle); + + LOAD_VK_FUNCTION(vkCreateMetalSurfaceEXT); + + VK_CMD(_vkCreateMetalSurfaceEXT(o->vkInstance, &inf, NULL, &o->vkSurface)); + } +#endif + return 0; +} + +static int vulkan_devices_setup(MwWidget handle, vulkan_t* o) { + (void)(handle); + + int vk_res; + unsigned long i, n; + uint32_t deviceCount; + VkPhysicalDevice* devices; + uint32_t queueFamilyCount; + VkQueueFamilyProperties* family_props; + float queuePriority = 1.0f; + VkDeviceQueueCreateInfo queueCreateInfos[2]; + VkDeviceCreateInfo createInfo; + VkExtensionProperties* ext_props; + uint32_t extension_count; + VkBool32 has_graphics = false; + VkBool32 has_present = false; + int queueCreateCount = 0; + + LOAD_VK_FUNCTION(vkEnumeratePhysicalDevices); + LOAD_VK_FUNCTION(vkGetPhysicalDeviceQueueFamilyProperties); + LOAD_VK_FUNCTION(vkCreateDevice); + LOAD_VK_FUNCTION(vkGetDeviceQueue); + LOAD_VK_FUNCTION(vkGetPhysicalDeviceSurfaceSupportKHR); + LOAD_VK_FUNCTION(vkEnumerateDeviceExtensionProperties); + + /* create the physical device */ + VK_CMD(_vkEnumeratePhysicalDevices(o->vkInstance, &deviceCount, NULL)); + devices = malloc(sizeof(VkPhysicalDevice) * deviceCount); + VK_CMD(_vkEnumeratePhysicalDevices(o->vkInstance, &deviceCount, devices)); + + for(i = 0; i < deviceCount; i++) { + _vkGetPhysicalDeviceQueueFamilyProperties(devices[i], &queueFamilyCount, NULL); + family_props = malloc(sizeof(VkQueueFamilyProperties) * queueFamilyCount); + _vkGetPhysicalDeviceQueueFamilyProperties(devices[i], &queueFamilyCount, family_props); + o->vkGraphicsFamilyIDX = 0; + o->vkPresentFamilyIDX = 0; + for(n = 0; n < queueFamilyCount; n++) { + if(family_props[n].queueFlags & VK_QUEUE_GRAPHICS_BIT) { + has_graphics = true; + o->vkGraphicsFamilyIDX = n; + }; + + _vkGetPhysicalDeviceSurfaceSupportKHR(devices[i], n, o->vkSurface, + &has_present); + if(has_present) { + o->vkPresentFamilyIDX = n; + } + if(has_graphics && has_present) { + o->vkPhysicalDevice = devices[i]; + break; + } + } + free(family_props); + } + if(!has_graphics && !has_present) { + /* rare, yes, but idk maybe some shitty drivers will present this dillema idk. */ + MwDispatchError(1, "There were no devices with either a graphics or presentation queue.\n"); + return 1; + } + + /* create the logical device */ + queueCreateInfos[queueCreateCount] = (VkDeviceQueueCreateInfo){ + .sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, + .pNext = NULL, + .flags = 0, + .queueFamilyIndex = o->vkGraphicsFamilyIDX, + .queueCount = 1, + .pQueuePriorities = &queuePriority, + }; + if(o->vkGraphicsFamilyIDX == o->vkPresentFamilyIDX) { + queueCreateInfos[queueCreateCount++] = (VkDeviceQueueCreateInfo){ + .sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, + .pNext = NULL, + .flags = 0, + .queueFamilyIndex = o->vkPresentFamilyIDX, + .queueCount = 1, + .pQueuePriorities = &queuePriority, + }; + } + + VK_CMD(_vkEnumerateDeviceExtensionProperties(o->vkPhysicalDevice, NULL, &extension_count, NULL)); + ext_props = malloc(sizeof(VkExtensionProperties) * extension_count); + VK_CMD(_vkEnumerateDeviceExtensionProperties(o->vkPhysicalDevice, NULL, &extension_count, ext_props)); + o->vkDeviceExtensions = malloc(sizeof(const char*) * (arrlen(o->enabledExtensions) + 1)); + + for(i = 0; i < extension_count; i++) { + for(n = 0; n < (unsigned long)arrlen(o->enabledExtensions); n++) { + if(strcmp(ext_props[i].extensionName, o->enabledExtensions[n]) == 0) { + o->vkDeviceExtensions[o->vkDeviceExtensionCount] = ext_props[i].extensionName; + o->vkDeviceExtensionCount++; + break; + } + } + } + + createInfo = (VkDeviceCreateInfo){ + .sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, + .pNext = NULL, + .flags = 0, + .queueCreateInfoCount = queueCreateCount, + .pQueueCreateInfos = queueCreateInfos, + .pEnabledFeatures = NULL, + .enabledExtensionCount = o->vkDeviceExtensionCount, + .ppEnabledExtensionNames = o->vkDeviceExtensions, + .enabledLayerCount = o->vkLayerCount, + .ppEnabledLayerNames = o->vkLayers, + }; + + VK_CMD(_vkCreateDevice(o->vkPhysicalDevice, &createInfo, NULL, &o->vkLogicalDevice) != VK_SUCCESS); + + _vkGetDeviceQueue(o->vkLogicalDevice, o->vkGraphicsFamilyIDX, 0, &o->vkGraphicsQueue); + if(o->vkGraphicsFamilyIDX == o->vkPresentFamilyIDX) { + o->vkPresentQueue = o->vkGraphicsQueue; + } else { + _vkGetDeviceQueue(o->vkLogicalDevice, o->vkPresentFamilyIDX, 0, &o->vkPresentQueue); + } + free(devices); + return 0; +} + +int MwVulkanSupported(void) { + if(vulkan_supported == VULKAN_SUPPORTED_UNKNOWN) { + void* lib = vulkan_lib_load(); + if(lib == NULL) { + vulkan_supported = VULKAN_SUPPORTED_NO; + } else { + vulkan_supported = VULKAN_SUPPORTED_YES; + MwDynamicClose(lib); + } + } + if(vulkan_supported == VULKAN_SUPPORTED_YES) { + return 1; + } else { + return 0; + } +}; + +static void* mwVulkanGetFieldImpl(MwWidget handle, int field, int* err) { + vulkan_t* o = handle->internal; + char buf[1024]; + + switch(field) { + case MwVULKANFIELD_GETINSTANCEPROCADDR: + return o->vkGetInstanceProcAddr; + case MwVULKANFIELD_INSTANCE: + return o->vkInstance; + case MwVULKANFIELD_SURFACE: + return o->vkSurface; + case MwVULKANFIELD_PHYSICALDEVICE: + return o->vkPhysicalDevice; + case MwVULKANFIELD_LOGICALDEVICE: + return o->vkLogicalDevice; + case MwVULKANFIELD_GRAPHICSQUEUEINDEX: + return &o->vkGraphicsFamilyIDX; + case MwVULKANFIELD_PRESENTQUEUEINDEX: + return &o->vkPresentFamilyIDX; + case MwVULKANFIELD_GRAPHICSQUEUE: + return o->vkGraphicsQueue; + case MwVULKANFIELD_PRESENTQUEUE: + return o->vkPresentQueue; + default: + MwStringPrintIntoBuffer(buf, 1024, "Unknown vulkan field request (%d given)", field); + MwDispatchError(1, buf); + if(err != NULL) { + *err = 1; + } + return NULL; + } + if(err != NULL) { + *err = 0; + } +} + +static void prop_change(MwWidget handle, const char* prop) { + vulkan_t* o = (vulkan_t*)handle->internal; + if(!o) { + handle->internal = malloc(sizeof(vulkan_t)); + o = (vulkan_t*)handle->internal; + memset(o, 0, sizeof(vulkan_t)); + o->vulkan_config.api_version = VK_API_VERSION_1_0; + o->vulkan_config.vk_version = VK_VERSION_1_0; + o->vulkan_config.validation_layers = VK_FALSE; + } + + if(strcmp(prop, MwNvulkanExtension) == 0) { + char* str = MwStringDuplicate(MwGetText(handle, MwNvulkanExtension)); + + arrput(o->enabledExtensions, str); + } else if(strcmp(prop, MwNvulkanLayer) == 0) { + char* str = MwStringDuplicate(MwGetText(handle, MwNvulkanExtension)); + + arrput(o->enabledLayers, str); + } else if(strcmp(prop, MwNvulkanConfig) == 0) { + memcpy(&o->vulkan_config, MwGetVoid(handle, MwNvulkanConfig), sizeof(MwVulkanConfig)); + } +} + +static void func_handler(MwWidget handle, const char* name, void* output, va_list va) { + if(strcmp(name, "mwVulkanGetField") == 0) { + int field = va_arg(va, int); + int* err = va_arg(va, int*); + *(void**)output = mwVulkanGetFieldImpl(handle, field, err); + } +} + +MwClassRec MwVulkanClassRec = { + wcreate, /* create */ + destroy, /* destroy */ + NULL, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + func_handler, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwVulkanClass = &MwVulkanClassRec; +#else +MwClass MwVulkanClass = NULL; + +void MwVulkanConfigure(MwVulkanConfig* cfg) { + (void)cfg; +} + +int MwVulkanSupported(void) { + return 0; +} +#endif diff --git a/widget/milsko/milskosrc/src/widget/window.c b/widget/milsko/milskosrc/src/widget/window.c new file mode 100644 index 0000000000..3d0afe254e --- /dev/null +++ b/widget/milsko/milskosrc/src/widget/window.c @@ -0,0 +1,75 @@ +#include + +static int wcreate(MwWidget handle) { + MwSetDefault(handle); + + MwSetInteger(handle, MwNhasBorder, 0); + MwSetInteger(handle, MwNinverted, 1); + + return 0; +} + +static void draw(MwWidget handle) { + MwLLColor c = MwParseColor(handle, MwGetText(handle, MwNbackground)); + MwRect r; + + r.x = 0; + r.y = 0; + r.width = MwGetInteger(handle, MwNwidth); + r.height = MwGetInteger(handle, MwNheight); + + if(MwGetInteger(handle, MwNhasBorder)) MwDrawFrame(handle, &r, c, MwGetInteger(handle, MwNinverted)); + + MwDrawRect(handle, &r, c); + + MwLLFreeColor(c); +} + +static void prop_change(MwWidget handle, const char* key) { + if(strcmp(key, MwNhasBorder) == 0 || strcmp(key, MwNinverted) == 0) MwForceRender(handle); +} + +static void mwWindowMakeBorderlessImpl(MwWidget handle, int toggle) { + MwLLBeginStateChange(handle->lowlevel); + MwLLMakeBorderless(handle->lowlevel, toggle); + MwLLEndStateChange(handle->lowlevel); +} + +static void mwWindowShouldCloseImpl(MwWidget handle, MwBool* out) { + *out = handle->close; +} + +static void func_handler(MwWidget handle, const char* name, void* out, va_list va) { + (void)out; + + if(strcmp(name, "mwWindowMakeBorderless") == 0) { + int toggle = va_arg(va, int); + mwWindowMakeBorderlessImpl(handle, toggle); + } + if(strcmp(name, "mwWindowShouldClose") == 0) { + MwBool* out = va_arg(va, MwBool*); + mwWindowShouldCloseImpl(handle, out); + } +} +MwClassRec MwWindowClassRec = { + wcreate, /* create */ + NULL, /* destroy */ + draw, /* draw */ + NULL, /* click */ + NULL, /* parent_resize */ + prop_change, /* prop_change */ + NULL, /* mouse_move */ + NULL, /* mouse_up */ + NULL, /* mouse_down */ + NULL, /* key */ + func_handler, /* execute */ + NULL, /* tick */ + NULL, /* resize */ + NULL, /* children_update */ + NULL, /* children_prop_change */ + NULL, /* clipboard */ + NULL, /* props_change */ + NULL, + NULL, + NULL}; +MwClass MwWindowClass = &MwWindowClassRec; diff --git a/widget/milsko/milskosrc/tools/.gitignore b/widget/milsko/milskosrc/tools/.gitignore new file mode 100644 index 0000000000..0581170fb4 --- /dev/null +++ b/widget/milsko/milskosrc/tools/.gitignore @@ -0,0 +1,2 @@ +font +fuzzer diff --git a/widget/milsko/milskosrc/tools/Makefile b/widget/milsko/milskosrc/tools/Makefile new file mode 100644 index 0000000000..036e365888 --- /dev/null +++ b/widget/milsko/milskosrc/tools/Makefile @@ -0,0 +1,24 @@ +CC = gcc +CFLAGS = `pkg-config --cflags freetype2` -I../include +LDFLAGS = +LIBS = `pkg-config --libs freetype2` + +.PHONY: all clean +.SUFFIXES: .c .o + +all: fuzzer font icon-converter icon-converter + +fuzzer: fuzzer.o + $(CC) -g -L../src/ -Wl,-R../src -o $@ fuzzer.o -lMw + +font: font.o + $(CC) $(LDFLAGS) -o $@ font.o $(LIBS) + +icon-converter: icon-converter.o + $(CC) -o $@ icon-converter.o -lm + +.c.o: + $(CC) $(CFLAGS) -c -o $@ $< + +clean: + rm -f *.o font fuzzer icon-converter diff --git a/widget/milsko/milskosrc/tools/archive.sh b/widget/milsko/milskosrc/tools/archive.sh new file mode 100644 index 0000000000..2a1c1f4972 --- /dev/null +++ b/widget/milsko/milskosrc/tools/archive.sh @@ -0,0 +1,20 @@ +#!/bin/sh +MAKE=make +if which gmake >/dev/null 2>&1; then + MAKE=gmake +fi +VERSION=`cat include/Mw/Version.h | grep -E 'MwVERSION' | grep -oE '"[^"]+"' | sed 's/"//g'` + +$MAKE clean +OLD=`pwd` +rm -rf /tmp/milsko-$VERSION *.tar.gz +mkdir -p /tmp/milsko-$VERSION + +cp -rf * /tmp/milsko-$VERSION/ + +cd /tmp + +tar czvf /tmp/milsko-$VERSION.tar.gz milsko-$VERSION + +rm -rf /tmp/milsko-$VERSION +mv /tmp/milsko-$VERSION.tar.gz $OLD/ diff --git a/widget/milsko/milskosrc/tools/color.pl b/widget/milsko/milskosrc/tools/color.pl new file mode 100644 index 0000000000..eca072ca13 --- /dev/null +++ b/widget/milsko/milskosrc/tools/color.pl @@ -0,0 +1,51 @@ +#!/usr/bin/env perl +open(IN, "<", "resource/rgb.txt"); +open(OUT, ">", "src/color.c"); + +print(OUT "#include \n"); +print(OUT "\n"); +print(OUT "#include \"../external/stb_ds.h\"\n"); +print(OUT "\n"); +print(OUT "struct color {\n"); +print(OUT " char* key;\n"); +print(OUT " MwU32 value;\n"); +print(OUT "};\n"); +print(OUT "\n"); +print(OUT "static struct color* colors = NULL;\n"); +print(OUT "\n"); +print(OUT "MwLLColor MwParseColorName(MwWidget handle, const char* color){\n"); +print(OUT " MwRGB rgb;\n"); +print(OUT " MwParseColorNameNoAllocate(color, &rgb);\n"); +print(OUT +" return MwLLAllocColor(handle->lowlevel, rgb.red, rgb.green, rgb.blue);\n" +); +print(OUT "}\n"); +print(OUT "\n"); +print(OUT "void MwParseColorNameNoAllocate(const char* color, MwRGB* rgb){\n"); +print(OUT " MwU32 v = shget(colors, color);"); +print(OUT " rgb->red = (v >> 16) & 0xff;"); +print(OUT " rgb->green = (v >> 8) & 0xff;"); +print(OUT " rgb->blue = (v >> 0) & 0xff;"); +print(OUT "}\n"); +print(OUT "\n"); +print(OUT + "static void add_color(const char* name, int red, int green, int blue){\n" +); +print(OUT " MwU32 v = (red << 16) | (green << 8) | (blue << 0);\n"); +print(OUT " shput(colors, name, v);\n"); +print(OUT "}\n"); +print(OUT "\n"); +print(OUT "void MwColorTableInit(void){\n"); +print(OUT " sh_new_strdup(colors);\n"); +print(OUT " shdefault(colors, 0);\n"); + +while (my $l = ) { + $l =~ s/\r?\n$//; + if ($l =~ /^[ \t]*([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+(.+)$/) { + print(OUT " add_color(\"$4\", $1, $2, $3);\n"); + } +} +print(OUT "}\n"); + +close(OUT); +close(IN); diff --git a/widget/milsko/milskosrc/tools/cursor.pl b/widget/milsko/milskosrc/tools/cursor.pl new file mode 100644 index 0000000000..1d3ca04f69 --- /dev/null +++ b/widget/milsko/milskosrc/tools/cursor.pl @@ -0,0 +1,136 @@ +#!/usr/bin/env perl +my $font = $ARGV[0]; +my $name = $ARGV[1]; +my $out = $ARGV[2]; +my $char = ""; +my $bmp = 0; + +my $w = 0; +my $h = 0; +my $ln = 0; +my $com = 0; +my $nocom = 0; + +my $MAX = 16; + +if ($name) { + print("#include \n"); + print("\n"); +} + +open(IN, "<", $font) or die; +while (my $l = ) { + $l =~ s/\r?\n$//g; + if (!$name && ($l =~ /^STARTCHAR ("?)(.+)\1$/)) { + if (!($2 =~ /_mask$/)) { + print("$2\n"); + } + } + elsif ($name && ($l =~ /^COPYRIGHT ("?)(.+)\1$/)) { + if (!$com) { + print("/**\n"); + } + else { + print(" *\n"); + } + print(" * Copyright notice:\n"); + print(" * $2\n"); + if (!$com) { + print(" */\n"); + } + } + elsif ($name && ($l =~ /^COMMENT ("?)(.+)\1$/)) { + if (!$nocom) { + if (!$com) { + $com = 1; + print("/**\n"); + } + print(" * $2\n"); + } + } + elsif ($name && ($l =~ /^ENDPROPERTIES$/)) { + if ($com) { + print(" */\n"); + $com = 0; + $nocom = 1; + } + } + elsif ( + $name + && ( ($l =~ /^STARTCHAR ("?)\Q$name\E\1$/) + || ($l =~ /^STARTCHAR ("?)\Q${name}\E_(mask)\1$/)) + ) + { + my $suffix = ""; + if ($2) { + $suffix = "Mask"; + } + $char = $name; + print("MwCursor MwCursor$out$suffix = {\n"); + } + elsif ($name + && $char + && ($l =~ /^BBX (\-?[0-9]+) (\-?[0-9]+) (\-?[0-9]+) (\-?[0-9]+)$/)) + { + print(" $1, $2, $3, $4,\n"); + + $w = $1 + 0; + $h = $2 + 0; + } + elsif ($name && $char && ($l =~ /^BITMAP$/)) { + print(" {\n"); + $bmp = 1; + $ln = 0; + } + elsif ($name && $char && ($l =~ /^ENDCHAR$/)) { + $bmp = 0; + $char = ""; + for (my $i = 0 ; $i < ($MAX - $h) ; $i++) { + if ($i == ($MAX - $h - 1)) { + print(" 0\n"); + } + else { + print(" 0,\n"); + } + } + print(" }\n"); + print("};\n"); + } + elsif ($bmp) { + my $txt = ""; + + my $c = 0; + my $n = 0; + my $incr = 0; + + my $num = 0; + + while ($c < $w) { + if (($c % 8) == 0) { + $n = hex("0x" . substr($l, $incr, 2)); + $incr += 2; + } + + $num = $num << 1; + if ($n & (1 << 7)) { + $num = $num | 1; + $txt = $txt . "#"; + } + else { + $num = $num | 0; + $txt = $txt . "."; + } + + $n = $n << 1; + $c = $c + 1; + } + $ln = $ln + 1; + if ($ln == $MAX) { + print(" $num /* $txt */\n"); + } + else { + print(" $num, /* $txt */\n"); + } + } +} +close(IN); diff --git a/widget/milsko/milskosrc/tools/doxygen.sh b/widget/milsko/milskosrc/tools/doxygen.sh new file mode 100644 index 0000000000..51de42c931 --- /dev/null +++ b/widget/milsko/milskosrc/tools/doxygen.sh @@ -0,0 +1,4 @@ +#!/bin/sh +doxygen +rm -rf /var/www/milsko-doxygen +cp -rf doxygen/html /var/www/milsko-doxygen diff --git a/widget/milsko/milskosrc/tools/font.c b/widget/milsko/milskosrc/tools/font.c new file mode 100644 index 0000000000..999b47efb4 --- /dev/null +++ b/widget/milsko/milskosrc/tools/font.c @@ -0,0 +1,70 @@ +#include +#include FT_FREETYPE_H +#include FT_BITMAP_H +#include FT_BDF_H + +#include +#include + +int main(int argc, char** argv) { + FT_Library lib; + FT_Face face; + int i; + int ay = 0; + int ax = 0; + int sy = 0; + int sx = 0; + BDF_PropertyRec rec; + + FT_Init_FreeType(&lib); + if(FT_New_Face(lib, argv[1], 0, &face)) { + fprintf(stderr, "bad 1\n"); + return 1; + } + + if(FT_Set_Pixel_Sizes(face, 0, atoi(argv[2]))) { + fprintf(stderr, "bad 2\n"); + return 1; + } + + FT_Get_BDF_Property(face, "COPYRIGHT", &rec); + + printf("#include \n"); + printf("\n"); + printf("/**\n"); + printf(" * Copyright notice:\n"); + printf(" * \"%s\"\n", rec.u.atom); + printf(" */\n"); + printf("MwFont MwFontData[] = {\n"); + for(i = 0; i < 0x100; i++) { + int y, x; + FT_Bitmap bitmap; + unsigned char n; + if(FT_Load_Char(face, i, FT_LOAD_RENDER | FT_LOAD_COLOR)) { + continue; + } + + FT_Bitmap_Init(&bitmap); + FT_Bitmap_Convert(lib, &face->glyph->bitmap, &bitmap, 1); + + printf("\t{%d, %d, {", face->glyph->bitmap_left, face->glyph->bitmap_top); + for(y = 0; y < atoi(argv[2]) - bitmap.rows; y++) { + printf("0%s", y == atoi(argv[2]) - 1 ? "" : ", "); + } + for(y = 0; y < bitmap.rows; y++) { + n = 0; + for(x = 0; x < bitmap.width; x++) { + unsigned char b = bitmap.buffer[bitmap.width * y + x] ? 1 : 0; + n = n << 1; + n = n | b; + } + printf("%d%s", n, y == (bitmap.rows - 1) ? "" : ", "); + } + printf("}}%s /* %d */\n", i == (0x100 - 1) ? "" : ", ", i); + + FT_Bitmap_Done(lib, &bitmap); + + sx += face->glyph->advance.x >> 6; + } + printf("};\n"); +} diff --git a/widget/milsko/milskosrc/tools/fuzzer.c b/widget/milsko/milskosrc/tools/fuzzer.c new file mode 100644 index 0000000000..dae1dde25a --- /dev/null +++ b/widget/milsko/milskosrc/tools/fuzzer.c @@ -0,0 +1,76 @@ +#include +#include + +#define WIDGET_AMOUNT 16 + +#define H(h) {&h, #h} + +typedef struct cls_pair { + MwClass* cls; + const char* name; +} cls_pair_t; + +cls_pair_t classes[] = {H(MwBoxClass), H(MwButtonClass), H(MwCheckBoxClass), H(MwComboBoxClass), H(MwEntryClass), H(MwFrameClass), H(MwImageClass), H(MwLabelClass), H(MwListBoxClass), H(MwMenuClass), H(MwNumberEntryClass), H(MwProgressBarClass), H(MwRadioBoxClass), H(MwScrollBarClass), H(MwSeparatorClass), H(MwTreeViewClass), H(MwViewportClass)}; +char* int_params[] = {/*MwNx, MwNy, MwNwidth, MwNheight,*/ MwNorientation, MwNminValue, MwNmaxValue, MwNvalue, MwNchangedBy, MwNareaShown, MwNchecked, MwNalignment, MwNbold, MwNmain, MwNleftPadding, MwNhasHeading, MwNhasBorder, MwNinverted, MwNmodernLook, MwNwaitMS, MwNhideInput, MwNsingleClickSelectable, MwNflat, MwNshowArrows, MwNpadding, MwNborderWidth, MwNfillArea, MwNratio, MwNfixedSize, MwNmargin, MwNbitmapFont, MwNsevenSegment, MwNlength, MwNforceInverted, MwNisRounded, MwNdarkTheme}; +unsigned long maxxes[] = {UINT8_MAX, UINT16_MAX, UINT32_MAX, UINT64_MAX}; + +int main() { + int i, j = 0, max = 0; + char input; + MwWidget window, widget; + unsigned long upper_limit; + + printf("How many iteration do you want to do? Type -1 if you wanna run it forever.\n"); + scanf("%d", &max); + + printf("What upper limit of int params do you want to test?\n"); + for(i = 0; i < (sizeof(maxxes) / sizeof(unsigned long)); i++) { + printf("%d) %lu\n", i, maxxes[i]); + } +get_input: + input = getchar(); + switch(input) { + case '0': + upper_limit = maxxes[0]; + break; + case '1': + upper_limit = maxxes[1]; + break; + case '2': + upper_limit = maxxes[2]; + break; + case '3': + upper_limit = maxxes[3]; + break; + default: + upper_limit = maxxes[0]; + // printf("Invalid value. Pick 0-3.\n"); + // goto get_input; + } + + MwLibraryInit(); + + window = MwCreateWidget(MwWindowClass, "window", NULL, 0, 0, 400, 400); + + while(MwPending(window) && (max == -1 || j < max)) { + int class_num = rand() % (sizeof(classes) / sizeof(cls_pair_t)); + widget = MwCreateWidget(*classes[class_num].cls, classes[class_num].name, window, 0, 0, 100, 100); + + printf("%s\n", classes[class_num].name); + /* apply int params with random scale */ + for(i = 0; i < (sizeof(int_params) / sizeof(void*)); i++) { + unsigned long number = rand() % upper_limit; + printf("> %s = %lu\n", int_params[i], number); + MwVaApply(widget, int_params[i], number, NULL); + } + MwStep(window); + + MwDestroyWidget(widget); + + printf("\n"); + + j++; + } + + MwFreeWidget(window); +} diff --git a/widget/milsko/milskosrc/tools/gendcl.pl b/widget/milsko/milskosrc/tools/gendcl.pl new file mode 100644 index 0000000000..f2e3399c37 --- /dev/null +++ b/widget/milsko/milskosrc/tools/gendcl.pl @@ -0,0 +1,105 @@ +#!/usr/bin/env perl + +our $clean = 0; +my @objs = (); + +sub compile { + my ($source) = @_; + my $object = ""; + my $dir = ""; + + $dir = $source; + $dir =~ s/\/([^\/]+)$//; + + $source =~ s/^(.+)\/([^\/]+)$/[\/\1]\2/; + $source =~ s/\//\./g; + + $object = $source; + $object =~ s/\.c$/.obj/; + + print(OUT "\$ if f\$search(\"$object;*\") .eqs. \"\"\n"); + print(OUT "\$ then\n"); + print(OUT "\$ write sys\$output \"CC $object\"\n"); + print(OUT +"\$ cc /include_directory=(\"./include\",\"./$dir\") /define=(_MILSKO,USE_X11,NO_IMAGE) /object=$object $source\n" + ); + print(OUT "\$ endif\n"); + + push(@objs, $object); +} + +sub clean { + my ($source) = @_; + my $object = ""; + my $dir = ""; + + $source =~ s/^(.+)\/([^\/]+)$/[\/\1]\2/; + $source =~ s/\//\./g; + + $object = $source; + $object =~ s/\.c$/.obj/; + + print(OUT + "\$ if f\$search(\"$object\") .nes. \"\" then delete $object;*\n"); +} + +sub thing { + if ($clean) { + clean($_[0]); + } + else { + compile($_[0]); + } +} + +sub scan { + my ($dir) = @_; + + opendir(my $dh, $dir); + while (my $file = readdir($dh)) { + if ( !(($dir . "/" . $file) eq "src/widget/opengl.c") + && !(($dir . "/" . $file) eq "src/widget/vulkan.c") + && !(($dir . "/" . $file) eq "external/stb_truetype.c") + && !(($dir . "/" . $file) eq "external/stb_image.c") + && ($file =~ /\.c$/)) + { + thing($dir . "/" . $file); + } + } + closedir($dh); +} + +for (my $i = 0 ; $i < 2 ; $i++) { + $clean = $i; + + open(OUT, ">", $i == 0 ? "vms/build.com" : "vms/clean.com"); + scan("src"); + scan("src/cursor"); + scan("src/widget"); + scan("src/dialog"); + scan("src/font"); + scan("src/icon"); + scan("src/abstract"); + scan("external"); + thing("src/backend/x11.c"); + + if ($i == 0) { + print(OUT "\$ if f\$search(\"[.src]MwSHR.exe;*\") .eqs. \"\"\n"); + print(OUT "\$ then\n"); + print(OUT "\$ write sys\$output \"LINK [.src]MwSHR.exe\"\n"); + print(OUT "\$ OPEN /WRITE LINK_OPT LINK.OPT\n"); + foreach my $obj (@objs) { + print(OUT "\$ WRITE LINK_OPT \"$obj\"\n"); + } + print(OUT "\$ WRITE LINK_OPT \"SYS\$LIBRARY:DECW\$XLIBSHR/SHARE\"\n"); + print(OUT "\$ WRITE LINK_OPT \"SYS\$LIBRARY:DPML\$SHR/SHARE\"\n"); + print(OUT "\$ CLOSE LINK_OPT\n"); + print(OUT "\$ link /SHAREABLE=[.src]MwSHR.exe LINK.OPT/options\n"); + print(OUT "\$ DELETE LINK.OPT;*\n"); + print(OUT "\$ endif\n"); + } + else { + clean("src/MwSHR.exe"); + } + close(OUT); +} diff --git a/widget/milsko/milskosrc/tools/genmk.pl b/widget/milsko/milskosrc/tools/genmk.pl new file mode 100644 index 0000000000..9903c116de --- /dev/null +++ b/widget/milsko/milskosrc/tools/genmk.pl @@ -0,0 +1,235 @@ +#!/usr/bin/env perl +my @cfiles = (); +my @examples = (); + +sub scan { + opendir(DIR, $_[0]); + my @files = readdir(DIR); + foreach my $f (@files) { + if ($f =~ /^vulkan\.c$/) { + next; + } + if ($f =~ /\.c$/) { + push(@cfiles, $_[0] . "/" . $f); + } + } + closedir(DIR); +} + +sub scan_examples { + opendir(DIR, $_[0]); + my @files = readdir(DIR); + foreach my $f (@files) { + if ($f =~ /^glutlayer\.c$/) { + next; + } + if ($f =~ /\.c$/) { + push(@examples, $_[0] . "/" . $f); + } + } + closedir(DIR); +} + +sub cobjs { + my $r = ""; + foreach my $f (@cfiles) { + my $b = $f; + $b =~ s/\.c$/.obj/; + $b =~ s/\//$_[0]/g; + + $r = $r . " " . $_[1] . $b; + } + return $r; +} + +sub generate { + my ($output, $type) = @_; + + my $cc = ""; + my $link = ""; + + my $suffix = 1; + my $symbolic = ""; + my $dir = "\\"; + my $del = "del /f /q"; + my $out = ""; + my $dllout = ""; + my $exeout = ""; + my $def = ""; + my $inc = ""; + my $cdll = ""; + my $dll = ""; + my $exe = ""; + my $prefobj = ""; + my $needlibs = ""; + my $lib = ""; + my $c_dllout = ""; + my $c_dllafter = ""; + + if ($type eq "Borland") { + $cc = "bcc32 -c"; + $link = "bcc32"; + $out = "-o"; + $dllout = "-e"; + $exeout = "-e"; + $def = "-D"; + $inc = "-I"; + $dll = "-tWD"; + $lib = "-l"; + + $c_dllafter = "implib src${dir}Mw.lib src${dir}Mw.dll"; + } + elsif ($type eq "MSVC") { + $cc = "cl /TC /c /nologo"; + $link = "link /nologo"; + $out = "/Fo"; + $dllout = "/OUT:"; + $exeout = "/OUT:"; + $def = "/D"; + $inc = "/I"; + $dll = "/DLL"; + } + elsif ($type eq "Watcom") { + $cc = "wcc386 -bt=nt -q"; + $link = "wlink option quiet"; + $out = "-fo="; + $dllout = "name "; + $exeout = "name "; + $def = "-d"; + $inc = "-i="; + $cdll = "-bd"; + $dll = "system nt_dll"; + $exe = "system nt"; + $lib = "library "; + + $suffix = 0; # watcom suffix rule works kinda strange + $symbolic = ".SYMBOLIC"; + $dir = "/"; + $del = "%erase"; + $prefobj = "file "; + $needlibs = "${lib}clib3r.lib"; + $c_dllout = "option implib=src${dir}Mw.lib"; + } + + open(OUT, ">", $output); + print(OUT "CC = $cc\n"); + print(OUT "LD = $link\n"); + print(OUT "\n"); + print(OUT +"MW_CFLAGS = ${cdll} ${inc}include ${inc}external${dir}libz${dir}include ${def}_MILSKO ${def}_MILSKO_BUILD ${def}USE_GDI ${def}USE_STB_IMAGE ${def}STBI_NO_SIMD ${def}USE_GDI_TEXT\n" + ); + print(OUT "MW_LDFLAGS = $dll\n"); + print(OUT "EXE_CFLAGS = ${inc}include\n"); + print(OUT "EXE_LDFLAGS = $exe"); + print(OUT "\n"); + + if ($suffix) { + print(OUT ".SUFFIXES: .obj .c\n"); + } + print(OUT "all: src${dir}Mw.dll"); + foreach my $f (@examples) { + $b = $f; + $b =~ s/\.c$/.exe/; + $b =~ s/\//$dir/g; + print(OUT " $b"); + } + print(OUT "\n"); + print(OUT "lib: src${dir}Mw.dll\n"); + print(OUT "examples:"); + foreach my $f (@examples) { + $b = $f; + $b =~ s/\.c$/.exe/; + $b =~ s/\//$dir/g; + print(OUT " $b"); + } + print(OUT "\n"); + print(OUT "clean: $symbolic\n"); + foreach my $f (@cfiles) { + my $b = $f; + $b =~ s/\.c$/.obj/; + $b =~ s/\//$dir/g; + print(OUT " $del $b\n"); + } + print(OUT " $del src${dir}Mw.dll\n"); + print(OUT " $del src${dir}Mw.lib\n"); + foreach my $f (@examples) { + my $b = $f; + $b =~ s/\.c$/.obj/; + $b =~ s/\//$dir/g; + print(OUT " $del $b\n"); + } + foreach my $f (@examples) { + $b = $f; + $b =~ s/\.c$/.exe/; + $b =~ s/\//$dir/g; + print(OUT " $del $b\n"); + } + print(OUT "\n"); + foreach my $f (@examples) { + my $b = $f; + $b =~ s/\.c$/.exe/; + $b =~ s/\//$dir/g; + my $o = $f; + $o =~ s/\.c$/.obj/; + $o =~ s/\//$dir/g; + print(OUT "$b: $o src${dir}Mw.dll\n"); + print(OUT +" \$(LD) \$(EXE_LDFLAGS) $exeout\$@ $prefobj$o $needlibs ${lib}src${dir}Mw.lib" + ); + + if ($f =~ /gldemos/) { + print(OUT " ${lib}opengl32.lib ${lib}glu32.lib"); + } + print(OUT "\n"); + print(OUT "\n"); + print(OUT "$o: $f\n"); + print(OUT " \$(CC) \$(EXE_CFLAGS) ${out}\$@ $f\n"); + print(OUT "\n"); + } + print(OUT "\n"); + print(OUT "src${dir}Mw.dll: " . cobjs($dir) . "\n"); + print( OUT " \$(LD) \$(MW_LDFLAGS) $c_dllout $dllout\$@ " + . cobjs($dir, $prefobj) + . " $needlibs ${lib}opengl32.lib ${lib}gdi32.lib ${lib}winmm.lib ${lib}user32.lib ${lib}advapi32.lib\n" + ); + print(OUT " $c_dllafter\n"); + print(OUT "\n"); + + if ($suffix) { + print(OUT ".c.obj:\n"); + print(OUT " \$(CC) \$(MW_CFLAGS) ${out}\$@ \$<\n"); + } + else { + print(OUT "\n"); + foreach my $f (@cfiles) { + my $o = $f; + $o =~ s/\.c$/.obj/; + print(OUT "$o: $f\n"); + print(OUT " \$(CC) \$(MW_CFLAGS) ${out}\$@ $f\n"); + } + } + close(OUT); +} + +scan("src"); +scan("external"); +scan("external/libz/src"); +scan("src/icon"); +scan("src/cursor"); +scan("src/widget"); +scan("src/text"); +scan("src/text/font"); +scan("src/dialog"); +scan("src/abstract"); +push(@cfiles, "src/backend/gdi.c"); + +@cfiles = sort(@cfiles); + +scan_examples("examples/basic"); +scan_examples("examples/gldemos"); + +@examples = sort(@examples); + +generate("BorMakefile", "Borland"); +generate("NTMakefile", "MSVC"); +generate("WatMakefile", "Watcom"); diff --git a/widget/milsko/milskosrc/tools/harvard.pl b/widget/milsko/milskosrc/tools/harvard.pl new file mode 100644 index 0000000000..ae602e2554 --- /dev/null +++ b/widget/milsko/milskosrc/tools/harvard.pl @@ -0,0 +1,12 @@ +#!/usr/bin/env perl +open(IN, "<", "resource/harvard.txt"); +print("const char* harvard[] = {\n"); +while (my $l = ) { + $l =~ s/\r?\n$//; + if ($l =~ /^[ \t]*[0-9]+\. (.+)$/) { + print(" \"" . $1 . "\",\n"); + } +} +print(" NULL\n"); +print("};\n"); +close(IN); diff --git a/widget/milsko/milskosrc/tools/icon-converter.c b/widget/milsko/milskosrc/tools/icon-converter.c new file mode 100644 index 0000000000..11dc4510e6 --- /dev/null +++ b/widget/milsko/milskosrc/tools/icon-converter.c @@ -0,0 +1,36 @@ +#define STB_IMAGE_IMPLEMENTATION +#include "../external/stb_image.h" + +#include + +int main(int argc, char** argv) { + unsigned char* rgba; + int width, height, bpp; + int i; + + if(argc != 3) { + printf("Usage: %s input name\n", argv[0]); + return 1; + } + + rgba = stbi_load(argv[1], &width, &height, &bpp, 4); + + printf("MwU32 %s[] = {\n", argv[2]); + printf(" (%d << 16) | %d,\n", width, height); + for(i = 0; i < width * height; i++) { + unsigned char* px = &rgba[i * 4]; + unsigned int p = 0; + int j; + + for(j = 0; j < 4; j++) { + p = p << 8; + p = p | px[j]; + } + + printf(" 0x%x,\n", p); + } + printf(" 0\n"); + printf("};\n"); + + free(rgba); +} diff --git a/widget/milsko/milskosrc/tools/icon.sh b/widget/milsko/milskosrc/tools/icon.sh new file mode 100644 index 0000000000..746d50464e --- /dev/null +++ b/widget/milsko/milskosrc/tools/icon.sh @@ -0,0 +1,44 @@ +#!/bin/sh +echo '/*!' > include/Mw/Resource/Icon.h +echo ' * @file Mw/Resource/Icon.h' >> include/Mw/Resource/Icon.h +echo ' * @brief Icon' >> include/Mw/Resource/Icon.h +echo ' */' >> include/Mw/Resource/Icon.h +echo '#ifndef __MW_RESOURCE_ICON_H__' >> include/Mw/Resource/Icon.h +echo '#define __MW_RESOURCE_ICON_H__' >> include/Mw/Resource/Icon.h +echo '' >> include/Mw/Resource/Icon.h +echo '#include ' >> include/Mw/Resource/Icon.h +echo '' >> include/Mw/Resource/Icon.h +echo '#ifdef __cplusplus' >> include/Mw/Resource/Icon.h +echo 'extern "C" {' >> include/Mw/Resource/Icon.h +echo '#endif' >> include/Mw/Resource/Icon.h +echo '' >> include/Mw/Resource/Icon.h +for i in resource/icon/*.png; do + LOWER=`echo $i | rev | cut -d"/" -f1 | rev | cut -d"." -f1` + OUT=src/icon/$LOWER.c + NAME=`echo -n $LOWER | perl -e 'my $l = <>;$l =~ s/^(.)/uc($1)/e;print($l);'` + NAME=MwIcon$NAME + GEO=`convert $i json:- 2>/dev/null | jq -r '(.[0].image.geometry.width | tostring) + "x" + (.[0].image.geometry.height | tostring)'` + WIDTH=`echo $GEO | cut -dx -f1` + HEIGHT=`echo $GEO | cut -dx -f2` + echo '#include ' > $OUT + echo >> $OUT + echo "MwU32 $NAME[] = {" >> $OUT + echo " ($WIDTH << 16) | $HEIGHT," >> $OUT + convert $i txt:- 2>/dev/null | grep -oE '#[0-9a-fA-F]{8}' | sed 's/^#/ 0x/' | sed -E 's/$/,/' >> $OUT + echo " 0" >> $OUT + echo "};" >> $OUT + echo $NAME +done | while read a; do + echo $a + echo '/*!' >> include/Mw/Resource/Icon.h + echo " * @brief `echo $a | sed s/MwIcon//` icon" >> include/Mw/Resource/Icon.h + echo ' */' >> include/Mw/Resource/Icon.h + echo "MWDECL MwU32 $a[];" >> include/Mw/Resource/Icon.h + echo '' >> include/Mw/Resource/Icon.h +done +echo '' >> include/Mw/Resource/Icon.h +echo '#ifdef __cplusplus' >> include/Mw/Resource/Icon.h +echo '}' >> include/Mw/Resource/Icon.h +echo '#endif' >> include/Mw/Resource/Icon.h +echo '' >> include/Mw/Resource/Icon.h +echo '#endif' >> include/Mw/Resource/Icon.h diff --git a/widget/milsko/milskosrc/tools/logo.sh b/widget/milsko/milskosrc/tools/logo.sh new file mode 100644 index 0000000000..9d346018bd --- /dev/null +++ b/widget/milsko/milskosrc/tools/logo.sh @@ -0,0 +1,9 @@ +#!/bin/sh +povray +A +W256 +H256 +Ologo.png resource/logo/logo.pov +povray +A +W1280 +H640 +Obanner.png resource/logo/banner.pov +povray +A +W1280 +H640 +Obanner-nodejs.png Declare=NODEJS=1 resource/logo/banner.pov +povray +A +W102 +H47 +O102x47.png resource/logo/102x47.pov +mv logo.png banner.png banner-nodejs.png resource/logo/ +magick resource/logo/logo.png -scale x64 resource/logo/logo64.png +magick 102x47.png resource/logo/overlay-102x47.png -compose over -composite resource/logo/102x47.png +rm -f 102x47.png diff --git a/widget/milsko/milskosrc/tools/prepare-gump.sh b/widget/milsko/milskosrc/tools/prepare-gump.sh new file mode 100644 index 0000000000..c3d4797ce6 --- /dev/null +++ b/widget/milsko/milskosrc/tools/prepare-gump.sh @@ -0,0 +1,6 @@ +#!/bin/sh +for i in linux win32 win64 doxygen; do + rm -rf ../milsko-$i + cp -rf . ../milsko-$i + rm -rf ../milsko-$i/.svn +done diff --git a/widget/milsko/milskosrc/tools/readme.pl b/widget/milsko/milskosrc/tools/readme.pl new file mode 100644 index 0000000000..d7c1909ad2 --- /dev/null +++ b/widget/milsko/milskosrc/tools/readme.pl @@ -0,0 +1,121 @@ +#!/usr/bin/env perl +our $WIDTH = 80; + +sub l { + my $len = 0; + my $last = 0; + my @msg = split(/ /, $_[0]); + foreach my $m (@msg) { + $len += 1 + length($m); + $last = 0; + if ($len > $WIDTH) { + print(OUT "\n"); + $len = 0; + $last = 1; + } + print(OUT "$m "); + } + if (!$last) { + print(OUT "\n"); + } +} + +sub c { + my ($msg) = @_; + my $len = length($msg); + if ($_[1]) { + $len = $_[1]; + } + print(OUT (" " x (($WIDTH - $len) / 2)) . "$msg\n"); +} + +sub h { + my ($msg) = @_; + print(OUT "\n"); + print(OUT "$msg\n"); + print(OUT ("-" x length($msg)) . "\n"); + print(OUT "\n"); +} + +open(IN, "<", "include/Mw/Version.h"); +my @lines = ; +close(IN); +my @match = grep(/MwVERSION/, @lines); + +my $ver = $match[0]; +$ver =~ /\"([^"]+)\"/; +$ver = $1; + +open(OUT, ">", "README.txt"); + +l(""); +l("Greetings - Welcome to the Milsko GUI Toolkit (Version " . $ver . ")"); +l(""); +l( +" This document contains a brief summary of the contents of this source distributions and building instructions for Milsko GUI Toolkit." +); + +l(""); +c("Requirements"); +l(""); +l(" Milsko requires either"); +l(" * A Windows environment with GDI (so anything NT or 9x)"); + +#l(" * A MacOS environment with Cocoa (10.4 or above supported)"); +l(" * A Unix-like environment with Wayland and/or X11 for runtime."); +l(""); +l(" To build Milsko for Windows, you must have one of following compilers:"); +l(" * Visual C++ 6.0 or newer"); +l(" * Borland C++ 5.5 or newer"); +l(" * Open Watcom 2.0 or newer"); +l(" * MinGW-w64"); +l(""); +l(" and for Unix-like and MacOS:"); +l(" * GNU C Compiler"); +l(" * Clang"); +l(""); + +l(""); +c("Contents"); +l(""); +c(" At the top level of this hierarchy there are seven directories:", 60); +l(""); +c(" src - Contains the source for Milsko library", 60); +l(""); +c(" include - Contains the headers for Milsko", 60); +l(""); +c(" doc - Contains the documentation for Milsko", 60); +l(""); +c(" external - Contains the external dependency that Milsko uses", 60); +l(""); +c(" resource - Contains the resources used by maintainers", 60); +l(""); +c(" tools - Contains the tools used by maintainers", 60); +l(""); + +l(""); +c("Building Milsko"); +l(""); +l(" Building Milsko depends on the platform you use, and the compiler you use." +); +h("A. Visual C++"); +l("1) Run `nmake -f NTMakefile'."); +h("B. Borland C++"); +l("1) Run `make -f BorMakefile'."); +h("C. Open Watcom"); +l("1) Run `wmake -f WatMakefile'."); +h("D. MinGW-w64/GCC/Clang"); +l("1) Determine if you need Vulkan and/or OpenGL."); +l(""); +l("2) Either:"); +l(" a.) Run `./configure'. For help, run `./configure --help'."); +l( +" b.) Use CMake; i.e. `cmake -B build`. (if contributing, name the build folder build as that's what's included in the .gitignore)" +); +l(""); +l("3) Run `make'."); +l(""); + +l(" -- Nishi (nishi\@nishi.boats)"); + +close(OUT); diff --git a/widget/milsko/milskosrc/tools/ttf.sh b/widget/milsko/milskosrc/tools/ttf.sh new file mode 100644 index 0000000000..eef90857ab --- /dev/null +++ b/widget/milsko/milskosrc/tools/ttf.sh @@ -0,0 +1,11 @@ +#!/bin/sh +for out in src/font/ttf.c src/font/boldttf.c; do + echo '#include ' > $out + echo '' >> $out + echo '#if defined(USE_STB_TRUETYPE) || defined(USE_FREETYPE2)' >> $out +done +xxd -n MwTTFData -i resource/font/IBMPlexMono.ttf | sed s/_len/Size/ >> src/font/ttf.c +xxd -n MwBoldTTFData -i resource/font/IBMPlexMono-Bold.ttf | sed s/_len/Size/ >> src/font/boldttf.c +for out in src/font/ttf.c src/font/boldttf.c; do + echo '#endif' >> $out +done diff --git a/widget/milsko/milskosrc/tools/update.sh b/widget/milsko/milskosrc/tools/update.sh new file mode 100644 index 0000000000..12e8455e81 --- /dev/null +++ b/widget/milsko/milskosrc/tools/update.sh @@ -0,0 +1,7 @@ +#!/bin/sh +MAKE=make +if which gmake >/dev/null 2>&1; then + MAKE=gmake +fi +./tools/genmk.pl +$MAKE format diff --git a/widget/milsko/milskosrc/tools/watcom-pack.sh b/widget/milsko/milskosrc/tools/watcom-pack.sh new file mode 100644 index 0000000000..e9bfb604e2 --- /dev/null +++ b/widget/milsko/milskosrc/tools/watcom-pack.sh @@ -0,0 +1,13 @@ +#!/bin/sh +set -e +wmake -f WatMakefile +rm -rf milsko +mkdir -p milsko-examples +cp src/Mw.dll milsko-examples/ +cp examples/basic/*.exe milsko-examples/ +for i in examples/gldemos/*.exe; do + cp $i milsko-examples/gl`echo $i | rev | cut -d/ -f1 | rev` +done +rm -f milsko-examples.zip +cp resource/logo/logo.png examples/picture.jpg examples/picture.png milsko-examples/ +zip -rv milsko-examples.zip milsko-examples From c733f8d1d1d57d718cbc11e50df24abb6c099b7d Mon Sep 17 00:00:00 2001 From: wuggy Date: Fri, 31 Jul 2026 15:25:03 -0300 Subject: [PATCH 09/72] [13.2.1] Fix YouTube UAO --- browser/branding/unofficial/pref/uaoverrides.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/browser/branding/unofficial/pref/uaoverrides.inc b/browser/branding/unofficial/pref/uaoverrides.inc index f1f9451981..e2659ecbe1 100644 --- a/browser/branding/unofficial/pref/uaoverrides.inc +++ b/browser/branding/unofficial/pref/uaoverrides.inc @@ -65,9 +65,9 @@ pref("@GUAO_PREF@.mewe.com", "Mozilla/5.0 (%OS_SLICE% rv:102.0) Gecko/20100101 F // UA-sniffing domains that are "app/vendor-specific" and do not like Dactyloidae pref("@GUAO_PREF@.web.whatsapp.com","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36"); -pref("@GUAO_PREF@.youtube.com","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36"); -pref("@GUAO_PREF@.studio.youtube.com","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36"); -pref("@GUAO_PREF@.gaming.youtube.com","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36"); +pref("@GUAO_PREF@.youtube.com","Mozilla/5.0 (%OS_SLICE%; Win64; x64; rv:147.0) Gecko/20100101 Firefox/147.0"); +pref("@GUAO_PREF@.studio.youtube.com","Mozilla/5.0 (%OS_SLICE%; Win64; x64; rv:147.0) Gecko/20100101 Firefox/147.0"); +pref("@GUAO_PREF@.gaming.youtube.com","Mozilla/5.0 (%OS_SLICE%; Win64; x64; rv:147.0) Gecko/20100101 Firefox/147.0"); // The following domains do not like the Goanna slice pref("@GUAO_PREF@.bab.la","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@"); From 1453b6fd78bae93b690748fbf1d096dd19fd3807 Mon Sep 17 00:00:00 2001 From: Basilisk-Dev Date: Wed, 11 Mar 2026 22:01:13 -0400 Subject: [PATCH 10/72] Issue #2862 - Initial attempt at a css lowering --- layout/style/nsCSSParser.cpp | 852 ++++++++++++++++++++++++++++++++++- modules/libpref/init/all.js | 9 +- 2 files changed, 857 insertions(+), 4 deletions(-) diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp index 59872b0f67..02f926a5a4 100644 --- a/layout/style/nsCSSParser.cpp +++ b/layout/style/nsCSSParser.cpp @@ -7,6 +7,7 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/DebugOnly.h" +#include "mozilla/Maybe.h" #include "mozilla/Move.h" #include "mozilla/MathAlgorithms.h" #include "mozilla/TypedEnumBits.h" @@ -71,6 +72,7 @@ static bool sMozGradientsEnabled; static bool sControlCharVisibility; static bool sLegacyNegationPseudoClassEnabled; static bool sCascadeLayersEnabled; +static bool sNestingEnabled; const uint32_t nsCSSProps::kParserVariantTable[eCSSProperty_COUNT_no_shorthands] = { @@ -204,6 +206,843 @@ OKLabToSRGBColor(float aL, float aA, float aB, float aAlpha) nsStyleUtil::FloatToColorComponent(mozilla::clamped(aAlpha, 0.0f, 1.0f))); } +class CSSNestingLowerer final +{ + using SelectorList = nsTArray; + +public: + explicit CSSNestingLowerer(const nsAString& aInput) + : mInput(aInput) + , mPos(0) + , mSawNesting(false) + { + } + + bool Lower(nsAString& aOutput) + { + nsAutoString lowered; + if (!ProcessStylesheet(lowered, false)) { + return false; + } + + SkipWhitespaceAndComments(); + if (mPos != mInput.Length() || !mSawNesting) { + return false; + } + + aOutput.Assign(lowered); + return true; + } + +private: + static constexpr auto kCSSWhitespace = " \t\r\n\f"; + + static bool + IsCSSWhitespace(char16_t aChar) + { + return aChar == ' ' || aChar == '\t' || aChar == '\r' || + aChar == '\n' || aChar == '\f'; + } + + bool + AtEnd() const + { + return mPos >= mInput.Length(); + } + + char16_t + Peek() const + { + MOZ_ASSERT(!AtEnd(), "cannot peek past end"); + return mInput.CharAt(mPos); + } + + bool + StartsWithComment() const + { + return mPos + 1 < mInput.Length() && + mInput.CharAt(mPos) == '/' && + mInput.CharAt(mPos + 1) == '*'; + } + + bool + SkipComment() + { + MOZ_ASSERT(StartsWithComment(), "expected comment"); + + mPos += 2; + while (mPos + 1 < mInput.Length()) { + if (mInput.CharAt(mPos) == '*' && mInput.CharAt(mPos + 1) == '/') { + mPos += 2; + return true; + } + ++mPos; + } + + return false; + } + + void + SkipWhitespaceAndComments() + { + while (!AtEnd()) { + if (IsCSSWhitespace(Peek())) { + ++mPos; + continue; + } + if (StartsWithComment()) { + if (!SkipComment()) { + mPos = mInput.Length(); + return; + } + continue; + } + break; + } + } + + bool + SkipString(char16_t aQuote) + { + MOZ_ASSERT(!AtEnd() && Peek() == aQuote, "expected string start"); + + ++mPos; + while (!AtEnd()) { + char16_t c = Peek(); + ++mPos; + if (c == aQuote) { + return true; + } + if (c == '\\' && !AtEnd()) { + ++mPos; + continue; + } + if (c == '\n' || c == '\r' || c == '\f') { + return false; + } + } + + return false; + } + + static void + TrimWhitespace(nsAString& aText) + { + uint32_t start = 0; + uint32_t end = aText.Length(); + + while (start < end && IsCSSWhitespace(aText.CharAt(start))) { + ++start; + } + while (end > start && IsCSSWhitespace(aText.CharAt(end - 1))) { + --end; + } + + if (start == 0 && end == aText.Length()) { + return; + } + + aText.Assign(Substring(aText, start, end - start)); + } + + bool + SplitSelectorList(const nsAString& aSelectorText, SelectorList& aSelectors) + { + uint32_t itemStart = 0; + int32_t parenDepth = 0; + int32_t bracketDepth = 0; + bool inComment = false; + char16_t stringQuote = 0; + + for (uint32_t i = 0; i < aSelectorText.Length(); ++i) { + char16_t c = aSelectorText.CharAt(i); + + if (inComment) { + if (c == '*' && i + 1 < aSelectorText.Length() && + aSelectorText.CharAt(i + 1) == '/') { + inComment = false; + ++i; + } + continue; + } + + if (stringQuote) { + if (c == '\\') { + ++i; + continue; + } + if (c == stringQuote) { + stringQuote = 0; + } + continue; + } + + if (c == '/' && i + 1 < aSelectorText.Length() && + aSelectorText.CharAt(i + 1) == '*') { + inComment = true; + ++i; + continue; + } + + if (c == '"' || c == '\'') { + stringQuote = c; + continue; + } + + if (c == '(') { + ++parenDepth; + continue; + } + if (c == ')' && parenDepth > 0) { + --parenDepth; + continue; + } + if (c == '[') { + ++bracketDepth; + continue; + } + if (c == ']' && bracketDepth > 0) { + --bracketDepth; + continue; + } + + if (c == ',' && parenDepth == 0 && bracketDepth == 0) { + nsAutoString selector; + selector.Assign(Substring(aSelectorText, itemStart, i - itemStart)); + TrimWhitespace(selector); + if (!selector.IsEmpty()) { + aSelectors.AppendElement(selector); + } + itemStart = i + 1; + } + } + + nsAutoString selector; + selector.Assign(Substring(aSelectorText, itemStart)); + TrimWhitespace(selector); + if (!selector.IsEmpty()) { + aSelectors.AppendElement(selector); + } + + return !aSelectors.IsEmpty(); + } + + bool + SelectorHasAmpersand(const nsAString& aSelector) const + { + bool inComment = false; + char16_t stringQuote = 0; + + for (uint32_t i = 0; i < aSelector.Length(); ++i) { + char16_t c = aSelector.CharAt(i); + + if (inComment) { + if (c == '*' && i + 1 < aSelector.Length() && + aSelector.CharAt(i + 1) == '/') { + inComment = false; + ++i; + } + continue; + } + + if (stringQuote) { + if (c == '\\') { + ++i; + continue; + } + if (c == stringQuote) { + stringQuote = 0; + } + continue; + } + + if (c == '/' && i + 1 < aSelector.Length() && + aSelector.CharAt(i + 1) == '*') { + inComment = true; + ++i; + continue; + } + + if (c == '"' || c == '\'') { + stringQuote = c; + continue; + } + + if (c == '&') { + return true; + } + } + + return false; + } + + void + ReplaceAmpersands(const nsAString& aSelector, + const nsAString& aParent, + nsAString& aOutput) const + { + bool inComment = false; + char16_t stringQuote = 0; + + for (uint32_t i = 0; i < aSelector.Length(); ++i) { + char16_t c = aSelector.CharAt(i); + + if (inComment) { + aOutput.Append(c); + if (c == '*' && i + 1 < aSelector.Length() && + aSelector.CharAt(i + 1) == '/') { + aOutput.Append('/'); + inComment = false; + ++i; + } + continue; + } + + if (stringQuote) { + aOutput.Append(c); + if (c == '\\' && i + 1 < aSelector.Length()) { + aOutput.Append(aSelector.CharAt(i + 1)); + ++i; + continue; + } + if (c == stringQuote) { + stringQuote = 0; + } + continue; + } + + if (c == '/' && i + 1 < aSelector.Length() && + aSelector.CharAt(i + 1) == '*') { + aOutput.AppendLiteral("/*"); + inComment = true; + ++i; + continue; + } + + if (c == '"' || c == '\'') { + aOutput.Append(c); + stringQuote = c; + continue; + } + + if (c == '&') { + aOutput.Append(aParent); + continue; + } + + aOutput.Append(c); + } + } + + bool + ExpandNestedSelectors(const SelectorList& aParents, + const nsAString& aNestedSelectorText, + SelectorList& aSelectors) + { + SelectorList nestedSelectors; + if (!SplitSelectorList(aNestedSelectorText, nestedSelectors)) { + return false; + } + + for (const nsString& nestedSelector : nestedSelectors) { + bool hasAmpersand = SelectorHasAmpersand(nestedSelector); + for (const nsString& parentSelector : aParents) { + nsAutoString combined; + if (hasAmpersand) { + ReplaceAmpersands(nestedSelector, parentSelector, combined); + } else { + combined.Assign(parentSelector); + if (!combined.IsEmpty()) { + combined.Append(' '); + } + combined.Append(nestedSelector); + } + TrimWhitespace(combined); + if (!combined.IsEmpty()) { + aSelectors.AppendElement(combined); + } + } + } + + return !aSelectors.IsEmpty(); + } + + static void + AppendSelectors(const SelectorList& aSelectors, nsAString& aOutput) + { + for (uint32_t i = 0; i < aSelectors.Length(); ++i) { + if (i) { + aOutput.AppendLiteral(", "); + } + aOutput.Append(aSelectors[i]); + } + } + + static bool + StartsNestedSelector(char16_t aChar) + { + switch (aChar) { + case '.': + case '#': + case '[': + case ':': + case '&': + case '>': + case '+': + case '~': + case '*': + return true; + default: + return false; + } + } + + static bool + IsAtRuleNameChar(char16_t aChar) + { + return (aChar >= 'a' && aChar <= 'z') || + (aChar >= 'A' && aChar <= 'Z') || + (aChar >= '0' && aChar <= '9') || + aChar == '-'; + } + + static void + LowercaseASCII(nsACString& aText) + { + for (uint32_t i = 0; i < aText.Length(); ++i) { + char c = aText.CharAt(i); + if (c >= 'A' && c <= 'Z') { + aText.BeginWriting()[i] = c - 'A' + 'a'; + } + } + } + + static bool + ShouldProcessGroupRule(const nsACString& aName) + { + return aName.EqualsLiteral("media") || + aName.EqualsLiteral("supports") || + aName.EqualsLiteral("document") || + aName.EqualsLiteral("layer"); + } + + void + FlushDeclarations(const SelectorList& aSelectors, + nsAString& aDeclarations, + nsAString& aOutput) + { + nsAutoString declarations; + declarations.Assign(aDeclarations); + TrimWhitespace(declarations); + aDeclarations.Truncate(); + + if (declarations.IsEmpty()) { + return; + } + + AppendSelectors(aSelectors, aOutput); + aOutput.AppendLiteral(" { "); + aOutput.Append(declarations); + aOutput.AppendLiteral(" }\n"); + } + + bool + ReadRawBlockBody(nsAString& aBody) + { + uint32_t start = mPos; + int32_t depth = 0; + + while (!AtEnd()) { + char16_t c = Peek(); + if (c == '"' || c == '\'') { + if (!SkipString(c)) { + return false; + } + continue; + } + if (StartsWithComment()) { + if (!SkipComment()) { + return false; + } + continue; + } + if (c == '{') { + ++depth; + ++mPos; + continue; + } + if (c == '}') { + if (depth == 0) { + aBody.Assign(Substring(mInput, start, mPos - start)); + ++mPos; + return true; + } + --depth; + ++mPos; + continue; + } + ++mPos; + } + + return false; + } + + bool + ReadQualifiedRulePrelude(nsAString& aPrelude) + { + uint32_t start = mPos; + int32_t parenDepth = 0; + int32_t bracketDepth = 0; + + while (!AtEnd()) { + char16_t c = Peek(); + if (c == '"' || c == '\'') { + if (!SkipString(c)) { + return false; + } + continue; + } + if (StartsWithComment()) { + if (!SkipComment()) { + return false; + } + continue; + } + if (c == '(') { + ++parenDepth; + ++mPos; + continue; + } + if (c == ')' && parenDepth > 0) { + --parenDepth; + ++mPos; + continue; + } + if (c == '[') { + ++bracketDepth; + ++mPos; + continue; + } + if (c == ']' && bracketDepth > 0) { + --bracketDepth; + ++mPos; + continue; + } + if (c == '{' && parenDepth == 0 && bracketDepth == 0) { + aPrelude.Assign(Substring(mInput, start, mPos - start)); + TrimWhitespace(aPrelude); + ++mPos; + return !aPrelude.IsEmpty(); + } + if ((c == ';' || c == '}') && parenDepth == 0 && bracketDepth == 0) { + return false; + } + ++mPos; + } + + return false; + } + + bool + ReadAtRulePrelude(nsAString& aPrelude, nsACString& aName, bool& aHasBlock) + { + MOZ_ASSERT(!AtEnd() && Peek() == '@', "expected at-rule"); + + uint32_t start = mPos; + ++mPos; + aName.Truncate(); + while (!AtEnd() && IsAtRuleNameChar(Peek())) { + char16_t c = Peek(); + aName.Append(char(c <= 0x7f ? c : '?')); + ++mPos; + } + LowercaseASCII(aName); + + int32_t parenDepth = 0; + int32_t bracketDepth = 0; + while (!AtEnd()) { + char16_t c = Peek(); + if (c == '"' || c == '\'') { + if (!SkipString(c)) { + return false; + } + continue; + } + if (StartsWithComment()) { + if (!SkipComment()) { + return false; + } + continue; + } + if (c == '(') { + ++parenDepth; + ++mPos; + continue; + } + if (c == ')' && parenDepth > 0) { + --parenDepth; + ++mPos; + continue; + } + if (c == '[') { + ++bracketDepth; + ++mPos; + continue; + } + if (c == ']' && bracketDepth > 0) { + --bracketDepth; + ++mPos; + continue; + } + if (parenDepth == 0 && bracketDepth == 0) { + if (c == ';') { + aPrelude.Assign(Substring(mInput, start, mPos - start)); + TrimWhitespace(aPrelude); + ++mPos; + aHasBlock = false; + return true; + } + if (c == '{') { + aPrelude.Assign(Substring(mInput, start, mPos - start)); + TrimWhitespace(aPrelude); + ++mPos; + aHasBlock = true; + return true; + } + } + ++mPos; + } + + return false; + } + + bool + ConsumeDeclaration(nsAString& aDeclaration) + { + uint32_t start = mPos; + int32_t parenDepth = 0; + int32_t bracketDepth = 0; + int32_t braceDepth = 0; + + while (!AtEnd()) { + char16_t c = Peek(); + if (c == '"' || c == '\'') { + if (!SkipString(c)) { + return false; + } + continue; + } + if (StartsWithComment()) { + if (!SkipComment()) { + return false; + } + continue; + } + if (c == '(') { + ++parenDepth; + ++mPos; + continue; + } + if (c == ')' && parenDepth > 0) { + --parenDepth; + ++mPos; + continue; + } + if (c == '[') { + ++bracketDepth; + ++mPos; + continue; + } + if (c == ']' && bracketDepth > 0) { + --bracketDepth; + ++mPos; + continue; + } + if (c == '{') { + ++braceDepth; + ++mPos; + continue; + } + if (c == '}') { + if (braceDepth == 0 && parenDepth == 0 && bracketDepth == 0) { + break; + } + if (braceDepth > 0) { + --braceDepth; + } + ++mPos; + continue; + } + if (c == ';' && parenDepth == 0 && bracketDepth == 0 && + braceDepth == 0) { + ++mPos; + break; + } + ++mPos; + } + + aDeclaration.Assign(Substring(mInput, start, mPos - start)); + TrimWhitespace(aDeclaration); + if (aDeclaration.IsEmpty()) { + return false; + } + if (aDeclaration.Last() != ';') { + aDeclaration.Append(';'); + } + return true; + } + + bool + ParseAtRule(nsAString& aOutput, const SelectorList* aParents) + { + nsAutoString prelude; + nsAutoCString name; + bool hasBlock = false; + if (!ReadAtRulePrelude(prelude, name, hasBlock)) { + return false; + } + + if (!hasBlock) { + aOutput.Append(prelude); + aOutput.AppendLiteral(";\n"); + return true; + } + + if (!ShouldProcessGroupRule(name)) { + nsAutoString body; + if (!ReadRawBlockBody(body)) { + return false; + } + aOutput.Append(prelude); + aOutput.AppendLiteral(" {"); + aOutput.Append(body); + aOutput.AppendLiteral("}\n"); + return true; + } + + nsAutoString inner; + if (aParents) { + mSawNesting = true; + if (!ProcessStyleContext(*aParents, inner)) { + return false; + } + } else { + if (!ProcessStylesheet(inner, true)) { + return false; + } + } + + aOutput.Append(prelude); + aOutput.AppendLiteral(" {\n"); + aOutput.Append(inner); + aOutput.AppendLiteral("}\n"); + return true; + } + + bool + ParseQualifiedRule(nsAString& aOutput, const SelectorList* aParents) + { + nsAutoString prelude; + if (!ReadQualifiedRulePrelude(prelude)) { + return false; + } + + SelectorList selectors; + if (aParents) { + mSawNesting = true; + if (!ExpandNestedSelectors(*aParents, prelude, selectors)) { + return false; + } + } else if (!SplitSelectorList(prelude, selectors)) { + return false; + } + + return ProcessStyleContext(selectors, aOutput); + } + + bool + ProcessStyleContext(const SelectorList& aSelectors, nsAString& aOutput) + { + nsAutoString declarations; + + while (!AtEnd()) { + SkipWhitespaceAndComments(); + if (AtEnd()) { + return false; + } + + char16_t c = Peek(); + if (c == '}') { + ++mPos; + FlushDeclarations(aSelectors, declarations, aOutput); + return true; + } + + if (c == '@') { + FlushDeclarations(aSelectors, declarations, aOutput); + if (!ParseAtRule(aOutput, &aSelectors)) { + return false; + } + continue; + } + + if (StartsNestedSelector(c)) { + FlushDeclarations(aSelectors, declarations, aOutput); + if (!ParseQualifiedRule(aOutput, &aSelectors)) { + return false; + } + continue; + } + + nsAutoString declaration; + if (!ConsumeDeclaration(declaration)) { + return false; + } + if (!declarations.IsEmpty()) { + declarations.Append(' '); + } + declarations.Append(declaration); + } + + return false; + } + + bool + ProcessStylesheet(nsAString& aOutput, bool aStopAtBlockEnd) + { + while (!AtEnd()) { + SkipWhitespaceAndComments(); + if (AtEnd()) { + return !aStopAtBlockEnd; + } + + if (Peek() == '}') { + if (!aStopAtBlockEnd) { + return false; + } + ++mPos; + return true; + } + + if (Peek() == '@') { + if (!ParseAtRule(aOutput, nullptr)) { + return false; + } + } else { + if (!ParseQualifiedRule(aOutput, nullptr)) { + return false; + } + } + } + + return !aStopAtBlockEnd; + } + + const nsAString& mInput; + uint32_t mPos; + bool mSawNesting; +}; + static_assert(css::eAuthorSheetFeatures == 0 && css::eUserSheetFeatures == 1 && css::eAgentSheetFeatures == 2, @@ -1823,7 +2662,16 @@ CSSParserImpl::ParseSheet(const nsAString& aInput, "Sheet principal does not match passed principal"); #endif - nsCSSScanner scanner(aInput, aLineNumber); + nsAutoString loweredInput; + const nsAString* input = &aInput; + if (sNestingEnabled) { + CSSNestingLowerer lowerer(aInput); + if (lowerer.Lower(loweredInput)) { + input = &loweredInput; + } + } + + nsCSSScanner scanner(*input, aLineNumber); css::ErrorReporter reporter(scanner, mSheet, mChildLoader, aSheetURI); InitScanner(scanner, reporter, aSheetURI, aBaseURI, aSheetPrincipal); @@ -18987,6 +19835,8 @@ nsCSSParser::Startup() "layout.css.legacy-negation-pseudo.enabled"); Preferences::AddBoolVarCache(&sCascadeLayersEnabled, "layout.css.cascade-layers.enabled"); + Preferences::AddBoolVarCache(&sNestingEnabled, + "layout.css.nesting.enabled"); } nsCSSParser::nsCSSParser(mozilla::css::Loader* aLoader, diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index dfdfb84b2b..6dee3b429a 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2725,6 +2725,9 @@ pref("layout.css.resizeobserver.enabled", true); // Is support for cascade layers enabled? pref("layout.css.cascade-layers.enabled", true); +// Is support for basic CSS nesting lowering enabled? +pref("layout.css.nesting.enabled", false); + // Should rules in imported style sheets be added based on the order // of appearance of their respective @import rules in the parent // style sheet? Otherwise, they are added before rules preceding @@ -3230,7 +3233,7 @@ pref("ui.mouse.radius.inputSource.touchOnly", true); #ifdef XP_WIN -// Be as uniform as possible, use Twemoji everywhere. +// Be as uniform as possible, use Twemoji everywhere. // Optional: prefix with `Segoe UI Emoji` to use Win8+ Segoe UI font emoji where available. pref("font.name-list.emoji", "Twemoji Mozilla"); @@ -4761,7 +4764,7 @@ pref("media.ondevicechange.fakeDeviceChangeEvent.enabled", false); // those platforms we don't handle touch events anyway so it's conceptually // a no-op. pref("layout.css.touch_action.enabled", true); - + // WHATWG computed intrinsic aspect ratio for an img element // https://html.spec.whatwg.org/multipage/rendering.html#attributes-for-embedded-content-and-images // Are the width and height attributes on image-like elements mapped to the @@ -5273,7 +5276,7 @@ pref("plugins.navigator_hide_disabled_flash", false); pref("dom.mozBrowserFramesEnabled", false); // Thick caret when behind CJK characters -pref("layout.cjkthickcaret", true); +pref("layout.cjkthickcaret", true); // Is support for 'color-adjust' CSS property enabled? pref("layout.css.color-adjust.enabled", true); From 54262457d2b10826f00d752b50663f8855458cbe Mon Sep 17 00:00:00 2001 From: Basilisk-Dev Date: Wed, 11 Mar 2026 22:08:14 -0400 Subject: [PATCH 11/72] Issue #2862 - add initial nested css test file --- layout/style/test/mochitest.ini | 1 + .../test/test_basic_nesting_lowering.html | 130 ++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 layout/style/test/test_basic_nesting_lowering.html diff --git a/layout/style/test/mochitest.ini b/layout/style/test/mochitest.ini index 8cadc7dd51..d4ad77d9a4 100644 --- a/layout/style/test/mochitest.ini +++ b/layout/style/test/mochitest.ini @@ -72,6 +72,7 @@ support-files = file_animations_with_disabled_properties.html [test_attribute_selector_eof_behavior.html] [test_aspect_ratio_property.html] [test_background_blend_mode.html] +[test_basic_nesting_lowering.html] [test_box_size_keywords.html] [test_bug73586.html] [test_css_math_functions.html] diff --git a/layout/style/test/test_basic_nesting_lowering.html b/layout/style/test/test_basic_nesting_lowering.html new file mode 100644 index 0000000000..616715ede3 --- /dev/null +++ b/layout/style/test/test_basic_nesting_lowering.html @@ -0,0 +1,130 @@ + + + + + Test for Basic CSS Nesting Lowering + + + + +

    + +
    +
    +
    
    +
    +
    +
    
    From c794e74cf0636119b27c96c9b0a5c661318ba6f2 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Wed, 11 Mar 2026 22:25:48 -0400
    Subject: [PATCH 12/72] Issue #2862 - Modify the css lowerer so that the
     lowering pass now recognizes bare type-selector nested rules and
     combinator-led cases
    
    ---
     layout/style/nsCSSParser.cpp                  |  99 ++++++-
     .../test/test_basic_nesting_lowering.html     | 261 ++++++++++--------
     2 files changed, 242 insertions(+), 118 deletions(-)
    
    diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp
    index 02f926a5a4..10012a3f93 100644
    --- a/layout/style/nsCSSParser.cpp
    +++ b/layout/style/nsCSSParser.cpp
    @@ -597,6 +597,103 @@ private:
         }
       }
     
    +  static bool
    +  StartsPotentialTypeSelector(char16_t aChar)
    +  {
    +    return (aChar >= 'a' && aChar <= 'z') ||
    +           (aChar >= 'A' && aChar <= 'Z') ||
    +           aChar == '_' ||
    +           aChar == '\\' ||
    +           aChar >= 0x80;
    +  }
    +
    +  bool
    +  LooksLikeTypeSelectorRule() const
    +  {
    +    if (AtEnd() || !StartsPotentialTypeSelector(Peek())) {
    +      return false;
    +    }
    +
    +    uint32_t pos = mPos;
    +    int32_t parenDepth = 0;
    +    int32_t bracketDepth = 0;
    +    bool inComment = false;
    +    char16_t stringQuote = 0;
    +
    +    while (pos < mInput.Length()) {
    +      char16_t c = mInput.CharAt(pos);
    +
    +      if (inComment) {
    +        if (c == '*' && pos + 1 < mInput.Length() &&
    +            mInput.CharAt(pos + 1) == '/') {
    +          inComment = false;
    +          ++pos;
    +        }
    +        ++pos;
    +        continue;
    +      }
    +
    +      if (stringQuote) {
    +        if (c == '\\' && pos + 1 < mInput.Length()) {
    +          pos += 2;
    +          continue;
    +        }
    +        if (c == stringQuote) {
    +          stringQuote = 0;
    +        }
    +        ++pos;
    +        continue;
    +      }
    +
    +      if (c == '/' && pos + 1 < mInput.Length() &&
    +          mInput.CharAt(pos + 1) == '*') {
    +        inComment = true;
    +        pos += 2;
    +        continue;
    +      }
    +
    +      if (c == '"' || c == '\'') {
    +        stringQuote = c;
    +        ++pos;
    +        continue;
    +      }
    +
    +      if (c == '(') {
    +        ++parenDepth;
    +        ++pos;
    +        continue;
    +      }
    +      if (c == ')' && parenDepth > 0) {
    +        --parenDepth;
    +        ++pos;
    +        continue;
    +      }
    +      if (c == '[') {
    +        ++bracketDepth;
    +        ++pos;
    +        continue;
    +      }
    +      if (c == ']' && bracketDepth > 0) {
    +        --bracketDepth;
    +        ++pos;
    +        continue;
    +      }
    +
    +      if (parenDepth == 0 && bracketDepth == 0) {
    +        if (c == '{') {
    +          return true;
    +        }
    +        if (c == ':' || c == ';' || c == '}') {
    +          return false;
    +        }
    +      }
    +
    +      ++pos;
    +    }
    +
    +    return false;
    +  }
    +
       static bool
       IsAtRuleNameChar(char16_t aChar)
       {
    @@ -986,7 +1083,7 @@ private:
             continue;
           }
     
    -      if (StartsNestedSelector(c)) {
    +      if (StartsNestedSelector(c) || LooksLikeTypeSelectorRule()) {
             FlushDeclarations(aSelectors, declarations, aOutput);
             if (!ParseQualifiedRule(aOutput, &aSelectors)) {
               return false;
    diff --git a/layout/style/test/test_basic_nesting_lowering.html b/layout/style/test/test_basic_nesting_lowering.html
    index 616715ede3..8f3f175632 100644
    --- a/layout/style/test/test_basic_nesting_lowering.html
    +++ b/layout/style/test/test_basic_nesting_lowering.html
    @@ -1,130 +1,157 @@
    -
    +
     
    -
    -  
    -  Test for Basic CSS Nesting Lowering
    -  
    -  
    -
    -
    -
    - -
    -
    -
    
    -
    +        
    +    
    +    
    +        
    + +
    +
    +
    
    +        
    -
    +            if (typeof SimpleTest !== "undefined" && typeof SpecialPowers !== "undefined") {
    +                runMochitest();
    +            } else {
    +                runStandalone();
    +            }
    +        
    +    
     
    
    From f2560c57b6bc8154dffe2b3ebe93bb0edc59a519 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Wed, 11 Mar 2026 22:49:25 -0400
    Subject: [PATCH 13/72] Issue #2862 - Fix a few nested selectors
    
    ---
     layout/style/nsCSSParser.cpp                  |   2 +-
     .../test/test_basic_nesting_lowering.html     | 277 +++++++++---------
     2 files changed, 134 insertions(+), 145 deletions(-)
    
    diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp
    index 10012a3f93..484085b019 100644
    --- a/layout/style/nsCSSParser.cpp
    +++ b/layout/style/nsCSSParser.cpp
    @@ -683,7 +683,7 @@ private:
             if (c == '{') {
               return true;
             }
    -        if (c == ':' || c == ';' || c == '}') {
    +        if (c == ';' || c == '}') {
               return false;
             }
           }
    diff --git a/layout/style/test/test_basic_nesting_lowering.html b/layout/style/test/test_basic_nesting_lowering.html
    index 8f3f175632..6c08934a11 100644
    --- a/layout/style/test/test_basic_nesting_lowering.html
    +++ b/layout/style/test/test_basic_nesting_lowering.html
    @@ -1,157 +1,146 @@
    -
    +
     
    -    
    -        
    -        Test for Basic CSS Nesting Lowering
    -        
    -        
    -    
    -    
    -        
    - -
    -
    -
    
    -        
    +  
    +
    +
    +
    + +
    +
    +
    
    +
    -    
    +if (typeof SimpleTest !== "undefined" && typeof SpecialPowers !== "undefined") {
    +  runMochitest();
    +} else {
    +  runStandalone();
    +}
    +
    +
     
    
    From c12883cfcff94efb65aa90b2bf092247b0ff6482 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Wed, 11 Mar 2026 22:59:52 -0400
    Subject: [PATCH 14/72] Issue #2862 - Split the css lowering functionality out
     to a separate file for easier maintenance
    
    ---
     layout/style/CSSNestingLowerer.cpp | 961 +++++++++++++++++++++++++++++
     layout/style/CSSNestingLowerer.h   |  19 +
     layout/style/moz.build             |   1 +
     layout/style/nsCSSParser.cpp       | 943 +---------------------------
     4 files changed, 985 insertions(+), 939 deletions(-)
     create mode 100644 layout/style/CSSNestingLowerer.cpp
     create mode 100644 layout/style/CSSNestingLowerer.h
    
    diff --git a/layout/style/CSSNestingLowerer.cpp b/layout/style/CSSNestingLowerer.cpp
    new file mode 100644
    index 0000000000..9340c4c5af
    --- /dev/null
    +++ b/layout/style/CSSNestingLowerer.cpp
    @@ -0,0 +1,961 @@
    +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
    +/* This Source Code Form is subject to the terms of the Mozilla Public
    + * License, v. 2.0. If a copy of the MPL was not distributed with this
    + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    +
    +#include "CSSNestingLowerer.h"
    +
    +#include "mozilla/Assertions.h"
    +#include "nsString.h"
    +#include "nsTArray.h"
    +
    +namespace mozilla {
    +namespace css {
    +
    +namespace {
    +
    +class CSSNestingLowerer final
    +{
    +  using SelectorList = nsTArray;
    +
    +public:
    +  explicit CSSNestingLowerer(const nsAString& aInput)
    +    : mInput(aInput)
    +    , mPos(0)
    +    , mSawNesting(false)
    +  {
    +  }
    +
    +  bool Lower(nsAString& aOutput)
    +  {
    +    nsAutoString lowered;
    +    if (!ProcessStylesheet(lowered, false)) {
    +      return false;
    +    }
    +
    +    SkipWhitespaceAndComments();
    +    if (mPos != mInput.Length() || !mSawNesting) {
    +      return false;
    +    }
    +
    +    aOutput.Assign(lowered);
    +    return true;
    +  }
    +
    +private:
    +  static constexpr auto kCSSWhitespace = " \t\r\n\f";
    +
    +  static bool
    +  IsCSSWhitespace(char16_t aChar)
    +  {
    +    return aChar == ' ' || aChar == '\t' || aChar == '\r' ||
    +           aChar == '\n' || aChar == '\f';
    +  }
    +
    +  bool
    +  AtEnd() const
    +  {
    +    return mPos >= mInput.Length();
    +  }
    +
    +  char16_t
    +  Peek() const
    +  {
    +    MOZ_ASSERT(!AtEnd(), "cannot peek past end");
    +    return mInput.CharAt(mPos);
    +  }
    +
    +  bool
    +  StartsWithComment() const
    +  {
    +    return mPos + 1 < mInput.Length() &&
    +           mInput.CharAt(mPos) == '/' &&
    +           mInput.CharAt(mPos + 1) == '*';
    +  }
    +
    +  bool
    +  SkipComment()
    +  {
    +    MOZ_ASSERT(StartsWithComment(), "expected comment");
    +
    +    mPos += 2;
    +    while (mPos + 1 < mInput.Length()) {
    +      if (mInput.CharAt(mPos) == '*' && mInput.CharAt(mPos + 1) == '/') {
    +        mPos += 2;
    +        return true;
    +      }
    +      ++mPos;
    +    }
    +
    +    return false;
    +  }
    +
    +  void
    +  SkipWhitespaceAndComments()
    +  {
    +    while (!AtEnd()) {
    +      if (IsCSSWhitespace(Peek())) {
    +        ++mPos;
    +        continue;
    +      }
    +      if (StartsWithComment()) {
    +        if (!SkipComment()) {
    +          mPos = mInput.Length();
    +          return;
    +        }
    +        continue;
    +      }
    +      break;
    +    }
    +  }
    +
    +  bool
    +  SkipString(char16_t aQuote)
    +  {
    +    MOZ_ASSERT(!AtEnd() && Peek() == aQuote, "expected string start");
    +
    +    ++mPos;
    +    while (!AtEnd()) {
    +      char16_t c = Peek();
    +      ++mPos;
    +      if (c == aQuote) {
    +        return true;
    +      }
    +      if (c == '\\' && !AtEnd()) {
    +        ++mPos;
    +        continue;
    +      }
    +      if (c == '\n' || c == '\r' || c == '\f') {
    +        return false;
    +      }
    +    }
    +
    +    return false;
    +  }
    +
    +  static void
    +  TrimWhitespace(nsAString& aText)
    +  {
    +    uint32_t start = 0;
    +    uint32_t end = aText.Length();
    +
    +    while (start < end && IsCSSWhitespace(aText.CharAt(start))) {
    +      ++start;
    +    }
    +    while (end > start && IsCSSWhitespace(aText.CharAt(end - 1))) {
    +      --end;
    +    }
    +
    +    if (start == 0 && end == aText.Length()) {
    +      return;
    +    }
    +
    +    aText.Assign(Substring(aText, start, end - start));
    +  }
    +
    +  bool
    +  SplitSelectorList(const nsAString& aSelectorText, SelectorList& aSelectors)
    +  {
    +    uint32_t itemStart = 0;
    +    int32_t parenDepth = 0;
    +    int32_t bracketDepth = 0;
    +    bool inComment = false;
    +    char16_t stringQuote = 0;
    +
    +    for (uint32_t i = 0; i < aSelectorText.Length(); ++i) {
    +      char16_t c = aSelectorText.CharAt(i);
    +
    +      if (inComment) {
    +        if (c == '*' && i + 1 < aSelectorText.Length() &&
    +            aSelectorText.CharAt(i + 1) == '/') {
    +          inComment = false;
    +          ++i;
    +        }
    +        continue;
    +      }
    +
    +      if (stringQuote) {
    +        if (c == '\\') {
    +          ++i;
    +          continue;
    +        }
    +        if (c == stringQuote) {
    +          stringQuote = 0;
    +        }
    +        continue;
    +      }
    +
    +      if (c == '/' && i + 1 < aSelectorText.Length() &&
    +          aSelectorText.CharAt(i + 1) == '*') {
    +        inComment = true;
    +        ++i;
    +        continue;
    +      }
    +
    +      if (c == '"' || c == '\'') {
    +        stringQuote = c;
    +        continue;
    +      }
    +
    +      if (c == '(') {
    +        ++parenDepth;
    +        continue;
    +      }
    +      if (c == ')' && parenDepth > 0) {
    +        --parenDepth;
    +        continue;
    +      }
    +      if (c == '[') {
    +        ++bracketDepth;
    +        continue;
    +      }
    +      if (c == ']' && bracketDepth > 0) {
    +        --bracketDepth;
    +        continue;
    +      }
    +
    +      if (c == ',' && parenDepth == 0 && bracketDepth == 0) {
    +        nsAutoString selector;
    +        selector.Assign(Substring(aSelectorText, itemStart, i - itemStart));
    +        TrimWhitespace(selector);
    +        if (!selector.IsEmpty()) {
    +          aSelectors.AppendElement(selector);
    +        }
    +        itemStart = i + 1;
    +      }
    +    }
    +
    +    nsAutoString selector;
    +    selector.Assign(Substring(aSelectorText, itemStart));
    +    TrimWhitespace(selector);
    +    if (!selector.IsEmpty()) {
    +      aSelectors.AppendElement(selector);
    +    }
    +
    +    return !aSelectors.IsEmpty();
    +  }
    +
    +  bool
    +  SelectorHasAmpersand(const nsAString& aSelector) const
    +  {
    +    bool inComment = false;
    +    char16_t stringQuote = 0;
    +
    +    for (uint32_t i = 0; i < aSelector.Length(); ++i) {
    +      char16_t c = aSelector.CharAt(i);
    +
    +      if (inComment) {
    +        if (c == '*' && i + 1 < aSelector.Length() &&
    +            aSelector.CharAt(i + 1) == '/') {
    +          inComment = false;
    +          ++i;
    +        }
    +        continue;
    +      }
    +
    +      if (stringQuote) {
    +        if (c == '\\') {
    +          ++i;
    +          continue;
    +        }
    +        if (c == stringQuote) {
    +          stringQuote = 0;
    +        }
    +        continue;
    +      }
    +
    +      if (c == '/' && i + 1 < aSelector.Length() &&
    +          aSelector.CharAt(i + 1) == '*') {
    +        inComment = true;
    +        ++i;
    +        continue;
    +      }
    +
    +      if (c == '"' || c == '\'') {
    +        stringQuote = c;
    +        continue;
    +      }
    +
    +      if (c == '&') {
    +        return true;
    +      }
    +    }
    +
    +    return false;
    +  }
    +
    +  void
    +  ReplaceAmpersands(const nsAString& aSelector,
    +                    const nsAString& aParent,
    +                    nsAString& aOutput) const
    +  {
    +    bool inComment = false;
    +    char16_t stringQuote = 0;
    +
    +    for (uint32_t i = 0; i < aSelector.Length(); ++i) {
    +      char16_t c = aSelector.CharAt(i);
    +
    +      if (inComment) {
    +        aOutput.Append(c);
    +        if (c == '*' && i + 1 < aSelector.Length() &&
    +            aSelector.CharAt(i + 1) == '/') {
    +          aOutput.Append('/');
    +          inComment = false;
    +          ++i;
    +        }
    +        continue;
    +      }
    +
    +      if (stringQuote) {
    +        aOutput.Append(c);
    +        if (c == '\\' && i + 1 < aSelector.Length()) {
    +          aOutput.Append(aSelector.CharAt(i + 1));
    +          ++i;
    +          continue;
    +        }
    +        if (c == stringQuote) {
    +          stringQuote = 0;
    +        }
    +        continue;
    +      }
    +
    +      if (c == '/' && i + 1 < aSelector.Length() &&
    +          aSelector.CharAt(i + 1) == '*') {
    +        aOutput.AppendLiteral("/*");
    +        inComment = true;
    +        ++i;
    +        continue;
    +      }
    +
    +      if (c == '"' || c == '\'') {
    +        aOutput.Append(c);
    +        stringQuote = c;
    +        continue;
    +      }
    +
    +      if (c == '&') {
    +        aOutput.Append(aParent);
    +        continue;
    +      }
    +
    +      aOutput.Append(c);
    +    }
    +  }
    +
    +  bool
    +  ExpandNestedSelectors(const SelectorList& aParents,
    +                        const nsAString& aNestedSelectorText,
    +                        SelectorList& aSelectors)
    +  {
    +    SelectorList nestedSelectors;
    +    if (!SplitSelectorList(aNestedSelectorText, nestedSelectors)) {
    +      return false;
    +    }
    +
    +    for (const nsString& nestedSelector : nestedSelectors) {
    +      bool hasAmpersand = SelectorHasAmpersand(nestedSelector);
    +      for (const nsString& parentSelector : aParents) {
    +        nsAutoString combined;
    +        if (hasAmpersand) {
    +          ReplaceAmpersands(nestedSelector, parentSelector, combined);
    +        } else {
    +          combined.Assign(parentSelector);
    +          if (!combined.IsEmpty()) {
    +            combined.Append(' ');
    +          }
    +          combined.Append(nestedSelector);
    +        }
    +        TrimWhitespace(combined);
    +        if (!combined.IsEmpty()) {
    +          aSelectors.AppendElement(combined);
    +        }
    +      }
    +    }
    +
    +    return !aSelectors.IsEmpty();
    +  }
    +
    +  static void
    +  AppendSelectors(const SelectorList& aSelectors, nsAString& aOutput)
    +  {
    +    for (uint32_t i = 0; i < aSelectors.Length(); ++i) {
    +      if (i) {
    +        aOutput.AppendLiteral(", ");
    +      }
    +      aOutput.Append(aSelectors[i]);
    +    }
    +  }
    +
    +  static bool
    +  StartsNestedSelector(char16_t aChar)
    +  {
    +    switch (aChar) {
    +      case '.':
    +      case '#':
    +      case '[':
    +      case ':':
    +      case '&':
    +      case '>':
    +      case '+':
    +      case '~':
    +      case '*':
    +        return true;
    +      default:
    +        return false;
    +    }
    +  }
    +
    +  static bool
    +  StartsPotentialTypeSelector(char16_t aChar)
    +  {
    +    return (aChar >= 'a' && aChar <= 'z') ||
    +           (aChar >= 'A' && aChar <= 'Z') ||
    +           aChar == '_' ||
    +           aChar == '\\' ||
    +           aChar >= 0x80;
    +  }
    +
    +  bool
    +  LooksLikeTypeSelectorRule() const
    +  {
    +    if (AtEnd() || !StartsPotentialTypeSelector(Peek())) {
    +      return false;
    +    }
    +
    +    uint32_t pos = mPos;
    +    int32_t parenDepth = 0;
    +    int32_t bracketDepth = 0;
    +    bool inComment = false;
    +    char16_t stringQuote = 0;
    +
    +    while (pos < mInput.Length()) {
    +      char16_t c = mInput.CharAt(pos);
    +
    +      if (inComment) {
    +        if (c == '*' && pos + 1 < mInput.Length() &&
    +            mInput.CharAt(pos + 1) == '/') {
    +          inComment = false;
    +          ++pos;
    +        }
    +        ++pos;
    +        continue;
    +      }
    +
    +      if (stringQuote) {
    +        if (c == '\\' && pos + 1 < mInput.Length()) {
    +          pos += 2;
    +          continue;
    +        }
    +        if (c == stringQuote) {
    +          stringQuote = 0;
    +        }
    +        ++pos;
    +        continue;
    +      }
    +
    +      if (c == '/' && pos + 1 < mInput.Length() &&
    +          mInput.CharAt(pos + 1) == '*') {
    +        inComment = true;
    +        pos += 2;
    +        continue;
    +      }
    +
    +      if (c == '"' || c == '\'') {
    +        stringQuote = c;
    +        ++pos;
    +        continue;
    +      }
    +
    +      if (c == '(') {
    +        ++parenDepth;
    +        ++pos;
    +        continue;
    +      }
    +      if (c == ')' && parenDepth > 0) {
    +        --parenDepth;
    +        ++pos;
    +        continue;
    +      }
    +      if (c == '[') {
    +        ++bracketDepth;
    +        ++pos;
    +        continue;
    +      }
    +      if (c == ']' && bracketDepth > 0) {
    +        --bracketDepth;
    +        ++pos;
    +        continue;
    +      }
    +
    +      if (parenDepth == 0 && bracketDepth == 0) {
    +        if (c == '{') {
    +          return true;
    +        }
    +        if (c == ';' || c == '}') {
    +          return false;
    +        }
    +      }
    +
    +      ++pos;
    +    }
    +
    +    return false;
    +  }
    +
    +  static bool
    +  IsAtRuleNameChar(char16_t aChar)
    +  {
    +    return (aChar >= 'a' && aChar <= 'z') ||
    +           (aChar >= 'A' && aChar <= 'Z') ||
    +           (aChar >= '0' && aChar <= '9') ||
    +           aChar == '-';
    +  }
    +
    +  static void
    +  LowercaseASCII(nsACString& aText)
    +  {
    +    for (uint32_t i = 0; i < aText.Length(); ++i) {
    +      char c = aText.CharAt(i);
    +      if (c >= 'A' && c <= 'Z') {
    +        aText.BeginWriting()[i] = c - 'A' + 'a';
    +      }
    +    }
    +  }
    +
    +  static bool
    +  ShouldProcessGroupRule(const nsACString& aName)
    +  {
    +    return aName.EqualsLiteral("media") ||
    +           aName.EqualsLiteral("supports") ||
    +           aName.EqualsLiteral("document") ||
    +           aName.EqualsLiteral("layer");
    +  }
    +
    +  void
    +  FlushDeclarations(const SelectorList& aSelectors,
    +                    nsAString& aDeclarations,
    +                    nsAString& aOutput)
    +  {
    +    nsAutoString declarations;
    +    declarations.Assign(aDeclarations);
    +    TrimWhitespace(declarations);
    +    aDeclarations.Truncate();
    +
    +    if (declarations.IsEmpty()) {
    +      return;
    +    }
    +
    +    AppendSelectors(aSelectors, aOutput);
    +    aOutput.AppendLiteral(" { ");
    +    aOutput.Append(declarations);
    +    aOutput.AppendLiteral(" }\n");
    +  }
    +
    +  bool
    +  ReadRawBlockBody(nsAString& aBody)
    +  {
    +    uint32_t start = mPos;
    +    int32_t depth = 0;
    +
    +    while (!AtEnd()) {
    +      char16_t c = Peek();
    +      if (c == '"' || c == '\'') {
    +        if (!SkipString(c)) {
    +          return false;
    +        }
    +        continue;
    +      }
    +      if (StartsWithComment()) {
    +        if (!SkipComment()) {
    +          return false;
    +        }
    +        continue;
    +      }
    +      if (c == '{') {
    +        ++depth;
    +        ++mPos;
    +        continue;
    +      }
    +      if (c == '}') {
    +        if (depth == 0) {
    +          aBody.Assign(Substring(mInput, start, mPos - start));
    +          ++mPos;
    +          return true;
    +        }
    +        --depth;
    +        ++mPos;
    +        continue;
    +      }
    +      ++mPos;
    +    }
    +
    +    return false;
    +  }
    +
    +  bool
    +  ReadQualifiedRulePrelude(nsAString& aPrelude)
    +  {
    +    uint32_t start = mPos;
    +    int32_t parenDepth = 0;
    +    int32_t bracketDepth = 0;
    +
    +    while (!AtEnd()) {
    +      char16_t c = Peek();
    +      if (c == '"' || c == '\'') {
    +        if (!SkipString(c)) {
    +          return false;
    +        }
    +        continue;
    +      }
    +      if (StartsWithComment()) {
    +        if (!SkipComment()) {
    +          return false;
    +        }
    +        continue;
    +      }
    +      if (c == '(') {
    +        ++parenDepth;
    +        ++mPos;
    +        continue;
    +      }
    +      if (c == ')' && parenDepth > 0) {
    +        --parenDepth;
    +        ++mPos;
    +        continue;
    +      }
    +      if (c == '[') {
    +        ++bracketDepth;
    +        ++mPos;
    +        continue;
    +      }
    +      if (c == ']' && bracketDepth > 0) {
    +        --bracketDepth;
    +        ++mPos;
    +        continue;
    +      }
    +      if (c == '{' && parenDepth == 0 && bracketDepth == 0) {
    +        aPrelude.Assign(Substring(mInput, start, mPos - start));
    +        TrimWhitespace(aPrelude);
    +        ++mPos;
    +        return !aPrelude.IsEmpty();
    +      }
    +      if ((c == ';' || c == '}') && parenDepth == 0 && bracketDepth == 0) {
    +        return false;
    +      }
    +      ++mPos;
    +    }
    +
    +    return false;
    +  }
    +
    +  bool
    +  ReadAtRulePrelude(nsAString& aPrelude, nsACString& aName, bool& aHasBlock)
    +  {
    +    MOZ_ASSERT(!AtEnd() && Peek() == '@', "expected at-rule");
    +
    +    uint32_t start = mPos;
    +    ++mPos;
    +    aName.Truncate();
    +    while (!AtEnd() && IsAtRuleNameChar(Peek())) {
    +      char16_t c = Peek();
    +      aName.Append(char(c <= 0x7f ? c : '?'));
    +      ++mPos;
    +    }
    +    LowercaseASCII(aName);
    +
    +    int32_t parenDepth = 0;
    +    int32_t bracketDepth = 0;
    +    while (!AtEnd()) {
    +      char16_t c = Peek();
    +      if (c == '"' || c == '\'') {
    +        if (!SkipString(c)) {
    +          return false;
    +        }
    +        continue;
    +      }
    +      if (StartsWithComment()) {
    +        if (!SkipComment()) {
    +          return false;
    +        }
    +        continue;
    +      }
    +      if (c == '(') {
    +        ++parenDepth;
    +        ++mPos;
    +        continue;
    +      }
    +      if (c == ')' && parenDepth > 0) {
    +        --parenDepth;
    +        ++mPos;
    +        continue;
    +      }
    +      if (c == '[') {
    +        ++bracketDepth;
    +        ++mPos;
    +        continue;
    +      }
    +      if (c == ']' && bracketDepth > 0) {
    +        --bracketDepth;
    +        ++mPos;
    +        continue;
    +      }
    +      if (parenDepth == 0 && bracketDepth == 0) {
    +        if (c == ';') {
    +          aPrelude.Assign(Substring(mInput, start, mPos - start));
    +          TrimWhitespace(aPrelude);
    +          ++mPos;
    +          aHasBlock = false;
    +          return true;
    +        }
    +        if (c == '{') {
    +          aPrelude.Assign(Substring(mInput, start, mPos - start));
    +          TrimWhitespace(aPrelude);
    +          ++mPos;
    +          aHasBlock = true;
    +          return true;
    +        }
    +      }
    +      ++mPos;
    +    }
    +
    +    return false;
    +  }
    +
    +  bool
    +  ConsumeDeclaration(nsAString& aDeclaration)
    +  {
    +    uint32_t start = mPos;
    +    int32_t parenDepth = 0;
    +    int32_t bracketDepth = 0;
    +    int32_t braceDepth = 0;
    +
    +    while (!AtEnd()) {
    +      char16_t c = Peek();
    +      if (c == '"' || c == '\'') {
    +        if (!SkipString(c)) {
    +          return false;
    +        }
    +        continue;
    +      }
    +      if (StartsWithComment()) {
    +        if (!SkipComment()) {
    +          return false;
    +        }
    +        continue;
    +      }
    +      if (c == '(') {
    +        ++parenDepth;
    +        ++mPos;
    +        continue;
    +      }
    +      if (c == ')' && parenDepth > 0) {
    +        --parenDepth;
    +        ++mPos;
    +        continue;
    +      }
    +      if (c == '[') {
    +        ++bracketDepth;
    +        ++mPos;
    +        continue;
    +      }
    +      if (c == ']' && bracketDepth > 0) {
    +        --bracketDepth;
    +        ++mPos;
    +        continue;
    +      }
    +      if (c == '{') {
    +        ++braceDepth;
    +        ++mPos;
    +        continue;
    +      }
    +      if (c == '}') {
    +        if (braceDepth == 0 && parenDepth == 0 && bracketDepth == 0) {
    +          break;
    +        }
    +        if (braceDepth > 0) {
    +          --braceDepth;
    +        }
    +        ++mPos;
    +        continue;
    +      }
    +      if (c == ';' && parenDepth == 0 && bracketDepth == 0 &&
    +          braceDepth == 0) {
    +        ++mPos;
    +        break;
    +      }
    +      ++mPos;
    +    }
    +
    +    aDeclaration.Assign(Substring(mInput, start, mPos - start));
    +    TrimWhitespace(aDeclaration);
    +    if (aDeclaration.IsEmpty()) {
    +      return false;
    +    }
    +    if (aDeclaration.Last() != ';') {
    +      aDeclaration.Append(';');
    +    }
    +    return true;
    +  }
    +
    +  bool
    +  ParseAtRule(nsAString& aOutput, const SelectorList* aParents)
    +  {
    +    nsAutoString prelude;
    +    nsAutoCString name;
    +    bool hasBlock = false;
    +    if (!ReadAtRulePrelude(prelude, name, hasBlock)) {
    +      return false;
    +    }
    +
    +    if (!hasBlock) {
    +      aOutput.Append(prelude);
    +      aOutput.AppendLiteral(";\n");
    +      return true;
    +    }
    +
    +    if (!ShouldProcessGroupRule(name)) {
    +      nsAutoString body;
    +      if (!ReadRawBlockBody(body)) {
    +        return false;
    +      }
    +      aOutput.Append(prelude);
    +      aOutput.AppendLiteral(" {");
    +      aOutput.Append(body);
    +      aOutput.AppendLiteral("}\n");
    +      return true;
    +    }
    +
    +    nsAutoString inner;
    +    if (aParents) {
    +      mSawNesting = true;
    +      if (!ProcessStyleContext(*aParents, inner)) {
    +        return false;
    +      }
    +    } else {
    +      if (!ProcessStylesheet(inner, true)) {
    +        return false;
    +      }
    +    }
    +
    +    aOutput.Append(prelude);
    +    aOutput.AppendLiteral(" {\n");
    +    aOutput.Append(inner);
    +    aOutput.AppendLiteral("}\n");
    +    return true;
    +  }
    +
    +  bool
    +  ParseQualifiedRule(nsAString& aOutput, const SelectorList* aParents)
    +  {
    +    nsAutoString prelude;
    +    if (!ReadQualifiedRulePrelude(prelude)) {
    +      return false;
    +    }
    +
    +    SelectorList selectors;
    +    if (aParents) {
    +      mSawNesting = true;
    +      if (!ExpandNestedSelectors(*aParents, prelude, selectors)) {
    +        return false;
    +      }
    +    } else if (!SplitSelectorList(prelude, selectors)) {
    +      return false;
    +    }
    +
    +    return ProcessStyleContext(selectors, aOutput);
    +  }
    +
    +  bool
    +  ProcessStyleContext(const SelectorList& aSelectors, nsAString& aOutput)
    +  {
    +    nsAutoString declarations;
    +
    +    while (!AtEnd()) {
    +      SkipWhitespaceAndComments();
    +      if (AtEnd()) {
    +        return false;
    +      }
    +
    +      char16_t c = Peek();
    +      if (c == '}') {
    +        ++mPos;
    +        FlushDeclarations(aSelectors, declarations, aOutput);
    +        return true;
    +      }
    +
    +      if (c == '@') {
    +        FlushDeclarations(aSelectors, declarations, aOutput);
    +        if (!ParseAtRule(aOutput, &aSelectors)) {
    +          return false;
    +        }
    +        continue;
    +      }
    +
    +      if (StartsNestedSelector(c) || LooksLikeTypeSelectorRule()) {
    +        FlushDeclarations(aSelectors, declarations, aOutput);
    +        if (!ParseQualifiedRule(aOutput, &aSelectors)) {
    +          return false;
    +        }
    +        continue;
    +      }
    +
    +      nsAutoString declaration;
    +      if (!ConsumeDeclaration(declaration)) {
    +        return false;
    +      }
    +      if (!declarations.IsEmpty()) {
    +        declarations.Append(' ');
    +      }
    +      declarations.Append(declaration);
    +    }
    +
    +    return false;
    +  }
    +
    +  bool
    +  ProcessStylesheet(nsAString& aOutput, bool aStopAtBlockEnd)
    +  {
    +    while (!AtEnd()) {
    +      SkipWhitespaceAndComments();
    +      if (AtEnd()) {
    +        return !aStopAtBlockEnd;
    +      }
    +
    +      if (Peek() == '}') {
    +        if (!aStopAtBlockEnd) {
    +          return false;
    +        }
    +        ++mPos;
    +        return true;
    +      }
    +
    +      if (Peek() == '@') {
    +        if (!ParseAtRule(aOutput, nullptr)) {
    +          return false;
    +        }
    +      } else {
    +        if (!ParseQualifiedRule(aOutput, nullptr)) {
    +          return false;
    +        }
    +      }
    +    }
    +
    +    return !aStopAtBlockEnd;
    +  }
    +
    +  const nsAString& mInput;
    +  uint32_t mPos;
    +  bool mSawNesting;
    +};
    +
    +} // namespace
    +
    +bool
    +LowerBasicCSSNesting(const nsAString& aInput, nsAString& aOutput)
    +{
    +  CSSNestingLowerer lowerer(aInput);
    +  return lowerer.Lower(aOutput);
    +}
    +
    +} // namespace css
    +} // namespace mozilla
    diff --git a/layout/style/CSSNestingLowerer.h b/layout/style/CSSNestingLowerer.h
    new file mode 100644
    index 0000000000..b74645186f
    --- /dev/null
    +++ b/layout/style/CSSNestingLowerer.h
    @@ -0,0 +1,19 @@
    +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
    +/* This Source Code Form is subject to the terms of the Mozilla Public
    + * License, v. 2.0. If a copy of the MPL was not distributed with this
    + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    +
    +#ifndef CSSNestingLowerer_h
    +#define CSSNestingLowerer_h
    +
    +class nsAString;
    +
    +namespace mozilla {
    +namespace css {
    +
    +bool LowerBasicCSSNesting(const nsAString& aInput, nsAString& aOutput);
    +
    +} // namespace css
    +} // namespace mozilla
    +
    +#endif // CSSNestingLowerer_h
    diff --git a/layout/style/moz.build b/layout/style/moz.build
    index bc8959c1a3..e10c834daa 100644
    --- a/layout/style/moz.build
    +++ b/layout/style/moz.build
    @@ -127,6 +127,7 @@ UNIFIED_SOURCES += [
         'CounterStyleManager.cpp',
         'CSS.cpp',
         'CSSLexer.cpp',
    +    'CSSNestingLowerer.cpp',
         'CSSRuleList.cpp',
         'CSSStyleSheet.cpp',
         'CSSVariableDeclarations.cpp',
    diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp
    index 484085b019..6ca421a09b 100644
    --- a/layout/style/nsCSSParser.cpp
    +++ b/layout/style/nsCSSParser.cpp
    @@ -18,6 +18,7 @@
     #include      // for std::regex and std::regex_match
     
     #include "nsCSSParser.h"
    +#include "CSSNestingLowerer.h"
     #include "nsAlgorithm.h"
     #include "nsCSSProps.h"
     #include "nsCSSKeywords.h"
    @@ -206,940 +207,6 @@ OKLabToSRGBColor(float aL, float aA, float aB, float aAlpha)
         nsStyleUtil::FloatToColorComponent(mozilla::clamped(aAlpha, 0.0f, 1.0f)));
     }
     
    -class CSSNestingLowerer final
    -{
    -  using SelectorList = nsTArray;
    -
    -public:
    -  explicit CSSNestingLowerer(const nsAString& aInput)
    -    : mInput(aInput)
    -    , mPos(0)
    -    , mSawNesting(false)
    -  {
    -  }
    -
    -  bool Lower(nsAString& aOutput)
    -  {
    -    nsAutoString lowered;
    -    if (!ProcessStylesheet(lowered, false)) {
    -      return false;
    -    }
    -
    -    SkipWhitespaceAndComments();
    -    if (mPos != mInput.Length() || !mSawNesting) {
    -      return false;
    -    }
    -
    -    aOutput.Assign(lowered);
    -    return true;
    -  }
    -
    -private:
    -  static constexpr auto kCSSWhitespace = " \t\r\n\f";
    -
    -  static bool
    -  IsCSSWhitespace(char16_t aChar)
    -  {
    -    return aChar == ' ' || aChar == '\t' || aChar == '\r' ||
    -           aChar == '\n' || aChar == '\f';
    -  }
    -
    -  bool
    -  AtEnd() const
    -  {
    -    return mPos >= mInput.Length();
    -  }
    -
    -  char16_t
    -  Peek() const
    -  {
    -    MOZ_ASSERT(!AtEnd(), "cannot peek past end");
    -    return mInput.CharAt(mPos);
    -  }
    -
    -  bool
    -  StartsWithComment() const
    -  {
    -    return mPos + 1 < mInput.Length() &&
    -           mInput.CharAt(mPos) == '/' &&
    -           mInput.CharAt(mPos + 1) == '*';
    -  }
    -
    -  bool
    -  SkipComment()
    -  {
    -    MOZ_ASSERT(StartsWithComment(), "expected comment");
    -
    -    mPos += 2;
    -    while (mPos + 1 < mInput.Length()) {
    -      if (mInput.CharAt(mPos) == '*' && mInput.CharAt(mPos + 1) == '/') {
    -        mPos += 2;
    -        return true;
    -      }
    -      ++mPos;
    -    }
    -
    -    return false;
    -  }
    -
    -  void
    -  SkipWhitespaceAndComments()
    -  {
    -    while (!AtEnd()) {
    -      if (IsCSSWhitespace(Peek())) {
    -        ++mPos;
    -        continue;
    -      }
    -      if (StartsWithComment()) {
    -        if (!SkipComment()) {
    -          mPos = mInput.Length();
    -          return;
    -        }
    -        continue;
    -      }
    -      break;
    -    }
    -  }
    -
    -  bool
    -  SkipString(char16_t aQuote)
    -  {
    -    MOZ_ASSERT(!AtEnd() && Peek() == aQuote, "expected string start");
    -
    -    ++mPos;
    -    while (!AtEnd()) {
    -      char16_t c = Peek();
    -      ++mPos;
    -      if (c == aQuote) {
    -        return true;
    -      }
    -      if (c == '\\' && !AtEnd()) {
    -        ++mPos;
    -        continue;
    -      }
    -      if (c == '\n' || c == '\r' || c == '\f') {
    -        return false;
    -      }
    -    }
    -
    -    return false;
    -  }
    -
    -  static void
    -  TrimWhitespace(nsAString& aText)
    -  {
    -    uint32_t start = 0;
    -    uint32_t end = aText.Length();
    -
    -    while (start < end && IsCSSWhitespace(aText.CharAt(start))) {
    -      ++start;
    -    }
    -    while (end > start && IsCSSWhitespace(aText.CharAt(end - 1))) {
    -      --end;
    -    }
    -
    -    if (start == 0 && end == aText.Length()) {
    -      return;
    -    }
    -
    -    aText.Assign(Substring(aText, start, end - start));
    -  }
    -
    -  bool
    -  SplitSelectorList(const nsAString& aSelectorText, SelectorList& aSelectors)
    -  {
    -    uint32_t itemStart = 0;
    -    int32_t parenDepth = 0;
    -    int32_t bracketDepth = 0;
    -    bool inComment = false;
    -    char16_t stringQuote = 0;
    -
    -    for (uint32_t i = 0; i < aSelectorText.Length(); ++i) {
    -      char16_t c = aSelectorText.CharAt(i);
    -
    -      if (inComment) {
    -        if (c == '*' && i + 1 < aSelectorText.Length() &&
    -            aSelectorText.CharAt(i + 1) == '/') {
    -          inComment = false;
    -          ++i;
    -        }
    -        continue;
    -      }
    -
    -      if (stringQuote) {
    -        if (c == '\\') {
    -          ++i;
    -          continue;
    -        }
    -        if (c == stringQuote) {
    -          stringQuote = 0;
    -        }
    -        continue;
    -      }
    -
    -      if (c == '/' && i + 1 < aSelectorText.Length() &&
    -          aSelectorText.CharAt(i + 1) == '*') {
    -        inComment = true;
    -        ++i;
    -        continue;
    -      }
    -
    -      if (c == '"' || c == '\'') {
    -        stringQuote = c;
    -        continue;
    -      }
    -
    -      if (c == '(') {
    -        ++parenDepth;
    -        continue;
    -      }
    -      if (c == ')' && parenDepth > 0) {
    -        --parenDepth;
    -        continue;
    -      }
    -      if (c == '[') {
    -        ++bracketDepth;
    -        continue;
    -      }
    -      if (c == ']' && bracketDepth > 0) {
    -        --bracketDepth;
    -        continue;
    -      }
    -
    -      if (c == ',' && parenDepth == 0 && bracketDepth == 0) {
    -        nsAutoString selector;
    -        selector.Assign(Substring(aSelectorText, itemStart, i - itemStart));
    -        TrimWhitespace(selector);
    -        if (!selector.IsEmpty()) {
    -          aSelectors.AppendElement(selector);
    -        }
    -        itemStart = i + 1;
    -      }
    -    }
    -
    -    nsAutoString selector;
    -    selector.Assign(Substring(aSelectorText, itemStart));
    -    TrimWhitespace(selector);
    -    if (!selector.IsEmpty()) {
    -      aSelectors.AppendElement(selector);
    -    }
    -
    -    return !aSelectors.IsEmpty();
    -  }
    -
    -  bool
    -  SelectorHasAmpersand(const nsAString& aSelector) const
    -  {
    -    bool inComment = false;
    -    char16_t stringQuote = 0;
    -
    -    for (uint32_t i = 0; i < aSelector.Length(); ++i) {
    -      char16_t c = aSelector.CharAt(i);
    -
    -      if (inComment) {
    -        if (c == '*' && i + 1 < aSelector.Length() &&
    -            aSelector.CharAt(i + 1) == '/') {
    -          inComment = false;
    -          ++i;
    -        }
    -        continue;
    -      }
    -
    -      if (stringQuote) {
    -        if (c == '\\') {
    -          ++i;
    -          continue;
    -        }
    -        if (c == stringQuote) {
    -          stringQuote = 0;
    -        }
    -        continue;
    -      }
    -
    -      if (c == '/' && i + 1 < aSelector.Length() &&
    -          aSelector.CharAt(i + 1) == '*') {
    -        inComment = true;
    -        ++i;
    -        continue;
    -      }
    -
    -      if (c == '"' || c == '\'') {
    -        stringQuote = c;
    -        continue;
    -      }
    -
    -      if (c == '&') {
    -        return true;
    -      }
    -    }
    -
    -    return false;
    -  }
    -
    -  void
    -  ReplaceAmpersands(const nsAString& aSelector,
    -                    const nsAString& aParent,
    -                    nsAString& aOutput) const
    -  {
    -    bool inComment = false;
    -    char16_t stringQuote = 0;
    -
    -    for (uint32_t i = 0; i < aSelector.Length(); ++i) {
    -      char16_t c = aSelector.CharAt(i);
    -
    -      if (inComment) {
    -        aOutput.Append(c);
    -        if (c == '*' && i + 1 < aSelector.Length() &&
    -            aSelector.CharAt(i + 1) == '/') {
    -          aOutput.Append('/');
    -          inComment = false;
    -          ++i;
    -        }
    -        continue;
    -      }
    -
    -      if (stringQuote) {
    -        aOutput.Append(c);
    -        if (c == '\\' && i + 1 < aSelector.Length()) {
    -          aOutput.Append(aSelector.CharAt(i + 1));
    -          ++i;
    -          continue;
    -        }
    -        if (c == stringQuote) {
    -          stringQuote = 0;
    -        }
    -        continue;
    -      }
    -
    -      if (c == '/' && i + 1 < aSelector.Length() &&
    -          aSelector.CharAt(i + 1) == '*') {
    -        aOutput.AppendLiteral("/*");
    -        inComment = true;
    -        ++i;
    -        continue;
    -      }
    -
    -      if (c == '"' || c == '\'') {
    -        aOutput.Append(c);
    -        stringQuote = c;
    -        continue;
    -      }
    -
    -      if (c == '&') {
    -        aOutput.Append(aParent);
    -        continue;
    -      }
    -
    -      aOutput.Append(c);
    -    }
    -  }
    -
    -  bool
    -  ExpandNestedSelectors(const SelectorList& aParents,
    -                        const nsAString& aNestedSelectorText,
    -                        SelectorList& aSelectors)
    -  {
    -    SelectorList nestedSelectors;
    -    if (!SplitSelectorList(aNestedSelectorText, nestedSelectors)) {
    -      return false;
    -    }
    -
    -    for (const nsString& nestedSelector : nestedSelectors) {
    -      bool hasAmpersand = SelectorHasAmpersand(nestedSelector);
    -      for (const nsString& parentSelector : aParents) {
    -        nsAutoString combined;
    -        if (hasAmpersand) {
    -          ReplaceAmpersands(nestedSelector, parentSelector, combined);
    -        } else {
    -          combined.Assign(parentSelector);
    -          if (!combined.IsEmpty()) {
    -            combined.Append(' ');
    -          }
    -          combined.Append(nestedSelector);
    -        }
    -        TrimWhitespace(combined);
    -        if (!combined.IsEmpty()) {
    -          aSelectors.AppendElement(combined);
    -        }
    -      }
    -    }
    -
    -    return !aSelectors.IsEmpty();
    -  }
    -
    -  static void
    -  AppendSelectors(const SelectorList& aSelectors, nsAString& aOutput)
    -  {
    -    for (uint32_t i = 0; i < aSelectors.Length(); ++i) {
    -      if (i) {
    -        aOutput.AppendLiteral(", ");
    -      }
    -      aOutput.Append(aSelectors[i]);
    -    }
    -  }
    -
    -  static bool
    -  StartsNestedSelector(char16_t aChar)
    -  {
    -    switch (aChar) {
    -      case '.':
    -      case '#':
    -      case '[':
    -      case ':':
    -      case '&':
    -      case '>':
    -      case '+':
    -      case '~':
    -      case '*':
    -        return true;
    -      default:
    -        return false;
    -    }
    -  }
    -
    -  static bool
    -  StartsPotentialTypeSelector(char16_t aChar)
    -  {
    -    return (aChar >= 'a' && aChar <= 'z') ||
    -           (aChar >= 'A' && aChar <= 'Z') ||
    -           aChar == '_' ||
    -           aChar == '\\' ||
    -           aChar >= 0x80;
    -  }
    -
    -  bool
    -  LooksLikeTypeSelectorRule() const
    -  {
    -    if (AtEnd() || !StartsPotentialTypeSelector(Peek())) {
    -      return false;
    -    }
    -
    -    uint32_t pos = mPos;
    -    int32_t parenDepth = 0;
    -    int32_t bracketDepth = 0;
    -    bool inComment = false;
    -    char16_t stringQuote = 0;
    -
    -    while (pos < mInput.Length()) {
    -      char16_t c = mInput.CharAt(pos);
    -
    -      if (inComment) {
    -        if (c == '*' && pos + 1 < mInput.Length() &&
    -            mInput.CharAt(pos + 1) == '/') {
    -          inComment = false;
    -          ++pos;
    -        }
    -        ++pos;
    -        continue;
    -      }
    -
    -      if (stringQuote) {
    -        if (c == '\\' && pos + 1 < mInput.Length()) {
    -          pos += 2;
    -          continue;
    -        }
    -        if (c == stringQuote) {
    -          stringQuote = 0;
    -        }
    -        ++pos;
    -        continue;
    -      }
    -
    -      if (c == '/' && pos + 1 < mInput.Length() &&
    -          mInput.CharAt(pos + 1) == '*') {
    -        inComment = true;
    -        pos += 2;
    -        continue;
    -      }
    -
    -      if (c == '"' || c == '\'') {
    -        stringQuote = c;
    -        ++pos;
    -        continue;
    -      }
    -
    -      if (c == '(') {
    -        ++parenDepth;
    -        ++pos;
    -        continue;
    -      }
    -      if (c == ')' && parenDepth > 0) {
    -        --parenDepth;
    -        ++pos;
    -        continue;
    -      }
    -      if (c == '[') {
    -        ++bracketDepth;
    -        ++pos;
    -        continue;
    -      }
    -      if (c == ']' && bracketDepth > 0) {
    -        --bracketDepth;
    -        ++pos;
    -        continue;
    -      }
    -
    -      if (parenDepth == 0 && bracketDepth == 0) {
    -        if (c == '{') {
    -          return true;
    -        }
    -        if (c == ';' || c == '}') {
    -          return false;
    -        }
    -      }
    -
    -      ++pos;
    -    }
    -
    -    return false;
    -  }
    -
    -  static bool
    -  IsAtRuleNameChar(char16_t aChar)
    -  {
    -    return (aChar >= 'a' && aChar <= 'z') ||
    -           (aChar >= 'A' && aChar <= 'Z') ||
    -           (aChar >= '0' && aChar <= '9') ||
    -           aChar == '-';
    -  }
    -
    -  static void
    -  LowercaseASCII(nsACString& aText)
    -  {
    -    for (uint32_t i = 0; i < aText.Length(); ++i) {
    -      char c = aText.CharAt(i);
    -      if (c >= 'A' && c <= 'Z') {
    -        aText.BeginWriting()[i] = c - 'A' + 'a';
    -      }
    -    }
    -  }
    -
    -  static bool
    -  ShouldProcessGroupRule(const nsACString& aName)
    -  {
    -    return aName.EqualsLiteral("media") ||
    -           aName.EqualsLiteral("supports") ||
    -           aName.EqualsLiteral("document") ||
    -           aName.EqualsLiteral("layer");
    -  }
    -
    -  void
    -  FlushDeclarations(const SelectorList& aSelectors,
    -                    nsAString& aDeclarations,
    -                    nsAString& aOutput)
    -  {
    -    nsAutoString declarations;
    -    declarations.Assign(aDeclarations);
    -    TrimWhitespace(declarations);
    -    aDeclarations.Truncate();
    -
    -    if (declarations.IsEmpty()) {
    -      return;
    -    }
    -
    -    AppendSelectors(aSelectors, aOutput);
    -    aOutput.AppendLiteral(" { ");
    -    aOutput.Append(declarations);
    -    aOutput.AppendLiteral(" }\n");
    -  }
    -
    -  bool
    -  ReadRawBlockBody(nsAString& aBody)
    -  {
    -    uint32_t start = mPos;
    -    int32_t depth = 0;
    -
    -    while (!AtEnd()) {
    -      char16_t c = Peek();
    -      if (c == '"' || c == '\'') {
    -        if (!SkipString(c)) {
    -          return false;
    -        }
    -        continue;
    -      }
    -      if (StartsWithComment()) {
    -        if (!SkipComment()) {
    -          return false;
    -        }
    -        continue;
    -      }
    -      if (c == '{') {
    -        ++depth;
    -        ++mPos;
    -        continue;
    -      }
    -      if (c == '}') {
    -        if (depth == 0) {
    -          aBody.Assign(Substring(mInput, start, mPos - start));
    -          ++mPos;
    -          return true;
    -        }
    -        --depth;
    -        ++mPos;
    -        continue;
    -      }
    -      ++mPos;
    -    }
    -
    -    return false;
    -  }
    -
    -  bool
    -  ReadQualifiedRulePrelude(nsAString& aPrelude)
    -  {
    -    uint32_t start = mPos;
    -    int32_t parenDepth = 0;
    -    int32_t bracketDepth = 0;
    -
    -    while (!AtEnd()) {
    -      char16_t c = Peek();
    -      if (c == '"' || c == '\'') {
    -        if (!SkipString(c)) {
    -          return false;
    -        }
    -        continue;
    -      }
    -      if (StartsWithComment()) {
    -        if (!SkipComment()) {
    -          return false;
    -        }
    -        continue;
    -      }
    -      if (c == '(') {
    -        ++parenDepth;
    -        ++mPos;
    -        continue;
    -      }
    -      if (c == ')' && parenDepth > 0) {
    -        --parenDepth;
    -        ++mPos;
    -        continue;
    -      }
    -      if (c == '[') {
    -        ++bracketDepth;
    -        ++mPos;
    -        continue;
    -      }
    -      if (c == ']' && bracketDepth > 0) {
    -        --bracketDepth;
    -        ++mPos;
    -        continue;
    -      }
    -      if (c == '{' && parenDepth == 0 && bracketDepth == 0) {
    -        aPrelude.Assign(Substring(mInput, start, mPos - start));
    -        TrimWhitespace(aPrelude);
    -        ++mPos;
    -        return !aPrelude.IsEmpty();
    -      }
    -      if ((c == ';' || c == '}') && parenDepth == 0 && bracketDepth == 0) {
    -        return false;
    -      }
    -      ++mPos;
    -    }
    -
    -    return false;
    -  }
    -
    -  bool
    -  ReadAtRulePrelude(nsAString& aPrelude, nsACString& aName, bool& aHasBlock)
    -  {
    -    MOZ_ASSERT(!AtEnd() && Peek() == '@', "expected at-rule");
    -
    -    uint32_t start = mPos;
    -    ++mPos;
    -    aName.Truncate();
    -    while (!AtEnd() && IsAtRuleNameChar(Peek())) {
    -      char16_t c = Peek();
    -      aName.Append(char(c <= 0x7f ? c : '?'));
    -      ++mPos;
    -    }
    -    LowercaseASCII(aName);
    -
    -    int32_t parenDepth = 0;
    -    int32_t bracketDepth = 0;
    -    while (!AtEnd()) {
    -      char16_t c = Peek();
    -      if (c == '"' || c == '\'') {
    -        if (!SkipString(c)) {
    -          return false;
    -        }
    -        continue;
    -      }
    -      if (StartsWithComment()) {
    -        if (!SkipComment()) {
    -          return false;
    -        }
    -        continue;
    -      }
    -      if (c == '(') {
    -        ++parenDepth;
    -        ++mPos;
    -        continue;
    -      }
    -      if (c == ')' && parenDepth > 0) {
    -        --parenDepth;
    -        ++mPos;
    -        continue;
    -      }
    -      if (c == '[') {
    -        ++bracketDepth;
    -        ++mPos;
    -        continue;
    -      }
    -      if (c == ']' && bracketDepth > 0) {
    -        --bracketDepth;
    -        ++mPos;
    -        continue;
    -      }
    -      if (parenDepth == 0 && bracketDepth == 0) {
    -        if (c == ';') {
    -          aPrelude.Assign(Substring(mInput, start, mPos - start));
    -          TrimWhitespace(aPrelude);
    -          ++mPos;
    -          aHasBlock = false;
    -          return true;
    -        }
    -        if (c == '{') {
    -          aPrelude.Assign(Substring(mInput, start, mPos - start));
    -          TrimWhitespace(aPrelude);
    -          ++mPos;
    -          aHasBlock = true;
    -          return true;
    -        }
    -      }
    -      ++mPos;
    -    }
    -
    -    return false;
    -  }
    -
    -  bool
    -  ConsumeDeclaration(nsAString& aDeclaration)
    -  {
    -    uint32_t start = mPos;
    -    int32_t parenDepth = 0;
    -    int32_t bracketDepth = 0;
    -    int32_t braceDepth = 0;
    -
    -    while (!AtEnd()) {
    -      char16_t c = Peek();
    -      if (c == '"' || c == '\'') {
    -        if (!SkipString(c)) {
    -          return false;
    -        }
    -        continue;
    -      }
    -      if (StartsWithComment()) {
    -        if (!SkipComment()) {
    -          return false;
    -        }
    -        continue;
    -      }
    -      if (c == '(') {
    -        ++parenDepth;
    -        ++mPos;
    -        continue;
    -      }
    -      if (c == ')' && parenDepth > 0) {
    -        --parenDepth;
    -        ++mPos;
    -        continue;
    -      }
    -      if (c == '[') {
    -        ++bracketDepth;
    -        ++mPos;
    -        continue;
    -      }
    -      if (c == ']' && bracketDepth > 0) {
    -        --bracketDepth;
    -        ++mPos;
    -        continue;
    -      }
    -      if (c == '{') {
    -        ++braceDepth;
    -        ++mPos;
    -        continue;
    -      }
    -      if (c == '}') {
    -        if (braceDepth == 0 && parenDepth == 0 && bracketDepth == 0) {
    -          break;
    -        }
    -        if (braceDepth > 0) {
    -          --braceDepth;
    -        }
    -        ++mPos;
    -        continue;
    -      }
    -      if (c == ';' && parenDepth == 0 && bracketDepth == 0 &&
    -          braceDepth == 0) {
    -        ++mPos;
    -        break;
    -      }
    -      ++mPos;
    -    }
    -
    -    aDeclaration.Assign(Substring(mInput, start, mPos - start));
    -    TrimWhitespace(aDeclaration);
    -    if (aDeclaration.IsEmpty()) {
    -      return false;
    -    }
    -    if (aDeclaration.Last() != ';') {
    -      aDeclaration.Append(';');
    -    }
    -    return true;
    -  }
    -
    -  bool
    -  ParseAtRule(nsAString& aOutput, const SelectorList* aParents)
    -  {
    -    nsAutoString prelude;
    -    nsAutoCString name;
    -    bool hasBlock = false;
    -    if (!ReadAtRulePrelude(prelude, name, hasBlock)) {
    -      return false;
    -    }
    -
    -    if (!hasBlock) {
    -      aOutput.Append(prelude);
    -      aOutput.AppendLiteral(";\n");
    -      return true;
    -    }
    -
    -    if (!ShouldProcessGroupRule(name)) {
    -      nsAutoString body;
    -      if (!ReadRawBlockBody(body)) {
    -        return false;
    -      }
    -      aOutput.Append(prelude);
    -      aOutput.AppendLiteral(" {");
    -      aOutput.Append(body);
    -      aOutput.AppendLiteral("}\n");
    -      return true;
    -    }
    -
    -    nsAutoString inner;
    -    if (aParents) {
    -      mSawNesting = true;
    -      if (!ProcessStyleContext(*aParents, inner)) {
    -        return false;
    -      }
    -    } else {
    -      if (!ProcessStylesheet(inner, true)) {
    -        return false;
    -      }
    -    }
    -
    -    aOutput.Append(prelude);
    -    aOutput.AppendLiteral(" {\n");
    -    aOutput.Append(inner);
    -    aOutput.AppendLiteral("}\n");
    -    return true;
    -  }
    -
    -  bool
    -  ParseQualifiedRule(nsAString& aOutput, const SelectorList* aParents)
    -  {
    -    nsAutoString prelude;
    -    if (!ReadQualifiedRulePrelude(prelude)) {
    -      return false;
    -    }
    -
    -    SelectorList selectors;
    -    if (aParents) {
    -      mSawNesting = true;
    -      if (!ExpandNestedSelectors(*aParents, prelude, selectors)) {
    -        return false;
    -      }
    -    } else if (!SplitSelectorList(prelude, selectors)) {
    -      return false;
    -    }
    -
    -    return ProcessStyleContext(selectors, aOutput);
    -  }
    -
    -  bool
    -  ProcessStyleContext(const SelectorList& aSelectors, nsAString& aOutput)
    -  {
    -    nsAutoString declarations;
    -
    -    while (!AtEnd()) {
    -      SkipWhitespaceAndComments();
    -      if (AtEnd()) {
    -        return false;
    -      }
    -
    -      char16_t c = Peek();
    -      if (c == '}') {
    -        ++mPos;
    -        FlushDeclarations(aSelectors, declarations, aOutput);
    -        return true;
    -      }
    -
    -      if (c == '@') {
    -        FlushDeclarations(aSelectors, declarations, aOutput);
    -        if (!ParseAtRule(aOutput, &aSelectors)) {
    -          return false;
    -        }
    -        continue;
    -      }
    -
    -      if (StartsNestedSelector(c) || LooksLikeTypeSelectorRule()) {
    -        FlushDeclarations(aSelectors, declarations, aOutput);
    -        if (!ParseQualifiedRule(aOutput, &aSelectors)) {
    -          return false;
    -        }
    -        continue;
    -      }
    -
    -      nsAutoString declaration;
    -      if (!ConsumeDeclaration(declaration)) {
    -        return false;
    -      }
    -      if (!declarations.IsEmpty()) {
    -        declarations.Append(' ');
    -      }
    -      declarations.Append(declaration);
    -    }
    -
    -    return false;
    -  }
    -
    -  bool
    -  ProcessStylesheet(nsAString& aOutput, bool aStopAtBlockEnd)
    -  {
    -    while (!AtEnd()) {
    -      SkipWhitespaceAndComments();
    -      if (AtEnd()) {
    -        return !aStopAtBlockEnd;
    -      }
    -
    -      if (Peek() == '}') {
    -        if (!aStopAtBlockEnd) {
    -          return false;
    -        }
    -        ++mPos;
    -        return true;
    -      }
    -
    -      if (Peek() == '@') {
    -        if (!ParseAtRule(aOutput, nullptr)) {
    -          return false;
    -        }
    -      } else {
    -        if (!ParseQualifiedRule(aOutput, nullptr)) {
    -          return false;
    -        }
    -      }
    -    }
    -
    -    return !aStopAtBlockEnd;
    -  }
    -
    -  const nsAString& mInput;
    -  uint32_t mPos;
    -  bool mSawNesting;
    -};
    -
     static_assert(css::eAuthorSheetFeatures == 0 &&
                   css::eUserSheetFeatures == 1 &&
                   css::eAgentSheetFeatures == 2,
    @@ -2761,11 +1828,9 @@ CSSParserImpl::ParseSheet(const nsAString& aInput,
     
       nsAutoString loweredInput;
       const nsAString* input = &aInput;
    -  if (sNestingEnabled) {
    -    CSSNestingLowerer lowerer(aInput);
    -    if (lowerer.Lower(loweredInput)) {
    -      input = &loweredInput;
    -    }
    +  if (sNestingEnabled &&
    +      mozilla::css::LowerBasicCSSNesting(aInput, loweredInput)) {
    +    input = &loweredInput;
       }
     
       nsCSSScanner scanner(*input, aLineNumber);
    
    From 2a0179437f5f9aefb098416d1cf36ec552880630 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Wed, 11 Mar 2026 23:09:02 -0400
    Subject: [PATCH 15/72] Issue #2862 - more tests files for nested css
    
    ---
     layout/style/test/mochitest.ini               |   1 +
     .../test_nesting_lowering_parser_edges.html   | 161 ++++++++++++++++++
     2 files changed, 162 insertions(+)
     create mode 100644 layout/style/test/test_nesting_lowering_parser_edges.html
    
    diff --git a/layout/style/test/mochitest.ini b/layout/style/test/mochitest.ini
    index d4ad77d9a4..13d1b77acc 100644
    --- a/layout/style/test/mochitest.ini
    +++ b/layout/style/test/mochitest.ini
    @@ -73,6 +73,7 @@ support-files = file_animations_with_disabled_properties.html
     [test_aspect_ratio_property.html]
     [test_background_blend_mode.html]
     [test_basic_nesting_lowering.html]
    +[test_nesting_lowering_parser_edges.html]
     [test_box_size_keywords.html]
     [test_bug73586.html]
     [test_css_math_functions.html]
    diff --git a/layout/style/test/test_nesting_lowering_parser_edges.html b/layout/style/test/test_nesting_lowering_parser_edges.html
    new file mode 100644
    index 0000000000..9ab78ac501
    --- /dev/null
    +++ b/layout/style/test/test_nesting_lowering_parser_edges.html
    @@ -0,0 +1,161 @@
    +
    +
    +
    +  
    +  Test CSS Nesting Lowering Parser Edges
    +  
    +  
    +
    +
    +
    + + + + + + +
    +
    +
    +
    
    +
    +
    +
    
    From 505600c45e695b98ed3b416730c9ecfd0b8e7072 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Thu, 12 Mar 2026 08:02:18 -0400
    Subject: [PATCH 16/72] Issue #2862 - handle more edge cases in css lowering
    
    ---
     layout/style/CSSNestingLowerer.cpp            |   1 +
     layout/style/test/mochitest.ini               |   1 +
     .../test/test_nesting_lowering_recovery.html  | 149 ++++++++++++++++++
     3 files changed, 151 insertions(+)
     create mode 100644 layout/style/test/test_nesting_lowering_recovery.html
    
    diff --git a/layout/style/CSSNestingLowerer.cpp b/layout/style/CSSNestingLowerer.cpp
    index 9340c4c5af..2dd45d58a9 100644
    --- a/layout/style/CSSNestingLowerer.cpp
    +++ b/layout/style/CSSNestingLowerer.cpp
    @@ -395,6 +395,7 @@ private:
           case '[':
           case ':':
           case '&':
    +      case '|':
           case '>':
           case '+':
           case '~':
    diff --git a/layout/style/test/mochitest.ini b/layout/style/test/mochitest.ini
    index 13d1b77acc..28b3ab8122 100644
    --- a/layout/style/test/mochitest.ini
    +++ b/layout/style/test/mochitest.ini
    @@ -74,6 +74,7 @@ support-files = file_animations_with_disabled_properties.html
     [test_background_blend_mode.html]
     [test_basic_nesting_lowering.html]
     [test_nesting_lowering_parser_edges.html]
    +[test_nesting_lowering_recovery.html]
     [test_box_size_keywords.html]
     [test_bug73586.html]
     [test_css_math_functions.html]
    diff --git a/layout/style/test/test_nesting_lowering_recovery.html b/layout/style/test/test_nesting_lowering_recovery.html
    new file mode 100644
    index 0000000000..3e3184931f
    --- /dev/null
    +++ b/layout/style/test/test_nesting_lowering_recovery.html
    @@ -0,0 +1,149 @@
    +
    +
    +
    +  
    +  Test CSS Nesting Lowering Recovery Paths
    +  
    +  
    +
    +
    +
    +
    +
    +
    +
    
    +
    +
    +
    
    From 64d55b0a2efeab096c82e800ba38d4453dac326b Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 13 Mar 2026 08:58:18 -0400
    Subject: [PATCH 17/72] Issue #2862 - Change code references from CSS lowering
     to CSS flattening
    
    ---
     ...ingLowerer.cpp => CSSNestingFlattener.cpp} | 20 +++++++++----------
     ...NestingLowerer.h => CSSNestingFlattener.h} |  8 ++++----
     layout/style/moz.build                        |  2 +-
     layout/style/nsCSSParser.cpp                  |  8 ++++----
     4 files changed, 19 insertions(+), 19 deletions(-)
     rename layout/style/{CSSNestingLowerer.cpp => CSSNestingFlattener.cpp} (98%)
     rename layout/style/{CSSNestingLowerer.h => CSSNestingFlattener.h} (69%)
    
    diff --git a/layout/style/CSSNestingLowerer.cpp b/layout/style/CSSNestingFlattener.cpp
    similarity index 98%
    rename from layout/style/CSSNestingLowerer.cpp
    rename to layout/style/CSSNestingFlattener.cpp
    index 2dd45d58a9..ac8fc1a2ca 100644
    --- a/layout/style/CSSNestingLowerer.cpp
    +++ b/layout/style/CSSNestingFlattener.cpp
    @@ -3,7 +3,7 @@
      * License, v. 2.0. If a copy of the MPL was not distributed with this
      * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     
    -#include "CSSNestingLowerer.h"
    +#include "CSSNestingFlattener.h"
     
     #include "mozilla/Assertions.h"
     #include "nsString.h"
    @@ -14,22 +14,22 @@ namespace css {
     
     namespace {
     
    -class CSSNestingLowerer final
    +class CSSNestingFlattener final
     {
       using SelectorList = nsTArray;
     
     public:
    -  explicit CSSNestingLowerer(const nsAString& aInput)
    +  explicit CSSNestingFlattener(const nsAString& aInput)
         : mInput(aInput)
         , mPos(0)
         , mSawNesting(false)
       {
       }
     
    -  bool Lower(nsAString& aOutput)
    +  bool Flatten(nsAString& aOutput)
       {
    -    nsAutoString lowered;
    -    if (!ProcessStylesheet(lowered, false)) {
    +    nsAutoString flattened;
    +    if (!ProcessStylesheet(flattened, false)) {
           return false;
         }
     
    @@ -38,7 +38,7 @@ public:
           return false;
         }
     
    -    aOutput.Assign(lowered);
    +    aOutput.Assign(flattened);
         return true;
       }
     
    @@ -952,10 +952,10 @@ private:
     } // namespace
     
     bool
    -LowerBasicCSSNesting(const nsAString& aInput, nsAString& aOutput)
    +FlattenBasicCSSNesting(const nsAString& aInput, nsAString& aOutput)
     {
    -  CSSNestingLowerer lowerer(aInput);
    -  return lowerer.Lower(aOutput);
    +  CSSNestingFlattener flattener(aInput);
    +  return flattener.Flatten(aOutput);
     }
     
     } // namespace css
    diff --git a/layout/style/CSSNestingLowerer.h b/layout/style/CSSNestingFlattener.h
    similarity index 69%
    rename from layout/style/CSSNestingLowerer.h
    rename to layout/style/CSSNestingFlattener.h
    index b74645186f..41a9d4432d 100644
    --- a/layout/style/CSSNestingLowerer.h
    +++ b/layout/style/CSSNestingFlattener.h
    @@ -3,17 +3,17 @@
      * License, v. 2.0. If a copy of the MPL was not distributed with this
      * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     
    -#ifndef CSSNestingLowerer_h
    -#define CSSNestingLowerer_h
    +#ifndef CSSNestingFlattener_h
    +#define CSSNestingFlattener_h
     
     class nsAString;
     
     namespace mozilla {
     namespace css {
     
    -bool LowerBasicCSSNesting(const nsAString& aInput, nsAString& aOutput);
    +bool FlattenBasicCSSNesting(const nsAString& aInput, nsAString& aOutput);
     
     } // namespace css
     } // namespace mozilla
     
    -#endif // CSSNestingLowerer_h
    +#endif // CSSNestingFlattener_h
    diff --git a/layout/style/moz.build b/layout/style/moz.build
    index e10c834daa..3dfbd58012 100644
    --- a/layout/style/moz.build
    +++ b/layout/style/moz.build
    @@ -127,7 +127,7 @@ UNIFIED_SOURCES += [
         'CounterStyleManager.cpp',
         'CSS.cpp',
         'CSSLexer.cpp',
    -    'CSSNestingLowerer.cpp',
    +    'CSSNestingFlattener.cpp',
         'CSSRuleList.cpp',
         'CSSStyleSheet.cpp',
         'CSSVariableDeclarations.cpp',
    diff --git a/layout/style/nsCSSParser.cpp b/layout/style/nsCSSParser.cpp
    index 6ca421a09b..6e24a427b0 100644
    --- a/layout/style/nsCSSParser.cpp
    +++ b/layout/style/nsCSSParser.cpp
    @@ -18,7 +18,7 @@
     #include      // for std::regex and std::regex_match
     
     #include "nsCSSParser.h"
    -#include "CSSNestingLowerer.h"
    +#include "CSSNestingFlattener.h"
     #include "nsAlgorithm.h"
     #include "nsCSSProps.h"
     #include "nsCSSKeywords.h"
    @@ -1826,11 +1826,11 @@ CSSParserImpl::ParseSheet(const nsAString& aInput,
                    "Sheet principal does not match passed principal");
     #endif
     
    -  nsAutoString loweredInput;
    +  nsAutoString flattenedInput;
       const nsAString* input = &aInput;
       if (sNestingEnabled &&
    -      mozilla::css::LowerBasicCSSNesting(aInput, loweredInput)) {
    -    input = &loweredInput;
    +      mozilla::css::FlattenBasicCSSNesting(aInput, flattenedInput)) {
    +    input = &flattenedInput;
       }
     
       nsCSSScanner scanner(*input, aLineNumber);
    
    From df9550ae5ab2dd0358b175c8e1edfbdd7e01285a Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 13 Mar 2026 09:01:56 -0400
    Subject: [PATCH 18/72] Issue #2862 - Change tests from lowering to flattening
    
    ---
     layout/style/test/mochitest.ini                        |  6 +++---
     ...owering.html => test_basic_nesting_flattening.html} | 10 +++++-----
     ....html => test_nesting_flattening_parser_edges.html} |  4 ++--
     ...very.html => test_nesting_flattening_recovery.html} |  2 +-
     4 files changed, 11 insertions(+), 11 deletions(-)
     rename layout/style/test/{test_basic_nesting_lowering.html => test_basic_nesting_flattening.html} (93%)
     rename layout/style/test/{test_nesting_lowering_parser_edges.html => test_nesting_flattening_parser_edges.html} (97%)
     rename layout/style/test/{test_nesting_lowering_recovery.html => test_nesting_flattening_recovery.html} (98%)
    
    diff --git a/layout/style/test/mochitest.ini b/layout/style/test/mochitest.ini
    index 28b3ab8122..6e4b68e82f 100644
    --- a/layout/style/test/mochitest.ini
    +++ b/layout/style/test/mochitest.ini
    @@ -72,9 +72,9 @@ support-files = file_animations_with_disabled_properties.html
     [test_attribute_selector_eof_behavior.html]
     [test_aspect_ratio_property.html]
     [test_background_blend_mode.html]
    -[test_basic_nesting_lowering.html]
    -[test_nesting_lowering_parser_edges.html]
    -[test_nesting_lowering_recovery.html]
    +[test_basic_nesting_flattening.html]
    +[test_nesting_flattening_parser_edges.html]
    +[test_nesting_flattening_recovery.html]
     [test_box_size_keywords.html]
     [test_bug73586.html]
     [test_css_math_functions.html]
    diff --git a/layout/style/test/test_basic_nesting_lowering.html b/layout/style/test/test_basic_nesting_flattening.html
    similarity index 93%
    rename from layout/style/test/test_basic_nesting_lowering.html
    rename to layout/style/test/test_basic_nesting_flattening.html
    index 6c08934a11..b24af42e76 100644
    --- a/layout/style/test/test_basic_nesting_lowering.html
    +++ b/layout/style/test/test_basic_nesting_flattening.html
    @@ -2,7 +2,7 @@
     
     
       
    -  Test for Basic CSS Nesting Lowering
    +  Test for Basic CSS Nesting Flattening
       
       
     
    @@ -68,15 +68,15 @@ function runChecks(style, report) {
              colorOf(window, scope, "color"),
              "rgb(1, 2, 3)");
       report(colorOf(window, desc, "color") === "rgb(4, 5, 6)",
    -         "nested descendant rule should be lowered",
    +         "nested descendant rule should be flattened",
              colorOf(window, desc, "color"),
              "rgb(4, 5, 6)");
       report(colorOf(window, desc, "border-left-color") === "rgb(19, 20, 21)",
    -         "nested type selector rule should be lowered",
    +         "nested type selector rule should be flattened",
              colorOf(window, desc, "border-left-color"),
              "rgb(19, 20, 21)");
       report(colorOf(window, desc, "border-bottom-color") === "rgb(22, 23, 24)",
    -         "nested type selector pseudos should be lowered",
    +         "nested type selector pseudos should be flattened",
              colorOf(window, desc, "border-bottom-color"),
              "rgb(22, 23, 24)");
       report(colorOf(window, scope, "background-color") === "rgb(7, 8, 9)",
    @@ -96,7 +96,7 @@ function runChecks(style, report) {
              colorOf(window, scope, "border-right-color"),
              "rgb(16, 17, 18)");
       report(style.sheet.cssRules.length === 9,
    -         "lowering should produce flat top-level rules",
    +         "flattening should produce flat top-level rules",
              String(style.sheet.cssRules.length),
              "9");
     }
    diff --git a/layout/style/test/test_nesting_lowering_parser_edges.html b/layout/style/test/test_nesting_flattening_parser_edges.html
    similarity index 97%
    rename from layout/style/test/test_nesting_lowering_parser_edges.html
    rename to layout/style/test/test_nesting_flattening_parser_edges.html
    index 9ab78ac501..100ff1bf1d 100644
    --- a/layout/style/test/test_nesting_lowering_parser_edges.html
    +++ b/layout/style/test/test_nesting_flattening_parser_edges.html
    @@ -2,7 +2,7 @@
     
     
       
    -  Test CSS Nesting Lowering Parser Edges
    +  Test CSS Nesting Flattening Parser Edges
       
       
     
    @@ -71,7 +71,7 @@ function runChecks(style, report) {
     
       var payload = propOf(window, scope, "--payload");
       report(payload.indexOf("alpha") !== -1 && payload.indexOf("beta") !== -1,
    -         "custom property payload should survive lowering",
    +         "custom property payload should survive flattening",
              payload,
              "contains alpha and beta");
     
    diff --git a/layout/style/test/test_nesting_lowering_recovery.html b/layout/style/test/test_nesting_flattening_recovery.html
    similarity index 98%
    rename from layout/style/test/test_nesting_lowering_recovery.html
    rename to layout/style/test/test_nesting_flattening_recovery.html
    index 3e3184931f..63eed9091b 100644
    --- a/layout/style/test/test_nesting_lowering_recovery.html
    +++ b/layout/style/test/test_nesting_flattening_recovery.html
    @@ -2,7 +2,7 @@
     
     
       
    -  Test CSS Nesting Lowering Recovery Paths
    +  Test CSS Nesting Flattening Recovery Paths
       
       
     
    
    From 700d17fea88feef3a9cbc88b544c1b22e16ffca9 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Sat, 14 Mar 2026 13:22:59 -0400
    Subject: [PATCH 19/72] Issue #2862 - Remove unused vars in CSS flattener
    
    ---
     layout/style/CSSNestingFlattener.cpp | 2 --
     1 file changed, 2 deletions(-)
    
    diff --git a/layout/style/CSSNestingFlattener.cpp b/layout/style/CSSNestingFlattener.cpp
    index ac8fc1a2ca..287e2ca5d1 100644
    --- a/layout/style/CSSNestingFlattener.cpp
    +++ b/layout/style/CSSNestingFlattener.cpp
    @@ -43,8 +43,6 @@ public:
       }
     
     private:
    -  static constexpr auto kCSSWhitespace = " \t\r\n\f";
    -
       static bool
       IsCSSWhitespace(char16_t aChar)
       {
    
    From c88750f4989f2840a1fddaff978713da3210fd6e Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Sat, 14 Mar 2026 13:23:54 -0400
    Subject: [PATCH 20/72] Issue #2862 - css nesting pref true by default
    
    ---
     modules/libpref/init/all.js | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
    index 6dee3b429a..e13c9e94c9 100644
    --- a/modules/libpref/init/all.js
    +++ b/modules/libpref/init/all.js
    @@ -2726,7 +2726,7 @@ pref("layout.css.resizeobserver.enabled", true);
     pref("layout.css.cascade-layers.enabled", true);
     
     // Is support for basic CSS nesting lowering enabled?
    -pref("layout.css.nesting.enabled", false);
    +pref("layout.css.nesting.enabled", true);
     
     // Should rules in imported style sheets be added based on the order
     // of appearance of their respective @import rules in the parent
    
    From f7820b0ab5228c3a265ac3dfd53a0b5e48f318d0 Mon Sep 17 00:00:00 2001
    From: Moonchild 
    Date: Mon, 2 Feb 2026 18:43:28 +0100
    Subject: [PATCH 21/72] Issue #2928 - Check mCacheQueue size before removing
     entries.
    
    Resolves #2928
    ---
     image/imgLoader.cpp | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/image/imgLoader.cpp b/image/imgLoader.cpp
    index 904eaaab2d..f33719c66c 100644
    --- a/image/imgLoader.cpp
    +++ b/image/imgLoader.cpp
    @@ -1949,7 +1949,7 @@ imgLoader::RemoveFromCache(imgCacheEntry* entry)
         if (entry->HasNoProxies()) {
           LOG_STATIC_FUNC(gImgLog,
                           "imgLoader::RemoveFromCache removing from tracker");
    -      if (mCacheTracker) {
    +      if (mCacheTracker && queue.GetSize() > 0) {
             mCacheTracker->RemoveObject(entry);
           }
           queue.Remove(entry);
    
    From 7332833ecc31d4d32a317e7560a7d0378a3b0ad7 Mon Sep 17 00:00:00 2001
    From: Moonchild 
    Date: Tue, 3 Feb 2026 08:51:06 +0100
    Subject: [PATCH 22/72] Issue #2928 - Re-order imgLoader::RemoveFromCache
    
    Remove from tracker first before removing from cache, and if the cache
    queue is dirty, refresh it (causes a re-heap) before manipulating further.
    ---
     image/imgLoader.cpp | 9 ++++++---
     1 file changed, 6 insertions(+), 3 deletions(-)
    
    diff --git a/image/imgLoader.cpp b/image/imgLoader.cpp
    index f33719c66c..a33ce46f71 100644
    --- a/image/imgLoader.cpp
    +++ b/image/imgLoader.cpp
    @@ -1944,17 +1944,20 @@ imgLoader::RemoveFromCache(imgCacheEntry* entry)
                                    "imgLoader::RemoveFromCache", "entry's uri",
                                    key.Spec());
     
    -    cache.Remove(key);
    -
         if (entry->HasNoProxies()) {
           LOG_STATIC_FUNC(gImgLog,
                           "imgLoader::RemoveFromCache removing from tracker");
    -      if (mCacheTracker && queue.GetSize() > 0) {
    +      if (queue.IsDirty()) {
    +        queue.Refresh();
    +      }
    +      if (mCacheTracker) {
             mCacheTracker->RemoveObject(entry);
           }
           queue.Remove(entry);
         }
     
    +    cache.Remove(key);
    +
         entry->SetEvicted(true);
         request->SetIsInCache(false);
         AddToUncachedImages(request);
    
    From 252cbabfd46800bfa14310d99389b6c7d057021b Mon Sep 17 00:00:00 2001
    From: Moonchild 
    Date: Tue, 3 Feb 2026 10:17:19 +0100
    Subject: [PATCH 23/72] Issue #2928 - Always refresh dirty queue.
    
    ---
     image/imgLoader.cpp | 7 ++++---
     1 file changed, 4 insertions(+), 3 deletions(-)
    
    diff --git a/image/imgLoader.cpp b/image/imgLoader.cpp
    index a33ce46f71..d57f2232d7 100644
    --- a/image/imgLoader.cpp
    +++ b/image/imgLoader.cpp
    @@ -1944,12 +1944,13 @@ imgLoader::RemoveFromCache(imgCacheEntry* entry)
                                    "imgLoader::RemoveFromCache", "entry's uri",
                                    key.Spec());
     
    +    if (queue.IsDirty()) {
    +      queue.Refresh();
    +    }
    +
         if (entry->HasNoProxies()) {
           LOG_STATIC_FUNC(gImgLog,
                           "imgLoader::RemoveFromCache removing from tracker");
    -      if (queue.IsDirty()) {
    -        queue.Refresh();
    -      }
           if (mCacheTracker) {
             mCacheTracker->RemoveObject(entry);
           }
    
    From 3b799da2f8f8a70c3475277685e5f7ba27f47172 Mon Sep 17 00:00:00 2001
    From: Moonchild 
    Date: Wed, 4 Feb 2026 09:07:23 +0100
    Subject: [PATCH 24/72] Issue #2928 - Avoid searching the image cache queue for
     an entry after we just popped it off the queue.
    
    ---
     image/imgLoader.cpp | 25 ++++++++++++++++++++-----
     image/imgLoader.h   | 11 ++++++++++-
     2 files changed, 30 insertions(+), 6 deletions(-)
    
    diff --git a/image/imgLoader.cpp b/image/imgLoader.cpp
    index d57f2232d7..895a8924a9 100644
    --- a/image/imgLoader.cpp
    +++ b/image/imgLoader.cpp
    @@ -1013,6 +1013,12 @@ imgCacheQueue::GetNumElements() const
       return mQueue.size();
     }
     
    +bool
    +imgCacheQueue::Contains(imgCacheEntry* aEntry) const
    +{
    +  return mQueue.Contains(aEntry);
    +}
    +
     imgCacheQueue::iterator
     imgCacheQueue::begin()
     {
    @@ -1631,7 +1637,9 @@ imgLoader::CheckCacheLimits(imgCacheTable& cache, imgCacheQueue& queue)
         }
     
         if (entry) {
    -      RemoveFromCache(entry);
    +      // We just popped this entry from the queue, so pass AlreadyRemoved
    +      // to avoid searching the queue again in RemoveFromCache.
    +      RemoveFromCache(entry, QueueState::AlreadyRemoved);
         }
       }
     }
    @@ -1930,7 +1938,7 @@ imgLoader::RemoveFromCache(const ImageCacheKey& aKey)
     }
     
     bool
    -imgLoader::RemoveFromCache(imgCacheEntry* entry)
    +imgLoader::RemoveFromCache(imgCacheEntry* entry, QueueState aQueueState)
     {
       LOG_STATIC_FUNC(gImgLog, "imgLoader::RemoveFromCache entry");
     
    @@ -1944,6 +1952,8 @@ imgLoader::RemoveFromCache(imgCacheEntry* entry)
                                    "imgLoader::RemoveFromCache", "entry's uri",
                                    key.Spec());
     
    +    cache.Remove(key);
    +
         if (queue.IsDirty()) {
           queue.Refresh();
         }
    @@ -1954,11 +1964,16 @@ imgLoader::RemoveFromCache(imgCacheEntry* entry)
           if (mCacheTracker) {
             mCacheTracker->RemoveObject(entry);
           }
    -      queue.Remove(entry);
    +      // Only search the queue to remove the entry if its possible it might
    +      // be in the queue.  If we know its not in the queue this would be
    +      // wasted work.
    +      MOZ_ASSERT_IF(aQueueState == QueueState::AlreadyRemoved,
    +                    !queue.Contains(entry));
    +      if (aQueueState == QueueState::MaybeExists) {
    +        queue.Remove(entry);
    +      }
         }
     
    -    cache.Remove(key);
    -
         entry->SetEvicted(true);
         request->SetIsInCache(false);
         AddToUncachedImages(request);
    diff --git a/image/imgLoader.h b/image/imgLoader.h
    index 7349a666e5..43c92faa95 100644
    --- a/image/imgLoader.h
    +++ b/image/imgLoader.h
    @@ -316,7 +316,16 @@ public:
       nsresult InitCache();
     
       bool RemoveFromCache(const ImageCacheKey& aKey);
    -  bool RemoveFromCache(imgCacheEntry* entry);
    +
    +  // Enumeration describing if a given entry is in the cache queue or not.
    +  // There are some cases we know the entry is definitely not in the queue.
    +  enum class QueueState {
    +    MaybeExists,
    +    AlreadyRemoved
    +  };
    +
    +  bool RemoveFromCache(imgCacheEntry* entry,
    +                       QueueState aQueueState = QueueState::MaybeExists);
     
       bool PutIntoCache(const ImageCacheKey& aKey, imgCacheEntry* aEntry);
     
    
    From bc0dbe9abb27f277a618dc10904f208377b2de3b Mon Sep 17 00:00:00 2001
    From: Moonchild 
    Date: Wed, 4 Feb 2026 09:19:05 +0100
    Subject: [PATCH 25/72] Issue #2928 - Improve imgLoader cache queue handling.
    
    - Convert the imgCacheQueue to nsTArray from Vector
    - Avoid marking the queue dirty when element operations are performed
    that don't upset the sort order. This should improve performance as well.
    ---
     image/imgLoader.cpp | 66 ++++++++++++++++++++++++++++++++++-----------
     image/imgLoader.h   |  3 ++-
     2 files changed, 52 insertions(+), 17 deletions(-)
    
    diff --git a/image/imgLoader.cpp b/image/imgLoader.cpp
    index 895a8924a9..5725fd9648 100644
    --- a/image/imgLoader.cpp
    +++ b/image/imgLoader.cpp
    @@ -952,12 +952,38 @@ using namespace std;
     void
     imgCacheQueue::Remove(imgCacheEntry* entry)
     {
    -  queueContainer::iterator it = find(mQueue.begin(), mQueue.end(), entry);
    -  if (it != mQueue.end()) {
    -    mSize -= (*it)->GetDataSize();
    -    mQueue.erase(it);
    -    MarkDirty();
    +  uint64_t index = mQueue.IndexOf(entry);
    +  if (index == queueContainer::NoIndex) {
    +    return;
       }
    +
    +  mSize -= mQueue[index]->GetDataSize();
    +
    +  // If the queue is clean and this is the first entry,
    +  // then we can efficiently remove the entry without
    +  // dirtying the sort order.
    +  if (!IsDirty() && index == 0) {
    +    std::pop_heap(mQueue.begin(), mQueue.end(),
    +                  imgLoader::CompareCacheEntries);
    +    mQueue.RemoveElementAt(mQueue.Length() - 1);
    +    return;
    +  }
    +
    +  // Remove from the middle of the list. This potentially
    +  // breaks the binary heap sort order.
    +  mQueue.RemoveElementAt(index);
    +
    +  // If we only have one entry or the queue is empty, though,
    +  // then the sort order is still effectively good.
    +  // Simply refresh the list to clear the dirty flag.
    +  if (mQueue.Length() <= 1) {
    +    Refresh();
    +    return;
    +  }
    +
    +  // Otherwise we must mark the queue dirty and potentially
    +  // trigger an expensive sort later.
    +  MarkDirty();
     }
     
     void
    @@ -966,23 +992,26 @@ imgCacheQueue::Push(imgCacheEntry* entry)
       mSize += entry->GetDataSize();
     
       RefPtr refptr(entry);
    -  mQueue.push_back(refptr);
    -  MarkDirty();
    +  mQueue.AppendElement(Move(refptr));
    +  // If we're not dirty already, then we can efficiently add this to the binary heap immediately. 
    +  if (!IsDirty()) {
    +    std::push_heap(mQueue.begin(), mQueue.end(), imgLoader::CompareCacheEntries);
    +  }
     }
     
     already_AddRefed
     imgCacheQueue::Pop()
     {
    -  if (mQueue.empty()) {
    +  if (mQueue.IsEmpty()) {
         return nullptr;
       }
       if (IsDirty()) {
         Refresh();
       }
     
    -  RefPtr entry = mQueue[0];
       std::pop_heap(mQueue.begin(), mQueue.end(), imgLoader::CompareCacheEntries);
    -  mQueue.pop_back();
    +  RefPtr entry = Move(mQueue.LastElement());
    +  mQueue.RemoveElementAt(mQueue.Length() - 1);
     
       mSize -= entry->GetDataSize();
       return entry.forget();
    @@ -991,6 +1020,7 @@ imgCacheQueue::Pop()
     void
     imgCacheQueue::Refresh()
     {
    +  // Re-heap the list. This is an O(3 * n) operation and best avoided if possible.
       std::make_heap(mQueue.begin(), mQueue.end(), imgLoader::CompareCacheEntries);
       mDirty = false;
     }
    @@ -1010,7 +1040,7 @@ imgCacheQueue::IsDirty()
     uint32_t
     imgCacheQueue::GetNumElements() const
     {
    -  return mQueue.size();
    +  return mQueue.Length();
     }
     
     bool
    @@ -1608,7 +1638,11 @@ void
     imgLoader::CacheEntriesChanged(bool aForChrome, int32_t aSizeDiff /* = 0 */)
     {
       imgCacheQueue& queue = GetCacheQueue(aForChrome);
    -  queue.MarkDirty();
    +  // We only need to dirty the queue if there is any sorting taking place.
    +  // Empty or single-entry lists can't become dirty.
    +  if (queue.GetNumElements() > 1) {
    +    queue.MarkDirty();
    +  }
       queue.UpdateSize(aSizeDiff);
     }
     
    @@ -2016,13 +2050,13 @@ imgLoader::EvictEntries(imgCacheQueue& aQueueToClear)
       // We have to make a temporary, since RemoveFromCache removes the element
       // from the queue, invalidating iterators.
       nsTArray > entries(aQueueToClear.GetNumElements());
    -  for (imgCacheQueue::const_iterator i = aQueueToClear.begin();
    -       i != aQueueToClear.end(); ++i) {
    +  for (auto i = aQueueToClear.begin(); i != aQueueToClear.end(); ++i) {
         entries.AppendElement(*i);
       }
     
    -  for (uint32_t i = 0; i < entries.Length(); ++i) {
    -    if (!RemoveFromCache(entries[i])) {
    +  // Iterate in reverse order to minimize array copying.
    +  for (auto& entry : entries) {
    +    if (!RemoveFromCache(entry)) {
           return NS_ERROR_FAILURE;
         }
       }
    diff --git a/image/imgLoader.h b/image/imgLoader.h
    index 43c92faa95..8557e92bd1 100644
    --- a/image/imgLoader.h
    +++ b/image/imgLoader.h
    @@ -178,7 +178,8 @@ public:
       uint32_t GetSize() const;
       void UpdateSize(int32_t diff);
       uint32_t GetNumElements() const;
    -  typedef std::vector > queueContainer;
    +  bool Contains(imgCacheEntry* aEntry) const;
    +  typedef nsTArray > queueContainer;
       typedef queueContainer::iterator iterator;
       typedef queueContainer::const_iterator const_iterator;
     
    
    From 18c04a471df26da8c412a6d52a10e5ea1f1d28b1 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Wed, 4 Feb 2026 09:53:46 -0500
    Subject: [PATCH 26/72] Issue #2551 - Initial attempt at toSorted
     implementation
    
    ---
     js/src/builtin/Array.js         | 23 +++++++++++++++++++++++
     js/src/jsarray.cpp              |  4 +++-
     js/src/vm/CommonPropertyNames.h |  1 +
     3 files changed, 27 insertions(+), 1 deletion(-)
    
    diff --git a/js/src/builtin/Array.js b/js/src/builtin/Array.js
    index 54446d2578..11a4a7485f 100644
    --- a/js/src/builtin/Array.js
    +++ b/js/src/builtin/Array.js
    @@ -253,6 +253,29 @@ function ArraySort(comparefn) {
         return MergeSort(O, len, comparefn);
     }
     
    +// ES2023 22.1.3.30 Array.prototype.toSorted ( comparefn )
    +function ArrayToSorted(comparefn) {
    +    if (comparefn !== undefined) {
    +        if (!IsCallable(comparefn)) {
    +            ThrowTypeError(JSMSG_NOT_FUNCTION, DecompileArg(0, comparefn));
    +        }
    +    }
    +
    +    var O = ToObject(this);
    +    var len = ToLength(O.length);
    +
    +    var A = ArraySpeciesCreate(O, len);
    +    for (var k = 0; k < len; k++) {
    +        if (k in O)
    +            _DefineDataProperty(A, k, O[k]);
    +        else
    +            delete A[k];
    +    }
    +
    +    callFunction(std_Array_sort, A, comparefn);
    +    return A;
    +}
    +
     /* ES5 15.4.4.18. */
     function ArrayForEach(callbackfn/*, thisArg*/) {
         /* Step 1. */
    diff --git a/js/src/jsarray.cpp b/js/src/jsarray.cpp
    index 6f646b3b2d..15cb23a213 100644
    --- a/js/src/jsarray.cpp
    +++ b/js/src/jsarray.cpp
    @@ -3227,6 +3227,7 @@ static const JSFunctionSpec array_methods[] = {
         /* ES2023 proposals */
         JS_SELF_HOSTED_FN("findLast",    "ArrayFindLast",    1,0),
         JS_SELF_HOSTED_FN("findLastIndex", "ArrayFindLastIndex", 1,0),
    +    JS_SELF_HOSTED_FN("toSorted",    "ArrayToSorted",    1,0),
         
         JS_FS_END
     };
    @@ -3401,7 +3402,8 @@ array_proto_finish(JSContext* cx, JS::HandleObject ctor, JS::HandleObject proto)
             !DefineProperty(cx, unscopables, cx->names().flatMap, value) ||
             !DefineProperty(cx, unscopables, cx->names().includes, value) ||
             !DefineProperty(cx, unscopables, cx->names().keys, value) ||
    -        !DefineProperty(cx, unscopables, cx->names().values, value))
    +        !DefineProperty(cx, unscopables, cx->names().values, value) ||
    +        !DefineProperty(cx, unscopables, cx->names().toSorted, value))
         {
             return false;
         }
    diff --git a/js/src/vm/CommonPropertyNames.h b/js/src/vm/CommonPropertyNames.h
    index 13af5c237d..6edd49c6c0 100644
    --- a/js/src/vm/CommonPropertyNames.h
    +++ b/js/src/vm/CommonPropertyNames.h
    @@ -429,6 +429,7 @@
         macro(toJSON, toJSON, "toJSON") \
         macro(toLocaleString, toLocaleString, "toLocaleString") \
         macro(toSource, toSource, "toSource") \
    +    macro(toSorted, toSorted, "toSorted") \
         macro(toString, toString, "toString") \
         macro(toUTCString, toUTCString, "toUTCString") \
         macro(true, true_, "true") \
    
    From 4edeca8c62d975b76fd13449093f7819265a12af Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Thu, 5 Feb 2026 09:53:39 -0500
    Subject: [PATCH 27/72] Issue #2551 - Ensure toSorted is 100% spec compliant
     per multiple tests
    
    ---
     js/src/builtin/Array.js | 46 ++++++++++++++++++++++++++++++++++++-----
     1 file changed, 41 insertions(+), 5 deletions(-)
    
    diff --git a/js/src/builtin/Array.js b/js/src/builtin/Array.js
    index 11a4a7485f..3efe5c409b 100644
    --- a/js/src/builtin/Array.js
    +++ b/js/src/builtin/Array.js
    @@ -264,15 +264,51 @@ function ArrayToSorted(comparefn) {
         var O = ToObject(this);
         var len = ToLength(O.length);
     
    -    var A = ArraySpeciesCreate(O, len);
    +    var items = new List();
    +    var itemsLen = 0;
         for (var k = 0; k < len; k++) {
             if (k in O)
    -            _DefineDataProperty(A, k, O[k]);
    -        else
    -            delete A[k];
    +            items[itemsLen++] = O[k];
         }
     
    -    callFunction(std_Array_sort, A, comparefn);
    +    var wrappedCompareFn = comparefn;
    +    var sortCompare;
    +    if (wrappedCompareFn === undefined) {
    +        sortCompare = function(x, y) {
    +            if (x === undefined)
    +                return y === undefined ? 0 : 1;
    +            if (y === undefined)
    +                return -1;
    +
    +            var xString = ToString(x);
    +            var yString = ToString(y);
    +            if (xString < yString)
    +                return -1;
    +            if (xString > yString)
    +                return 1;
    +            return 0;
    +        };
    +    } else {
    +        sortCompare = function(x, y) {
    +            if (x === undefined)
    +                return y === undefined ? 0 : 1;
    +            if (y === undefined)
    +                return -1;
    +
    +            var v = ToNumber(wrappedCompareFn(x, y));
    +            return v !== v ? 0 : v;
    +        };
    +    }
    +
    +    if (itemsLen > 1)
    +        MergeSort(items, itemsLen, sortCompare);
    +
    +    var A = ArraySpeciesCreate(O, 0);
    +    A.length = len;
    +
    +    for (var j = 0; j < itemsLen; j++)
    +        _DefineDataProperty(A, j, items[j]);
    +
         return A;
     }
     
    
    From d3764451e27e2f80afa3224c344a1d21acea6d3f Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Thu, 5 Feb 2026 10:33:42 -0500
    Subject: [PATCH 28/72] Issue #2551 - Add toSorted test and do some final
     tweaks to toSorted to be compliant
    
    ---
     js/src/builtin/Array.js                 |  9 ++--
     js/src/tests/ecma_6/Array/toSorted.html | 59 +++++++++++++++++++++++++
     js/src/tests/ecma_6/Array/toSorted.js   | 57 ++++++++++++++++++++++++
     3 files changed, 119 insertions(+), 6 deletions(-)
     create mode 100644 js/src/tests/ecma_6/Array/toSorted.html
     create mode 100644 js/src/tests/ecma_6/Array/toSorted.js
    
    diff --git a/js/src/builtin/Array.js b/js/src/builtin/Array.js
    index 3efe5c409b..a257a2547d 100644
    --- a/js/src/builtin/Array.js
    +++ b/js/src/builtin/Array.js
    @@ -265,10 +265,9 @@ function ArrayToSorted(comparefn) {
         var len = ToLength(O.length);
     
         var items = new List();
    -    var itemsLen = 0;
    +    var itemsLen = len;
         for (var k = 0; k < len; k++) {
    -        if (k in O)
    -            items[itemsLen++] = O[k];
    +        items[k] = O[k];
         }
     
         var wrappedCompareFn = comparefn;
    @@ -303,9 +302,7 @@ function ArrayToSorted(comparefn) {
         if (itemsLen > 1)
             MergeSort(items, itemsLen, sortCompare);
     
    -    var A = ArraySpeciesCreate(O, 0);
    -    A.length = len;
    -
    +    var A = ArraySpeciesCreate(O, len);
         for (var j = 0; j < itemsLen; j++)
             _DefineDataProperty(A, j, items[j]);
     
    diff --git a/js/src/tests/ecma_6/Array/toSorted.html b/js/src/tests/ecma_6/Array/toSorted.html
    new file mode 100644
    index 0000000000..3738b05c48
    --- /dev/null
    +++ b/js/src/tests/ecma_6/Array/toSorted.html
    @@ -0,0 +1,59 @@
    +
    +
    +Array.prototype.toSorted test
    +
    +
    
    +
    +
    diff --git a/js/src/tests/ecma_6/Array/toSorted.js b/js/src/tests/ecma_6/Array/toSorted.js
    new file mode 100644
    index 0000000000..fbd2540deb
    --- /dev/null
    +++ b/js/src/tests/ecma_6/Array/toSorted.js
    @@ -0,0 +1,57 @@
    +/* Any copyright is dedicated to the Public Domain.
    + * http://creativecommons.org/licenses/publicdomain/ */
    +
    +assertEq(typeof Array.prototype.toSorted, "function");
    +
    +// Non-mutating behavior.
    +let original = [3, 1, 2];
    +let sorted = original.toSorted();
    +assertEq(original !== sorted, true);
    +assertEq(original.join(","), "3,1,2");
    +assertEq(sorted.join(","), "1,2,3");
    +
    +// Compare function.
    +let nums = [10, 1, 5];
    +let desc = nums.toSorted((a, b) => b - a);
    +assertEq(desc.join(","), "10,5,1");
    +
    +// Stable sort.
    +let stableInput = [
    +    {v: 1, id: "a"},
    +    {v: 1, id: "b"},
    +    {v: 1, id: "c"}
    +];
    +let stableSorted = stableInput.toSorted((x, y) => x.v - y.v);
    +assertEq(stableSorted.map(o => o.id).join(""), "abc");
    +
    +// Holes are treated as undefined (properties are created).
    +let sparse = [3, , 1];
    +let sparseSorted = sparse.toSorted();
    +assertEq(sparseSorted.length, 3);
    +assertEq(sparseSorted[0], 1);
    +assertEq(sparseSorted[1], 3);
    +assertEq(2 in sparseSorted, true);
    +assertEq(sparseSorted[2], undefined);
    +
    +// Array-like input.
    +let arrayLike = {0: 2, 1: 1, length: 2};
    +let arrayLikeSorted = Array.prototype.toSorted.call(arrayLike);
    +assertEq(Array.isArray(arrayLikeSorted), true);
    +assertEq(arrayLikeSorted.join(","), "1,2");
    +
    +// Getter access order (ascending indices).
    +let accessLog = [];
    +let getterArr = {
    +    length: 3,
    +    get 0() { accessLog.push(0); return 3; },
    +    get 1() { accessLog.push(1); return 1; },
    +    get 2() { accessLog.push(2); return 2; }
    +};
    +Array.prototype.toSorted.call(getterArr);
    +assertEq(accessLog.join(","), "0,1,2");
    +
    +// Comparator errors propagate.
    +assertThrowsInstanceOf(() => [1, 2].toSorted(1), TypeError);
    +
    +if (typeof reportCompare === "function")
    +    reportCompare(0, 0);
    
    From d4658401f75fb74e907e7db1f46d95822fe1be3c Mon Sep 17 00:00:00 2001
    From: Moonchild 
    Date: Fri, 6 Feb 2026 10:44:03 +0100
    Subject: [PATCH 29/72] No Issue - Remove redundant OS check for toolkit/fonts
    
    This is already guarded by MOZ_BUNDLED_FONTS one level higher and blocks
    --enable-bundled-fonts from working on other OSes
    ---
     toolkit/fonts/moz.build | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/toolkit/fonts/moz.build b/toolkit/fonts/moz.build
    index bfdff9e075..129a7737c6 100644
    --- a/toolkit/fonts/moz.build
    +++ b/toolkit/fonts/moz.build
    @@ -3,5 +3,4 @@
     # License, v. 2.0. If a copy of the MPL was not distributed with this
     # file, You can obtain one at http://mozilla.org/MPL/2.0/.
     
    -if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk2', 'gtk3'):
    -    FINAL_TARGET_FILES.fonts += ['TwemojiMozilla.ttf']
    +FINAL_TARGET_FILES.fonts += ['TwemojiMozilla.ttf']
    
    From 75db223e088f6e951000ed82e0b3aa8ce1ddc6ea Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 6 Feb 2026 06:54:54 -0500
    Subject: [PATCH 30/72] Issue #2551 - comment toSorted implementation
    
    ---
     js/src/builtin/Array.js | 5 +++++
     1 file changed, 5 insertions(+)
    
    diff --git a/js/src/builtin/Array.js b/js/src/builtin/Array.js
    index a257a2547d..9a6022f340 100644
    --- a/js/src/builtin/Array.js
    +++ b/js/src/builtin/Array.js
    @@ -261,15 +261,18 @@ function ArrayToSorted(comparefn) {
             }
         }
     
    +    // Step 1: Let O be ? ToObject(this). Let len be ? ToLength(O.length).
         var O = ToObject(this);
         var len = ToLength(O.length);
     
    +    // Step 2: Snapshot values in ascending index order into a List.
         var items = new List();
         var itemsLen = len;
         for (var k = 0; k < len; k++) {
             items[k] = O[k];
         }
     
    +    // Step 3: Create SortCompare per spec.
         var wrappedCompareFn = comparefn;
         var sortCompare;
         if (wrappedCompareFn === undefined) {
    @@ -299,9 +302,11 @@ function ArrayToSorted(comparefn) {
             };
         }
     
    +    // Step 4: Sort the snapshot List using SortCompare.
         if (itemsLen > 1)
             MergeSort(items, itemsLen, sortCompare);
     
    +    // Step 5: Create result array and write sorted values.
         var A = ArraySpeciesCreate(O, len);
         for (var j = 0; j < itemsLen; j++)
             _DefineDataProperty(A, j, items[j]);
    
    From d132fe4728e5ca909fabeb969bc8233a5a2e66f4 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 8 May 2026 15:01:44 -0400
    Subject: [PATCH 31/72] Add stream constructor polyfills
    
    ---
     js/src/builtin/Stream.cpp  | 1515 +++++++++++++++++++++++++++++++++++-
     js/src/builtin/Stream.h    |    2 +
     js/src/vm/GlobalObject.cpp |    4 +
     3 files changed, 1508 insertions(+), 13 deletions(-)
    
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index 26457709d8..2593d1315a 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -5,6 +5,7 @@
     
     #include "builtin/Stream.h"
     
    +#include "js/CompilationAndEvaluation.h"
     #include "js/Stream.h"
     
     #include "jscntxt.h"
    @@ -16,6 +17,10 @@
     
     #include "vm/NativeObject-inl.h"
     
    +#include "zlib.h"
    +
    +#include 
    +
     using namespace js;
     
     enum StreamSlots {
    @@ -915,30 +920,72 @@ ReadableStream_getReader(JSContext* cx, unsigned argc, Value* vp)
         return CallNonGenericMethod, ReadableStream_getReader_impl>(cx, args);
     }
     
    +[[nodiscard]] static bool
    +CallStreamExtra(JSContext* cx, const char* name, HandleValue streamVal,
    +                HandleValue arg0, HandleValue arg1, MutableHandleValue rval)
    +{
    +    RootedObject global(cx, JS::CurrentGlobalOrNull(cx));
    +    if (!global)
    +        return false;
    +
    +    RootedValue fun(cx);
    +    if (!JS_GetProperty(cx, global, name, &fun))
    +        return false;
    +
    +    if (!fun.isObject() || !IsCallable(fun)) {
    +        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
    +                                  JSMSG_READABLESTREAM_METHOD_NOT_IMPLEMENTED, name);
    +        return false;
    +    }
    +
    +    FixedInvokeArgs<3> invokeArgs(cx);
    +    invokeArgs[0].set(streamVal);
    +    invokeArgs[1].set(arg0);
    +    invokeArgs[2].set(arg1);
    +    return Call(cx, fun, UndefinedHandleValue, invokeArgs, rval);
    +}
    +
     // Streams spec, 3.2.4.4. pipeThrough({ writable, readable }, options)
    -static MOZ_MUST_USE bool
    +[[nodiscard]] static bool
     ReadableStream_pipeThrough(JSContext* cx, unsigned argc, Value* vp)
     {
    -    JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
    -                              JSMSG_READABLESTREAM_METHOD_NOT_IMPLEMENTED, "pipeThrough");
    -    return false;
    -    // // Step 1: Perform ? Invoke(this, "pipeTo", « writable, options »).
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    if (!Is(args.thisv())) {
    +        ReportValueError3(cx, JSMSG_INCOMPATIBLE_PROTO, JSDVG_SEARCH_STACK, args.thisv(),
    +                          nullptr, "pipeThrough", "");
    +        return false;
    +    }
     
    -    // // Step 2: Return readable.
    -    // return readable;
    +    RootedValue rval(cx);
    +    if (!CallStreamExtra(cx, "__uxpStreamsPipeThrough", args.thisv(),
    +                         args.get(0), args.get(1), &rval))
    +        return false;
    +
    +    args.rval().set(rval);
    +    return true;
     }
     
     // Streams spec, 3.2.4.5. pipeTo(dest, { preventClose, preventAbort, preventCancel } = {})
    -// TODO: Unimplemented since spec is not complete yet.
    -static MOZ_MUST_USE bool
    +[[nodiscard]] static bool
     ReadableStream_pipeTo(JSContext* cx, unsigned argc, Value* vp)
     {
    -    JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
    -                              JSMSG_READABLESTREAM_METHOD_NOT_IMPLEMENTED, "pipeTo");
    -    return false;
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    if (!Is(args.thisv())) {
    +        ReportValueError3(cx, JSMSG_INCOMPATIBLE_PROTO, JSDVG_SEARCH_STACK, args.thisv(),
    +                          nullptr, "pipeTo", "");
    +        return false;
    +    }
    +
    +    RootedValue rval(cx);
    +    if (!CallStreamExtra(cx, "__uxpStreamsPipeTo", args.thisv(),
    +                         args.get(0), args.get(1), &rval))
    +        return false;
    +
    +    args.rval().set(rval);
    +    return true;
     }
     
    -static MOZ_MUST_USE bool
    +[[nodiscard]] static bool
     ReadableStreamTee(JSContext* cx, Handle stream, bool cloneForBranch2,
                       MutableHandle branch1, MutableHandle branch2);
     
    @@ -5486,3 +5533,1445 @@ js::UnwrapReadableStream(JSObject* obj)
             return unwrapped->is() ? unwrapped : nullptr;
         return nullptr;
     }
    +
    +namespace {
    +
    +enum class StreamCompressionFormat {
    +    Deflate,
    +    DeflateRaw,
    +    Gzip
    +};
    +
    +struct StreamCompressionContext
    +{
    +    z_stream mStream;
    +    StreamCompressionFormat mFormat;
    +    bool mCompress;
    +    bool mFinished;
    +    bool mInitialized;
    +
    +    StreamCompressionContext(StreamCompressionFormat format, bool compress)
    +      : mFormat(format),
    +        mCompress(compress),
    +        mFinished(false),
    +        mInitialized(false)
    +    {
    +        memset(&mStream, 0, sizeof(mStream));
    +    }
    +
    +    ~StreamCompressionContext()
    +    {
    +        if (!mInitialized)
    +            return;
    +        if (mCompress)
    +            deflateEnd(&mStream);
    +        else
    +            inflateEnd(&mStream);
    +    }
    +};
    +
    +static int
    +WindowBitsForFormat(StreamCompressionFormat format)
    +{
    +    switch (format) {
    +      case StreamCompressionFormat::Deflate:
    +        return MAX_WBITS;
    +      case StreamCompressionFormat::DeflateRaw:
    +        return -MAX_WBITS;
    +      case StreamCompressionFormat::Gzip:
    +        return MAX_WBITS + 16;
    +    }
    +    MOZ_CRASH("Unknown compression stream format");
    +}
    +
    +static bool
    +ParseCompressionFormat(JSContext* cx, HandleValue value,
    +                       StreamCompressionFormat* format)
    +{
    +    RootedString str(cx, ToString(cx, value));
    +    if (!str)
    +        return false;
    +
    +    bool match = false;
    +    if (!JS_StringEqualsAscii(cx, str, "deflate", &match))
    +        return false;
    +    if (match) {
    +        *format = StreamCompressionFormat::Deflate;
    +        return true;
    +    }
    +
    +    if (!JS_StringEqualsAscii(cx, str, "deflate-raw", &match))
    +        return false;
    +    if (match) {
    +        *format = StreamCompressionFormat::DeflateRaw;
    +        return true;
    +    }
    +
    +    if (!JS_StringEqualsAscii(cx, str, "gzip", &match))
    +        return false;
    +    if (match) {
    +        *format = StreamCompressionFormat::Gzip;
    +        return true;
    +    }
    +
    +    if (!JS_StringEqualsAscii(cx, str, "brotli", &match))
    +        return false;
    +
    +    JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
    +                              JSMSG_NOT_EXPECTED_TYPE,
    +                              "CompressionStream", "supported format",
    +                              match ? "unsupported brotli format" : "unknown format");
    +    return false;
    +}
    +
    +static void
    +StreamCompressionContextFinalize(FreeOp* fop, JSObject* obj)
    +{
    +    auto* context = static_cast(JS_GetPrivate(obj));
    +    if (context)
    +        js_delete(context);
    +}
    +
    +static const ClassOps StreamCompressionContextClassOps = {
    +    nullptr, /* addProperty */
    +    nullptr, /* delProperty */
    +    nullptr, /* getProperty */
    +    nullptr, /* setProperty */
    +    nullptr, /* enumerate */
    +    nullptr, /* resolve */
    +    nullptr, /* mayResolve */
    +    StreamCompressionContextFinalize,
    +    nullptr, /* call */
    +    nullptr, /* hasInstance */
    +    nullptr, /* construct */
    +    nullptr  /* trace */
    +};
    +
    +static const Class StreamCompressionContextClass = {
    +    "StreamCompressionContext",
    +    JSCLASS_HAS_PRIVATE,
    +    &StreamCompressionContextClassOps
    +};
    +
    +static bool
    +CreateStreamCompressionContext(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +
    +    if (args.length() < 2) {
    +        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
    +                                  JSMSG_MORE_ARGS_NEEDED,
    +                                  "__uxpCreateCompressionContext", "1", "s");
    +        return false;
    +    }
    +
    +    StreamCompressionFormat format;
    +    if (!ParseCompressionFormat(cx, args.get(0), &format))
    +        return false;
    +
    +    bool compress = ToBoolean(args.get(1));
    +    auto* context = js_new(format, compress);
    +    if (!context) {
    +        ReportOutOfMemory(cx);
    +        return false;
    +    }
    +
    +    int windowBits = WindowBitsForFormat(format);
    +    int zerr = compress
    +               ? deflateInit2(&context->mStream, Z_DEFAULT_COMPRESSION, Z_DEFLATED,
    +                              windowBits, 8, Z_DEFAULT_STRATEGY)
    +               : inflateInit2(&context->mStream, windowBits);
    +    if (zerr != Z_OK) {
    +        js_delete(context);
    +        JS_ReportErrorASCII(cx, "Failed to initialize compression stream");
    +        return false;
    +    }
    +    context->mInitialized = true;
    +
    +    RootedObject obj(cx, NewObjectWithGivenProto(cx, &StreamCompressionContextClass, nullptr));
    +    if (!obj) {
    +        js_delete(context);
    +        return false;
    +    }
    +
    +    JS_SetPrivate(obj, context);
    +    args.rval().setObject(*obj);
    +    return true;
    +}
    +
    +static bool
    +GetBufferSourceBytes(JSContext* cx, HandleValue value, Vector* bytes)
    +{
    +    if (!value.isObject()) {
    +        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
    +                                  JSMSG_NOT_EXPECTED_TYPE,
    +                                  "CompressionStream", "BufferSource",
    +                                  InformalValueTypeName(value));
    +        return false;
    +    }
    +
    +    RootedObject obj(cx, &value.toObject());
    +    if (JS_IsArrayBufferViewObject(obj)) {
    +        uint32_t length = JS_GetArrayBufferViewByteLength(obj);
    +        if (length == 0)
    +            return true;
    +
    +        JS::AutoCheckCannotGC nogc(cx);
    +        bool isShared;
    +        uint8_t* data = static_cast(JS_GetArrayBufferViewData(obj, &isShared, nogc));
    +        return bytes->append(data, length);
    +    }
    +
    +    if (JS_IsArrayBufferObject(obj)) {
    +        uint32_t length = JS_GetArrayBufferByteLength(obj);
    +        if (length == 0)
    +            return true;
    +
    +        JS::AutoCheckCannotGC nogc(cx);
    +        bool isShared;
    +        uint8_t* data = JS_GetArrayBufferData(obj, &isShared, nogc);
    +        return bytes->append(data, length);
    +    }
    +
    +    JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
    +                              JSMSG_NOT_EXPECTED_TYPE,
    +                              "CompressionStream", "BufferSource",
    +                              obj->getClass()->name);
    +    return false;
    +}
    +
    +static bool
    +AppendUint8Array(JSContext* cx, HandleObject array, uint32_t* index,
    +                 const uint8_t* data, size_t length)
    +{
    +    if (length == 0)
    +        return true;
    +
    +    if (length > UINT32_MAX) {
    +        ReportAllocationOverflow(cx);
    +        return false;
    +    }
    +
    +    RootedObject view(cx, JS_NewUint8Array(cx, length));
    +    if (!view)
    +        return false;
    +
    +    {
    +        JS::AutoCheckCannotGC nogc(cx);
    +        bool isShared;
    +        uint8_t* viewData = static_cast(JS_GetArrayBufferViewData(view, &isShared, nogc));
    +        memcpy(viewData, data, length);
    +    }
    +
    +    RootedValue viewVal(cx, ObjectValue(*view));
    +    return JS_SetElement(cx, array, (*index)++, viewVal);
    +}
    +
    +static bool
    +StreamCompressionProcess(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +
    +    if (args.length() < 3 || !args[0].isObject() ||
    +        !args[0].toObject().hasClass(&StreamCompressionContextClass)) {
    +        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
    +                                  JSMSG_NOT_EXPECTED_TYPE,
    +                                  "__uxpCompressionProcess",
    +                                  "StreamCompressionContext", "other");
    +        return false;
    +    }
    +
    +    auto* context =
    +        static_cast(JS_GetPrivate(&args[0].toObject()));
    +    if (!context) {
    +        JS_ReportErrorASCII(cx, "Compression stream is already finished");
    +        return false;
    +    }
    +
    +    bool finish = ToBoolean(args.get(2));
    +
    +    if (context->mFinished) {
    +        if (finish && args.get(1).isUndefined()) {
    +            RootedObject emptyChunks(cx, JS_NewArrayObject(cx, 0));
    +            if (!emptyChunks)
    +                return false;
    +            args.rval().setObject(*emptyChunks);
    +            return true;
    +        }
    +        JS_ReportErrorASCII(cx, "Compression stream is already finished");
    +        return false;
    +    }
    +
    +    Vector input(cx);
    +    if (!args.get(1).isUndefined() && !GetBufferSourceBytes(cx, args.get(1), &input))
    +        return false;
    +
    +    RootedObject chunks(cx, JS_NewArrayObject(cx, 0));
    +    if (!chunks)
    +        return false;
    +
    +    z_stream& stream = context->mStream;
    +    stream.next_in = input.empty() ? nullptr : input.begin();
    +    stream.avail_in = input.length();
    +
    +    uint32_t chunkIndex = 0;
    +    const int flush = finish ? Z_FINISH : Z_NO_FLUSH;
    +    bool madeProgress;
    +
    +    do {
    +        uint8_t output[16384];
    +        stream.next_out = output;
    +        stream.avail_out = sizeof(output);
    +
    +        uint32_t beforeIn = stream.avail_in;
    +        uint32_t beforeOut = stream.avail_out;
    +        int zerr = context->mCompress ? deflate(&stream, flush) : inflate(&stream, flush);
    +
    +        size_t produced = sizeof(output) - stream.avail_out;
    +        if (!AppendUint8Array(cx, chunks, &chunkIndex, output, produced))
    +            return false;
    +
    +        madeProgress = produced > 0 || stream.avail_in != beforeIn ||
    +                       stream.avail_out != beforeOut;
    +
    +        if (zerr == Z_STREAM_END) {
    +            context->mFinished = true;
    +            if (!context->mCompress && stream.avail_in != 0) {
    +                JS_ReportErrorASCII(cx, "Compressed input has trailing data");
    +                return false;
    +            }
    +            break;
    +        }
    +
    +        if (zerr == Z_BUF_ERROR && !madeProgress)
    +            break;
    +
    +        if (zerr != Z_OK && zerr != Z_BUF_ERROR) {
    +            JS_ReportErrorASCII(cx, stream.msg ? stream.msg : "Compression stream error");
    +            return false;
    +        }
    +    } while (stream.avail_out == 0 || stream.avail_in != 0 ||
    +             (finish && !context->mFinished && madeProgress));
    +
    +    if (finish && !context->mFinished) {
    +        JS_ReportErrorASCII(cx, "Compressed input ended before the end of stream");
    +        return false;
    +    }
    +
    +    args.rval().setObject(*chunks);
    +    return true;
    +}
    +
    +} // anonymous namespace
    +
    +bool
    +js::InitStreamExtras(JSContext* cx, HandleObject global)
    +{
    +    if (!JS_DefineFunction(cx, global, "__uxpCreateCompressionContext",
    +                           CreateStreamCompressionContext, 2, 0))
    +        return false;
    +
    +    if (!JS_DefineFunction(cx, global, "__uxpCompressionProcess",
    +                           StreamCompressionProcess, 3, 0))
    +        return false;
    +
    +    static const char source[] = R"JS(
    +(function(global) {
    +  "use strict";
    +
    +  if (global.__uxpStreamsInitialized)
    +    return;
    +  Object.defineProperty(global, "__uxpStreamsInitialized",
    +                        { value: true, configurable: true });
    +
    +  var objectToString = Object.prototype.toString;
    +  var hasOwn = Object.prototype.hasOwnProperty;
    +
    +  function isObject(value) {
    +    return (typeof value === "object" && value !== null) ||
    +           typeof value === "function";
    +  }
    +
    +  function requiredObject(value, name) {
    +    if (!isObject(value))
    +      throw new TypeError(name + " is not an object");
    +    return value;
    +  }
    +
    +  function newPromiseCapability() {
    +    var resolve, reject;
    +    var promise = new Promise(function(res, rej) {
    +      resolve = res;
    +      reject = rej;
    +    });
    +    return { promise: promise, resolve: resolve, reject: reject };
    +  }
    +
    +  function promiseCall(fn, receiver, args) {
    +    try {
    +      return Promise.resolve(fn.apply(receiver, args || []));
    +    } catch (e) {
    +      return Promise.reject(e);
    +    }
    +  }
    +
    +  function getMethod(value, name) {
    +    var method = value[name];
    +    if (method === undefined || method === null)
    +      return undefined;
    +    if (typeof method !== "function")
    +      throw new TypeError(name + " is not callable");
    +    return method;
    +  }
    +
    +  function makeDOMException(message, name) {
    +    if (typeof global.DOMException === "function")
    +      return new global.DOMException(message, name);
    +    var error = new Error(message);
    +    error.name = name;
    +    return error;
    +  }
    +
    +  function define(name, value) {
    +    if (hasOwn.call(global, name) && global[name] !== undefined)
    +      return;
    +    Object.defineProperty(global, name, {
    +      value: value,
    +      writable: true,
    +      configurable: true
    +    });
    +  }
    +
    +  var writableState = new WeakMap();
    +  var writerState = new WeakMap();
    +  var writableControllerState = new WeakMap();
    +
    +  function isWritableStream(stream) {
    +    return writableState.has(stream);
    +  }
    +
    +  function isWritableStreamDefaultWriter(writer) {
    +    return writerState.has(writer);
    +  }
    +
    +  function rejectPromise(error) {
    +    return Promise.reject(error);
    +  }
    +
    +  function syncWritableWriterWithStream(writer, state) {
    +    var ws = writerState.get(writer);
    +    if (!ws || ws.stream === undefined)
    +      return;
    +
    +    ws.readyPromise = state.readyPromise;
    +    if (state.state === "closed") {
    +      ws.closedPromise = Promise.resolve(undefined);
    +    } else if (state.state === "errored") {
    +      ws.closedPromise = Promise.reject(state.storedError);
    +      ws.closedPromise.catch(function() {});
    +    } else {
    +      ws.closedPromise = state.closedPromise;
    +    }
    +  }
    +
    +  function writableError(stream, error) {
    +    var state = writableState.get(stream);
    +    if (!state || state.state === "closed" || state.state === "errored")
    +      return;
    +    state.state = "errored";
    +    state.storedError = error;
    +    state.ready.reject(error);
    +    state.closed.reject(error);
    +    state.readyPromise.catch(function() {});
    +    state.closedPromise.catch(function() {});
    +    if (state.writer)
    +      syncWritableWriterWithStream(state.writer, state);
    +  }
    +
    +  function writableClose(stream) {
    +    var state = writableState.get(stream);
    +    if (!state || state.state === "closed")
    +      return;
    +    state.state = "closed";
    +    state.ready.resolve(undefined);
    +    state.closed.resolve(undefined);
    +    if (state.writer)
    +      syncWritableWriterWithStream(state.writer, state);
    +  }
    +
    +  function writableStreamWrite(stream, chunk) {
    +    var state = writableState.get(stream);
    +    if (!state)
    +      return rejectPromise(new TypeError("WritableStream expected"));
    +    if (state.state === "closed")
    +      return rejectPromise(new TypeError("WritableStream is closed"));
    +    if (state.state === "errored")
    +      return rejectPromise(state.storedError);
    +    if (state.state === "closing")
    +      return rejectPromise(new TypeError("WritableStream is closing"));
    +
    +    var size = 1;
    +    try {
    +      size = state.sizeAlgorithm(chunk);
    +      if (!Number.isFinite(size) || size < 0)
    +        throw new RangeError("Invalid chunk size");
    +    } catch (e) {
    +      writableError(stream, e);
    +      return rejectPromise(e);
    +    }
    +
    +    state.queueTotalSize += size;
    +    if (state.queueTotalSize > state.highWaterMark && state.backpressure === false) {
    +      state.backpressure = true;
    +      state.ready = newPromiseCapability();
    +      state.readyPromise = state.ready.promise;
    +      if (state.writer)
    +        syncWritableWriterWithStream(state.writer, state);
    +    }
    +
    +    var write = state.sink.write;
    +    var controller = state.controller;
    +    var writePromise = state.writeChain.then(function() {
    +      if (write)
    +        return write.call(state.sink, chunk, controller);
    +      return undefined;
    +    });
    +    state.writeChain = writePromise.then(function(value) {
    +      state.queueTotalSize -= size;
    +      if (state.queueTotalSize <= state.highWaterMark && state.backpressure) {
    +        state.backpressure = false;
    +        state.ready.resolve(undefined);
    +        state.ready = newPromiseCapability();
    +        state.ready.resolve(undefined);
    +        state.readyPromise = state.ready.promise;
    +        if (state.writer)
    +          syncWritableWriterWithStream(state.writer, state);
    +      }
    +      return value;
    +    }, function(error) {
    +      writableError(stream, error);
    +      throw error;
    +    });
    +    state.writeChain.catch(function() {});
    +    return writePromise;
    +  }
    +
    +  function writableStreamClose(stream) {
    +    var state = writableState.get(stream);
    +    if (!state)
    +      return rejectPromise(new TypeError("WritableStream expected"));
    +    if (state.state === "closed")
    +      return rejectPromise(new TypeError("WritableStream is already closed"));
    +    if (state.state === "errored")
    +      return rejectPromise(state.storedError);
    +    if (state.state === "closing")
    +      return rejectPromise(new TypeError("WritableStream is already closing"));
    +
    +    state.state = "closing";
    +    var close = state.sink.close;
    +    var closePromise = state.writeChain.then(function() {
    +      if (close)
    +        return close.call(state.sink);
    +      return undefined;
    +    }).then(function(value) {
    +      writableClose(stream);
    +      return value;
    +    }, function(error) {
    +      writableError(stream, error);
    +      throw error;
    +    });
    +    state.writeChain = closePromise.catch(function() {});
    +    return closePromise;
    +  }
    +
    +  function writableStreamAbort(stream, reason) {
    +    var state = writableState.get(stream);
    +    if (!state)
    +      return rejectPromise(new TypeError("WritableStream expected"));
    +    if (state.state === "closed")
    +      return Promise.resolve(undefined);
    +    if (state.state === "errored")
    +      return rejectPromise(state.storedError);
    +
    +    var abort = state.sink.abort;
    +    state.state = "errored";
    +    state.storedError = reason;
    +    state.ready.reject(reason);
    +    state.closed.reject(reason);
    +    state.readyPromise.catch(function() {});
    +    state.closedPromise.catch(function() {});
    +
    +    var abortPromise = abort ? promiseCall(abort, state.sink, [reason])
    +                             : Promise.resolve(undefined);
    +    return abortPromise;
    +  }
    +
    +  function WritableStreamDefaultController() {
    +    throw new TypeError("Illegal constructor");
    +  }
    +
    +  WritableStreamDefaultController.prototype.error = function(error) {
    +    var state = writableControllerState.get(this);
    +    if (!state)
    +      throw new TypeError("WritableStreamDefaultController expected");
    +    writableError(state.stream, error);
    +  };
    +
    +  try {
    +    Object.defineProperty(WritableStreamDefaultController.prototype, "signal", {
    +      configurable: true,
    +      get: function() {
    +        var state = writableControllerState.get(this);
    +        if (!state)
    +          throw new TypeError("WritableStreamDefaultController expected");
    +        return state.signal;
    +      }
    +    });
    +  } catch (e) {}
    +
    +  Object.defineProperty(WritableStreamDefaultController.prototype,
    +                        Symbol.toStringTag,
    +                        { value: "WritableStreamDefaultController",
    +                          configurable: true });
    +
    +  function WritableStream(underlyingSink, strategy) {
    +    if (!(this instanceof WritableStream))
    +      throw new TypeError("WritableStream must be constructed with new");
    +
    +    underlyingSink = underlyingSink === undefined ? {} : requiredObject(underlyingSink, "underlyingSink");
    +    strategy = strategy === undefined ? {} : requiredObject(strategy, "strategy");
    +
    +    if (underlyingSink.type !== undefined)
    +      throw new RangeError("Invalid writable stream type");
    +
    +    var highWaterMark = strategy.highWaterMark === undefined ? 1 : Number(strategy.highWaterMark);
    +    if (Number.isNaN(highWaterMark) || highWaterMark < 0)
    +      throw new RangeError("Invalid highWaterMark");
    +
    +    var sizeAlgorithm = strategy.size;
    +    if (sizeAlgorithm === undefined)
    +      sizeAlgorithm = function() { return 1; };
    +    if (typeof sizeAlgorithm !== "function")
    +      throw new TypeError("strategy.size is not callable");
    +
    +    var controller = Object.create(WritableStreamDefaultController.prototype);
    +    var ready = newPromiseCapability();
    +    ready.resolve(undefined);
    +    var closed = newPromiseCapability();
    +    var state = {
    +      sink: underlyingSink,
    +      controller: controller,
    +      signal: undefined,
    +      state: "writable",
    +      storedError: undefined,
    +      writer: undefined,
    +      writeChain: Promise.resolve(undefined),
    +      ready: ready,
    +      readyPromise: ready.promise,
    +      closed: closed,
    +      closedPromise: closed.promise,
    +      highWaterMark: highWaterMark,
    +      sizeAlgorithm: sizeAlgorithm,
    +      queueTotalSize: 0,
    +      backpressure: false
    +    };
    +    writableState.set(this, state);
    +    writableControllerState.set(controller, { stream: this, signal: undefined });
    +
    +    var start = underlyingSink.start;
    +    if (start !== undefined) {
    +      if (typeof start !== "function")
    +        throw new TypeError("underlyingSink.start is not callable");
    +      state.writeChain = promiseCall(start, underlyingSink, [controller]).catch(function(error) {
    +        writableError(this, error);
    +        throw error;
    +      }.bind(this));
    +      state.writeChain.catch(function() {});
    +    }
    +  }
    +
    +  Object.defineProperty(WritableStream.prototype, "locked", {
    +    configurable: true,
    +    get: function() {
    +      var state = writableState.get(this);
    +      if (!state)
    +        throw new TypeError("WritableStream expected");
    +      return state.writer !== undefined;
    +    }
    +  });
    +
    +  WritableStream.prototype.abort = function(reason) {
    +    if (!isWritableStream(this))
    +      return rejectPromise(new TypeError("WritableStream expected"));
    +    if (writableState.get(this).writer !== undefined)
    +      return rejectPromise(new TypeError("WritableStream is locked"));
    +    return writableStreamAbort(this, reason);
    +  };
    +
    +  WritableStream.prototype.close = function() {
    +    if (!isWritableStream(this))
    +      return rejectPromise(new TypeError("WritableStream expected"));
    +    if (writableState.get(this).writer !== undefined)
    +      return rejectPromise(new TypeError("WritableStream is locked"));
    +    return writableStreamClose(this);
    +  };
    +
    +  WritableStream.prototype.getWriter = function() {
    +    if (!isWritableStream(this))
    +      throw new TypeError("WritableStream expected");
    +    return new WritableStreamDefaultWriter(this);
    +  };
    +
    +  Object.defineProperty(WritableStream.prototype, Symbol.toStringTag,
    +                        { value: "WritableStream", configurable: true });
    +
    +  function WritableStreamDefaultWriter(stream) {
    +    if (!(this instanceof WritableStreamDefaultWriter))
    +      throw new TypeError("WritableStreamDefaultWriter must be constructed with new");
    +    if (!isWritableStream(stream))
    +      throw new TypeError("WritableStream expected");
    +
    +    var state = writableState.get(stream);
    +    if (state.writer !== undefined)
    +      throw new TypeError("WritableStream is locked");
    +
    +    state.writer = this;
    +    writerState.set(this, {
    +      stream: stream,
    +      readyPromise: state.readyPromise,
    +      closedPromise: state.closedPromise
    +    });
    +  }
    +
    +  Object.defineProperty(WritableStreamDefaultWriter.prototype, "closed", {
    +    configurable: true,
    +    get: function() {
    +      var state = writerState.get(this);
    +      if (!state)
    +        return rejectPromise(new TypeError("WritableStreamDefaultWriter expected"));
    +      return state.closedPromise;
    +    }
    +  });
    +
    +  Object.defineProperty(WritableStreamDefaultWriter.prototype, "desiredSize", {
    +    configurable: true,
    +    get: function() {
    +      var state = writerState.get(this);
    +      if (!state)
    +        throw new TypeError("WritableStreamDefaultWriter expected");
    +      if (state.stream === undefined)
    +        throw new TypeError("Writer lock is released");
    +      var streamState = writableState.get(state.stream);
    +      if (streamState.state === "errored")
    +        throw streamState.storedError;
    +      if (streamState.state === "closed")
    +        return null;
    +      return streamState.highWaterMark - streamState.queueTotalSize;
    +    }
    +  });
    +
    +  Object.defineProperty(WritableStreamDefaultWriter.prototype, "ready", {
    +    configurable: true,
    +    get: function() {
    +      var state = writerState.get(this);
    +      if (!state)
    +        return rejectPromise(new TypeError("WritableStreamDefaultWriter expected"));
    +      return state.readyPromise;
    +    }
    +  });
    +
    +  WritableStreamDefaultWriter.prototype.abort = function(reason) {
    +    var state = writerState.get(this);
    +    if (!state || state.stream === undefined)
    +      return rejectPromise(new TypeError("Writer lock is released"));
    +    return writableStreamAbort(state.stream, reason);
    +  };
    +
    +  WritableStreamDefaultWriter.prototype.close = function() {
    +    var state = writerState.get(this);
    +    if (!state || state.stream === undefined)
    +      return rejectPromise(new TypeError("Writer lock is released"));
    +    return writableStreamClose(state.stream);
    +  };
    +
    +  WritableStreamDefaultWriter.prototype.releaseLock = function() {
    +    var state = writerState.get(this);
    +    if (!state)
    +      throw new TypeError("WritableStreamDefaultWriter expected");
    +    if (state.stream === undefined)
    +      return;
    +    var streamState = writableState.get(state.stream);
    +    if (streamState.writer === this)
    +      streamState.writer = undefined;
    +    state.stream = undefined;
    +    state.readyPromise = rejectPromise(new TypeError("Writer lock is released"));
    +    state.closedPromise = rejectPromise(new TypeError("Writer lock is released"));
    +    state.readyPromise.catch(function() {});
    +    state.closedPromise.catch(function() {});
    +  };
    +
    +  WritableStreamDefaultWriter.prototype.write = function(chunk) {
    +    var state = writerState.get(this);
    +    if (!state || state.stream === undefined)
    +      return rejectPromise(new TypeError("Writer lock is released"));
    +    return writableStreamWrite(state.stream, chunk);
    +  };
    +
    +  Object.defineProperty(WritableStreamDefaultWriter.prototype, Symbol.toStringTag,
    +                        { value: "WritableStreamDefaultWriter",
    +                          configurable: true });
    +
    +  var transformState = new WeakMap();
    +  var transformControllerState = new WeakMap();
    +
    +  function TransformStreamDefaultController() {
    +    throw new TypeError("Illegal constructor");
    +  }
    +
    +  Object.defineProperty(TransformStreamDefaultController.prototype, "desiredSize", {
    +    configurable: true,
    +    get: function() {
    +      var state = transformControllerState.get(this);
    +      if (!state)
    +        throw new TypeError("TransformStreamDefaultController expected");
    +      return state.readableController.desiredSize;
    +    }
    +  });
    +
    +  TransformStreamDefaultController.prototype.enqueue = function(chunk) {
    +    var state = transformControllerState.get(this);
    +    if (!state)
    +      throw new TypeError("TransformStreamDefaultController expected");
    +    state.readableController.enqueue(chunk);
    +  };
    +
    +  TransformStreamDefaultController.prototype.error = function(reason) {
    +    var state = transformControllerState.get(this);
    +    if (!state)
    +      throw new TypeError("TransformStreamDefaultController expected");
    +    state.readableController.error(reason);
    +    writableError(state.stream.writable, reason);
    +  };
    +
    +  TransformStreamDefaultController.prototype.terminate = function() {
    +    var state = transformControllerState.get(this);
    +    if (!state)
    +      throw new TypeError("TransformStreamDefaultController expected");
    +    try {
    +      state.readableController.close();
    +    } catch (e) {}
    +    writableError(state.stream.writable, new TypeError("TransformStream terminated"));
    +  };
    +
    +  Object.defineProperty(TransformStreamDefaultController.prototype,
    +                        Symbol.toStringTag,
    +                        { value: "TransformStreamDefaultController",
    +                          configurable: true });
    +
    +  function TransformStream(transformer, writableStrategy, readableStrategy) {
    +    if (!(this instanceof TransformStream))
    +      throw new TypeError("TransformStream must be constructed with new");
    +
    +    transformer = transformer === undefined ? {} : requiredObject(transformer, "transformer");
    +    writableStrategy = writableStrategy === undefined ? {} : requiredObject(writableStrategy, "writableStrategy");
    +    readableStrategy = readableStrategy === undefined ? {} : requiredObject(readableStrategy, "readableStrategy");
    +
    +    if (transformer.readableType !== undefined)
    +      throw new RangeError("Invalid readableType");
    +    if (transformer.writableType !== undefined)
    +      throw new RangeError("Invalid writableType");
    +
    +    var controller = Object.create(TransformStreamDefaultController.prototype);
    +    var readableController;
    +    var stream = this;
    +    var startAlgorithm = getMethod(transformer, "start");
    +    var transformAlgorithm = getMethod(transformer, "transform");
    +    var flushAlgorithm = getMethod(transformer, "flush");
    +    var cancelAlgorithm = getMethod(transformer, "cancel");
    +
    +    var readable = new ReadableStream({
    +      start: function(c) {
    +        readableController = c;
    +        transformControllerState.set(controller, {
    +          stream: stream,
    +          readableController: c
    +        });
    +      },
    +      cancel: function(reason) {
    +        if (cancelAlgorithm)
    +          return cancelAlgorithm.call(transformer, reason);
    +        return undefined;
    +      }
    +    }, readableStrategy);
    +
    +    var startPromise = startAlgorithm
    +      ? promiseCall(startAlgorithm, transformer, [controller])
    +      : Promise.resolve(undefined);
    +
    +    var writable = new WritableStream({
    +      start: function() {
    +        return startPromise;
    +      },
    +      write: function(chunk) {
    +        if (transformAlgorithm)
    +          return transformAlgorithm.call(transformer, chunk, controller);
    +        controller.enqueue(chunk);
    +        return undefined;
    +      },
    +      close: function() {
    +        var result = flushAlgorithm
    +          ? promiseCall(flushAlgorithm, transformer, [controller])
    +          : Promise.resolve(undefined);
    +        return result.then(function() {
    +          readableController.close();
    +        });
    +      },
    +      abort: function(reason) {
    +        readableController.error(reason);
    +      }
    +    }, writableStrategy);
    +
    +    transformState.set(this, {
    +      readable: readable,
    +      writable: writable,
    +      controller: controller
    +    });
    +  }
    +
    +  Object.defineProperty(TransformStream.prototype, "readable", {
    +    configurable: true,
    +    get: function() {
    +      var state = transformState.get(this);
    +      if (!state)
    +        throw new TypeError("TransformStream expected");
    +      return state.readable;
    +    }
    +  });
    +
    +  Object.defineProperty(TransformStream.prototype, "writable", {
    +    configurable: true,
    +    get: function() {
    +      var state = transformState.get(this);
    +      if (!state)
    +        throw new TypeError("TransformStream expected");
    +      return state.writable;
    +    }
    +  });
    +
    +  Object.defineProperty(TransformStream.prototype, Symbol.toStringTag,
    +                        { value: "TransformStream", configurable: true });
    +
    +  function pipeTo(readable, destination, options) {
    +    options = options === undefined ? {} : requiredObject(options, "options");
    +    var signal = options.signal;
    +    var preventClose = Boolean(options.preventClose);
    +    var preventAbort = Boolean(options.preventAbort);
    +    var preventCancel = Boolean(options.preventCancel);
    +    var reader;
    +    var writer;
    +
    +    try {
    +      destination = requiredObject(destination, "destination");
    +      reader = readable.getReader();
    +      writer = destination.getWriter();
    +    } catch (e) {
    +      return rejectPromise(e);
    +    }
    +
    +    var closed = false;
    +    function cleanup() {
    +      if (closed)
    +        return;
    +      closed = true;
    +      try { reader.releaseLock(); } catch (e) {}
    +      try { writer.releaseLock(); } catch (e) {}
    +      if (signal && signal.removeEventListener)
    +        signal.removeEventListener("abort", onAbort);
    +    }
    +
    +    function abortReason() {
    +      return signal && "reason" in signal
    +             ? signal.reason
    +             : makeDOMException("The operation was aborted.", "AbortError");
    +    }
    +
    +    function shutdownWithAction(action, originalError) {
    +      return action().then(function() {
    +        cleanup();
    +        throw originalError;
    +      }, function(actionError) {
    +        cleanup();
    +        throw actionError;
    +      });
    +    }
    +
    +    function onAbort() {}
    +
    +    var pipePromise = new Promise(function(resolve, reject) {
    +      onAbort = function() {
    +        var reason = abortReason();
    +        var actions = [];
    +        if (!preventAbort)
    +          actions.push(writer.abort(reason));
    +        if (!preventCancel)
    +          actions.push(reader.cancel(reason));
    +        Promise.all(actions).then(function() {
    +          cleanup();
    +          reject(reason);
    +        }, function(error) {
    +          cleanup();
    +          reject(error);
    +        });
    +      };
    +
    +      if (signal && signal.aborted) {
    +        onAbort();
    +        return;
    +      }
    +      if (signal && signal.addEventListener)
    +        signal.addEventListener("abort", onAbort);
    +
    +      function pump() {
    +        reader.read().then(function(result) {
    +          if (result.done) {
    +            var closePromise = preventClose ? Promise.resolve(undefined)
    +                                           : writer.close();
    +            closePromise.then(function() {
    +              cleanup();
    +              resolve(undefined);
    +            }, function(error) {
    +              cleanup();
    +              reject(error);
    +            });
    +            return;
    +          }
    +
    +          writer.write(result.value).then(pump, function(error) {
    +            var cancel = preventCancel
    +              ? Promise.resolve(undefined)
    +              : reader.cancel(error);
    +            cancel.then(function() {
    +              cleanup();
    +              reject(error);
    +            }, function(cancelError) {
    +              cleanup();
    +              reject(cancelError);
    +            });
    +          });
    +        }, function(error) {
    +          var abort = preventAbort
    +            ? Promise.resolve(undefined)
    +            : writer.abort(error);
    +          abort.then(function() {
    +            cleanup();
    +            reject(error);
    +          }, function(abortError) {
    +            cleanup();
    +            reject(abortError);
    +          });
    +        });
    +      }
    +
    +      pump();
    +    });
    +
    +    return pipePromise;
    +  }
    +
    +  function pipeThrough(readable, pair, options) {
    +    pair = requiredObject(pair, "transform");
    +    var writable = pair.writable;
    +    var output = pair.readable;
    +    readable.pipeTo(writable, options).catch(function() {});
    +    return output;
    +  }
    +
    +  Object.defineProperty(global, "__uxpStreamsPipeTo",
    +                        { value: pipeTo, configurable: true });
    +  Object.defineProperty(global, "__uxpStreamsPipeThrough",
    +                        { value: pipeThrough, configurable: true });
    +
    +  if (global.ReadableStream && !global.ReadableStream.from) {
    +    Object.defineProperty(global.ReadableStream, "from", {
    +      value: function from(asyncIterable) {
    +        if (asyncIterable == null)
    +          throw new TypeError("ReadableStream.from requires an iterable");
    +        var method = asyncIterable[Symbol.asyncIterator] ||
    +                     asyncIterable[Symbol.iterator];
    +        if (typeof method !== "function")
    +          throw new TypeError("ReadableStream.from requires an iterable");
    +        var iterator = method.call(asyncIterable);
    +        return new ReadableStream({
    +          pull: function(controller) {
    +            return Promise.resolve(iterator.next()).then(function(result) {
    +              if (!isObject(result))
    +                throw new TypeError("Iterator result is not an object");
    +              if (result.done) {
    +                controller.close();
    +              } else {
    +                controller.enqueue(result.value);
    +              }
    +            });
    +          },
    +          cancel: function(reason) {
    +            var returnMethod = iterator.return;
    +            if (returnMethod)
    +              return returnMethod.call(iterator, reason);
    +            return undefined;
    +          }
    +        });
    +      },
    +      writable: true,
    +      configurable: true
    +    });
    +  }
    +
    +  if (global.ReadableStream && typeof Symbol === "function" &&
    +      Symbol.asyncIterator && !global.ReadableStream.prototype.values) {
    +    function ReadableStreamAsyncIterator(stream, preventCancel) {
    +      this._reader = stream.getReader();
    +      this._preventCancel = preventCancel;
    +      this._done = false;
    +    }
    +
    +    ReadableStreamAsyncIterator.prototype.next = function() {
    +      if (this._done)
    +        return Promise.resolve({ value: undefined, done: true });
    +      var self = this;
    +      return this._reader.read().then(function(result) {
    +        if (result.done) {
    +          self._done = true;
    +          self._reader.releaseLock();
    +        }
    +        return result;
    +      }, function(error) {
    +        self._done = true;
    +        try { self._reader.releaseLock(); } catch (e) {}
    +        throw error;
    +      });
    +    };
    +
    +    ReadableStreamAsyncIterator.prototype.return = function(value) {
    +      if (this._done)
    +        return Promise.resolve({ value: value, done: true });
    +      this._done = true;
    +      var reader = this._reader;
    +      if (this._preventCancel) {
    +        reader.releaseLock();
    +        return Promise.resolve({ value: value, done: true });
    +      }
    +      return reader.cancel(value).then(function() {
    +        reader.releaseLock();
    +        return { value: value, done: true };
    +      });
    +    };
    +
    +    ReadableStreamAsyncIterator.prototype[Symbol.asyncIterator] = function() {
    +      return this;
    +    };
    +
    +    Object.defineProperty(global.ReadableStream.prototype, "values", {
    +      value: function values(options) {
    +        var preventCancel = Boolean(options && options.preventCancel);
    +        return new ReadableStreamAsyncIterator(this, preventCancel);
    +      },
    +      writable: true,
    +      configurable: true
    +    });
    +
    +    Object.defineProperty(global.ReadableStream.prototype, Symbol.asyncIterator, {
    +      value: global.ReadableStream.prototype.values,
    +      writable: true,
    +      configurable: true
    +    });
    +  }
    +
    +  var textEncoderStreamState = new WeakMap();
    +  var textDecoderStreamState = new WeakMap();
    +
    +  function enqueueEncoded(controller, encoder, string) {
    +    if (string.length === 0)
    +      return;
    +    var chunk = encoder.encode(string);
    +    if (chunk.byteLength)
    +      controller.enqueue(chunk);
    +  }
    +
    +  function TextEncoderStream() {
    +    if (!(this instanceof TextEncoderStream))
    +      throw new TypeError("TextEncoderStream must be constructed with new");
    +
    +    var encoder = new TextEncoder();
    +    var leadingSurrogate = null;
    +    var transform = new TransformStream({
    +      transform: function(chunk, controller) {
    +        var input = String(chunk);
    +        var output = "";
    +        var i = 0;
    +
    +        if (leadingSurrogate !== null) {
    +          if (input.length > 0) {
    +            var first = input.charCodeAt(0);
    +            if (first >= 0xDC00 && first <= 0xDFFF) {
    +              output += String.fromCharCode(leadingSurrogate) + input.charAt(0);
    +              i = 1;
    +            } else {
    +              output += "\uFFFD";
    +            }
    +          } else {
    +            return;
    +          }
    +          leadingSurrogate = null;
    +        }
    +
    +        for (; i < input.length; ++i) {
    +          var code = input.charCodeAt(i);
    +          if (code >= 0xD800 && code <= 0xDBFF) {
    +            if (i + 1 < input.length) {
    +              var next = input.charCodeAt(i + 1);
    +              if (next >= 0xDC00 && next <= 0xDFFF) {
    +                output += input.charAt(i) + input.charAt(i + 1);
    +                ++i;
    +              } else {
    +                output += "\uFFFD";
    +              }
    +            } else {
    +              leadingSurrogate = code;
    +              break;
    +            }
    +          } else if (code >= 0xDC00 && code <= 0xDFFF) {
    +            output += "\uFFFD";
    +          } else {
    +            output += input.charAt(i);
    +          }
    +        }
    +
    +        enqueueEncoded(controller, encoder, output);
    +      },
    +      flush: function(controller) {
    +        if (leadingSurrogate !== null) {
    +          leadingSurrogate = null;
    +          enqueueEncoded(controller, encoder, "\uFFFD");
    +        }
    +      }
    +    });
    +
    +    textEncoderStreamState.set(this, { transform: transform });
    +  }
    +
    +  Object.defineProperty(TextEncoderStream.prototype, "encoding", {
    +    configurable: true,
    +    get: function() {
    +      if (!textEncoderStreamState.has(this))
    +        throw new TypeError("TextEncoderStream expected");
    +      return "utf-8";
    +    }
    +  });
    +
    +  Object.defineProperty(TextEncoderStream.prototype, "readable", {
    +    configurable: true,
    +    get: function() {
    +      var state = textEncoderStreamState.get(this);
    +      if (!state)
    +        throw new TypeError("TextEncoderStream expected");
    +      return state.transform.readable;
    +    }
    +  });
    +
    +  Object.defineProperty(TextEncoderStream.prototype, "writable", {
    +    configurable: true,
    +    get: function() {
    +      var state = textEncoderStreamState.get(this);
    +      if (!state)
    +        throw new TypeError("TextEncoderStream expected");
    +      return state.transform.writable;
    +    }
    +  });
    +
    +  Object.defineProperty(TextEncoderStream.prototype, Symbol.toStringTag,
    +                        { value: "TextEncoderStream", configurable: true });
    +
    +  function TextDecoderStream(label, options) {
    +    if (!(this instanceof TextDecoderStream))
    +      throw new TypeError("TextDecoderStream must be constructed with new");
    +    label = label === undefined ? "utf-8" : label;
    +    options = options === undefined ? {} : options;
    +
    +    var decoder = new TextDecoder(label, options);
    +    var transform = new TransformStream({
    +      transform: function(chunk, controller) {
    +        var output = decoder.decode(chunk, { stream: true });
    +        if (output.length)
    +          controller.enqueue(output);
    +      },
    +      flush: function(controller) {
    +        var output = decoder.decode();
    +        if (output.length)
    +          controller.enqueue(output);
    +      }
    +    });
    +
    +    textDecoderStreamState.set(this, {
    +      transform: transform,
    +      encoding: decoder.encoding,
    +      fatal: decoder.fatal,
    +      ignoreBOM: Boolean(options && options.ignoreBOM)
    +    });
    +  }
    +
    +  Object.defineProperty(TextDecoderStream.prototype, "encoding", {
    +    configurable: true,
    +    get: function() {
    +      var state = textDecoderStreamState.get(this);
    +      if (!state)
    +        throw new TypeError("TextDecoderStream expected");
    +      return state.encoding;
    +    }
    +  });
    +
    +  Object.defineProperty(TextDecoderStream.prototype, "fatal", {
    +    configurable: true,
    +    get: function() {
    +      var state = textDecoderStreamState.get(this);
    +      if (!state)
    +        throw new TypeError("TextDecoderStream expected");
    +      return state.fatal;
    +    }
    +  });
    +
    +  Object.defineProperty(TextDecoderStream.prototype, "ignoreBOM", {
    +    configurable: true,
    +    get: function() {
    +      var state = textDecoderStreamState.get(this);
    +      if (!state)
    +        throw new TypeError("TextDecoderStream expected");
    +      return state.ignoreBOM;
    +    }
    +  });
    +
    +  Object.defineProperty(TextDecoderStream.prototype, "readable", {
    +    configurable: true,
    +    get: function() {
    +      var state = textDecoderStreamState.get(this);
    +      if (!state)
    +        throw new TypeError("TextDecoderStream expected");
    +      return state.transform.readable;
    +    }
    +  });
    +
    +  Object.defineProperty(TextDecoderStream.prototype, "writable", {
    +    configurable: true,
    +    get: function() {
    +      var state = textDecoderStreamState.get(this);
    +      if (!state)
    +        throw new TypeError("TextDecoderStream expected");
    +      return state.transform.writable;
    +    }
    +  });
    +
    +  Object.defineProperty(TextDecoderStream.prototype, Symbol.toStringTag,
    +                        { value: "TextDecoderStream", configurable: true });
    +
    +  var compressionStreamState = new WeakMap();
    +  var decompressionStreamState = new WeakMap();
    +
    +  function enqueueCompressionChunks(nativeContext, chunk, finish, controller) {
    +    var chunks = global.__uxpCompressionProcess(nativeContext, chunk, finish);
    +    for (var i = 0; i < chunks.length; ++i)
    +      controller.enqueue(chunks[i]);
    +  }
    +
    +  function CompressionStream(format) {
    +    if (!(this instanceof CompressionStream))
    +      throw new TypeError("CompressionStream must be constructed with new");
    +    var nativeContext = global.__uxpCreateCompressionContext(format, true);
    +    var transform = new TransformStream({
    +      transform: function(chunk, controller) {
    +        enqueueCompressionChunks(nativeContext, chunk, false, controller);
    +      },
    +      flush: function(controller) {
    +        enqueueCompressionChunks(nativeContext, undefined, true, controller);
    +      }
    +    });
    +    compressionStreamState.set(this, { transform: transform });
    +  }
    +
    +  Object.defineProperty(CompressionStream.prototype, "readable", {
    +    configurable: true,
    +    get: function() {
    +      var state = compressionStreamState.get(this);
    +      if (!state)
    +        throw new TypeError("CompressionStream expected");
    +      return state.transform.readable;
    +    }
    +  });
    +
    +  Object.defineProperty(CompressionStream.prototype, "writable", {
    +    configurable: true,
    +    get: function() {
    +      var state = compressionStreamState.get(this);
    +      if (!state)
    +        throw new TypeError("CompressionStream expected");
    +      return state.transform.writable;
    +    }
    +  });
    +
    +  Object.defineProperty(CompressionStream.prototype, Symbol.toStringTag,
    +                        { value: "CompressionStream", configurable: true });
    +
    +  function DecompressionStream(format) {
    +    if (!(this instanceof DecompressionStream))
    +      throw new TypeError("DecompressionStream must be constructed with new");
    +    var nativeContext = global.__uxpCreateCompressionContext(format, false);
    +    var transform = new TransformStream({
    +      transform: function(chunk, controller) {
    +        enqueueCompressionChunks(nativeContext, chunk, false, controller);
    +      },
    +      flush: function(controller) {
    +        enqueueCompressionChunks(nativeContext, undefined, true, controller);
    +      }
    +    });
    +    decompressionStreamState.set(this, { transform: transform });
    +  }
    +
    +  Object.defineProperty(DecompressionStream.prototype, "readable", {
    +    configurable: true,
    +    get: function() {
    +      var state = decompressionStreamState.get(this);
    +      if (!state)
    +        throw new TypeError("DecompressionStream expected");
    +      return state.transform.readable;
    +    }
    +  });
    +
    +  Object.defineProperty(DecompressionStream.prototype, "writable", {
    +    configurable: true,
    +    get: function() {
    +      var state = decompressionStreamState.get(this);
    +      if (!state)
    +        throw new TypeError("DecompressionStream expected");
    +      return state.transform.writable;
    +    }
    +  });
    +
    +  Object.defineProperty(DecompressionStream.prototype, Symbol.toStringTag,
    +                        { value: "DecompressionStream", configurable: true });
    +
    +  define("WritableStream", WritableStream);
    +  define("WritableStreamDefaultWriter", WritableStreamDefaultWriter);
    +  define("WritableStreamDefaultController", WritableStreamDefaultController);
    +  define("TransformStream", TransformStream);
    +  define("TransformStreamDefaultController", TransformStreamDefaultController);
    +  define("TextEncoderStream", TextEncoderStream);
    +  define("TextDecoderStream", TextDecoderStream);
    +  define("CompressionStream", CompressionStream);
    +  define("DecompressionStream", DecompressionStream);
    +})(this);
    +)JS";
    +
    +    RootedValue rval(cx);
    +    JS::CompileOptions options(cx);
    +    options.setFileAndLine("builtin/StreamExtras.js", 1);
    +    options.setNoScriptRval(true);
    +    return JS::Evaluate(cx, options, source, strlen(source), &rval);
    +}
    diff --git a/js/src/builtin/Stream.h b/js/src/builtin/Stream.h
    index 0726e78361..50bd7a52a1 100644
    --- a/js/src/builtin/Stream.h
    +++ b/js/src/builtin/Stream.h
    @@ -165,6 +165,8 @@ class CountQueuingStrategy : public NativeObject
         static const Class protoClass_;
     };
     
    +[[nodiscard]] bool InitStreamExtras(JSContext* cx, HandleObject global);
    +
     } // namespace js
     
     #endif /* builtin_Stream_h */
    diff --git a/js/src/vm/GlobalObject.cpp b/js/src/vm/GlobalObject.cpp
    index b3080d6edd..fa9d27ba68 100644
    --- a/js/src/vm/GlobalObject.cpp
    +++ b/js/src/vm/GlobalObject.cpp
    @@ -464,6 +464,10 @@ GlobalObject::initStandardClasses(JSContext* cx, Handle global)
             if (!ensureConstructor(cx, global, static_cast(k)))
                 return false;
         }
    +
    +    if (cx->options().streams() && !InitStreamExtras(cx, global))
    +        return false;
    +
         return true;
     }
     
    
    From ca56c09e85d4dc2c3648f05088c029d3c3e43224 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 8 May 2026 15:06:07 -0400
    Subject: [PATCH 32/72] Tighten writable stream behavior
    
    ---
     js/src/builtin/Stream.cpp | 24 ++++++++++++++++++++----
     1 file changed, 20 insertions(+), 4 deletions(-)
    
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index 2593d1315a..42392f2e12 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -6096,6 +6096,9 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
         var abort = state.sink.abort;
         state.state = "errored";
         state.storedError = reason;
    +    if (state.abortController) {
    +      try { state.abortController.abort(); } catch (e) {}
    +    }
         state.ready.reject(reason);
         state.closed.reject(reason);
         state.readyPromise.catch(function() {});
    @@ -6124,7 +6127,7 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
             var state = writableControllerState.get(this);
             if (!state)
               throw new TypeError("WritableStreamDefaultController expected");
    -        return state.signal;
    +        return state.abortController ? state.abortController.signal : undefined;
           }
         });
       } catch (e) {}
    @@ -6155,6 +6158,9 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
           throw new TypeError("strategy.size is not callable");
     
         var controller = Object.create(WritableStreamDefaultController.prototype);
    +    var abortController = typeof global.AbortController === "function"
    +      ? new global.AbortController()
    +      : undefined;
         var ready = newPromiseCapability();
         ready.resolve(undefined);
         var closed = newPromiseCapability();
    @@ -6165,6 +6171,7 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
           state: "writable",
           storedError: undefined,
           writer: undefined,
    +      abortController: abortController,
           writeChain: Promise.resolve(undefined),
           ready: ready,
           readyPromise: ready.promise,
    @@ -6176,7 +6183,10 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
           backpressure: false
         };
         writableState.set(this, state);
    -    writableControllerState.set(controller, { stream: this, signal: undefined });
    +    writableControllerState.set(controller, {
    +      stream: this,
    +      abortController: abortController
    +    });
     
         var start = underlyingSink.start;
         if (start !== undefined) {
    @@ -6263,9 +6273,9 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
             throw new TypeError("Writer lock is released");
           var streamState = writableState.get(state.stream);
           if (streamState.state === "errored")
    -        throw streamState.storedError;
    -      if (streamState.state === "closed")
             return null;
    +      if (streamState.state === "closed")
    +        return 0;
           return streamState.highWaterMark - streamState.queueTotalSize;
         }
       });
    @@ -6582,6 +6592,12 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
         pair = requiredObject(pair, "transform");
         var writable = pair.writable;
         var output = pair.readable;
    +    if (readable.locked)
    +      throw new TypeError("ReadableStream is locked");
    +    if (!isWritableStream(writable))
    +      throw new TypeError("transform.writable must be a WritableStream");
    +    if (writable.locked)
    +      throw new TypeError("WritableStream is locked");
         readable.pipeTo(writable, options).catch(function() {});
         return output;
       }
    
    From 936a862591ddd3c23ce0b8dfac545f1eb3560f3b Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 8 May 2026 15:07:37 -0400
    Subject: [PATCH 33/72] Harden stream pipe cancellation
    
    ---
     js/src/builtin/Stream.cpp | 17 +++++++++++++++++
     1 file changed, 17 insertions(+)
    
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index 42392f2e12..8aa94067ce 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -6032,6 +6032,8 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
         var write = state.sink.write;
         var controller = state.controller;
         var writePromise = state.writeChain.then(function() {
    +      if (state.state === "errored")
    +        throw state.storedError;
           if (write)
             return write.call(state.sink, chunk, controller);
           return undefined;
    @@ -6103,6 +6105,8 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
         state.closed.reject(reason);
         state.readyPromise.catch(function() {});
         state.closedPromise.catch(function() {});
    +    if (state.writer)
    +      syncWritableWriterWithStream(state.writer, state);
     
         var abortPromise = abort ? promiseCall(abort, state.sink, [reason])
                                  : Promise.resolve(undefined);
    @@ -6542,7 +6546,11 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
             signal.addEventListener("abort", onAbort);
     
           function pump() {
    +        if (closed)
    +          return;
             reader.read().then(function(result) {
    +          if (closed)
    +            return;
               if (result.done) {
                 var closePromise = preventClose ? Promise.resolve(undefined)
                                                : writer.close();
    @@ -6557,6 +6565,8 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
               }
     
               writer.write(result.value).then(pump, function(error) {
    +            if (closed)
    +              return;
                 var cancel = preventCancel
                   ? Promise.resolve(undefined)
                   : reader.cancel(error);
    @@ -6569,6 +6579,8 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
                 });
               });
             }, function(error) {
    +          if (closed)
    +            return;
               var abort = preventAbort
                 ? Promise.resolve(undefined)
                 : writer.abort(error);
    @@ -6596,6 +6608,8 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
           throw new TypeError("ReadableStream is locked");
         if (!isWritableStream(writable))
           throw new TypeError("transform.writable must be a WritableStream");
    +    if (!(output instanceof global.ReadableStream))
    +      throw new TypeError("transform.readable must be a ReadableStream");
         if (writable.locked)
           throw new TypeError("WritableStream is locked");
         readable.pipeTo(writable, options).catch(function() {});
    @@ -6679,6 +6693,9 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
           return reader.cancel(value).then(function() {
             reader.releaseLock();
             return { value: value, done: true };
    +      }, function(error) {
    +        try { reader.releaseLock(); } catch (e) {}
    +        throw error;
           });
         };
     
    
    From 7ed26747c2be7d0bf987bb6ea30b0983a7bcacc6 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 8 May 2026 15:09:42 -0400
    Subject: [PATCH 34/72] Propagate transform stream errors
    
    ---
     js/src/builtin/Stream.cpp | 34 ++++++++++++++++++++++++++++++----
     1 file changed, 30 insertions(+), 4 deletions(-)
    
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index 8aa94067ce..bbfbc7cc11 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -6382,6 +6382,12 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
                             { value: "TransformStreamDefaultController",
                               configurable: true });
     
    +  function errorReadableController(controller, error) {
    +    try {
    +      controller.error(error);
    +    } catch (e) {}
    +  }
    +
       function TransformStream(transformer, writableStrategy, readableStrategy) {
         if (!(this instanceof TransformStream))
           throw new TypeError("TransformStream must be constructed with new");
    @@ -6421,16 +6427,33 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
         var startPromise = startAlgorithm
           ? promiseCall(startAlgorithm, transformer, [controller])
           : Promise.resolve(undefined);
    +    startPromise = startPromise.then(undefined, function(error) {
    +      if (readableController)
    +        errorReadableController(readableController, error);
    +      throw error;
    +    });
     
         var writable = new WritableStream({
           start: function() {
             return startPromise;
           },
           write: function(chunk) {
    -        if (transformAlgorithm)
    -          return transformAlgorithm.call(transformer, chunk, controller);
    -        controller.enqueue(chunk);
    -        return undefined;
    +        var result;
    +        try {
    +          if (transformAlgorithm) {
    +            result = transformAlgorithm.call(transformer, chunk, controller);
    +          } else {
    +            controller.enqueue(chunk);
    +            result = undefined;
    +          }
    +        } catch (error) {
    +          errorReadableController(readableController, error);
    +          throw error;
    +        }
    +        return Promise.resolve(result).then(undefined, function(error) {
    +          errorReadableController(readableController, error);
    +          throw error;
    +        });
           },
           close: function() {
             var result = flushAlgorithm
    @@ -6438,6 +6461,9 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
               : Promise.resolve(undefined);
             return result.then(function() {
               readableController.close();
    +        }, function(error) {
    +          errorReadableController(readableController, error);
    +          throw error;
             });
           },
           abort: function(reason) {
    
    From 23756fca47feb2e3aa79b6203899562abe2d662c Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 8 May 2026 17:13:34 -0400
    Subject: [PATCH 35/72] Guard missing process global script load
    
    ---
     dom/base/nsFrameMessageManager.cpp | 3 +++
     1 file changed, 3 insertions(+)
    
    diff --git a/dom/base/nsFrameMessageManager.cpp b/dom/base/nsFrameMessageManager.cpp
    index ffb5709e46..a80d9164b9 100644
    --- a/dom/base/nsFrameMessageManager.cpp
    +++ b/dom/base/nsFrameMessageManager.cpp
    @@ -1929,6 +1929,9 @@ public:
       {
         ProcessGlobal* global = ProcessGlobal::Get();
         MOZ_ASSERT(!aRunInGlobalScope);
    +    if (NS_WARN_IF(!global)) {
    +      return false;
    +    }
         global->LoadScript(aURL);
         return true;
       }
    
    From abeed80755a9181a52a0e156fba88af1508c57b8 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 8 May 2026 18:59:28 -0400
    Subject: [PATCH 36/72] Install stream extras lazily
    
    ---
     js/src/builtin/Stream.cpp  |  7 +++++++
     js/src/jsapi.cpp           | 31 +++++++++++++++++++++++++++++++
     js/src/vm/GlobalObject.cpp |  3 ---
     3 files changed, 38 insertions(+), 3 deletions(-)
    
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index bbfbc7cc11..daa3558b56 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -932,6 +932,13 @@ CallStreamExtra(JSContext* cx, const char* name, HandleValue streamVal,
         if (!JS_GetProperty(cx, global, name, &fun))
             return false;
     
    +    if (!fun.isObject() || !IsCallable(fun)) {
    +        if (!InitStreamExtras(cx, global))
    +            return false;
    +        if (!JS_GetProperty(cx, global, name, &fun))
    +            return false;
    +    }
    +
         if (!fun.isObject() || !IsCallable(fun)) {
             JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
                                       JSMSG_READABLESTREAM_METHOD_NOT_IMPLEMENTED, name);
    diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp
    index f1627e481e..3ea147eaff 100644
    --- a/js/src/jsapi.cpp
    +++ b/js/src/jsapi.cpp
    @@ -951,6 +951,20 @@ LookupStdName(const JSAtomState& names, JSAtom* name, const JSStdName* table)
         return nullptr;
     }
     
    +static bool
    +IsStreamExtraName(JSFlatString* name)
    +{
    +    return JS_FlatStringEqualsAscii(name, "WritableStream") ||
    +           JS_FlatStringEqualsAscii(name, "WritableStreamDefaultWriter") ||
    +           JS_FlatStringEqualsAscii(name, "WritableStreamDefaultController") ||
    +           JS_FlatStringEqualsAscii(name, "TransformStream") ||
    +           JS_FlatStringEqualsAscii(name, "TransformStreamDefaultController") ||
    +           JS_FlatStringEqualsAscii(name, "TextEncoderStream") ||
    +           JS_FlatStringEqualsAscii(name, "TextDecoderStream") ||
    +           JS_FlatStringEqualsAscii(name, "CompressionStream") ||
    +           JS_FlatStringEqualsAscii(name, "DecompressionStream");
    +}
    +
     /*
      * Table of standard classes, indexed by JSProtoKey. For entries where the
      * JSProtoKey does not correspond to a class with a meaningful constructor, we
    @@ -1041,11 +1055,27 @@ JS_ResolveStandardClass(JSContext* cx, HandleObject obj, HandleId id, bool* reso
                 if (!GlobalObject::ensureConstructor(cx, global, key))
                     return false;
     
    +            if (key == JSProto_ReadableStream) {
    +                RootedObject globalObj(cx, global);
    +                if (!InitStreamExtras(cx, globalObj))
    +                    return false;
    +            }
    +
                 *resolved = true;
                 return true;
             }
         }
     
    +    if (cx->options().streams() && IsStreamExtraName(idAtom)) {
    +        RootedObject globalObj(cx, global);
    +        if (!InitStreamExtras(cx, globalObj))
    +            return false;
    +
    +        if (!HasOwnProperty(cx, globalObj, id, resolved))
    +            return false;
    +        return true;
    +    }
    +
         // There is no such property to resolve. An ordinary resolve hook would
         // just return true at this point. But the global object is special in one
         // more way: its prototype chain is lazily initialized. That is,
    @@ -1075,6 +1105,7 @@ JS_MayResolveStandardClass(const JSAtomState& names, jsid id, JSObject* maybeObj
     
         return atom == names.undefined ||
                atom == names.globalThis ||
    +           IsStreamExtraName(atom) ||
                LookupStdName(names, atom, standard_class_names) ||
                LookupStdName(names, atom, builtin_property_names);
     }
    diff --git a/js/src/vm/GlobalObject.cpp b/js/src/vm/GlobalObject.cpp
    index fa9d27ba68..be82c18f11 100644
    --- a/js/src/vm/GlobalObject.cpp
    +++ b/js/src/vm/GlobalObject.cpp
    @@ -465,9 +465,6 @@ GlobalObject::initStandardClasses(JSContext* cx, Handle global)
                 return false;
         }
     
    -    if (cx->options().streams() && !InitStreamExtras(cx, global))
    -        return false;
    -
         return true;
     }
     
    
    From c7f575cdbea867f14b5ffe5f751461adcb6b9946 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 8 May 2026 19:20:29 -0400
    Subject: [PATCH 37/72] Suppress internal stream release rejections
    
    ---
     js/src/builtin/Stream.cpp | 32 +++++++++++++++++++++++++-------
     1 file changed, 25 insertions(+), 7 deletions(-)
    
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index daa3558b56..cd58798417 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -5965,6 +5965,24 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
         return Promise.reject(error);
       }
     
    +  function silenceRejection(promise) {
    +    try {
    +      if (promise && typeof promise.catch === "function")
    +        promise.catch(function() {});
    +    } catch (e) {}
    +  }
    +
    +  function releaseReaderLock(reader) {
    +    try { silenceRejection(reader.closed); } catch (e) {}
    +    try { reader.releaseLock(); } catch (e) {}
    +  }
    +
    +  function releaseWriterLock(writer) {
    +    try { silenceRejection(writer.closed); } catch (e) {}
    +    try { silenceRejection(writer.ready); } catch (e) {}
    +    try { writer.releaseLock(); } catch (e) {}
    +  }
    +
       function syncWritableWriterWithStream(writer, state) {
         var ws = writerState.get(writer);
         if (!ws || ws.stream === undefined)
    @@ -6530,8 +6548,8 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
           if (closed)
             return;
           closed = true;
    -      try { reader.releaseLock(); } catch (e) {}
    -      try { writer.releaseLock(); } catch (e) {}
    +      releaseReaderLock(reader);
    +      releaseWriterLock(writer);
           if (signal && signal.removeEventListener)
             signal.removeEventListener("abort", onAbort);
         }
    @@ -6704,12 +6722,12 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
           return this._reader.read().then(function(result) {
             if (result.done) {
               self._done = true;
    -          self._reader.releaseLock();
    +          releaseReaderLock(self._reader);
             }
             return result;
           }, function(error) {
             self._done = true;
    -        try { self._reader.releaseLock(); } catch (e) {}
    +        releaseReaderLock(self._reader);
             throw error;
           });
         };
    @@ -6720,14 +6738,14 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
           this._done = true;
           var reader = this._reader;
           if (this._preventCancel) {
    -        reader.releaseLock();
    +        releaseReaderLock(reader);
             return Promise.resolve({ value: value, done: true });
           }
           return reader.cancel(value).then(function() {
    -        reader.releaseLock();
    +        releaseReaderLock(reader);
             return { value: value, done: true };
           }, function(error) {
    -        try { reader.releaseLock(); } catch (e) {}
    +        releaseReaderLock(reader);
             throw error;
           });
         };
    
    From 29056ef11249023e3395a5095a1fd10a6d84e1ab Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 8 May 2026 19:40:00 -0400
    Subject: [PATCH 38/72] Silently release internal stream readers
    
    ---
     js/src/builtin/Stream.cpp | 58 +++++++++++++++++++++++++++++++++++++--
     1 file changed, 56 insertions(+), 2 deletions(-)
    
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index cd58798417..1bc28ad000 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -5869,6 +5869,46 @@ StreamCompressionProcess(JSContext* cx, unsigned argc, Value* vp)
         return true;
     }
     
    +bool
    +ReleaseReadableStreamReaderSilently(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    args.rval().setBoolean(true);
    +
    +    if (!args.get(0).isObject())
    +        return true;
    +
    +    RootedObject readerObj(cx, &args[0].toObject());
    +    if (!readerObj->is() &&
    +        !readerObj->is())
    +        return true;
    +
    +    RootedNativeObject reader(cx, &readerObj->as());
    +    if (!ReaderHasStream(reader))
    +        return true;
    +
    +    Value requestsVal = reader->getFixedSlot(ReaderSlot_Requests);
    +    if (!requestsVal.isUndefined()) {
    +        NativeObject* requests = &requestsVal.toObject().as();
    +        if (requests->getDenseInitializedLength() != 0) {
    +            args.rval().setBoolean(false);
    +            return true;
    +        }
    +    }
    +
    +    Rooted stream(cx, StreamFromReader(reader));
    +    MOZ_ASSERT(&stream->getFixedSlot(StreamSlot_Reader).toObject() == reader);
    +
    +    RootedObject closedPromise(cx, PromiseObject::unforgeableResolve(cx, UndefinedHandleValue));
    +    if (!closedPromise)
    +        return false;
    +    reader->setFixedSlot(ReaderSlot_ClosedPromise, ObjectValue(*closedPromise));
    +
    +    stream->setFixedSlot(StreamSlot_Reader, UndefinedValue());
    +    reader->setFixedSlot(ReaderSlot_Stream, UndefinedValue());
    +    return true;
    +}
    +
     } // anonymous namespace
     
     bool
    @@ -5882,6 +5922,10 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
                                StreamCompressionProcess, 3, 0))
             return false;
     
    +    if (!JS_DefineFunction(cx, global, "__uxpReleaseReadableStreamReaderSilently",
    +                           ReleaseReadableStreamReaderSilently, 1, 0))
    +        return false;
    +
         static const char source[] = R"JS(
     (function(global) {
       "use strict";
    @@ -5973,8 +6017,18 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
       }
     
       function releaseReaderLock(reader) {
    -    try { silenceRejection(reader.closed); } catch (e) {}
    -    try { reader.releaseLock(); } catch (e) {}
    +    try {
    +      if (global.__uxpReleaseReadableStreamReaderSilently(reader))
    +        return;
    +    } catch (e) {}
    +    Promise.resolve().then(function() {
    +      try {
    +        if (global.__uxpReleaseReadableStreamReaderSilently(reader))
    +          return;
    +      } catch (e) {}
    +      try { silenceRejection(reader.closed); } catch (e) {}
    +      try { reader.releaseLock(); } catch (e) {}
    +    });
       }
     
       function releaseWriterLock(writer) {
    
    From 8c6e09601c4981869ded3aa9d6d1dda86246bb6f Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 8 May 2026 20:54:28 -0400
    Subject: [PATCH 39/72] Fix stream cross-realm globals
    
    ---
     js/src/builtin/Stream.cpp | 465 +++++++++++++++++++++++---------------
     1 file changed, 285 insertions(+), 180 deletions(-)
    
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index 1bc28ad000..39b516bc7e 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -101,14 +101,72 @@ Is(const HandleValue v)
         return v.isObject() && v.toObject().is();
     }
     
    -#ifdef DEBUG
    +template
    +MOZ_ALWAYS_INLINE bool
    +IsMaybeWrapped(const HandleValue v)
    +{
    +    if (!v.isObject())
    +        return false;
    +
    +    JSObject* obj = &v.toObject();
    +    if (obj->is())
    +        return true;
    +
    +    JSObject* unwrapped = CheckedUnwrap(obj);
    +    return unwrapped && unwrapped->is();
    +}
    +
    +template
    +MOZ_ALWAYS_INLINE T*
    +UnwrapInternalSlotObject(JSObject* obj)
    +{
    +    JSObject* unwrapped = UncheckedUnwrap(obj);
    +    MOZ_ASSERT(unwrapped);
    +    MOZ_ASSERT(unwrapped->is());
    +    return &unwrapped->as();
    +}
    +
    +template
    +MOZ_ALWAYS_INLINE T*
    +UnwrapMaybeWrappedArg(const HandleValue v)
    +{
    +    if (!v.isObject())
    +        return nullptr;
    +
    +    JSObject* obj = &v.toObject();
    +    if (obj->is())
    +        return &obj->as();
    +
    +    JSObject* unwrapped = CheckedUnwrap(obj);
    +    if (!unwrapped || !unwrapped->is())
    +        return nullptr;
    +
    +    return &unwrapped->as();
    +}
    +
     static bool
     IsReadableStreamController(const JSObject* controller)
     {
         return controller->is() ||
                controller->is();
     }
    -#endif // DEBUG
    +
    +[[nodiscard]] static NativeObject*
    +UnwrapMaybeWrappedReadableStreamController(const HandleValue v)
    +{
    +    if (!v.isObject())
    +        return nullptr;
    +
    +    JSObject* obj = &v.toObject();
    +    if (IsReadableStreamController(obj))
    +        return &obj->as();
    +
    +    JSObject* unwrapped = CheckedUnwrap(obj);
    +    if (!unwrapped || !IsReadableStreamController(unwrapped))
    +        return nullptr;
    +
    +    return &unwrapped->as();
    +}
     
     static inline uint32_t
     ControllerFlags(const NativeObject* controller)
    @@ -188,7 +246,8 @@ inline static MOZ_MUST_USE ReadableStream*
     StreamFromController(const NativeObject* controller)
     {
         MOZ_ASSERT(IsReadableStreamController(controller));
    -    return &controller->getFixedSlot(ControllerSlot_Stream).toObject().as();
    +    return UnwrapInternalSlotObject(
    +        &controller->getFixedSlot(ControllerSlot_Stream).toObject());
     }
     
     inline static MOZ_MUST_USE NativeObject*
    @@ -220,15 +279,17 @@ inline static MOZ_MUST_USE ReadableStream*
     StreamFromReader(const NativeObject* reader)
     {
         MOZ_ASSERT(ReaderHasStream(reader));
    -    return &reader->getFixedSlot(ReaderSlot_Stream).toObject().as();
    +    return UnwrapInternalSlotObject(
    +        &reader->getFixedSlot(ReaderSlot_Stream).toObject());
     }
     
     inline static MOZ_MUST_USE NativeObject*
     ReaderFromStream(const NativeObject* stream)
     {
         Value readerVal = stream->getFixedSlot(StreamSlot_Reader);
    -    MOZ_ASSERT(JS::IsReadableStreamReader(&readerVal.toObject()));
    -    return &readerVal.toObject().as();
    +    NativeObject* reader = UnwrapInternalSlotObject(&readerVal.toObject());
    +    MOZ_ASSERT(JS::IsReadableStreamReader(reader));
    +    return reader;
     }
     
     inline static bool
    @@ -310,26 +371,55 @@ RejectNonGenericMethod(JSContext* cx, const CallArgs& args,
         return ReturnPromiseRejectedWithPendingError(cx, args);
     }
     
    -inline static MOZ_MUST_USE NativeObject*
    +[[nodiscard]] static bool
    +ResolveMaybeWrappedPromise(JSContext* cx, HandleObject promise, HandleValue value)
    +{
    +    RootedObject wrappedPromise(cx, promise);
    +    RootedValue wrappedValue(cx, value);
    +    if (!JS_WrapObject(cx, &wrappedPromise) || !JS_WrapValue(cx, &wrappedValue))
    +        return false;
    +    return ResolvePromise(cx, wrappedPromise, wrappedValue);
    +}
    +
    +[[nodiscard]] static bool
    +RejectMaybeWrappedPromise(JSContext* cx, HandleObject promise, HandleValue reason)
    +{
    +    RootedObject wrappedPromise(cx, promise);
    +    RootedValue wrappedReason(cx, reason);
    +    if (!JS_WrapObject(cx, &wrappedPromise) || !JS_WrapValue(cx, &wrappedReason))
    +        return false;
    +    return RejectPromise(cx, wrappedPromise, wrappedReason);
    +}
    +
    +[[nodiscard]] inline static NativeObject*
     SetNewList(JSContext* cx, HandleNativeObject container, uint32_t slot)
     {
    -    NativeObject* list = NewObjectWithNullTaggedProto(cx);
    -    if (!list)
    -        return nullptr;
    -    container->setFixedSlot(slot, ObjectValue(*list));
    +    RootedNativeObject list(cx);
    +    {
    +        JSAutoCompartment ac(cx, container);
    +        list = NewObjectWithNullTaggedProto(cx);
    +        if (!list)
    +            return nullptr;
    +        container->setFixedSlot(slot, ObjectValue(*list));
    +    }
         return list;
     }
     
     inline static MOZ_MUST_USE bool
     AppendToList(JSContext* cx, HandleNativeObject list, HandleValue value)
     {
    +    JSAutoCompartment ac(cx, list);
    +    RootedValue wrappedValue(cx, value);
    +    if (!JS_WrapValue(cx, &wrappedValue))
    +        return false;
    +
         uint32_t length = list->getDenseInitializedLength();
     
         if (!list->ensureElements(cx, length + 1))
             return false;
     
         list->ensureDenseInitializedLength(cx, length, 1);
    -    list->setDenseElement(length, value);
    +    list->setDenseElement(length, wrappedValue);
     
         return true;
     }
    @@ -346,6 +436,7 @@ template
     inline static MOZ_MUST_USE T*
     ShiftFromList(JSContext* cx, HandleNativeObject list)
     {
    +    JSAutoCompartment ac(cx, list);
         uint32_t length = list->getDenseInitializedLength();
         MOZ_ASSERT(length > 0);
     
    @@ -1367,7 +1458,8 @@ ReadableStreamAddReadIntoRequest(JSContext* cx, Handle stream)
     {
         // Step 1: MOZ_ASSERT: ! IsReadableStreamBYOBReader(stream.[[reader]]) is true.
         RootedValue val(cx, stream->getFixedSlot(StreamSlot_Reader));
    -    RootedNativeObject reader(cx, &val.toObject().as());
    +    RootedNativeObject reader(cx, ReaderFromStream(stream));
    +    MOZ_ASSERT(reader->is());
     
         // Step 2: MOZ_ASSERT: stream.[[state]] is "readable" or "closed".
         MOZ_ASSERT(stream->readable() || stream->closed());
    @@ -1380,7 +1472,8 @@ ReadableStreamAddReadIntoRequest(JSContext* cx, Handle stream)
         // Step 4: Let readIntoRequest be Record {[[promise]]: promise}.
         // Step 5: Append readIntoRequest as the last element of stream.[[reader]].[[readIntoRequests]].
         val = reader->getFixedSlot(ReaderSlot_Requests);
    -    RootedNativeObject readIntoRequests(cx, &val.toObject().as());
    +    RootedNativeObject readIntoRequests(cx);
    +    readIntoRequests = UnwrapInternalSlotObject(&val.toObject());
         // Since [[promise]] is the Record's only field, we store it directly.
         val = ObjectValue(*promise);
         if (!AppendToList(cx, readIntoRequests, val))
    @@ -1410,7 +1503,8 @@ ReadableStreamAddReadRequest(JSContext* cx, Handle stream)
       // Step 4: Let readRequest be Record {[[promise]]: promise}.
       // Step 5: Append readRequest as the last element of stream.[[reader]].[[readRequests]].
       RootedValue val(cx, reader->getFixedSlot(ReaderSlot_Requests));
    -  RootedNativeObject readRequests(cx, &val.toObject().as());
    +  RootedNativeObject readRequests(cx);
    +  readRequests = UnwrapInternalSlotObject(&val.toObject());
     
       // Since [[promise]] is the Record's only field, we store it directly.
       val = ObjectValue(*promise);
    @@ -1454,6 +1548,8 @@ ReadableStream::cancel(JSContext* cx, Handle stream, HandleValu
         //         with stream.[[storedError]].
         if (stream->errored()) {
             RootedValue storedError(cx, stream->getFixedSlot(StreamSlot_StoredError));
    +        if (!JS_WrapValue(cx, &storedError))
    +            return nullptr;
             return PromiseObject::unforgeableReject(cx, storedError);
         }
     
    @@ -1497,13 +1593,14 @@ ReadableStreamCloseInternal(JSContext* cx, Handle stream)
           return true;
     
       // Step 5: If ! IsReadableStreamDefaultReader(reader) is true,
    -  RootedNativeObject reader(cx, &val.toObject().as());
    +  RootedNativeObject reader(cx, ReaderFromStream(stream));
       if (reader->is()) {
           // Step a: Repeat for each readRequest that is an element of
           //         reader.[[readRequests]],
           val = reader->getFixedSlot(ReaderSlot_Requests);
           if (!val.isUndefined()) {
    -          RootedNativeObject readRequests(cx, &val.toObject().as());
    +          RootedNativeObject readRequests(cx);
    +          readRequests = UnwrapInternalSlotObject(&val.toObject());
               uint32_t len = readRequests->getDenseInitializedLength();
               RootedObject readRequest(cx);
               RootedObject resultObj(cx);
    @@ -1516,7 +1613,7 @@ ReadableStreamCloseInternal(JSContext* cx, Handle stream)
                   if (!resultObj)
                       return false;
                   resultVal = ObjectValue(*resultObj);
    -              if (!ResolvePromise(cx, readRequest, resultVal))
    +              if (!ResolveMaybeWrappedPromise(cx, readRequest, resultVal))
                       return false;
               }
     
    @@ -1528,7 +1625,7 @@ ReadableStreamCloseInternal(JSContext* cx, Handle stream)
       // Step 6: Resolve reader.[[closedPromise]] with undefined.
       // Step 7: Return (implicit).
       RootedObject closedPromise(cx, &reader->getFixedSlot(ReaderSlot_ClosedPromise).toObject());
    -  if (!ResolvePromise(cx, closedPromise, UndefinedHandleValue))
    +  if (!ResolveMaybeWrappedPromise(cx, closedPromise, UndefinedHandleValue))
           return false;
     
       if (stream->mode() == JS::ReadableStreamMode::ExternalSource &&
    @@ -1556,7 +1653,13 @@ ReadableStreamErrorInternal(JSContext* cx, Handle stream, Handl
         SetStreamState(stream, (state & ReadableStream::Disturbed) | ReadableStream::Errored);
     
         // Step 4: Set stream.[[storedError]] to e.
    -    stream->setFixedSlot(StreamSlot_StoredError, e);
    +    RootedValue storedError(cx, e);
    +    {
    +        JSAutoCompartment ac(cx, stream);
    +        if (!JS_WrapValue(cx, &storedError))
    +            return false;
    +        stream->setFixedSlot(StreamSlot_StoredError, storedError);
    +    }
     
         // Step 5: Let reader be stream.[[reader]].
         RootedValue val(cx, stream->getFixedSlot(StreamSlot_Reader));
    @@ -1564,20 +1667,21 @@ ReadableStreamErrorInternal(JSContext* cx, Handle stream, Handl
         // Step 6: If reader is undefined, return.
         if (val.isUndefined())
             return true;
    -    RootedNativeObject reader(cx, &val.toObject().as());
    +    RootedNativeObject reader(cx, ReaderFromStream(stream));
     
         // Steps 7,8: (Identical in our implementation.)
         // Step a: Repeat for each readRequest that is an element of
         //         reader.[[readRequests]],
         val = reader->getFixedSlot(ReaderSlot_Requests);
    -    RootedNativeObject readRequests(cx, &val.toObject().as());
    -    Rooted readRequest(cx);
    +    RootedNativeObject readRequests(cx);
    +    readRequests = UnwrapInternalSlotObject(&val.toObject());
    +    RootedObject readRequest(cx);
         uint32_t len = readRequests->getDenseInitializedLength();
         for (uint32_t i = 0; i < len; i++) {
             // Step i: Reject readRequest.[[promise]] with e.
             val = readRequests->getDenseElement(i);
    -        readRequest = &val.toObject().as();
    -        if (!PromiseObject::reject(cx, readRequest, e))
    +        readRequest = &val.toObject();
    +        if (!RejectMaybeWrappedPromise(cx, readRequest, e))
                 return false;
         }
     
    @@ -1587,8 +1691,8 @@ ReadableStreamErrorInternal(JSContext* cx, Handle stream, Handl
     
         // Step 9: Reject reader.[[closedPromise]] with e.
         val = reader->getFixedSlot(ReaderSlot_ClosedPromise);
    -    Rooted closedPromise(cx, &val.toObject().as());
    -    if (!PromiseObject::reject(cx, closedPromise, e))
    +    RootedObject closedPromise(cx, &val.toObject());
    +    if (!RejectMaybeWrappedPromise(cx, closedPromise, e))
             return false;
     
         if (stream->mode() == JS::ReadableStreamMode::ExternalSource &&
    @@ -1612,7 +1716,7 @@ ReadableStreamFulfillReadOrReadIntoRequest(JSContext* cx, HandlegetFixedSlot(StreamSlot_Reader));
    -    RootedNativeObject reader(cx, &val.toObject().as());
    +    RootedNativeObject reader(cx, ReaderFromStream(stream));
     
         // Step 2: Let readIntoRequest be the first element of
         //         reader.[[readIntoRequests]].
    @@ -1620,7 +1724,8 @@ ReadableStreamFulfillReadOrReadIntoRequest(JSContext* cx, HandlegetFixedSlot(ReaderSlot_Requests);
    -    RootedNativeObject readIntoRequests(cx, &val.toObject().as());
    +    RootedNativeObject readIntoRequests(cx);
    +    readIntoRequests = UnwrapInternalSlotObject(&val.toObject());
         Rooted readIntoRequest(cx);
         readIntoRequest = ShiftFromList(cx, readIntoRequests);
         MOZ_ASSERT(readIntoRequest);
    @@ -1631,7 +1736,8 @@ ReadableStreamFulfillReadOrReadIntoRequest(JSContext* cx, HandlegetFixedSlot(ReaderSlot_Requests);
    -    return readRequests.toObject().as().getDenseInitializedLength();
    +    NativeObject* requests = UnwrapInternalSlotObject(&readRequests.toObject());
    +    return requests->getDenseInitializedLength();
     }
     
     // Stream spec 3.4.10. ReadableStreamHasBYOBReader ( stream )
    @@ -1658,7 +1765,10 @@ ReadableStreamHasBYOBReader(ReadableStream* stream)
         // Step 3: If ! IsReadableStreamBYOBReader(reader) is false, return false.
         // Step 4: Return true.
         Value reader = stream->getFixedSlot(StreamSlot_Reader);
    -    return reader.isObject() && reader.toObject().is();
    +    if (!reader.isObject())
    +        return false;
    +    JSObject* unwrapped = UncheckedUnwrap(&reader.toObject());
    +    return unwrapped && unwrapped->is();
     }
     
     // Streap spec 3.4.11. ReadableStreamHasDefaultReader ( stream )
    @@ -1670,7 +1780,10 @@ ReadableStreamHasDefaultReader(ReadableStream* stream)
         // Step 3: If ! ReadableStreamDefaultReader(reader) is false, return false.
         // Step 4: Return true.
         Value reader = stream->getFixedSlot(StreamSlot_Reader);
    -    return reader.isObject() && reader.toObject().is();
    +    if (!reader.isObject())
    +        return false;
    +    JSObject* unwrapped = UncheckedUnwrap(&reader.toObject());
    +    return unwrapped && unwrapped->is();
     }
     
     static MOZ_MUST_USE bool
    @@ -1717,14 +1830,13 @@ ReadableStreamDefaultReader::constructor(JSContext* cx, unsigned argc, Value* vp
             return false;
     
         // Step 1: If ! IsReadableStream(stream) is false, throw a TypeError exception.
    -    if (!Is(args.get(0))) {
    +    Rooted stream(cx, UnwrapMaybeWrappedArg(args.get(0)));
    +    if (!stream) {
             ReportArgTypeError(cx, "ReadableStreamDefaultReader", "ReadableStream",
                                args.get(0));
             return false;
         }
     
    -    Rooted stream(cx, &args.get(0).toObject().as());
    -
         RootedObject reader(cx, CreateReadableStreamDefaultReader(cx, stream));
         if (!reader)
             return false;
    @@ -1734,36 +1846,40 @@ ReadableStreamDefaultReader::constructor(JSContext* cx, unsigned argc, Value* vp
     }
     
     // Streams spec, 3.5.4.1 get closed
    -static MOZ_MUST_USE bool
    -ReadableStreamDefaultReader_closed(JSContext* cx, unsigned argc, Value* vp)
    +[[nodiscard]] static bool
    +ReadableStreamDefaultReader_closed_impl(JSContext* cx, const CallArgs& args)
     {
    -    CallArgs args = CallArgsFromVp(argc, vp);
    -
    -    // Step 1: If ! IsReadableStreamDefaultReader(this) is false, return a promise
    -    //         rejected with a TypeError exception.
    -    if (!Is(args.thisv()))
    -        return RejectNonGenericMethod(cx, args, "ReadableStreamDefaultReader", "get closed");
    -
         // Step 2: Return this.[[closedPromise]].
         NativeObject* reader = &args.thisv().toObject().as();
         args.rval().set(reader->getFixedSlot(ReaderSlot_ClosedPromise));
         return true;
     }
     
    -static MOZ_MUST_USE JSObject*
    -ReadableStreamReaderGenericCancel(JSContext* cx, HandleNativeObject reader, HandleValue reason);
    -
    -// Streams spec, 3.5.4.2. cancel ( reason )
    -static MOZ_MUST_USE bool
    -ReadableStreamDefaultReader_cancel(JSContext* cx, unsigned argc, Value* vp)
    +static bool
    +ReadableStreamDefaultReader_closed(JSContext* cx, unsigned argc, Value* vp)
     {
         CallArgs args = CallArgsFromVp(argc, vp);
     
         // Step 1: If ! IsReadableStreamDefaultReader(this) is false, return a promise
         //         rejected with a TypeError exception.
    -    if (!Is(args.thisv()))
    -        return RejectNonGenericMethod(cx, args, "ReadableStreamDefaultReader", "cancel");
    +    if (!Is(args.thisv())) {
    +        if (IsMaybeWrapped(args.thisv())) {
    +            return CallNonGenericMethod,
    +                                        ReadableStreamDefaultReader_closed_impl>(cx, args);
    +        }
    +        return RejectNonGenericMethod(cx, args, "ReadableStreamDefaultReader", "get closed");
    +    }
     
    +    return ReadableStreamDefaultReader_closed_impl(cx, args);
    +}
    +
    +static MOZ_MUST_USE JSObject*
    +ReadableStreamReaderGenericCancel(JSContext* cx, HandleNativeObject reader, HandleValue reason);
    +
    +// Streams spec, 3.5.4.2. cancel ( reason )
    +[[nodiscard]] static bool
    +ReadableStreamDefaultReader_cancel_impl(JSContext* cx, const CallArgs& args)
    +{
         // Step 2: If this.[[ownerReadableStream]] is undefined, return a promise
         //         rejected with a TypeError exception.
         RootedNativeObject reader(cx, &args.thisv().toObject().as());
    @@ -1781,17 +1897,28 @@ ReadableStreamDefaultReader_cancel(JSContext* cx, unsigned argc, Value* vp)
         return true;
     }
     
    -// Streams spec, 3.5.4.3 read ( )
    -static MOZ_MUST_USE bool
    -ReadableStreamDefaultReader_read(JSContext* cx, unsigned argc, Value* vp)
    +static bool
    +ReadableStreamDefaultReader_cancel(JSContext* cx, unsigned argc, Value* vp)
     {
         CallArgs args = CallArgsFromVp(argc, vp);
     
         // Step 1: If ! IsReadableStreamDefaultReader(this) is false, return a promise
         //         rejected with a TypeError exception.
    -    if (!Is(args.thisv()))
    -        return RejectNonGenericMethod(cx, args, "ReadableStreamDefaultReader", "read");
    +    if (!Is(args.thisv())) {
    +        if (IsMaybeWrapped(args.thisv())) {
    +            return CallNonGenericMethod,
    +                                        ReadableStreamDefaultReader_cancel_impl>(cx, args);
    +        }
    +        return RejectNonGenericMethod(cx, args, "ReadableStreamDefaultReader", "cancel");
    +    }
     
    +    return ReadableStreamDefaultReader_cancel_impl(cx, args);
    +}
    +
    +// Streams spec, 3.5.4.3 read ( )
    +[[nodiscard]] static bool
    +ReadableStreamDefaultReader_read_impl(JSContext* cx, const CallArgs& args)
    +{
         // Step 2: If this.[[ownerReadableStream]] is undefined, return a promise
         //         rejected with a TypeError exception.
         Rooted reader(cx);
    @@ -1810,7 +1937,25 @@ ReadableStreamDefaultReader_read(JSContext* cx, unsigned argc, Value* vp)
         return true;
     }
     
    -static MOZ_MUST_USE bool
    +static bool
    +ReadableStreamDefaultReader_read(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +
    +    // Step 1: If ! IsReadableStreamDefaultReader(this) is false, return a promise
    +    //         rejected with a TypeError exception.
    +    if (!Is(args.thisv())) {
    +        if (IsMaybeWrapped(args.thisv())) {
    +            return CallNonGenericMethod,
    +                                        ReadableStreamDefaultReader_read_impl>(cx, args);
    +        }
    +        return RejectNonGenericMethod(cx, args, "ReadableStreamDefaultReader", "read");
    +    }
    +
    +    return ReadableStreamDefaultReader_read_impl(cx, args);
    +}
    +
    +[[nodiscard]] static bool
     ReadableStreamReaderGenericRelease(JSContext* cx, HandleNativeObject reader);
     
     // Streams spec, 3.5.4.4. releaseLock ( )
    @@ -1865,8 +2010,7 @@ static const JSPropertySpec ReadableStreamDefaultReader_properties[] = {
         JS_PS_END
     };
     
    -CLASS_SPEC(ReadableStreamDefaultReader, 1, ReaderSlotCount, ClassSpec::DontDefineConstructor, 0,
    -           JS_NULL_CLASS_OPS);
    +CLASS_SPEC(ReadableStreamDefaultReader, 1, ReaderSlotCount, 0, 0, JS_NULL_CLASS_OPS);
     
     
     // Streams spec, 3.6.3 new ReadableStreamBYOBReader ( stream )
    @@ -1916,12 +2060,12 @@ ReadableStreamBYOBReader::constructor(JSContext* cx, unsigned argc, Value* vp)
             return false;
     
         // Step 1: If ! IsReadableStream(stream) is false, throw a TypeError exception.
    -    if (!Is(args.get(0))) {
    +    Rooted stream(cx, UnwrapMaybeWrappedArg(args.get(0)));
    +    if (!stream) {
             ReportArgTypeError(cx, "ReadableStreamBYOBReader", "ReadableStream", args.get(0));
             return false;
         }
     
    -    Rooted stream(cx, &args.get(0).toObject().as());
         RootedObject reader(cx, CreateReadableStreamBYOBReader(cx, stream));
         if (!reader)
             return false;
    @@ -2080,7 +2224,7 @@ static const JSFunctionSpec ReadableStreamBYOBReader_methods[] = {
         JS_FS_END
     };
     
    -CLASS_SPEC(ReadableStreamBYOBReader, 1, 3, ClassSpec::DontDefineConstructor, 0, JS_NULL_CLASS_OPS);
    +CLASS_SPEC(ReadableStreamBYOBReader, 1, 3, 0, 0, JS_NULL_CLASS_OPS);
     
     inline static MOZ_MUST_USE bool
     ReadableStreamControllerCallPullIfNeeded(JSContext* cx, HandleNativeObject controller);
    @@ -2101,7 +2245,21 @@ ReadableStreamReaderGenericCancel(JSContext* cx, HandleNativeObject reader, Hand
         // Step 2: Assert: stream is not undefined (implicit).
     
         // Step 3: Return ! ReadableStreamCancel(stream, reason).
    -    return &ReadableStreamCancel(cx, stream, reason)->as();
    +    RootedObject cancelPromise(cx);
    +    {
    +        JSAutoCompartment ac(cx, stream);
    +        RootedValue wrappedReason(cx, reason);
    +        if (!JS_WrapValue(cx, &wrappedReason))
    +            return nullptr;
    +
    +        cancelPromise = ReadableStreamCancel(cx, stream, wrappedReason);
    +        if (!cancelPromise)
    +            return nullptr;
    +    }
    +
    +    if (!JS_WrapObject(cx, &cancelPromise))
    +        return nullptr;
    +    return cancelPromise;
     }
     
     // Streams spec, 3.7.4. ReadableStreamReaderGenericInitialize ( reader, stream )
    @@ -2110,10 +2268,19 @@ ReadableStreamReaderGenericInitialize(JSContext* cx, HandleNativeObject reader,
                                           Handle stream)
     {
         // Step 1: Set reader.[[ownerReadableStream]] to stream.
    -    reader->setFixedSlot(ReaderSlot_Stream, ObjectValue(*stream));
    +    RootedValue streamVal(cx, ObjectValue(*stream));
    +    if (!JS_WrapValue(cx, &streamVal))
    +        return false;
    +    reader->setFixedSlot(ReaderSlot_Stream, streamVal);
     
         // Step 2: Set stream.[[reader]] to reader.
    -    stream->setFixedSlot(StreamSlot_Reader, ObjectValue(*reader));
    +    RootedValue readerVal(cx, ObjectValue(*reader));
    +    {
    +        JSAutoCompartment ac(cx, stream);
    +        if (!JS_WrapValue(cx, &readerVal))
    +            return false;
    +        stream->setFixedSlot(StreamSlot_Reader, readerVal);
    +    }
     
         // Step 3: If stream.[[state]] is "readable",
         RootedObject promise(cx);
    @@ -2134,6 +2301,8 @@ ReadableStreamReaderGenericInitialize(JSContext* cx, HandleNativeObject reader,
             // Step ii: Set reader.[[closedPromise]] to a new promise rejected with
             //          stream.[[storedError]].
             RootedValue storedError(cx, stream->getFixedSlot(StreamSlot_StoredError));
    +        if (!JS_WrapValue(cx, &storedError))
    +            return false;
             promise = PromiseObject::unforgeableReject(cx, storedError);
         }
     
    @@ -2152,7 +2321,7 @@ ReadableStreamReaderGenericRelease(JSContext* cx, HandleNativeObject reader)
         Rooted stream(cx, StreamFromReader(reader));
     
         // Step 2: Assert: reader.[[ownerReadableStream]].[[reader]] is reader.
    -    MOZ_ASSERT(&stream->getFixedSlot(StreamSlot_Reader).toObject() == reader);
    +    MOZ_ASSERT(ReaderFromStream(stream) == reader);
     
         // Create an exception to reject promises with below. We don't have a
         // clean way to do this, unfortunately.
    @@ -2210,6 +2379,8 @@ ReadableStreamBYOBReader::read(JSContext* cx, Handle
         //         stream.[[storedError]].
         if (stream->errored()) {
             RootedValue storedError(cx, stream->getFixedSlot(StreamSlot_StoredError));
    +        if (!JS_WrapValue(cx, &storedError))
    +            return nullptr;
             return PromiseObject::unforgeableReject(cx, storedError);
         }
     
    @@ -2401,40 +2572,12 @@ CreateReadableStreamDefaultController(JSContext* cx, Handle str
     bool
     ReadableStreamDefaultController::constructor(JSContext* cx, unsigned argc, Value* vp)
     {
    -    CallArgs args = CallArgsFromVp(argc, vp);
    -
    -    if (!ThrowIfNotConstructing(cx, args, "ReadableStreamDefaultController"))
    -        return false;
    -
    -    // Step 1: If ! IsReadableStream(stream) is false, throw a TypeError exception.
    -    HandleValue streamVal = args.get(0);
    -    if (!Is(streamVal)) {
    -        ReportArgTypeError(cx, "ReadableStreamDefaultController", "ReadableStream",
    -                           args.get(0));
    -        return false;
    -    }
    -
    -    Rooted stream(cx, &streamVal.toObject().as());
    -
    -    // Step 2: If stream.[[readableStreamController]] is not undefined, throw a
    -    //         TypeError exception.
    -    if (HasController(stream)) {
    -        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
    -                                  JSMSG_READABLESTREAM_CONTROLLER_SET);
    -        return false;
    -    }
    -
    -    // Steps 3-11.
    -    RootedObject controller(cx, CreateReadableStreamDefaultController(cx, stream, args.get(1),
    -                                                                      args.get(2), args.get(3)));
    -    if (!controller)
    -        return false;
    -
    -    args.rval().setObject(*controller);
    -    return true;
    +    JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_NO_CONSTRUCTOR,
    +                              "ReadableStreamDefaultController");
    +    return false;
     }
     
    -static MOZ_MUST_USE double
    +[[nodiscard]] static double
     ReadableStreamControllerGetDesiredSizeUnchecked(NativeObject* controller);
     
     // Streams spec, 3.8.4.1. get desiredSize
    @@ -2444,7 +2587,8 @@ static MOZ_MUST_USE bool
     ReadableStreamController_desiredSize_impl(JSContext* cx, const CallArgs& args)
     {
         RootedNativeObject controller(cx);
    -    controller = &args.thisv().toObject().as();
    +    controller = UnwrapMaybeWrappedReadableStreamController(args.thisv());
    +    MOZ_ASSERT(controller);
     
         // Streams spec, 3.9.8. steps 1-4.
         // 3.9.8. Step 1: Let stream be controller.[[controlledReadableStream]].
    @@ -2474,8 +2618,12 @@ ReadableStreamDefaultController_desiredSize(JSContext* cx, unsigned argc, Value*
         // Step 1: If ! IsReadableStreamDefaultController(this) is false, throw a
         //         TypeError exception.
         CallArgs args = CallArgsFromVp(argc, vp);
    -    return CallNonGenericMethod,
    -                                ReadableStreamController_desiredSize_impl>(cx, args);
    +    if (!IsMaybeWrapped(args.thisv())) {
    +        ReportValueError3(cx, JSMSG_INCOMPATIBLE_PROTO, JSDVG_SEARCH_STACK, args.thisv(),
    +                          nullptr, "ReadableStreamDefaultController", "get desiredSize");
    +        return false;
    +    }
    +    return ReadableStreamController_desiredSize_impl(cx, args);
     }
     
     static MOZ_MUST_USE bool
    @@ -2510,7 +2658,8 @@ static MOZ_MUST_USE bool
     ReadableStreamDefaultController_close_impl(JSContext* cx, const CallArgs& args)
     {
         Rooted controller(cx);
    -    controller = &args.thisv().toObject().as();
    +    controller = UnwrapMaybeWrappedArg(args.thisv());
    +    MOZ_ASSERT(controller);
     
         // Steps 2-3.
         if (!VerifyControllerStateForClosing(cx, controller))
    @@ -2530,8 +2679,12 @@ ReadableStreamDefaultController_close(JSContext* cx, unsigned argc, Value* vp)
         //         TypeError exception.
     
         CallArgs args = CallArgsFromVp(argc, vp);
    -    return CallNonGenericMethod,
    -                                ReadableStreamDefaultController_close_impl>(cx, args);
    +    if (!IsMaybeWrapped(args.thisv())) {
    +        ReportValueError3(cx, JSMSG_INCOMPATIBLE_PROTO, JSDVG_SEARCH_STACK, args.thisv(),
    +                          nullptr, "ReadableStreamDefaultController", "close");
    +        return false;
    +    }
    +    return ReadableStreamDefaultController_close_impl(cx, args);
     }
     
     static MOZ_MUST_USE bool
    @@ -2544,7 +2697,8 @@ static MOZ_MUST_USE bool
     ReadableStreamDefaultController_enqueue_impl(JSContext* cx, const CallArgs& args)
     {
         Rooted controller(cx);
    -    controller = &args.thisv().toObject().as();
    +    controller = UnwrapMaybeWrappedArg(args.thisv());
    +    MOZ_ASSERT(controller);
     
         // Step 2: If this.[[closeRequested]] is true, throw a TypeError exception.
         if (ControllerFlags(controller) & ControllerFlag_CloseRequested) {
    @@ -2576,8 +2730,12 @@ ReadableStreamDefaultController_enqueue(JSContext* cx, unsigned argc, Value* vp)
         //         TypeError exception.
     
         CallArgs args = CallArgsFromVp(argc, vp);
    -    return CallNonGenericMethod,
    -                                ReadableStreamDefaultController_enqueue_impl>(cx, args);
    +    if (!IsMaybeWrapped(args.thisv())) {
    +        ReportValueError3(cx, JSMSG_INCOMPATIBLE_PROTO, JSDVG_SEARCH_STACK, args.thisv(),
    +                          nullptr, "ReadableStreamDefaultController", "enqueue");
    +        return false;
    +    }
    +    return ReadableStreamDefaultController_enqueue_impl(cx, args);
     }
     
     // Streams spec, 3.8.4.4. error ( e )
    @@ -2585,7 +2743,8 @@ static MOZ_MUST_USE bool
     ReadableStreamDefaultController_error_impl(JSContext* cx, const CallArgs& args)
     {
         Rooted controller(cx);
    -    controller = &args.thisv().toObject().as();
    +    controller = UnwrapMaybeWrappedArg(args.thisv());
    +    MOZ_ASSERT(controller);
     
         // Step 2: Let stream be this.[[controlledReadableStream]].
         // Step 3: If stream.[[state]] is not "readable", throw a TypeError exception.
    @@ -2609,8 +2768,12 @@ ReadableStreamDefaultController_error(JSContext* cx, unsigned argc, Value* vp)
         //         TypeError exception.
     
         CallArgs args = CallArgsFromVp(argc, vp);
    -    return CallNonGenericMethod,
    -                                ReadableStreamDefaultController_error_impl>(cx, args);
    +    if (!IsMaybeWrapped(args.thisv())) {
    +        ReportValueError3(cx, JSMSG_INCOMPATIBLE_PROTO, JSDVG_SEARCH_STACK, args.thisv(),
    +                          nullptr, "ReadableStreamDefaultController", "error");
    +        return false;
    +    }
    +    return ReadableStreamDefaultController_error_impl(cx, args);
     }
     
     static const JSPropertySpec ReadableStreamDefaultController_properties[] = {
    @@ -2625,8 +2788,7 @@ static const JSFunctionSpec ReadableStreamDefaultController_methods[] = {
         JS_FS_END
     };
     
    -CLASS_SPEC(ReadableStreamDefaultController, 4, 7, ClassSpec::DontDefineConstructor, 0,
    -           JS_NULL_CLASS_OPS);
    +CLASS_SPEC(ReadableStreamDefaultController, 4, 7, 0, 0, JS_NULL_CLASS_OPS);
     
     /**
      * Unified implementation of ReadableStream controllers' [[CancelSteps]] internal
    @@ -3170,36 +3332,9 @@ ReadableByteStreamController::hasExternalSource() {
     bool
     ReadableByteStreamController::constructor(JSContext* cx, unsigned argc, Value* vp)
     {
    -    CallArgs args = CallArgsFromVp(argc, vp);
    -
    -    if (!ThrowIfNotConstructing(cx, args, "ReadableByteStreamController"))
    -        return false;
    -
    -    // Step 1: If ! IsReadableStream(stream) is false, throw a TypeError exception.
    -    HandleValue streamVal = args.get(0);
    -    if (!Is(streamVal)) {
    -        ReportArgTypeError(cx, "ReadableStreamDefaultController", "ReadableStream",
    -                           args.get(0));
    -        return false;
    -    }
    -
    -    Rooted stream(cx, &streamVal.toObject().as());
    -
    -    // Step 2: If stream.[[readableStreamController]] is not undefined, throw a
    -    //         TypeError exception.
    -    if (HasController(stream)) {
    -        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
    -                                  JSMSG_READABLESTREAM_CONTROLLER_SET);
    -        return false;
    -    }
    -
    -    RootedObject controller(cx, CreateReadableByteStreamController(cx, stream, args.get(1),
    -                                                                   args.get(2)));
    -    if (!controller)
    -        return false;
    -
    -    args.rval().setObject(*controller);
    -    return true;
    +    JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_NO_CONSTRUCTOR,
    +                              "ReadableByteStreamController");
    +    return false;
     }
     
     // Version of the ReadableByteStreamConstructor that's specialized for
    @@ -3505,8 +3640,8 @@ static const ClassOps ReadableByteStreamControllerClassOps = {
         nullptr,        /* trace   */
     };
     
    -CLASS_SPEC(ReadableByteStreamController, 3, 9, ClassSpec::DontDefineConstructor,
    -           JSCLASS_BACKGROUND_FINALIZE, &ReadableByteStreamControllerClassOps);
    +CLASS_SPEC(ReadableByteStreamController, 3, 9, 0, JSCLASS_BACKGROUND_FINALIZE,
    +           &ReadableByteStreamControllerClassOps);
     
     // Streams spec, 3.10.5.1. [[PullSteps]] ()
     // Unified with 3.8.5.1 above.
    @@ -3692,38 +3827,9 @@ CreateReadableStreamBYOBRequest(JSContext* cx, Handle(controllerVal)) {
    -        ReportArgTypeError(cx, "ReadableStreamBYOBRequest",
    -                           "ReadableByteStreamController", args.get(0));
    -        return false;
    -    }
    -
    -    Rooted controller(cx);
    -    controller = &controllerVal.toObject().as();
    -
    -    if (!viewVal.isObject() || !JS_IsArrayBufferViewObject(&viewVal.toObject())) {
    -        ReportArgTypeError(cx, "ReadableStreamBYOBRequest", "ArrayBuffer view",
    -                           args.get(1));
    -        return false;
    -    }
    -
    -    RootedArrayBufferObject view(cx, &viewVal.toObject().as());
    -
    -    RootedObject request(cx, CreateReadableStreamBYOBRequest(cx, controller, view));
    -    if (!request)
    -        return false;
    -
    -    args.rval().setObject(*request);
    -    return true;
    +    JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_NO_CONSTRUCTOR,
    +                              "ReadableStreamBYOBRequest");
    +    return false;
     }
     
     // Streams spec, 3.11.4.1 get view
    @@ -3858,8 +3964,7 @@ static const JSFunctionSpec ReadableStreamBYOBRequest_methods[] = {
         JS_FS_END
     };
     
    -CLASS_SPEC(ReadableStreamBYOBRequest, 3, 2, ClassSpec::DontDefineConstructor, 0,
    -           JS_NULL_CLASS_OPS);
    +CLASS_SPEC(ReadableStreamBYOBRequest, 3, 2, 0, 0, JS_NULL_CLASS_OPS);
     
     // Streams spec, 3.12.1. IsReadableStreamBYOBRequest ( x )
     // Implemented via is()
    
    From 8c4ece641e87fb2956d461ec4dd0ffab3eb2017c Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 8 May 2026 20:57:19 -0400
    Subject: [PATCH 40/72] Tighten stream helper interface realms
    
    ---
     js/src/builtin/Stream.cpp | 38 +++++++++++++++++++++++++-------------
     1 file changed, 25 insertions(+), 13 deletions(-)
    
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index 39b516bc7e..144d222dd6 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -5157,7 +5157,8 @@ DequeueValue(JSContext* cx, HandleNativeObject container, MutableHandleValue chu
     
         // Step 2: Assert: queue is not empty.
         RootedValue val(cx, container->getFixedSlot(QueueContainerSlot_Queue));
    -    RootedNativeObject queue(cx, &val.toObject().as());
    +    RootedNativeObject queue(cx);
    +    queue = UnwrapInternalSlotObject(&val.toObject());
         MOZ_ASSERT(queue->getDenseInitializedLength() > 0);
     
         // Step 3. Let pair be the first element of queue.
    @@ -5179,7 +5180,10 @@ DequeueValue(JSContext* cx, HandleNativeObject container, MutableHandleValue chu
         container->setFixedSlot(QueueContainerSlot_TotalSize, NumberValue(totalSize));
     
         // Step 7: Return pair.[[value]].
    -    chunk.set(pair->value());
    +    RootedValue chunkVal(cx, pair->value());
    +    if (!JS_WrapValue(cx, &chunkVal))
    +        return false;
    +    chunk.set(chunkVal);
         return true;
     }
     
    @@ -5208,19 +5212,27 @@ EnqueueValueWithSize(JSContext* cx, HandleNativeObject container, HandleValue va
         // Step 4: Append Record {[[value]]: value, [[size]]: size} as the last element
         //         of container.[[queue]].
         RootedValue val(cx, container->getFixedSlot(QueueContainerSlot_Queue));
    -    RootedNativeObject queue(cx, &val.toObject().as());
    +    RootedNativeObject queue(cx);
    +    queue = UnwrapInternalSlotObject(&val.toObject());
     
    -    QueueEntry* entry = QueueEntry::create(cx, value, size);
    -    if (!entry)
    -        return false;
    -    val = ObjectValue(*entry);
    -    if (!AppendToList(cx, queue, val))
    -        return false;
    +    {
    +        JSAutoCompartment ac(cx, queue);
    +        RootedValue wrappedValue(cx, value);
    +        if (!JS_WrapValue(cx, &wrappedValue))
    +            return false;
     
    -    // Step 5: Set container.[[queueTotalSize]] to
    -    //         container.[[queueTotalSize]] + size.
    -    double totalSize = container->getFixedSlot(QueueContainerSlot_TotalSize).toNumber();
    -    container->setFixedSlot(QueueContainerSlot_TotalSize, NumberValue(totalSize + size));
    +        QueueEntry* entry = QueueEntry::create(cx, wrappedValue, size);
    +        if (!entry)
    +            return false;
    +        val = ObjectValue(*entry);
    +        if (!AppendToList(cx, queue, val))
    +            return false;
    +
    +        // Step 5: Set container.[[queueTotalSize]] to
    +        //         container.[[queueTotalSize]] + size.
    +        double totalSize = container->getFixedSlot(QueueContainerSlot_TotalSize).toNumber();
    +        container->setFixedSlot(QueueContainerSlot_TotalSize, NumberValue(totalSize + size));
    +    }
     
         return true;
     }
    
    From 58e0e6a192bad15b69a5b60446680f4ba604b3b0 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 8 May 2026 21:43:14 -0400
    Subject: [PATCH 41/72] Add same-thread stream transfer support
    
    ---
     dom/base/StructuredCloneHolder.cpp | 163 +++++++++++++++++++++++++++++
     dom/base/StructuredCloneTags.h     |   4 +
     js/src/builtin/Stream.cpp          | 146 ++++++++++++++++++++++++++
     3 files changed, 313 insertions(+)
    
    diff --git a/dom/base/StructuredCloneHolder.cpp b/dom/base/StructuredCloneHolder.cpp
    index a7afd310cb..ed82cf9540 100644
    --- a/dom/base/StructuredCloneHolder.cpp
    +++ b/dom/base/StructuredCloneHolder.cpp
    @@ -138,6 +138,120 @@ StructuredCloneCallbacksError(JSContext* aCx,
       NS_WARNING("Failed to clone data.");
     }
     
    +struct SameThreadStreamTransferData
    +{
    +  SameThreadStreamTransferData(JSContext* aCx, JS::HandleObject aRecord)
    +    : mRecord(aCx, aRecord)
    +  {}
    +
    +  ~SameThreadStreamTransferData()
    +  {
    +    mRecord.reset();
    +  }
    +
    +  JS::PersistentRootedObject mRecord;
    +};
    +
    +bool
    +CallStreamTransferHelper(JSContext* aCx,
    +                         const char* aHelperName,
    +                         JS::HandleValue aArgument,
    +                         JS::MutableHandleValue aResult)
    +{
    +  JS::Rooted global(aCx, JS::CurrentGlobalOrNull(aCx));
    +  if (!global) {
    +    return false;
    +  }
    +
    +  // Resolve the stream extras lazily before looking up the internal helper.
    +  JS::Rooted ignored(aCx);
    +  if (!JS_GetProperty(aCx, global, "WritableStream", &ignored)) {
    +    return false;
    +  }
    +
    +  JS::Rooted helper(aCx);
    +  if (!JS_GetProperty(aCx, global, aHelperName, &helper)) {
    +    return false;
    +  }
    +
    +  if (!helper.isObject() || !JS::IsCallable(&helper.toObject())) {
    +    aResult.setUndefined();
    +    return true;
    +  }
    +
    +  JS::Rooted argument(aCx, aArgument);
    +  if (!JS_WrapValue(aCx, &argument)) {
    +    return false;
    +  }
    +
    +  return JS::Call(aCx, JS::UndefinedHandleValue, helper,
    +                  JS::HandleValueArray(argument), aResult);
    +}
    +
    +bool
    +TryWriteSameThreadStreamTransfer(JSContext* aCx,
    +                                 JS::Handle aObj,
    +                                 const char* aHelperName,
    +                                 uint32_t aTransferTag,
    +                                 uint32_t* aTag,
    +                                 JS::TransferableOwnership* aOwnership,
    +                                 void** aContent,
    +                                 uint64_t* aExtraData,
    +                                 bool* aHandled)
    +{
    +  *aHandled = false;
    +
    +  JS::Rooted argument(aCx, JS::ObjectValue(*aObj));
    +  JS::Rooted transferRecord(aCx);
    +  if (!CallStreamTransferHelper(aCx, aHelperName, argument, &transferRecord)) {
    +    return false;
    +  }
    +
    +  if (transferRecord.isUndefined()) {
    +    return true;
    +  }
    +
    +  if (!transferRecord.isObject()) {
    +    return false;
    +  }
    +
    +  JS::Rooted record(aCx, &transferRecord.toObject());
    +  SameThreadStreamTransferData* data =
    +    new SameThreadStreamTransferData(aCx, record);
    +
    +  *aTag = aTransferTag;
    +  *aOwnership = JS::SCTAG_TMO_CUSTOM;
    +  *aContent = data;
    +  *aExtraData = 0;
    +  *aHandled = true;
    +  return true;
    +}
    +
    +bool
    +ReadSameThreadStreamTransfer(JSContext* aCx,
    +                             void* aContent,
    +                             const char* aHelperName,
    +                             JS::MutableHandleObject aReturnObject)
    +{
    +  MOZ_ASSERT(aContent);
    +  SameThreadStreamTransferData* data =
    +    static_cast(aContent);
    +
    +  JS::Rooted record(aCx, JS::ObjectValue(*data->mRecord));
    +  JS::Rooted result(aCx);
    +  if (!CallStreamTransferHelper(aCx, aHelperName, record, &result)) {
    +    return false;
    +  }
    +
    +  if (!result.isObject()) {
    +    return false;
    +  }
    +
    +  aReturnObject.set(&result.toObject());
    +  delete data;
    +  return true;
    +}
    +
     } // anonymous namespace
     
     const JSStructuredCloneCallbacks StructuredCloneHolder::sCallbacks = {
    @@ -1375,6 +1489,20 @@ StructuredCloneHolder::CustomReadTransferHandler(JSContext* aCx,
         return true;
       }
     
    +  if (mStructuredCloneScope == StructuredCloneScope::SameProcessSameThread) {
    +    if (aTag == SCTAG_DOM_TRANSFERRED_WRITABLESTREAM) {
    +      return ReadSameThreadStreamTransfer(aCx, aContent,
    +                                          "__uxpReceiveWritableStreamTransfer",
    +                                          aReturnObject);
    +    }
    +
    +    if (aTag == SCTAG_DOM_TRANSFERRED_READABLESTREAM) {
    +      return ReadSameThreadStreamTransfer(aCx, aContent,
    +                                          "__uxpReceiveReadableStreamTransfer",
    +                                          aReturnObject);
    +    }
    +  }
    +
       return false;
     }
     
    @@ -1443,6 +1571,31 @@ StructuredCloneHolder::CustomWriteTransferHandler(JSContext* aCx,
         }
       }
     
    +  if (mStructuredCloneScope == StructuredCloneScope::SameProcessSameThread) {
    +    bool handled = false;
    +    if (!TryWriteSameThreadStreamTransfer(aCx, obj,
    +                                          "__uxpTransferWritableStream",
    +                                          SCTAG_DOM_TRANSFERRED_WRITABLESTREAM,
    +                                          aTag, aOwnership, aContent,
    +                                          aExtraData, &handled)) {
    +      return false;
    +    }
    +    if (handled) {
    +      return true;
    +    }
    +
    +    if (!TryWriteSameThreadStreamTransfer(aCx, obj,
    +                                          "__uxpTransferReadableStream",
    +                                          SCTAG_DOM_TRANSFERRED_READABLESTREAM,
    +                                          aTag, aOwnership, aContent,
    +                                          aExtraData, &handled)) {
    +      return false;
    +    }
    +    if (handled) {
    +      return true;
    +    }
    +  }
    +
       return false;
     }
     
    @@ -1480,6 +1633,16 @@ StructuredCloneHolder::CustomFreeTransferHandler(uint32_t aTag,
         delete data;
         return;
       }
    +
    +  if ((aTag == SCTAG_DOM_TRANSFERRED_WRITABLESTREAM ||
    +       aTag == SCTAG_DOM_TRANSFERRED_READABLESTREAM) &&
    +      mStructuredCloneScope == StructuredCloneScope::SameProcessSameThread) {
    +    MOZ_ASSERT(aContent);
    +    SameThreadStreamTransferData* data =
    +      static_cast(aContent);
    +    delete data;
    +    return;
    +  }
     }
     
     bool
    diff --git a/dom/base/StructuredCloneTags.h b/dom/base/StructuredCloneTags.h
    index 09b91f7afb..86ea88ba26 100644
    --- a/dom/base/StructuredCloneTags.h
    +++ b/dom/base/StructuredCloneTags.h
    @@ -68,6 +68,10 @@ enum StructuredCloneTags {
       // This tag is used by both main thread and workers.
       SCTAG_DOM_URLSEARCHPARAMS,
     
    +  // Same-thread transferable stream records. These are not supported by IDB.
    +  SCTAG_DOM_TRANSFERRED_READABLESTREAM,
    +  SCTAG_DOM_TRANSFERRED_WRITABLESTREAM,
    +
       // When adding a new tag for IDB, please don't add it to the end of the list!
       // Tags that are supported by IDB must not ever change. See the static assert
       // in IDBObjectStore.cpp, method CommonStructuredCloneReadCallback.
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index 144d222dd6..7234ed596a 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -6697,6 +6697,140 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
       Object.defineProperty(TransformStream.prototype, Symbol.toStringTag,
                             { value: "TransformStream", configurable: true });
     
    +  function isReadableStreamObject(value) {
    +    if (!isObject(value) || !global.ReadableStream)
    +      return false;
    +    try {
    +      return value instanceof global.ReadableStream;
    +    } catch (e) {
    +      return false;
    +    }
    +  }
    +
    +  function isUncloneableStreamChunk(value) {
    +    return isObject(value) &&
    +           (isWritableStream(value) ||
    +            isReadableStreamObject(value) ||
    +            transformState.has(value));
    +  }
    +
    +  function makeDataCloneError() {
    +    return makeDOMException("The object could not be cloned.", "DataCloneError");
    +  }
    +
    +  function abortTransferredWritable(record, reason) {
    +    try {
    +      return record.writer.abort(reason);
    +    } catch (e) {
    +      return Promise.reject(e);
    +    }
    +  }
    +
    +  function rejectTransferredWritableWrite(record, error) {
    +    var abortPromise = abortTransferredWritable(record, error);
    +    silenceRejection(abortPromise);
    +    return Promise.reject(error);
    +  }
    +
    +  function forwardTransferredWritableWrite(record, chunk) {
    +    if (isUncloneableStreamChunk(chunk))
    +      return rejectTransferredWritableWrite(record, makeDataCloneError());
    +
    +    var prior = record.tail || Promise.resolve(undefined);
    +    var firstWrite = !record.started;
    +    record.started = true;
    +
    +    var forwarding = prior.then(function() {
    +      var writePromise;
    +      try {
    +        writePromise = Promise.resolve(record.writer.write(chunk));
    +      } catch (e) {
    +        writePromise = Promise.reject(e);
    +      }
    +      record.inFlight = writePromise;
    +      silenceRejection(writePromise);
    +      return writePromise;
    +    });
    +
    +    record.tail = forwarding;
    +    silenceRejection(forwarding);
    +
    +    if (firstWrite)
    +      return undefined;
    +
    +    return prior.then(function() { return undefined; });
    +  }
    +
    +  function closeTransferredWritable(record) {
    +    var tail = record.tail || Promise.resolve(undefined);
    +    var closePromise = tail.then(function() {
    +      return record.writer.close();
    +    });
    +    record.tail = closePromise;
    +    silenceRejection(closePromise);
    +    return closePromise;
    +  }
    +
    +  function __uxpTransferWritableStream(stream) {
    +    if (!isWritableStream(stream))
    +      return undefined;
    +    if (stream.locked)
    +      return null;
    +    try {
    +      return {
    +        writer: stream.getWriter(),
    +        started: false,
    +        inFlight: undefined,
    +        tail: undefined
    +      };
    +    } catch (e) {
    +      return null;
    +    }
    +  }
    +
    +  function __uxpReceiveWritableStreamTransfer(record) {
    +    return new WritableStream({
    +      write: function(chunk) {
    +        return forwardTransferredWritableWrite(record, chunk);
    +      },
    +      close: function() {
    +        return closeTransferredWritable(record);
    +      },
    +      abort: function(reason) {
    +        return abortTransferredWritable(record, reason);
    +      }
    +    });
    +  }
    +
    +  function __uxpTransferReadableStream(stream) {
    +    if (!isReadableStreamObject(stream))
    +      return undefined;
    +    if (stream.locked)
    +      return null;
    +    try {
    +      return { reader: stream.getReader() };
    +    } catch (e) {
    +      return null;
    +    }
    +  }
    +
    +  function __uxpReceiveReadableStreamTransfer(record) {
    +    return new ReadableStream({
    +      pull: function(controller) {
    +        return record.reader.read().then(function(result) {
    +          if (result.done) {
    +            controller.close();
    +            return;
    +          }
    +          controller.enqueue(result.value);
    +        });
    +      },
    +      cancel: function(reason) {
    +        return record.reader.cancel(reason);
    +      }
    +    });
    +  }
    +
       function pipeTo(readable, destination, options) {
         options = options === undefined ? {} : requiredObject(options, "options");
         var signal = options.signal;
    @@ -6842,6 +6976,18 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
                             { value: pipeTo, configurable: true });
       Object.defineProperty(global, "__uxpStreamsPipeThrough",
                             { value: pipeThrough, configurable: true });
    +  Object.defineProperty(global, "__uxpTransferWritableStream",
    +                        { value: __uxpTransferWritableStream,
    +                          configurable: true });
    +  Object.defineProperty(global, "__uxpReceiveWritableStreamTransfer",
    +                        { value: __uxpReceiveWritableStreamTransfer,
    +                          configurable: true });
    +  Object.defineProperty(global, "__uxpTransferReadableStream",
    +                        { value: __uxpTransferReadableStream,
    +                          configurable: true });
    +  Object.defineProperty(global, "__uxpReceiveReadableStreamTransfer",
    +                        { value: __uxpReceiveReadableStreamTransfer,
    +                          configurable: true });
     
       if (global.ReadableStream && !global.ReadableStream.from) {
         Object.defineProperty(global.ReadableStream, "from", {
    
    From f9e1af95c2e91e76444f4f226846f4359fff38fd Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 8 May 2026 22:30:41 -0400
    Subject: [PATCH 42/72] Fix readable stream transfer queueing
    
    ---
     js/src/builtin/Stream.cpp | 121 ++++++++++++++++++++++++++++++++++----
     1 file changed, 110 insertions(+), 11 deletions(-)
    
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index 7234ed596a..31f2238085 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -5058,7 +5058,15 @@ js::ByteLengthQueuingStrategy::constructor(JSContext* cx, unsigned argc, Value*
     {
         CallArgs args = CallArgsFromVp(argc, vp);
     
    -    RootedObject strategy(cx, NewBuiltinClassInstance(cx));
    +    if (!ThrowIfNotConstructing(cx, args, "ByteLengthQueuingStrategy"))
    +        return false;
    +
    +    RootedObject proto(cx);
    +    RootedObject newTarget(cx, &args.newTarget().toObject());
    +    if (!GetPrototypeFromConstructor(cx, newTarget, &proto))
    +        return false;
    +
    +    RootedObject strategy(cx, NewObjectWithClassProto(cx, proto));
         if (!strategy)
             return false;
     
    @@ -5104,7 +5112,16 @@ js::CountQueuingStrategy::constructor(JSContext* cx, unsigned argc, Value* vp)
     {
         CallArgs args = CallArgsFromVp(argc, vp);
     
    -    Rooted strategy(cx, NewBuiltinClassInstance(cx));
    +    if (!ThrowIfNotConstructing(cx, args, "CountQueuingStrategy"))
    +        return false;
    +
    +    RootedObject proto(cx);
    +    RootedObject newTarget(cx, &args.newTarget().toObject());
    +    if (!GetPrototypeFromConstructor(cx, newTarget, &proto))
    +        return false;
    +
    +    Rooted strategy(cx);
    +    strategy = NewObjectWithClassProto(cx, proto);
         if (!strategy)
             return false;
     
    @@ -6808,25 +6825,107 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
         if (stream.locked)
           return null;
         try {
    -      return { reader: stream.getReader() };
    +      var record = {
    +        reader: stream.getReader(),
    +        pendingRead: undefined,
    +        pumping: undefined,
    +        closed: false,
    +        errored: false,
    +        canceled: false
    +      };
    +      ensureReadableTransferRead(record);
    +      return record;
         } catch (e) {
           return null;
         }
       }
     
    +  function ensureReadableTransferRead(record) {
    +    if (!record.pendingRead && !record.closed && !record.errored &&
    +        !record.canceled) {
    +      try {
    +        record.pendingRead = Promise.resolve(record.reader.read());
    +      } catch (e) {
    +        record.pendingRead = Promise.reject(e);
    +      }
    +      silenceRejection(record.pendingRead);
    +    }
    +    return record.pendingRead;
    +  }
    +
    +  function errorReadableTransfer(record, controller, error) {
    +    if (record.canceled || record.closed || record.errored)
    +      return;
    +    record.errored = true;
    +    try { controller.error(error); } catch (e) {}
    +  }
    +
    +  function pumpReadableTransfer(record, controller) {
    +    if (record.pumping || record.closed || record.errored || record.canceled)
    +      return;
    +
    +    var pendingRead = ensureReadableTransferRead(record);
    +    if (!pendingRead)
    +      return;
    +
    +    record.pumping = pendingRead.then(function(result) {
    +      record.pendingRead = undefined;
    +      record.pumping = undefined;
    +
    +      if (record.canceled || record.errored || record.closed)
    +        return;
    +
    +      if (result.done) {
    +        record.closed = true;
    +        try { controller.close(); } catch (e) {}
    +        return;
    +      }
    +
    +      if (isUncloneableStreamChunk(result.value)) {
    +        var cloneError = makeDataCloneError();
    +        silenceRejection(record.reader.cancel(cloneError));
    +        errorReadableTransfer(record, controller, cloneError);
    +        return;
    +      }
    +
    +      try {
    +        controller.enqueue(result.value);
    +      } catch (e) {
    +        silenceRejection(record.reader.cancel(e));
    +        errorReadableTransfer(record, controller, e);
    +        return;
    +      }
    +
    +      if (controller.desiredSize > 0)
    +        pumpReadableTransfer(record, controller);
    +    }, function(error) {
    +      record.pendingRead = undefined;
    +      record.pumping = undefined;
    +      errorReadableTransfer(record, controller, error);
    +    });
    +    silenceRejection(record.pumping);
    +  }
    +
    +  function cancelReadableTransfer(record, reason) {
    +    record.canceled = true;
    +    Promise.resolve().then(function() {
    +      try {
    +        silenceRejection(record.reader.cancel(reason));
    +      } catch (e) {}
    +    });
    +    return undefined;
    +  }
    +
       function __uxpReceiveReadableStreamTransfer(record) {
         return new ReadableStream({
    +      start: function(controller) {
    +        pumpReadableTransfer(record, controller);
    +      },
           pull: function(controller) {
    -        return record.reader.read().then(function(result) {
    -          if (result.done) {
    -            controller.close();
    -            return;
    -          }
    -          controller.enqueue(result.value);
    -        });
    +        pumpReadableTransfer(record, controller);
           },
           cancel: function(reason) {
    -        return record.reader.cancel(reason);
    +        return cancelReadableTransfer(record, reason);
           }
         });
       }
    
    From 7d8bf841edd675268386ae82bf4fd94769a9ac94 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 8 May 2026 22:58:09 -0400
    Subject: [PATCH 43/72] Support readable stream transfer to workers
    
    ---
     dom/base/StructuredCloneHolder.cpp | 118 +++++++++++++++
     js/src/builtin/Stream.cpp          | 236 +++++++++++++++++++++++++++++
     2 files changed, 354 insertions(+)
    
    diff --git a/dom/base/StructuredCloneHolder.cpp b/dom/base/StructuredCloneHolder.cpp
    index ed82cf9540..b569c8a5ad 100644
    --- a/dom/base/StructuredCloneHolder.cpp
    +++ b/dom/base/StructuredCloneHolder.cpp
    @@ -152,6 +152,11 @@ struct SameThreadStreamTransferData
       JS::PersistentRootedObject mRecord;
     };
     
    +struct MessagePortStreamTransferData
    +{
    +  MessagePortIdentifier mIdentifier;
    +};
    +
     bool
     CallStreamTransferHelper(JSContext* aCx,
                              const char* aHelperName,
    @@ -227,6 +232,50 @@ TryWriteSameThreadStreamTransfer(JSContext* aCx,
       return true;
     }
     
    +bool
    +TryWriteReadableStreamPortTransfer(JSContext* aCx,
    +                                   JS::Handle aObj,
    +                                   uint32_t* aTag,
    +                                   JS::TransferableOwnership* aOwnership,
    +                                   void** aContent,
    +                                   uint64_t* aExtraData,
    +                                   bool* aHandled)
    +{
    +  *aHandled = false;
    +
    +  JS::Rooted argument(aCx, JS::ObjectValue(*aObj));
    +  JS::Rooted transferPortValue(aCx);
    +  if (!CallStreamTransferHelper(aCx, "__uxpTransferReadableStreamPort",
    +                                argument, &transferPortValue)) {
    +    return false;
    +  }
    +
    +  if (transferPortValue.isUndefined()) {
    +    return true;
    +  }
    +
    +  if (!transferPortValue.isObject()) {
    +    return false;
    +  }
    +
    +  JS::Rooted transferPortObj(aCx, &transferPortValue.toObject());
    +  MessagePort* port = nullptr;
    +  nsresult rv = UNWRAP_OBJECT(MessagePort, &transferPortObj, port);
    +  if (NS_FAILED(rv) || !port) {
    +    return false;
    +  }
    +
    +  MessagePortStreamTransferData* data = new MessagePortStreamTransferData();
    +  port->CloneAndDisentangle(data->mIdentifier);
    +
    +  *aTag = SCTAG_DOM_TRANSFERRED_READABLESTREAM;
    +  *aOwnership = JS::SCTAG_TMO_CUSTOM;
    +  *aContent = data;
    +  *aExtraData = 0;
    +  *aHandled = true;
    +  return true;
    +}
    +
     bool
     ReadSameThreadStreamTransfer(JSContext* aCx,
                                  void* aContent,
    @@ -252,6 +301,48 @@ ReadSameThreadStreamTransfer(JSContext* aCx,
       return true;
     }
     
    +bool
    +ReadReadableStreamPortTransfer(JSContext* aCx,
    +                               nsISupports* aParent,
    +                               void* aContent,
    +                               JS::MutableHandleObject aReturnObject)
    +{
    +  MOZ_ASSERT(aContent);
    +  MessagePortStreamTransferData* data =
    +    static_cast(aContent);
    +
    +  nsCOMPtr global = do_QueryInterface(aParent);
    +
    +  ErrorResult rv;
    +  RefPtr port =
    +    MessagePort::Create(global, data->mIdentifier, rv);
    +  if (NS_WARN_IF(rv.Failed())) {
    +    rv.SuppressException();
    +    return false;
    +  }
    +
    +  JS::Rooted portValue(aCx);
    +  if (!GetOrCreateDOMReflector(aCx, port, &portValue)) {
    +    JS_ClearPendingException(aCx);
    +    return false;
    +  }
    +
    +  JS::Rooted result(aCx);
    +  if (!CallStreamTransferHelper(aCx,
    +                                "__uxpReceiveReadableStreamTransferFromPort",
    +                                portValue, &result)) {
    +    return false;
    +  }
    +
    +  if (!result.isObject()) {
    +    return false;
    +  }
    +
    +  aReturnObject.set(&result.toObject());
    +  delete data;
    +  return true;
    +}
    +
     } // anonymous namespace
     
     const JSStructuredCloneCallbacks StructuredCloneHolder::sCallbacks = {
    @@ -1503,6 +1594,12 @@ StructuredCloneHolder::CustomReadTransferHandler(JSContext* aCx,
         }
       }
     
    +  if (mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread &&
    +      aTag == SCTAG_DOM_TRANSFERRED_READABLESTREAM) {
    +    return ReadReadableStreamPortTransfer(aCx, mParent, aContent,
    +                                          aReturnObject);
    +  }
    +
       return false;
     }
     
    @@ -1596,6 +1693,17 @@ StructuredCloneHolder::CustomWriteTransferHandler(JSContext* aCx,
         }
       }
     
    +  if (mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread) {
    +    bool handled = false;
    +    if (!TryWriteReadableStreamPortTransfer(aCx, obj, aTag, aOwnership,
    +                                            aContent, aExtraData, &handled)) {
    +      return false;
    +    }
    +    if (handled) {
    +      return true;
    +    }
    +  }
    +
       return false;
     }
     
    @@ -1643,6 +1751,16 @@ StructuredCloneHolder::CustomFreeTransferHandler(uint32_t aTag,
         delete data;
         return;
       }
    +
    +  if (aTag == SCTAG_DOM_TRANSFERRED_READABLESTREAM &&
    +      mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread) {
    +    MOZ_ASSERT(aContent);
    +    MessagePortStreamTransferData* data =
    +      static_cast(aContent);
    +    MessagePort::ForceClose(data->mIdentifier);
    +    delete data;
    +    return;
    +  }
     }
     
     bool
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index 31f2238085..ba5111c57e 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -6916,6 +6916,236 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
         return undefined;
       }
     
    +  function closeReadableTransferPort(port) {
    +    try { port.close(); } catch (e) {}
    +  }
    +
    +  function startReadableTransferPort(port) {
    +    try {
    +      if (port.start)
    +        port.start();
    +    } catch (e) {}
    +  }
    +
    +  function tryPostReadableTransferPort(port, message) {
    +    try {
    +      port.postMessage(message);
    +      return true;
    +    } catch (e) {
    +      return false;
    +    }
    +  }
    +
    +  function postReadableTransferPortError(record, error) {
    +    var posted = tryPostReadableTransferPort(record.port,
    +                                             { type: "error", value: error });
    +    if (!posted) {
    +      tryPostReadableTransferPort(record.port, {
    +        type: "error",
    +        name: error && error.name,
    +        message: error && error.message
    +      });
    +    }
    +    record.closed = true;
    +    closeReadableTransferPort(record.port);
    +  }
    +
    +  function requestReadableTransferPortChunk(state) {
    +    if (state.closed || state.errored || state.canceled)
    +      return;
    +    if (!tryPostReadableTransferPort(state.port, { type: "pull" })) {
    +      state.errored = true;
    +      if (state.controller)
    +        try { state.controller.error(makeDataCloneError()); } catch (e) {}
    +      closeReadableTransferPort(state.port);
    +    }
    +  }
    +
    +  function errorReadableTransferPortState(state, error) {
    +    if (state.errored)
    +      return;
    +    state.errored = true;
    +    try {
    +      if (state.controller)
    +        state.controller.error(error);
    +    } catch (e) {}
    +    closeReadableTransferPort(state.port);
    +  }
    +
    +  function pumpReadableTransferPort(record) {
    +    if (record.reading || record.closed || record.canceled ||
    +        record.credits <= 0)
    +      return;
    +
    +    --record.credits;
    +    record.reading = true;
    +
    +    var readPromise;
    +    try {
    +      readPromise = Promise.resolve(record.reader.read());
    +    } catch (e) {
    +      readPromise = Promise.reject(e);
    +    }
    +    silenceRejection(readPromise);
    +
    +    readPromise.then(function(result) {
    +      record.reading = false;
    +
    +      if (record.canceled || record.closed)
    +        return;
    +
    +      if (result.done) {
    +        record.closed = true;
    +        tryPostReadableTransferPort(record.port, { type: "close" });
    +        closeReadableTransferPort(record.port);
    +        return;
    +      }
    +
    +      if (isUncloneableStreamChunk(result.value)) {
    +        var cloneError = makeDataCloneError();
    +        silenceRejection(record.reader.cancel(cloneError));
    +        postReadableTransferPortError(record, cloneError);
    +        return;
    +      }
    +
    +      if (!tryPostReadableTransferPort(record.port,
    +                                       { type: "chunk", value: result.value })) {
    +        record.closed = true;
    +        closeReadableTransferPort(record.port);
    +        return;
    +      }
    +
    +      pumpReadableTransferPort(record);
    +    }, function(error) {
    +      record.reading = false;
    +      if (record.canceled || record.closed)
    +        return;
    +      postReadableTransferPortError(record, error);
    +    });
    +  }
    +
    +  function __uxpTransferReadableStreamPort(stream) {
    +    if (!isReadableStreamObject(stream))
    +      return undefined;
    +    if (stream.locked || typeof global.MessageChannel !== "function")
    +      return null;
    +
    +    var channel;
    +    try {
    +      channel = new global.MessageChannel();
    +      var record = {
    +        reader: stream.getReader(),
    +        port: channel.port1,
    +        reading: false,
    +        credits: 1,
    +        closed: false,
    +        canceled: false
    +      };
    +
    +      record.port.onmessage = function(event) {
    +        var message = event.data;
    +        if (!message || record.closed || record.canceled)
    +          return;
    +
    +        if (message.type === "pull") {
    +          ++record.credits;
    +          pumpReadableTransferPort(record);
    +          return;
    +        }
    +
    +        if (message.type === "cancel") {
    +          record.canceled = true;
    +          Promise.resolve().then(function() {
    +            try {
    +              silenceRejection(record.reader.cancel(message.reason));
    +            } catch (e) {}
    +          });
    +          closeReadableTransferPort(record.port);
    +        }
    +      };
    +
    +      startReadableTransferPort(record.port);
    +      pumpReadableTransferPort(record);
    +      return channel.port2;
    +    } catch (e) {
    +      if (channel) {
    +        closeReadableTransferPort(channel.port1);
    +        closeReadableTransferPort(channel.port2);
    +      }
    +      return null;
    +    }
    +  }
    +
    +  function errorFromReadableTransferPortMessage(message) {
    +    if ("value" in message)
    +      return message.value;
    +    return makeDOMException(message.message || "ReadableStream transfer failed",
    +                            message.name || "DataCloneError");
    +  }
    +
    +  function __uxpReceiveReadableStreamTransferFromPort(port) {
    +    var state = {
    +      port: port,
    +      controller: undefined,
    +      closed: false,
    +      errored: false,
    +      canceled: false
    +    };
    +
    +    port.onmessage = function(event) {
    +      var message = event.data;
    +      if (!message || state.closed || state.errored || state.canceled)
    +        return;
    +
    +      if (message.type === "chunk") {
    +        if (isUncloneableStreamChunk(message.value)) {
    +          errorReadableTransferPortState(state, makeDataCloneError());
    +          return;
    +        }
    +
    +        try {
    +          state.controller.enqueue(message.value);
    +        } catch (e) {
    +          errorReadableTransferPortState(state, e);
    +          return;
    +        }
    +
    +        if (state.controller.desiredSize > 0)
    +          requestReadableTransferPortChunk(state);
    +        return;
    +      }
    +
    +      if (message.type === "close") {
    +        state.closed = true;
    +        try { state.controller.close(); } catch (e) {}
    +        closeReadableTransferPort(port);
    +        return;
    +      }
    +
    +      if (message.type === "error") {
    +        errorReadableTransferPortState(
    +          state, errorFromReadableTransferPortMessage(message));
    +      }
    +    };
    +
    +    return new ReadableStream({
    +      start: function(controller) {
    +        state.controller = controller;
    +        startReadableTransferPort(port);
    +        requestReadableTransferPortChunk(state);
    +      },
    +      pull: function() {
    +        requestReadableTransferPortChunk(state);
    +      },
    +      cancel: function(reason) {
    +        state.canceled = true;
    +        tryPostReadableTransferPort(port, { type: "cancel", reason: reason });
    +        closeReadableTransferPort(port);
    +        return undefined;
    +      }
    +    });
    +  }
    +
       function __uxpReceiveReadableStreamTransfer(record) {
         return new ReadableStream({
           start: function(controller) {
    @@ -7087,6 +7317,12 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
       Object.defineProperty(global, "__uxpReceiveReadableStreamTransfer",
                             { value: __uxpReceiveReadableStreamTransfer,
                               configurable: true });
    +  Object.defineProperty(global, "__uxpTransferReadableStreamPort",
    +                        { value: __uxpTransferReadableStreamPort,
    +                          configurable: true });
    +  Object.defineProperty(global, "__uxpReceiveReadableStreamTransferFromPort",
    +                        { value: __uxpReceiveReadableStreamTransferFromPort,
    +                          configurable: true });
     
       if (global.ReadableStream && !global.ReadableStream.from) {
         Object.defineProperty(global.ReadableStream, "from", {
    
    From a6b18bcd14ca1e283642dac82638082f230af971 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 8 May 2026 23:16:23 -0400
    Subject: [PATCH 44/72] Fix stream transfer over message ports
    
    ---
     dom/base/StructuredCloneHolder.cpp |  72 ++++++----
     dom/base/StructuredCloneTags.h     |   1 +
     js/src/builtin/Stream.cpp          | 214 ++++++++++++++++++++++++++++-
     3 files changed, 255 insertions(+), 32 deletions(-)
    
    diff --git a/dom/base/StructuredCloneHolder.cpp b/dom/base/StructuredCloneHolder.cpp
    index b569c8a5ad..7b7dbdf67d 100644
    --- a/dom/base/StructuredCloneHolder.cpp
    +++ b/dom/base/StructuredCloneHolder.cpp
    @@ -152,11 +152,6 @@ struct SameThreadStreamTransferData
       JS::PersistentRootedObject mRecord;
     };
     
    -struct MessagePortStreamTransferData
    -{
    -  MessagePortIdentifier mIdentifier;
    -};
    -
     bool
     CallStreamTransferHelper(JSContext* aCx,
                              const char* aHelperName,
    @@ -235,6 +230,7 @@ TryWriteSameThreadStreamTransfer(JSContext* aCx,
     bool
     TryWriteReadableStreamPortTransfer(JSContext* aCx,
                                        JS::Handle aObj,
    +                                   nsTArray& aPortIdentifiers,
                                        uint32_t* aTag,
                                        JS::TransferableOwnership* aOwnership,
                                        void** aContent,
    @@ -265,13 +261,13 @@ TryWriteReadableStreamPortTransfer(JSContext* aCx,
         return false;
       }
     
    -  MessagePortStreamTransferData* data = new MessagePortStreamTransferData();
    -  port->CloneAndDisentangle(data->mIdentifier);
    +  *aExtraData = aPortIdentifiers.Length();
    +  MessagePortIdentifier* identifier = aPortIdentifiers.AppendElement();
    +  port->CloneAndDisentangle(*identifier);
     
       *aTag = SCTAG_DOM_TRANSFERRED_READABLESTREAM;
       *aOwnership = JS::SCTAG_TMO_CUSTOM;
    -  *aContent = data;
    -  *aExtraData = 0;
    +  *aContent = nullptr;
       *aHandled = true;
       return true;
     }
    @@ -304,18 +300,19 @@ ReadSameThreadStreamTransfer(JSContext* aCx,
     bool
     ReadReadableStreamPortTransfer(JSContext* aCx,
                                    nsISupports* aParent,
    -                               void* aContent,
    +                               nsTArray& aPortIdentifiers,
    +                               uint64_t aExtraData,
                                    JS::MutableHandleObject aReturnObject)
     {
    -  MOZ_ASSERT(aContent);
    -  MessagePortStreamTransferData* data =
    -    static_cast(aContent);
    +  if (aExtraData >= aPortIdentifiers.Length()) {
    +    return false;
    +  }
     
       nsCOMPtr global = do_QueryInterface(aParent);
     
       ErrorResult rv;
       RefPtr port =
    -    MessagePort::Create(global, data->mIdentifier, rv);
    +    MessagePort::Create(global, aPortIdentifiers[aExtraData], rv);
       if (NS_WARN_IF(rv.Failed())) {
         rv.SuppressException();
         return false;
    @@ -339,7 +336,6 @@ ReadReadableStreamPortTransfer(JSContext* aCx,
       }
     
       aReturnObject.set(&result.toObject());
    -  delete data;
       return true;
     }
     
    @@ -1592,11 +1588,20 @@ StructuredCloneHolder::CustomReadTransferHandler(JSContext* aCx,
                                               "__uxpReceiveReadableStreamTransfer",
                                               aReturnObject);
         }
    +
    +    if (aTag == SCTAG_DOM_TRANSFERRED_TRANSFORMSTREAM) {
    +      return ReadSameThreadStreamTransfer(aCx, aContent,
    +                                          "__uxpReceiveTransformStreamTransfer",
    +                                          aReturnObject);
    +    }
       }
     
    -  if (mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread &&
    +  if ((mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread ||
    +       mStructuredCloneScope == StructuredCloneScope::DifferentProcess) &&
           aTag == SCTAG_DOM_TRANSFERRED_READABLESTREAM) {
    -    return ReadReadableStreamPortTransfer(aCx, mParent, aContent,
    +    MOZ_ASSERT(!aContent);
    +    return ReadReadableStreamPortTransfer(aCx, mParent, mPortIdentifiers,
    +                                          aExtraData,
                                               aReturnObject);
       }
     
    @@ -1691,12 +1696,25 @@ StructuredCloneHolder::CustomWriteTransferHandler(JSContext* aCx,
         if (handled) {
           return true;
         }
    +
    +    if (!TryWriteSameThreadStreamTransfer(aCx, obj,
    +                                          "__uxpTransferTransformStream",
    +                                          SCTAG_DOM_TRANSFERRED_TRANSFORMSTREAM,
    +                                          aTag, aOwnership, aContent,
    +                                          aExtraData, &handled)) {
    +      return false;
    +    }
    +    if (handled) {
    +      return true;
    +    }
       }
     
    -  if (mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread) {
    +  if (mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread ||
    +      mStructuredCloneScope == StructuredCloneScope::DifferentProcess) {
         bool handled = false;
    -    if (!TryWriteReadableStreamPortTransfer(aCx, obj, aTag, aOwnership,
    -                                            aContent, aExtraData, &handled)) {
    +    if (!TryWriteReadableStreamPortTransfer(aCx, obj, mPortIdentifiers,
    +                                            aTag, aOwnership, aContent,
    +                                            aExtraData, &handled)) {
           return false;
         }
         if (handled) {
    @@ -1743,7 +1761,8 @@ StructuredCloneHolder::CustomFreeTransferHandler(uint32_t aTag,
       }
     
       if ((aTag == SCTAG_DOM_TRANSFERRED_WRITABLESTREAM ||
    -       aTag == SCTAG_DOM_TRANSFERRED_READABLESTREAM) &&
    +       aTag == SCTAG_DOM_TRANSFERRED_READABLESTREAM ||
    +       aTag == SCTAG_DOM_TRANSFERRED_TRANSFORMSTREAM) &&
           mStructuredCloneScope == StructuredCloneScope::SameProcessSameThread) {
         MOZ_ASSERT(aContent);
         SameThreadStreamTransferData* data =
    @@ -1753,12 +1772,11 @@ StructuredCloneHolder::CustomFreeTransferHandler(uint32_t aTag,
       }
     
       if (aTag == SCTAG_DOM_TRANSFERRED_READABLESTREAM &&
    -      mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread) {
    -    MOZ_ASSERT(aContent);
    -    MessagePortStreamTransferData* data =
    -      static_cast(aContent);
    -    MessagePort::ForceClose(data->mIdentifier);
    -    delete data;
    +      (mStructuredCloneScope == StructuredCloneScope::SameProcessDifferentThread ||
    +       mStructuredCloneScope == StructuredCloneScope::DifferentProcess)) {
    +    MOZ_ASSERT(!aContent);
    +    MOZ_ASSERT(aExtraData < mPortIdentifiers.Length());
    +    MessagePort::ForceClose(mPortIdentifiers[aExtraData]);
         return;
       }
     }
    diff --git a/dom/base/StructuredCloneTags.h b/dom/base/StructuredCloneTags.h
    index 86ea88ba26..15518104f9 100644
    --- a/dom/base/StructuredCloneTags.h
    +++ b/dom/base/StructuredCloneTags.h
    @@ -71,6 +71,7 @@ enum StructuredCloneTags {
       // Same-thread transferable stream records. These are not supported by IDB.
       SCTAG_DOM_TRANSFERRED_READABLESTREAM,
       SCTAG_DOM_TRANSFERRED_WRITABLESTREAM,
    +  SCTAG_DOM_TRANSFERRED_TRANSFORMSTREAM,
     
       // When adding a new tag for IDB, please don't add it to the end of the list!
       // Tags that are supported by IDB must not ever change. See the static assert
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index ba5111c57e..6103cb79c1 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -6735,6 +6735,163 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
         return makeDOMException("The object could not be cloned.", "DataCloneError");
       }
     
    +  function cloneTransferReasonError(value) {
    +    var constructors = [
    +      global.EvalError,
    +      global.RangeError,
    +      global.ReferenceError,
    +      global.SyntaxError,
    +      global.TypeError,
    +      global.URIError,
    +      global.Error
    +    ];
    +
    +    for (var i = 0; i < constructors.length; ++i) {
    +      var C = constructors[i];
    +      if (typeof C !== "function")
    +        continue;
    +      try {
    +        if (!(value instanceof C))
    +          continue;
    +      } catch (e) {
    +        continue;
    +      }
    +
    +      var message = "";
    +      var descriptor;
    +      try {
    +        descriptor = Object.getOwnPropertyDescriptor(value, "message");
    +      } catch (e) {
    +        descriptor = undefined;
    +      }
    +      if (descriptor && hasOwn.call(descriptor, "value"))
    +        message = String(descriptor.value);
    +      return new C(message);
    +    }
    +
    +    return undefined;
    +  }
    +
    +  function cloneTransferReasonValue(value, memory) {
    +    if (typeof value === "function" || typeof value === "symbol")
    +      throw makeDataCloneError();
    +    if (!isObject(value))
    +      return value;
    +    if (isUncloneableStreamChunk(value))
    +      throw makeDataCloneError();
    +
    +    memory = memory || new WeakMap();
    +    if (memory.has(value))
    +      return memory.get(value);
    +
    +    if (typeof global.DOMException === "function") {
    +      try {
    +        if (value instanceof global.DOMException) {
    +          return new global.DOMException(String(value.message),
    +                                         String(value.name));
    +        }
    +      } catch (e) {}
    +    }
    +
    +    var errorClone = cloneTransferReasonError(value);
    +    if (errorClone !== undefined)
    +      return errorClone;
    +
    +    if (typeof global.ArrayBuffer === "function") {
    +      try {
    +        if (value instanceof global.ArrayBuffer) {
    +          var bufferClone = value.slice(0);
    +          memory.set(value, bufferClone);
    +          return bufferClone;
    +        }
    +      } catch (e) {}
    +    }
    +
    +    if (global.ArrayBuffer && global.ArrayBuffer.isView &&
    +        global.ArrayBuffer.isView(value)) {
    +      var clonedBuffer = cloneTransferReasonValue(value.buffer, memory);
    +      var viewClone;
    +      if (objectToString.call(value) === "[object DataView]") {
    +        viewClone = new global.DataView(clonedBuffer, value.byteOffset,
    +                                        value.byteLength);
    +      } else {
    +        viewClone = new value.constructor(clonedBuffer, value.byteOffset,
    +                                          value.length);
    +      }
    +      memory.set(value, viewClone);
    +      return viewClone;
    +    }
    +
    +    if (typeof global.Date === "function") {
    +      try {
    +        if (value instanceof global.Date) {
    +          var dateClone = new global.Date(value.getTime());
    +          memory.set(value, dateClone);
    +          return dateClone;
    +        }
    +      } catch (e) {}
    +    }
    +
    +    if (typeof global.RegExp === "function") {
    +      try {
    +        if (value instanceof global.RegExp) {
    +          var flags = "";
    +          flags += value.global ? "g" : "";
    +          flags += value.ignoreCase ? "i" : "";
    +          flags += value.multiline ? "m" : "";
    +          flags += value.unicode ? "u" : "";
    +          flags += value.sticky ? "y" : "";
    +          var regexpClone = new global.RegExp(value.source, flags);
    +          regexpClone.lastIndex = value.lastIndex;
    +          memory.set(value, regexpClone);
    +          return regexpClone;
    +        }
    +      } catch (e) {}
    +    }
    +
    +    if (typeof global.Map === "function") {
    +      try {
    +        if (value instanceof global.Map) {
    +          var mapClone = new global.Map();
    +          memory.set(value, mapClone);
    +          value.forEach(function(v, k) {
    +            mapClone.set(cloneTransferReasonValue(k, memory),
    +                         cloneTransferReasonValue(v, memory));
    +          });
    +          return mapClone;
    +        }
    +      } catch (e) {
    +        throw e;
    +      }
    +    }
    +
    +    if (typeof global.Set === "function") {
    +      try {
    +        if (value instanceof global.Set) {
    +          var setClone = new global.Set();
    +          memory.set(value, setClone);
    +          value.forEach(function(v) {
    +            setClone.add(cloneTransferReasonValue(v, memory));
    +          });
    +          return setClone;
    +        }
    +      } catch (e) {
    +        throw e;
    +      }
    +    }
    +
    +    var clone = Array.isArray(value) ? [] : {};
    +    memory.set(value, clone);
    +
    +    var keys = Object.keys(value);
    +    for (var i = 0; i < keys.length; ++i) {
    +      var key = keys[i];
    +      clone[key] = cloneTransferReasonValue(value[key], memory);
    +    }
    +
    +    return clone;
    +  }
    +
       function abortTransferredWritable(record, reason) {
         try {
           return record.writer.abort(reason);
    @@ -6908,12 +7065,16 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
     
       function cancelReadableTransfer(record, reason) {
         record.canceled = true;
    -    Promise.resolve().then(function() {
    +    var cancelPromise = Promise.resolve().then(function() {
    +      var clonedReason = cloneTransferReasonValue(reason);
           try {
    -        silenceRejection(record.reader.cancel(reason));
    -      } catch (e) {}
    +        return record.reader.cancel(clonedReason);
    +      } catch (e) {
    +        return Promise.reject(e);
    +      }
         });
    -    return undefined;
    +    silenceRejection(cancelPromise);
    +    return cancelPromise;
       }
     
       function closeReadableTransferPort(port) {
    @@ -7139,13 +7300,50 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
           },
           cancel: function(reason) {
             state.canceled = true;
    -        tryPostReadableTransferPort(port, { type: "cancel", reason: reason });
    +        try {
    +          port.postMessage({ type: "cancel", reason: reason });
    +        } catch (e) {
    +          closeReadableTransferPort(port);
    +          return Promise.reject(e);
    +        }
             closeReadableTransferPort(port);
             return undefined;
           }
         });
       }
     
    +  function __uxpTransferTransformStream(stream) {
    +    if (!isObject(stream) || !transformState.has(stream))
    +      return undefined;
    +
    +    var state = transformState.get(stream);
    +    if (state.readable.locked || state.writable.locked)
    +      return null;
    +
    +    var readableRecord = __uxpTransferReadableStream(state.readable);
    +    if (!readableRecord)
    +      return null;
    +
    +    var writableRecord = __uxpTransferWritableStream(state.writable);
    +    if (!writableRecord)
    +      return null;
    +
    +    return {
    +      readable: readableRecord,
    +      writable: writableRecord
    +    };
    +  }
    +
    +  function __uxpReceiveTransformStreamTransfer(record) {
    +    var stream = Object.create(global.TransformStream.prototype);
    +    transformState.set(stream, {
    +      readable: __uxpReceiveReadableStreamTransfer(record.readable),
    +      writable: __uxpReceiveWritableStreamTransfer(record.writable),
    +      controller: undefined
    +    });
    +    return stream;
    +  }
    +
       function __uxpReceiveReadableStreamTransfer(record) {
         return new ReadableStream({
           start: function(controller) {
    @@ -7323,6 +7521,12 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
       Object.defineProperty(global, "__uxpReceiveReadableStreamTransferFromPort",
                             { value: __uxpReceiveReadableStreamTransferFromPort,
                               configurable: true });
    +  Object.defineProperty(global, "__uxpTransferTransformStream",
    +                        { value: __uxpTransferTransformStream,
    +                          configurable: true });
    +  Object.defineProperty(global, "__uxpReceiveTransformStreamTransfer",
    +                        { value: __uxpReceiveTransformStreamTransfer,
    +                          configurable: true });
     
       if (global.ReadableStream && !global.ReadableStream.from) {
         Object.defineProperty(global.ReadableStream, "from", {
    
    From 563735e432fc267f851d0f232d8a1a89fab31da4 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Sat, 9 May 2026 11:24:10 -0400
    Subject: [PATCH 45/72] Do not wait for transferred readable cancel
    
    ---
     js/src/builtin/Stream.cpp | 19 +++++++++++--------
     1 file changed, 11 insertions(+), 8 deletions(-)
    
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index 6103cb79c1..cf2c0f016d 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -7065,16 +7065,19 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
     
       function cancelReadableTransfer(record, reason) {
         record.canceled = true;
    -    var cancelPromise = Promise.resolve().then(function() {
    -      var clonedReason = cloneTransferReasonValue(reason);
    +    var clonedReason;
    +    try {
    +      clonedReason = cloneTransferReasonValue(reason);
    +    } catch (e) {
    +      return Promise.reject(e);
    +    }
    +
    +    Promise.resolve().then(function() {
           try {
    -        return record.reader.cancel(clonedReason);
    -      } catch (e) {
    -        return Promise.reject(e);
    -      }
    +        silenceRejection(record.reader.cancel(clonedReason));
    +      } catch (e) {}
         });
    -    silenceRejection(cancelPromise);
    -    return cancelPromise;
    +    return undefined;
       }
     
       function closeReadableTransferPort(port) {
    
    From 9ea6c8f278c9a901b932903035c2f465d79cdb41 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Sat, 9 May 2026 11:28:20 -0400
    Subject: [PATCH 46/72] Acknowledge port-backed readable close
    
    ---
     js/src/builtin/Stream.cpp | 33 ++++++++++++++++++++++++++-------
     1 file changed, 26 insertions(+), 7 deletions(-)
    
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index cf2c0f016d..4b1c9e5411 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -7104,14 +7104,15 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
         var posted = tryPostReadableTransferPort(record.port,
                                                  { type: "error", value: error });
         if (!posted) {
    -      tryPostReadableTransferPort(record.port, {
    +      posted = tryPostReadableTransferPort(record.port, {
             type: "error",
             name: error && error.name,
             message: error && error.message
           });
         }
         record.closed = true;
    -    closeReadableTransferPort(record.port);
    +    if (!posted)
    +      closeReadableTransferPort(record.port);
       }
     
       function requestReadableTransferPortChunk(state) {
    @@ -7160,8 +7161,8 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
     
           if (result.done) {
             record.closed = true;
    -        tryPostReadableTransferPort(record.port, { type: "close" });
    -        closeReadableTransferPort(record.port);
    +        if (!tryPostReadableTransferPort(record.port, { type: "close" }))
    +          closeReadableTransferPort(record.port);
             return;
           }
     
    @@ -7208,7 +7209,16 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
     
           record.port.onmessage = function(event) {
             var message = event.data;
    -        if (!message || record.closed || record.canceled)
    +        if (!message || record.canceled)
    +          return;
    +
    +        if (message.type === "closed") {
    +          record.closed = true;
    +          closeReadableTransferPort(record.port);
    +          return;
    +        }
    +
    +        if (record.closed)
               return;
     
             if (message.type === "pull") {
    @@ -7282,13 +7292,22 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
           if (message.type === "close") {
             state.closed = true;
             try { state.controller.close(); } catch (e) {}
    +        tryPostReadableTransferPort(port, { type: "closed" });
             closeReadableTransferPort(port);
             return;
           }
     
           if (message.type === "error") {
    -        errorReadableTransferPortState(
    -          state, errorFromReadableTransferPortMessage(message));
    +        if (!state.errored) {
    +          state.errored = true;
    +          try {
    +            if (state.controller)
    +              state.controller.error(
    +                errorFromReadableTransferPortMessage(message));
    +          } catch (e) {}
    +        }
    +        tryPostReadableTransferPort(port, { type: "closed" });
    +        closeReadableTransferPort(port);
           }
         };
     
    
    From 89b3948962a96f3e6b958cc829bb237524cd3fc5 Mon Sep 17 00:00:00 2001
    From: ownedbywuigi 
    Date: Sat, 9 May 2026 12:31:36 -0700
    Subject: [PATCH 47/72] Fix MSVC builderr on Stream.cpp
    
    ---
     js/src/builtin/Stream.cpp | 15 ++++++++++++++-
     1 file changed, 14 insertions(+), 1 deletion(-)
    
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index 4b1c9e5411..51cf8e9f6e 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -6060,7 +6060,8 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
                                ReleaseReadableStreamReaderSilently, 1, 0))
             return false;
     
    -    static const char source[] = R"JS(
    +    static const char source[] =
    +  R"JS(
     (function(global) {
       "use strict";
     
    @@ -6544,6 +6545,9 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
         return writableStreamWrite(state.stream, chunk);
       };
     
    +)JS"
    +R"JS(
    +
       Object.defineProperty(WritableStreamDefaultWriter.prototype, Symbol.toStringTag,
                             { value: "WritableStreamDefaultWriter",
                               configurable: true });
    @@ -7115,6 +7119,9 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
           closeReadableTransferPort(record.port);
       }
     
    +)JS"
    +R"JS(
    +
       function requestReadableTransferPortChunk(state) {
         if (state.closed || state.errored || state.canceled)
           return;
    @@ -7190,6 +7197,9 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
       }
     
       function __uxpTransferReadableStreamPort(stream) {
    +
    +)JS"
    +R"JS(
         if (!isReadableStreamObject(stream))
           return undefined;
         if (stream.locked || typeof global.MessageChannel !== "function")
    @@ -7648,6 +7658,9 @@ js::InitStreamExtras(JSContext* cx, HandleObject global)
         });
       }
     
    +  )JS"
    +  R"JS(
    +
       var textEncoderStreamState = new WeakMap();
       var textDecoderStreamState = new WeakMap();
     
    
    From bcff9710c8f32e8df64d31f80b430eff8e456e1e Mon Sep 17 00:00:00 2001
    From: ownedbywuigi 
    Date: Sat, 9 May 2026 12:52:23 -0700
    Subject: [PATCH 48/72] Fix MSVC builderr pt 2
    
    ---
     js/src/builtin/Stream.cpp | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/js/src/builtin/Stream.cpp b/js/src/builtin/Stream.cpp
    index 51cf8e9f6e..0d5d0b2701 100644
    --- a/js/src/builtin/Stream.cpp
    +++ b/js/src/builtin/Stream.cpp
    @@ -6949,6 +6949,9 @@ R"JS(
         return closePromise;
       }
     
    +)JS"
    +R"JS(
    +
       function __uxpTransferWritableStream(stream) {
         if (!isWritableStream(stream))
           return undefined;
    @@ -7104,6 +7107,9 @@ R"JS(
         }
       }
     
    +)JS"
    +R"JS(
    +
       function postReadableTransferPortError(record, error) {
         var posted = tryPostReadableTransferPort(record.port,
                                                  { type: "error", value: error });
    
    From 0d06f59dc17fd97f1fa1cef22d46e9fbbe8d61d4 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 15 May 2026 18:17:17 -0400
    Subject: [PATCH 49/72] Fix JS shell module hook build
    
    ---
     js/src/shell/js.cpp | 15 ++++++++++++---
     1 file changed, 12 insertions(+), 3 deletions(-)
    
    diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp
    index ed30afa7ef..8f075ce228 100644
    --- a/js/src/shell/js.cpp
    +++ b/js/src/shell/js.cpp
    @@ -3330,6 +3330,15 @@ static const JSClass sandbox_class = {
         &sandbox_classOps
     };
     
    +enum GlobalAppSlot {
    +    GlobalAppSlotModuleMetadataHook,
    +    GlobalAppSlotModuleDynamicImportHook,
    +    GlobalAppSlotCount
    +};
    +
    +static_assert(GlobalAppSlotCount <= JSCLASS_GLOBAL_APPLICATION_SLOTS,
    +              "global application slots overflow");
    +
     static void
     SetStandardCompartmentOptions(JS::CompartmentOptions& options)
     {
    @@ -4158,7 +4167,7 @@ ParseModule(JSContext* cx, unsigned argc, Value* vp)
     
         const char16_t* chars = stableChars.twoByteRange().begin().get();
         JS::SourceBufferHolder srcBuf(chars, scriptContents->length(),
    -                                  SourceBufferHolder::NoOwnership);
    +                                  JS::SourceBufferHolder::NoOwnership);
     
         RootedObject module(cx, frontend::CompileModule(cx, options, srcBuf));
         if (!module)
    @@ -4369,7 +4378,7 @@ AbortDynamicModuleImport(JSContext* cx, unsigned argc, Value* vp)
         RootedString specifier(cx, args[1].toString());
         Rooted promise(cx, &args[2].toObject().as());
     
    -    cx->setPendingException(args[3]);
    +    cx->setPendingException(args[3], nullptr);
         return js::FinishDynamicModuleImport(cx, args[0], specifier, promise);
     }
     
    @@ -8422,7 +8431,7 @@ main(int argc, char** argv, char** envp)
     
         JS::SetModuleResolveHook(cx->runtime(), ShellModuleResolveHook);
         JS::SetModuleDynamicImportHook(cx, ShellModuleDynamicImportHook);
    -    JS::SetModuleMetadataHook(cx, ShellModuleMetadataHook);
    +    JS::SetModuleMetadataHook(cx, CallModuleMetadataHook);
     
         result = Shell(cx, &op, envp);
     
    
    From 1e463a1d16dbb1de313de3e9efee0d1002516134 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 15 May 2026 18:17:24 -0400
    Subject: [PATCH 50/72] Implement ES2024 grouping and resolver builtins
    
    ---
     js/src/builtin/Map.js                         | 43 +++++++++++
     js/src/builtin/MapObject.cpp                  | 19 ++++-
     js/src/builtin/MapObject.h                    | 37 ++++-----
     js/src/builtin/Object.js                      | 10 ++-
     js/src/builtin/Promise.cpp                    | 43 +++++++++++
     js/src/builtin/String.js                      | 76 +++++++++++++++++++
     js/src/jsstr.cpp                              |  2 +
     js/src/tests/non262/Promise/with-resolvers.js | 31 ++++++++
     js/src/tests/non262/String/well-formed.js     | 26 +++++++
     js/src/tests/non262/collections/groupBy.js    | 34 +++++++++
     js/src/vm/SelfHosting.cpp                     | 17 +++++
     11 files changed, 313 insertions(+), 25 deletions(-)
     create mode 100644 js/src/tests/non262/Promise/with-resolvers.js
     create mode 100644 js/src/tests/non262/String/well-formed.js
     create mode 100644 js/src/tests/non262/collections/groupBy.js
    
    diff --git a/js/src/builtin/Map.js b/js/src/builtin/Map.js
    index 434cd6529b..bcf0ded02e 100644
    --- a/js/src/builtin/Map.js
    +++ b/js/src/builtin/Map.js
    @@ -55,6 +55,49 @@ function MapForEach(callbackfn, thisArg = undefined) {
         }
     }
     
    +// ES2024
    +// Map.groupBy ( items, callbackfn )
    +function MapGroupBy(items, callbackfn) {
    +    // Step 1.
    +    RequireObjectCoercible(items);
    +
    +    // Step 2.
    +    if (!IsCallable(callbackfn))
    +        ThrowTypeError(JSMSG_NOT_FUNCTION, DecompileArg(1, callbackfn));
    +
    +    // Step 3.
    +    var groups = std_Map_create();
    +
    +    // Step 4.
    +    var k = 0;
    +
    +    // Steps 5-8.
    +    for (var value of allowContentIter(items)) {
    +        // Step 6.a.
    +        if (k >= MAX_NUMERIC_INDEX)
    +            ThrowTypeError(JSMSG_TOO_LONG_ARRAY);
    +
    +        // Step 6.b.
    +        var key = callContentFunction(callbackfn, undefined, value, k);
    +
    +        // Steps 6.c-d.
    +        var elements;
    +        if (callFunction(std_Map_has, groups, key)) {
    +            elements = callFunction(std_Map_get, groups, key);
    +            callFunction(std_Array_push, elements, value);
    +        } else {
    +            elements = [value];
    +            callFunction(std_Map_set, groups, key, elements);
    +        }
    +
    +        // Step 6.e.
    +        k++;
    +    }
    +
    +    // Step 9.
    +    return groups;
    +}
    +
     var iteratorTemp = { mapIterationResultPair : null };
     
     function MapIteratorNext() {
    diff --git a/js/src/builtin/MapObject.cpp b/js/src/builtin/MapObject.cpp
    index fe748a6bde..daeb930c86 100644
    --- a/js/src/builtin/MapObject.cpp
    +++ b/js/src/builtin/MapObject.cpp
    @@ -332,9 +332,15 @@ const JSPropertySpec MapObject::staticProperties[] = {
         JS_PS_END
     };
     
    +const JSFunctionSpec MapObject::staticMethods[] = {
    +    JS_SELF_HOSTED_FN("groupBy", "MapGroupBy", 2, 0),
    +    JS_FS_END
    +};
    +
     static JSObject*
     InitClass(JSContext* cx, Handle global, const Class* clasp, JSProtoKey key, Native construct,
               const JSPropertySpec* properties, const JSFunctionSpec* methods,
    +          const JSFunctionSpec* staticMethods,
               const JSPropertySpec* staticProperties)
     {
         RootedPlainObject proto(cx, NewBuiltinClassInstance(cx));
    @@ -343,8 +349,13 @@ InitClass(JSContext* cx, Handle global, const Class* clasp, JSPro
     
         Rooted ctor(cx, global->createConstructor(cx, construct, ClassName(key, cx), 0));
         if (!ctor ||
    -        !JS_DefineProperties(cx, ctor, staticProperties) ||
    -        !LinkConstructorAndPrototype(cx, ctor, proto) ||
    +        !JS_DefineProperties(cx, ctor, staticProperties))
    +    {
    +        return nullptr;
    +    }
    +    if (staticMethods && !JS_DefineFunctions(cx, ctor, staticMethods))
    +        return nullptr;
    +    if (!LinkConstructorAndPrototype(cx, ctor, proto) ||
             !DefinePropertiesAndFunctions(cx, proto, properties, methods) ||
             !GlobalObject::initBuiltinConstructor(cx, global, key, ctor, proto))
         {
    @@ -359,7 +370,7 @@ MapObject::initClass(JSContext* cx, JSObject* obj)
         Rooted global(cx, &obj->as());
         RootedObject proto(cx,
             InitClass(cx, global, &class_, JSProto_Map, construct, properties, methods,
    -                  staticProperties));
    +                  staticMethods, staticProperties));
         if (proto) {
             // Define the "entries" method.
             JSFunction* fun = JS_DefineFunction(cx, proto, "entries", entries, 0, 0);
    @@ -1084,7 +1095,7 @@ SetObject::initClass(JSContext* cx, JSObject* obj)
         Rooted global(cx, &obj->as());
         RootedObject proto(cx,
             InitClass(cx, global, &class_, JSProto_Set, construct, properties, methods,
    -                  staticProperties));
    +                  nullptr, staticProperties));
         if (proto) {
             // Define the "values" method.
             JSFunction* fun = JS_DefineFunction(cx, proto, "values", values, 0, 0);
    diff --git a/js/src/builtin/MapObject.h b/js/src/builtin/MapObject.h
    index a9f685ea00..2b46fec2c9 100644
    --- a/js/src/builtin/MapObject.h
    +++ b/js/src/builtin/MapObject.h
    @@ -109,8 +109,10 @@ class MapObject : public NativeObject {
     
         static MOZ_MUST_USE bool getKeysAndValuesInterleaved(JSContext* cx, HandleObject obj,
                                                 JS::MutableHandle> entries);
    -    static MOZ_MUST_USE bool entries(JSContext* cx, unsigned argc, Value* vp);
    -    static MOZ_MUST_USE bool has(JSContext* cx, unsigned argc, Value* vp);
    +    [[nodiscard]] static bool entries(JSContext* cx, unsigned argc, Value* vp);
    +    [[nodiscard]] static bool get(JSContext* cx, unsigned argc, Value* vp);
    +    [[nodiscard]] static bool has(JSContext* cx, unsigned argc, Value* vp);
    +    [[nodiscard]] static bool set(JSContext* cx, unsigned argc, Value* vp);
         static MapObject* create(JSContext* cx, HandleObject proto = nullptr);
     
         // Publicly exposed Map calls for JSAPI access (webidl maplike/setlike
    @@ -137,6 +139,7 @@ class MapObject : public NativeObject {
     
         static const JSPropertySpec properties[];
         static const JSFunctionSpec methods[];
    +    static const JSFunctionSpec staticMethods[];
         static const JSPropertySpec staticProperties[];
         ValueMap* getData() { return static_cast(getPrivate()); }
         static ValueMap& extract(HandleObject o);
    @@ -150,22 +153,20 @@ class MapObject : public NativeObject {
     
         static MOZ_MUST_USE bool iterator_impl(JSContext* cx, const CallArgs& args, IteratorKind kind);
     
    -    static MOZ_MUST_USE bool size_impl(JSContext* cx, const CallArgs& args);
    -    static MOZ_MUST_USE bool size(JSContext* cx, unsigned argc, Value* vp);
    -    static MOZ_MUST_USE bool get_impl(JSContext* cx, const CallArgs& args);
    -    static MOZ_MUST_USE bool get(JSContext* cx, unsigned argc, Value* vp);
    -    static MOZ_MUST_USE bool has_impl(JSContext* cx, const CallArgs& args);
    -    static MOZ_MUST_USE bool set_impl(JSContext* cx, const CallArgs& args);
    -    static MOZ_MUST_USE bool set(JSContext* cx, unsigned argc, Value* vp);
    -    static MOZ_MUST_USE bool delete_impl(JSContext* cx, const CallArgs& args);
    -    static MOZ_MUST_USE bool delete_(JSContext* cx, unsigned argc, Value* vp);
    -    static MOZ_MUST_USE bool keys_impl(JSContext* cx, const CallArgs& args);
    -    static MOZ_MUST_USE bool keys(JSContext* cx, unsigned argc, Value* vp);
    -    static MOZ_MUST_USE bool values_impl(JSContext* cx, const CallArgs& args);
    -    static MOZ_MUST_USE bool values(JSContext* cx, unsigned argc, Value* vp);
    -    static MOZ_MUST_USE bool entries_impl(JSContext* cx, const CallArgs& args);
    -    static MOZ_MUST_USE bool clear_impl(JSContext* cx, const CallArgs& args);
    -    static MOZ_MUST_USE bool clear(JSContext* cx, unsigned argc, Value* vp);
    +    [[nodiscard]] static bool size_impl(JSContext* cx, const CallArgs& args);
    +    [[nodiscard]] static bool size(JSContext* cx, unsigned argc, Value* vp);
    +    [[nodiscard]] static bool get_impl(JSContext* cx, const CallArgs& args);
    +    [[nodiscard]] static bool has_impl(JSContext* cx, const CallArgs& args);
    +    [[nodiscard]] static bool set_impl(JSContext* cx, const CallArgs& args);
    +    [[nodiscard]] static bool delete_impl(JSContext* cx, const CallArgs& args);
    +    [[nodiscard]] static bool delete_(JSContext* cx, unsigned argc, Value* vp);
    +    [[nodiscard]] static bool keys_impl(JSContext* cx, const CallArgs& args);
    +    [[nodiscard]] static bool keys(JSContext* cx, unsigned argc, Value* vp);
    +    [[nodiscard]] static bool values_impl(JSContext* cx, const CallArgs& args);
    +    [[nodiscard]] static bool values(JSContext* cx, unsigned argc, Value* vp);
    +    [[nodiscard]] static bool entries_impl(JSContext* cx, const CallArgs& args);
    +    [[nodiscard]] static bool clear_impl(JSContext* cx, const CallArgs& args);
    +    [[nodiscard]] static bool clear(JSContext* cx, unsigned argc, Value* vp);
     };
     
     class MapIteratorObject : public NativeObject
    diff --git a/js/src/builtin/Object.js b/js/src/builtin/Object.js
    index 6627aea593..01442144cc 100644
    --- a/js/src/builtin/Object.js
    +++ b/js/src/builtin/Object.js
    @@ -240,12 +240,16 @@ function ObjectGroupBy(items, callbackfn) {
       // Steps 5-8.
       for (var value of allowContentIter(items)) {
         // Step 6.a.
    -    var key = callContentFunction(callbackfn, undefined, value, k);
    +    if (k >= MAX_NUMERIC_INDEX)
    +      ThrowTypeError(JSMSG_TOO_LONG_ARRAY);
     
         // Step 6.b.
    +    var key = callContentFunction(callbackfn, undefined, value, k);
    +
    +    // Step 6.c.
         key = ToPropertyKey(key);
     
    -    // Steps 6.c-d.
    +    // Steps 6.d-e.
         var elements = groups[key];
         if (elements === undefined) {
           _DefineDataProperty(groups, key, [value]);
    @@ -253,7 +257,7 @@ function ObjectGroupBy(items, callbackfn) {
           callFunction(std_Array_push, elements, value);
         }
     
    -    // Step 6.e.
    +    // Step 6.f.
         k++;
       }
     
    diff --git a/js/src/builtin/Promise.cpp b/js/src/builtin/Promise.cpp
    index 9660a758a1..56803b5b91 100644
    --- a/js/src/builtin/Promise.cpp
    +++ b/js/src/builtin/Promise.cpp
    @@ -3673,6 +3673,48 @@ Promise_static_resolve(JSContext* cx, unsigned argc, Value* vp)
         return true;
     }
     
    +// ES2024
    +// Promise.withResolvers ( )
    +static bool
    +Promise_static_withResolvers(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +
    +    // Step 1.
    +    if (!args.thisv().isObject()) {
    +        ReportValueError(cx, JSMSG_NOT_CONSTRUCTOR, -1, args.thisv(), nullptr);
    +        return false;
    +    }
    +    RootedObject C(cx, &args.thisv().toObject());
    +
    +    // Step 2.
    +    Rooted capability(cx);
    +    if (!NewPromiseCapability(cx, C, &capability, false))
    +        return false;
    +
    +    // Step 3.
    +    RootedPlainObject obj(cx, NewBuiltinClassInstance(cx));
    +    if (!obj)
    +        return false;
    +
    +    // Steps 4-7.
    +    RootedValue promise(cx, ObjectValue(*capability.promise()));
    +    if (!::JS_DefineProperty(cx, obj, "promise", promise, JSPROP_ENUMERATE))
    +        return false;
    +
    +    RootedValue resolve(cx, ObjectValue(*capability.resolve()));
    +    if (!::JS_DefineProperty(cx, obj, "resolve", resolve, JSPROP_ENUMERATE))
    +        return false;
    +
    +    RootedValue reject(cx, ObjectValue(*capability.reject()));
    +    if (!::JS_DefineProperty(cx, obj, "reject", reject, JSPROP_ENUMERATE))
    +        return false;
    +
    +    // Step 8.
    +    args.rval().setObject(*obj);
    +    return true;
    +}
    +
     /**
      * Unforgeable version of ES2016, 25.4.4.5, Promise.resolve.
      */
    @@ -5180,6 +5222,7 @@ static const JSFunctionSpec promise_static_methods[] = {
         JS_FN("race", Promise_static_race, 1, 0),
         JS_FN("reject", Promise_reject, 1, 0),
         JS_FN("resolve", Promise_static_resolve, 1, 0),
    +    JS_FN("withResolvers", Promise_static_withResolvers, 0, 0),
         JS_FS_END
     };
     
    diff --git a/js/src/builtin/String.js b/js/src/builtin/String.js
    index e1c32482ae..a83a06ad2b 100644
    --- a/js/src/builtin/String.js
    +++ b/js/src/builtin/String.js
    @@ -654,6 +654,82 @@ function String_repeat(count) {
         return T;
     }
     
    +// ES2024
    +// String.prototype.isWellFormed ( )
    +function String_isWellFormed() {
    +    // Steps 1-2.
    +    RequireObjectCoercible(this);
    +    var S = ToString(this);
    +
    +    // Step 3.
    +    var length = S.length;
    +    for (var k = 0; k < length; k++) {
    +        var c = callFunction(std_String_charCodeAt, S, k);
    +        if (c >= 0xD800 && c <= 0xDBFF) {
    +            if (k + 1 >= length)
    +                return false;
    +
    +            var d = callFunction(std_String_charCodeAt, S, k + 1);
    +            if (d < 0xDC00 || d > 0xDFFF)
    +                return false;
    +
    +            k++;
    +        } else if (c >= 0xDC00 && c <= 0xDFFF) {
    +            return false;
    +        }
    +    }
    +
    +    // Step 4.
    +    return true;
    +}
    +
    +// ES2024
    +// String.prototype.toWellFormed ( )
    +function String_toWellFormed() {
    +    // Steps 1-2.
    +    RequireObjectCoercible(this);
    +    var S = ToString(this);
    +
    +    // Step 3.
    +    var length = S.length;
    +    var result = "";
    +    var copied = 0;
    +
    +    for (var k = 0; k < length; k++) {
    +        var c = callFunction(std_String_charCodeAt, S, k);
    +        var isUnpairedSurrogate = false;
    +
    +        if (c >= 0xD800 && c <= 0xDBFF) {
    +            if (k + 1 < length) {
    +                var d = callFunction(std_String_charCodeAt, S, k + 1);
    +                if (d >= 0xDC00 && d <= 0xDFFF) {
    +                    k++;
    +                    continue;
    +                }
    +            }
    +            isUnpairedSurrogate = true;
    +        } else if (c >= 0xDC00 && c <= 0xDFFF) {
    +            isUnpairedSurrogate = true;
    +        }
    +
    +        if (isUnpairedSurrogate) {
    +            if (copied < k)
    +                result += callFunction(String_substring, S, copied, k);
    +            result += "\uFFFD";
    +            copied = k + 1;
    +        }
    +    }
    +
    +    if (copied === 0)
    +        return S;
    +
    +    if (copied < length)
    +        result += callFunction(String_substring, S, copied, length);
    +
    +    // Step 4.
    +    return result;
    +}
    +
     // ES6 draft specification, section 21.1.3.27, version 2013-09-27.
     function String_iterator() {
         RequireObjectCoercible(this);
    diff --git a/js/src/jsstr.cpp b/js/src/jsstr.cpp
    index 5209e979de..67de5d7236 100644
    --- a/js/src/jsstr.cpp
    +++ b/js/src/jsstr.cpp
    @@ -3344,6 +3344,8 @@ static const JSFunctionSpec string_methods[] = {
         JS_SELF_HOSTED_FN("toLocaleUpperCase", "String_toLocaleUpperCase", 0,0),
         JS_SELF_HOSTED_FN("localeCompare", "String_localeCompare", 1,0),
         JS_SELF_HOSTED_FN("repeat", "String_repeat",      1,0),
    +    JS_SELF_HOSTED_FN("isWellFormed", "String_isWellFormed", 0,0),
    +    JS_SELF_HOSTED_FN("toWellFormed", "String_toWellFormed", 0,0),
         JS_FN("normalize",         str_normalize,         0,0),
     
         /* Perl-ish methods (search is actually Python-esque). */
    diff --git a/js/src/tests/non262/Promise/with-resolvers.js b/js/src/tests/non262/Promise/with-resolvers.js
    new file mode 100644
    index 0000000000..985d458622
    --- /dev/null
    +++ b/js/src/tests/non262/Promise/with-resolvers.js
    @@ -0,0 +1,31 @@
    +// |reftest| skip-if(!Promise.withResolvers)
    +
    +var desc = Object.getOwnPropertyDescriptor(Promise, "withResolvers");
    +assertEq(desc.enumerable, false);
    +assertEq(desc.configurable, true);
    +assertEq(desc.writable, true);
    +assertEq(Promise.withResolvers.length, 0);
    +assertEq(Promise.withResolvers.name, "withResolvers");
    +
    +var capability = Promise.withResolvers();
    +assertEq(capability.promise instanceof Promise, true);
    +assertEq(typeof capability.resolve, "function");
    +assertEq(typeof capability.reject, "function");
    +assertEqArray(Object.keys(capability), ["promise", "resolve", "reject"]);
    +
    +capability.resolve(42);
    +capability.promise.then(v => assertEq(v, 42));
    +
    +class MyPromise extends Promise {}
    +var subCapability = Promise.withResolvers.call(MyPromise);
    +assertEq(subCapability.promise instanceof MyPromise, true);
    +subCapability.reject("rejected");
    +subCapability.promise.then(
    +  () => { throw new Error("expected rejection"); },
    +  reason => assertEq(reason, "rejected")
    +);
    +
    +assertThrowsInstanceOf(() => Promise.withResolvers.call({}), TypeError);
    +
    +if (typeof reportCompare === "function")
    +  reportCompare(0, 0);
    diff --git a/js/src/tests/non262/String/well-formed.js b/js/src/tests/non262/String/well-formed.js
    new file mode 100644
    index 0000000000..7472f6afa8
    --- /dev/null
    +++ b/js/src/tests/non262/String/well-formed.js
    @@ -0,0 +1,26 @@
    +// |reftest| skip-if(!String.prototype.isWellFormed||!String.prototype.toWellFormed)
    +
    +assertEq("".isWellFormed(), true);
    +assertEq("abc".isWellFormed(), true);
    +assertEq("\uD83D\uDE00".isWellFormed(), true);
    +assertEq("\uD800".isWellFormed(), false);
    +assertEq("\uDC00".isWellFormed(), false);
    +assertEq("\uD800a".isWellFormed(), false);
    +assertEq("a\uDC00".isWellFormed(), false);
    +assertEq("\uD800\uD800\uDC00".isWellFormed(), false);
    +
    +assertEq("abc".toWellFormed(), "abc");
    +assertEq("\uD83D\uDE00".toWellFormed(), "\uD83D\uDE00");
    +assertEq("\uD800".toWellFormed(), "\uFFFD");
    +assertEq("\uDC00".toWellFormed(), "\uFFFD");
    +assertEq("\uD800a\uDC00".toWellFormed(), "\uFFFDa\uFFFD");
    +assertEq("\uD800\uD800\uDC00".toWellFormed(), "\uFFFD\uD800\uDC00");
    +
    +assertEq(String.prototype.isWellFormed.call(123), true);
    +assertEq(String.prototype.toWellFormed.call({ toString() { return "\uD800x"; } }), "\uFFFDx");
    +
    +assertThrowsInstanceOf(() => String.prototype.isWellFormed.call(null), TypeError);
    +assertThrowsInstanceOf(() => String.prototype.toWellFormed.call(undefined), TypeError);
    +
    +if (typeof reportCompare === "function")
    +  reportCompare(0, 0);
    diff --git a/js/src/tests/non262/collections/groupBy.js b/js/src/tests/non262/collections/groupBy.js
    new file mode 100644
    index 0000000000..121a899ede
    --- /dev/null
    +++ b/js/src/tests/non262/collections/groupBy.js
    @@ -0,0 +1,34 @@
    +// |reftest| skip-if(!Object.groupBy||!Map.groupBy)
    +
    +var objectGroups = Object.groupBy(["a", "bb", "c"], value => value.length);
    +assertEq(Object.getPrototypeOf(objectGroups), null);
    +assertEqArray(objectGroups["1"], ["a", "c"]);
    +assertEqArray(objectGroups["2"], ["bb"]);
    +
    +var symbol = Symbol();
    +var symbolGroups = Object.groupBy([1, 2], value => value === 1 ? symbol : "__proto__");
    +assertEqArray(symbolGroups[symbol], [1]);
    +assertEqArray(symbolGroups.__proto__, [2]);
    +
    +var indexes = [];
    +var mapGroups = Map.groupBy(["a", "bb", "c"], (value, index) => {
    +  indexes.push(index);
    +  return value.length;
    +});
    +assertEq(mapGroups instanceof Map, true);
    +assertEqArray(indexes, [0, 1, 2]);
    +assertEqArray(mapGroups.get(1), ["a", "c"]);
    +assertEqArray(mapGroups.get(2), ["bb"]);
    +
    +var key = {};
    +var objectKeyGroups = Map.groupBy([1, 2], value => value === 1 ? key : NaN);
    +assertEqArray(objectKeyGroups.get(key), [1]);
    +assertEqArray(objectKeyGroups.get(NaN), [2]);
    +
    +assertThrowsInstanceOf(() => Object.groupBy(null, x => x), TypeError);
    +assertThrowsInstanceOf(() => Map.groupBy(undefined, x => x), TypeError);
    +assertThrowsInstanceOf(() => Object.groupBy([], null), TypeError);
    +assertThrowsInstanceOf(() => Map.groupBy([], null), TypeError);
    +
    +if (typeof reportCompare === "function")
    +  reportCompare(0, 0);
    diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp
    index 26fd6cc9e1..840186b361 100644
    --- a/js/src/vm/SelfHosting.cpp
    +++ b/js/src/vm/SelfHosting.cpp
    @@ -270,6 +270,20 @@ intrinsic_GetBuiltinConstructor(JSContext* cx, unsigned argc, Value* vp)
         return true;
     }
     
    +static bool
    +intrinsic_NewMap(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    MOZ_ASSERT(args.length() == 0);
    +
    +    Rooted map(cx, MapObject::create(cx));
    +    if (!map)
    +        return false;
    +
    +    args.rval().setObject(*map);
    +    return true;
    +}
    +
     static bool
     intrinsic_SubstringKernel(JSContext* cx, unsigned argc, Value* vp)
     {
    @@ -2268,7 +2282,10 @@ static const JSFunctionSpec intrinsic_functions[] = {
         JS_INLINABLE_FN("std_Math_min",              math_min,                     2,0, MathMin),
         JS_INLINABLE_FN("std_Math_abs",              math_abs,                     1,0, MathAbs),
     
    +    JS_FN("std_Map_create",                      intrinsic_NewMap,             0,0),
    +    JS_FN("std_Map_get",                         MapObject::get,               1,0),
         JS_FN("std_Map_has",                         MapObject::has,               1,0),
    +    JS_FN("std_Map_set",                         MapObject::set,               2,0),
         JS_FN("std_Map_iterator",                    MapObject::entries,           0,0),
     
         JS_FN("std_Number_valueOf",                  num_valueOf,                  0,0),
    
    From e886e4c1dbff0b9f5e7a56c82c0d9111ef1a0136 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 15 May 2026 18:35:44 -0400
    Subject: [PATCH 51/72] Implement ES2024 ArrayBuffer transfer APIs
    
    ---
     .../non262/ArrayBuffer/resizable-transfer.js  |  68 ++++
     js/src/vm/ArrayBufferObject.cpp               | 334 +++++++++++++++++-
     js/src/vm/ArrayBufferObject.h                 |  37 +-
     js/src/vm/CommonPropertyNames.h               |   1 +
     4 files changed, 429 insertions(+), 11 deletions(-)
     create mode 100644 js/src/tests/non262/ArrayBuffer/resizable-transfer.js
    
    diff --git a/js/src/tests/non262/ArrayBuffer/resizable-transfer.js b/js/src/tests/non262/ArrayBuffer/resizable-transfer.js
    new file mode 100644
    index 0000000000..b9f9dbb13a
    --- /dev/null
    +++ b/js/src/tests/non262/ArrayBuffer/resizable-transfer.js
    @@ -0,0 +1,68 @@
    +// |reftest| skip-if(!ArrayBuffer.prototype.transfer)
    +
    +var fixed = new ArrayBuffer(4);
    +assertEq(fixed.byteLength, 4);
    +assertEq(fixed.maxByteLength, 4);
    +assertEq(fixed.resizable, false);
    +assertEq(fixed.detached, false);
    +assertThrowsInstanceOf(() => fixed.resize(2), TypeError);
    +assertEq(ArrayBuffer.prototype.transfer.length, 0);
    +assertEq(ArrayBuffer.prototype.transferToFixedLength.length, 0);
    +var resizeArgumentConverted = false;
    +assertThrowsInstanceOf(() => fixed.resize({ valueOf() { resizeArgumentConverted = true; return 1; } }),
    +                       TypeError);
    +assertEq(resizeArgumentConverted, false);
    +
    +var resizable = new ArrayBuffer(4, { maxByteLength: 8 });
    +assertEq(resizable.byteLength, 4);
    +assertEq(resizable.maxByteLength, 8);
    +assertEq(resizable.resizable, true);
    +
    +var bytes = new Uint8Array(resizable);
    +bytes[0] = 11;
    +bytes[3] = 44;
    +resizable.resize(6);
    +assertEq(resizable.byteLength, 6);
    +assertEq(new Uint8Array(resizable)[0], 11);
    +assertEq(new Uint8Array(resizable)[3], 44);
    +assertEq(new Uint8Array(resizable)[4], 0);
    +assertThrowsInstanceOf(() => resizable.resize(9), RangeError);
    +
    +var source = new ArrayBuffer(4);
    +var sourceBytes = new Uint8Array(source);
    +sourceBytes[0] = 1;
    +sourceBytes[1] = 2;
    +var sourceView = new Uint8Array(source);
    +var moved = source.transfer(6);
    +assertEq(source.detached, true);
    +assertEq(source.byteLength, 0);
    +assertEq(source.maxByteLength, 0);
    +assertEq(sourceView.length, 0);
    +assertEq(moved.byteLength, 6);
    +assertEq(moved.resizable, false);
    +assertEq(moved.maxByteLength, 6);
    +assertEq(new Uint8Array(moved)[0], 1);
    +assertEq(new Uint8Array(moved)[1], 2);
    +assertEq(new Uint8Array(moved)[4], 0);
    +
    +var resizableSource = new ArrayBuffer(4, { maxByteLength: 8 });
    +new Uint8Array(resizableSource)[0] = 7;
    +var resizableMoved = resizableSource.transfer();
    +assertEq(resizableSource.detached, true);
    +assertEq(resizableSource.resizable, true);
    +assertEq(resizableMoved.byteLength, 4);
    +assertEq(resizableMoved.maxByteLength, 8);
    +assertEq(resizableMoved.resizable, true);
    +assertEq(new Uint8Array(resizableMoved)[0], 7);
    +
    +var fixedMoved = resizableMoved.transferToFixedLength(10);
    +assertEq(resizableMoved.detached, true);
    +assertEq(fixedMoved.byteLength, 10);
    +assertEq(fixedMoved.maxByteLength, 10);
    +assertEq(fixedMoved.resizable, false);
    +assertEq(new Uint8Array(fixedMoved)[0], 7);
    +
    +assertThrowsInstanceOf(() => new ArrayBuffer(4, { maxByteLength: 3 }), RangeError);
    +
    +if (typeof reportCompare === "function")
    +  reportCompare(0, 0);
    diff --git a/js/src/vm/ArrayBufferObject.cpp b/js/src/vm/ArrayBufferObject.cpp
    index e43edab690..7eab0f0e24 100644
    --- a/js/src/vm/ArrayBufferObject.cpp
    +++ b/js/src/vm/ArrayBufferObject.cpp
    @@ -22,6 +22,7 @@
     # include 
     #endif
     
    +#include 
     #include "jsapi.h"
     #include "jsarray.h"
     #include "jscntxt.h"
    @@ -45,6 +46,7 @@
     #include "vm/Interpreter.h"
     #include "vm/SelfHosting.h"
     #include "vm/SharedArrayObject.h"
    +#include "vm/TypedArrayObject.h"
     #include "vm/WrapperObject.h"
     #include "wasm/WasmSignalHandlers.h"
     #include "wasm/WasmTypes.h"
    @@ -170,12 +172,18 @@ static const JSPropertySpec static_properties[] = {
     
     
     static const JSFunctionSpec prototype_functions[] = {
    +    JS_FN("resize", ArrayBufferObject::fun_resize, 1, 0),
         JS_SELF_HOSTED_FN("slice", "ArrayBufferSlice", 2, 0),
    +    JS_FN("transfer", ArrayBufferObject::fun_transfer, 0, 0),
    +    JS_FN("transferToFixedLength", ArrayBufferObject::fun_transferToFixedLength, 0, 0),
         JS_FS_END
     };
     
     static const JSPropertySpec prototype_properties[] = {
         JS_PSG("byteLength", ArrayBufferObject::byteLengthGetter, 0),
    +    JS_PSG("detached", ArrayBufferObject::detachedGetter, 0),
    +    JS_PSG("maxByteLength", ArrayBufferObject::maxByteLengthGetter, 0),
    +    JS_PSG("resizable", ArrayBufferObject::resizableGetter, 0),
         JS_STRING_SYM_PS(toStringTag, "ArrayBuffer", JSPROP_READONLY),
         JS_PS_END
     };
    @@ -252,6 +260,52 @@ ArrayBufferObject::byteLengthGetter(JSContext* cx, unsigned argc, Value* vp)
         return CallNonGenericMethod(cx, args);
     }
     
    +MOZ_ALWAYS_INLINE bool
    +ArrayBufferObject::detachedGetterImpl(JSContext* cx, const CallArgs& args)
    +{
    +    MOZ_ASSERT(IsArrayBuffer(args.thisv()));
    +    args.rval().setBoolean(args.thisv().toObject().as().isDetached());
    +    return true;
    +}
    +
    +bool
    +ArrayBufferObject::detachedGetter(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    return CallNonGenericMethod(cx, args);
    +}
    +
    +MOZ_ALWAYS_INLINE bool
    +ArrayBufferObject::maxByteLengthGetterImpl(JSContext* cx, const CallArgs& args)
    +{
    +    MOZ_ASSERT(IsArrayBuffer(args.thisv()));
    +    ArrayBufferObject& buffer = args.thisv().toObject().as();
    +    args.rval().setInt32(buffer.isDetached() ? 0 : int32_t(buffer.maxByteLength()));
    +    return true;
    +}
    +
    +bool
    +ArrayBufferObject::maxByteLengthGetter(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    return CallNonGenericMethod(cx, args);
    +}
    +
    +MOZ_ALWAYS_INLINE bool
    +ArrayBufferObject::resizableGetterImpl(JSContext* cx, const CallArgs& args)
    +{
    +    MOZ_ASSERT(IsArrayBuffer(args.thisv()));
    +    args.rval().setBoolean(args.thisv().toObject().as().isResizable());
    +    return true;
    +}
    +
    +bool
    +ArrayBufferObject::resizableGetter(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    return CallNonGenericMethod(cx, args);
    +}
    +
     /*
      * ArrayBuffer.isView(obj); ES6 (Dec 2013 draft) 24.1.3.1
      */
    @@ -264,6 +318,39 @@ ArrayBufferObject::fun_isView(JSContext* cx, unsigned argc, Value* vp)
         return true;
     }
     
    +static bool
    +GetArrayBufferMaxByteLengthOption(JSContext* cx, HandleValue options,
    +                                  uint32_t byteLength, uint32_t* maxByteLength,
    +                                  bool* resizable)
    +{
    +    *maxByteLength = byteLength;
    +    *resizable = false;
    +
    +    if (!options.isObject())
    +        return true;
    +
    +    RootedObject opts(cx, &options.toObject());
    +    RootedValue maxByteLengthValue(cx);
    +    if (!GetProperty(cx, opts, opts, cx->names().maxByteLength, &maxByteLengthValue))
    +        return false;
    +
    +    if (maxByteLengthValue.isUndefined())
    +        return true;
    +
    +    uint64_t max;
    +    if (!ToIndex(cx, maxByteLengthValue, &max))
    +        return false;
    +
    +    if (max > INT32_MAX || max < byteLength) {
    +        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_BAD_ARRAY_LENGTH);
    +        return false;
    +    }
    +
    +    *maxByteLength = uint32_t(max);
    +    *resizable = true;
    +    return true;
    +}
    +
     
     // ES2017 draft 24.1.2.1
     bool
    @@ -287,12 +374,22 @@ ArrayBufferObject::class_constructor(JSContext* cx, unsigned argc, Value* vp)
         }
     
         // Step 3.
    +    uint32_t maxByteLength;
    +    bool resizable;
    +    if (!GetArrayBufferMaxByteLengthOption(cx, args.get(1), uint32_t(byteLength),
    +                                           &maxByteLength, &resizable))
    +    {
    +        return false;
    +    }
    +
    +    // Step 4.
         RootedObject proto(cx);
         RootedObject newTarget(cx, &args.newTarget().toObject());
         if (!GetPrototypeFromConstructor(cx, newTarget, &proto))
             return false;
     
    -    JSObject* bufobj = create(cx, uint32_t(byteLength), proto);
    +    JSObject* bufobj = create(cx, uint32_t(byteLength), BufferContents::createPlain(nullptr),
    +                              OwnsData, proto, GenericObject, maxByteLength, resizable);
         if (!bufobj)
             return false;
         args.rval().setObject(*bufobj);
    @@ -302,13 +399,57 @@ ArrayBufferObject::class_constructor(JSContext* cx, unsigned argc, Value* vp)
     static ArrayBufferObject::BufferContents
     AllocateArrayBufferContents(JSContext* cx, uint32_t nbytes)
     {
    -    uint8_t* p = cx->runtime()->pod_callocCanGC(nbytes);
    +    uint8_t* p = cx->runtime()->pod_callocCanGC(nbytes ? nbytes : 1);
         if (!p)
             ReportOutOfMemory(cx);
     
         return ArrayBufferObject::BufferContents::create(p);
     }
     
    +static bool
    +ReportArrayBufferNotResizable(JSContext* cx)
    +{
    +    JS_ReportErrorASCII(cx, "ArrayBuffer is not resizable");
    +    return false;
    +}
    +
    +static bool
    +ReportArrayBufferCannotDetach(JSContext* cx)
    +{
    +    JS_ReportErrorASCII(cx, "ArrayBuffer cannot be detached");
    +    return false;
    +}
    +
    +static bool
    +ReportArrayBufferLengthOutOfRange(JSContext* cx)
    +{
    +    JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_BAD_ARRAY_LENGTH);
    +    return false;
    +}
    +
    +static bool
    +ArrayBufferViewFits(ArrayBufferViewObject* view, uint32_t newByteLength)
    +{
    +    if (view->is()) {
    +        DataViewObject& dataView = view->as();
    +        uint32_t byteOffset = dataView.byteOffset();
    +        uint32_t byteLength = dataView.byteLength();
    +        return byteOffset <= newByteLength && byteLength <= newByteLength - byteOffset;
    +    }
    +
    +    if (view->is()) {
    +        TypedArrayObject& typedArray = view->as();
    +        if (typedArray.isSharedMemory())
    +            return true;
    +        uint32_t byteOffset = typedArray.byteOffset();
    +        uint32_t byteLength = typedArray.byteLength();
    +        return byteOffset <= newByteLength && byteLength <= newByteLength - byteOffset;
    +    }
    +
    +    // Outline typed objects don't have a recoverable fixed byte range here.
    +    return false;
    +}
    +
     static void
     NoteViewBufferWasDetached(ArrayBufferViewObject* view,
                               ArrayBufferObject::BufferContents newContents,
    @@ -434,6 +575,173 @@ ArrayBufferObject::changeContents(JSContext* cx, BufferContents newContents,
             changeViewContents(cx, firstView(), oldDataPointer, newContents);
     }
     
    +void
    +ArrayBufferObject::changeContentsForResize(JSContext* cx, BufferContents newContents,
    +                                           OwnsState ownsState, uint32_t newByteLength)
    +{
    +    MOZ_RELEASE_ASSERT(!isWasm());
    +    MOZ_ASSERT(!forInlineTypedObject());
    +
    +    uint8_t* oldDataPointer = dataPointer();
    +    setNewData(cx->runtime()->defaultFreeOp(), newContents, ownsState);
    +
    +    auto& innerViews = cx->compartment()->innerViews.get();
    +    if (InnerViewTable::ViewVector* views = innerViews.maybeViewsUnbarriered(this)) {
    +        for (size_t i = 0; i < views->length(); i++) {
    +            ArrayBufferViewObject* view = (*views)[i];
    +            if (ArrayBufferViewFits(view, newByteLength))
    +                changeViewContents(cx, view, oldDataPointer, newContents);
    +            else
    +                NoteViewBufferWasDetached(view, newContents, cx);
    +        }
    +    }
    +
    +    if (firstView()) {
    +        if (ArrayBufferViewFits(firstView(), newByteLength))
    +            changeViewContents(cx, firstView(), oldDataPointer, newContents);
    +        else
    +            NoteViewBufferWasDetached(firstView(), newContents, cx);
    +    }
    +
    +    setByteLength(newByteLength);
    +}
    +
    +static bool
    +ResizeArrayBuffer(JSContext* cx, Handle buffer, uint32_t newByteLength)
    +{
    +    if (!buffer->isResizable())
    +        return ReportArrayBufferNotResizable(cx);
    +
    +    if (buffer->isDetached()) {
    +        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_DETACHED);
    +        return false;
    +    }
    +
    +    if (newByteLength > buffer->maxByteLength())
    +        return ReportArrayBufferLengthOutOfRange(cx);
    +
    +    if (!buffer->isPlain() || buffer->isPreparedForAsmJS() || buffer->forInlineTypedObject())
    +        return ReportArrayBufferCannotDetach(cx);
    +
    +    if (newByteLength == buffer->byteLength())
    +        return true;
    +
    +    ArrayBufferObject::BufferContents newContents = AllocateArrayBufferContents(cx, newByteLength);
    +    if (!newContents)
    +        return false;
    +
    +    uint32_t copyLength = std::min(newByteLength, buffer->byteLength());
    +    if (copyLength > 0)
    +        memcpy(newContents.data(), buffer->dataPointer(), copyLength);
    +
    +    buffer->changeContentsForResize(cx, newContents, ArrayBufferObject::OwnsData, newByteLength);
    +    return true;
    +}
    +
    +bool
    +ArrayBufferObject::fun_resize_impl(JSContext* cx, const CallArgs& args)
    +{
    +    MOZ_ASSERT(IsArrayBuffer(args.thisv()));
    +
    +    Rooted buffer(cx, &args.thisv().toObject().as());
    +    if (!buffer->isResizable())
    +        return ReportArrayBufferNotResizable(cx);
    +
    +    uint64_t newByteLength;
    +    if (!ToIndex(cx, args.get(0), &newByteLength))
    +        return false;
    +    if (newByteLength > INT32_MAX)
    +        return ReportArrayBufferLengthOutOfRange(cx);
    +
    +    if (!ResizeArrayBuffer(cx, buffer, uint32_t(newByteLength)))
    +        return false;
    +
    +    args.rval().setUndefined();
    +    return true;
    +}
    +
    +bool
    +ArrayBufferObject::fun_resize(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    return CallNonGenericMethod(cx, args);
    +}
    +
    +static bool
    +ArrayBufferTransfer(JSContext* cx, const CallArgs& args, bool preserveResizability)
    +{
    +    MOZ_ASSERT(IsArrayBuffer(args.thisv()));
    +    Rooted buffer(cx, &args.thisv().toObject().as());
    +
    +    uint32_t newByteLength = buffer->byteLength();
    +    if (args.hasDefined(0)) {
    +        uint64_t newLength;
    +        if (!ToIndex(cx, args.get(0), &newLength))
    +            return false;
    +        if (newLength > INT32_MAX)
    +            return ReportArrayBufferLengthOutOfRange(cx);
    +        newByteLength = uint32_t(newLength);
    +    }
    +
    +    if (buffer->isDetached()) {
    +        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_DETACHED);
    +        return false;
    +    }
    +
    +    if (buffer->isWasm() || buffer->isPreparedForAsmJS())
    +        return ReportArrayBufferCannotDetach(cx);
    +
    +    bool newResizable = preserveResizability && buffer->isResizable();
    +    uint32_t newMaxByteLength = newResizable ? buffer->maxByteLength() : newByteLength;
    +    if (newResizable && newByteLength > newMaxByteLength)
    +        return ReportArrayBufferLengthOutOfRange(cx);
    +
    +    Rooted newBuffer(cx,
    +        ArrayBufferObject::create(cx, newByteLength, ArrayBufferObject::BufferContents::createPlain(nullptr),
    +                                  ArrayBufferObject::OwnsData, nullptr, GenericObject,
    +                                  newMaxByteLength, newResizable));
    +    if (!newBuffer)
    +        return false;
    +
    +    uint32_t copyLength = std::min(newByteLength, buffer->byteLength());
    +    if (copyLength > 0)
    +        memcpy(newBuffer->dataPointer(), buffer->dataPointer(), copyLength);
    +
    +    ArrayBufferObject::BufferContents detachedContents =
    +        buffer->hasStealableContents() ? ArrayBufferObject::BufferContents::createPlain(nullptr)
    +                                       : buffer->contents();
    +    ArrayBufferObject::detach(cx, buffer, detachedContents);
    +
    +    args.rval().setObject(*newBuffer);
    +    return true;
    +}
    +
    +bool
    +ArrayBufferObject::fun_transfer_impl(JSContext* cx, const CallArgs& args)
    +{
    +    return ArrayBufferTransfer(cx, args, true);
    +}
    +
    +bool
    +ArrayBufferObject::fun_transfer(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    return CallNonGenericMethod(cx, args);
    +}
    +
    +bool
    +ArrayBufferObject::fun_transferToFixedLength_impl(JSContext* cx, const CallArgs& args)
    +{
    +    return ArrayBufferTransfer(cx, args, false);
    +}
    +
    +bool
    +ArrayBufferObject::fun_transferToFixedLength(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    return CallNonGenericMethod(cx, args);
    +}
    +
     /*
      * Wasm Raw Buf Linear Memory Structure
      *
    @@ -887,6 +1195,14 @@ ArrayBufferObject::byteLength() const
         return getSlot(BYTE_LENGTH_SLOT).toInt32();
     }
     
    +uint32_t
    +ArrayBufferObject::maxByteLength() const
    +{
    +    if (!isResizable())
    +        return byteLength();
    +    return getSlot(MAX_BYTE_LENGTH_SLOT).toInt32();
    +}
    +
     void
     ArrayBufferObject::setByteLength(uint32_t length)
     {
    @@ -1035,9 +1351,12 @@ ArrayBufferObject*
     ArrayBufferObject::create(JSContext* cx, uint32_t nbytes, BufferContents contents,
                               OwnsState ownsState /* = OwnsData */,
                               HandleObject proto /* = nullptr */,
    -                          NewObjectKind newKind /* = GenericObject */)
    +                          NewObjectKind newKind /* = GenericObject */,
    +                          uint32_t maxByteLength /* = 0 */,
    +                          bool resizable /* = false */)
     {
         MOZ_ASSERT_IF(contents.kind() == MAPPED, contents);
    +    MOZ_ASSERT_IF(resizable, maxByteLength >= nbytes);
     
         // 24.1.1.1, step 3 (Inlined 6.2.6.1 CreateByteDataBlock, step 2).
         // Refuse to allocate too large buffers, currently limited to ~2 GiB.
    @@ -1068,7 +1387,7 @@ ArrayBufferObject::create(JSContext* cx, uint32_t nbytes, BufferContents content
             MOZ_ASSERT(ownsState == OwnsData);
             size_t usableSlots = NativeObject::MAX_FIXED_SLOTS - reservedSlots;
             if (nbytes <= usableSlots * sizeof(Value)) {
    -            int newSlots = (nbytes - 1) / sizeof(Value) + 1;
    +            int newSlots = nbytes == 0 ? 0 : (nbytes - 1) / sizeof(Value) + 1;
                 MOZ_ASSERT(int(nbytes) <= newSlots * int(sizeof(Value)));
                 nslots = reservedSlots + newSlots;
                 contents = BufferContents::createPlain(nullptr);
    @@ -1097,10 +1416,11 @@ ArrayBufferObject::create(JSContext* cx, uint32_t nbytes, BufferContents content
     
         if (!contents) {
             void* data = obj->inlineDataPointer();
    -        js_memset(data, 0, nbytes);
    -        obj->initialize(nbytes, BufferContents::createPlain(data), DoesntOwnData);
    +        memset(data, 0, nbytes);
    +        obj->initialize(nbytes, BufferContents::createPlain(data), DoesntOwnData,
    +                        maxByteLength, resizable);
         } else {
    -        obj->initialize(nbytes, contents, ownsState);
    +        obj->initialize(nbytes, contents, ownsState, maxByteLength, resizable);
         }
     
         return obj;
    diff --git a/js/src/vm/ArrayBufferObject.h b/js/src/vm/ArrayBufferObject.h
    index f4010c6c77..d0d83c431d 100644
    --- a/js/src/vm/ArrayBufferObject.h
    +++ b/js/src/vm/ArrayBufferObject.h
    @@ -128,15 +128,22 @@ typedef MutableHandle MutableHandleArrayBufferObj
     class ArrayBufferObject : public ArrayBufferObjectMaybeShared
     {
         static bool byteLengthGetterImpl(JSContext* cx, const CallArgs& args);
    +    static bool maxByteLengthGetterImpl(JSContext* cx, const CallArgs& args);
    +    static bool resizableGetterImpl(JSContext* cx, const CallArgs& args);
    +    static bool detachedGetterImpl(JSContext* cx, const CallArgs& args);
         static bool fun_slice_impl(JSContext* cx, const CallArgs& args);
    +    static bool fun_resize_impl(JSContext* cx, const CallArgs& args);
    +    static bool fun_transfer_impl(JSContext* cx, const CallArgs& args);
    +    static bool fun_transferToFixedLength_impl(JSContext* cx, const CallArgs& args);
     
       public:
         static const uint8_t DATA_SLOT = 0;
         static const uint8_t BYTE_LENGTH_SLOT = 1;
         static const uint8_t FIRST_VIEW_SLOT = 2;
         static const uint8_t FLAGS_SLOT = 3;
    +    static const uint8_t MAX_BYTE_LENGTH_SLOT = 4;
     
    -    static const uint8_t RESERVED_SLOTS = 4;
    +    static const uint8_t RESERVED_SLOTS = 5;
     
         static const size_t ARRAY_BUFFER_ALIGNMENT = 8;
     
    @@ -189,7 +196,11 @@ class ArrayBufferObject : public ArrayBufferObjectMaybeShared
     
             // This PLAIN or WASM buffer has been prepared for asm.js and cannot
             // henceforth be transferred/detached.
    -        FOR_ASMJS           = 0x40
    +        FOR_ASMJS           = 0x40,
    +
    +        // This buffer was created with [[ArrayBufferMaxByteLength]] and can
    +        // be resized up to that maximum.
    +        RESIZABLE           = 0x80
         };
     
         static_assert(JS_ARRAYBUFFER_DETACHED_FLAG == DETACHED,
    @@ -230,8 +241,14 @@ class ArrayBufferObject : public ArrayBufferObjectMaybeShared
         static const Class class_;
     
         static bool byteLengthGetter(JSContext* cx, unsigned argc, Value* vp);
    +    static bool maxByteLengthGetter(JSContext* cx, unsigned argc, Value* vp);
    +    static bool resizableGetter(JSContext* cx, unsigned argc, Value* vp);
    +    static bool detachedGetter(JSContext* cx, unsigned argc, Value* vp);
     
         static bool fun_slice(JSContext* cx, unsigned argc, Value* vp);
    +    static bool fun_resize(JSContext* cx, unsigned argc, Value* vp);
    +    static bool fun_transfer(JSContext* cx, unsigned argc, Value* vp);
    +    static bool fun_transferToFixedLength(JSContext* cx, unsigned argc, Value* vp);
     
         static bool fun_isView(JSContext* cx, unsigned argc, Value* vp);
     
    @@ -243,7 +260,9 @@ class ArrayBufferObject : public ArrayBufferObjectMaybeShared
                                          BufferContents contents,
                                          OwnsState ownsState = OwnsData,
                                          HandleObject proto = nullptr,
    -                                     NewObjectKind newKind = GenericObject);
    +                                     NewObjectKind newKind = GenericObject,
    +                                     uint32_t maxByteLength = 0,
    +                                     bool resizable = false);
         static ArrayBufferObject* create(JSContext* cx, uint32_t nbytes,
                                          HandleObject proto = nullptr,
                                          NewObjectKind newKind = GenericObject);
    @@ -294,6 +313,8 @@ class ArrayBufferObject : public ArrayBufferObjectMaybeShared
     
         void setNewData(FreeOp* fop, BufferContents newContents, OwnsState ownsState);
         void changeContents(JSContext* cx, BufferContents newContents, OwnsState ownsState);
    +    void changeContentsForResize(JSContext* cx, BufferContents newContents,
    +                                 OwnsState ownsState, uint32_t newByteLength);
     
         // Detach this buffer from its original memory.  (This necessarily makes
         // views of this buffer unusable for modifying that original memory.)
    @@ -311,6 +332,7 @@ class ArrayBufferObject : public ArrayBufferObjectMaybeShared
         uint8_t* dataPointer() const;
         SharedMem dataPointerShared() const;
         uint32_t byteLength() const;
    +    uint32_t maxByteLength() const;
     
         BufferContents contents() const {
             return BufferContents(dataPointer(), bufferKind());
    @@ -334,6 +356,7 @@ class ArrayBufferObject : public ArrayBufferObjectMaybeShared
         bool isWasm() const { return bufferKind() == WASM; }
         bool isMapped() const { return bufferKind() == MAPPED; }
         bool isDetached() const { return flags() & DETACHED; }
    +    bool isResizable() const { return flags() & RESIZABLE; }
         bool isPreparedForAsmJS() const { return flags() & FOR_ASMJS; }
     
         // WebAssembly support:
    @@ -391,12 +414,17 @@ class ArrayBufferObject : public ArrayBufferObjectMaybeShared
     
         void setIsDetached() { setFlags(flags() | DETACHED); }
         void setIsPreparedForAsmJS() { setFlags(flags() | FOR_ASMJS); }
    +    void setIsResizable() { setFlags(flags() | RESIZABLE); }
     
    -    void initialize(size_t byteLength, BufferContents contents, OwnsState ownsState) {
    +    void initialize(size_t byteLength, BufferContents contents, OwnsState ownsState,
    +                    uint32_t maxByteLength = 0, bool resizable = false) {
             setByteLength(byteLength);
             setFlags(0);
    +        setFixedSlot(MAX_BYTE_LENGTH_SLOT, Int32Value(maxByteLength ? maxByteLength : byteLength));
             setFirstView(nullptr);
             setDataPointer(contents, ownsState);
    +        if (resizable)
    +            setIsResizable();
         }
     
         // Note: initialize() may be called after initEmpty(); initEmpty() must
    @@ -404,6 +432,7 @@ class ArrayBufferObject : public ArrayBufferObjectMaybeShared
         void initEmpty() {
             setByteLength(0);
             setFlags(0);
    +        setFixedSlot(MAX_BYTE_LENGTH_SLOT, Int32Value(0));
             setFirstView(nullptr);
             setDataPointer(BufferContents::createPlain(nullptr), DoesntOwnData);
         }
    diff --git a/js/src/vm/CommonPropertyNames.h b/js/src/vm/CommonPropertyNames.h
    index 6edd49c6c0..82d49b201a 100644
    --- a/js/src/vm/CommonPropertyNames.h
    +++ b/js/src/vm/CommonPropertyNames.h
    @@ -248,6 +248,7 @@
         macro(lookupSetter, lookupSetter, "__lookupSetter__") \
         macro(MapConstructorInit, MapConstructorInit, "MapConstructorInit") \
         macro(MapIterator, MapIterator, "Map Iterator") \
    +    macro(maxByteLength, maxByteLength, "maxByteLength") \
         macro(maximumFractionDigits, maximumFractionDigits, "maximumFractionDigits") \
         macro(maximumSignificantDigits, maximumSignificantDigits, "maximumSignificantDigits") \
         macro(message, message, "message") \
    
    From f92b3d152e3120187cafeeb2577fddac989c8abb Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 15 May 2026 18:48:12 -0400
    Subject: [PATCH 52/72] Allow symbols as weak collection keys
    
    ---
     js/src/builtin/WeakMapObject.cpp           | 223 ++++++++++++++++-----
     js/src/builtin/WeakMapObject.h             |   6 +-
     js/src/builtin/WeakSet.js                  |   6 +-
     js/src/builtin/WeakSetObject.cpp           |   7 +-
     js/src/jsweakmap.h                         |  38 ++++
     js/src/tests/non262/WeakMap/symbol-keys.js |  36 ++++
     js/src/vm/SelfHosting.cpp                  |  10 +
     7 files changed, 266 insertions(+), 60 deletions(-)
     create mode 100644 js/src/tests/non262/WeakMap/symbol-keys.js
    
    diff --git a/js/src/builtin/WeakMapObject.cpp b/js/src/builtin/WeakMapObject.cpp
    index 82b6ef1a7c..d68b9e05fd 100644
    --- a/js/src/builtin/WeakMapObject.cpp
    +++ b/js/src/builtin/WeakMapObject.cpp
    @@ -8,6 +8,7 @@
     #include "jsapi.h"
     #include "jscntxt.h"
     
    +#include "builtin/WeakRefObject.h"
     #include "vm/SelfHosting.h"
     
     #include "vm/Interpreter-inl.h"
    @@ -21,21 +22,80 @@ IsWeakMap(HandleValue v)
         return v.isObject() && v.toObject().is();
     }
     
    +struct WeakMapObject::Data
    +{
    +    ObjectValueMap objectMap;
    +    SymbolValueMap symbolMap;
    +
    +    Data(JSContext* cx, JSObject* owner)
    +      : objectMap(cx, owner),
    +        symbolMap(cx, owner)
    +    {}
    +
    +    bool init() {
    +        return objectMap.init() && symbolMap.init();
    +    }
    +};
    +
    +ObjectValueMap*
    +WeakMapObject::getMap()
    +{
    +    Data* data = getData();
    +    return data ? &data->objectMap : nullptr;
    +}
    +
    +SymbolValueMap*
    +WeakMapObject::getSymbolMap()
    +{
    +    Data* data = getData();
    +    return data ? &data->symbolMap : nullptr;
    +}
    +
    +static bool
    +EnsureWeakMapData(JSContext* cx, Handle mapObj)
    +{
    +    if (mapObj->getData())
    +        return true;
    +
    +    auto data = cx->make_unique(cx, mapObj.get());
    +    if (!data)
    +        return false;
    +
    +    if (!data->init()) {
    +        JS_ReportOutOfMemory(cx);
    +        return false;
    +    }
    +
    +    mapObj->setPrivate(data.release());
    +    return true;
    +}
    +
     MOZ_ALWAYS_INLINE bool
     WeakMap_has_impl(JSContext* cx, const CallArgs& args)
     {
         MOZ_ASSERT(IsWeakMap(args.thisv()));
     
    -    if (!args.get(0).isObject()) {
    +    if (!CanBeHeldWeakly(args.get(0))) {
             args.rval().setBoolean(false);
             return true;
         }
     
    -    if (ObjectValueMap* map = args.thisv().toObject().as().getMap()) {
    -        JSObject* key = &args[0].toObject();
    -        if (map->has(key)) {
    -            args.rval().setBoolean(true);
    -            return true;
    +    WeakMapObject& weakMap = args.thisv().toObject().as();
    +    if (args.get(0).isObject()) {
    +        if (ObjectValueMap* map = weakMap.getMap()) {
    +            JSObject* key = &args[0].toObject();
    +            if (map->has(key)) {
    +                args.rval().setBoolean(true);
    +                return true;
    +            }
    +        }
    +    } else {
    +        if (SymbolValueMap* map = weakMap.getSymbolMap()) {
    +            JS::Symbol* key = args[0].toSymbol();
    +            if (map->has(key)) {
    +                args.rval().setBoolean(true);
    +                return true;
    +            }
             }
         }
     
    @@ -55,16 +115,27 @@ WeakMap_get_impl(JSContext* cx, const CallArgs& args)
     {
         MOZ_ASSERT(IsWeakMap(args.thisv()));
     
    -    if (!args.get(0).isObject()) {
    +    if (!CanBeHeldWeakly(args.get(0))) {
             args.rval().setUndefined();
             return true;
         }
     
    -    if (ObjectValueMap* map = args.thisv().toObject().as().getMap()) {
    -        JSObject* key = &args[0].toObject();
    -        if (ObjectValueMap::Ptr ptr = map->lookup(key)) {
    -            args.rval().set(ptr->value());
    -            return true;
    +    WeakMapObject& weakMap = args.thisv().toObject().as();
    +    if (args.get(0).isObject()) {
    +        if (ObjectValueMap* map = weakMap.getMap()) {
    +            JSObject* key = &args[0].toObject();
    +            if (ObjectValueMap::Ptr ptr = map->lookup(key)) {
    +                args.rval().set(ptr->value());
    +                return true;
    +            }
    +        }
    +    } else {
    +        if (SymbolValueMap* map = weakMap.getSymbolMap()) {
    +            JS::Symbol* key = args[0].toSymbol();
    +            if (SymbolValueMap::Ptr ptr = map->lookup(key)) {
    +                args.rval().set(ptr->value());
    +                return true;
    +            }
             }
         }
     
    @@ -84,17 +155,29 @@ WeakMap_delete_impl(JSContext* cx, const CallArgs& args)
     {
         MOZ_ASSERT(IsWeakMap(args.thisv()));
     
    -    if (!args.get(0).isObject()) {
    +    if (!CanBeHeldWeakly(args.get(0))) {
             args.rval().setBoolean(false);
             return true;
         }
     
    -    if (ObjectValueMap* map = args.thisv().toObject().as().getMap()) {
    -        JSObject* key = &args[0].toObject();
    -        if (ObjectValueMap::Ptr ptr = map->lookup(key)) {
    -            map->remove(ptr);
    -            args.rval().setBoolean(true);
    -            return true;
    +    WeakMapObject& weakMap = args.thisv().toObject().as();
    +    if (args.get(0).isObject()) {
    +        if (ObjectValueMap* map = weakMap.getMap()) {
    +            JSObject* key = &args[0].toObject();
    +            if (ObjectValueMap::Ptr ptr = map->lookup(key)) {
    +                map->remove(ptr);
    +                args.rval().setBoolean(true);
    +                return true;
    +            }
    +        }
    +    } else {
    +        if (SymbolValueMap* map = weakMap.getSymbolMap()) {
    +            JS::Symbol* key = args[0].toSymbol();
    +            if (SymbolValueMap::Ptr ptr = map->lookup(key)) {
    +                map->remove(ptr);
    +                args.rval().setBoolean(true);
    +                return true;
    +            }
             }
         }
     
    @@ -126,22 +209,13 @@ TryPreserveReflector(JSContext* cx, HandleObject obj)
         return true;
     }
     
    -static MOZ_ALWAYS_INLINE bool
    -SetWeakMapEntryInternal(JSContext* cx, Handle mapObj,
    -                        HandleObject key, HandleValue value)
    +static bool
    +SetWeakMapObjectEntryInternal(JSContext* cx, Handle mapObj,
    +                              HandleObject key, HandleValue value)
     {
    +    if (!EnsureWeakMapData(cx, mapObj))
    +        return false;
         ObjectValueMap* map = mapObj->getMap();
    -    if (!map) {
    -        auto newMap = cx->make_unique(cx, mapObj.get());
    -        if (!newMap)
    -            return false;
    -        if (!newMap->init()) {
    -            JS_ReportOutOfMemory(cx);
    -            return false;
    -        }
    -        map = newMap.release();
    -        mapObj->setPrivate(map);
    -    }
     
         // Preserve wrapped native keys to prevent wrapper optimization.
         if (!TryPreserveReflector(cx, key))
    @@ -162,13 +236,28 @@ SetWeakMapEntryInternal(JSContext* cx, Handle mapObj,
         return true;
     }
     
    -MOZ_ALWAYS_INLINE bool
    -WeakMap_set_impl(JSContext* cx, const CallArgs& args)
    +static bool
    +SetWeakMapSymbolEntryInternal(JSContext* cx, Handle mapObj,
    +                              Handle key, HandleValue value)
     {
    -    MOZ_ASSERT(IsWeakMap(args.thisv()));
    +    if (!EnsureWeakMapData(cx, mapObj))
    +        return false;
    +    SymbolValueMap* map = mapObj->getSymbolMap();
     
    -    if (!args.get(0).isObject()) {
    -        UniqueChars bytes = DecompileValueGenerator(cx, JSDVG_SEARCH_STACK, args.get(0), nullptr);
    +    MOZ_ASSERT_IF(value.isObject(), value.toObject().compartment() == mapObj->compartment());
    +    if (!map->put(key, value)) {
    +        JS_ReportOutOfMemory(cx);
    +        return false;
    +    }
    +    return true;
    +}
    +
    +static MOZ_ALWAYS_INLINE bool
    +SetWeakMapEntryInternal(JSContext* cx, Handle mapObj,
    +                        HandleValue key, HandleValue value)
    +{
    +    if (!CanBeHeldWeakly(key)) {
    +        UniqueChars bytes = DecompileValueGenerator(cx, JSDVG_SEARCH_STACK, key, nullptr);
             if (!bytes)
                 return false;
             JS_ReportErrorNumberLatin1(cx, GetErrorMessage, nullptr, JSMSG_NOT_NONNULL_OBJECT,
    @@ -176,11 +265,24 @@ WeakMap_set_impl(JSContext* cx, const CallArgs& args)
             return false;
         }
     
    -    RootedObject key(cx, &args[0].toObject());
    +    if (key.isObject()) {
    +        RootedObject objectKey(cx, &key.toObject());
    +        return SetWeakMapObjectEntryInternal(cx, mapObj, objectKey, value);
    +    }
    +
    +    Rooted symbolKey(cx, key.toSymbol());
    +    return SetWeakMapSymbolEntryInternal(cx, mapObj, symbolKey, value);
    +}
    +
    +MOZ_ALWAYS_INLINE bool
    +WeakMap_set_impl(JSContext* cx, const CallArgs& args)
    +{
    +    MOZ_ASSERT(IsWeakMap(args.thisv()));
    +
         Rooted thisObj(cx, &args.thisv().toObject());
         Rooted map(cx, &thisObj->as());
     
    -    if (!SetWeakMapEntryInternal(cx, map, key, args.get(1)))
    +    if (!SetWeakMapEntryInternal(cx, map, args.get(0), args.get(1)))
             return false;
         args.rval().set(args.thisv());
         return true;
    @@ -193,6 +295,13 @@ js::WeakMap_set(JSContext* cx, unsigned argc, Value* vp)
         return CallNonGenericMethod(cx, args);
     }
     
    +bool
    +js::SetWeakMapEntryValue(JSContext* cx, HandleObject mapObj, HandleValue key, HandleValue val)
    +{
    +    Rooted rootedMap(cx, &mapObj->as());
    +    return SetWeakMapEntryInternal(cx, rootedMap, key, val);
    +}
    +
     JS_FRIEND_API(bool)
     JS_NondeterministicGetWeakMapKeys(JSContext* cx, HandleObject objArg, MutableHandleObject ret)
     {
    @@ -205,11 +314,11 @@ JS_NondeterministicGetWeakMapKeys(JSContext* cx, HandleObject objArg, MutableHan
         RootedObject arr(cx, NewDenseEmptyArray(cx));
         if (!arr)
             return false;
    -    ObjectValueMap* map = obj->as().getMap();
    -    if (map) {
    +    WeakMapObject::Data* data = obj->as().getData();
    +    if (data) {
             // Prevent GC from mutating the weakmap while iterating.
             AutoSuppressGC suppress(cx);
    -        for (ObjectValueMap::Base::Range r = map->all(); !r.empty(); r.popFront()) {
    +        for (ObjectValueMap::Base::Range r = data->objectMap.all(); !r.empty(); r.popFront()) {
                 JS::ExposeObjectToActiveJS(r.front().key());
                 RootedObject key(cx, r.front().key());
                 if (!cx->compartment()->wrap(cx, &key))
    @@ -217,6 +326,14 @@ JS_NondeterministicGetWeakMapKeys(JSContext* cx, HandleObject objArg, MutableHan
                 if (!NewbornArrayPush(cx, arr, ObjectValue(*key)))
                     return false;
             }
    +        for (SymbolValueMap::Base::Range r = data->symbolMap.all(); !r.empty(); r.popFront()) {
    +            gc::ExposeGCThingToActiveJS(JS::GCCellPtr(r.front().key().get()));
    +            RootedValue key(cx, SymbolValue(r.front().key()));
    +            if (!cx->compartment()->wrap(cx, &key))
    +                return false;
    +            if (!NewbornArrayPush(cx, arr, key))
    +                return false;
    +        }
         }
         ret.set(arr);
         return true;
    @@ -225,21 +342,23 @@ JS_NondeterministicGetWeakMapKeys(JSContext* cx, HandleObject objArg, MutableHan
     static void
     WeakMap_mark(JSTracer* trc, JSObject* obj)
     {
    -    if (ObjectValueMap* map = obj->as().getMap())
    -        map->trace(trc);
    +    if (WeakMapObject::Data* data = obj->as().getData()) {
    +        data->objectMap.trace(trc);
    +        data->symbolMap.trace(trc);
    +    }
     }
     
     static void
     WeakMap_finalize(FreeOp* fop, JSObject* obj)
     {
         MOZ_ASSERT(fop->maybeOffMainThread());
    -    if (ObjectValueMap* map = obj->as().getMap()) {
    +    if (WeakMapObject::Data* data = obj->as().getData()) {
     #ifdef DEBUG
    -        map->~ObjectValueMap();
    -        memset(static_cast(map), 0xdc, sizeof(*map));
    -        fop->free_(map);
    +        data->~Data();
    +        memset(static_cast(data), 0xdc, sizeof(*data));
    +        fop->free_(data);
     #else
    -        fop->delete_(map);
    +        fop->delete_(data);
     #endif
         }
     }
    @@ -282,7 +401,8 @@ JS::SetWeakMapEntry(JSContext* cx, HandleObject mapObj, HandleObject key,
         CHECK_REQUEST(cx);
         assertSameCompartment(cx, key, val);
         Rooted rootedMap(cx, &mapObj->as());
    -    return SetWeakMapEntryInternal(cx, rootedMap, key, val);
    +    RootedValue keyValue(cx, ObjectValue(*key));
    +    return SetWeakMapEntryInternal(cx, rootedMap, keyValue, val);
     }
     
     static bool
    @@ -386,4 +506,3 @@ js::InitBareWeakMapCtor(JSContext* cx, HandleObject obj)
     {
         return InitWeakMapClass(cx, obj, false);
     }
    -
    diff --git a/js/src/builtin/WeakMapObject.h b/js/src/builtin/WeakMapObject.h
    index 507758d2fa..f19ad1d4df 100644
    --- a/js/src/builtin/WeakMapObject.h
    +++ b/js/src/builtin/WeakMapObject.h
    @@ -16,7 +16,11 @@ class WeakMapObject : public NativeObject
       public:
         static const Class class_;
     
    -    ObjectValueMap* getMap() { return static_cast(getPrivate()); }
    +    struct Data;
    +
    +    Data* getData() { return static_cast(getPrivate()); }
    +    ObjectValueMap* getMap();
    +    SymbolValueMap* getSymbolMap();
     };
     
     } // namespace js
    diff --git a/js/src/builtin/WeakSet.js b/js/src/builtin/WeakSet.js
    index b16b4634dd..88f7929c72 100644
    --- a/js/src/builtin/WeakSet.js
    +++ b/js/src/builtin/WeakSet.js
    @@ -32,7 +32,7 @@ function WeakSet_add(value) {
             ThrowTypeError(JSMSG_INCOMPATIBLE_PROTO, "WeakSet", "add", typeof S);
     
         // Step 5.
    -    if (!IsObject(value))
    +    if (!CanBeHeldWeakly(value))
             ThrowTypeError(JSMSG_NOT_NONNULL_OBJECT, DecompileArg(0, value));
     
         // Steps 7-8.
    @@ -55,7 +55,7 @@ function WeakSet_delete(value) {
             ThrowTypeError(JSMSG_INCOMPATIBLE_PROTO, "WeakSet", "delete", typeof S);
     
         // Step 5.
    -    if (!IsObject(value))
    +    if (!CanBeHeldWeakly(value))
             return false;
     
         // Steps 7-8.
    @@ -75,7 +75,7 @@ function WeakSet_has(value) {
             ThrowTypeError(JSMSG_INCOMPATIBLE_PROTO, "WeakSet", "has", typeof S);
     
         // Step 6.
    -    if (!IsObject(value))
    +    if (!CanBeHeldWeakly(value))
             return false;
     
         // Steps 7-8.
    diff --git a/js/src/builtin/WeakSetObject.cpp b/js/src/builtin/WeakSetObject.cpp
    index bb9708f6f9..055f6b1abd 100644
    --- a/js/src/builtin/WeakSetObject.cpp
    +++ b/js/src/builtin/WeakSetObject.cpp
    @@ -12,6 +12,7 @@
     #include "builtin/MapObject.h"
     #include "builtin/SelfHostingDefines.h"
     #include "builtin/WeakMapObject.h"
    +#include "builtin/WeakRefObject.h"
     #include "vm/GlobalObject.h"
     #include "vm/SelfHosting.h"
     
    @@ -108,7 +109,6 @@ WeakSetObject::construct(JSContext* cx, unsigned argc, Value* vp)
     
             if (optimized) {
                 RootedValue keyVal(cx);
    -            RootedObject keyObject(cx);
                 RootedValue placeholder(cx, BooleanValue(true));
                 RootedObject map(cx, &obj->getReservedSlot(WEAKSET_MAP_SLOT).toObject());
                 RootedArrayObject array(cx, &iterable.toObject().as());
    @@ -116,7 +116,7 @@ WeakSetObject::construct(JSContext* cx, unsigned argc, Value* vp)
                     keyVal.set(array->getDenseElement(index));
                     MOZ_ASSERT(!keyVal.isMagic(JS_ELEMENTS_HOLE));
     
    -                if (keyVal.isPrimitive()) {
    +                if (!CanBeHeldWeakly(keyVal)) {
                         UniqueChars bytes =
                             DecompileValueGenerator(cx, JSDVG_SEARCH_STACK, keyVal, nullptr);
                         if (!bytes)
    @@ -126,8 +126,7 @@ WeakSetObject::construct(JSContext* cx, unsigned argc, Value* vp)
                         return false;
                     }
     
    -                keyObject = &keyVal.toObject();
    -                if (!SetWeakMapEntry(cx, map, keyObject, placeholder))
    +                if (!SetWeakMapEntryValue(cx, map, keyVal, placeholder))
                         return false;
                 }
             } else {
    diff --git a/js/src/jsweakmap.h b/js/src/jsweakmap.h
    index c13baa7825..ec0fd8ddc6 100644
    --- a/js/src/jsweakmap.h
    +++ b/js/src/jsweakmap.h
    @@ -16,11 +16,25 @@
     #include "gc/Marking.h"
     #include "gc/StoreBuffer.h"
     #include "js/HashTable.h"
    +#include "vm/Symbol.h"
     
     namespace js {
     
     class WeakMapBase;
     
    +template <>
    +struct MovableCellHasher
    +{
    +    using Key = JS::Symbol*;
    +    using Lookup = JS::Symbol*;
    +
    +    static bool hasHash(const Lookup& l) { return true; }
    +    static bool ensureHash(const Lookup& l) { return true; }
    +    static HashNumber hash(const Lookup& l) { return l->hash(); }
    +    static bool match(const Key& k, const Lookup& l) { return k == l; }
    +    static void rekey(Key& k, const Key& newKey) { k = newKey; }
    +};
    +
     // A subclass template of js::HashMap whose keys and values may be garbage-collected. When
     // a key is collected, the table entry disappears, dropping its reference to the value.
     //
    @@ -296,9 +310,16 @@ class WeakMap : public HashMap,
             return nullptr;
         }
     
    +    JSObject* getDelegate(JS::Symbol* sym) const {
    +        return nullptr;
    +    }
    +
       private:
         void exposeGCThingToActiveJS(const JS::Value& v) const { JS::ExposeValueToActiveJS(v); }
         void exposeGCThingToActiveJS(JSObject* obj) const { JS::ExposeObjectToActiveJS(obj); }
    +    void exposeGCThingToActiveJS(JS::Symbol* sym) const {
    +        gc::ExposeGCThingToActiveJS(JS::GCCellPtr(sym));
    +    }
     
         bool keyNeedsMark(JSObject* key) const {
             JSObject* delegate = getDelegate(key);
    @@ -313,6 +334,10 @@ class WeakMap : public HashMap,
             return false;
         }
     
    +    bool keyNeedsMark(JS::Symbol* sym) const {
    +        return false;
    +    }
    +
         bool findZoneEdges() override {
             // This is overridden by ObjectValueMap.
             return true;
    @@ -378,6 +403,9 @@ WeakMap_set(JSContext* cx, unsigned argc, Value* vp);
     extern bool
     WeakMap_delete(JSContext* cx, unsigned argc, Value* vp);
     
    +extern bool
    +SetWeakMapEntryValue(JSContext* cx, HandleObject mapObj, HandleValue key, HandleValue val);
    +
     extern JSObject*
     InitWeakMapClass(JSContext* cx, HandleObject obj);
     
    @@ -394,6 +422,16 @@ class ObjectValueMap : public WeakMap, HeapPtr,
         virtual bool findZoneEdges();
     };
     
    +class SymbolValueMap : public WeakMap, HeapPtr,
    +                                      MovableCellHasher>>
    +{
    +  public:
    +    SymbolValueMap(JSContext* cx, JSObject* obj)
    +      : WeakMap, HeapPtr,
    +                MovableCellHasher>>(cx, obj)
    +    {}
    +};
    +
     
     // Generic weak map for mapping objects to other objects.
     class ObjectWeakMap
    diff --git a/js/src/tests/non262/WeakMap/symbol-keys.js b/js/src/tests/non262/WeakMap/symbol-keys.js
    new file mode 100644
    index 0000000000..0edb542974
    --- /dev/null
    +++ b/js/src/tests/non262/WeakMap/symbol-keys.js
    @@ -0,0 +1,36 @@
    +var key = Symbol("weak");
    +var map = new WeakMap();
    +assertEq(map.has(key), false);
    +assertEq(map.get(key), undefined);
    +assertEq(map.set(key, 13), map);
    +assertEq(map.has(key), true);
    +assertEq(map.get(key), 13);
    +assertEq(map.delete(key), true);
    +assertEq(map.has(key), false);
    +
    +var constructedKey = Symbol("constructed");
    +var constructed = new WeakMap([[constructedKey, 7]]);
    +assertEq(constructed.get(constructedKey), 7);
    +
    +var registered = Symbol.for("registered");
    +assertEq(map.has(registered), false);
    +assertEq(map.get(registered), undefined);
    +assertEq(map.delete(registered), false);
    +assertThrowsInstanceOf(() => map.set(registered, 1), TypeError);
    +assertThrowsInstanceOf(() => new WeakMap([[registered, 1]]), TypeError);
    +
    +var setKey = Symbol("set");
    +var set = new WeakSet([setKey]);
    +assertEq(set.has(setKey), true);
    +assertEq(set.delete(setKey), true);
    +assertEq(set.has(setKey), false);
    +assertEq(set.add(setKey), set);
    +assertEq(set.has(setKey), true);
    +
    +assertEq(set.has(registered), false);
    +assertEq(set.delete(registered), false);
    +assertThrowsInstanceOf(() => set.add(registered), TypeError);
    +assertThrowsInstanceOf(() => new WeakSet([registered]), TypeError);
    +
    +if (typeof reportCompare === "function")
    +  reportCompare(0, 0);
    diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp
    index 840186b361..f96b2225ab 100644
    --- a/js/src/vm/SelfHosting.cpp
    +++ b/js/src/vm/SelfHosting.cpp
    @@ -38,6 +38,7 @@
     #include "builtin/SelfHostingDefines.h"
     #include "builtin/Stream.h"
     #include "builtin/TypedObject.h"
    +#include "builtin/WeakRefObject.h"
     #include "builtin/WeakSetObject.h"
     #include "gc/Marking.h"
     #include "gc/Policy.h"
    @@ -105,6 +106,14 @@ intrinsic_IsObject(JSContext* cx, unsigned argc, Value* vp)
         return true;
     }
     
    +static bool
    +intrinsic_CanBeHeldWeakly(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    args.rval().setBoolean(CanBeHeldWeakly(args.get(0)));
    +    return true;
    +}
    +
     static bool
     intrinsic_IsArray(JSContext* cx, unsigned argc, Value* vp)
     {
    @@ -2333,6 +2342,7 @@ static const JSFunctionSpec intrinsic_functions[] = {
         // Helper funtions after this point.
         JS_INLINABLE_FN("ToObject",      intrinsic_ToObject,                1,0, IntrinsicToObject),
         JS_INLINABLE_FN("IsObject",      intrinsic_IsObject,                1,0, IntrinsicIsObject),
    +    JS_FN("CanBeHeldWeakly",         intrinsic_CanBeHeldWeakly,         1,0),
         JS_INLINABLE_FN("IsArray",       intrinsic_IsArray,                 1,0, ArrayIsArray),
         JS_INLINABLE_FN("IsWrappedArrayConstructor", intrinsic_IsWrappedArrayConstructor, 1,0,
                         IntrinsicIsWrappedArrayConstructor),
    
    From 4d11dcb096257fee37c02d1342a494a488dcc79d Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 15 May 2026 19:02:03 -0400
    Subject: [PATCH 53/72] Implement growable SharedArrayBuffer
    
    ---
     js/src/js.msg                                 |   1 +
     .../non262/SharedArrayBuffer/growable.js      |  40 ++++
     js/src/vm/ArrayBufferObject.cpp               |   2 +-
     js/src/vm/SharedArrayObject.cpp               | 171 ++++++++++++++++--
     js/src/vm/SharedArrayObject.h                 |  51 +++++-
     5 files changed, 246 insertions(+), 19 deletions(-)
     create mode 100644 js/src/tests/non262/SharedArrayBuffer/growable.js
    
    diff --git a/js/src/js.msg b/js/src/js.msg
    index 499e7a1623..d9a6c98764 100644
    --- a/js/src/js.msg
    +++ b/js/src/js.msg
    @@ -561,6 +561,7 @@ MSG_DEF(JSMSG_SHORT_TYPED_ARRAY_RETURNED, 2, JSEXN_TYPEERR, "expected TypedArray
     
     // Shared array buffer
     MSG_DEF(JSMSG_SHARED_ARRAY_BAD_LENGTH,  0, JSEXN_RANGEERR, "length argument out of range")
    +MSG_DEF(JSMSG_SHARED_ARRAY_NOT_GROWABLE, 0, JSEXN_TYPEERR, "SharedArrayBuffer is not growable")
     MSG_DEF(JSMSG_NON_SHARED_ARRAY_BUFFER_RETURNED, 0, JSEXN_TYPEERR, "expected SharedArrayBuffer, but species constructor returned non-SharedArrayBuffer")
     MSG_DEF(JSMSG_SAME_SHARED_ARRAY_BUFFER_RETURNED, 0, JSEXN_TYPEERR, "expected different SharedArrayBuffer, but species constructor returned same SharedArrayBuffer")
     MSG_DEF(JSMSG_SHORT_SHARED_ARRAY_BUFFER_RETURNED, 2, JSEXN_TYPEERR, "expected SharedArrayBuffer with at least {0} bytes, but species constructor returns SharedArrayBuffer with {1} bytes")
    diff --git a/js/src/tests/non262/SharedArrayBuffer/growable.js b/js/src/tests/non262/SharedArrayBuffer/growable.js
    new file mode 100644
    index 0000000000..7b9ce85ffe
    --- /dev/null
    +++ b/js/src/tests/non262/SharedArrayBuffer/growable.js
    @@ -0,0 +1,40 @@
    +// |reftest| skip-if(!this.SharedArrayBuffer)
    +
    +if (typeof SharedArrayBuffer === "function") {
    +  const fixed = new SharedArrayBuffer(4);
    +  assertEq(fixed.byteLength, 4);
    +  assertEq(fixed.maxByteLength, 4);
    +  assertEq(fixed.growable, false);
    +  assertThrowsInstanceOf(() => fixed.grow(4), TypeError);
    +
    +  assertThrowsInstanceOf(() => new SharedArrayBuffer(-1), RangeError);
    +  assertThrowsInstanceOf(() => new SharedArrayBuffer(8, {maxByteLength: 4}), RangeError);
    +
    +  let optionGetterCalled = false;
    +  const growable = new SharedArrayBuffer(4, {
    +    get maxByteLength() {
    +      optionGetterCalled = true;
    +      return 16;
    +    }
    +  });
    +  assertEq(optionGetterCalled, true);
    +  assertEq(growable.byteLength, 4);
    +  assertEq(growable.maxByteLength, 16);
    +  assertEq(growable.growable, true);
    +
    +  const before = new Uint8Array(growable);
    +  before[0] = 37;
    +  assertEq(growable.grow(12), undefined);
    +  assertEq(growable.byteLength, 12);
    +  assertEq(growable.maxByteLength, 16);
    +
    +  const after = new Uint8Array(growable);
    +  assertEq(after.length, 12);
    +  assertEq(after[0], 37);
    +
    +  assertThrowsInstanceOf(() => growable.grow(11), RangeError);
    +  assertThrowsInstanceOf(() => growable.grow(17), RangeError);
    +}
    +
    +if (typeof reportCompare === "function")
    +  reportCompare(true, true);
    diff --git a/js/src/vm/ArrayBufferObject.cpp b/js/src/vm/ArrayBufferObject.cpp
    index 7eab0f0e24..739bd0de33 100644
    --- a/js/src/vm/ArrayBufferObject.cpp
    +++ b/js/src/vm/ArrayBufferObject.cpp
    @@ -1245,7 +1245,7 @@ js::WasmArrayBufferMaxSize(const ArrayBufferObjectMaybeShared* buf)
         if (buf->is())
             return buf->as().wasmMaxSize();
     
    -    return Some(buf->as().byteLength());
    +    return Some(buf->as().maxByteLength());
     }
     
     /* static */ bool
    diff --git a/js/src/vm/SharedArrayObject.cpp b/js/src/vm/SharedArrayObject.cpp
    index 6a3c6a91c3..a597564695 100644
    --- a/js/src/vm/SharedArrayObject.cpp
    +++ b/js/src/vm/SharedArrayObject.cpp
    @@ -8,6 +8,7 @@
     #include "mozilla/Atomics.h"
     
     #include "jsfriendapi.h"
    +#include "jsnum.h"
     #include "jsprf.h"
     
     #ifdef XP_WIN
    @@ -104,15 +105,18 @@ SharedArrayAllocSize(uint32_t length)
     }
     
     SharedArrayRawBuffer*
    -SharedArrayRawBuffer::New(JSContext* cx, uint32_t length)
    +SharedArrayRawBuffer::New(JSContext* cx, uint32_t length, uint32_t maxLength, bool growable)
     {
         // The value (uint32_t)-1 is used as a signal in various places,
         // so guard against it on principle.
         MOZ_ASSERT(length != (uint32_t)-1);
    +    MOZ_ASSERT(maxLength != (uint32_t)-1);
    +    MOZ_ASSERT(maxLength >= length);
     
         // Add a page for the header and round to a page boundary.
    -    uint32_t allocSize = SharedArrayAllocSize(length);
    -    if (allocSize <= length)
    +    uint32_t allocationLength = growable ? maxLength : length;
    +    uint32_t allocSize = SharedArrayAllocSize(allocationLength);
    +    if (allocSize <= allocationLength)
             return nullptr;
     
         // Test >= to guard against the case where multiple extant runtimes
    @@ -127,7 +131,8 @@ SharedArrayRawBuffer::New(JSContext* cx, uint32_t length)
             }
         }
     
    -    bool preparedForAsmJS = jit::JitOptions.asmJSAtomicsEnable && IsValidAsmJSHeapLength(length);
    +    bool preparedForAsmJS =
    +        !growable && jit::JitOptions.asmJSAtomicsEnable && IsValidAsmJSHeapLength(length);
     
         void* p = nullptr;
         if (preparedForAsmJS) {
    @@ -161,8 +166,9 @@ SharedArrayRawBuffer::New(JSContext* cx, uint32_t length)
     
         uint8_t* buffer = reinterpret_cast(p) + gc::SystemPageSize();
         uint8_t* base = buffer - sizeof(SharedArrayRawBuffer);
    -    SharedArrayRawBuffer* rawbuf = new (base) SharedArrayRawBuffer(buffer, length, preparedForAsmJS);
    -    MOZ_ASSERT(rawbuf->length == length); // Deallocation needs this
    +    SharedArrayRawBuffer* rawbuf =
    +        new (base) SharedArrayRawBuffer(buffer, length, maxLength, growable, preparedForAsmJS);
    +    MOZ_ASSERT(rawbuf->allocatedByteLength() == allocationLength); // Deallocation needs this.
         return rawbuf;
     }
     
    @@ -201,7 +207,7 @@ SharedArrayRawBuffer::dropReference()
         MOZ_ASSERT(p.asValue() % gc::SystemPageSize() == 0);
     
         uint8_t* address = p.unwrap(/*safe - only reference*/);
    -    uint32_t allocSize = SharedArrayAllocSize(this->length);
    +    uint32_t allocSize = SharedArrayAllocSize(this->allocatedByteLength());
     
         if (this->preparedForAsmJS) {
             uint32_t mappedSize = SharedArrayMappedSize(allocSize);
    @@ -221,6 +227,23 @@ SharedArrayRawBuffer::dropReference()
         numLive--;
     }
     
    +bool
    +SharedArrayRawBuffer::growTo(uint32_t newLength)
    +{
    +    MOZ_ASSERT(growable);
    +    MOZ_ASSERT(newLength <= maxLength);
    +
    +    for (;;) {
    +        uint32_t oldLength = length;
    +        if (newLength < oldLength)
    +            return false;
    +        if (newLength == oldLength)
    +            return true;
    +        if (length.compareExchange(oldLength, newLength))
    +            return true;
    +    }
    +}
    +
     
     MOZ_ALWAYS_INLINE bool
     SharedArrayBufferObject::byteLengthGetterImpl(JSContext* cx, const CallArgs& args)
    @@ -237,6 +260,112 @@ SharedArrayBufferObject::byteLengthGetter(JSContext* cx, unsigned argc, Value* v
         return CallNonGenericMethod(cx, args);
     }
     
    +MOZ_ALWAYS_INLINE bool
    +SharedArrayBufferObject::maxByteLengthGetterImpl(JSContext* cx, const CallArgs& args)
    +{
    +    MOZ_ASSERT(IsSharedArrayBuffer(args.thisv()));
    +    args.rval().setInt32(args.thisv().toObject().as().maxByteLength());
    +    return true;
    +}
    +
    +bool
    +SharedArrayBufferObject::maxByteLengthGetter(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    return CallNonGenericMethod(cx, args);
    +}
    +
    +MOZ_ALWAYS_INLINE bool
    +SharedArrayBufferObject::growableGetterImpl(JSContext* cx, const CallArgs& args)
    +{
    +    MOZ_ASSERT(IsSharedArrayBuffer(args.thisv()));
    +    args.rval().setBoolean(args.thisv().toObject().as().isGrowable());
    +    return true;
    +}
    +
    +bool
    +SharedArrayBufferObject::growableGetter(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    return CallNonGenericMethod(cx, args);
    +}
    +
    +static bool
    +ReportSharedArrayBufferNotGrowable(JSContext* cx)
    +{
    +    JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_SHARED_ARRAY_NOT_GROWABLE);
    +    return false;
    +}
    +
    +static bool
    +ReportSharedArrayBufferLengthOutOfRange(JSContext* cx)
    +{
    +    JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_SHARED_ARRAY_BAD_LENGTH);
    +    return false;
    +}
    +
    +static bool
    +GetSharedArrayBufferMaxByteLengthOption(JSContext* cx, HandleValue options,
    +                                        uint32_t byteLength, uint32_t* maxByteLength,
    +                                        bool* growable)
    +{
    +    *maxByteLength = byteLength;
    +    *growable = false;
    +
    +    if (!options.isObject())
    +        return true;
    +
    +    RootedObject opts(cx, &options.toObject());
    +    RootedValue maxByteLengthValue(cx);
    +    if (!GetProperty(cx, opts, opts, cx->names().maxByteLength, &maxByteLengthValue))
    +        return false;
    +
    +    if (maxByteLengthValue.isUndefined())
    +        return true;
    +
    +    uint64_t max;
    +    if (!ToIndex(cx, maxByteLengthValue, &max))
    +        return false;
    +
    +    if (max > INT32_MAX || max < byteLength)
    +        return ReportSharedArrayBufferLengthOutOfRange(cx);
    +
    +    *maxByteLength = uint32_t(max);
    +    *growable = true;
    +    return true;
    +}
    +
    +MOZ_ALWAYS_INLINE bool
    +SharedArrayBufferObject::fun_grow_impl(JSContext* cx, const CallArgs& args)
    +{
    +    MOZ_ASSERT(IsSharedArrayBuffer(args.thisv()));
    +
    +    Rooted buffer(cx,
    +        &args.thisv().toObject().as());
    +    if (!buffer->isGrowable())
    +        return ReportSharedArrayBufferNotGrowable(cx);
    +
    +    uint64_t newByteLength;
    +    if (!ToIndex(cx, args.get(0), &newByteLength))
    +        return false;
    +    if (newByteLength > INT32_MAX)
    +        return ReportSharedArrayBufferLengthOutOfRange(cx);
    +
    +    uint32_t newLength = uint32_t(newByteLength);
    +    if (newLength > buffer->maxByteLength() || !buffer->growTo(newLength))
    +        return ReportSharedArrayBufferLengthOutOfRange(cx);
    +
    +    args.rval().setUndefined();
    +    return true;
    +}
    +
    +bool
    +SharedArrayBufferObject::fun_grow(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    return CallNonGenericMethod(cx, args);
    +}
    +
     bool
     SharedArrayBufferObject::class_constructor(JSContext* cx, unsigned argc, Value* vp)
     {
    @@ -245,11 +374,19 @@ SharedArrayBufferObject::class_constructor(JSContext* cx, unsigned argc, Value*
         if (!ThrowIfNotConstructing(cx, args, "SharedArrayBuffer"))
             return false;
     
    +    uint64_t length64;
    +    if (!ToIndex(cx, args.get(0), &length64))
    +        return false;
         // Bugs 1068458, 1161298: Limit length to 2^31-1.
    -    uint32_t length;
    -    bool overflow_unused;
    -    if (!ToLengthClamped(cx, args.get(0), &length, &overflow_unused) || length > INT32_MAX) {
    -        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_SHARED_ARRAY_BAD_LENGTH);
    +    if (length64 > INT32_MAX)
    +        return ReportSharedArrayBufferLengthOutOfRange(cx);
    +    uint32_t length = uint32_t(length64);
    +
    +    uint32_t maxByteLength;
    +    bool growable;
    +    if (!GetSharedArrayBufferMaxByteLengthOption(cx, args.get(1), length,
    +                                                 &maxByteLength, &growable))
    +    {
             return false;
         }
     
    @@ -258,7 +395,7 @@ SharedArrayBufferObject::class_constructor(JSContext* cx, unsigned argc, Value*
         if (!GetPrototypeFromConstructor(cx, newTarget, &proto))
             return false;
     
    -    JSObject* bufobj = New(cx, length, proto);
    +    JSObject* bufobj = New(cx, length, maxByteLength, growable, proto);
         if (!bufobj)
             return false;
         args.rval().setObject(*bufobj);
    @@ -266,9 +403,10 @@ SharedArrayBufferObject::class_constructor(JSContext* cx, unsigned argc, Value*
     }
     
     SharedArrayBufferObject*
    -SharedArrayBufferObject::New(JSContext* cx, uint32_t length, HandleObject proto)
    +SharedArrayBufferObject::New(JSContext* cx, uint32_t length, uint32_t maxLength, bool growable,
    +                             HandleObject proto)
     {
    -    SharedArrayRawBuffer* buffer = SharedArrayRawBuffer::New(cx, length);
    +    SharedArrayRawBuffer* buffer = SharedArrayRawBuffer::New(cx, length, maxLength, growable);
         if (!buffer)
             return nullptr;
     
    @@ -341,7 +479,7 @@ SharedArrayBufferObject::addSizeOfExcludingThis(JSObject* obj, mozilla::MallocSi
         // just live with the risk.
         const SharedArrayBufferObject& buf = obj->as();
         info->objectsNonHeapElementsShared +=
    -        buf.byteLength() / buf.rawBufferObject()->refcount();
    +        buf.rawBufferObject()->allocatedByteLength() / buf.rawBufferObject()->refcount();
     }
     
     /* static */ void
    @@ -409,12 +547,15 @@ static const JSPropertySpec static_properties[] = {
     };
     
     static const JSFunctionSpec prototype_functions[] = {
    +    JS_FN("grow", SharedArrayBufferObject::fun_grow, 1, 0),
         JS_SELF_HOSTED_FN("slice", "SharedArrayBufferSlice", 2, 0),
         JS_FS_END
     };
     
     static const JSPropertySpec prototype_properties[] = {
         JS_PSG("byteLength", SharedArrayBufferObject::byteLengthGetter, 0),
    +    JS_PSG("growable", SharedArrayBufferObject::growableGetter, 0),
    +    JS_PSG("maxByteLength", SharedArrayBufferObject::maxByteLengthGetter, 0),
         JS_STRING_SYM_PS(toStringTag, "SharedArrayBuffer", JSPROP_READONLY),
         JS_PS_END
     };
    diff --git a/js/src/vm/SharedArrayObject.h b/js/src/vm/SharedArrayObject.h
    index 81fb49f3a8..01872aaff6 100644
    --- a/js/src/vm/SharedArrayObject.h
    +++ b/js/src/vm/SharedArrayObject.h
    @@ -44,7 +44,9 @@ class SharedArrayRawBuffer
     {
       private:
         mozilla::Atomic refcount_;
    -    uint32_t length;
    +    mozilla::Atomic length;
    +    uint32_t maxLength;
    +    bool growable;
         bool preparedForAsmJS;
     
         // A list of structures representing tasks waiting on some
    @@ -52,9 +54,12 @@ class SharedArrayRawBuffer
         FutexWaiter* waiters_;
     
       protected:
    -    SharedArrayRawBuffer(uint8_t* buffer, uint32_t length, bool preparedForAsmJS)
    +    SharedArrayRawBuffer(uint8_t* buffer, uint32_t length, uint32_t maxLength, bool growable,
    +                         bool preparedForAsmJS)
           : refcount_(1),
             length(length),
    +        maxLength(maxLength),
    +        growable(growable),
             preparedForAsmJS(preparedForAsmJS),
             waiters_(nullptr)
         {
    @@ -62,7 +67,11 @@ class SharedArrayRawBuffer
         }
     
       public:
    -    static SharedArrayRawBuffer* New(JSContext* cx, uint32_t length);
    +    static SharedArrayRawBuffer* New(JSContext* cx, uint32_t length, uint32_t maxLength,
    +                                     bool growable);
    +    static SharedArrayRawBuffer* New(JSContext* cx, uint32_t length) {
    +        return New(cx, length, length, false);
    +    }
     
         // This may be called from multiple threads.  The caller must take
         // care of mutual exclusion.
    @@ -85,6 +94,20 @@ class SharedArrayRawBuffer
             return length;
         }
     
    +    uint32_t maxByteLength() const {
    +        return growable ? maxLength : byteLength();
    +    }
    +
    +    uint32_t allocatedByteLength() const {
    +        return growable ? maxLength : byteLength();
    +    }
    +
    +    bool isGrowable() const {
    +        return growable;
    +    }
    +
    +    [[nodiscard]] bool growTo(uint32_t newLength);
    +
         bool isPreparedForAsmJS() const {
             return preparedForAsmJS;
         }
    @@ -117,6 +140,9 @@ class SharedArrayRawBuffer
     class SharedArrayBufferObject : public ArrayBufferObjectMaybeShared
     {
         static bool byteLengthGetterImpl(JSContext* cx, const CallArgs& args);
    +    static bool maxByteLengthGetterImpl(JSContext* cx, const CallArgs& args);
    +    static bool growableGetterImpl(JSContext* cx, const CallArgs& args);
    +    static bool fun_grow_impl(JSContext* cx, const CallArgs& args);
     
       public:
         // RAWBUF_SLOT holds a pointer (as "private" data) to the
    @@ -128,13 +154,23 @@ class SharedArrayBufferObject : public ArrayBufferObjectMaybeShared
         static const Class class_;
     
         static bool byteLengthGetter(JSContext* cx, unsigned argc, Value* vp);
    +    static bool maxByteLengthGetter(JSContext* cx, unsigned argc, Value* vp);
    +    static bool growableGetter(JSContext* cx, unsigned argc, Value* vp);
    +    static bool fun_grow(JSContext* cx, unsigned argc, Value* vp);
     
         static bool class_constructor(JSContext* cx, unsigned argc, Value* vp);
     
         // Create a SharedArrayBufferObject with a new SharedArrayRawBuffer.
         static SharedArrayBufferObject* New(JSContext* cx,
                                             uint32_t length,
    +                                        uint32_t maxLength,
    +                                        bool growable,
                                             HandleObject proto = nullptr);
    +    static SharedArrayBufferObject* New(JSContext* cx,
    +                                        uint32_t length,
    +                                        HandleObject proto = nullptr) {
    +        return New(cx, length, length, false, proto);
    +    }
     
         // Create a SharedArrayBufferObject using an existing SharedArrayRawBuffer.
         static SharedArrayBufferObject* New(JSContext* cx,
    @@ -164,6 +200,15 @@ class SharedArrayBufferObject : public ArrayBufferObjectMaybeShared
         uint32_t byteLength() const {
             return rawBufferObject()->byteLength();
         }
    +    uint32_t maxByteLength() const {
    +        return rawBufferObject()->maxByteLength();
    +    }
    +    bool isGrowable() const {
    +        return rawBufferObject()->isGrowable();
    +    }
    +    [[nodiscard]] bool growTo(uint32_t newLength) {
    +        return rawBufferObject()->growTo(newLength);
    +    }
         bool isPreparedForAsmJS() const {
             return rawBufferObject()->isPreparedForAsmJS();
         }
    
    From f20f604ce4592b9cd81c7c2b440b1b9f5b10f241 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 15 May 2026 19:16:34 -0400
    Subject: [PATCH 54/72] Implement Atomics.waitAsync
    
    ---
     js/src/builtin/AtomicsObject.cpp         | 333 ++++++++++++++++++++---
     js/src/builtin/AtomicsObject.h           |  25 +-
     js/src/tests/non262/Atomics/waitAsync.js |  37 +++
     3 files changed, 351 insertions(+), 44 deletions(-)
     create mode 100644 js/src/tests/non262/Atomics/waitAsync.js
    
    diff --git a/js/src/builtin/AtomicsObject.cpp b/js/src/builtin/AtomicsObject.cpp
    index a4ae0736d4..72b5ccdcc5 100644
    --- a/js/src/builtin/AtomicsObject.cpp
    +++ b/js/src/builtin/AtomicsObject.cpp
    @@ -51,6 +51,7 @@
     #include "mozilla/Maybe.h"
     #include "mozilla/Unused.h"
     
    +#include "builtin/Promise.h"
     #include "jsapi.h"
     #include "jsfriendapi.h"
     #include "jsnum.h"
    @@ -59,6 +60,7 @@
     #include "jit/InlinableNatives.h"
     #include "js/Class.h"
     #include "vm/GlobalObject.h"
    +#include "vm/HelperThreads.h"
     #include "vm/Time.h"
     #include "vm/TypedArrayObject.h"
     #include "wasm/WasmInstance.h"
    @@ -693,11 +695,13 @@ js::atomics_cmpxchg_asm_callout(wasm::Instance* instance, int32_t vt, int32_t of
     
     namespace js {
     
    +class AtomicsWaitAsyncTask;
    +
     // Represents one waiting worker.
     //
     // The type is declared opaque in SharedArrayObject.h.  Instances of
    -// js::FutexWaiter are stack-allocated and linked onto a list across a
    -// call to FutexRuntime::wait().
    +// js::FutexWaiter are linked onto a list across a call to FutexRuntime::wait()
    +// or an async wait task.
     //
     // The 'waiters' field of the SharedArrayRawBuffer points to the highest
     // priority waiter in the list, and lower priority nodes are linked through
    @@ -711,14 +715,34 @@ class FutexWaiter
       public:
         FutexWaiter(uint32_t offset, JSRuntime* rt)
           : offset(offset),
    +        kind(Sync),
             rt(rt),
    +        asyncTask(nullptr),
             lower_pri(nullptr),
             back(nullptr)
         {
         }
     
    +    FutexWaiter(uint32_t offset, AtomicsWaitAsyncTask* asyncTask)
    +      : offset(offset),
    +        kind(Async),
    +        rt(nullptr),
    +        asyncTask(asyncTask),
    +        lower_pri(nullptr),
    +        back(nullptr)
    +    {
    +    }
    +
    +    bool isWaiting() const;
    +    void notify();
    +
         uint32_t    offset;                 // int32 element index within the SharedArrayBuffer
    +    enum WaiterKind {
    +        Sync,
    +        Async
    +    } kind;
         JSRuntime*  rt;                    // The runtime of the waiter
    +    AtomicsWaitAsyncTask* asyncTask;    // The async waiter task, if any
         FutexWaiter* lower_pri;             // Lower priority nodes in circular doubly-linked list of waiters
         FutexWaiter* back;                  // Other direction
     };
    @@ -742,8 +766,195 @@ class AutoLockFutexAPI
         js::UniqueLock& unique() { return *unique_; }
     };
     
    +static void
    +AddWaiter(SharedArrayRawBuffer* sarb, FutexWaiter* waiter)
    +{
    +    if (FutexWaiter* waiters = sarb->waiters()) {
    +        waiter->lower_pri = waiters;
    +        waiter->back = waiters->back;
    +        waiters->back->lower_pri = waiter;
    +        waiters->back = waiter;
    +    } else {
    +        waiter->lower_pri = waiter->back = waiter;
    +        sarb->setWaiters(waiter);
    +    }
    +}
    +
    +static void
    +RemoveWaiter(SharedArrayRawBuffer* sarb, FutexWaiter* waiter)
    +{
    +    if (waiter->lower_pri == waiter) {
    +        sarb->setWaiters(nullptr);
    +    } else {
    +        waiter->lower_pri->back = waiter->back;
    +        waiter->back->lower_pri = waiter->lower_pri;
    +        if (sarb->waiters() == waiter)
    +            sarb->setWaiters(waiter->lower_pri);
    +    }
    +    waiter->lower_pri = nullptr;
    +    waiter->back = nullptr;
    +}
    +
    +class AtomicsWaitAsyncTask : public PromiseTask
    +{
    +    enum class State {
    +        Waiting,
    +        Notified,
    +        TimedOut
    +    };
    +
    +    SharedArrayRawBuffer* sarb_;
    +    FutexWaiter waiter_;
    +    mozilla::Maybe timeout_;
    +    ConditionVariable cond_;
    +    State state_;
    +    bool isInWaiterList_;
    +
    +  public:
    +    AtomicsWaitAsyncTask(JSContext* cx, Handle promise,
    +                         SharedArrayRawBuffer* sarb, uint32_t offset,
    +                         mozilla::Maybe& timeout)
    +      : PromiseTask(cx, promise),
    +        sarb_(sarb),
    +        waiter_(offset, this),
    +        timeout_(timeout),
    +        state_(State::Waiting),
    +        isInWaiterList_(false)
    +    {
    +    }
    +
    +    ~AtomicsWaitAsyncTask() {
    +        if (isInWaiterList_) {
    +            AutoLockFutexAPI lock;
    +            if (isInWaiterList_)
    +                removeFromWaiterList();
    +        }
    +        sarb_->dropReference();
    +    }
    +
    +    FutexWaiter* waiter() {
    +        return &waiter_;
    +    }
    +
    +    void setInWaiterList() {
    +        isInWaiterList_ = true;
    +    }
    +
    +    bool isWaiting() const {
    +        return state_ == State::Waiting;
    +    }
    +
    +    void notify() {
    +        MOZ_ASSERT(isWaiting());
    +        state_ = State::Notified;
    +        cond_.notify_all();
    +    }
    +
    +    void execute() override {
    +        AutoLockFutexAPI lock;
    +
    +        const bool isTimed = timeout_.isSome();
    +        auto finalEnd = timeout_.map([](mozilla::TimeDuration& timeout) {
    +            return mozilla::TimeStamp::Now() + timeout;
    +        });
    +        auto maxSlice = mozilla::TimeDuration::FromSeconds(4000.0);
    +
    +        while (state_ == State::Waiting) {
    +            if (isTimed) {
    +                auto sliceEnd = finalEnd.map([&](mozilla::TimeStamp& finalEnd) {
    +                    auto sliceEnd = mozilla::TimeStamp::Now() + maxSlice;
    +                    if (finalEnd < sliceEnd)
    +                        sliceEnd = finalEnd;
    +                    return sliceEnd;
    +                });
    +
    +                mozilla::Unused << cond_.wait_until(lock.unique(), *sliceEnd);
    +                if (state_ == State::Waiting && mozilla::TimeStamp::Now() >= *finalEnd) {
    +                    state_ = State::TimedOut;
    +                    break;
    +                }
    +            } else {
    +                cond_.wait(lock.unique());
    +            }
    +        }
    +
    +        if (isInWaiterList_)
    +            removeFromWaiterList();
    +    }
    +
    +  private:
    +    void removeFromWaiterList() {
    +        MOZ_ASSERT(isInWaiterList_);
    +        RemoveWaiter(sarb_, &waiter_);
    +        isInWaiterList_ = false;
    +    }
    +
    +    bool finishPromise(JSContext* cx, Handle promise) override {
    +        RootedValue result(cx);
    +        if (state_ == State::TimedOut)
    +            result.setString(cx->names().futexTimedOut);
    +        else
    +            result.setString(cx->names().futexOK);
    +        return PromiseObject::resolve(cx, promise, result);
    +    }
    +};
    +
    +bool
    +FutexWaiter::isWaiting() const
    +{
    +    if (kind == Sync)
    +        return rt->fx.isWaiting();
    +    return asyncTask->isWaiting();
    +}
    +
    +void
    +FutexWaiter::notify()
    +{
    +    if (kind == Sync) {
    +        rt->fx.notify(FutexRuntime::NotifyExplicit);
    +        return;
    +    }
    +    asyncTask->notify();
    +}
    +
     } // namespace js
     
    +static bool
    +GetWaitTimeout(JSContext* cx, HandleValue timeoutv,
    +               mozilla::Maybe* timeout)
    +{
    +    timeout->reset();
    +    if (!timeoutv.isUndefined()) {
    +        double timeout_ms;
    +        if (!ToNumber(cx, timeoutv, &timeout_ms))
    +            return false;
    +        if (!mozilla::IsNaN(timeout_ms)) {
    +            if (timeout_ms < 0)
    +                *timeout = mozilla::Some(mozilla::TimeDuration::FromSeconds(0.0));
    +            else if (!mozilla::IsInfinite(timeout_ms))
    +                *timeout = mozilla::Some(mozilla::TimeDuration::FromMilliseconds(timeout_ms));
    +        }
    +    }
    +    return true;
    +}
    +
    +static bool
    +CreateWaitAsyncResult(JSContext* cx, bool isAsync, HandleValue value, MutableHandleValue rval)
    +{
    +    RootedPlainObject obj(cx, NewBuiltinClassInstance(cx));
    +    if (!obj)
    +        return false;
    +
    +    RootedValue asyncValue(cx, BooleanValue(isAsync));
    +    if (!NativeDefineDataProperty(cx, obj, cx->names().async, asyncValue, JSPROP_ENUMERATE))
    +        return false;
    +    if (!NativeDefineDataProperty(cx, obj, cx->names().value, value, JSPROP_ENUMERATE))
    +        return false;
    +
    +    rval.setObject(*obj);
    +    return true;
    +}
    +
     bool
     js::atomics_wait(JSContext* cx, unsigned argc, Value* vp)
     {
    @@ -768,17 +979,8 @@ js::atomics_wait(JSContext* cx, unsigned argc, Value* vp)
         if (!ToInt32(cx, valv, &value))
             return false;
         mozilla::Maybe timeout;
    -    if (!timeoutv.isUndefined()) {
    -        double timeout_ms;
    -        if (!ToNumber(cx, timeoutv, &timeout_ms))
    -            return false;
    -        if (!mozilla::IsNaN(timeout_ms)) {
    -            if (timeout_ms < 0)
    -                timeout = mozilla::Some(mozilla::TimeDuration::FromSeconds(0.0));
    -            else if (!mozilla::IsInfinite(timeout_ms))
    -                timeout = mozilla::Some(mozilla::TimeDuration::FromMilliseconds(timeout_ms));
    -        }
    -    }
    +    if (!GetWaitTimeout(cx, timeoutv, &timeout))
    +        return false;
     
         if (!rt->fx.canWait())
             return ReportCannotWait(cx);
    @@ -797,15 +999,7 @@ js::atomics_wait(JSContext* cx, unsigned argc, Value* vp)
         SharedArrayRawBuffer* sarb = sab->rawBufferObject();
     
         FutexWaiter w(offset, rt);
    -    if (FutexWaiter* waiters = sarb->waiters()) {
    -        w.lower_pri = waiters;
    -        w.back = waiters->back;
    -        waiters->back->lower_pri = &w;
    -        waiters->back = &w;
    -    } else {
    -        w.lower_pri = w.back = &w;
    -        sarb->setWaiters(&w);
    -    }
    +    AddWaiter(sarb, &w);
     
         FutexRuntime::WaitResult result = FutexRuntime::FutexOK;
         bool retval = rt->fx.wait(cx, lock.unique(), timeout, &result);
    @@ -820,17 +1014,91 @@ js::atomics_wait(JSContext* cx, unsigned argc, Value* vp)
             }
         }
     
    -    if (w.lower_pri == &w) {
    -        sarb->setWaiters(nullptr);
    -    } else {
    -        w.lower_pri->back = w.back;
    -        w.back->lower_pri = w.lower_pri;
    -        if (sarb->waiters() == &w)
    -            sarb->setWaiters(w.lower_pri);
    -    }
    +    RemoveWaiter(sarb, &w);
         return retval;
     }
     
    +bool
    +js::atomics_waitAsync(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    HandleValue objv = args.get(0);
    +    HandleValue idxv = args.get(1);
    +    HandleValue valv = args.get(2);
    +    HandleValue timeoutv = args.get(3);
    +    MutableHandleValue r = args.rval();
    +
    +    Rooted view(cx, nullptr);
    +    if (!GetSharedTypedArray(cx, objv, &view))
    +        return false;
    +    if (view->type() != Scalar::Int32)
    +        return ReportBadArrayType(cx);
    +    uint32_t offset;
    +    if (!GetTypedArrayIndex(cx, idxv, view, &offset))
    +        return false;
    +    int32_t value;
    +    if (!ToInt32(cx, valv, &value))
    +        return false;
    +    mozilla::Maybe timeout;
    +    if (!GetWaitTimeout(cx, timeoutv, &timeout))
    +        return false;
    +
    +    Rooted promise(cx, PromiseObject::createSkippingExecutor(cx));
    +    if (!promise)
    +        return false;
    +
    +    RootedValue promiseValue(cx, ObjectValue(*promise));
    +    RootedValue result(cx);
    +    if (!CreateWaitAsyncResult(cx, true, promiseValue, &result))
    +        return false;
    +
    +    Rooted sab(cx, view->bufferShared());
    +    SharedArrayRawBuffer* sarb = sab->rawBufferObject();
    +    if (!sarb->addReference()) {
    +        JS_ReportErrorASCII(cx, "Reference count overflow on SharedArrayBuffer");
    +        return false;
    +    }
    +
    +    auto task = cx->make_unique(cx, promise, sarb, offset, timeout);
    +    if (!task) {
    +        sarb->dropReference();
    +        return false;
    +    }
    +
    +    bool isAsync = false;
    +    RootedValue immediateResult(cx);
    +    {
    +        AutoLockFutexAPI lock;
    +
    +        SharedMem addr = view->viewDataShared().cast() + offset;
    +        if (jit::AtomicOperations::loadSafeWhenRacy(addr) != value) {
    +            immediateResult.setString(cx->names().futexNotEqual);
    +        } else if (timeout.isSome() && timeout->ToMilliseconds() == 0.0) {
    +            immediateResult.setString(cx->names().futexTimedOut);
    +        } else {
    +            if (!cx->startAsyncTaskCallback || !cx->finishAsyncTaskCallback ||
    +                !CanUseExtraThreads())
    +            {
    +                JS_ReportErrorASCII(cx, "Atomics.waitAsync not supported in this runtime.");
    +                return false;
    +            }
    +
    +            AddWaiter(sarb, task->waiter());
    +            task->setInWaiterList();
    +            isAsync = true;
    +        }
    +    }
    +
    +    if (!isAsync)
    +        return CreateWaitAsyncResult(cx, false, immediateResult, r);
    +
    +    if (!StartPromiseTask(cx, Move(task)))
    +        return false;
    +
    +    r.set(result);
    +    return true;
    +}
    +
     bool
     js::atomics_notify(JSContext* cx, unsigned argc, Value* vp)
     {
    @@ -870,9 +1138,9 @@ js::atomics_notify(JSContext* cx, unsigned argc, Value* vp)
             do {
                 FutexWaiter* c = iter;
                 iter = iter->lower_pri;
    -            if (c->offset != offset || !c->rt->fx.isWaiting())
    +            if (c->offset != offset || !c->isWaiting())
                     continue;
    -            c->rt->fx.notify(FutexRuntime::NotifyExplicit);
    +            c->notify();
                 ++woken;
                 --count;
             } while (count > 0 && iter != waiters);
    @@ -1106,6 +1374,7 @@ const JSFunctionSpec AtomicsMethods[] = {
         JS_INLINABLE_FN("xor",                atomics_xor,                3,0, AtomicsXor),
         JS_INLINABLE_FN("isLockFree",         atomics_isLockFree,         1,0, AtomicsIsLockFree),
         JS_FN("wait",                         atomics_wait,               4,0),
    +    JS_FN("waitAsync",                    atomics_waitAsync,          4,0),
         JS_FN("notify",                       atomics_notify,             3,0),
         JS_FN("wake",                         atomics_notify,             3,0), //Legacy name
         JS_FS_END
    diff --git a/js/src/builtin/AtomicsObject.h b/js/src/builtin/AtomicsObject.h
    index 18f00dad16..309c97ae91 100644
    --- a/js/src/builtin/AtomicsObject.h
    +++ b/js/src/builtin/AtomicsObject.h
    @@ -24,18 +24,19 @@ class AtomicsObject : public JSObject
         static MOZ_MUST_USE bool toString(JSContext* cx, unsigned int argc, Value* vp);
     };
     
    -MOZ_MUST_USE bool atomics_compareExchange(JSContext* cx, unsigned argc, Value* vp);
    -MOZ_MUST_USE bool atomics_exchange(JSContext* cx, unsigned argc, Value* vp);
    -MOZ_MUST_USE bool atomics_load(JSContext* cx, unsigned argc, Value* vp);
    -MOZ_MUST_USE bool atomics_store(JSContext* cx, unsigned argc, Value* vp);
    -MOZ_MUST_USE bool atomics_add(JSContext* cx, unsigned argc, Value* vp);
    -MOZ_MUST_USE bool atomics_sub(JSContext* cx, unsigned argc, Value* vp);
    -MOZ_MUST_USE bool atomics_and(JSContext* cx, unsigned argc, Value* vp);
    -MOZ_MUST_USE bool atomics_or(JSContext* cx, unsigned argc, Value* vp);
    -MOZ_MUST_USE bool atomics_xor(JSContext* cx, unsigned argc, Value* vp);
    -MOZ_MUST_USE bool atomics_isLockFree(JSContext* cx, unsigned argc, Value* vp);
    -MOZ_MUST_USE bool atomics_wait(JSContext* cx, unsigned argc, Value* vp);
    -MOZ_MUST_USE bool atomics_notify(JSContext* cx, unsigned argc, Value* vp);
    +[[nodiscard]] bool atomics_compareExchange(JSContext* cx, unsigned argc, Value* vp);
    +[[nodiscard]] bool atomics_exchange(JSContext* cx, unsigned argc, Value* vp);
    +[[nodiscard]] bool atomics_load(JSContext* cx, unsigned argc, Value* vp);
    +[[nodiscard]] bool atomics_store(JSContext* cx, unsigned argc, Value* vp);
    +[[nodiscard]] bool atomics_add(JSContext* cx, unsigned argc, Value* vp);
    +[[nodiscard]] bool atomics_sub(JSContext* cx, unsigned argc, Value* vp);
    +[[nodiscard]] bool atomics_and(JSContext* cx, unsigned argc, Value* vp);
    +[[nodiscard]] bool atomics_or(JSContext* cx, unsigned argc, Value* vp);
    +[[nodiscard]] bool atomics_xor(JSContext* cx, unsigned argc, Value* vp);
    +[[nodiscard]] bool atomics_isLockFree(JSContext* cx, unsigned argc, Value* vp);
    +[[nodiscard]] bool atomics_wait(JSContext* cx, unsigned argc, Value* vp);
    +[[nodiscard]] bool atomics_waitAsync(JSContext* cx, unsigned argc, Value* vp);
    +[[nodiscard]] bool atomics_notify(JSContext* cx, unsigned argc, Value* vp);
     
     /* asm.js callouts */
     namespace wasm { class Instance; }
    diff --git a/js/src/tests/non262/Atomics/waitAsync.js b/js/src/tests/non262/Atomics/waitAsync.js
    new file mode 100644
    index 0000000000..ae5c876e3d
    --- /dev/null
    +++ b/js/src/tests/non262/Atomics/waitAsync.js
    @@ -0,0 +1,37 @@
    +// |reftest| skip-if(!this.SharedArrayBuffer || !this.Atomics || !this.drainJobQueue)
    +
    +if (typeof SharedArrayBuffer === "function" && typeof Atomics === "object" &&
    +    typeof drainJobQueue === "function") {
    +  const sab = new SharedArrayBuffer(4);
    +  const i32 = new Int32Array(sab);
    +
    +  let result = Atomics.waitAsync(i32, 0, 1, 10);
    +  assertEq(result.async, false);
    +  assertEq(result.value, "not-equal");
    +
    +  result = Atomics.waitAsync(i32, 0, 0, 0);
    +  assertEq(result.async, false);
    +  assertEq(result.value, "timed-out");
    +
    +  result = Atomics.waitAsync(i32, 0, 0);
    +  assertEq(result.async, true);
    +  let notified;
    +  result.value.then(value => {
    +    notified = value;
    +  });
    +  assertEq(Atomics.notify(i32, 0, 1), 1);
    +  drainJobQueue();
    +  assertEq(notified, "ok");
    +
    +  result = Atomics.waitAsync(i32, 0, 0, 1);
    +  assertEq(result.async, true);
    +  let timedOut;
    +  result.value.then(value => {
    +    timedOut = value;
    +  });
    +  drainJobQueue();
    +  assertEq(timedOut, "timed-out");
    +}
    +
    +if (typeof reportCompare === "function")
    +  reportCompare(true, true);
    
    From 2e2d399564ff18938ae7f9cc1acd412da8f3a6c1 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 15 May 2026 19:40:53 -0400
    Subject: [PATCH 55/72] Implement resizable buffer view semantics
    
    ---
     .../non262/ArrayBuffer/resizable-views.js     |  70 ++++++++++
     js/src/vm/ArrayBufferObject.cpp               |  64 ++++++---
     js/src/vm/ArrayBufferObject.h                 |   3 +-
     js/src/vm/TypedArrayObject.cpp                |  47 +++++--
     js/src/vm/TypedArrayObject.h                  | 131 +++++++++++++++---
     5 files changed, 267 insertions(+), 48 deletions(-)
     create mode 100644 js/src/tests/non262/ArrayBuffer/resizable-views.js
    
    diff --git a/js/src/tests/non262/ArrayBuffer/resizable-views.js b/js/src/tests/non262/ArrayBuffer/resizable-views.js
    new file mode 100644
    index 0000000000..32d2e0e342
    --- /dev/null
    +++ b/js/src/tests/non262/ArrayBuffer/resizable-views.js
    @@ -0,0 +1,70 @@
    +// |reftest| skip-if(!this.SharedArrayBuffer)
    +
    +var rab = new ArrayBuffer(4, { maxByteLength: 16 });
    +var tracking = new Uint8Array(rab);
    +var fixed = new Uint8Array(rab, 1, 2);
    +var bytes = new Uint8Array(rab);
    +
    +bytes[1] = 11;
    +bytes[2] = 22;
    +
    +assertEq(tracking.length, 4);
    +assertEq(tracking.byteLength, 4);
    +assertEq(tracking.byteOffset, 0);
    +assertEq(fixed.length, 2);
    +assertEq(fixed.byteLength, 2);
    +assertEq(fixed.byteOffset, 1);
    +
    +rab.resize(2);
    +assertEq(tracking.length, 2);
    +assertEq(tracking.byteLength, 2);
    +assertEq(fixed.length, 0);
    +assertEq(fixed.byteLength, 0);
    +assertEq(fixed.byteOffset, 0);
    +assertEq(fixed[0], undefined);
    +
    +rab.resize(8);
    +assertEq(tracking.length, 8);
    +assertEq(tracking.byteLength, 8);
    +assertEq(fixed.length, 2);
    +assertEq(fixed.byteLength, 2);
    +assertEq(fixed.byteOffset, 1);
    +assertEq(fixed[0], 11);
    +assertEq(fixed[1], 0);
    +tracking[6] = 66;
    +assertEq(new Uint8Array(rab)[6], 66);
    +
    +var dv = new DataView(rab, 4);
    +assertEq(dv.byteOffset, 4);
    +assertEq(dv.byteLength, 4);
    +dv.setUint8(0, 44);
    +assertEq(tracking[4], 44);
    +
    +rab.resize(3);
    +assertEq(dv.byteOffset, 0);
    +assertEq(dv.byteLength, 0);
    +assertThrowsInstanceOf(() => dv.getUint8(0), RangeError);
    +
    +rab.resize(6);
    +assertEq(dv.byteOffset, 4);
    +assertEq(dv.byteLength, 2);
    +assertEq(dv.getUint8(0), 0);
    +
    +var fixedDv = new DataView(rab, 4, 2);
    +rab.resize(5);
    +assertEq(fixedDv.byteOffset, 0);
    +assertEq(fixedDv.byteLength, 0);
    +rab.resize(6);
    +assertEq(fixedDv.byteOffset, 4);
    +assertEq(fixedDv.byteLength, 2);
    +
    +var gsab = new SharedArrayBuffer(4, { maxByteLength: 16 });
    +var sharedTracking = new Uint8Array(gsab);
    +assertEq(sharedTracking.length, 4);
    +gsab.grow(8);
    +assertEq(sharedTracking.length, 8);
    +sharedTracking[6] = 33;
    +assertEq(new Uint8Array(gsab)[6], 33);
    +
    +if (typeof reportCompare === "function")
    +  reportCompare(true, true);
    diff --git a/js/src/vm/ArrayBufferObject.cpp b/js/src/vm/ArrayBufferObject.cpp
    index 739bd0de33..904a1b3842 100644
    --- a/js/src/vm/ArrayBufferObject.cpp
    +++ b/js/src/vm/ArrayBufferObject.cpp
    @@ -432,8 +432,12 @@ ArrayBufferViewFits(ArrayBufferViewObject* view, uint32_t newByteLength)
     {
         if (view->is()) {
             DataViewObject& dataView = view->as();
    -        uint32_t byteOffset = dataView.byteOffset();
    -        uint32_t byteLength = dataView.byteLength();
    +        uint32_t byteOffset = dataView.byteOffsetMaybeOutOfBounds();
    +        if (byteOffset > newByteLength)
    +            return false;
    +        uint32_t byteLength = dataView.isLengthTracking()
    +                              ? newByteLength - byteOffset
    +                              : dataView.fixedByteLengthMaybeOutOfBounds();
             return byteOffset <= newByteLength && byteLength <= newByteLength - byteOffset;
         }
     
    @@ -441,8 +445,13 @@ ArrayBufferViewFits(ArrayBufferViewObject* view, uint32_t newByteLength)
             TypedArrayObject& typedArray = view->as();
             if (typedArray.isSharedMemory())
                 return true;
    -        uint32_t byteOffset = typedArray.byteOffset();
    -        uint32_t byteLength = typedArray.byteLength();
    +        uint32_t byteOffset = typedArray.byteOffsetMaybeOutOfBounds();
    +        if (byteOffset > newByteLength)
    +            return false;
    +        uint32_t byteLength = typedArray.isLengthTracking()
    +                              ? newByteLength - byteOffset
    +                              : typedArray.fixedLengthMaybeOutOfBounds() *
    +                                typedArray.bytesPerElement();
             return byteOffset <= newByteLength && byteLength <= newByteLength - byteOffset;
         }
     
    @@ -532,7 +541,8 @@ ArrayBufferObject::setNewData(FreeOp* fop, BufferContents newContents, OwnsState
     
     void
     ArrayBufferObject::changeViewContents(JSContext* cx, ArrayBufferViewObject* view,
    -                                      uint8_t* oldDataPointer, BufferContents newContents)
    +                                      uint8_t* oldDataPointer, BufferContents newContents,
    +                                      uint32_t newByteLength)
     {
         MOZ_ASSERT(!view->isSharedMemory());
     
    @@ -543,7 +553,18 @@ ArrayBufferObject::changeViewContents(JSContext* cx, ArrayBufferViewObject* view
         uint8_t* viewDataPointer = view->dataPointerUnshared(nogc);
         if (viewDataPointer) {
             MOZ_ASSERT(newContents);
    -        ptrdiff_t offset = viewDataPointer - oldDataPointer;
    +        uint32_t offset;
    +        if (view->is()) {
    +            offset = view->as().byteOffsetMaybeOutOfBounds();
    +        } else if (view->is()) {
    +            offset = view->as().byteOffsetMaybeOutOfBounds();
    +        } else {
    +            ptrdiff_t oldOffset = viewDataPointer - oldDataPointer;
    +            MOZ_ASSERT(oldOffset >= 0);
    +            offset = uint32_t(oldOffset);
    +        }
    +        if (offset > newByteLength)
    +            offset = 0;
             viewDataPointer = static_cast(newContents.data()) + offset;
             view->setDataPointerUnshared(viewDataPointer);
         }
    @@ -569,10 +590,10 @@ ArrayBufferObject::changeContents(JSContext* cx, BufferContents newContents,
         auto& innerViews = cx->compartment()->innerViews.get();
         if (InnerViewTable::ViewVector* views = innerViews.maybeViewsUnbarriered(this)) {
             for (size_t i = 0; i < views->length(); i++)
    -            changeViewContents(cx, (*views)[i], oldDataPointer, newContents);
    +            changeViewContents(cx, (*views)[i], oldDataPointer, newContents, byteLength());
         }
         if (firstView())
    -        changeViewContents(cx, firstView(), oldDataPointer, newContents);
    +        changeViewContents(cx, firstView(), oldDataPointer, newContents, byteLength());
     }
     
     void
    @@ -584,26 +605,29 @@ ArrayBufferObject::changeContentsForResize(JSContext* cx, BufferContents newCont
     
         uint8_t* oldDataPointer = dataPointer();
         setNewData(cx->runtime()->defaultFreeOp(), newContents, ownsState);
    +    setByteLength(newByteLength);
     
         auto& innerViews = cx->compartment()->innerViews.get();
         if (InnerViewTable::ViewVector* views = innerViews.maybeViewsUnbarriered(this)) {
             for (size_t i = 0; i < views->length(); i++) {
                 ArrayBufferViewObject* view = (*views)[i];
    -            if (ArrayBufferViewFits(view, newByteLength))
    -                changeViewContents(cx, view, oldDataPointer, newContents);
    +            if (view->is() || view->is())
    +                changeViewContents(cx, view, oldDataPointer, newContents, newByteLength);
    +            else if (ArrayBufferViewFits(view, newByteLength))
    +                changeViewContents(cx, view, oldDataPointer, newContents, newByteLength);
                 else
                     NoteViewBufferWasDetached(view, newContents, cx);
             }
         }
     
         if (firstView()) {
    -        if (ArrayBufferViewFits(firstView(), newByteLength))
    -            changeViewContents(cx, firstView(), oldDataPointer, newContents);
    +        if (firstView()->is() || firstView()->is())
    +            changeViewContents(cx, firstView(), oldDataPointer, newContents, newByteLength);
    +        else if (ArrayBufferViewFits(firstView(), newByteLength))
    +            changeViewContents(cx, firstView(), oldDataPointer, newContents, newByteLength);
             else
                 NoteViewBufferWasDetached(firstView(), newContents, cx);
         }
    -
    -    setByteLength(newByteLength);
     }
     
     static bool
    @@ -1455,20 +1479,22 @@ ArrayBufferObject::createDataViewForThisImpl(JSContext* cx, const CallArgs& args
         /*
          * This method is only called for |DataView(alienBuf, ...)| which calls
          * this as |createDataViewForThis.call(alienBuf, byteOffset, byteLength,
    -     *                                     DataView.prototype)|,
    -     * ergo there must be exactly 3 arguments.
    +     *                                     DataView.prototype, lengthTracking)|,
    +     * ergo there must be exactly 4 arguments.
          */
    -    MOZ_ASSERT(args.length() == 3);
    +    MOZ_ASSERT(args.length() == 4);
     
         uint32_t byteOffset = args[0].toPrivateUint32();
         uint32_t byteLength = args[1].toPrivateUint32();
    +    bool lengthTracking = args[3].toBoolean();
         Rooted buffer(cx, &args.thisv().toObject().as());
     
         /*
          * Pop off the passed-along prototype and delegate to normal DataViewObject
          * construction.
          */
    -    JSObject* obj = DataViewObject::create(cx, byteOffset, byteLength, buffer, &args[2].toObject());
    +    JSObject* obj = DataViewObject::create(cx, byteOffset, byteLength, buffer,
    +                                           &args[2].toObject(), lengthTracking);
         if (!obj)
             return false;
         args.rval().setObject(*obj);
    @@ -1848,6 +1874,8 @@ ArrayBufferViewObject::trace(JSTracer* trc, JSObject* objArg)
                     // The data may or may not be inline with the buffer. The buffer
                     // can only move during a compacting GC, in which case its
                     // objectMoved hook has already updated the buffer's data pointer.
    +                if (offset > buf.byteLength())
    +                    offset = 0;
                     obj->initPrivate(buf.dataPointer() + offset);
                 }
             }
    diff --git a/js/src/vm/ArrayBufferObject.h b/js/src/vm/ArrayBufferObject.h
    index d0d83c431d..c9dc80a598 100644
    --- a/js/src/vm/ArrayBufferObject.h
    +++ b/js/src/vm/ArrayBufferObject.h
    @@ -323,7 +323,8 @@ class ArrayBufferObject : public ArrayBufferObjectMaybeShared
     
       private:
         void changeViewContents(JSContext* cx, ArrayBufferViewObject* view,
    -                            uint8_t* oldDataPointer, BufferContents newContents);
    +                            uint8_t* oldDataPointer, BufferContents newContents,
    +                            uint32_t newByteLength);
         void setFirstView(ArrayBufferViewObject* view);
     
         uint8_t* inlineDataPointer() const;
    diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp
    index faf3dc40df..7750122ac4 100644
    --- a/js/src/vm/TypedArrayObject.cpp
    +++ b/js/src/vm/TypedArrayObject.cpp
    @@ -484,8 +484,9 @@ class TypedArrayObjectTemplate : public TypedArrayObject
         }
     
         static TypedArrayObject*
    -    makeInstance(JSContext* cx, Handle buffer, uint32_t byteOffset, uint32_t len,
    -                 HandleObject proto)
    +    makeInstance(JSContext* cx, Handle buffer,
    +                 uint32_t byteOffset, uint32_t len, HandleObject proto,
    +                 bool lengthTracking = false)
         {
             MOZ_ASSERT_IF(!buffer, byteOffset == 0);
     
    @@ -549,7 +550,9 @@ class TypedArrayObjectTemplate : public TypedArrayObject
     #endif
             }
     
    -        obj->setFixedSlot(TypedArrayObject::LENGTH_SLOT, Int32Value(len));
    +        obj->setFixedSlot(TypedArrayObject::LENGTH_SLOT,
    +                          Int32Value(lengthTracking ? TypedArrayObject::LENGTH_TRACKING
    +                                                    : int32_t(len)));
             obj->setFixedSlot(TypedArrayObject::BYTEOFFSET_SLOT, Int32Value(byteOffset));
     
     #ifdef DEBUG
    @@ -898,6 +901,7 @@ class TypedArrayObjectTemplate : public TypedArrayObject
                 return nullptr; // invalid byteOffset
             }
     
    +        bool lengthTracking = false;
             uint32_t len;
             if (lengthInt == -1) {
                 len = (buffer->byteLength() - byteOffset) / sizeof(NativeType);
    @@ -906,6 +910,12 @@ class TypedArrayObjectTemplate : public TypedArrayObject
                                               JSMSG_TYPED_ARRAY_CONSTRUCT_BOUNDS);
                     return nullptr; // given byte array doesn't map exactly to sizeof(NativeType) * N
                 }
    +            if ((buffer->is() && buffer->as().isResizable()) ||
    +                (buffer->is() &&
    +                 buffer->as().isGrowable()))
    +            {
    +                lengthTracking = true;
    +            }
             } else {
                 len = uint32_t(lengthInt);
             }
    @@ -924,7 +934,7 @@ class TypedArrayObjectTemplate : public TypedArrayObject
                 return nullptr; // byteOffset + len is too big for the arraybuffer
             }
     
    -        return makeInstance(cx, buffer, byteOffset, len, proto);
    +        return makeInstance(cx, buffer, byteOffset, len, proto, lengthTracking);
         }
     
         static bool
    @@ -1859,7 +1869,8 @@ DataViewNewObjectKind(JSContext* cx, uint32_t byteLength, JSObject* proto)
     
     DataViewObject*
     DataViewObject::create(JSContext* cx, uint32_t byteOffset, uint32_t byteLength,
    -                       Handle arrayBuffer, JSObject* protoArg)
    +                       Handle arrayBuffer, JSObject* protoArg,
    +                       bool lengthTracking)
     {
         if (arrayBuffer->isDetached()) {
             JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_DETACHED);
    @@ -1901,7 +1912,9 @@ DataViewObject::create(JSContext* cx, uint32_t byteOffset, uint32_t byteLength,
     
         DataViewObject& dvobj = obj->as();
         dvobj.setFixedSlot(TypedArrayObject::BYTEOFFSET_SLOT, Int32Value(byteOffset));
    -    dvobj.setFixedSlot(TypedArrayObject::LENGTH_SLOT, Int32Value(byteLength));
    +    dvobj.setFixedSlot(TypedArrayObject::LENGTH_SLOT,
    +                       Int32Value(lengthTracking ? TypedArrayObject::LENGTH_TRACKING
    +                                                 : int32_t(byteLength)));
         dvobj.setFixedSlot(TypedArrayObject::BUFFER_SLOT, ObjectValue(*arrayBuffer));
         dvobj.initPrivate(arrayBuffer->dataPointer() + byteOffset);
     
    @@ -1921,7 +1934,8 @@ DataViewObject::create(JSContext* cx, uint32_t byteOffset, uint32_t byteLength,
     
     bool
     DataViewObject::getAndCheckConstructorArgs(JSContext* cx, JSObject* bufobj, const CallArgs& args,
    -                                           uint32_t* byteOffsetPtr, uint32_t* byteLengthPtr)
    +                                           uint32_t* byteOffsetPtr, uint32_t* byteLengthPtr,
    +                                           bool* lengthTrackingPtr)
     {
         if (!IsArrayBuffer(bufobj)) {
             JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_NOT_EXPECTED_TYPE,
    @@ -1932,6 +1946,7 @@ DataViewObject::getAndCheckConstructorArgs(JSContext* cx, JSObject* bufobj, cons
         Rooted buffer(cx, &AsArrayBuffer(bufobj));
         uint32_t byteOffset = 0;
         uint32_t byteLength = buffer->byteLength();
    +    bool lengthTracking = buffer->isResizable() && !args.hasDefined(2);
     
         if (args.length() > 1) {
             if (!ToUint32(cx, args[1], &byteOffset))
    @@ -1957,9 +1972,11 @@ DataViewObject::getAndCheckConstructorArgs(JSContext* cx, JSObject* bufobj, cons
     
             if (args.get(2).isUndefined()) {
                 byteLength -= byteOffset;
    +            lengthTracking = buffer->isResizable();
             } else {
                 if (!ToUint32(cx, args[2], &byteLength))
                     return false;
    +            lengthTracking = false;
                 if (byteLength > INT32_MAX) {
                     JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
                                               JSMSG_ARG_INDEX_OUT_OF_RANGE, "2");
    @@ -1983,6 +2000,7 @@ DataViewObject::getAndCheckConstructorArgs(JSContext* cx, JSObject* bufobj, cons
     
         *byteOffsetPtr = byteOffset;
         *byteLengthPtr = byteLength;
    +    *lengthTrackingPtr = lengthTracking;
     
         return true;
     }
    @@ -1994,7 +2012,8 @@ DataViewObject::constructSameCompartment(JSContext* cx, HandleObject bufobj, con
         assertSameCompartment(cx, bufobj);
     
         uint32_t byteOffset, byteLength;
    -    if (!getAndCheckConstructorArgs(cx, bufobj, args, &byteOffset, &byteLength))
    +    bool lengthTracking;
    +    if (!getAndCheckConstructorArgs(cx, bufobj, args, &byteOffset, &byteLength, &lengthTracking))
             return false;
     
         RootedObject proto(cx);
    @@ -2003,7 +2022,8 @@ DataViewObject::constructSameCompartment(JSContext* cx, HandleObject bufobj, con
             return false;
     
         Rooted buffer(cx, &AsArrayBuffer(bufobj));
    -    JSObject* obj = DataViewObject::create(cx, byteOffset, byteLength, buffer, proto);
    +    JSObject* obj = DataViewObject::create(cx, byteOffset, byteLength, buffer, proto,
    +                                           lengthTracking);
         if (!obj)
             return false;
         args.rval().setObject(*obj);
    @@ -2043,8 +2063,12 @@ DataViewObject::constructWrapped(JSContext* cx, HandleObject bufobj, const CallA
     
         // NB: This entails the IsArrayBuffer check
         uint32_t byteOffset, byteLength;
    -    if (!getAndCheckConstructorArgs(cx, unwrapped, args, &byteOffset, &byteLength))
    +    bool lengthTracking;
    +    if (!getAndCheckConstructorArgs(cx, unwrapped, args, &byteOffset, &byteLength,
    +                                    &lengthTracking))
    +    {
             return false;
    +    }
     
         // Make sure to get the [[Prototype]] for the created view from this
         // compartment.
    @@ -2060,11 +2084,12 @@ DataViewObject::constructWrapped(JSContext* cx, HandleObject bufobj, const CallA
                 return false;
         }
     
    -    FixedInvokeArgs<3> args2(cx);
    +    FixedInvokeArgs<4> args2(cx);
     
         args2[0].set(PrivateUint32Value(byteOffset));
         args2[1].set(PrivateUint32Value(byteLength));
         args2[2].setObject(*proto);
    +    args2[3].setBoolean(lengthTracking);
     
         RootedValue fval(cx, global->createDataViewForThis());
         RootedValue thisv(cx, ObjectValue(*bufobj));
    diff --git a/js/src/vm/TypedArrayObject.h b/js/src/vm/TypedArrayObject.h
    index 8b4b0b5092..9d7f667979 100644
    --- a/js/src/vm/TypedArrayObject.h
    +++ b/js/src/vm/TypedArrayObject.h
    @@ -52,6 +52,8 @@ class TypedArrayObject : public NativeObject
                       "right buffer slot");
     
         // Slot containing length of the view in number of typed elements.
    +    // Length-tracking views on resizable/growable buffers store
    +    // LENGTH_TRACKING here and compute their visible length from the buffer.
         static const size_t LENGTH_SLOT = 1;
         static_assert(LENGTH_SLOT == JS_TYPEDARRAYLAYOUT_LENGTH_SLOT,
                       "self-hosted code with burned-in constants must get the "
    @@ -65,6 +67,8 @@ class TypedArrayObject : public NativeObject
     
         static const size_t RESERVED_SLOTS = 3;
     
    +    static const int32_t LENGTH_TRACKING = -1;
    +
     #ifdef DEBUG
         static const uint8_t ZeroLengthArrayData = 0x4A;
     #endif
    @@ -139,15 +143,13 @@ class TypedArrayObject : public NativeObject
             return tarr->getFixedSlot(BUFFER_SLOT);
         }
         static Value byteOffsetValue(TypedArrayObject* tarr) {
    -        Value v = tarr->getFixedSlot(BYTEOFFSET_SLOT);
    -        MOZ_ASSERT(v.toInt32() >= 0);
    -        return v;
    +        return Int32Value(tarr->byteOffset());
         }
         static Value byteLengthValue(TypedArrayObject* tarr) {
    -        return Int32Value(tarr->getFixedSlot(LENGTH_SLOT).toInt32() * tarr->bytesPerElement());
    +        return Int32Value(tarr->byteLength());
         }
         static Value lengthValue(TypedArrayObject* tarr) {
    -        return tarr->getFixedSlot(LENGTH_SLOT);
    +        return Int32Value(tarr->length());
         }
     
         static bool
    @@ -159,14 +161,70 @@ class TypedArrayObject : public NativeObject
         JSObject* bufferObject() const {
             return bufferValue(const_cast(this)).toObjectOrNull();
         }
    +    bool isLengthTracking() const {
    +        return getFixedSlot(LENGTH_SLOT).toInt32() == LENGTH_TRACKING;
    +    }
    +    bool hasResizableOrGrowableBuffer() const {
    +        if (!hasBuffer())
    +            return false;
    +        if (isSharedMemory())
    +            return bufferShared()->isGrowable();
    +        return bufferUnshared()->isResizable();
    +    }
    +    uint32_t byteOffsetMaybeOutOfBounds() const {
    +        Value v = getFixedSlot(BYTEOFFSET_SLOT);
    +        MOZ_ASSERT(v.toInt32() >= 0);
    +        return v.toInt32();
    +    }
    +    uint32_t fixedLengthMaybeOutOfBounds() const {
    +        int32_t length = getFixedSlot(LENGTH_SLOT).toInt32();
    +        MOZ_ASSERT(length >= 0);
    +        return length;
    +    }
    +    uint32_t bufferByteLength() const {
    +        MOZ_ASSERT(hasBuffer());
    +        if (isSharedMemory())
    +            return bufferShared()->byteLength();
    +        return bufferUnshared()->byteLength();
    +    }
    +    bool isOutOfBounds() const {
    +        if (!hasBuffer())
    +            return false;
    +        if (hasDetachedBuffer())
    +            return true;
    +
    +        uint32_t bufferByteLength = this->bufferByteLength();
    +        uint32_t offset = byteOffsetMaybeOutOfBounds();
    +        if (offset > bufferByteLength)
    +            return true;
    +
    +        if (isLengthTracking())
    +            return false;
    +
    +        uint32_t byteLength = fixedLengthMaybeOutOfBounds() * bytesPerElement();
    +        return byteLength > bufferByteLength - offset;
    +    }
         uint32_t byteOffset() const {
    -        return byteOffsetValue(const_cast(this)).toInt32();
    +        if (isOutOfBounds())
    +            return 0;
    +        return byteOffsetMaybeOutOfBounds();
         }
         uint32_t byteLength() const {
    -        return byteLengthValue(const_cast(this)).toInt32();
    +        return length() * bytesPerElement();
         }
         uint32_t length() const {
    -        return lengthValue(const_cast(this)).toInt32();
    +        if (!isLengthTracking()) {
    +            if (isOutOfBounds())
    +                return 0;
    +            return fixedLengthMaybeOutOfBounds();
    +        }
    +
    +        if (isOutOfBounds())
    +            return 0;
    +
    +        uint32_t bufferByteLength = this->bufferByteLength();
    +        uint32_t offset = byteOffsetMaybeOutOfBounds();
    +        return (bufferByteLength - offset) / bytesPerElement();
         }
     
         bool hasInlineElements() const;
    @@ -466,28 +524,26 @@ class DataViewObject : public NativeObject
         defineGetter(JSContext* cx, PropertyName* name, HandleNativeObject proto);
     
         static bool getAndCheckConstructorArgs(JSContext* cx, JSObject* bufobj, const CallArgs& args,
    -                                           uint32_t *byteOffset, uint32_t* byteLength);
    +                                           uint32_t *byteOffset, uint32_t* byteLength,
    +                                           bool* lengthTracking);
         static bool constructSameCompartment(JSContext* cx, HandleObject bufobj, const CallArgs& args);
         static bool constructWrapped(JSContext* cx, HandleObject bufobj, const CallArgs& args);
     
         friend bool ArrayBufferObject::createDataViewForThisImpl(JSContext* cx, const CallArgs& args);
         static DataViewObject*
         create(JSContext* cx, uint32_t byteOffset, uint32_t byteLength,
    -           Handle arrayBuffer, JSObject* proto);
    +           Handle arrayBuffer, JSObject* proto,
    +           bool lengthTracking = false);
     
       public:
         static const Class class_;
     
         static Value byteOffsetValue(DataViewObject* view) {
    -        Value v = view->getFixedSlot(TypedArrayObject::BYTEOFFSET_SLOT);
    -        MOZ_ASSERT(v.toInt32() >= 0);
    -        return v;
    +        return Int32Value(view->byteOffset());
         }
     
         static Value byteLengthValue(DataViewObject* view) {
    -        Value v = view->getFixedSlot(TypedArrayObject::LENGTH_SLOT);
    -        MOZ_ASSERT(v.toInt32() >= 0);
    -        return v;
    +        return Int32Value(view->byteLength());
         }
     
         static Value bufferValue(DataViewObject* view) {
    @@ -495,11 +551,17 @@ class DataViewObject : public NativeObject
         }
     
         uint32_t byteOffset() const {
    -        return byteOffsetValue(const_cast(this)).toInt32();
    +        if (isOutOfBounds())
    +            return 0;
    +        return byteOffsetMaybeOutOfBounds();
         }
     
         uint32_t byteLength() const {
    -        return byteLengthValue(const_cast(this)).toInt32();
    +        if (isOutOfBounds())
    +            return 0;
    +        if (isLengthTracking())
    +            return arrayBuffer().byteLength() - byteOffsetMaybeOutOfBounds();
    +        return fixedByteLengthMaybeOutOfBounds();
         }
     
         ArrayBufferObject& arrayBuffer() const {
    @@ -510,6 +572,39 @@ class DataViewObject : public NativeObject
             return getPrivate();
         }
     
    +    bool isLengthTracking() const {
    +        return getFixedSlot(TypedArrayObject::LENGTH_SLOT).toInt32() ==
    +               TypedArrayObject::LENGTH_TRACKING;
    +    }
    +
    +    uint32_t byteOffsetMaybeOutOfBounds() const {
    +        Value v = getFixedSlot(TypedArrayObject::BYTEOFFSET_SLOT);
    +        MOZ_ASSERT(v.toInt32() >= 0);
    +        return v.toInt32();
    +    }
    +
    +    uint32_t fixedByteLengthMaybeOutOfBounds() const {
    +        int32_t length = getFixedSlot(TypedArrayObject::LENGTH_SLOT).toInt32();
    +        MOZ_ASSERT(length >= 0);
    +        return length;
    +    }
    +
    +    bool isOutOfBounds() const {
    +        const ArrayBufferObject& buffer = arrayBuffer();
    +        if (buffer.isDetached())
    +            return true;
    +
    +        uint32_t bufferByteLength = buffer.byteLength();
    +        uint32_t offset = byteOffsetMaybeOutOfBounds();
    +        if (offset > bufferByteLength)
    +            return true;
    +
    +        if (isLengthTracking())
    +            return false;
    +
    +        return fixedByteLengthMaybeOutOfBounds() > bufferByteLength - offset;
    +    }
    +
         static bool class_constructor(JSContext* cx, unsigned argc, Value* vp);
     
         static bool getInt8Impl(JSContext* cx, const CallArgs& args);
    
    From dece5e87c76a7b3051008305557a1e3c61bedcec Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 15 May 2026 20:01:02 -0400
    Subject: [PATCH 56/72] Guard typed array JIT paths for resizable buffers
    
    ---
     js/src/jit/BaselineIC.cpp                     | 13 ++++
     js/src/jit/CodeGenerator.cpp                  | 10 ++-
     js/src/jit/CodeGenerator.h                    |  3 +-
     js/src/jit/IonCaches.cpp                      | 17 +++++
     js/src/jit/MCallOptimize.cpp                  | 72 ++++---------------
     js/src/jit/MIR.cpp                            | 26 +++----
     js/src/jit/SharedIC.cpp                       | 11 +++
     js/src/jit/SharedIC.h                         |  6 +-
     js/src/jsfriendapi.h                          |  6 +-
     .../non262/ArrayBuffer/resizable-views.js     | 53 ++++++++++++++
     js/src/vm/NativeObject.cpp                    | 22 +++++-
     js/src/vm/NativeObject.h                      | 26 ++++++-
     js/src/vm/TypedArrayObject.cpp                |  7 ++
     13 files changed, 186 insertions(+), 86 deletions(-)
    
    diff --git a/js/src/jit/BaselineIC.cpp b/js/src/jit/BaselineIC.cpp
    index adef1f46f9..4fc540e626 100644
    --- a/js/src/jit/BaselineIC.cpp
    +++ b/js/src/jit/BaselineIC.cpp
    @@ -1470,6 +1470,12 @@ TryAttachGetElemStub(JSContext* cx, JSScript* script, jsbytecode* pc, ICGetElem_
             res.isNumber() &&
             !TypedArrayGetElemStubExists(stub, obj))
         {
    +        if (obj->is() &&
    +            obj->as().hasResizableOrGrowableBuffer())
    +        {
    +            return true;
    +        }
    +
             if (!cx->runtime()->jitSupportsFloatingPoint &&
                 (TypedThingRequiresFloatingPoint(obj) || rhs.isDouble()))
             {
    @@ -2160,6 +2166,8 @@ ICGetElem_TypedArray::Compiler::generateStubCode(MacroAssembler& masm)
         Register obj = masm.extractObject(R0, ExtractTemp0);
         masm.loadPtr(Address(ICStubReg, ICGetElem_TypedArray::offsetOfShape()), scratchReg);
         masm.branchTestObjShape(Assembler::NotEqual, obj, scratchReg, &failure);
    +    if (layout_ == Layout_TypedArray)
    +        GuardResizableOrGrowableTypedArray(masm, obj, scratchReg, &failure);
     
         // Ensure the index is an integer.
         if (cx->runtime()->jitSupportsFloatingPoint) {
    @@ -2631,6 +2639,9 @@ DoSetElemFallback(JSContext* cx, BaselineFrame* frame, ICSetElem_Fallback* stub_
             bool expectOutOfBounds;
             double idx = index.toNumber();
             if (obj->is()) {
    +            if (obj->as().hasResizableOrGrowableBuffer())
    +                return true;
    +
                 expectOutOfBounds = (idx < 0 || idx >= double(obj->as().length()));
             } else {
                 // Typed objects throw on out of bounds accesses. Don't attach
    @@ -3221,6 +3232,8 @@ ICSetElem_TypedArray::Compiler::generateStubCode(MacroAssembler& masm)
         Register obj = masm.extractObject(R0, ExtractTemp0);
         masm.loadPtr(Address(ICStubReg, ICSetElem_TypedArray::offsetOfShape()), scratchReg);
         masm.branchTestObjShape(Assembler::NotEqual, obj, scratchReg, &failure);
    +    if (layout_ == Layout_TypedArray)
    +        GuardResizableOrGrowableTypedArray(masm, obj, scratchReg, &failure);
     
         // Ensure the index is an integer.
         if (cx->runtime()->jitSupportsFloatingPoint) {
    diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp
    index a37c3079ef..1ef6e607e8 100644
    --- a/js/src/jit/CodeGenerator.cpp
    +++ b/js/src/jit/CodeGenerator.cpp
    @@ -8889,9 +8889,17 @@ CodeGenerator::branchIfNotEmptyObjectElements(Register obj, Label* target)
                        Address(obj, NativeObject::offsetOfElements()),
                        ImmPtr(js::emptyObjectElements),
                        &emptyObj);
    -    masm.branchPtr(Assembler::NotEqual,
    +    masm.branchPtr(Assembler::Equal,
                        Address(obj, NativeObject::offsetOfElements()),
                        ImmPtr(js::emptyObjectElementsShared),
    +                   &emptyObj);
    +    masm.branchPtr(Assembler::Equal,
    +                   Address(obj, NativeObject::offsetOfElements()),
    +                   ImmPtr(js::emptyObjectElementsResizableOrGrowable),
    +                   &emptyObj);
    +    masm.branchPtr(Assembler::NotEqual,
    +                   Address(obj, NativeObject::offsetOfElements()),
    +                   ImmPtr(js::emptyObjectElementsSharedResizableOrGrowable),
                        target);
         masm.bind(&emptyObj);
     }
    diff --git a/js/src/jit/CodeGenerator.h b/js/src/jit/CodeGenerator.h
    index 02fda9d577..0e554c17af 100644
    --- a/js/src/jit/CodeGenerator.h
    +++ b/js/src/jit/CodeGenerator.h
    @@ -537,8 +537,7 @@ class CodeGenerator final : public CodeGeneratorSpecific
                                          Label* ifDoesntEmulateUndefined,
                                          Register scratch, OutOfLineTestObject* ool);
     
    -    // Branch to target unless obj has an emptyObjectElements or emptyObjectElementsShared
    -    // elements pointer.
    +    // Branch to target unless obj has one of the empty elements pointers.
         void branchIfNotEmptyObjectElements(Register obj, Label* target);
     
         void emitStoreElementTyped(const LAllocation* value, MIRType valueType, MIRType elementType,
    diff --git a/js/src/jit/IonCaches.cpp b/js/src/jit/IonCaches.cpp
    index 5a7e437285..095dc14175 100644
    --- a/js/src/jit/IonCaches.cpp
    +++ b/js/src/jit/IonCaches.cpp
    @@ -1245,6 +1245,7 @@ GenerateTypedArrayLength(JSContext* cx, MacroAssembler& masm, IonCache::StubAtta
         masm.branchPtr(Assembler::AboveOrEqual, tmpReg,
                        ImmPtr(&TypedArrayObject::classes[Scalar::MaxTypedArrayViewType]),
                        failures);
    +    GuardResizableOrGrowableTypedArray(masm, object, tmpReg, failures);
     
         // Load length.
         masm.loadTypedOrValue(Address(object, TypedArrayObject::lengthOffset()), output);
    @@ -1644,6 +1645,9 @@ GetPropertyIC::tryAttachTypedArrayLength(JSContext* cx, HandleScript outerScript
         if (!JSID_IS_ATOM(id, cx->names().length))
             return true;
     
    +    if (obj->as().hasResizableOrGrowableBuffer())
    +        return true;
    +
         if (hasTypedArrayLengthStub(obj))
             return true;
     
    @@ -4038,6 +4042,12 @@ GetPropertyIC::canAttachTypedOrUnboxedArrayElement(JSObject* obj, const Value& i
         if (!obj->is() && !obj->is())
             return false;
     
    +    if (obj->is() &&
    +        obj->as().hasResizableOrGrowableBuffer())
    +    {
    +        return false;
    +    }
    +
         MOZ_ASSERT(idval.isInt32() || idval.isString());
     
         // Don't emit a stub if the access is out of bounds. We make to make
    @@ -4092,6 +4102,9 @@ GenerateGetTypedOrUnboxedArrayElement(JSContext* cx, MacroAssembler& masm,
         // Decide to what type index the stub should be optimized
         Register tmpReg = output.scratchReg().gpr();
         MOZ_ASSERT(tmpReg != InvalidReg);
    +    if (array->is())
    +        GuardResizableOrGrowableTypedArray(masm, object, tmpReg, &failures);
    +
         Register indexReg = tmpReg;
         if (idval.isString()) {
             MOZ_ASSERT(GetIndexFromString(idval.toString()) != UINT32_MAX);
    @@ -4575,6 +4588,7 @@ GenerateSetTypedArrayElement(JSContext* cx, MacroAssembler& masm, IonCache::Stub
         if (!shape)
             return false;
         masm.branchTestObjShape(Assembler::NotEqual, object, shape, &failures);
    +    GuardResizableOrGrowableTypedArray(masm, object, temp, &failures);
     
         // Ensure the index is an int32.
         Register indexReg;
    @@ -4661,6 +4675,9 @@ SetPropertyIC::tryAttachTypedArrayElement(JSContext* cx, HandleScript outerScrip
         if (!IsTypedArrayElementSetInlineable(obj, idval, val))
             return true;
     
    +    if (obj->as().hasResizableOrGrowableBuffer())
    +        return true;
    +
         *emitted = true;
     
         MacroAssembler masm(cx, ion, outerScript, profilerLeavePc_);
    diff --git a/js/src/jit/MCallOptimize.cpp b/js/src/jit/MCallOptimize.cpp
    index 0f78ef3f2f..4585a838b4 100644
    --- a/js/src/jit/MCallOptimize.cpp
    +++ b/js/src/jit/MCallOptimize.cpp
    @@ -365,13 +365,9 @@ IonBuilder::inlineNativeGetter(CallInfo& callInfo, JSFunction* target)
     
         // Try to optimize typed array lengths.
         if (TypedArrayObject::isOriginalLengthGetter(native)) {
    -        Scalar::Type type = thisTypes->getTypedArrayType(constraints());
    -        if (type == Scalar::MaxTypedArrayViewType)
    -            return InliningStatus_NotInlined;
    -
    -        MInstruction* length = addTypedArrayLength(thisArg);
    -        current->push(length);
    -        return InliningStatus_Inlined;
    +        // RAB/GSAB views can have dynamic length or temporarily become
    +        // out-of-bounds. Let the property IC/VM path handle the getter.
    +        return InliningStatus_NotInlined;
         }
     
         // Try to optimize RegExp getters.
    @@ -2480,21 +2476,10 @@ IsTypedArrayObject(CompilerConstraintList* constraints, MDefinition* def)
     IonBuilder::InliningStatus
     IonBuilder::inlinePossiblyWrappedTypedArrayLength(CallInfo& callInfo)
     {
    -    MOZ_ASSERT(!callInfo.constructing());
    -    MOZ_ASSERT(callInfo.argc() == 1);
    -    if (callInfo.getArg(0)->type() != MIRType::Object)
    -        return InliningStatus_NotInlined;
    -    if (getInlineReturnType() != MIRType::Int32)
    -        return InliningStatus_NotInlined;
    +    (void) callInfo;
     
    -    if (!IsTypedArrayObject(constraints(), callInfo.getArg(0)))
    -        return InliningStatus_NotInlined;
    -
    -    MInstruction* length = addTypedArrayLength(callInfo.getArg(0));
    -    current->push(length);
    -
    -    callInfo.setImplicitlyUsedUnchecked();
    -    return InliningStatus_Inlined;
    +    // RAB/GSAB views require dynamic length semantics.
    +    return InliningStatus_NotInlined;
     }
     
     IonBuilder::InliningStatus
    @@ -3251,45 +3236,14 @@ bool
     IonBuilder::atomicsMeetsPreconditions(CallInfo& callInfo, Scalar::Type* arrayType,
                                           bool* requiresTagCheck, AtomicCheckResult checkResult)
     {
    -    if (!JitSupportsAtomics())
    -        return false;
    +    (void) callInfo;
    +    (void) arrayType;
    +    (void) requiresTagCheck;
    +    (void) checkResult;
     
    -    if (callInfo.getArg(0)->type() != MIRType::Object)
    -        return false;
    -
    -    if (callInfo.getArg(1)->type() != MIRType::Int32)
    -        return false;
    -
    -    // Ensure that the first argument is a TypedArray that maps shared
    -    // memory.
    -    //
    -    // Then check both that the element type is something we can
    -    // optimize and that the return type is suitable for that element
    -    // type.
    -
    -    TemporaryTypeSet* arg0Types = callInfo.getArg(0)->resultTypeSet();
    -    if (!arg0Types)
    -        return false;
    -
    -    TemporaryTypeSet::TypedArraySharedness sharedness;
    -    *arrayType = arg0Types->getTypedArrayType(constraints(), &sharedness);
    -    *requiresTagCheck = sharedness != TemporaryTypeSet::KnownShared;
    -    switch (*arrayType) {
    -      case Scalar::Int8:
    -      case Scalar::Uint8:
    -      case Scalar::Int16:
    -      case Scalar::Uint16:
    -      case Scalar::Int32:
    -        return checkResult == DontCheckAtomicResult || getInlineReturnType() == MIRType::Int32;
    -      case Scalar::Uint32:
    -        // Bug 1077305: it would be attractive to allow inlining even
    -        // if the inline return type is Int32, which it will frequently
    -        // be.
    -        return checkResult == DontCheckAtomicResult || getInlineReturnType() == MIRType::Double;
    -      default:
    -        // Excludes floating types and Uint8Clamped.
    -        return false;
    -    }
    +    // Atomics bounds checks through addTypedArrayLengthAndData assume stable
    +    // SharedArrayBuffer lengths. Avoid this path now that growable SAB exists.
    +    return false;
     }
     
     void
    diff --git a/js/src/jit/MIR.cpp b/js/src/jit/MIR.cpp
    index 197737c1ef..8f13179bfd 100644
    --- a/js/src/jit/MIR.cpp
    +++ b/js/src/jit/MIR.cpp
    @@ -5505,25 +5505,15 @@ jit::ElementAccessIsTypedArray(CompilerConstraintList* constraints,
                                    MDefinition* obj, MDefinition* id,
                                    Scalar::Type* arrayType)
     {
    -    if (obj->mightBeType(MIRType::String))
    -        return false;
    +    (void) constraints;
    +    (void) obj;
    +    (void) id;
    +    (void) arrayType;
     
    -    if (id->type() != MIRType::Int32 && id->type() != MIRType::Double)
    -        return false;
    -
    -    TemporaryTypeSet* types = obj->resultTypeSet();
    -    if (!types)
    -        return false;
    -
    -    *arrayType = types->getTypedArrayType(constraints);
    -
    -    // FIXME: https://bugzil.la/1536699
    -    if (*arrayType == Scalar::MaxTypedArrayViewType ||
    -        Scalar::isBigIntType(*arrayType)) {
    -        return false;
    -    }
    -
    -  return true;
    +    // Resizable ArrayBuffer and growable SharedArrayBuffer views need dynamic
    +    // length/out-of-bounds handling. This older MIR path assumes stable
    +    // typed-array length/data slots, so keep element accesses on IC/VM paths.
    +    return false;
     }
     
     bool
    diff --git a/js/src/jit/SharedIC.cpp b/js/src/jit/SharedIC.cpp
    index 2805651f12..edf39837cd 100644
    --- a/js/src/jit/SharedIC.cpp
    +++ b/js/src/jit/SharedIC.cpp
    @@ -3631,6 +3631,17 @@ CheckForTypedObjectWithDetachedStorage(JSContext* cx, MacroAssembler& masm, Labe
         masm.branch32(Assembler::NotEqual, AbsoluteAddress(address), Imm32(0), failure);
     }
     
    +void
    +GuardResizableOrGrowableTypedArray(MacroAssembler& masm, Register obj, Register scratch,
    +                                   Label* failure)
    +{
    +    masm.loadPtr(Address(obj, NativeObject::offsetOfElements()), scratch);
    +    masm.branchTest32(Assembler::NonZero,
    +                      Address(scratch, ObjectElements::offsetOfFlags()),
    +                      Imm32(ObjectElements::RESIZABLE_OR_GROWABLE_BUFFER),
    +                      failure);
    +}
    +
     void
     LoadTypedThingData(MacroAssembler& masm, TypedThingLayout layout, Register obj, Register result)
     {
    diff --git a/js/src/jit/SharedIC.h b/js/src/jit/SharedIC.h
    index ab379d3039..cf23490942 100644
    --- a/js/src/jit/SharedIC.h
    +++ b/js/src/jit/SharedIC.h
    @@ -2307,7 +2307,11 @@ CheckDOMProxyExpandoDoesNotShadow(JSContext* cx, MacroAssembler& masm, Register
     void
     CheckForTypedObjectWithDetachedStorage(JSContext* cx, MacroAssembler& masm, Label* failure);
     
    -MOZ_MUST_USE bool
    +void
    +GuardResizableOrGrowableTypedArray(MacroAssembler& masm, Register obj, Register scratch,
    +                                   Label* failure);
    +
    +[[nodiscard]] bool
     DoCallNativeGetter(JSContext* cx, HandleFunction callee, HandleObject obj,
                        MutableHandleValue result);
     
    diff --git a/js/src/jsfriendapi.h b/js/src/jsfriendapi.h
    index c463019dac..2697cb5337 100644
    --- a/js/src/jsfriendapi.h
    +++ b/js/src/jsfriendapi.h
    @@ -1748,6 +1748,9 @@ JS_IsFloat64Array(JSObject* obj);
     extern JS_FRIEND_API(bool)
     JS_GetTypedArraySharedness(JSObject* obj);
     
    +extern JS_FRIEND_API(uint32_t)
    +JS_GetTypedArrayLength(JSObject* obj);
    +
     /*
      * Test for specific typed array types (ArrayBufferView subtypes) and return
      * the unwrapped object if so, else nullptr.  Never throws.
    @@ -1814,8 +1817,7 @@ inline void \
     Get ## Type ## ArrayLengthAndData(JSObject* obj, uint32_t* length, bool* isSharedMemory, type** data) \
     { \
         MOZ_ASSERT(GetObjectClass(obj) == detail::Type ## ArrayClassPtr); \
    -    const JS::Value& lenSlot = GetReservedSlot(obj, detail::TypedArrayLengthSlot); \
    -    *length = mozilla::AssertedCast(lenSlot.toInt32()); \
    +    *length = JS_GetTypedArrayLength(obj); \
         *isSharedMemory = JS_GetTypedArraySharedness(obj); \
         *data = static_cast(GetObjectPrivate(obj)); \
     }
    diff --git a/js/src/tests/non262/ArrayBuffer/resizable-views.js b/js/src/tests/non262/ArrayBuffer/resizable-views.js
    index 32d2e0e342..94a409f637 100644
    --- a/js/src/tests/non262/ArrayBuffer/resizable-views.js
    +++ b/js/src/tests/non262/ArrayBuffer/resizable-views.js
    @@ -66,5 +66,58 @@ assertEq(sharedTracking.length, 8);
     sharedTracking[6] = 33;
     assertEq(new Uint8Array(gsab)[6], 33);
     
    +function readLength(view) {
    +  return view.length;
    +}
    +
    +function readElement(view, index) {
    +  return view[index];
    +}
    +
    +function writeElement(view, index, value) {
    +  view[index] = value;
    +}
    +
    +var normal = new Uint8Array(4);
    +normal[0] = 7;
    +for (var i = 0; i < 2000; i++) {
    +  assertEq(readLength(normal), 4);
    +  assertEq(readElement(normal, 0), 7);
    +  writeElement(normal, 1, 8);
    +}
    +
    +var icRab = new ArrayBuffer(4, { maxByteLength: 8 });
    +var icTracking = new Uint8Array(icRab);
    +icTracking[0] = 9;
    +assertEq(readLength(icTracking), 4);
    +assertEq(readElement(icTracking, 0), 9);
    +icRab.resize(0);
    +assertEq(readLength(icTracking), 0);
    +assertEq(readElement(icTracking, 0), undefined);
    +writeElement(icTracking, 0, 1);
    +icRab.resize(4);
    +assertEq(readLength(icTracking), 4);
    +assertEq(readElement(icTracking, 0), 0);
    +writeElement(icTracking, 0, 12);
    +assertEq(readElement(icTracking, 0), 12);
    +
    +var icFixed = new Uint8Array(icRab, 1, 2);
    +assertEq(readLength(icFixed), 2);
    +icRab.resize(2);
    +assertEq(readLength(icFixed), 0);
    +assertEq(readElement(icFixed, 0), undefined);
    +writeElement(icFixed, 0, 55);
    +icRab.resize(4);
    +assertEq(readLength(icFixed), 2);
    +assertEq(readElement(icFixed, 0), 0);
    +
    +var icGsab = new SharedArrayBuffer(4, { maxByteLength: 8 });
    +var icSharedTracking = new Uint8Array(icGsab);
    +assertEq(readLength(icSharedTracking), 4);
    +icGsab.grow(8);
    +assertEq(readLength(icSharedTracking), 8);
    +writeElement(icSharedTracking, 5, 77);
    +assertEq(readElement(icSharedTracking, 5), 77);
    +
     if (typeof reportCompare === "function")
       reportCompare(true, true);
    diff --git a/js/src/vm/NativeObject.cpp b/js/src/vm/NativeObject.cpp
    index cde86fb829..b34a20c91b 100644
    --- a/js/src/vm/NativeObject.cpp
    +++ b/js/src/vm/NativeObject.cpp
    @@ -43,6 +43,22 @@ static const ObjectElements emptyElementsHeaderShared(0, 0, ObjectElements::Shar
     HeapSlot* const js::emptyObjectElementsShared =
         reinterpret_cast(uintptr_t(&emptyElementsHeaderShared) + sizeof(ObjectElements));
     
    +static const ObjectElements emptyElementsHeaderResizableOrGrowable(
    +    0, 0, ObjectElements::RESIZABLE_OR_GROWABLE_BUFFER);
    +
    +/* Objects with no elements share one empty set of elements. */
    +HeapSlot* const js::emptyObjectElementsResizableOrGrowable =
    +    reinterpret_cast(uintptr_t(&emptyElementsHeaderResizableOrGrowable) +
    +                                sizeof(ObjectElements));
    +
    +static const ObjectElements emptyElementsHeaderSharedResizableOrGrowable(
    +    0, 0, ObjectElements::SHARED_MEMORY | ObjectElements::RESIZABLE_OR_GROWABLE_BUFFER);
    +
    +/* Objects with no elements share one empty set of elements. */
    +HeapSlot* const js::emptyObjectElementsSharedResizableOrGrowable =
    +    reinterpret_cast(uintptr_t(&emptyElementsHeaderSharedResizableOrGrowable) +
    +                                sizeof(ObjectElements));
    +
     
     #ifdef DEBUG
     
    @@ -61,10 +77,12 @@ ObjectElements::ConvertElementsToDoubles(JSContext* cx, uintptr_t elementsPtr)
          * This function is infallible, but has a fallible interface so that it can
          * be called directly from Ion code. Only arrays can have their dense
          * elements converted to doubles, and arrays never have empty elements.
    -     */
    +    */
         HeapSlot* elementsHeapPtr = (HeapSlot*) elementsPtr;
         MOZ_ASSERT(elementsHeapPtr != emptyObjectElements &&
    -               elementsHeapPtr != emptyObjectElementsShared);
    +               elementsHeapPtr != emptyObjectElementsShared &&
    +               elementsHeapPtr != emptyObjectElementsResizableOrGrowable &&
    +               elementsHeapPtr != emptyObjectElementsSharedResizableOrGrowable);
     
         ObjectElements* header = ObjectElements::fromElements(elementsHeapPtr);
         MOZ_ASSERT(!header->shouldConvertDoubleElements());
    diff --git a/js/src/vm/NativeObject.h b/js/src/vm/NativeObject.h
    index 86977d109f..67fd3a7a46 100644
    --- a/js/src/vm/NativeObject.h
    +++ b/js/src/vm/NativeObject.h
    @@ -185,6 +185,11 @@ class ObjectElements
     
             // These elements are set to integrity level "frozen".
             FROZEN                      = 0x10,
    +
    +        // For TypedArrays only: this TypedArray views a resizable
    +        // ArrayBuffer or growable SharedArrayBuffer. JIT fast paths with
    +        // cached length/data assumptions must fall back for these objects.
    +        RESIZABLE_OR_GROWABLE_BUFFER = 0x20,
         };
     
       private:
    @@ -255,6 +260,10 @@ class ObjectElements
           : flags(SHARED_MEMORY), initializedLength(0), capacity(capacity), length(length)
         {}
     
    +    constexpr ObjectElements(uint32_t capacity, uint32_t length, uint32_t flags)
    +      : flags(flags), initializedLength(0), capacity(capacity), length(length)
    +    {}
    +
         HeapSlot* elements() {
             return reinterpret_cast(uintptr_t(this) + sizeof(ObjectElements));
         }
    @@ -269,6 +278,10 @@ class ObjectElements
             return flags & SHARED_MEMORY;
         }
     
    +    bool hasResizableOrGrowableBuffer() const {
    +        return flags & RESIZABLE_OR_GROWABLE_BUFFER;
    +    }
    +
         GCPtrNativeObject& ownerObject() const {
             MOZ_ASSERT(isCopyOnWrite());
             return *(GCPtrNativeObject*)(&elements()[initializedLength]);
    @@ -326,6 +339,8 @@ static_assert(ObjectElements::VALUES_PER_HEADER * sizeof(HeapSlot) == sizeof(Obj
      */
     extern HeapSlot* const emptyObjectElements;
     extern HeapSlot* const emptyObjectElementsShared;
    +extern HeapSlot* const emptyObjectElementsResizableOrGrowable;
    +extern HeapSlot* const emptyObjectElementsSharedResizableOrGrowable;
     
     struct Class;
     class GCMarker;
    @@ -480,6 +495,12 @@ class NativeObject : public ShapedObject
             elements_ = emptyObjectElementsShared;
         }
     
    +    void setHasResizableOrGrowableBuffer() {
    +        MOZ_ASSERT(elements_ == emptyObjectElements || elements_ == emptyObjectElementsShared);
    +        elements_ = isSharedMemory() ? emptyObjectElementsSharedResizableOrGrowable
    +                                     : emptyObjectElementsResizableOrGrowable;
    +    }
    +
         bool isInWholeCellBuffer() const {
             const gc::TenuredCell* cell = &asTenured();
             gc::ArenaCellSet* cells = cell->arena()->bufferedCells;
    @@ -1254,7 +1275,10 @@ class NativeObject : public ShapedObject
         }
     
         inline bool hasEmptyElements() const {
    -        return elements_ == emptyObjectElements || elements_ == emptyObjectElementsShared;
    +        return elements_ == emptyObjectElements ||
    +               elements_ == emptyObjectElementsShared ||
    +               elements_ == emptyObjectElementsResizableOrGrowable ||
    +               elements_ == emptyObjectElementsSharedResizableOrGrowable;
         }
     
         /*
    diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp
    index 7750122ac4..05b33d4e65 100644
    --- a/js/src/vm/TypedArrayObject.cpp
    +++ b/js/src/vm/TypedArrayObject.cpp
    @@ -511,12 +511,19 @@ class TypedArrayObjectTemplate : public TypedArrayObject
                 return nullptr;
     
             bool isSharedMemory = buffer && IsSharedArrayBuffer(buffer.get());
    +        bool hasResizableOrGrowableBuffer =
    +            buffer &&
    +            ((buffer->is() && buffer->as().isResizable()) ||
    +             (buffer->is() &&
    +              buffer->as().isGrowable()));
     
             obj->setFixedSlot(TypedArrayObject::BUFFER_SLOT, ObjectOrNullValue(buffer));
             // This is invariant.  Self-hosting code that sets BUFFER_SLOT
             // (if it does) must maintain it, should it need to.
             if (isSharedMemory)
                 obj->setIsSharedMemory();
    +        if (hasResizableOrGrowableBuffer)
    +            obj->setHasResizableOrGrowableBuffer();
     
             if (buffer) {
                 obj->initViewData(buffer->dataPointerEither() + byteOffset);
    
    From b16be9604411321b627e0799ae17d17f031de778 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 15 May 2026 20:15:09 -0400
    Subject: [PATCH 57/72] Support DataView on shared array buffers
    
    ---
     .../non262/ArrayBuffer/resizable-views.js     | 17 ++++++
     js/src/vm/ArrayBufferObject.cpp               | 15 +++---
     js/src/vm/ArrayBufferObject.h                 |  2 +-
     js/src/vm/StructuredClone.cpp                 |  1 +
     js/src/vm/TypedArrayObject.cpp                | 53 ++++++++++++-------
     js/src/vm/TypedArrayObject.h                  | 16 ++++--
     6 files changed, 73 insertions(+), 31 deletions(-)
    
    diff --git a/js/src/tests/non262/ArrayBuffer/resizable-views.js b/js/src/tests/non262/ArrayBuffer/resizable-views.js
    index 94a409f637..40cb0260bf 100644
    --- a/js/src/tests/non262/ArrayBuffer/resizable-views.js
    +++ b/js/src/tests/non262/ArrayBuffer/resizable-views.js
    @@ -66,6 +66,23 @@ assertEq(sharedTracking.length, 8);
     sharedTracking[6] = 33;
     assertEq(new Uint8Array(gsab)[6], 33);
     
    +var sharedDv = new DataView(gsab);
    +assertEq(sharedDv.buffer, gsab);
    +assertEq(sharedDv.byteOffset, 0);
    +assertEq(sharedDv.byteLength, 8);
    +sharedDv.setUint8(7, 99);
    +assertEq(sharedTracking[7], 99);
    +gsab.grow(12);
    +assertEq(sharedDv.byteLength, 12);
    +assertEq(sharedDv.getUint8(7), 99);
    +
    +var fixedSharedDv = new DataView(gsab, 4, 2);
    +assertEq(fixedSharedDv.byteOffset, 4);
    +assertEq(fixedSharedDv.byteLength, 2);
    +gsab.grow(16);
    +assertEq(fixedSharedDv.byteOffset, 4);
    +assertEq(fixedSharedDv.byteLength, 2);
    +
     function readLength(view) {
       return view.length;
     }
    diff --git a/js/src/vm/ArrayBufferObject.cpp b/js/src/vm/ArrayBufferObject.cpp
    index 904a1b3842..2ac6ced5ff 100644
    --- a/js/src/vm/ArrayBufferObject.cpp
    +++ b/js/src/vm/ArrayBufferObject.cpp
    @@ -1474,7 +1474,7 @@ ArrayBufferObject::createEmpty(JSContext* cx)
     bool
     ArrayBufferObject::createDataViewForThisImpl(JSContext* cx, const CallArgs& args)
     {
    -    MOZ_ASSERT(IsArrayBuffer(args.thisv()));
    +    MOZ_ASSERT(IsAnyArrayBuffer(args.thisv()));
     
         /*
          * This method is only called for |DataView(alienBuf, ...)| which calls
    @@ -1487,7 +1487,8 @@ ArrayBufferObject::createDataViewForThisImpl(JSContext* cx, const CallArgs& args
         uint32_t byteOffset = args[0].toPrivateUint32();
         uint32_t byteLength = args[1].toPrivateUint32();
         bool lengthTracking = args[3].toBoolean();
    -    Rooted buffer(cx, &args.thisv().toObject().as());
    +    Rooted buffer(cx,
    +        &args.thisv().toObject().as());
     
         /*
          * Pop off the passed-along prototype and delegate to normal DataViewObject
    @@ -1505,7 +1506,7 @@ bool
     ArrayBufferObject::createDataViewForThis(JSContext* cx, unsigned argc, Value* vp)
     {
         CallArgs args = CallArgsFromVp(argc, vp);
    -    return CallNonGenericMethod(cx, args);
    +    return CallNonGenericMethod(cx, args);
     }
     
     /* static */ ArrayBufferObject::BufferContents
    @@ -1926,6 +1927,8 @@ ArrayBufferViewObject::dataPointerUnshared(const JS::AutoRequireNoGC& nogc)
     bool
     ArrayBufferViewObject::isSharedMemory()
     {
    +    if (is())
    +        return as().isSharedMemory();
         if (is())
             return as().isSharedMemory();
         return false;
    @@ -1957,7 +1960,7 @@ ArrayBufferViewObject::bufferObject(JSContext* cx, Handleas().bufferEither();
         }
         MOZ_ASSERT(thisObject->is());
    -    return &thisObject->as().arrayBuffer();
    +    return &thisObject->as().arrayBufferEither();
     }
     
     /* JS Friend API */
    @@ -2208,7 +2211,7 @@ JS_GetArrayBufferViewData(JSObject* obj, bool* isSharedMemory, const JS::AutoChe
         if (!obj)
             return nullptr;
         if (obj->is()) {
    -        *isSharedMemory = false;
    +        *isSharedMemory = obj->as().isSharedMemory();
             return obj->as().dataPointer();
         }
         TypedArrayObject& ta = obj->as();
    @@ -2278,7 +2281,7 @@ js::GetArrayBufferViewLengthAndData(JSObject* obj, uint32_t* length, bool* isSha
                   : obj->as().byteLength();
     
         if (obj->is()) {
    -        *isSharedMemory = false;
    +        *isSharedMemory = obj->as().isSharedMemory();
             *data = static_cast(obj->as().dataPointer());
         }
         else {
    diff --git a/js/src/vm/ArrayBufferObject.h b/js/src/vm/ArrayBufferObject.h
    index c9dc80a598..f9e3353b7e 100644
    --- a/js/src/vm/ArrayBufferObject.h
    +++ b/js/src/vm/ArrayBufferObject.h
    @@ -82,7 +82,7 @@ ArrayBufferObjectMaybeShared& AsAnyArrayBuffer(HandleValue val);
     class ArrayBufferObjectMaybeShared : public NativeObject
     {
       public:
    -    uint32_t byteLength() {
    +    uint32_t byteLength() const {
             return AnyArrayBufferByteLength(this);
         }
     
    diff --git a/js/src/vm/StructuredClone.cpp b/js/src/vm/StructuredClone.cpp
    index e1f1b2777e..50e6162923 100644
    --- a/js/src/vm/StructuredClone.cpp
    +++ b/js/src/vm/StructuredClone.cpp
    @@ -45,6 +45,7 @@
     #include "builtin/MapObject.h"
     #include "js/Date.h"
     #include "js/GCHashTable.h"
    +#include "vm/ArrayBufferObject-inl.h"
     #include "vm/SavedFrame.h"
     #include "vm/SharedArrayObject.h"
     #include "vm/TypedArrayObject.h"
    diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp
    index 05b33d4e65..4db48e7ac9 100644
    --- a/js/src/vm/TypedArrayObject.cpp
    +++ b/js/src/vm/TypedArrayObject.cpp
    @@ -1876,7 +1876,7 @@ DataViewNewObjectKind(JSContext* cx, uint32_t byteLength, JSObject* proto)
     
     DataViewObject*
     DataViewObject::create(JSContext* cx, uint32_t byteOffset, uint32_t byteLength,
    -                       Handle arrayBuffer, JSObject* protoArg,
    +                       Handle arrayBuffer, JSObject* protoArg,
                            bool lengthTracking)
     {
         if (arrayBuffer->isDetached()) {
    @@ -1887,7 +1887,6 @@ DataViewObject::create(JSContext* cx, uint32_t byteOffset, uint32_t byteLength,
         MOZ_ASSERT(byteOffset <= INT32_MAX);
         MOZ_ASSERT(byteLength <= INT32_MAX);
         MOZ_ASSERT(byteOffset + byteLength < UINT32_MAX);
    -    MOZ_ASSERT(!arrayBuffer || !arrayBuffer->is());
     
         RootedObject proto(cx, protoArg);
         RootedObject obj(cx);
    @@ -1923,18 +1922,25 @@ DataViewObject::create(JSContext* cx, uint32_t byteOffset, uint32_t byteLength,
                            Int32Value(lengthTracking ? TypedArrayObject::LENGTH_TRACKING
                                                      : int32_t(byteLength)));
         dvobj.setFixedSlot(TypedArrayObject::BUFFER_SLOT, ObjectValue(*arrayBuffer));
    -    dvobj.initPrivate(arrayBuffer->dataPointer() + byteOffset);
    +    auto dataPointer = arrayBuffer->dataPointerEither();
    +    dvobj.initPrivate((dataPointer + byteOffset).unwrap(/*safe - stored as private data*/));
     
         // Include a barrier if the data view's data pointer is in the nursery, as
         // is done for typed arrays.
    -    if (!IsInsideNursery(obj) && cx->runtime()->gc.nursery.isInside(arrayBuffer->dataPointer()))
    +    if (arrayBuffer->is() &&
    +        !IsInsideNursery(obj) &&
    +        cx->runtime()->gc.nursery.isInside(dataPointer))
    +    {
             cx->runtime()->gc.storeBuffer.putWholeCell(obj);
    +    }
     
         // Verify that the private slot is at the expected place
         MOZ_ASSERT(dvobj.numFixedSlots() == TypedArrayObject::DATA_SLOT);
     
    -    if (!arrayBuffer->addView(cx, &dvobj))
    -        return nullptr;
    +    if (arrayBuffer->is()) {
    +        if (!arrayBuffer->as().addView(cx, &dvobj))
    +            return nullptr;
    +    }
     
         return &dvobj;
     }
    @@ -1944,28 +1950,35 @@ DataViewObject::getAndCheckConstructorArgs(JSContext* cx, JSObject* bufobj, cons
                                                uint32_t* byteOffsetPtr, uint32_t* byteLengthPtr,
                                                bool* lengthTrackingPtr)
     {
    -    if (!IsArrayBuffer(bufobj)) {
    +    if (!IsAnyArrayBuffer(bufobj)) {
             JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_NOT_EXPECTED_TYPE,
    -                                  "DataView", "ArrayBuffer", bufobj->getClass()->name);
    +                                  "DataView", "ArrayBuffer or SharedArrayBuffer",
    +                                  bufobj->getClass()->name);
             return false;
         }
     
    -    Rooted buffer(cx, &AsArrayBuffer(bufobj));
    +    Rooted buffer(cx, &bufobj->as());
         uint32_t byteOffset = 0;
         uint32_t byteLength = buffer->byteLength();
    -    bool lengthTracking = buffer->isResizable() && !args.hasDefined(2);
    +    bool isResizableOrGrowable =
    +        (buffer->is() && buffer->as().isResizable()) ||
    +        (buffer->is() &&
    +         buffer->as().isGrowable());
    +    bool lengthTracking = isResizableOrGrowable && !args.hasDefined(2);
     
         if (args.length() > 1) {
    -        if (!ToUint32(cx, args[1], &byteOffset))
    +        uint64_t offset;
    +        if (!ToIndex(cx, args[1], &offset))
                 return false;
    -        if (byteOffset > INT32_MAX) {
    +        if (offset > INT32_MAX) {
                 JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_ARG_INDEX_OUT_OF_RANGE,
                                           "1");
                 return false;
             }
    +        byteOffset = uint32_t(offset);
         }
     
    -    if (buffer->isDetached()) {
    +    if (buffer->is() && buffer->as().isDetached()) {
             JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_DETACHED);
             return false;
         }
    @@ -1979,16 +1992,18 @@ DataViewObject::getAndCheckConstructorArgs(JSContext* cx, JSObject* bufobj, cons
     
             if (args.get(2).isUndefined()) {
                 byteLength -= byteOffset;
    -            lengthTracking = buffer->isResizable();
    +            lengthTracking = isResizableOrGrowable;
             } else {
    -            if (!ToUint32(cx, args[2], &byteLength))
    +            uint64_t viewByteLength;
    +            if (!ToIndex(cx, args[2], &viewByteLength))
                     return false;
                 lengthTracking = false;
    -            if (byteLength > INT32_MAX) {
    +            if (viewByteLength > INT32_MAX) {
                     JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr,
                                               JSMSG_ARG_INDEX_OUT_OF_RANGE, "2");
                     return false;
                 }
    +            byteLength = uint32_t(viewByteLength);
     
                 MOZ_ASSERT(byteOffset + byteLength >= byteOffset,
                            "can't overflow: both numbers are less than INT32_MAX");
    @@ -2028,7 +2043,7 @@ DataViewObject::constructSameCompartment(JSContext* cx, HandleObject bufobj, con
         if (!GetPrototypeFromConstructor(cx, newTarget, &proto))
             return false;
     
    -    Rooted buffer(cx, &AsArrayBuffer(bufobj));
    +    Rooted buffer(cx, &bufobj->as());
         JSObject* obj = DataViewObject::create(cx, byteOffset, byteLength, buffer, proto,
                                                lengthTracking);
         if (!obj)
    @@ -2287,7 +2302,7 @@ DataViewObject::read(JSContext* cx, Handle obj,
         bool isLittleEndian = args.length() >= 2 && ToBoolean(args[1]);
     
         // Steps 6-7.
    -    if (obj->arrayBuffer().isDetached()) {
    +    if (obj->arrayBufferEither().isDetached()) {
             JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_DETACHED);
             return false;
         }
    @@ -2386,7 +2401,7 @@ DataViewObject::write(JSContext* cx, Handle obj,
         bool isLittleEndian = args.length() >= 3 && ToBoolean(args[2]);
     
         // Steps 7-8.
    -    if (obj->arrayBuffer().isDetached()) {
    +    if (obj->arrayBufferEither().isDetached()) {
             JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_DETACHED);
             return false;
         }
    diff --git a/js/src/vm/TypedArrayObject.h b/js/src/vm/TypedArrayObject.h
    index 9d7f667979..8c08bb870e 100644
    --- a/js/src/vm/TypedArrayObject.h
    +++ b/js/src/vm/TypedArrayObject.h
    @@ -532,7 +532,7 @@ class DataViewObject : public NativeObject
         friend bool ArrayBufferObject::createDataViewForThisImpl(JSContext* cx, const CallArgs& args);
         static DataViewObject*
         create(JSContext* cx, uint32_t byteOffset, uint32_t byteLength,
    -           Handle arrayBuffer, JSObject* proto,
    +           Handle arrayBuffer, JSObject* proto,
                bool lengthTracking = false);
     
       public:
    @@ -560,12 +560,18 @@ class DataViewObject : public NativeObject
             if (isOutOfBounds())
                 return 0;
             if (isLengthTracking())
    -            return arrayBuffer().byteLength() - byteOffsetMaybeOutOfBounds();
    +            return arrayBufferEither().byteLength() - byteOffsetMaybeOutOfBounds();
             return fixedByteLengthMaybeOutOfBounds();
         }
     
    -    ArrayBufferObject& arrayBuffer() const {
    -        return bufferValue(const_cast(this)).toObject().as();
    +    ArrayBufferObjectMaybeShared& arrayBufferEither() const {
    +        return bufferValue(const_cast(this)).
    +               toObject().as();
    +    }
    +
    +    bool isSharedMemory() const {
    +        return bufferValue(const_cast(this)).
    +               toObject().is();
         }
     
         void* dataPointer() const {
    @@ -590,7 +596,7 @@ class DataViewObject : public NativeObject
         }
     
         bool isOutOfBounds() const {
    -        const ArrayBufferObject& buffer = arrayBuffer();
    +        const ArrayBufferObjectMaybeShared& buffer = arrayBufferEither();
             if (buffer.isDetached())
                 return true;
     
    
    From 93085352cd8c734f9c0f4b9080f2ef93f9967a23 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 15 May 2026 20:22:42 -0400
    Subject: [PATCH 58/72] Support BigInt Atomics waiters
    
    ---
     js/src/builtin/AtomicsObject.cpp         | 180 +++++++++++++++++++++--
     js/src/tests/non262/Atomics/waitAsync.js |  40 +++++
     2 files changed, 205 insertions(+), 15 deletions(-)
    
    diff --git a/js/src/builtin/AtomicsObject.cpp b/js/src/builtin/AtomicsObject.cpp
    index 72b5ccdcc5..f917db9b21 100644
    --- a/js/src/builtin/AtomicsObject.cpp
    +++ b/js/src/builtin/AtomicsObject.cpp
    @@ -47,6 +47,7 @@
     #include "builtin/AtomicsObject.h"
     
     #include "mozilla/Atomics.h"
    +#include "mozilla/Casting.h"
     #include "mozilla/FloatingPoint.h"
     #include "mozilla/Maybe.h"
     #include "mozilla/Unused.h"
    @@ -59,6 +60,7 @@
     #include "jit/AtomicOperations.h"
     #include "jit/InlinableNatives.h"
     #include "js/Class.h"
    +#include "vm/BigIntType.h"
     #include "vm/GlobalObject.h"
     #include "vm/HelperThreads.h"
     #include "vm/Time.h"
    @@ -123,6 +125,68 @@ GetTypedArrayIndex(JSContext* cx, HandleValue v, Handle view,
         return true;
     }
     
    +static bool
    +IsWaitableTypedArray(Scalar::Type viewType)
    +{
    +    return viewType == Scalar::Int32 || viewType == Scalar::BigInt64;
    +}
    +
    +static uint32_t
    +GetWaiterByteOffset(Handle view, uint32_t offset)
    +{
    +    return view->byteOffset() + offset * TypedArrayElemSize(view->type());
    +}
    +
    +static uint64_t
    +BigIntToRawBits(Scalar::Type viewType, BigInt* value)
    +{
    +    if (viewType == Scalar::BigInt64)
    +        return uint64_t(BigInt::toInt64(value));
    +    MOZ_ASSERT(viewType == Scalar::BigUint64);
    +    return BigInt::toUint64(value);
    +}
    +
    +static bool
    +BigIntToRawBits(JSContext* cx, Scalar::Type viewType, HandleValue value, uint64_t* bits)
    +{
    +    MOZ_ASSERT(Scalar::isBigIntType(viewType));
    +
    +    RootedBigInt bigint(cx, ToBigInt(cx, value));
    +    if (!bigint)
    +        return false;
    +
    +    *bits = BigIntToRawBits(viewType, bigint);
    +    return true;
    +}
    +
    +static bool
    +SetBigIntResult(JSContext* cx, Scalar::Type viewType, uint64_t bits, MutableHandleValue result)
    +{
    +    MOZ_ASSERT(Scalar::isBigIntType(viewType));
    +
    +    BigInt* bigint = viewType == Scalar::BigInt64
    +                     ? BigInt::createFromInt64(cx, mozilla::BitwiseCast(bits))
    +                     : BigInt::createFromUint64(cx, bits);
    +    if (!bigint)
    +        return false;
    +
    +    result.setBigInt(bigint);
    +    return true;
    +}
    +
    +static bool
    +WaitValueMatches(Handle view, uint32_t offset, uint64_t expected)
    +{
    +    SharedMem viewData = view->viewDataShared();
    +    if (view->type() == Scalar::BigInt64) {
    +        return jit::AtomicOperations::loadSafeWhenRacy(viewData.cast() + offset) ==
    +               expected;
    +    }
    +
    +    return uint32_t(jit::AtomicOperations::loadSafeWhenRacy(viewData.cast() + offset)) ==
    +           uint32_t(expected);
    +}
    +
     static int32_t
     CompareExchange(Scalar::Type viewType, int32_t oldCandidate, int32_t newCandidate,
                     SharedMem viewData, uint32_t offset, bool* badArrayType = nullptr)
    @@ -193,6 +257,20 @@ js::atomics_compareExchange(JSContext* cx, unsigned argc, Value* vp)
         uint32_t offset;
         if (!GetTypedArrayIndex(cx, idxv, view, &offset))
             return false;
    +
    +    if (Scalar::isBigIntType(view->type())) {
    +        uint64_t oldCandidate;
    +        if (!BigIntToRawBits(cx, view->type(), oldv, &oldCandidate))
    +            return false;
    +        uint64_t newCandidate;
    +        if (!BigIntToRawBits(cx, view->type(), newv, &newCandidate))
    +            return false;
    +
    +        uint64_t result = jit::AtomicOperations::compareExchangeSeqCst(
    +            view->viewDataShared().cast() + offset, oldCandidate, newCandidate);
    +        return SetBigIntResult(cx, view->type(), result, r);
    +    }
    +
         int32_t oldCandidate;
         if (!ToInt32(cx, oldv, &oldCandidate))
             return false;
    @@ -261,6 +339,22 @@ js::atomics_load(JSContext* cx, unsigned argc, Value* vp)
             r.setNumber(v);
             return true;
           }
    +      case Scalar::BigInt64: {
    +        int64_t v = jit::AtomicOperations::loadSeqCst(viewData.cast() + offset);
    +        BigInt* bigint = BigInt::createFromInt64(cx, v);
    +        if (!bigint)
    +            return false;
    +        r.setBigInt(bigint);
    +        return true;
    +      }
    +      case Scalar::BigUint64: {
    +        uint64_t v = jit::AtomicOperations::loadSeqCst(viewData.cast() + offset);
    +        BigInt* bigint = BigInt::createFromUint64(cx, v);
    +        if (!bigint)
    +            return false;
    +        r.setBigInt(bigint);
    +        return true;
    +      }
           default:
             return ReportBadArrayType(cx);
         }
    @@ -339,6 +433,25 @@ ExchangeOrStore(JSContext* cx, unsigned argc, Value* vp)
         uint32_t offset;
         if (!GetTypedArrayIndex(cx, idxv, view, &offset))
             return false;
    +
    +    if (Scalar::isBigIntType(view->type())) {
    +        RootedBigInt bigint(cx, ToBigInt(cx, valv));
    +        if (!bigint)
    +            return false;
    +
    +        uint64_t value = BigIntToRawBits(view->type(), bigint);
    +        if (op == DoStore) {
    +            jit::AtomicOperations::storeSeqCst(view->viewDataShared().cast() + offset,
    +                                               value);
    +            r.setBigInt(bigint);
    +            return true;
    +        }
    +
    +        uint64_t result = jit::AtomicOperations::exchangeSeqCst(
    +            view->viewDataShared().cast() + offset, value);
    +        return SetBigIntResult(cx, view->type(), result, r);
    +    }
    +
         double integerValue;
         if (!ToInteger(cx, valv, &integerValue))
             return false;
    @@ -382,6 +495,24 @@ AtomicsBinop(JSContext* cx, HandleValue objv, HandleValue idxv, HandleValue valv
         uint32_t offset;
         if (!GetTypedArrayIndex(cx, idxv, view, &offset))
             return false;
    +
    +    if (Scalar::isBigIntType(view->type())) {
    +        uint64_t value;
    +        if (!BigIntToRawBits(cx, view->type(), valv, &value))
    +            return false;
    +
    +        SharedMem addr = view->viewDataShared().cast() + offset;
    +        uint64_t old = jit::AtomicOperations::loadSeqCst(addr);
    +        for (;;) {
    +            uint64_t replacement = T::operate64(old, value);
    +            uint64_t observed = jit::AtomicOperations::compareExchangeSeqCst(addr, old,
    +                                                                             replacement);
    +            if (observed == old)
    +                return SetBigIntResult(cx, view->type(), old, r);
    +            old = observed;
    +        }
    +    }
    +
         int32_t numberValue;
         if (!ToInt32(cx, valv, &numberValue))
             return false;
    @@ -436,6 +567,7 @@ class PerformAdd
     public:
         INTEGRAL_TYPES_FOR_EACH(jit::AtomicOperations::fetchAddSeqCst)
         static int32_t perform(int32_t x, int32_t y) { return x + y; }
    +    static uint64_t operate64(uint64_t x, uint64_t y) { return x + y; }
     };
     
     bool
    @@ -450,6 +582,7 @@ class PerformSub
     public:
         INTEGRAL_TYPES_FOR_EACH(jit::AtomicOperations::fetchSubSeqCst)
         static int32_t perform(int32_t x, int32_t y) { return x - y; }
    +    static uint64_t operate64(uint64_t x, uint64_t y) { return x - y; }
     };
     
     bool
    @@ -464,6 +597,7 @@ class PerformAnd
     public:
         INTEGRAL_TYPES_FOR_EACH(jit::AtomicOperations::fetchAndSeqCst)
         static int32_t perform(int32_t x, int32_t y) { return x & y; }
    +    static uint64_t operate64(uint64_t x, uint64_t y) { return x & y; }
     };
     
     bool
    @@ -478,6 +612,7 @@ class PerformOr
     public:
         INTEGRAL_TYPES_FOR_EACH(jit::AtomicOperations::fetchOrSeqCst)
         static int32_t perform(int32_t x, int32_t y) { return x | y; }
    +    static uint64_t operate64(uint64_t x, uint64_t y) { return x | y; }
     };
     
     bool
    @@ -492,6 +627,7 @@ class PerformXor
     public:
         INTEGRAL_TYPES_FOR_EACH(jit::AtomicOperations::fetchXorSeqCst)
         static int32_t perform(int32_t x, int32_t y) { return x ^ y; }
    +    static uint64_t operate64(uint64_t x, uint64_t y) { return x ^ y; }
     };
     
     bool
    @@ -736,7 +872,7 @@ class FutexWaiter
         bool isWaiting() const;
         void notify();
     
    -    uint32_t    offset;                 // int32 element index within the SharedArrayBuffer
    +    uint32_t    offset;                 // byte offset within the SharedArrayBuffer
         enum WaiterKind {
             Sync,
             Async
    @@ -970,14 +1106,21 @@ js::atomics_wait(JSContext* cx, unsigned argc, Value* vp)
         Rooted view(cx, nullptr);
         if (!GetSharedTypedArray(cx, objv, &view))
             return false;
    -    if (view->type() != Scalar::Int32)
    +    if (!IsWaitableTypedArray(view->type()))
             return ReportBadArrayType(cx);
         uint32_t offset;
         if (!GetTypedArrayIndex(cx, idxv, view, &offset))
             return false;
    -    int32_t value;
    -    if (!ToInt32(cx, valv, &value))
    -        return false;
    +    uint64_t value = 0;
    +    if (view->type() == Scalar::BigInt64) {
    +        if (!BigIntToRawBits(cx, view->type(), valv, &value))
    +            return false;
    +    } else {
    +        int32_t int32Value;
    +        if (!ToInt32(cx, valv, &int32Value))
    +            return false;
    +        value = uint32_t(int32Value);
    +    }
         mozilla::Maybe timeout;
         if (!GetWaitTimeout(cx, timeoutv, &timeout))
             return false;
    @@ -989,8 +1132,7 @@ js::atomics_wait(JSContext* cx, unsigned argc, Value* vp)
         // and it provides the necessary memory fence.
         AutoLockFutexAPI lock;
     
    -    SharedMem addr = view->viewDataShared().cast() + offset;
    -    if (jit::AtomicOperations::loadSafeWhenRacy(addr) != value) {
    +    if (!WaitValueMatches(view, offset, value)) {
             r.setString(cx->names().futexNotEqual);
             return true;
         }
    @@ -998,7 +1140,7 @@ js::atomics_wait(JSContext* cx, unsigned argc, Value* vp)
         Rooted sab(cx, view->bufferShared());
         SharedArrayRawBuffer* sarb = sab->rawBufferObject();
     
    -    FutexWaiter w(offset, rt);
    +    FutexWaiter w(GetWaiterByteOffset(view, offset), rt);
         AddWaiter(sarb, &w);
     
         FutexRuntime::WaitResult result = FutexRuntime::FutexOK;
    @@ -1031,14 +1173,21 @@ js::atomics_waitAsync(JSContext* cx, unsigned argc, Value* vp)
         Rooted view(cx, nullptr);
         if (!GetSharedTypedArray(cx, objv, &view))
             return false;
    -    if (view->type() != Scalar::Int32)
    +    if (!IsWaitableTypedArray(view->type()))
             return ReportBadArrayType(cx);
         uint32_t offset;
         if (!GetTypedArrayIndex(cx, idxv, view, &offset))
             return false;
    -    int32_t value;
    -    if (!ToInt32(cx, valv, &value))
    -        return false;
    +    uint64_t value = 0;
    +    if (view->type() == Scalar::BigInt64) {
    +        if (!BigIntToRawBits(cx, view->type(), valv, &value))
    +            return false;
    +    } else {
    +        int32_t int32Value;
    +        if (!ToInt32(cx, valv, &int32Value))
    +            return false;
    +        value = uint32_t(int32Value);
    +    }
         mozilla::Maybe timeout;
         if (!GetWaitTimeout(cx, timeoutv, &timeout))
             return false;
    @@ -1070,8 +1219,7 @@ js::atomics_waitAsync(JSContext* cx, unsigned argc, Value* vp)
         {
             AutoLockFutexAPI lock;
     
    -        SharedMem addr = view->viewDataShared().cast() + offset;
    -        if (jit::AtomicOperations::loadSafeWhenRacy(addr) != value) {
    +        if (!WaitValueMatches(view, offset, value)) {
                 immediateResult.setString(cx->names().futexNotEqual);
             } else if (timeout.isSome() && timeout->ToMilliseconds() == 0.0) {
                 immediateResult.setString(cx->names().futexTimedOut);
    @@ -1083,6 +1231,7 @@ js::atomics_waitAsync(JSContext* cx, unsigned argc, Value* vp)
                     return false;
                 }
     
    +            task->waiter()->offset = GetWaiterByteOffset(view, offset);
                 AddWaiter(sarb, task->waiter());
                 task->setInWaiterList();
                 isAsync = true;
    @@ -1111,11 +1260,12 @@ js::atomics_notify(JSContext* cx, unsigned argc, Value* vp)
         Rooted view(cx, nullptr);
         if (!GetSharedTypedArray(cx, objv, &view))
             return false;
    -    if (view->type() != Scalar::Int32)
    +    if (!IsWaitableTypedArray(view->type()))
             return ReportBadArrayType(cx);
         uint32_t offset;
         if (!GetTypedArrayIndex(cx, idxv, view, &offset))
             return false;
    +    offset = GetWaiterByteOffset(view, offset);
         double count;
         if (countv.isUndefined()) {
             count = mozilla::PositiveInfinity();
    diff --git a/js/src/tests/non262/Atomics/waitAsync.js b/js/src/tests/non262/Atomics/waitAsync.js
    index ae5c876e3d..a2b23a4f80 100644
    --- a/js/src/tests/non262/Atomics/waitAsync.js
    +++ b/js/src/tests/non262/Atomics/waitAsync.js
    @@ -31,6 +31,46 @@ if (typeof SharedArrayBuffer === "function" && typeof Atomics === "object" &&
       });
       drainJobQueue();
       assertEq(timedOut, "timed-out");
    +
    +  if (typeof BigInt64Array === "function") {
    +    const bigSab = new SharedArrayBuffer(16);
    +    const i64 = new BigInt64Array(bigSab);
    +    const u64 = new BigUint64Array(bigSab);
    +
    +    assertEq(Atomics.store(i64, 0, -1n), -1n);
    +    assertEq(Atomics.load(i64, 0), -1n);
    +    assertEq(Atomics.load(u64, 0), 18446744073709551615n);
    +    assertEq(Atomics.exchange(i64, 0, 7n), -1n);
    +    assertEq(Atomics.compareExchange(i64, 0, 7n, 10n), 7n);
    +    assertEq(Atomics.add(i64, 0, 5n), 10n);
    +    assertEq(Atomics.load(i64, 0), 15n);
    +    assertEq(Atomics.sub(i64, 0, 20n), 15n);
    +    assertEq(Atomics.load(i64, 0), -5n);
    +    assertEq(Atomics.and(u64, 0, 7n), 18446744073709551611n);
    +    assertEq(Atomics.or(u64, 0, 8n), 3n);
    +    assertEq(Atomics.xor(u64, 0, 15n), 11n);
    +
    +    assertThrowsInstanceOf(() => Atomics.waitAsync(u64, 0, 0n), TypeError);
    +
    +    result = Atomics.waitAsync(i64, 1, 1n, 10);
    +    assertEq(result.async, false);
    +    assertEq(result.value, "not-equal");
    +
    +    result = Atomics.waitAsync(i64, 1, 0n, 0);
    +    assertEq(result.async, false);
    +    assertEq(result.value, "timed-out");
    +
    +    let offsetView = new BigInt64Array(bigSab, 8);
    +    result = Atomics.waitAsync(offsetView, 0, 0n);
    +    assertEq(result.async, true);
    +    notified = undefined;
    +    result.value.then(value => {
    +      notified = value;
    +    });
    +    assertEq(Atomics.notify(i64, 1, 1), 1);
    +    drainJobQueue();
    +    assertEq(notified, "ok");
    +  }
     }
     
     if (typeof reportCompare === "function")
    
    From 3751321a0e258b41dc904e5cefa6f3777269482b Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 15 May 2026 20:41:27 -0400
    Subject: [PATCH 59/72] Fix resizable DataView out-of-bounds semantics
    
    ---
     js/src/js.msg                                 |  1 +
     .../non262/ArrayBuffer/resizable-views.js     | 38 ++++++++++++++++---
     js/src/vm/TypedArrayObject.cpp                | 29 +++++++++++---
     3 files changed, 58 insertions(+), 10 deletions(-)
    
    diff --git a/js/src/js.msg b/js/src/js.msg
    index d9a6c98764..517e34c38a 100644
    --- a/js/src/js.msg
    +++ b/js/src/js.msg
    @@ -555,6 +555,7 @@ MSG_DEF(JSMSG_TYPED_ARRAY_BAD_ARGS,    0, JSEXN_TYPEERR, "invalid arguments")
     MSG_DEF(JSMSG_TYPED_ARRAY_NEGATIVE_ARG,1, JSEXN_RANGEERR, "argument {0} must be >= 0")
     MSG_DEF(JSMSG_TYPED_ARRAY_DETACHED,    0, JSEXN_TYPEERR, "attempting to access detached ArrayBuffer")
     MSG_DEF(JSMSG_TYPED_ARRAY_CONSTRUCT_BOUNDS, 0, JSEXN_RANGEERR, "attempting to construct out-of-bounds TypedArray on ArrayBuffer")
    +MSG_DEF(JSMSG_DATA_VIEW_OUT_OF_BOUNDS, 0, JSEXN_TYPEERR, "attempting to access out-of-bounds DataView")
     MSG_DEF(JSMSG_TYPED_ARRAY_CALL_OR_CONSTRUCT, 1, JSEXN_TYPEERR, "cannot directly {0} builtin %TypedArray%")
     MSG_DEF(JSMSG_NON_TYPED_ARRAY_RETURNED, 0, JSEXN_TYPEERR, "constructor didn't return TypedArray object")
     MSG_DEF(JSMSG_SHORT_TYPED_ARRAY_RETURNED, 2, JSEXN_TYPEERR, "expected TypedArray of at least length {0}, but constructor returned TypedArray of length {1}")
    diff --git a/js/src/tests/non262/ArrayBuffer/resizable-views.js b/js/src/tests/non262/ArrayBuffer/resizable-views.js
    index 40cb0260bf..590b9ce691 100644
    --- a/js/src/tests/non262/ArrayBuffer/resizable-views.js
    +++ b/js/src/tests/non262/ArrayBuffer/resizable-views.js
    @@ -41,9 +41,9 @@ dv.setUint8(0, 44);
     assertEq(tracking[4], 44);
     
     rab.resize(3);
    -assertEq(dv.byteOffset, 0);
    -assertEq(dv.byteLength, 0);
    -assertThrowsInstanceOf(() => dv.getUint8(0), RangeError);
    +assertThrowsInstanceOf(() => dv.byteOffset, TypeError);
    +assertThrowsInstanceOf(() => dv.byteLength, TypeError);
    +assertThrowsInstanceOf(() => dv.getUint8(0), TypeError);
     
     rab.resize(6);
     assertEq(dv.byteOffset, 4);
    @@ -52,12 +52,40 @@ assertEq(dv.getUint8(0), 0);
     
     var fixedDv = new DataView(rab, 4, 2);
     rab.resize(5);
    -assertEq(fixedDv.byteOffset, 0);
    -assertEq(fixedDv.byteLength, 0);
    +assertThrowsInstanceOf(() => fixedDv.byteOffset, TypeError);
    +assertThrowsInstanceOf(() => fixedDv.byteLength, TypeError);
    +assertThrowsInstanceOf(() => fixedDv.getUint8(0), TypeError);
     rab.resize(6);
     assertEq(fixedDv.byteOffset, 4);
     assertEq(fixedDv.byteLength, 2);
     
    +var ctorRab = new ArrayBuffer(8, { maxByteLength: 8 });
    +var ShrinkingNewTarget = new Proxy(function() {}, {
    +  get(target, prop, receiver) {
    +    if (prop === "prototype") {
    +      ctorRab.resize(2);
    +      return DataView.prototype;
    +    }
    +    return Reflect.get(target, prop, receiver);
    +  }
    +});
    +assertThrowsInstanceOf(() => Reflect.construct(DataView, [ctorRab, 4], ShrinkingNewTarget),
    +                       RangeError);
    +
    +var fixedCtorRab = new ArrayBuffer(8, { maxByteLength: 8 });
    +var FixedShrinkingNewTarget = new Proxy(function() {}, {
    +  get(target, prop, receiver) {
    +    if (prop === "prototype") {
    +      fixedCtorRab.resize(5);
    +      return DataView.prototype;
    +    }
    +    return Reflect.get(target, prop, receiver);
    +  }
    +});
    +assertThrowsInstanceOf(() => Reflect.construct(DataView, [fixedCtorRab, 4, 2],
    +                                               FixedShrinkingNewTarget),
    +                       RangeError);
    +
     var gsab = new SharedArrayBuffer(4, { maxByteLength: 16 });
     var sharedTracking = new Uint8Array(gsab);
     assertEq(sharedTracking.length, 4);
    diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp
    index 4db48e7ac9..cf89eba3bb 100644
    --- a/js/src/vm/TypedArrayObject.cpp
    +++ b/js/src/vm/TypedArrayObject.cpp
    @@ -1886,7 +1886,18 @@ DataViewObject::create(JSContext* cx, uint32_t byteOffset, uint32_t byteLength,
     
         MOZ_ASSERT(byteOffset <= INT32_MAX);
         MOZ_ASSERT(byteLength <= INT32_MAX);
    -    MOZ_ASSERT(byteOffset + byteLength < UINT32_MAX);
    +
    +    uint32_t bufferByteLength = arrayBuffer->byteLength();
    +    if (byteOffset > bufferByteLength ||
    +        (!lengthTracking && byteLength > bufferByteLength - byteOffset))
    +    {
    +        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_ARG_INDEX_OUT_OF_RANGE,
    +                                  "1");
    +        return nullptr;
    +    }
    +
    +    if (lengthTracking)
    +        byteLength = bufferByteLength - byteOffset;
     
         RootedObject proto(cx, protoArg);
         RootedObject obj(cx);
    @@ -1910,9 +1921,6 @@ DataViewObject::create(JSContext* cx, uint32_t byteOffset, uint32_t byteLength,
             }
         }
     
    -    // Caller should have established these preconditions, and no
    -    // (non-self-hosted) JS code has had an opportunity to run so nothing can
    -    // have invalidated them.
         MOZ_ASSERT(byteOffset <= arrayBuffer->byteLength());
         MOZ_ASSERT(byteOffset + byteLength <= arrayBuffer->byteLength());
     
    @@ -2139,6 +2147,11 @@ template 
     /* static */ uint8_t*
     DataViewObject::getDataPointer(JSContext* cx, Handle obj, uint64_t offset)
     {
    +    if (obj->isOutOfBounds()) {
    +        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_DATA_VIEW_OUT_OF_BOUNDS);
    +        return nullptr;
    +    }
    +
         const size_t TypeSize = sizeof(NativeType);
         if (offset > UINT32_MAX - TypeSize || offset + TypeSize > obj->byteLength()) {
             JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_ARG_INDEX_OUT_OF_RANGE,
    @@ -3226,7 +3239,13 @@ template
     bool
     DataViewObject::getterImpl(JSContext* cx, const CallArgs& args)
     {
    -    args.rval().set(ValueGetter(&args.thisv().toObject().as()));
    +    Rooted view(cx, &args.thisv().toObject().as());
    +    if (ValueGetter != bufferValue && view->isOutOfBounds()) {
    +        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_DATA_VIEW_OUT_OF_BOUNDS);
    +        return false;
    +    }
    +
    +    args.rval().set(ValueGetter(view));
         return true;
     }
     
    
    From 6c6023cac9ed831d1f5efb6b09e7dd138b823109 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 15 May 2026 20:55:57 -0400
    Subject: [PATCH 60/72] Validate typed array methods on resizable buffers
    
    ---
     js/src/builtin/TypedArray.js                  | 25 +++++++++++
     js/src/js.msg                                 |  1 +
     .../non262/ArrayBuffer/resizable-views.js     | 41 +++++++++++++++++++
     js/src/vm/SelfHosting.cpp                     | 34 +++++++++++++++
     4 files changed, 101 insertions(+)
    
    diff --git a/js/src/builtin/TypedArray.js b/js/src/builtin/TypedArray.js
    index c831b74614..97a4c2d8f7 100644
    --- a/js/src/builtin/TypedArray.js
    +++ b/js/src/builtin/TypedArray.js
    @@ -37,10 +37,25 @@ function TypedArrayLengthMethod() {
         return TypedArrayLength(this);
     }
     
    +function TypedArrayContentTypeIsBigIntMethod() {
    +    return IsBigInt64TypedArray(this) || IsBigUint64TypedArray(this);
    +}
    +
    +function ThrowIfTypedArrayOutOfBounds(tarray) {
    +    if (TypedArrayIsOutOfBounds(tarray))
    +        ThrowTypeError(JSMSG_TYPED_ARRAY_OUT_OF_BOUNDS);
    +}
    +
    +function ThrowIfPossiblyWrappedTypedArrayOutOfBounds(tarray) {
    +    if (PossiblyWrappedTypedArrayIsOutOfBounds(tarray))
    +        ThrowTypeError(JSMSG_TYPED_ARRAY_OUT_OF_BOUNDS);
    +}
    +
     function GetAttachedArrayBuffer(tarray) {
         var buffer = ViewedArrayBufferIfReified(tarray);
         if (IsDetachedBuffer(buffer))
             ThrowTypeError(JSMSG_TYPED_ARRAY_DETACHED);
    +    ThrowIfTypedArrayOutOfBounds(tarray);
         return buffer;
     }
     
    @@ -60,6 +75,13 @@ function IsTypedArrayEnsuringArrayBuffer(arg) {
             return true;
         }
     
    +    if (IsObject(arg) && IsPossiblyWrappedTypedArray(arg)) {
    +        if (PossiblyWrappedTypedArrayHasDetachedBuffer(arg))
    +            ThrowTypeError(JSMSG_TYPED_ARRAY_DETACHED);
    +        ThrowIfPossiblyWrappedTypedArrayOutOfBounds(arg);
    +        return false;
    +    }
    +
         callFunction(CallTypedArrayMethodIfWrapped, arg, "GetAttachedArrayBufferMethod");
         return false;
     }
    @@ -79,6 +101,7 @@ function ValidateTypedArray(obj, error) {
             if (IsPossiblyWrappedTypedArray(obj)) {
                 if (PossiblyWrappedTypedArrayHasDetachedBuffer(obj))
                     ThrowTypeError(JSMSG_TYPED_ARRAY_DETACHED);
    +            ThrowIfPossiblyWrappedTypedArrayOutOfBounds(obj);
                 return false;
             }
         }
    @@ -1366,6 +1389,8 @@ function TypedArraySubarray(begin, end) {
                                 "TypedArraySubarray");
         }
     
    +    GetAttachedArrayBuffer(obj);
    +
         // Steps 4-6.
         var buffer = TypedArrayBuffer(obj);
         var srcLength = TypedArrayLength(obj);
    diff --git a/js/src/js.msg b/js/src/js.msg
    index 517e34c38a..d8547ae4eb 100644
    --- a/js/src/js.msg
    +++ b/js/src/js.msg
    @@ -555,6 +555,7 @@ MSG_DEF(JSMSG_TYPED_ARRAY_BAD_ARGS,    0, JSEXN_TYPEERR, "invalid arguments")
     MSG_DEF(JSMSG_TYPED_ARRAY_NEGATIVE_ARG,1, JSEXN_RANGEERR, "argument {0} must be >= 0")
     MSG_DEF(JSMSG_TYPED_ARRAY_DETACHED,    0, JSEXN_TYPEERR, "attempting to access detached ArrayBuffer")
     MSG_DEF(JSMSG_TYPED_ARRAY_CONSTRUCT_BOUNDS, 0, JSEXN_RANGEERR, "attempting to construct out-of-bounds TypedArray on ArrayBuffer")
    +MSG_DEF(JSMSG_TYPED_ARRAY_OUT_OF_BOUNDS, 0, JSEXN_TYPEERR, "attempting to access out-of-bounds TypedArray")
     MSG_DEF(JSMSG_DATA_VIEW_OUT_OF_BOUNDS, 0, JSEXN_TYPEERR, "attempting to access out-of-bounds DataView")
     MSG_DEF(JSMSG_TYPED_ARRAY_CALL_OR_CONSTRUCT, 1, JSEXN_TYPEERR, "cannot directly {0} builtin %TypedArray%")
     MSG_DEF(JSMSG_NON_TYPED_ARRAY_RETURNED, 0, JSEXN_TYPEERR, "constructor didn't return TypedArray object")
    diff --git a/js/src/tests/non262/ArrayBuffer/resizable-views.js b/js/src/tests/non262/ArrayBuffer/resizable-views.js
    index 590b9ce691..81e6328b67 100644
    --- a/js/src/tests/non262/ArrayBuffer/resizable-views.js
    +++ b/js/src/tests/non262/ArrayBuffer/resizable-views.js
    @@ -59,6 +59,47 @@ rab.resize(6);
     assertEq(fixedDv.byteOffset, 4);
     assertEq(fixedDv.byteLength, 2);
     
    +var methodRab = new ArrayBuffer(4, { maxByteLength: 8 });
    +var methodFixed = new Uint8Array(methodRab, 2, 2);
    +methodRab.resize(2);
    +[
    +  () => methodFixed.at(0),
    +  () => methodFixed.copyWithin(0, 0),
    +  () => methodFixed.entries(),
    +  () => methodFixed.every(x => true),
    +  () => methodFixed.fill(1),
    +  () => methodFixed.filter(x => true),
    +  () => methodFixed.find(x => true),
    +  () => methodFixed.findIndex(x => true),
    +  () => methodFixed.findLast(x => true),
    +  () => methodFixed.findLastIndex(x => true),
    +  () => methodFixed.forEach(x => x),
    +  () => methodFixed.includes(0),
    +  () => methodFixed.indexOf(0),
    +  () => methodFixed.join(","),
    +  () => methodFixed.keys(),
    +  () => methodFixed.lastIndexOf(0),
    +  () => methodFixed.map(x => x),
    +  () => methodFixed.reduce((a, b) => a + b, 0),
    +  () => methodFixed.reduceRight((a, b) => a + b, 0),
    +  () => methodFixed.reverse(),
    +  () => methodFixed.set([1], 0),
    +  () => methodFixed.slice(),
    +  () => methodFixed.some(x => true),
    +  () => methodFixed.sort(),
    +  () => methodFixed.subarray(),
    +  () => methodFixed.toLocaleString(),
    +  () => methodFixed.toReversed(),
    +  () => methodFixed.toSorted(),
    +  () => methodFixed.toString(),
    +  () => methodFixed.values(),
    +  () => methodFixed.with(0, 1),
    +  () => methodFixed[Symbol.iterator](),
    +].forEach(fn => assertThrowsInstanceOf(fn, TypeError));
    +
    +methodRab.resize(4);
    +assertEq(methodFixed.length, 2);
    +
     var ctorRab = new ArrayBuffer(8, { maxByteLength: 8 });
     var ShrinkingNewTarget = new Proxy(function() {}, {
       get(target, prop, receiver) {
    diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp
    index f96b2225ab..d95d0b004f 100644
    --- a/js/src/vm/SelfHosting.cpp
    +++ b/js/src/vm/SelfHosting.cpp
    @@ -1310,6 +1310,36 @@ intrinsic_PossiblyWrappedTypedArrayHasDetachedBuffer(JSContext* cx, unsigned arg
         return true;
     }
     
    +static bool
    +intrinsic_TypedArrayIsOutOfBounds(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    MOZ_ASSERT(args.length() == 1);
    +
    +    RootedObject obj(cx, &args[0].toObject());
    +    MOZ_ASSERT(obj->is());
    +    args.rval().setBoolean(obj->as().isOutOfBounds());
    +    return true;
    +}
    +
    +static bool
    +intrinsic_PossiblyWrappedTypedArrayIsOutOfBounds(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    MOZ_ASSERT(args.length() == 1);
    +    MOZ_ASSERT(args[0].isObject());
    +
    +    JSObject* obj = CheckedUnwrap(&args[0].toObject());
    +    if (!obj) {
    +        JS_ReportErrorASCII(cx, "Permission denied to access object");
    +        return false;
    +    }
    +
    +    MOZ_ASSERT(obj->is());
    +    args.rval().setBoolean(obj->as().isOutOfBounds());
    +    return true;
    +}
    +
     static bool
     intrinsic_MoveTypedArrayElements(JSContext* cx, unsigned argc, Value* vp)
     {
    @@ -2502,6 +2532,10 @@ static const JSFunctionSpec intrinsic_functions[] = {
                         1, 0, IntrinsicPossiblyWrappedTypedArrayLength),
         JS_FN("PossiblyWrappedTypedArrayHasDetachedBuffer",
               intrinsic_PossiblyWrappedTypedArrayHasDetachedBuffer, 1, 0),
    +    JS_FN("TypedArrayIsOutOfBounds",
    +          intrinsic_TypedArrayIsOutOfBounds, 1, 0),
    +    JS_FN("PossiblyWrappedTypedArrayIsOutOfBounds",
    +          intrinsic_PossiblyWrappedTypedArrayIsOutOfBounds, 1, 0),
     
         JS_FN("MoveTypedArrayElements",  intrinsic_MoveTypedArrayElements,  4,0),
         JS_FN("SetFromTypedArrayApproach",intrinsic_SetFromTypedArrayApproach, 4, 0),
    
    From d8e52b4fcee1cde99ef7a9ea1ff0c20738ec62e0 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 15 May 2026 21:15:01 -0400
    Subject: [PATCH 61/72] Validate typed array set and constructors on resizable
     buffers
    
    ---
     js/src/builtin/TypedArray.js                  |  8 ++-
     .../non262/ArrayBuffer/resizable-views.js     |  9 +++
     js/src/vm/SelfHosting.cpp                     |  4 ++
     js/src/vm/TypedArrayCommon.h                  | 63 ++++++++++++++++---
     js/src/vm/TypedArrayObject.cpp                |  4 ++
     5 files changed, 77 insertions(+), 11 deletions(-)
    
    diff --git a/js/src/builtin/TypedArray.js b/js/src/builtin/TypedArray.js
    index 97a4c2d8f7..b5a3b2a011 100644
    --- a/js/src/builtin/TypedArray.js
    +++ b/js/src/builtin/TypedArray.js
    @@ -1047,12 +1047,18 @@ function TypedArraySet(overloaded, offset = 0) {
         // Steps 9-10.
         var targetBuffer = GetAttachedArrayBuffer(target);
     
    +    ThrowIfTypedArrayOutOfBounds(target);
    +
         // Step 11.
         var targetLength = TypedArrayLength(target);
     
         // Steps 12 et seq.
    -    if (IsPossiblyWrappedTypedArray(overloaded))
    +    if (IsPossiblyWrappedTypedArray(overloaded)) {
    +        if (PossiblyWrappedTypedArrayHasDetachedBuffer(overloaded))
    +            ThrowTypeError(JSMSG_TYPED_ARRAY_DETACHED);
    +        ThrowIfPossiblyWrappedTypedArrayOutOfBounds(overloaded);
             return SetFromTypedArray(target, overloaded, targetOffset, targetLength);
    +    }
     
         return SetFromNonTypedArray(target, overloaded, targetOffset, targetLength, targetBuffer);
     }
    diff --git a/js/src/tests/non262/ArrayBuffer/resizable-views.js b/js/src/tests/non262/ArrayBuffer/resizable-views.js
    index 81e6328b67..e8d810b165 100644
    --- a/js/src/tests/non262/ArrayBuffer/resizable-views.js
    +++ b/js/src/tests/non262/ArrayBuffer/resizable-views.js
    @@ -100,6 +100,15 @@ methodRab.resize(2);
     methodRab.resize(4);
     assertEq(methodFixed.length, 2);
     
    +var sourceRab = new ArrayBuffer(4, { maxByteLength: 8 });
    +var oobSource = new Uint8Array(sourceRab, 2, 2);
    +sourceRab.resize(2);
    +assertThrowsInstanceOf(() => new Uint8Array(oobSource), TypeError);
    +assertThrowsInstanceOf(() => new Uint16Array(oobSource), TypeError);
    +assertThrowsInstanceOf(() => new Uint8Array(4).set(oobSource), TypeError);
    +sourceRab.resize(4);
    +assertEq(new Uint8Array(oobSource).length, 2);
    +
     var ctorRab = new ArrayBuffer(8, { maxByteLength: 8 });
     var ShrinkingNewTarget = new Proxy(function() {}, {
       get(target, prop, receiver) {
    diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp
    index d95d0b004f..24b23f19ff 100644
    --- a/js/src/vm/SelfHosting.cpp
    +++ b/js/src/vm/SelfHosting.cpp
    @@ -1462,6 +1462,10 @@ intrinsic_SetFromTypedArrayApproach(JSContext* cx, unsigned argc, Value* vp)
             JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_DETACHED);
             return false;
         }
    +    if (unsafeTypedArrayCrossCompartment->isOutOfBounds()) {
    +        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_OUT_OF_BOUNDS);
    +        return false;
    +    }
     
         // Steps 21, 23.
         uint32_t unsafeSrcLengthCrossCompartment = unsafeTypedArrayCrossCompartment->length();
    diff --git a/js/src/vm/TypedArrayCommon.h b/js/src/vm/TypedArrayCommon.h
    index fab7210417..056f8b52be 100644
    --- a/js/src/vm/TypedArrayCommon.h
    +++ b/js/src/vm/TypedArrayCommon.h
    @@ -1065,16 +1065,40 @@ class TypedArrayMethods
                 if (!ToInt32(cx, args[1], &offset))
                     return false;
     
    -            if (offset < 0 || uint32_t(offset) > target->length()) {
    -                // the given offset is bogus
    +            if (offset < 0) {
                     JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_BAD_INDEX);
                     return false;
                 }
             }
     
    +        if (target->hasDetachedBuffer()) {
    +            JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_DETACHED);
    +            return false;
    +        }
    +        if (target->isOutOfBounds()) {
    +            JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_OUT_OF_BOUNDS);
    +            return false;
    +        }
    +
    +        uint32_t targetLength = target->length();
    +        if (uint32_t(offset) > targetLength) {
    +            JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_BAD_INDEX);
    +            return false;
    +        }
    +
             RootedObject arg0(cx, &args[0].toObject());
             if (arg0->is()) {
    -            if (arg0->as().length() > target->length() - offset) {
    +            Rooted source(cx, &arg0->as());
    +            if (source->hasDetachedBuffer()) {
    +                JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_DETACHED);
    +                return false;
    +            }
    +            if (source->isOutOfBounds()) {
    +                JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_OUT_OF_BOUNDS);
    +                return false;
    +            }
    +
    +            if (source->length() > targetLength - offset) {
                     JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_BAD_ARRAY_LENGTH);
                     return false;
                 }
    @@ -1086,7 +1110,7 @@ class TypedArrayMethods
                 if (!GetLengthProperty(cx, arg0, &len))
                     return false;
     
    -            if (uint32_t(offset) > target->length() || len > target->length() - offset) {
    +            if (len > targetLength - offset) {
                     JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_BAD_ARRAY_LENGTH);
                     return false;
                 }
    @@ -1099,13 +1123,32 @@ class TypedArrayMethods
             return true;
         }
     
    -     static bool
    -     setFromTypedArray(JSContext* cx, Handle target, HandleObject source,
    -                       uint32_t offset = 0)
    -     {
    -         MOZ_ASSERT(source->is(), "use setFromNonTypedArray");
    +    static bool
    +    setFromTypedArray(JSContext* cx, Handle target, HandleObject source,
    +                      uint32_t offset = 0)
    +    {
    +        MOZ_ASSERT(source->is(), "use setFromNonTypedArray");
     
    -         bool isShared = target->isSharedMemory() || source->as().isSharedMemory();
    +        if (target->hasDetachedBuffer()) {
    +            JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_DETACHED);
    +            return false;
    +        }
    +        if (target->isOutOfBounds()) {
    +            JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_OUT_OF_BOUNDS);
    +            return false;
    +        }
    +
    +        Rooted sourceArray(cx, &source->as());
    +        if (sourceArray->hasDetachedBuffer()) {
    +            JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_DETACHED);
    +            return false;
    +        }
    +        if (sourceArray->isOutOfBounds()) {
    +            JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_OUT_OF_BOUNDS);
    +            return false;
    +        }
    +
    +        bool isShared = target->isSharedMemory() || sourceArray->isSharedMemory();
     
              switch (target->type()) {
                case Scalar::Int8:
    diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp
    index cf89eba3bb..22d21c8550 100644
    --- a/js/src/vm/TypedArrayObject.cpp
    +++ b/js/src/vm/TypedArrayObject.cpp
    @@ -1337,6 +1337,10 @@ TypedArrayObjectTemplate::fromTypedArray(JSContext* cx, HandleObject other, b
             JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_DETACHED);
             return nullptr;
         }
    +    if (srcArray->isOutOfBounds()) {
    +        JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_TYPED_ARRAY_OUT_OF_BOUNDS);
    +        return nullptr;
    +    }
     
         // Step 9.
         uint32_t elementLength = srcArray->length();
    
    From 3e05786b77ebb9e3ef12e4ced1b55fb2bf072e23 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 15 May 2026 21:26:56 -0400
    Subject: [PATCH 62/72] Fix ArrayBuffer slice after resizable source shrink
    
    ---
     js/src/builtin/TypedArray.js                  |  5 +++-
     .../non262/ArrayBuffer/resizable-transfer.js  | 27 +++++++++++++++++++
     2 files changed, 31 insertions(+), 1 deletion(-)
    
    diff --git a/js/src/builtin/TypedArray.js b/js/src/builtin/TypedArray.js
    index b5a3b2a011..4311f27079 100644
    --- a/js/src/builtin/TypedArray.js
    +++ b/js/src/builtin/TypedArray.js
    @@ -1877,7 +1877,10 @@ function ArrayBufferSlice(start, end) {
             ThrowTypeError(JSMSG_TYPED_ARRAY_DETACHED);
     
         // Steps 19-21.
    -    ArrayBufferCopyData(new_, 0, O, first | 0, newLen | 0, isWrapped);
    +    var currentLen = ArrayBufferByteLength(O);
    +    var copyLen = first >= currentLen ? 0 : std_Math_min(newLen, currentLen - first);
    +    if (copyLen > 0)
    +        ArrayBufferCopyData(new_, 0, O, first | 0, copyLen | 0, isWrapped);
     
         // Step 22.
         return new_;
    diff --git a/js/src/tests/non262/ArrayBuffer/resizable-transfer.js b/js/src/tests/non262/ArrayBuffer/resizable-transfer.js
    index b9f9dbb13a..b05a0deffa 100644
    --- a/js/src/tests/non262/ArrayBuffer/resizable-transfer.js
    +++ b/js/src/tests/non262/ArrayBuffer/resizable-transfer.js
    @@ -62,6 +62,33 @@ assertEq(fixedMoved.maxByteLength, 10);
     assertEq(fixedMoved.resizable, false);
     assertEq(new Uint8Array(fixedMoved)[0], 7);
     
    +var sliceSource = new ArrayBuffer(8, { maxByteLength: 8 });
    +var sliceSourceBytes = new Uint8Array(sliceSource);
    +for (var i = 0; i < sliceSourceBytes.length; i++)
    +  sliceSourceBytes[i] = i + 1;
    +
    +sliceSource.constructor = {
    +  [Symbol.species]: function(byteLength) {
    +    sliceSource.resize(4);
    +    return new ArrayBuffer(byteLength);
    +  }
    +};
    +
    +var sliced = sliceSource.slice(2, 8);
    +var slicedBytes = new Uint8Array(sliced);
    +assertEq(sliced.byteLength, 6);
    +assertEq(slicedBytes[0], 3);
    +assertEq(slicedBytes[1], 4);
    +assertEq(slicedBytes[2], 0);
    +assertEq(slicedBytes[5], 0);
    +
    +sliceSource.resize(8);
    +for (var i = 0; i < sliceSourceBytes.length; i++)
    +  sliceSourceBytes[i] = i + 1;
    +var zeroCopied = sliceSource.slice(6, 8);
    +assertEq(zeroCopied.byteLength, 2);
    +assertEq(new Uint8Array(zeroCopied)[0], 0);
    +
     assertThrowsInstanceOf(() => new ArrayBuffer(4, { maxByteLength: 3 }), RangeError);
     
     if (typeof reportCompare === "function")
    
    From b44a606987a123c604127b1eb91b325137d79569 Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Fri, 15 May 2026 21:42:53 -0400
    Subject: [PATCH 63/72] Fix ArrayBuffer storage and error types
    
    ---
     js/src/js.msg                                 |  2 ++
     .../non262/ArrayBuffer/resizable-transfer.js  |  3 +++
     js/src/vm/ArrayBufferObject.cpp               | 24 +++++--------------
     3 files changed, 11 insertions(+), 18 deletions(-)
    
    diff --git a/js/src/js.msg b/js/src/js.msg
    index d8547ae4eb..c635bb54ed 100644
    --- a/js/src/js.msg
    +++ b/js/src/js.msg
    @@ -548,6 +548,8 @@ MSG_DEF(JSMSG_TOO_LONG_ARRAY,         0, JSEXN_TYPEERR, "Too long array")
     
     // Typed array
     MSG_DEF(JSMSG_BAD_INDEX,               0, JSEXN_RANGEERR, "invalid or out-of-range index")
    +MSG_DEF(JSMSG_ARRAYBUFFER_NOT_RESIZABLE, 0, JSEXN_TYPEERR, "ArrayBuffer is not resizable")
    +MSG_DEF(JSMSG_ARRAYBUFFER_CANNOT_DETACH, 0, JSEXN_TYPEERR, "ArrayBuffer cannot be detached")
     MSG_DEF(JSMSG_NON_ARRAY_BUFFER_RETURNED, 0, JSEXN_TYPEERR, "expected ArrayBuffer, but species constructor returned non-ArrayBuffer")
     MSG_DEF(JSMSG_SAME_ARRAY_BUFFER_RETURNED, 0, JSEXN_TYPEERR, "expected different ArrayBuffer, but species constructor returned same ArrayBuffer")
     MSG_DEF(JSMSG_SHORT_ARRAY_BUFFER_RETURNED, 2, JSEXN_TYPEERR, "expected ArrayBuffer with at least {0} bytes, but species constructor returns ArrayBuffer with {1} bytes")
    diff --git a/js/src/tests/non262/ArrayBuffer/resizable-transfer.js b/js/src/tests/non262/ArrayBuffer/resizable-transfer.js
    index b05a0deffa..f603edabff 100644
    --- a/js/src/tests/non262/ArrayBuffer/resizable-transfer.js
    +++ b/js/src/tests/non262/ArrayBuffer/resizable-transfer.js
    @@ -5,6 +5,9 @@ assertEq(fixed.byteLength, 4);
     assertEq(fixed.maxByteLength, 4);
     assertEq(fixed.resizable, false);
     assertEq(fixed.detached, false);
    +new Uint8Array(fixed).set([1, 2, 3, 4]);
    +fixed.extra = 17;
    +assertEq(Array.from(new Uint8Array(fixed)).join(","), "1,2,3,4");
     assertThrowsInstanceOf(() => fixed.resize(2), TypeError);
     assertEq(ArrayBuffer.prototype.transfer.length, 0);
     assertEq(ArrayBuffer.prototype.transferToFixedLength.length, 0);
    diff --git a/js/src/vm/ArrayBufferObject.cpp b/js/src/vm/ArrayBufferObject.cpp
    index 2ac6ced5ff..666fc774df 100644
    --- a/js/src/vm/ArrayBufferObject.cpp
    +++ b/js/src/vm/ArrayBufferObject.cpp
    @@ -409,14 +409,14 @@ AllocateArrayBufferContents(JSContext* cx, uint32_t nbytes)
     static bool
     ReportArrayBufferNotResizable(JSContext* cx)
     {
    -    JS_ReportErrorASCII(cx, "ArrayBuffer is not resizable");
    +    JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_ARRAYBUFFER_NOT_RESIZABLE);
         return false;
     }
     
     static bool
     ReportArrayBufferCannotDetach(JSContext* cx)
     {
    -    JS_ReportErrorASCII(cx, "ArrayBuffer cannot be detached");
    +    JS_ReportErrorNumberASCII(cx, GetErrorMessage, nullptr, JSMSG_ARRAYBUFFER_CANNOT_DETACH);
         return false;
     }
     
    @@ -1389,10 +1389,6 @@ ArrayBufferObject::create(JSContext* cx, uint32_t nbytes, BufferContents content
             return nullptr;
         }
     
    -    // If we need to allocate data, try to use a larger object size class so
    -    // that the array buffer's data can be allocated inline with the object.
    -    // The extra space will be left unused by the object's fixed slots and
    -    // available for the buffer's data, see NewObject().
         size_t reservedSlots = JSCLASS_RESERVED_SLOTS(&class_);
     
         size_t nslots = reservedSlots;
    @@ -1409,18 +1405,10 @@ ArrayBufferObject::create(JSContext* cx, uint32_t nbytes, BufferContents content
             }
         } else {
             MOZ_ASSERT(ownsState == OwnsData);
    -        size_t usableSlots = NativeObject::MAX_FIXED_SLOTS - reservedSlots;
    -        if (nbytes <= usableSlots * sizeof(Value)) {
    -            int newSlots = nbytes == 0 ? 0 : (nbytes - 1) / sizeof(Value) + 1;
    -            MOZ_ASSERT(int(nbytes) <= newSlots * int(sizeof(Value)));
    -            nslots = reservedSlots + newSlots;
    -            contents = BufferContents::createPlain(nullptr);
    -        } else {
    -            contents = AllocateArrayBufferContents(cx, nbytes);
    -            if (!contents)
    -                return nullptr;
    -            allocated = true;
    -        }
    +        contents = AllocateArrayBufferContents(cx, nbytes);
    +        if (!contents)
    +            return nullptr;
    +        allocated = true;
         }
     
         MOZ_ASSERT(!(class_.flags & JSCLASS_HAS_PRIVATE));
    
    From 2a6ec52f2fdc5754ea35087ae3174574c991c1bb Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Tue, 16 Dec 2025 22:28:11 -0500
    Subject: [PATCH 64/72] Issue MoonchildProductions/UXP#2306: Implement WeakRef
     functionality
    
    ---
     js/src/builtin/WeakRefObject.cpp | 204 +++++++++++++++++++++++++++++++
     js/src/builtin/WeakRefObject.h   |  55 +++++++++
     js/src/jsprototypes.h            |   1 +
     js/src/moz.build                 |   1 +
     js/src/vm/GlobalObject.cpp       |   2 +
     5 files changed, 263 insertions(+)
     create mode 100644 js/src/builtin/WeakRefObject.cpp
     create mode 100644 js/src/builtin/WeakRefObject.h
    
    diff --git a/js/src/builtin/WeakRefObject.cpp b/js/src/builtin/WeakRefObject.cpp
    new file mode 100644
    index 0000000000..4b02f8189f
    --- /dev/null
    +++ b/js/src/builtin/WeakRefObject.cpp
    @@ -0,0 +1,204 @@
    +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
    + * This Source Code Form is subject to the terms of the Mozilla Public
    + * License, v. 2.0. If a copy of the MPL was not distributed with this
    + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    +
    +#include "builtin/WeakRefObject.h"
    +
    +#include "jsapi.h"
    +#include "jscntxt.h"
    +
    +#include "gc/Nursery.h"
    +#include "gc/Tracer.h"
    +#include "vm/GlobalObject.h"
    +
    +#include "jsobjinlines.h"
    +
    +#include "vm/Interpreter-inl.h"
    +#include "vm/NativeObject-inl.h"
    +
    +using namespace js;
    +
    +static WeakRefObject::Referent*
    +GetReferent(JSObject* obj)
    +{
    +    return obj->as().getData();
    +}
    +
    +static MOZ_ALWAYS_INLINE bool
    +IsWeakRef(HandleValue v)
    +{
    +    return v.isObject() && v.toObject().is();
    +}
    +
    +static bool
    +WeakRef_deref_impl(JSContext* cx, const CallArgs& args)
    +{
    +    MOZ_ASSERT(IsWeakRef(args.thisv()));
    +
    +    WeakRefObject::Referent* data = GetReferent(&args.thisv().toObject());
    +    JSObject* target = data ? data->target.get() : nullptr;
    +    if (target)
    +        args.rval().setObject(*target);
    +    else
    +        args.rval().setUndefined();
    +    return true;
    +}
    +
    +const JSPropertySpec WeakRefObject::properties[] = {
    +    JS_PS_END
    +};
    +
    +const JSFunctionSpec WeakRefObject::methods[] = {
    +    JS_FN("deref", WeakRefObject::deref, 0, 0),
    +    JS_FS_END
    +};
    +
    +static JSObject*
    +InitWeakRefClass(JSContext* cx, HandleObject obj, bool defineMembers)
    +{
    +    Handle global = obj.as();
    +    RootedPlainObject proto(cx, NewBuiltinClassInstance(cx));
    +    if (!proto)
    +        return nullptr;
    +
    +    RootedFunction ctor(cx, GlobalObject::createConstructor(cx, WeakRefObject::construct,
    +                                                            ClassName(JSProto_WeakRef, cx), 1));
    +    if (!ctor)
    +        return nullptr;
    +
    +    if (!LinkConstructorAndPrototype(cx, ctor, proto))
    +        return nullptr;
    +
    +    if (defineMembers) {
    +        if (!DefinePropertiesAndFunctions(cx, proto, WeakRefObject::properties, WeakRefObject::methods))
    +            return nullptr;
    +        if (!DefineToStringTag(cx, proto, cx->names().WeakRef))
    +            return nullptr;
    +    }
    +
    +    if (!GlobalObject::initBuiltinConstructor(cx, global, JSProto_WeakRef, ctor, proto))
    +        return nullptr;
    +    return proto;
    +}
    +
    +/* static */ WeakRefObject*
    +WeakRefObject::create(JSContext* cx, HandleObject target, HandleObject proto /* = nullptr */)
    +{
    +    Rooted obj(cx, NewObjectWithClassProto(cx, proto));
    +    if (!obj)
    +        return nullptr;
    +
    +    Referent* data = cx->new_(target);
    +    if (!data)
    +        return nullptr;
    +
    +    obj->setPrivate(data);
    +    return obj;
    +}
    +
    +/* static */ bool
    +WeakRefObject::construct(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +
    +    if (!ThrowIfNotConstructing(cx, args, "WeakRef"))
    +        return false;
    +
    +    if (!args.get(0).isObject()) {
    +        UniqueChars bytes =
    +            DecompileValueGenerator(cx, JSDVG_SEARCH_STACK, args.get(0), nullptr);
    +        if (!bytes)
    +            return false;
    +
    +        JS_ReportErrorNumberLatin1(cx, GetErrorMessage, nullptr, JSMSG_NOT_NONNULL_OBJECT,
    +                                   bytes.get());
    +        return false;
    +    }
    +
    +    RootedObject target(cx, &args[0].toObject());
    +
    +    RootedObject proto(cx);
    +    RootedObject newTarget(cx, &args.newTarget().toObject());
    +    if (!GetPrototypeFromConstructor(cx, newTarget, &proto))
    +        return false;
    +
    +    Rooted obj(cx, WeakRefObject::create(cx, target, proto));
    +    if (!obj)
    +        return false;
    +
    +    args.rval().setObject(*obj);
    +    return true;
    +}
    +
    +/* static */ bool
    +WeakRefObject::deref(JSContext* cx, unsigned argc, Value* vp)
    +{
    +    CallArgs args = CallArgsFromVp(argc, vp);
    +    return CallNonGenericMethod(cx, args);
    +}
    +
    +/* static */ void
    +WeakRefObject::trace(JSTracer* trc, JSObject* obj)
    +{
    +    if (Referent* data = GetReferent(obj)) {
    +        JSObject* target = data->target.unbarrieredGet();
    +        if (!target)
    +            return;
    +
    +        // Weak edges must be tenured; fall back to a strong trace while the
    +        // referent is still in the nursery to avoid crashing the GC.
    +        if (IsInsideNursery(target))
    +            TraceManuallyBarrieredEdge(trc, data->target.unsafeGet(), "WeakRef nursery referent");
    +        else
    +            TraceWeakEdge(trc, &data->target, "WeakRef referent");
    +    }
    +}
    +
    +/* static */ void
    +WeakRefObject::finalize(FreeOp* fop, JSObject* obj)
    +{
    +    if (Referent* data = GetReferent(obj))
    +        fop->delete_(data);
    +}
    +
    +static const ClassOps WeakRefObjectClassOps = {
    +    nullptr, /* addProperty */
    +    nullptr, /* delProperty */
    +    nullptr, /* getProperty */
    +    nullptr, /* setProperty */
    +    nullptr, /* enumerate */
    +    nullptr, /* resolve */
    +    nullptr, /* mayResolve */
    +    WeakRefObject::finalize,
    +    nullptr, /* call */
    +    nullptr, /* hasInstance */
    +    nullptr, /* construct */
    +    WeakRefObject::trace
    +};
    +
    +const Class WeakRefObject::class_ = {
    +    "WeakRef",
    +    JSCLASS_HAS_PRIVATE |
    +    JSCLASS_HAS_CACHED_PROTO(JSProto_WeakRef) |
    +    JSCLASS_BACKGROUND_FINALIZE,
    +    &WeakRefObjectClassOps
    +};
    +
    +/* static */ JSObject*
    +WeakRefObject::initClass(JSContext* cx, HandleObject obj)
    +{
    +    return ::InitWeakRefClass(cx, obj, true);
    +}
    +
    +JSObject*
    +js::InitWeakRefClass(JSContext* cx, HandleObject obj)
    +{
    +    return WeakRefObject::initClass(cx, obj);
    +}
    +
    +JSObject*
    +js::InitBareWeakRefCtor(JSContext* cx, HandleObject obj)
    +{
    +    return ::InitWeakRefClass(cx, obj, false);
    +}
    diff --git a/js/src/builtin/WeakRefObject.h b/js/src/builtin/WeakRefObject.h
    new file mode 100644
    index 0000000000..e528f9fd37
    --- /dev/null
    +++ b/js/src/builtin/WeakRefObject.h
    @@ -0,0 +1,55 @@
    +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
    + * This Source Code Form is subject to the terms of the Mozilla Public
    + * License, v. 2.0. If a copy of the MPL was not distributed with this
    + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    +
    +#ifndef builtin_WeakRefObject_h
    +#define builtin_WeakRefObject_h
    +
    +#include "gc/Barrier.h"
    +#include "vm/NativeObject.h"
    +
    +namespace js {
    +
    +class WeakRefObject : public NativeObject
    +{
    +  public:
    +    struct Referent {
    +        explicit Referent(JSObject* obj) : target(obj) {}
    +        WeakRef target;
    +    };
    +
    +    static const Class class_;
    +
    +    static JSObject* initClass(JSContext* cx, HandleObject obj);
    +    static WeakRefObject* create(JSContext* cx, HandleObject target, HandleObject proto = nullptr);
    +
    +    static void trace(JSTracer* trc, JSObject* obj);
    +    static void finalize(FreeOp* fop, JSObject* obj);
    +    [[nodiscard]] static bool construct(JSContext* cx, unsigned argc, Value* vp);
    +    static bool deref(JSContext* cx, unsigned argc, Value* vp);
    +
    +    Referent* getData() const {
    +        return static_cast(getPrivate());
    +    }
    +
    +    WeakRef& target() {
    +        MOZ_ASSERT(getData());
    +        return getData()->target;
    +    }
    +
    +    static const JSPropertySpec properties[];
    +    static const JSFunctionSpec methods[];
    +
    +  private:
    +};
    +
    +extern JSObject*
    +InitWeakRefClass(JSContext* cx, HandleObject obj);
    +
    +extern JSObject*
    +InitBareWeakRefCtor(JSContext* cx, HandleObject obj);
    +
    +} // namespace js
    +
    +#endif /* builtin_WeakRefObject_h */
    diff --git a/js/src/jsprototypes.h b/js/src/jsprototypes.h
    index 9822a47b6c..6005724f89 100644
    --- a/js/src/jsprototypes.h
    +++ b/js/src/jsprototypes.h
    @@ -119,6 +119,7 @@ IF_SAB(real,imaginary)(Atomics, InitAtomicsClass, OCLASP(Atomics)) \
         imaginary(WritableStreamDefaultController,dummy,    dummy) \
         real(ByteLengthQueuingStrategy,           InitViaClassSpec, &js::ByteLengthQueuingStrategy::class_) \
         real(CountQueuingStrategy,  InitViaClassSpec,       &js::CountQueuingStrategy::class_) \
    +    real(WeakRef,               InitWeakRefClass,       OCLASP(WeakRef)) \
     
     #define JS_FOR_EACH_PROTOTYPE(macro) JS_FOR_PROTOTYPES(macro,macro)
     
    diff --git a/js/src/moz.build b/js/src/moz.build
    index baa4e1a19e..6672e41220 100644
    --- a/js/src/moz.build
    +++ b/js/src/moz.build
    @@ -142,6 +142,7 @@ main_deunified_sources = [
         'builtin/TestingFunctions.cpp',
         'builtin/TypedObject.cpp',
         'builtin/WeakMapObject.cpp',
    +    'builtin/WeakRefObject.cpp',
         'builtin/WeakSetObject.cpp',
         'devtools/sharkctl.cpp',
         'ds/LifoAlloc.cpp',
    diff --git a/js/src/vm/GlobalObject.cpp b/js/src/vm/GlobalObject.cpp
    index be82c18f11..9d1dab322e 100644
    --- a/js/src/vm/GlobalObject.cpp
    +++ b/js/src/vm/GlobalObject.cpp
    @@ -27,6 +27,7 @@
     #include "builtin/SymbolObject.h"
     #include "builtin/TypedObject.h"
     #include "builtin/WeakMapObject.h"
    +#include "builtin/WeakRefObject.h"
     #include "builtin/WeakSetObject.h"
     #include "vm/Debugger.h"
     #include "vm/EnvironmentObject.h"
    @@ -539,6 +540,7 @@ GlobalObject::initSelfHostingBuiltins(JSContext* cx, Handle globa
                InitBareBuiltinCtor(cx, global, JSProto_Int32Array) &&
                InitBareSymbolCtor(cx, global) &&
                InitBareWeakMapCtor(cx, global) &&
    +           InitBareWeakRefCtor(cx, global) &&
                InitStopIterationClass(cx, global) &&
                DefineFunctions(cx, global, builtins, AsIntrinsic);
     }
    
    From 3cf82e2ca176770262a289f71262798123c4af6a Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Wed, 17 Dec 2025 16:35:41 -0500
    Subject: [PATCH 65/72] Issue MoonchildProductions/UXP#2306: Add pref-gated
     WeakRef with safe stub when disabled
    
    * Add javascript.options.weakrefs and plumb it through context options, XPConnect, and workers
    * Keep referents alive via strong tracing when the pref is off so deref() still returns the target
    * Retain weak-edge semantics when the pref is enabled
    ---
     dom/workers/RuntimeService.cpp    |  1 +
     dom/workers/WorkerPrefs.h         |  1 +
     js/src/builtin/WeakRefObject.cpp  | 14 +++++++++-----
     js/src/builtin/WeakRefObject.h    |  4 +++-
     js/src/jsapi.h                    | 15 ++++++++++++++-
     js/xpconnect/src/XPCJSContext.cpp |  4 +++-
     modules/libpref/init/all.js       |  1 +
     7 files changed, 32 insertions(+), 8 deletions(-)
    
    diff --git a/dom/workers/RuntimeService.cpp b/dom/workers/RuntimeService.cpp
    index f63b1de981..65f778b5f9 100644
    --- a/dom/workers/RuntimeService.cpp
    +++ b/dom/workers/RuntimeService.cpp
    @@ -301,6 +301,7 @@ LoadContextOptions(const char* aPrefName, void* /* aClosure */)
                     .setAsyncStack(GetWorkerPref(NS_LITERAL_CSTRING("asyncstack")))
                     .setWerror(GetWorkerPref(NS_LITERAL_CSTRING("werror")))
                     .setStreams(GetWorkerPref(NS_LITERAL_CSTRING("streams")))
    +                .setWeakRefs(GetWorkerPref(NS_LITERAL_CSTRING("weakrefs")))
                     .setExtraWarnings(GetWorkerPref(NS_LITERAL_CSTRING("strict")))
                     .setArrayProtoValues(GetWorkerPref(
                           NS_LITERAL_CSTRING("array_prototype_values")));
    diff --git a/dom/workers/WorkerPrefs.h b/dom/workers/WorkerPrefs.h
    index 87806a6fbc..d870ac8e46 100644
    --- a/dom/workers/WorkerPrefs.h
    +++ b/dom/workers/WorkerPrefs.h
    @@ -35,6 +35,7 @@ WORKER_SIMPLE_PREF("dom.serviceWorkers.openWindow.enabled", OpenWindowEnabled, O
     WORKER_SIMPLE_PREF("dom.storageManager.enabled", StorageManagerEnabled, STORAGEMANAGER_ENABLED)
     WORKER_SIMPLE_PREF("dom.push.enabled", PushEnabled, PUSH_ENABLED)
     WORKER_SIMPLE_PREF("dom.streams.enabled", StreamsEnabled, STREAMS_ENABLED)
    +WORKER_SIMPLE_PREF("javascript.options.weakrefs", WeakRefsEnabled, WEAKREFS_ENABLED)
     WORKER_SIMPLE_PREF("dom.requestcontext.enabled", RequestContextEnabled, REQUESTCONTEXT_ENABLED)
     WORKER_SIMPLE_PREF("gfx.offscreencanvas.enabled", OffscreenCanvasEnabled, OFFSCREENCANVAS_ENABLED)
     WORKER_SIMPLE_PREF("dom.webkitBlink.dirPicker.enabled", WebkitBlinkDirectoryPickerEnabled, DOM_WEBKITBLINK_DIRPICKER_WEBKITBLINK)
    diff --git a/js/src/builtin/WeakRefObject.cpp b/js/src/builtin/WeakRefObject.cpp
    index 4b02f8189f..8e8feb3f3d 100644
    --- a/js/src/builtin/WeakRefObject.cpp
    +++ b/js/src/builtin/WeakRefObject.cpp
    @@ -89,7 +89,7 @@ WeakRefObject::create(JSContext* cx, HandleObject target, HandleObject proto /*
         if (!obj)
             return nullptr;
     
    -    Referent* data = cx->new_(target);
    +    Referent* data = cx->new_(target, cx->options().weakRefs());
         if (!data)
             return nullptr;
     
    @@ -146,12 +146,16 @@ WeakRefObject::trace(JSTracer* trc, JSObject* obj)
             if (!target)
                 return;
     
    -        // Weak edges must be tenured; fall back to a strong trace while the
    -        // referent is still in the nursery to avoid crashing the GC.
    -        if (IsInsideNursery(target))
    +        // When pref-disabled, keep referent alive via strong trace so deref()
    +        // stays usable as a stub without touching GC internals.
    +        if (!data->enabled) {
    +            TraceManuallyBarrieredEdge(trc, data->target.unsafeGet(), "WeakRef stub referent");
    +        } else if (IsInsideNursery(target)) {
    +            // Weak edges must be tenured; trace strongly while referent is in the nursery.
                 TraceManuallyBarrieredEdge(trc, data->target.unsafeGet(), "WeakRef nursery referent");
    -        else
    +        } else {
                 TraceWeakEdge(trc, &data->target, "WeakRef referent");
    +        }
         }
     }
     
    diff --git a/js/src/builtin/WeakRefObject.h b/js/src/builtin/WeakRefObject.h
    index e528f9fd37..f4d7e547e4 100644
    --- a/js/src/builtin/WeakRefObject.h
    +++ b/js/src/builtin/WeakRefObject.h
    @@ -15,8 +15,10 @@ class WeakRefObject : public NativeObject
     {
       public:
         struct Referent {
    -        explicit Referent(JSObject* obj) : target(obj) {}
    +        explicit Referent(JSObject* obj, bool enabled)
    +          : target(obj), enabled(enabled) {}
             WeakRef target;
    +        bool enabled;
         };
     
         static const Class class_;
    diff --git a/js/src/jsapi.h b/js/src/jsapi.h
    index cae2297ae4..7744bdd592 100644
    --- a/js/src/jsapi.h
    +++ b/js/src/jsapi.h
    @@ -998,7 +998,9 @@ class JS_PUBLIC_API(ContextOptions) {
             werror_(false),
             strictMode_(false),
             extraWarnings_(false),
    -        arrayProtoValues_(true)
    +        arrayProtoValues_(true),
    +        streams_(true),
    +        weakRefs_(false)
         {
         }
     
    @@ -1138,6 +1140,16 @@ class JS_PUBLIC_API(ContextOptions) {
             return *this;
         }
     
    +    bool weakRefs() const { return weakRefs_; }
    +    ContextOptions& setWeakRefs(bool flag) {
    +        weakRefs_ = flag;
    +        return *this;
    +    }
    +    ContextOptions& toggleWeakRefs() {
    +        weakRefs_ = !weakRefs_;
    +        return *this;
    +    }
    +
       private:
         bool baseline_ : 1;
         bool ion_ : 1;
    @@ -1155,6 +1167,7 @@ class JS_PUBLIC_API(ContextOptions) {
         bool extraWarnings_ : 1;
         bool arrayProtoValues_ : 1;
         bool streams_ : 1;
    +    bool weakRefs_ : 1;
     };
     
     JS_PUBLIC_API(ContextOptions&)
    diff --git a/js/xpconnect/src/XPCJSContext.cpp b/js/xpconnect/src/XPCJSContext.cpp
    index 3ca3da6b8b..9365937fdd 100644
    --- a/js/xpconnect/src/XPCJSContext.cpp
    +++ b/js/xpconnect/src/XPCJSContext.cpp
    @@ -1446,6 +1446,7 @@ ReloadPrefsCallback(const char* pref, void* data)
         bool extraWarnings = Preferences::GetBool(JS_OPTIONS_DOT_STR "strict");
         
         bool streams = Preferences::GetBool(JS_OPTIONS_DOT_STR "streams");
    +    bool weakRefs = Preferences::GetBool(JS_OPTIONS_DOT_STR "weakrefs");
     
         bool unboxedObjects = Preferences::GetBool(JS_OPTIONS_DOT_STR "unboxed_objects");
         
    @@ -1472,7 +1473,8 @@ ReloadPrefsCallback(const char* pref, void* data)
                                  .setWerror(werror)
                                  .setExtraWarnings(extraWarnings)
                                  .setArrayProtoValues(arrayProtoValues)
    -                             .setStreams(streams);
    +                             .setStreams(streams)
    +                             .setWeakRefs(weakRefs);
     
         JS_SetParallelParsingEnabled(cx, parallelParsing);
         JS_SetOffthreadIonCompilationEnabled(cx, offthreadIonCompilation);
    diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
    index e13c9e94c9..8cc30f4c30 100644
    --- a/modules/libpref/init/all.js
    +++ b/modules/libpref/init/all.js
    @@ -1347,6 +1347,7 @@ pref("javascript.options.dynamicImport", true);
     
     // Streams API
     pref("javascript.options.streams", true);
    +pref("javascript.options.weakrefs", false);
     
     // advanced prefs
     pref("advanced.mailftp",                    false);
    
    From c835378c6e5fc342b772ee9b19e61463c759a62a Mon Sep 17 00:00:00 2001
    From: Basilisk-Dev 
    Date: Wed, 17 Dec 2025 16:56:25 -0500
    Subject: [PATCH 66/72] Issue MoonchildProductions/UXP#2306: Fix spacing
    
    ---
     modules/libpref/init/all.js | 2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
    index 8cc30f4c30..857e9de7b6 100644
    --- a/modules/libpref/init/all.js
    +++ b/modules/libpref/init/all.js
    @@ -1347,6 +1347,8 @@ pref("javascript.options.dynamicImport", true);
     
     // Streams API
     pref("javascript.options.streams", true);
    +
    +// Enable garbage collection of weakrefed objects
     pref("javascript.options.weakrefs", false);
     
     // advanced prefs
    
    From 34040dee8974da40bd004e60a6ec68164eb9b430 Mon Sep 17 00:00:00 2001
    From: wuggy 
    Date: Thu, 6 Aug 2026 17:00:28 -0700
    Subject: [PATCH 67/72] Fix compile error
    
    ---
     js/src/builtin/WeakRefObject.h | 6 ++++++
     1 file changed, 6 insertions(+)
    
    diff --git a/js/src/builtin/WeakRefObject.h b/js/src/builtin/WeakRefObject.h
    index f4d7e547e4..6f2a2b4590 100644
    --- a/js/src/builtin/WeakRefObject.h
    +++ b/js/src/builtin/WeakRefObject.h
    @@ -52,6 +52,12 @@ InitWeakRefClass(JSContext* cx, HandleObject obj);
     extern JSObject*
     InitBareWeakRefCtor(JSContext* cx, HandleObject obj);
     
    +static inline bool
    +CanBeHeldWeakly(const Value& value)
    +{
    +    return value.isObject() || value.isSymbol();
    +}
    +
     } // namespace js
     
     #endif /* builtin_WeakRefObject_h */
    
    From fe26390483445f122af2338cc9a8bd2a4c85d770 Mon Sep 17 00:00:00 2001
    From: wuggy 
    Date: Thu, 6 Aug 2026 17:32:38 -0700
    Subject: [PATCH 68/72] enable async pan/zoom (Issue #29 @ lun3r)
    
    ---
     modules/libpref/init/all.js | 8 ++++----
     1 file changed, 4 insertions(+), 4 deletions(-)
    
    diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
    index 857e9de7b6..54d89a7abb 100644
    --- a/modules/libpref/init/all.js
    +++ b/modules/libpref/init/all.js
    @@ -9,7 +9,7 @@
      *
      * Platform-specific #ifdefs at the end of this file override the generic
      * entries at the top.
    - */
    + *
     
     /*
      * SYNTAX HINTS:
    @@ -639,7 +639,7 @@ pref("layout.event-regions.enabled", false);
     // gfx/layers/apz/src/AsyncPanZoomController.cpp.
     pref("apz.allow_checkerboarding", true);
     pref("apz.allow_immediate_handoff", true);
    -pref("apz.allow_zooming", false);
    +pref("apz.allow_zooming", true);
     
     // Whether to lock touch scrolling to one axis at a time
     // 0 = FREE (No locking at all)
    @@ -651,7 +651,7 @@ pref("apz.axis_lock.breakout_threshold", "0.03125");  // 1/32 inches
     pref("apz.axis_lock.breakout_angle", "0.3926991");    // PI / 8 (22.5 degrees)
     pref("apz.axis_lock.direct_pan_angle", "1.047197");   // PI / 3 (60 degrees)
     pref("apz.content_response_timeout", 400);
    -pref("apz.drag.enabled", false);
    +pref("apz.drag.enabled", true);
     pref("apz.danger_zone_x", 50);
     pref("apz.danger_zone_y", 100);
     pref("apz.disable_for_scroll_linked_effects", false);
    @@ -710,7 +710,7 @@ pref("apz.zoom_animation_duration_ms", 250);
     pref("apz.scale_repaint_delay_ms", 500);
     
     #if !defined(MOZ_WIDGET_UIKIT)
    -pref("apz.desktop.enabled", false);
    +pref("apz.desktop.enabled", true);
     #endif
     
     #ifdef XP_MACOSX
    
    From 3be08bc94bf666c81d7b30c0ba042517169e5e6f Mon Sep 17 00:00:00 2001
    From: wuggy 
    Date: Fri, 7 Aug 2026 13:09:19 -0700
    Subject: [PATCH 69/72] Optimise WebExtension implementaion pt.1
    
    ---
     dom/base/CustomElementRegistry.cpp |  3 +++
     dom/base/CustomElementRegistry.h   |  7 ++++++-
     dom/base/ShadowRoot.cpp            | 31 +++++++++++++-----------------
     3 files changed, 22 insertions(+), 19 deletions(-)
    
    diff --git a/dom/base/CustomElementRegistry.cpp b/dom/base/CustomElementRegistry.cpp
    index 11ba39a67e..bb10f3ca80 100644
    --- a/dom/base/CustomElementRegistry.cpp
    +++ b/dom/base/CustomElementRegistry.cpp
    @@ -1278,6 +1278,9 @@ CustomElementDefinition::CustomElementDefinition(nsIAtom* aType,
         mCallbacks(aCallbacks),
         mDocOrder(aDocOrder)
     {
    +  for (uint32_t i = 0; i < mObservedAttributes.Length(); ++i) {
    +    mObservedAttributesSet.PutEntry(mObservedAttributes[i]);
    +  }
     }
     
     //-----------------------------------------------------
    diff --git a/dom/base/CustomElementRegistry.h b/dom/base/CustomElementRegistry.h
    index 06e5947dbc..53f58b5a9f 100644
    --- a/dom/base/CustomElementRegistry.h
    +++ b/dom/base/CustomElementRegistry.h
    @@ -16,6 +16,8 @@
     #include "mozilla/dom/WebComponentsBinding.h"
     #include "nsCycleCollectionParticipant.h"
     #include "nsGenericHTMLElement.h"
    +#include "nsHashKeys.h"
    +#include "nsTHashtable.h"
     #include "nsWrapperCache.h"
     
     class nsDocument;
    @@ -166,6 +168,9 @@ struct CustomElementDefinition
       // The list of attributes that this custom element observes.
       nsCOMArray mObservedAttributes;
     
    +  // Hash set for O(1) lookup of observed attributes.
    +  nsTHashtable mObservedAttributesSet;
    +
       // The prototype to use for new custom elements of this type.
       JS::Heap mPrototype;
     
    @@ -189,7 +194,7 @@ struct CustomElementDefinition
           return false;
         }
     
    -    return mObservedAttributes.Contains(aName);
    +    return mObservedAttributesSet.Contains(aName);
       }
     
     private:
    diff --git a/dom/base/ShadowRoot.cpp b/dom/base/ShadowRoot.cpp
    index f2ae953a0e..d2da59edbb 100644
    --- a/dom/base/ShadowRoot.cpp
    +++ b/dom/base/ShadowRoot.cpp
    @@ -136,7 +136,7 @@ ShadowRoot::AddSlot(HTMLSlotElement* aSlot)
       MOZ_ASSERT(aSlot);
     
       // Note that if name attribute missing, the slot is a default slot.
    - nsAutoString name;
    +  nsAutoString name;
       aSlot->GetName(name);
     
       nsTArray* currentSlots = mSlotMap.LookupOrAdd(name);
    @@ -162,25 +162,14 @@ ShadowRoot::AddSlot(HTMLSlotElement* aSlot)
     
           oldSlot->RemoveAssignedNode(assignedNode);
           currentSlot->AppendAssignedNode(assignedNode);
    -
    -      Element* restyleElement;
    -      if (assignedNode->IsElement()) {
    -        restyleElement = assignedNode->AsElement();
    -      } else {
    -        // This is likely a text node. Use the host instead.
    -        restyleElement = GetHost();
    -      }
    -      if (restyleElement) {
    -        nsLayoutUtils::PostRestyleEvent(
    -          restyleElement, eRestyle_Subtree, nsChangeHint(0));
    -      }
    -
           doEnqueueSlotChange = true;
         }
     
         if (doEnqueueSlotChange) {
           oldSlot->EnqueueSlotChangeEvent();
           currentSlot->EnqueueSlotChangeEvent();
    +      nsLayoutUtils::PostRestyleEvent(
    +        GetHost(), eRestyle_Subtree, nsChangeHint(0));
         }
       } else {
         // Otherwise add appropriate nodes to this slot from the host.
    @@ -475,7 +464,10 @@ ShadowRoot::MaybeReassignElement(Element* aElement,
     void
     ShadowRoot::DistributionChanged()
     {
    -  // FIXME(emilio): We could be more granular in a bunch of cases.
    +  if (mSlotMap.IsEmpty()) {
    +    return;
    +  }
    +
       auto* host = GetHost();
       if (!host || !host->IsInComposedDoc()) {
         return;
    @@ -551,8 +543,11 @@ ShadowRoot::AttributeChanged(nsIDocument* aDocument,
         return;
       }
     
    -  //XXX optimize this!
    -  shell->DestroyFramesForAndRestyle(aElement);
    +  if (aElement->GetPrimaryFrame()) {
    +    shell->DestroyFramesForAndRestyle(aElement);
    +  } else {
    +    nsLayoutUtils::PostRestyleEvent(aElement, eRestyle_Subtree, nsChangeHint(0));
    +  }
     }
     
     void
    @@ -564,7 +559,7 @@ ShadowRoot::ContentAppended(nsIDocument* aDocument,
       for (nsIContent* content = aFirstNewContent;
            content;
            content = content->GetNextSibling()) {
    -    ContentInserted(aDocument, aContainer, aFirstNewContent, aNewIndexInContainer);
    +    ContentInserted(aDocument, aContainer, content, aNewIndexInContainer);
       }
     }
     
    
    From cd6be07458e0f1e5191323ff4b2d578638aafe1e Mon Sep 17 00:00:00 2001
    From: wuggy 
    Date: Fri, 7 Aug 2026 13:13:43 -0700
    Subject: [PATCH 70/72] Revert "Optimise WebExtension implementaion pt.1"
    
    This reverts commit 3be08bc94bf666c81d7b30c0ba042517169e5e6f.
    ---
     dom/base/CustomElementRegistry.cpp |  3 ---
     dom/base/CustomElementRegistry.h   |  7 +------
     dom/base/ShadowRoot.cpp            | 31 +++++++++++++++++-------------
     3 files changed, 19 insertions(+), 22 deletions(-)
    
    diff --git a/dom/base/CustomElementRegistry.cpp b/dom/base/CustomElementRegistry.cpp
    index bb10f3ca80..11ba39a67e 100644
    --- a/dom/base/CustomElementRegistry.cpp
    +++ b/dom/base/CustomElementRegistry.cpp
    @@ -1278,9 +1278,6 @@ CustomElementDefinition::CustomElementDefinition(nsIAtom* aType,
         mCallbacks(aCallbacks),
         mDocOrder(aDocOrder)
     {
    -  for (uint32_t i = 0; i < mObservedAttributes.Length(); ++i) {
    -    mObservedAttributesSet.PutEntry(mObservedAttributes[i]);
    -  }
     }
     
     //-----------------------------------------------------
    diff --git a/dom/base/CustomElementRegistry.h b/dom/base/CustomElementRegistry.h
    index 53f58b5a9f..06e5947dbc 100644
    --- a/dom/base/CustomElementRegistry.h
    +++ b/dom/base/CustomElementRegistry.h
    @@ -16,8 +16,6 @@
     #include "mozilla/dom/WebComponentsBinding.h"
     #include "nsCycleCollectionParticipant.h"
     #include "nsGenericHTMLElement.h"
    -#include "nsHashKeys.h"
    -#include "nsTHashtable.h"
     #include "nsWrapperCache.h"
     
     class nsDocument;
    @@ -168,9 +166,6 @@ struct CustomElementDefinition
       // The list of attributes that this custom element observes.
       nsCOMArray mObservedAttributes;
     
    -  // Hash set for O(1) lookup of observed attributes.
    -  nsTHashtable mObservedAttributesSet;
    -
       // The prototype to use for new custom elements of this type.
       JS::Heap mPrototype;
     
    @@ -194,7 +189,7 @@ struct CustomElementDefinition
           return false;
         }
     
    -    return mObservedAttributesSet.Contains(aName);
    +    return mObservedAttributes.Contains(aName);
       }
     
     private:
    diff --git a/dom/base/ShadowRoot.cpp b/dom/base/ShadowRoot.cpp
    index d2da59edbb..f2ae953a0e 100644
    --- a/dom/base/ShadowRoot.cpp
    +++ b/dom/base/ShadowRoot.cpp
    @@ -136,7 +136,7 @@ ShadowRoot::AddSlot(HTMLSlotElement* aSlot)
       MOZ_ASSERT(aSlot);
     
       // Note that if name attribute missing, the slot is a default slot.
    -  nsAutoString name;
    + nsAutoString name;
       aSlot->GetName(name);
     
       nsTArray* currentSlots = mSlotMap.LookupOrAdd(name);
    @@ -162,14 +162,25 @@ ShadowRoot::AddSlot(HTMLSlotElement* aSlot)
     
           oldSlot->RemoveAssignedNode(assignedNode);
           currentSlot->AppendAssignedNode(assignedNode);
    +
    +      Element* restyleElement;
    +      if (assignedNode->IsElement()) {
    +        restyleElement = assignedNode->AsElement();
    +      } else {
    +        // This is likely a text node. Use the host instead.
    +        restyleElement = GetHost();
    +      }
    +      if (restyleElement) {
    +        nsLayoutUtils::PostRestyleEvent(
    +          restyleElement, eRestyle_Subtree, nsChangeHint(0));
    +      }
    +
           doEnqueueSlotChange = true;
         }
     
         if (doEnqueueSlotChange) {
           oldSlot->EnqueueSlotChangeEvent();
           currentSlot->EnqueueSlotChangeEvent();
    -      nsLayoutUtils::PostRestyleEvent(
    -        GetHost(), eRestyle_Subtree, nsChangeHint(0));
         }
       } else {
         // Otherwise add appropriate nodes to this slot from the host.
    @@ -464,10 +475,7 @@ ShadowRoot::MaybeReassignElement(Element* aElement,
     void
     ShadowRoot::DistributionChanged()
     {
    -  if (mSlotMap.IsEmpty()) {
    -    return;
    -  }
    -
    +  // FIXME(emilio): We could be more granular in a bunch of cases.
       auto* host = GetHost();
       if (!host || !host->IsInComposedDoc()) {
         return;
    @@ -543,11 +551,8 @@ ShadowRoot::AttributeChanged(nsIDocument* aDocument,
         return;
       }
     
    -  if (aElement->GetPrimaryFrame()) {
    -    shell->DestroyFramesForAndRestyle(aElement);
    -  } else {
    -    nsLayoutUtils::PostRestyleEvent(aElement, eRestyle_Subtree, nsChangeHint(0));
    -  }
    +  //XXX optimize this!
    +  shell->DestroyFramesForAndRestyle(aElement);
     }
     
     void
    @@ -559,7 +564,7 @@ ShadowRoot::ContentAppended(nsIDocument* aDocument,
       for (nsIContent* content = aFirstNewContent;
            content;
            content = content->GetNextSibling()) {
    -    ContentInserted(aDocument, aContainer, content, aNewIndexInContainer);
    +    ContentInserted(aDocument, aContainer, aFirstNewContent, aNewIndexInContainer);
       }
     }
     
    
    From adbd77d7ebf8dacb0949e762b1060300c920a5ca Mon Sep 17 00:00:00 2001
    From: wuggy 
    Date: Fri, 7 Aug 2026 19:42:39 -0700
    Subject: [PATCH 71/72] Fix Next.js sites like Grok (Grok is still broken but
     less broken)
    
    ---
     dom/script/ScriptLoader.cpp | 3 +--
     1 file changed, 1 insertion(+), 2 deletions(-)
    
    diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp
    index c0b970e58a..acf5027949 100644
    --- a/dom/script/ScriptLoader.cpp
    +++ b/dom/script/ScriptLoader.cpp
    @@ -2334,8 +2334,7 @@ ScriptLoader::EvaluateScript(ScriptLoadRequest* aRequest)
         }
     
         if (aRequest->IsModuleRequest()) {
    -      // For modules, currentScript is set to null.
    -      AutoCurrentScriptUpdater scriptUpdater(this, nullptr);
    +      AutoCurrentScriptUpdater scriptUpdater(this, aRequest->Element());
     
           ModuleLoadRequest* request = aRequest->AsModuleRequest();
           MOZ_ASSERT(request->mModuleScript);
    
    From be7e2afbcf3ac741449ca928b20744ce704e5fc6 Mon Sep 17 00:00:00 2001
    From: wuggy 
    Date: Fri, 7 Aug 2026 20:27:22 -0700
    Subject: [PATCH 72/72] accept any MIME type for a style sheet to match modern
     browsers
    
    ---
     layout/style/Loader.cpp | 9 +++++----
     1 file changed, 5 insertions(+), 4 deletions(-)
    
    diff --git a/layout/style/Loader.cpp b/layout/style/Loader.cpp
    index 581fe9622d..a6a471a0b8 100644
    --- a/layout/style/Loader.cpp
    +++ b/layout/style/Loader.cpp
    @@ -885,9 +885,10 @@ SheetLoadData::OnStreamComplete(nsIUnicharStreamLoader* aLoader,
       }
     
       // In standards mode, a style sheet must have one of these MIME
    -  // types to be processed at all.  In quirks mode, we accept any
    -  // MIME type, but only if the style sheet is same-origin with the
    -  // requesting document or parent sheet.  See bug 524223.
    +  // types to be processed at all, unless it is same-origin.
    +  // For same-origin sheets, we accept any MIME type to match modern
    +  // browser behavior (Chrome, Firefox). Cross-origin sheets require
    +  // a valid CSS MIME type for security.
     
       bool validType = contentType.EqualsLiteral("text/css") ||
         contentType.EqualsLiteral(UNKNOWN_CONTENT_TYPE) ||
    @@ -906,7 +907,7 @@ SheetLoadData::OnStreamComplete(nsIUnicharStreamLoader* aLoader,
           }
         }
     
    -    if (sameOrigin && mLoader->mCompatMode == eCompatibility_NavQuirks) {
    +    if (sameOrigin) {
           errorMessage = "MimeNotCssWarn";
           errorFlag = nsIScriptError::warningFlag;
         } else {
    
  • )w+NA9=(^v|9VQYk=1+7XQ)BI18Idcyj~wQgN$FMroJi78YP z6-ST$`bf#$fO3C-_UO^PgL_N9KVk`GC@5*hkO3q5WZW*11;~?=eWa~Q=qp}c(M^?^ zw1aVcq@BS-cicx`tIkCS2fRho9hjkFy{FgI7_YK zQt;YP+5!c95H={1F`1zG2;BPdJt07GJhV_CbkVE|e9M_f({YokVj~1>2U&a@8^$nK zPZGV;6EU5nMxQu7d$XEaxJX74Y6v~BPx|R4{34%D-s{BWqbhJXApi}WY?rWI(h4VKxqg65V}$5LDFvC^dWoT!jYH{9Z;_8Gm}%D?%z>`$kDcx{zs-vrEM zhP33#Agfscv6hJ`yhkH@4wWux>|+pttt(l*`}pzK45bn+ z^leLPrh-<>{%|xc0c~uBf^xg)odpmdMk_$%v*F-yl^zaeWjQN%oXYogdR;6P8oeKQ zI5~=5t@~AVd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